cdk-preflight 1.12.0 → 1.12.1

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.
Files changed (402) hide show
  1. package/.jsii +3 -3
  2. package/lib/index.js +1 -1
  3. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +1 -1
  4. package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormationClient.d.ts +2 -1
  5. package/node_modules/@aws-sdk/client-cloudformation/package.json +6 -6
  6. package/node_modules/@aws-sdk/client-ec2/README.md +28 -0
  7. package/node_modules/@aws-sdk/client-ec2/dist-cjs/index.js +499 -113
  8. package/node_modules/@aws-sdk/client-ec2/dist-es/EC2.js +10 -0
  9. package/node_modules/@aws-sdk/client-ec2/dist-es/commands/GetCapacityManagerSupportabilityScoresCommand.js +4 -0
  10. package/node_modules/@aws-sdk/client-ec2/dist-es/commands/GetImageFindingsCommand.js +4 -0
  11. package/node_modules/@aws-sdk/client-ec2/dist-es/commands/GetTransitGatewayAttachmentNatConfigurationCommand.js +4 -0
  12. package/node_modules/@aws-sdk/client-ec2/dist-es/commands/ModifyTransitGatewayAttachmentNatConfigurationCommand.js +4 -0
  13. package/node_modules/@aws-sdk/client-ec2/dist-es/commands/index.js +4 -0
  14. package/node_modules/@aws-sdk/client-ec2/dist-es/models/enums.js +80 -29
  15. package/node_modules/@aws-sdk/client-ec2/dist-es/pagination/GetImageFindingsPaginator.js +4 -0
  16. package/node_modules/@aws-sdk/client-ec2/dist-es/pagination/index.js +1 -0
  17. package/node_modules/@aws-sdk/client-ec2/dist-es/schemas/schemas_0.js +365 -83
  18. package/node_modules/@aws-sdk/client-ec2/dist-types/EC2.d.ts +35 -0
  19. package/node_modules/@aws-sdk/client-ec2/dist-types/EC2Client.d.ts +8 -3
  20. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateCapacityReservationFleetCommand.d.ts +82 -1
  21. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateCarrierGatewayCommand.d.ts +1 -1
  22. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateTransitGatewayRouteCommand.d.ts +1 -1
  23. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteLaunchTemplateCommand.d.ts +2 -1
  24. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteTransitGatewayRouteCommand.d.ts +1 -1
  25. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteTransitGatewayRouteTableCommand.d.ts +5 -2
  26. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeCapacityReservationFleetsCommand.d.ts +81 -0
  27. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeFleetHistoryCommand.d.ts +2 -1
  28. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeImagesCommand.d.ts +9 -0
  29. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeInstanceStatusCommand.d.ts +5 -0
  30. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeNetworkInsightsAnalysesCommand.d.ts +48 -0
  31. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeReservedInstancesModificationsCommand.d.ts +2 -1
  32. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeReservedInstancesOfferingsCommand.d.ts +1 -2
  33. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeTransitGatewayAttachmentsCommand.d.ts +1 -0
  34. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DisassociateTransitGatewayPolicyTableCommand.d.ts +1 -1
  35. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DisassociateTransitGatewayRouteTableCommand.d.ts +1 -2
  36. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetAllowedImagesSettingsCommand.d.ts +9 -0
  37. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerMetricDataCommand.d.ts +2 -2
  38. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerMetricDimensionsCommand.d.ts +1 -1
  39. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerSupportabilityScoresCommand.d.ts +183 -0
  40. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetImageFindingsCommand.d.ts +90 -0
  41. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetNetworkInsightsAccessScopeAnalysisFindingsCommand.d.ts +19 -0
  42. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetTransitGatewayAttachmentNatConfigurationCommand.d.ts +82 -0
  43. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVerifiedAccessEndpointTargetsCommand.d.ts +2 -1
  44. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVerifiedAccessGroupPolicyCommand.d.ts +1 -1
  45. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVpcResourcesBlockingEncryptionEnforcementCommand.d.ts +1 -1
  46. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVpnConnectionDeviceSampleConfigurationCommand.d.ts +1 -1
  47. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVpnConnectionDeviceTypesCommand.d.ts +1 -1
  48. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVpnTunnelReplacementStatusCommand.d.ts +1 -2
  49. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyTransitGatewayAttachmentNatConfigurationCommand.d.ts +107 -0
  50. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/RejectTransitGatewayPeeringAttachmentCommand.d.ts +1 -1
  51. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/RejectTransitGatewayVpcAttachmentCommand.d.ts +1 -1
  52. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/RejectVpcEndpointConnectionsCommand.d.ts +1 -1
  53. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/RejectVpcPeeringConnectionCommand.d.ts +1 -1
  54. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReleaseAddressCommand.d.ts +1 -1
  55. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReleaseHostsCommand.d.ts +1 -1
  56. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReleaseIpamPoolAllocationCommand.d.ts +1 -1
  57. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReplaceIamInstanceProfileAssociationCommand.d.ts +1 -1
  58. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReplaceImageCriteriaInAllowedImagesSettingsCommand.d.ts +9 -0
  59. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReplaceTransitGatewayRouteCommand.d.ts +1 -1
  60. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/SearchTransitGatewayRoutesCommand.d.ts +1 -1
  61. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/StartNetworkInsightsAnalysisCommand.d.ts +48 -0
  62. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/index.d.ts +4 -0
  63. package/node_modules/@aws-sdk/client-ec2/dist-types/models/enums.d.ts +192 -77
  64. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_0.d.ts +165 -291
  65. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_1.d.ts +1839 -1665
  66. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_2.d.ts +25 -12
  67. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_3.d.ts +27 -38
  68. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_4.d.ts +241 -242
  69. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_5.d.ts +247 -57
  70. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_6.d.ts +537 -341
  71. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_7.d.ts +389 -246
  72. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_8.d.ts +360 -3
  73. package/node_modules/@aws-sdk/client-ec2/dist-types/pagination/GetImageFindingsPaginator.d.ts +7 -0
  74. package/node_modules/@aws-sdk/client-ec2/dist-types/pagination/index.d.ts +1 -0
  75. package/node_modules/@aws-sdk/client-ec2/dist-types/schemas/schemas_0.d.ts +21 -0
  76. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2.d.ts +75 -0
  77. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2Client.d.ts +24 -0
  78. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/CreateCapacityReservationFleetCommand.d.ts +1 -1
  79. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/CreateCarrierGatewayCommand.d.ts +1 -1
  80. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DeleteLaunchTemplateCommand.d.ts +2 -1
  81. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeFleetHistoryCommand.d.ts +2 -1
  82. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeReservedInstancesModificationsCommand.d.ts +2 -4
  83. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeReservedInstancesOfferingsCommand.d.ts +4 -2
  84. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DisassociateTransitGatewayPolicyTableCommand.d.ts +1 -1
  85. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DisassociateTransitGatewayRouteTableCommand.d.ts +4 -2
  86. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetCapacityManagerSupportabilityScoresCommand.d.ts +42 -0
  87. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetImageFindingsCommand.d.ts +38 -0
  88. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetTransitGatewayAttachmentNatConfigurationCommand.d.ts +42 -0
  89. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVerifiedAccessEndpointTargetsCommand.d.ts +2 -4
  90. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVerifiedAccessGroupPolicyCommand.d.ts +1 -1
  91. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVpcResourcesBlockingEncryptionEnforcementCommand.d.ts +1 -1
  92. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVpnConnectionDeviceSampleConfigurationCommand.d.ts +1 -1
  93. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVpnConnectionDeviceTypesCommand.d.ts +1 -1
  94. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVpnTunnelReplacementStatusCommand.d.ts +4 -2
  95. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyTransitGatewayAttachmentNatConfigurationCommand.d.ts +42 -0
  96. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/RejectTransitGatewayPeeringAttachmentCommand.d.ts +1 -1
  97. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/RejectTransitGatewayVpcAttachmentCommand.d.ts +1 -1
  98. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/RejectVpcEndpointConnectionsCommand.d.ts +1 -1
  99. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/RejectVpcPeeringConnectionCommand.d.ts +1 -1
  100. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ReleaseAddressCommand.d.ts +1 -1
  101. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ReleaseHostsCommand.d.ts +1 -1
  102. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ReleaseIpamPoolAllocationCommand.d.ts +1 -1
  103. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ReplaceIamInstanceProfileAssociationCommand.d.ts +1 -1
  104. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/index.d.ts +4 -0
  105. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/enums.d.ts +99 -35
  106. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_0.d.ts +27 -60
  107. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_1.d.ts +118 -69
  108. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_2.d.ts +6 -6
  109. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_3.d.ts +10 -9
  110. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_4.d.ts +31 -34
  111. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_5.d.ts +37 -14
  112. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_6.d.ts +89 -68
  113. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_7.d.ts +86 -64
  114. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_8.d.ts +76 -1
  115. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/pagination/GetImageFindingsPaginator.d.ts +11 -0
  116. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/pagination/index.d.ts +1 -0
  117. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/schemas/schemas_0.d.ts +21 -0
  118. package/node_modules/@aws-sdk/client-ec2/package.json +8 -8
  119. package/node_modules/@aws-sdk/client-lambda/README.md +1 -1
  120. package/node_modules/@aws-sdk/client-lambda/dist-cjs/index.js +9 -3
  121. package/node_modules/@aws-sdk/client-lambda/dist-es/models/enums.js +4 -0
  122. package/node_modules/@aws-sdk/client-lambda/dist-es/schemas/schemas_0.js +3 -2
  123. package/node_modules/@aws-sdk/client-lambda/dist-types/Lambda.d.ts +1 -1
  124. package/node_modules/@aws-sdk/client-lambda/dist-types/LambdaClient.d.ts +3 -2
  125. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CreateEventSourceMappingCommand.d.ts +2 -0
  126. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteEventSourceMappingCommand.d.ts +1 -0
  127. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteFunctionConcurrencyCommand.d.ts +1 -1
  128. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetEventSourceMappingCommand.d.ts +1 -0
  129. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetFunctionCommand.d.ts +1 -1
  130. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListEventSourceMappingsCommand.d.ts +1 -0
  131. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListFunctionEventInvokeConfigsCommand.d.ts +1 -1
  132. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListVersionsByFunctionCommand.d.ts +1 -1
  133. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PublishVersionCommand.d.ts +1 -1
  134. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PutFunctionConcurrencyCommand.d.ts +1 -1
  135. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PutFunctionRecursionConfigCommand.d.ts +1 -1
  136. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateEventSourceMappingCommand.d.ts +2 -0
  137. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateFunctionUrlConfigCommand.d.ts +1 -1
  138. package/node_modules/@aws-sdk/client-lambda/dist-types/index.d.ts +1 -1
  139. package/node_modules/@aws-sdk/client-lambda/dist-types/models/enums.d.ts +12 -0
  140. package/node_modules/@aws-sdk/client-lambda/dist-types/models/models_0.d.ts +21 -16
  141. package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/enums.d.ts +6 -0
  142. package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/models_0.d.ts +2 -0
  143. package/node_modules/@aws-sdk/client-lambda/package.json +7 -7
  144. package/node_modules/@aws-sdk/client-service-quotas/dist-cjs/index.js +1 -1
  145. package/node_modules/@aws-sdk/client-service-quotas/dist-types/ServiceQuotasClient.d.ts +2 -1
  146. package/node_modules/@aws-sdk/client-service-quotas/package.json +6 -6
  147. package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +1 -1
  148. package/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts +2 -1
  149. package/node_modules/@aws-sdk/client-sts/package.json +8 -8
  150. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +38 -13
  151. package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +7 -7
  152. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +104 -1549
  153. package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +2 -1
  154. package/node_modules/@aws-sdk/core/dist-es/submodules/client/getDefaultSocketTimeout.js +10 -0
  155. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.browser.js +1 -0
  156. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +1 -0
  157. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.native.js +1 -0
  158. package/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-host-header/hostHeaderMiddleware.js +4 -2
  159. package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/parseArn.js +4 -2
  160. package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.js +18 -9
  161. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js +6 -3
  162. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +1 -4
  163. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +2 -7
  164. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +1 -3
  165. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -3
  166. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.js +51 -0
  167. package/node_modules/@aws-sdk/core/dist-es/submodules/util/util-arn-parser/arn.js +2 -1
  168. package/node_modules/@aws-sdk/core/dist-types/submodules/client/getDefaultSocketTimeout.d.ts +11 -0
  169. package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.browser.d.ts +1 -0
  170. package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.d.ts +1 -0
  171. package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.native.d.ts +1 -0
  172. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +3 -7
  173. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +3 -8
  174. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
  175. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
  176. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
  177. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
  178. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +25 -0
  179. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/getDefaultSocketTimeout.d.ts +4 -0
  180. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.browser.d.ts +1 -0
  181. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -0
  182. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.native.d.ts +1 -0
  183. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +11 -10
  184. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
  185. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
  186. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
  187. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
  188. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +36 -0
  189. package/node_modules/@aws-sdk/core/package.json +5 -5
  190. package/node_modules/@aws-sdk/credential-provider-env/package.json +4 -4
  191. package/node_modules/@aws-sdk/credential-provider-http/package.json +5 -5
  192. package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
  193. package/node_modules/@aws-sdk/credential-provider-login/package.json +5 -5
  194. package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
  195. package/node_modules/@aws-sdk/credential-provider-process/package.json +4 -4
  196. package/node_modules/@aws-sdk/credential-provider-sso/package.json +6 -6
  197. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +5 -5
  198. package/node_modules/@aws-sdk/middleware-sdk-ec2/package.json +5 -5
  199. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +3 -2
  200. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +10 -2
  201. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +3 -2
  202. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +3 -2
  203. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +3 -2
  204. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.js +2 -1
  205. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +7 -0
  206. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js +2 -1
  207. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js +2 -1
  208. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js +2 -1
  209. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js +2 -1
  210. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentityClient.d.ts +2 -1
  211. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +1 -0
  212. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/Signin.d.ts +1 -2
  213. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/SigninClient.d.ts +3 -3
  214. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenCommand.d.ts +5 -59
  215. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenWithIAMCommand.d.ts +5 -33
  216. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/index.d.ts +1 -2
  217. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +16 -9
  218. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/errors.d.ts +8 -39
  219. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/models_0.d.ts +36 -48
  220. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.d.ts +1 -0
  221. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/SSOClient.d.ts +2 -1
  222. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.d.ts +1 -0
  223. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/SSOOIDCClient.d.ts +2 -1
  224. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +1 -0
  225. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STSClient.d.ts +2 -1
  226. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +1 -0
  227. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +1 -0
  228. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +7 -0
  229. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +1 -0
  230. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +1 -0
  231. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +1 -0
  232. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +1 -0
  233. package/node_modules/@aws-sdk/nested-clients/package.json +6 -6
  234. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +3 -3
  235. package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +37 -19
  236. package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +37 -19
  237. package/node_modules/@aws-sdk/token-providers/package.json +5 -5
  238. package/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +3 -0
  239. package/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +3 -0
  240. package/node_modules/@aws-sdk/types/package.json +1 -1
  241. package/node_modules/@aws-sdk/xml-builder/package.json +1 -1
  242. package/node_modules/@smithy/core/dist-cjs/index.js +4 -2
  243. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +45 -53
  244. package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +52 -19
  245. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +8 -4
  246. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +16 -8
  247. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +8 -4
  248. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +2 -1
  249. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +10 -5
  250. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +28 -9
  251. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +28 -9
  252. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +91 -58
  253. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +53 -15
  254. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +57 -17
  255. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +13 -4
  256. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +7 -1
  257. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +13 -4
  258. package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +6 -3
  259. package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
  260. package/node_modules/@smithy/core/dist-es/normalizeProvider.js +2 -1
  261. package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +12 -37
  262. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +8 -4
  263. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +6 -3
  264. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +12 -6
  265. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +4 -2
  266. package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +2 -1
  267. package/node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js +10 -5
  268. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +17 -2
  269. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js +2 -1
  270. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +4 -2
  271. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +2 -1
  272. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +2 -1
  273. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +4 -2
  274. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js +10 -4
  275. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +2 -1
  276. package/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js +8 -4
  277. package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js +6 -3
  278. package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/numberSelector.js +2 -1
  279. package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js +8 -4
  280. package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +2 -1
  281. package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +6 -3
  282. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +12 -1
  283. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js +2 -1
  284. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js +2 -1
  285. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js +2 -1
  286. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js +4 -2
  287. package/node_modules/@smithy/core/dist-es/submodules/protocols/AbstractRpcV2Protocol.js +35 -0
  288. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +8 -4
  289. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +4 -2
  290. package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +6 -2
  291. package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +1 -0
  292. package/node_modules/@smithy/core/dist-es/submodules/protocols/json/SmithyRpcV2JsonProtocol.js +8 -31
  293. package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +7 -5
  294. package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +7 -5
  295. package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +7 -5
  296. package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +11 -8
  297. package/node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js +3 -0
  298. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js +4 -2
  299. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +2 -1
  300. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy.js +6 -3
  301. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +17 -8
  302. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/util.js +6 -3
  303. package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/race.js +22 -0
  304. package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +1 -0
  305. package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
  306. package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +1 -0
  307. package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +2 -1
  308. package/node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.browser.js +6 -3
  309. package/node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js +2 -1
  310. package/node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js +2 -1
  311. package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +2 -1
  312. package/node_modules/@smithy/core/dist-types/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +5 -14
  313. package/node_modules/@smithy/core/dist-types/submodules/protocols/AbstractRpcV2Protocol.d.ts +45 -0
  314. package/node_modules/@smithy/core/dist-types/submodules/protocols/RpcProtocol.d.ts +12 -0
  315. package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +1 -0
  316. package/node_modules/@smithy/core/dist-types/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +5 -14
  317. package/node_modules/@smithy/core/dist-types/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
  318. package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/race.d.ts +3 -0
  319. package/node_modules/@smithy/core/dist-types/submodules/serde/index.browser.d.ts +1 -0
  320. package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
  321. package/node_modules/@smithy/core/dist-types/submodules/serde/index.native.d.ts +1 -0
  322. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +5 -14
  323. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/AbstractRpcV2Protocol.d.ts +45 -0
  324. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/RpcProtocol.d.ts +12 -0
  325. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +1 -0
  326. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +5 -14
  327. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
  328. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/util-retry/race.d.ts +3 -0
  329. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.browser.d.ts +1 -0
  330. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
  331. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.native.d.ts +1 -0
  332. package/node_modules/@smithy/core/package.json +2 -2
  333. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +84 -29
  334. package/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +2 -1
  335. package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +23 -11
  336. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +26 -2
  337. package/node_modules/@smithy/node-http-handler/dist-es/resolve-default-socket-timeout.js +4 -0
  338. package/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +30 -15
  339. package/node_modules/@smithy/node-http-handler/dist-types/resolve-default-socket-timeout.d.ts +4 -0
  340. package/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +10 -1
  341. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/resolve-default-socket-timeout.d.ts +4 -0
  342. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +10 -1
  343. package/node_modules/@smithy/node-http-handler/package.json +3 -3
  344. package/node_modules/@smithy/signature-v4/dist-cjs/index.js +23 -11
  345. package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +4 -2
  346. package/node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +4 -2
  347. package/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +5 -1
  348. package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +2 -1
  349. package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +2 -1
  350. package/node_modules/@smithy/signature-v4/dist-es/headerUtil.js +6 -3
  351. package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +2 -1
  352. package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +2 -1
  353. package/node_modules/@smithy/signature-v4/package.json +2 -2
  354. package/node_modules/@smithy/types/dist-types/middleware.d.ts +6 -0
  355. package/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +6 -0
  356. package/node_modules/@smithy/types/package.json +1 -1
  357. package/package.json +1 -1
  358. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonSettings.js +0 -1
  359. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonCodec.js +0 -20
  360. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +0 -1
  361. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +0 -160
  362. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +0 -193
  363. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +0 -103
  364. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +0 -20
  365. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +0 -200
  366. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +0 -519
  367. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/detectBufferParsing.js +0 -18
  368. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js +0 -46
  369. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +0 -121
  370. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/needsReviver.js +0 -41
  371. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +0 -89
  372. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonSettings.d.ts +0 -7
  373. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -15
  374. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -7
  375. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -14
  376. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -29
  377. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -51
  378. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -13
  379. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -30
  380. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -60
  381. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/detectBufferParsing.d.ts +0 -1
  382. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/jsonReplacer.d.ts +0 -21
  383. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/jsonReviver.d.ts +0 -15
  384. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/needsReviver.d.ts +0 -11
  385. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +0 -22
  386. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonSettings.d.ts +0 -4
  387. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -11
  388. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -4
  389. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -13
  390. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -18
  391. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -27
  392. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -9
  393. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -15
  394. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -39
  395. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +0 -1
  396. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +0 -7
  397. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +0 -7
  398. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +0 -2
  399. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +0 -14
  400. /package/node_modules/@smithy/core/dist-es/submodules/{protocols → serde}/writeKey.js +0 -0
  401. /package/node_modules/@smithy/core/dist-types/submodules/{protocols → serde}/writeKey.d.ts +0 -0
  402. /package/node_modules/@smithy/core/dist-types/ts3.4/submodules/{protocols → serde}/writeKey.d.ts +0 -0
