@kensio/yulin 1.16.1 → 1.16.3

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 (549) hide show
  1. package/dist/sdk/router/sim-sdk-caller-options.d.ts +2 -2
  2. package/dist/sdk/router/sim-sdk-caller-options.d.ts.map +1 -1
  3. package/dist/sdk/router/sim-sdk-command-router.type.d.ts +7 -2
  4. package/dist/sdk/router/sim-sdk-command-router.type.d.ts.map +1 -1
  5. package/dist/sdk/sim-sdk-command-dispatcher.d.ts +7 -1
  6. package/dist/sdk/sim-sdk-command-dispatcher.d.ts.map +1 -1
  7. package/dist/sdk/sim-sdk-command-dispatcher.js +16 -4
  8. package/dist/sdk/sim-sdk-command-dispatcher.js.map +1 -1
  9. package/dist/sdk/wire/sim-sdk-wire-dispatcher.d.ts +7 -6
  10. package/dist/sdk/wire/sim-sdk-wire-dispatcher.d.ts.map +1 -1
  11. package/dist/sdk/wire/sim-sdk-wire-dispatcher.js +11 -10
  12. package/dist/sdk/wire/sim-sdk-wire-dispatcher.js.map +1 -1
  13. package/dist/sdk/wire/sim-sdk-wire-operation.d.ts +12 -2
  14. package/dist/sdk/wire/sim-sdk-wire-operation.d.ts.map +1 -1
  15. package/dist/sdk/wire/sim-sdk-wire-operation.js +1 -0
  16. package/dist/sdk/wire/sim-sdk-wire-operation.js.map +1 -1
  17. package/dist/sdk/wire/sim-sdk-wire.types.d.ts +0 -4
  18. package/dist/sdk/wire/sim-sdk-wire.types.d.ts.map +1 -1
  19. package/dist/serve/http/api/sim-aws-api-endpoint.d.ts +40 -0
  20. package/dist/serve/http/api/sim-aws-api-endpoint.d.ts.map +1 -0
  21. package/dist/serve/http/api/sim-aws-api-endpoint.js +120 -0
  22. package/dist/serve/http/api/sim-aws-api-endpoint.js.map +1 -0
  23. package/dist/serve/http/sim-aws-http.d.ts +1 -0
  24. package/dist/serve/http/sim-aws-http.d.ts.map +1 -1
  25. package/dist/serve/http/sim-aws-http.js +9 -0
  26. package/dist/serve/http/sim-aws-http.js.map +1 -1
  27. package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts.map +1 -1
  28. package/dist/service/aws/factory/sim-aws-account-region-service-builder.js +1 -0
  29. package/dist/service/aws/factory/sim-aws-account-region-service-builder.js.map +1 -1
  30. package/dist/service/aws/factory/sim-aws-lambda-collaborators.d.ts +8 -0
  31. package/dist/service/aws/factory/sim-aws-lambda-collaborators.d.ts.map +1 -1
  32. package/dist/service/aws/factory/sim-aws-lambda-collaborators.js +13 -0
  33. package/dist/service/aws/factory/sim-aws-lambda-collaborators.js.map +1 -1
  34. package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-lookup.d.ts +28 -0
  35. package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-lookup.d.ts.map +1 -0
  36. package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-lookup.js +36 -0
  37. package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-lookup.js.map +1 -0
  38. package/dist/service/cloudformation/stack/sim-cfn-stack.d.ts +10 -28
  39. package/dist/service/cloudformation/stack/sim-cfn-stack.d.ts.map +1 -1
  40. package/dist/service/cloudformation/stack/sim-cfn-stack.js +11 -2
  41. package/dist/service/cloudformation/stack/sim-cfn-stack.js.map +1 -1
  42. package/dist/service/cloudformation/stack/sim-cfn-stack.type.d.ts +28 -0
  43. package/dist/service/cloudformation/stack/sim-cfn-stack.type.d.ts.map +1 -0
  44. package/dist/service/cloudformation/stack/sim-cfn-stack.type.js +2 -0
  45. package/dist/service/cloudformation/stack/sim-cfn-stack.type.js.map +1 -0
  46. package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.d.ts.map +1 -1
  47. package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.js +2 -1
  48. package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.js.map +1 -1
  49. package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.d.ts.map +1 -1
  50. package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.js +2 -1
  51. package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.js.map +1 -1
  52. package/dist/service/cognito/command/sim-cognito-command.types.d.ts +1 -0
  53. package/dist/service/cognito/command/sim-cognito-command.types.d.ts.map +1 -1
  54. package/dist/service/cognito/command/sim-cognito-commands.d.ts +2 -0
  55. package/dist/service/cognito/command/sim-cognito-commands.d.ts.map +1 -1
  56. package/dist/service/cognito/command/sim-cognito-commands.js +8 -0
  57. package/dist/service/cognito/command/sim-cognito-commands.js.map +1 -1
  58. package/dist/service/cognito/command/user/password-reset.command.d.ts +80 -0
  59. package/dist/service/cognito/command/user/password-reset.command.d.ts.map +1 -0
  60. package/dist/service/cognito/command/user/password-reset.command.js +2 -0
  61. package/dist/service/cognito/command/user/password-reset.command.js.map +1 -0
  62. package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.d.ts +74 -0
  63. package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.d.ts.map +1 -0
  64. package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.js +121 -0
  65. package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.js.map +1 -0
  66. package/dist/service/cognito/command/user/sim-cognito-resetting-user.d.ts +34 -0
  67. package/dist/service/cognito/command/user/sim-cognito-resetting-user.d.ts.map +1 -0
  68. package/dist/service/cognito/command/user/sim-cognito-resetting-user.js +54 -0
  69. package/dist/service/cognito/command/user/sim-cognito-resetting-user.js.map +1 -0
  70. package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.d.ts.map +1 -1
  71. package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js +3 -3
  72. package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js.map +1 -1
  73. package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.d.ts +29 -0
  74. package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.d.ts.map +1 -0
  75. package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.js +36 -0
  76. package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.js.map +1 -0
  77. package/dist/service/cognito/error/sim-cognito.error.d.ts +23 -0
  78. package/dist/service/cognito/error/sim-cognito.error.d.ts.map +1 -1
  79. package/dist/service/cognito/error/sim-cognito.error.js +27 -0
  80. package/dist/service/cognito/error/sim-cognito.error.js.map +1 -1
  81. package/dist/service/cognito/index.d.ts +2 -1
  82. package/dist/service/cognito/index.d.ts.map +1 -1
  83. package/dist/service/cognito/index.js +2 -1
  84. package/dist/service/cognito/index.js.map +1 -1
  85. package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.d.ts +6 -5
  86. package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.d.ts.map +1 -1
  87. package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.js +18 -5
  88. package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.js.map +1 -1
  89. package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.d.ts +26 -0
  90. package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.d.ts.map +1 -0
  91. package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.js +57 -0
  92. package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.js.map +1 -0
  93. package/dist/service/cognito/serve/page/sim-cognito-managed-login.d.ts +9 -6
  94. package/dist/service/cognito/serve/page/sim-cognito-managed-login.d.ts.map +1 -1
  95. package/dist/service/cognito/serve/page/sim-cognito-managed-login.js +26 -11
  96. package/dist/service/cognito/serve/page/sim-cognito-managed-login.js.map +1 -1
  97. package/dist/service/cognito/serve/page/sim-cognito-page-paths.d.ts +18 -0
  98. package/dist/service/cognito/serve/page/sim-cognito-page-paths.d.ts.map +1 -1
  99. package/dist/service/cognito/serve/page/sim-cognito-page-paths.js +23 -0
  100. package/dist/service/cognito/serve/page/sim-cognito-page-paths.js.map +1 -1
  101. package/dist/service/cognito/serve/page/sim-cognito-provider-links.d.ts +12 -0
  102. package/dist/service/cognito/serve/page/sim-cognito-provider-links.d.ts.map +1 -0
  103. package/dist/service/cognito/serve/page/sim-cognito-provider-links.js +18 -0
  104. package/dist/service/cognito/serve/page/sim-cognito-provider-links.js.map +1 -0
  105. package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.d.ts +27 -0
  106. package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.d.ts.map +1 -0
  107. package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.js +65 -0
  108. package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.js.map +1 -0
  109. package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.d.ts +2 -10
  110. package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.d.ts.map +1 -1
  111. package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.js +16 -21
  112. package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.js.map +1 -1
  113. package/dist/service/cognito/sim-cognito-user-directory.d.ts +16 -0
  114. package/dist/service/cognito/sim-cognito-user-directory.d.ts.map +1 -1
  115. package/dist/service/cognito/sim-cognito-user-directory.js +25 -0
  116. package/dist/service/cognito/sim-cognito-user-directory.js.map +1 -1
  117. package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.d.ts +9 -0
  118. package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.d.ts.map +1 -1
  119. package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.js +14 -1
  120. package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.js.map +1 -1
  121. package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.d.ts +10 -0
  122. package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.d.ts.map +1 -1
  123. package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.js +11 -0
  124. package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.js.map +1 -1
  125. package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.d.ts +44 -0
  126. package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.d.ts.map +1 -0
  127. package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.js +78 -0
  128. package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.js.map +1 -0
  129. package/dist/service/cognito/user-pool/message/sim-cognito-message-occasion.d.ts +10 -6
  130. package/dist/service/cognito/user-pool/message/sim-cognito-message-occasion.d.ts.map +1 -1
  131. package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.d.ts +5 -2
  132. package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.d.ts.map +1 -1
  133. package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.js +5 -2
  134. package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.js.map +1 -1
  135. package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.d.ts +15 -0
  136. package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.d.ts.map +1 -1
  137. package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.js +18 -0
  138. package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.js.map +1 -1
  139. package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.d.ts +4 -1
  140. package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.d.ts.map +1 -1
  141. package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.js +5 -2
  142. package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.js.map +1 -1
  143. package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.d.ts +14 -6
  144. package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.d.ts.map +1 -1
  145. package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.js +20 -9
  146. package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.js.map +1 -1
  147. package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.d.ts +62 -0
  148. package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.d.ts.map +1 -0
  149. package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.js +65 -0
  150. package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.js.map +1 -0
  151. package/dist/service/cognito/user-pool/user/sim-cognito-user-status.d.ts +55 -11
  152. package/dist/service/cognito/user-pool/user/sim-cognito-user-status.d.ts.map +1 -1
  153. package/dist/service/cognito/user-pool/user/sim-cognito-user-status.js +67 -10
  154. package/dist/service/cognito/user-pool/user/sim-cognito-user-status.js.map +1 -1
  155. package/dist/service/cognito/user-pool/user/sim-cognito-user.d.ts +15 -12
  156. package/dist/service/cognito/user-pool/user/sim-cognito-user.d.ts.map +1 -1
  157. package/dist/service/cognito/user-pool/user/sim-cognito-user.js +31 -20
  158. package/dist/service/cognito/user-pool/user/sim-cognito-user.js.map +1 -1
  159. package/dist/service/iam/sim-iam.d.ts +10 -0
  160. package/dist/service/iam/sim-iam.d.ts.map +1 -1
  161. package/dist/service/iam/sim-iam.js +10 -0
  162. package/dist/service/iam/sim-iam.js.map +1 -1
  163. package/dist/service/lambda/command/create-function/create-function.handler.d.ts +3 -0
  164. package/dist/service/lambda/command/create-function/create-function.handler.d.ts.map +1 -1
  165. package/dist/service/lambda/command/create-function/create-function.handler.js +5 -1
  166. package/dist/service/lambda/command/create-function/create-function.handler.js.map +1 -1
  167. package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts +2 -0
  168. package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts.map +1 -1
  169. package/dist/service/lambda/command/function/sim-lambda-function-commands.js.map +1 -1
  170. package/dist/service/lambda/function/code/sim-lambda-code-resolver.d.ts +7 -0
  171. package/dist/service/lambda/function/code/sim-lambda-code-resolver.d.ts.map +1 -1
  172. package/dist/service/lambda/function/code/sim-lambda-code-resolver.js +1 -0
  173. package/dist/service/lambda/function/code/sim-lambda-code-resolver.js.map +1 -1
  174. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.d.ts +3 -0
  175. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.d.ts.map +1 -1
  176. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.js +3 -0
  177. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.js.map +1 -1
  178. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.d.ts +6 -9
  179. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.d.ts.map +1 -1
  180. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.js +3 -3
  181. package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.js.map +1 -1
  182. package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.d.ts +11 -3
  183. package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.d.ts.map +1 -1
  184. package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.js +13 -8
  185. package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.js.map +1 -1
  186. package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.d.ts +21 -2
  187. package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.d.ts.map +1 -1
  188. package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.js +18 -2
  189. package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.js.map +1 -1
  190. package/dist/service/lambda/function/invoke/sim-lambda-host-scope.d.ts +26 -0
  191. package/dist/service/lambda/function/invoke/sim-lambda-host-scope.d.ts.map +1 -0
  192. package/dist/service/lambda/function/invoke/sim-lambda-host-scope.js +17 -0
  193. package/dist/service/lambda/function/invoke/sim-lambda-host-scope.js.map +1 -0
  194. package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.d.ts +17 -0
  195. package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.d.ts.map +1 -0
  196. package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.js +43 -0
  197. package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.js.map +1 -0
  198. package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.d.ts +44 -0
  199. package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.d.ts.map +1 -0
  200. package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.js +83 -0
  201. package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.js.map +1 -0
  202. package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.d.ts +50 -0
  203. package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.d.ts.map +1 -0
  204. package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.js +83 -0
  205. package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.js.map +1 -0
  206. package/dist/service/lambda/function/outbound/sim-lambda-http-module.d.ts +42 -0
  207. package/dist/service/lambda/function/outbound/sim-lambda-http-module.d.ts.map +1 -0
  208. package/dist/service/lambda/function/outbound/sim-lambda-http-module.js +88 -0
  209. package/dist/service/lambda/function/outbound/sim-lambda-http-module.js.map +1 -0
  210. package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-wire-request.d.ts → outbound/sim-lambda-http-request.d.ts} +20 -7
  211. package/dist/service/lambda/function/outbound/sim-lambda-http-request.d.ts.map +1 -0
  212. package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-wire-request.js → outbound/sim-lambda-http-request.js} +27 -29
  213. package/dist/service/lambda/function/outbound/sim-lambda-http-request.js.map +1 -0
  214. package/dist/service/lambda/function/outbound/sim-lambda-http-response.d.ts +18 -0
  215. package/dist/service/lambda/function/outbound/sim-lambda-http-response.d.ts.map +1 -0
  216. package/dist/service/lambda/function/outbound/sim-lambda-http-response.js +23 -0
  217. package/dist/service/lambda/function/outbound/sim-lambda-http-response.js.map +1 -0
  218. package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-http-target.d.ts → outbound/sim-lambda-http-target.d.ts} +9 -7
  219. package/dist/service/lambda/function/outbound/sim-lambda-http-target.d.ts.map +1 -0
  220. package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-http-target.js → outbound/sim-lambda-http-target.js} +4 -38
  221. package/dist/service/lambda/function/outbound/sim-lambda-http-target.js.map +1 -0
  222. package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.d.ts +15 -0
  223. package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.d.ts.map +1 -0
  224. package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.js +38 -0
  225. package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.js.map +1 -0
  226. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.d.ts +27 -0
  227. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.d.ts.map +1 -0
  228. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.d.ts +13 -0
  229. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.d.ts.map +1 -0
  230. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.js +107 -0
  231. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.js.map +1 -0
  232. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.js +2 -0
  233. package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.js.map +1 -0
  234. package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.d.ts +16 -0
  235. package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.d.ts.map +1 -0
  236. package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.js +29 -0
  237. package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.js.map +1 -0
  238. package/dist/service/lambda/function/sim-lambda-function.d.ts +12 -6
  239. package/dist/service/lambda/function/sim-lambda-function.d.ts.map +1 -1
  240. package/dist/service/lambda/function/sim-lambda-function.js +9 -10
  241. package/dist/service/lambda/function/sim-lambda-function.js.map +1 -1
  242. package/dist/service/lambda/sim-lambda-commands.d.ts +8 -0
  243. package/dist/service/lambda/sim-lambda-commands.d.ts.map +1 -1
  244. package/dist/service/lambda/sim-lambda-commands.js +2 -1
  245. package/dist/service/lambda/sim-lambda-commands.js.map +1 -1
  246. package/dist/service/rekognition/collection/sim-rekognition-collection-faces.d.ts +53 -0
  247. package/dist/service/rekognition/collection/sim-rekognition-collection-faces.d.ts.map +1 -0
  248. package/dist/service/rekognition/collection/sim-rekognition-collection-faces.js +69 -0
  249. package/dist/service/rekognition/collection/sim-rekognition-collection-faces.js.map +1 -0
  250. package/dist/service/rekognition/collection/sim-rekognition-collection.d.ts +26 -0
  251. package/dist/service/rekognition/collection/sim-rekognition-collection.d.ts.map +1 -0
  252. package/dist/service/rekognition/collection/sim-rekognition-collection.js +9 -0
  253. package/dist/service/rekognition/collection/sim-rekognition-collection.js.map +1 -0
  254. package/dist/service/rekognition/collection/sim-rekognition-collections.d.ts +50 -0
  255. package/dist/service/rekognition/collection/sim-rekognition-collections.d.ts.map +1 -0
  256. package/dist/service/rekognition/collection/sim-rekognition-collections.js +78 -0
  257. package/dist/service/rekognition/collection/sim-rekognition-collections.js.map +1 -0
  258. package/dist/service/rekognition/collection/sim-rekognition-indexed-face.d.ts +41 -0
  259. package/dist/service/rekognition/collection/sim-rekognition-indexed-face.d.ts.map +1 -0
  260. package/dist/service/rekognition/collection/sim-rekognition-indexed-face.js +53 -0
  261. package/dist/service/rekognition/collection/sim-rekognition-indexed-face.js.map +1 -0
  262. package/dist/service/rekognition/command/authorize/sim-rekognition-authorizer.d.ts +2 -2
  263. package/dist/service/rekognition/command/authorize/sim-rekognition-authorizer.d.ts.map +1 -1
  264. package/dist/service/rekognition/command/authorize/sim-rekognition-authorizer.js +7 -4
  265. package/dist/service/rekognition/command/authorize/sim-rekognition-authorizer.js.map +1 -1
  266. package/dist/service/rekognition/command/collection/collection-id.d.ts +9 -0
  267. package/dist/service/rekognition/command/collection/collection-id.d.ts.map +1 -0
  268. package/dist/service/rekognition/command/collection/collection-id.js +15 -0
  269. package/dist/service/rekognition/command/collection/collection-id.js.map +1 -0
  270. package/dist/service/rekognition/command/collection/collection.command.d.ts +55 -0
  271. package/dist/service/rekognition/command/collection/collection.command.d.ts.map +1 -0
  272. package/dist/service/rekognition/command/collection/collection.command.js +2 -0
  273. package/dist/service/rekognition/command/collection/collection.command.js.map +1 -0
  274. package/dist/service/rekognition/command/collection/collection.handler.d.ts +40 -0
  275. package/dist/service/rekognition/command/collection/collection.handler.d.ts.map +1 -0
  276. package/dist/service/rekognition/command/collection/collection.handler.js +62 -0
  277. package/dist/service/rekognition/command/collection/collection.handler.js.map +1 -0
  278. package/dist/service/rekognition/command/face/delete-faces-request.d.ts +10 -0
  279. package/dist/service/rekognition/command/face/delete-faces-request.d.ts.map +1 -0
  280. package/dist/service/rekognition/command/face/delete-faces-request.js +18 -0
  281. package/dist/service/rekognition/command/face/delete-faces-request.js.map +1 -0
  282. package/dist/service/rekognition/command/face/external-image-id.d.ts +9 -0
  283. package/dist/service/rekognition/command/face/external-image-id.d.ts.map +1 -0
  284. package/dist/service/rekognition/command/face/external-image-id.js +28 -0
  285. package/dist/service/rekognition/command/face/external-image-id.js.map +1 -0
  286. package/dist/service/rekognition/command/face/face-ids.d.ts +9 -0
  287. package/dist/service/rekognition/command/face/face-ids.d.ts.map +1 -0
  288. package/dist/service/rekognition/command/face/face-ids.js +48 -0
  289. package/dist/service/rekognition/command/face/face-ids.js.map +1 -0
  290. package/dist/service/rekognition/command/face/face-indexer.d.ts +38 -0
  291. package/dist/service/rekognition/command/face/face-indexer.d.ts.map +1 -0
  292. package/dist/service/rekognition/command/face/face-indexer.js +64 -0
  293. package/dist/service/rekognition/command/face/face-indexer.js.map +1 -0
  294. package/dist/service/rekognition/command/face/face-limits.d.ts +22 -0
  295. package/dist/service/rekognition/command/face/face-limits.d.ts.map +1 -0
  296. package/dist/service/rekognition/command/face/face-limits.js +36 -0
  297. package/dist/service/rekognition/command/face/face-limits.js.map +1 -0
  298. package/dist/service/rekognition/command/face/face-listing.d.ts +26 -0
  299. package/dist/service/rekognition/command/face/face-listing.d.ts.map +1 -0
  300. package/dist/service/rekognition/command/face/face-listing.js +36 -0
  301. package/dist/service/rekognition/command/face/face-listing.js.map +1 -0
  302. package/dist/service/rekognition/command/face/face-output.d.ts +65 -0
  303. package/dist/service/rekognition/command/face/face-output.d.ts.map +1 -0
  304. package/dist/service/rekognition/command/face/face-output.js +8 -0
  305. package/dist/service/rekognition/command/face/face-output.js.map +1 -0
  306. package/dist/service/rekognition/command/face/face-searcher.d.ts +32 -0
  307. package/dist/service/rekognition/command/face/face-searcher.d.ts.map +1 -0
  308. package/dist/service/rekognition/command/face/face-searcher.js +45 -0
  309. package/dist/service/rekognition/command/face/face-searcher.js.map +1 -0
  310. package/dist/service/rekognition/command/face/face.command.d.ts +107 -0
  311. package/dist/service/rekognition/command/face/face.command.d.ts.map +1 -0
  312. package/dist/service/rekognition/command/face/face.command.js +2 -0
  313. package/dist/service/rekognition/command/face/face.command.js.map +1 -0
  314. package/dist/service/rekognition/command/face/face.handler.d.ts +62 -0
  315. package/dist/service/rekognition/command/face/face.handler.d.ts.map +1 -0
  316. package/dist/service/rekognition/command/face/face.handler.js +99 -0
  317. package/dist/service/rekognition/command/face/face.handler.js.map +1 -0
  318. package/dist/service/rekognition/command/face/index-faces-request.d.ts +20 -0
  319. package/dist/service/rekognition/command/face/index-faces-request.d.ts.map +1 -0
  320. package/dist/service/rekognition/command/face/index-faces-request.js +39 -0
  321. package/dist/service/rekognition/command/face/index-faces-request.js.map +1 -0
  322. package/dist/service/rekognition/command/face/list-faces-page.d.ts +26 -0
  323. package/dist/service/rekognition/command/face/list-faces-page.d.ts.map +1 -0
  324. package/dist/service/rekognition/command/face/list-faces-page.js +39 -0
  325. package/dist/service/rekognition/command/face/list-faces-page.js.map +1 -0
  326. package/dist/service/rekognition/command/face/list-faces-request.d.ts +17 -0
  327. package/dist/service/rekognition/command/face/list-faces-request.d.ts.map +1 -0
  328. package/dist/service/rekognition/command/face/list-faces-request.js +43 -0
  329. package/dist/service/rekognition/command/face/list-faces-request.js.map +1 -0
  330. package/dist/service/rekognition/command/face/search-faces-by-image-request.d.ts +24 -0
  331. package/dist/service/rekognition/command/face/search-faces-by-image-request.d.ts.map +1 -0
  332. package/dist/service/rekognition/command/face/search-faces-by-image-request.js +61 -0
  333. package/dist/service/rekognition/command/face/search-faces-by-image-request.js.map +1 -0
  334. package/dist/service/rekognition/command/sim-rekognition-detection-handlers.d.ts +32 -0
  335. package/dist/service/rekognition/command/sim-rekognition-detection-handlers.d.ts.map +1 -0
  336. package/dist/service/rekognition/command/sim-rekognition-detection-handlers.js +37 -0
  337. package/dist/service/rekognition/command/sim-rekognition-detection-handlers.js.map +1 -0
  338. package/dist/service/rekognition/error/sim-rekognition.error.d.ts +20 -0
  339. package/dist/service/rekognition/error/sim-rekognition.error.d.ts.map +1 -1
  340. package/dist/service/rekognition/error/sim-rekognition.error.js +24 -0
  341. package/dist/service/rekognition/error/sim-rekognition.error.js.map +1 -1
  342. package/dist/service/rekognition/face/sim-rekognition-detected-face.d.ts +9 -0
  343. package/dist/service/rekognition/face/sim-rekognition-detected-face.d.ts.map +1 -1
  344. package/dist/service/rekognition/face/sim-rekognition-detected-face.js +12 -0
  345. package/dist/service/rekognition/face/sim-rekognition-detected-face.js.map +1 -1
  346. package/dist/service/rekognition/face/sim-rekognition-face-detail-builder.d.ts.map +1 -1
  347. package/dist/service/rekognition/face/sim-rekognition-face-detail-builder.js.map +1 -1
  348. package/dist/service/rekognition/face/sim-rekognition-face-detection.d.ts +9 -0
  349. package/dist/service/rekognition/face/sim-rekognition-face-detection.d.ts.map +1 -1
  350. package/dist/service/rekognition/face/sim-rekognition-face-detection.js +10 -0
  351. package/dist/service/rekognition/face/sim-rekognition-face-detection.js.map +1 -1
  352. package/dist/service/rekognition/face/sim-rekognition-face-frame.d.ts +5 -1
  353. package/dist/service/rekognition/face/sim-rekognition-face-frame.d.ts.map +1 -1
  354. package/dist/service/rekognition/face/sim-rekognition-face-frame.js +3 -0
  355. package/dist/service/rekognition/face/sim-rekognition-face-frame.js.map +1 -1
  356. package/dist/service/rekognition/index.d.ts +3 -1
  357. package/dist/service/rekognition/index.d.ts.map +1 -1
  358. package/dist/service/rekognition/index.js +2 -1
  359. package/dist/service/rekognition/index.js.map +1 -1
  360. package/dist/service/rekognition/match/sim-rekognition-face-match-declaration.d.ts +29 -0
  361. package/dist/service/rekognition/match/sim-rekognition-face-match-declaration.d.ts.map +1 -0
  362. package/dist/service/rekognition/match/sim-rekognition-face-match-declaration.js +2 -0
  363. package/dist/service/rekognition/match/sim-rekognition-face-match-declaration.js.map +1 -0
  364. package/dist/service/rekognition/match/sim-rekognition-face-match-result.d.ts +25 -0
  365. package/dist/service/rekognition/match/sim-rekognition-face-match-result.d.ts.map +1 -0
  366. package/dist/service/rekognition/match/sim-rekognition-face-match-result.js +44 -0
  367. package/dist/service/rekognition/match/sim-rekognition-face-match-result.js.map +1 -0
  368. package/dist/service/rekognition/match/sim-rekognition-face-match-rule.d.ts +26 -0
  369. package/dist/service/rekognition/match/sim-rekognition-face-match-rule.d.ts.map +1 -0
  370. package/dist/service/rekognition/match/sim-rekognition-face-match-rule.js +64 -0
  371. package/dist/service/rekognition/match/sim-rekognition-face-match-rule.js.map +1 -0
  372. package/dist/service/rekognition/match/sim-rekognition-face-matches.d.ts +32 -0
  373. package/dist/service/rekognition/match/sim-rekognition-face-matches.d.ts.map +1 -0
  374. package/dist/service/rekognition/match/sim-rekognition-face-matches.js +39 -0
  375. package/dist/service/rekognition/match/sim-rekognition-face-matches.js.map +1 -0
  376. package/dist/service/rekognition/sdk/sim-rekognition-sdk-command-router.d.ts.map +1 -1
  377. package/dist/service/rekognition/sdk/sim-rekognition-sdk-command-router.js +28 -0
  378. package/dist/service/rekognition/sdk/sim-rekognition-sdk-command-router.js.map +1 -1
  379. package/dist/service/rekognition/sim-rekognition.d.ts +51 -3
  380. package/dist/service/rekognition/sim-rekognition.d.ts.map +1 -1
  381. package/dist/service/rekognition/sim-rekognition.js +84 -16
  382. package/dist/service/rekognition/sim-rekognition.js.map +1 -1
  383. package/dist/service/s3/bucket/sim-s3-bucket.d.ts +8 -0
  384. package/dist/service/s3/bucket/sim-s3-bucket.d.ts.map +1 -1
  385. package/dist/service/s3/bucket/sim-s3-bucket.js +4 -1
  386. package/dist/service/s3/bucket/sim-s3-bucket.js.map +1 -1
  387. package/dist/service/s3/command/bucket/sim-s3-bucket-commands.d.ts +1 -0
  388. package/dist/service/s3/command/bucket/sim-s3-bucket-commands.d.ts.map +1 -1
  389. package/dist/service/s3/command/bucket/sim-s3-bucket-commands.js +4 -0
  390. package/dist/service/s3/command/bucket/sim-s3-bucket-commands.js.map +1 -1
  391. package/dist/service/s3/command/create-bucket/create-bucket.handler.d.ts.map +1 -1
  392. package/dist/service/s3/command/create-bucket/create-bucket.handler.js +1 -0
  393. package/dist/service/s3/command/create-bucket/create-bucket.handler.js.map +1 -1
  394. package/dist/service/s3/command/head-bucket/head-bucket-authorizer.d.ts +26 -0
  395. package/dist/service/s3/command/head-bucket/head-bucket-authorizer.d.ts.map +1 -0
  396. package/dist/service/s3/command/head-bucket/head-bucket-authorizer.js +48 -0
  397. package/dist/service/s3/command/head-bucket/head-bucket-authorizer.js.map +1 -0
  398. package/dist/service/s3/command/head-bucket/head-bucket.command.d.ts +24 -0
  399. package/dist/service/s3/command/head-bucket/head-bucket.command.d.ts.map +1 -0
  400. package/dist/service/s3/command/head-bucket/head-bucket.command.js +2 -0
  401. package/dist/service/s3/command/head-bucket/head-bucket.command.js.map +1 -0
  402. package/dist/service/s3/command/head-bucket/head-bucket.handler.d.ts +35 -0
  403. package/dist/service/s3/command/head-bucket/head-bucket.handler.d.ts.map +1 -0
  404. package/dist/service/s3/command/head-bucket/head-bucket.handler.js +45 -0
  405. package/dist/service/s3/command/head-bucket/head-bucket.handler.js.map +1 -0
  406. package/dist/service/s3/command/head-object/head-object-loader.d.ts +17 -0
  407. package/dist/service/s3/command/head-object/head-object-loader.d.ts.map +1 -0
  408. package/dist/service/s3/command/head-object/head-object-loader.js +29 -0
  409. package/dist/service/s3/command/head-object/head-object-loader.js.map +1 -0
  410. package/dist/service/s3/command/head-object/head-object.command.d.ts +29 -0
  411. package/dist/service/s3/command/head-object/head-object.command.d.ts.map +1 -0
  412. package/dist/service/s3/command/head-object/head-object.command.js +2 -0
  413. package/dist/service/s3/command/head-object/head-object.command.js.map +1 -0
  414. package/dist/service/s3/command/head-object/head-object.handler.d.ts +38 -0
  415. package/dist/service/s3/command/head-object/head-object.handler.d.ts.map +1 -0
  416. package/dist/service/s3/command/head-object/head-object.handler.js +50 -0
  417. package/dist/service/s3/command/head-object/head-object.handler.js.map +1 -0
  418. package/dist/service/s3/command/list-buckets/list-buckets-page-builder.d.ts.map +1 -1
  419. package/dist/service/s3/command/list-buckets/list-buckets-page-builder.js +1 -0
  420. package/dist/service/s3/command/list-buckets/list-buckets-page-builder.js.map +1 -1
  421. package/dist/service/s3/command/list-buckets/list-buckets.command.d.ts +1 -0
  422. package/dist/service/s3/command/list-buckets/list-buckets.command.d.ts.map +1 -1
  423. package/dist/service/s3/command/object/sim-s3-object-commands.d.ts +4 -0
  424. package/dist/service/s3/command/object/sim-s3-object-commands.d.ts.map +1 -1
  425. package/dist/service/s3/command/object/sim-s3-object-commands.js +7 -0
  426. package/dist/service/s3/command/object/sim-s3-object-commands.js.map +1 -1
  427. package/dist/service/s3/command/sim-s3-command.types.d.ts +2 -0
  428. package/dist/service/s3/command/sim-s3-command.types.d.ts.map +1 -1
  429. package/dist/service/s3/error/sim-s3.error.d.ts +12 -0
  430. package/dist/service/s3/error/sim-s3.error.d.ts.map +1 -1
  431. package/dist/service/s3/error/sim-s3.error.js +14 -0
  432. package/dist/service/s3/error/sim-s3.error.js.map +1 -1
  433. package/dist/service/s3/sdk/sim-s3-sdk-command-router.d.ts.map +1 -1
  434. package/dist/service/s3/sdk/sim-s3-sdk-command-router.js +8 -0
  435. package/dist/service/s3/sdk/sim-s3-sdk-command-router.js.map +1 -1
  436. package/dist/service/s3/serve/api/sim-s3-api-bucket-routes.d.ts +9 -0
  437. package/dist/service/s3/serve/api/sim-s3-api-bucket-routes.d.ts.map +1 -0
  438. package/dist/service/s3/serve/api/sim-s3-api-bucket-routes.js +120 -0
  439. package/dist/service/s3/serve/api/sim-s3-api-bucket-routes.js.map +1 -0
  440. package/dist/service/s3/serve/api/sim-s3-api-configuration-output.d.ts +19 -0
  441. package/dist/service/s3/serve/api/sim-s3-api-configuration-output.d.ts.map +1 -0
  442. package/dist/service/s3/serve/api/sim-s3-api-configuration-output.js +78 -0
  443. package/dist/service/s3/serve/api/sim-s3-api-configuration-output.js.map +1 -0
  444. package/dist/service/s3/serve/api/sim-s3-api-head-output.d.ts +22 -0
  445. package/dist/service/s3/serve/api/sim-s3-api-head-output.d.ts.map +1 -0
  446. package/dist/service/s3/serve/api/sim-s3-api-head-output.js +39 -0
  447. package/dist/service/s3/serve/api/sim-s3-api-head-output.js.map +1 -0
  448. package/dist/service/s3/serve/api/sim-s3-api-input.d.ts +57 -0
  449. package/dist/service/s3/serve/api/sim-s3-api-input.d.ts.map +1 -0
  450. package/dist/service/s3/serve/api/sim-s3-api-input.js +112 -0
  451. package/dist/service/s3/serve/api/sim-s3-api-input.js.map +1 -0
  452. package/dist/service/s3/serve/api/sim-s3-api-listing.d.ts +43 -0
  453. package/dist/service/s3/serve/api/sim-s3-api-listing.d.ts.map +1 -0
  454. package/dist/service/s3/serve/api/sim-s3-api-listing.js +53 -0
  455. package/dist/service/s3/serve/api/sim-s3-api-listing.js.map +1 -0
  456. package/dist/service/s3/serve/api/sim-s3-api-notification-read.d.ts +8 -0
  457. package/dist/service/s3/serve/api/sim-s3-api-notification-read.d.ts.map +1 -0
  458. package/dist/service/s3/serve/api/sim-s3-api-notification-read.js +54 -0
  459. package/dist/service/s3/serve/api/sim-s3-api-notification-read.js.map +1 -0
  460. package/dist/service/s3/serve/api/sim-s3-api-object-routes.d.ts +6 -0
  461. package/dist/service/s3/serve/api/sim-s3-api-object-routes.d.ts.map +1 -0
  462. package/dist/service/s3/serve/api/sim-s3-api-object-routes.js +31 -0
  463. package/dist/service/s3/serve/api/sim-s3-api-object-routes.js.map +1 -0
  464. package/dist/service/s3/serve/api/sim-s3-api-output.d.ts +10 -0
  465. package/dist/service/s3/serve/api/sim-s3-api-output.d.ts.map +1 -0
  466. package/dist/service/s3/serve/api/sim-s3-api-output.js +118 -0
  467. package/dist/service/s3/serve/api/sim-s3-api-output.js.map +1 -0
  468. package/dist/service/s3/serve/api/sim-s3-api-request.d.ts +32 -0
  469. package/dist/service/s3/serve/api/sim-s3-api-request.d.ts.map +1 -0
  470. package/dist/service/s3/serve/api/sim-s3-api-request.js +48 -0
  471. package/dist/service/s3/serve/api/sim-s3-api-request.js.map +1 -0
  472. package/dist/service/s3/serve/api/sim-s3-api-route.type.d.ts +26 -0
  473. package/dist/service/s3/serve/api/sim-s3-api-route.type.d.ts.map +1 -0
  474. package/dist/service/s3/serve/api/sim-s3-api-route.type.js +2 -0
  475. package/dist/service/s3/serve/api/sim-s3-api-route.type.js.map +1 -0
  476. package/dist/service/s3/serve/api/sim-s3-api-routes.d.ts +24 -0
  477. package/dist/service/s3/serve/api/sim-s3-api-routes.d.ts.map +1 -0
  478. package/dist/service/s3/serve/api/sim-s3-api-routes.js +90 -0
  479. package/dist/service/s3/serve/api/sim-s3-api-routes.js.map +1 -0
  480. package/dist/service/s3/serve/api/sim-s3-api-xml-read.d.ts +21 -0
  481. package/dist/service/s3/serve/api/sim-s3-api-xml-read.d.ts.map +1 -0
  482. package/dist/service/s3/serve/api/sim-s3-api-xml-read.js +64 -0
  483. package/dist/service/s3/serve/api/sim-s3-api-xml-read.js.map +1 -0
  484. package/dist/service/s3/serve/api/sim-s3-api.d.ts +29 -0
  485. package/dist/service/s3/serve/api/sim-s3-api.d.ts.map +1 -0
  486. package/dist/service/s3/serve/api/sim-s3-api.js +60 -0
  487. package/dist/service/s3/serve/api/sim-s3-api.js.map +1 -0
  488. package/dist/service/s3/serve/sim-s3-rest-error-response.d.ts +8 -0
  489. package/dist/service/s3/serve/sim-s3-rest-error-response.d.ts.map +1 -1
  490. package/dist/service/s3/serve/sim-s3-rest-error-response.js +15 -10
  491. package/dist/service/s3/serve/sim-s3-rest-error-response.js.map +1 -1
  492. package/dist/service/s3/sim-s3-operations.d.ts +55 -0
  493. package/dist/service/s3/sim-s3-operations.d.ts.map +1 -0
  494. package/dist/service/s3/sim-s3-operations.js +94 -0
  495. package/dist/service/s3/sim-s3-operations.js.map +1 -0
  496. package/dist/service/s3/sim-s3.d.ts +6 -41
  497. package/dist/service/s3/sim-s3.d.ts.map +1 -1
  498. package/dist/service/s3/sim-s3.js +11 -79
  499. package/dist/service/s3/sim-s3.js.map +1 -1
  500. package/dist/service/sts/command/assume-role/assume-role.handler.d.ts +2 -2
  501. package/dist/service/sts/command/assume-role/assume-role.handler.d.ts.map +1 -1
  502. package/dist/service/sts/command/get-caller-identity/get-caller-identity.command.d.ts +20 -0
  503. package/dist/service/sts/command/get-caller-identity/get-caller-identity.command.d.ts.map +1 -0
  504. package/dist/service/sts/command/get-caller-identity/get-caller-identity.command.js +2 -0
  505. package/dist/service/sts/command/get-caller-identity/get-caller-identity.command.js.map +1 -0
  506. package/dist/service/sts/command/get-caller-identity/get-caller-identity.handler.d.ts +37 -0
  507. package/dist/service/sts/command/get-caller-identity/get-caller-identity.handler.d.ts.map +1 -0
  508. package/dist/service/sts/command/get-caller-identity/get-caller-identity.handler.js +50 -0
  509. package/dist/service/sts/command/get-caller-identity/get-caller-identity.handler.js.map +1 -0
  510. package/dist/service/sts/command/get-caller-identity/sim-sts-caller-user-id.d.ts +15 -0
  511. package/dist/service/sts/command/get-caller-identity/sim-sts-caller-user-id.d.ts.map +1 -0
  512. package/dist/service/sts/command/get-caller-identity/sim-sts-caller-user-id.js +47 -0
  513. package/dist/service/sts/command/get-caller-identity/sim-sts-caller-user-id.js.map +1 -0
  514. package/dist/service/sts/sdk/sim-sts-sdk-command-router.d.ts.map +1 -1
  515. package/dist/service/sts/sdk/sim-sts-sdk-command-router.js +4 -0
  516. package/dist/service/sts/sdk/sim-sts-sdk-command-router.js.map +1 -1
  517. package/dist/service/sts/serve/sim-sts-api.d.ts +24 -0
  518. package/dist/service/sts/serve/sim-sts-api.d.ts.map +1 -0
  519. package/dist/service/sts/serve/sim-sts-api.js +56 -0
  520. package/dist/service/sts/serve/sim-sts-api.js.map +1 -0
  521. package/dist/service/sts/serve/sim-sts-query-request.d.ts +19 -0
  522. package/dist/service/sts/serve/sim-sts-query-request.d.ts.map +1 -0
  523. package/dist/service/sts/serve/sim-sts-query-request.js +27 -0
  524. package/dist/service/sts/serve/sim-sts-query-request.js.map +1 -0
  525. package/dist/service/sts/serve/sim-sts-query-response.d.ts +15 -0
  526. package/dist/service/sts/serve/sim-sts-query-response.d.ts.map +1 -0
  527. package/dist/service/sts/serve/sim-sts-query-response.js +42 -0
  528. package/dist/service/sts/serve/sim-sts-query-response.js.map +1 -0
  529. package/dist/service/sts/sim-sts.d.ts +9 -2
  530. package/dist/service/sts/sim-sts.d.ts.map +1 -1
  531. package/dist/service/sts/sim-sts.js +11 -0
  532. package/dist/service/sts/sim-sts.js.map +1 -1
  533. package/dist/util/xml/xml-document.d.ts +42 -0
  534. package/dist/util/xml/xml-document.d.ts.map +1 -0
  535. package/dist/util/xml/xml-document.js +97 -0
  536. package/dist/util/xml/xml-document.js.map +1 -0
  537. package/dist/util/xml/xml-writer.d.ts +28 -0
  538. package/dist/util/xml/xml-writer.d.ts.map +1 -0
  539. package/dist/util/xml/xml-writer.js +53 -0
  540. package/dist/util/xml/xml-writer.js.map +1 -0
  541. package/package.json +2 -2
  542. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.d.ts +0 -27
  543. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.d.ts.map +0 -1
  544. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.js +0 -78
  545. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.js.map +0 -1
  546. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.d.ts.map +0 -1
  547. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.js.map +0 -1
  548. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.d.ts.map +0 -1
  549. package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.js.map +0 -1
