lambda-live-debugger 1.12.8 → 1.12.9

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 (744) hide show
  1. package/dist/extension/extension.zip +0 -0
  2. package/dist/extension/nodejs/node_modules/interceptor.js +9759 -9028
  3. package/dist/extension/nodejs/node_modules/interceptor.js.map +4 -4
  4. package/node_modules/@aws-sdk/checksums/dist-cjs/submodules/flexible-checksums/index.js +2 -1
  5. package/node_modules/@aws-sdk/checksums/dist-cjs/submodules/sha/index.js +464 -40
  6. package/node_modules/@aws-sdk/checksums/dist-cjs/submodules/xxh/index.js +914 -0
  7. package/node_modules/@aws-sdk/checksums/dist-es/submodules/flexible-checksums/stringUnionSelector.js +2 -1
  8. package/node_modules/@aws-sdk/checksums/dist-es/submodules/sha/index.browser.js +2 -0
  9. package/node_modules/@aws-sdk/checksums/dist-es/submodules/sha/index.js +3 -0
  10. package/node_modules/@aws-sdk/checksums/dist-es/submodules/sha/sha512/Sha512.js +71 -0
  11. package/node_modules/@aws-sdk/checksums/dist-es/submodules/sha/sha512/Sha512Js.js +276 -0
  12. package/node_modules/@aws-sdk/checksums/dist-es/submodules/sha/sha512/Sha512WebCrypto.js +76 -0
  13. package/node_modules/@aws-sdk/checksums/dist-es/submodules/xxh/U64.js +190 -0
  14. package/node_modules/@aws-sdk/checksums/dist-es/submodules/xxh/Xxh3.js +274 -0
  15. package/node_modules/@aws-sdk/checksums/dist-es/submodules/xxh/index.js +3 -0
  16. package/node_modules/@aws-sdk/checksums/dist-es/submodules/xxh/xxhash3_128/Xxh3_128.js +179 -0
  17. package/node_modules/@aws-sdk/checksums/dist-es/submodules/xxh/xxhash3_64/Xxh3_64.js +117 -0
  18. package/node_modules/@aws-sdk/checksums/dist-es/submodules/xxh/xxhash64/Xxh64.js +150 -0
  19. package/node_modules/@aws-sdk/checksums/dist-types/submodules/sha/index.browser.d.ts +2 -0
  20. package/node_modules/@aws-sdk/checksums/dist-types/submodules/sha/index.d.ts +3 -0
  21. package/node_modules/@aws-sdk/checksums/dist-types/submodules/sha/sha512/Sha512.d.ts +17 -0
  22. package/node_modules/@aws-sdk/checksums/dist-types/submodules/sha/sha512/Sha512Js.d.ts +29 -0
  23. package/node_modules/@aws-sdk/checksums/dist-types/submodules/sha/sha512/Sha512WebCrypto.d.ts +22 -0
  24. package/node_modules/@aws-sdk/checksums/dist-types/submodules/xxh/U64.d.ts +110 -0
  25. package/node_modules/@aws-sdk/checksums/dist-types/submodules/xxh/Xxh3.d.ts +139 -0
  26. package/node_modules/@aws-sdk/checksums/dist-types/submodules/xxh/index.d.ts +3 -0
  27. package/node_modules/@aws-sdk/checksums/dist-types/submodules/xxh/xxhash3_128/Xxh3_128.d.ts +37 -0
  28. package/node_modules/@aws-sdk/checksums/dist-types/submodules/xxh/xxhash3_64/Xxh3_64.d.ts +27 -0
  29. package/node_modules/@aws-sdk/checksums/dist-types/submodules/xxh/xxhash64/Xxh64.d.ts +41 -0
  30. package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/sha/index.browser.d.ts +2 -0
  31. package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/sha/index.d.ts +3 -0
  32. package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/sha/sha512/Sha512.d.ts +12 -0
  33. package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/sha/sha512/Sha512Js.d.ts +22 -0
  34. package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/sha/sha512/Sha512WebCrypto.d.ts +14 -0
  35. package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/xxh/U64.d.ts +27 -0
  36. package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/xxh/Xxh3.d.ts +65 -0
  37. package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/xxh/index.d.ts +3 -0
  38. package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/xxh/xxhash3_128/Xxh3_128.d.ts +12 -0
  39. package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/xxh/xxhash3_64/Xxh3_64.d.ts +10 -0
  40. package/node_modules/@aws-sdk/checksums/dist-types/ts3.4/submodules/xxh/xxhash64/Xxh64.d.ts +17 -0
  41. package/node_modules/@aws-sdk/checksums/package.json +16 -6
  42. package/node_modules/@aws-sdk/checksums/xxh.d.ts +5 -0
  43. package/node_modules/@aws-sdk/checksums/xxh.js +5 -0
  44. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +38 -6
  45. package/node_modules/@aws-sdk/client-cloudformation/dist-es/models/CloudFormationServiceException.js +1 -0
  46. package/node_modules/@aws-sdk/client-cloudformation/dist-es/models/errors.js +29 -0
  47. package/node_modules/@aws-sdk/client-cloudformation/dist-es/runtimeConfig.js +2 -1
  48. package/node_modules/@aws-sdk/client-cloudformation/dist-es/schemas/schemas_0.js +5 -4
  49. package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormation.d.ts +187 -181
  50. package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormationClient.d.ts +2 -1
  51. package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/ContinueUpdateRollbackCommand.d.ts +4 -0
  52. package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/CloudFormationServiceException.d.ts +1 -0
  53. package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/errors.d.ts +29 -0
  54. package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/models_0.d.ts +27 -3
  55. package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.d.ts +1 -0
  56. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/CloudFormation.d.ts +184 -180
  57. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/models/CloudFormationServiceException.d.ts +1 -0
  58. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/models/errors.d.ts +29 -0
  59. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/models/models_0.d.ts +1 -0
  60. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
  61. package/node_modules/@aws-sdk/client-cloudformation/package.json +8 -8
  62. package/node_modules/@aws-sdk/client-iam/dist-cjs/index.js +44 -4
  63. package/node_modules/@aws-sdk/client-iam/dist-es/models/IAMServiceException.js +1 -0
  64. package/node_modules/@aws-sdk/client-iam/dist-es/models/errors.js +38 -0
  65. package/node_modules/@aws-sdk/client-iam/dist-es/runtimeConfig.js +2 -1
  66. package/node_modules/@aws-sdk/client-iam/dist-es/schemas/schemas_0.js +2 -2
  67. package/node_modules/@aws-sdk/client-iam/dist-types/IAM.d.ts +367 -361
  68. package/node_modules/@aws-sdk/client-iam/dist-types/IAMClient.d.ts +2 -1
  69. package/node_modules/@aws-sdk/client-iam/dist-types/models/IAMServiceException.d.ts +1 -0
  70. package/node_modules/@aws-sdk/client-iam/dist-types/models/errors.d.ts +38 -0
  71. package/node_modules/@aws-sdk/client-iam/dist-types/runtimeConfig.d.ts +1 -0
  72. package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/IAM.d.ts +364 -363
  73. package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/models/IAMServiceException.d.ts +1 -0
  74. package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/models/errors.d.ts +38 -0
  75. package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
  76. package/node_modules/@aws-sdk/client-iam/package.json +9 -9
  77. package/node_modules/@aws-sdk/client-iot/dist-cjs/index.js +39 -4
  78. package/node_modules/@aws-sdk/client-iot/dist-es/models/IoTServiceException.js +1 -0
  79. package/node_modules/@aws-sdk/client-iot/dist-es/models/errors.js +33 -0
  80. package/node_modules/@aws-sdk/client-iot/dist-es/runtimeConfig.js +2 -1
  81. package/node_modules/@aws-sdk/client-iot/dist-es/schemas/schemas_0.js +2 -2
  82. package/node_modules/@aws-sdk/client-iot/dist-types/IoT.d.ts +551 -545
  83. package/node_modules/@aws-sdk/client-iot/dist-types/IoTClient.d.ts +2 -1
  84. package/node_modules/@aws-sdk/client-iot/dist-types/models/IoTServiceException.d.ts +1 -0
  85. package/node_modules/@aws-sdk/client-iot/dist-types/models/errors.d.ts +33 -0
  86. package/node_modules/@aws-sdk/client-iot/dist-types/models/models_1.d.ts +2 -1
  87. package/node_modules/@aws-sdk/client-iot/dist-types/models/models_2.d.ts +2 -1
  88. package/node_modules/@aws-sdk/client-iot/dist-types/runtimeConfig.d.ts +1 -0
  89. package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/IoT.d.ts +548 -547
  90. package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/models/IoTServiceException.d.ts +1 -0
  91. package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/models/errors.d.ts +33 -0
  92. package/node_modules/@aws-sdk/client-iot/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
  93. package/node_modules/@aws-sdk/client-iot/package.json +8 -8
  94. package/node_modules/@aws-sdk/client-iot-data-plane/dist-cjs/index.js +18 -4
  95. package/node_modules/@aws-sdk/client-iot-data-plane/dist-es/models/IoTDataPlaneServiceException.js +1 -0
  96. package/node_modules/@aws-sdk/client-iot-data-plane/dist-es/models/errors.js +12 -0
  97. package/node_modules/@aws-sdk/client-iot-data-plane/dist-es/runtimeConfig.js +2 -1
  98. package/node_modules/@aws-sdk/client-iot-data-plane/dist-es/schemas/schemas_0.js +2 -2
  99. package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/IoTDataPlane.d.ts +29 -23
  100. package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/IoTDataPlaneClient.d.ts +2 -1
  101. package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/models/IoTDataPlaneServiceException.d.ts +1 -0
  102. package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/models/errors.d.ts +12 -0
  103. package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/runtimeConfig.d.ts +1 -0
  104. package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/ts3.4/IoTDataPlane.d.ts +29 -22
  105. package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/ts3.4/models/IoTDataPlaneServiceException.d.ts +1 -0
  106. package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/ts3.4/models/errors.d.ts +12 -0
  107. package/node_modules/@aws-sdk/client-iot-data-plane/dist-types/ts3.4/runtimeConfig.d.ts +1 -0
  108. package/node_modules/@aws-sdk/client-iot-data-plane/package.json +8 -8
  109. package/node_modules/@aws-sdk/client-lambda/README.md +1 -1
  110. package/node_modules/@aws-sdk/client-lambda/dist-cjs/index.js +83 -12
  111. package/node_modules/@aws-sdk/client-lambda/dist-es/models/LambdaServiceException.js +1 -0
  112. package/node_modules/@aws-sdk/client-lambda/dist-es/models/enums.js +12 -0
  113. package/node_modules/@aws-sdk/client-lambda/dist-es/models/errors.js +56 -0
  114. package/node_modules/@aws-sdk/client-lambda/dist-es/schemas/schemas_0.js +12 -11
  115. package/node_modules/@aws-sdk/client-lambda/dist-types/Lambda.d.ts +184 -178
  116. package/node_modules/@aws-sdk/client-lambda/dist-types/LambdaClient.d.ts +3 -2
  117. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CheckpointDurableExecutionCommand.d.ts +1 -0
  118. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CreateAliasCommand.d.ts +1 -1
  119. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CreateCapacityProviderCommand.d.ts +1 -1
  120. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CreateEventSourceMappingCommand.d.ts +9 -7
  121. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CreateFunctionCommand.d.ts +1 -1
  122. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteAliasCommand.d.ts +1 -1
  123. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteEventSourceMappingCommand.d.ts +4 -3
  124. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteFunctionCommand.d.ts +1 -1
  125. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteFunctionConcurrencyCommand.d.ts +1 -1
  126. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetAliasCommand.d.ts +1 -1
  127. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetEventSourceMappingCommand.d.ts +4 -3
  128. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetFunctionCommand.d.ts +1 -1
  129. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetFunctionConfigurationCommand.d.ts +1 -1
  130. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetProvisionedConcurrencyConfigCommand.d.ts +4 -4
  131. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/InvokeCommand.d.ts +1 -1
  132. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/InvokeWithResponseStreamCommand.d.ts +10 -1
  133. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListAliasesCommand.d.ts +1 -1
  134. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListEventSourceMappingsCommand.d.ts +4 -3
  135. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListFunctionEventInvokeConfigsCommand.d.ts +1 -1
  136. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListFunctionsCommand.d.ts +1 -1
  137. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListVersionsByFunctionCommand.d.ts +1 -1
  138. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PublishVersionCommand.d.ts +1 -1
  139. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PutFunctionConcurrencyCommand.d.ts +1 -1
  140. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PutFunctionRecursionConfigCommand.d.ts +1 -1
  141. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateAliasCommand.d.ts +1 -1
  142. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateEventSourceMappingCommand.d.ts +8 -6
  143. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateFunctionCodeCommand.d.ts +1 -1
  144. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateFunctionConfigurationCommand.d.ts +1 -1
  145. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateFunctionUrlConfigCommand.d.ts +1 -1
  146. package/node_modules/@aws-sdk/client-lambda/dist-types/index.d.ts +1 -1
  147. package/node_modules/@aws-sdk/client-lambda/dist-types/models/LambdaServiceException.d.ts +1 -0
  148. package/node_modules/@aws-sdk/client-lambda/dist-types/models/enums.d.ts +20 -0
  149. package/node_modules/@aws-sdk/client-lambda/dist-types/models/errors.d.ts +56 -0
  150. package/node_modules/@aws-sdk/client-lambda/dist-types/models/models_0.d.ts +30 -20
  151. package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/Lambda.d.ts +180 -176
  152. package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/LambdaServiceException.d.ts +1 -0
  153. package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/enums.d.ts +14 -0
  154. package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/errors.d.ts +56 -0
  155. package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/models_0.d.ts +3 -0
  156. package/node_modules/@aws-sdk/client-lambda/package.json +9 -9
  157. package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +63 -17
  158. package/node_modules/@aws-sdk/client-s3/dist-es/models/S3ServiceException.js +1 -0
  159. package/node_modules/@aws-sdk/client-s3/dist-es/models/enums.js +8 -0
  160. package/node_modules/@aws-sdk/client-s3/dist-es/models/errors.js +21 -0
  161. package/node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js +30 -16
  162. package/node_modules/@aws-sdk/client-s3/dist-types/S3.d.ts +231 -225
  163. package/node_modules/@aws-sdk/client-s3/dist-types/S3Client.d.ts +3 -2
  164. package/node_modules/@aws-sdk/client-s3/dist-types/commands/CopyObjectCommand.d.ts +3 -0
  165. package/node_modules/@aws-sdk/client-s3/dist-types/commands/CreateMultipartUploadCommand.d.ts +3 -0
  166. package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketInventoryConfigurationCommand.d.ts +1 -1
  167. package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketNotificationConfigurationCommand.d.ts +3 -3
  168. package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectCommand.d.ts +3 -0
  169. package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectLockConfigurationCommand.d.ts +4 -0
  170. package/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectRetentionCommand.d.ts +5 -0
  171. package/node_modules/@aws-sdk/client-s3/dist-types/commands/HeadObjectCommand.d.ts +3 -0
  172. package/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketInventoryConfigurationsCommand.d.ts +1 -1
  173. package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketInventoryConfigurationCommand.d.ts +1 -1
  174. package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketNotificationConfigurationCommand.d.ts +3 -3
  175. package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectCommand.d.ts +3 -0
  176. package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectLockConfigurationCommand.d.ts +4 -0
  177. package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectRetentionCommand.d.ts +5 -0
  178. package/node_modules/@aws-sdk/client-s3/dist-types/commands/PutPublicAccessBlockCommand.d.ts +1 -1
  179. package/node_modules/@aws-sdk/client-s3/dist-types/models/S3ServiceException.d.ts +1 -0
  180. package/node_modules/@aws-sdk/client-s3/dist-types/models/enums.d.ts +16 -0
  181. package/node_modules/@aws-sdk/client-s3/dist-types/models/errors.d.ts +21 -0
  182. package/node_modules/@aws-sdk/client-s3/dist-types/models/models_0.d.ts +186 -49
  183. package/node_modules/@aws-sdk/client-s3/dist-types/models/models_1.d.ts +43 -1
  184. package/node_modules/@aws-sdk/client-s3/dist-types/schemas/schemas_0.d.ts +1 -0
  185. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/S3.d.ts +228 -224
  186. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/S3Client.d.ts +1 -1
  187. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutPublicAccessBlockCommand.d.ts +1 -1
  188. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/S3ServiceException.d.ts +1 -0
  189. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/enums.d.ts +9 -0
  190. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/errors.d.ts +21 -0
  191. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_0.d.ts +23 -7
  192. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_1.d.ts +14 -1
  193. package/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/schemas/schemas_0.d.ts +1 -0
  194. package/node_modules/@aws-sdk/client-s3/package.json +13 -13
  195. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +38 -13
  196. package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +19 -10
  197. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +104 -1549
  198. package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +7 -1
  199. package/node_modules/@aws-sdk/core/dist-es/submodules/client/getDefaultSocketTimeout.js +10 -0
  200. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.browser.js +1 -0
  201. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +1 -0
  202. package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.native.js +1 -0
  203. package/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-host-header/hostHeaderMiddleware.js +4 -2
  204. package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/parseArn.js +4 -2
  205. package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.js +18 -9
  206. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +12 -3
  207. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js +6 -3
  208. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +1 -4
  209. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +2 -7
  210. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +1 -3
  211. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -3
  212. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.js +51 -0
  213. package/node_modules/@aws-sdk/core/dist-es/submodules/util/hasOwn.js +3 -0
  214. package/node_modules/@aws-sdk/core/dist-es/submodules/util/index.js +1 -0
  215. package/node_modules/@aws-sdk/core/dist-es/submodules/util/util-arn-parser/arn.js +2 -1
  216. package/node_modules/@aws-sdk/core/dist-types/submodules/client/getDefaultSocketTimeout.d.ts +11 -0
  217. package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.browser.d.ts +1 -0
  218. package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.d.ts +1 -0
  219. package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.native.d.ts +1 -0
  220. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +3 -7
  221. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +3 -8
  222. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
  223. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
  224. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
  225. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
  226. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +25 -0
  227. package/node_modules/@aws-sdk/core/dist-types/submodules/util/hasOwn.d.ts +4 -0
  228. package/node_modules/@aws-sdk/core/dist-types/submodules/util/index.d.ts +1 -0
  229. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/getDefaultSocketTimeout.d.ts +4 -0
  230. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.browser.d.ts +1 -0
  231. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -0
  232. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.native.d.ts +1 -0
  233. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +11 -10
  234. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
  235. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
  236. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
  237. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
  238. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +36 -0
  239. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/hasOwn.d.ts +1 -0
  240. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +1 -0
  241. package/node_modules/@aws-sdk/core/package.json +6 -6
  242. package/node_modules/@aws-sdk/credential-provider-cognito-identity/package.json +5 -5
  243. package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
  244. package/node_modules/@aws-sdk/credential-provider-http/package.json +7 -7
  245. package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
  246. package/node_modules/@aws-sdk/credential-provider-login/package.json +6 -6
  247. package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -11
  248. package/node_modules/@aws-sdk/credential-provider-process/package.json +5 -5
  249. package/node_modules/@aws-sdk/credential-provider-sso/package.json +7 -7
  250. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +6 -6
  251. package/node_modules/@aws-sdk/credential-providers/README.md +1 -1
  252. package/node_modules/@aws-sdk/credential-providers/package.json +16 -16
  253. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/submodules/s3/index.js +36 -17
  254. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/submodules/s3-control/index.js +6 -3
  255. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3/middleware-bucket-endpoint/bucketHostnameUtils.js +6 -3
  256. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3/middleware-region-redirect/region-redirect-middleware.js +2 -0
  257. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityCache.js +8 -4
  258. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityProviderImpl.js +18 -8
  259. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3/middleware-ssec/middleware-ssec.js +2 -1
  260. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3-control/middleware-process-arnables/parse-outpost-arnables.js +4 -2
  261. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-es/submodules/s3-control/middleware-redirect-from-postid/redirect-from-postid.js +2 -1
  262. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityCache.d.ts +1 -0
  263. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityProviderImpl.d.ts +3 -1
  264. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityCache.d.ts +1 -0
  265. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-types/ts3.4/submodules/s3/middleware-s3-express/classes/S3ExpressIdentityProviderImpl.d.ts +3 -1
  266. package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +6 -6
  267. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +15 -4
  268. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +17 -4
  269. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +10 -4
  270. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +17 -4
  271. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +24 -12
  272. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/models/CognitoIdentityServiceException.js +1 -0
  273. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/models/errors.js +9 -0
  274. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.js +2 -1
  275. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/schemas/schemas_0.js +2 -2
  276. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/SigninServiceException.js +1 -0
  277. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +7 -0
  278. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/errors.js +4 -0
  279. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js +2 -1
  280. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/schemas/schemas_0.js +2 -2
  281. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/SSOServiceException.js +1 -0
  282. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/errors.js +4 -0
  283. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js +2 -1
  284. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/schemas/schemas_0.js +2 -2
  285. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js +1 -0
  286. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/errors.js +11 -0
  287. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js +2 -1
  288. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/schemas/schemas_0.js +2 -2
  289. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js +1 -0
  290. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/errors.js +7 -0
  291. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js +2 -1
  292. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js +13 -10
  293. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentity.d.ts +11 -5
  294. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentityClient.d.ts +2 -1
  295. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +1 -0
  296. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/models/errors.d.ts +9 -0
  297. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +1 -0
  298. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/Signin.d.ts +12 -7
  299. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/SigninClient.d.ts +3 -3
  300. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenCommand.d.ts +5 -59
  301. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenWithIAMCommand.d.ts +5 -33
  302. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/index.d.ts +1 -2
  303. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/SigninServiceException.d.ts +1 -0
  304. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +16 -9
  305. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/errors.d.ts +12 -39
  306. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/models_0.d.ts +36 -48
  307. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.d.ts +1 -0
  308. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/SSO.d.ts +9 -3
  309. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/SSOClient.d.ts +2 -1
  310. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/models/SSOServiceException.d.ts +1 -0
  311. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/models/errors.d.ts +4 -0
  312. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.d.ts +1 -0
  313. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/SSOOIDC.d.ts +9 -3
  314. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/SSOOIDCClient.d.ts +2 -1
  315. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/models/SSOOIDCServiceException.d.ts +1 -0
  316. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/models/errors.d.ts +11 -0
  317. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +1 -0
  318. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STS.d.ts +33 -8
  319. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STSClient.d.ts +24 -4
  320. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/commands/AssumeRoleCommand.d.ts +3 -0
  321. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.d.ts +3 -0
  322. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/index.d.ts +22 -3
  323. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/STSServiceException.d.ts +1 -0
  324. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/errors.d.ts +7 -0
  325. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/models_0.d.ts +40 -0
  326. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +1 -0
  327. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/CognitoIdentity.d.ts +14 -5
  328. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +1 -0
  329. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/models/errors.d.ts +9 -0
  330. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +1 -0
  331. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/Signin.d.ts +11 -5
  332. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/SigninServiceException.d.ts +1 -0
  333. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +7 -0
  334. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/errors.d.ts +4 -0
  335. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +1 -0
  336. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/SSO.d.ts +9 -3
  337. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/models/SSOServiceException.d.ts +1 -0
  338. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/models/errors.d.ts +4 -0
  339. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +1 -0
  340. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/SSOOIDC.d.ts +9 -3
  341. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/models/SSOOIDCServiceException.d.ts +1 -0
  342. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/models/errors.d.ts +11 -0
  343. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +1 -0
  344. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/STS.d.ts +11 -5
  345. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/STSServiceException.d.ts +1 -0
  346. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/errors.d.ts +7 -0
  347. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/models_0.d.ts +6 -0
  348. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +1 -0
  349. package/node_modules/@aws-sdk/nested-clients/package.json +8 -8
  350. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +4 -4
  351. package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +37 -19
  352. package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +37 -19
  353. package/node_modules/@aws-sdk/token-providers/package.json +6 -6
  354. package/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +4 -0
  355. package/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +4 -0
  356. package/node_modules/@aws-sdk/types/package.json +2 -2
  357. package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
  358. package/node_modules/@inquirer/ansi/README.md +35 -3
  359. package/node_modules/@inquirer/ansi/package.json +4 -4
  360. package/node_modules/@inquirer/checkbox/README.md +75 -5
  361. package/node_modules/@inquirer/checkbox/dist/index.d.ts +7 -7
  362. package/node_modules/@inquirer/checkbox/dist/index.js +4 -0
  363. package/node_modules/@inquirer/checkbox/package.json +8 -8
  364. package/node_modules/@inquirer/confirm/README.md +81 -5
  365. package/node_modules/@inquirer/confirm/dist/index.d.ts +13 -3
  366. package/node_modules/@inquirer/confirm/dist/index.js +30 -7
  367. package/node_modules/@inquirer/confirm/package.json +6 -6
  368. package/node_modules/@inquirer/core/README.md +35 -3
  369. package/node_modules/@inquirer/core/dist/index.js +12 -12
  370. package/node_modules/@inquirer/core/dist/lib/create-prompt.js +84 -55
  371. package/node_modules/@inquirer/core/dist/lib/hook-engine.js +9 -11
  372. package/node_modules/@inquirer/core/dist/lib/make-theme.js +3 -3
  373. package/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js +2 -2
  374. package/node_modules/@inquirer/core/dist/lib/screen-manager.js +1 -1
  375. package/node_modules/@inquirer/core/dist/lib/theme.js +1 -1
  376. package/node_modules/@inquirer/core/dist/lib/use-effect.js +1 -1
  377. package/node_modules/@inquirer/core/dist/lib/use-keypress.js +3 -3
  378. package/node_modules/@inquirer/core/dist/lib/use-memo.js +1 -1
  379. package/node_modules/@inquirer/core/dist/lib/use-prefix.js +3 -3
  380. package/node_modules/@inquirer/core/dist/lib/use-ref.js +1 -1
  381. package/node_modules/@inquirer/core/dist/lib/use-state.js +1 -1
  382. package/node_modules/@inquirer/core/dist/lib/utils.js +1 -1
  383. package/node_modules/@inquirer/core/package.json +7 -7
  384. package/node_modules/@inquirer/editor/README.md +75 -5
  385. package/node_modules/@inquirer/editor/dist/index.d.ts +6 -6
  386. package/node_modules/@inquirer/editor/package.json +7 -7
  387. package/node_modules/@inquirer/expand/README.md +75 -5
  388. package/node_modules/@inquirer/expand/dist/index.d.ts +3 -3
  389. package/node_modules/@inquirer/expand/dist/index.js +3 -3
  390. package/node_modules/@inquirer/expand/package.json +6 -6
  391. package/node_modules/@inquirer/external-editor/README.md +35 -3
  392. package/node_modules/@inquirer/external-editor/dist/index.js +4 -4
  393. package/node_modules/@inquirer/external-editor/package.json +4 -4
  394. package/node_modules/@inquirer/figures/package.json +3 -3
  395. package/node_modules/@inquirer/input/README.md +75 -5
  396. package/node_modules/@inquirer/input/dist/index.d.ts +9 -9
  397. package/node_modules/@inquirer/input/package.json +6 -6
  398. package/node_modules/@inquirer/number/README.md +75 -5
  399. package/node_modules/@inquirer/number/dist/index.d.ts +5 -5
  400. package/node_modules/@inquirer/number/dist/index.js +2 -2
  401. package/node_modules/@inquirer/number/package.json +6 -6
  402. package/node_modules/@inquirer/password/README.md +75 -5
  403. package/node_modules/@inquirer/password/dist/index.d.ts +4 -4
  404. package/node_modules/@inquirer/password/dist/index.js +1 -1
  405. package/node_modules/@inquirer/password/package.json +7 -7
  406. package/node_modules/@inquirer/prompts/README.md +24 -6
  407. package/node_modules/@inquirer/prompts/package.json +15 -15
  408. package/node_modules/@inquirer/rawlist/README.md +75 -5
  409. package/node_modules/@inquirer/rawlist/dist/index.d.ts +3 -3
  410. package/node_modules/@inquirer/rawlist/dist/index.js +5 -4
  411. package/node_modules/@inquirer/rawlist/package.json +6 -6
  412. package/node_modules/@inquirer/search/README.md +74 -4
  413. package/node_modules/@inquirer/search/dist/index.d.ts +4 -4
  414. package/node_modules/@inquirer/search/dist/index.js +1 -1
  415. package/node_modules/@inquirer/search/package.json +7 -7
  416. package/node_modules/@inquirer/select/README.md +75 -5
  417. package/node_modules/@inquirer/select/dist/index.d.ts +4 -4
  418. package/node_modules/@inquirer/select/package.json +8 -8
  419. package/node_modules/@inquirer/type/dist/index.js +2 -2
  420. package/node_modules/@inquirer/type/dist/utils.d.ts +11 -0
  421. package/node_modules/@inquirer/type/dist/utils.js +15 -1
  422. package/node_modules/@inquirer/type/package.json +3 -3
  423. package/node_modules/@nodable/entities/package.json +2 -2
  424. package/node_modules/@nodable/entities/src/index.d.ts +5 -2
  425. package/node_modules/@smithy/core/CHANGELOG.md +95 -0
  426. package/node_modules/@smithy/core/dist-cjs/index.js +4 -2
  427. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +67 -90
  428. package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +100 -23
  429. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +8 -4
  430. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +16 -8
  431. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +8 -4
  432. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +4 -2
  433. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +12 -6
  434. package/node_modules/@smithy/core/dist-cjs/submodules/errors/index.js +20 -0
  435. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +28 -9
  436. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +28 -9
  437. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +1785 -19
  438. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +64 -25
  439. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +68 -27
  440. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +15 -7
  441. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +15 -4
  442. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +32 -9
  443. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +15 -4
  444. package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +6 -3
  445. package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
  446. package/node_modules/@smithy/core/dist-es/normalizeProvider.js +2 -1
  447. package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +34 -59
  448. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +8 -4
  449. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +6 -3
  450. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +12 -6
  451. package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +4 -2
  452. package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +2 -16
  453. package/node_modules/@smithy/core/dist-es/submodules/client/index.js +1 -1
  454. package/node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js +10 -5
  455. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +25 -3
  456. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js +2 -1
  457. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +44 -5
  458. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +2 -1
  459. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +2 -1
  460. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +4 -2
  461. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js +10 -4
  462. package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +2 -1
  463. package/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js +8 -4
  464. package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js +6 -3
  465. package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/numberSelector.js +2 -1
  466. package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js +8 -4
  467. package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/cache/EndpointCache.js +2 -1
  468. package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +2 -1
  469. package/node_modules/@smithy/core/dist-es/submodules/errors/errors.js +18 -0
  470. package/node_modules/@smithy/core/dist-es/submodules/errors/index.js +1 -0
  471. package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +6 -3
  472. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +12 -1
  473. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js +2 -1
  474. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js +2 -1
  475. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js +2 -1
  476. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js +4 -2
  477. package/node_modules/@smithy/core/dist-es/submodules/protocols/AbstractRpcV2Protocol.js +35 -0
  478. package/node_modules/@smithy/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js +6 -0
  479. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +8 -4
  480. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +53 -10
  481. package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +6 -2
  482. package/node_modules/@smithy/core/dist-es/submodules/protocols/UnionSerde.js +26 -0
  483. package/node_modules/@smithy/core/dist-es/submodules/protocols/common.js +3 -0
  484. package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +9 -0
  485. package/node_modules/@smithy/core/dist-es/submodules/protocols/json/SmithyRpcV2JsonProtocol.js +79 -0
  486. package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +12 -3
  487. package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +12 -3
  488. package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +17 -4
  489. package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +20 -7
  490. package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/parseJsonBody.js +16 -1
  491. package/node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js +3 -0
  492. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js +4 -2
  493. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +2 -1
  494. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy.js +6 -3
  495. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +17 -8
  496. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/util.js +6 -3
  497. package/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js +11 -10
  498. package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/race.js +22 -0
  499. package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +15 -7
  500. package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +1 -0
  501. package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
  502. package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +1 -0
  503. package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +2 -1
  504. package/node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.browser.js +6 -3
  505. package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.browser.js +2 -0
  506. package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/getAwsChunkedEncodingStream.js +23 -8
  507. package/node_modules/@smithy/core/dist-es/submodules/serde/writeKey.js +3 -0
  508. package/node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js +2 -1
  509. package/node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js +2 -1
  510. package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +2 -1
  511. package/node_modules/@smithy/core/dist-types/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +5 -14
  512. package/node_modules/@smithy/core/dist-types/submodules/cbor/parseCborBody.d.ts +3 -0
  513. package/node_modules/@smithy/core/dist-types/submodules/client/index.d.ts +1 -1
  514. package/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/client.d.ts +11 -3
  515. package/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/exceptions.d.ts +1 -0
  516. package/node_modules/@smithy/core/dist-types/submodules/errors/errors.d.ts +44 -0
  517. package/node_modules/@smithy/core/dist-types/submodules/errors/index.d.ts +1 -0
  518. package/node_modules/@smithy/core/dist-types/submodules/protocols/AbstractRpcV2Protocol.d.ts +45 -0
  519. package/node_modules/@smithy/core/dist-types/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
  520. package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpProtocol.d.ts +17 -7
  521. package/node_modules/@smithy/core/dist-types/submodules/protocols/RpcProtocol.d.ts +12 -0
  522. package/node_modules/@smithy/core/dist-types/submodules/protocols/UnionSerde.d.ts +24 -0
  523. package/node_modules/@smithy/core/dist-types/submodules/protocols/common.d.ts +2 -0
  524. package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +10 -0
  525. package/node_modules/@smithy/core/dist-types/submodules/protocols/json/JsonSettings.d.ts +13 -0
  526. package/node_modules/@smithy/core/dist-types/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +19 -0
  527. package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +16 -0
  528. package/node_modules/@smithy/core/dist-types/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
  529. package/node_modules/@smithy/core/dist-types/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
  530. package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/race.d.ts +3 -0
  531. package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +2 -2
  532. package/node_modules/@smithy/core/dist-types/submodules/serde/index.browser.d.ts +1 -0
  533. package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
  534. package/node_modules/@smithy/core/dist-types/submodules/serde/index.native.d.ts +1 -0
  535. package/node_modules/@smithy/core/dist-types/submodules/serde/writeKey.d.ts +4 -0
  536. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +5 -14
  537. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/parseCborBody.d.ts +3 -0
  538. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -1
  539. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/smithy-client/client.d.ts +11 -3
  540. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/smithy-client/exceptions.d.ts +1 -0
  541. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/errors.d.ts +44 -0
  542. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/errors/index.d.ts +1 -0
  543. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/AbstractRpcV2Protocol.d.ts +45 -0
  544. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
  545. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpProtocol.d.ts +21 -7
  546. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/RpcProtocol.d.ts +12 -0
  547. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/UnionSerde.d.ts +24 -0
  548. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/common.d.ts +2 -0
  549. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +10 -0
  550. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/JsonSettings.d.ts +13 -0
  551. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +19 -0
  552. package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonCodec.d.ts +15 -11
  553. package/node_modules/{@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json → @smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1}/JsonSettings.d.ts +7 -4
  554. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +14 -0
  555. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +29 -0
  556. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +51 -0
  557. package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +13 -9
  558. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +30 -0
  559. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +60 -0
  560. package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +1 -1
  561. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +21 -0
  562. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +15 -0
  563. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +11 -0
  564. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +38 -0
  565. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
  566. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/service-error-classification/service-error-classification.d.ts +4 -0
  567. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/util-retry/race.d.ts +3 -0
  568. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/TypeRegistry.d.ts +2 -2
  569. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.browser.d.ts +1 -0
  570. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
  571. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.native.d.ts +1 -0
  572. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/writeKey.d.ts +4 -0
  573. package/node_modules/@smithy/core/errors.d.ts +5 -0
  574. package/node_modules/@smithy/core/errors.js +5 -0
  575. package/node_modules/@smithy/core/package.json +12 -2
  576. package/node_modules/@smithy/fetch-http-handler/CHANGELOG.md +17 -0
  577. package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +12 -5
  578. package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +8 -3
  579. package/node_modules/@smithy/fetch-http-handler/dist-es/request-timeout.js +4 -2
  580. package/node_modules/@smithy/fetch-http-handler/dist-types/request-timeout.d.ts +12 -1
  581. package/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/request-timeout.d.ts +12 -1
  582. package/node_modules/@smithy/fetch-http-handler/package.json +3 -3
  583. package/node_modules/@smithy/node-http-handler/CHANGELOG.md +45 -0
  584. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +84 -29
  585. package/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +2 -1
  586. package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +23 -11
  587. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +26 -2
  588. package/node_modules/@smithy/node-http-handler/dist-es/resolve-default-socket-timeout.js +4 -0
  589. package/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +30 -15
  590. package/node_modules/@smithy/node-http-handler/dist-types/resolve-default-socket-timeout.d.ts +4 -0
  591. package/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +10 -1
  592. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/resolve-default-socket-timeout.d.ts +4 -0
  593. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +10 -1
  594. package/node_modules/@smithy/node-http-handler/package.json +3 -3
  595. package/node_modules/@smithy/signature-v4/CHANGELOG.md +24 -0
  596. package/node_modules/@smithy/signature-v4/dist-cjs/index.js +39 -12
  597. package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +7 -2
  598. package/node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +4 -2
  599. package/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +9 -2
  600. package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +5 -1
  601. package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +5 -1
  602. package/node_modules/@smithy/signature-v4/dist-es/headerUtil.js +13 -3
  603. package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +5 -1
  604. package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +5 -1
  605. package/node_modules/@smithy/signature-v4/package.json +3 -3
  606. package/node_modules/@smithy/types/CHANGELOG.md +12 -0
  607. package/node_modules/@smithy/types/dist-types/metrics.d.ts +8 -7
  608. package/node_modules/@smithy/types/dist-types/middleware.d.ts +11 -0
  609. package/node_modules/@smithy/types/dist-types/ts3.4/metrics.d.ts +8 -7
  610. package/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +11 -0
  611. package/node_modules/@smithy/types/package.json +1 -1
  612. package/node_modules/@types/node/README.md +2 -2
  613. package/node_modules/@types/node/buffer.d.ts +1 -0
  614. package/node_modules/@types/node/child_process.d.ts +1 -1
  615. package/node_modules/@types/node/crypto.d.ts +22 -10
  616. package/node_modules/@types/node/dgram.d.ts +1 -1
  617. package/node_modules/@types/node/diagnostics_channel.d.ts +4 -4
  618. package/node_modules/@types/node/ffi.d.ts +14 -0
  619. package/node_modules/@types/node/http.d.ts +1 -1
  620. package/node_modules/@types/node/http2.d.ts +3 -2
  621. package/node_modules/@types/node/net.d.ts +16 -4
  622. package/node_modules/@types/node/package.json +3 -18
  623. package/node_modules/@types/node/perf_hooks.d.ts +31 -19
  624. package/node_modules/@types/node/process.d.ts +1 -0
  625. package/node_modules/@types/node/quic.d.ts +45 -5
  626. package/node_modules/@types/node/stream/iter.d.ts +9 -12
  627. package/node_modules/@types/node/stream/web.d.ts +20 -0
  628. package/node_modules/@types/node/test/reporters.d.ts +1 -0
  629. package/node_modules/@types/node/test.d.ts +72 -0
  630. package/node_modules/@types/node/tls.d.ts +40 -25
  631. package/node_modules/@types/node/util.d.ts +6 -3
  632. package/node_modules/@types/node/vfs.d.ts +7 -6
  633. package/node_modules/@types/node/vm.d.ts +2 -1
  634. package/node_modules/@types/node/web-globals/streams.d.ts +4 -0
  635. package/node_modules/@types/node/worker_threads.d.ts +4 -1
  636. package/node_modules/@types/node/zlib.d.ts +775 -0
  637. package/node_modules/chalk/package.json +1 -1
  638. package/node_modules/chalk/source/index.js +2 -1
  639. package/node_modules/commander/Readme.md +6 -32
  640. package/node_modules/commander/index.js +1 -1
  641. package/node_modules/commander/lib/command.js +22 -9
  642. package/node_modules/commander/lib/help.js +6 -2
  643. package/node_modules/commander/lib/option.js +1 -1
  644. package/node_modules/commander/package.json +2 -1
  645. package/node_modules/commander/typings/index.d.ts +6 -3
  646. package/node_modules/fast-xml-builder/CHANGELOG.md +12 -0
  647. package/node_modules/fast-xml-builder/README.md +4 -1
  648. package/node_modules/fast-xml-builder/lib/fxb.cjs +1 -1
  649. package/node_modules/fast-xml-builder/lib/fxb.min.js +1 -1
  650. package/node_modules/fast-xml-builder/lib/fxb.min.js.map +1 -1
  651. package/node_modules/fast-xml-builder/package.json +6 -10
  652. package/node_modules/fast-xml-builder/src/fxb.js +34 -24
  653. package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +18 -17
  654. package/node_modules/fast-xml-builder/src/util.js +10 -3
  655. package/node_modules/fast-xml-parser/CHANGELOG.md +15 -0
  656. package/node_modules/fast-xml-parser/README.md +9 -9
  657. package/node_modules/fast-xml-parser/lib/fxbuilder.min.js +1 -1
  658. package/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +1 -1
  659. package/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
  660. package/node_modules/fast-xml-parser/lib/fxp.d.cts +3 -1
  661. package/node_modules/fast-xml-parser/lib/fxp.min.js +1 -1
  662. package/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -1
  663. package/node_modules/fast-xml-parser/lib/fxparser.min.js +1 -1
  664. package/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -1
  665. package/node_modules/fast-xml-parser/package.json +6 -6
  666. package/node_modules/fast-xml-parser/src/fxp.d.ts +1 -1
  667. package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +47 -11
  668. package/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +7 -1
  669. package/node_modules/inquirer/README.md +35 -3
  670. package/node_modules/inquirer/dist/index.js +2 -1
  671. package/node_modules/inquirer/dist/ui/prompt.js +3 -2
  672. package/node_modules/inquirer/package.json +8 -8
  673. package/node_modules/is-unsafe/README.md +34 -1
  674. package/node_modules/is-unsafe/package.json +3 -3
  675. package/node_modules/is-unsafe/src/contexts/xml.js +2 -1
  676. package/node_modules/is-unsafe/src/index.d.ts +9 -1
  677. package/node_modules/is-unsafe/src/index.js +29 -2
  678. package/node_modules/is-unsafe/src/util/decode-entities.js +48 -0
  679. package/node_modules/strnum/CHANGELOG.md +6 -0
  680. package/node_modules/strnum/package.json +1 -1
  681. package/node_modules/strnum/strnum.js +10 -9
  682. package/node_modules/toml/lib/compiler.js +101 -144
  683. package/node_modules/toml/lib/parser.js +20 -4
  684. package/node_modules/toml/package.json +1 -1
  685. package/node_modules/undici-types/client.d.ts +8 -3
  686. package/node_modules/undici-types/connector.d.ts +1 -0
  687. package/node_modules/undici-types/cookies.d.ts +1 -1
  688. package/node_modules/undici-types/dispatcher.d.ts +3 -3
  689. package/node_modules/undici-types/errors.d.ts +10 -0
  690. package/node_modules/undici-types/fetch.d.ts +5 -1
  691. package/node_modules/undici-types/handlers.d.ts +2 -0
  692. package/node_modules/undici-types/interceptors.d.ts +1 -1
  693. package/node_modules/undici-types/mock-interceptor.d.ts +5 -1
  694. package/node_modules/undici-types/package.json +1 -1
  695. package/node_modules/undici-types/proxy-agent.d.ts +7 -0
  696. package/node_modules/xml-naming/README.md +99 -1
  697. package/node_modules/xml-naming/package.json +4 -2
  698. package/node_modules/xml-naming/src/index.d.ts +34 -0
  699. package/node_modules/xml-naming/src/index.js +134 -22
  700. package/node_modules/yaml/browser/dist/compose/resolve-flow-scalar.js +19 -18
  701. package/node_modules/yaml/browser/dist/nodes/Alias.js +25 -23
  702. package/node_modules/yaml/dist/compose/resolve-flow-scalar.js +19 -18
  703. package/node_modules/yaml/dist/nodes/Alias.js +25 -23
  704. package/node_modules/yaml/package.json +1 -1
  705. package/package.json +25 -25
  706. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -7
  707. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -4
  708. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -13
  709. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -18
  710. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -27
  711. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -15
  712. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -39
  713. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +0 -7
  714. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +0 -7
  715. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +0 -2
  716. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +0 -14
  717. package/node_modules/@inquirer/core/dist/lib/promise-polyfill.d.ts +0 -7
  718. package/node_modules/@inquirer/core/dist/lib/promise-polyfill.js +0 -14
  719. package/node_modules/fast-xml-parser/node_modules/xml-naming/README.md +0 -287
  720. package/node_modules/fast-xml-parser/node_modules/xml-naming/package.json +0 -56
  721. package/node_modules/fast-xml-parser/node_modules/xml-naming/src/index.d.ts +0 -108
  722. package/node_modules/fast-xml-parser/node_modules/xml-naming/src/index.js +0 -382
  723. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/JsonSettings.js +0 -0
  724. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonCodec.js +0 -0
  725. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +0 -0
  726. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +0 -0
  727. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +0 -0
  728. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/detectBufferParsing.js +0 -0
  729. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/jsonReplacer.js +0 -0
  730. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/jsonReviver.js +0 -0
  731. /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/needsReviver.js +0 -0
  732. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -0
  733. /package/node_modules/{@aws-sdk/core/dist-types/submodules/protocols/json → @smithy/core/dist-types/submodules/protocols/json/codec-v1}/JsonSettings.d.ts +0 -0
  734. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -0
  735. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -0
  736. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -0
  737. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -0
  738. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -0
  739. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -0
  740. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/detectBufferParsing.d.ts +0 -0
  741. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/jsonReplacer.d.ts +0 -0
  742. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/jsonReviver.d.ts +0 -0
  743. /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/needsReviver.d.ts +0 -0
  744. /package/node_modules/{fast-xml-parser/node_modules/xml-naming → xml-naming}/LICENSE +0 -0