@@ -0,0 +1,45 @@
1
+ import { EndpointBearer, HandlerExecutionContext, HttpRequest as IHttpRequest, OperationSchema, SerdeFunctions } from "@smithy/types";
2
+ import { TypeRegistry } from "@smithy/core/schema";
3
+ import { RpcProtocol } from "./RpcProtocol";
4
+ /**
5
+ * Shared abstract base for the Smithy RPC v2 client protocols (JSON and CBOR).
6
+ *
7
+ * Factors out the request-framing flow and response status handling that are
8
+ * identical across both RPC v2 protocols. Concrete protocols supply their
9
+ * codec, error handling, content type, shape id, and the two per-protocol
10
+ * request details via {@link getSmithyProtocolHeaderValue} and
11
+ * {@link applyEmptyBody}.
12
+ *
13
+ * @internal
14
+ */
15
+ export declare abstract class AbstractRpcV2Protocol extends RpcProtocol {
16
+ /**
17
+ * @override
18
+ */
19
+ protected compositeErrorRegistry: TypeRegistry;
20
+ constructor({ defaultNamespace, errorTypeRegistries, }: {
21
+ defaultNamespace: string;
22
+ errorTypeRegistries?: TypeRegistry[];
23
+ });
24
+ serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
25
+ /**
26
+ * @override
27
+ *
28
+ * Per the Smithy RPC v2 specification, the only successful response status
29
+ * code is 200; any other status code MUST be handled as an error.
30
+ */
31
+ protected isErrorResponse(statusCode: number): boolean;
32
+ /**
33
+ * @returns the value of the `smithy-protocol` header for this protocol,
34
+ * e.g. `rpc-v2-json` or `rpc-v2-cbor`.
35
+ */
36
+ protected abstract getSmithyProtocolHeaderValue(): string;
37
+ /**
38
+ * Applies this protocol's representation of an empty request body when the
39
+ * operation has a non-unit input but produced no serialized body. Called
40
+ * only for non-unit inputs.
41
+ *
42
+ * @param request - the request being serialized, mutated in place.
43
+ */
44
+ protected abstract applyEmptyBody(request: IHttpRequest): void;
45
+ }
@@ -13,4 +13,16 @@ export declare abstract class RpcProtocol extends HttpProtocol {
13
13
  protected compositeErrorRegistry: TypeRegistry;
14
14
  serializeRequest<Input extends object>(operationSchema: OperationSchema, _input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
15
15
  deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse): Promise<Output>;
16
+ /**
17
+ * Determines whether a response status code indicates an error response that
18
+ * should be routed to {@link handleError} rather than deserialized as output.
19
+ *
20
+ * The default treats any status code of 300 or greater as an error,
21
+ * preserving the historical behavior for RPC-over-HTTP protocols. Subclasses
22
+ * whose specification is stricter SHOULD override this.
23
+ *
24
+ * @param statusCode - the HTTP response status code.
25
+ * @returns true if the response should be handled as an error.
26
+ */
27
+ protected isErrorResponse(statusCode: number): boolean;
16
28
  }