@@ -2,8 +2,8 @@ import { createRequire } from "node:module";
2
2
  import path from "node:path";
3
3
  import { SimSdkModuleClientInterceptor } from "../../../../../../sdk/module/sim-sdk-module-client-interceptor.js";
4
4
  import { SimSdkCommandDispatcher } from "../../../../../../sdk/sim-sdk-command-dispatcher.js";
5
- import { SimSdkWireDispatcher } from "../../../../../../sdk/wire/sim-sdk-wire-dispatcher.js";
6
- import { isSimLambdaVmHttpModuleSpecifier, makeSimLambdaVmHttpModule, } from "../http/sim-lambda-vm-http-module.js";
5
+ import { SimLambdaAwsApiOutbound } from "../../../outbound/sim-lambda-aws-api-outbound.js";
6
+ import { isSimLambdaHttpModuleSpecifier, makeSimLambdaHttpModule, simLambdaHttpModuleScheme, } from "../../../outbound/sim-lambda-http-module.js";
7
7
  import { awsSdkPackagePrefix, } from "./sim-lambda-vm-sdk-module-provider.js";
8
8
  const hostRequire = createRequire(import.meta.url);
9
9
  /**
@@ -18,13 +18,13 @@ const hostRequire = createRequire(import.meta.url);
18
18
  * A deployment package that bundles the SDK asks for no SDK module at all, so
19
19
  * there is nothing there to intercept. Such a package still gets its HTTP
20
20
  * transport from the runtime, and the modules provided for it answer requests
21
- * to AWS API endpoints from the same simulation, by the same routing. Which of
22
- * the two paths a function takes is then only a question of how it was
21
+ * the simulation serves from the same simulation, by the same routing. Which
22
+ * of the two paths a function takes is then only a question of how it was
23
23
  * packaged, rather than of whether it works.
24
24
  */
