@cdklabs/cdk-ecs-codedeploy 0.0.101 → 0.0.103

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 (363) hide show
  1. package/.jsii +3 -3
  2. package/lib/api-canary/index.js +1 -1
  3. package/lib/ecs-appspec/index.js +1 -1
  4. package/lib/ecs-deployment/index.js +1 -1
  5. package/lib/ecs-deployment-provider/is-complete-function.js +2 -2
  6. package/lib/ecs-deployment-provider/on-event-function.js +2 -2
  7. package/lib/ecs-patterns/application-load-balanced-codedeployed-fargate-service.js +1 -1
  8. package/node_modules/@aws-sdk/abort-controller/package.json +4 -4
  9. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/AddTagsToOnPremisesInstancesCommand.js +4 -4
  10. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/BatchGetApplicationRevisionsCommand.js +4 -4
  11. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/BatchGetApplicationsCommand.js +4 -4
  12. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/BatchGetDeploymentGroupsCommand.js +4 -4
  13. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/BatchGetDeploymentInstancesCommand.js +4 -4
  14. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/BatchGetDeploymentTargetsCommand.js +4 -4
  15. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/BatchGetDeploymentsCommand.js +4 -4
  16. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/BatchGetOnPremisesInstancesCommand.js +4 -4
  17. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/ContinueDeploymentCommand.js +4 -4
  18. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/CreateApplicationCommand.js +4 -4
  19. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/CreateDeploymentCommand.js +4 -4
  20. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/CreateDeploymentConfigCommand.js +4 -4
  21. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/CreateDeploymentGroupCommand.js +4 -4
  22. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/DeleteApplicationCommand.js +4 -4
  23. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/DeleteDeploymentConfigCommand.js +4 -4
  24. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/DeleteDeploymentGroupCommand.js +4 -4
  25. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/DeleteGitHubAccountTokenCommand.js +4 -4
  26. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/DeleteResourcesByExternalIdCommand.js +4 -4
  27. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/DeregisterOnPremisesInstanceCommand.js +4 -4
  28. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/GetApplicationCommand.js +4 -4
  29. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/GetApplicationRevisionCommand.js +4 -4
  30. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/GetDeploymentCommand.js +4 -4
  31. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/GetDeploymentConfigCommand.js +4 -4
  32. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/GetDeploymentGroupCommand.js +4 -4
  33. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/GetDeploymentInstanceCommand.js +4 -4
  34. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/GetDeploymentTargetCommand.js +4 -4
  35. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/GetOnPremisesInstanceCommand.js +4 -4
  36. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/ListApplicationRevisionsCommand.js +4 -4
  37. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/ListApplicationsCommand.js +4 -4
  38. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/ListDeploymentConfigsCommand.js +4 -4
  39. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/ListDeploymentGroupsCommand.js +4 -4
  40. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/ListDeploymentInstancesCommand.js +4 -4
  41. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/ListDeploymentTargetsCommand.js +4 -4
  42. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/ListDeploymentsCommand.js +4 -4
  43. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/ListGitHubAccountTokenNamesCommand.js +4 -4
  44. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/ListOnPremisesInstancesCommand.js +4 -4
  45. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/ListTagsForResourceCommand.js +4 -4
  46. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/PutLifecycleEventHookExecutionStatusCommand.js +4 -4
  47. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/RegisterApplicationRevisionCommand.js +4 -4
  48. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/RegisterOnPremisesInstanceCommand.js +4 -4
  49. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/RemoveTagsFromOnPremisesInstancesCommand.js +4 -4
  50. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/SkipWaitTimeForInstanceTerminationCommand.js +4 -4
  51. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/StopDeploymentCommand.js +4 -4
  52. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/TagResourceCommand.js +4 -4
  53. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/UntagResourceCommand.js +4 -4
  54. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/UpdateApplicationCommand.js +4 -4
  55. package/node_modules/@aws-sdk/client-codedeploy/dist-cjs/commands/UpdateDeploymentGroupCommand.js +4 -4
  56. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/AddTagsToOnPremisesInstancesCommand.js +4 -4
  57. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/BatchGetApplicationRevisionsCommand.js +4 -4
  58. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/BatchGetApplicationsCommand.js +4 -4
  59. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/BatchGetDeploymentGroupsCommand.js +4 -4
  60. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/BatchGetDeploymentInstancesCommand.js +4 -4
  61. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/BatchGetDeploymentTargetsCommand.js +4 -4
  62. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/BatchGetDeploymentsCommand.js +4 -4
  63. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/BatchGetOnPremisesInstancesCommand.js +4 -4
  64. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/ContinueDeploymentCommand.js +4 -4
  65. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/CreateApplicationCommand.js +4 -4
  66. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/CreateDeploymentCommand.js +4 -4
  67. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/CreateDeploymentConfigCommand.js +4 -4
  68. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/CreateDeploymentGroupCommand.js +4 -4
  69. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/DeleteApplicationCommand.js +4 -4
  70. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/DeleteDeploymentConfigCommand.js +4 -4
  71. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/DeleteDeploymentGroupCommand.js +4 -4
  72. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/DeleteGitHubAccountTokenCommand.js +4 -4
  73. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/DeleteResourcesByExternalIdCommand.js +4 -4
  74. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/DeregisterOnPremisesInstanceCommand.js +4 -4
  75. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/GetApplicationCommand.js +4 -4
  76. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/GetApplicationRevisionCommand.js +4 -4
  77. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/GetDeploymentCommand.js +4 -4
  78. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/GetDeploymentConfigCommand.js +4 -4
  79. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/GetDeploymentGroupCommand.js +4 -4
  80. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/GetDeploymentInstanceCommand.js +4 -4
  81. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/GetDeploymentTargetCommand.js +4 -4
  82. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/GetOnPremisesInstanceCommand.js +4 -4
  83. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/ListApplicationRevisionsCommand.js +4 -4
  84. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/ListApplicationsCommand.js +4 -4
  85. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/ListDeploymentConfigsCommand.js +4 -4
  86. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/ListDeploymentGroupsCommand.js +4 -4
  87. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/ListDeploymentInstancesCommand.js +4 -4
  88. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/ListDeploymentTargetsCommand.js +4 -4
  89. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/ListDeploymentsCommand.js +4 -4
  90. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/ListGitHubAccountTokenNamesCommand.js +4 -4
  91. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/ListOnPremisesInstancesCommand.js +4 -4
  92. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/ListTagsForResourceCommand.js +4 -4
  93. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/PutLifecycleEventHookExecutionStatusCommand.js +4 -4
  94. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/RegisterApplicationRevisionCommand.js +4 -4
  95. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/RegisterOnPremisesInstanceCommand.js +4 -4
  96. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/RemoveTagsFromOnPremisesInstancesCommand.js +4 -4
  97. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/SkipWaitTimeForInstanceTerminationCommand.js +4 -4
  98. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/StopDeploymentCommand.js +4 -4
  99. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/TagResourceCommand.js +4 -4
  100. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/UntagResourceCommand.js +4 -4
  101. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/UpdateApplicationCommand.js +4 -4
  102. package/node_modules/@aws-sdk/client-codedeploy/dist-es/commands/UpdateDeploymentGroupCommand.js +4 -4
  103. package/node_modules/@aws-sdk/client-codedeploy/dist-types/CodeDeployClient.d.ts +4 -4
  104. package/node_modules/@aws-sdk/client-codedeploy/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  105. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/CodeDeployClient.d.ts +4 -4
  106. package/node_modules/@aws-sdk/client-codedeploy/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +3 -4
  107. package/node_modules/@aws-sdk/client-codedeploy/package.json +37 -37
  108. package/node_modules/@aws-sdk/client-sso/dist-cjs/commands/GetRoleCredentialsCommand.js +4 -4
  109. package/node_modules/@aws-sdk/client-sso/dist-cjs/commands/ListAccountRolesCommand.js +4 -4
  110. package/node_modules/@aws-sdk/client-sso/dist-cjs/commands/ListAccountsCommand.js +4 -4
  111. package/node_modules/@aws-sdk/client-sso/dist-cjs/commands/LogoutCommand.js +4 -4
  112. package/node_modules/@aws-sdk/client-sso/dist-es/commands/GetRoleCredentialsCommand.js +4 -4
  113. package/node_modules/@aws-sdk/client-sso/dist-es/commands/ListAccountRolesCommand.js +4 -4
  114. package/node_modules/@aws-sdk/client-sso/dist-es/commands/ListAccountsCommand.js +4 -4
  115. package/node_modules/@aws-sdk/client-sso/dist-es/commands/LogoutCommand.js +4 -4
  116. package/node_modules/@aws-sdk/client-sso/dist-types/SSOClient.d.ts +4 -4
  117. package/node_modules/@aws-sdk/client-sso/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  118. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/SSOClient.d.ts +4 -4
  119. package/node_modules/@aws-sdk/client-sso/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +3 -4
  120. package/node_modules/@aws-sdk/client-sso/package.json +33 -33
  121. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/CreateTokenCommand.js +4 -4
  122. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/RegisterClientCommand.js +4 -4
  123. package/node_modules/@aws-sdk/client-sso-oidc/dist-cjs/commands/StartDeviceAuthorizationCommand.js +4 -4
  124. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/CreateTokenCommand.js +4 -4
  125. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/RegisterClientCommand.js +4 -4
  126. package/node_modules/@aws-sdk/client-sso-oidc/dist-es/commands/StartDeviceAuthorizationCommand.js +4 -4
  127. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/SSOOIDCClient.d.ts +4 -4
  128. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  129. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/SSOOIDCClient.d.ts +4 -4
  130. package/node_modules/@aws-sdk/client-sso-oidc/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +3 -4
  131. package/node_modules/@aws-sdk/client-sso-oidc/package.json +33 -33
  132. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/AssumeRoleCommand.js +4 -4
  133. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/AssumeRoleWithSAMLCommand.js +4 -4
  134. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/AssumeRoleWithWebIdentityCommand.js +4 -4
  135. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/DecodeAuthorizationMessageCommand.js +4 -4
  136. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetAccessKeyInfoCommand.js +4 -4
  137. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetCallerIdentityCommand.js +4 -4
  138. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetFederationTokenCommand.js +4 -4
  139. package/node_modules/@aws-sdk/client-sts/dist-cjs/commands/GetSessionTokenCommand.js +4 -4
  140. package/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleCommand.js +4 -4
  141. package/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithSAMLCommand.js +4 -4
  142. package/node_modules/@aws-sdk/client-sts/dist-es/commands/AssumeRoleWithWebIdentityCommand.js +4 -4
  143. package/node_modules/@aws-sdk/client-sts/dist-es/commands/DecodeAuthorizationMessageCommand.js +4 -4
  144. package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetAccessKeyInfoCommand.js +4 -4
  145. package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetCallerIdentityCommand.js +4 -4
  146. package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetFederationTokenCommand.js +4 -4
  147. package/node_modules/@aws-sdk/client-sts/dist-es/commands/GetSessionTokenCommand.js +4 -4
  148. package/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts +4 -4
  149. package/node_modules/@aws-sdk/client-sts/dist-types/defaultRoleAssumers.d.ts +2 -2
  150. package/node_modules/@aws-sdk/client-sts/dist-types/defaultStsRoleAssumers.d.ts +3 -3
  151. package/node_modules/@aws-sdk/client-sts/dist-types/endpoint/EndpointParameters.d.ts +1 -1
  152. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/STSClient.d.ts +4 -4
  153. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/defaultRoleAssumers.d.ts +2 -2
  154. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/defaultStsRoleAssumers.d.ts +3 -5
  155. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +3 -4
  156. package/node_modules/@aws-sdk/client-sts/package.json +36 -36
  157. package/node_modules/@aws-sdk/config-resolver/dist-types/regionInfo/EndpointVariant.d.ts +1 -1
  158. package/node_modules/@aws-sdk/config-resolver/dist-types/regionInfo/EndpointVariantTag.d.ts +1 -1
  159. package/node_modules/@aws-sdk/config-resolver/dist-types/regionInfo/PartitionHash.d.ts +1 -1
  160. package/node_modules/@aws-sdk/config-resolver/dist-types/regionInfo/RegionHash.d.ts +1 -1
  161. package/node_modules/@aws-sdk/config-resolver/dist-types/ts3.4/regionInfo/EndpointVariant.d.ts +1 -1
  162. package/node_modules/@aws-sdk/config-resolver/dist-types/ts3.4/regionInfo/EndpointVariantTag.d.ts +1 -1
  163. package/node_modules/@aws-sdk/config-resolver/dist-types/ts3.4/regionInfo/PartitionHash.d.ts +1 -1
  164. package/node_modules/@aws-sdk/config-resolver/dist-types/ts3.4/regionInfo/RegionHash.d.ts +1 -1
  165. package/node_modules/@aws-sdk/config-resolver/package.json +8 -8
  166. package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
  167. package/node_modules/@aws-sdk/credential-provider-imds/dist-types/remoteProvider/httpRequest.d.ts +1 -0
  168. package/node_modules/@aws-sdk/credential-provider-imds/package.json +7 -7
  169. package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/resolveProcessCredentials.js +1 -3
  170. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProcessCredentials.js +1 -3
  171. package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
  172. package/node_modules/@aws-sdk/credential-provider-node/dist-types/defaultProvider.d.ts +1 -1
  173. package/node_modules/@aws-sdk/credential-provider-node/dist-types/ts3.4/defaultProvider.d.ts +1 -1
  174. package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
  175. package/node_modules/@aws-sdk/credential-provider-process/dist-types/ProcessCredentials.d.ts +1 -1
  176. package/node_modules/@aws-sdk/credential-provider-process/dist-types/ts3.4/ProcessCredentials.d.ts +1 -1
  177. package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
  178. package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
  179. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/fromWebToken.d.ts +1 -1
  180. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-types/ts3.4/fromWebToken.d.ts +1 -1
  181. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +5 -5
  182. package/node_modules/@aws-sdk/fetch-http-handler/package.json +8 -8
  183. package/node_modules/@aws-sdk/hash-node/package.json +6 -6
  184. package/node_modules/@aws-sdk/invalid-dependency/package.json +4 -4
  185. package/node_modules/@aws-sdk/is-array-buffer/package.json +3 -3
  186. package/node_modules/@aws-sdk/middleware-content-length/package.json +5 -5
  187. package/node_modules/@aws-sdk/middleware-endpoint/dist-types/adaptors/getEndpointFromInstructions.d.ts +2 -2
  188. package/node_modules/@aws-sdk/middleware-endpoint/dist-types/ts3.4/adaptors/getEndpointFromInstructions.d.ts +2 -2
  189. package/node_modules/@aws-sdk/middleware-endpoint/package.json +10 -10
  190. package/node_modules/@aws-sdk/middleware-host-header/package.json +5 -5
  191. package/node_modules/@aws-sdk/middleware-logger/package.json +4 -4
  192. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +5 -5
  193. package/node_modules/@aws-sdk/middleware-retry/dist-types/defaultRetryQuota.d.ts +1 -1
  194. package/node_modules/@aws-sdk/middleware-retry/dist-types/ts3.4/defaultRetryQuota.d.ts +1 -1
  195. package/node_modules/@aws-sdk/middleware-retry/package.json +9 -9
  196. package/node_modules/@aws-sdk/middleware-sdk-sts/package.json +8 -8
  197. package/node_modules/@aws-sdk/middleware-serde/dist-types/serdePlugin.d.ts +1 -1
  198. package/node_modules/@aws-sdk/middleware-serde/dist-types/ts3.4/serdePlugin.d.ts +1 -1
  199. package/node_modules/@aws-sdk/middleware-serde/package.json +4 -4
  200. package/node_modules/@aws-sdk/middleware-signing/package.json +8 -8
  201. package/node_modules/@aws-sdk/middleware-stack/dist-types/ts3.4/types.d.ts +2 -2
  202. package/node_modules/@aws-sdk/middleware-stack/dist-types/types.d.ts +2 -2
  203. package/node_modules/@aws-sdk/middleware-stack/package.json +4 -4
  204. package/node_modules/@aws-sdk/middleware-user-agent/package.json +7 -7
  205. package/node_modules/@aws-sdk/node-config-provider/dist-types/configLoader.d.ts +1 -1
  206. package/node_modules/@aws-sdk/node-config-provider/dist-types/fromEnv.d.ts +1 -1
  207. package/node_modules/@aws-sdk/node-config-provider/dist-types/fromSharedConfigFiles.d.ts +1 -1
  208. package/node_modules/@aws-sdk/node-config-provider/dist-types/fromStatic.d.ts +1 -1
  209. package/node_modules/@aws-sdk/node-config-provider/dist-types/ts3.4/configLoader.d.ts +1 -1
  210. package/node_modules/@aws-sdk/node-config-provider/dist-types/ts3.4/fromEnv.d.ts +1 -1
  211. package/node_modules/@aws-sdk/node-config-provider/dist-types/ts3.4/fromSharedConfigFiles.d.ts +1 -1
  212. package/node_modules/@aws-sdk/node-config-provider/dist-types/ts3.4/fromStatic.d.ts +1 -1
  213. package/node_modules/@aws-sdk/node-config-provider/package.json +6 -6
  214. package/node_modules/@aws-sdk/node-http-handler/dist-cjs/node-http-handler.js +11 -6
  215. package/node_modules/@aws-sdk/node-http-handler/dist-cjs/node-http2-connection-manager.js +92 -0
  216. package/node_modules/@aws-sdk/node-http-handler/dist-cjs/node-http2-connection-pool.js +36 -0
  217. package/node_modules/@aws-sdk/node-http-handler/dist-cjs/node-http2-handler.js +14 -37
  218. package/node_modules/@aws-sdk/node-http-handler/dist-es/node-http-handler.js +8 -5
  219. package/node_modules/@aws-sdk/node-http-handler/dist-es/node-http2-connection-manager.js +86 -0
  220. package/node_modules/@aws-sdk/node-http-handler/dist-es/node-http2-connection-pool.js +32 -0
  221. package/node_modules/@aws-sdk/node-http-handler/dist-es/node-http2-handler.js +14 -37
  222. package/node_modules/@aws-sdk/node-http-handler/dist-types/node-http-handler.d.ts +17 -0
  223. package/node_modules/@aws-sdk/node-http-handler/dist-types/node-http2-connection-manager.d.ts +22 -0
  224. package/node_modules/@aws-sdk/node-http-handler/dist-types/node-http2-connection-pool.d.ts +13 -0
  225. package/node_modules/@aws-sdk/node-http-handler/dist-types/node-http2-handler.d.ts +9 -16
  226. package/node_modules/@aws-sdk/node-http-handler/dist-types/readable.mock.d.ts +1 -0
  227. package/node_modules/@aws-sdk/node-http-handler/dist-types/stream-collector/collector.d.ts +1 -0
  228. package/node_modules/@aws-sdk/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +1 -0
  229. package/node_modules/@aws-sdk/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +2 -0
  230. package/node_modules/@aws-sdk/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +24 -0
  231. package/node_modules/@aws-sdk/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +14 -0
  232. package/node_modules/@aws-sdk/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +2 -3
  233. package/node_modules/@aws-sdk/node-http-handler/dist-types/write-request-body.d.ts +1 -0
  234. package/node_modules/@aws-sdk/node-http-handler/package.json +7 -7
  235. package/node_modules/@aws-sdk/property-provider/package.json +4 -4
  236. package/node_modules/@aws-sdk/protocol-http/dist-types/Field.d.ts +1 -1
  237. package/node_modules/@aws-sdk/protocol-http/dist-types/Fields.d.ts +1 -1
  238. package/node_modules/@aws-sdk/protocol-http/dist-types/httpHandler.d.ts +1 -1
  239. package/node_modules/@aws-sdk/protocol-http/dist-types/httpRequest.d.ts +1 -1
  240. package/node_modules/@aws-sdk/protocol-http/dist-types/httpResponse.d.ts +1 -1
  241. package/node_modules/@aws-sdk/protocol-http/dist-types/ts3.4/Field.d.ts +1 -1
  242. package/node_modules/@aws-sdk/protocol-http/dist-types/ts3.4/Fields.d.ts +1 -1
  243. package/node_modules/@aws-sdk/protocol-http/dist-types/ts3.4/httpHandler.d.ts +1 -1
  244. package/node_modules/@aws-sdk/protocol-http/dist-types/ts3.4/httpRequest.d.ts +1 -1
  245. package/node_modules/@aws-sdk/protocol-http/dist-types/ts3.4/httpResponse.d.ts +1 -1
  246. package/node_modules/@aws-sdk/protocol-http/package.json +4 -4
  247. package/node_modules/@aws-sdk/querystring-builder/package.json +5 -5
  248. package/node_modules/@aws-sdk/querystring-parser/package.json +4 -4
  249. package/node_modules/@aws-sdk/service-error-classification/package.json +3 -3
  250. package/node_modules/@aws-sdk/shared-ini-file-loader/dist-types/slurpFile.d.ts +1 -1
  251. package/node_modules/@aws-sdk/shared-ini-file-loader/dist-types/ts3.4/slurpFile.d.ts +1 -1
  252. package/node_modules/@aws-sdk/shared-ini-file-loader/dist-types/ts3.4/types.d.ts +3 -3
  253. package/node_modules/@aws-sdk/shared-ini-file-loader/dist-types/types.d.ts +3 -3
  254. package/node_modules/@aws-sdk/shared-ini-file-loader/package.json +4 -4
  255. package/node_modules/@aws-sdk/signature-v4/dist-types/getCanonicalHeaders.d.ts +1 -1
  256. package/node_modules/@aws-sdk/signature-v4/dist-types/ts3.4/getCanonicalHeaders.d.ts +2 -2
  257. package/node_modules/@aws-sdk/signature-v4/package.json +11 -11
  258. package/node_modules/@aws-sdk/smithy-client/dist-types/client.d.ts +1 -1
  259. package/node_modules/@aws-sdk/smithy-client/dist-types/defaults-mode.d.ts +2 -2
  260. package/node_modules/@aws-sdk/smithy-client/dist-types/exceptions.d.ts +1 -1
  261. package/node_modules/@aws-sdk/smithy-client/dist-types/object-mapping.d.ts +12 -12
  262. package/node_modules/@aws-sdk/smithy-client/dist-types/parse-utils.d.ts +1 -1
  263. package/node_modules/@aws-sdk/smithy-client/dist-types/ts3.4/client.d.ts +1 -1
  264. package/node_modules/@aws-sdk/smithy-client/dist-types/ts3.4/defaults-mode.d.ts +2 -2
  265. package/node_modules/@aws-sdk/smithy-client/dist-types/ts3.4/exceptions.d.ts +1 -1
  266. package/node_modules/@aws-sdk/smithy-client/dist-types/ts3.4/object-mapping.d.ts +12 -15
  267. package/node_modules/@aws-sdk/smithy-client/dist-types/ts3.4/parse-utils.d.ts +1 -1
  268. package/node_modules/@aws-sdk/smithy-client/package.json +5 -5
  269. package/node_modules/@aws-sdk/token-providers/package.json +7 -7
  270. package/node_modules/@aws-sdk/types/dist-cjs/connection/config.js +2 -0
  271. package/node_modules/@aws-sdk/types/dist-cjs/connection/manager.js +2 -0
  272. package/node_modules/@aws-sdk/types/dist-cjs/connection/pool.js +2 -0
  273. package/node_modules/@aws-sdk/types/dist-cjs/transfer.js +7 -0
  274. package/node_modules/@aws-sdk/types/dist-es/connection/config.js +1 -0
  275. package/node_modules/@aws-sdk/types/dist-es/connection/manager.js +1 -0
  276. package/node_modules/@aws-sdk/types/dist-es/connection/pool.js +1 -0
  277. package/node_modules/@aws-sdk/types/dist-es/transfer.js +6 -1
  278. package/node_modules/@aws-sdk/types/dist-types/connection/config.d.ts +7 -0
  279. package/node_modules/@aws-sdk/types/dist-types/connection/manager.d.ts +28 -0
  280. package/node_modules/@aws-sdk/types/dist-types/connection/pool.d.ts +24 -0
  281. package/node_modules/@aws-sdk/types/dist-types/credentials.d.ts +1 -1
  282. package/node_modules/@aws-sdk/types/dist-types/crypto.d.ts +1 -1
  283. package/node_modules/@aws-sdk/types/dist-types/endpoint.d.ts +2 -2
  284. package/node_modules/@aws-sdk/types/dist-types/eventStream.d.ts +2 -2
  285. package/node_modules/@aws-sdk/types/dist-types/http.d.ts +7 -2
  286. package/node_modules/@aws-sdk/types/dist-types/identity/AwsCredentialIdentity.d.ts +1 -1
  287. package/node_modules/@aws-sdk/types/dist-types/identity/LoginIdentity.d.ts +1 -1
  288. package/node_modules/@aws-sdk/types/dist-types/identity/TokenIdentity.d.ts +1 -1
  289. package/node_modules/@aws-sdk/types/dist-types/logger.d.ts +1 -1
  290. package/node_modules/@aws-sdk/types/dist-types/middleware.d.ts +6 -6
  291. package/node_modules/@aws-sdk/types/dist-types/pagination.d.ts +1 -1
  292. package/node_modules/@aws-sdk/types/dist-types/profile.d.ts +2 -2
  293. package/node_modules/@aws-sdk/types/dist-types/retry.d.ts +2 -2
  294. package/node_modules/@aws-sdk/types/dist-types/serde.d.ts +2 -2
  295. package/node_modules/@aws-sdk/types/dist-types/shapes.d.ts +2 -2
  296. package/node_modules/@aws-sdk/types/dist-types/signature.d.ts +1 -1
  297. package/node_modules/@aws-sdk/types/dist-types/token.d.ts +1 -1
  298. package/node_modules/@aws-sdk/types/dist-types/transfer.d.ts +10 -2
  299. package/node_modules/@aws-sdk/types/dist-types/ts3.4/connection/config.d.ts +3 -0
  300. package/node_modules/@aws-sdk/types/dist-types/ts3.4/connection/manager.d.ts +14 -0
  301. package/node_modules/@aws-sdk/types/dist-types/ts3.4/connection/pool.d.ts +9 -0
  302. package/node_modules/@aws-sdk/types/dist-types/ts3.4/credentials.d.ts +1 -1
  303. package/node_modules/@aws-sdk/types/dist-types/ts3.4/crypto.d.ts +1 -1
  304. package/node_modules/@aws-sdk/types/dist-types/ts3.4/endpoint.d.ts +2 -2
  305. package/node_modules/@aws-sdk/types/dist-types/ts3.4/eventStream.d.ts +2 -2
  306. package/node_modules/@aws-sdk/types/dist-types/ts3.4/http.d.ts +3 -5
  307. package/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/AwsCredentialIdentity.d.ts +1 -1
  308. package/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/LoginIdentity.d.ts +1 -1
  309. package/node_modules/@aws-sdk/types/dist-types/ts3.4/identity/TokenIdentity.d.ts +1 -1
  310. package/node_modules/@aws-sdk/types/dist-types/ts3.4/logger.d.ts +1 -1
  311. package/node_modules/@aws-sdk/types/dist-types/ts3.4/middleware.d.ts +6 -9
  312. package/node_modules/@aws-sdk/types/dist-types/ts3.4/pagination.d.ts +1 -1
  313. package/node_modules/@aws-sdk/types/dist-types/ts3.4/profile.d.ts +2 -2
  314. package/node_modules/@aws-sdk/types/dist-types/ts3.4/retry.d.ts +2 -2
  315. package/node_modules/@aws-sdk/types/dist-types/ts3.4/serde.d.ts +2 -2
  316. package/node_modules/@aws-sdk/types/dist-types/ts3.4/shapes.d.ts +2 -2
  317. package/node_modules/@aws-sdk/types/dist-types/ts3.4/signature.d.ts +1 -1
  318. package/node_modules/@aws-sdk/types/dist-types/ts3.4/token.d.ts +1 -1
  319. package/node_modules/@aws-sdk/types/dist-types/ts3.4/transfer.d.ts +10 -2
  320. package/node_modules/@aws-sdk/types/dist-types/ts3.4/util.d.ts +2 -2
  321. package/node_modules/@aws-sdk/types/dist-types/util.d.ts +2 -2
  322. package/node_modules/@aws-sdk/types/package.json +3 -3
  323. package/node_modules/@aws-sdk/url-parser/package.json +5 -5
  324. package/node_modules/@aws-sdk/util-base64/package.json +4 -4
  325. package/node_modules/@aws-sdk/util-body-length-browser/package.json +3 -3
  326. package/node_modules/@aws-sdk/util-body-length-node/package.json +3 -3
  327. package/node_modules/@aws-sdk/util-buffer-from/dist-types/index.d.ts +2 -2
  328. package/node_modules/@aws-sdk/util-buffer-from/dist-types/ts3.4/index.d.ts +2 -2
  329. package/node_modules/@aws-sdk/util-buffer-from/package.json +4 -4
  330. package/node_modules/@aws-sdk/util-config-provider/package.json +3 -3
  331. package/node_modules/@aws-sdk/util-defaults-mode-browser/package.json +6 -6
  332. package/node_modules/@aws-sdk/util-defaults-mode-node/package.json +9 -9
  333. package/node_modules/@aws-sdk/util-endpoints/dist-types/lib/aws/partition.d.ts +1 -1
  334. package/node_modules/@aws-sdk/util-endpoints/dist-types/lib/getAttr.d.ts +1 -1
  335. package/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/aws/partition.d.ts +1 -1
  336. package/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/lib/getAttr.d.ts +1 -1
  337. package/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/EndpointRuleObject.d.ts +4 -7
  338. package/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/ErrorRuleObject.d.ts +1 -1
  339. package/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/RuleSetObject.d.ts +3 -3
  340. package/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/TreeRuleObject.d.ts +2 -2
  341. package/node_modules/@aws-sdk/util-endpoints/dist-types/ts3.4/types/shared.d.ts +10 -10
  342. package/node_modules/@aws-sdk/util-endpoints/dist-types/types/EndpointRuleObject.d.ts +4 -4
  343. package/node_modules/@aws-sdk/util-endpoints/dist-types/types/ErrorRuleObject.d.ts +1 -1
  344. package/node_modules/@aws-sdk/util-endpoints/dist-types/types/RuleSetObject.d.ts +3 -3
  345. package/node_modules/@aws-sdk/util-endpoints/dist-types/types/TreeRuleObject.d.ts +2 -2
  346. package/node_modules/@aws-sdk/util-endpoints/dist-types/types/shared.d.ts +10 -10
  347. package/node_modules/@aws-sdk/util-endpoints/package.json +4 -4
  348. package/node_modules/@aws-sdk/util-hex-encoding/package.json +3 -3
  349. package/node_modules/@aws-sdk/util-locate-window/package.json +3 -3
  350. package/node_modules/@aws-sdk/util-middleware/package.json +4 -4
  351. package/node_modules/@aws-sdk/util-retry/dist-types/defaultRetryToken.d.ts +1 -1
  352. package/node_modules/@aws-sdk/util-retry/dist-types/ts3.4/defaultRetryToken.d.ts +2 -2
  353. package/node_modules/@aws-sdk/util-retry/package.json +5 -5
  354. package/node_modules/@aws-sdk/util-uri-escape/package.json +3 -3
  355. package/node_modules/@aws-sdk/util-user-agent-browser/package.json +5 -5
  356. package/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/is-crt-available.js +1 -1
  357. package/node_modules/@aws-sdk/util-user-agent-node/dist-es/is-crt-available.js +1 -1
  358. package/node_modules/@aws-sdk/util-user-agent-node/package.json +6 -6
  359. package/node_modules/@aws-sdk/util-utf8/package.json +4 -4
  360. package/node_modules/@aws-sdk/util-waiter/dist-types/ts3.4/waiter.d.ts +2 -2
  361. package/node_modules/@aws-sdk/util-waiter/dist-types/waiter.d.ts +2 -2
  362. package/node_modules/@aws-sdk/util-waiter/package.json +5 -5
  363. package/package.json +8 -8
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/node-config-provider",
3
- "version": "3.292.0",
3
+ "version": "3.296.0",
4
4
  "description": "Load config default values from ini config files and environmental variable",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
