@cdklabs/cdk-construct-connect-datalake 0.0.19 → 0.0.20

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 (282) hide show
  1. package/.jsii +9 -9
  2. package/.jsii.tabl.json +1 -1
  3. package/lib/index.js +1 -1
  4. package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +1 -1
  5. package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.browser.d.ts +2 -0
  6. package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.d.ts +2 -0
  7. package/node_modules/@aws-sdk/client-cloudformation/dist-types/runtimeConfig.native.d.ts +2 -0
  8. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  9. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  10. package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  11. package/node_modules/@aws-sdk/client-cloudformation/package.json +6 -6
  12. package/node_modules/@aws-sdk/client-connect/dist-cjs/index.js +1 -1
  13. package/node_modules/@aws-sdk/client-connect/dist-types/runtimeConfig.browser.d.ts +2 -0
  14. package/node_modules/@aws-sdk/client-connect/dist-types/runtimeConfig.d.ts +2 -0
  15. package/node_modules/@aws-sdk/client-connect/dist-types/runtimeConfig.native.d.ts +2 -0
  16. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  17. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  18. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  19. package/node_modules/@aws-sdk/client-connect/package.json +6 -6
  20. package/node_modules/@aws-sdk/client-glue/dist-cjs/index.js +1 -1
  21. package/node_modules/@aws-sdk/client-glue/dist-types/runtimeConfig.browser.d.ts +2 -0
  22. package/node_modules/@aws-sdk/client-glue/dist-types/runtimeConfig.d.ts +2 -0
  23. package/node_modules/@aws-sdk/client-glue/dist-types/runtimeConfig.native.d.ts +2 -0
  24. package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  25. package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  26. package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  27. package/node_modules/@aws-sdk/client-glue/package.json +6 -6
  28. package/node_modules/@aws-sdk/client-lakeformation/dist-cjs/index.js +1 -1
  29. package/node_modules/@aws-sdk/client-lakeformation/dist-types/runtimeConfig.browser.d.ts +2 -0
  30. package/node_modules/@aws-sdk/client-lakeformation/dist-types/runtimeConfig.d.ts +2 -0
  31. package/node_modules/@aws-sdk/client-lakeformation/dist-types/runtimeConfig.native.d.ts +2 -0
  32. package/node_modules/@aws-sdk/client-lakeformation/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  33. package/node_modules/@aws-sdk/client-lakeformation/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  34. package/node_modules/@aws-sdk/client-lakeformation/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  35. package/node_modules/@aws-sdk/client-lakeformation/package.json +6 -6
  36. package/node_modules/@aws-sdk/client-ram/dist-cjs/index.js +1 -1
  37. package/node_modules/@aws-sdk/client-ram/dist-types/runtimeConfig.browser.d.ts +2 -0
  38. package/node_modules/@aws-sdk/client-ram/dist-types/runtimeConfig.d.ts +2 -0
  39. package/node_modules/@aws-sdk/client-ram/dist-types/runtimeConfig.native.d.ts +2 -0
  40. package/node_modules/@aws-sdk/client-ram/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  41. package/node_modules/@aws-sdk/client-ram/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  42. package/node_modules/@aws-sdk/client-ram/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  43. package/node_modules/@aws-sdk/client-ram/package.json +6 -6
  44. package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +1 -1
  45. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.browser.d.ts +2 -0
  46. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.d.ts +2 -0
  47. package/node_modules/@aws-sdk/client-sts/dist-types/runtimeConfig.native.d.ts +2 -0
  48. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
  49. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
  50. package/node_modules/@aws-sdk/client-sts/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
  51. package/node_modules/@aws-sdk/client-sts/package.json +8 -8
  52. package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +66 -28
  53. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +133 -15
  54. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js +7 -2
  55. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +28 -14
  56. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.browser.js +1 -0
  57. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.js +3 -0
  58. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/clock-skew-node-config.js +8 -0
  59. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js +1 -1
  60. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js +3 -3
  61. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.browser.js +9 -0
  62. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js +5 -1
  63. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js +1 -0
  64. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +12 -6
  65. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js +2 -1
  66. package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js +1 -1
  67. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +10 -1
  68. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +10 -0
  69. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/detectBufferParsing.js +18 -0
  70. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.js +180 -0
  71. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/experimental/ByteJsonShapeSerializer.js +483 -0
  72. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +22 -3
  73. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/needsReviver.js +41 -0
  74. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +33 -13
  75. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/writeKey.js +3 -0
  76. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js +4 -0
  77. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +2 -1
  78. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.browser.d.ts +6 -0
  79. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.d.ts +7 -0
  80. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/clock-skew-node-config.d.ts +13 -0
  81. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/index.d.ts +1 -1
  82. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +22 -6
  83. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/index.browser.d.ts +11 -0
  84. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/index.d.ts +7 -1
  85. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/getDateHeader.d.ts +4 -0
  86. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +22 -6
  87. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/index.d.ts +2 -1
  88. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/detectBufferParsing.d.ts +1 -0
  89. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.d.ts +29 -0
  90. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/experimental/ByteJsonShapeSerializer.d.ts +57 -0
  91. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/needsReviver.d.ts +11 -0
  92. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +7 -2
  93. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/writeKey.d.ts +4 -0
  94. package/node_modules/@aws-sdk/core/dist-types/ts3.4/api-extractor-type-index.d.ts +7 -4
  95. package/node_modules/@aws-sdk/core/dist-types/ts3.4/index.d.ts +21 -61
  96. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +27 -13
  97. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConstants.d.ts +16 -4
  98. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.d.ts +14 -5
  99. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/index.d.ts +5 -16
  100. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/emitWarningIfUnsupportedVersion.d.ts +11 -4
  101. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.browser.d.ts +47 -107
  102. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +39 -112
  103. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.native.d.ts +48 -107
  104. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/longPollMiddleware.d.ts +14 -13
  105. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-host-header/hostHeaderMiddleware.d.ts +35 -25
  106. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-logger/loggerMiddleware.d.ts +4 -14
  107. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/configuration.d.ts +6 -2
  108. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.browser.d.ts +5 -2
  109. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.d.ts +5 -2
  110. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.browser.d.ts +6 -2
  111. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.d.ts +10 -2
  112. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.native.d.ts +6 -2
  113. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/check-features.d.ts +20 -16
  114. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/configurations.d.ts +44 -21
  115. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/constants.d.ts +7 -7
  116. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/encode-features.d.ts +5 -2
  117. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/user-agent-middleware.d.ts +18 -18
  118. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/awsRegionConfig.d.ts +11 -8
  119. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/extensions.d.ts +16 -14
  120. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.browser.d.ts +4 -1
  121. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.d.ts +14 -7
  122. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.native.d.ts +4 -1
  123. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setCredentialFeature.d.ts +7 -6
  124. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setFeature.d.ts +12 -6
  125. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setTokenFeature.d.ts +7 -6
  126. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/aws.d.ts +2 -2
  127. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/isVirtualHostableS3Bucket.d.ts +5 -4
  128. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/parseArn.d.ts +7 -2
  129. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/partition.d.ts +38 -28
  130. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/partitions.d.ts +638 -647
  131. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/isIpAddress.d.ts +1 -1
  132. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/resolveDefaultAwsRegionalEndpointsConfig.d.ts +56 -29
  133. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/resolveEndpoint.d.ts +1 -1
  134. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/EndpointError.d.ts +1 -1
  135. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/EndpointRuleObject.d.ts +1 -6
  136. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/ErrorRuleObject.d.ts +1 -1
  137. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/RuleSetObject.d.ts +1 -1
  138. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/TreeRuleObject.d.ts +1 -1
  139. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/shared.d.ts +1 -12
  140. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/configurations.d.ts +7 -4
  141. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/createUserAgentStringParsingProvider.d.ts +14 -7
  142. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.browser.d.ts +2 -7
  143. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.d.ts +27 -18
  144. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.native.d.ts +18 -13
  145. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/crt-availability.d.ts +8 -3
  146. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/defaultUserAgent.d.ts +28 -17
  147. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/getRuntimeUserAgentPair.d.ts +6 -2
  148. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/is-crt-available.d.ts +5 -2
  149. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/nodeAppIdConfigOptions.d.ts +13 -4
  150. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +10 -9
  151. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +44 -37
  152. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.d.ts +5 -2
  153. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.browser.d.ts +6 -0
  154. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.d.ts +7 -0
  155. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-node-config.d.ts +13 -0
  156. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/index.d.ts +7 -23
  157. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.d.ts +38 -13
  158. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +133 -56
  159. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/index.browser.d.ts +11 -0
  160. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/index.d.ts +9 -24
  161. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.d.ts +8 -1
  162. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.d.ts +6 -1
  163. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getDateHeader.d.ts +8 -1
  164. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts +8 -1
  165. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +26 -4
  166. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/index.d.ts +4 -3
  167. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/isClockSkewed.d.ts +9 -1
  168. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -5
  169. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/ProtocolLib.d.ts +74 -40
  170. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/UnionSerde.d.ts +24 -9
  171. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.d.ts +25 -36
  172. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/coercing-serializers.d.ts +18 -3
  173. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/common.d.ts +2 -5
  174. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +22 -27
  175. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +22 -21
  176. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +22 -21
  177. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +29 -49
  178. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +36 -49
  179. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonCodec.d.ts +19 -13
  180. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeDeserializer.d.ts +13 -13
  181. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeSerializer.d.ts +28 -18
  182. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/awsExpectUnion.d.ts +7 -1
  183. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +1 -0
  184. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.d.ts +29 -0
  185. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/experimental/ByteJsonShapeSerializer.d.ts +57 -0
  186. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +21 -7
  187. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +15 -7
  188. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +11 -0
  189. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +22 -9
  190. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsEc2QueryProtocol.d.ts +27 -18
  191. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsQueryProtocol.d.ts +49 -57
  192. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/QuerySerializerSettings.d.ts +13 -7
  193. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/QueryShapeSerializer.d.ts +16 -21
  194. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/writeKey.d.ts +4 -0
  195. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +31 -47
  196. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlCodec.d.ts +14 -17
  197. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlShapeDeserializer.d.ts +20 -15
  198. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlShapeSerializer.d.ts +21 -21
  199. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/parseXmlBody.d.ts +13 -4
  200. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/simpleFormatXml.d.ts +6 -1
  201. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +3 -3
  202. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/util-arn-parser/arn.d.ts +32 -14
  203. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/util-format-url/format-url.d.ts +2 -4
  204. package/node_modules/@aws-sdk/core/package.json +11 -6
  205. package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
  206. package/node_modules/@aws-sdk/credential-provider-http/package.json +5 -5
  207. package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
  208. package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
  209. package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
  210. package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
  211. package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
  212. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
  213. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  214. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  215. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  216. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  217. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  218. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.browser.d.ts +2 -0
  219. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +2 -0
  220. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.native.d.ts +2 -0
  221. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.browser.d.ts +2 -0
  222. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.d.ts +2 -0
  223. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.native.d.ts +2 -0
  224. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.browser.d.ts +2 -0
  225. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.d.ts +2 -0
  226. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.native.d.ts +2 -0
  227. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.browser.d.ts +2 -0
  228. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +2 -0
  229. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.native.d.ts +2 -0
  230. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.browser.d.ts +2 -0
  231. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +2 -0
  232. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.native.d.ts +2 -0
  233. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.browser.d.ts +2 -0
  234. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +2 -0
  235. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.native.d.ts +2 -0
  236. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.browser.d.ts +2 -0
  237. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +2 -0
  238. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.native.d.ts +2 -0
  239. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.browser.d.ts +2 -0
  240. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +2 -0
  241. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.native.d.ts +2 -0
  242. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.browser.d.ts +2 -0
  243. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +2 -0
  244. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.native.d.ts +2 -0
  245. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.browser.d.ts +2 -0
  246. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +2 -0
  247. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.native.d.ts +2 -0
  248. package/node_modules/@aws-sdk/nested-clients/package.json +6 -6
  249. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
  250. package/node_modules/@aws-sdk/token-providers/package.json +4 -4
  251. package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +14 -4
  252. package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.js +14 -4
  253. package/node_modules/@aws-sdk/xml-builder/package.json +1 -1
  254. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +1 -1
  255. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +34 -11
  256. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +34 -11
  257. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +1 -0
  258. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +1 -0
  259. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +1 -0
  260. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +2 -2
  261. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +2 -2
  262. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +2 -2
  263. package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +1 -1
  264. package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +34 -11
  265. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +1 -0
  266. package/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/constants.js +1 -0
  267. package/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +2 -2
  268. package/node_modules/@smithy/core/dist-types/submodules/event-streams/EventStreamSerde.d.ts +10 -2
  269. package/node_modules/@smithy/core/dist-types/submodules/retry/service-error-classification/constants.d.ts +1 -0
  270. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/event-streams/EventStreamSerde.d.ts +10 -2
  271. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/service-error-classification/constants.d.ts +1 -0
  272. package/node_modules/@smithy/core/package.json +1 -1
  273. package/node_modules/@smithy/credential-provider-imds/package.json +2 -2
  274. package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
  275. package/node_modules/@smithy/node-http-handler/package.json +2 -2
  276. package/node_modules/@smithy/signature-v4/package.json +2 -2
  277. package/node_modules/xml2js/node_modules/sax/lib/sax.js +27 -9
  278. package/node_modules/xml2js/node_modules/sax/package.json +1 -1
  279. package/package.json +10 -10
  280. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/experimental/SinglePassJsonShapeSerializer.js +0 -135
  281. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/experimental/SinglePassJsonShapeSerializer.d.ts +0 -27
  282. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/experimental/SinglePassJsonShapeSerializer.d.ts +0 -17