@@ -1,12 +1,12 @@
1
- const { Uint8ArrayBlobAdapter, sdkStreamMixin, splitEvery, splitHeader, fromBase64, _parseEpochTimestamp, _parseRfc7231DateTime, _parseRfc3339DateTimeWithOffset, LazyJsonString, NumericValue, toUtf8, fromUtf8, generateIdempotencyToken, toBase64, dateToUtcString, quoteHeader } = require("@smithy/core/serde");
2
- const { HttpRequest, HttpResponse, hasOwn, isValidHostname } = require("@smithy/core/transport");
1
+ const { Uint8ArrayBlobAdapter, sdkStreamMixin, splitEvery, splitHeader, fromBase64, _parseEpochTimestamp, _parseRfc7231DateTime, _parseRfc3339DateTimeWithOffset, LazyJsonString, NumericValue, toUtf8, fromUtf8, generateIdempotencyToken, toBase64, dateToUtcString, quoteHeader, writeKey, parseEpochTimestamp, parseRfc7231DateTime, parseRfc3339DateTimeWithOffset } = require("@smithy/core/serde");
2
+ const { HttpRequest, HttpResponse, hasOwn, isValidHostname, getSmithyContext } = require("@smithy/core/transport");
3
3
  const { parseQueryString, parseUrl } = require("@smithy/core/transport");
