cdk-preflight 1.11.1 → 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 (405) hide show
  1. package/.jsii +4 -4
  2. package/README.md +34 -0
  3. package/lib/cli.js +118 -4
  4. package/lib/index.js +1 -1
  5. package/llms.txt +2 -1
  6. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +1 -1
  7. package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormationClient.d.ts +2 -1
  8. package/node_modules/@aws-sdk/client-cloudformation/package.json +6 -6
  9. package/node_modules/@aws-sdk/client-ec2/README.md +28 -0
  10. package/node_modules/@aws-sdk/client-ec2/dist-cjs/index.js +499 -113
  11. package/node_modules/@aws-sdk/client-ec2/dist-es/EC2.js +10 -0
  12. package/node_modules/@aws-sdk/client-ec2/dist-es/commands/GetCapacityManagerSupportabilityScoresCommand.js +4 -0
  13. package/node_modules/@aws-sdk/client-ec2/dist-es/commands/GetImageFindingsCommand.js +4 -0
  14. package/node_modules/@aws-sdk/client-ec2/dist-es/commands/GetTransitGatewayAttachmentNatConfigurationCommand.js +4 -0
  15. package/node_modules/@aws-sdk/client-ec2/dist-es/commands/ModifyTransitGatewayAttachmentNatConfigurationCommand.js +4 -0
  16. package/node_modules/@aws-sdk/client-ec2/dist-es/commands/index.js +4 -0
  17. package/node_modules/@aws-sdk/client-ec2/dist-es/models/enums.js +80 -29
  18. package/node_modules/@aws-sdk/client-ec2/dist-es/pagination/GetImageFindingsPaginator.js +4 -0
  19. package/node_modules/@aws-sdk/client-ec2/dist-es/pagination/index.js +1 -0
  20. package/node_modules/@aws-sdk/client-ec2/dist-es/schemas/schemas_0.js +365 -83
  21. package/node_modules/@aws-sdk/client-ec2/dist-types/EC2.d.ts +35 -0
  22. package/node_modules/@aws-sdk/client-ec2/dist-types/EC2Client.d.ts +8 -3
  23. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateCapacityReservationFleetCommand.d.ts +82 -1
  24. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateCarrierGatewayCommand.d.ts +1 -1
  25. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateTransitGatewayRouteCommand.d.ts +1 -1
  26. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteLaunchTemplateCommand.d.ts +2 -1
  27. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteTransitGatewayRouteCommand.d.ts +1 -1
  28. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteTransitGatewayRouteTableCommand.d.ts +5 -2
  29. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeCapacityReservationFleetsCommand.d.ts +81 -0
  30. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeFleetHistoryCommand.d.ts +2 -1
  31. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeImagesCommand.d.ts +9 -0
  32. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeInstanceStatusCommand.d.ts +5 -0
  33. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeNetworkInsightsAnalysesCommand.d.ts +48 -0
  34. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeReservedInstancesModificationsCommand.d.ts +2 -1
  35. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeReservedInstancesOfferingsCommand.d.ts +1 -2
  36. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeTransitGatewayAttachmentsCommand.d.ts +1 -0
  37. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DisassociateTransitGatewayPolicyTableCommand.d.ts +1 -1
  38. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DisassociateTransitGatewayRouteTableCommand.d.ts +1 -2
  39. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetAllowedImagesSettingsCommand.d.ts +9 -0
  40. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerMetricDataCommand.d.ts +2 -2
  41. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerMetricDimensionsCommand.d.ts +1 -1
  42. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerSupportabilityScoresCommand.d.ts +183 -0
  43. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetImageFindingsCommand.d.ts +90 -0
  44. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetNetworkInsightsAccessScopeAnalysisFindingsCommand.d.ts +19 -0
  45. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetTransitGatewayAttachmentNatConfigurationCommand.d.ts +82 -0
  46. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVerifiedAccessEndpointTargetsCommand.d.ts +2 -1
  47. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVerifiedAccessGroupPolicyCommand.d.ts +1 -1
  48. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVpcResourcesBlockingEncryptionEnforcementCommand.d.ts +1 -1
  49. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVpnConnectionDeviceSampleConfigurationCommand.d.ts +1 -1
  50. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVpnConnectionDeviceTypesCommand.d.ts +1 -1
  51. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVpnTunnelReplacementStatusCommand.d.ts +1 -2
  52. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyTransitGatewayAttachmentNatConfigurationCommand.d.ts +107 -0
  53. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/RejectTransitGatewayPeeringAttachmentCommand.d.ts +1 -1
  54. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/RejectTransitGatewayVpcAttachmentCommand.d.ts +1 -1
  55. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/RejectVpcEndpointConnectionsCommand.d.ts +1 -1
  56. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/RejectVpcPeeringConnectionCommand.d.ts +1 -1
  57. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReleaseAddressCommand.d.ts +1 -1
  58. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReleaseHostsCommand.d.ts +1 -1
  59. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReleaseIpamPoolAllocationCommand.d.ts +1 -1
  60. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReplaceIamInstanceProfileAssociationCommand.d.ts +1 -1
  61. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReplaceImageCriteriaInAllowedImagesSettingsCommand.d.ts +9 -0
  62. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReplaceTransitGatewayRouteCommand.d.ts +1 -1
  63. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/SearchTransitGatewayRoutesCommand.d.ts +1 -1
  64. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/StartNetworkInsightsAnalysisCommand.d.ts +48 -0
  65. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/index.d.ts +4 -0
  66. package/node_modules/@aws-sdk/client-ec2/dist-types/models/enums.d.ts +192 -77
  67. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_0.d.ts +165 -291
  68. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_1.d.ts +1839 -1665
  69. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_2.d.ts +25 -12
  70. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_3.d.ts +27 -38
  71. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_4.d.ts +241 -242
  72. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_5.d.ts +247 -57
  73. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_6.d.ts +537 -341
  74. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_7.d.ts +389 -246
  75. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_8.d.ts +360 -3
  76. package/node_modules/@aws-sdk/client-ec2/dist-types/pagination/GetImageFindingsPaginator.d.ts +7 -0
  77. package/node_modules/@aws-sdk/client-ec2/dist-types/pagination/index.d.ts +1 -0
  78. package/node_modules/@aws-sdk/client-ec2/dist-types/schemas/schemas_0.d.ts +21 -0
  79. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2.d.ts +75 -0
  80. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2Client.d.ts +24 -0
  81. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/CreateCapacityReservationFleetCommand.d.ts +1 -1
  82. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/CreateCarrierGatewayCommand.d.ts +1 -1
  83. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DeleteLaunchTemplateCommand.d.ts +2 -1
  84. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeFleetHistoryCommand.d.ts +2 -1
  85. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeReservedInstancesModificationsCommand.d.ts +2 -4
  86. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeReservedInstancesOfferingsCommand.d.ts +4 -2
  87. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DisassociateTransitGatewayPolicyTableCommand.d.ts +1 -1
  88. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DisassociateTransitGatewayRouteTableCommand.d.ts +4 -2
  89. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetCapacityManagerSupportabilityScoresCommand.d.ts +42 -0
  90. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetImageFindingsCommand.d.ts +38 -0
  91. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetTransitGatewayAttachmentNatConfigurationCommand.d.ts +42 -0
  92. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVerifiedAccessEndpointTargetsCommand.d.ts +2 -4
  93. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVerifiedAccessGroupPolicyCommand.d.ts +1 -1
  94. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVpcResourcesBlockingEncryptionEnforcementCommand.d.ts +1 -1
  95. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVpnConnectionDeviceSampleConfigurationCommand.d.ts +1 -1
  96. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVpnConnectionDeviceTypesCommand.d.ts +1 -1
  97. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVpnTunnelReplacementStatusCommand.d.ts +4 -2
  98. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyTransitGatewayAttachmentNatConfigurationCommand.d.ts +42 -0
  99. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/RejectTransitGatewayPeeringAttachmentCommand.d.ts +1 -1
  100. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/RejectTransitGatewayVpcAttachmentCommand.d.ts +1 -1
  101. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/RejectVpcEndpointConnectionsCommand.d.ts +1 -1
  102. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/RejectVpcPeeringConnectionCommand.d.ts +1 -1
  103. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ReleaseAddressCommand.d.ts +1 -1
  104. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ReleaseHostsCommand.d.ts +1 -1
  105. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ReleaseIpamPoolAllocationCommand.d.ts +1 -1
  106. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ReplaceIamInstanceProfileAssociationCommand.d.ts +1 -1
  107. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/index.d.ts +4 -0
  108. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/enums.d.ts +99 -35
  109. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_0.d.ts +27 -60
  110. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_1.d.ts +118 -69
  111. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_2.d.ts +6 -6
  112. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_3.d.ts +10 -9
  113. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_4.d.ts +31 -34
  114. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_5.d.ts +37 -14
  115. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_6.d.ts +89 -68
  116. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_7.d.ts +86 -64
  117. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_8.d.ts +76 -1
  118. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/pagination/GetImageFindingsPaginator.d.ts +11 -0
  119. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/pagination/index.d.ts +1 -0
  120. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/schemas/schemas_0.d.ts +21 -0
  121. package/node_modules/@aws-sdk/client-ec2/package.json +8 -8
  122. package/node_modules/@aws-sdk/client-lambda/README.md +1 -1
  123. package/node_modules/@aws-sdk/client-lambda/dist-cjs/index.js +9 -3
  124. package/node_modules/@aws-sdk/client-lambda/dist-es/models/enums.js +4 -0
  125. package/node_modules/@aws-sdk/client-lambda/dist-es/schemas/schemas_0.js +3 -2
  126. package/node_modules/@aws-sdk/client-lambda/dist-types/Lambda.d.ts +1 -1
  127. package/node_modules/@aws-sdk/client-lambda/dist-types/LambdaClient.d.ts +3 -2
  128. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CreateEventSourceMappingCommand.d.ts +2 -0
  129. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteEventSourceMappingCommand.d.ts +1 -0
  130. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteFunctionConcurrencyCommand.d.ts +1 -1
  131. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetEventSourceMappingCommand.d.ts +1 -0
  132. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetFunctionCommand.d.ts +1 -1
  133. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListEventSourceMappingsCommand.d.ts +1 -0
  134. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListFunctionEventInvokeConfigsCommand.d.ts +1 -1
  135. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListVersionsByFunctionCommand.d.ts +1 -1
  136. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PublishVersionCommand.d.ts +1 -1
  137. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PutFunctionConcurrencyCommand.d.ts +1 -1
  138. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PutFunctionRecursionConfigCommand.d.ts +1 -1
  139. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateEventSourceMappingCommand.d.ts +2 -0
  140. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateFunctionUrlConfigCommand.d.ts +1 -1
  141. package/node_modules/@aws-sdk/client-lambda/dist-types/index.d.ts +1 -1
  142. package/node_modules/@aws-sdk/client-lambda/dist-types/models/enums.d.ts +12 -0
  143. package/node_modules/@aws-sdk/client-lambda/dist-types/models/models_0.d.ts +21 -16
  144. package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/enums.d.ts +6 -0
  145. package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/models_0.d.ts +2 -0
  146. package/node_modules/@aws-sdk/client-lambda/package.json +7 -7
  147. package/node_modules/@aws-sdk/client-service-quotas/dist-cjs/index.js +1 -1
  148. package/node_modules/@aws-sdk/client-service-quotas/dist-types/ServiceQuotasClient.d.ts +2 -1
  149. package/node_modules/@aws-sdk/client-service-quotas/package.json +6 -6
  150. package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +1 -1
  151. package/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts +2 -1
  152. package/node_modules/@aws-sdk/client-sts/package.json +8 -8
  153. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +38 -13
  154. package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +7 -7
  155. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +104 -1549
  156. package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +2 -1
  157. package/node_modules/@aws-sdk/core/dist-es/submodules/client/getDefaultSocketTimeout.js +10 -0
  158. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.browser.js +1 -0
  159. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +1 -0
  160. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.native.js +1 -0
  161. package/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-host-header/hostHeaderMiddleware.js +4 -2
  162. package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/parseArn.js +4 -2
  163. package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.js +18 -9
  164. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js +6 -3
  165. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +1 -4
  166. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +2 -7
  167. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +1 -3
  168. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -3
  169. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.js +51 -0
  170. package/node_modules/@aws-sdk/core/dist-es/submodules/util/util-arn-parser/arn.js +2 -1
  171. package/node_modules/@aws-sdk/core/dist-types/submodules/client/getDefaultSocketTimeout.d.ts +11 -0
  172. package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.browser.d.ts +1 -0
  173. package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.d.ts +1 -0
  174. package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.native.d.ts +1 -0
  175. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +3 -7
  176. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +3 -8
  177. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
  178. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
  179. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
  180. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
  181. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +25 -0
  182. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/getDefaultSocketTimeout.d.ts +4 -0
  183. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.browser.d.ts +1 -0
  184. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -0
  185. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.native.d.ts +1 -0
  186. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +11 -10
  187. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
  188. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
  189. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
  190. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
  191. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +36 -0
  192. package/node_modules/@aws-sdk/core/package.json +5 -5
  193. package/node_modules/@aws-sdk/credential-provider-env/package.json +4 -4
  194. package/node_modules/@aws-sdk/credential-provider-http/package.json +5 -5
  195. package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
  196. package/node_modules/@aws-sdk/credential-provider-login/package.json +5 -5
  197. package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
  198. package/node_modules/@aws-sdk/credential-provider-process/package.json +4 -4
  199. package/node_modules/@aws-sdk/credential-provider-sso/package.json +6 -6
  200. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +5 -5
  201. package/node_modules/@aws-sdk/middleware-sdk-ec2/package.json +5 -5
  202. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +3 -2
  203. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +10 -2
  204. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +3 -2
  205. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +3 -2
  206. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +3 -2
  207. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.js +2 -1
  208. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +7 -0
  209. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js +2 -1
  210. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js +2 -1
  211. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js +2 -1
  212. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js +2 -1
  213. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentityClient.d.ts +2 -1
  214. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +1 -0
  215. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/Signin.d.ts +1 -2
  216. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/SigninClient.d.ts +3 -3
  217. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenCommand.d.ts +5 -59
  218. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenWithIAMCommand.d.ts +5 -33
  219. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/index.d.ts +1 -2
  220. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +16 -9
  221. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/errors.d.ts +8 -39
  222. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/models_0.d.ts +36 -48
  223. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.d.ts +1 -0
  224. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/SSOClient.d.ts +2 -1
  225. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.d.ts +1 -0
  226. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/SSOOIDCClient.d.ts +2 -1
  227. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +1 -0
  228. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STSClient.d.ts +2 -1
  229. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +1 -0
  230. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +1 -0
  231. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +7 -0
  232. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +1 -0
  233. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +1 -0
  234. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +1 -0
  235. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +1 -0
  236. package/node_modules/@aws-sdk/nested-clients/package.json +6 -6
  237. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +3 -3
  238. package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +37 -19
  239. package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +37 -19
  240. package/node_modules/@aws-sdk/token-providers/package.json +5 -5
  241. package/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +3 -0
  242. package/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +3 -0
  243. package/node_modules/@aws-sdk/types/package.json +1 -1
  244. package/node_modules/@aws-sdk/xml-builder/package.json +1 -1
  245. package/node_modules/@smithy/core/dist-cjs/index.js +4 -2
  246. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +45 -53
  247. package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +52 -19
  248. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +8 -4
  249. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +16 -8
  250. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +8 -4
  251. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +2 -1
  252. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +10 -5
  253. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +28 -9
  254. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +28 -9
  255. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +91 -58
  256. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +53 -15
  257. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +57 -17
  258. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +13 -4
  259. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +7 -1
  260. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +13 -4
  261. package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +6 -3
  262. package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
  263. package/node_modules/@smithy/core/dist-es/normalizeProvider.js +2 -1
  264. package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +12 -37
  265. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +8 -4
  266. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +6 -3
  267. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +12 -6
  268. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +4 -2
  269. package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +2 -1
  270. package/node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js +10 -5
  271. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +17 -2
  272. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js +2 -1
  273. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +4 -2
  274. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +2 -1
  275. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +2 -1
  276. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +4 -2
  277. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js +10 -4
  278. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +2 -1
  279. package/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js +8 -4
  280. package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js +6 -3
  281. package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/numberSelector.js +2 -1
  282. package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js +8 -4
  283. package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +2 -1
  284. package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +6 -3
  285. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +12 -1
  286. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js +2 -1
  287. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js +2 -1
  288. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js +2 -1
  289. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js +4 -2
  290. package/node_modules/@smithy/core/dist-es/submodules/protocols/AbstractRpcV2Protocol.js +35 -0
  291. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +8 -4
  292. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +4 -2
  293. package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +6 -2
  294. package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +1 -0
  295. package/node_modules/@smithy/core/dist-es/submodules/protocols/json/SmithyRpcV2JsonProtocol.js +8 -31
  296. package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +7 -5
  297. package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +7 -5
  298. package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +7 -5
  299. package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +11 -8
  300. package/node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js +3 -0
  301. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js +4 -2
  302. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +2 -1
  303. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy.js +6 -3
  304. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +17 -8
  305. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/util.js +6 -3
  306. package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/race.js +22 -0
  307. package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +1 -0
  308. package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
  309. package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +1 -0
  310. package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +2 -1
  311. package/node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.browser.js +6 -3
  312. package/node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js +2 -1
  313. package/node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js +2 -1
  314. package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +2 -1
  315. package/node_modules/@smithy/core/dist-types/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +5 -14
  316. package/node_modules/@smithy/core/dist-types/submodules/protocols/AbstractRpcV2Protocol.d.ts +45 -0
  317. package/node_modules/@smithy/core/dist-types/submodules/protocols/RpcProtocol.d.ts +12 -0
  318. package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +1 -0
  319. package/node_modules/@smithy/core/dist-types/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +5 -14
  320. package/node_modules/@smithy/core/dist-types/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
  321. package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/race.d.ts +3 -0
  322. package/node_modules/@smithy/core/dist-types/submodules/serde/index.browser.d.ts +1 -0
  323. package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
  324. package/node_modules/@smithy/core/dist-types/submodules/serde/index.native.d.ts +1 -0
  325. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +5 -14
  326. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/AbstractRpcV2Protocol.d.ts +45 -0
  327. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/RpcProtocol.d.ts +12 -0
  328. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +1 -0
  329. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +5 -14
  330. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
  331. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/util-retry/race.d.ts +3 -0
  332. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.browser.d.ts +1 -0
  333. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
  334. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.native.d.ts +1 -0
  335. package/node_modules/@smithy/core/package.json +2 -2
  336. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +84 -29
  337. package/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +2 -1
  338. package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +23 -11
  339. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +26 -2
  340. package/node_modules/@smithy/node-http-handler/dist-es/resolve-default-socket-timeout.js +4 -0
  341. package/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +30 -15
  342. package/node_modules/@smithy/node-http-handler/dist-types/resolve-default-socket-timeout.d.ts +4 -0
  343. package/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +10 -1
  344. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/resolve-default-socket-timeout.d.ts +4 -0
  345. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +10 -1
  346. package/node_modules/@smithy/node-http-handler/package.json +3 -3
  347. package/node_modules/@smithy/signature-v4/dist-cjs/index.js +23 -11
  348. package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +4 -2
  349. package/node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +4 -2
  350. package/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +5 -1
  351. package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +2 -1
  352. package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +2 -1
  353. package/node_modules/@smithy/signature-v4/dist-es/headerUtil.js +6 -3
  354. package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +2 -1
  355. package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +2 -1
  356. package/node_modules/@smithy/signature-v4/package.json +2 -2
  357. package/node_modules/@smithy/types/dist-types/middleware.d.ts +6 -0
  358. package/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +6 -0
  359. package/node_modules/@smithy/types/package.json +1 -1
  360. package/package.json +1 -1
  361. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonSettings.js +0 -1
  362. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonCodec.js +0 -20
  363. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +0 -1
  364. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +0 -160
  365. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +0 -193
  366. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +0 -103
  367. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +0 -20
  368. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +0 -200
  369. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +0 -519
  370. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/detectBufferParsing.js +0 -18
  371. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js +0 -46
  372. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +0 -121
  373. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/needsReviver.js +0 -41
  374. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +0 -89
  375. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonSettings.d.ts +0 -7
  376. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -15
  377. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -7
  378. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -14
  379. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -29
  380. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -51
  381. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -13
  382. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -30
  383. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -60
  384. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/detectBufferParsing.d.ts +0 -1
  385. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/jsonReplacer.d.ts +0 -21
  386. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/jsonReviver.d.ts +0 -15
  387. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/needsReviver.d.ts +0 -11
  388. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +0 -22
  389. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonSettings.d.ts +0 -4
  390. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -11
  391. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -4
  392. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -13
  393. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -18
  394. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -27
  395. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -9
  396. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -15
  397. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -39
  398. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +0 -1
  399. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +0 -7
  400. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +0 -7
  401. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +0 -2
  402. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +0 -14
  403. /package/node_modules/@smithy/core/dist-es/submodules/{protocols → serde}/writeKey.js +0 -0
  404. /package/node_modules/@smithy/core/dist-types/submodules/{protocols → serde}/writeKey.d.ts +0 -0
  405. /package/node_modules/@smithy/core/dist-types/ts3.4/submodules/{protocols → serde}/writeKey.d.ts +0 -0