25
25
  export class SimSdkLambdaVmModuleProvider {
26
26
  interceptor;
27
- wireDispatcher;
27
+ outboundHttp;
28
28
  requireModule;
29
29
  providedModules = new Map();
30
30
  constructor(properties) {
@@ -33,7 +33,8 @@ export class SimSdkLambdaVmModuleProvider {
33
33
  sendHandler: (command, client) => dispatcher.dispatch(command, client, undefined),
34
34
  defaultRegionName: properties.regionName,
35
35
  });
36
- this.wireDispatcher = new SimSdkWireDispatcher(properties.simAws, properties.regionName);
36
+ this.outboundHttp =
37
+ properties.outboundHttp ?? new SimLambdaAwsApiOutbound(properties);
37
38
  this.requireModule = properties.requireModule ?? requireHostModule;
38
39
  }
39
40
  /**
@@ -41,7 +42,7 @@ export class SimSdkLambdaVmModuleProvider {
41
42
  * undefined for other specifiers.
42
43
  */
43
44
  provideModule(specifier) {
44
- const isTransport = isSimLambdaVmHttpModuleSpecifier(specifier);
45
+ const isTransport = isSimLambdaHttpModuleSpecifier(specifier);
45
46
  if (!isTransport && !specifier.startsWith(awsSdkPackagePrefix)) {
46
47
  return undefined;
47
48
  }
@@ -51,7 +52,11 @@ export class SimSdkLambdaVmModuleProvider {
51
52
  }
52
53
  const hostExports = this.hostModuleExports(specifier);
53
54
  const module = isTransport
54
- ? makeSimLambdaVmHttpModule(hostExports, async (request) => await this.wireDispatcher.dispatch(request))
55
+ ? makeSimLambdaHttpModule({
56
+ hostModule: hostExports,
57
+ outbound: this.outboundHttp,
58
+ scheme: simLambdaHttpModuleScheme(specifier),
59
+ })
55
60
  : this.interceptor.interceptModule(hostExports);
56
61
  this.providedModules.set(specifier, module);
57
62
  return module;
@@ -1 +1 @@
1
- {"version":3,"file":"sim-sdk-lambda-vm-module-provider.js","sourceRoot":"","sources":["../../../../../../../src/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"sim-sdk-lambda-vm-module-provider.js","sourceRoot":"","sources":["../../../../../../../src/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.ts"],"names":[],"mappings":"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"}
@@ -2,6 +2,23 @@ import vm from "node:vm";
2
2
  import { type SimClock } from "../../../../../util/clock/sim-clock.js";
3
3
  import type { SimLambdaEnvironment } from "../../environment/sim-lambda-environment.js";
4
4
  import { type SimLambdaOutputSink } from "../../logging/sim-lambda-output-sink.js";
5
+ import type { SimLambdaOutboundHttp } from "../../outbound/sim-lambda-outbound-http.js";
6
+ /**
7
+ * What the sandbox a function's code runs in is built from.
8
+ */
9
+ export interface SimLambdaVmContextProperties {
10
+ readonly environment: SimLambdaEnvironment;
11
+ /** The time the sandbox reports, the real one by default. */
12
+ readonly clock?: SimClock | undefined;
13
+ /** Where the sandbox's output is recorded, nowhere by default. */
14
+ readonly sink?: SimLambdaOutputSink | undefined;
15
+ /**
16
+ * Where the sandbox's `fetch` requests to hostnames the simulation serves
17
+ * are answered. Without one every request reaches the network, as the host
18
+ * `fetch` would.
19
+ */
20
+ readonly outboundHttp?: SimLambdaOutboundHttp | undefined;
21
+ }
5
22
  /**
6
23
  * Create the sandbox vm context that sim Lambda function code runs in.
7
24
  *
@@ -14,7 +31,9 @@ import { type SimLambdaOutputSink } from "../../logging/sim-lambda-output-sink.j
14
31
  * Zip code needs nothing like the process.env and Date handling the
15
32
  * in-process handler path does: this sandbox already owns its globals, so
16
33
  * both the host environment and the host clock are invisible here, and
17
- * nothing outside the sandbox is touched to arrange that.
34
+ * nothing outside the sandbox is touched to arrange that. The same goes for
35
+ * the HTTP clients: the `fetch` in here is the sandbox's own, and it answers
36
+ * from the simulation for the hostnames the simulation serves.
18
37
  */
19
- export declare function makeSimLambdaVmContext(environment: SimLambdaEnvironment, clock?: SimClock, sink?: SimLambdaOutputSink): vm.Context;
38
+ export declare function makeSimLambdaVmContext(properties: SimLambdaVmContextProperties): vm.Context;
20
39
  //# sourceMappingURL=sim-lambda-vm-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-lambda-vm-context.d.ts","sourceRoot":"","sources":["../../../../../../src/service/lambda/function/code/vm/sim-lambda-vm-context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,OAAO,EACL,KAAK,QAAQ,EAEd,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,yCAAyC,CAAC;AAGjD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,oBAAoB,EACjC,KAAK,GAAE,QAA6B,EACpC,IAAI,GAAE,mBAA2C,GAChD,EAAE,CAAC,OAAO,CAsCZ"}
1
+ {"version":3,"file":"sim-lambda-vm-context.d.ts","sourceRoot":"","sources":["../../../../../../src/service/lambda/function/code/vm/sim-lambda-vm-context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,SAAS,CAAC;AAEzB,OAAO,EACL,KAAK,QAAQ,EAEd,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAGxF;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,WAAW,EAAE,oBAAoB,CAAC;IAE3C,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAEtC,kEAAkE;IAClE,QAAQ,CAAC,IAAI,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAEhD;;;;OAIG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;CAC3D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,4BAA4B,GACvC,EAAE,CAAC,OAAO,CAyDZ"}
@@ -3,6 +3,7 @@ import vm from "node:vm";
3
3
  import { makeSimClockDate } from "../../../../../util/clock/sim-clock-date.js";
4
4
  import { SimRealClock, } from "../../../../../util/clock/sim-clock.js";
5
5
  import { simLambdaNoOutputSink, } from "../../logging/sim-lambda-output-sink.js";
6
+ import { makeSimLambdaOutboundFetch } from "../../outbound/sim-lambda-outbound-fetch.js";
6
7
  import { SimLambdaVmOutputStream } from "./sim-lambda-vm-output-stream.js";
7
8
  /**
8
9
  * Create the sandbox vm context that sim Lambda function code runs in.
@@ -16,9 +17,12 @@ import { SimLambdaVmOutputStream } from "./sim-lambda-vm-output-stream.js";
16
17
  * Zip code needs nothing like the process.env and Date handling the
17
18
  * in-process handler path does: this sandbox already owns its globals, so
18
19
  * both the host environment and the host clock are invisible here, and
19
- * nothing outside the sandbox is touched to arrange that.
20
+ * nothing outside the sandbox is touched to arrange that. The same goes for
21
+ * the HTTP clients: the `fetch` in here is the sandbox's own, and it answers
22
+ * from the simulation for the hostnames the simulation serves.
20
23
  */
21
- export function makeSimLambdaVmContext(environment, clock = new SimRealClock(), sink = simLambdaNoOutputSink) {
24
+ export function makeSimLambdaVmContext(properties) {
25
+ const { environment, clock = new SimRealClock(), sink = simLambdaNoOutputSink, outboundHttp, } = properties;
22
26
  // Writable standard streams, as the real runtime provides. Code that builds
23
27
  // its own console over them, as AWS Lambda Powertools' logger does, throws
24
28
  // at module load without them.
@@ -53,6 +57,18 @@ export function makeSimLambdaVmContext(environment, clock = new SimRealClock(),
53
57
  URLSearchParams,
54
58
  structuredClone,
55
59
  crypto,
60
+ // The Fetch API the Node.js runtime provides, with the client itself
61
+ // routed into the simulation. The rest are the host's own, so the objects
62
+ // a handler builds and the ones the simulation answers with are the same
63
+ // kind of thing.
64
+ fetch: makeSimLambdaOutboundFetch(outboundHttp),
65
+ Headers,
66
+ Request,
67
+ Response,
68
+ FormData,
69
+ Blob,
70
+ AbortController,
71
+ AbortSignal,
56
72
  });
57
73
  }
58
74
  //# sourceMappingURL=sim-lambda-vm-context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sim-lambda-vm-context.js","sourceRoot":"","sources":["../../../../../../src/service/lambda/function/code/vm/sim-lambda-vm-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAEL,YAAY,GACb,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EACL,qBAAqB,GAEtB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,sBAAsB,CACpC,WAAiC,EACjC,KAAK,GAAa,IAAI,YAAY,EAAE,EACpC,IAAI,GAAwB,qBAAqB;IAEjD,4EAA4E;IAC5E,2EAA2E;IAC3E,+BAA+B;IAC/B,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACjE,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAEjE,2EAA2E;IAC3E,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACtB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEtB,OAAO,EAAE,CAAC,aAAa,CAAC;QACtB,iEAAiE;QACjE,qEAAqE;QACrE,wEAAwE;QACxE,OAAO,EAAE,IAAI,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QACxC,MAAM;QACN,OAAO,EAAE;YACP,GAAG,EAAE,WAAW,CAAC,SAAS,EAAE;YAC5B,MAAM;YACN,MAAM;SACP;QACD,qEAAqE;QACrE,mEAAmE;QACnE,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC;QAC7B,UAAU;QACV,YAAY;QACZ,WAAW;QACX,aAAa;QACb,YAAY;QACZ,cAAc;QACd,WAAW;QACX,WAAW;QACX,GAAG;QACH,eAAe;QACf,eAAe;QACf,MAAM;KACP,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"sim-lambda-vm-context.js","sourceRoot":"","sources":["../../../../../../src/service/lambda/function/code/vm/sim-lambda-vm-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAEL,YAAY,GACb,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EACL,qBAAqB,GAEtB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAEzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAsB3E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,sBAAsB,CACpC,UAAwC;IAExC,MAAM,EACJ,WAAW,EACX,KAAK,GAAG,IAAI,YAAY,EAAE,EAC1B,IAAI,GAAG,qBAAqB,EAC5B,YAAY,GACb,GAAG,UAAU,CAAC;IAEf,4EAA4E;IAC5E,2EAA2E;IAC3E,+BAA+B;IAC/B,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACjE,MAAM,MAAM,GAAG,IAAI,uBAAuB,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAEjE,2EAA2E;IAC3E,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACtB,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAEtB,OAAO,EAAE,CAAC,aAAa,CAAC;QACtB,iEAAiE;QACjE,qEAAqE;QACrE,wEAAwE;QACxE,OAAO,EAAE,IAAI,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QACxC,MAAM;QACN,OAAO,EAAE;YACP,GAAG,EAAE,WAAW,CAAC,SAAS,EAAE;YAC5B,MAAM;YACN,MAAM;SACP;QACD,qEAAqE;QACrE,mEAAmE;QACnE,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC;QAC7B,UAAU;QACV,YAAY;QACZ,WAAW;QACX,aAAa;QACb,YAAY;QACZ,cAAc;QACd,WAAW;QACX,WAAW;QACX,GAAG;QACH,eAAe;QACf,eAAe;QACf,MAAM;QACN,qEAAqE;QACrE,0EAA0E;QAC1E,yEAAyE;QACzE,iBAAiB;QACjB,KAAK,EAAE,0BAA0B,CAAC,YAAY,CAAC;QAC/C,OAAO;QACP,OAAO;QACP,QAAQ;QACR,QAAQ;QACR,IAAI;QACJ,eAAe;QACf,WAAW;KACZ,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,26 @@
1
+ import type { SimClock } from "../../../../util/clock/sim-clock.js";
2
+ import type { SimLambdaOutboundHttp } from "../outbound/sim-lambda-outbound-http.js";
3
+ /**
4
+ * What an invocation of host-scope code has bridged to it.
5
+ */
6
+ interface SimLambdaHostScope {
7
+ /** The time the invocation reports as the current time. */
8
+ readonly clock: SimClock;
9
+ /**
10
+ * Where the requests the invocation makes to hostnames the simulation
11
+ * serves are answered. A function outside a simulated environment has none,
12
+ * and its requests go where they were addressed.
13
+ */
14
+ readonly outboundHttp: SimLambdaOutboundHttp | undefined;
15
+ }
16
+ /**
17
+ * Run an invocation of code in the host scope with the process globals it
18
+ * reads bridged to its simulation.
19
+ *
20
+ * Only code running in the host scope needs this. Zip code reads the Date and
21
+ * the HTTP clients its own vm sandbox was given, so a function backed by one
22
+ * leaves the globals alone entirely and never comes here.
23
+ */
24
+ export declare function runSimLambdaInHostScope<T>(scope: SimLambdaHostScope, run: () => Promise<T>): Promise<T>;
25
+ export {};
26
+ //# sourceMappingURL=sim-lambda-host-scope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-host-scope.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/function/invoke/sim-lambda-host-scope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAIrF;;GAEG;AACH,UAAU,kBAAkB;IAC1B,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC;IAEzB;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,qBAAqB,GAAG,SAAS,CAAC;CAC1D;AAED;;;;;;;GAOG;AACH,wBAAsB,uBAAuB,CAAC,CAAC,EAC7C,KAAK,EAAE,kBAAkB,EACzB,GAAG,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACpB,OAAO,CAAC,CAAC,CAAC,CAQZ"}
@@ -0,0 +1,17 @@
1
+ import { simLambdaProcessClock } from "./sim-lambda-process-clock.js";
2
+ import { simLambdaProcessOutbound } from "./sim-lambda-process-outbound.js";
3
+ /**
4
+ * Run an invocation of code in the host scope with the process globals it
5
+ * reads bridged to its simulation.
6
+ *
7
+ * Only code running in the host scope needs this. Zip code reads the Date and
8
+ * the HTTP clients its own vm sandbox was given, so a function backed by one
9
+ * leaves the globals alone entirely and never comes here.
10
+ */
11
+ export async function runSimLambdaInHostScope(scope, run) {
12
+ const { outboundHttp } = scope;
13
+ return await simLambdaProcessClock.run(scope.clock, async () => outboundHttp === undefined
14
+ ? await run()
15
+ : await simLambdaProcessOutbound.run(outboundHttp, run));
16
+ }
17
+ //# sourceMappingURL=sim-lambda-host-scope.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-host-scope.js","sourceRoot":"","sources":["../../../../../src/service/lambda/function/invoke/sim-lambda-host-scope.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAiB5E;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,KAAyB,EACzB,GAAqB;IAErB,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC;IAE/B,OAAO,MAAM,qBAAqB,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,IAAI,EAAE,CAC7D,YAAY,KAAK,SAAS;QACxB,CAAC,CAAC,MAAM,GAAG,EAAE;QACb,CAAC,CAAC,MAAM,wBAAwB,CAAC,GAAG,CAAC,YAAY,EAAE,GAAG,CAAC,CAC1D,CAAC;AACJ,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { SimLambdaOutboundHttp } from "../outbound/sim-lambda-outbound-http.js";
2
+ /**
3
+ * Replace the process-wide HTTP clients with ones an outbound HTTP answers
4
+ * for.
5
+ *
6
+ * The global `fetch` is defined rather than assigned, to keep it the
7
+ * configurable, writable, non-enumerable global property it already was:
8
+ * anything else replacing it has to find what it expects.
9
+ *
10
+ * The transport modules are what a handler holds, so the two functions that
11
+ * start a request are replaced on them in place, leaving everything else the
12
+ * modules export as it was. The built-in modules' named ES module exports are
13
+ * a snapshot of those properties, so they are re-synchronised afterwards for
14
+ * the handler that imported `request` by name rather than the module.
15
+ */
16
+ export declare function installSimLambdaOutboundClients(outbound: SimLambdaOutboundHttp): void;
17
+ //# sourceMappingURL=sim-lambda-outbound-clients.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-outbound-clients.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/function/invoke/sim-lambda-outbound-clients.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAWrF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,qBAAqB,GAC9B,IAAI,CAkBN"}
@@ -0,0 +1,43 @@
1
+ import http from "node:http";
2
+ import https from "node:https";
3
+ import { syncBuiltinESMExports } from "node:module";
4
+ import { makeSimLambdaHttpModule } from "../outbound/sim-lambda-http-module.js";
5
+ import { makeSimLambdaOutboundFetch } from "../outbound/sim-lambda-outbound-fetch.js";
6
+ /**
7
+ * The transport modules an in-process handler makes requests through, with the
8
+ * scheme each one carries.
9
+ */
10
+ const transportModules = [
11
+ [http, "http:"],
12
+ [https, "https:"],
13
+ ];
14
+ /**
15
+ * Replace the process-wide HTTP clients with ones an outbound HTTP answers
16
+ * for.
17
+ *
18
+ * The global `fetch` is defined rather than assigned, to keep it the
19
+ * configurable, writable, non-enumerable global property it already was:
20
+ * anything else replacing it has to find what it expects.
21
+ *
22
+ * The transport modules are what a handler holds, so the two functions that
23
+ * start a request are replaced on them in place, leaving everything else the
24
+ * modules export as it was. The built-in modules' named ES module exports are
25
+ * a snapshot of those properties, so they are re-synchronised afterwards for
26
+ * the handler that imported `request` by name rather than the module.
27
+ */
28
+ export function installSimLambdaOutboundClients(outbound) {
29
+ const hostFetch = globalThis.fetch;
30
+ Object.defineProperty(globalThis, "fetch", {
31
+ configurable: true,
32
+ writable: true,
33
+ value: makeSimLambdaOutboundFetch(outbound, hostFetch),
34
+ });
35
+ for (const [hostModule, scheme] of transportModules) {
36
+ const routed = makeSimLambdaHttpModule({ hostModule, outbound, scheme });
37
+ const patched = hostModule;
38
+ patched["request"] = routed["request"];
39
+ patched["get"] = routed["get"];
40
+ }
41
+ syncBuiltinESMExports();
42
+ }
43
+ //# sourceMappingURL=sim-lambda-outbound-clients.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-outbound-clients.js","sourceRoot":"","sources":["../../../../../src/service/lambda/function/invoke/sim-lambda-outbound-clients.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAGtF;;;GAGG;AACH,MAAM,gBAAgB,GAAG;IACvB,CAAC,IAAI,EAAE,OAAO,CAAC;IACf,CAAC,KAAK,EAAE,QAAQ,CAAC;CACT,CAAC;AAEX;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,+BAA+B,CAC7C,QAA+B;IAE/B,MAAM,SAAS,GAAG,UAAU,CAAC,KAAK,CAAC;IAEnC,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,OAAO,EAAE;QACzC,YAAY,EAAE,IAAI;QAClB,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,0BAA0B,CAAC,QAAQ,EAAE,SAAS,CAAC;KACvD,CAAC,CAAC;IAEH,KAAK,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,IAAI,gBAAgB,EAAE,CAAC;QACpD,MAAM,MAAM,GAAG,uBAAuB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QACzE,MAAM,OAAO,GAAG,UAAgD,CAAC;QAEjE,OAAO,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;QACvC,OAAO,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;IAED,qBAAqB,EAAE,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { SimLambdaOutboundHttp } from "../outbound/sim-lambda-outbound-http.js";
2
+ /**
3
+ * Where the HTTP clients an in-process sim Lambda handler uses are routed to
4
+ * the simulation it belongs to.
5
+ *
6
+ * A handler backed by a real in-process function is a closure over its own
7
+ * module scope, so it reaches for the same `fetch`, `node:http` and
8
+ * `node:https` as everything else in the test run. Zip code is handed clients
9
+ * of its own by the sandbox and needs none of this. Node.js asynchronous
10
+ * context tracking bridges the gap, exactly as it does for process.env and the
11
+ * clock: the invocation's outbound HTTP is held in an AsyncLocalStorage store,
12
+ * and the patched clients resolve to it while it is set.
13
+ *
14
+ * The store follows the invocation across await points, so concurrent
15
+ * invocations of functions belonging to different simulations each reach their
16
+ * own.
17
+ */
18
+ declare class SimLambdaProcessOutbound {
19
+ private readonly storage;
20
+ private installed;
21
+ /**
22
+ * Run an invocation with the given outbound HTTP answering the requests its
23
+ * code makes to hostnames the simulation serves.
24
+ */
25
+ run<T>(outbound: SimLambdaOutboundHttp, run: () => Promise<T>): Promise<T>;
26
+ /**
27
+ * Replace the process-wide HTTP clients with ones backed by the invocation
28
+ * store.
29
+ *
30
+ * Installed on the first invocation of an in-process handler rather than at
31
+ * import, so a test run that never uses one is left completely alone. With
32
+ * no invocation running the patched clients hand every request to the host
33
+ * client, so an installed patch behaves exactly like no patch at all. They
34
+ * are never removed: removing them would be unsafe while another invocation
35
+ * is in flight, and there is nothing to gain.
36
+ */
37
+ private install;
38
+ }
39
+ /**
40
+ * Shared because it patches process globals: one patch, one store.
41
+ */
42
+ export declare const simLambdaProcessOutbound: SimLambdaProcessOutbound;
43
+ export {};
44
+ //# sourceMappingURL=sim-lambda-process-outbound.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-process-outbound.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/function/invoke/sim-lambda-process-outbound.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAuCrF;;;;;;;;;;;;;;;GAeG;AACH,cAAM,wBAAwB;IAC5B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkD;IAC1E,OAAO,CAAC,SAAS,CAAS;IAE1B;;;OAGG;IACG,GAAG,CAAC,CAAC,EACT,QAAQ,EAAE,qBAAqB,EAC/B,GAAG,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACpB,OAAO,CAAC,CAAC,CAAC,CAGZ;IAED;;;;;;;;;;OAUG;IACH,OAAO,CAAC,OAAO;CAQhB;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,0BAAiC,CAAC"}
@@ -0,0 +1,83 @@
1
+ import { AsyncLocalStorage } from "node:async_hooks";
2
+ import { assertDefined } from "../../../../util/type-guard/defined.js";
3
+ import { installSimLambdaOutboundClients } from "./sim-lambda-outbound-clients.js";
4
+ /**
5
+ * The outbound HTTP the patched clients route through.
6
+ *
7
+ * An invocation in progress lends its own; anything else in the process
8
+ * reaches the network as it always did, which is what keeps the patches inert
9
+ * outside a sim Lambda invocation.
10
+ */
11
+ class SimLambdaAmbientOutbound {
12
+ storage;
13
+ constructor(storage) {
14
+ this.storage = storage;
15
+ }
16
+ /**
17
+ * Whether the invocation in progress, if there is one, serves a hostname.
18
+ */
19
+ serves(hostname) {
20
+ return this.storage.getStore()?.serves(hostname) ?? false;
21
+ }
22
+ /**
23
+ * Answer a request from the invocation in progress.
24
+ */
25
+ async fetch(request) {
26
+ const outbound = this.storage.getStore();
27
+ /* v8 ignore next 4 -- only reached for a request `serves` accepted, which
28
+ is a request made while an invocation is in progress. */
29
+ assertDefined(outbound, "sim Lambda invocation outbound HTTP for a request the simulation serves");
30
+ return await outbound.fetch(request);
31
+ }
32
+ }
33
+ /**
34
+ * Where the HTTP clients an in-process sim Lambda handler uses are routed to
35
+ * the simulation it belongs to.
36
+ *
37
+ * A handler backed by a real in-process function is a closure over its own
38
+ * module scope, so it reaches for the same `fetch`, `node:http` and
39
+ * `node:https` as everything else in the test run. Zip code is handed clients
40
+ * of its own by the sandbox and needs none of this. Node.js asynchronous
41
+ * context tracking bridges the gap, exactly as it does for process.env and the
42
+ * clock: the invocation's outbound HTTP is held in an AsyncLocalStorage store,
43
+ * and the patched clients resolve to it while it is set.
44
+ *
45
+ * The store follows the invocation across await points, so concurrent
46
+ * invocations of functions belonging to different simulations each reach their
47
+ * own.
48
+ */
49
+ class SimLambdaProcessOutbound {
50
+ storage = new AsyncLocalStorage();
51
+ installed = false;
52
+ /**
53
+ * Run an invocation with the given outbound HTTP answering the requests its
54
+ * code makes to hostnames the simulation serves.
55
+ */
56
+ async run(outbound, run) {
57
+ this.install();
58
+ return await this.storage.run(outbound, run);
59
+ }
60
+ /**
61
+ * Replace the process-wide HTTP clients with ones backed by the invocation
62
+ * store.
63
+ *
64
+ * Installed on the first invocation of an in-process handler rather than at
65
+ * import, so a test run that never uses one is left completely alone. With
66
+ * no invocation running the patched clients hand every request to the host
67
+ * client, so an installed patch behaves exactly like no patch at all. They
68
+ * are never removed: removing them would be unsafe while another invocation
69
+ * is in flight, and there is nothing to gain.
70
+ */
71
+ install() {
72
+ if (this.installed) {
73
+ return;
74
+ }
75
+ this.installed = true;
76
+ installSimLambdaOutboundClients(new SimLambdaAmbientOutbound(this.storage));
77
+ }
78
+ }
79
+ /**
80
+ * Shared because it patches process globals: one patch, one store.
81
+ */
82
+ export const simLambdaProcessOutbound = new SimLambdaProcessOutbound();
83
+ //# sourceMappingURL=sim-lambda-process-outbound.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-process-outbound.js","sourceRoot":"","sources":["../../../../../src/service/lambda/function/invoke/sim-lambda-process-outbound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEvE,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AAEnF;;;;;;GAMG;AACH,MAAM,wBAAwB;IAET,OAAO;IAD1B,YACmB,OAAiD;uBAAjD,OAAO;IACvB,CAAC;IAEJ;;OAEG;IACH,MAAM,CAAC,QAAgB;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC;IAC5D,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,KAAK,CAAC,OAAgB;QAC1B,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QAEzC;mEAC2D;QAC3D,aAAa,CACX,QAAQ,EACR,yEAAyE,CAC1E,CAAC;QAEF,OAAO,MAAM,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC;CACF;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,wBAAwB;IACX,OAAO,GAAG,IAAI,iBAAiB,EAAyB,CAAC;IAClE,SAAS,GAAG,KAAK,CAAC;IAE1B;;;OAGG;IACH,KAAK,CAAC,GAAG,CACP,QAA+B,EAC/B,GAAqB;QAErB,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;;;;;;OAUG;IACK,OAAO;QACb,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,OAAO;QACT,CAAC;QACD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QAEtB,+BAA+B,CAAC,IAAI,wBAAwB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9E,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,wBAAwB,EAAE,CAAC"}
@@ -0,0 +1,50 @@
1
+ import type { AwsRegionName } from "../../../aws/sim-aws-region.js";
2
+ import type { SimAws } from "../../../aws/sim-aws.js";
3
+ import type { SimLambdaOutboundHttp } from "./sim-lambda-outbound-http.js";
4
+ /**
5
+ * Whether a hostname is an AWS service API endpoint.
6
+ */
7
+ export declare function isSimAwsEndpointHostname(hostname: string): boolean;
8
+ /**
9
+ * Whether a request to an AWS service API endpoint is an API call, or an
10
+ * ordinary HTTP request to the same hostname.
11
+ *
12
+ * A service API endpoint answers both. What an SDK sends carries the operation
13
+ * header of the AWS JSON protocol, or the SigV4 credentials it was signed
14
+ * with, or both, and the wire dispatcher answers it. A token verifier fetching
15
+ * from the same hostname carries neither, because it holds nothing to sign
16
+ * with. A user pool publishes its JWKS and its OpenID configuration to whoever
17
+ * asks, and both are read over plain HTTP.
18
+ */
19
+ export declare function isSimAwsApiRequest(request: Request): boolean;
20
+ interface SimLambdaAwsApiOutboundProperties {
21
+ readonly simAws: SimAws;
22
+ /**
23
+ * The Region the function code is running in, which answers a request whose
24
+ * credential scope names none.
25
+ */
26
+ readonly regionName?: AwsRegionName | undefined;
27
+ }
28
+ /**
29
+ * Answers the AWS service API requests sim Lambda function code sends.
30
+ *
31
+ * This is the half of a function's outbound HTTP that carries a serialized
32
+ * Command rather than an ordinary HTTP request: the SDK has already signed and
33
+ * encoded it by the time it reaches a transport, so the request itself is what
34
+ * there is to route, and the wire dispatcher turns it back into the simulated
35
+ * operation it names.
36
+ */
37
+ export declare class SimLambdaAwsApiOutbound implements SimLambdaOutboundHttp {
38
+ private readonly dispatcher;
39
+ constructor(properties: SimLambdaAwsApiOutboundProperties);
40
+ /**
41
+ * Whether a hostname is one of the AWS service API endpoints.
42
+ */
43
+ serves(hostname: string): boolean;
44
+ /**
45
+ * Answer an AWS API request from the simulated operation it names.
46
+ */
47
+ fetch(request: Request): Promise<Response>;
48
+ }
49
+ export {};
50
+ //# sourceMappingURL=sim-lambda-aws-api-outbound.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-aws-api-outbound.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/function/outbound/sim-lambda-aws-api-outbound.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAkC3E;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAQlE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAO5D;AAED,UAAU,iCAAiC;IACzC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;CACjD;AAED;;;;;;;;GAQG;AACH,qBAAa,uBAAwB,YAAW,qBAAqB;IACnE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAuB;IAElD,YAAY,UAAU,EAAE,iCAAiC,EAKxD;IAED;;OAEG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEhC;IAED;;OAEG;IACG,KAAK,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,CAM/C;CACF"}
@@ -0,0 +1,83 @@
1
+ import { SimSdkWireDispatcher } from "../../../../sdk/wire/sim-sdk-wire-dispatcher.js";
2
+ import { readSimSdkWireCredentialScope, readSimSdkWireOperation, } from "../../../../sdk/wire/sim-sdk-wire-operation.js";
3
+ import { simLambdaOutboundWireRequest, simLambdaOutboundWireResponse, } from "./sim-lambda-outbound-wire.js";
4
+ /**
5
+ * The hostname suffixes AWS issues its service API endpoints under.
6
+ *
7
+ * A request to one of these is a request to an AWS service API whoever sent
8
+ * it, so it belongs to the simulation rather than the network. Everything else
9
+ * a function asks for is either a hostname the simulation serves some other
10
+ * way or one it serves nothing at.
11
+ *
12
+ * `.on.aws` is not among them: what AWS issues under it is Lambda Function
13
+ * URLs, which are the endpoint of one function rather than a service API.
14
+ */
15
+ const awsEndpointSuffixes = [
16
+ ".amazonaws.com",
17
+ ".amazonaws.com.cn",
18
+ ".api.aws",
19
+ ];
20
+ /**
21
+ * The label an endpoint hostname carries when it names one resource rather
22
+ * than a service API: an API Gateway HTTP API, under `.amazonaws.com`.
23
+ *
24
+ * A request to one of these is an ordinary HTTP request to something the
25
+ * simulation may be running, not a serialized Command, so there is nothing
26
+ * here to route it as. Simulated Route53 answers for it instead, in the same
27
+ * way it answers for every other hostname a resource is issued.
28
+ */
29
+ const resourceEndpointLabel = ".execute-api.";
30
+ /**
31
+ * Whether a hostname is an AWS service API endpoint.
32
+ */
33
+ export function isSimAwsEndpointHostname(hostname) {
34
+ const name = hostname.toLowerCase();
35
+ if (name.includes(resourceEndpointLabel)) {
36
+ return false;
37
+ }
38
+ return awsEndpointSuffixes.some((suffix) => name.endsWith(suffix));
39
+ }
40
+ /**
41
+ * Whether a request to an AWS service API endpoint is an API call, or an
42
+ * ordinary HTTP request to the same hostname.
43
+ *
44
+ * A service API endpoint answers both. What an SDK sends carries the operation
45
+ * header of the AWS JSON protocol, or the SigV4 credentials it was signed
46
+ * with, or both, and the wire dispatcher answers it. A token verifier fetching
47
+ * from the same hostname carries neither, because it holds nothing to sign
48
+ * with. A user pool publishes its JWKS and its OpenID configuration to whoever
49
+ * asks, and both are read over plain HTTP.
50
+ */
51
+ export function isSimAwsApiRequest(request) {
52
+ const wireRequest = { headers: Object.fromEntries(request.headers) };
53
+ return (readSimSdkWireOperation(wireRequest) !== undefined ||
54
+ readSimSdkWireCredentialScope(wireRequest) !== undefined);
55
+ }
56
+ /**
57
+ * Answers the AWS service API requests sim Lambda function code sends.
58
+ *
59
+ * This is the half of a function's outbound HTTP that carries a serialized
60
+ * Command rather than an ordinary HTTP request: the SDK has already signed and
61
+ * encoded it by the time it reaches a transport, so the request itself is what
62
+ * there is to route, and the wire dispatcher turns it back into the simulated
63
+ * operation it names.
64
+ */
65
+ export class SimLambdaAwsApiOutbound {
66
+ dispatcher;
67
+ constructor(properties) {
68
+ this.dispatcher = new SimSdkWireDispatcher(properties.simAws, properties.regionName);
69
+ }
70
+ /**
71
+ * Whether a hostname is one of the AWS service API endpoints.
72
+ */
73
+ serves(hostname) {
74
+ return isSimAwsEndpointHostname(hostname);
75
+ }
76
+ /**
77
+ * Answer an AWS API request from the simulated operation it names.
78
+ */
79
+ async fetch(request) {
80
+ return simLambdaOutboundWireResponse(await this.dispatcher.dispatch(await simLambdaOutboundWireRequest(request)));
81
+ }
82
+ }
83
+ //# sourceMappingURL=sim-lambda-aws-api-outbound.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-aws-api-outbound.js","sourceRoot":"","sources":["../../../../../src/service/lambda/function/outbound/sim-lambda-aws-api-outbound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AACvF,OAAO,EACL,6BAA6B,EAC7B,uBAAuB,GACxB,MAAM,gDAAgD,CAAC;AAIxD,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;;GAUG;AACH,MAAM,mBAAmB,GAAsB;IAC7C,gBAAgB;IAChB,mBAAmB;IACnB,UAAU;CACX,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,qBAAqB,GAAG,eAAe,CAAC;AAE9C;;GAEG;AACH,MAAM,UAAU,wBAAwB,CAAC,QAAgB;IACvD,MAAM,IAAI,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IAEpC,IAAI,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC,EAAE,CAAC;QACzC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;AACrE,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAAC,OAAgB;IACjD,MAAM,WAAW,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;IAErE,OAAO,CACL,uBAAuB,CAAC,WAAW,CAAC,KAAK,SAAS;QAClD,6BAA6B,CAAC,WAAW,CAAC,KAAK,SAAS,CACzD,CAAC;AACJ,CAAC;AAYD;;;;;;;;GAQG;AACH,MAAM,OAAO,uBAAuB;IACjB,UAAU,CAAuB;IAElD,YAAY,UAA6C;QACvD,IAAI,CAAC,UAAU,GAAG,IAAI,oBAAoB,CACxC,UAAU,CAAC,MAAM,EACjB,UAAU,CAAC,UAAU,CACtB,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,QAAgB;QACrB,OAAO,wBAAwB,CAAC,QAAQ,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,KAAK,CAAC,OAAgB;QAC1B,OAAO,6BAA6B,CAClC,MAAM,IAAI,CAAC,UAAU,CAAC,QAAQ,CAC5B,MAAM,4BAA4B,CAAC,OAAO,CAAC,CAC5C,CACF,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,42 @@
1
+ import type { SimLambdaOutboundHttp } from "./sim-lambda-outbound-http.js";
2
+ /**
3
+ * A `node:http` or `node:https` module, as far as this needs to know.
4
+ */
5
+ type NodeHttpModule = Record<string, unknown>;
6
+ /**
7
+ * Whether a module specifier names an HTTP transport module.
8
+ */
9
+ export declare function isSimLambdaHttpModuleSpecifier(specifier: string): boolean;
10
+ /**
11
+ * The scheme a transport module's requests are made with, for a specifier
12
+ * naming one.
13
+ */
14
+ export declare function simLambdaHttpModuleScheme(specifier: string): string;
15
+ interface SimLambdaHttpModuleProperties {
16
+ readonly hostModule: NodeHttpModule;
17
+ readonly outbound: SimLambdaOutboundHttp;
18
+ /**
19
+ * The scheme this module's requests carry, `https:` unless said otherwise,
20
+ * since the arguments to a request rarely name one.
21
+ */
22
+ readonly scheme?: string | undefined;
23
+ }
24
+ /**
25
+ * Build the `node:http` or `node:https` module sim Lambda function code makes
26
+ * its requests through.
27
+ *
28
+ * Everything the real module exports is kept, and only the two functions that
29
+ * start a request are replaced, so a client library that reaches for an Agent,
30
+ * a status code table or anything else finds the real thing. A request to a
31
+ * hostname the simulation serves is answered by the simulation; every other
32
+ * request is the host module's, made exactly as it was asked for.
33
+ *
34
+ * This is where a deployment package that bundles the AWS SDK is reached. The
35
+ * bundled SDK resolves no module specifier the simulator can intercept, but it
36
+ * still asks the runtime for its HTTP transport, and that is a module the
37
+ * runtime provides. It is also what a handler reaching for `node:https`
38
+ * directly gets, which an OAuth token exchange written without `fetch` does.
39
+ */
40
+ export declare function makeSimLambdaHttpModule(properties: SimLambdaHttpModuleProperties): NodeHttpModule;
41
+ export {};
42
+ //# sourceMappingURL=sim-lambda-http-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sim-lambda-http-module.d.ts","sourceRoot":"","sources":["../../../../../src/service/lambda/function/outbound/sim-lambda-http-module.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAE3E;;GAEG;AACH,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAc9C;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAEzE;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEnE;AAID,UAAU,6BAA6B;IACrC,QAAQ,CAAC,UAAU,EAAE,cAAc,CAAC;IACpC,QAAQ,CAAC,QAAQ,EAAE,qBAAqB,CAAC;IAEzC;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,6BAA6B,GACxC,cAAc,CA0BhB"}