4
4
  exports.HttpRequest = HttpRequest;
5
5
  exports.HttpResponse = HttpResponse;
6
6
  exports.isValidHostname = isValidHostname;
7
7
  exports.parseQueryString = parseQueryString;
8
8
  exports.parseUrl = parseUrl;
9
- const { TypeRegistry, NormalizedSchema, translateTraits } = require("@smithy/core/schema");
9
+ const { TypeRegistry, NormalizedSchema, translateTraits, deref } = require("@smithy/core/schema");
10
10
  const { FieldPosition } = require("@smithy/types");
11
11
 
12
12
  const collectBody = async (streamBody = new Uint8Array(), context) => {
@@ -39,7 +39,7 @@ class HttpProtocol extends SerdeContext {
39
39
  constructor(options) {
40
40
  super();
41
41
  this.options = options;
42
- this.compositeErrorRegistry = TypeRegistry.for(options.defaultNamespace);
42
+ this.compositeErrorRegistry = new TypeRegistry(options.defaultNamespace);
43
43
  for (const etr of options.errorTypeRegistries ?? []) {
44
44
  this.compositeErrorRegistry.copyFrom(etr);
45
45
  }
@@ -75,8 +75,9 @@ class HttpProtocol extends SerdeContext {
75
75
  }
76
76
  if (endpoint.headers) {
77
77
  for (const name in endpoint.headers) {
78
- if (!hasOwn(endpoint.headers, name))
78
+ if (!hasOwn(endpoint.headers, name)) {
79
79
  continue;
80
+ }
80
81
  request.headers[name] = endpoint.headers[name].join(", ");
81
82
  }
82
83
  }
@@ -92,8 +93,9 @@ class HttpProtocol extends SerdeContext {
92
93
  };
93
94
  if (endpoint.headers) {
94
95
  for (const name in endpoint.headers) {
95
- if (!hasOwn(endpoint.headers, name))
96
+ if (!hasOwn(endpoint.headers, name)) {
96
97
  continue;
98
+ }
97
99
  request.headers[name] = endpoint.headers[name];
98
100
  }
99
101
  }
@@ -134,6 +136,47 @@ class HttpProtocol extends SerdeContext {
134
136
  cfId: output.headers["x-amz-cf-id"],
135
137
  };
136
138
  }
139
+ resolveError(name, namespaces, registries) {
140
+ const defaultErrorSchema = [-3, "", "Error", 0, [], [], 0];
141
+ let schema;
142
+ for (const registry of registries) {
143
+ for (const ns of namespaces) {
144
+ try {
145
+ if (ns === "*") {
146
+ schema = registry.getSchema(name);
147
+ }
148
+ else {
149
+ schema = registry.getSchema(ns + "#" + name);
150
+ }
151
+ const errorCtor = registry.getErrorCtor(schema);
152
+ if (errorCtor) {
153
+ return [schema, errorCtor, "modeled"];
154
+ }
155
+ else {
156
+ const syntheticErrorSchema = registry.getBaseException();
157
+ if (syntheticErrorSchema) {
158
+ const syntheticErrorCtor = registry.getErrorCtor(syntheticErrorSchema);
159
+ if (syntheticErrorCtor) {
160
+ return [schema, syntheticErrorCtor, "synthetic"];
161
+ }
162
+ }
163
+ }
164
+ }
165
+ catch (ignored) {
166
+ }
167
+ }
168
+ }
169
+ for (const registry of registries) {
170
+ const syntheticErrorSchema = registry.getBaseException();
171
+ if (syntheticErrorSchema) {
172
+ const syntheticErrorCtor = registry.getErrorCtor(syntheticErrorSchema);
173
+ if (syntheticErrorCtor) {
174
+ return [syntheticErrorSchema, syntheticErrorCtor, "synthetic"];
175
+ }
176
+ }
177
+ }
178
+ return [defaultErrorSchema, Error, "native"];
179
+ }
137
180
  async serializeEventStream({ eventStream, requestSchema, initialRequest, }) {
138
181
  const eventStreamSerde = await this.loadEventStreamCapability();
139
182
  return eventStreamSerde.serializeEventStream({
@@ -162,13 +205,6 @@ class HttpProtocol extends SerdeContext {
162
205
  compositeErrorRegistry: this.compositeErrorRegistry,
163
206
  });
164
207
  }
165
- resolveEventStreamMarshaller(importedProvider) {
166
- const context = this.serdeContext;
167
- if (context.eventStreamMarshaller) {
168
- return context.eventStreamMarshaller;
169
- }
170
- return importedProvider(this.serdeContext);
171
- }
172
208
  getDefaultContentType() {
173
209
  throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
174
210
  }
@@ -182,6 +218,13 @@ class HttpProtocol extends SerdeContext {
182
218
  }
183
219
  return context.eventStreamMarshaller;
184
220
  }
221
+ resolveEventStreamMarshaller(importedProvider) {
222
+ const context = this.serdeContext;
223
+ if (context.eventStreamMarshaller) {
224
+ return context.eventStreamMarshaller;
225
+ }
226
+ return importedProvider(this.serdeContext);
227
+ }
185
228
  }
186
229
 
187
230
  class HttpBindingProtocol extends HttpProtocol {
@@ -273,8 +316,9 @@ class HttpBindingProtocol extends HttpProtocol {
273
316
  }
274
317
  else if (typeof memberTraits.httpPrefixHeaders === "string") {
275
318
  for (const key in inputMemberValue) {
276
- if (!hasOwn(inputMemberValue, key))
319
+ if (!hasOwn(inputMemberValue, key)) {
277
320
  continue;
321
+ }
278
322
  const val = inputMemberValue[key];
279
323
  const amalgam = memberTraits.httpPrefixHeaders + key;
280
324
  serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
@@ -321,8 +365,9 @@ class HttpBindingProtocol extends HttpProtocol {
321
365
  const traits = ns.getMergedTraits();
322
366
  if (traits.httpQueryParams) {
323
367
  for (const key in data) {
324
- if (!hasOwn(data, key))
368
+ if (!hasOwn(data, key)) {
325
369
  continue;
370
+ }
326
371
  if (!(key in query)) {
327
372
  const val = data[key];
328
373
  const valueSchema = ns.getValueSchema();
@@ -366,8 +411,9 @@ class HttpBindingProtocol extends HttpProtocol {
366
411
  throw new Error("@smithy/core/protocols - HTTP Protocol error handler failed to throw.");
367
412
  }
368
413
  for (const header in response.headers) {
369
- if (!hasOwn(response.headers, header))
414
+ if (!hasOwn(response.headers, header)) {
370
415
  continue;
416
+ }
371
417
  const value = response.headers[header];
372
418
  delete response.headers[header];
373
419
  response.headers[header.toLowerCase()] = value;
@@ -455,8 +501,9 @@ class HttpBindingProtocol extends HttpProtocol {
455
501
  else if (memberTraits.httpPrefixHeaders !== undefined) {
456
502
  dataObject[memberName] = {};
457
503
  for (const header in response.headers) {
458
- if (!hasOwn(response.headers, header))
504
+ if (!hasOwn(response.headers, header)) {
459
505
  continue;
506
+ }
460
507
  if (header.startsWith(memberTraits.httpPrefixHeaders)) {
461
508
  const value = response.headers[header];
462
509
  const valueSchema = memberSchema.getValueSchema();
@@ -533,7 +580,7 @@ class RpcProtocol extends HttpProtocol {
533
580
  const deserializer = this.deserializer;
534
581
  const ns = NormalizedSchema.of(operationSchema.output);
535
582
  const dataObject = {};
536
- if (response.statusCode >= 300) {
583
+ if (this.isErrorResponse(response.statusCode)) {
537
584
  const bytes = await collectBody(response.body, context);
538
585
  if (bytes.byteLength > 0) {
539
586
  Object.assign(dataObject, await deserializer.read(15, bytes));
@@ -542,8 +589,9 @@ class RpcProtocol extends HttpProtocol {
542
589
  throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
543
590
  }
544
591
  for (const header in response.headers) {
545
- if (!hasOwn(response.headers, header))
592
+ if (!hasOwn(response.headers, header)) {
546
593
  continue;
594
+ }
547
595
  const value = response.headers[header];
548
596
  delete response.headers[header];
549
597
  response.headers[header.toLowerCase()] = value;
@@ -565,6 +613,42 @@ class RpcProtocol extends HttpProtocol {
565
613
  dataObject.$metadata = this.deserializeMetadata(response);
566
614
  return dataObject;
567
615
  }
616
+ isErrorResponse(statusCode) {
617
+ return statusCode >= 300;
618
+ }
619
+ }
620
+
621
+ class AbstractRpcV2Protocol extends RpcProtocol {
622
+ constructor({ defaultNamespace, errorTypeRegistries, }) {
623
+ super({ defaultNamespace, errorTypeRegistries });
624
+ }
625
+ async serializeRequest(operationSchema, input, context) {
626
+ const request = await super.serializeRequest(operationSchema, input, context);
627
+ Object.assign(request.headers, {
628
+ "content-type": this.getDefaultContentType(),
629
+ "smithy-protocol": this.getSmithyProtocolHeaderValue(),
630
+ accept: this.getDefaultContentType(),
631
+ });
632
+ if (deref(operationSchema.input) === "unit") {
633
+ delete request.body;
634
+ delete request.headers["content-type"];
635
+ }
636
+ else {
637
+ this.applyEmptyBody(request);
638
+ }
639
+ const { service, operation } = getSmithyContext(context);
640
+ const path = `/service/${service}/operation/${operation}`;
641
+ if (request.path.endsWith("/")) {
642
+ request.path += path.slice(1);
643
+ }
644
+ else {
645
+ request.path += path;
646
+ }
647
+ return request;
648
+ }
649
+ isErrorResponse(statusCode) {
650
+ return statusCode !== 200;
651
+ }
568
652
  }
569
653
 
570
654
  const resolvedPath = (resolvedPath, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {
@@ -944,6 +1028,9 @@ const getHttpHandlerExtensionConfiguration = (runtimeConfig) => {
944
1028
  if (runtimeConfig.logger && runtimeConfig.logger.constructor?.name !== "NoOpLogger") {
945
1029
  runtimeConfig.requestHandler?.updateHttpClientConfig?.(Symbol.for("logger"), runtimeConfig.logger);
946
1030
  }
1031
+ if (runtimeConfig.defaultSocketTimeout) {
1032
+ runtimeConfig.requestHandler?.updateHttpClientConfig?.(Symbol.for("@smithy/defaultSocketTimeout"), runtimeConfig.defaultSocketTimeout);
1033
+ }
947
1034
  return {
948
1035
  setHttpHandler(handler) {
949
1036
  runtimeConfig.requestHandler = handler;
@@ -1032,6 +1119,1673 @@ function buildQueryString(query) {
1032
1119
  return parts.join("&");
1033
1120
  }
1034
1121
 
1122
+ class SerdeContextConfig {
1123
+ serdeContext;
1124
+ setSerdeContext(serdeContext) {
1125
+ this.serdeContext = serdeContext;
1126
+ }
1127
+ }
1128
+
1129
+ class UnionSerde {
1130
+ from;
1131
+ to;
1132
+ keys;
1133
+ constructor(from, to) {
1134
+ this.from = from;
1135
+ this.to = to;
1136
+ const keys = Object.keys(this.from);
1137
+ const set = new Set(keys);
1138
+ set.delete("__type");
1139
+ this.keys = set;
1140
+ }
1141
+ mark(key) {
1142
+ this.keys.delete(key);
1143
+ }
1144
+ hasUnknown() {
1145
+ return this.keys.size === 1 && Object.keys(this.to).length === 0;
1146
+ }
1147
+ writeUnknown() {
1148
+ if (this.hasUnknown()) {
1149
+ const k = this.keys.values().next().value;
1150
+ const v = this.from[k];
1151
+ this.to.$unknown = [k, v];
1152
+ }
1153
+ }
1154
+ }
1155
+
1156
+ let canParseBuffer;
1157
+ function detectBufferParsing() {
1158
+ if (canParseBuffer === undefined) {
1159
+ try {
1160
+ if (typeof Buffer !== "function") {
1161
+ canParseBuffer = false;
1162
+ }
1163
+ else {
1164
+ const result = JSON.parse(Buffer.from([0x7b, 0x7d]));
1165
+ canParseBuffer = result !== null && typeof result === "object";
1166
+ }
1167
+ }
1168
+ catch {
1169
+ canParseBuffer = false;
1170
+ }
1171
+ }
1172
+ return canParseBuffer;
1173
+ }
1174
+
1175
+ function jsonReviver(key, value, context) {
1176
+ if (context?.source) {
1177
+ const numericString = context.source;
1178
+ if (typeof value === "number") {
1179
+ const inSafeRange = value <= Number.MAX_SAFE_INTEGER && value >= Number.MIN_SAFE_INTEGER;
1180
+ if (inSafeRange) {
1181
+ if (isRepresentable(numericString, value)) {
1182
+ return value;
1183
+ }
1184
+ return new NumericValue(numericString, "bigDecimal");
1185
+ }
1186
+ else {
1187
+ if (isFractionalBigNumeric(numericString)) {
1188
+ return new NumericValue(numericString, "bigDecimal");
1189
+ }
1190
+ if (/[eE]/.test(numericString)) {
1191
+ return expandExponentToBigInt(numericString);
1192
+ }
1193
+ return BigInt(numericString);
1194
+ }
1195
+ }
1196
+ }
1197
+ return value;
1198
+ }
1199
+ function isFractionalBigNumeric(s) {
1200
+ const dotIndex = s.indexOf(".");
1201
+ if (dotIndex === -1) {
1202
+ return false;
1203
+ }
1204
+ const eIndex = s.search(/[eE]/);
1205
+ if (eIndex === -1) {
1206
+ return true;
1207
+ }
1208
+ const fracDigits = eIndex - dotIndex - 1;
1209
+ const exp = parseInt(s.slice(eIndex + 1), 10);
1210
+ return exp < fracDigits;
1211
+ }
1212
+ function isRepresentable(numericString, value) {
1213
+ if (numericString === String(value)) {
1214
+ return true;
1215
+ }
1216
+ if (Object.is(value, -0)) {
1217
+ return true;
1218
+ }
1219
+ if (/[eE]/.test(numericString)) {
1220
+ return expandToDecimal(numericString) === expandToDecimal(String(value));
1221
+ }
1222
+ const normalized = numericString.replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
1223
+ const canonical = String(value);
1224
+ if (normalized === canonical) {
1225
+ return true;
1226
+ }
1227
+ if (/[eE]/.test(canonical)) {
1228
+ return normalized === expandToDecimal(canonical);
1229
+ }
1230
+ return false;
1231
+ }
1232
+ function expandToDecimal(s) {
1233
+ const negative = s.startsWith("-");
1234
+ const abs = negative ? s.slice(1) : s;
1235
+ const eIndex = abs.search(/[eE]/);
1236
+ let result;
1237
+ if (eIndex === -1) {
1238
+ result = abs;
1239
+ }
1240
+ else {
1241
+ const exp = parseInt(abs.slice(eIndex + 1), 10);
1242
+ const mantissa = abs.slice(0, eIndex);
1243
+ const dotIndex = mantissa.indexOf(".");
1244
+ let digits;
1245
+ let intLen;
1246
+ if (dotIndex === -1) {
1247
+ digits = mantissa;
1248
+ intLen = mantissa.length;
1249
+ }
1250
+ else {
1251
+ digits = mantissa.slice(0, dotIndex) + mantissa.slice(dotIndex + 1);
1252
+ intLen = dotIndex;
1253
+ }
1254
+ digits = digits.replace(/0+$/, "") || "0";
1255
+ const newDotPos = intLen + exp;
1256
+ if (digits === "0") {
1257
+ result = "0";
1258
+ }
1259
+ else if (newDotPos <= 0) {
1260
+ result = "0." + "0".repeat(-newDotPos) + digits;
1261
+ }
1262
+ else if (newDotPos >= digits.length) {
1263
+ result = digits + "0".repeat(newDotPos - digits.length);
1264
+ }
1265
+ else {
1266
+ result = digits.slice(0, newDotPos) + "." + digits.slice(newDotPos);
1267
+ }
1268
+ }
1269
+ if (result.includes(".")) {
1270
+ result = result.replace(/(\.\d*?)0+$/, "$1").replace(/\.$/, "");
1271
+ }
1272
+ return (negative ? "-" : "") + result;
1273
+ }
1274
+ function expandExponentToBigInt(s) {
1275
+ const eIndex = s.search(/[eE]/);
1276
+ const exp = parseInt(s.slice(eIndex + 1), 10);
1277
+ const negative = s.startsWith("-");
1278
+ const mantissa = s.slice(negative ? 1 : 0, eIndex);
1279
+ const dotIndex = mantissa.indexOf(".");
1280
+ let digits;
1281
+ let shift;
1282
+ if (dotIndex === -1) {
1283
+ digits = mantissa;
1284
+ shift = exp;
1285
+ }
1286
+ else {
1287
+ digits = mantissa.slice(0, dotIndex) + mantissa.slice(dotIndex + 1);
1288
+ const fracDigits = mantissa.length - dotIndex - 1;
1289
+ shift = exp - fracDigits;
1290
+ }
1291
+ digits = digits.replace(/0+$/, "") || "0";
1292
+ const result = BigInt(digits) * 10n ** BigInt(shift + (mantissa.replace(".", "").length - digits.length));
1293
+ return negative ? -result : result;
1294
+ }
1295
+
1296
+ const REVIVER_SYMBOL = Symbol.for("@aws-sdk/reviver");
1297
+ function needsReviver(schema) {
1298
+ const ns = NormalizedSchema.of(schema);
1299
+ const raw = ns.getSchema();
1300
+ if (Array.isArray(raw) && ns.isStructSchema()) {
1301
+ if (REVIVER_SYMBOL in raw) {
1302
+ return raw[REVIVER_SYMBOL];
1303
+ }
1304
+ const result = _check(ns, new Set());
1305
+ raw[REVIVER_SYMBOL] = result;
1306
+ return result;
1307
+ }
1308
+ return _check(ns, new Set());
1309
+ }
1310
+ function _check(ns, seen) {
1311
+ const raw = ns.getSchema();
1312
+ if (seen.has(raw)) {
1313
+ return false;
1314
+ }
1315
+ seen.add(raw);
1316
+ if (ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {
1317
+ return true;
1318
+ }
1319
+ if (ns.isStructSchema()) {
1320
+ for (const [, memberSchema] of ns.structIterator()) {
1321
+ if (_check(memberSchema, seen)) {
1322
+ return true;
1323
+ }
1324
+ }
1325
+ }
1326
+ else if (ns.isListSchema() || ns.isMapSchema()) {
1327
+ if (_check(ns.getValueSchema(), seen)) {
1328
+ return true;
1329
+ }
1330
+ }
1331
+ else if (ns.isDocumentSchema()) {
1332
+ return true;
1333
+ }
1334
+ return false;
1335
+ }
1336
+
1337
+ const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => (context?.utf8Encoder ?? toUtf8)(body));
1338
+
1339
+ async function parseJsonBody(streamBody, context, schema) {
1340
+ let parsingInput;
1341
+ if (detectBufferParsing() && typeof streamBody?.[Symbol.asyncIterator] === "function") {
1342
+ const buffer = await collectBody(streamBody, context);
1343
+ if (typeof Buffer === "function") {
1344
+ if (Buffer.isBuffer(buffer)) {
1345
+ parsingInput = buffer;
1346
+ }
1347
+ else {
1348
+ parsingInput = Buffer.from(buffer.buffer, buffer.byteOffset, buffer.byteLength);
1349
+ }
1350
+ }
1351
+ }
1352
+ if (!parsingInput) {
1353
+ parsingInput = await collectBodyString(streamBody, context);
1354
+ }
1355
+ if (parsingInput.length === 0) {
1356
+ return {};
1357
+ }
1358
+ const reviver = schema && needsReviver(schema) ? jsonReviver : undefined;
1359
+ try {
1360
+ return JSON.parse(parsingInput, reviver);
1361
+ }
1362
+ catch (e) {
1363
+ if (e?.name === "SyntaxError") {
1364
+ Object.defineProperty(e, "$responseBodyText", {
1365
+ value: typeof parsingInput === "string" ? parsingInput : parsingInput.toString("utf8"),
1366
+ });
1367
+ }
1368
+ throw e;
1369
+ }
1370
+ }
1371
+ const parseJsonErrorBody = async (errorBody, context) => {
1372
+ const value = await parseJsonBody(errorBody, context);
1373
+ value.message = value.message ?? value.Message;
1374
+ return value;
1375
+ };
1376
+ const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1377
+ const sanitizeErrorCode = (rawValue) => {
1378
+ let cleanValue = rawValue;
1379
+ if (typeof cleanValue === "number") {
1380
+ cleanValue = cleanValue.toString();
1381
+ }
1382
+ if (cleanValue.indexOf(",") >= 0) {
1383
+ cleanValue = cleanValue.split(",")[0];
1384
+ }
1385
+ if (cleanValue.indexOf(":") >= 0) {
1386
+ cleanValue = cleanValue.split(":")[0];
1387
+ }
1388
+ if (cleanValue.indexOf("#") >= 0) {
1389
+ cleanValue = cleanValue.split("#")[1];
1390
+ }
1391
+ return cleanValue;
1392
+ };
1393
+ const loadRestJsonErrorCode = (output, data) => {
1394
+ return loadErrorCode(output, data, ["header", "code", "type"]);
1395
+ };
1396
+ const loadJsonRpcErrorCode = (output, data, queryCompat = false) => {
1397
+ return loadErrorCode(output, data, queryCompat ? ["code", "header", "type"] : ["type", "code", "header"]);
1398
+ };
1399
+ const loadSmithyRpcV2JsonErrorCode = (output, data) => {
1400
+ if (data?.__type !== undefined) {
1401
+ let cleanValue = data.__type;
1402
+ if (typeof cleanValue === "number") {
1403
+ cleanValue = cleanValue.toString();
1404
+ }
1405
+ if (cleanValue.indexOf(",") >= 0) {
1406
+ cleanValue = cleanValue.split(",")[0];
1407
+ }
1408
+ if (cleanValue.indexOf(":") >= 0) {
1409
+ cleanValue = cleanValue.split(":")[0];
1410
+ }
1411
+ return cleanValue;
1412
+ }
1413
+ };
1414
+ const loadErrorCode = ({ headers }, data, order) => {
1415
+ while (order.length > 0) {
1416
+ const location = order.shift();
1417
+ switch (location) {
1418
+ case "header":
1419
+ const headerKey = findKey(headers ?? {}, "x-amzn-errortype");
1420
+ if (headerKey !== undefined) {
1421
+ return sanitizeErrorCode(headers[headerKey]);
1422
+ }
1423
+ break;
1424
+ case "code":
1425
+ const codeKey = findKey(data ?? {}, "code");
1426
+ if (codeKey && data[codeKey] !== undefined) {
1427
+ return sanitizeErrorCode(data[codeKey]);
1428
+ }
1429
+ break;
1430
+ case "type":
1431
+ if (data?.__type !== undefined) {
1432
+ return sanitizeErrorCode(data.__type);
1433
+ }
1434
+ break;
1435
+ }
1436
+ }
1437
+ };
1438
+
1439
+ class JsonShapeDeserializer2 extends SerdeContextConfig {
1440
+ settings;
1441
+ constructor(settings) {
1442
+ super();
1443
+ this.settings = settings;
1444
+ }
1445
+ async read(schema, data) {
1446
+ const reviver = needsReviver(schema) ? jsonReviver : undefined;
1447
+ let parsed;
1448
+ if (typeof data === "string") {
1449
+ if (data.length === 0) {
1450
+ return {};
1451
+ }
1452
+ parsed = JSON.parse(data, reviver);
1453
+ }
1454
+ else if (data instanceof Uint8Array && detectBufferParsing()) {
1455
+ if (data.byteLength === 0) {
1456
+ return {};
1457
+ }
1458
+ const buf = Buffer.isBuffer(data) ? data : Buffer.from(data.buffer, data.byteOffset, data.byteLength);
1459
+ parsed = JSON.parse(buf, reviver);
1460
+ }
1461
+ else {
1462
+ parsed = await parseJsonBody(data, this.serdeContext, schema);
1463
+ }
1464
+ return this._read(schema, parsed);
1465
+ }
1466
+ readObject(schema, data) {
1467
+ return this._read(schema, data);
1468
+ }
1469
+ _read(schema, value) {
1470
+ const isObject = value !== null && typeof value === "object";
1471
+ const ns = NormalizedSchema.of(schema);
1472
+ if (isObject) {
1473
+ if (ns.isStructSchema()) {
1474
+ return this._readStruct(ns, value);
1475
+ }
1476
+ if (Array.isArray(value) && ns.isListSchema()) {
1477
+ const listMember = ns.getValueSchema();
1478
+ if (this.needsTransform(listMember)) {
1479
+ for (let i = 0; i < value.length; ++i) {
1480
+ value[i] = this._read(listMember, value[i]);
1481
+ }
1482
+ }
1483
+ return value;
1484
+ }
1485
+ if (ns.isMapSchema()) {
1486
+ const mapMember = ns.getValueSchema();
1487
+ const map = value;
1488
+ if (this.needsTransform(mapMember)) {
1489
+ for (const k in map) {
1490
+ if (!hasOwn(map, k)) {
1491
+ continue;
1492
+ }
1493
+ if (k === "__proto__") {
1494
+ writeKey(map);
1495
+ }
1496
+ map[k] = this._read(mapMember, map[k]);
1497
+ }
1498
+ }
1499
+ return map;
1500
+ }
1501
+ }
1502
+ if (ns.isBlobSchema() && typeof value === "string") {
1503
+ return fromBase64(value);
1504
+ }
1505
+ const mediaType = ns.getMergedTraits().mediaType;
1506
+ if (ns.isStringSchema() && typeof value === "string" && mediaType) {
1507
+ const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
1508
+ if (isJson) {
1509
+ return LazyJsonString.from(value);
1510
+ }
1511
+ return value;
1512
+ }
1513
+ if (ns.isTimestampSchema() && value != null) {
1514
+ const format = determineTimestampFormat(ns, this.settings);
1515
+ switch (format) {
1516
+ case 5:
1517
+ return parseRfc3339DateTimeWithOffset(value);
1518
+ case 6:
1519
+ return parseRfc7231DateTime(value);
1520
+ case 7:
1521
+ return parseEpochTimestamp(value);
1522
+ default:
1523
+ console.warn("Missing timestamp format, parsing value with Date constructor:", value);
1524
+ return new Date(value);
1525
+ }
1526
+ }
1527
+ if (ns.isBigIntegerSchema() && (typeof value === "number" || typeof value === "string")) {
1528
+ return BigInt(value);
1529
+ }
1530
+ if (ns.isBigDecimalSchema() && value != undefined) {
1531
+ if (value instanceof NumericValue) {
1532
+ return value;
1533
+ }
1534
+ const untyped = value;
1535
+ if (untyped.type === "bigDecimal" && "string" in untyped) {
1536
+ return new NumericValue(untyped.string, untyped.type);
1537
+ }
1538
+ return new NumericValue(String(value), "bigDecimal");
1539
+ }
1540
+ if (ns.isNumericSchema() && typeof value === "string") {
1541
+ switch (value) {
1542
+ case "Infinity":
1543
+ return Infinity;
1544
+ case "-Infinity":
1545
+ return -Infinity;
1546
+ case "NaN":
1547
+ return NaN;
1548
+ }
1549
+ return value;
1550
+ }
1551
+ if (ns.isDocumentSchema()) {
1552
+ if (isObject) {
1553
+ if (Array.isArray(value)) {
1554
+ for (let i = 0; i < value.length; ++i) {
1555
+ const v = value[i];
1556
+ if (!(v instanceof NumericValue)) {
1557
+ value[i] = this._read(ns, v);
1558
+ }
1559
+ }
1560
+ }
1561
+ else {
1562
+ const doc = value;
1563
+ for (const k in doc) {
1564
+ if (!hasOwn(doc, k)) {
1565
+ continue;
1566
+ }
1567
+ if (k === "__proto__") {
1568
+ writeKey(doc);
1569
+ }
1570
+ const v = doc[k];
1571
+ if (!(v instanceof NumericValue)) {
1572
+ doc[k] = this._read(ns, v);
1573
+ }
1574
+ }
1575
+ }
1576
+ }
1577
+ }
1578
+ return value;
1579
+ }
1580
+ _readStruct(ns, record) {
1581
+ const union = ns.isUnionSchema();
1582
+ const out = {};
1583
+ let nameMap;
1584
+ const hasType = typeof record.__type === "string";
1585
+ const { jsonName } = this.settings;
1586
+ if (jsonName && hasType) {
1587
+ nameMap = {};
1588
+ }
1589
+ let unionSerde;
1590
+ if (union) {
1591
+ unionSerde = new UnionSerde(record, out);
1592
+ }
1593
+ for (const [memberName, memberSchema] of ns.structIterator()) {
1594
+ let fromKey = memberName;
1595
+ if (jsonName) {
1596
+ fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey;
1597
+ if (hasType) {
1598
+ nameMap[fromKey] = memberName;
1599
+ }
1600
+ }
1601
+ if (union) {
1602
+ unionSerde.mark(fromKey);
1603
+ }
1604
+ if (record[fromKey] != null) {
1605
+ out[memberName] = this._read(memberSchema, record[fromKey]);
1606
+ }
1607
+ }
1608
+ if (union) {
1609
+ unionSerde.writeUnknown();
1610
+ }
1611
+ else if (hasType) {
1612
+ for (const k in record) {
1613
+ if (!hasOwn(record, k)) {
1614
+ continue;
1615
+ }
1616
+ const v = record[k];
1617
+ const t = jsonName ? (nameMap[k] ?? k) : k;
1618
+ if (!(t in out)) {
1619
+ out[t] = v;
1620
+ }
1621
+ }
1622
+ }
1623
+ return out;
1624
+ }
1625
+ needsTransform(ns) {
1626
+ if (ns.isBlobSchema() ||
1627
+ ns.isTimestampSchema() ||
1628
+ ns.isBigIntegerSchema() ||
1629
+ ns.isBigDecimalSchema() ||
1630
+ ns.isNumericSchema()) {
1631
+ return true;
1632
+ }
1633
+ if (ns.isDocumentSchema() || ns.isStructSchema() || ns.isListSchema() || ns.isMapSchema()) {
1634
+ return true;
1635
+ }
1636
+ if (ns.isStringSchema() && ns.getMergedTraits().mediaType) {
1637
+ return true;
1638
+ }
1639
+ return false;
1640
+ }
1641
+ }
1642
+
1643
+ class JsonBytesStringAdapter extends Uint8Array {
1644
+ string = null;
1645
+ static allocUnsafe(bytes) {
1646
+ if (typeof Buffer === "function") {
1647
+ const buffer = Buffer.allocUnsafe(bytes);
1648
+ return new JsonBytesStringAdapter(buffer.buffer, buffer.byteOffset, buffer.byteLength);
1649
+ }
1650
+ return new JsonBytesStringAdapter(bytes);
1651
+ }
1652
+ toString() {
1653
+ return this.s();
1654
+ }
1655
+ valueOf() {
1656
+ return this.s();
1657
+ }
1658
+ includes(searchString, position) {
1659
+ if (typeof searchString === "string") {
1660
+ return this.s().includes(searchString, position);
1661
+ }
1662
+ return Uint8Array.prototype.includes.call(this, searchString, position);
1663
+ }
1664
+ indexOf(searchString, position) {
1665
+ if (typeof searchString === "string") {
1666
+ return this.s().indexOf(searchString, position);
1667
+ }
1668
+ return Uint8Array.prototype.indexOf.call(this, searchString, position);
1669
+ }
1670
+ lastIndexOf(searchString, position) {
1671
+ if (typeof searchString === "string") {
1672
+ return this.s().lastIndexOf(searchString, position);
1673
+ }
1674
+ const fn = Uint8Array.prototype.lastIndexOf;
1675
+ if (position !== undefined) {
1676
+ return fn.call(this, searchString, position);
1677
+ }
1678
+ return fn.call(this, searchString);
1679
+ }
1680
+ startsWith(searchString, position) {
1681
+ return this.s().startsWith(searchString, position);
1682
+ }
1683
+ endsWith(searchString, endPosition) {
1684
+ return this.s().endsWith(searchString, endPosition);
1685
+ }
1686
+ match(regexp) {
1687
+ return this.s().match(regexp);
1688
+ }
1689
+ replace(searchValue, replaceValue) {
1690
+ return this.s().replace(searchValue, replaceValue);
1691
+ }
1692
+ search(regexp) {
1693
+ return this.s().search(regexp);
1694
+ }
1695
+ split(separator, limit) {
1696
+ return this.s().split(separator, limit);
1697
+ }
1698
+ substring(start, end) {
1699
+ return this.s().substring(start, end);
1700
+ }
1701
+ trim() {
1702
+ return this.s().trim();
1703
+ }
1704
+ trimStart() {
1705
+ return this.s().trimStart();
1706
+ }
1707
+ trimEnd() {
1708
+ return this.s().trimEnd();
1709
+ }
1710
+ charAt(pos) {
1711
+ return this.s().charAt(pos);
1712
+ }
1713
+ charCodeAt(index) {
1714
+ return this.s().charCodeAt(index);
1715
+ }
1716
+ padStart(maxLength, fillString) {
1717
+ return this.s().padStart(maxLength, fillString);
1718
+ }
1719
+ padEnd(maxLength, fillString) {
1720
+ return this.s().padEnd(maxLength, fillString);
1721
+ }
1722
+ repeat(count) {
1723
+ return this.s().repeat(count);
1724
+ }
1725
+ toUpperCase() {
1726
+ return this.s().toUpperCase();
1727
+ }
1728
+ toLowerCase() {
1729
+ return this.s().toLowerCase();
1730
+ }
1731
+ s() {
1732
+ if (this.string == null) {
1733
+ const n = Date.now();
1734
+ if (n > warned + 60_000) {
1735
+ console.warn("@aws-sdk/core/protocols - WARN - JsonCodec2: you have called a string method on a Uint8Array request body. " +
1736
+ "It has been automatically converted to string. In a future version this will throw an error.");
1737
+ warned = n;
1738
+ }
1739
+ this.string = toUtf8(this);
1740
+ }
1741
+ return this.string;
1742
+ }
1743
+ }
1744
+ var warned = 0;
1745
+
1746
+ const encoder = new TextEncoder();
1747
+ const OPEN_BRACE = 0x7b;
1748
+ const CLOSE_BRACE = 0x7d;
1749
+ const OPEN_BRACKET = 0x5b;
1750
+ const CLOSE_BRACKET = 0x5d;
1751
+ const QUOTE = 0x22;
1752
+ const COLON = 0x3a;
1753
+ const COMMA = 0x2c;
1754
+ const BACKSLASH = 0x5c;
1755
+ const TRUE = new Uint8Array([0x74, 0x72, 0x75, 0x65]);
1756
+ const FALSE = new Uint8Array([0x66, 0x61, 0x6c, 0x73, 0x65]);
1757
+ const NULL = new Uint8Array([0x6e, 0x75, 0x6c, 0x6c]);
1758
+ const ESCAPE_TABLE = new Array(128).fill(null);
1759
+ ESCAPE_TABLE[0x08] = "b";
1760
+ ESCAPE_TABLE[0x09] = "t";
1761
+ ESCAPE_TABLE[0x0a] = "n";
1762
+ ESCAPE_TABLE[0x0c] = "f";
1763
+ ESCAPE_TABLE[0x0d] = "r";
1764
+ ESCAPE_TABLE[0x22] = '"';
1765
+ ESCAPE_TABLE[0x5c] = "\\";
1766
+ for (let i = 0; i < 0x20; i++) {
1767
+ if (ESCAPE_TABLE[i] === null) {
1768
+ ESCAPE_TABLE[i] = "u00" + i.toString(16).padStart(2, "0");
1769
+ }
1770
+ }
1771
+ const INITIAL_BUFFER_SIZE = 2048;
1772
+ function alloc(size) {
1773
+ return JsonBytesStringAdapter.allocUnsafe(size);
1774
+ }
1775
+ class JsonShapeSerializer2 extends SerdeContextConfig {
1776
+ settings;
1777
+ json;
1778
+ i = 0;
1779
+ rootSchema;
1780
+ rawValue;
1781
+ passthrough = false;
1782
+ constructor(settings) {
1783
+ super();
1784
+ this.settings = settings;
1785
+ this.json = alloc(INITIAL_BUFFER_SIZE);
1786
+ }
1787
+ write(schema, value) {
1788
+ this.i = 0;
1789
+ this.rawValue = value;
1790
+ this.rootSchema = NormalizedSchema.of(schema);
1791
+ this.passthrough = this.rootSchema.isBlobSchema() || this.rootSchema.isStringSchema();
1792
+ if (!this.passthrough) {
1793
+ this.writeValue(this.rootSchema, value, undefined);
1794
+ }
1795
+ }
1796
+ writeDiscriminatedDocument(schema, value) {
1797
+ this.i = 0;
1798
+ this.rootSchema = NormalizedSchema.of(schema);
1799
+ const ns = this.rootSchema;
1800
+ if (ns.isStructSchema() && value != null && typeof value === "object") {
1801
+ this.writeValue(ns, value, undefined);
1802
+ const prefix = `"__type":"${ns.getName(true) ?? "Unknown"}",`;
1803
+ const z = prefix.length;
1804
+ this.ensure(z);
1805
+ this.json.copyWithin(1 + z, 1, this.i);
1806
+ encoder.encodeInto(prefix, this.json.subarray(1));
1807
+ this.i += z;
1808
+ }
1809
+ else {
1810
+ this.writeValue(ns, value, undefined);
1811
+ }
1812
+ }
1813
+ flush() {
1814
+ this.rootSchema = undefined;
1815
+ const finalPosition = this.i;
1816
+ this.i = 0;
1817
+ const raw = this.rawValue;
1818
+ this.rawValue = undefined;
1819
+ if (finalPosition === 0) {
1820
+ return raw;
1821
+ }
1822
+ const result = this.json.subarray(0, finalPosition);
1823
+ this.json = alloc(INITIAL_BUFFER_SIZE);
1824
+ return result;
1825
+ }
1826
+ ensure(byteCount) {
1827
+ const { i, json } = this;
1828
+ if (i + byteCount > json.length) {
1829
+ let newSize = json.length * 2;
1830
+ while (newSize < i + byteCount) {
1831
+ newSize *= 2;
1832
+ }
1833
+ const next = alloc(newSize);
1834
+ next.set(this.json);
1835
+ this.json = next;
1836
+ }
1837
+ }
1838
+ writeAscii(s) {
1839
+ const z = s.length;
1840
+ this.ensure(z);
1841
+ let { i, json } = this;
1842
+ for (let j = 0; j < z; ++j) {
1843
+ json[i] = s.charCodeAt(j);
1844
+ i += 1;
1845
+ }
1846
+ this.i = i;
1847
+ }
1848
+ writeAsciiQuoted(s) {
1849
+ const z = s.length;
1850
+ this.ensure(z + 4);
1851
+ let { json, i } = this;
1852
+ json[i++] = QUOTE;
1853
+ for (let j = 0; j < z; ++j) {
1854
+ json[i++] = s.charCodeAt(j);
1855
+ }
1856
+ json[i++] = QUOTE;
1857
+ this.i = i;
1858
+ }
1859
+ writeJsonString(s) {
1860
+ const z = s.length;
1861
+ this.ensure(z * 3 + 2);
1862
+ this.json[this.i++] = QUOTE;
1863
+ for (let j = 0; j < z; ++j) {
1864
+ const c = s.charCodeAt(j);
1865
+ if (c > 0x22 && c < 0x5c) {
1866
+ this.json[this.i++] = c;
1867
+ }
1868
+ else if (c < 0x80) {
1869
+ const esc = ESCAPE_TABLE[c];
1870
+ if (esc !== null) {
1871
+ this.ensure(esc.length + 1 + (z - j - 1) * 3 + 1);
1872
+ this.json[this.i++] = BACKSLASH;
1873
+ for (let k = 0; k < esc.length; k++) {
1874
+ this.json[this.i++] = esc.charCodeAt(k);
1875
+ }
1876
+ }
1877
+ else {
1878
+ this.json[this.i++] = c;
1879
+ }
1880
+ }
1881
+ else if (c >= 0xd800 && c <= 0xdbff) {
1882
+ const next = j + 1 < z ? s.charCodeAt(j + 1) : 0;
1883
+ if (next >= 0xdc00 && next <= 0xdfff) {
1884
+ this.ensure(4);
1885
+ const { written } = encoder.encodeInto(s.substring(j, j + 2), this.json.subarray(this.i));
1886
+ this.i += written;
1887
+ ++j;
1888
+ }
1889
+ else {
1890
+ this.ensure(6 + (z - j - 1) * 3 + 1);
1891
+ this.writeUnicodeEscape(c);
1892
+ }
1893
+ }
1894
+ else if (c >= 0xdc00 && c <= 0xdfff) {
1895
+ this.ensure(6 + (z - j - 1) * 3 + 1);
1896
+ this.writeUnicodeEscape(c);
1897
+ }
1898
+ else {
1899
+ let { i, json } = this;
1900
+ if (c < 0x800) {
1901
+ json[i++] = 0xc0 | (c >> 6);
1902
+ json[i++] = 0x80 | (c & 0x3f);
1903
+ }
1904
+ else {
1905
+ json[i++] = 0xe0 | (c >> 12);
1906
+ json[i++] = 0x80 | ((c >> 6) & 0x3f);
1907
+ json[i++] = 0x80 | (c & 0x3f);
1908
+ }
1909
+ this.i = i;
1910
+ }
1911
+ }
1912
+ this.json[this.i++] = QUOTE;
1913
+ }
1914
+ writeUnicodeEscape(code) {
1915
+ let { json, i } = this;
1916
+ json[i++] = BACKSLASH;
1917
+ json[i++] = 0x75;
1918
+ const hex = code.toString(16).padStart(4, "0");
1919
+ for (let j = 0; j < 4; ++j) {
1920
+ json[i++] = hex.charCodeAt(j);
1921
+ }
1922
+ this.i = i;
1923
+ }
1924
+ static B64 = (() => {
1925
+ const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
1926
+ const table = new Uint8Array(64);
1927
+ for (let i = 0; i < 64; ++i) {
1928
+ table[i] = chars.charCodeAt(i);
1929
+ }
1930
+ return table;
1931
+ })();
1932
+ writeBase64(data) {
1933
+ const b64Len = Math.ceil(data.length / 3) * 4;
1934
+ this.ensure(b64Len + 2);
1935
+ const json = this.json;
1936
+ const B64 = JsonShapeSerializer2.B64;
1937
+ let i = this.i;
1938
+ json[i++] = QUOTE;
1939
+ const len = data.length;
1940
+ const remainder = len % 3;
1941
+ const mainLen = len - remainder;
1942
+ for (let j = 0; j < mainLen; j += 3) {
1943
+ const a = data[j];
1944
+ const b = data[j + 1];
1945
+ const c = data[j + 2];
1946
+ json[i++] = B64[a >> 2];
1947
+ json[i++] = B64[((a & 0x03) << 4) | (b >> 4)];
1948
+ json[i++] = B64[((b & 0x0f) << 2) | (c >> 6)];
1949
+ json[i++] = B64[c & 0x3f];
1950
+ }
1951
+ if (remainder === 2) {
1952
+ const a = data[mainLen];
1953
+ const b = data[mainLen + 1];
1954
+ json[i++] = B64[a >> 2];
1955
+ json[i++] = B64[((a & 0x03) << 4) | (b >> 4)];
1956
+ json[i++] = B64[(b & 0x0f) << 2];
1957
+ json[i++] = 0x3d;
1958
+ }
1959
+ else if (remainder === 1) {
1960
+ const a = data[mainLen];
1961
+ json[i++] = B64[a >> 2];
1962
+ json[i++] = B64[(a & 0x03) << 4];
1963
+ json[i++] = 0x3d;
1964
+ json[i++] = 0x3d;
1965
+ }
1966
+ json[i++] = QUOTE;
1967
+ this.i = i;
1968
+ }
1969
+ writeValue(schema, value, container) {
1970
+ if (value == null) {
1971
+ if (container?.isStructSchema()) {
1972
+ if (value === undefined) {
1973
+ const ns = NormalizedSchema.of(schema);
1974
+ if (ns.isIdempotencyToken()) {
1975
+ this.writeAsciiQuoted(generateIdempotencyToken());
1976
+ return;
1977
+ }
1978
+ }
1979
+ return;
1980
+ }
1981
+ this.ensure(4);
1982
+ this.json.set(NULL, this.i);
1983
+ this.i += 4;
1984
+ return;
1985
+ }
1986
+ const ns = NormalizedSchema.of(schema);
1987
+ const isObject = typeof value === "object";
1988
+ if (ns.isStringSchema()) {
1989
+ const mediaType = ns.getMergedTraits().mediaType;
1990
+ if (mediaType) {
1991
+ const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
1992
+ if (isJson) {
1993
+ this.writeJsonString(LazyJsonString.from(value).toString());
1994
+ return;
1995
+ }
1996
+ }
1997
+ }
1998
+ if (this.settings.bigNumberAsString && value != null && (ns.isBigIntegerSchema() || ns.isBigDecimalSchema())) {
1999
+ const asString = value instanceof NumericValue ? value.string : String(value);
2000
+ this.writeAsciiQuoted(asString);
2001
+ return;
2002
+ }
2003
+ if (isObject) {
2004
+ if (ns.isStructSchema()) {
2005
+ this.writeStruct(ns, value);
2006
+ return;
2007
+ }
2008
+ if (Array.isArray(value) && (ns.isListSchema() || ns.isDocumentSchema())) {
2009
+ this.writeList(ns, value, ns.isDocumentSchema());
2010
+ return;
2011
+ }
2012
+ if (ns.isMapSchema()) {
2013
+ this.writeMap(ns, value, false);
2014
+ return;
2015
+ }
2016
+ if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) {
2017
+ this.writeBase64(value);
2018
+ return;
2019
+ }
2020
+ if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {
2021
+ this.writeTimestamp(ns, value);
2022
+ return;
2023
+ }
2024
+ if (value instanceof NumericValue) {
2025
+ this.writeAscii(value.string);
2026
+ return;
2027
+ }
2028
+ if (ns.isDocumentSchema()) {
2029
+ if (Array.isArray(value)) {
2030
+ this.writeList(ns, value, true);
2031
+ }
2032
+ else {
2033
+ this.writeMap(ns, value, true);
2034
+ }
2035
+ return;
2036
+ }
2037
+ const json = JSON.stringify(value);
2038
+ this.writeAscii(json);
2039
+ return;
2040
+ }
2041
+ if (typeof value === "string") {
2042
+ if (ns.isBlobSchema()) {
2043
+ const b64 = (this.serdeContext?.base64Encoder ?? toBase64)(value);
2044
+ this.writeAsciiQuoted(b64);
2045
+ return;
2046
+ }
2047
+ this.writeJsonString(value);
2048
+ return;
2049
+ }
2050
+ if (typeof value === "number") {
2051
+ if (Math.abs(value) === Infinity || Number.isNaN(value)) {
2052
+ this.writeAsciiQuoted(String(value));
2053
+ return;
2054
+ }
2055
+ const numStr = String(value);
2056
+ this.writeAscii(numStr);
2057
+ return;
2058
+ }
2059
+ if (typeof value === "boolean") {
2060
+ this.ensure(5);
2061
+ let { i, json } = this;
2062
+ if (value) {
2063
+ json.set(TRUE, i);
2064
+ i += 4;
2065
+ }
2066
+ else {
2067
+ json.set(FALSE, i);
2068
+ i += 5;
2069
+ }
2070
+ this.i = i;
2071
+ return;
2072
+ }
2073
+ if (typeof value === "bigint") {
2074
+ this.writeAscii(value.toString());
2075
+ return;
2076
+ }
2077
+ this.writeAscii(String(value));
2078
+ }
2079
+ writeStruct(ns, value) {
2080
+ this.ensure(2);
2081
+ this.json[this.i++] = OPEN_BRACE;
2082
+ let wroteAny = false;
2083
+ const hasType = typeof value.__type === "string";
2084
+ let writtenKeys;
2085
+ if (hasType) {
2086
+ writtenKeys = new Set();
2087
+ }
2088
+ for (const [memberName, memberSchema] of ns.structIterator()) {
2089
+ const item = value[memberName];
2090
+ if (item == null && !memberSchema.isIdempotencyToken()) {
2091
+ continue;
2092
+ }
2093
+ if (wroteAny) {
2094
+ this.ensure(1);
2095
+ this.json[this.i++] = COMMA;
2096
+ }
2097
+ wroteAny = true;
2098
+ const targetKey = this.settings.jsonName ? (memberSchema.getMergedTraits().jsonName ?? memberName) : memberName;
2099
+ if (writtenKeys) {
2100
+ writtenKeys.add(memberName);
2101
+ writtenKeys.add(targetKey);
2102
+ }
2103
+ this.writeAsciiQuoted(targetKey);
2104
+ this.json[this.i++] = COLON;
2105
+ this.writeValue(memberSchema, item, ns);
2106
+ }
2107
+ if (!wroteAny && ns.isUnionSchema()) {
2108
+ const { $unknown } = value;
2109
+ if (Array.isArray($unknown)) {
2110
+ const [k, v] = $unknown;
2111
+ this.writeAsciiQuoted(k);
2112
+ this.ensure(1);
2113
+ this.json[this.i++] = COLON;
2114
+ this.writeValue(15, v, ns);
2115
+ }
2116
+ }
2117
+ else if (hasType) {
2118
+ for (const k in value) {
2119
+ if (writtenKeys.has(k)) {
2120
+ continue;
2121
+ }
2122
+ writtenKeys.add(k);
2123
+ const v = value[k];
2124
+ if (wroteAny) {
2125
+ this.ensure(1);
2126
+ this.json[this.i++] = COMMA;
2127
+ }
2128
+ wroteAny = true;
2129
+ this.writeAsciiQuoted(k);
2130
+ this.ensure(1);
2131
+ this.json[this.i++] = COLON;
2132
+ this.writeValue(15, v, undefined);
2133
+ }
2134
+ }
2135
+ this.ensure(1);
2136
+ this.json[this.i++] = CLOSE_BRACE;
2137
+ }
2138
+ writeList(ns, value, isDocument) {
2139
+ const sparse = !!ns.getMergedTraits().sparse;
2140
+ const valueSchema = ns.getValueSchema();
2141
+ if (!isDocument) {
2142
+ if (valueSchema.isStringSchema() || valueSchema.isNumericSchema() || valueSchema.isBooleanSchema()) {
2143
+ let hasSpecials = false;
2144
+ for (let i = 0; i < value.length; ++i) {
2145
+ const v = value[i];
2146
+ if (Number.isNaN(v) || v === Infinity || v === -Infinity || (v == null && !sparse)) {
2147
+ hasSpecials = true;
2148
+ break;
2149
+ }
2150
+ }
2151
+ let json;
2152
+ if (!hasSpecials) {
2153
+ json = JSON.stringify(value);
2154
+ }
2155
+ else {
2156
+ const out = [];
2157
+ for (let i = 0; i < value.length; ++i) {
2158
+ const v = value[i];
2159
+ if (v == null && !sparse) {
2160
+ continue;
2161
+ }
2162
+ if (Number.isNaN(v) || v === Infinity || v === -Infinity) {
2163
+ out.push(String(v));
2164
+ }
2165
+ else {
2166
+ out.push(v);
2167
+ }
2168
+ }
2169
+ json = JSON.stringify(out);
2170
+ }
2171
+ this.ensure(json.length * 3);
2172
+ this.i += encoder.encodeInto(json, this.json.subarray(this.i)).written;
2173
+ return;
2174
+ }
2175
+ }
2176
+ this.ensure(2);
2177
+ this.json[this.i++] = OPEN_BRACKET;
2178
+ let wroteFirstItem = false;
2179
+ for (let i = 0; i < value.length; ++i) {
2180
+ const item = value[i];
2181
+ if (isDocument ? item === undefined : item == null && !sparse) {
2182
+ continue;
2183
+ }
2184
+ if (wroteFirstItem) {
2185
+ this.ensure(1);
2186
+ this.json[this.i++] = COMMA;
2187
+ }
2188
+ this.writeValue(valueSchema, item, undefined);
2189
+ wroteFirstItem = true;
2190
+ }
2191
+ this.ensure(1);
2192
+ this.json[this.i++] = CLOSE_BRACKET;
2193
+ }
2194
+ writeMap(ns, value, isDocument) {
2195
+ const sparse = !!ns.getMergedTraits().sparse;
2196
+ const valueSchema = ns.getValueSchema();
2197
+ if (!isDocument) {
2198
+ if (valueSchema.isStringSchema() || valueSchema.isNumericSchema() || valueSchema.isBooleanSchema()) {
2199
+ let modifications;
2200
+ for (const k in value) {
2201
+ if (!hasOwn(value, k)) {
2202
+ continue;
2203
+ }
2204
+ const v = value[k];
2205
+ if (Number.isNaN(v) || v === Infinity || v === -Infinity) {
2206
+ (modifications ??= {})[k] = v;
2207
+ value[k] = String(v);
2208
+ }
2209
+ else if (v === null && !sparse) {
2210
+ (modifications ??= {})[k] = null;
2211
+ value[k] = undefined;
2212
+ }
2213
+ }
2214
+ const json = JSON.stringify(value);
2215
+ if (modifications) {
2216
+ Object.assign(value, modifications);
2217
+ }
2218
+ this.ensure(json.length * 3);
2219
+ this.i += encoder.encodeInto(json, this.json.subarray(this.i)).written;
2220
+ return;
2221
+ }
2222
+ }
2223
+ this.ensure(2);
2224
+ this.json[this.i++] = OPEN_BRACE;
2225
+ let first = true;
2226
+ for (const k in value) {
2227
+ if (!hasOwn(value, k)) {
2228
+ continue;
2229
+ }
2230
+ const v = value[k];
2231
+ if (isDocument ? v === undefined : v == null && !sparse) {
2232
+ continue;
2233
+ }
2234
+ if (!first) {
2235
+ this.ensure(1);
2236
+ this.json[this.i++] = COMMA;
2237
+ }
2238
+ first = false;
2239
+ this.writeJsonString(k);
2240
+ this.ensure(1);
2241
+ this.json[this.i++] = COLON;
2242
+ this.writeValue(valueSchema, v, undefined);
2243
+ }
2244
+ this.ensure(1);
2245
+ this.json[this.i++] = CLOSE_BRACE;
2246
+ }
2247
+ writeTimestamp(ns, value) {
2248
+ const format = determineTimestampFormat(ns, this.settings);
2249
+ switch (format) {
2250
+ case 5: {
2251
+ const iso = value.toISOString().replace(".000Z", "Z");
2252
+ this.writeAsciiQuoted(iso);
2253
+ return;
2254
+ }
2255
+ case 6: {
2256
+ this.writeAsciiQuoted(dateToUtcString(value));
2257
+ return;
2258
+ }
2259
+ case 7: {
2260
+ const epochSecs = String(value.getTime() / 1000);
2261
+ this.writeAscii(epochSecs);
2262
+ return;
2263
+ }
2264
+ default: {
2265
+ const epochSecs = String(value.getTime() / 1000);
2266
+ this.writeAscii(epochSecs);
2267
+ return;
2268
+ }
2269
+ }
2270
+ }
2271
+ }
2272
+
2273
+ class JsonCodec2 extends SerdeContextConfig {
2274
+ settings;
2275
+ constructor(settings) {
2276
+ super();
2277
+ this.settings = settings;
2278
+ }
2279
+ createSerializer() {
2280
+ const serializer = new JsonShapeSerializer2(this.settings);
2281
+ serializer.setSerdeContext(this.serdeContext);
2282
+ return serializer;
2283
+ }
2284
+ createDeserializer() {
2285
+ const deserializer = new JsonShapeDeserializer2(this.settings);
2286
+ deserializer.setSerdeContext(this.serdeContext);
2287
+ return deserializer;
2288
+ }
2289
+ }
2290
+
2291
+ class SmithyRpcV2JsonProtocol extends AbstractRpcV2Protocol {
2292
+ codec = new JsonCodec2({
2293
+ timestampFormat: {
2294
+ useTrait: false,
2295
+ default: 7,
2296
+ },
2297
+ jsonName: false,
2298
+ bigNumberAsString: true,
2299
+ });
2300
+ serializer = this.codec.createSerializer();
2301
+ deserializer = this.codec.createDeserializer();
2302
+ getShapeId() {
2303
+ return "smithy.protocols#rpcv2Json";
2304
+ }
2305
+ getPayloadCodec() {
2306
+ return this.codec;
2307
+ }
2308
+ getSmithyProtocolHeaderValue() {
2309
+ return "rpc-v2-json";
2310
+ }
2311
+ applyEmptyBody(request) {
2312
+ if (!request.body) {
2313
+ request.body = "{}";
2314
+ }
2315
+ }
2316
+ async handleError(operationSchema, context, response, dataObject, metadata) {
2317
+ const errorName = loadSmithyRpcV2JsonErrorCode(response, dataObject) ?? "Unknown";
2318
+ const errorMetadata = {
2319
+ $metadata: metadata,
2320
+ $fault: response.statusCode <= 500 ? "client" : "server",
2321
+ };
2322
+ let namespace = this.options.defaultNamespace;
2323
+ if (errorName.includes("#")) {
2324
+ [namespace] = errorName.split("#");
2325
+ }
2326
+ const registry = this.compositeErrorRegistry;
2327
+ const nsRegistry = TypeRegistry.for(namespace);
2328
+ registry.copyFrom(nsRegistry);
2329
+ let errorSchema;
2330
+ try {
2331
+ errorSchema = registry.getSchema(errorName);
2332
+ }
2333
+ catch (ignored) {
2334
+ if (dataObject.Message) {
2335
+ dataObject.message = dataObject.Message;
2336
+ }
2337
+ const syntheticRegistry = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace);
2338
+ registry.copyFrom(syntheticRegistry);
2339
+ const baseExceptionSchema = registry.getBaseException();
2340
+ if (baseExceptionSchema) {
2341
+ const ErrorCtor = registry.getErrorCtor(baseExceptionSchema);
2342
+ throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject);
2343
+ }
2344
+ throw Object.assign(new Error(errorName), errorMetadata, dataObject);
2345
+ }
2346
+ const ns = NormalizedSchema.of(errorSchema);
2347
+ const ErrorCtor = registry.getErrorCtor(errorSchema);
2348
+ const message = dataObject.message ?? dataObject.Message ?? "Unknown";
2349
+ const exception = new ErrorCtor({});
2350
+ const output = {};
2351
+ const errorDeserializer = this.codec.createDeserializer();
2352
+ for (const [name, member] of ns.structIterator()) {
2353
+ if (dataObject[name] != null) {
2354
+ output[name] = errorDeserializer.readObject(member, dataObject[name]);
2355
+ }
2356
+ }
2357
+ throw Object.assign(exception, errorMetadata, {
2358
+ $fault: ns.getMergedTraits().error,
2359
+ message,
2360
+ }, output);
2361
+ }
2362
+ getDefaultContentType() {
2363
+ return "application/json";
2364
+ }
2365
+ }
2366
+
2367
+ class JsonShapeDeserializer extends SerdeContextConfig {
2368
+ settings;
2369
+ constructor(settings) {
2370
+ super();
2371
+ this.settings = settings;
2372
+ }
2373
+ async read(schema, data) {
2374
+ const reviver = needsReviver(schema) ? jsonReviver : undefined;
2375
+ return this._read(schema, typeof data === "string" ? JSON.parse(data, reviver) : await parseJsonBody(data, this.serdeContext, schema));
2376
+ }
2377
+ readObject(schema, data) {
2378
+ return this._read(schema, data);
2379
+ }
2380
+ _read(schema, value) {
2381
+ const isObject = value !== null && typeof value === "object";
2382
+ const ns = NormalizedSchema.of(schema);
2383
+ if (isObject) {
2384
+ if (ns.isStructSchema()) {
2385
+ const record = value;
2386
+ const union = ns.isUnionSchema();
2387
+ const out = {};
2388
+ let nameMap = void 0;
2389
+ const { jsonName } = this.settings;
2390
+ if (jsonName) {
2391
+ nameMap = {};
2392
+ }
2393
+ let unionSerde;
2394
+ if (union) {
2395
+ unionSerde = new UnionSerde(record, out);
2396
+ }
2397
+ for (const [memberName, memberSchema] of ns.structIterator()) {
2398
+ let fromKey = memberName;
2399
+ if (jsonName) {
2400
+ fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey;
2401
+ nameMap[fromKey] = memberName;
2402
+ }
2403
+ if (union) {
2404
+ unionSerde.mark(fromKey);
2405
+ }
2406
+ if (record[fromKey] != null) {
2407
+ out[memberName] = this._read(memberSchema, record[fromKey]);
2408
+ }
2409
+ }
2410
+ if (union) {
2411
+ unionSerde.writeUnknown();
2412
+ }
2413
+ else if (typeof record.__type === "string") {
2414
+ for (const k in record) {
2415
+ if (!hasOwn(record, k)) {
2416
+ continue;
2417
+ }
2418
+ const v = record[k];
2419
+ const t = jsonName ? (nameMap[k] ?? k) : k;
2420
+ if (!(t in out)) {
2421
+ out[t] = v;
2422
+ }
2423
+ }
2424
+ }
2425
+ return out;
2426
+ }
2427
+ if (Array.isArray(value) && ns.isListSchema()) {
2428
+ const listMember = ns.getValueSchema();
2429
+ const out = [];
2430
+ for (const item of value) {
2431
+ out.push(this._read(listMember, item));
2432
+ }
2433
+ return out;
2434
+ }
2435
+ if (ns.isMapSchema()) {
2436
+ const mapMember = ns.getValueSchema();
2437
+ const out = {};
2438
+ for (const _k in value) {
2439
+ if (!hasOwn(value, _k)) {
2440
+ continue;
2441
+ }
2442
+ if (_k === "__proto__") {
2443
+ writeKey(out);
2444
+ }
2445
+ out[_k] = this._read(mapMember, value[_k]);
2446
+ }
2447
+ return out;
2448
+ }
2449
+ }
2450
+ if (ns.isBlobSchema() && typeof value === "string") {
2451
+ return fromBase64(value);
2452
+ }
2453
+ const mediaType = ns.getMergedTraits().mediaType;
2454
+ if (ns.isStringSchema() && typeof value === "string" && mediaType) {
2455
+ const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
2456
+ if (isJson) {
2457
+ return LazyJsonString.from(value);
2458
+ }
2459
+ return value;
2460
+ }
2461
+ if (ns.isTimestampSchema() && value != null) {
2462
+ const format = determineTimestampFormat(ns, this.settings);
2463
+ switch (format) {
2464
+ case 5:
2465
+ return parseRfc3339DateTimeWithOffset(value);
2466
+ case 6:
2467
+ return parseRfc7231DateTime(value);
2468
+ case 7:
2469
+ return parseEpochTimestamp(value);
2470
+ default:
2471
+ console.warn("Missing timestamp format, parsing value with Date constructor:", value);
2472
+ return new Date(value);
2473
+ }
2474
+ }
2475
+ if (ns.isBigIntegerSchema() && (typeof value === "number" || typeof value === "string")) {
2476
+ return BigInt(value);
2477
+ }
2478
+ if (ns.isBigDecimalSchema() && value != undefined) {
2479
+ if (value instanceof NumericValue) {
2480
+ return value;
2481
+ }
2482
+ const untyped = value;
2483
+ if (untyped.type === "bigDecimal" && "string" in untyped) {
2484
+ return new NumericValue(untyped.string, untyped.type);
2485
+ }
2486
+ return new NumericValue(String(value), "bigDecimal");
2487
+ }
2488
+ if (ns.isNumericSchema() && typeof value === "string") {
2489
+ switch (value) {
2490
+ case "Infinity":
2491
+ return Infinity;
2492
+ case "-Infinity":
2493
+ return -Infinity;
2494
+ case "NaN":
2495
+ return NaN;
2496
+ }
2497
+ return value;
2498
+ }
2499
+ if (ns.isDocumentSchema()) {
2500
+ if (isObject) {
2501
+ const out = Array.isArray(value) ? [] : {};
2502
+ for (const k in value) {
2503
+ if (!hasOwn(value, k)) {
2504
+ continue;
2505
+ }
2506
+ if (k === "__proto__") {
2507
+ writeKey(out);
2508
+ }
2509
+ const v = value[k];
2510
+ if (v instanceof NumericValue) {
2511
+ out[k] = v;
2512
+ }
2513
+ else {
2514
+ out[k] = this._read(ns, v);
2515
+ }
2516
+ }
2517
+ return out;
2518
+ }
2519
+ else {
2520
+ return structuredClone(value);
2521
+ }
2522
+ }
2523
+ return value;
2524
+ }
2525
+ }
2526
+
2527
+ const NUMERIC_CONTROL_CHAR = String.fromCharCode(925);
2528
+ class JsonReplacer {
2529
+ values = new Map();
2530
+ counter = 0;
2531
+ stage = 0;
2532
+ createReplacer() {
2533
+ if (this.stage === 1) {
2534
+ throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");
2535
+ }
2536
+ if (this.stage === 2) {
2537
+ throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");
2538
+ }
2539
+ this.stage = 1;
2540
+ return (key, value) => {
2541
+ if (value instanceof NumericValue) {
2542
+ const v = `${NUMERIC_CONTROL_CHAR + "nv" + this.counter++}_` + value.string;
2543
+ this.values.set(`"${v}"`, value.string);
2544
+ return v;
2545
+ }
2546
+ if (typeof value === "bigint") {
2547
+ const s = value.toString();
2548
+ const v = `${NUMERIC_CONTROL_CHAR + "b" + this.counter++}_` + s;
2549
+ this.values.set(`"${v}"`, s);
2550
+ return v;
2551
+ }
2552
+ return value;
2553
+ };
2554
+ }
2555
+ replaceInJson(json) {
2556
+ if (this.stage === 0) {
2557
+ throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");
2558
+ }
2559
+ if (this.stage === 2) {
2560
+ throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");
2561
+ }
2562
+ this.stage = 2;
2563
+ if (this.counter === 0) {
2564
+ return json;
2565
+ }
2566
+ for (const [key, value] of this.values) {
2567
+ json = json.replace(key, value);
2568
+ }
2569
+ return json;
2570
+ }
2571
+ }
2572
+
2573
+ class JsonShapeSerializer extends SerdeContextConfig {
2574
+ settings;
2575
+ buffer;
2576
+ useReplacer = false;
2577
+ rootSchema;
2578
+ constructor(settings) {
2579
+ super();
2580
+ this.settings = settings;
2581
+ }
2582
+ write(schema, value) {
2583
+ this.rootSchema = NormalizedSchema.of(schema);
2584
+ this.buffer = this._write(this.rootSchema, value);
2585
+ }
2586
+ flush() {
2587
+ const { rootSchema, useReplacer } = this;
2588
+ this.rootSchema = undefined;
2589
+ this.useReplacer = false;
2590
+ if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) {
2591
+ if (!useReplacer) {
2592
+ return JSON.stringify(this.buffer);
2593
+ }
2594
+ const replacer = new JsonReplacer();
2595
+ return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0));
2596
+ }
2597
+ return this.buffer;
2598
+ }
2599
+ writeDiscriminatedDocument(schema, value) {
2600
+ this.write(schema, value);
2601
+ if (typeof this.buffer === "object") {
2602
+ this.buffer.__type = NormalizedSchema.of(schema).getName(true);
2603
+ }
2604
+ }
2605
+ _write(schema, value, container) {
2606
+ const isObject = value !== null && typeof value === "object";
2607
+ const ns = NormalizedSchema.of(schema);
2608
+ if (isObject) {
2609
+ if (ns.isStructSchema()) {
2610
+ const record = value;
2611
+ const out = {};
2612
+ const { jsonName } = this.settings;
2613
+ let nameMap = void 0;
2614
+ if (jsonName) {
2615
+ nameMap = {};
2616
+ }
2617
+ let outCount = 0;
2618
+ for (const [memberName, memberSchema] of ns.structIterator()) {
2619
+ const serializableValue = this._write(memberSchema, record[memberName], ns);
2620
+ if (serializableValue !== undefined) {
2621
+ let targetKey = memberName;
2622
+ if (jsonName) {
2623
+ targetKey = memberSchema.getMergedTraits().jsonName ?? memberName;
2624
+ nameMap[memberName] = targetKey;
2625
+ }
2626
+ out[targetKey] = serializableValue;
2627
+ outCount++;
2628
+ }
2629
+ }
2630
+ if (ns.isUnionSchema() && outCount === 0) {
2631
+ const { $unknown } = record;
2632
+ if (Array.isArray($unknown)) {
2633
+ const [k, v] = $unknown;
2634
+ if (k === "__proto__") {
2635
+ writeKey(out);
2636
+ }
2637
+ out[k] = this._write(15, v);
2638
+ }
2639
+ }
2640
+ else if (typeof record.__type === "string") {
2641
+ for (const k in record) {
2642
+ if (!hasOwn(record, k)) {
2643
+ continue;
2644
+ }
2645
+ const v = record[k];
2646
+ const targetKey = jsonName ? (nameMap[k] ?? k) : k;
2647
+ if (!(targetKey in out)) {
2648
+ out[targetKey] = this._write(15, v);
2649
+ }
2650
+ }
2651
+ }
2652
+ return out;
2653
+ }
2654
+ if (Array.isArray(value) && ns.isListSchema()) {
2655
+ const listMember = ns.getValueSchema();
2656
+ const out = [];
2657
+ const sparse = !!ns.getMergedTraits().sparse;
2658
+ for (const item of value) {
2659
+ if (sparse || item != null) {
2660
+ out.push(this._write(listMember, item));
2661
+ }
2662
+ }
2663
+ return out;
2664
+ }
2665
+ if (ns.isMapSchema()) {
2666
+ const mapMember = ns.getValueSchema();
2667
+ const out = {};
2668
+ const sparse = !!ns.getMergedTraits().sparse;
2669
+ for (const _k in value) {
2670
+ if (!hasOwn(value, _k)) {
2671
+ continue;
2672
+ }
2673
+ const _v = value[_k];
2674
+ if (sparse || _v != null) {
2675
+ if (_k === "__proto__") {
2676
+ writeKey(out);
2677
+ }
2678
+ out[_k] = this._write(mapMember, _v);
2679
+ }
2680
+ }
2681
+ return out;
2682
+ }
2683
+ if (value instanceof Uint8Array && ns.isBlobSchema()) {
2684
+ if (ns === this.rootSchema) {
2685
+ return value;
2686
+ }
2687
+ return (this.serdeContext?.base64Encoder ?? toBase64)(value);
2688
+ }
2689
+ if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {
2690
+ const format = determineTimestampFormat(ns, this.settings);
2691
+ switch (format) {
2692
+ case 5:
2693
+ return value.toISOString().replace(".000Z", "Z");
2694
+ case 6:
2695
+ return dateToUtcString(value);
2696
+ case 7:
2697
+ return value.getTime() / 1000;
2698
+ default:
2699
+ console.warn("Missing timestamp format, using epoch seconds", value);
2700
+ return value.getTime() / 1000;
2701
+ }
2702
+ }
2703
+ if (value instanceof NumericValue) {
2704
+ this.useReplacer = true;
2705
+ }
2706
+ }
2707
+ if (value === null && container?.isStructSchema()) {
2708
+ return void 0;
2709
+ }
2710
+ if (ns.isStringSchema()) {
2711
+ if (typeof value === "undefined" && ns.isIdempotencyToken()) {
2712
+ return generateIdempotencyToken();
2713
+ }
2714
+ const mediaType = ns.getMergedTraits().mediaType;
2715
+ if (value != null && mediaType) {
2716
+ const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
2717
+ if (isJson) {
2718
+ return LazyJsonString.from(value);
2719
+ }
2720
+ }
2721
+ return value;
2722
+ }
2723
+ if (typeof value === "number") {
2724
+ if (Math.abs(value) === Infinity || isNaN(value)) {
2725
+ return String(value);
2726
+ }
2727
+ return value;
2728
+ }
2729
+ if (typeof value === "string" && ns.isBlobSchema()) {
2730
+ if (ns === this.rootSchema) {
2731
+ return value;
2732
+ }
2733
+ return (this.serdeContext?.base64Encoder ?? toBase64)(value);
2734
+ }
2735
+ if (typeof value === "bigint") {
2736
+ this.useReplacer = true;
2737
+ }
2738
+ if (ns.isDocumentSchema()) {
2739
+ if (isObject) {
2740
+ if (value instanceof Uint8Array) {
2741
+ return (this.serdeContext?.base64Encoder ?? toBase64)(value);
2742
+ }
2743
+ const out = Array.isArray(value) ? [] : {};
2744
+ for (const k in value) {
2745
+ if (!hasOwn(value, k)) {
2746
+ continue;
2747
+ }
2748
+ const v = value[k];
2749
+ if (k === "__proto__") {
2750
+ writeKey(out);
2751
+ }
2752
+ if (v instanceof NumericValue) {
2753
+ this.useReplacer = true;
2754
+ out[k] = v;
2755
+ }
2756
+ else {
2757
+ out[k] = this._write(ns, v);
2758
+ }
2759
+ }
2760
+ return out;
2761
+ }
2762
+ else {
2763
+ return structuredClone(value);
2764
+ }
2765
+ }
2766
+ return value;
2767
+ }
2768
+ }
2769
+
2770
+ class JsonCodec extends SerdeContextConfig {
2771
+ settings;
2772
+ constructor(settings) {
2773
+ super();
2774
+ this.settings = settings;
2775
+ }
2776
+ createSerializer() {
2777
+ const serializer = new JsonShapeSerializer(this.settings);
2778
+ serializer.setSerdeContext(this.serdeContext);
2779
+ return serializer;
2780
+ }
2781
+ createDeserializer() {
2782
+ const deserializer = new JsonShapeDeserializer(this.settings);
2783
+ deserializer.setSerdeContext(this.serdeContext);
2784
+ return deserializer;
2785
+ }
2786
+ }
2787
+
2788
+ exports.AbstractRpcV2Protocol = AbstractRpcV2Protocol;
1035
2789
  exports.Field = Field;
1036
2790
  exports.Fields = Fields;
1037
2791
  exports.FromStringShapeDeserializer = FromStringShapeDeserializer;
@@ -1039,9 +2793,16 @@ exports.HttpBindingProtocol = HttpBindingProtocol;
1039
2793
  exports.HttpInterceptingShapeDeserializer = HttpInterceptingShapeDeserializer;
1040
2794
  exports.HttpInterceptingShapeSerializer = HttpInterceptingShapeSerializer;
1041
2795
  exports.HttpProtocol = HttpProtocol;
2796
+ exports.JsonCodec = JsonCodec;
2797
+ exports.JsonCodec2 = JsonCodec2;
2798
+ exports.JsonShapeDeserializer = JsonShapeDeserializer;
2799
+ exports.JsonShapeDeserializer2 = JsonShapeDeserializer2;
2800
+ exports.JsonShapeSerializer = JsonShapeSerializer;
2801
+ exports.JsonShapeSerializer2 = JsonShapeSerializer2;
1042
2802
  exports.RequestBuilder = RequestBuilder;
1043
2803
  exports.RpcProtocol = RpcProtocol;
1044
2804
  exports.SerdeContext = SerdeContext;
2805
+ exports.SmithyRpcV2JsonProtocol = SmithyRpcV2JsonProtocol;
1045
2806
  exports.ToStringShapeSerializer = ToStringShapeSerializer;
1046
2807
  exports.buildQueryString = buildQueryString;
1047
2808
  exports.collectBody = collectBody;
@@ -1053,6 +2814,11 @@ exports.escapeUriPath = escapeUriPath;
1053
2814
  exports.extendedEncodeURIComponent = extendedEncodeURIComponent;
1054
2815
  exports.getContentLengthPlugin = getContentLengthPlugin;
1055
2816
  exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration;
2817
+ exports.loadJsonRpcErrorCode = loadJsonRpcErrorCode;
2818
+ exports.loadRestJsonErrorCode = loadRestJsonErrorCode;
2819
+ exports.loadSmithyRpcV2JsonErrorCode = loadSmithyRpcV2JsonErrorCode;
2820
+ exports.parseJsonBody = parseJsonBody;
2821
+ exports.parseJsonErrorBody = parseJsonErrorBody;
1056
2822
  exports.requestBuilder = requestBuilder;
1057
2823
  exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig;
1058
2824
  exports.resolvedPath = resolvedPath;