@@ -1,519 +0,0 @@
1
- import { determineTimestampFormat } from "@smithy/core/protocols";
2
- import { NormalizedSchema } from "@smithy/core/schema";
3
- import { dateToUtcString, generateIdempotencyToken, LazyJsonString, NumericValue, toBase64 } from "@smithy/core/serde";
4
- import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
5
- import { JsonBytesStringAdapter } from "./JsonBytesStringAdapter";
6
- const encoder = new TextEncoder();
7
- const OPEN_BRACE = 0x7b;
8
- const CLOSE_BRACE = 0x7d;
9
- const OPEN_BRACKET = 0x5b;
10
- const CLOSE_BRACKET = 0x5d;
11
- const QUOTE = 0x22;
12
- const COLON = 0x3a;
13
- const COMMA = 0x2c;
14
- const BACKSLASH = 0x5c;
15
- const TRUE = new Uint8Array([0x74, 0x72, 0x75, 0x65]);
16
- const FALSE = new Uint8Array([0x66, 0x61, 0x6c, 0x73, 0x65]);
17
- const NULL = new Uint8Array([0x6e, 0x75, 0x6c, 0x6c]);
18
- const ESCAPE_TABLE = new Array(128).fill(null);
19
- ESCAPE_TABLE[0x08] = "b";
20
- ESCAPE_TABLE[0x09] = "t";
21
- ESCAPE_TABLE[0x0a] = "n";
22
- ESCAPE_TABLE[0x0c] = "f";
23
- ESCAPE_TABLE[0x0d] = "r";
24
- ESCAPE_TABLE[0x22] = '"';
25
- ESCAPE_TABLE[0x5c] = "\\";
26
- for (let i = 0; i < 0x20; i++) {
27
- if (ESCAPE_TABLE[i] === null) {
28
- ESCAPE_TABLE[i] = "u00" + i.toString(16).padStart(2, "0");
29
- }
30
- }
31
- const INITIAL_BUFFER_SIZE = 2048;
32
- function alloc(size) {
33
- return JsonBytesStringAdapter.allocUnsafe(size);
34
- }
35
- export class JsonShapeSerializer2 extends SerdeContextConfig {
36
- settings;
37
- json;
38
- i = 0;
39
- rootSchema;
40
- rawValue;
41
- passthrough = false;
42
- constructor(settings) {
43
- super();
44
- this.settings = settings;
45
- this.json = alloc(INITIAL_BUFFER_SIZE);
46
- }
47
- write(schema, value) {
48
- this.i = 0;
49
- this.rawValue = value;
50
- this.rootSchema = NormalizedSchema.of(schema);
51
- this.passthrough = this.rootSchema.isBlobSchema() || this.rootSchema.isStringSchema();
52
- if (!this.passthrough) {
53
- this.writeValue(this.rootSchema, value, undefined);
54
- }
55
- }
56
- writeDiscriminatedDocument(schema, value) {
57
- this.i = 0;
58
- this.rootSchema = NormalizedSchema.of(schema);
59
- const ns = this.rootSchema;
60
- if (ns.isStructSchema() && value != null && typeof value === "object") {
61
- this.writeValue(ns, value, undefined);
62
- const prefix = `"__type":"${ns.getName(true) ?? "Unknown"}",`;
63
- const z = prefix.length;
64
- this.ensure(z);
65
- this.json.copyWithin(1 + z, 1, this.i);
66
- encoder.encodeInto(prefix, this.json.subarray(1));
67
- this.i += z;
68
- }
69
- else {
70
- this.writeValue(ns, value, undefined);
71
- }
72
- }
73
- flush() {
74
- this.rootSchema = undefined;
75
- const finalPosition = this.i;
76
- this.i = 0;
77
- const raw = this.rawValue;
78
- this.rawValue = undefined;
79
- if (finalPosition === 0) {
80
- return raw;
81
- }
82
- const result = this.json.subarray(0, finalPosition);
83
- this.json = alloc(INITIAL_BUFFER_SIZE);
84
- return result;
85
- }
86
- ensure(byteCount) {
87
- const { i, json } = this;
88
- if (i + byteCount > json.length) {
89
- let newSize = json.length * 2;
90
- while (newSize < i + byteCount) {
91
- newSize *= 2;
92
- }
93
- const next = alloc(newSize);
94
- next.set(this.json);
95
- this.json = next;
96
- }
97
- }
98
- writeAscii(s) {
99
- const z = s.length;
100
- this.ensure(z);
101
- let { i, json } = this;
102
- for (let j = 0; j < z; ++j) {
103
- json[i] = s.charCodeAt(j);
104
- i += 1;
105
- }
106
- this.i = i;
107
- }
108
- writeAsciiQuoted(s) {
109
- const z = s.length;
110
- this.ensure(z + 4);
111
- let { json, i } = this;
112
- json[i++] = QUOTE;
113
- for (let j = 0; j < z; ++j) {
114
- json[i++] = s.charCodeAt(j);
115
- }
116
- json[i++] = QUOTE;
117
- this.i = i;
118
- }
119
- writeJsonString(s) {
120
- this.ensure(s.length * 3 + 2);
121
- this.json[this.i++] = QUOTE;
122
- const z = s.length;
123
- for (let j = 0; j < z; ++j) {
124
- const c = s.charCodeAt(j);
125
- if (c > 0x22 && c < 0x5c) {
126
- this.json[this.i++] = c;
127
- }
128
- else if (c < 0x80) {
129
- const esc = ESCAPE_TABLE[c];
130
- if (esc !== null) {
131
- this.ensure(esc.length + 1);
132
- this.json[this.i++] = BACKSLASH;
133
- for (let k = 0; k < esc.length; k++) {
134
- this.json[this.i++] = esc.charCodeAt(k);
135
- }
136
- }
137
- else {
138
- this.json[this.i++] = c;
139
- }
140
- }
141
- else if (c >= 0xd800 && c <= 0xdbff) {
142
- const next = j + 1 < z ? s.charCodeAt(j + 1) : 0;
143
- if (next >= 0xdc00 && next <= 0xdfff) {
144
- this.ensure(4);
145
- const { written } = encoder.encodeInto(s.substring(j, j + 2), this.json.subarray(this.i));
146
- this.i += written;
147
- ++j;
148
- }
149
- else {
150
- this.ensure(6);
151
- this.writeUnicodeEscape(c);
152
- }
153
- }
154
- else if (c >= 0xdc00 && c <= 0xdfff) {
155
- this.ensure(6);
156
- this.writeUnicodeEscape(c);
157
- }
158
- else {
159
- let { i, json } = this;
160
- if (c < 0x800) {
161
- json[i++] = 0xc0 | (c >> 6);
162
- json[i++] = 0x80 | (c & 0x3f);
163
- }
164
- else {
165
- json[i++] = 0xe0 | (c >> 12);
166
- json[i++] = 0x80 | ((c >> 6) & 0x3f);
167
- json[i++] = 0x80 | (c & 0x3f);
168
- }
169
- this.i = i;
170
- }
171
- }
172
- this.json[this.i++] = QUOTE;
173
- }
174
- writeUnicodeEscape(code) {
175
- let { json, i } = this;
176
- json[i++] = BACKSLASH;
177
- json[i++] = 0x75;
178
- const hex = code.toString(16).padStart(4, "0");
179
- for (let j = 0; j < 4; ++j) {
180
- json[i++] = hex.charCodeAt(j);
181
- }
182
- this.i = i;
183
- }
184
- static B64 = (() => {
185
- const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
186
- const table = new Uint8Array(64);
187
- for (let i = 0; i < 64; ++i) {
188
- table[i] = chars.charCodeAt(i);
189
- }
190
- return table;
191
- })();
192
- writeBase64(data) {
193
- const b64Len = Math.ceil(data.length / 3) * 4;
194
- this.ensure(b64Len + 2);
195
- const json = this.json;
196
- const B64 = JsonShapeSerializer2.B64;
197
- let i = this.i;
198
- json[i++] = QUOTE;
199
- const len = data.length;
200
- const remainder = len % 3;
201
- const mainLen = len - remainder;
202
- for (let j = 0; j < mainLen; j += 3) {
203
- const a = data[j];
204
- const b = data[j + 1];
205
- const c = data[j + 2];
206
- json[i++] = B64[a >> 2];
207
- json[i++] = B64[((a & 0x03) << 4) | (b >> 4)];
208
- json[i++] = B64[((b & 0x0f) << 2) | (c >> 6)];
209
- json[i++] = B64[c & 0x3f];
210
- }
211
- if (remainder === 2) {
212
- const a = data[mainLen];
213
- const b = data[mainLen + 1];
214
- json[i++] = B64[a >> 2];
215
- json[i++] = B64[((a & 0x03) << 4) | (b >> 4)];
216
- json[i++] = B64[(b & 0x0f) << 2];
217
- json[i++] = 0x3d;
218
- }
219
- else if (remainder === 1) {
220
- const a = data[mainLen];
221
- json[i++] = B64[a >> 2];
222
- json[i++] = B64[(a & 0x03) << 4];
223
- json[i++] = 0x3d;
224
- json[i++] = 0x3d;
225
- }
226
- json[i++] = QUOTE;
227
- this.i = i;
228
- }
229
- writeValue(schema, value, container) {
230
- if (value == null) {
231
- if (container?.isStructSchema()) {
232
- if (value === undefined) {
233
- const ns = NormalizedSchema.of(schema);
234
- if (ns.isIdempotencyToken()) {
235
- this.writeAsciiQuoted(generateIdempotencyToken());
236
- return;
237
- }
238
- }
239
- return;
240
- }
241
- this.ensure(4);
242
- this.json.set(NULL, this.i);
243
- this.i += 4;
244
- return;
245
- }
246
- const ns = NormalizedSchema.of(schema);
247
- const isObject = typeof value === "object";
248
- if (ns.isStringSchema()) {
249
- const mediaType = ns.getMergedTraits().mediaType;
250
- if (mediaType) {
251
- const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
252
- if (isJson) {
253
- this.writeJsonString(LazyJsonString.from(value).toString());
254
- return;
255
- }
256
- }
257
- }
258
- if (isObject) {
259
- if (ns.isStructSchema()) {
260
- this.writeStruct(ns, value);
261
- return;
262
- }
263
- if (Array.isArray(value) && (ns.isListSchema() || ns.isDocumentSchema())) {
264
- this.writeList(ns, value, ns.isDocumentSchema());
265
- return;
266
- }
267
- if (ns.isMapSchema()) {
268
- this.writeMap(ns, value, false);
269
- return;
270
- }
271
- if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) {
272
- this.writeBase64(value);
273
- return;
274
- }
275
- if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {
276
- this.writeTimestamp(ns, value);
277
- return;
278
- }
279
- if (value instanceof NumericValue) {
280
- this.writeAscii(value.string);
281
- return;
282
- }
283
- if (ns.isDocumentSchema()) {
284
- if (Array.isArray(value)) {
285
- this.writeList(ns, value, true);
286
- }
287
- else {
288
- this.writeMap(ns, value, true);
289
- }
290
- return;
291
- }
292
- const json = JSON.stringify(value);
293
- this.writeAscii(json);
294
- return;
295
- }
296
- if (typeof value === "string") {
297
- if (ns.isBlobSchema()) {
298
- const b64 = (this.serdeContext?.base64Encoder ?? toBase64)(value);
299
- this.writeAsciiQuoted(b64);
300
- return;
301
- }
302
- this.writeJsonString(value);
303
- return;
304
- }
305
- if (typeof value === "number") {
306
- if (Math.abs(value) === Infinity || Number.isNaN(value)) {
307
- this.writeAsciiQuoted(String(value));
308
- return;
309
- }
310
- const numStr = String(value);
311
- this.writeAscii(numStr);
312
- return;
313
- }
314
- if (typeof value === "boolean") {
315
- this.ensure(5);
316
- let { i, json } = this;
317
- if (value) {
318
- json.set(TRUE, i);
319
- i += 4;
320
- }
321
- else {
322
- json.set(FALSE, i);
323
- i += 5;
324
- }
325
- this.i = i;
326
- return;
327
- }
328
- if (typeof value === "bigint") {
329
- this.writeAscii(value.toString());
330
- return;
331
- }
332
- this.writeAscii(String(value));
333
- }
334
- writeStruct(ns, value) {
335
- this.ensure(2);
336
- this.json[this.i++] = OPEN_BRACE;
337
- let wroteAny = false;
338
- const hasType = typeof value.__type === "string";
339
- let writtenKeys;
340
- if (hasType) {
341
- writtenKeys = new Set();
342
- }
343
- for (const [memberName, memberSchema] of ns.structIterator()) {
344
- const item = value[memberName];
345
- if (item == null && !memberSchema.isIdempotencyToken()) {
346
- continue;
347
- }
348
- if (wroteAny) {
349
- this.ensure(1);
350
- this.json[this.i++] = COMMA;
351
- }
352
- wroteAny = true;
353
- const targetKey = this.settings.jsonName ? (memberSchema.getMergedTraits().jsonName ?? memberName) : memberName;
354
- if (writtenKeys) {
355
- writtenKeys.add(memberName);
356
- writtenKeys.add(targetKey);
357
- }
358
- this.writeAsciiQuoted(targetKey);
359
- this.json[this.i++] = COLON;
360
- this.writeValue(memberSchema, item, ns);
361
- }
362
- if (!wroteAny && ns.isUnionSchema()) {
363
- const { $unknown } = value;
364
- if (Array.isArray($unknown)) {
365
- const [k, v] = $unknown;
366
- this.writeAsciiQuoted(k);
367
- this.ensure(1);
368
- this.json[this.i++] = COLON;
369
- this.writeValue(15, v, ns);
370
- }
371
- }
372
- else if (hasType) {
373
- for (const k in value) {
374
- if (writtenKeys.has(k)) {
375
- continue;
376
- }
377
- writtenKeys.add(k);
378
- const v = value[k];
379
- if (wroteAny) {
380
- this.ensure(1);
381
- this.json[this.i++] = COMMA;
382
- }
383
- wroteAny = true;
384
- this.writeAsciiQuoted(k);
385
- this.ensure(1);
386
- this.json[this.i++] = COLON;
387
- this.writeValue(15, v, undefined);
388
- }
389
- }
390
- this.ensure(1);
391
- this.json[this.i++] = CLOSE_BRACE;
392
- }
393
- writeList(ns, value, isDocument) {
394
- const sparse = !!ns.getMergedTraits().sparse;
395
- const valueSchema = ns.getValueSchema();
396
- if (!isDocument) {
397
- if (valueSchema.isStringSchema() || valueSchema.isNumericSchema() || valueSchema.isBooleanSchema()) {
398
- let hasSpecials = false;
399
- for (let i = 0; i < value.length; ++i) {
400
- const v = value[i];
401
- if (Number.isNaN(v) || v === Infinity || v === -Infinity || (v == null && !sparse)) {
402
- hasSpecials = true;
403
- break;
404
- }
405
- }
406
- let json;
407
- if (!hasSpecials) {
408
- json = JSON.stringify(value);
409
- }
410
- else {
411
- const out = [];
412
- for (let i = 0; i < value.length; ++i) {
413
- const v = value[i];
414
- if (v == null && !sparse)
415
- continue;
416
- if (Number.isNaN(v) || v === Infinity || v === -Infinity) {
417
- out.push(String(v));
418
- }
419
- else {
420
- out.push(v);
421
- }
422
- }
423
- json = JSON.stringify(out);
424
- }
425
- this.ensure(json.length * 3);
426
- this.i += encoder.encodeInto(json, this.json.subarray(this.i)).written;
427
- return;
428
- }
429
- }
430
- this.ensure(2);
431
- this.json[this.i++] = OPEN_BRACKET;
432
- let wroteFirstItem = false;
433
- for (let i = 0; i < value.length; ++i) {
434
- const item = value[i];
435
- if (isDocument ? item === undefined : item == null && !sparse) {
436
- continue;
437
- }
438
- if (wroteFirstItem) {
439
- this.ensure(1);
440
- this.json[this.i++] = COMMA;
441
- }
442
- this.writeValue(valueSchema, item, undefined);
443
- wroteFirstItem = true;
444
- }
445
- this.ensure(1);
446
- this.json[this.i++] = CLOSE_BRACKET;
447
- }
448
- writeMap(ns, value, isDocument) {
449
- const sparse = !!ns.getMergedTraits().sparse;
450
- const valueSchema = ns.getValueSchema();
451
- if (!isDocument) {
452
- if (valueSchema.isStringSchema() || valueSchema.isNumericSchema() || valueSchema.isBooleanSchema()) {
453
- let modifications;
454
- for (const k in value) {
455
- const v = value[k];
456
- if (Number.isNaN(v) || v === Infinity || v === -Infinity) {
457
- (modifications ??= {})[k] = v;
458
- value[k] = String(v);
459
- }
460
- else if (v === null && !sparse) {
461
- (modifications ??= {})[k] = null;
462
- value[k] = undefined;
463
- }
464
- }
465
- const json = JSON.stringify(value);
466
- if (modifications) {
467
- Object.assign(value, modifications);
468
- }
469
- this.ensure(json.length * 3);
470
- this.i += encoder.encodeInto(json, this.json.subarray(this.i)).written;
471
- return;
472
- }
473
- }
474
- this.ensure(2);
475
- this.json[this.i++] = OPEN_BRACE;
476
- let first = true;
477
- for (const k in value) {
478
- const v = value[k];
479
- if (isDocument ? v === undefined : v == null && !sparse) {
480
- continue;
481
- }
482
- if (!first) {
483
- this.ensure(1);
484
- this.json[this.i++] = COMMA;
485
- }
486
- first = false;
487
- this.writeJsonString(k);
488
- this.ensure(1);
489
- this.json[this.i++] = COLON;
490
- this.writeValue(valueSchema, v, undefined);
491
- }
492
- this.ensure(1);
493
- this.json[this.i++] = CLOSE_BRACE;
494
- }
495
- writeTimestamp(ns, value) {
496
- const format = determineTimestampFormat(ns, this.settings);
497
- switch (format) {
498
- case 5: {
499
- const iso = value.toISOString().replace(".000Z", "Z");
500
- this.writeAsciiQuoted(iso);
501
- return;
502
- }
503
- case 6: {
504
- this.writeAsciiQuoted(dateToUtcString(value));
505
- return;
506
- }
507
- case 7: {
508
- const epochSecs = String(value.getTime() / 1000);
509
- this.writeAscii(epochSecs);
510
- return;
511
- }
512
- default: {
513
- const epochSecs = String(value.getTime() / 1000);
514
- this.writeAscii(epochSecs);
515
- return;
516
- }
517
- }
518
- }
519
- }
@@ -1,18 +0,0 @@
1
- let canParseBuffer;
2
- export function detectBufferParsing() {
3
- if (canParseBuffer === undefined) {
4
- try {
5
- if (typeof Buffer !== "function") {
6
- canParseBuffer = false;
7
- }
8
- else {
9
- const result = JSON.parse(Buffer.from([0x7b, 0x7d]));
10
- canParseBuffer = result !== null && typeof result === "object";
11
- }
12
- }
13
- catch {
14
- canParseBuffer = false;
15
- }
16
- }
17
- return canParseBuffer;
18
- }
@@ -1,46 +0,0 @@
1
- import { NumericValue } from "@smithy/core/serde";
2
- const NUMERIC_CONTROL_CHAR = String.fromCharCode(925);
3
- export class JsonReplacer {
4
- values = new Map();
5
- counter = 0;
6
- stage = 0;
7
- createReplacer() {
8
- if (this.stage === 1) {
9
- throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");
10
- }
11
- if (this.stage === 2) {
12
- throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");
13
- }
14
- this.stage = 1;
15
- return (key, value) => {
16
- if (value instanceof NumericValue) {
17
- const v = `${NUMERIC_CONTROL_CHAR + "nv" + this.counter++}_` + value.string;
18
- this.values.set(`"${v}"`, value.string);
19
- return v;
20
- }
21
- if (typeof value === "bigint") {
22
- const s = value.toString();
23
- const v = `${NUMERIC_CONTROL_CHAR + "b" + this.counter++}_` + s;
24
- this.values.set(`"${v}"`, s);
25
- return v;
26
- }
27
- return value;
28
- };
29
- }
30
- replaceInJson(json) {
31
- if (this.stage === 0) {
32
- throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");
33
- }
34
- if (this.stage === 2) {
35
- throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");
36
- }
37
- this.stage = 2;
38
- if (this.counter === 0) {
39
- return json;
40
- }
41
- for (const [key, value] of this.values) {
42
- json = json.replace(key, value);
43
- }
44
- return json;
45
- }
46
- }
@@ -1,121 +0,0 @@
1
- import { NumericValue } from "@smithy/core/serde";
2
- export function jsonReviver(key, value, context) {
3
- if (context?.source) {
4
- const numericString = context.source;
5
- if (typeof value === "number") {
6
- const inSafeRange = value <= Number.MAX_SAFE_INTEGER && value >= Number.MIN_SAFE_INTEGER;
7
- if (inSafeRange) {
8
- if (isRepresentable(numericString, value)) {
9
- return value;
10
- }
11
- return new NumericValue(numericString, "bigDecimal");
12
- }
13
- else {
14
- if (isFractionalBigNumeric(numericString)) {
15
- return new NumericValue(numericString, "bigDecimal");
16
- }
17
- if (/[eE]/.test(numericString)) {
18
- return expandExponentToBigInt(numericString);
19
- }
20
- return BigInt(numericString);
21
- }
22
- }
23
- }
24
- return value;
25
- }
26
- function isFractionalBigNumeric(s) {
27
- const dotIndex = s.indexOf(".");
28
- if (dotIndex === -1) {
29
- return false;
30
- }
31
- const eIndex = s.search(/[eE]/);
32
- if (eIndex === -1) {
33
- return true;
34
- }
35
- const fracDigits = eIndex - dotIndex - 1;
36
- const exp = parseInt(s.slice(eIndex + 1), 10);
37
- return exp < fracDigits;
38
- }
39
- function isRepresentable(numericString, value) {
40
- if (numericString === String(value)) {
41
- return true;
42
- }
43
- if (Object.is(value, -0)) {
44
- return true;
45
- }
46
- if (/[eE]/.test(numericString)) {
47
- return expandToDecimal(numericString) === expandToDecimal(String(value));
48
- }
49
- const normalized = numericString.replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
50
- const canonical = String(value);
51
- if (normalized === canonical) {
52
- return true;
53
- }
54
- if (/[eE]/.test(canonical)) {
55
- return normalized === expandToDecimal(canonical);
56
- }
57
- return false;
58
- }
59
- function expandToDecimal(s) {
60
- const negative = s.startsWith("-");
61
- const abs = negative ? s.slice(1) : s;
62
- const eIndex = abs.search(/[eE]/);
63
- let result;
64
- if (eIndex === -1) {
65
- result = abs;
66
- }
67
- else {
68
- const exp = parseInt(abs.slice(eIndex + 1), 10);
69
- const mantissa = abs.slice(0, eIndex);
70
- const dotIndex = mantissa.indexOf(".");
71
- let digits;
72
- let intLen;
73
- if (dotIndex === -1) {
74
- digits = mantissa;
75
- intLen = mantissa.length;
76
- }
77
- else {
78
- digits = mantissa.slice(0, dotIndex) + mantissa.slice(dotIndex + 1);
79
- intLen = dotIndex;
80
- }
81
- digits = digits.replace(/0+$/, "") || "0";
82
- const newDotPos = intLen + exp;
83
- if (digits === "0") {
84
- result = "0";
85
- }
86
- else if (newDotPos <= 0) {
87
- result = "0." + "0".repeat(-newDotPos) + digits;
88
- }
89
- else if (newDotPos >= digits.length) {
90
- result = digits + "0".repeat(newDotPos - digits.length);
91
- }
92
- else {
93
- result = digits.slice(0, newDotPos) + "." + digits.slice(newDotPos);
94
- }
95
- }
96
- if (result.includes(".")) {
97
- result = result.replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
98
- }
99
- return (negative ? "-" : "") + result;
100
- }
101
- function expandExponentToBigInt(s) {
102
- const eIndex = s.search(/[eE]/);
103
- const exp = parseInt(s.slice(eIndex + 1), 10);
104
- const negative = s.startsWith("-");
105
- const mantissa = s.slice(negative ? 1 : 0, eIndex);
106
- const dotIndex = mantissa.indexOf(".");
107
- let digits;
108
- let shift;
109
- if (dotIndex === -1) {
110
- digits = mantissa;
111
- shift = exp;
112
- }
113
- else {
114
- digits = mantissa.slice(0, dotIndex) + mantissa.slice(dotIndex + 1);
115
- const fracDigits = mantissa.length - dotIndex - 1;
116
- shift = exp - fracDigits;
117
- }
118
- digits = digits.replace(/0+$/, "") || "0";
119
- const result = BigInt(digits) * 10n ** BigInt(shift + (mantissa.replace(".", "").length - digits.length));
120
- return negative ? -result : result;
121
- }