@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.
- package/dist/sdk/router/sim-sdk-caller-options.d.ts +2 -2
- package/dist/sdk/router/sim-sdk-caller-options.d.ts.map +1 -1
- package/dist/sdk/router/sim-sdk-command-router.type.d.ts +7 -2
- package/dist/sdk/router/sim-sdk-command-router.type.d.ts.map +1 -1
- package/dist/sdk/sim-sdk-command-dispatcher.d.ts +7 -1
- package/dist/sdk/sim-sdk-command-dispatcher.d.ts.map +1 -1
- package/dist/sdk/sim-sdk-command-dispatcher.js +16 -4
- package/dist/sdk/sim-sdk-command-dispatcher.js.map +1 -1
- package/dist/sdk/wire/sim-sdk-wire-dispatcher.d.ts +7 -6
- package/dist/sdk/wire/sim-sdk-wire-dispatcher.d.ts.map +1 -1
- package/dist/sdk/wire/sim-sdk-wire-dispatcher.js +11 -10
- package/dist/sdk/wire/sim-sdk-wire-dispatcher.js.map +1 -1
- package/dist/sdk/wire/sim-sdk-wire-operation.d.ts +12 -2
- package/dist/sdk/wire/sim-sdk-wire-operation.d.ts.map +1 -1
- package/dist/sdk/wire/sim-sdk-wire-operation.js +1 -0
- package/dist/sdk/wire/sim-sdk-wire-operation.js.map +1 -1
- package/dist/sdk/wire/sim-sdk-wire.types.d.ts +0 -4
- package/dist/sdk/wire/sim-sdk-wire.types.d.ts.map +1 -1
- package/dist/serve/http/api/sim-aws-api-endpoint.d.ts +40 -0
- package/dist/serve/http/api/sim-aws-api-endpoint.d.ts.map +1 -0
- package/dist/serve/http/api/sim-aws-api-endpoint.js +120 -0
- package/dist/serve/http/api/sim-aws-api-endpoint.js.map +1 -0
- package/dist/serve/http/sim-aws-http.d.ts +1 -0
- package/dist/serve/http/sim-aws-http.d.ts.map +1 -1
- package/dist/serve/http/sim-aws-http.js +9 -0
- package/dist/serve/http/sim-aws-http.js.map +1 -1
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js +1 -0
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js.map +1 -1
- package/dist/service/aws/factory/sim-aws-lambda-collaborators.d.ts +8 -0
- package/dist/service/aws/factory/sim-aws-lambda-collaborators.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-lambda-collaborators.js +13 -0
- package/dist/service/aws/factory/sim-aws-lambda-collaborators.js.map +1 -1
- package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-lookup.d.ts +28 -0
- package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-lookup.d.ts.map +1 -0
- package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-lookup.js +36 -0
- package/dist/service/cloudformation/stack/resource-map/sim-cfn-stack-resource-lookup.js.map +1 -0
- package/dist/service/cloudformation/stack/sim-cfn-stack.d.ts +10 -28
- package/dist/service/cloudformation/stack/sim-cfn-stack.d.ts.map +1 -1
- package/dist/service/cloudformation/stack/sim-cfn-stack.js +11 -2
- package/dist/service/cloudformation/stack/sim-cfn-stack.js.map +1 -1
- package/dist/service/cloudformation/stack/sim-cfn-stack.type.d.ts +28 -0
- package/dist/service/cloudformation/stack/sim-cfn-stack.type.d.ts.map +1 -0
- package/dist/service/cloudformation/stack/sim-cfn-stack.type.js +2 -0
- package/dist/service/cloudformation/stack/sim-cfn-stack.type.js.map +1 -0
- package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.d.ts.map +1 -1
- package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.js +2 -1
- package/dist/service/cognito/command/auth/sim-cognito-password-sign-in.js.map +1 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.d.ts.map +1 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.js +2 -1
- package/dist/service/cognito/command/hosted/sim-cognito-hosted-password-sign-in.js.map +1 -1
- package/dist/service/cognito/command/sim-cognito-command.types.d.ts +1 -0
- package/dist/service/cognito/command/sim-cognito-command.types.d.ts.map +1 -1
- package/dist/service/cognito/command/sim-cognito-commands.d.ts +2 -0
- package/dist/service/cognito/command/sim-cognito-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/sim-cognito-commands.js +8 -0
- package/dist/service/cognito/command/sim-cognito-commands.js.map +1 -1
- package/dist/service/cognito/command/user/password-reset.command.d.ts +80 -0
- package/dist/service/cognito/command/user/password-reset.command.d.ts.map +1 -0
- package/dist/service/cognito/command/user/password-reset.command.js +2 -0
- package/dist/service/cognito/command/user/password-reset.command.js.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.d.ts +74 -0
- package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.d.ts.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.js +121 -0
- package/dist/service/cognito/command/user/sim-cognito-password-reset-commands.js.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-resetting-user.d.ts +34 -0
- package/dist/service/cognito/command/user/sim-cognito-resetting-user.d.ts.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-resetting-user.js +54 -0
- package/dist/service/cognito/command/user/sim-cognito-resetting-user.js.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js +3 -3
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.d.ts +29 -0
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.d.ts.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.js +36 -0
- package/dist/service/cognito/command/user/sim-cognito-unsimulated-password-reset-options.js.map +1 -0
- package/dist/service/cognito/error/sim-cognito.error.d.ts +23 -0
- package/dist/service/cognito/error/sim-cognito.error.d.ts.map +1 -1
- package/dist/service/cognito/error/sim-cognito.error.js +27 -0
- package/dist/service/cognito/error/sim-cognito.error.js.map +1 -1
- package/dist/service/cognito/index.d.ts +2 -1
- package/dist/service/cognito/index.d.ts.map +1 -1
- package/dist/service/cognito/index.js +2 -1
- package/dist/service/cognito/index.js.map +1 -1
- package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.d.ts +6 -5
- package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.d.ts.map +1 -1
- package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.js +18 -5
- package/dist/service/cognito/sdk/sim-cognito-sdk-directory-routes.js.map +1 -1
- package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.d.ts +26 -0
- package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.d.ts.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.js +57 -0
- package/dist/service/cognito/serve/page/sim-cognito-forgot-password-page.js.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-managed-login.d.ts +9 -6
- package/dist/service/cognito/serve/page/sim-cognito-managed-login.d.ts.map +1 -1
- package/dist/service/cognito/serve/page/sim-cognito-managed-login.js +26 -11
- package/dist/service/cognito/serve/page/sim-cognito-managed-login.js.map +1 -1
- package/dist/service/cognito/serve/page/sim-cognito-page-paths.d.ts +18 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-paths.d.ts.map +1 -1
- package/dist/service/cognito/serve/page/sim-cognito-page-paths.js +23 -0
- package/dist/service/cognito/serve/page/sim-cognito-page-paths.js.map +1 -1
- package/dist/service/cognito/serve/page/sim-cognito-provider-links.d.ts +12 -0
- package/dist/service/cognito/serve/page/sim-cognito-provider-links.d.ts.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-provider-links.js +18 -0
- package/dist/service/cognito/serve/page/sim-cognito-provider-links.js.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.d.ts +27 -0
- package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.d.ts.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.js +65 -0
- package/dist/service/cognito/serve/page/sim-cognito-reset-password-page.js.map +1 -0
- package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.d.ts +2 -10
- package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.d.ts.map +1 -1
- package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.js +16 -21
- package/dist/service/cognito/serve/page/sim-cognito-sign-in-page.js.map +1 -1
- package/dist/service/cognito/sim-cognito-user-directory.d.ts +16 -0
- package/dist/service/cognito/sim-cognito-user-directory.d.ts.map +1 -1
- package/dist/service/cognito/sim-cognito-user-directory.js +25 -0
- package/dist/service/cognito/sim-cognito-user-directory.js.map +1 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.d.ts +9 -0
- package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.js +14 -1
- package/dist/service/cognito/user-pool/auth/sim-cognito-sign-in.js.map +1 -1
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.d.ts +10 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.js +11 -0
- package/dist/service/cognito/user-pool/idp/sim-cognito-federated-identity.js.map +1 -1
- package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.d.ts +44 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.js +78 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-code-delivery.js.map +1 -0
- package/dist/service/cognito/user-pool/message/sim-cognito-message-occasion.d.ts +10 -6
- package/dist/service/cognito/user-pool/message/sim-cognito-message-occasion.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.d.ts +5 -2
- package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.js +5 -2
- package/dist/service/cognito/user-pool/message/sim-cognito-pool-messenger.js.map +1 -1
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.d.ts +15 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.js +18 -0
- package/dist/service/cognito/user-pool/trigger/sim-cognito-trigger-occasion.js.map +1 -1
- package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.d.ts +4 -1
- package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.js +5 -2
- package/dist/service/cognito/user-pool/trigger/sim-cognito-user-pool-triggers.js.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.d.ts +14 -6
- package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.js +20 -9
- package/dist/service/cognito/user-pool/user/sim-cognito-user-confirmation.js.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.d.ts +62 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.js +65 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-password-reset.js.map +1 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-status.d.ts +55 -11
- package/dist/service/cognito/user-pool/user/sim-cognito-user-status.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-status.js +67 -10
- package/dist/service/cognito/user-pool/user/sim-cognito-user-status.js.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user.d.ts +15 -12
- package/dist/service/cognito/user-pool/user/sim-cognito-user.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user.js +31 -20
- package/dist/service/cognito/user-pool/user/sim-cognito-user.js.map +1 -1
- package/dist/service/iam/sim-iam.d.ts +10 -0
- package/dist/service/iam/sim-iam.d.ts.map +1 -1
- package/dist/service/iam/sim-iam.js +10 -0
- package/dist/service/iam/sim-iam.js.map +1 -1
- package/dist/service/lambda/command/create-function/create-function.handler.d.ts +3 -0
- package/dist/service/lambda/command/create-function/create-function.handler.d.ts.map +1 -1
- package/dist/service/lambda/command/create-function/create-function.handler.js +5 -1
- package/dist/service/lambda/command/create-function/create-function.handler.js.map +1 -1
- package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts +2 -0
- package/dist/service/lambda/command/function/sim-lambda-function-commands.d.ts.map +1 -1
- package/dist/service/lambda/command/function/sim-lambda-function-commands.js.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-code-resolver.d.ts +7 -0
- package/dist/service/lambda/function/code/sim-lambda-code-resolver.d.ts.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-code-resolver.js +1 -0
- package/dist/service/lambda/function/code/sim-lambda-code-resolver.js.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.d.ts +3 -0
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.d.ts.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.js +3 -0
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code-factory.js.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.d.ts +6 -9
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.d.ts.map +1 -1
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.js +3 -3
- package/dist/service/lambda/function/code/sim-lambda-vm-zip-code.js.map +1 -1
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.d.ts +11 -3
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.d.ts.map +1 -1
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.js +13 -8
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.js.map +1 -1
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.d.ts +21 -2
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.d.ts.map +1 -1
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.js +18 -2
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-context.js.map +1 -1
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.d.ts +26 -0
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.d.ts.map +1 -0
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.js +17 -0
- package/dist/service/lambda/function/invoke/sim-lambda-host-scope.js.map +1 -0
- package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.d.ts +17 -0
- package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.d.ts.map +1 -0
- package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.js +43 -0
- package/dist/service/lambda/function/invoke/sim-lambda-outbound-clients.js.map +1 -0
- package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.d.ts +44 -0
- package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.d.ts.map +1 -0
- package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.js +83 -0
- package/dist/service/lambda/function/invoke/sim-lambda-process-outbound.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.d.ts +50 -0
- package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.js +83 -0
- package/dist/service/lambda/function/outbound/sim-lambda-aws-api-outbound.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-module.d.ts +42 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-module.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-module.js +88 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-module.js.map +1 -0
- package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-wire-request.d.ts → outbound/sim-lambda-http-request.d.ts} +20 -7
- package/dist/service/lambda/function/outbound/sim-lambda-http-request.d.ts.map +1 -0
- package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-wire-request.js → outbound/sim-lambda-http-request.js} +27 -29
- package/dist/service/lambda/function/outbound/sim-lambda-http-request.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-response.d.ts +18 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-response.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-response.js +23 -0
- package/dist/service/lambda/function/outbound/sim-lambda-http-response.js.map +1 -0
- package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-http-target.d.ts → outbound/sim-lambda-http-target.d.ts} +9 -7
- package/dist/service/lambda/function/outbound/sim-lambda-http-target.d.ts.map +1 -0
- package/dist/service/lambda/function/{code/vm/http/sim-lambda-vm-http-target.js → outbound/sim-lambda-http-target.js} +4 -38
- package/dist/service/lambda/function/outbound/sim-lambda-http-target.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.d.ts +15 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.js +38 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-fetch.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.d.ts +27 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.d.ts +13 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.js +107 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.factory.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.js +2 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-http.js.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.d.ts +16 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.d.ts.map +1 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.js +29 -0
- package/dist/service/lambda/function/outbound/sim-lambda-outbound-wire.js.map +1 -0
- package/dist/service/lambda/function/sim-lambda-function.d.ts +12 -6
- package/dist/service/lambda/function/sim-lambda-function.d.ts.map +1 -1
- package/dist/service/lambda/function/sim-lambda-function.js +9 -10
- package/dist/service/lambda/function/sim-lambda-function.js.map +1 -1
- package/dist/service/lambda/sim-lambda-commands.d.ts +8 -0
- package/dist/service/lambda/sim-lambda-commands.d.ts.map +1 -1
- package/dist/service/lambda/sim-lambda-commands.js +2 -1
- package/dist/service/lambda/sim-lambda-commands.js.map +1 -1
- package/dist/service/rekognition/collection/sim-rekognition-collection-faces.d.ts +53 -0
- package/dist/service/rekognition/collection/sim-rekognition-collection-faces.d.ts.map +1 -0
- package/dist/service/rekognition/collection/sim-rekognition-collection-faces.js +69 -0
- package/dist/service/rekognition/collection/sim-rekognition-collection-faces.js.map +1 -0
- package/dist/service/rekognition/collection/sim-rekognition-collection.d.ts +26 -0
- package/dist/service/rekognition/collection/sim-rekognition-collection.d.ts.map +1 -0
- package/dist/service/rekognition/collection/sim-rekognition-collection.js +9 -0
- package/dist/service/rekognition/collection/sim-rekognition-collection.js.map +1 -0
- package/dist/service/rekognition/collection/sim-rekognition-collections.d.ts +50 -0
- package/dist/service/rekognition/collection/sim-rekognition-collections.d.ts.map +1 -0
- package/dist/service/rekognition/collection/sim-rekognition-collections.js +78 -0
- package/dist/service/rekognition/collection/sim-rekognition-collections.js.map +1 -0
- package/dist/service/rekognition/collection/sim-rekognition-indexed-face.d.ts +41 -0
- package/dist/service/rekognition/collection/sim-rekognition-indexed-face.d.ts.map +1 -0
- package/dist/service/rekognition/collection/sim-rekognition-indexed-face.js +53 -0
- package/dist/service/rekognition/collection/sim-rekognition-indexed-face.js.map +1 -0
- package/dist/service/rekognition/command/authorize/sim-rekognition-authorizer.d.ts +2 -2
- package/dist/service/rekognition/command/authorize/sim-rekognition-authorizer.d.ts.map +1 -1
- package/dist/service/rekognition/command/authorize/sim-rekognition-authorizer.js +7 -4
- package/dist/service/rekognition/command/authorize/sim-rekognition-authorizer.js.map +1 -1
- package/dist/service/rekognition/command/collection/collection-id.d.ts +9 -0
- package/dist/service/rekognition/command/collection/collection-id.d.ts.map +1 -0
- package/dist/service/rekognition/command/collection/collection-id.js +15 -0
- package/dist/service/rekognition/command/collection/collection-id.js.map +1 -0
- package/dist/service/rekognition/command/collection/collection.command.d.ts +55 -0
- package/dist/service/rekognition/command/collection/collection.command.d.ts.map +1 -0
- package/dist/service/rekognition/command/collection/collection.command.js +2 -0
- package/dist/service/rekognition/command/collection/collection.command.js.map +1 -0
- package/dist/service/rekognition/command/collection/collection.handler.d.ts +40 -0
- package/dist/service/rekognition/command/collection/collection.handler.d.ts.map +1 -0
- package/dist/service/rekognition/command/collection/collection.handler.js +62 -0
- package/dist/service/rekognition/command/collection/collection.handler.js.map +1 -0
- package/dist/service/rekognition/command/face/delete-faces-request.d.ts +10 -0
- package/dist/service/rekognition/command/face/delete-faces-request.d.ts.map +1 -0
- package/dist/service/rekognition/command/face/delete-faces-request.js +18 -0
- package/dist/service/rekognition/command/face/delete-faces-request.js.map +1 -0
- package/dist/service/rekognition/command/face/external-image-id.d.ts +9 -0
- package/dist/service/rekognition/command/face/external-image-id.d.ts.map +1 -0
- package/dist/service/rekognition/command/face/external-image-id.js +28 -0
- package/dist/service/rekognition/command/face/external-image-id.js.map +1 -0
- package/dist/service/rekognition/command/face/face-ids.d.ts +9 -0
- package/dist/service/rekognition/command/face/face-ids.d.ts.map +1 -0
- package/dist/service/rekognition/command/face/face-ids.js +48 -0
- package/dist/service/rekognition/command/face/face-ids.js.map +1 -0
- package/dist/service/rekognition/command/face/face-indexer.d.ts +38 -0
- package/dist/service/rekognition/command/face/face-indexer.d.ts.map +1 -0
- package/dist/service/rekognition/command/face/face-indexer.js +64 -0
- package/dist/service/rekognition/command/face/face-indexer.js.map +1 -0
- package/dist/service/rekognition/command/face/face-limits.d.ts +22 -0
- package/dist/service/rekognition/command/face/face-limits.d.ts.map +1 -0
- package/dist/service/rekognition/command/face/face-limits.js +36 -0
- package/dist/service/rekognition/command/face/face-limits.js.map +1 -0
- package/dist/service/rekognition/command/face/face-listing.d.ts +26 -0
- package/dist/service/rekognition/command/face/face-listing.d.ts.map +1 -0
- package/dist/service/rekognition/command/face/face-listing.js +36 -0
- package/dist/service/rekognition/command/face/face-listing.js.map +1 -0
- package/dist/service/rekognition/command/face/face-output.d.ts +65 -0
- package/dist/service/rekognition/command/face/face-output.d.ts.map +1 -0
- package/dist/service/rekognition/command/face/face-output.js +8 -0
- package/dist/service/rekognition/command/face/face-output.js.map +1 -0
- package/dist/service/rekognition/command/face/face-searcher.d.ts +32 -0
- package/dist/service/rekognition/command/face/face-searcher.d.ts.map +1 -0
- package/dist/service/rekognition/command/face/face-searcher.js +45 -0
- package/dist/service/rekognition/command/face/face-searcher.js.map +1 -0
- package/dist/service/rekognition/command/face/face.command.d.ts +107 -0
- package/dist/service/rekognition/command/face/face.command.d.ts.map +1 -0
- package/dist/service/rekognition/command/face/face.command.js +2 -0
- package/dist/service/rekognition/command/face/face.command.js.map +1 -0
- package/dist/service/rekognition/command/face/face.handler.d.ts +62 -0
- package/dist/service/rekognition/command/face/face.handler.d.ts.map +1 -0
- package/dist/service/rekognition/command/face/face.handler.js +99 -0
- package/dist/service/rekognition/command/face/face.handler.js.map +1 -0
- package/dist/service/rekognition/command/face/index-faces-request.d.ts +20 -0
- package/dist/service/rekognition/command/face/index-faces-request.d.ts.map +1 -0
- package/dist/service/rekognition/command/face/index-faces-request.js +39 -0
- package/dist/service/rekognition/command/face/index-faces-request.js.map +1 -0
- package/dist/service/rekognition/command/face/list-faces-page.d.ts +26 -0
- package/dist/service/rekognition/command/face/list-faces-page.d.ts.map +1 -0
- package/dist/service/rekognition/command/face/list-faces-page.js +39 -0
- package/dist/service/rekognition/command/face/list-faces-page.js.map +1 -0
- package/dist/service/rekognition/command/face/list-faces-request.d.ts +17 -0
- package/dist/service/rekognition/command/face/list-faces-request.d.ts.map +1 -0
- package/dist/service/rekognition/command/face/list-faces-request.js +43 -0
- package/dist/service/rekognition/command/face/list-faces-request.js.map +1 -0
- package/dist/service/rekognition/command/face/search-faces-by-image-request.d.ts +24 -0
- package/dist/service/rekognition/command/face/search-faces-by-image-request.d.ts.map +1 -0
- package/dist/service/rekognition/command/face/search-faces-by-image-request.js +61 -0
- package/dist/service/rekognition/command/face/search-faces-by-image-request.js.map +1 -0
- package/dist/service/rekognition/command/sim-rekognition-detection-handlers.d.ts +32 -0
- package/dist/service/rekognition/command/sim-rekognition-detection-handlers.d.ts.map +1 -0
- package/dist/service/rekognition/command/sim-rekognition-detection-handlers.js +37 -0
- package/dist/service/rekognition/command/sim-rekognition-detection-handlers.js.map +1 -0
- package/dist/service/rekognition/error/sim-rekognition.error.d.ts +20 -0
- package/dist/service/rekognition/error/sim-rekognition.error.d.ts.map +1 -1
- package/dist/service/rekognition/error/sim-rekognition.error.js +24 -0
- package/dist/service/rekognition/error/sim-rekognition.error.js.map +1 -1
- package/dist/service/rekognition/face/sim-rekognition-detected-face.d.ts +9 -0
- package/dist/service/rekognition/face/sim-rekognition-detected-face.d.ts.map +1 -1
- package/dist/service/rekognition/face/sim-rekognition-detected-face.js +12 -0
- package/dist/service/rekognition/face/sim-rekognition-detected-face.js.map +1 -1
- package/dist/service/rekognition/face/sim-rekognition-face-detail-builder.d.ts.map +1 -1
- package/dist/service/rekognition/face/sim-rekognition-face-detail-builder.js.map +1 -1
- package/dist/service/rekognition/face/sim-rekognition-face-detection.d.ts +9 -0
- package/dist/service/rekognition/face/sim-rekognition-face-detection.d.ts.map +1 -1
- package/dist/service/rekognition/face/sim-rekognition-face-detection.js +10 -0
- package/dist/service/rekognition/face/sim-rekognition-face-detection.js.map +1 -1
- package/dist/service/rekognition/face/sim-rekognition-face-frame.d.ts +5 -1
- package/dist/service/rekognition/face/sim-rekognition-face-frame.d.ts.map +1 -1
- package/dist/service/rekognition/face/sim-rekognition-face-frame.js +3 -0
- package/dist/service/rekognition/face/sim-rekognition-face-frame.js.map +1 -1
- package/dist/service/rekognition/index.d.ts +3 -1
- package/dist/service/rekognition/index.d.ts.map +1 -1
- package/dist/service/rekognition/index.js +2 -1
- package/dist/service/rekognition/index.js.map +1 -1
- package/dist/service/rekognition/match/sim-rekognition-face-match-declaration.d.ts +29 -0
- package/dist/service/rekognition/match/sim-rekognition-face-match-declaration.d.ts.map +1 -0
- package/dist/service/rekognition/match/sim-rekognition-face-match-declaration.js +2 -0
- package/dist/service/rekognition/match/sim-rekognition-face-match-declaration.js.map +1 -0
- package/dist/service/rekognition/match/sim-rekognition-face-match-result.d.ts +25 -0
- package/dist/service/rekognition/match/sim-rekognition-face-match-result.d.ts.map +1 -0
- package/dist/service/rekognition/match/sim-rekognition-face-match-result.js +44 -0
- package/dist/service/rekognition/match/sim-rekognition-face-match-result.js.map +1 -0
- package/dist/service/rekognition/match/sim-rekognition-face-match-rule.d.ts +26 -0
- package/dist/service/rekognition/match/sim-rekognition-face-match-rule.d.ts.map +1 -0
- package/dist/service/rekognition/match/sim-rekognition-face-match-rule.js +64 -0
- package/dist/service/rekognition/match/sim-rekognition-face-match-rule.js.map +1 -0
- package/dist/service/rekognition/match/sim-rekognition-face-matches.d.ts +32 -0
- package/dist/service/rekognition/match/sim-rekognition-face-matches.d.ts.map +1 -0
- package/dist/service/rekognition/match/sim-rekognition-face-matches.js +39 -0
- package/dist/service/rekognition/match/sim-rekognition-face-matches.js.map +1 -0
- package/dist/service/rekognition/sdk/sim-rekognition-sdk-command-router.d.ts.map +1 -1
- package/dist/service/rekognition/sdk/sim-rekognition-sdk-command-router.js +28 -0
- package/dist/service/rekognition/sdk/sim-rekognition-sdk-command-router.js.map +1 -1
- package/dist/service/rekognition/sim-rekognition.d.ts +51 -3
- package/dist/service/rekognition/sim-rekognition.d.ts.map +1 -1
- package/dist/service/rekognition/sim-rekognition.js +84 -16
- package/dist/service/rekognition/sim-rekognition.js.map +1 -1
- package/dist/service/s3/bucket/sim-s3-bucket.d.ts +8 -0
- package/dist/service/s3/bucket/sim-s3-bucket.d.ts.map +1 -1
- package/dist/service/s3/bucket/sim-s3-bucket.js +4 -1
- package/dist/service/s3/bucket/sim-s3-bucket.js.map +1 -1
- package/dist/service/s3/command/bucket/sim-s3-bucket-commands.d.ts +1 -0
- package/dist/service/s3/command/bucket/sim-s3-bucket-commands.d.ts.map +1 -1
- package/dist/service/s3/command/bucket/sim-s3-bucket-commands.js +4 -0
- package/dist/service/s3/command/bucket/sim-s3-bucket-commands.js.map +1 -1
- package/dist/service/s3/command/create-bucket/create-bucket.handler.d.ts.map +1 -1
- package/dist/service/s3/command/create-bucket/create-bucket.handler.js +1 -0
- package/dist/service/s3/command/create-bucket/create-bucket.handler.js.map +1 -1
- package/dist/service/s3/command/head-bucket/head-bucket-authorizer.d.ts +26 -0
- package/dist/service/s3/command/head-bucket/head-bucket-authorizer.d.ts.map +1 -0
- package/dist/service/s3/command/head-bucket/head-bucket-authorizer.js +48 -0
- package/dist/service/s3/command/head-bucket/head-bucket-authorizer.js.map +1 -0
- package/dist/service/s3/command/head-bucket/head-bucket.command.d.ts +24 -0
- package/dist/service/s3/command/head-bucket/head-bucket.command.d.ts.map +1 -0
- package/dist/service/s3/command/head-bucket/head-bucket.command.js +2 -0
- package/dist/service/s3/command/head-bucket/head-bucket.command.js.map +1 -0
- package/dist/service/s3/command/head-bucket/head-bucket.handler.d.ts +35 -0
- package/dist/service/s3/command/head-bucket/head-bucket.handler.d.ts.map +1 -0
- package/dist/service/s3/command/head-bucket/head-bucket.handler.js +45 -0
- package/dist/service/s3/command/head-bucket/head-bucket.handler.js.map +1 -0
- package/dist/service/s3/command/head-object/head-object-loader.d.ts +17 -0
- package/dist/service/s3/command/head-object/head-object-loader.d.ts.map +1 -0
- package/dist/service/s3/command/head-object/head-object-loader.js +29 -0
- package/dist/service/s3/command/head-object/head-object-loader.js.map +1 -0
- package/dist/service/s3/command/head-object/head-object.command.d.ts +29 -0
- package/dist/service/s3/command/head-object/head-object.command.d.ts.map +1 -0
- package/dist/service/s3/command/head-object/head-object.command.js +2 -0
- package/dist/service/s3/command/head-object/head-object.command.js.map +1 -0
- package/dist/service/s3/command/head-object/head-object.handler.d.ts +38 -0
- package/dist/service/s3/command/head-object/head-object.handler.d.ts.map +1 -0
- package/dist/service/s3/command/head-object/head-object.handler.js +50 -0
- package/dist/service/s3/command/head-object/head-object.handler.js.map +1 -0
- package/dist/service/s3/command/list-buckets/list-buckets-page-builder.d.ts.map +1 -1
- package/dist/service/s3/command/list-buckets/list-buckets-page-builder.js +1 -0
- package/dist/service/s3/command/list-buckets/list-buckets-page-builder.js.map +1 -1
- package/dist/service/s3/command/list-buckets/list-buckets.command.d.ts +1 -0
- package/dist/service/s3/command/list-buckets/list-buckets.command.d.ts.map +1 -1
- package/dist/service/s3/command/object/sim-s3-object-commands.d.ts +4 -0
- package/dist/service/s3/command/object/sim-s3-object-commands.d.ts.map +1 -1
- package/dist/service/s3/command/object/sim-s3-object-commands.js +7 -0
- package/dist/service/s3/command/object/sim-s3-object-commands.js.map +1 -1
- package/dist/service/s3/command/sim-s3-command.types.d.ts +2 -0
- package/dist/service/s3/command/sim-s3-command.types.d.ts.map +1 -1
- package/dist/service/s3/error/sim-s3.error.d.ts +12 -0
- package/dist/service/s3/error/sim-s3.error.d.ts.map +1 -1
- package/dist/service/s3/error/sim-s3.error.js +14 -0
- package/dist/service/s3/error/sim-s3.error.js.map +1 -1
- package/dist/service/s3/sdk/sim-s3-sdk-command-router.d.ts.map +1 -1
- package/dist/service/s3/sdk/sim-s3-sdk-command-router.js +8 -0
- package/dist/service/s3/sdk/sim-s3-sdk-command-router.js.map +1 -1
- package/dist/service/s3/serve/api/sim-s3-api-bucket-routes.d.ts +9 -0
- package/dist/service/s3/serve/api/sim-s3-api-bucket-routes.d.ts.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-bucket-routes.js +120 -0
- package/dist/service/s3/serve/api/sim-s3-api-bucket-routes.js.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-configuration-output.d.ts +19 -0
- package/dist/service/s3/serve/api/sim-s3-api-configuration-output.d.ts.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-configuration-output.js +78 -0
- package/dist/service/s3/serve/api/sim-s3-api-configuration-output.js.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-head-output.d.ts +22 -0
- package/dist/service/s3/serve/api/sim-s3-api-head-output.d.ts.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-head-output.js +39 -0
- package/dist/service/s3/serve/api/sim-s3-api-head-output.js.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-input.d.ts +57 -0
- package/dist/service/s3/serve/api/sim-s3-api-input.d.ts.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-input.js +112 -0
- package/dist/service/s3/serve/api/sim-s3-api-input.js.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-listing.d.ts +43 -0
- package/dist/service/s3/serve/api/sim-s3-api-listing.d.ts.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-listing.js +53 -0
- package/dist/service/s3/serve/api/sim-s3-api-listing.js.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-notification-read.d.ts +8 -0
- package/dist/service/s3/serve/api/sim-s3-api-notification-read.d.ts.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-notification-read.js +54 -0
- package/dist/service/s3/serve/api/sim-s3-api-notification-read.js.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-object-routes.d.ts +6 -0
- package/dist/service/s3/serve/api/sim-s3-api-object-routes.d.ts.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-object-routes.js +31 -0
- package/dist/service/s3/serve/api/sim-s3-api-object-routes.js.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-output.d.ts +10 -0
- package/dist/service/s3/serve/api/sim-s3-api-output.d.ts.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-output.js +118 -0
- package/dist/service/s3/serve/api/sim-s3-api-output.js.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-request.d.ts +32 -0
- package/dist/service/s3/serve/api/sim-s3-api-request.d.ts.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-request.js +48 -0
- package/dist/service/s3/serve/api/sim-s3-api-request.js.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-route.type.d.ts +26 -0
- package/dist/service/s3/serve/api/sim-s3-api-route.type.d.ts.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-route.type.js +2 -0
- package/dist/service/s3/serve/api/sim-s3-api-route.type.js.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-routes.d.ts +24 -0
- package/dist/service/s3/serve/api/sim-s3-api-routes.d.ts.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-routes.js +90 -0
- package/dist/service/s3/serve/api/sim-s3-api-routes.js.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-xml-read.d.ts +21 -0
- package/dist/service/s3/serve/api/sim-s3-api-xml-read.d.ts.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api-xml-read.js +64 -0
- package/dist/service/s3/serve/api/sim-s3-api-xml-read.js.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api.d.ts +29 -0
- package/dist/service/s3/serve/api/sim-s3-api.d.ts.map +1 -0
- package/dist/service/s3/serve/api/sim-s3-api.js +60 -0
- package/dist/service/s3/serve/api/sim-s3-api.js.map +1 -0
- package/dist/service/s3/serve/sim-s3-rest-error-response.d.ts +8 -0
- package/dist/service/s3/serve/sim-s3-rest-error-response.d.ts.map +1 -1
- package/dist/service/s3/serve/sim-s3-rest-error-response.js +15 -10
- package/dist/service/s3/serve/sim-s3-rest-error-response.js.map +1 -1
- package/dist/service/s3/sim-s3-operations.d.ts +55 -0
- package/dist/service/s3/sim-s3-operations.d.ts.map +1 -0
- package/dist/service/s3/sim-s3-operations.js +94 -0
- package/dist/service/s3/sim-s3-operations.js.map +1 -0
- package/dist/service/s3/sim-s3.d.ts +6 -41
- package/dist/service/s3/sim-s3.d.ts.map +1 -1
- package/dist/service/s3/sim-s3.js +11 -79
- package/dist/service/s3/sim-s3.js.map +1 -1
- package/dist/service/sts/command/assume-role/assume-role.handler.d.ts +2 -2
- package/dist/service/sts/command/assume-role/assume-role.handler.d.ts.map +1 -1
- package/dist/service/sts/command/get-caller-identity/get-caller-identity.command.d.ts +20 -0
- package/dist/service/sts/command/get-caller-identity/get-caller-identity.command.d.ts.map +1 -0
- package/dist/service/sts/command/get-caller-identity/get-caller-identity.command.js +2 -0
- package/dist/service/sts/command/get-caller-identity/get-caller-identity.command.js.map +1 -0
- package/dist/service/sts/command/get-caller-identity/get-caller-identity.handler.d.ts +37 -0
- package/dist/service/sts/command/get-caller-identity/get-caller-identity.handler.d.ts.map +1 -0
- package/dist/service/sts/command/get-caller-identity/get-caller-identity.handler.js +50 -0
- package/dist/service/sts/command/get-caller-identity/get-caller-identity.handler.js.map +1 -0
- package/dist/service/sts/command/get-caller-identity/sim-sts-caller-user-id.d.ts +15 -0
- package/dist/service/sts/command/get-caller-identity/sim-sts-caller-user-id.d.ts.map +1 -0
- package/dist/service/sts/command/get-caller-identity/sim-sts-caller-user-id.js +47 -0
- package/dist/service/sts/command/get-caller-identity/sim-sts-caller-user-id.js.map +1 -0
- package/dist/service/sts/sdk/sim-sts-sdk-command-router.d.ts.map +1 -1
- package/dist/service/sts/sdk/sim-sts-sdk-command-router.js +4 -0
- package/dist/service/sts/sdk/sim-sts-sdk-command-router.js.map +1 -1
- package/dist/service/sts/serve/sim-sts-api.d.ts +24 -0
- package/dist/service/sts/serve/sim-sts-api.d.ts.map +1 -0
- package/dist/service/sts/serve/sim-sts-api.js +56 -0
- package/dist/service/sts/serve/sim-sts-api.js.map +1 -0
- package/dist/service/sts/serve/sim-sts-query-request.d.ts +19 -0
- package/dist/service/sts/serve/sim-sts-query-request.d.ts.map +1 -0
- package/dist/service/sts/serve/sim-sts-query-request.js +27 -0
- package/dist/service/sts/serve/sim-sts-query-request.js.map +1 -0
- package/dist/service/sts/serve/sim-sts-query-response.d.ts +15 -0
- package/dist/service/sts/serve/sim-sts-query-response.d.ts.map +1 -0
- package/dist/service/sts/serve/sim-sts-query-response.js +42 -0
- package/dist/service/sts/serve/sim-sts-query-response.js.map +1 -0
- package/dist/service/sts/sim-sts.d.ts +9 -2
- package/dist/service/sts/sim-sts.d.ts.map +1 -1
- package/dist/service/sts/sim-sts.js +11 -0
- package/dist/service/sts/sim-sts.js.map +1 -1
- package/dist/util/xml/xml-document.d.ts +42 -0
- package/dist/util/xml/xml-document.d.ts.map +1 -0
- package/dist/util/xml/xml-document.js +97 -0
- package/dist/util/xml/xml-document.js.map +1 -0
- package/dist/util/xml/xml-writer.d.ts +28 -0
- package/dist/util/xml/xml-writer.d.ts.map +1 -0
- package/dist/util/xml/xml-writer.js +53 -0
- package/dist/util/xml/xml-writer.js.map +1 -0
- package/package.json +2 -2
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.d.ts +0 -27
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.d.ts.map +0 -1
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.js +0 -78
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.js.map +0 -1
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.d.ts.map +0 -1
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.js.map +0 -1
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.d.ts.map +0 -1
- 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 {
|
|
6
|
-
import {
|
|
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
|
-
*
|
|
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
|
-
|
|
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.
|
|
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 =
|
|
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
|
-
?
|
|
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":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,6BAA6B,EAAE,MAAM,mEAAmE,CAAC;AAClH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;
|
|
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":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,6BAA6B,EAAE,MAAM,mEAAmE,CAAC;AAClH,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAC;AAG9F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,6CAA6C,CAAC;AAErD,OAAO,EACL,mBAAmB,GAEpB,MAAM,wCAAwC,CAAC;AAEhD,MAAM,WAAW,GAAG,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAoBnD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,4BAA4B;IACtB,WAAW,CAAgC;IAC3C,YAAY,CAAwB;IACpC,aAAa,CAAiC;IAC9C,eAAe,GAAG,IAAI,GAAG,EAAmB,CAAC;IAE9D,YAAY,UAAkD;QAC5D,MAAM,UAAU,GAAG,IAAI,uBAAuB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAClE,IAAI,CAAC,WAAW,GAAG,IAAI,6BAA6B,CAAC;YACnD,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,EAAoB,EAAE,CACjD,UAAU,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC;YACjD,iBAAiB,EAAE,UAAU,CAAC,UAAU;SACzC,CAAC,CAAC;QACH,IAAI,CAAC,YAAY;YACf,UAAU,CAAC,YAAY,IAAI,IAAI,uBAAuB,CAAC,UAAU,CAAC,CAAC;QACrE,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC,aAAa,IAAI,iBAAiB,CAAC;IACrE,CAAC;IAED;;;OAGG;IACH,aAAa,CAAC,SAAiB;QAC7B,MAAM,WAAW,GAAG,8BAA8B,CAAC,SAAS,CAAC,CAAC;QAC9D,IAAI,CAAC,WAAW,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,CAAC;YAC/D,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACrD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,OAAO,QAAQ,CAAC;QAClB,CAAC;QAED,MAAM,WAAW,GAAG,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;QACtD,MAAM,MAAM,GAAG,WAAW;YACxB,CAAC,CAAC,uBAAuB,CAAC;gBACtB,UAAU,EAAE,WAAsC;gBAClD,QAAQ,EAAE,IAAI,CAAC,YAAY;gBAC3B,MAAM,EAAE,yBAAyB,CAAC,SAAS,CAAC;aAC7C,CAAC;YACJ,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QAClD,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAC5C,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,iBAAiB,CAAC,SAAiB;QACzC,IAAI,aAAsB,CAAC;QAC3B,IAAI,CAAC;YACH,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAChD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,sEAAsE;YACtE,qEAAqE;YACrE,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,CAAC;gBAClC,MAAM,KAAK,CAAC;YACd,CAAC;YACD,MAAM,IAAI,KAAK,CACb,kBAAkB,SAAS,oCAAoC;gBAC7D,+DAA+D;gBAC/D,kEAAkE;gBAClE,eAAe,EACjB,EAAE,KAAK,EAAE,KAAK,EAAE,CACjB,CAAC;QACJ,CAAC;QAED,IAAI,OAAO,aAAa,KAAK,QAAQ,IAAI,aAAa,KAAK,IAAI,EAAE,CAAC;YAChE,MAAM,IAAI,KAAK,CACb,kBAAkB,SAAS,yCAAyC;gBAClE,uCAAuC,CAC1C,CAAC;QACJ,CAAC;QACD,OAAO,aAAa,CAAC;IACvB,CAAC;CACF;AAED;;;;;;;GAOG;AACH,SAAS,iBAAiB,CAAC,SAAiB;IAC1C,IAAI,CAAC;QACH,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP;6EACqE;QACrE,OAAO,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAC5E,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAS,qBAAqB,CAAC,KAAc;IAC3C,OAAO,CACL,KAAK,YAAY,KAAK;QACtB,MAAM,IAAI,KAAK;QACf,CAAC,KAAK,CAAC,IAAI,KAAK,kBAAkB,IAAI,KAAK,CAAC,IAAI,KAAK,sBAAsB,CAAC,CAC7E,CAAC;AACJ,CAAC"}
|
|
@@ -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(
|
|
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;
|
|
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(
|
|
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;
|
|
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"}
|