@@ -0,0 +1,180 @@
1
+ import { determineTimestampFormat } from "@smithy/core/protocols";
2
+ import { NormalizedSchema } from "@smithy/core/schema";
3
+ import { LazyJsonString, NumericValue, parseEpochTimestamp, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, } from "@smithy/core/serde";
4
+ import { fromBase64 } from "@smithy/core/serde";
5
+ import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
6
+ import { UnionSerde } from "../../UnionSerde";
7
+ import { detectBufferParsing } from "../detectBufferParsing";
8
+ import { jsonReviver } from "../jsonReviver";
9
+ import { needsReviver } from "../needsReviver";
10
+ import { parseJsonBody } from "../parseJsonBody";
11
+ import { writeKey } from "../../writeKey";
12
+ export class BufferJsonShapeDeserializer extends SerdeContextConfig {
13
+ settings;
14
+ constructor(settings) {
15
+ super();
16
+ this.settings = settings;
17
+ }
18
+ async read(schema, data) {
19
+ const reviver = needsReviver(schema) ? jsonReviver : undefined;
20
+ let parsed;
21
+ if (typeof data === "string") {
22
+ parsed = JSON.parse(data, reviver);
23
+ }
24
+ else if (data instanceof Uint8Array && detectBufferParsing()) {
25
+ const buf = Buffer.isBuffer(data) ? data : Buffer.from(data.buffer, data.byteOffset, data.byteLength);
26
+ parsed = JSON.parse(buf, reviver);
27
+ }
28
+ else {
29
+ parsed = await parseJsonBody(data, this.serdeContext);
30
+ }
31
+ return this._read(schema, parsed);
32
+ }
33
+ readObject(schema, data) {
34
+ return this._read(schema, data);
35
+ }
36
+ _read(schema, value) {
37
+ const isObject = value !== null && typeof value === "object";
38
+ const ns = NormalizedSchema.of(schema);
39
+ if (isObject) {
40
+ if (ns.isStructSchema()) {
41
+ return this._readStruct(ns, value);
42
+ }
43
+ if (Array.isArray(value) && ns.isListSchema()) {
44
+ const listMember = ns.getValueSchema();
45
+ for (let i = 0; i < value.length; ++i) {
46
+ value[i] = this._read(listMember, value[i]);
47
+ }
48
+ return value;
49
+ }
50
+ if (ns.isMapSchema()) {
51
+ const mapMember = ns.getValueSchema();
52
+ const map = value;
53
+ for (const k in map) {
54
+ if (k === "__proto__") {
55
+ writeKey(map);
56
+ }
57
+ map[k] = this._read(mapMember, map[k]);
58
+ }
59
+ return map;
60
+ }
61
+ }
62
+ if (ns.isBlobSchema() && typeof value === "string") {
63
+ return fromBase64(value);
64
+ }
65
+ const mediaType = ns.getMergedTraits().mediaType;
66
+ if (ns.isStringSchema() && typeof value === "string" && mediaType) {
67
+ const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
68
+ if (isJson) {
69
+ return LazyJsonString.from(value);
70
+ }
71
+ return value;
72
+ }
73
+ if (ns.isTimestampSchema() && value != null) {
74
+ const format = determineTimestampFormat(ns, this.settings);
75
+ switch (format) {
76
+ case 5:
77
+ return parseRfc3339DateTimeWithOffset(value);
78
+ case 6:
79
+ return parseRfc7231DateTime(value);
80
+ case 7:
81
+ return parseEpochTimestamp(value);
82
+ default:
83
+ console.warn("Missing timestamp format, parsing value with Date constructor:", value);
84
+ return new Date(value);
85
+ }
86
+ }
87
+ if (ns.isBigIntegerSchema() && (typeof value === "number" || typeof value === "string")) {
88
+ return BigInt(value);
89
+ }
90
+ if (ns.isBigDecimalSchema() && value != undefined) {
91
+ if (value instanceof NumericValue) {
92
+ return value;
93
+ }
94
+ const untyped = value;
95
+ if (untyped.type === "bigDecimal" && "string" in untyped) {
96
+ return new NumericValue(untyped.string, untyped.type);
97
+ }
98
+ return new NumericValue(String(value), "bigDecimal");
99
+ }
100
+ if (ns.isNumericSchema() && typeof value === "string") {
101
+ switch (value) {
102
+ case "Infinity":
103
+ return Infinity;
104
+ case "-Infinity":
105
+ return -Infinity;
106
+ case "NaN":
107
+ return NaN;
108
+ }
109
+ return value;
110
+ }
111
+ if (ns.isDocumentSchema()) {
112
+ if (isObject) {
113
+ if (Array.isArray(value)) {
114
+ for (let i = 0; i < value.length; ++i) {
115
+ const v = value[i];
116
+ if (!(v instanceof NumericValue)) {
117
+ value[i] = this._read(ns, v);
118
+ }
119
+ }
120
+ }
121
+ else {
122
+ const doc = value;
123
+ for (const k in doc) {
124
+ if (k === "__proto__") {
125
+ writeKey(doc);
126
+ }
127
+ const v = doc[k];
128
+ if (!(v instanceof NumericValue)) {
129
+ doc[k] = this._read(ns, v);
130
+ }
131
+ }
132
+ }
133
+ return value;
134
+ }
135
+ else {
136
+ return value;
137
+ }
138
+ }
139
+ return value;
140
+ }
141
+ _readStruct(ns, record) {
142
+ const union = ns.isUnionSchema();
143
+ const out = {};
144
+ let nameMap = void 0;
145
+ const { jsonName } = this.settings;
146
+ if (jsonName) {
147
+ nameMap = {};
148
+ }
149
+ let unionSerde;
150
+ if (union) {
151
+ unionSerde = new UnionSerde(record, out);
152
+ }
153
+ for (const [memberName, memberSchema] of ns.structIterator()) {
154
+ let fromKey = memberName;
155
+ if (jsonName) {
156
+ fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey;
157
+ nameMap[fromKey] = memberName;
158
+ }
159
+ if (union) {
160
+ unionSerde.mark(fromKey);
161
+ }
162
+ if (record[fromKey] != null) {
163
+ out[memberName] = this._read(memberSchema, record[fromKey]);
164
+ }
165
+ }
166
+ if (union) {
167
+ unionSerde.writeUnknown();
168
+ }
169
+ else if (typeof record.__type === "string") {
170
+ for (const k in record) {
171
+ const v = record[k];
172
+ const t = jsonName ? (nameMap[k] ?? k) : k;
173
+ if (!(t in out)) {
174
+ out[t] = v;
175
+ }
176
+ }
177
+ }
178
+ return out;
179
+ }
180
+ }
@@ -0,0 +1,483 @@
1
+ import { determineTimestampFormat } from "@smithy/core/protocols";
2
+ import { NormalizedSchema } from "@smithy/core/schema";
3
+ import { dateToUtcString, generateIdempotencyToken, LazyJsonString, NumericValue, toBase64 } from "@smithy/core/serde";
4
+ import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
5
+ import { writeKey } from "../../writeKey";
6
+ const encoder = new TextEncoder();
7
+ const OPEN_BRACE = 0x7b;
8
+ const CLOSE_BRACE = 0x7d;
9
+ const OPEN_BRACKET = 0x5b;
10
+ const CLOSE_BRACKET = 0x5d;
11
+ const QUOTE = 0x22;
12
+ const COLON = 0x3a;
13
+ const COMMA = 0x2c;
14
+ const BACKSLASH = 0x5c;
15
+ const TRUE = new Uint8Array([0x74, 0x72, 0x75, 0x65]);
16
+ const FALSE = new Uint8Array([0x66, 0x61, 0x6c, 0x73, 0x65]);
17
+ const NULL = new Uint8Array([0x6e, 0x75, 0x6c, 0x6c]);
18
+ const ESCAPE_TABLE = new Array(128).fill(null);
19
+ ESCAPE_TABLE[0x08] = "b";
20
+ ESCAPE_TABLE[0x09] = "t";
21
+ ESCAPE_TABLE[0x0a] = "n";
22
+ ESCAPE_TABLE[0x0c] = "f";
23
+ ESCAPE_TABLE[0x0d] = "r";
24
+ ESCAPE_TABLE[0x22] = '"';
25
+ ESCAPE_TABLE[0x5c] = "\\";
26
+ for (let i = 0; i < 0x20; i++) {
27
+ if (ESCAPE_TABLE[i] === null) {
28
+ ESCAPE_TABLE[i] = "u00" + i.toString(16).padStart(2, "0");
29
+ }
30
+ }
31
+ const INITIAL_BUFFER_SIZE = 2048;
32
+ function alloc(size) {
33
+ return typeof Buffer !== "undefined" ? Buffer.allocUnsafe(size) : new Uint8Array(size);
34
+ }
35
+ export class ByteJsonShapeSerializer extends SerdeContextConfig {
36
+ settings;
37
+ json;
38
+ i = 0;
39
+ rootSchema;
40
+ constructor(settings) {
41
+ super();
42
+ this.settings = settings;
43
+ this.json = alloc(INITIAL_BUFFER_SIZE);
44
+ }
45
+ write(schema, value) {
46
+ this.i = 0;
47
+ this.rootSchema = NormalizedSchema.of(schema);
48
+ this.writeValue(this.rootSchema, value, undefined);
49
+ }
50
+ writeDiscriminatedDocument(schema, value) {
51
+ this.i = 0;
52
+ this.rootSchema = NormalizedSchema.of(schema);
53
+ const ns = this.rootSchema;
54
+ if (ns.isStructSchema() && value != null && typeof value === "object") {
55
+ this.ensure(2);
56
+ this.json[this.i++] = OPEN_BRACE;
57
+ this.writeAsciiQuoted("__type");
58
+ this.json[this.i++] = COLON;
59
+ this.writeAsciiQuoted(ns.getName(true) ?? "Unknown");
60
+ let wroteAny = true;
61
+ const { jsonName } = this.settings;
62
+ for (const [memberName, memberSchema] of ns.structIterator()) {
63
+ const item = value[memberName];
64
+ if (item == null && !memberSchema.isIdempotencyToken()) {
65
+ continue;
66
+ }
67
+ if (wroteAny) {
68
+ this.ensure(1);
69
+ this.json[this.i++] = COMMA;
70
+ }
71
+ const targetKey = jsonName ? (memberSchema.getMergedTraits().jsonName ?? memberName) : memberName;
72
+ this.writeAsciiQuoted(targetKey);
73
+ this.json[this.i++] = COLON;
74
+ this.writeValue(memberSchema, item, ns);
75
+ wroteAny = true;
76
+ }
77
+ this.ensure(1);
78
+ this.json[this.i++] = CLOSE_BRACE;
79
+ }
80
+ else {
81
+ this.writeValue(ns, value, undefined);
82
+ }
83
+ }
84
+ flush() {
85
+ this.rootSchema = undefined;
86
+ const finalPosition = this.i;
87
+ this.i = 0;
88
+ const result = this.json.subarray(0, finalPosition);
89
+ this.json = alloc(INITIAL_BUFFER_SIZE);
90
+ return result;
91
+ }
92
+ ensure(byteCount) {
93
+ const { i, json } = this;
94
+ if (i + byteCount > json.length) {
95
+ let newSize = json.length * 2;
96
+ while (newSize < i + byteCount) {
97
+ newSize *= 2;
98
+ }
99
+ const next = alloc(newSize);
100
+ next.set(this.json);
101
+ this.json = next;
102
+ }
103
+ }
104
+ writeAscii(s) {
105
+ const z = s.length;
106
+ this.ensure(z);
107
+ let { i, json } = this;
108
+ for (let j = 0; j < z; ++j) {
109
+ json[i] = s.charCodeAt(j);
110
+ i += 1;
111
+ }
112
+ this.i = i;
113
+ }
114
+ writeAsciiQuoted(s) {
115
+ const z = s.length;
116
+ this.ensure(z + 4);
117
+ let { json, i } = this;
118
+ json[i++] = QUOTE;
119
+ for (let j = 0; j < z; ++j) {
120
+ json[i++] = s.charCodeAt(j);
121
+ }
122
+ json[i++] = QUOTE;
123
+ this.i = i;
124
+ }
125
+ writeJsonString(s) {
126
+ this.ensure(s.length * 2 + 2);
127
+ this.json[this.i++] = QUOTE;
128
+ const z = s.length;
129
+ for (let j = 0; j < z; ++j) {
130
+ const c = s.charCodeAt(j);
131
+ if (c > 0x22 && c < 0x5c) {
132
+ this.json[this.i++] = c;
133
+ }
134
+ else if (c < 0x80) {
135
+ const esc = ESCAPE_TABLE[c];
136
+ if (esc !== null) {
137
+ this.ensure(esc.length + 1);
138
+ this.json[this.i++] = BACKSLASH;
139
+ for (let k = 0; k < esc.length; k++) {
140
+ this.json[this.i++] = esc.charCodeAt(k);
141
+ }
142
+ }
143
+ else {
144
+ this.json[this.i++] = c;
145
+ }
146
+ }
147
+ else if (c >= 0xd800 && c <= 0xdbff) {
148
+ const next = j + 1 < z ? s.charCodeAt(j + 1) : 0;
149
+ if (next >= 0xdc00 && next <= 0xdfff) {
150
+ this.ensure(4);
151
+ const { written } = encoder.encodeInto(s.substring(j, j + 2), this.json.subarray(this.i));
152
+ this.i += written;
153
+ j++;
154
+ }
155
+ else {
156
+ this.ensure(6);
157
+ this.writeUnicodeEscape(c);
158
+ }
159
+ }
160
+ else if (c >= 0xdc00 && c <= 0xdfff) {
161
+ this.ensure(6);
162
+ this.writeUnicodeEscape(c);
163
+ }
164
+ else {
165
+ let { i, json } = this;
166
+ if (c < 0x800) {
167
+ json[i++] = 0xc0 | (c >> 6);
168
+ json[i++] = 0x80 | (c & 0x3f);
169
+ }
170
+ else {
171
+ json[i++] = 0xe0 | (c >> 12);
172
+ json[i++] = 0x80 | ((c >> 6) & 0x3f);
173
+ json[i++] = 0x80 | (c & 0x3f);
174
+ }
175
+ this.i = i;
176
+ }
177
+ }
178
+ this.json[this.i++] = QUOTE;
179
+ }
180
+ writeUnicodeEscape(code) {
181
+ let { json, i } = this;
182
+ json[i++] = BACKSLASH;
183
+ json[i++] = 0x75;
184
+ const hex = code.toString(16).padStart(4, "0");
185
+ for (let j = 0; j < 4; ++j) {
186
+ json[i++] = hex.charCodeAt(j);
187
+ }
188
+ this.i = i;
189
+ }
190
+ static B64 = (() => {
191
+ const chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
192
+ const table = new Uint8Array(64);
193
+ for (let i = 0; i < 64; i++)
194
+ table[i] = chars.charCodeAt(i);
195
+ return table;
196
+ })();
197
+ writeBase64(data) {
198
+ const b64Len = Math.ceil(data.length / 3) * 4;
199
+ this.ensure(b64Len + 2);
200
+ const json = this.json;
201
+ const B64 = ByteJsonShapeSerializer.B64;
202
+ let i = this.i;
203
+ json[i++] = QUOTE;
204
+ const len = data.length;
205
+ const remainder = len % 3;
206
+ const mainLen = len - remainder;
207
+ for (let j = 0; j < mainLen; j += 3) {
208
+ const a = data[j];
209
+ const b = data[j + 1];
210
+ const c = data[j + 2];
211
+ json[i++] = B64[a >> 2];
212
+ json[i++] = B64[((a & 0x03) << 4) | (b >> 4)];
213
+ json[i++] = B64[((b & 0x0f) << 2) | (c >> 6)];
214
+ json[i++] = B64[c & 0x3f];
215
+ }
216
+ if (remainder === 2) {
217
+ const a = data[mainLen];
218
+ const b = data[mainLen + 1];
219
+ json[i++] = B64[a >> 2];
220
+ json[i++] = B64[((a & 0x03) << 4) | (b >> 4)];
221
+ json[i++] = B64[(b & 0x0f) << 2];
222
+ json[i++] = 0x3d;
223
+ }
224
+ else if (remainder === 1) {
225
+ const a = data[mainLen];
226
+ json[i++] = B64[a >> 2];
227
+ json[i++] = B64[(a & 0x03) << 4];
228
+ json[i++] = 0x3d;
229
+ json[i++] = 0x3d;
230
+ }
231
+ json[i++] = QUOTE;
232
+ this.i = i;
233
+ }
234
+ writeValue(schema, value, container) {
235
+ if (value == null) {
236
+ if (container?.isStructSchema()) {
237
+ if (value === undefined) {
238
+ const ns = NormalizedSchema.of(schema);
239
+ if (ns.isIdempotencyToken()) {
240
+ this.writeAsciiQuoted(generateIdempotencyToken());
241
+ return;
242
+ }
243
+ }
244
+ return;
245
+ }
246
+ this.ensure(4);
247
+ this.json.set(NULL, this.i);
248
+ this.i += 4;
249
+ return;
250
+ }
251
+ const ns = NormalizedSchema.of(schema);
252
+ const isObject = typeof value === "object";
253
+ if (isObject) {
254
+ if (ns.isStructSchema()) {
255
+ this.writeStruct(ns, value);
256
+ return;
257
+ }
258
+ if (Array.isArray(value) && (ns.isListSchema() || ns.isDocumentSchema())) {
259
+ this.writeList(ns, value, ns.isDocumentSchema());
260
+ return;
261
+ }
262
+ if (ns.isMapSchema()) {
263
+ this.writeMap(ns, value, false);
264
+ return;
265
+ }
266
+ if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) {
267
+ this.writeBase64(value);
268
+ return;
269
+ }
270
+ if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {
271
+ this.writeTimestamp(ns, value);
272
+ return;
273
+ }
274
+ if (value instanceof NumericValue) {
275
+ this.writeAscii(value.string);
276
+ return;
277
+ }
278
+ if (ns.isDocumentSchema()) {
279
+ if (Array.isArray(value)) {
280
+ this.writeList(ns, value, true);
281
+ }
282
+ else {
283
+ this.writeMap(ns, value, true);
284
+ }
285
+ return;
286
+ }
287
+ const json = JSON.stringify(value);
288
+ this.writeAscii(json);
289
+ return;
290
+ }
291
+ if (typeof value === "string") {
292
+ if (ns.isStringSchema()) {
293
+ const mediaType = ns.getMergedTraits().mediaType;
294
+ if (mediaType) {
295
+ const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
296
+ if (isJson) {
297
+ this.writeJsonString(LazyJsonString.from(value).toString());
298
+ return;
299
+ }
300
+ }
301
+ }
302
+ if (ns.isBlobSchema()) {
303
+ const b64 = (this.serdeContext?.base64Encoder ?? toBase64)(value);
304
+ this.writeAsciiQuoted(b64);
305
+ return;
306
+ }
307
+ this.writeJsonString(value);
308
+ return;
309
+ }
310
+ if (typeof value === "number") {
311
+ if (ns.isNumericSchema() && (Math.abs(value) === Infinity || isNaN(value))) {
312
+ this.writeAsciiQuoted(String(value));
313
+ return;
314
+ }
315
+ const numStr = String(value);
316
+ this.writeAscii(numStr);
317
+ return;
318
+ }
319
+ if (typeof value === "boolean") {
320
+ this.ensure(5);
321
+ if (value) {
322
+ this.json.set(TRUE, this.i);
323
+ this.i += 4;
324
+ }
325
+ else {
326
+ this.json.set(FALSE, this.i);
327
+ this.i += 5;
328
+ }
329
+ return;
330
+ }
331
+ if (typeof value === "bigint") {
332
+ this.writeAscii(value.toString());
333
+ return;
334
+ }
335
+ this.writeAscii(String(value));
336
+ }
337
+ writeStruct(ns, value) {
338
+ this.ensure(2);
339
+ this.json[this.i++] = OPEN_BRACE;
340
+ let first = true;
341
+ let wroteAny = false;
342
+ const hasType = typeof value.__type === "string";
343
+ let writtenKeys;
344
+ if (hasType) {
345
+ writtenKeys = new Set();
346
+ }
347
+ for (const [memberName, memberSchema] of ns.structIterator()) {
348
+ const item = value[memberName];
349
+ if (item == null && !memberSchema.isIdempotencyToken())
350
+ continue;
351
+ if (!first) {
352
+ this.ensure(1);
353
+ this.json[this.i++] = COMMA;
354
+ }
355
+ first = false;
356
+ wroteAny = true;
357
+ const targetKey = this.settings.jsonName ? (memberSchema.getMergedTraits().jsonName ?? memberName) : memberName;
358
+ if (writtenKeys) {
359
+ writtenKeys.add(memberName);
360
+ writtenKeys.add(targetKey);
361
+ }
362
+ this.writeAsciiQuoted(targetKey);
363
+ this.json[this.i++] = COLON;
364
+ this.writeValue(memberSchema, item, ns);
365
+ }
366
+ if (!wroteAny && ns.isUnionSchema()) {
367
+ const { $unknown } = value;
368
+ if (Array.isArray($unknown)) {
369
+ const [k, v] = $unknown;
370
+ this.writeAsciiQuoted(k);
371
+ this.ensure(1);
372
+ this.json[this.i++] = COLON;
373
+ this.writeValue(15, v, ns);
374
+ }
375
+ }
376
+ else if (hasType) {
377
+ for (const k in value) {
378
+ const targetKey = this.settings.jsonName ? (writtenKeys.has(k) ? k : k) : k;
379
+ if (writtenKeys.has(targetKey))
380
+ continue;
381
+ writtenKeys.add(targetKey);
382
+ const v = value[k];
383
+ if (!first) {
384
+ this.ensure(1);
385
+ this.json[this.i++] = COMMA;
386
+ }
387
+ first = false;
388
+ this.writeAsciiQuoted(targetKey);
389
+ this.ensure(1);
390
+ this.json[this.i++] = COLON;
391
+ this.writeValue(15, v, undefined);
392
+ }
393
+ }
394
+ this.ensure(1);
395
+ this.json[this.i++] = CLOSE_BRACE;
396
+ }
397
+ writeList(ns, value, isDocument) {
398
+ this.ensure(2);
399
+ this.json[this.i++] = OPEN_BRACKET;
400
+ const sparse = !!ns.getMergedTraits().sparse;
401
+ const valueSchema = ns.getValueSchema();
402
+ for (let i = 0; i < value.length; ++i) {
403
+ const item = value[i];
404
+ if (isDocument ? item === undefined : item == null && !sparse) {
405
+ continue;
406
+ }
407
+ if (i !== 0) {
408
+ this.ensure(1);
409
+ this.json[this.i++] = COMMA;
410
+ }
411
+ this.writeValue(valueSchema, item, undefined);
412
+ }
413
+ this.ensure(1);
414
+ this.json[this.i++] = CLOSE_BRACKET;
415
+ }
416
+ writeMap(ns, value, isDocument) {
417
+ const sparse = !!ns.getMergedTraits().sparse;
418
+ const valueSchema = ns.getValueSchema();
419
+ if (!isDocument) {
420
+ if (valueSchema.isStringSchema() || valueSchema.isNumericSchema() || valueSchema.isBooleanSchema()) {
421
+ let input = value;
422
+ if (sparse) {
423
+ input = {};
424
+ for (const k in value) {
425
+ if (k === "__proto__") {
426
+ writeKey(input);
427
+ }
428
+ input[k] = value[k] ?? null;
429
+ }
430
+ }
431
+ const json = JSON.stringify(input);
432
+ this.ensure(json.length * 3);
433
+ const { written } = encoder.encodeInto(json, this.json.subarray(this.i));
434
+ this.i += written;
435
+ return;
436
+ }
437
+ }
438
+ this.ensure(2);
439
+ this.json[this.i++] = OPEN_BRACE;
440
+ let first = true;
441
+ for (const k in value) {
442
+ const v = value[k];
443
+ if (isDocument ? v === undefined : v == null && !sparse) {
444
+ continue;
445
+ }
446
+ if (!first) {
447
+ this.ensure(1);
448
+ this.json[this.i++] = COMMA;
449
+ }
450
+ first = false;
451
+ this.writeJsonString(k);
452
+ this.ensure(1);
453
+ this.json[this.i++] = COLON;
454
+ this.writeValue(valueSchema, v, undefined);
455
+ }
456
+ this.ensure(1);
457
+ this.json[this.i++] = CLOSE_BRACE;
458
+ }
459
+ writeTimestamp(ns, value) {
460
+ const format = determineTimestampFormat(ns, this.settings);
461
+ switch (format) {
462
+ case 5: {
463
+ const iso = value.toISOString().replace(".000Z", "Z");
464
+ this.writeAsciiQuoted(iso);
465
+ return;
466
+ }
467
+ case 6: {
468
+ this.writeAsciiQuoted(dateToUtcString(value));
469
+ return;
470
+ }
471
+ case 7: {
472
+ const epochSecs = String(value.getTime() / 1000);
473
+ this.writeAscii(epochSecs);
474
+ return;
475
+ }
476
+ default: {
477
+ const epochSecs = String(value.getTime() / 1000);
478
+ this.writeAscii(epochSecs);
479
+ return;
480
+ }
481
+ }
482
+ }
483
+ }
@@ -3,12 +3,18 @@ export function jsonReviver(key, value, context) {
3
3
  if (context?.source) {
4
4
  const numericString = context.source;
5
5
  if (typeof value === "number") {
6
- if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) {
7
- const isFractional = numericString.includes(".");
8
- if (isFractional) {
6
+ const inSafeRange = value <= Number.MAX_SAFE_INTEGER && value >= Number.MIN_SAFE_INTEGER;
7
+ if (!inSafeRange || numericString !== String(value)) {
8
+ if (inSafeRange && /[eE]/.test(numericString) && String(Number(numericString)) === String(value)) {
9
+ return value;
10
+ }
11
+ if (isFractionalNumeric(numericString)) {
9
12
  return new NumericValue(numericString, "bigDecimal");
10
13
  }
11
14
  else {
15
+ if (/[eE]/.test(numericString)) {
16
+ return BigInt(Number(numericString));
17
+ }
12
18
  return BigInt(numericString);
13
19
  }
14
20
  }
@@ -16,3 +22,16 @@ export function jsonReviver(key, value, context) {
16
22
  }
17
23
  return value;
18
24
  }
25
+ function isFractionalNumeric(s) {
26
+ const dotIndex = s.indexOf(".");
27
+ if (dotIndex === -1) {
28
+ return false;
29
+ }
30
+ const eIndex = s.search(/[eE]/);
31
+ if (eIndex === -1) {
32
+ return true;
33
+ }
34
+ const fracDigits = eIndex - dotIndex - 1;
35
+ const exp = parseInt(s.slice(eIndex + 1), 10);
36
+ return exp < fracDigits;
37
+ }