@@ -3,6 +3,7 @@ export { extendedEncodeURIComponent } from "./extended-encode-uri-component";
3
3
  export { HttpBindingProtocol } from "./HttpBindingProtocol";
4
4
  export { HttpProtocol } from "./HttpProtocol";
5
5
  export { RpcProtocol } from "./RpcProtocol";
6
+ export { AbstractRpcV2Protocol } from "./AbstractRpcV2Protocol";
6
7
  export { RequestBuilder, requestBuilder } from "./requestBuilder";
7
8
  export { resolvedPath } from "./resolve-path";
8
9
  export { FromStringShapeDeserializer } from "./serde/FromStringShapeDeserializer";
@@ -1,28 +1,19 @@
1
- import { RpcProtocol } from "../RpcProtocol";
2
- import { TypeRegistry } from "@smithy/core/schema";
3
- import { EndpointBearer, HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, MetadataBearer, OperationSchema, ResponseMetadata, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
1
+ import { AbstractRpcV2Protocol } from "../AbstractRpcV2Protocol";
2
+ import { HandlerExecutionContext, HttpRequest as IHttpRequest, HttpResponse as IHttpResponse, OperationSchema, ResponseMetadata, SerdeFunctions, ShapeDeserializer, ShapeSerializer } from "@smithy/types";
4
3
  import { JsonCodec2 } from "./codec-v2/JsonCodec2";
5
4
  /**
6
5
  * Client protocol for Smithy RPCv2 JSON.
7
6
  *
8
7
  * @public
9
8
  */
10
- export declare class SmithyRpcV2JsonProtocol extends RpcProtocol {
11
- /**
12
- * @override
13
- */
14
- protected compositeErrorRegistry: TypeRegistry;
9
+ export declare class SmithyRpcV2JsonProtocol extends AbstractRpcV2Protocol {
15
10
  private codec;
16
11
  protected serializer: ShapeSerializer<string | Uint8Array>;
17
12
  protected deserializer: ShapeDeserializer<string | Uint8Array>;
18
- constructor({ defaultNamespace, errorTypeRegistries, }: {
19
- defaultNamespace: string;
20
- errorTypeRegistries?: TypeRegistry[];
21
- });
22
13
  getShapeId(): string;
23
14
  getPayloadCodec(): JsonCodec2;
24
- serializeRequest<Input extends object>(operationSchema: OperationSchema, input: Input, context: HandlerExecutionContext & SerdeFunctions & EndpointBearer): Promise<IHttpRequest>;
25
- deserializeResponse<Output extends MetadataBearer>(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse): Promise<Output>;
15
+ protected getSmithyProtocolHeaderValue(): string;
16
+ protected applyEmptyBody(request: IHttpRequest): void;
26
17
  protected handleError(operationSchema: OperationSchema, context: HandlerExecutionContext & SerdeFunctions, response: IHttpResponse, dataObject: any, metadata: ResponseMetadata): Promise<never>;
27
18
  protected getDefaultContentType(): string;
28
19
  }
@@ -24,6 +24,7 @@ export declare const getHttpHandlerExtensionConfiguration: <HandlerConfig extend
24
24
  logger?: Logger;
25
25
  }>(runtimeConfig: HttpHandlerExtensionConfigType<HandlerConfig> & {
26
26
  logger?: Logger;
27
+ defaultSocketTimeout?: number;
27
28
  }) => {
28
29
  setHttpHandler(handler: HttpHandler<HandlerConfig>): void;
29
30
  httpHandler(): HttpHandler<HandlerConfig>;
@@ -0,0 +1,3 @@
1
+ import { AbortSignal as DeprecatedAbortSignal } from "@smithy/types";
2
+ export declare const race: <T>(promise: Promise<T>, signal?: AbortSignal | DeprecatedAbortSignal) => Promise<T>;
3
+ export declare const isAbortError: (error: unknown) => boolean;
@@ -40,3 +40,4 @@ export { streamCollector } from "./util-stream/stream-collector.browser";
40
40
  export declare const v4: () => string;
41
41
  export declare const generateIdempotencyToken: () => string;
42
42
  export { hasOwn } from "@smithy/core/transport";
43
+ export { writeKey } from "./writeKey";
@@ -38,3 +38,4 @@ export { streamCollector } from "./util-stream/stream-collector";
38
38
  export declare const v4: () => string;
39
39
  export declare const generateIdempotencyToken: () => string;
40
40
  export { hasOwn } from "@smithy/core/transport";
41
+ export { writeKey } from "./writeKey";
@@ -38,3 +38,4 @@ export { streamCollector } from "./util-stream/stream-collector.browser";
38
38
  export declare const v4: () => string;
39
39
  export declare const generateIdempotencyToken: () => string;
40
40
  export { hasOwn } from "@smithy/core/transport";
41
+ export { writeKey } from "./writeKey";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/core",
3
- "version": "3.36.0",
3
+ "version": "3.39.0",
4
4
  "homepage": "https://github.com/smithy-lang/smithy-typescript/tree/main/packages/core",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -242,7 +242,7 @@
242
242
  "test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
243
243
  },
244
244
  "dependencies": {
245
- "@smithy/types": "^4.19.0",
245
+ "@smithy/types": "^4.20.0",
246
246
  "tslib": "^2.6.2"
247
247
  },
248
248
  "devDependencies": {
@@ -31,8 +31,9 @@ const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"];
31
31
  const getTransformedHeaders = (headers) => {
32
32
  const transformedHeaders = {};
33
33
  for (const name in headers) {
34
- if (!hasOwn(headers, name))
34
+ if (!hasOwn(headers, name)) {
35
35
  continue;
36
+ }
36
37
  const headerValues = headers[name];
37
38
  transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
38
39
  }
@@ -123,27 +124,47 @@ const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs
123
124
  return timing.setTimeout(registerListener, deferTimeMs);
124
125
  };
125
126
 
127
+ const resolveDefaultSocketTimeout = (config) => {
128
+ const value = config?.defaultSocketTimeout;
129
+ return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : undefined;
130
+ };
131
+
126
132
  const DEFER_EVENT_LISTENER_TIME = 3000;
127
- const setSocketTimeout = (request, reject, timeoutInMs = 0) => {
128
- const registerTimeout = (offset) => {
129
- const timeout = timeoutInMs - offset;
130
- const onTimeout = () => {
131
- request.destroy();
132
- reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" }));
133
- };
134
- if (request.socket) {
135
- request.socket.setTimeout(timeout, onTimeout);
136
- request.on("close", () => request.socket?.removeListener("timeout", onTimeout));
133
+ const setSocketTimeout = (request, reject, timeoutInMs = 0, isServiceDefault = false) => {
134
+ if (!Number.isFinite(timeoutInMs) || timeoutInMs <= 0) {
135
+ return;
136
+ }
137
+ let response;
138
+ request.once("response", (res) => (response = res));
139
+ const onTimeout = () => {
140
+ if (response?.complete) {
141
+ request.socket?.destroy();
142
+ return;
143
+ }
144
+ const error = Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (${isServiceDefault ? "service default socket timeout" : "configured by client requestHandler"}).`), { name: "TimeoutError" });
145
+ response?.destroy(error);
146
+ request.destroy();
147
+ reject(error);
148
+ };
149
+ const registerTimeout = () => {
150
+ const { socket } = request;
151
+ if (!socket) {
152
+ request.once("socket", registerTimeout);
153
+ }
154
+ else if (socket.connecting) {
155
+ socket.once("connect", registerTimeout);
137
156
  }
138
157
  else {
139
- request.setTimeout(timeout, onTimeout);
158
+ socket.setTimeout(timeoutInMs, onTimeout);
159
+ request.on("close", () => socket.removeListener("timeout", onTimeout));
140
160
  }
141
161
  };
142
- if (0 < timeoutInMs && timeoutInMs < 6000) {
143
- registerTimeout(0);
144
- return 0;
162
+ if (timeoutInMs < 6000) {
163
+ registerTimeout();
164
+ return;
145
165
  }
146
- return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);
166
+ const deferralId = timing.setTimeout(registerTimeout, DEFER_EVENT_LISTENER_TIME);
167
+ request.once("close", () => timing.clearTimeout(deferralId));
147
168
  };
148
169
 
149
170
  const MIN_WAIT_TIME = 6_000;
@@ -234,8 +255,9 @@ class NodeHttpHandler {
234
255
  }
235
256
  if (sockets && requests) {
236
257
  for (const origin in sockets) {
237
- if (!hasOwn(sockets, origin))
258
+ if (!hasOwn(sockets, origin)) {
238
259
  continue;
260
+ }
239
261
  const socketsInUse = sockets[origin]?.length ?? 0;
240
262
  const requestsEnqueued = requests[origin]?.length ?? 0;
241
263
  if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
@@ -281,13 +303,11 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
281
303
  let socketWarningTimeoutId = -1;
282
304
  let connectionTimeoutId = -1;
283
305
  let requestTimeoutId = -1;
284
- let socketTimeoutId = -1;
285
306
  let keepAliveTimeoutId = -1;
286
307
  const clearTimeouts = () => {
287
308
  timing.clearTimeout(socketWarningTimeoutId);
288
309
  timing.clearTimeout(connectionTimeoutId);
289
310
  timing.clearTimeout(requestTimeoutId);
290
- timing.clearTimeout(socketTimeoutId);
291
311
  timing.clearTimeout(keepAliveTimeoutId);
292
312
  };
293
313
  const resolve = async (arg) => {
@@ -383,7 +403,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
383
403
  const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout;
384
404
  connectionTimeoutId = setConnectionTimeout(req, reject, config.connectionTimeout);
385
405
  requestTimeoutId = setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, logger ?? console);
386
- socketTimeoutId = setSocketTimeout(req, reject, config.socketTimeout);
406
+ const defaultSocketTimeout = config.socketTimeout === undefined ? resolveDefaultSocketTimeout(config) : undefined;
407
+ if (defaultSocketTimeout) {
408
+ setSocketTimeout(req, reject, defaultSocketTimeout, true);
409
+ }
410
+ else {
411
+ setSocketTimeout(req, reject, config.socketTimeout);
412
+ }
387
413
  const httpAgent = nodeHttpsOptions.agent;
388
414
  if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
389
415
  keepAliveTimeoutId = setSocketKeepAlive(req, {
@@ -400,11 +426,15 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
400
426
  updateHttpClientConfig(key, value) {
401
427
  this.config = undefined;
402
428
  this.configProvider = this.configProvider.then((config) => {
403
- if (key === Symbol.for("logger")) {
404
- return {
405
- ...config,
406
- logger: config.logger ?? value,
407
- };
429
+ switch (key) {
430
+ case Symbol.for("logger"):
431
+ key = "logger";
432
+ value = config.logger ?? value;
433
+ break;
434
+ case Symbol.for("@smithy/defaultSocketTimeout"):
435
+ key = "defaultSocketTimeout";
436
+ value = resolveDefaultSocketTimeout(config) ?? value;
437
+ break;
408
438
  }
409
439
  return {
410
440
  ...config,
@@ -419,13 +449,15 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
419
449
  const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger, } = options || {};
420
450
  const keepAlive = true;
421
451
  const maxSockets = 50;
452
+ let httpAgentPromise;
422
453
  return {
423
454
  connectionTimeout,
424
455
  requestTimeout,
425
456
  socketTimeout,
457
+ defaultSocketTimeout: resolveDefaultSocketTimeout(options),
426
458
  socketAcquisitionWarningTimeout,
427
459
  throwOnRequestTimeout,
428
- httpAgentProvider: async () => {
460
+ httpAgentProvider: () => (httpAgentPromise ??= (async () => {
429
461
  const node_http = require('node:http');
430
462
  const { Agent, request } = node_http.default ?? node_http;
431
463
  hRequest = request;
@@ -435,7 +467,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
435
467
  return httpAgent;
436
468
  }
437
469
  return new hAgent({ keepAlive, maxSockets, ...httpAgent });
438
- },
470
+ })()),
439
471
  httpsAgent: (() => {
440
472
  if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === "function") {
441
473
  this.externalAgent = true;
@@ -710,7 +742,8 @@ class NodeHttp2Handler {
710
742
  }
711
743
  async handle(request, { abortSignal, requestTimeout, isEventStream } = {}) {
712
744
  if (!this.config) {
713
- this.config = await this.configProvider;
745
+ const config = await this.configProvider;
746
+ this.config = { ...config, defaultSocketTimeout: resolveDefaultSocketTimeout(config) };
714
747
  const { disableConcurrentStreams, maxConcurrentStreams, nodeHttp2ConnectOptions } = this.config;
715
748
  this.connectionManager.setDisableConcurrentStreams(disableConcurrentStreams ?? false);
716
749
  if (maxConcurrentStreams) {
@@ -720,9 +753,12 @@ class NodeHttp2Handler {
720
753
  this.connectionManager.setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions);
721
754
  }
722
755
  }
723
- const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config;
756
+ const { requestTimeout: configRequestTimeout, disableConcurrentStreams, sessionTimeout } = this.config;
724
757
  const useIsolatedSession = disableConcurrentStreams || isEventStream;
725
758
  const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout;
759
+ const defaultSocketTimeout = effectiveRequestTimeout === undefined && sessionTimeout === undefined
760
+ ? this.config.defaultSocketTimeout
761
+ : undefined;
726
762
  return new Promise((_resolve, _reject) => {
727
763
  let fulfilled = false;
728
764
  let writeRequestBodyPromise = undefined;
@@ -785,6 +821,19 @@ class NodeHttp2Handler {
785
821
  rejectWithDestroy(timeoutError);
786
822
  });
787
823
  }
824
+ else if (defaultSocketTimeout) {
825
+ clientHttp2Stream.setTimeout(defaultSocketTimeout, () => {
826
+ const timeoutError = new Error(`Stream timed out because of no activity for ${defaultSocketTimeout} ms`);
827
+ timeoutError.name = "TimeoutError";
828
+ fulfilled = true;
829
+ reject(timeoutError);
830
+ clientHttp2Stream.destroy(timeoutError);
831
+ if (useIsolatedSession) {
832
+ ref.destroy();
833
+ }
834
+ });
835
+ clientHttp2Stream.once("response", () => clientHttp2Stream.setTimeout(defaultSocketTimeout));
836
+ }
788
837
  if (abortSignal) {
789
838
  const onAbort = () => {
790
839
  clientHttp2Stream.close();
@@ -843,6 +892,12 @@ class NodeHttp2Handler {
843
892
  updateHttpClientConfig(key, value) {
844
893
  this.config = undefined;
845
894
  this.configProvider = this.configProvider.then((config) => {
895
+ switch (key) {
896
+ case Symbol.for("@smithy/defaultSocketTimeout"):
897
+ key = "defaultSocketTimeout";
898
+ value = resolveDefaultSocketTimeout(config) ?? value;
899
+ break;
900
+ }
846
901
  return {
847
902
  ...config,
848
903
  [key]: value,
@@ -2,8 +2,9 @@ import { hasOwn } from "@smithy/core/serde";
2
2
  const getTransformedHeaders = (headers) => {
3
3
  const transformedHeaders = {};
4
4
  for (const name in headers) {
5
- if (!hasOwn(headers, name))
5
+ if (!hasOwn(headers, name)) {
6
6
  continue;
7
+ }
7
8
  const headerValues = headers[name];
8
9
  transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues;
9
10
  }
@@ -7,6 +7,7 @@ import { node_https } from "./node-https";
7
7
  import { setConnectionTimeout } from "./set-connection-timeout";
8
8
  import { setRequestTimeout } from "./set-request-timeout";
9
9
  import { setSocketKeepAlive } from "./set-socket-keep-alive";
10
+ import { resolveDefaultSocketTimeout } from "./resolve-default-socket-timeout";
10
11
  import { setSocketTimeout } from "./set-socket-timeout";
11
12
  import { timing } from "./timing";
12
13
  import { writeRequestBody } from "./write-request-body";
@@ -36,8 +37,9 @@ export class NodeHttpHandler {
36
37
  }
37
38
  if (sockets && requests) {
38
39
  for (const origin in sockets) {
39
- if (!hasOwn(sockets, origin))
40
+ if (!hasOwn(sockets, origin)) {
40
41
  continue;
42
+ }
41
43
  const socketsInUse = sockets[origin]?.length ?? 0;
42
44
  const requestsEnqueued = requests[origin]?.length ?? 0;
43
45
  if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
@@ -83,13 +85,11 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
83
85
  let socketWarningTimeoutId = -1;
84
86
  let connectionTimeoutId = -1;
85
87
  let requestTimeoutId = -1;
86
- let socketTimeoutId = -1;
87
88
  let keepAliveTimeoutId = -1;
88
89
  const clearTimeouts = () => {
89
90
  timing.clearTimeout(socketWarningTimeoutId);
90
91
  timing.clearTimeout(connectionTimeoutId);
91
92
  timing.clearTimeout(requestTimeoutId);
92
- timing.clearTimeout(socketTimeoutId);
93
93
  timing.clearTimeout(keepAliveTimeoutId);
94
94
  };
95
95
  const resolve = async (arg) => {
@@ -185,7 +185,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
185
185
  const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout;
186
186
  connectionTimeoutId = setConnectionTimeout(req, reject, config.connectionTimeout);
187
187
  requestTimeoutId = setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, logger ?? console);
188
- socketTimeoutId = setSocketTimeout(req, reject, config.socketTimeout);
188
+ const defaultSocketTimeout = config.socketTimeout === undefined ? resolveDefaultSocketTimeout(config) : undefined;
189
+ if (defaultSocketTimeout) {
190
+ setSocketTimeout(req, reject, defaultSocketTimeout, true);
191
+ }
192
+ else {
193
+ setSocketTimeout(req, reject, config.socketTimeout);
194
+ }
189
195
  const httpAgent = nodeHttpsOptions.agent;
190
196
  if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
191
197
  keepAliveTimeoutId = setSocketKeepAlive(req, {
@@ -202,11 +208,15 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
202
208
  updateHttpClientConfig(key, value) {
203
209
  this.config = undefined;
204
210
  this.configProvider = this.configProvider.then((config) => {
205
- if (key === Symbol.for("logger")) {
206
- return {
207
- ...config,
208
- logger: config.logger ?? value,
209
- };
211
+ switch (key) {
212
+ case Symbol.for("logger"):
213
+ key = "logger";
214
+ value = config.logger ?? value;
215
+ break;
216
+ case Symbol.for("@smithy/defaultSocketTimeout"):
217
+ key = "defaultSocketTimeout";
218
+ value = resolveDefaultSocketTimeout(config) ?? value;
219
+ break;
210
220
  }
211
221
  return {
212
222
  ...config,
@@ -221,13 +231,15 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
221
231
  const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger, } = options || {};
222
232
  const keepAlive = true;
223
233
  const maxSockets = 50;
234
+ let httpAgentPromise;
224
235
  return {
225
236
  connectionTimeout,
226
237
  requestTimeout,
227
238
  socketTimeout,
239
+ defaultSocketTimeout: resolveDefaultSocketTimeout(options),
228
240
  socketAcquisitionWarningTimeout,
229
241
  throwOnRequestTimeout,
230
- httpAgentProvider: async () => {
242
+ httpAgentProvider: () => (httpAgentPromise ??= (async () => {
231
243
  const node_http = await import("node:http");
232
244
  const { Agent, request } = node_http.default ?? node_http;
233
245
  hRequest = request;
@@ -237,7 +249,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
237
249
  return httpAgent;
238
250
  }
239
251
  return new hAgent({ keepAlive, maxSockets, ...httpAgent });
240
- },
252
+ })()),
241
253
  httpsAgent: (() => {
242
254
  if (httpsAgent instanceof node_https.Agent || typeof httpsAgent?.destroy === "function") {
243
255
  this.externalAgent = true;
@@ -3,6 +3,7 @@ import { buildAbortError } from "./build-abort-error";
3
3
  import { getTransformedHeaders } from "./get-transformed-headers";
4
4
  import { node_http2 } from "./node-http2";
5
5
  import { NodeHttp2ConnectionManager } from "./node-http2-connection-manager";
6
+ import { resolveDefaultSocketTimeout } from "./resolve-default-socket-timeout";
6
7
  import { writeRequestBody } from "./write-request-body";
7
8
  const { constants } = node_http2;
8
9
  export class NodeHttp2Handler {
@@ -35,7 +36,8 @@ export class NodeHttp2Handler {
35
36
  }
36
37
  async handle(request, { abortSignal, requestTimeout, isEventStream } = {}) {
37
38
  if (!this.config) {
38
- this.config = await this.configProvider;
39
+ const config = await this.configProvider;
40
+ this.config = { ...config, defaultSocketTimeout: resolveDefaultSocketTimeout(config) };
39
41
  const { disableConcurrentStreams, maxConcurrentStreams, nodeHttp2ConnectOptions } = this.config;
40
42
  this.connectionManager.setDisableConcurrentStreams(disableConcurrentStreams ?? false);
41
43
  if (maxConcurrentStreams) {
@@ -45,9 +47,12 @@ export class NodeHttp2Handler {
45
47
  this.connectionManager.setNodeHttp2ConnectOptions(nodeHttp2ConnectOptions);
46
48
  }
47
49
  }
48
- const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config;
50
+ const { requestTimeout: configRequestTimeout, disableConcurrentStreams, sessionTimeout } = this.config;
49
51
  const useIsolatedSession = disableConcurrentStreams || isEventStream;
50
52
  const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout;
53
+ const defaultSocketTimeout = effectiveRequestTimeout === undefined && sessionTimeout === undefined
54
+ ? this.config.defaultSocketTimeout
55
+ : undefined;
51
56
  return new Promise((_resolve, _reject) => {
52
57
  let fulfilled = false;
53
58
  let writeRequestBodyPromise = undefined;
@@ -110,6 +115,19 @@ export class NodeHttp2Handler {
110
115
  rejectWithDestroy(timeoutError);
111
116
  });
112
117
  }
118
+ else if (defaultSocketTimeout) {
119
+ clientHttp2Stream.setTimeout(defaultSocketTimeout, () => {
120
+ const timeoutError = new Error(`Stream timed out because of no activity for ${defaultSocketTimeout} ms`);
121
+ timeoutError.name = "TimeoutError";
122
+ fulfilled = true;
123
+ reject(timeoutError);
124
+ clientHttp2Stream.destroy(timeoutError);
125
+ if (useIsolatedSession) {
126
+ ref.destroy();
127
+ }
128
+ });
129
+ clientHttp2Stream.once("response", () => clientHttp2Stream.setTimeout(defaultSocketTimeout));
130
+ }
113
131
  if (abortSignal) {
114
132
  const onAbort = () => {
115
133
  clientHttp2Stream.close();
@@ -168,6 +186,12 @@ export class NodeHttp2Handler {
168
186
  updateHttpClientConfig(key, value) {
169
187
  this.config = undefined;
170
188
  this.configProvider = this.configProvider.then((config) => {
189
+ switch (key) {
190
+ case Symbol.for("@smithy/defaultSocketTimeout"):
191
+ key = "defaultSocketTimeout";
192
+ value = resolveDefaultSocketTimeout(config) ?? value;
193
+ break;
194
+ }
171
195
  return {
172
196
  ...config,
173
197
  [key]: value,
@@ -0,0 +1,4 @@
1
+ export const resolveDefaultSocketTimeout = (config) => {
2
+ const value = config?.defaultSocketTimeout;
3
+ return typeof value === "number" && Number.isFinite(value) && value > 0 ? value : undefined;
4
+ };
@@ -1,23 +1,38 @@
1
1
  import { timing } from "./timing";
2
2
  const DEFER_EVENT_LISTENER_TIME = 3000;
3
- export const setSocketTimeout = (request, reject, timeoutInMs = 0) => {
4
- const registerTimeout = (offset) => {
5
- const timeout = timeoutInMs - offset;
6
- const onTimeout = () => {
7
- request.destroy();
8
- reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" }));
9
- };
10
- if (request.socket) {
11
- request.socket.setTimeout(timeout, onTimeout);
12
- request.on("close", () => request.socket?.removeListener("timeout", onTimeout));
3
+ export const setSocketTimeout = (request, reject, timeoutInMs = 0, isServiceDefault = false) => {
4
+ if (!Number.isFinite(timeoutInMs) || timeoutInMs <= 0) {
5
+ return;
6
+ }
7
+ let response;
8
+ request.once("response", (res) => (response = res));
9
+ const onTimeout = () => {
10
+ if (response?.complete) {
11
+ request.socket?.destroy();
12
+ return;
13
+ }
14
+ const error = Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (${isServiceDefault ? "service default socket timeout" : "configured by client requestHandler"}).`), { name: "TimeoutError" });
15
+ response?.destroy(error);
16
+ request.destroy();
17
+ reject(error);
18
+ };
19
+ const registerTimeout = () => {
20
+ const { socket } = request;
21
+ if (!socket) {
22
+ request.once("socket", registerTimeout);
23
+ }
24
+ else if (socket.connecting) {
25
+ socket.once("connect", registerTimeout);
13
26
  }
14
27
  else {
15
- request.setTimeout(timeout, onTimeout);
28
+ socket.setTimeout(timeoutInMs, onTimeout);
29
+ request.on("close", () => socket.removeListener("timeout", onTimeout));
16
30
  }
17
31
  };
18
- if (0 < timeoutInMs && timeoutInMs < 6000) {
19
- registerTimeout(0);
20
- return 0;
32
+ if (timeoutInMs < 6000) {
33
+ registerTimeout();
34
+ return;
21
35
  }
22
- return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);
36
+ const deferralId = timing.setTimeout(registerTimeout, DEFER_EVENT_LISTENER_TIME);
37
+ request.once("close", () => timing.clearTimeout(deferralId));
23
38
  };
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare const resolveDefaultSocketTimeout: (config: unknown) => number | undefined;
@@ -1,2 +1,11 @@
1
1
  import type { ClientRequest } from "node:http";
2
- export declare const setSocketTimeout: (request: ClientRequest, reject: (err: Error) => void, timeoutInMs?: number) => NodeJS.Timeout | number;
2
+ /**
3
+ * Sets a rolling socket idle timeout that stays armed through the response body. Timeouts of
4
+ * 6000 ms or more register after 3000 ms, so requests that finish sooner skip the socket
5
+ * listener, and may fire up to 3000 ms late. The timeout is not cancelled on headers. It is
6
+ * removed, or its deferral cleared, when the request closes.
7
+ *
8
+ * @internal
9
+ * @param isServiceDefault - whether timeoutInMs is the service default, which labels the error.
10
+ */
11
+ export declare const setSocketTimeout: (request: ClientRequest, reject: (err: Error) => void, timeoutInMs?: number, isServiceDefault?: boolean) => void;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare const resolveDefaultSocketTimeout: (config: unknown) => number | undefined;
@@ -1,2 +1,11 @@
1
1
  import { ClientRequest } from "node:http";
2
- export declare const setSocketTimeout: (request: ClientRequest, reject: (err: Error) => void, timeoutInMs?: number) => NodeJS.Timeout | number;
2
+ /**
3
+ * Sets a rolling socket idle timeout that stays armed through the response body. Timeouts of
4
+ * 6000 ms or more register after 3000 ms, so requests that finish sooner skip the socket
5
+ * listener, and may fire up to 3000 ms late. The timeout is not cancelled on headers. It is
6
+ * removed, or its deferral cleared, when the request closes.
7
+ *
8
+ * @internal
9
+ * @param isServiceDefault - whether timeoutInMs is the service default, which labels the error.
10
+ */
11
+ export declare const setSocketTimeout: (request: ClientRequest, reject: (err: Error) => void, timeoutInMs?: number, isServiceDefault?: boolean) => void;