@kensio/yulin 1.15.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/sdk/error/sim-sdk.error.d.ts +10 -0
- package/dist/sdk/error/sim-sdk.error.d.ts.map +1 -1
- package/dist/sdk/error/sim-sdk.error.js +10 -0
- package/dist/sdk/error/sim-sdk.error.js.map +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/router/resolve-sim-sdk-command-router.d.ts.map +1 -1
- package/dist/sdk/router/resolve-sim-sdk-command-router.js +5 -0
- package/dist/sdk/router/resolve-sim-sdk-command-router.js.map +1 -1
- package/dist/sdk/wire/sim-sdk-wire-command.d.ts +20 -0
- package/dist/sdk/wire/sim-sdk-wire-command.d.ts.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-command.js +31 -0
- package/dist/sdk/wire/sim-sdk-wire-command.js.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-dispatcher.d.ts +42 -0
- package/dist/sdk/wire/sim-sdk-wire-dispatcher.d.ts.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-dispatcher.js +63 -0
- package/dist/sdk/wire/sim-sdk-wire-dispatcher.js.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-json.d.ts +26 -0
- package/dist/sdk/wire/sim-sdk-wire-json.d.ts.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-json.js +59 -0
- package/dist/sdk/wire/sim-sdk-wire-json.js.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-operation.d.ts +37 -0
- package/dist/sdk/wire/sim-sdk-wire-operation.d.ts.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-operation.js +79 -0
- package/dist/sdk/wire/sim-sdk-wire-operation.js.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-response.d.ts +17 -0
- package/dist/sdk/wire/sim-sdk-wire-response.d.ts.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-response.js +67 -0
- package/dist/sdk/wire/sim-sdk-wire-response.js.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-unbridged.d.ts +17 -0
- package/dist/sdk/wire/sim-sdk-wire-unbridged.d.ts.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire-unbridged.js +25 -0
- package/dist/sdk/wire/sim-sdk-wire-unbridged.js.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire.types.d.ts +32 -0
- package/dist/sdk/wire/sim-sdk-wire.types.d.ts.map +1 -0
- package/dist/sdk/wire/sim-sdk-wire.types.js +2 -0
- package/dist/sdk/wire/sim-sdk-wire.types.js.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-endpoint-style.d.ts +33 -0
- package/dist/serve/payload-2/sim-payload-2-endpoint-style.d.ts.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-endpoint-style.js +2 -0
- package/dist/serve/payload-2/sim-payload-2-endpoint-style.js.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-event-builder.d.ts.map +1 -1
- package/dist/serve/payload-2/sim-payload-2-event-builder.js +2 -2
- package/dist/serve/payload-2/sim-payload-2-event-builder.js.map +1 -1
- package/dist/serve/payload-2/sim-payload-2-event-query.d.ts +12 -0
- package/dist/serve/payload-2/sim-payload-2-event-query.d.ts.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-event-query.js +15 -0
- package/dist/serve/payload-2/sim-payload-2-event-query.js.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-event-request.d.ts +32 -0
- package/dist/serve/payload-2/sim-payload-2-event-request.d.ts.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-event-request.js +42 -0
- package/dist/serve/payload-2/sim-payload-2-event-request.js.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-event.factory.d.ts +15 -0
- package/dist/serve/payload-2/sim-payload-2-event.factory.d.ts.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-event.factory.js +71 -0
- package/dist/serve/payload-2/sim-payload-2-event.factory.js.map +1 -0
- package/dist/serve/payload-2/sim-payload-2-request-parts.d.ts +23 -12
- package/dist/serve/payload-2/sim-payload-2-request-parts.d.ts.map +1 -1
- package/dist/serve/payload-2/sim-payload-2-request-parts.js +38 -26
- package/dist/serve/payload-2/sim-payload-2-request-parts.js.map +1 -1
- package/dist/service/apigatewayv2/factory/http-api-proxy-event.factory.d.ts +35 -0
- package/dist/service/apigatewayv2/factory/http-api-proxy-event.factory.d.ts.map +1 -0
- package/dist/service/apigatewayv2/factory/http-api-proxy-event.factory.js +65 -0
- package/dist/service/apigatewayv2/factory/http-api-proxy-event.factory.js.map +1 -0
- package/dist/service/apigatewayv2/index.d.ts +1 -0
- package/dist/service/apigatewayv2/index.d.ts.map +1 -1
- package/dist/service/apigatewayv2/index.js +1 -0
- package/dist/service/apigatewayv2/index.js.map +1 -1
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.d.ts +10 -36
- 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 +16 -63
- package/dist/service/aws/factory/sim-aws-account-region-service-builder.js.map +1 -1
- package/dist/service/aws/factory/sim-aws-cloudwatch-collaborators.d.ts +22 -0
- package/dist/service/aws/factory/sim-aws-cloudwatch-collaborators.d.ts.map +1 -0
- package/dist/service/aws/factory/sim-aws-cloudwatch-collaborators.js +20 -0
- package/dist/service/aws/factory/sim-aws-cloudwatch-collaborators.js.map +1 -0
- package/dist/service/aws/factory/sim-aws-registered-service-builder.d.ts +71 -0
- package/dist/service/aws/factory/sim-aws-registered-service-builder.d.ts.map +1 -0
- package/dist/service/aws/factory/sim-aws-registered-service-builder.js +96 -0
- package/dist/service/aws/factory/sim-aws-registered-service-builder.js.map +1 -0
- package/dist/service/aws/factory/sim-aws-self-contained-service-builder.d.ts +9 -0
- package/dist/service/aws/factory/sim-aws-self-contained-service-builder.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-self-contained-service-builder.js +11 -0
- package/dist/service/aws/factory/sim-aws-self-contained-service-builder.js.map +1 -1
- package/dist/service/aws/factory/sim-aws-service-factory.d.ts +7 -0
- package/dist/service/aws/factory/sim-aws-service-factory.d.ts.map +1 -1
- package/dist/service/aws/factory/sim-aws-service-factory.js +19 -5
- package/dist/service/aws/factory/sim-aws-service-factory.js.map +1 -1
- package/dist/service/aws/sim-aws-account-region-scope.d.ts +6 -0
- package/dist/service/aws/sim-aws-account-region-scope.d.ts.map +1 -1
- package/dist/service/aws/sim-aws-account-region-scope.js +8 -0
- package/dist/service/aws/sim-aws-account-region-scope.js.map +1 -1
- package/dist/service/aws/sim-aws-service-accessors.d.ts +6 -0
- package/dist/service/aws/sim-aws-service-accessors.d.ts.map +1 -1
- package/dist/service/aws/sim-aws-service-accessors.js +8 -0
- package/dist/service/aws/sim-aws-service-accessors.js.map +1 -1
- package/dist/service/cloudformation/resource/cfn/cloudwatch/sim-cloudwatch-alarm-cfn.d.ts +26 -0
- package/dist/service/cloudformation/resource/cfn/cloudwatch/sim-cloudwatch-alarm-cfn.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/cloudwatch/sim-cloudwatch-alarm-cfn.js +28 -0
- package/dist/service/cloudformation/resource/cfn/cloudwatch/sim-cloudwatch-alarm-cfn.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/cloudwatch/sim-cloudwatch-cfn-value-adapter.d.ts +6 -0
- package/dist/service/cloudformation/resource/cfn/cloudwatch/sim-cloudwatch-cfn-value-adapter.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/cloudwatch/sim-cloudwatch-cfn-value-adapter.js +13 -0
- package/dist/service/cloudformation/resource/cfn/cloudwatch/sim-cloudwatch-cfn-value-adapter.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-cfn-value-adapter.d.ts +6 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-cfn-value-adapter.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-cfn-value-adapter.js +19 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-cfn-value-adapter.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-dkim-tokens.d.ts +27 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-dkim-tokens.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-dkim-tokens.js +46 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-dkim-tokens.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-identity-cfn.d.ts +33 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-identity-cfn.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-identity-cfn.js +48 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-identity-cfn.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-template-cfn.d.ts +27 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-template-cfn.d.ts.map +1 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-template-cfn.js +29 -0
- package/dist/service/cloudformation/resource/cfn/ses/sim-ses-template-cfn.js.map +1 -0
- package/dist/service/cloudformation/resource/cfn/sim-cfn-service-value-adapters.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/cfn/sim-cfn-service-value-adapters.js +4 -0
- package/dist/service/cloudformation/resource/cfn/sim-cfn-service-value-adapters.js.map +1 -1
- package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-factories.d.ts.map +1 -1
- package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-factories.js +8 -0
- package/dist/service/cloudformation/resource/resolve/service/sim-cfn-service-factories.js.map +1 -1
- package/dist/service/cloudwatch/alarm/action/sim-aws-cloudwatch-alarm-topics.d.ts +34 -0
- package/dist/service/cloudwatch/alarm/action/sim-aws-cloudwatch-alarm-topics.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-aws-cloudwatch-alarm-topics.js +51 -0
- package/dist/service/cloudwatch/alarm/action/sim-aws-cloudwatch-alarm-topics.js.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-action-failures.d.ts +54 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-action-failures.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-action-failures.js +70 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-action-failures.js.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-actions.d.ts +30 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-actions.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-actions.js +58 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-actions.js.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-notification.d.ts +26 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-notification.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-notification.js +56 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-notification.js.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-targets.d.ts +37 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-targets.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-targets.js +19 -0
- package/dist/service/cloudwatch/alarm/action/sim-cloudwatch-alarm-targets.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-arn.d.ts +10 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-arn.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-arn.js +11 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-arn.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-definition.d.ts +33 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-definition.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-definition.js +2 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-definition.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-evaluation.d.ts +32 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-evaluation.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-evaluation.js +75 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-evaluation.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-history.d.ts +26 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-history.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-history.js +16 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-history.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-periods.d.ts +23 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-periods.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-periods.js +37 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-periods.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-schedule.d.ts +55 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-schedule.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-schedule.js +84 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-schedule.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-state.d.ts +18 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-state.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-state.js +29 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-state.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-store.d.ts +24 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-store.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-store.js +33 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm-store.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm.d.ts +57 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm.js +84 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-alarm.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-comparison.d.ts +19 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-comparison.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-comparison.js +48 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-comparison.js.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-missing-data.d.ts +16 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-missing-data.d.ts.map +1 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-missing-data.js +31 -0
- package/dist/service/cloudwatch/alarm/sim-cloudwatch-missing-data.js.map +1 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-creator.d.ts +33 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-creator.d.ts.map +1 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-creator.js +41 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-creator.js.map +1 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-properties.d.ts +39 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-properties.d.ts.map +1 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-properties.js +80 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-properties.js.map +1 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-property-rules.d.ts +20 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-property-rules.d.ts.map +1 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-property-rules.js +80 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-property-rules.js.map +1 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-values.d.ts +56 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-values.d.ts.map +1 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-values.js +107 -0
- package/dist/service/cloudwatch/cfn/alarm/sim-cfn-alarm-values.js.map +1 -0
- package/dist/service/cloudwatch/cfn/sim-cloudwatch-cfn-resource-factory.d.ts +29 -0
- package/dist/service/cloudwatch/cfn/sim-cloudwatch-cfn-resource-factory.d.ts.map +1 -0
- package/dist/service/cloudwatch/cfn/sim-cloudwatch-cfn-resource-factory.js +43 -0
- package/dist/service/cloudwatch/cfn/sim-cloudwatch-cfn-resource-factory.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/alarm.command.d.ts +155 -0
- package/dist/service/cloudwatch/command/alarm/alarm.command.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/alarm.command.js +2 -0
- package/dist/service/cloudwatch/command/alarm/alarm.command.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-action-input.d.ts +19 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-action-input.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-action-input.js +56 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-action-input.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-context.d.ts +22 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-context.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-context.js +2 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-context.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-detail.d.ts +15 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-detail.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-detail.js +61 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-detail.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-input.d.ts +7 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-input.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-input.js +39 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-input.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-numbers.d.ts +20 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-numbers.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-numbers.js +52 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-numbers.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-reads.d.ts +25 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-reads.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-reads.js +60 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-reads.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-selection.d.ts +12 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-selection.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-selection.js +59 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-selection.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-writes.d.ts +23 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-writes.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-writes.js +63 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-alarm-writes.js.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-set-alarm-state.d.ts +19 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-set-alarm-state.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-set-alarm-state.js +47 -0
- package/dist/service/cloudwatch/command/alarm/sim-cloudwatch-set-alarm-state.js.map +1 -0
- package/dist/service/cloudwatch/command/authorize/sim-cloudwatch-authorizer.d.ts +41 -0
- package/dist/service/cloudwatch/command/authorize/sim-cloudwatch-authorizer.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/authorize/sim-cloudwatch-authorizer.js +65 -0
- package/dist/service/cloudwatch/command/authorize/sim-cloudwatch-authorizer.js.map +1 -0
- package/dist/service/cloudwatch/command/authorize/sim-cloudwatch-decide.d.ts +23 -0
- package/dist/service/cloudwatch/command/authorize/sim-cloudwatch-decide.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/authorize/sim-cloudwatch-decide.js +30 -0
- package/dist/service/cloudwatch/command/authorize/sim-cloudwatch-decide.js.map +1 -0
- package/dist/service/cloudwatch/command/data/data.command.d.ts +42 -0
- package/dist/service/cloudwatch/command/data/data.command.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/data/data.command.js +2 -0
- package/dist/service/cloudwatch/command/data/data.command.js.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-metric-datum.d.ts +11 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-metric-datum.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-metric-datum.js +66 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-metric-datum.js.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-metric-value.d.ts +14 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-metric-value.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-metric-value.js +58 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-metric-value.js.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-observation.d.ts +15 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-observation.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-observation.js +34 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-observation.js.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-put-metric-data.d.ts +28 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-put-metric-data.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-put-metric-data.js +66 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-put-metric-data.js.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-weighted-values.d.ts +9 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-weighted-values.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-weighted-values.js +22 -0
- package/dist/service/cloudwatch/command/data/sim-cloudwatch-weighted-values.js.map +1 -0
- package/dist/service/cloudwatch/command/query/query.command.d.ts +133 -0
- package/dist/service/cloudwatch/command/query/query.command.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/query.command.js +2 -0
- package/dist/service/cloudwatch/command/query/query.command.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-get-metric-data.d.ts +25 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-get-metric-data.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-get-metric-data.js +46 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-get-metric-data.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-get-metric-statistics.d.ts +25 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-get-metric-statistics.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-get-metric-statistics.js +55 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-get-metric-statistics.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-list-metrics.d.ts +23 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-list-metrics.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-list-metrics.js +46 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-list-metrics.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-query.d.ts +25 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-query.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-query.js +63 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-query.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-request.d.ts +26 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-request.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-request.js +61 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-request.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-result.d.ts +20 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-result.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-result.js +36 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-data-result.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-filter.d.ts +12 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-filter.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-filter.js +27 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-filter.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-listing.d.ts +20 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-listing.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-listing.js +52 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-metric-listing.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-requested-statistics.d.ts +10 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-requested-statistics.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-requested-statistics.js +20 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-requested-statistics.js.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-statistic-datapoints.d.ts +17 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-statistic-datapoints.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-statistic-datapoints.js +45 -0
- package/dist/service/cloudwatch/command/query/sim-cloudwatch-statistic-datapoints.js.map +1 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-command.types.d.ts +7 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-command.types.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-command.types.js +2 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-command.types.js.map +1 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-page.d.ts +24 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-page.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-page.js +36 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-page.js.map +1 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-request-options.d.ts +21 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-request-options.d.ts.map +1 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-request-options.js +10 -0
- package/dist/service/cloudwatch/command/sim-cloudwatch-request-options.js.map +1 -0
- package/dist/service/cloudwatch/error/sim-cloudwatch.error.d.ts +48 -0
- package/dist/service/cloudwatch/error/sim-cloudwatch.error.d.ts.map +1 -0
- package/dist/service/cloudwatch/error/sim-cloudwatch.error.js +51 -0
- package/dist/service/cloudwatch/error/sim-cloudwatch.error.js.map +1 -0
- package/dist/service/cloudwatch/index.d.ts +26 -0
- package/dist/service/cloudwatch/index.d.ts.map +1 -0
- package/dist/service/cloudwatch/index.js +25 -0
- package/dist/service/cloudwatch/index.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-datapoint.d.ts +54 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-datapoint.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-datapoint.js +29 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-datapoint.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-dimension.d.ts +37 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-dimension.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-dimension.js +42 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-dimension.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-metric-store.d.ts +46 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-metric-store.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-metric-store.js +61 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-metric-store.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-metric.d.ts +53 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-metric.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-metric.js +45 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-metric.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-name.d.ts +22 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-name.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-name.js +54 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-name.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-namespace.d.ts +22 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-namespace.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-namespace.js +34 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-namespace.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-period.d.ts +32 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-period.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-period.js +70 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-period.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-statistic.d.ts +20 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-statistic.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-statistic.js +51 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-statistic.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-time-range.d.ts +16 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-time-range.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-time-range.js +25 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-time-range.js.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-unit.d.ts +18 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-unit.d.ts.map +1 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-unit.js +56 -0
- package/dist/service/cloudwatch/metric/sim-cloudwatch-unit.js.map +1 -0
- package/dist/service/cloudwatch/sdk/sim-cloudwatch-sdk-command-router.d.ts +18 -0
- package/dist/service/cloudwatch/sdk/sim-cloudwatch-sdk-command-router.d.ts.map +1 -0
- package/dist/service/cloudwatch/sdk/sim-cloudwatch-sdk-command-router.js +60 -0
- package/dist/service/cloudwatch/sdk/sim-cloudwatch-sdk-command-router.js.map +1 -0
- package/dist/service/cloudwatch/sim-cloudwatch-commands.d.ts +47 -0
- package/dist/service/cloudwatch/sim-cloudwatch-commands.d.ts.map +1 -0
- package/dist/service/cloudwatch/sim-cloudwatch-commands.js +86 -0
- package/dist/service/cloudwatch/sim-cloudwatch-commands.js.map +1 -0
- package/dist/service/cloudwatch/sim-cloudwatch.d.ts +98 -0
- package/dist/service/cloudwatch/sim-cloudwatch.d.ts.map +1 -0
- package/dist/service/cloudwatch/sim-cloudwatch.js +138 -0
- package/dist/service/cloudwatch/sim-cloudwatch.js.map +1 -0
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-account-recovery.d.ts +32 -0
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-account-recovery.d.ts.map +1 -0
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-account-recovery.js +61 -0
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-account-recovery.js.map +1 -0
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-user-pool-properties.d.ts +2 -3
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-user-pool-properties.d.ts.map +1 -1
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-user-pool-properties.js +23 -9
- package/dist/service/cognito/cfn/user-pool/sim-cfn-cognito-user-pool-properties.js.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-sign-in-value-check.d.ts +30 -0
- package/dist/service/cognito/command/user/sim-cognito-sign-in-value-check.d.ts.map +1 -0
- package/dist/service/cognito/command/user/sim-cognito-sign-in-value-check.js +47 -0
- package/dist/service/cognito/command/user/sim-cognito-sign-in-value-check.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 +8 -4
- package/dist/service/cognito/command/user/sim-cognito-sign-up-commands.js.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-user-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-user-commands.js +7 -3
- package/dist/service/cognito/command/user/sim-cognito-user-commands.js.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-user-update-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/user/sim-cognito-user-update-commands.js +3 -1
- package/dist/service/cognito/command/user/sim-cognito-user-update-commands.js.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-features.d.ts +3 -4
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-features.d.ts.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-features.js +3 -22
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-features.js.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-identity.d.ts +9 -16
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-identity.d.ts.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-identity.js +9 -26
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-identity.js.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-updates.d.ts +12 -3
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-updates.d.ts.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-updates.js +19 -3
- package/dist/service/cognito/command/user-pool/sim-cognito-unsimulated-pool-updates.js.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-commands.d.ts.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-commands.js +5 -4
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-commands.js.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-view.d.ts +6 -2
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-view.d.ts.map +1 -1
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-view.js +8 -3
- package/dist/service/cognito/command/user-pool/sim-cognito-user-pool-view.js.map +1 -1
- package/dist/service/cognito/command/user-pool/user-pool.command.d.ts +10 -8
- package/dist/service/cognito/command/user-pool/user-pool.command.d.ts.map +1 -1
- package/dist/service/cognito/error/sim-cognito.error.d.ts +10 -0
- package/dist/service/cognito/error/sim-cognito.error.d.ts.map +1 -1
- package/dist/service/cognito/error/sim-cognito.error.js +12 -0
- package/dist/service/cognito/error/sim-cognito.error.js.map +1 -1
- package/dist/service/cognito/index.d.ts +1 -1
- package/dist/service/cognito/index.d.ts.map +1 -1
- package/dist/service/cognito/index.js +1 -1
- package/dist/service/cognito/index.js.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-account-recovery.d.ts +86 -0
- package/dist/service/cognito/user-pool/sim-cognito-account-recovery.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-account-recovery.js +127 -0
- package/dist/service/cognito/user-pool/sim-cognito-account-recovery.js.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-sign-in-attribute.d.ts +22 -0
- package/dist/service/cognito/user-pool/sim-cognito-sign-in-attribute.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-sign-in-attribute.js +52 -0
- package/dist/service/cognito/user-pool/sim-cognito-sign-in-attribute.js.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-settings.d.ts +34 -15
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-settings.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-settings.js +30 -15
- package/dist/service/cognito/user-pool/sim-cognito-user-pool-settings.js.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool.js +2 -1
- package/dist/service/cognito/user-pool/sim-cognito-user-pool.js.map +1 -1
- package/dist/service/cognito/user-pool/sim-cognito-username-attributes.d.ts +87 -0
- package/dist/service/cognito/user-pool/sim-cognito-username-attributes.d.ts.map +1 -0
- package/dist/service/cognito/user-pool/sim-cognito-username-attributes.js +137 -0
- package/dist/service/cognito/user-pool/sim-cognito-username-attributes.js.map +1 -0
- package/dist/service/cognito/user-pool/user/sim-cognito-user-store.d.ts +25 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-store.d.ts.map +1 -1
- package/dist/service/cognito/user-pool/user/sim-cognito-user-store.js +39 -2
- package/dist/service/cognito/user-pool/user/sim-cognito-user-store.js.map +1 -1
- package/dist/service/lambda/factory/lambda-dynamodb-stream-event.factory.d.ts +47 -0
- package/dist/service/lambda/factory/lambda-dynamodb-stream-event.factory.d.ts.map +1 -0
- package/dist/service/lambda/factory/lambda-dynamodb-stream-event.factory.js +96 -0
- package/dist/service/lambda/factory/lambda-dynamodb-stream-event.factory.js.map +1 -0
- package/dist/service/lambda/factory/lambda-dynamodb-stream-record-change.d.ts +36 -0
- package/dist/service/lambda/factory/lambda-dynamodb-stream-record-change.d.ts.map +1 -0
- package/dist/service/lambda/factory/lambda-dynamodb-stream-record-change.js +64 -0
- package/dist/service/lambda/factory/lambda-dynamodb-stream-record-change.js.map +1 -0
- package/dist/service/lambda/factory/lambda-function-url-event.factory.d.ts +37 -0
- package/dist/service/lambda/factory/lambda-function-url-event.factory.d.ts.map +1 -0
- package/dist/service/lambda/factory/lambda-function-url-event.factory.js +55 -0
- package/dist/service/lambda/factory/lambda-function-url-event.factory.js.map +1 -0
- package/dist/service/lambda/factory/lambda-sqs-event.factory.d.ts +37 -0
- package/dist/service/lambda/factory/lambda-sqs-event.factory.d.ts.map +1 -0
- package/dist/service/lambda/factory/lambda-sqs-event.factory.js +78 -0
- package/dist/service/lambda/factory/lambda-sqs-event.factory.js.map +1 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.d.ts +27 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.d.ts.map +1 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.js +78 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.js.map +1 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.d.ts +23 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.d.ts.map +1 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.js +111 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.js.map +1 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.d.ts +37 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.d.ts.map +1 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.js +78 -0
- package/dist/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.js.map +1 -0
- package/dist/service/lambda/function/code/vm/sdk/sim-lambda-vm-sdk-module-provider.d.ts +5 -3
- package/dist/service/lambda/function/code/vm/sdk/sim-lambda-vm-sdk-module-provider.d.ts.map +1 -1
- package/dist/service/lambda/function/code/vm/sdk/sim-lambda-vm-sdk-module-provider.js.map +1 -1
- package/dist/service/lambda/function/code/vm/sdk/sim-sdk-lambda-vm-module-provider.d.ts +10 -2
- 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 +21 -6
- 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-module.types.d.ts +12 -0
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-module.types.d.ts.map +1 -0
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-module.types.js +2 -0
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-module.types.js.map +1 -0
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-modules.d.ts.map +1 -1
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-modules.js +5 -1
- package/dist/service/lambda/function/code/vm/sim-lambda-vm-modules.js.map +1 -1
- package/dist/service/lambda/function/environment/sim-lambda-environment.d.ts.map +1 -1
- package/dist/service/lambda/function/environment/sim-lambda-environment.js +2 -0
- package/dist/service/lambda/function/environment/sim-lambda-environment.js.map +1 -1
- package/dist/service/lambda/function/environment/sim-lambda-execution-credentials.d.ts +19 -0
- package/dist/service/lambda/function/environment/sim-lambda-execution-credentials.d.ts.map +1 -0
- package/dist/service/lambda/function/environment/sim-lambda-execution-credentials.js +20 -0
- package/dist/service/lambda/function/environment/sim-lambda-execution-credentials.js.map +1 -0
- package/dist/service/lambda/index.d.ts +3 -0
- package/dist/service/lambda/index.d.ts.map +1 -1
- package/dist/service/lambda/index.js +3 -0
- package/dist/service/lambda/index.js.map +1 -1
- package/dist/service/s3/factory/s3-notification-event-object.d.ts +10 -0
- package/dist/service/s3/factory/s3-notification-event-object.d.ts.map +1 -0
- package/dist/service/s3/factory/s3-notification-event-object.js +12 -0
- package/dist/service/s3/factory/s3-notification-event-object.js.map +1 -0
- package/dist/service/s3/factory/s3-notification-event.factory.d.ts +45 -0
- package/dist/service/s3/factory/s3-notification-event.factory.d.ts.map +1 -0
- package/dist/service/s3/factory/s3-notification-event.factory.js +102 -0
- package/dist/service/s3/factory/s3-notification-event.factory.js.map +1 -0
- package/dist/service/s3/index.d.ts +2 -0
- package/dist/service/s3/index.d.ts.map +1 -1
- package/dist/service/s3/index.js +1 -0
- package/dist/service/s3/index.js.map +1 -1
- package/dist/service/s3/notification/event/sim-s3-event-records.d.ts +32 -1
- package/dist/service/s3/notification/event/sim-s3-event-records.d.ts.map +1 -1
- package/dist/service/s3/notification/event/sim-s3-event-records.js +5 -5
- package/dist/service/s3/notification/event/sim-s3-event-records.js.map +1 -1
- package/dist/service/s3/notification/event/sim-s3-event.type.d.ts +83 -0
- package/dist/service/s3/notification/event/sim-s3-event.type.d.ts.map +1 -0
- package/dist/service/s3/notification/event/sim-s3-event.type.js +2 -0
- package/dist/service/s3/notification/event/sim-s3-event.type.js.map +1 -0
- package/dist/service/ses/account/sim-ses-account.d.ts +59 -0
- package/dist/service/ses/account/sim-ses-account.d.ts.map +1 -0
- package/dist/service/ses/account/sim-ses-account.js +66 -0
- package/dist/service/ses/account/sim-ses-account.js.map +1 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-creator.d.ts +35 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-creator.d.ts.map +1 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-creator.js +52 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-creator.js.map +1 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-properties.d.ts +37 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-properties.d.ts.map +1 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-properties.js +61 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-properties.js.map +1 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-unsimulated-properties.d.ts +17 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-unsimulated-properties.d.ts.map +1 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-unsimulated-properties.js +48 -0
- package/dist/service/ses/cfn/identity/sim-cfn-ses-identity-unsimulated-properties.js.map +1 -0
- package/dist/service/ses/cfn/sim-cfn-ses-resource-error.d.ts +24 -0
- package/dist/service/ses/cfn/sim-cfn-ses-resource-error.d.ts.map +1 -0
- package/dist/service/ses/cfn/sim-cfn-ses-resource-error.js +39 -0
- package/dist/service/ses/cfn/sim-cfn-ses-resource-error.js.map +1 -0
- package/dist/service/ses/cfn/sim-cfn-ses-resource-types.d.ts +13 -0
- package/dist/service/ses/cfn/sim-cfn-ses-resource-types.d.ts.map +1 -0
- package/dist/service/ses/cfn/sim-cfn-ses-resource-types.js +13 -0
- package/dist/service/ses/cfn/sim-cfn-ses-resource-types.js.map +1 -0
- package/dist/service/ses/cfn/sim-ses-cfn-resource-factory.d.ts +28 -0
- package/dist/service/ses/cfn/sim-ses-cfn-resource-factory.d.ts.map +1 -0
- package/dist/service/ses/cfn/sim-ses-cfn-resource-factory.js +69 -0
- package/dist/service/ses/cfn/sim-ses-cfn-resource-factory.js.map +1 -0
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-creator.d.ts +30 -0
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-creator.d.ts.map +1 -0
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-creator.js +48 -0
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-creator.js.map +1 -0
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-properties.d.ts +58 -0
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-properties.d.ts.map +1 -0
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-properties.js +121 -0
- package/dist/service/ses/cfn/template/sim-cfn-ses-template-properties.js.map +1 -0
- package/dist/service/ses/command/account/account.command.d.ts +59 -0
- package/dist/service/ses/command/account/account.command.d.ts.map +1 -0
- package/dist/service/ses/command/account/account.command.js +2 -0
- package/dist/service/ses/command/account/account.command.js.map +1 -0
- package/dist/service/ses/command/account/sim-ses-account-commands.d.ts +34 -0
- package/dist/service/ses/command/account/sim-ses-account-commands.d.ts.map +1 -0
- package/dist/service/ses/command/account/sim-ses-account-commands.js +41 -0
- package/dist/service/ses/command/account/sim-ses-account-commands.js.map +1 -0
- package/dist/service/ses/command/account/sim-ses-account-details-input.d.ts +11 -0
- package/dist/service/ses/command/account/sim-ses-account-details-input.d.ts.map +1 -0
- package/dist/service/ses/command/account/sim-ses-account-details-input.js +50 -0
- package/dist/service/ses/command/account/sim-ses-account-details-input.js.map +1 -0
- package/dist/service/ses/command/account/sim-ses-account-report.d.ts +21 -0
- package/dist/service/ses/command/account/sim-ses-account-report.d.ts.map +1 -0
- package/dist/service/ses/command/account/sim-ses-account-report.js +45 -0
- package/dist/service/ses/command/account/sim-ses-account-report.js.map +1 -0
- package/dist/service/ses/command/authorize/sim-ses-authorizer.d.ts +55 -0
- package/dist/service/ses/command/authorize/sim-ses-authorizer.d.ts.map +1 -0
- package/dist/service/ses/command/authorize/sim-ses-authorizer.js +78 -0
- package/dist/service/ses/command/authorize/sim-ses-authorizer.js.map +1 -0
- package/dist/service/ses/command/identity/identity.command.d.ts +84 -0
- package/dist/service/ses/command/identity/identity.command.d.ts.map +1 -0
- package/dist/service/ses/command/identity/identity.command.js +2 -0
- package/dist/service/ses/command/identity/identity.command.js.map +1 -0
- package/dist/service/ses/command/identity/sim-ses-identity-commands.d.ts +44 -0
- package/dist/service/ses/command/identity/sim-ses-identity-commands.d.ts.map +1 -0
- package/dist/service/ses/command/identity/sim-ses-identity-commands.js +92 -0
- package/dist/service/ses/command/identity/sim-ses-identity-commands.js.map +1 -0
- package/dist/service/ses/command/identity/sim-ses-unsimulated-identity-input.d.ts +12 -0
- package/dist/service/ses/command/identity/sim-ses-unsimulated-identity-input.d.ts.map +1 -0
- package/dist/service/ses/command/identity/sim-ses-unsimulated-identity-input.js +26 -0
- package/dist/service/ses/command/identity/sim-ses-unsimulated-identity-input.js.map +1 -0
- package/dist/service/ses/command/send/send.command.d.ts +71 -0
- package/dist/service/ses/command/send/send.command.d.ts.map +1 -0
- package/dist/service/ses/command/send/send.command.js +2 -0
- package/dist/service/ses/command/send/send.command.js.map +1 -0
- package/dist/service/ses/command/send/sim-ses-content.d.ts +24 -0
- package/dist/service/ses/command/send/sim-ses-content.d.ts.map +1 -0
- package/dist/service/ses/command/send/sim-ses-content.js +40 -0
- package/dist/service/ses/command/send/sim-ses-content.js.map +1 -0
- package/dist/service/ses/command/send/sim-ses-read-content.d.ts +19 -0
- package/dist/service/ses/command/send/sim-ses-read-content.d.ts.map +1 -0
- package/dist/service/ses/command/send/sim-ses-read-content.js +2 -0
- package/dist/service/ses/command/send/sim-ses-read-content.js.map +1 -0
- package/dist/service/ses/command/send/sim-ses-send-email.d.ts +36 -0
- package/dist/service/ses/command/send/sim-ses-send-email.d.ts.map +1 -0
- package/dist/service/ses/command/send/sim-ses-send-email.js +80 -0
- package/dist/service/ses/command/send/sim-ses-send-email.js.map +1 -0
- package/dist/service/ses/command/send/sim-ses-simple-content.d.ts +12 -0
- package/dist/service/ses/command/send/sim-ses-simple-content.d.ts.map +1 -0
- package/dist/service/ses/command/send/sim-ses-simple-content.js +33 -0
- package/dist/service/ses/command/send/sim-ses-simple-content.js.map +1 -0
- package/dist/service/ses/command/send/sim-ses-template-send.d.ts +34 -0
- package/dist/service/ses/command/send/sim-ses-template-send.d.ts.map +1 -0
- package/dist/service/ses/command/send/sim-ses-template-send.js +101 -0
- package/dist/service/ses/command/send/sim-ses-template-send.js.map +1 -0
- package/dist/service/ses/command/send/sim-ses-unsimulated-send-input.d.ts +12 -0
- package/dist/service/ses/command/send/sim-ses-unsimulated-send-input.d.ts.map +1 -0
- package/dist/service/ses/command/send/sim-ses-unsimulated-send-input.js +26 -0
- package/dist/service/ses/command/send/sim-ses-unsimulated-send-input.js.map +1 -0
- package/dist/service/ses/command/send/sim-ses-verified-identities.d.ts +36 -0
- package/dist/service/ses/command/send/sim-ses-verified-identities.d.ts.map +1 -0
- package/dist/service/ses/command/send/sim-ses-verified-identities.js +50 -0
- package/dist/service/ses/command/send/sim-ses-verified-identities.js.map +1 -0
- package/dist/service/ses/command/sim-ses-command.types.d.ts +8 -0
- package/dist/service/ses/command/sim-ses-command.types.d.ts.map +1 -0
- package/dist/service/ses/command/sim-ses-command.types.js +2 -0
- package/dist/service/ses/command/sim-ses-command.types.js.map +1 -0
- package/dist/service/ses/command/sim-ses-page.d.ts +20 -0
- package/dist/service/ses/command/sim-ses-page.d.ts.map +1 -0
- package/dist/service/ses/command/sim-ses-page.js +49 -0
- package/dist/service/ses/command/sim-ses-page.js.map +1 -0
- package/dist/service/ses/command/sim-ses-request-options.d.ts +12 -0
- package/dist/service/ses/command/sim-ses-request-options.d.ts.map +1 -0
- package/dist/service/ses/command/sim-ses-request-options.js +2 -0
- package/dist/service/ses/command/sim-ses-request-options.js.map +1 -0
- package/dist/service/ses/command/template/sim-ses-template-commands.d.ts +56 -0
- package/dist/service/ses/command/template/sim-ses-template-commands.d.ts.map +1 -0
- package/dist/service/ses/command/template/sim-ses-template-commands.js +96 -0
- package/dist/service/ses/command/template/sim-ses-template-commands.js.map +1 -0
- package/dist/service/ses/command/template/sim-ses-template-reporting.d.ts +14 -0
- package/dist/service/ses/command/template/sim-ses-template-reporting.d.ts.map +1 -0
- package/dist/service/ses/command/template/sim-ses-template-reporting.js +23 -0
- package/dist/service/ses/command/template/sim-ses-template-reporting.js.map +1 -0
- package/dist/service/ses/command/template/template.command.d.ts +98 -0
- package/dist/service/ses/command/template/template.command.d.ts.map +1 -0
- package/dist/service/ses/command/template/template.command.js +2 -0
- package/dist/service/ses/command/template/template.command.js.map +1 -0
- package/dist/service/ses/email/sim-ses-address.d.ts +15 -0
- package/dist/service/ses/email/sim-ses-address.d.ts.map +1 -0
- package/dist/service/ses/email/sim-ses-address.js +29 -0
- package/dist/service/ses/email/sim-ses-address.js.map +1 -0
- package/dist/service/ses/email/sim-ses-sent-email-store.d.ts +33 -0
- package/dist/service/ses/email/sim-ses-sent-email-store.d.ts.map +1 -0
- package/dist/service/ses/email/sim-ses-sent-email-store.js +42 -0
- package/dist/service/ses/email/sim-ses-sent-email-store.js.map +1 -0
- package/dist/service/ses/email/sim-ses-sent-email.d.ts +78 -0
- package/dist/service/ses/email/sim-ses-sent-email.d.ts.map +1 -0
- package/dist/service/ses/email/sim-ses-sent-email.js +61 -0
- package/dist/service/ses/email/sim-ses-sent-email.js.map +1 -0
- package/dist/service/ses/error/sim-ses.error.d.ts +70 -0
- package/dist/service/ses/error/sim-ses.error.d.ts.map +1 -0
- package/dist/service/ses/error/sim-ses.error.js +77 -0
- package/dist/service/ses/error/sim-ses.error.js.map +1 -0
- package/dist/service/ses/identity/sim-ses-identity-name.d.ts +34 -0
- package/dist/service/ses/identity/sim-ses-identity-name.d.ts.map +1 -0
- package/dist/service/ses/identity/sim-ses-identity-name.js +90 -0
- package/dist/service/ses/identity/sim-ses-identity-name.js.map +1 -0
- package/dist/service/ses/identity/sim-ses-identity-store.d.ts +62 -0
- package/dist/service/ses/identity/sim-ses-identity-store.d.ts.map +1 -0
- package/dist/service/ses/identity/sim-ses-identity-store.js +93 -0
- package/dist/service/ses/identity/sim-ses-identity-store.js.map +1 -0
- package/dist/service/ses/identity/sim-ses-identity.d.ts +63 -0
- package/dist/service/ses/identity/sim-ses-identity.d.ts.map +1 -0
- package/dist/service/ses/identity/sim-ses-identity.js +62 -0
- package/dist/service/ses/identity/sim-ses-identity.js.map +1 -0
- package/dist/service/ses/index.d.ts +13 -0
- package/dist/service/ses/index.d.ts.map +1 -0
- package/dist/service/ses/index.js +11 -0
- package/dist/service/ses/index.js.map +1 -0
- package/dist/service/ses/sdk/sim-ses-sdk-command-router.d.ts +18 -0
- package/dist/service/ses/sdk/sim-ses-sdk-command-router.d.ts.map +1 -0
- package/dist/service/ses/sdk/sim-ses-sdk-command-router.js +72 -0
- package/dist/service/ses/sdk/sim-ses-sdk-command-router.js.map +1 -0
- package/dist/service/ses/sim-ses-arn.d.ts +20 -0
- package/dist/service/ses/sim-ses-arn.d.ts.map +1 -0
- package/dist/service/ses/sim-ses-arn.js +25 -0
- package/dist/service/ses/sim-ses-arn.js.map +1 -0
- package/dist/service/ses/sim-ses-commands.d.ts +37 -0
- package/dist/service/ses/sim-ses-commands.d.ts.map +1 -0
- package/dist/service/ses/sim-ses-commands.js +75 -0
- package/dist/service/ses/sim-ses-commands.js.map +1 -0
- package/dist/service/ses/sim-ses-v2.d.ts +139 -0
- package/dist/service/ses/sim-ses-v2.d.ts.map +1 -0
- package/dist/service/ses/sim-ses-v2.js +195 -0
- package/dist/service/ses/sim-ses-v2.js.map +1 -0
- package/dist/service/ses/template/sim-ses-render.d.ts +16 -0
- package/dist/service/ses/template/sim-ses-render.d.ts.map +1 -0
- package/dist/service/ses/template/sim-ses-render.js +88 -0
- package/dist/service/ses/template/sim-ses-render.js.map +1 -0
- package/dist/service/ses/template/sim-ses-template-content.d.ts +28 -0
- package/dist/service/ses/template/sim-ses-template-content.d.ts.map +1 -0
- package/dist/service/ses/template/sim-ses-template-content.js +67 -0
- package/dist/service/ses/template/sim-ses-template-content.js.map +1 -0
- package/dist/service/ses/template/sim-ses-template-store.d.ts +47 -0
- package/dist/service/ses/template/sim-ses-template-store.d.ts.map +1 -0
- package/dist/service/ses/template/sim-ses-template-store.js +81 -0
- package/dist/service/ses/template/sim-ses-template-store.js.map +1 -0
- package/dist/service/ses/template/sim-ses-template.d.ts +38 -0
- package/dist/service/ses/template/sim-ses-template.d.ts.map +1 -0
- package/dist/service/ses/template/sim-ses-template.js +39 -0
- package/dist/service/ses/template/sim-ses-template.js.map +1 -0
- package/dist/service/sqs/message/sim-sqs-message-body.d.ts +10 -5
- package/dist/service/sqs/message/sim-sqs-message-body.d.ts.map +1 -1
- package/dist/service/sqs/message/sim-sqs-message-body.js +13 -6
- package/dist/service/sqs/message/sim-sqs-message-body.js.map +1 -1
- package/dist/util/factory/sim-records-event.factory.d.ts +60 -0
- package/dist/util/factory/sim-records-event.factory.d.ts.map +1 -0
- package/dist/util/factory/sim-records-event.factory.js +47 -0
- package/dist/util/factory/sim-records-event.factory.js.map +1 -0
- package/package.json +12 -2
- package/dist/service/cognito/command/sim-cognito-canonical-value.d.ts +0 -28
- package/dist/service/cognito/command/sim-cognito-canonical-value.d.ts.map +0 -1
- package/dist/service/cognito/command/sim-cognito-canonical-value.js +0 -44
- package/dist/service/cognito/command/sim-cognito-canonical-value.js.map +0 -1
- package/dist/service/cognito/command/sim-cognito-unsimulated-structure.d.ts +0 -23
- package/dist/service/cognito/command/sim-cognito-unsimulated-structure.d.ts.map +0 -1
- package/dist/service/cognito/command/sim-cognito-unsimulated-structure.js +0 -38
- package/dist/service/cognito/command/sim-cognito-unsimulated-structure.js.map +0 -1
- package/dist/service/cognito/user-pool/sim-cognito-unsimulated-pool-settings.d.ts +0 -45
- package/dist/service/cognito/user-pool/sim-cognito-unsimulated-pool-settings.d.ts.map +0 -1
- package/dist/service/cognito/user-pool/sim-cognito-unsimulated-pool-settings.js +0 -46
- package/dist/service/cognito/user-pool/sim-cognito-unsimulated-pool-settings.js.map +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ItemFactory } from "@kensio/part-factory";
|
|
2
|
+
import type { SimLambdaFunctionUrlEvent } from "../serve/event/sim-lambda-url-event.type.js";
|
|
3
|
+
/**
|
|
4
|
+
* Makes Lambda Function URL invocation events, so a test of a Function URL
|
|
5
|
+
* handler can say what the request was rather than writing out the payload
|
|
6
|
+
* format 2.0 event around it.
|
|
7
|
+
*
|
|
8
|
+
* The defaults describe an anonymous `GET /` to a `NONE` auth Function URL,
|
|
9
|
+
* which is what a simulated Function URL delivers for such a request. Anything
|
|
10
|
+
* a test cares about is passed as overrides, and a named variation composes as
|
|
11
|
+
* any other `part-factory` factory does:
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* const formPostFactory = new VariantFactory(lambdaFunctionUrlEventFactory, {
|
|
15
|
+
* headers: { "content-type": "application/x-www-form-urlencoded" },
|
|
16
|
+
* requestContext: { http: { method: "POST" } },
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* A real event says several things twice, and the defaults are computed from
|
|
21
|
+
* the overrides so that supplying either copy sets both:
|
|
22
|
+
*
|
|
23
|
+
* - the request path, on `rawPath` and `requestContext.http.path`
|
|
24
|
+
* - the query, as `rawQueryString` and as parsed `queryStringParameters`
|
|
25
|
+
* - the endpoint, as the URL id in `requestContext.apiId` and `domainPrefix`,
|
|
26
|
+
* as the leading label of `requestContext.domainName`, and as the `host`
|
|
27
|
+
* header
|
|
28
|
+
* - the caller's user agent and source IP, in `requestContext.http` and in the
|
|
29
|
+
* `user-agent` and `x-forwarded-for` headers
|
|
30
|
+
* - the invocation time, as `requestContext.timeEpoch` and as the Common Log
|
|
31
|
+
* Format `requestContext.time`
|
|
32
|
+
*
|
|
33
|
+
* Overriding both copies of one of those with different values is still
|
|
34
|
+
* allowed, and gives an event no real invocation would produce.
|
|
35
|
+
*/
|
|
36
|
+
export declare const lambdaFunctionUrlEventFactory: ItemFactory<SimLambdaFunctionUrlEvent>;
|
|
37
|
+
//# sourceMappingURL=lambda-function-url-event.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lambda-function-url-event.factory.d.ts","sourceRoot":"","sources":["../../../../src/service/lambda/factory/lambda-function-url-event.factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAOxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AAqB7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,6BAA6B,EAAE,WAAW,CAAC,yBAAyB,CAC9B,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { simPayload2EventFactory } from "../../../serve/payload-2/sim-payload-2-event.factory.js";
|
|
2
|
+
import { DEFAULT_SIM_AWS_REGION_NAME } from "../../aws/sim-aws-region.js";
|
|
3
|
+
import { makeSimLambdaFunctionUrlId } from "../function/url/sim-lambda-function-url.js";
|
|
4
|
+
import { simLambdaFunctionUrlHost } from "../function/url/sim-lambda-function-url-host.js";
|
|
5
|
+
/**
|
|
6
|
+
* The route key and stage a Function URL invocation always carries: there is
|
|
7
|
+
* no route to match and no stage to deploy to, so real Lambda names both
|
|
8
|
+
* `$default`, and neither says anything about the request.
|
|
9
|
+
*/
|
|
10
|
+
const functionUrlDefaultKey = "$default";
|
|
11
|
+
const functionUrlEndpointStyle = {
|
|
12
|
+
makeEndpointId: makeSimLambdaFunctionUrlId,
|
|
13
|
+
hostname: (urlId) => simLambdaFunctionUrlHost({
|
|
14
|
+
urlId,
|
|
15
|
+
regionName: DEFAULT_SIM_AWS_REGION_NAME,
|
|
16
|
+
}),
|
|
17
|
+
stage: functionUrlDefaultKey,
|
|
18
|
+
routeKeyFor: () => functionUrlDefaultKey,
|
|
19
|
+
requestLineFor: () => ({}),
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Makes Lambda Function URL invocation events, so a test of a Function URL
|
|
23
|
+
* handler can say what the request was rather than writing out the payload
|
|
24
|
+
* format 2.0 event around it.
|
|
25
|
+
*
|
|
26
|
+
* The defaults describe an anonymous `GET /` to a `NONE` auth Function URL,
|
|
27
|
+
* which is what a simulated Function URL delivers for such a request. Anything
|
|
28
|
+
* a test cares about is passed as overrides, and a named variation composes as
|
|
29
|
+
* any other `part-factory` factory does:
|
|
30
|
+
*
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const formPostFactory = new VariantFactory(lambdaFunctionUrlEventFactory, {
|
|
33
|
+
* headers: { "content-type": "application/x-www-form-urlencoded" },
|
|
34
|
+
* requestContext: { http: { method: "POST" } },
|
|
35
|
+
* });
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* A real event says several things twice, and the defaults are computed from
|
|
39
|
+
* the overrides so that supplying either copy sets both:
|
|
40
|
+
*
|
|
41
|
+
* - the request path, on `rawPath` and `requestContext.http.path`
|
|
42
|
+
* - the query, as `rawQueryString` and as parsed `queryStringParameters`
|
|
43
|
+
* - the endpoint, as the URL id in `requestContext.apiId` and `domainPrefix`,
|
|
44
|
+
* as the leading label of `requestContext.domainName`, and as the `host`
|
|
45
|
+
* header
|
|
46
|
+
* - the caller's user agent and source IP, in `requestContext.http` and in the
|
|
47
|
+
* `user-agent` and `x-forwarded-for` headers
|
|
48
|
+
* - the invocation time, as `requestContext.timeEpoch` and as the Common Log
|
|
49
|
+
* Format `requestContext.time`
|
|
50
|
+
*
|
|
51
|
+
* Overriding both copies of one of those with different values is still
|
|
52
|
+
* allowed, and gives an event no real invocation would produce.
|
|
53
|
+
*/
|
|
54
|
+
export const lambdaFunctionUrlEventFactory = simPayload2EventFactory(functionUrlEndpointStyle);
|
|
55
|
+
//# sourceMappingURL=lambda-function-url-event.factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lambda-function-url-event.factory.js","sourceRoot":"","sources":["../../../../src/service/lambda/factory/lambda-function-url-event.factory.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAClG,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAG3F;;;;GAIG;AACH,MAAM,qBAAqB,GAAG,UAAU,CAAC;AAEzC,MAAM,wBAAwB,GAA6B;IACzD,cAAc,EAAE,0BAA0B;IAC1C,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAClB,wBAAwB,CAAC;QACvB,KAAK;QACL,UAAU,EAAE,2BAA2B;KACxC,CAAC;IACJ,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,GAAG,EAAE,CAAC,qBAAqB;IACxC,cAAc,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,MAAM,6BAA6B,GACxC,uBAAuB,CAAC,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { DynamicFactory, type ItemFactory } from "@kensio/part-factory";
|
|
2
|
+
import type { SimLambdaSqsEvent, SimLambdaSqsEventRecord } from "../event-source/poll/sim-lambda-sqs-event.js";
|
|
3
|
+
/**
|
|
4
|
+
* Makes the records of an SQS event, one message each.
|
|
5
|
+
*
|
|
6
|
+
* A test that cares about one message and nothing else says only that:
|
|
7
|
+
*
|
|
8
|
+
* ```typescript
|
|
9
|
+
* lambdaSqsEventRecordFactory.make({ body: '{"orderId":"YL-1"}' });
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* Two fields a real record repeats are computed from the rest, so supplying
|
|
13
|
+
* one settles the other: `md5OfBody` is the digest of the body given, which is
|
|
14
|
+
* what a handler checking the digest compares against, and `awsRegion` is the
|
|
15
|
+
* Region of the queue ARN given.
|
|
16
|
+
*
|
|
17
|
+
* The system `attributes` are the three a simulated mapping delivers, for a
|
|
18
|
+
* message received once, just sent. They keep the SQS names, capital and all,
|
|
19
|
+
* while the record's own fields are lower-case, because that is what a function
|
|
20
|
+
* receives.
|
|
21
|
+
*/
|
|
22
|
+
export declare const lambdaSqsEventRecordFactory: DynamicFactory<SimLambdaSqsEventRecord, undefined>;
|
|
23
|
+
/**
|
|
24
|
+
* Makes the event an SQS event source mapping invokes a function with.
|
|
25
|
+
*
|
|
26
|
+
* The default is the single-message batch a queue delivers when nothing is
|
|
27
|
+
* backed up. A batch is the records a test asks for, each completed by
|
|
28
|
+
* `lambdaSqsEventRecordFactory`:
|
|
29
|
+
*
|
|
30
|
+
* ```typescript
|
|
31
|
+
* lambdaSqsEventFactory.make({
|
|
32
|
+
* Records: [{ body: "first" }, { body: "second" }],
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare const lambdaSqsEventFactory: ItemFactory<SimLambdaSqsEvent>;
|
|
37
|
+
//# sourceMappingURL=lambda-sqs-event.factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lambda-sqs-event.factory.d.ts","sourceRoot":"","sources":["../../../../src/service/lambda/factory/lambda-sqs-event.factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAOxE,OAAO,KAAK,EACV,iBAAiB,EACjB,uBAAuB,EACxB,MAAM,8CAA8C,CAAC;AActD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,2BAA2B,oDAqBpC,CAAC;AAEL;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,iBAAiB,CACR,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { faker } from "@faker-js/faker";
|
|
2
|
+
import { DynamicFactory } from "@kensio/part-factory";
|
|
3
|
+
import { makeSimSqsReceiptHandle } from "../../sqs/message/sim-sqs-receipt-handle.js";
|
|
4
|
+
import { simSqsBodyDigest } from "../../sqs/message/sim-sqs-message-body.js";
|
|
5
|
+
import { DEFAULT_SIM_AWS_ACCOUNT_ID } from "../../aws/sim-aws-account.js";
|
|
6
|
+
import { DEFAULT_SIM_AWS_REGION_NAME } from "../../aws/sim-aws-region.js";
|
|
7
|
+
import { SimRecordsEventFactory } from "../../../util/factory/sim-records-event.factory.js";
|
|
8
|
+
/**
|
|
9
|
+
* The queue a made record comes from when a test does not name one.
|
|
10
|
+
*
|
|
11
|
+
* Built when a record is made rather than when this module loads: the Account
|
|
12
|
+
* and Region defaults come from modules that reach this one back through the
|
|
13
|
+
* service index, and reading them at load time would read them before they
|
|
14
|
+
* exist.
|
|
15
|
+
*/
|
|
16
|
+
function defaultQueueArn() {
|
|
17
|
+
return `arn:aws:sqs:${DEFAULT_SIM_AWS_REGION_NAME}:${DEFAULT_SIM_AWS_ACCOUNT_ID}:orders`;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Makes the records of an SQS event, one message each.
|
|
21
|
+
*
|
|
22
|
+
* A test that cares about one message and nothing else says only that:
|
|
23
|
+
*
|
|
24
|
+
* ```typescript
|
|
25
|
+
* lambdaSqsEventRecordFactory.make({ body: '{"orderId":"YL-1"}' });
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* Two fields a real record repeats are computed from the rest, so supplying
|
|
29
|
+
* one settles the other: `md5OfBody` is the digest of the body given, which is
|
|
30
|
+
* what a handler checking the digest compares against, and `awsRegion` is the
|
|
31
|
+
* Region of the queue ARN given.
|
|
32
|
+
*
|
|
33
|
+
* The system `attributes` are the three a simulated mapping delivers, for a
|
|
34
|
+
* message received once, just sent. They keep the SQS names, capital and all,
|
|
35
|
+
* while the record's own fields are lower-case, because that is what a function
|
|
36
|
+
* receives.
|
|
37
|
+
*/
|
|
38
|
+
export const lambdaSqsEventRecordFactory = new DynamicFactory((overrides = {}) => {
|
|
39
|
+
const body = overrides.body ?? '{"orderId":"YL-1"}';
|
|
40
|
+
const eventSourceArn = overrides.eventSourceARN ?? defaultQueueArn();
|
|
41
|
+
const sentAt = String(Date.now());
|
|
42
|
+
return {
|
|
43
|
+
messageId: faker.string.uuid(),
|
|
44
|
+
receiptHandle: makeSimSqsReceiptHandle(),
|
|
45
|
+
body,
|
|
46
|
+
attributes: {
|
|
47
|
+
ApproximateReceiveCount: "1",
|
|
48
|
+
ApproximateFirstReceiveTimestamp: sentAt,
|
|
49
|
+
SentTimestamp: sentAt,
|
|
50
|
+
},
|
|
51
|
+
messageAttributes: {},
|
|
52
|
+
md5OfBody: simSqsBodyDigest(body),
|
|
53
|
+
eventSource: "aws:sqs",
|
|
54
|
+
eventSourceARN: eventSourceArn,
|
|
55
|
+
awsRegion: queueArnRegion(eventSourceArn),
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* Makes the event an SQS event source mapping invokes a function with.
|
|
60
|
+
*
|
|
61
|
+
* The default is the single-message batch a queue delivers when nothing is
|
|
62
|
+
* backed up. A batch is the records a test asks for, each completed by
|
|
63
|
+
* `lambdaSqsEventRecordFactory`:
|
|
64
|
+
*
|
|
65
|
+
* ```typescript
|
|
66
|
+
* lambdaSqsEventFactory.make({
|
|
67
|
+
* Records: [{ body: "first" }, { body: "second" }],
|
|
68
|
+
* });
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export const lambdaSqsEventFactory = new SimRecordsEventFactory(lambdaSqsEventRecordFactory);
|
|
72
|
+
/**
|
|
73
|
+
* The Region an SQS queue ARN names, which is the Region its records report.
|
|
74
|
+
*/
|
|
75
|
+
function queueArnRegion(queueArn) {
|
|
76
|
+
return queueArn.split(":", 4)[3] ?? DEFAULT_SIM_AWS_REGION_NAME;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=lambda-sqs-event.factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lambda-sqs-event.factory.js","sourceRoot":"","sources":["../../../../src/service/lambda/factory/lambda-sqs-event.factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAoB,MAAM,sBAAsB,CAAC;AAExE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oDAAoD,CAAC;AAM5F;;;;;;;GAOG;AACH,SAAS,eAAe;IACtB,OAAO,eAAe,2BAA2B,IAAI,0BAA0B,SAAS,CAAC;AAC3F,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,2BAA2B,GACtC,IAAI,cAAc,CAA0B,CAAC,SAAS,GAAG,EAAE,EAAE,EAAE;IAC7D,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,IAAI,oBAAoB,CAAC;IACpD,MAAM,cAAc,GAAG,SAAS,CAAC,cAAc,IAAI,eAAe,EAAE,CAAC;IACrE,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAElC,OAAO;QACL,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE;QAC9B,aAAa,EAAE,uBAAuB,EAAE;QACxC,IAAI;QACJ,UAAU,EAAE;YACV,uBAAuB,EAAE,GAAG;YAC5B,gCAAgC,EAAE,MAAM;YACxC,aAAa,EAAE,MAAM;SACtB;QACD,iBAAiB,EAAE,EAAE;QACrB,SAAS,EAAE,gBAAgB,CAAC,IAAI,CAAC;QACjC,WAAW,EAAE,SAAS;QACtB,cAAc,EAAE,cAAc;QAC9B,SAAS,EAAE,cAAc,CAAC,cAAc,CAAC;KAC1C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEL;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAChC,IAAI,sBAAsB,CAAC,2BAA2B,CAAC,CAAC;AAE1D;;GAEG;AACH,SAAS,cAAc,CAAC,QAAgB;IACtC,OAAO,QAAQ,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,2BAA2B,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { SimSdkWireHandler } from "../../../../../../sdk/wire/sim-sdk-wire.types.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 isSimLambdaVmHttpModuleSpecifier(specifier: string): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Build the `node:http` or `node:https` module sim Lambda function code is
|
|
12
|
+
* given.
|
|
13
|
+
*
|
|
14
|
+
* Everything the real module exports is kept, and only the two functions that
|
|
15
|
+
* start a request are replaced, so a client library that reaches for an Agent,
|
|
16
|
+
* a status code table or anything else finds the real thing. A request to an
|
|
17
|
+
* AWS API endpoint is answered by the simulation; every other request is the
|
|
18
|
+
* host module's, made exactly as it was asked for.
|
|
19
|
+
*
|
|
20
|
+
* This is where a deployment package that bundles the AWS SDK is reached. The
|
|
21
|
+
* bundled SDK resolves no module specifier the simulator can intercept, but it
|
|
22
|
+
* still asks the runtime for its HTTP transport, and that is a module the
|
|
23
|
+
* runtime provides.
|
|
24
|
+
*/
|
|
25
|
+
export declare function makeSimLambdaVmHttpModule(hostModule: NodeHttpModule, handler: SimSdkWireHandler): NodeHttpModule;
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=sim-lambda-vm-http-module.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-lambda-vm-http-module.d.ts","sourceRoot":"","sources":["../../../../../../../src/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AAO1F;;GAEG;AACH,KAAK,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAc9C;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAE3E;AAID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,cAAc,EAC1B,OAAO,EAAE,iBAAiB,GACzB,cAAc,CA2BhB"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { isSimAwsEndpointHostname, readSimLambdaVmHttpTarget, } from "./sim-lambda-vm-http-target.js";
|
|
2
|
+
import { SimLambdaVmWireRequest } from "./sim-lambda-vm-wire-request.js";
|
|
3
|
+
/**
|
|
4
|
+
* The transport modules an SDK bundled into the function code archive reaches
|
|
5
|
+
* the network through, named as both a bundler and a hand-written require may
|
|
6
|
+
* ask for them.
|
|
7
|
+
*/
|
|
8
|
+
const httpModuleSpecifiers = new Set([
|
|
9
|
+
"http",
|
|
10
|
+
"https",
|
|
11
|
+
"node:http",
|
|
12
|
+
"node:https",
|
|
13
|
+
]);
|
|
14
|
+
/**
|
|
15
|
+
* Whether a module specifier names an HTTP transport module.
|
|
16
|
+
*/
|
|
17
|
+
export function isSimLambdaVmHttpModuleSpecifier(specifier) {
|
|
18
|
+
return httpModuleSpecifiers.has(specifier);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Build the `node:http` or `node:https` module sim Lambda function code is
|
|
22
|
+
* given.
|
|
23
|
+
*
|
|
24
|
+
* Everything the real module exports is kept, and only the two functions that
|
|
25
|
+
* start a request are replaced, so a client library that reaches for an Agent,
|
|
26
|
+
* a status code table or anything else finds the real thing. A request to an
|
|
27
|
+
* AWS API endpoint is answered by the simulation; every other request is the
|
|
28
|
+
* host module's, made exactly as it was asked for.
|
|
29
|
+
*
|
|
30
|
+
* This is where a deployment package that bundles the AWS SDK is reached. The
|
|
31
|
+
* bundled SDK resolves no module specifier the simulator can intercept, but it
|
|
32
|
+
* still asks the runtime for its HTTP transport, and that is a module the
|
|
33
|
+
* runtime provides.
|
|
34
|
+
*/
|
|
35
|
+
export function makeSimLambdaVmHttpModule(hostModule, handler) {
|
|
36
|
+
const hostRequest = hostModule["request"];
|
|
37
|
+
const hostGet = hostModule["get"];
|
|
38
|
+
const request = (...callArguments) => {
|
|
39
|
+
const simulated = simulatedRequest(callArguments, handler);
|
|
40
|
+
return simulated ?? hostRequest(...callArguments);
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
...hostModule,
|
|
44
|
+
request,
|
|
45
|
+
/**
|
|
46
|
+
* `get` is `request` with the body ended immediately, which is the whole
|
|
47
|
+
* of the difference for a request the simulation answers.
|
|
48
|
+
*/
|
|
49
|
+
get: (...callArguments) => {
|
|
50
|
+
const simulated = simulatedRequest(callArguments, handler);
|
|
51
|
+
if (simulated === undefined) {
|
|
52
|
+
return hostGet(...callArguments);
|
|
53
|
+
}
|
|
54
|
+
simulated.end();
|
|
55
|
+
return simulated;
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Start a simulated request, for a call addressed to an AWS API endpoint.
|
|
61
|
+
*
|
|
62
|
+
* The response callback a caller passed is attached to the `response` event,
|
|
63
|
+
* as the real module attaches it, so a caller using either receives the
|
|
64
|
+
* response.
|
|
65
|
+
*/
|
|
66
|
+
function simulatedRequest(callArguments, handler) {
|
|
67
|
+
const target = readSimLambdaVmHttpTarget(callArguments);
|
|
68
|
+
if (target === undefined || !isSimAwsEndpointHostname(target.hostname)) {
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
const request = new SimLambdaVmWireRequest(target, handler);
|
|
72
|
+
const callback = callArguments.at(-1);
|
|
73
|
+
if (typeof callback === "function") {
|
|
74
|
+
request.on("response", callback);
|
|
75
|
+
}
|
|
76
|
+
return request;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=sim-lambda-vm-http-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-lambda-vm-http-module.js","sourceRoot":"","sources":["../../../../../../../src/service/lambda/function/code/vm/http/sim-lambda-vm-http-module.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAOzE;;;;GAIG;AACH,MAAM,oBAAoB,GAAwB,IAAI,GAAG,CAAC;IACxD,MAAM;IACN,OAAO;IACP,WAAW;IACX,YAAY;CACb,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,UAAU,gCAAgC,CAAC,SAAiB;IAChE,OAAO,oBAAoB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;AAC7C,CAAC;AAID;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,yBAAyB,CACvC,UAA0B,EAC1B,OAA0B;IAE1B,MAAM,WAAW,GAAG,UAAU,CAAC,SAAS,CAAoB,CAAC;IAC7D,MAAM,OAAO,GAAG,UAAU,CAAC,KAAK,CAAoB,CAAC;IAErD,MAAM,OAAO,GAAG,CAAC,GAAG,aAAwB,EAAW,EAAE;QACvD,MAAM,SAAS,GAAG,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QAE3D,OAAO,SAAS,IAAI,WAAW,CAAC,GAAG,aAAa,CAAC,CAAC;IACpD,CAAC,CAAC;IAEF,OAAO;QACL,GAAG,UAAU;QACb,OAAO;QACP;;;WAGG;QACH,GAAG,EAAE,CAAC,GAAG,aAAwB,EAAW,EAAE;YAC5C,MAAM,SAAS,GAAG,gBAAgB,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;YAC3D,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;gBAC5B,OAAO,OAAO,CAAC,GAAG,aAAa,CAAC,CAAC;YACnC,CAAC;YAED,SAAS,CAAC,GAAG,EAAE,CAAC;YAChB,OAAO,SAAS,CAAC;QACnB,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,SAAS,gBAAgB,CACvB,aAAiC,EACjC,OAA0B;IAE1B,MAAM,MAAM,GAAG,yBAAyB,CAAC,aAAa,CAAC,CAAC;IACxD,IAAI,MAAM,KAAK,SAAS,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;QACvE,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,OAAO,GAAG,IAAI,sBAAsB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE5D,MAAM,QAAQ,GAAG,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;QACnC,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE,QAAuC,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where an outgoing HTTP request from sim Lambda function code is addressed.
|
|
3
|
+
*/
|
|
4
|
+
export interface SimLambdaVmHttpTarget {
|
|
5
|
+
readonly hostname: string;
|
|
6
|
+
readonly path: string;
|
|
7
|
+
readonly method: string;
|
|
8
|
+
readonly headers: Record<string, string>;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Whether a hostname is an AWS service API endpoint.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isSimAwsEndpointHostname(hostname: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Read where a call to `http.request` or `https.request` is addressed.
|
|
16
|
+
*
|
|
17
|
+
* Both accept a URL, an options object, or a URL followed by an options
|
|
18
|
+
* object, so all three are understood here. Arguments that make sense to
|
|
19
|
+
* neither form read as undefined, which leaves the request to the host module
|
|
20
|
+
* and its own error message rather than inventing one.
|
|
21
|
+
*/
|
|
22
|
+
export declare function readSimLambdaVmHttpTarget(callArguments: readonly unknown[]): SimLambdaVmHttpTarget | undefined;
|
|
23
|
+
//# sourceMappingURL=sim-lambda-vm-http-target.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-lambda-vm-http-target.d.ts","sourceRoot":"","sources":["../../../../../../../src/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.ts"],"names":[],"mappings":"AA6BA;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC1C;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAQlE;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,aAAa,EAAE,SAAS,OAAO,EAAE,GAChC,qBAAqB,GAAG,SAAS,CAiBnC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { isRecord } from "../../../../../../util/type-guard/record.js";
|
|
2
|
+
/**
|
|
3
|
+
* The hostname suffixes AWS issues its service API endpoints under.
|
|
4
|
+
*
|
|
5
|
+
* A request to one of these is a request to an AWS service API whoever sent
|
|
6
|
+
* it, so it belongs to the simulation rather than the network. Everything else
|
|
7
|
+
* a function asks for still goes wherever it was addressed.
|
|
8
|
+
*
|
|
9
|
+
* `.on.aws` is not among them: what AWS issues under it is Lambda Function
|
|
10
|
+
* URLs, which are the endpoint of one function rather than a service API.
|
|
11
|
+
*/
|
|
12
|
+
const awsEndpointSuffixes = [
|
|
13
|
+
".amazonaws.com",
|
|
14
|
+
".amazonaws.com.cn",
|
|
15
|
+
".api.aws",
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* The label an endpoint hostname carries when it names one resource rather
|
|
19
|
+
* than a service API: an API Gateway HTTP API, under `.amazonaws.com`.
|
|
20
|
+
*
|
|
21
|
+
* A request to one of these is an ordinary HTTP request to something the
|
|
22
|
+
* simulation may be running, not a serialized Command, so there is nothing
|
|
23
|
+
* here to route it as. It goes where it was addressed, as it did before this
|
|
24
|
+
* ran at all.
|
|
25
|
+
*/
|
|
26
|
+
const resourceEndpointLabel = ".execute-api.";
|
|
27
|
+
/**
|
|
28
|
+
* Whether a hostname is an AWS service API endpoint.
|
|
29
|
+
*/
|
|
30
|
+
export function isSimAwsEndpointHostname(hostname) {
|
|
31
|
+
const name = hostname.toLowerCase();
|
|
32
|
+
if (name.includes(resourceEndpointLabel)) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
return awsEndpointSuffixes.some((suffix) => name.endsWith(suffix));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Read where a call to `http.request` or `https.request` is addressed.
|
|
39
|
+
*
|
|
40
|
+
* Both accept a URL, an options object, or a URL followed by an options
|
|
41
|
+
* object, so all three are understood here. Arguments that make sense to
|
|
42
|
+
* neither form read as undefined, which leaves the request to the host module
|
|
43
|
+
* and its own error message rather than inventing one.
|
|
44
|
+
*/
|
|
45
|
+
export function readSimLambdaVmHttpTarget(callArguments) {
|
|
46
|
+
const [first, second] = callArguments;
|
|
47
|
+
const url = requestUrl(first);
|
|
48
|
+
const optionsArgument = url === undefined ? first : second;
|
|
49
|
+
const options = isRecord(optionsArgument) ? optionsArgument : undefined;
|
|
50
|
+
const hostname = targetHostname(options, url);
|
|
51
|
+
if (hostname === undefined) {
|
|
52
|
+
return undefined;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
hostname,
|
|
56
|
+
path: stringOption(options, "path") ?? urlPath(url),
|
|
57
|
+
method: stringOption(options, "method") ?? "GET",
|
|
58
|
+
headers: targetHeaders(options),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function urlPath(url) {
|
|
62
|
+
return url === undefined ? "/" : `${url.pathname}${url.search}`;
|
|
63
|
+
}
|
|
64
|
+
function requestUrl(value) {
|
|
65
|
+
if (value instanceof URL) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
return typeof value === "string"
|
|
69
|
+
? (URL.parse(value) ?? undefined)
|
|
70
|
+
: undefined;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The hostname a request names, from the URL or from the options.
|
|
74
|
+
*
|
|
75
|
+
* `host` carries a port where `hostname` does not, and the two are otherwise
|
|
76
|
+
* interchangeable, so the port is dropped to leave a name either way.
|
|
77
|
+
*/
|
|
78
|
+
function targetHostname(options, url) {
|
|
79
|
+
const hostname = stringOption(options, "hostname") ?? stringOption(options, "host");
|
|
80
|
+
if (hostname !== undefined) {
|
|
81
|
+
return hostname.replace(/:\d+$/, "");
|
|
82
|
+
}
|
|
83
|
+
return url?.hostname;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The request headers, named in lower case.
|
|
87
|
+
*
|
|
88
|
+
* HTTP header names are case-insensitive, and what reads them here looks each
|
|
89
|
+
* one up by name, so the case a caller happened to use is settled once.
|
|
90
|
+
*/
|
|
91
|
+
function targetHeaders(options) {
|
|
92
|
+
const headers = isRecord(options) ? options["headers"] : undefined;
|
|
93
|
+
if (!isRecord(headers)) {
|
|
94
|
+
return {};
|
|
95
|
+
}
|
|
96
|
+
return Object.fromEntries(Object.entries(headers)
|
|
97
|
+
.filter(([, value]) => value !== undefined && value !== null)
|
|
98
|
+
.map(([name, value]) => [
|
|
99
|
+
name.toLowerCase(),
|
|
100
|
+
Array.isArray(value) ? value.join(",") : String(value),
|
|
101
|
+
]));
|
|
102
|
+
}
|
|
103
|
+
function stringOption(options, name) {
|
|
104
|
+
if (!isRecord(options)) {
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
// oxlint-disable-next-line security/detect-object-injection -- one of this module's own literal option names.
|
|
108
|
+
const value = options[name];
|
|
109
|
+
return typeof value === "string" && value.length > 0 ? value : undefined;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=sim-lambda-vm-http-target.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-lambda-vm-http-target.js","sourceRoot":"","sources":["../../../../../../../src/service/lambda/function/code/vm/http/sim-lambda-vm-http-target.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6CAA6C,CAAC;AAEvE;;;;;;;;;GASG;AACH,MAAM,mBAAmB,GAAsB;IAC7C,gBAAgB;IAChB,mBAAmB;IACnB,UAAU;CACX,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,qBAAqB,GAAG,eAAe,CAAC;AAY9C;;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;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CACvC,aAAiC;IAEjC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,aAAa,CAAC;IACtC,MAAM,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IAC9B,MAAM,eAAe,GAAG,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;IAC3D,MAAM,OAAO,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;IAExE,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;IAC9C,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO;QACL,QAAQ;QACR,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC;QACnD,MAAM,EAAE,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,KAAK;QAChD,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC;KAChC,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,GAAoB;IACnC,OAAO,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC;AAClE,CAAC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,IAAI,KAAK,YAAY,GAAG,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,OAAO,KAAK,KAAK,QAAQ;QAC9B,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC;QACjC,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED;;;;;GAKG;AACH,SAAS,cAAc,CACrB,OAAgB,EAChB,GAAoB;IAEpB,MAAM,QAAQ,GACZ,YAAY,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACrE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,OAAO,QAAQ,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACvC,CAAC;IAED,OAAO,GAAG,EAAE,QAAQ,CAAC;AACvB,CAAC;AAED;;;;;GAKG;AACH,SAAS,aAAa,CAAC,OAAgB;IACrC,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACnE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACvB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC;SACpB,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;SAC5D,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;QACtB,IAAI,CAAC,WAAW,EAAE;QAClB,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;KACvD,CAAC,CACL,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,OAAgB,EAAE,IAAY;IAClD,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QACvB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,8GAA8G;IAC9G,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC3E,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Writable } from "node:stream";
|
|
2
|
+
import type { SimSdkWireHandler } from "../../../../../../sdk/wire/sim-sdk-wire.types.js";
|
|
3
|
+
import type { SimLambdaVmHttpTarget } from "./sim-lambda-vm-http-target.js";
|
|
4
|
+
/**
|
|
5
|
+
* The outgoing request object `http.request` hands back, for a request the
|
|
6
|
+
* simulation answers instead of the network.
|
|
7
|
+
*
|
|
8
|
+
* It is a writable stream, which is what an HTTP client library expects: it
|
|
9
|
+
* writes the request body and ends the stream, and the response arrives on the
|
|
10
|
+
* `response` event. Nothing is connected to anything, so the request is
|
|
11
|
+
* answered when the body is complete, and the timeout and socket controls a
|
|
12
|
+
* client may reach for do nothing rather than being absent, since there is no
|
|
13
|
+
* socket to time out.
|
|
14
|
+
*/
|
|
15
|
+
export declare class SimLambdaVmWireRequest extends Writable {
|
|
16
|
+
private readonly target;
|
|
17
|
+
private readonly handler;
|
|
18
|
+
private readonly chunks;
|
|
19
|
+
constructor(target: SimLambdaVmHttpTarget, handler: SimSdkWireHandler);
|
|
20
|
+
_write(chunk: unknown, _encoding: BufferEncoding, callback: (error?: Error | null) => void): void;
|
|
21
|
+
/**
|
|
22
|
+
* Answer the request once its body is complete.
|
|
23
|
+
*
|
|
24
|
+
* A request the simulation cannot route fails the stream, which is the same
|
|
25
|
+
* `error` event a client would see from a connection that went nowhere, and
|
|
26
|
+
* carries the explanation with it.
|
|
27
|
+
*/
|
|
28
|
+
_final(callback: (error?: Error | null) => void): void;
|
|
29
|
+
/**
|
|
30
|
+
* Accept the socket timeout a client sets, with no socket to apply it to.
|
|
31
|
+
*/
|
|
32
|
+
setTimeout(): this;
|
|
33
|
+
setNoDelay(): this;
|
|
34
|
+
setSocketKeepAlive(): this;
|
|
35
|
+
private answer;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=sim-lambda-vm-wire-request.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-lambda-vm-wire-request.d.ts","sourceRoot":"","sources":["../../../../../../../src/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,QAAQ,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EACV,iBAAiB,EAElB,MAAM,kDAAkD,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAW5E;;;;;;;;;;GAUG;AACH,qBAAa,sBAAuB,SAAQ,QAAQ;IAIhD,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAJ1B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IAEvC,YACmB,MAAM,EAAE,qBAAqB,EAC7B,OAAO,EAAE,iBAAiB,EAG5C;IAEQ,MAAM,CACb,KAAK,EAAE,OAAO,EACd,SAAS,EAAE,cAAc,EACzB,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,GACvC,IAAI,CAGN;IAED;;;;;;OAMG;IACM,MAAM,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI,GAAG,IAAI,CAE9D;IAED;;OAEG;IACH,UAAU,IAAI,IAAI,CAEjB;IAED,UAAU,IAAI,IAAI,CAEjB;IAED,kBAAkB,IAAI,IAAI,CAEzB;YAEa,MAAM;CAkBrB"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { STATUS_CODES } from "node:http";
|
|
2
|
+
import { Readable, Writable } from "node:stream";
|
|
3
|
+
/**
|
|
4
|
+
* The outgoing request object `http.request` hands back, for a request the
|
|
5
|
+
* simulation answers instead of the network.
|
|
6
|
+
*
|
|
7
|
+
* It is a writable stream, which is what an HTTP client library expects: it
|
|
8
|
+
* writes the request body and ends the stream, and the response arrives on the
|
|
9
|
+
* `response` event. Nothing is connected to anything, so the request is
|
|
10
|
+
* answered when the body is complete, and the timeout and socket controls a
|
|
11
|
+
* client may reach for do nothing rather than being absent, since there is no
|
|
12
|
+
* socket to time out.
|
|
13
|
+
*/
|
|
14
|
+
export class SimLambdaVmWireRequest extends Writable {
|
|
15
|
+
target;
|
|
16
|
+
handler;
|
|
17
|
+
chunks = [];
|
|
18
|
+
constructor(target, handler) {
|
|
19
|
+
super();
|
|
20
|
+
this.target = target;
|
|
21
|
+
this.handler = handler;
|
|
22
|
+
}
|
|
23
|
+
_write(chunk, _encoding, callback) {
|
|
24
|
+
this.chunks.push(Buffer.from(chunk));
|
|
25
|
+
callback();
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Answer the request once its body is complete.
|
|
29
|
+
*
|
|
30
|
+
* A request the simulation cannot route fails the stream, which is the same
|
|
31
|
+
* `error` event a client would see from a connection that went nowhere, and
|
|
32
|
+
* carries the explanation with it.
|
|
33
|
+
*/
|
|
34
|
+
_final(callback) {
|
|
35
|
+
void this.answer(callback);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Accept the socket timeout a client sets, with no socket to apply it to.
|
|
39
|
+
*/
|
|
40
|
+
setTimeout() {
|
|
41
|
+
return this;
|
|
42
|
+
}
|
|
43
|
+
setNoDelay() {
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
setSocketKeepAlive() {
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
async answer(callback) {
|
|
50
|
+
try {
|
|
51
|
+
const response = await this.handler({
|
|
52
|
+
method: this.target.method,
|
|
53
|
+
hostname: this.target.hostname,
|
|
54
|
+
path: this.target.path,
|
|
55
|
+
headers: this.target.headers,
|
|
56
|
+
body: Buffer.concat(this.chunks),
|
|
57
|
+
});
|
|
58
|
+
this.emit("response", wireResponseMessage(response));
|
|
59
|
+
callback();
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
callback(error);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Present a simulated response as the incoming message an HTTP client reads.
|
|
68
|
+
*/
|
|
69
|
+
function wireResponseMessage(response) {
|
|
70
|
+
const message = Readable.from([Buffer.from(response.body)], {
|
|
71
|
+
objectMode: false,
|
|
72
|
+
});
|
|
73
|
+
message.statusCode = response.statusCode;
|
|
74
|
+
message.statusMessage = STATUS_CODES[response.statusCode] ?? "";
|
|
75
|
+
message.headers = { ...response.headers };
|
|
76
|
+
return message;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=sim-lambda-vm-wire-request.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sim-lambda-vm-wire-request.js","sourceRoot":"","sources":["../../../../../../../src/service/lambda/function/code/vm/http/sim-lambda-vm-wire-request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAgBjD;;;;;;;;;;GAUG;AACH,MAAM,OAAO,sBAAuB,SAAQ,QAAQ;IAI/B,MAAM;IACN,OAAO;IAJT,MAAM,GAAa,EAAE,CAAC;IAEvC,YACmB,MAA6B,EAC7B,OAA0B;QAE3C,KAAK,EAAE,CAAC;sBAHS,MAAM;uBACN,OAAO;IAG1B,CAAC;IAEQ,MAAM,CACb,KAAc,EACd,SAAyB,EACzB,QAAwC;QAExC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAmB,CAAC,CAAC,CAAC;QACnD,QAAQ,EAAE,CAAC;IACb,CAAC;IAED;;;;;;OAMG;IACM,MAAM,CAAC,QAAwC;QACtD,KAAK,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,UAAU;QACR,OAAO,IAAI,CAAC;IACd,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC;IACd,CAAC;IAED,kBAAkB;QAChB,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,KAAK,CAAC,MAAM,CAClB,QAAwC;QAExC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC;gBAClC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;gBAC1B,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ;gBAC9B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI;gBACtB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO;gBAC5B,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;aACjC,CAAC,CAAC;YAEH,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC,CAAC;YACrD,QAAQ,EAAE,CAAC;QACb,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,QAAQ,CAAC,KAAc,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;CACF;AAED;;GAEG;AACH,SAAS,mBAAmB,CAC1B,QAA4B;IAE5B,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE;QAC1D,UAAU,EAAE,KAAK;KAClB,CAAmC,CAAC;IAErC,OAAO,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;IACzC,OAAO,CAAC,aAAa,GAAG,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;IAChE,OAAO,CAAC,OAAO,GAAG,EAAE,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC;IAE1C,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -8,9 +8,11 @@ export declare const awsSdkPackagePrefix = "@aws-sdk/";
|
|
|
8
8
|
*
|
|
9
9
|
* The vm module system asks a provider for bare specifiers the code archive
|
|
10
10
|
* cannot resolve, mirroring how the real Lambda Node.js runtime provides the
|
|
11
|
-
* AWS SDK without it being bundled in the deployment package
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* AWS SDK without it being bundled in the deployment package, and for the
|
|
12
|
+
* Node.js built-ins, which the runtime provides whatever the package contains.
|
|
13
|
+
* A provider returns undefined for specifiers it does not serve, so a built-in
|
|
14
|
+
* falls through to the host's and a bare specifier is reported with the
|
|
15
|
+
* original archive resolution error.
|
|
14
16
|
*/
|
|
15
17
|
export interface SimLambdaVmSdkModuleProvider {
|
|
16
18
|
provideModule(specifier: string): unknown;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-lambda-vm-sdk-module-provider.d.ts","sourceRoot":"","sources":["../../../../../../../src/service/lambda/function/code/vm/sdk/sim-lambda-vm-sdk-module-provider.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAE/C
|
|
1
|
+
{"version":3,"file":"sim-lambda-vm-sdk-module-provider.d.ts","sourceRoot":"","sources":["../../../../../../../src/service/lambda/function/code/vm/sdk/sim-lambda-vm-sdk-module-provider.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,MAAM,WAAW,4BAA4B;IAC3C,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;CAC3C;AAED;;;GAGG;AACH,qBAAa,8BAA+B,YAAW,4BAA4B;IACjF;;OAEG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAaxC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sim-lambda-vm-sdk-module-provider.js","sourceRoot":"","sources":["../../../../../../../src/service/lambda/function/code/vm/sdk/sim-lambda-vm-sdk-module-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAEtF;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"sim-lambda-vm-sdk-module-provider.js","sourceRoot":"","sources":["../../../../../../../src/service/lambda/function/code/vm/sdk/sim-lambda-vm-sdk-module-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AAEtF;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,WAAW,CAAC;AAiB/C;;;GAGG;AACH,MAAM,OAAO,8BAA8B;IACzC;;OAEG;IACH,aAAa,CAAC,SAAiB;QAC7B,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,mBAAmB,CAAC,EAAE,CAAC;YAC/C,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,MAAM,IAAI,qBAAqB,CAC7B,2BAA2B,EAC3B,kBAAkB,SAAS,qCAAqC;YAC9D,6DAA6D;YAC7D,sDAAsD;YACtD,oEAAoE;YACpE,UAAU,CACb,CAAC;IACJ,CAAC;CACF"}
|