@cdklabs/cdk-ssm-documents 0.0.64 → 0.0.65
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 +11 -11
- 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/checksums/package.json +4 -4
- package/node_modules/@aws-sdk/client-cloudformation/package.json +5 -5
- package/node_modules/@aws-sdk/client-cloudwatch/README.md +21 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-cjs/index.js +42 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-cjs/models/errors.js +75 -30
- package/node_modules/@aws-sdk/client-cloudwatch/dist-cjs/schemas/schemas_0.js +77 -4
- package/node_modules/@aws-sdk/client-cloudwatch/dist-es/CloudWatch.js +6 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-es/commands/AssociateDatasetKmsKeyCommand.js +16 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-es/commands/DisassociateDatasetKmsKeyCommand.js +16 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-es/commands/GetDatasetCommand.js +16 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-es/commands/index.js +3 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-es/models/errors.js +68 -26
- package/node_modules/@aws-sdk/client-cloudwatch/dist-es/schemas/schemas_0.js +73 -1
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/CloudWatch.d.ts +21 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/CloudWatchClient.d.ts +5 -2
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/commands/AssociateDatasetKmsKeyCommand.d.ts +161 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/commands/DisassociateDatasetKmsKeyCommand.d.ts +105 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/commands/GetDatasetCommand.d.ts +91 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/commands/index.d.ts +3 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/models/errors.d.ts +74 -23
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/models/models_0.d.ts +90 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/schemas/schemas_0.d.ts +12 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/CloudWatch.d.ts +51 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/CloudWatchClient.d.ts +18 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/commands/AssociateDatasetKmsKeyCommand.d.ts +53 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/commands/DisassociateDatasetKmsKeyCommand.d.ts +53 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/commands/GetDatasetCommand.d.ts +49 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/models/errors.d.ts +40 -16
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/models/models_0.d.ts +17 -0
- package/node_modules/@aws-sdk/client-cloudwatch/dist-types/ts3.4/schemas/schemas_0.d.ts +12 -0
- package/node_modules/@aws-sdk/client-cloudwatch/package.json +9 -9
- package/node_modules/@aws-sdk/client-ec2/README.md +14 -0
- package/node_modules/@aws-sdk/client-ec2/dist-cjs/index.js +34 -0
- package/node_modules/@aws-sdk/client-ec2/dist-cjs/schemas/schemas_0.js +170 -75
- package/node_modules/@aws-sdk/client-ec2/dist-es/EC2.js +4 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/commands/AttachImageWatermarkCommand.js +16 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/commands/DetachImageWatermarkCommand.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 +5 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/schemas/schemas_0.js +108 -13
- package/node_modules/@aws-sdk/client-ec2/dist-types/EC2.d.ts +14 -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/AttachImageWatermarkCommand.d.ts +84 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateCapacityReservationFleetCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateDefaultSubnetCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateDefaultVpcCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateFlowLogsCommand.d.ts +8 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateRouteServerPeerCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateRouteTableCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteSecurityGroupCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteSnapshotCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteSpotDatafeedSubscriptionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeFlowLogsCommand.d.ts +8 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeImagesCommand.d.ts +9 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeImportSnapshotTasksCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeInstanceAttributeCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeInstanceImageMetadataCommand.d.ts +9 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeSpotInstanceRequestsCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeSpotPriceHistoryCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeStaleSecurityGroupsCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeVolumesModificationsCommand.d.ts +0 -5
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DetachImageWatermarkCommand.d.ts +82 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerAttributesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerMetricDataCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyIpamScopeCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyLaunchTemplateCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyLocalGatewayRouteCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyManagedPrefixListCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyVolumeCommand.d.ts +0 -5
- 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 +13 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_0.d.ts +38 -23
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_1.d.ts +45 -128
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_2.d.ts +128 -48
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_3.d.ts +109 -161
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_4.d.ts +169 -219
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_5.d.ts +250 -353
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_6.d.ts +351 -182
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_7.d.ts +178 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/schemas/schemas_0.d.ts +9 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2.d.ts +34 -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/AttachImageWatermarkCommand.d.ts +53 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/CreateDefaultSubnetCommand.d.ts +2 -4
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/CreateDefaultVpcCommand.d.ts +4 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/CreateRouteServerPeerCommand.d.ts +2 -4
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/CreateRouteTableCommand.d.ts +4 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DeleteSecurityGroupCommand.d.ts +2 -4
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DeleteSnapshotCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DeleteSpotDatafeedSubscriptionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeImportSnapshotTasksCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeInstanceAttributeCommand.d.ts +4 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeSpotInstanceRequestsCommand.d.ts +2 -4
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeSpotPriceHistoryCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeStaleSecurityGroupsCommand.d.ts +4 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DetachImageWatermarkCommand.d.ts +53 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetCapacityManagerAttributesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetCapacityManagerMetricDataCommand.d.ts +4 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyIpamScopeCommand.d.ts +2 -4
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyLaunchTemplateCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyLocalGatewayRouteCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyManagedPrefixListCommand.d.ts +4 -2
- 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 +7 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_0.d.ts +9 -7
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_1.d.ts +13 -26
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_2.d.ts +29 -12
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_3.d.ts +25 -36
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_4.d.ts +40 -35
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_5.d.ts +49 -67
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_6.d.ts +66 -47
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_7.d.ts +40 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/schemas/schemas_0.d.ts +9 -0
- package/node_modules/@aws-sdk/client-ec2/package.json +10 -10
- package/node_modules/@aws-sdk/client-iam/dist-types/commands/CreateServiceSpecificCredentialCommand.d.ts +18 -3
- package/node_modules/@aws-sdk/client-iam/dist-types/commands/ListServiceSpecificCredentialsCommand.d.ts +17 -2
- package/node_modules/@aws-sdk/client-iam/dist-types/models/models_0.d.ts +5 -2
- package/node_modules/@aws-sdk/client-iam/package.json +9 -9
- package/node_modules/@aws-sdk/client-lambda/package.json +5 -5
- package/node_modules/@aws-sdk/client-s3/package.json +9 -9
- package/node_modules/@aws-sdk/client-sns/package.json +5 -5
- package/node_modules/@aws-sdk/client-sqs/package.json +6 -6
- package/node_modules/@aws-sdk/client-ssm/package.json +5 -5
- package/node_modules/@aws-sdk/core/dist-cjs/index.js +47 -2297
- package/node_modules/@aws-sdk/core/dist-es/index.js +3 -3
- package/node_modules/@aws-sdk/core/dist-types/index.d.ts +5 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/index.d.ts +5 -5
- package/node_modules/@aws-sdk/core/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-env/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-http/package.json +6 -5
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-login/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-process/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +4 -1
- package/node_modules/@aws-sdk/credential-provider-sso/dist-es/resolveSSOCredentials.js +4 -1
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +9 -7
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +3 -3
- package/node_modules/@aws-sdk/middleware-sdk-ec2/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +14 -9
- package/node_modules/@aws-sdk/middleware-sdk-s3/s3-control.d.ts +7 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/s3-control.js +5 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/s3.d.ts +7 -0
- package/node_modules/@aws-sdk/middleware-sdk-s3/s3.js +5 -0
- package/node_modules/@aws-sdk/middleware-sdk-sqs/package.json +4 -4
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +6 -6
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +7 -6
- package/node_modules/@aws-sdk/token-providers/package.json +5 -5
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/util-locate-window/package.json +2 -2
- package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/CHANGELOG.md +8 -0
- package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/README.md +9 -0
- package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/package.json +4 -1
- package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/strnum.js +9 -1
- package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@nodable/entities/package.json +4 -1
- package/node_modules/@nodable/entities/src/EntityDecoder.js +104 -3
- package/node_modules/@nodable/entities/src/index.d.ts +77 -0
- package/node_modules/@nodable/entities/src/index.js +1 -1
- package/node_modules/@smithy/core/dist-cjs/index.js +13 -15
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +29 -31
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.browser.js +2 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +7 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.native.js +3 -5
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +22 -23
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +10 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +38 -39
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +10 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +14 -17
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +20 -23
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +9 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +11 -13
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +59 -60
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +26 -27
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +28 -29
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +5 -7
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +4 -6
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +23 -25
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +4 -6
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +2 -4
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/endpointMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRateLimiter.js +1 -1
- package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
- package/node_modules/@smithy/core/package.json +18 -17
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +23 -24
- package/node_modules/@smithy/credential-provider-imds/package.json +7 -7
- package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +6 -8
- package/node_modules/@smithy/fetch-http-handler/package.json +10 -10
- package/node_modules/@smithy/middleware-compression/dist-cjs/compressStream.browser.js +3 -7
- package/node_modules/@smithy/middleware-compression/dist-cjs/compressStream.js +2 -6
- package/node_modules/@smithy/middleware-compression/dist-cjs/compressString.browser.js +4 -8
- package/node_modules/@smithy/middleware-compression/dist-cjs/compressString.js +7 -11
- package/node_modules/@smithy/middleware-compression/dist-cjs/index.js +18 -20
- package/node_modules/@smithy/middleware-compression/package.json +6 -6
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +11 -13
- package/node_modules/@smithy/node-http-handler/package.json +8 -8
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +27 -29
- package/node_modules/@smithy/signature-v4/package.json +7 -7
- package/node_modules/@smithy/types/dist-cjs/index.js +23 -18
- package/node_modules/@smithy/types/package.json +10 -10
- package/node_modules/anynum/LICENSE +21 -0
- package/node_modules/anynum/README.md +142 -0
- package/node_modules/anynum/anynum.js +135 -0
- package/node_modules/anynum/digitTable.js +116 -0
- package/node_modules/anynum/package.json +42 -0
- package/package.json +10 -10
- /package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/LICENSE +0 -0
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var node_http = require('node:http');
|
|
5
|
-
var protocols = require('@smithy/core/protocols');
|
|
1
|
+
const { ProviderError, CredentialsProviderError, loadConfig } = require("@smithy/core/config");
|
|
2
|
+
const node_http = require("node:http");
|
|
3
|
+
const { parseUrl } = require("@smithy/core/protocols");
|
|
6
4
|
|
|
7
5
|
const isImdsCredentials = (arg) => Boolean(arg) &&
|
|
8
6
|
typeof arg === "object" &&
|
|
@@ -30,17 +28,17 @@ function httpRequest(options) {
|
|
|
30
28
|
hostname: options.hostname?.replace(/^\[(.+)\]$/, "$1"),
|
|
31
29
|
});
|
|
32
30
|
req.on("error", (err) => {
|
|
33
|
-
reject(Object.assign(new
|
|
31
|
+
reject(Object.assign(new ProviderError("Unable to connect to instance metadata service"), err));
|
|
34
32
|
req.destroy();
|
|
35
33
|
});
|
|
36
34
|
req.on("timeout", () => {
|
|
37
|
-
reject(new
|
|
35
|
+
reject(new ProviderError("TimeoutError from instance metadata service"));
|
|
38
36
|
req.destroy();
|
|
39
37
|
});
|
|
40
38
|
req.on("response", (res) => {
|
|
41
39
|
const { statusCode = 400 } = res;
|
|
42
40
|
if (statusCode < 200 || 300 <= statusCode) {
|
|
43
|
-
reject(Object.assign(new
|
|
41
|
+
reject(Object.assign(new ProviderError("Error response received from instance metadata service"), { statusCode }));
|
|
44
42
|
req.destroy();
|
|
45
43
|
}
|
|
46
44
|
const chunks = [];
|
|
@@ -73,7 +71,7 @@ const fromContainerMetadata = (init = {}) => {
|
|
|
73
71
|
const requestOptions = await getCmdsUri({ logger: init.logger });
|
|
74
72
|
const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));
|
|
75
73
|
if (!isImdsCredentials(credsResponse)) {
|
|
76
|
-
throw new
|
|
74
|
+
throw new CredentialsProviderError("Invalid response received from instance metadata service.", {
|
|
77
75
|
logger: init.logger,
|
|
78
76
|
});
|
|
79
77
|
}
|
|
@@ -109,16 +107,16 @@ const getCmdsUri = async ({ logger }) => {
|
|
|
109
107
|
parsed = new URL(process.env[ENV_CMDS_FULL_URI]);
|
|
110
108
|
}
|
|
111
109
|
catch {
|
|
112
|
-
throw new
|
|
110
|
+
throw new CredentialsProviderError(`${process.env[ENV_CMDS_FULL_URI]} is not a valid container metadata service URL`, { tryNextLink: false, logger });
|
|
113
111
|
}
|
|
114
112
|
if (!parsed.hostname || !GREENGRASS_HOSTS.has(parsed.hostname)) {
|
|
115
|
-
throw new
|
|
113
|
+
throw new CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {
|
|
116
114
|
tryNextLink: false,
|
|
117
115
|
logger,
|
|
118
116
|
});
|
|
119
117
|
}
|
|
120
118
|
if (!parsed.protocol || !GREENGRASS_PROTOCOLS.has(parsed.protocol)) {
|
|
121
|
-
throw new
|
|
119
|
+
throw new CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {
|
|
122
120
|
tryNextLink: false,
|
|
123
121
|
logger,
|
|
124
122
|
});
|
|
@@ -130,7 +128,7 @@ const getCmdsUri = async ({ logger }) => {
|
|
|
130
128
|
port: parsed.port ? parseInt(parsed.port, 10) : undefined,
|
|
131
129
|
};
|
|
132
130
|
}
|
|
133
|
-
throw new
|
|
131
|
+
throw new CredentialsProviderError("The container metadata credential provider cannot be used unless" +
|
|
134
132
|
` the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment` +
|
|
135
133
|
" variable is set", {
|
|
136
134
|
tryNextLink: false,
|
|
@@ -138,7 +136,7 @@ const getCmdsUri = async ({ logger }) => {
|
|
|
138
136
|
});
|
|
139
137
|
};
|
|
140
138
|
|
|
141
|
-
class InstanceMetadataV1FallbackError extends
|
|
139
|
+
class InstanceMetadataV1FallbackError extends CredentialsProviderError {
|
|
142
140
|
tryNextLink;
|
|
143
141
|
name = "InstanceMetadataV1FallbackError";
|
|
144
142
|
constructor(message, tryNextLink = true) {
|
|
@@ -148,11 +146,11 @@ class InstanceMetadataV1FallbackError extends config.CredentialsProviderError {
|
|
|
148
146
|
}
|
|
149
147
|
}
|
|
150
148
|
|
|
151
|
-
|
|
149
|
+
var Endpoint;
|
|
152
150
|
(function (Endpoint) {
|
|
153
151
|
Endpoint["IPv4"] = "http://169.254.169.254";
|
|
154
152
|
Endpoint["IPv6"] = "http://[fd00:ec2::254]";
|
|
155
|
-
})(
|
|
153
|
+
})(Endpoint || (Endpoint = {}));
|
|
156
154
|
|
|
157
155
|
const ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT";
|
|
158
156
|
const CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint";
|
|
@@ -176,15 +174,15 @@ const ENDPOINT_MODE_CONFIG_OPTIONS = {
|
|
|
176
174
|
default: EndpointMode.IPv4,
|
|
177
175
|
};
|
|
178
176
|
|
|
179
|
-
const getInstanceMetadataEndpoint = async () =>
|
|
180
|
-
const getFromEndpointConfig = async () =>
|
|
177
|
+
const getInstanceMetadataEndpoint = async () => parseUrl((await getFromEndpointConfig()) || (await getFromEndpointModeConfig()));
|
|
178
|
+
const getFromEndpointConfig = async () => loadConfig(ENDPOINT_CONFIG_OPTIONS)();
|
|
181
179
|
const getFromEndpointModeConfig = async () => {
|
|
182
|
-
const endpointMode = await
|
|
180
|
+
const endpointMode = await loadConfig(ENDPOINT_MODE_CONFIG_OPTIONS)();
|
|
183
181
|
switch (endpointMode) {
|
|
184
182
|
case EndpointMode.IPv4:
|
|
185
|
-
return
|
|
183
|
+
return Endpoint.IPv4;
|
|
186
184
|
case EndpointMode.IPv6:
|
|
187
|
-
return
|
|
185
|
+
return Endpoint.IPv6;
|
|
188
186
|
default:
|
|
189
187
|
throw new Error(`Unsupported endpoint mode: ${endpointMode}.` + ` Select from ${Object.values(EndpointMode)}`);
|
|
190
188
|
}
|
|
@@ -248,12 +246,12 @@ const getInstanceMetadataProvider = (init = {}) => {
|
|
|
248
246
|
if (isImdsV1Fallback) {
|
|
249
247
|
let fallbackBlockedFromProfile = false;
|
|
250
248
|
let fallbackBlockedFromProcessEnv = false;
|
|
251
|
-
const configValue = await
|
|
249
|
+
const configValue = await loadConfig({
|
|
252
250
|
environmentVariableSelector: (env) => {
|
|
253
251
|
const envValue = env[AWS_EC2_METADATA_V1_DISABLED];
|
|
254
252
|
fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false";
|
|
255
253
|
if (envValue === undefined) {
|
|
256
|
-
throw new
|
|
254
|
+
throw new CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init.logger });
|
|
257
255
|
}
|
|
258
256
|
return fallbackBlockedFromProcessEnv;
|
|
259
257
|
},
|
|
@@ -352,7 +350,7 @@ const getCredentialsFromProfile = async (profile, options, init) => {
|
|
|
352
350
|
path: IMDS_PATH + profile,
|
|
353
351
|
})).toString());
|
|
354
352
|
if (!isImdsCredentials(credentialsResponse)) {
|
|
355
|
-
throw new
|
|
353
|
+
throw new CredentialsProviderError("Invalid response received from instance metadata service.", {
|
|
356
354
|
logger: init.logger,
|
|
357
355
|
});
|
|
358
356
|
}
|
|
@@ -364,6 +362,7 @@ exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT;
|
|
|
364
362
|
exports.ENV_CMDS_AUTH_TOKEN = ENV_CMDS_AUTH_TOKEN;
|
|
365
363
|
exports.ENV_CMDS_FULL_URI = ENV_CMDS_FULL_URI;
|
|
366
364
|
exports.ENV_CMDS_RELATIVE_URI = ENV_CMDS_RELATIVE_URI;
|
|
365
|
+
exports.Endpoint = Endpoint;
|
|
367
366
|
exports.fromContainerMetadata = fromContainerMetadata;
|
|
368
367
|
exports.fromInstanceMetadata = fromInstanceMetadata;
|
|
369
368
|
exports.getInstanceMetadataEndpoint = getInstanceMetadataEndpoint;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/credential-provider-imds",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "AWS credential provider that sources credentials from the EC2 instance metadata service and ECS container metadata service",
|
|
5
5
|
"main": "./dist-cjs/index.js",
|
|
6
6
|
"module": "./dist-es/index.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
9
|
-
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline
|
|
10
|
-
"build:types": "yarn g:tsc -p tsconfig.types.json",
|
|
9
|
+
"build:es:cjs": "premove dist-es && yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
|
|
10
|
+
"build:types": "premove dist-types && yarn g:tsc -p tsconfig.types.json",
|
|
11
11
|
"build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
|
|
12
|
-
"clean": "premove dist-cjs dist-es dist-types
|
|
12
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
13
13
|
"format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
|
|
14
14
|
"lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
|
|
15
15
|
"stage-release": "premove .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
],
|
|
23
23
|
"author": {
|
|
24
24
|
"name": "AWS SDK for JavaScript Team",
|
|
25
|
-
"url": "https://aws.amazon.com/javascript/"
|
|
25
|
+
"url": "https://aws.amazon.com/sdk-for-javascript/"
|
|
26
26
|
},
|
|
27
27
|
"license": "Apache-2.0",
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@smithy/core": "^3.
|
|
31
|
-
"@smithy/types": "^4.
|
|
30
|
+
"@smithy/core": "^3.25.0",
|
|
31
|
+
"@smithy/types": "^4.15.0",
|
|
32
32
|
"tslib": "^2.6.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var protocols = require('@smithy/core/protocols');
|
|
4
|
-
var serde = require('@smithy/core/serde');
|
|
1
|
+
const { buildQueryString, HttpResponse } = require("@smithy/core/protocols");
|
|
2
|
+
const { fromBase64 } = require("@smithy/core/serde");
|
|
5
3
|
|
|
6
4
|
function createRequest(url, requestOptions) {
|
|
7
5
|
return new Request(url, requestOptions);
|
|
@@ -57,7 +55,7 @@ class FetchHttpHandler {
|
|
|
57
55
|
return Promise.reject(abortError);
|
|
58
56
|
}
|
|
59
57
|
let path = request.path;
|
|
60
|
-
const queryString =
|
|
58
|
+
const queryString = buildQueryString(request.query || {});
|
|
61
59
|
if (queryString) {
|
|
62
60
|
path += `?${queryString}`;
|
|
63
61
|
}
|
|
@@ -106,7 +104,7 @@ class FetchHttpHandler {
|
|
|
106
104
|
const hasReadableStream = response.body != undefined;
|
|
107
105
|
if (!hasReadableStream) {
|
|
108
106
|
return response.blob().then((body) => ({
|
|
109
|
-
response: new
|
|
107
|
+
response: new HttpResponse({
|
|
110
108
|
headers: transformedHeaders,
|
|
111
109
|
reason: response.statusText,
|
|
112
110
|
statusCode: response.status,
|
|
@@ -115,7 +113,7 @@ class FetchHttpHandler {
|
|
|
115
113
|
}));
|
|
116
114
|
}
|
|
117
115
|
return {
|
|
118
|
-
response: new
|
|
116
|
+
response: new HttpResponse({
|
|
119
117
|
headers: transformedHeaders,
|
|
120
118
|
reason: response.statusText,
|
|
121
119
|
statusCode: response.status,
|
|
@@ -185,7 +183,7 @@ const streamCollector = async (stream) => {
|
|
|
185
183
|
};
|
|
186
184
|
async function collectBlob(blob) {
|
|
187
185
|
const base64 = await readToBase64(blob);
|
|
188
|
-
const arrayBuffer =
|
|
186
|
+
const arrayBuffer = fromBase64(base64);
|
|
189
187
|
return new Uint8Array(arrayBuffer);
|
|
190
188
|
}
|
|
191
189
|
async function collectStream(stream) {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/fetch-http-handler",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"description": "Provides a way to make requests",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
7
|
-
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline
|
|
8
|
-
"build:types": "yarn g:tsc -p tsconfig.types.json",
|
|
7
|
+
"build:es:cjs": "premove dist-es && yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
|
|
8
|
+
"build:types": "premove dist-types && yarn g:tsc -p tsconfig.types.json",
|
|
9
9
|
"build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
|
|
10
|
-
"clean": "premove dist-cjs dist-es dist-types
|
|
10
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
11
11
|
"extract:docs": "api-extractor run --local",
|
|
12
12
|
"format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
|
|
13
13
|
"lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
|
|
14
14
|
"stage-release": "premove .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
|
|
15
15
|
"test": "yarn g:vitest run && yarn test:browser",
|
|
16
|
+
"test:watch": "yarn g:vitest watch",
|
|
16
17
|
"test:browser": "yarn g:vitest run -c vitest.config.browser.mts",
|
|
17
|
-
"test:browser:watch": "yarn g:vitest watch -c vitest.config.browser.mts"
|
|
18
|
-
"test:watch": "yarn g:vitest watch"
|
|
18
|
+
"test:browser:watch": "yarn g:vitest watch -c vitest.config.browser.mts"
|
|
19
19
|
},
|
|
20
20
|
"author": {
|
|
21
21
|
"name": "AWS SDK for JavaScript Team",
|
|
22
|
-
"url": "https://aws.amazon.com/javascript/"
|
|
22
|
+
"url": "https://aws.amazon.com/sdk-for-javascript/"
|
|
23
23
|
},
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"sideEffects": false,
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"module": "./dist-es/index.js",
|
|
28
28
|
"types": "./dist-types/index.d.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@smithy/core": "^3.
|
|
31
|
-
"@smithy/types": "^4.
|
|
30
|
+
"@smithy/core": "^3.25.0",
|
|
31
|
+
"@smithy/types": "^4.15.0",
|
|
32
32
|
"tslib": "^2.6.2"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@smithy/abort-controller": "^4.
|
|
35
|
+
"@smithy/abort-controller": "^4.3.0",
|
|
36
36
|
"concurrently": "7.0.0",
|
|
37
37
|
"downlevel-dts": "0.10.1",
|
|
38
38
|
"premove": "4.0.0",
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.compressStream = void 0;
|
|
4
|
-
const fflate_1 = require("fflate");
|
|
5
|
-
const compressStream = async (body) => {
|
|
1
|
+
const { AsyncGzip } = require("fflate");
|
|
2
|
+
exports.compressStream = async (body) => {
|
|
6
3
|
let endCallback;
|
|
7
|
-
const asyncGzip = new
|
|
4
|
+
const asyncGzip = new AsyncGzip();
|
|
8
5
|
const compressionStream = new TransformStream({
|
|
9
6
|
start(controller) {
|
|
10
7
|
asyncGzip.ondata = (err, data, final) => {
|
|
@@ -34,4 +31,3 @@ const compressStream = async (body) => {
|
|
|
34
31
|
});
|
|
35
32
|
return body.pipeThrough(compressionStream);
|
|
36
33
|
};
|
|
37
|
-
exports.compressStream = compressStream;
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.compressStream = void 0;
|
|
4
|
-
const node_zlib_1 = require("node:zlib");
|
|
5
|
-
const compressStream = async (body) => body.pipe((0, node_zlib_1.createGzip)());
|
|
6
|
-
exports.compressStream = compressStream;
|
|
1
|
+
const { createGzip } = require("node:zlib");
|
|
2
|
+
exports.compressStream = async (body) => body.pipe(createGzip());
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.compressString =
|
|
4
|
-
|
|
5
|
-
const fflate_1 = require("fflate");
|
|
6
|
-
const compressString = async (body) => new Promise((resolve, reject) => {
|
|
7
|
-
(0, fflate_1.gzip)((0, serde_1.toUint8Array)(body || ""), (err, data) => {
|
|
1
|
+
const { toUint8Array } = require("@smithy/core/serde");
|
|
2
|
+
const { gzip } = require("fflate");
|
|
3
|
+
exports.compressString = async (body) => new Promise((resolve, reject) => {
|
|
4
|
+
gzip(toUint8Array(body || ""), (err, data) => {
|
|
8
5
|
if (err) {
|
|
9
6
|
reject(new Error("Failure during compression: " + err.message));
|
|
10
7
|
}
|
|
@@ -13,4 +10,3 @@ const compressString = async (body) => new Promise((resolve, reject) => {
|
|
|
13
10
|
}
|
|
14
11
|
});
|
|
15
12
|
});
|
|
16
|
-
exports.compressString = compressString;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
const serde_1 = require("@smithy/core/serde");
|
|
7
|
-
const gzipAsync = (0, node_util_1.promisify)(node_zlib_1.gzip);
|
|
8
|
-
const compressString = async (body) => {
|
|
1
|
+
const { promisify } = require("node:util");
|
|
2
|
+
const { gzip } = require("node:zlib");
|
|
3
|
+
const { toUint8Array } = require("@smithy/core/serde");
|
|
4
|
+
const gzipAsync = promisify(gzip);
|
|
5
|
+
exports.compressString = async (body) => {
|
|
9
6
|
try {
|
|
10
|
-
const compressedBuffer = await gzipAsync(
|
|
11
|
-
return
|
|
7
|
+
const compressedBuffer = await gzipAsync(toUint8Array(body || ""));
|
|
8
|
+
return toUint8Array(compressedBuffer);
|
|
12
9
|
}
|
|
13
10
|
catch (err) {
|
|
14
11
|
throw new Error("Failure during compression: " + err.message);
|
|
15
12
|
}
|
|
16
13
|
};
|
|
17
|
-
exports.compressString = compressString;
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var serde = require('@smithy/core/serde');
|
|
9
|
-
var client = require('@smithy/core/client');
|
|
1
|
+
const { booleanSelector, SelectorType, numberSelector } = require("@smithy/core/config");
|
|
2
|
+
const { setFeature } = require("@smithy/core");
|
|
3
|
+
const { HttpRequest } = require("@smithy/core/protocols");
|
|
4
|
+
const { compressStream } = require("./compressStream");
|
|
5
|
+
const { compressString } = require("./compressString");
|
|
6
|
+
const { isArrayBuffer } = require("@smithy/core/serde");
|
|
7
|
+
const { normalizeProvider } = require("@smithy/core/client");
|
|
10
8
|
|
|
11
9
|
const NODE_DISABLE_REQUEST_COMPRESSION_ENV_NAME = "AWS_DISABLE_REQUEST_COMPRESSION";
|
|
12
10
|
const NODE_DISABLE_REQUEST_COMPRESSION_INI_NAME = "disable_request_compression";
|
|
13
11
|
const DEFAULT_DISABLE_REQUEST_COMPRESSION = false;
|
|
14
12
|
const NODE_DISABLE_REQUEST_COMPRESSION_CONFIG_OPTIONS = {
|
|
15
|
-
environmentVariableSelector: (env) =>
|
|
16
|
-
configFileSelector: (profile) =>
|
|
13
|
+
environmentVariableSelector: (env) => booleanSelector(env, NODE_DISABLE_REQUEST_COMPRESSION_ENV_NAME, SelectorType.ENV),
|
|
14
|
+
configFileSelector: (profile) => booleanSelector(profile, NODE_DISABLE_REQUEST_COMPRESSION_INI_NAME, SelectorType.CONFIG),
|
|
17
15
|
default: DEFAULT_DISABLE_REQUEST_COMPRESSION,
|
|
18
16
|
};
|
|
19
17
|
|
|
@@ -21,8 +19,8 @@ const NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_ENV_NAME = "AWS_REQUEST_MIN_COMPRE
|
|
|
21
19
|
const NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_INI_NAME = "request_min_compression_size_bytes";
|
|
22
20
|
const DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES = 10240;
|
|
23
21
|
const NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_CONFIG_OPTIONS = {
|
|
24
|
-
environmentVariableSelector: (env) =>
|
|
25
|
-
configFileSelector: (profile) =>
|
|
22
|
+
environmentVariableSelector: (env) => numberSelector(env, NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_ENV_NAME, SelectorType.ENV),
|
|
23
|
+
configFileSelector: (profile) => numberSelector(profile, NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES_INI_NAME, SelectorType.CONFIG),
|
|
26
24
|
default: DEFAULT_NODE_REQUEST_MIN_COMPRESSION_SIZE_BYTES,
|
|
27
25
|
};
|
|
28
26
|
|
|
@@ -32,10 +30,10 @@ var CompressionAlgorithm;
|
|
|
32
30
|
})(CompressionAlgorithm || (CompressionAlgorithm = {}));
|
|
33
31
|
const CLIENT_SUPPORTED_ALGORITHMS = [CompressionAlgorithm.GZIP];
|
|
34
32
|
|
|
35
|
-
const isStreaming = (body) => body !== undefined && typeof body !== "string" && !ArrayBuffer.isView(body) && !
|
|
33
|
+
const isStreaming = (body) => body !== undefined && typeof body !== "string" && !ArrayBuffer.isView(body) && !isArrayBuffer(body);
|
|
36
34
|
|
|
37
35
|
const compressionMiddleware = (config, middlewareConfig) => (next, context) => async (args) => {
|
|
38
|
-
if (!
|
|
36
|
+
if (!HttpRequest.isInstance(args.request)) {
|
|
39
37
|
return next(args);
|
|
40
38
|
}
|
|
41
39
|
const disableRequestCompression = await config.disableRequestCompression();
|
|
@@ -52,7 +50,7 @@ const compressionMiddleware = (config, middlewareConfig) => (next, context) => a
|
|
|
52
50
|
let isRequestCompressed = false;
|
|
53
51
|
if (isStreaming(body)) {
|
|
54
52
|
if (!streamRequiresLength) {
|
|
55
|
-
updatedBody = await compressStream
|
|
53
|
+
updatedBody = await compressStream(body);
|
|
56
54
|
isRequestCompressed = true;
|
|
57
55
|
}
|
|
58
56
|
else {
|
|
@@ -63,7 +61,7 @@ const compressionMiddleware = (config, middlewareConfig) => (next, context) => a
|
|
|
63
61
|
const bodyLength = config.bodyLengthChecker(body);
|
|
64
62
|
const requestMinCompressionSizeBytes = await config.requestMinCompressionSizeBytes();
|
|
65
63
|
if (bodyLength && bodyLength >= requestMinCompressionSizeBytes) {
|
|
66
|
-
updatedBody = await compressString
|
|
64
|
+
updatedBody = await compressString(body);
|
|
67
65
|
isRequestCompressed = true;
|
|
68
66
|
}
|
|
69
67
|
}
|
|
@@ -78,7 +76,7 @@ const compressionMiddleware = (config, middlewareConfig) => (next, context) => a
|
|
|
78
76
|
updatedHeaders = { ...headers, "content-encoding": algorithm };
|
|
79
77
|
}
|
|
80
78
|
if (updatedHeaders["content-encoding"].includes("gzip")) {
|
|
81
|
-
|
|
79
|
+
setFeature(context, "GZIP_REQUEST_COMPRESSION", "L");
|
|
82
80
|
}
|
|
83
81
|
break;
|
|
84
82
|
}
|
|
@@ -110,9 +108,9 @@ const getCompressionPlugin = (config, middlewareConfig) => ({
|
|
|
110
108
|
const resolveCompressionConfig = (input) => {
|
|
111
109
|
const { disableRequestCompression, requestMinCompressionSizeBytes: _requestMinCompressionSizeBytes } = input;
|
|
112
110
|
return Object.assign(input, {
|
|
113
|
-
disableRequestCompression:
|
|
111
|
+
disableRequestCompression: normalizeProvider(disableRequestCompression),
|
|
114
112
|
requestMinCompressionSizeBytes: async () => {
|
|
115
|
-
const requestMinCompressionSizeBytes = await
|
|
113
|
+
const requestMinCompressionSizeBytes = await normalizeProvider(_requestMinCompressionSizeBytes)();
|
|
116
114
|
if (requestMinCompressionSizeBytes < 0 || requestMinCompressionSizeBytes > 10485760) {
|
|
117
115
|
throw new RangeError("The value for requestMinCompressionSizeBytes must be between 0 and 10485760 inclusive. " +
|
|
118
116
|
`The provided value ${requestMinCompressionSizeBytes} is outside this range."`);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/middleware-compression",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "Middleware and Plugin for request compression.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
7
|
-
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline
|
|
8
|
-
"build:types": "yarn g:tsc -p tsconfig.types.json",
|
|
7
|
+
"build:es:cjs": "premove dist-es && yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
|
|
8
|
+
"build:types": "premove dist-types && yarn g:tsc -p tsconfig.types.json",
|
|
9
9
|
"build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
|
|
10
|
-
"clean": "premove dist-cjs dist-es dist-types
|
|
10
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
11
11
|
"stage-release": "premove .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
|
|
12
12
|
"test": "yarn g:vitest run",
|
|
13
13
|
"test:watch": "yarn g:vitest watch"
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"main": "./dist-cjs/index.js",
|
|
16
16
|
"module": "./dist-es/index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@smithy/core": "^3.
|
|
19
|
-
"@smithy/types": "^4.
|
|
18
|
+
"@smithy/core": "^3.25.0",
|
|
19
|
+
"@smithy/types": "^4.15.0",
|
|
20
20
|
"fflate": "0.8.1",
|
|
21
21
|
"tslib": "^2.6.2"
|
|
22
22
|
},
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var node_stream = require('node:stream');
|
|
6
|
-
var http2 = require('node:http2');
|
|
1
|
+
const { buildQueryString, HttpResponse } = require("@smithy/core/protocols");
|
|
2
|
+
const node_https = require("node:https");
|
|
3
|
+
const { Readable, Writable } = require("node:stream");
|
|
4
|
+
const http2 = require("node:http2");
|
|
7
5
|
|
|
8
6
|
function buildAbortError(abortSignal) {
|
|
9
7
|
const reason = abortSignal && typeof abortSignal === "object" && "reason" in abortSignal
|
|
@@ -175,7 +173,7 @@ async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN
|
|
|
175
173
|
}
|
|
176
174
|
}
|
|
177
175
|
function writeBody(httpRequest, body) {
|
|
178
|
-
if (body instanceof
|
|
176
|
+
if (body instanceof Readable) {
|
|
179
177
|
body.pipe(httpRequest);
|
|
180
178
|
return;
|
|
181
179
|
}
|
|
@@ -311,7 +309,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
311
309
|
socketWarningTimeoutId = timing.setTimeout(() => {
|
|
312
310
|
this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger);
|
|
313
311
|
}, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000));
|
|
314
|
-
const queryString = request.query ?
|
|
312
|
+
const queryString = request.query ? buildQueryString(request.query) : "";
|
|
315
313
|
let auth = undefined;
|
|
316
314
|
if (request.username != null || request.password != null) {
|
|
317
315
|
const username = request.username ?? "";
|
|
@@ -343,7 +341,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
343
341
|
};
|
|
344
342
|
const requestFunc = isSSL ? node_https.request : hRequest;
|
|
345
343
|
const req = requestFunc(nodeHttpsOptions, (res) => {
|
|
346
|
-
const httpResponse = new
|
|
344
|
+
const httpResponse = new HttpResponse({
|
|
347
345
|
statusCode: res.statusCode || -1,
|
|
348
346
|
reason: res.statusMessage,
|
|
349
347
|
headers: getTransformedHeaders(res.headers),
|
|
@@ -414,7 +412,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
414
412
|
socketAcquisitionWarningTimeout,
|
|
415
413
|
throwOnRequestTimeout,
|
|
416
414
|
httpAgentProvider: async () => {
|
|
417
|
-
const node_http =
|
|
415
|
+
const node_http = require('node:http');
|
|
418
416
|
const { Agent, request } = node_http.default ?? node_http;
|
|
419
417
|
hRequest = request;
|
|
420
418
|
hAgent = Agent;
|
|
@@ -752,7 +750,7 @@ class NodeHttp2Handler {
|
|
|
752
750
|
fulfilled = true;
|
|
753
751
|
reject(err);
|
|
754
752
|
};
|
|
755
|
-
const queryString = query ?
|
|
753
|
+
const queryString = query ? buildQueryString(query) : "";
|
|
756
754
|
let path = request.path;
|
|
757
755
|
if (queryString) {
|
|
758
756
|
path += `?${queryString}`;
|
|
@@ -796,7 +794,7 @@ class NodeHttp2Handler {
|
|
|
796
794
|
rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${clientHttp2Stream.rstCode}.`));
|
|
797
795
|
});
|
|
798
796
|
clientHttp2Stream.on("response", (headers) => {
|
|
799
|
-
const httpResponse = new
|
|
797
|
+
const httpResponse = new HttpResponse({
|
|
800
798
|
statusCode: headers[":status"] ?? -1,
|
|
801
799
|
headers: getTransformedHeaders(headers),
|
|
802
800
|
body: clientHttp2Stream,
|
|
@@ -835,7 +833,7 @@ class NodeHttp2Handler {
|
|
|
835
833
|
}
|
|
836
834
|
}
|
|
837
835
|
|
|
838
|
-
class Collector extends
|
|
836
|
+
class Collector extends Writable {
|
|
839
837
|
bufferedBytes = [];
|
|
840
838
|
_write(chunk, encoding, callback) {
|
|
841
839
|
this.bufferedBytes.push(chunk);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/node-http-handler",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.0",
|
|
4
4
|
"description": "Provides a way to make requests",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
7
|
-
"build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline
|
|
8
|
-
"build:types": "yarn g:tsc -p tsconfig.types.json",
|
|
7
|
+
"build:es:cjs": "premove dist-es && yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline",
|
|
8
|
+
"build:types": "premove dist-types && yarn g:tsc -p tsconfig.types.json",
|
|
9
9
|
"build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
|
|
10
|
-
"clean": "premove dist-cjs dist-es dist-types
|
|
10
|
+
"clean": "premove dist-cjs dist-es dist-types",
|
|
11
11
|
"extract:docs": "api-extractor run --local",
|
|
12
12
|
"format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
|
|
13
13
|
"lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"author": {
|
|
19
19
|
"name": "AWS SDK for JavaScript Team",
|
|
20
20
|
"email": "",
|
|
21
|
-
"url": "https://aws.amazon.com/javascript/"
|
|
21
|
+
"url": "https://aws.amazon.com/sdk-for-javascript/"
|
|
22
22
|
},
|
|
23
23
|
"license": "Apache-2.0",
|
|
24
24
|
"sideEffects": false,
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"module": "./dist-es/index.js",
|
|
27
27
|
"types": "./dist-types/index.d.ts",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@smithy/core": "^3.
|
|
30
|
-
"@smithy/types": "^4.
|
|
29
|
+
"@smithy/core": "^3.25.0",
|
|
30
|
+
"@smithy/types": "^4.15.0",
|
|
31
31
|
"tslib": "^2.6.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@smithy/abort-controller": "^4.
|
|
34
|
+
"@smithy/abort-controller": "^4.3.0",
|
|
35
35
|
"@types/node": "^18.11.9",
|
|
36
36
|
"concurrently": "7.0.0",
|
|
37
37
|
"downlevel-dts": "0.10.1",
|