@cdklabs/cdk-ssm-documents 0.0.55 → 0.0.57
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/.jsii +12 -12
- package/lib/construct/synth-utils.js +1 -1
- package/lib/document/automation-document.js +1 -1
- package/lib/document/command-document.js +1 -1
- package/lib/document/document-builder.js +2 -2
- package/lib/document/ssm-document.js +1 -1
- package/lib/domain/aws-service.js +1 -1
- package/lib/domain/choice.js +1 -1
- package/lib/domain/data-type.js +1 -1
- package/lib/domain/enum/install-action.js +2 -2
- package/lib/domain/enum/install-uninstall-repair.js +2 -2
- package/lib/domain/enum/installation-type.js +2 -2
- package/lib/domain/enum/package-name.js +2 -2
- package/lib/domain/input.js +1 -1
- package/lib/domain/operation.js +1 -1
- package/lib/domain/platform.js +1 -1
- package/lib/domain/precondition.js +1 -1
- package/lib/incident-response/incident-response.js +3 -3
- package/lib/interface/approve-hook.js +2 -2
- package/lib/interface/auth-method.js +3 -3
- package/lib/interface/aws-invoker.js +2 -2
- package/lib/interface/downloadable-content.js +8 -8
- package/lib/interface/environment.js +3 -3
- package/lib/interface/execute-automation-hook/api-execute-automation-hook.js +1 -1
- package/lib/interface/observer.js +1 -1
- package/lib/interface/on-failure.js +6 -6
- package/lib/interface/pause-hook.js +2 -2
- package/lib/interface/run-command-hook/api-run-command-hook.js +1 -1
- package/lib/interface/run-document-location.js +2 -2
- package/lib/interface/sleep-hook.js +2 -2
- package/lib/interface/step-ref.js +1 -1
- package/lib/interface/variables/boolean-variable.js +2 -2
- package/lib/interface/variables/map-list-variable.js +2 -2
- package/lib/interface/variables/number-variable.js +2 -2
- package/lib/interface/variables/secure-string-variable.js +4 -4
- package/lib/interface/variables/string-list-variable.js +2 -2
- package/lib/interface/variables/string-map-variable.js +2 -2
- package/lib/interface/variables/string-variable.js +4 -4
- package/lib/interface/variables/variable.js +2 -2
- package/lib/interface/webhook.js +1 -1
- package/lib/parent-steps/automation/approve-step.js +1 -1
- package/lib/parent-steps/automation/assert-aws-resource-step.js +1 -1
- package/lib/parent-steps/automation/aws-api-step.js +1 -1
- package/lib/parent-steps/automation/branch-step.js +1 -1
- package/lib/parent-steps/automation/change-instance-state-step.js +3 -3
- package/lib/parent-steps/automation/copy-image-step.js +1 -1
- package/lib/parent-steps/automation/create-image-step.js +1 -1
- package/lib/parent-steps/automation/create-stack-step.js +3 -3
- package/lib/parent-steps/automation/create-tags-step.js +3 -3
- package/lib/parent-steps/automation/delete-image-step.js +1 -1
- package/lib/parent-steps/automation/delete-stack-step.js +1 -1
- package/lib/parent-steps/automation/execute-automation-step.js +1 -1
- package/lib/parent-steps/automation/execute-script-step.js +5 -5
- package/lib/parent-steps/automation/execute-state-machine-step.js +1 -1
- package/lib/parent-steps/automation/invoke-lambda-function-step.js +1 -1
- package/lib/parent-steps/automation/invoke-webhook-step.js +1 -1
- package/lib/parent-steps/automation/pause-step.js +1 -1
- package/lib/parent-steps/automation/run-command-step.js +3 -3
- package/lib/parent-steps/automation/run-instance-step.js +1 -1
- package/lib/parent-steps/automation/sleep-step.js +1 -1
- package/lib/parent-steps/automation/update-variable.js +1 -1
- package/lib/parent-steps/automation/wait-for-resource-step.js +1 -1
- package/lib/parent-steps/automation-step.js +1 -1
- package/lib/parent-steps/command/applications-step.js +1 -1
- package/lib/parent-steps/command/configure-docker-step.js +1 -1
- package/lib/parent-steps/command/configure-package-step.js +1 -1
- package/lib/parent-steps/command/domain-join-step.js +1 -1
- package/lib/parent-steps/command/download-content-step.js +1 -1
- package/lib/parent-steps/command/ps-module-step.js +1 -1
- package/lib/parent-steps/command/run-docker-action-step.js +1 -1
- package/lib/parent-steps/command/run-document-step.js +1 -1
- package/lib/parent-steps/command/run-powershell-script-step.js +1 -1
- package/lib/parent-steps/command/run-shell-script-step.js +1 -1
- package/lib/parent-steps/command/software-inventory-step.js +1 -1
- package/lib/parent-steps/command/update-agent-step.js +1 -1
- package/lib/parent-steps/command/update-ssm-agent-step.js +1 -1
- package/lib/parent-steps/command-step.js +1 -1
- package/lib/parent-steps/step.js +1 -1
- package/lib/patterns/automation/composite-step.js +2 -2
- package/lib/patterns/automation/reboot-instance-and-wait.js +1 -1
- package/lib/patterns/automation/string-step.js +1 -1
- package/lib/patterns/document/string-document.js +1 -1
- package/lib/patterns/document/timed-document.js +1 -1
- package/lib/samples/hello-world.js +1 -1
- package/lib/simulation/automation/approve-simulation.js +1 -1
- package/lib/simulation/automation/assert-aws-resource-simulation.js +1 -1
- package/lib/simulation/automation/automation-simulation-base.js +1 -1
- package/lib/simulation/automation/aws-api-simulation.js +1 -1
- package/lib/simulation/automation/branch-simulation.js +1 -1
- package/lib/simulation/automation/change-instance-state-simulation.js +1 -1
- package/lib/simulation/automation/copy-image-simulation.js +1 -1
- package/lib/simulation/automation/create-image-simulation.js +1 -1
- package/lib/simulation/automation/create-stack-simulation.js +1 -1
- package/lib/simulation/automation/create-tags-simulation.js +1 -1
- package/lib/simulation/automation/delete-image-simulation.js +1 -1
- package/lib/simulation/automation/delete-stack-simulation.js +1 -1
- package/lib/simulation/automation/execute-script-simulation.js +1 -1
- package/lib/simulation/automation/execute-state-machine-simulation.js +1 -1
- package/lib/simulation/automation/invoke-lambda-function-simulation.js +1 -1
- package/lib/simulation/automation/invoke-webhook-simulation.js +1 -1
- package/lib/simulation/automation/pause-simulation.js +1 -1
- package/lib/simulation/automation/run-command-simulation.js +1 -1
- package/lib/simulation/automation/run-instance-simulation.js +1 -1
- package/lib/simulation/automation/sleep-simulation.js +1 -1
- package/lib/simulation/automation/update-variable-simulation.js +1 -1
- package/lib/simulation/automation/wait-for-resource-simulation.js +1 -1
- package/lib/simulation/automation-step-simulation.js +1 -1
- package/lib/simulation/command/command-simulation-base.js +1 -1
- package/lib/simulation/command/ps-module-simulation.js +1 -1
- package/lib/simulation/command/run-powershell-script-simulation.js +1 -1
- package/lib/simulation/command/run-shell-script-simulation.js +1 -1
- package/lib/simulation/command-step-simulation.js +1 -1
- package/lib/simulation/document/automation-simulation.js +1 -1
- package/lib/simulation/document/command-simulation.js +1 -1
- package/lib/simulation/simulation.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +34 -34
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/models/models_0.d.ts +2 -2
- package/node_modules/@aws-sdk/client-cloudwatch/package.json +36 -36
- package/node_modules/@aws-sdk/client-ec2/README.md +14 -0
- package/node_modules/@aws-sdk/client-ec2/dist-cjs/index.js +41 -0
- package/node_modules/@aws-sdk/client-ec2/dist-cjs/schemas/schemas_0.js +156 -78
- package/node_modules/@aws-sdk/client-ec2/dist-es/EC2.js +6 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/commands/GetCapacityManagerMonitoredTagKeysCommand.js +16 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/commands/UpdateCapacityManagerMonitoredTagKeysCommand.js +16 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/commands/index.js +2 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/models/enums.js +8 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/pagination/GetCapacityManagerMonitoredTagKeysPaginator.js +4 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/pagination/index.js +1 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/schemas/schemas_0.js +96 -18
- package/node_modules/@aws-sdk/client-ec2/dist-types/EC2.d.ts +23 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/EC2Client.d.ts +4 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerMetricDataCommand.d.ts +9 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerMetricDimensionsCommand.d.ts +9 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerMonitoredTagKeysCommand.d.ts +87 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetConsoleScreenshotCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetDeclarativePoliciesReportSummaryCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyTrafficMirrorFilterNetworkServicesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyTrafficMirrorFilterRuleCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/UpdateCapacityManagerMonitoredTagKeysCommand.d.ts +91 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/index.d.ts +2 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/enums.d.ts +16 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_5.d.ts +126 -79
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_6.d.ts +81 -122
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_7.d.ts +168 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/pagination/GetCapacityManagerMonitoredTagKeysPaginator.d.ts +7 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/pagination/index.d.ts +1 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/schemas/schemas_0.d.ts +8 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2.d.ts +55 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2Client.d.ts +12 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetCapacityManagerMonitoredTagKeysCommand.d.ts +51 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetConsoleScreenshotCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetDeclarativePoliciesReportSummaryCommand.d.ts +4 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyTrafficMirrorFilterNetworkServicesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyTrafficMirrorFilterRuleCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/UpdateCapacityManagerMonitoredTagKeysCommand.d.ts +51 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/enums.d.ts +10 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_5.d.ts +23 -18
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_6.d.ts +19 -34
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_7.d.ts +43 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/pagination/GetCapacityManagerMonitoredTagKeysPaginator.d.ts +11 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/schemas/schemas_0.d.ts +8 -0
- package/node_modules/@aws-sdk/client-ec2/package.json +36 -36
- package/node_modules/@aws-sdk/client-iam/package.json +35 -35
- package/node_modules/@aws-sdk/client-lambda/dist-cjs/models/errors.js +52 -1
- package/node_modules/@aws-sdk/client-lambda/dist-cjs/schemas/schemas_0.js +29 -8
- package/node_modules/@aws-sdk/client-lambda/dist-es/models/errors.js +48 -0
- package/node_modules/@aws-sdk/client-lambda/dist-es/schemas/schemas_0.js +22 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/InvokeCommand.d.ts +9 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/InvokeWithResponseStreamCommand.d.ts +9 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/models/errors.d.ts +66 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/models/models_0.d.ts +6 -6
- package/node_modules/@aws-sdk/client-lambda/dist-types/schemas/schemas_0.d.ts +3 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/errors.d.ts +30 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/schemas/schemas_0.d.ts +3 -0
- package/node_modules/@aws-sdk/client-lambda/package.json +38 -38
- package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +5 -0
- package/node_modules/@aws-sdk/client-s3/dist-es/models/enums.js +5 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/CreateBucketCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketLocationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-s3/dist-types/models/enums.d.ts +5 -0
- package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/enums.d.ts +5 -0
- package/node_modules/@aws-sdk/client-s3/package.json +50 -50
- package/node_modules/@aws-sdk/client-sns/package.json +33 -33
- package/node_modules/@aws-sdk/client-sqs/dist-cjs/index.js +2 -0
- package/node_modules/@aws-sdk/client-sqs/dist-es/commands/ReceiveMessageCommand.js +2 -0
- package/node_modules/@aws-sdk/client-sqs/package.json +36 -36
- package/node_modules/@aws-sdk/client-ssm/package.json +34 -34
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +69 -50
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +17 -0
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +52 -50
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/longPollMiddleware.js +15 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js +11 -10
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js +4 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +4 -5
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +2 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +9 -7
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +17 -17
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +3 -8
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +2 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/longPollMiddleware.d.ts +14 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeSerializer.d.ts +2 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/longPollMiddleware.d.ts +15 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeSerializer.d.ts +1 -1
- package/node_modules/@aws-sdk/core/package.json +11 -11
- package/node_modules/@aws-sdk/crc64-nvme/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +14 -14
- package/node_modules/@aws-sdk/credential-provider-login/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
- package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
- package/node_modules/@aws-sdk/middleware-bucket-endpoint/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-expect-continue/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +10 -10
- package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-location-constraint/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-sdk-ec2/package.json +8 -8
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +11 -11
- package/node_modules/@aws-sdk/middleware-sdk-sqs/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-ssec/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +8 -8
- package/node_modules/@aws-sdk/nested-clients/package.json +32 -32
- package/node_modules/@aws-sdk/region-config-resolver/package.json +5 -5
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +6 -6
- package/node_modules/@aws-sdk/token-providers/package.json +7 -7
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/util-endpoints/package.json +5 -5
- package/node_modules/@aws-sdk/util-format-url/package.json +4 -4
- package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
- package/node_modules/@aws-sdk/util-user-agent-node/package.json +5 -5
- package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@smithy/config-resolver/package.json +5 -5
- package/node_modules/@smithy/core/dist-cjs/index.js +2 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +32 -14
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +16 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +17 -10
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +6 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +6 -3
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +23 -11
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +9 -3
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +16 -8
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +9 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +8 -6
- package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +6 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +6 -3
- package/node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
- package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
- package/node_modules/@smithy/core/package.json +7 -7
- package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
- package/node_modules/@smithy/eventstream-codec/package.json +2 -2
- package/node_modules/@smithy/eventstream-serde-browser/package.json +3 -3
- package/node_modules/@smithy/eventstream-serde-config-resolver/package.json +2 -2
- package/node_modules/@smithy/eventstream-serde-node/package.json +3 -3
- package/node_modules/@smithy/eventstream-serde-universal/package.json +3 -3
- package/node_modules/@smithy/fetch-http-handler/package.json +5 -5
- package/node_modules/@smithy/hash-blob-browser/package.json +2 -2
- package/node_modules/@smithy/hash-node/package.json +2 -2
- package/node_modules/@smithy/hash-stream-node/package.json +2 -2
- package/node_modules/@smithy/invalid-dependency/package.json +2 -2
- package/node_modules/@smithy/md5-js/package.json +2 -2
- package/node_modules/@smithy/middleware-compression/package.json +6 -6
- package/node_modules/@smithy/middleware-content-length/package.json +3 -3
- package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
- package/node_modules/@smithy/middleware-retry/package.json +9 -9
- package/node_modules/@smithy/middleware-serde/package.json +4 -4
- package/node_modules/@smithy/middleware-stack/package.json +2 -2
- package/node_modules/@smithy/node-config-provider/package.json +4 -4
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +191 -96
- package/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +45 -0
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +71 -35
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +32 -18
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +44 -43
- package/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +42 -0
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +34 -14
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +32 -8
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +14 -6
- package/node_modules/@smithy/node-http-handler/package.json +5 -5
- package/node_modules/@smithy/property-provider/package.json +2 -2
- package/node_modules/@smithy/protocol-http/package.json +2 -2
- package/node_modules/@smithy/querystring-builder/package.json +2 -2
- package/node_modules/@smithy/querystring-parser/package.json +2 -2
- package/node_modules/@smithy/service-error-classification/dist-cjs/index.js +5 -0
- package/node_modules/@smithy/service-error-classification/dist-es/index.js +4 -0
- package/node_modules/@smithy/service-error-classification/dist-types/index.d.ts +6 -0
- package/node_modules/@smithy/service-error-classification/package.json +2 -2
- package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +11 -5
- package/node_modules/@smithy/signature-v4/dist-es/SignatureV4.js +11 -5
- package/node_modules/@smithy/signature-v4/dist-types/SignatureV4.d.ts +3 -3
- package/node_modules/@smithy/signature-v4/package.json +4 -4
- package/node_modules/@smithy/smithy-client/dist-cjs/index.js +8 -1
- package/node_modules/@smithy/smithy-client/dist-es/command.js +8 -1
- package/node_modules/@smithy/smithy-client/package.json +7 -7
- package/node_modules/@smithy/types/dist-types/connection/config.d.ts +5 -0
- package/node_modules/@smithy/types/dist-types/signature.d.ts +20 -3
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/@smithy/url-parser/package.json +3 -3
- package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
- package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
- package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +212 -111
- package/node_modules/@smithy/util-endpoints/dist-es/bdd/BinaryDecisionDiagram.js +15 -0
- package/node_modules/@smithy/util-endpoints/dist-es/decideEndpoint.js +42 -0
- package/node_modules/@smithy/util-endpoints/dist-es/index.js +2 -0
- package/node_modules/@smithy/util-endpoints/dist-es/lib/coalesce.js +8 -0
- package/node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js +2 -1
- package/node_modules/@smithy/util-endpoints/dist-es/lib/index.js +3 -0
- package/node_modules/@smithy/util-endpoints/dist-es/lib/ite.js +3 -0
- package/node_modules/@smithy/util-endpoints/dist-es/lib/split.js +13 -0
- package/node_modules/@smithy/util-endpoints/dist-es/lib/substring.js +1 -1
- package/node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js +8 -13
- package/node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js +4 -1
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js +9 -7
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js +12 -8
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js +14 -13
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js +7 -4
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js +22 -5
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js +4 -4
- package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTemplate.js +3 -6
- package/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js +5 -5
- package/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js +4 -4
- package/node_modules/@smithy/util-endpoints/dist-es/utils/getReferenceValue.js +1 -5
- package/node_modules/@smithy/util-endpoints/dist-types/bdd/BinaryDecisionDiagram.d.ts +22 -0
- package/node_modules/@smithy/util-endpoints/dist-types/decideEndpoint.d.ts +7 -0
- package/node_modules/@smithy/util-endpoints/dist-types/index.d.ts +2 -0
- package/node_modules/@smithy/util-endpoints/dist-types/lib/coalesce.d.ts +7 -0
- package/node_modules/@smithy/util-endpoints/dist-types/lib/index.d.ts +3 -0
- package/node_modules/@smithy/util-endpoints/dist-types/lib/ite.d.ts +6 -0
- package/node_modules/@smithy/util-endpoints/dist-types/lib/split.d.ts +11 -0
- package/node_modules/@smithy/util-endpoints/dist-types/types/shared.d.ts +3 -3
- package/node_modules/@smithy/util-endpoints/dist-types/utils/endpointFunctions.d.ts +2 -11
- package/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateCondition.d.ts +6 -3
- package/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateConditions.d.ts +3 -3
- package/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointHeaders.d.ts +1 -1
- package/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointProperties.d.ts +2 -2
- package/node_modules/@smithy/util-endpoints/dist-types/utils/getReferenceValue.d.ts +3 -1
- package/node_modules/@smithy/util-endpoints/package.json +3 -3
- package/node_modules/@smithy/util-middleware/package.json +2 -2
- package/node_modules/@smithy/util-retry/dist-cjs/index.js +6 -0
- package/node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js +3 -0
- package/node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js +3 -0
- package/node_modules/@smithy/util-retry/dist-types/AdaptiveRetryStrategy.d.ts +5 -0
- package/node_modules/@smithy/util-retry/dist-types/StandardRetryStrategy.d.ts +5 -0
- package/node_modules/@smithy/util-retry/package.json +3 -3
- package/node_modules/@smithy/util-stream/package.json +4 -4
- package/node_modules/@smithy/util-waiter/package.json +3 -3
- package/node_modules/fast-xml-builder/package.json +1 -1
- package/node_modules/fast-xml-builder/src/fxb.js +6 -2
- package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +16 -2
- package/node_modules/path-expression-matcher/README.md +214 -62
- package/node_modules/path-expression-matcher/lib/pem.cjs +1 -1
- package/node_modules/path-expression-matcher/lib/pem.d.cts +111 -0
- package/node_modules/path-expression-matcher/lib/pem.min.js +1 -1
- package/node_modules/path-expression-matcher/lib/pem.min.js.map +1 -1
- package/node_modules/path-expression-matcher/package.json +1 -1
- package/node_modules/path-expression-matcher/src/Expression.js +2 -2
- package/node_modules/path-expression-matcher/src/ExpressionSet.js +209 -0
- package/node_modules/path-expression-matcher/src/Matcher.js +235 -177
- package/node_modules/path-expression-matcher/src/index.d.ts +199 -194
- package/node_modules/path-expression-matcher/src/index.js +3 -2
- package/node_modules/strnum/package.json +1 -1
- package/package.json +10 -10
- package/node_modules/strnum/.github/SECURITY.md +0 -5
- package/node_modules/strnum/.vscode/launch.json +0 -25
- package/node_modules/strnum/algo.stflow +0 -84
- package/node_modules/strnum/tests/infinity_test.js +0 -18
- package/node_modules/strnum/tests/strnum_test.js +0 -175
- package/node_modules/strnum/tests/temp.js +0 -8
|
@@ -30,6 +30,22 @@ More information can be found at: https://a.co/c895JFp`);
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
+
const longPollMiddleware = () => (next, context) => async (args) => {
|
|
34
|
+
context.__retryLongPoll = true;
|
|
35
|
+
return next(args);
|
|
36
|
+
};
|
|
37
|
+
const longPollMiddlewareOptions = {
|
|
38
|
+
name: "longPollMiddleware",
|
|
39
|
+
tags: ["RETRY"],
|
|
40
|
+
step: "initialize",
|
|
41
|
+
override: true,
|
|
42
|
+
};
|
|
43
|
+
const getLongPollPlugin = (options) => ({
|
|
44
|
+
applyToStack: (clientStack) => {
|
|
45
|
+
clientStack.add(longPollMiddleware(), longPollMiddlewareOptions);
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
33
49
|
function setCredentialFeature(credentials, feature, value) {
|
|
34
50
|
if (!credentials.$source) {
|
|
35
51
|
credentials.$source = {};
|
|
@@ -434,12 +450,11 @@ class ProtocolLib {
|
|
|
434
450
|
if (msg) {
|
|
435
451
|
error.message = msg;
|
|
436
452
|
}
|
|
437
|
-
error.Error
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
};
|
|
453
|
+
const errorObj = error.Error ?? {};
|
|
454
|
+
errorObj.Type = error.Error?.Type;
|
|
455
|
+
errorObj.Code = error.Error?.Code;
|
|
456
|
+
errorObj.Message = error.Error?.message ?? error.Error?.Message ?? msg;
|
|
457
|
+
error.Error = errorObj;
|
|
443
458
|
const reqId = error.$metadata.requestId;
|
|
444
459
|
if (reqId) {
|
|
445
460
|
error.RequestId = reqId;
|
|
@@ -452,14 +467,16 @@ class ProtocolLib {
|
|
|
452
467
|
const queryErrorHeader = response.headers?.["x-amzn-query-error"];
|
|
453
468
|
if (output !== undefined && queryErrorHeader != null) {
|
|
454
469
|
const [Code, Type] = queryErrorHeader.split(";");
|
|
455
|
-
const
|
|
470
|
+
const keys = Object.keys(output);
|
|
456
471
|
const Error = {
|
|
457
472
|
Code,
|
|
458
473
|
Type,
|
|
459
474
|
};
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
475
|
+
output.Code = Code;
|
|
476
|
+
output.Type = Type;
|
|
477
|
+
for (let i = 0; i < keys.length; i++) {
|
|
478
|
+
const k = keys[i];
|
|
479
|
+
Error[k === "message" ? "Message" : k] = output[k];
|
|
463
480
|
}
|
|
464
481
|
delete Error.__type;
|
|
465
482
|
output.Error = Error;
|
|
@@ -598,7 +615,10 @@ class UnionSerde {
|
|
|
598
615
|
constructor(from, to) {
|
|
599
616
|
this.from = from;
|
|
600
617
|
this.to = to;
|
|
601
|
-
|
|
618
|
+
const keys = Object.keys(this.from);
|
|
619
|
+
const set = new Set(keys);
|
|
620
|
+
set.delete("__type");
|
|
621
|
+
this.keys = set;
|
|
602
622
|
}
|
|
603
623
|
mark(key) {
|
|
604
624
|
this.keys.delete(key);
|
|
@@ -656,24 +676,24 @@ const parseJsonErrorBody = async (errorBody, context) => {
|
|
|
656
676
|
value.message = value.message ?? value.Message;
|
|
657
677
|
return value;
|
|
658
678
|
};
|
|
679
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
680
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
681
|
+
let cleanValue = rawValue;
|
|
682
|
+
if (typeof cleanValue === "number") {
|
|
683
|
+
cleanValue = cleanValue.toString();
|
|
684
|
+
}
|
|
685
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
686
|
+
cleanValue = cleanValue.split(",")[0];
|
|
687
|
+
}
|
|
688
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
689
|
+
cleanValue = cleanValue.split(":")[0];
|
|
690
|
+
}
|
|
691
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
692
|
+
cleanValue = cleanValue.split("#")[1];
|
|
693
|
+
}
|
|
694
|
+
return cleanValue;
|
|
695
|
+
};
|
|
659
696
|
const loadRestJsonErrorCode = (output, data) => {
|
|
660
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
661
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
662
|
-
let cleanValue = rawValue;
|
|
663
|
-
if (typeof cleanValue === "number") {
|
|
664
|
-
cleanValue = cleanValue.toString();
|
|
665
|
-
}
|
|
666
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
667
|
-
cleanValue = cleanValue.split(",")[0];
|
|
668
|
-
}
|
|
669
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
670
|
-
cleanValue = cleanValue.split(":")[0];
|
|
671
|
-
}
|
|
672
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
673
|
-
cleanValue = cleanValue.split("#")[1];
|
|
674
|
-
}
|
|
675
|
-
return cleanValue;
|
|
676
|
-
};
|
|
677
697
|
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
678
698
|
if (headerKey !== undefined) {
|
|
679
699
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
@@ -890,12 +910,6 @@ class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
890
910
|
this.rootSchema = schema.NormalizedSchema.of(schema$1);
|
|
891
911
|
this.buffer = this._write(this.rootSchema, value);
|
|
892
912
|
}
|
|
893
|
-
writeDiscriminatedDocument(schema$1, value) {
|
|
894
|
-
this.write(schema$1, value);
|
|
895
|
-
if (typeof this.buffer === "object") {
|
|
896
|
-
this.buffer.__type = schema.NormalizedSchema.of(schema$1).getName(true);
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
913
|
flush() {
|
|
900
914
|
const { rootSchema, useReplacer } = this;
|
|
901
915
|
this.rootSchema = undefined;
|
|
@@ -909,6 +923,12 @@ class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
909
923
|
}
|
|
910
924
|
return this.buffer;
|
|
911
925
|
}
|
|
926
|
+
writeDiscriminatedDocument(schema$1, value) {
|
|
927
|
+
this.write(schema$1, value);
|
|
928
|
+
if (typeof this.buffer === "object") {
|
|
929
|
+
this.buffer.__type = schema.NormalizedSchema.of(schema$1).getName(true);
|
|
930
|
+
}
|
|
931
|
+
}
|
|
912
932
|
_write(schema$1, value, container) {
|
|
913
933
|
const isObject = value !== null && typeof value === "object";
|
|
914
934
|
const ns = schema.NormalizedSchema.of(schema$1);
|
|
@@ -921,6 +941,7 @@ class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
921
941
|
if (jsonName) {
|
|
922
942
|
nameMap = {};
|
|
923
943
|
}
|
|
944
|
+
let outCount = 0;
|
|
924
945
|
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
925
946
|
const serializableValue = this._write(memberSchema, record[memberName], ns);
|
|
926
947
|
if (serializableValue !== undefined) {
|
|
@@ -930,9 +951,10 @@ class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
930
951
|
nameMap[memberName] = targetKey;
|
|
931
952
|
}
|
|
932
953
|
out[targetKey] = serializableValue;
|
|
954
|
+
outCount++;
|
|
933
955
|
}
|
|
934
956
|
}
|
|
935
|
-
if (ns.isUnionSchema() &&
|
|
957
|
+
if (ns.isUnionSchema() && outCount === 0) {
|
|
936
958
|
const { $unknown } = record;
|
|
937
959
|
if (Array.isArray($unknown)) {
|
|
938
960
|
const [k, v] = $unknown;
|
|
@@ -1098,10 +1120,8 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
|
|
|
1098
1120
|
if (!request.path.endsWith("/")) {
|
|
1099
1121
|
request.path += "/";
|
|
1100
1122
|
}
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
"x-amz-target": `${this.serviceTarget}.${operationSchema.name}`,
|
|
1104
|
-
});
|
|
1123
|
+
request.headers["content-type"] = `application/x-amz-json-${this.getJsonRpcVersion()}`;
|
|
1124
|
+
request.headers["x-amz-target"] = `${this.serviceTarget}.${operationSchema.name}`;
|
|
1105
1125
|
if (this.awsQueryCompatible) {
|
|
1106
1126
|
request.headers["x-amzn-query-mode"] = "true";
|
|
1107
1127
|
}
|
|
@@ -1125,9 +1145,10 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
|
|
|
1125
1145
|
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
1126
1146
|
const exception = new ErrorCtor(message);
|
|
1127
1147
|
const output = {};
|
|
1148
|
+
const errorDeserializer = this.codec.createDeserializer();
|
|
1128
1149
|
for (const [name, member] of ns.structIterator()) {
|
|
1129
1150
|
if (dataObject[name] != null) {
|
|
1130
|
-
output[name] =
|
|
1151
|
+
output[name] = errorDeserializer.readObject(member, dataObject[name]);
|
|
1131
1152
|
}
|
|
1132
1153
|
}
|
|
1133
1154
|
if (this.awsQueryCompatible) {
|
|
@@ -1248,9 +1269,10 @@ class AwsRestJsonProtocol extends protocols.HttpBindingProtocol {
|
|
|
1248
1269
|
const exception = new ErrorCtor(message);
|
|
1249
1270
|
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
|
1250
1271
|
const output = {};
|
|
1272
|
+
const errorDeserializer = this.codec.createDeserializer();
|
|
1251
1273
|
for (const [name, member] of ns.structIterator()) {
|
|
1252
1274
|
const target = member.getMergedTraits().jsonName ?? name;
|
|
1253
|
-
output[name] =
|
|
1275
|
+
output[name] = errorDeserializer.readObject(member, dataObject[target]);
|
|
1254
1276
|
}
|
|
1255
1277
|
throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
|
|
1256
1278
|
$fault: ns.getMergedTraits().error,
|
|
@@ -1641,9 +1663,7 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
|
|
|
1641
1663
|
if (!request.path.endsWith("/")) {
|
|
1642
1664
|
request.path += "/";
|
|
1643
1665
|
}
|
|
1644
|
-
|
|
1645
|
-
"content-type": `application/x-www-form-urlencoded`,
|
|
1646
|
-
});
|
|
1666
|
+
request.headers["content-type"] = "application/x-www-form-urlencoded";
|
|
1647
1667
|
if (schema.deref(operationSchema.input) === "unit" || !request.body) {
|
|
1648
1668
|
request.body = "";
|
|
1649
1669
|
}
|
|
@@ -1676,11 +1696,8 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
|
|
|
1676
1696
|
if (bytes.byteLength > 0) {
|
|
1677
1697
|
Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
|
|
1678
1698
|
}
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
...dataObject,
|
|
1682
|
-
};
|
|
1683
|
-
return output;
|
|
1699
|
+
dataObject.$metadata = this.deserializeMetadata(response);
|
|
1700
|
+
return dataObject;
|
|
1684
1701
|
}
|
|
1685
1702
|
useNestedResult() {
|
|
1686
1703
|
return true;
|
|
@@ -2180,10 +2197,11 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol {
|
|
|
2180
2197
|
const exception = new ErrorCtor(message);
|
|
2181
2198
|
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
|
2182
2199
|
const output = {};
|
|
2200
|
+
const errorDeserializer = this.codec.createDeserializer();
|
|
2183
2201
|
for (const [name, member] of ns.structIterator()) {
|
|
2184
2202
|
const target = member.getMergedTraits().xmlName ?? name;
|
|
2185
2203
|
const value = dataObject.Error?.[target] ?? dataObject[target];
|
|
2186
|
-
output[name] =
|
|
2204
|
+
output[name] = errorDeserializer.readSchema(member, value);
|
|
2187
2205
|
}
|
|
2188
2206
|
throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
|
|
2189
2207
|
$fault: ns.getMergedTraits().error,
|
|
@@ -2229,6 +2247,7 @@ exports._toStr = _toStr;
|
|
|
2229
2247
|
exports.awsExpectUnion = awsExpectUnion;
|
|
2230
2248
|
exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion;
|
|
2231
2249
|
exports.getBearerTokenEnvKey = getBearerTokenEnvKey;
|
|
2250
|
+
exports.getLongPollPlugin = getLongPollPlugin;
|
|
2232
2251
|
exports.loadRestJsonErrorCode = loadRestJsonErrorCode;
|
|
2233
2252
|
exports.loadRestXmlErrorCode = loadRestXmlErrorCode;
|
|
2234
2253
|
exports.parseJsonBody = parseJsonBody;
|
|
@@ -16,6 +16,22 @@ More information can be found at: https://a.co/c895JFp`);
|
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
+
const longPollMiddleware = () => (next, context) => async (args) => {
|
|
20
|
+
context.__retryLongPoll = true;
|
|
21
|
+
return next(args);
|
|
22
|
+
};
|
|
23
|
+
const longPollMiddlewareOptions = {
|
|
24
|
+
name: "longPollMiddleware",
|
|
25
|
+
tags: ["RETRY"],
|
|
26
|
+
step: "initialize",
|
|
27
|
+
override: true,
|
|
28
|
+
};
|
|
29
|
+
const getLongPollPlugin = (options) => ({
|
|
30
|
+
applyToStack: (clientStack) => {
|
|
31
|
+
clientStack.add(longPollMiddleware(), longPollMiddlewareOptions);
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
|
|
19
35
|
function setCredentialFeature(credentials, feature, value) {
|
|
20
36
|
if (!credentials.$source) {
|
|
21
37
|
credentials.$source = {};
|
|
@@ -45,6 +61,7 @@ function setTokenFeature(token, feature, value) {
|
|
|
45
61
|
}
|
|
46
62
|
|
|
47
63
|
exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion;
|
|
64
|
+
exports.getLongPollPlugin = getLongPollPlugin;
|
|
48
65
|
exports.setCredentialFeature = setCredentialFeature;
|
|
49
66
|
exports.setFeature = setFeature;
|
|
50
67
|
exports.setTokenFeature = setTokenFeature;
|
|
@@ -96,12 +96,11 @@ class ProtocolLib {
|
|
|
96
96
|
if (msg) {
|
|
97
97
|
error.message = msg;
|
|
98
98
|
}
|
|
99
|
-
error.Error
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
};
|
|
99
|
+
const errorObj = error.Error ?? {};
|
|
100
|
+
errorObj.Type = error.Error?.Type;
|
|
101
|
+
errorObj.Code = error.Error?.Code;
|
|
102
|
+
errorObj.Message = error.Error?.message ?? error.Error?.Message ?? msg;
|
|
103
|
+
error.Error = errorObj;
|
|
105
104
|
const reqId = error.$metadata.requestId;
|
|
106
105
|
if (reqId) {
|
|
107
106
|
error.RequestId = reqId;
|
|
@@ -114,14 +113,16 @@ class ProtocolLib {
|
|
|
114
113
|
const queryErrorHeader = response.headers?.["x-amzn-query-error"];
|
|
115
114
|
if (output !== undefined && queryErrorHeader != null) {
|
|
116
115
|
const [Code, Type] = queryErrorHeader.split(";");
|
|
117
|
-
const
|
|
116
|
+
const keys = Object.keys(output);
|
|
118
117
|
const Error = {
|
|
119
118
|
Code,
|
|
120
119
|
Type,
|
|
121
120
|
};
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
output.Code = Code;
|
|
122
|
+
output.Type = Type;
|
|
123
|
+
for (let i = 0; i < keys.length; i++) {
|
|
124
|
+
const k = keys[i];
|
|
125
|
+
Error[k === "message" ? "Message" : k] = output[k];
|
|
125
126
|
}
|
|
126
127
|
delete Error.__type;
|
|
127
128
|
output.Error = Error;
|
|
@@ -260,7 +261,10 @@ class UnionSerde {
|
|
|
260
261
|
constructor(from, to) {
|
|
261
262
|
this.from = from;
|
|
262
263
|
this.to = to;
|
|
263
|
-
|
|
264
|
+
const keys = Object.keys(this.from);
|
|
265
|
+
const set = new Set(keys);
|
|
266
|
+
set.delete("__type");
|
|
267
|
+
this.keys = set;
|
|
264
268
|
}
|
|
265
269
|
mark(key) {
|
|
266
270
|
this.keys.delete(key);
|
|
@@ -318,24 +322,24 @@ const parseJsonErrorBody = async (errorBody, context) => {
|
|
|
318
322
|
value.message = value.message ?? value.Message;
|
|
319
323
|
return value;
|
|
320
324
|
};
|
|
325
|
+
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
326
|
+
const sanitizeErrorCode = (rawValue) => {
|
|
327
|
+
let cleanValue = rawValue;
|
|
328
|
+
if (typeof cleanValue === "number") {
|
|
329
|
+
cleanValue = cleanValue.toString();
|
|
330
|
+
}
|
|
331
|
+
if (cleanValue.indexOf(",") >= 0) {
|
|
332
|
+
cleanValue = cleanValue.split(",")[0];
|
|
333
|
+
}
|
|
334
|
+
if (cleanValue.indexOf(":") >= 0) {
|
|
335
|
+
cleanValue = cleanValue.split(":")[0];
|
|
336
|
+
}
|
|
337
|
+
if (cleanValue.indexOf("#") >= 0) {
|
|
338
|
+
cleanValue = cleanValue.split("#")[1];
|
|
339
|
+
}
|
|
340
|
+
return cleanValue;
|
|
341
|
+
};
|
|
321
342
|
const loadRestJsonErrorCode = (output, data) => {
|
|
322
|
-
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
323
|
-
const sanitizeErrorCode = (rawValue) => {
|
|
324
|
-
let cleanValue = rawValue;
|
|
325
|
-
if (typeof cleanValue === "number") {
|
|
326
|
-
cleanValue = cleanValue.toString();
|
|
327
|
-
}
|
|
328
|
-
if (cleanValue.indexOf(",") >= 0) {
|
|
329
|
-
cleanValue = cleanValue.split(",")[0];
|
|
330
|
-
}
|
|
331
|
-
if (cleanValue.indexOf(":") >= 0) {
|
|
332
|
-
cleanValue = cleanValue.split(":")[0];
|
|
333
|
-
}
|
|
334
|
-
if (cleanValue.indexOf("#") >= 0) {
|
|
335
|
-
cleanValue = cleanValue.split("#")[1];
|
|
336
|
-
}
|
|
337
|
-
return cleanValue;
|
|
338
|
-
};
|
|
339
343
|
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
|
340
344
|
if (headerKey !== undefined) {
|
|
341
345
|
return sanitizeErrorCode(output.headers[headerKey]);
|
|
@@ -552,12 +556,6 @@ class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
552
556
|
this.rootSchema = schema.NormalizedSchema.of(schema$1);
|
|
553
557
|
this.buffer = this._write(this.rootSchema, value);
|
|
554
558
|
}
|
|
555
|
-
writeDiscriminatedDocument(schema$1, value) {
|
|
556
|
-
this.write(schema$1, value);
|
|
557
|
-
if (typeof this.buffer === "object") {
|
|
558
|
-
this.buffer.__type = schema.NormalizedSchema.of(schema$1).getName(true);
|
|
559
|
-
}
|
|
560
|
-
}
|
|
561
559
|
flush() {
|
|
562
560
|
const { rootSchema, useReplacer } = this;
|
|
563
561
|
this.rootSchema = undefined;
|
|
@@ -571,6 +569,12 @@ class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
571
569
|
}
|
|
572
570
|
return this.buffer;
|
|
573
571
|
}
|
|
572
|
+
writeDiscriminatedDocument(schema$1, value) {
|
|
573
|
+
this.write(schema$1, value);
|
|
574
|
+
if (typeof this.buffer === "object") {
|
|
575
|
+
this.buffer.__type = schema.NormalizedSchema.of(schema$1).getName(true);
|
|
576
|
+
}
|
|
577
|
+
}
|
|
574
578
|
_write(schema$1, value, container) {
|
|
575
579
|
const isObject = value !== null && typeof value === "object";
|
|
576
580
|
const ns = schema.NormalizedSchema.of(schema$1);
|
|
@@ -583,6 +587,7 @@ class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
583
587
|
if (jsonName) {
|
|
584
588
|
nameMap = {};
|
|
585
589
|
}
|
|
590
|
+
let outCount = 0;
|
|
586
591
|
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
587
592
|
const serializableValue = this._write(memberSchema, record[memberName], ns);
|
|
588
593
|
if (serializableValue !== undefined) {
|
|
@@ -592,9 +597,10 @@ class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
592
597
|
nameMap[memberName] = targetKey;
|
|
593
598
|
}
|
|
594
599
|
out[targetKey] = serializableValue;
|
|
600
|
+
outCount++;
|
|
595
601
|
}
|
|
596
602
|
}
|
|
597
|
-
if (ns.isUnionSchema() &&
|
|
603
|
+
if (ns.isUnionSchema() && outCount === 0) {
|
|
598
604
|
const { $unknown } = record;
|
|
599
605
|
if (Array.isArray($unknown)) {
|
|
600
606
|
const [k, v] = $unknown;
|
|
@@ -760,10 +766,8 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
|
|
|
760
766
|
if (!request.path.endsWith("/")) {
|
|
761
767
|
request.path += "/";
|
|
762
768
|
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
"x-amz-target": `${this.serviceTarget}.${operationSchema.name}`,
|
|
766
|
-
});
|
|
769
|
+
request.headers["content-type"] = `application/x-amz-json-${this.getJsonRpcVersion()}`;
|
|
770
|
+
request.headers["x-amz-target"] = `${this.serviceTarget}.${operationSchema.name}`;
|
|
767
771
|
if (this.awsQueryCompatible) {
|
|
768
772
|
request.headers["x-amzn-query-mode"] = "true";
|
|
769
773
|
}
|
|
@@ -787,9 +791,10 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol {
|
|
|
787
791
|
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
788
792
|
const exception = new ErrorCtor(message);
|
|
789
793
|
const output = {};
|
|
794
|
+
const errorDeserializer = this.codec.createDeserializer();
|
|
790
795
|
for (const [name, member] of ns.structIterator()) {
|
|
791
796
|
if (dataObject[name] != null) {
|
|
792
|
-
output[name] =
|
|
797
|
+
output[name] = errorDeserializer.readObject(member, dataObject[name]);
|
|
793
798
|
}
|
|
794
799
|
}
|
|
795
800
|
if (this.awsQueryCompatible) {
|
|
@@ -910,9 +915,10 @@ class AwsRestJsonProtocol extends protocols.HttpBindingProtocol {
|
|
|
910
915
|
const exception = new ErrorCtor(message);
|
|
911
916
|
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
|
912
917
|
const output = {};
|
|
918
|
+
const errorDeserializer = this.codec.createDeserializer();
|
|
913
919
|
for (const [name, member] of ns.structIterator()) {
|
|
914
920
|
const target = member.getMergedTraits().jsonName ?? name;
|
|
915
|
-
output[name] =
|
|
921
|
+
output[name] = errorDeserializer.readObject(member, dataObject[target]);
|
|
916
922
|
}
|
|
917
923
|
throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
|
|
918
924
|
$fault: ns.getMergedTraits().error,
|
|
@@ -1303,9 +1309,7 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
|
|
|
1303
1309
|
if (!request.path.endsWith("/")) {
|
|
1304
1310
|
request.path += "/";
|
|
1305
1311
|
}
|
|
1306
|
-
|
|
1307
|
-
"content-type": `application/x-www-form-urlencoded`,
|
|
1308
|
-
});
|
|
1312
|
+
request.headers["content-type"] = "application/x-www-form-urlencoded";
|
|
1309
1313
|
if (schema.deref(operationSchema.input) === "unit" || !request.body) {
|
|
1310
1314
|
request.body = "";
|
|
1311
1315
|
}
|
|
@@ -1338,11 +1342,8 @@ class AwsQueryProtocol extends protocols.RpcProtocol {
|
|
|
1338
1342
|
if (bytes.byteLength > 0) {
|
|
1339
1343
|
Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
|
|
1340
1344
|
}
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
...dataObject,
|
|
1344
|
-
};
|
|
1345
|
-
return output;
|
|
1345
|
+
dataObject.$metadata = this.deserializeMetadata(response);
|
|
1346
|
+
return dataObject;
|
|
1346
1347
|
}
|
|
1347
1348
|
useNestedResult() {
|
|
1348
1349
|
return true;
|
|
@@ -1842,10 +1843,11 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol {
|
|
|
1842
1843
|
const exception = new ErrorCtor(message);
|
|
1843
1844
|
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
|
1844
1845
|
const output = {};
|
|
1846
|
+
const errorDeserializer = this.codec.createDeserializer();
|
|
1845
1847
|
for (const [name, member] of ns.structIterator()) {
|
|
1846
1848
|
const target = member.getMergedTraits().xmlName ?? name;
|
|
1847
1849
|
const value = dataObject.Error?.[target] ?? dataObject[target];
|
|
1848
|
-
output[name] =
|
|
1850
|
+
output[name] = errorDeserializer.readSchema(member, value);
|
|
1849
1851
|
}
|
|
1850
1852
|
throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
|
|
1851
1853
|
$fault: ns.getMergedTraits().error,
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const longPollMiddleware = () => (next, context) => async (args) => {
|
|
2
|
+
context.__retryLongPoll = true;
|
|
3
|
+
return next(args);
|
|
4
|
+
};
|
|
5
|
+
export const longPollMiddlewareOptions = {
|
|
6
|
+
name: "longPollMiddleware",
|
|
7
|
+
tags: ["RETRY"],
|
|
8
|
+
step: "initialize",
|
|
9
|
+
override: true,
|
|
10
|
+
};
|
|
11
|
+
export const getLongPollPlugin = (options) => ({
|
|
12
|
+
applyToStack: (clientStack) => {
|
|
13
|
+
clientStack.add(longPollMiddleware(), longPollMiddlewareOptions);
|
|
14
|
+
},
|
|
15
|
+
});
|
|
@@ -87,12 +87,11 @@ export class ProtocolLib {
|
|
|
87
87
|
if (msg) {
|
|
88
88
|
error.message = msg;
|
|
89
89
|
}
|
|
90
|
-
error.Error
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
};
|
|
90
|
+
const errorObj = error.Error ?? {};
|
|
91
|
+
errorObj.Type = error.Error?.Type;
|
|
92
|
+
errorObj.Code = error.Error?.Code;
|
|
93
|
+
errorObj.Message = error.Error?.message ?? error.Error?.Message ?? msg;
|
|
94
|
+
error.Error = errorObj;
|
|
96
95
|
const reqId = error.$metadata.requestId;
|
|
97
96
|
if (reqId) {
|
|
98
97
|
error.RequestId = reqId;
|
|
@@ -105,14 +104,16 @@ export class ProtocolLib {
|
|
|
105
104
|
const queryErrorHeader = response.headers?.["x-amzn-query-error"];
|
|
106
105
|
if (output !== undefined && queryErrorHeader != null) {
|
|
107
106
|
const [Code, Type] = queryErrorHeader.split(";");
|
|
108
|
-
const
|
|
107
|
+
const keys = Object.keys(output);
|
|
109
108
|
const Error = {
|
|
110
109
|
Code,
|
|
111
110
|
Type,
|
|
112
111
|
};
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
output.Code = Code;
|
|
113
|
+
output.Type = Type;
|
|
114
|
+
for (let i = 0; i < keys.length; i++) {
|
|
115
|
+
const k = keys[i];
|
|
116
|
+
Error[k === "message" ? "Message" : k] = output[k];
|
|
116
117
|
}
|
|
117
118
|
delete Error.__type;
|
|
118
119
|
output.Error = Error;
|
|
@@ -5,7 +5,10 @@ export class UnionSerde {
|
|
|
5
5
|
constructor(from, to) {
|
|
6
6
|
this.from = from;
|
|
7
7
|
this.to = to;
|
|
8
|
-
|
|
8
|
+
const keys = Object.keys(this.from);
|
|
9
|
+
const set = new Set(keys);
|
|
10
|
+
set.delete("__type");
|
|
11
|
+
this.keys = set;
|
|
9
12
|
}
|
|
10
13
|
mark(key) {
|
|
11
14
|
this.keys.delete(key);
|
|
@@ -35,10 +35,8 @@ export class AwsJsonRpcProtocol extends RpcProtocol {
|
|
|
35
35
|
if (!request.path.endsWith("/")) {
|
|
36
36
|
request.path += "/";
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"x-amz-target": `${this.serviceTarget}.${operationSchema.name}`,
|
|
41
|
-
});
|
|
38
|
+
request.headers["content-type"] = `application/x-amz-json-${this.getJsonRpcVersion()}`;
|
|
39
|
+
request.headers["x-amz-target"] = `${this.serviceTarget}.${operationSchema.name}`;
|
|
42
40
|
if (this.awsQueryCompatible) {
|
|
43
41
|
request.headers["x-amzn-query-mode"] = "true";
|
|
44
42
|
}
|
|
@@ -62,9 +60,10 @@ export class AwsJsonRpcProtocol extends RpcProtocol {
|
|
|
62
60
|
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
|
63
61
|
const exception = new ErrorCtor(message);
|
|
64
62
|
const output = {};
|
|
63
|
+
const errorDeserializer = this.codec.createDeserializer();
|
|
65
64
|
for (const [name, member] of ns.structIterator()) {
|
|
66
65
|
if (dataObject[name] != null) {
|
|
67
|
-
output[name] =
|
|
66
|
+
output[name] = errorDeserializer.readObject(member, dataObject[name]);
|
|
68
67
|
}
|
|
69
68
|
}
|
|
70
69
|
if (this.awsQueryCompatible) {
|
|
@@ -69,9 +69,10 @@ export class AwsRestJsonProtocol extends HttpBindingProtocol {
|
|
|
69
69
|
const exception = new ErrorCtor(message);
|
|
70
70
|
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
|
71
71
|
const output = {};
|
|
72
|
+
const errorDeserializer = this.codec.createDeserializer();
|
|
72
73
|
for (const [name, member] of ns.structIterator()) {
|
|
73
74
|
const target = member.getMergedTraits().jsonName ?? name;
|
|
74
|
-
output[name] =
|
|
75
|
+
output[name] = errorDeserializer.readObject(member, dataObject[target]);
|
|
75
76
|
}
|
|
76
77
|
throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
|
|
77
78
|
$fault: ns.getMergedTraits().error,
|
|
@@ -17,12 +17,6 @@ export class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
17
17
|
this.rootSchema = NormalizedSchema.of(schema);
|
|
18
18
|
this.buffer = this._write(this.rootSchema, value);
|
|
19
19
|
}
|
|
20
|
-
writeDiscriminatedDocument(schema, value) {
|
|
21
|
-
this.write(schema, value);
|
|
22
|
-
if (typeof this.buffer === "object") {
|
|
23
|
-
this.buffer.__type = NormalizedSchema.of(schema).getName(true);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
20
|
flush() {
|
|
27
21
|
const { rootSchema, useReplacer } = this;
|
|
28
22
|
this.rootSchema = undefined;
|
|
@@ -36,6 +30,12 @@ export class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
36
30
|
}
|
|
37
31
|
return this.buffer;
|
|
38
32
|
}
|
|
33
|
+
writeDiscriminatedDocument(schema, value) {
|
|
34
|
+
this.write(schema, value);
|
|
35
|
+
if (typeof this.buffer === "object") {
|
|
36
|
+
this.buffer.__type = NormalizedSchema.of(schema).getName(true);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
39
|
_write(schema, value, container) {
|
|
40
40
|
const isObject = value !== null && typeof value === "object";
|
|
41
41
|
const ns = NormalizedSchema.of(schema);
|
|
@@ -48,6 +48,7 @@ export class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
48
48
|
if (jsonName) {
|
|
49
49
|
nameMap = {};
|
|
50
50
|
}
|
|
51
|
+
let outCount = 0;
|
|
51
52
|
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
52
53
|
const serializableValue = this._write(memberSchema, record[memberName], ns);
|
|
53
54
|
if (serializableValue !== undefined) {
|
|
@@ -57,9 +58,10 @@ export class JsonShapeSerializer extends SerdeContextConfig {
|
|
|
57
58
|
nameMap[memberName] = targetKey;
|
|
58
59
|
}
|
|
59
60
|
out[targetKey] = serializableValue;
|
|
61
|
+
outCount++;
|
|
60
62
|
}
|
|
61
63
|
}
|
|
62
|
-
if (ns.isUnionSchema() &&
|
|
64
|
+
if (ns.isUnionSchema() && outCount === 0) {
|
|
63
65
|
const { $unknown } = record;
|
|
64
66
|
if (Array.isArray($unknown)) {
|
|
65
67
|
const [k, v] = $unknown;
|