@@ -22,10 +22,10 @@
22
22
  "module": "./dist-es/index.js",
23
23
  "types": "./dist-types/index.d.ts",
24
24
  "dependencies": {
25
- "@aws-sdk/property-provider": "3.292.0",
26
- "@aws-sdk/shared-ini-file-loader": "3.292.0",
27
- "@aws-sdk/types": "3.292.0",
28
- "tslib": "^2.3.1"
25
+ "@aws-sdk/property-provider": "3.296.0",
26
+ "@aws-sdk/shared-ini-file-loader": "3.296.0",
27
+ "@aws-sdk/types": "3.296.0",
28
+ "tslib": "^2.5.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@tsconfig/recommended": "1.0.1",
@@ -34,7 +34,7 @@
34
34
  "downlevel-dts": "0.10.1",
35
35
  "rimraf": "3.0.2",
36
36
  "typedoc": "0.23.23",
37
- "typescript": "~4.6.2"
37
+ "typescript": "~4.9.5"
38
38
  },
39
39
  "engines": {
40
40
  "node": ">=14.0.0"
@@ -1,15 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NodeHttpHandler = void 0;
3
+ exports.NodeHttpHandler = exports.DEFAULT_REQUEST_TIMEOUT = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const querystring_builder_1 = require("@aws-sdk/querystring-builder");
6
6
  const http_1 = require("http");
7
7
  const https_1 = require("https");
8
8
  const constants_1 = require("./constants");
9
9
  const get_transformed_headers_1 = require("./get-transformed-headers");
10
- const set_connection_timeout_1 = require("./set-connection-timeout");
11
- const set_socket_timeout_1 = require("./set-socket-timeout");
12
10
  const write_request_body_1 = require("./write-request-body");
11
+ exports.DEFAULT_REQUEST_TIMEOUT = 0;
13
12
  class NodeHttpHandler {
14
13
  constructor(options) {
15
14
  this.metadata = { handlerProtocol: "http/1.1" };
@@ -27,12 +26,14 @@ class NodeHttpHandler {
27
26
  });
28
27
  }
29
28
  resolveDefaultConfig(options) {
30
- const { connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {};
29
+ var _a, _b;
30
+ const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {};
31
31
  const keepAlive = true;
32
32
  const maxSockets = 50;
33
33
  return {
34
34
  connectionTimeout,
35
35
  socketTimeout,
36
+ requestTimeout: (_b = (_a = requestTimeout !== null && requestTimeout !== void 0 ? requestTimeout : connectionTimeout) !== null && _a !== void 0 ? _a : socketTimeout) !== null && _b !== void 0 ? _b : exports.DEFAULT_REQUEST_TIMEOUT,
36
37
  httpAgent: httpAgent || new http_1.Agent({ keepAlive, maxSockets }),
37
38
  httpsAgent: httpsAgent || new https_1.Agent({ keepAlive, maxSockets }),
38
39
  };
@@ -47,6 +48,7 @@ class NodeHttpHandler {
47
48
  this.config = await this.configProvider;
48
49
  }
49
50
  return new Promise((resolve, reject) => {
51
+ var _a, _b;
50
52
  if (!this.config) {
51
53
  throw new Error("Node HTTP request handler config is not resolved");
52
54
  }
@@ -83,8 +85,11 @@ class NodeHttpHandler {
83
85
  reject(err);
84
86
  }
85
87
  });
86
- (0, set_connection_timeout_1.setConnectionTimeout)(req, reject, this.config.connectionTimeout);
87
- (0, set_socket_timeout_1.setSocketTimeout)(req, reject, this.config.socketTimeout);
88
+ const timeout = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.requestTimeout) !== null && _b !== void 0 ? _b : exports.DEFAULT_REQUEST_TIMEOUT;
89
+ req.setTimeout(timeout, () => {
90
+ req.destroy();
91
+ reject(Object.assign(new Error(`Connection timed out after ${timeout} ms`), { name: "TimeoutError" }));
92
+ });
88
93
  if (abortSignal) {
89
94
  abortSignal.onabort = () => {
90
95
  req.abort();
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NodeHttp2ConnectionManager = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const http2_1 = tslib_1.__importDefault(require("http2"));
6
+ const node_http2_connection_pool_1 = require("./node-http2-connection-pool");
7
+ class NodeHttp2ConnectionManager {
8
+ constructor(config) {
9
+ this.sessionCache = new Map();
10
+ this.config = config;
11
+ if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {
12
+ throw new RangeError("maxConcurrency must be greater than zero.");
13
+ }
14
+ }
15
+ lease(requestContext, connectionConfiguration) {
16
+ const url = this.getUrlString(requestContext);
17
+ const existingPool = this.sessionCache.get(url);
18
+ if (existingPool) {
19
+ const existingSession = existingPool.poll();
20
+ if (existingSession && !this.config.disableConcurrency) {
21
+ return existingSession;
22
+ }
23
+ }
24
+ const session = http2_1.default.connect(url);
25
+ if (this.config.maxConcurrency) {
26
+ session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {
27
+ if (err) {
28
+ throw new Error("Fail to set maxConcurrentStreams to " +
29
+ this.config.maxConcurrency +
30
+ "when creating new session for " +
31
+ requestContext.destination.toString());
32
+ }
33
+ });
34
+ }
35
+ session.unref();
36
+ const destroySessionCb = () => {
37
+ session.destroy();
38
+ this.deleteSession(url, session);
39
+ };
40
+ session.on("goaway", destroySessionCb);
41
+ session.on("error", destroySessionCb);
42
+ session.on("frameError", destroySessionCb);
43
+ session.on("close", () => this.deleteSession(url, session));
44
+ if (connectionConfiguration.requestTimeout) {
45
+ session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb);
46
+ }
47
+ const connectionPool = this.sessionCache.get(url) || new node_http2_connection_pool_1.NodeHttp2ConnectionPool();
48
+ connectionPool.offerLast(session);
49
+ this.sessionCache.set(url, connectionPool);
50
+ return session;
51
+ }
52
+ deleteSession(authority, session) {
53
+ const existingConnectionPool = this.sessionCache.get(authority);
54
+ if (!existingConnectionPool) {
55
+ return;
56
+ }
57
+ if (!existingConnectionPool.contains(session)) {
58
+ return;
59
+ }
60
+ existingConnectionPool.remove(session);
61
+ this.sessionCache.set(authority, existingConnectionPool);
62
+ }
63
+ release(requestContext, session) {
64
+ var _a;
65
+ const cacheKey = this.getUrlString(requestContext);
66
+ (_a = this.sessionCache.get(cacheKey)) === null || _a === void 0 ? void 0 : _a.offerLast(session);
67
+ }
68
+ destroy() {
69
+ for (const [key, connectionPool] of this.sessionCache) {
70
+ for (const session of connectionPool) {
71
+ if (!session.destroyed) {
72
+ session.destroy();
73
+ }
74
+ connectionPool.remove(session);
75
+ }
76
+ this.sessionCache.delete(key);
77
+ }
78
+ }
79
+ setMaxConcurrentStreams(maxConcurrentStreams) {
80
+ if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {
81
+ throw new RangeError("maxConcurrentStreams must be greater than zero.");
82
+ }
83
+ this.config.maxConcurrency = maxConcurrentStreams;
84
+ }
85
+ setDisableConcurrentStreams(disableConcurrentStreams) {
86
+ this.config.disableConcurrency = disableConcurrentStreams;
87
+ }
88
+ getUrlString(request) {
89
+ return request.destination.toString();
90
+ }
91
+ }
92
+ exports.NodeHttp2ConnectionManager = NodeHttp2ConnectionManager;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NodeHttp2ConnectionPool = void 0;
4
+ class NodeHttp2ConnectionPool {
5
+ constructor(sessions) {
6
+ this.sessions = [];
7
+ this.sessions = sessions !== null && sessions !== void 0 ? sessions : [];
8
+ }
9
+ poll() {
10
+ if (this.sessions.length > 0) {
11
+ return this.sessions.shift();
12
+ }
13
+ }
14
+ offerLast(session) {
15
+ this.sessions.push(session);
16
+ }
17
+ contains(session) {
18
+ return this.sessions.includes(session);
19
+ }
20
+ remove(session) {
21
+ this.sessions = this.sessions.filter((s) => s !== session);
22
+ }
23
+ [Symbol.iterator]() {
24
+ return this.sessions[Symbol.iterator]();
25
+ }
26
+ destroy(connection) {
27
+ for (const session of this.sessions) {
28
+ if (session === connection) {
29
+ if (!session.destroyed) {
30
+ session.destroy();
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+ exports.NodeHttp2ConnectionPool = NodeHttp2ConnectionPool;
@@ -5,10 +5,12 @@ const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const querystring_builder_1 = require("@aws-sdk/querystring-builder");
6
6
  const http2_1 = require("http2");
7
7
  const get_transformed_headers_1 = require("./get-transformed-headers");
8
+ const node_http2_connection_manager_1 = require("./node-http2-connection-manager");
8
9
  const write_request_body_1 = require("./write-request-body");
9
10
  class NodeHttp2Handler {
10
11
  constructor(options) {
11
12
  this.metadata = { handlerProtocol: "h2" };
13
+ this.connectionManager = new node_http2_connection_manager_1.NodeHttp2ConnectionManager({});
12
14
  this.configProvider = new Promise((resolve, reject) => {
13
15
  if (typeof options === "function") {
14
16
  options()
@@ -21,20 +23,21 @@ class NodeHttp2Handler {
21
23
  resolve(options || {});
22
24
  }
23
25
  });
24
- this.sessionCache = new Map();
25
26
  }
26
27
  destroy() {
27
- for (const sessions of this.sessionCache.values()) {
28
- sessions.forEach((session) => this.destroySession(session));
29
- }
30
- this.sessionCache.clear();
28
+ this.connectionManager.destroy();
31
29
  }
32
30
  async handle(request, { abortSignal } = {}) {
33
31
  if (!this.config) {
34
32
  this.config = await this.configProvider;
33
+ this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false);
34
+ if (this.config.maxConcurrentStreams) {
35
+ this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams);
36
+ }
35
37
  }
36
38
  const { requestTimeout, disableConcurrentStreams } = this.config;
37
39
  return new Promise((resolve, rejectOriginal) => {
40
+ var _a;
38
41
  let fulfilled = false;
39
42
  if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) {
40
43
  fulfilled = true;
@@ -45,7 +48,11 @@ class NodeHttp2Handler {
45
48
  }
46
49
  const { hostname, method, port, protocol, path, query } = request;
47
50
  const authority = `${protocol}//${hostname}${port ? `:${port}` : ""}`;
48
- const session = this.getSession(authority, disableConcurrentStreams || false);
51
+ const requestContext = { destination: new URL(authority) };
52
+ const session = this.connectionManager.lease(requestContext, {
53
+ requestTimeout: (_a = this.config) === null || _a === void 0 ? void 0 : _a.sessionTimeout,
54
+ disableConcurrentStreams: disableConcurrentStreams || false,
55
+ });
49
56
  const reject = (err) => {
50
57
  if (disableConcurrentStreams) {
51
58
  this.destroySession(session);
@@ -70,7 +77,7 @@ class NodeHttp2Handler {
70
77
  resolve({ response: httpResponse });
71
78
  if (disableConcurrentStreams) {
72
79
  session.close();
73
- this.deleteSessionFromCache(authority, session);
80
+ this.connectionManager.deleteSession(authority, session);
74
81
  }
75
82
  });
76
83
  if (requestTimeout) {
@@ -108,40 +115,10 @@ class NodeHttp2Handler {
108
115
  (0, write_request_body_1.writeRequestBody)(req, request);
109
116
  });
110
117
  }
111
- getSession(authority, disableConcurrentStreams) {
112
- var _a;
113
- const sessionCache = this.sessionCache;
114
- const existingSessions = sessionCache.get(authority) || [];
115
- if (existingSessions.length > 0 && !disableConcurrentStreams)
116
- return existingSessions[0];
117
- const newSession = (0, http2_1.connect)(authority);
118
- newSession.unref();
119
- const destroySessionCb = () => {
120
- this.destroySession(newSession);
121
- this.deleteSessionFromCache(authority, newSession);
122
- };
123
- newSession.on("goaway", destroySessionCb);
124
- newSession.on("error", destroySessionCb);
125
- newSession.on("frameError", destroySessionCb);
126
- newSession.on("close", () => this.deleteSessionFromCache(authority, newSession));
127
- if ((_a = this.config) === null || _a === void 0 ? void 0 : _a.sessionTimeout) {
128
- newSession.setTimeout(this.config.sessionTimeout, destroySessionCb);
129
- }
130
- existingSessions.push(newSession);
131
- sessionCache.set(authority, existingSessions);
132
- return newSession;
133
- }
134
118
  destroySession(session) {
135
119
  if (!session.destroyed) {
136
120
  session.destroy();
137
121
  }
138
122
  }
139
- deleteSessionFromCache(authority, session) {
140
- const existingSessions = this.sessionCache.get(authority) || [];
141
- if (!existingSessions.includes(session)) {
142
- return;
143
- }
144
- this.sessionCache.set(authority, existingSessions.filter((s) => s !== session));
145
- }
146
123
  }
147
124
  exports.NodeHttp2Handler = NodeHttp2Handler;
@@ -4,9 +4,8 @@ import { Agent as hAgent, request as hRequest } from "http";
4
4
  import { Agent as hsAgent, request as hsRequest } from "https";
5
5
  import { NODEJS_TIMEOUT_ERROR_CODES } from "./constants";
6
6
  import { getTransformedHeaders } from "./get-transformed-headers";
7
- import { setConnectionTimeout } from "./set-connection-timeout";
8
- import { setSocketTimeout } from "./set-socket-timeout";
9
7
  import { writeRequestBody } from "./write-request-body";
8
+ export const DEFAULT_REQUEST_TIMEOUT = 0;
10
9
  export class NodeHttpHandler {
11
10
  constructor(options) {
12
11
  this.metadata = { handlerProtocol: "http/1.1" };
@@ -24,12 +23,13 @@ export class NodeHttpHandler {
24
23
  });
25
24
  }
26
25
  resolveDefaultConfig(options) {
27
- const { connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {};
26
+ const { requestTimeout, connectionTimeout, socketTimeout, httpAgent, httpsAgent } = options || {};
28
27
  const keepAlive = true;
29
28
  const maxSockets = 50;
30
29
  return {
31
30
  connectionTimeout,
32
31
  socketTimeout,
32
+ requestTimeout: requestTimeout ?? connectionTimeout ?? socketTimeout ?? DEFAULT_REQUEST_TIMEOUT,
33
33
  httpAgent: httpAgent || new hAgent({ keepAlive, maxSockets }),
34
34
  httpsAgent: httpsAgent || new hsAgent({ keepAlive, maxSockets }),
35
35
  };
@@ -79,8 +79,11 @@ export class NodeHttpHandler {
79
79
  reject(err);
80
80
  }
81
81
  });
82
- setConnectionTimeout(req, reject, this.config.connectionTimeout);
83
- setSocketTimeout(req, reject, this.config.socketTimeout);
82
+ const timeout = this.config?.requestTimeout ?? DEFAULT_REQUEST_TIMEOUT;
83
+ req.setTimeout(timeout, () => {
84
+ req.destroy();
85
+ reject(Object.assign(new Error(`Connection timed out after ${timeout} ms`), { name: "TimeoutError" }));
86
+ });
84
87
  if (abortSignal) {
85
88
  abortSignal.onabort = () => {
86
89
  req.abort();
@@ -0,0 +1,86 @@
1
+ import http2 from "http2";
2
+ import { NodeHttp2ConnectionPool } from "./node-http2-connection-pool";
3
+ export class NodeHttp2ConnectionManager {
4
+ constructor(config) {
5
+ this.sessionCache = new Map();
6
+ this.config = config;
7
+ if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {
8
+ throw new RangeError("maxConcurrency must be greater than zero.");
9
+ }
10
+ }
11
+ lease(requestContext, connectionConfiguration) {
12
+ const url = this.getUrlString(requestContext);
13
+ const existingPool = this.sessionCache.get(url);
14
+ if (existingPool) {
15
+ const existingSession = existingPool.poll();
16
+ if (existingSession && !this.config.disableConcurrency) {
17
+ return existingSession;
18
+ }
19
+ }
20
+ const session = http2.connect(url);
21
+ if (this.config.maxConcurrency) {
22
+ session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {
23
+ if (err) {
24
+ throw new Error("Fail to set maxConcurrentStreams to " +
25
+ this.config.maxConcurrency +
26
+ "when creating new session for " +
27
+ requestContext.destination.toString());
28
+ }
29
+ });
30
+ }
31
+ session.unref();
32
+ const destroySessionCb = () => {
33
+ session.destroy();
34
+ this.deleteSession(url, session);
35
+ };
36
+ session.on("goaway", destroySessionCb);
37
+ session.on("error", destroySessionCb);
38
+ session.on("frameError", destroySessionCb);
39
+ session.on("close", () => this.deleteSession(url, session));
40
+ if (connectionConfiguration.requestTimeout) {
41
+ session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb);
42
+ }
43
+ const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool();
44
+ connectionPool.offerLast(session);
45
+ this.sessionCache.set(url, connectionPool);
46
+ return session;
47
+ }
48
+ deleteSession(authority, session) {
49
+ const existingConnectionPool = this.sessionCache.get(authority);
50
+ if (!existingConnectionPool) {
51
+ return;
52
+ }
53
+ if (!existingConnectionPool.contains(session)) {
54
+ return;
55
+ }
56
+ existingConnectionPool.remove(session);
57
+ this.sessionCache.set(authority, existingConnectionPool);
58
+ }
59
+ release(requestContext, session) {
60
+ const cacheKey = this.getUrlString(requestContext);
61
+ this.sessionCache.get(cacheKey)?.offerLast(session);
62
+ }
63
+ destroy() {
64
+ for (const [key, connectionPool] of this.sessionCache) {
65
+ for (const session of connectionPool) {
66
+ if (!session.destroyed) {
67
+ session.destroy();
68
+ }
69
+ connectionPool.remove(session);
70
+ }
71
+ this.sessionCache.delete(key);
72
+ }
73
+ }
74
+ setMaxConcurrentStreams(maxConcurrentStreams) {
75
+ if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {
76
+ throw new RangeError("maxConcurrentStreams must be greater than zero.");
77
+ }
78
+ this.config.maxConcurrency = maxConcurrentStreams;
79
+ }
80
+ setDisableConcurrentStreams(disableConcurrentStreams) {
81
+ this.config.disableConcurrency = disableConcurrentStreams;
82
+ }
83
+ getUrlString(request) {
84
+ return request.destination.toString();
85
+ }
86
+ }
@@ -0,0 +1,32 @@
1
+ export class NodeHttp2ConnectionPool {
2
+ constructor(sessions) {
3
+ this.sessions = [];
4
+ this.sessions = sessions ?? [];
5
+ }
6
+ poll() {
7
+ if (this.sessions.length > 0) {
8
+ return this.sessions.shift();
9
+ }
10
+ }
11
+ offerLast(session) {
12
+ this.sessions.push(session);
13
+ }
14
+ contains(session) {
15
+ return this.sessions.includes(session);
16
+ }
17
+ remove(session) {
18
+ this.sessions = this.sessions.filter((s) => s !== session);
19
+ }
20
+ [Symbol.iterator]() {
21
+ return this.sessions[Symbol.iterator]();
22
+ }
23
+ destroy(connection) {
24
+ for (const session of this.sessions) {
25
+ if (session === connection) {
26
+ if (!session.destroyed) {
27
+ session.destroy();
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
@@ -1,11 +1,13 @@
1
1
  import { HttpResponse } from "@aws-sdk/protocol-http";
2
2
  import { buildQueryString } from "@aws-sdk/querystring-builder";
3
- import { connect, constants } from "http2";
3
+ import { constants } from "http2";
4
4
  import { getTransformedHeaders } from "./get-transformed-headers";
5
+ import { NodeHttp2ConnectionManager } from "./node-http2-connection-manager";
5
6
  import { writeRequestBody } from "./write-request-body";
6
7
  export class NodeHttp2Handler {
7
8
  constructor(options) {
8
9
  this.metadata = { handlerProtocol: "h2" };
10
+ this.connectionManager = new NodeHttp2ConnectionManager({});
9
11
  this.configProvider = new Promise((resolve, reject) => {
10
12
  if (typeof options === "function") {
11
13
  options()
@@ -18,17 +20,17 @@ export class NodeHttp2Handler {
18
20
  resolve(options || {});
19
21
  }
20
22
  });
21
- this.sessionCache = new Map();
22
23
  }
23
24
  destroy() {
24
- for (const sessions of this.sessionCache.values()) {
25
- sessions.forEach((session) => this.destroySession(session));
26
- }
27
- this.sessionCache.clear();
25
+ this.connectionManager.destroy();
28
26
  }
29
27
  async handle(request, { abortSignal } = {}) {
30
28
  if (!this.config) {
31
29
  this.config = await this.configProvider;
30
+ this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false);
31
+ if (this.config.maxConcurrentStreams) {
32
+ this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams);
33
+ }
32
34
  }
33
35
  const { requestTimeout, disableConcurrentStreams } = this.config;
34
36
  return new Promise((resolve, rejectOriginal) => {
@@ -42,7 +44,11 @@ export class NodeHttp2Handler {
42
44
  }
43
45
  const { hostname, method, port, protocol, path, query } = request;
44
46
  const authority = `${protocol}//${hostname}${port ? `:${port}` : ""}`;
45
- const session = this.getSession(authority, disableConcurrentStreams || false);
47
+ const requestContext = { destination: new URL(authority) };
48
+ const session = this.connectionManager.lease(requestContext, {
49
+ requestTimeout: this.config?.sessionTimeout,
50
+ disableConcurrentStreams: disableConcurrentStreams || false,
51
+ });
46
52
  const reject = (err) => {
47
53
  if (disableConcurrentStreams) {
48
54
  this.destroySession(session);
@@ -67,7 +73,7 @@ export class NodeHttp2Handler {
67
73
  resolve({ response: httpResponse });
68
74
  if (disableConcurrentStreams) {
69
75
  session.close();
70
- this.deleteSessionFromCache(authority, session);
76
+ this.connectionManager.deleteSession(authority, session);
71
77
  }
72
78
  });
73
79
  if (requestTimeout) {
@@ -105,38 +111,9 @@ export class NodeHttp2Handler {
105
111
  writeRequestBody(req, request);
106
112
  });
107
113
  }
108
- getSession(authority, disableConcurrentStreams) {
109
- const sessionCache = this.sessionCache;
110
- const existingSessions = sessionCache.get(authority) || [];
111
- if (existingSessions.length > 0 && !disableConcurrentStreams)
112
- return existingSessions[0];
113
- const newSession = connect(authority);
114
- newSession.unref();
115
- const destroySessionCb = () => {
116
- this.destroySession(newSession);
117
- this.deleteSessionFromCache(authority, newSession);
118
- };
119
- newSession.on("goaway", destroySessionCb);
120
- newSession.on("error", destroySessionCb);
121
- newSession.on("frameError", destroySessionCb);
122
- newSession.on("close", () => this.deleteSessionFromCache(authority, newSession));
123
- if (this.config?.sessionTimeout) {
124
- newSession.setTimeout(this.config.sessionTimeout, destroySessionCb);
125
- }
126
- existingSessions.push(newSession);
127
- sessionCache.set(authority, existingSessions);
128
- return newSession;
129
- }
130
114
  destroySession(session) {
131
115
  if (!session.destroyed) {
132
116
  session.destroy();
133
117
  }
134
118
  }
135
- deleteSessionFromCache(authority, session) {
136
- const existingSessions = this.sessionCache.get(authority) || [];
137
- if (!existingSessions.includes(session)) {
138
- return;
139
- }
140
- this.sessionCache.set(authority, existingSessions.filter((s) => s !== session));
141
- }
142
119
  }
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { HttpHandler, HttpRequest, HttpResponse } from "@aws-sdk/protocol-http";
3
4
  import { HttpHandlerOptions, Provider } from "@aws-sdk/types";
4
5
  import { Agent as hAgent } from "http";
@@ -8,11 +9,26 @@ import { Agent as hsAgent } from "https";
8
9
  */
9
10
  export interface NodeHttpHandlerOptions {
10
11
  /**
12
+ * @deprecated Use {@link requestTimeout}
13
+ *
14
+ * Note:{@link NodeHttpHandler} will resolve request timeout via nullish coalescing the following fields:
15
+ * {@link requestTimeout} ?? {@link connectionTimeout} ?? {@link socketTimeout} ?? {@link DEFAULT_REQUEST_TIMEOUT}
16
+ *
11
17
  * The maximum time in milliseconds that the connection phase of a request
12
18
  * may take before the connection attempt is abandoned.
13
19
  */
14
20
  connectionTimeout?: number;
15
21
  /**
22
+ * The maximum time in milliseconds that the connection phase of a request
23
+ * may take before the connection attempt is abandoned.
24
+ */
25
+ requestTimeout?: number;
26
+ /**
27
+ * @deprecated Use {@link requestTimeout}
28
+ *
29
+ * Note:{@link NodeHttpHandler} will resolve request timeout via nullish coalescing the following fields:
30
+ * {@link requestTimeout} ?? {@link connectionTimeout} ?? {@link socketTimeout} ?? {@link DEFAULT_REQUEST_TIMEOUT}
31
+ *
16
32
  * The maximum time in milliseconds that a socket may remain idle before it
17
33
  * is closed.
18
34
  */
@@ -20,6 +36,7 @@ export interface NodeHttpHandlerOptions {
20
36
  httpAgent?: hAgent;
21
37
  httpsAgent?: hsAgent;
22
38
  }
39
+ export declare const DEFAULT_REQUEST_TIMEOUT = 0;
23
40
  export declare class NodeHttpHandler implements HttpHandler {
24
41
  private config?;
25
42
  private readonly configProvider;
@@ -0,0 +1,22 @@
1
+ /// <reference types="node" />
2
+ import { RequestContext } from "@aws-sdk/types";
3
+ import { ConnectConfiguration } from "@aws-sdk/types/src/connection/config";
4
+ import { ConnectionManager, ConnectionManagerConfiguration } from "@aws-sdk/types/src/connection/manager";
5
+ import { ClientHttp2Session } from "http2";
6
+ export declare class NodeHttp2ConnectionManager implements ConnectionManager<ClientHttp2Session> {
7
+ constructor(config: ConnectionManagerConfiguration);
8
+ private config;
9
+ private readonly sessionCache;
10
+ lease(requestContext: RequestContext, connectionConfiguration: ConnectConfiguration): ClientHttp2Session;
11
+ /**
12
+ * Delete a session from the connection pool.
13
+ * @param authority The authority of the session to delete.
14
+ * @param session The session to delete.
15
+ */
16
+ deleteSession(authority: string, session: ClientHttp2Session): void;
17
+ release(requestContext: RequestContext, session: ClientHttp2Session): void;
18
+ destroy(): void;
19
+ setMaxConcurrentStreams(maxConcurrentStreams: number): void;
20
+ setDisableConcurrentStreams(disableConcurrentStreams: boolean): void;
21
+ private getUrlString;
22
+ }
@@ -0,0 +1,13 @@
1
+ /// <reference types="node" />
2
+ import { ConnectionPool } from "@aws-sdk/types/src/connection/pool";
3
+ import { ClientHttp2Session } from "http2";
4
+ export declare class NodeHttp2ConnectionPool implements ConnectionPool<ClientHttp2Session> {
5
+ private sessions;
6
+ constructor(sessions?: ClientHttp2Session[]);
7
+ poll(): ClientHttp2Session | void;
8
+ offerLast(session: ClientHttp2Session): void;
9
+ contains(session: ClientHttp2Session): boolean;
10
+ remove(session: ClientHttp2Session): void;
11
+ [Symbol.iterator](): IterableIterator<ClientHttp2Session>;
12
+ destroy(connection: ClientHttp2Session): void;
13
+ }