@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/hash-stream-node",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.14",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline hash-stream-node",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"sideEffects": false,
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@smithy/types": "^4.14.
|
|
26
|
+
"@smithy/types": "^4.14.1",
|
|
27
27
|
"@smithy/util-utf8": "^4.2.2",
|
|
28
28
|
"tslib": "^2.6.2"
|
|
29
29
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/invalid-dependency",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.14",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline invalid-dependency",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"sideEffects": false,
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@smithy/types": "^4.14.
|
|
26
|
+
"@smithy/types": "^4.14.1",
|
|
27
27
|
"tslib": "^2.6.2"
|
|
28
28
|
},
|
|
29
29
|
"typesVersions": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/md5-js",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.14",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline md5-js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"typedoc": "0.23.23"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@smithy/types": "^4.14.
|
|
36
|
+
"@smithy/types": "^4.14.1",
|
|
37
37
|
"@smithy/util-utf8": "^4.2.2",
|
|
38
38
|
"tslib": "^2.6.2"
|
|
39
39
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-compression",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.45",
|
|
4
4
|
"description": "Middleware and Plugin for request compression.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
"main": "./dist-cjs/index.js",
|
|
16
16
|
"module": "./dist-es/index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@smithy/core": "^3.23.
|
|
18
|
+
"@smithy/core": "^3.23.16",
|
|
19
19
|
"@smithy/is-array-buffer": "^4.2.2",
|
|
20
|
-
"@smithy/node-config-provider": "^4.3.
|
|
21
|
-
"@smithy/protocol-http": "^5.3.
|
|
22
|
-
"@smithy/types": "^4.14.
|
|
20
|
+
"@smithy/node-config-provider": "^4.3.14",
|
|
21
|
+
"@smithy/protocol-http": "^5.3.14",
|
|
22
|
+
"@smithy/types": "^4.14.1",
|
|
23
23
|
"@smithy/util-config-provider": "^4.2.2",
|
|
24
|
-
"@smithy/util-middleware": "^4.2.
|
|
24
|
+
"@smithy/util-middleware": "^4.2.14",
|
|
25
25
|
"@smithy/util-utf8": "^4.2.2",
|
|
26
26
|
"fflate": "0.8.1",
|
|
27
27
|
"tslib": "^2.6.2"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-content-length",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.14",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline middleware-content-length",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"sideEffects": false,
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@smithy/protocol-http": "^5.3.
|
|
28
|
-
"@smithy/types": "^4.14.
|
|
27
|
+
"@smithy/protocol-http": "^5.3.14",
|
|
28
|
+
"@smithy/types": "^4.14.1",
|
|
29
29
|
"tslib": "^2.6.2"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-endpoint",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.31",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline middleware-endpoint",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"sideEffects": false,
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@smithy/core": "^3.23.
|
|
28
|
-
"@smithy/middleware-serde": "^4.2.
|
|
29
|
-
"@smithy/node-config-provider": "^4.3.
|
|
30
|
-
"@smithy/shared-ini-file-loader": "^4.4.
|
|
31
|
-
"@smithy/types": "^4.14.
|
|
32
|
-
"@smithy/url-parser": "^4.2.
|
|
33
|
-
"@smithy/util-middleware": "^4.2.
|
|
27
|
+
"@smithy/core": "^3.23.16",
|
|
28
|
+
"@smithy/middleware-serde": "^4.2.19",
|
|
29
|
+
"@smithy/node-config-provider": "^4.3.14",
|
|
30
|
+
"@smithy/shared-ini-file-loader": "^4.4.9",
|
|
31
|
+
"@smithy/types": "^4.14.1",
|
|
32
|
+
"@smithy/url-parser": "^4.2.14",
|
|
33
|
+
"@smithy/util-middleware": "^4.2.14",
|
|
34
34
|
"tslib": "^2.6.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-retry",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.4",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline middleware-retry",
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
"license": "Apache-2.0",
|
|
34
34
|
"sideEffects": false,
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@smithy/core": "^3.23.
|
|
37
|
-
"@smithy/node-config-provider": "^4.3.
|
|
38
|
-
"@smithy/protocol-http": "^5.3.
|
|
39
|
-
"@smithy/service-error-classification": "^4.
|
|
40
|
-
"@smithy/smithy-client": "^4.12.
|
|
41
|
-
"@smithy/types": "^4.14.
|
|
42
|
-
"@smithy/util-middleware": "^4.2.
|
|
43
|
-
"@smithy/util-retry": "^4.3.
|
|
36
|
+
"@smithy/core": "^3.23.16",
|
|
37
|
+
"@smithy/node-config-provider": "^4.3.14",
|
|
38
|
+
"@smithy/protocol-http": "^5.3.14",
|
|
39
|
+
"@smithy/service-error-classification": "^4.3.0",
|
|
40
|
+
"@smithy/smithy-client": "^4.12.12",
|
|
41
|
+
"@smithy/types": "^4.14.1",
|
|
42
|
+
"@smithy/util-middleware": "^4.2.14",
|
|
43
|
+
"@smithy/util-retry": "^4.3.3",
|
|
44
44
|
"@smithy/uuid": "^1.1.2",
|
|
45
45
|
"tslib": "^2.6.2"
|
|
46
46
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-serde",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.19",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
6
6
|
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline middleware-serde",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@smithy/core": "^3.23.
|
|
29
|
-
"@smithy/protocol-http": "^5.3.
|
|
30
|
-
"@smithy/types": "^4.14.
|
|
28
|
+
"@smithy/core": "^3.23.16",
|
|
29
|
+
"@smithy/protocol-http": "^5.3.14",
|
|
30
|
+
"@smithy/types": "^4.14.1",
|
|
31
31
|
"tslib": "^2.6.2"
|
|
32
32
|
},
|
|
33
33
|
"engines": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-stack",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.14",
|
|
4
4
|
"description": "Provides a means for composing multiple middleware functions into a single handler",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"module": "./dist-es/index.js",
|
|
27
27
|
"types": "./dist-types/index.d.ts",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@smithy/types": "^4.14.
|
|
29
|
+
"@smithy/types": "^4.14.1",
|
|
30
30
|
"tslib": "^2.6.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/node-config-provider",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.14",
|
|
4
4
|
"description": "Load config default values from ini config files and environmental variable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"module": "./dist-es/index.js",
|
|
26
26
|
"types": "./dist-types/index.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@smithy/property-provider": "^4.2.
|
|
29
|
-
"@smithy/shared-ini-file-loader": "^4.4.
|
|
30
|
-
"@smithy/types": "^4.14.
|
|
28
|
+
"@smithy/property-provider": "^4.2.14",
|
|
29
|
+
"@smithy/shared-ini-file-loader": "^4.4.9",
|
|
30
|
+
"@smithy/types": "^4.14.1",
|
|
31
31
|
"tslib": "^2.6.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
@@ -425,58 +425,119 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
427
|
|
|
428
|
+
const ids = new Uint16Array(1);
|
|
429
|
+
class ClientHttp2SessionRef {
|
|
430
|
+
id = ids[0]++;
|
|
431
|
+
total = 0;
|
|
432
|
+
max = 0;
|
|
433
|
+
session;
|
|
434
|
+
refs = 0;
|
|
435
|
+
constructor(session) {
|
|
436
|
+
session.unref();
|
|
437
|
+
this.session = session;
|
|
438
|
+
}
|
|
439
|
+
retain() {
|
|
440
|
+
if (this.session.destroyed) {
|
|
441
|
+
throw new Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");
|
|
442
|
+
}
|
|
443
|
+
this.refs += 1;
|
|
444
|
+
this.total += 1;
|
|
445
|
+
this.max = Math.max(this.refs, this.max);
|
|
446
|
+
this.session.ref();
|
|
447
|
+
}
|
|
448
|
+
free() {
|
|
449
|
+
if (this.session.destroyed) {
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
this.refs -= 1;
|
|
453
|
+
if (this.refs === 0) {
|
|
454
|
+
this.session.unref();
|
|
455
|
+
}
|
|
456
|
+
if (this.refs < 0) {
|
|
457
|
+
throw new Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.");
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
deref() {
|
|
461
|
+
return this.session;
|
|
462
|
+
}
|
|
463
|
+
destroy() {
|
|
464
|
+
this.refs = 0;
|
|
465
|
+
if (!this.session.destroyed) {
|
|
466
|
+
this.session.destroy();
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
useCount() {
|
|
470
|
+
return this.refs;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
428
474
|
class NodeHttp2ConnectionPool {
|
|
429
475
|
sessions = [];
|
|
476
|
+
maxConcurrency = 0;
|
|
430
477
|
constructor(sessions) {
|
|
431
|
-
this.sessions = sessions ?? [];
|
|
478
|
+
this.sessions = (sessions ?? []).map((session) => new ClientHttp2SessionRef(session));
|
|
432
479
|
}
|
|
433
480
|
poll() {
|
|
434
|
-
|
|
435
|
-
|
|
481
|
+
let cleanup = false;
|
|
482
|
+
for (const session of this.sessions) {
|
|
483
|
+
if (session.deref().destroyed) {
|
|
484
|
+
cleanup = true;
|
|
485
|
+
continue;
|
|
486
|
+
}
|
|
487
|
+
if (!this.maxConcurrency || session.useCount() < this.maxConcurrency) {
|
|
488
|
+
return session;
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
if (cleanup) {
|
|
492
|
+
for (const session of this.sessions) {
|
|
493
|
+
if (session.deref().destroyed) {
|
|
494
|
+
this.remove(session);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
436
497
|
}
|
|
437
498
|
}
|
|
438
|
-
offerLast(
|
|
439
|
-
this.sessions.push(
|
|
440
|
-
}
|
|
441
|
-
contains(session) {
|
|
442
|
-
return this.sessions.includes(session);
|
|
499
|
+
offerLast(ref) {
|
|
500
|
+
this.sessions.push(ref);
|
|
443
501
|
}
|
|
444
|
-
remove(
|
|
445
|
-
|
|
502
|
+
remove(ref) {
|
|
503
|
+
const ix = this.sessions.indexOf(ref);
|
|
504
|
+
if (ix > -1) {
|
|
505
|
+
this.sessions.splice(ix, 1);
|
|
506
|
+
}
|
|
446
507
|
}
|
|
447
508
|
[Symbol.iterator]() {
|
|
448
509
|
return this.sessions[Symbol.iterator]();
|
|
449
510
|
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
}
|
|
457
|
-
}
|
|
511
|
+
setMaxConcurrency(maxConcurrency) {
|
|
512
|
+
this.maxConcurrency = maxConcurrency;
|
|
513
|
+
}
|
|
514
|
+
destroy(ref) {
|
|
515
|
+
this.remove(ref);
|
|
516
|
+
ref.destroy();
|
|
458
517
|
}
|
|
459
518
|
}
|
|
460
519
|
|
|
461
520
|
class NodeHttp2ConnectionManager {
|
|
521
|
+
config;
|
|
522
|
+
connectionPools = new Map();
|
|
462
523
|
constructor(config) {
|
|
463
524
|
this.config = config;
|
|
464
525
|
if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {
|
|
465
526
|
throw new RangeError("maxConcurrency must be greater than zero.");
|
|
466
527
|
}
|
|
467
528
|
}
|
|
468
|
-
config;
|
|
469
|
-
sessionCache = new Map();
|
|
470
529
|
lease(requestContext, connectionConfiguration) {
|
|
471
530
|
const url = this.getUrlString(requestContext);
|
|
472
|
-
const
|
|
473
|
-
if (
|
|
474
|
-
const
|
|
475
|
-
if (
|
|
476
|
-
|
|
531
|
+
const pool = this.getPool(url);
|
|
532
|
+
if (!this.config.disableConcurrency && !connectionConfiguration.isEventStream) {
|
|
533
|
+
const available = pool.poll();
|
|
534
|
+
if (available) {
|
|
535
|
+
available.retain();
|
|
536
|
+
return available;
|
|
477
537
|
}
|
|
478
538
|
}
|
|
479
|
-
const
|
|
539
|
+
const ref = new ClientHttp2SessionRef(http2.connect(url));
|
|
540
|
+
const session = ref.deref();
|
|
480
541
|
if (this.config.maxConcurrency) {
|
|
481
542
|
session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {
|
|
482
543
|
if (err) {
|
|
@@ -487,47 +548,48 @@ class NodeHttp2ConnectionManager {
|
|
|
487
548
|
}
|
|
488
549
|
});
|
|
489
550
|
}
|
|
490
|
-
session.unref();
|
|
491
551
|
const destroySessionCb = () => {
|
|
492
552
|
session.destroy();
|
|
493
|
-
this.
|
|
553
|
+
this.removeFromPool(url, ref);
|
|
494
554
|
};
|
|
495
555
|
session.on("goaway", destroySessionCb);
|
|
496
556
|
session.on("error", destroySessionCb);
|
|
497
557
|
session.on("frameError", destroySessionCb);
|
|
498
|
-
session.on("close", () => this.
|
|
558
|
+
session.on("close", () => this.removeFromPool(url, ref));
|
|
499
559
|
if (connectionConfiguration.requestTimeout) {
|
|
500
560
|
session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb);
|
|
501
561
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
return session;
|
|
562
|
+
pool.offerLast(ref);
|
|
563
|
+
ref.retain();
|
|
564
|
+
return ref;
|
|
506
565
|
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
if (!existingConnectionPool) {
|
|
510
|
-
return;
|
|
511
|
-
}
|
|
512
|
-
if (!existingConnectionPool.contains(session)) {
|
|
513
|
-
return;
|
|
514
|
-
}
|
|
515
|
-
existingConnectionPool.remove(session);
|
|
516
|
-
this.sessionCache.set(authority, existingConnectionPool);
|
|
566
|
+
release(_requestContext, ref) {
|
|
567
|
+
ref.free();
|
|
517
568
|
}
|
|
518
|
-
|
|
519
|
-
const
|
|
520
|
-
|
|
569
|
+
createIsolatedSession(requestContext, connectionConfiguration) {
|
|
570
|
+
const url = this.getUrlString(requestContext);
|
|
571
|
+
const ref = new ClientHttp2SessionRef(http2.connect(url));
|
|
572
|
+
const session = ref.deref();
|
|
573
|
+
session.settings({ maxConcurrentStreams: 1 });
|
|
574
|
+
const destroySession = () => {
|
|
575
|
+
session.destroy();
|
|
576
|
+
};
|
|
577
|
+
session.on("goaway", destroySession);
|
|
578
|
+
session.on("error", destroySession);
|
|
579
|
+
session.on("frameError", destroySession);
|
|
580
|
+
session.on("close", destroySession);
|
|
581
|
+
if (connectionConfiguration.requestTimeout) {
|
|
582
|
+
session.setTimeout(connectionConfiguration.requestTimeout, destroySession);
|
|
583
|
+
}
|
|
584
|
+
ref.retain();
|
|
585
|
+
return ref;
|
|
521
586
|
}
|
|
522
587
|
destroy() {
|
|
523
|
-
for (const [
|
|
524
|
-
for (const session of connectionPool) {
|
|
525
|
-
|
|
526
|
-
session.destroy();
|
|
527
|
-
}
|
|
528
|
-
connectionPool.remove(session);
|
|
588
|
+
for (const [url, connectionPool] of this.connectionPools) {
|
|
589
|
+
for (const session of [...connectionPool]) {
|
|
590
|
+
session.destroy();
|
|
529
591
|
}
|
|
530
|
-
this.
|
|
592
|
+
this.connectionPools.delete(url);
|
|
531
593
|
}
|
|
532
594
|
}
|
|
533
595
|
setMaxConcurrentStreams(maxConcurrentStreams) {
|
|
@@ -535,10 +597,42 @@ class NodeHttp2ConnectionManager {
|
|
|
535
597
|
throw new RangeError("maxConcurrentStreams must be greater than zero.");
|
|
536
598
|
}
|
|
537
599
|
this.config.maxConcurrency = maxConcurrentStreams;
|
|
600
|
+
for (const pool of this.connectionPools.values()) {
|
|
601
|
+
pool.setMaxConcurrency(maxConcurrentStreams);
|
|
602
|
+
}
|
|
538
603
|
}
|
|
539
604
|
setDisableConcurrentStreams(disableConcurrentStreams) {
|
|
540
605
|
this.config.disableConcurrency = disableConcurrentStreams;
|
|
541
606
|
}
|
|
607
|
+
debug() {
|
|
608
|
+
const pools = {};
|
|
609
|
+
for (const [url, pool] of this.connectionPools) {
|
|
610
|
+
const sessions = [];
|
|
611
|
+
for (const ref of pool) {
|
|
612
|
+
sessions.push({
|
|
613
|
+
id: ref.id,
|
|
614
|
+
active: ref.useCount(),
|
|
615
|
+
maxConcurrent: ref.max,
|
|
616
|
+
totalRequests: ref.total,
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
pools[url] = { sessions };
|
|
620
|
+
}
|
|
621
|
+
return pools;
|
|
622
|
+
}
|
|
623
|
+
removeFromPool(authority, ref) {
|
|
624
|
+
this.connectionPools.get(authority)?.remove(ref);
|
|
625
|
+
}
|
|
626
|
+
getPool(url) {
|
|
627
|
+
if (!this.connectionPools.has(url)) {
|
|
628
|
+
const pool = new NodeHttp2ConnectionPool();
|
|
629
|
+
if (this.config.maxConcurrency) {
|
|
630
|
+
pool.setMaxConcurrency(this.config.maxConcurrency);
|
|
631
|
+
}
|
|
632
|
+
this.connectionPools.set(url, pool);
|
|
633
|
+
}
|
|
634
|
+
return this.connectionPools.get(url);
|
|
635
|
+
}
|
|
542
636
|
getUrlString(request) {
|
|
543
637
|
return request.destination.toString();
|
|
544
638
|
}
|
|
@@ -572,15 +666,17 @@ class NodeHttp2Handler {
|
|
|
572
666
|
destroy() {
|
|
573
667
|
this.connectionManager.destroy();
|
|
574
668
|
}
|
|
575
|
-
async handle(request, { abortSignal, requestTimeout } = {}) {
|
|
669
|
+
async handle(request, { abortSignal, requestTimeout, isEventStream } = {}) {
|
|
576
670
|
if (!this.config) {
|
|
577
671
|
this.config = await this.configProvider;
|
|
578
|
-
this.
|
|
579
|
-
|
|
580
|
-
|
|
672
|
+
const { disableConcurrentStreams, maxConcurrentStreams } = this.config;
|
|
673
|
+
this.connectionManager.setDisableConcurrentStreams(disableConcurrentStreams ?? false);
|
|
674
|
+
if (maxConcurrentStreams) {
|
|
675
|
+
this.connectionManager.setMaxConcurrentStreams(maxConcurrentStreams);
|
|
581
676
|
}
|
|
582
677
|
}
|
|
583
678
|
const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config;
|
|
679
|
+
const useIsolatedSession = disableConcurrentStreams || isEventStream;
|
|
584
680
|
const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout;
|
|
585
681
|
return new Promise((_resolve, _reject) => {
|
|
586
682
|
let fulfilled = false;
|
|
@@ -608,18 +704,22 @@ class NodeHttp2Handler {
|
|
|
608
704
|
}
|
|
609
705
|
const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`;
|
|
610
706
|
const requestContext = { destination: new URL(authority) };
|
|
611
|
-
const
|
|
707
|
+
const connectConfig = {
|
|
612
708
|
requestTimeout: this.config?.sessionTimeout,
|
|
613
|
-
|
|
614
|
-
}
|
|
709
|
+
isEventStream,
|
|
710
|
+
};
|
|
711
|
+
const ref = useIsolatedSession
|
|
712
|
+
? this.connectionManager.createIsolatedSession(requestContext, connectConfig)
|
|
713
|
+
: this.connectionManager.lease(requestContext, connectConfig);
|
|
714
|
+
const session = ref.deref();
|
|
615
715
|
const rejectWithDestroy = (err) => {
|
|
616
|
-
if (
|
|
617
|
-
|
|
716
|
+
if (useIsolatedSession) {
|
|
717
|
+
ref.destroy();
|
|
618
718
|
}
|
|
619
719
|
fulfilled = true;
|
|
620
720
|
reject(err);
|
|
621
721
|
};
|
|
622
|
-
const queryString = querystringBuilder.buildQueryString(query
|
|
722
|
+
const queryString = querystringBuilder.buildQueryString(query ?? {});
|
|
623
723
|
let path = request.path;
|
|
624
724
|
if (queryString) {
|
|
625
725
|
path += `?${queryString}`;
|
|
@@ -627,28 +727,14 @@ class NodeHttp2Handler {
|
|
|
627
727
|
if (request.fragment) {
|
|
628
728
|
path += `#${request.fragment}`;
|
|
629
729
|
}
|
|
630
|
-
const
|
|
730
|
+
const clientHttp2Stream = session.request({
|
|
631
731
|
...request.headers,
|
|
632
732
|
[http2.constants.HTTP2_HEADER_PATH]: path,
|
|
633
733
|
[http2.constants.HTTP2_HEADER_METHOD]: method,
|
|
634
734
|
});
|
|
635
|
-
session.ref();
|
|
636
|
-
req.on("response", (headers) => {
|
|
637
|
-
const httpResponse = new protocolHttp.HttpResponse({
|
|
638
|
-
statusCode: headers[":status"] || -1,
|
|
639
|
-
headers: getTransformedHeaders(headers),
|
|
640
|
-
body: req,
|
|
641
|
-
});
|
|
642
|
-
fulfilled = true;
|
|
643
|
-
resolve({ response: httpResponse });
|
|
644
|
-
if (disableConcurrentStreams) {
|
|
645
|
-
session.close();
|
|
646
|
-
this.connectionManager.deleteSession(authority, session);
|
|
647
|
-
}
|
|
648
|
-
});
|
|
649
735
|
if (effectiveRequestTimeout) {
|
|
650
|
-
|
|
651
|
-
|
|
736
|
+
clientHttp2Stream.setTimeout(effectiveRequestTimeout, () => {
|
|
737
|
+
clientHttp2Stream.close();
|
|
652
738
|
const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`);
|
|
653
739
|
timeoutError.name = "TimeoutError";
|
|
654
740
|
rejectWithDestroy(timeoutError);
|
|
@@ -656,36 +742,50 @@ class NodeHttp2Handler {
|
|
|
656
742
|
}
|
|
657
743
|
if (abortSignal) {
|
|
658
744
|
const onAbort = () => {
|
|
659
|
-
|
|
745
|
+
clientHttp2Stream.close();
|
|
660
746
|
const abortError = buildAbortError(abortSignal);
|
|
661
747
|
rejectWithDestroy(abortError);
|
|
662
748
|
};
|
|
663
749
|
if (typeof abortSignal.addEventListener === "function") {
|
|
664
750
|
const signal = abortSignal;
|
|
665
751
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
666
|
-
|
|
752
|
+
clientHttp2Stream.once("close", () => signal.removeEventListener("abort", onAbort));
|
|
667
753
|
}
|
|
668
754
|
else {
|
|
669
755
|
abortSignal.onabort = onAbort;
|
|
670
756
|
}
|
|
671
757
|
}
|
|
672
|
-
|
|
758
|
+
clientHttp2Stream.on("frameError", (type, code, id) => {
|
|
673
759
|
rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));
|
|
674
760
|
});
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${
|
|
761
|
+
clientHttp2Stream.on("error", rejectWithDestroy);
|
|
762
|
+
clientHttp2Stream.on("aborted", () => {
|
|
763
|
+
rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${clientHttp2Stream.rstCode}.`));
|
|
678
764
|
});
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
765
|
+
clientHttp2Stream.on("response", (headers) => {
|
|
766
|
+
const httpResponse = new protocolHttp.HttpResponse({
|
|
767
|
+
statusCode: headers[":status"] ?? -1,
|
|
768
|
+
headers: getTransformedHeaders(headers),
|
|
769
|
+
body: clientHttp2Stream,
|
|
770
|
+
});
|
|
771
|
+
fulfilled = true;
|
|
772
|
+
resolve({ response: httpResponse });
|
|
773
|
+
if (useIsolatedSession) {
|
|
774
|
+
session.close();
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
clientHttp2Stream.on("close", () => {
|
|
778
|
+
if (useIsolatedSession) {
|
|
779
|
+
ref.destroy();
|
|
780
|
+
}
|
|
781
|
+
else {
|
|
782
|
+
this.connectionManager.release(requestContext, ref);
|
|
683
783
|
}
|
|
684
784
|
if (!fulfilled) {
|
|
685
785
|
rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response"));
|
|
686
786
|
}
|
|
687
787
|
});
|
|
688
|
-
writeRequestBodyPromise = writeRequestBody(
|
|
788
|
+
writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout);
|
|
689
789
|
});
|
|
690
790
|
}
|
|
691
791
|
updateHttpClientConfig(key, value) {
|
|
@@ -700,11 +800,6 @@ class NodeHttp2Handler {
|
|
|
700
800
|
httpHandlerConfigs() {
|
|
701
801
|
return this.config ?? {};
|
|
702
802
|
}
|
|
703
|
-
destroySession(session) {
|
|
704
|
-
if (!session.destroyed) {
|
|
705
|
-
session.destroy();
|
|
706
|
-
}
|
|
707
|
-
}
|
|
708
803
|
}
|
|
709
804
|
|
|
710
805
|
class Collector extends node_stream.Writable {
|