@cdk8s/awscdk-resolver 0.0.374 → 0.0.376

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 (423) hide show
  1. package/.jsii +2 -2
  2. package/lib/resolve.js +1 -1
  3. package/node_modules/@smithy/abort-controller/dist-cjs/index.js +28 -80
  4. package/node_modules/@smithy/abort-controller/dist-es/AbortController.js +1 -3
  5. package/node_modules/@smithy/abort-controller/dist-es/AbortSignal.js +2 -2
  6. package/node_modules/@smithy/abort-controller/package.json +2 -2
  7. package/node_modules/@smithy/config-resolver/dist-cjs/index.js +158 -215
  8. package/node_modules/@smithy/config-resolver/package.json +5 -5
  9. package/node_modules/@smithy/core/dist-cjs/index.js +308 -412
  10. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +957 -969
  11. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +198 -249
  12. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +793 -895
  13. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +617 -811
  14. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +584 -680
  15. package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +4 -0
  16. package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +3 -3
  17. package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-decode.js +18 -18
  18. package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +5 -5
  19. package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +5 -0
  20. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +2 -0
  21. package/node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js +9 -7
  22. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +2 -0
  23. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js +3 -0
  24. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeSerializer.js +3 -0
  25. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +3 -2
  26. package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +4 -1
  27. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/ErrorSchema.js +3 -5
  28. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js +5 -5
  29. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js +6 -5
  30. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +16 -8
  31. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js +6 -5
  32. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js +3 -0
  33. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js +5 -5
  34. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js +6 -5
  35. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/sentinels.js +14 -14
  36. package/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +2 -0
  37. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js +1 -1
  38. package/node_modules/@smithy/core/dist-es/util-identity-and-auth/memoizeIdentityProvider.js +4 -2
  39. package/node_modules/@smithy/core/package.json +11 -11
  40. package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +340 -412
  41. package/node_modules/@smithy/credential-provider-imds/dist-es/error/InstanceMetadataV1FallbackError.js +2 -1
  42. package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
  43. package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +190 -238
  44. package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +2 -0
  45. package/node_modules/@smithy/fetch-http-handler/package.json +6 -6
  46. package/node_modules/@smithy/hash-node/dist-cjs/index.js +38 -63
  47. package/node_modules/@smithy/hash-node/dist-es/index.js +3 -0
  48. package/node_modules/@smithy/hash-node/package.json +4 -4
  49. package/node_modules/@smithy/invalid-dependency/dist-cjs/index.js +7 -38
  50. package/node_modules/@smithy/invalid-dependency/package.json +2 -2
  51. package/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +4 -30
  52. package/node_modules/@smithy/is-array-buffer/package.json +1 -1
  53. package/node_modules/@smithy/middleware-content-length/dist-cjs/index.js +39 -64
  54. package/node_modules/@smithy/middleware-content-length/package.json +3 -3
  55. package/node_modules/@smithy/middleware-endpoint/dist-cjs/adaptors/getEndpointFromConfig.js +1 -1
  56. package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +219 -277
  57. package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
  58. package/node_modules/@smithy/middleware-retry/dist-cjs/index.js +327 -380
  59. package/node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.browser.js +1 -1
  60. package/node_modules/@smithy/middleware-retry/dist-cjs/isStreamingPayload/isStreamingPayload.js +2 -2
  61. package/node_modules/@smithy/middleware-retry/dist-es/AdaptiveRetryStrategy.js +1 -0
  62. package/node_modules/@smithy/middleware-retry/dist-es/StandardRetryStrategy.js +5 -1
  63. package/node_modules/@smithy/middleware-retry/package.json +9 -9
  64. package/node_modules/@smithy/middleware-serde/dist-cjs/index.js +89 -118
  65. package/node_modules/@smithy/middleware-serde/package.json +3 -3
  66. package/node_modules/@smithy/middleware-stack/dist-cjs/index.js +274 -297
  67. package/node_modules/@smithy/middleware-stack/package.json +2 -2
  68. package/node_modules/@smithy/node-config-provider/dist-cjs/index.js +51 -98
  69. package/node_modules/@smithy/node-config-provider/package.json +4 -4
  70. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +663 -771
  71. package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +5 -3
  72. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +2 -1
  73. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +1 -1
  74. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +4 -2
  75. package/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +3 -1
  76. package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +1 -4
  77. package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +3 -1
  78. package/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +1 -1
  79. package/node_modules/@smithy/node-http-handler/package.json +5 -5
  80. package/node_modules/@smithy/property-provider/dist-cjs/index.js +105 -158
  81. package/node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js +1 -1
  82. package/node_modules/@smithy/property-provider/dist-es/ProviderError.js +2 -1
  83. package/node_modules/@smithy/property-provider/dist-es/TokenProviderError.js +1 -1
  84. package/node_modules/@smithy/property-provider/package.json +2 -2
  85. package/node_modules/@smithy/protocol-http/dist-cjs/index.js +154 -246
  86. package/node_modules/@smithy/protocol-http/dist-es/Field.js +3 -0
  87. package/node_modules/@smithy/protocol-http/dist-es/Fields.js +2 -1
  88. package/node_modules/@smithy/protocol-http/dist-es/httpRequest.js +11 -0
  89. package/node_modules/@smithy/protocol-http/dist-es/httpResponse.js +4 -0
  90. package/node_modules/@smithy/protocol-http/package.json +2 -2
  91. package/node_modules/@smithy/querystring-builder/dist-cjs/index.js +21 -47
  92. package/node_modules/@smithy/querystring-builder/package.json +3 -3
  93. package/node_modules/@smithy/querystring-parser/dist-cjs/index.js +22 -48
  94. package/node_modules/@smithy/querystring-parser/package.json +2 -2
  95. package/node_modules/@smithy/service-error-classification/dist-cjs/index.js +70 -103
  96. package/node_modules/@smithy/service-error-classification/package.json +2 -2
  97. package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +171 -210
  98. package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/slurpFile.js +1 -1
  99. package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
  100. package/node_modules/@smithy/signature-v4/dist-cjs/index.js +525 -648
  101. package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +2 -1
  102. package/node_modules/@smithy/signature-v4/dist-es/SignatureV4.js +1 -1
  103. package/node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +6 -0
  104. package/node_modules/@smithy/signature-v4/package.json +8 -8
  105. package/node_modules/@smithy/smithy-client/dist-cjs/index.js +554 -747
  106. package/node_modules/@smithy/smithy-client/dist-es/client.js +4 -1
  107. package/node_modules/@smithy/smithy-client/dist-es/command.js +17 -18
  108. package/node_modules/@smithy/smithy-client/dist-es/exceptions.js +4 -0
  109. package/node_modules/@smithy/smithy-client/package.json +7 -7
  110. package/node_modules/@smithy/types/dist-cjs/index.js +80 -133
  111. package/node_modules/@smithy/types/package.json +1 -1
  112. package/node_modules/@smithy/url-parser/dist-cjs/index.js +20 -46
  113. package/node_modules/@smithy/url-parser/package.json +3 -3
  114. package/node_modules/@smithy/util-base64/dist-cjs/index.js +16 -24
  115. package/node_modules/@smithy/util-base64/package.json +3 -3
  116. package/node_modules/@smithy/util-body-length-browser/dist-cjs/index.js +26 -50
  117. package/node_modules/@smithy/util-body-length-browser/package.json +1 -1
  118. package/node_modules/@smithy/util-body-length-node/dist-cjs/index.js +27 -50
  119. package/node_modules/@smithy/util-body-length-node/package.json +1 -1
  120. package/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +17 -44
  121. package/node_modules/@smithy/util-buffer-from/package.json +2 -2
  122. package/node_modules/@smithy/util-config-provider/dist-cjs/index.js +26 -56
  123. package/node_modules/@smithy/util-config-provider/package.json +1 -1
  124. package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/index.js +9 -22
  125. package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.js +4 -5
  126. package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.native.js +2 -2
  127. package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -4
  128. package/node_modules/@smithy/util-defaults-mode-node/dist-cjs/index.js +65 -110
  129. package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
  130. package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +445 -526
  131. package/node_modules/@smithy/util-endpoints/dist-es/cache/EndpointCache.js +3 -2
  132. package/node_modules/@smithy/util-endpoints/package.json +3 -3
  133. package/node_modules/@smithy/util-hex-encoding/dist-cjs/index.js +29 -58
  134. package/node_modules/@smithy/util-hex-encoding/package.json +1 -1
  135. package/node_modules/@smithy/util-middleware/dist-cjs/index.js +11 -40
  136. package/node_modules/@smithy/util-middleware/package.json +2 -2
  137. package/node_modules/@smithy/util-retry/dist-cjs/index.js +260 -340
  138. package/node_modules/@smithy/util-retry/dist-es/AdaptiveRetryStrategy.js +4 -1
  139. package/node_modules/@smithy/util-retry/dist-es/ConfiguredRetryStrategy.js +1 -0
  140. package/node_modules/@smithy/util-retry/dist-es/DefaultRateLimiter.js +17 -8
  141. package/node_modules/@smithy/util-retry/dist-es/StandardRetryStrategy.js +5 -3
  142. package/node_modules/@smithy/util-retry/package.json +3 -3
  143. package/node_modules/@smithy/util-stream/dist-cjs/ByteArrayCollector.js +3 -2
  144. package/node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js +7 -3
  145. package/node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js +2 -3
  146. package/node_modules/@smithy/util-stream/dist-cjs/createBufferedReadable.js +1 -1
  147. package/node_modules/@smithy/util-stream/dist-cjs/createBufferedReadableStream.js +2 -3
  148. package/node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js +1 -2
  149. package/node_modules/@smithy/util-stream/dist-cjs/headStream.js +4 -8
  150. package/node_modules/@smithy/util-stream/dist-cjs/index.js +83 -93
  151. package/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js +1 -2
  152. package/node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js +1 -2
  153. package/node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js +3 -7
  154. package/node_modules/@smithy/util-stream/dist-es/ByteArrayCollector.js +3 -2
  155. package/node_modules/@smithy/util-stream/dist-es/checksum/ChecksumStream.js +5 -0
  156. package/node_modules/@smithy/util-stream/dist-es/headStream.js +3 -6
  157. package/node_modules/@smithy/util-stream/package.json +8 -8
  158. package/node_modules/@smithy/util-uri-escape/dist-cjs/index.js +6 -40
  159. package/node_modules/@smithy/util-uri-escape/package.json +1 -1
  160. package/node_modules/@smithy/util-utf8/dist-cjs/index.js +27 -60
  161. package/node_modules/@smithy/util-utf8/package.json +2 -2
  162. package/node_modules/@smithy/util-waiter/dist-cjs/index.js +152 -189
  163. package/node_modules/@smithy/util-waiter/package.json +3 -3
  164. package/node_modules/@smithy/uuid/dist-cjs/index.js +33 -42
  165. package/node_modules/@smithy/uuid/package.json +1 -1
  166. package/package.json +6 -6
  167. package/node_modules/@smithy/abort-controller/dist-cjs/AbortController.js +0 -1
  168. package/node_modules/@smithy/abort-controller/dist-cjs/AbortSignal.js +0 -1
  169. package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js +0 -1
  170. package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/NodeUseFipsEndpointConfigOptions.js +0 -1
  171. package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/index.js +0 -1
  172. package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/resolveCustomEndpointsConfig.js +0 -1
  173. package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/resolveEndpointsConfig.js +0 -1
  174. package/node_modules/@smithy/config-resolver/dist-cjs/endpointsConfig/utils/getEndpointFromRegion.js +0 -1
  175. package/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/config.js +0 -1
  176. package/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/getRealRegion.js +0 -1
  177. package/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/index.js +0 -1
  178. package/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/isFipsRegion.js +0 -1
  179. package/node_modules/@smithy/config-resolver/dist-cjs/regionConfig/resolveRegionConfig.js +0 -1
  180. package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/EndpointVariant.js +0 -1
  181. package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/EndpointVariantTag.js +0 -1
  182. package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/PartitionHash.js +0 -1
  183. package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/RegionHash.js +0 -1
  184. package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getHostnameFromVariants.js +0 -1
  185. package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getRegionInfo.js +0 -1
  186. package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedHostname.js +0 -1
  187. package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedPartition.js +0 -1
  188. package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/getResolvedSigningRegion.js +0 -1
  189. package/node_modules/@smithy/config-resolver/dist-cjs/regionInfo/index.js +0 -1
  190. package/node_modules/@smithy/credential-provider-imds/dist-cjs/config/Endpoint.js +0 -1
  191. package/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointConfigOptions.js +0 -1
  192. package/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointMode.js +0 -1
  193. package/node_modules/@smithy/credential-provider-imds/dist-cjs/config/EndpointModeConfigOptions.js +0 -1
  194. package/node_modules/@smithy/credential-provider-imds/dist-cjs/error/InstanceMetadataV1FallbackError.js +0 -1
  195. package/node_modules/@smithy/credential-provider-imds/dist-cjs/fromContainerMetadata.js +0 -1
  196. package/node_modules/@smithy/credential-provider-imds/dist-cjs/fromInstanceMetadata.js +0 -1
  197. package/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/ImdsCredentials.js +0 -1
  198. package/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/RemoteProviderInit.js +0 -1
  199. package/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/httpRequest.js +0 -1
  200. package/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/index.js +0 -1
  201. package/node_modules/@smithy/credential-provider-imds/dist-cjs/remoteProvider/retry.js +0 -1
  202. package/node_modules/@smithy/credential-provider-imds/dist-cjs/types.js +0 -1
  203. package/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/getExtendedInstanceMetadataCredentials.js +0 -1
  204. package/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/getInstanceMetadataEndpoint.js +0 -1
  205. package/node_modules/@smithy/credential-provider-imds/dist-cjs/utils/staticStabilityProvider.js +0 -1
  206. package/node_modules/@smithy/fetch-http-handler/dist-cjs/create-request.js +0 -1
  207. package/node_modules/@smithy/fetch-http-handler/dist-cjs/fetch-http-handler.js +0 -1
  208. package/node_modules/@smithy/fetch-http-handler/dist-cjs/request-timeout.js +0 -1
  209. package/node_modules/@smithy/fetch-http-handler/dist-cjs/stream-collector.js +0 -1
  210. package/node_modules/@smithy/invalid-dependency/dist-cjs/invalidFunction.js +0 -1
  211. package/node_modules/@smithy/invalid-dependency/dist-cjs/invalidProvider.js +0 -1
  212. package/node_modules/@smithy/middleware-serde/dist-cjs/deserializerMiddleware.js +0 -1
  213. package/node_modules/@smithy/middleware-serde/dist-cjs/serdePlugin.js +0 -1
  214. package/node_modules/@smithy/middleware-serde/dist-cjs/serializerMiddleware.js +0 -1
  215. package/node_modules/@smithy/middleware-stack/dist-cjs/MiddlewareStack.js +0 -1
  216. package/node_modules/@smithy/middleware-stack/dist-cjs/types.js +0 -1
  217. package/node_modules/@smithy/node-config-provider/dist-cjs/configLoader.js +0 -1
  218. package/node_modules/@smithy/node-config-provider/dist-cjs/fromEnv.js +0 -1
  219. package/node_modules/@smithy/node-config-provider/dist-cjs/fromSharedConfigFiles.js +0 -1
  220. package/node_modules/@smithy/node-config-provider/dist-cjs/fromStatic.js +0 -1
  221. package/node_modules/@smithy/node-config-provider/dist-cjs/getSelectorName.js +0 -1
  222. package/node_modules/@smithy/node-http-handler/dist-cjs/constants.js +0 -1
  223. package/node_modules/@smithy/node-http-handler/dist-cjs/get-transformed-headers.js +0 -1
  224. package/node_modules/@smithy/node-http-handler/dist-cjs/node-http-handler.js +0 -1
  225. package/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-connection-manager.js +0 -1
  226. package/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-connection-pool.js +0 -1
  227. package/node_modules/@smithy/node-http-handler/dist-cjs/node-http2-handler.js +0 -1
  228. package/node_modules/@smithy/node-http-handler/dist-cjs/readable.mock.js +0 -1
  229. package/node_modules/@smithy/node-http-handler/dist-cjs/server.mock.js +0 -1
  230. package/node_modules/@smithy/node-http-handler/dist-cjs/set-connection-timeout.js +0 -1
  231. package/node_modules/@smithy/node-http-handler/dist-cjs/set-socket-keep-alive.js +0 -1
  232. package/node_modules/@smithy/node-http-handler/dist-cjs/set-socket-timeout.js +0 -1
  233. package/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/collector.js +0 -1
  234. package/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/index.js +0 -1
  235. package/node_modules/@smithy/node-http-handler/dist-cjs/stream-collector/readable.mock.js +0 -1
  236. package/node_modules/@smithy/node-http-handler/dist-cjs/timing.js +0 -1
  237. package/node_modules/@smithy/node-http-handler/dist-cjs/write-request-body.js +0 -1
  238. package/node_modules/@smithy/property-provider/dist-cjs/CredentialsProviderError.js +0 -1
  239. package/node_modules/@smithy/property-provider/dist-cjs/ProviderError.js +0 -1
  240. package/node_modules/@smithy/property-provider/dist-cjs/TokenProviderError.js +0 -1
  241. package/node_modules/@smithy/property-provider/dist-cjs/chain.js +0 -1
  242. package/node_modules/@smithy/property-provider/dist-cjs/fromStatic.js +0 -1
  243. package/node_modules/@smithy/property-provider/dist-cjs/memoize.js +0 -1
  244. package/node_modules/@smithy/protocol-http/dist-cjs/Field.js +0 -1
  245. package/node_modules/@smithy/protocol-http/dist-cjs/Fields.js +0 -1
  246. package/node_modules/@smithy/protocol-http/dist-cjs/extensions/httpExtensionConfiguration.js +0 -1
  247. package/node_modules/@smithy/protocol-http/dist-cjs/extensions/index.js +0 -1
  248. package/node_modules/@smithy/protocol-http/dist-cjs/httpHandler.js +0 -1
  249. package/node_modules/@smithy/protocol-http/dist-cjs/httpRequest.js +0 -1
  250. package/node_modules/@smithy/protocol-http/dist-cjs/httpResponse.js +0 -1
  251. package/node_modules/@smithy/protocol-http/dist-cjs/isValidHostname.js +0 -1
  252. package/node_modules/@smithy/protocol-http/dist-cjs/types.js +0 -1
  253. package/node_modules/@smithy/service-error-classification/dist-cjs/constants.js +0 -1
  254. package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/externalDataInterceptor.js +0 -1
  255. package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigData.js +0 -1
  256. package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getConfigFilepath.js +0 -1
  257. package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getCredentialsFilepath.js +0 -1
  258. package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getProfileName.js +0 -1
  259. package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSsoSessionData.js +0 -1
  260. package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSharedConfigFiles.js +0 -1
  261. package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/loadSsoSessionData.js +0 -1
  262. package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/mergeConfigFiles.js +0 -1
  263. package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseIni.js +0 -1
  264. package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/parseKnownFiles.js +0 -1
  265. package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/types.js +0 -1
  266. package/node_modules/@smithy/signature-v4/dist-cjs/HeaderFormatter.js +0 -1
  267. package/node_modules/@smithy/signature-v4/dist-cjs/SignatureV4.js +0 -1
  268. package/node_modules/@smithy/signature-v4/dist-cjs/SignatureV4Base.js +0 -1
  269. package/node_modules/@smithy/signature-v4/dist-cjs/constants.js +0 -1
  270. package/node_modules/@smithy/signature-v4/dist-cjs/credentialDerivation.js +0 -1
  271. package/node_modules/@smithy/signature-v4/dist-cjs/getCanonicalHeaders.js +0 -1
  272. package/node_modules/@smithy/signature-v4/dist-cjs/getCanonicalQuery.js +0 -1
  273. package/node_modules/@smithy/signature-v4/dist-cjs/getPayloadHash.js +0 -1
  274. package/node_modules/@smithy/signature-v4/dist-cjs/headerUtil.js +0 -1
  275. package/node_modules/@smithy/signature-v4/dist-cjs/moveHeadersToQuery.js +0 -1
  276. package/node_modules/@smithy/signature-v4/dist-cjs/prepareRequest.js +0 -1
  277. package/node_modules/@smithy/signature-v4/dist-cjs/signature-v4a-container.js +0 -1
  278. package/node_modules/@smithy/signature-v4/dist-cjs/suite.fixture.js +0 -1
  279. package/node_modules/@smithy/signature-v4/dist-cjs/utilDate.js +0 -1
  280. package/node_modules/@smithy/types/dist-cjs/abort-handler.js +0 -1
  281. package/node_modules/@smithy/types/dist-cjs/abort.js +0 -1
  282. package/node_modules/@smithy/types/dist-cjs/auth/HttpApiKeyAuth.js +0 -1
  283. package/node_modules/@smithy/types/dist-cjs/auth/HttpAuthScheme.js +0 -1
  284. package/node_modules/@smithy/types/dist-cjs/auth/HttpAuthSchemeProvider.js +0 -1
  285. package/node_modules/@smithy/types/dist-cjs/auth/HttpSigner.js +0 -1
  286. package/node_modules/@smithy/types/dist-cjs/auth/IdentityProviderConfig.js +0 -1
  287. package/node_modules/@smithy/types/dist-cjs/auth/auth.js +0 -1
  288. package/node_modules/@smithy/types/dist-cjs/auth/index.js +0 -1
  289. package/node_modules/@smithy/types/dist-cjs/blob/blob-payload-input-types.js +0 -1
  290. package/node_modules/@smithy/types/dist-cjs/checksum.js +0 -1
  291. package/node_modules/@smithy/types/dist-cjs/client.js +0 -1
  292. package/node_modules/@smithy/types/dist-cjs/command.js +0 -1
  293. package/node_modules/@smithy/types/dist-cjs/connection/config.js +0 -1
  294. package/node_modules/@smithy/types/dist-cjs/connection/index.js +0 -1
  295. package/node_modules/@smithy/types/dist-cjs/connection/manager.js +0 -1
  296. package/node_modules/@smithy/types/dist-cjs/connection/pool.js +0 -1
  297. package/node_modules/@smithy/types/dist-cjs/crypto.js +0 -1
  298. package/node_modules/@smithy/types/dist-cjs/downlevel-ts3.4/transform/type-transform.js +0 -1
  299. package/node_modules/@smithy/types/dist-cjs/encode.js +0 -1
  300. package/node_modules/@smithy/types/dist-cjs/endpoint.js +0 -1
  301. package/node_modules/@smithy/types/dist-cjs/endpoints/EndpointRuleObject.js +0 -1
  302. package/node_modules/@smithy/types/dist-cjs/endpoints/ErrorRuleObject.js +0 -1
  303. package/node_modules/@smithy/types/dist-cjs/endpoints/RuleSetObject.js +0 -1
  304. package/node_modules/@smithy/types/dist-cjs/endpoints/TreeRuleObject.js +0 -1
  305. package/node_modules/@smithy/types/dist-cjs/endpoints/index.js +0 -1
  306. package/node_modules/@smithy/types/dist-cjs/endpoints/shared.js +0 -1
  307. package/node_modules/@smithy/types/dist-cjs/eventStream.js +0 -1
  308. package/node_modules/@smithy/types/dist-cjs/extensions/checksum.js +0 -1
  309. package/node_modules/@smithy/types/dist-cjs/extensions/defaultClientConfiguration.js +0 -1
  310. package/node_modules/@smithy/types/dist-cjs/extensions/defaultExtensionConfiguration.js +0 -1
  311. package/node_modules/@smithy/types/dist-cjs/extensions/index.js +0 -1
  312. package/node_modules/@smithy/types/dist-cjs/extensions/retry.js +0 -1
  313. package/node_modules/@smithy/types/dist-cjs/externals-check/browser-externals-check.js +0 -1
  314. package/node_modules/@smithy/types/dist-cjs/feature-ids.js +0 -1
  315. package/node_modules/@smithy/types/dist-cjs/http/httpHandlerInitialization.js +0 -1
  316. package/node_modules/@smithy/types/dist-cjs/http.js +0 -1
  317. package/node_modules/@smithy/types/dist-cjs/identity/apiKeyIdentity.js +0 -1
  318. package/node_modules/@smithy/types/dist-cjs/identity/awsCredentialIdentity.js +0 -1
  319. package/node_modules/@smithy/types/dist-cjs/identity/identity.js +0 -1
  320. package/node_modules/@smithy/types/dist-cjs/identity/index.js +0 -1
  321. package/node_modules/@smithy/types/dist-cjs/identity/tokenIdentity.js +0 -1
  322. package/node_modules/@smithy/types/dist-cjs/logger.js +0 -1
  323. package/node_modules/@smithy/types/dist-cjs/middleware.js +0 -1
  324. package/node_modules/@smithy/types/dist-cjs/pagination.js +0 -1
  325. package/node_modules/@smithy/types/dist-cjs/profile.js +0 -1
  326. package/node_modules/@smithy/types/dist-cjs/response.js +0 -1
  327. package/node_modules/@smithy/types/dist-cjs/retry.js +0 -1
  328. package/node_modules/@smithy/types/dist-cjs/schema/schema.js +0 -1
  329. package/node_modules/@smithy/types/dist-cjs/schema/sentinels.js +0 -1
  330. package/node_modules/@smithy/types/dist-cjs/schema/traits.js +0 -1
  331. package/node_modules/@smithy/types/dist-cjs/serde.js +0 -1
  332. package/node_modules/@smithy/types/dist-cjs/shapes.js +0 -1
  333. package/node_modules/@smithy/types/dist-cjs/signature.js +0 -1
  334. package/node_modules/@smithy/types/dist-cjs/stream.js +0 -1
  335. package/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-common-types.js +0 -1
  336. package/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-input-types.js +0 -1
  337. package/node_modules/@smithy/types/dist-cjs/streaming-payload/streaming-blob-payload-output-types.js +0 -1
  338. package/node_modules/@smithy/types/dist-cjs/transfer.js +0 -1
  339. package/node_modules/@smithy/types/dist-cjs/transform/client-method-transforms.js +0 -1
  340. package/node_modules/@smithy/types/dist-cjs/transform/client-payload-blob-type-narrow.js +0 -1
  341. package/node_modules/@smithy/types/dist-cjs/transform/exact.js +0 -1
  342. package/node_modules/@smithy/types/dist-cjs/transform/mutable.js +0 -1
  343. package/node_modules/@smithy/types/dist-cjs/transform/no-undefined.js +0 -1
  344. package/node_modules/@smithy/types/dist-cjs/transform/type-transform.js +0 -1
  345. package/node_modules/@smithy/types/dist-cjs/uri.js +0 -1
  346. package/node_modules/@smithy/types/dist-cjs/util.js +0 -1
  347. package/node_modules/@smithy/types/dist-cjs/waiter.js +0 -1
  348. package/node_modules/@smithy/util-body-length-browser/dist-cjs/calculateBodyLength.js +0 -1
  349. package/node_modules/@smithy/util-body-length-node/dist-cjs/calculateBodyLength.js +0 -1
  350. package/node_modules/@smithy/util-config-provider/dist-cjs/booleanSelector.js +0 -1
  351. package/node_modules/@smithy/util-config-provider/dist-cjs/numberSelector.js +0 -1
  352. package/node_modules/@smithy/util-config-provider/dist-cjs/types.js +0 -1
  353. package/node_modules/@smithy/util-endpoints/dist-cjs/cache/EndpointCache.js +0 -1
  354. package/node_modules/@smithy/util-endpoints/dist-cjs/debug/debugId.js +0 -1
  355. package/node_modules/@smithy/util-endpoints/dist-cjs/debug/index.js +0 -1
  356. package/node_modules/@smithy/util-endpoints/dist-cjs/debug/toDebugString.js +0 -1
  357. package/node_modules/@smithy/util-endpoints/dist-cjs/getEndpointUrlConfig.js +0 -1
  358. package/node_modules/@smithy/util-endpoints/dist-cjs/lib/booleanEquals.js +0 -1
  359. package/node_modules/@smithy/util-endpoints/dist-cjs/lib/getAttr.js +0 -1
  360. package/node_modules/@smithy/util-endpoints/dist-cjs/lib/getAttrPathList.js +0 -1
  361. package/node_modules/@smithy/util-endpoints/dist-cjs/lib/index.js +0 -1
  362. package/node_modules/@smithy/util-endpoints/dist-cjs/lib/isIpAddress.js +0 -1
  363. package/node_modules/@smithy/util-endpoints/dist-cjs/lib/isSet.js +0 -1
  364. package/node_modules/@smithy/util-endpoints/dist-cjs/lib/isValidHostLabel.js +0 -1
  365. package/node_modules/@smithy/util-endpoints/dist-cjs/lib/not.js +0 -1
  366. package/node_modules/@smithy/util-endpoints/dist-cjs/lib/parseURL.js +0 -1
  367. package/node_modules/@smithy/util-endpoints/dist-cjs/lib/stringEquals.js +0 -1
  368. package/node_modules/@smithy/util-endpoints/dist-cjs/lib/substring.js +0 -1
  369. package/node_modules/@smithy/util-endpoints/dist-cjs/lib/uriEncode.js +0 -1
  370. package/node_modules/@smithy/util-endpoints/dist-cjs/resolveEndpoint.js +0 -1
  371. package/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointError.js +0 -1
  372. package/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointFunctions.js +0 -1
  373. package/node_modules/@smithy/util-endpoints/dist-cjs/types/EndpointRuleObject.js +0 -1
  374. package/node_modules/@smithy/util-endpoints/dist-cjs/types/ErrorRuleObject.js +0 -1
  375. package/node_modules/@smithy/util-endpoints/dist-cjs/types/RuleSetObject.js +0 -1
  376. package/node_modules/@smithy/util-endpoints/dist-cjs/types/TreeRuleObject.js +0 -1
  377. package/node_modules/@smithy/util-endpoints/dist-cjs/types/index.js +0 -1
  378. package/node_modules/@smithy/util-endpoints/dist-cjs/types/shared.js +0 -1
  379. package/node_modules/@smithy/util-endpoints/dist-cjs/utils/callFunction.js +0 -1
  380. package/node_modules/@smithy/util-endpoints/dist-cjs/utils/customEndpointFunctions.js +0 -1
  381. package/node_modules/@smithy/util-endpoints/dist-cjs/utils/endpointFunctions.js +0 -1
  382. package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateCondition.js +0 -1
  383. package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateConditions.js +0 -1
  384. package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateEndpointRule.js +0 -1
  385. package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateErrorRule.js +0 -1
  386. package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateExpression.js +0 -1
  387. package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateRules.js +0 -1
  388. package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateTemplate.js +0 -1
  389. package/node_modules/@smithy/util-endpoints/dist-cjs/utils/evaluateTreeRule.js +0 -1
  390. package/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointHeaders.js +0 -1
  391. package/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointProperties.js +0 -1
  392. package/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointProperty.js +0 -1
  393. package/node_modules/@smithy/util-endpoints/dist-cjs/utils/getEndpointUrl.js +0 -1
  394. package/node_modules/@smithy/util-endpoints/dist-cjs/utils/getReferenceValue.js +0 -1
  395. package/node_modules/@smithy/util-endpoints/dist-cjs/utils/index.js +0 -1
  396. package/node_modules/@smithy/util-middleware/dist-cjs/getSmithyContext.js +0 -1
  397. package/node_modules/@smithy/util-middleware/dist-cjs/normalizeProvider.js +0 -1
  398. package/node_modules/@smithy/util-retry/dist-cjs/AdaptiveRetryStrategy.js +0 -1
  399. package/node_modules/@smithy/util-retry/dist-cjs/ConfiguredRetryStrategy.js +0 -1
  400. package/node_modules/@smithy/util-retry/dist-cjs/DefaultRateLimiter.js +0 -1
  401. package/node_modules/@smithy/util-retry/dist-cjs/StandardRetryStrategy.js +0 -1
  402. package/node_modules/@smithy/util-retry/dist-cjs/config.js +0 -1
  403. package/node_modules/@smithy/util-retry/dist-cjs/constants.js +0 -1
  404. package/node_modules/@smithy/util-retry/dist-cjs/defaultRetryBackoffStrategy.js +0 -1
  405. package/node_modules/@smithy/util-retry/dist-cjs/defaultRetryToken.js +0 -1
  406. package/node_modules/@smithy/util-retry/dist-cjs/types.js +0 -1
  407. package/node_modules/@smithy/util-stream/dist-cjs/blob/Uint8ArrayBlobAdapter.js +0 -1
  408. package/node_modules/@smithy/util-stream/dist-cjs/blob/transforms.js +0 -1
  409. package/node_modules/@smithy/util-uri-escape/dist-cjs/escape-uri-path.js +0 -1
  410. package/node_modules/@smithy/util-uri-escape/dist-cjs/escape-uri.js +0 -1
  411. package/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.browser.js +0 -1
  412. package/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.js +0 -1
  413. package/node_modules/@smithy/util-utf8/dist-cjs/toUint8Array.js +0 -1
  414. package/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.browser.js +0 -1
  415. package/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.js +0 -1
  416. package/node_modules/@smithy/util-waiter/dist-cjs/createWaiter.js +0 -1
  417. package/node_modules/@smithy/util-waiter/dist-cjs/poller.js +0 -1
  418. package/node_modules/@smithy/util-waiter/dist-cjs/utils/index.js +0 -1
  419. package/node_modules/@smithy/util-waiter/dist-cjs/utils/sleep.js +0 -1
  420. package/node_modules/@smithy/util-waiter/dist-cjs/utils/validate.js +0 -1
  421. package/node_modules/@smithy/util-waiter/dist-cjs/waiter.js +0 -1
  422. package/node_modules/@smithy/uuid/dist-cjs/randomUUID.browser.js +0 -1
  423. package/node_modules/@smithy/uuid/dist-cjs/v4.js +0 -1
@@ -1,710 +1,614 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ 'use strict';
18
2
 
19
- // src/submodules/serde/index.ts
20
- var index_exports = {};
21
- __export(index_exports, {
22
- LazyJsonString: () => LazyJsonString,
23
- NumericValue: () => NumericValue,
24
- copyDocumentWithTransform: () => copyDocumentWithTransform,
25
- dateToUtcString: () => dateToUtcString,
26
- expectBoolean: () => expectBoolean,
27
- expectByte: () => expectByte,
28
- expectFloat32: () => expectFloat32,
29
- expectInt: () => expectInt,
30
- expectInt32: () => expectInt32,
31
- expectLong: () => expectLong,
32
- expectNonNull: () => expectNonNull,
33
- expectNumber: () => expectNumber,
34
- expectObject: () => expectObject,
35
- expectShort: () => expectShort,
36
- expectString: () => expectString,
37
- expectUnion: () => expectUnion,
38
- generateIdempotencyToken: () => import_uuid.v4,
39
- handleFloat: () => handleFloat,
40
- limitedParseDouble: () => limitedParseDouble,
41
- limitedParseFloat: () => limitedParseFloat,
42
- limitedParseFloat32: () => limitedParseFloat32,
43
- logger: () => logger,
44
- nv: () => nv,
45
- parseBoolean: () => parseBoolean,
46
- parseEpochTimestamp: () => parseEpochTimestamp,
47
- parseRfc3339DateTime: () => parseRfc3339DateTime,
48
- parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset,
49
- parseRfc7231DateTime: () => parseRfc7231DateTime,
50
- quoteHeader: () => quoteHeader,
51
- splitEvery: () => splitEvery,
52
- splitHeader: () => splitHeader,
53
- strictParseByte: () => strictParseByte,
54
- strictParseDouble: () => strictParseDouble,
55
- strictParseFloat: () => strictParseFloat,
56
- strictParseFloat32: () => strictParseFloat32,
57
- strictParseInt: () => strictParseInt,
58
- strictParseInt32: () => strictParseInt32,
59
- strictParseLong: () => strictParseLong,
60
- strictParseShort: () => strictParseShort
61
- });
62
- module.exports = __toCommonJS(index_exports);
3
+ var uuid = require('@smithy/uuid');
63
4
 
64
- // src/submodules/serde/copyDocumentWithTransform.ts
65
- var copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source;
5
+ const copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source;
66
6
 
67
- // src/submodules/serde/parse-utils.ts
68
- var parseBoolean = (value) => {
69
- switch (value) {
70
- case "true":
71
- return true;
72
- case "false":
73
- return false;
74
- default:
75
- throw new Error(`Unable to parse boolean value "${value}"`);
76
- }
77
- };
78
- var expectBoolean = (value) => {
79
- if (value === null || value === void 0) {
80
- return void 0;
81
- }
82
- if (typeof value === "number") {
83
- if (value === 0 || value === 1) {
84
- logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));
85
- }
86
- if (value === 0) {
87
- return false;
88
- }
89
- if (value === 1) {
90
- return true;
91
- }
92
- }
93
- if (typeof value === "string") {
94
- const lower = value.toLowerCase();
95
- if (lower === "false" || lower === "true") {
96
- logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));
97
- }
98
- if (lower === "false") {
99
- return false;
100
- }
101
- if (lower === "true") {
102
- return true;
103
- }
104
- }
105
- if (typeof value === "boolean") {
106
- return value;
107
- }
108
- throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);
109
- };
110
- var expectNumber = (value) => {
111
- if (value === null || value === void 0) {
112
- return void 0;
113
- }
114
- if (typeof value === "string") {
115
- const parsed = parseFloat(value);
116
- if (!Number.isNaN(parsed)) {
117
- if (String(parsed) !== String(value)) {
118
- logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));
119
- }
120
- return parsed;
121
- }
122
- }
123
- if (typeof value === "number") {
124
- return value;
125
- }
126
- throw new TypeError(`Expected number, got ${typeof value}: ${value}`);
127
- };
128
- var MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));
129
- var expectFloat32 = (value) => {
130
- const expected = expectNumber(value);
131
- if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {
132
- if (Math.abs(expected) > MAX_FLOAT) {
133
- throw new TypeError(`Expected 32-bit float, got ${value}`);
134
- }
135
- }
136
- return expected;
137
- };
138
- var expectLong = (value) => {
139
- if (value === null || value === void 0) {
140
- return void 0;
141
- }
142
- if (Number.isInteger(value) && !Number.isNaN(value)) {
143
- return value;
144
- }
145
- throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);
146
- };
147
- var expectInt = expectLong;
148
- var expectInt32 = (value) => expectSizedInt(value, 32);
149
- var expectShort = (value) => expectSizedInt(value, 16);
150
- var expectByte = (value) => expectSizedInt(value, 8);
151
- var expectSizedInt = (value, size) => {
152
- const expected = expectLong(value);
153
- if (expected !== void 0 && castInt(expected, size) !== expected) {
154
- throw new TypeError(`Expected ${size}-bit integer, got ${value}`);
155
- }
156
- return expected;
157
- };
158
- var castInt = (value, size) => {
159
- switch (size) {
160
- case 32:
161
- return Int32Array.of(value)[0];
162
- case 16:
163
- return Int16Array.of(value)[0];
164
- case 8:
165
- return Int8Array.of(value)[0];
166
- }
167
- };
168
- var expectNonNull = (value, location) => {
169
- if (value === null || value === void 0) {
170
- if (location) {
171
- throw new TypeError(`Expected a non-null value for ${location}`);
172
- }
173
- throw new TypeError("Expected a non-null value");
174
- }
175
- return value;
176
- };
177
- var expectObject = (value) => {
178
- if (value === null || value === void 0) {
179
- return void 0;
180
- }
181
- if (typeof value === "object" && !Array.isArray(value)) {
182
- return value;
183
- }
184
- const receivedType = Array.isArray(value) ? "array" : typeof value;
185
- throw new TypeError(`Expected object, got ${receivedType}: ${value}`);
186
- };
187
- var expectString = (value) => {
188
- if (value === null || value === void 0) {
189
- return void 0;
190
- }
191
- if (typeof value === "string") {
7
+ const parseBoolean = (value) => {
8
+ switch (value) {
9
+ case "true":
10
+ return true;
11
+ case "false":
12
+ return false;
13
+ default:
14
+ throw new Error(`Unable to parse boolean value "${value}"`);
15
+ }
16
+ };
17
+ const expectBoolean = (value) => {
18
+ if (value === null || value === undefined) {
19
+ return undefined;
20
+ }
21
+ if (typeof value === "number") {
22
+ if (value === 0 || value === 1) {
23
+ logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));
24
+ }
25
+ if (value === 0) {
26
+ return false;
27
+ }
28
+ if (value === 1) {
29
+ return true;
30
+ }
31
+ }
32
+ if (typeof value === "string") {
33
+ const lower = value.toLowerCase();
34
+ if (lower === "false" || lower === "true") {
35
+ logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));
36
+ }
37
+ if (lower === "false") {
38
+ return false;
39
+ }
40
+ if (lower === "true") {
41
+ return true;
42
+ }
43
+ }
44
+ if (typeof value === "boolean") {
45
+ return value;
46
+ }
47
+ throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);
48
+ };
49
+ const expectNumber = (value) => {
50
+ if (value === null || value === undefined) {
51
+ return undefined;
52
+ }
53
+ if (typeof value === "string") {
54
+ const parsed = parseFloat(value);
55
+ if (!Number.isNaN(parsed)) {
56
+ if (String(parsed) !== String(value)) {
57
+ logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));
58
+ }
59
+ return parsed;
60
+ }
61
+ }
62
+ if (typeof value === "number") {
63
+ return value;
64
+ }
65
+ throw new TypeError(`Expected number, got ${typeof value}: ${value}`);
66
+ };
67
+ const MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));
68
+ const expectFloat32 = (value) => {
69
+ const expected = expectNumber(value);
70
+ if (expected !== undefined && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {
71
+ if (Math.abs(expected) > MAX_FLOAT) {
72
+ throw new TypeError(`Expected 32-bit float, got ${value}`);
73
+ }
74
+ }
75
+ return expected;
76
+ };
77
+ const expectLong = (value) => {
78
+ if (value === null || value === undefined) {
79
+ return undefined;
80
+ }
81
+ if (Number.isInteger(value) && !Number.isNaN(value)) {
82
+ return value;
83
+ }
84
+ throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);
85
+ };
86
+ const expectInt = expectLong;
87
+ const expectInt32 = (value) => expectSizedInt(value, 32);
88
+ const expectShort = (value) => expectSizedInt(value, 16);
89
+ const expectByte = (value) => expectSizedInt(value, 8);
90
+ const expectSizedInt = (value, size) => {
91
+ const expected = expectLong(value);
92
+ if (expected !== undefined && castInt(expected, size) !== expected) {
93
+ throw new TypeError(`Expected ${size}-bit integer, got ${value}`);
94
+ }
95
+ return expected;
96
+ };
97
+ const castInt = (value, size) => {
98
+ switch (size) {
99
+ case 32:
100
+ return Int32Array.of(value)[0];
101
+ case 16:
102
+ return Int16Array.of(value)[0];
103
+ case 8:
104
+ return Int8Array.of(value)[0];
105
+ }
106
+ };
107
+ const expectNonNull = (value, location) => {
108
+ if (value === null || value === undefined) {
109
+ if (location) {
110
+ throw new TypeError(`Expected a non-null value for ${location}`);
111
+ }
112
+ throw new TypeError("Expected a non-null value");
113
+ }
192
114
  return value;
193
- }
194
- if (["boolean", "number", "bigint"].includes(typeof value)) {
195
- logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));
196
- return String(value);
197
- }
198
- throw new TypeError(`Expected string, got ${typeof value}: ${value}`);
199
- };
200
- var expectUnion = (value) => {
201
- if (value === null || value === void 0) {
202
- return void 0;
203
- }
204
- const asObject = expectObject(value);
205
- const setKeys = Object.entries(asObject).filter(([, v]) => v != null).map(([k]) => k);
206
- if (setKeys.length === 0) {
207
- throw new TypeError(`Unions must have exactly one non-null member. None were found.`);
208
- }
209
- if (setKeys.length > 1) {
210
- throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);
211
- }
212
- return asObject;
213
- };
214
- var strictParseDouble = (value) => {
215
- if (typeof value == "string") {
216
- return expectNumber(parseNumber(value));
217
- }
218
- return expectNumber(value);
219
- };
220
- var strictParseFloat = strictParseDouble;
221
- var strictParseFloat32 = (value) => {
222
- if (typeof value == "string") {
223
- return expectFloat32(parseNumber(value));
224
- }
225
- return expectFloat32(value);
226
- };
227
- var NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g;
228
- var parseNumber = (value) => {
229
- const matches = value.match(NUMBER_REGEX);
230
- if (matches === null || matches[0].length !== value.length) {
231
- throw new TypeError(`Expected real number, got implicit NaN`);
232
- }
233
- return parseFloat(value);
234
- };
235
- var limitedParseDouble = (value) => {
236
- if (typeof value == "string") {
237
- return parseFloatString(value);
238
- }
239
- return expectNumber(value);
240
- };
241
- var handleFloat = limitedParseDouble;
242
- var limitedParseFloat = limitedParseDouble;
243
- var limitedParseFloat32 = (value) => {
244
- if (typeof value == "string") {
245
- return parseFloatString(value);
246
- }
247
- return expectFloat32(value);
248
- };
249
- var parseFloatString = (value) => {
250
- switch (value) {
251
- case "NaN":
252
- return NaN;
253
- case "Infinity":
254
- return Infinity;
255
- case "-Infinity":
256
- return -Infinity;
257
- default:
258
- throw new Error(`Unable to parse float value: ${value}`);
259
- }
260
- };
261
- var strictParseLong = (value) => {
262
- if (typeof value === "string") {
263
- return expectLong(parseNumber(value));
264
- }
265
- return expectLong(value);
266
- };
267
- var strictParseInt = strictParseLong;
268
- var strictParseInt32 = (value) => {
269
- if (typeof value === "string") {
270
- return expectInt32(parseNumber(value));
271
- }
272
- return expectInt32(value);
273
- };
274
- var strictParseShort = (value) => {
275
- if (typeof value === "string") {
276
- return expectShort(parseNumber(value));
277
- }
278
- return expectShort(value);
279
- };
280
- var strictParseByte = (value) => {
281
- if (typeof value === "string") {
282
- return expectByte(parseNumber(value));
283
- }
284
- return expectByte(value);
285
- };
286
- var stackTraceWarning = (message) => {
287
- return String(new TypeError(message).stack || message).split("\n").slice(0, 5).filter((s) => !s.includes("stackTraceWarning")).join("\n");
288
- };
289
- var logger = {
290
- warn: console.warn
115
+ };
116
+ const expectObject = (value) => {
117
+ if (value === null || value === undefined) {
118
+ return undefined;
119
+ }
120
+ if (typeof value === "object" && !Array.isArray(value)) {
121
+ return value;
122
+ }
123
+ const receivedType = Array.isArray(value) ? "array" : typeof value;
124
+ throw new TypeError(`Expected object, got ${receivedType}: ${value}`);
125
+ };
126
+ const expectString = (value) => {
127
+ if (value === null || value === undefined) {
128
+ return undefined;
129
+ }
130
+ if (typeof value === "string") {
131
+ return value;
132
+ }
133
+ if (["boolean", "number", "bigint"].includes(typeof value)) {
134
+ logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));
135
+ return String(value);
136
+ }
137
+ throw new TypeError(`Expected string, got ${typeof value}: ${value}`);
138
+ };
139
+ const expectUnion = (value) => {
140
+ if (value === null || value === undefined) {
141
+ return undefined;
142
+ }
143
+ const asObject = expectObject(value);
144
+ const setKeys = Object.entries(asObject)
145
+ .filter(([, v]) => v != null)
146
+ .map(([k]) => k);
147
+ if (setKeys.length === 0) {
148
+ throw new TypeError(`Unions must have exactly one non-null member. None were found.`);
149
+ }
150
+ if (setKeys.length > 1) {
151
+ throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);
152
+ }
153
+ return asObject;
154
+ };
155
+ const strictParseDouble = (value) => {
156
+ if (typeof value == "string") {
157
+ return expectNumber(parseNumber(value));
158
+ }
159
+ return expectNumber(value);
160
+ };
161
+ const strictParseFloat = strictParseDouble;
162
+ const strictParseFloat32 = (value) => {
163
+ if (typeof value == "string") {
164
+ return expectFloat32(parseNumber(value));
165
+ }
166
+ return expectFloat32(value);
167
+ };
168
+ const NUMBER_REGEX = /(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g;
169
+ const parseNumber = (value) => {
170
+ const matches = value.match(NUMBER_REGEX);
171
+ if (matches === null || matches[0].length !== value.length) {
172
+ throw new TypeError(`Expected real number, got implicit NaN`);
173
+ }
174
+ return parseFloat(value);
175
+ };
176
+ const limitedParseDouble = (value) => {
177
+ if (typeof value == "string") {
178
+ return parseFloatString(value);
179
+ }
180
+ return expectNumber(value);
181
+ };
182
+ const handleFloat = limitedParseDouble;
183
+ const limitedParseFloat = limitedParseDouble;
184
+ const limitedParseFloat32 = (value) => {
185
+ if (typeof value == "string") {
186
+ return parseFloatString(value);
187
+ }
188
+ return expectFloat32(value);
189
+ };
190
+ const parseFloatString = (value) => {
191
+ switch (value) {
192
+ case "NaN":
193
+ return NaN;
194
+ case "Infinity":
195
+ return Infinity;
196
+ case "-Infinity":
197
+ return -Infinity;
198
+ default:
199
+ throw new Error(`Unable to parse float value: ${value}`);
200
+ }
201
+ };
202
+ const strictParseLong = (value) => {
203
+ if (typeof value === "string") {
204
+ return expectLong(parseNumber(value));
205
+ }
206
+ return expectLong(value);
207
+ };
208
+ const strictParseInt = strictParseLong;
209
+ const strictParseInt32 = (value) => {
210
+ if (typeof value === "string") {
211
+ return expectInt32(parseNumber(value));
212
+ }
213
+ return expectInt32(value);
214
+ };
215
+ const strictParseShort = (value) => {
216
+ if (typeof value === "string") {
217
+ return expectShort(parseNumber(value));
218
+ }
219
+ return expectShort(value);
220
+ };
221
+ const strictParseByte = (value) => {
222
+ if (typeof value === "string") {
223
+ return expectByte(parseNumber(value));
224
+ }
225
+ return expectByte(value);
226
+ };
227
+ const stackTraceWarning = (message) => {
228
+ return String(new TypeError(message).stack || message)
229
+ .split("\n")
230
+ .slice(0, 5)
231
+ .filter((s) => !s.includes("stackTraceWarning"))
232
+ .join("\n");
233
+ };
234
+ const logger = {
235
+ warn: console.warn,
291
236
  };
292
237
 
293
- // src/submodules/serde/date-utils.ts
294
- var DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
295
- var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
238
+ const DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
239
+ const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
296
240
  function dateToUtcString(date) {
297
- const year = date.getUTCFullYear();
298
- const month = date.getUTCMonth();
299
- const dayOfWeek = date.getUTCDay();
300
- const dayOfMonthInt = date.getUTCDate();
301
- const hoursInt = date.getUTCHours();
302
- const minutesInt = date.getUTCMinutes();
303
- const secondsInt = date.getUTCSeconds();
304
- const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;
305
- const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;
306
- const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;
307
- const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;
308
- return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;
241
+ const year = date.getUTCFullYear();
242
+ const month = date.getUTCMonth();
243
+ const dayOfWeek = date.getUTCDay();
244
+ const dayOfMonthInt = date.getUTCDate();
245
+ const hoursInt = date.getUTCHours();
246
+ const minutesInt = date.getUTCMinutes();
247
+ const secondsInt = date.getUTCSeconds();
248
+ const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;
249
+ const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;
250
+ const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;
251
+ const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;
252
+ return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;
309
253
  }
310
- var RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);
311
- var parseRfc3339DateTime = (value) => {
312
- if (value === null || value === void 0) {
313
- return void 0;
314
- }
315
- if (typeof value !== "string") {
316
- throw new TypeError("RFC-3339 date-times must be expressed as strings");
317
- }
318
- const match = RFC3339.exec(value);
319
- if (!match) {
320
- throw new TypeError("Invalid RFC-3339 date-time value");
321
- }
322
- const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;
323
- const year = strictParseShort(stripLeadingZeroes(yearStr));
324
- const month = parseDateValue(monthStr, "month", 1, 12);
325
- const day = parseDateValue(dayStr, "day", 1, 31);
326
- return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });
327
- };
328
- var RFC3339_WITH_OFFSET = new RegExp(
329
- /^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/
330
- );
331
- var parseRfc3339DateTimeWithOffset = (value) => {
332
- if (value === null || value === void 0) {
333
- return void 0;
334
- }
335
- if (typeof value !== "string") {
336
- throw new TypeError("RFC-3339 date-times must be expressed as strings");
337
- }
338
- const match = RFC3339_WITH_OFFSET.exec(value);
339
- if (!match) {
340
- throw new TypeError("Invalid RFC-3339 date-time value");
341
- }
342
- const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;
343
- const year = strictParseShort(stripLeadingZeroes(yearStr));
344
- const month = parseDateValue(monthStr, "month", 1, 12);
345
- const day = parseDateValue(dayStr, "day", 1, 31);
346
- const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });
347
- if (offsetStr.toUpperCase() != "Z") {
348
- date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr));
349
- }
350
- return date;
351
- };
352
- var IMF_FIXDATE = new RegExp(
353
- /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/
354
- );
355
- var RFC_850_DATE = new RegExp(
356
- /^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/
357
- );
358
- var ASC_TIME = new RegExp(
359
- /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/
360
- );
361
- var parseRfc7231DateTime = (value) => {
362
- if (value === null || value === void 0) {
363
- return void 0;
364
- }
365
- if (typeof value !== "string") {
366
- throw new TypeError("RFC-7231 date-times must be expressed as strings");
367
- }
368
- let match = IMF_FIXDATE.exec(value);
369
- if (match) {
370
- const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
371
- return buildDate(
372
- strictParseShort(stripLeadingZeroes(yearStr)),
373
- parseMonthByShortName(monthStr),
374
- parseDateValue(dayStr, "day", 1, 31),
375
- { hours, minutes, seconds, fractionalMilliseconds }
376
- );
377
- }
378
- match = RFC_850_DATE.exec(value);
379
- if (match) {
380
- const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
381
- return adjustRfc850Year(
382
- buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), {
383
- hours,
384
- minutes,
385
- seconds,
386
- fractionalMilliseconds
387
- })
388
- );
389
- }
390
- match = ASC_TIME.exec(value);
391
- if (match) {
392
- const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;
393
- return buildDate(
394
- strictParseShort(stripLeadingZeroes(yearStr)),
395
- parseMonthByShortName(monthStr),
396
- parseDateValue(dayStr.trimLeft(), "day", 1, 31),
397
- { hours, minutes, seconds, fractionalMilliseconds }
398
- );
399
- }
400
- throw new TypeError("Invalid RFC-7231 date-time value");
401
- };
402
- var parseEpochTimestamp = (value) => {
403
- if (value === null || value === void 0) {
404
- return void 0;
405
- }
406
- let valueAsDouble;
407
- if (typeof value === "number") {
408
- valueAsDouble = value;
409
- } else if (typeof value === "string") {
410
- valueAsDouble = strictParseDouble(value);
411
- } else if (typeof value === "object" && value.tag === 1) {
412
- valueAsDouble = value.value;
413
- } else {
414
- throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");
415
- }
416
- if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {
417
- throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");
418
- }
419
- return new Date(Math.round(valueAsDouble * 1e3));
420
- };
421
- var buildDate = (year, month, day, time) => {
422
- const adjustedMonth = month - 1;
423
- validateDayOfMonth(year, adjustedMonth, day);
424
- return new Date(
425
- Date.UTC(
426
- year,
427
- adjustedMonth,
428
- day,
429
- parseDateValue(time.hours, "hour", 0, 23),
430
- parseDateValue(time.minutes, "minute", 0, 59),
431
- // seconds can go up to 60 for leap seconds
432
- parseDateValue(time.seconds, "seconds", 0, 60),
433
- parseMilliseconds(time.fractionalMilliseconds)
434
- )
435
- );
436
- };
437
- var parseTwoDigitYear = (value) => {
438
- const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear();
439
- const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));
440
- if (valueInThisCentury < thisYear) {
441
- return valueInThisCentury + 100;
442
- }
443
- return valueInThisCentury;
444
- };
445
- var FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3;
446
- var adjustRfc850Year = (input) => {
447
- if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) {
448
- return new Date(
449
- Date.UTC(
450
- input.getUTCFullYear() - 100,
451
- input.getUTCMonth(),
452
- input.getUTCDate(),
453
- input.getUTCHours(),
454
- input.getUTCMinutes(),
455
- input.getUTCSeconds(),
456
- input.getUTCMilliseconds()
457
- )
458
- );
459
- }
460
- return input;
461
- };
462
- var parseMonthByShortName = (value) => {
463
- const monthIdx = MONTHS.indexOf(value);
464
- if (monthIdx < 0) {
465
- throw new TypeError(`Invalid month: ${value}`);
466
- }
467
- return monthIdx + 1;
468
- };
469
- var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
470
- var validateDayOfMonth = (year, month, day) => {
471
- let maxDays = DAYS_IN_MONTH[month];
472
- if (month === 1 && isLeapYear(year)) {
473
- maxDays = 29;
474
- }
475
- if (day > maxDays) {
476
- throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);
477
- }
478
- };
479
- var isLeapYear = (year) => {
480
- return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
481
- };
482
- var parseDateValue = (value, type, lower, upper) => {
483
- const dateVal = strictParseByte(stripLeadingZeroes(value));
484
- if (dateVal < lower || dateVal > upper) {
485
- throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);
486
- }
487
- return dateVal;
488
- };
489
- var parseMilliseconds = (value) => {
490
- if (value === null || value === void 0) {
491
- return 0;
492
- }
493
- return strictParseFloat32("0." + value) * 1e3;
494
- };
495
- var parseOffsetToMilliseconds = (value) => {
496
- const directionStr = value[0];
497
- let direction = 1;
498
- if (directionStr == "+") {
499
- direction = 1;
500
- } else if (directionStr == "-") {
501
- direction = -1;
502
- } else {
503
- throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`);
504
- }
505
- const hour = Number(value.substring(1, 3));
506
- const minute = Number(value.substring(4, 6));
507
- return direction * (hour * 60 + minute) * 60 * 1e3;
508
- };
509
- var stripLeadingZeroes = (value) => {
510
- let idx = 0;
511
- while (idx < value.length - 1 && value.charAt(idx) === "0") {
512
- idx++;
513
- }
514
- if (idx === 0) {
515
- return value;
516
- }
517
- return value.slice(idx);
254
+ const RFC3339 = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/);
255
+ const parseRfc3339DateTime = (value) => {
256
+ if (value === null || value === undefined) {
257
+ return undefined;
258
+ }
259
+ if (typeof value !== "string") {
260
+ throw new TypeError("RFC-3339 date-times must be expressed as strings");
261
+ }
262
+ const match = RFC3339.exec(value);
263
+ if (!match) {
264
+ throw new TypeError("Invalid RFC-3339 date-time value");
265
+ }
266
+ const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;
267
+ const year = strictParseShort(stripLeadingZeroes(yearStr));
268
+ const month = parseDateValue(monthStr, "month", 1, 12);
269
+ const day = parseDateValue(dayStr, "day", 1, 31);
270
+ return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });
271
+ };
272
+ const RFC3339_WITH_OFFSET = new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/);
273
+ const parseRfc3339DateTimeWithOffset = (value) => {
274
+ if (value === null || value === undefined) {
275
+ return undefined;
276
+ }
277
+ if (typeof value !== "string") {
278
+ throw new TypeError("RFC-3339 date-times must be expressed as strings");
279
+ }
280
+ const match = RFC3339_WITH_OFFSET.exec(value);
281
+ if (!match) {
282
+ throw new TypeError("Invalid RFC-3339 date-time value");
283
+ }
284
+ const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;
285
+ const year = strictParseShort(stripLeadingZeroes(yearStr));
286
+ const month = parseDateValue(monthStr, "month", 1, 12);
287
+ const day = parseDateValue(dayStr, "day", 1, 31);
288
+ const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });
289
+ if (offsetStr.toUpperCase() != "Z") {
290
+ date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr));
291
+ }
292
+ return date;
293
+ };
294
+ const IMF_FIXDATE = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
295
+ const RFC_850_DATE = new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/);
296
+ const ASC_TIME = new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/);
297
+ const parseRfc7231DateTime = (value) => {
298
+ if (value === null || value === undefined) {
299
+ return undefined;
300
+ }
301
+ if (typeof value !== "string") {
302
+ throw new TypeError("RFC-7231 date-times must be expressed as strings");
303
+ }
304
+ let match = IMF_FIXDATE.exec(value);
305
+ if (match) {
306
+ const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
307
+ return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });
308
+ }
309
+ match = RFC_850_DATE.exec(value);
310
+ if (match) {
311
+ const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;
312
+ return adjustRfc850Year(buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, "day", 1, 31), {
313
+ hours,
314
+ minutes,
315
+ seconds,
316
+ fractionalMilliseconds,
317
+ }));
318
+ }
319
+ match = ASC_TIME.exec(value);
320
+ if (match) {
321
+ const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;
322
+ return buildDate(strictParseShort(stripLeadingZeroes(yearStr)), parseMonthByShortName(monthStr), parseDateValue(dayStr.trimLeft(), "day", 1, 31), { hours, minutes, seconds, fractionalMilliseconds });
323
+ }
324
+ throw new TypeError("Invalid RFC-7231 date-time value");
518
325
  };
519
-
520
- // src/submodules/serde/generateIdempotencyToken.ts
521
- var import_uuid = require("@smithy/uuid");
522
-
523
- // src/submodules/serde/lazy-json.ts
524
- var LazyJsonString = function LazyJsonString2(val) {
525
- const str = Object.assign(new String(val), {
526
- deserializeJSON() {
527
- return JSON.parse(String(val));
528
- },
529
- toString() {
530
- return String(val);
531
- },
532
- toJSON() {
533
- return String(val);
326
+ const parseEpochTimestamp = (value) => {
327
+ if (value === null || value === undefined) {
328
+ return undefined;
329
+ }
330
+ let valueAsDouble;
331
+ if (typeof value === "number") {
332
+ valueAsDouble = value;
333
+ }
334
+ else if (typeof value === "string") {
335
+ valueAsDouble = strictParseDouble(value);
336
+ }
337
+ else if (typeof value === "object" && value.tag === 1) {
338
+ valueAsDouble = value.value;
339
+ }
340
+ else {
341
+ throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");
342
+ }
343
+ if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {
344
+ throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");
345
+ }
346
+ return new Date(Math.round(valueAsDouble * 1000));
347
+ };
348
+ const buildDate = (year, month, day, time) => {
349
+ const adjustedMonth = month - 1;
350
+ validateDayOfMonth(year, adjustedMonth, day);
351
+ return new Date(Date.UTC(year, adjustedMonth, day, parseDateValue(time.hours, "hour", 0, 23), parseDateValue(time.minutes, "minute", 0, 59), parseDateValue(time.seconds, "seconds", 0, 60), parseMilliseconds(time.fractionalMilliseconds)));
352
+ };
353
+ const parseTwoDigitYear = (value) => {
354
+ const thisYear = new Date().getUTCFullYear();
355
+ const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));
356
+ if (valueInThisCentury < thisYear) {
357
+ return valueInThisCentury + 100;
358
+ }
359
+ return valueInThisCentury;
360
+ };
361
+ const FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1000;
362
+ const adjustRfc850Year = (input) => {
363
+ if (input.getTime() - new Date().getTime() > FIFTY_YEARS_IN_MILLIS) {
364
+ return new Date(Date.UTC(input.getUTCFullYear() - 100, input.getUTCMonth(), input.getUTCDate(), input.getUTCHours(), input.getUTCMinutes(), input.getUTCSeconds(), input.getUTCMilliseconds()));
365
+ }
366
+ return input;
367
+ };
368
+ const parseMonthByShortName = (value) => {
369
+ const monthIdx = MONTHS.indexOf(value);
370
+ if (monthIdx < 0) {
371
+ throw new TypeError(`Invalid month: ${value}`);
372
+ }
373
+ return monthIdx + 1;
374
+ };
375
+ const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
376
+ const validateDayOfMonth = (year, month, day) => {
377
+ let maxDays = DAYS_IN_MONTH[month];
378
+ if (month === 1 && isLeapYear(year)) {
379
+ maxDays = 29;
380
+ }
381
+ if (day > maxDays) {
382
+ throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);
383
+ }
384
+ };
385
+ const isLeapYear = (year) => {
386
+ return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
387
+ };
388
+ const parseDateValue = (value, type, lower, upper) => {
389
+ const dateVal = strictParseByte(stripLeadingZeroes(value));
390
+ if (dateVal < lower || dateVal > upper) {
391
+ throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);
392
+ }
393
+ return dateVal;
394
+ };
395
+ const parseMilliseconds = (value) => {
396
+ if (value === null || value === undefined) {
397
+ return 0;
398
+ }
399
+ return strictParseFloat32("0." + value) * 1000;
400
+ };
401
+ const parseOffsetToMilliseconds = (value) => {
402
+ const directionStr = value[0];
403
+ let direction = 1;
404
+ if (directionStr == "+") {
405
+ direction = 1;
406
+ }
407
+ else if (directionStr == "-") {
408
+ direction = -1;
534
409
  }
535
- });
536
- return str;
410
+ else {
411
+ throw new TypeError(`Offset direction, ${directionStr}, must be "+" or "-"`);
412
+ }
413
+ const hour = Number(value.substring(1, 3));
414
+ const minute = Number(value.substring(4, 6));
415
+ return direction * (hour * 60 + minute) * 60 * 1000;
416
+ };
417
+ const stripLeadingZeroes = (value) => {
418
+ let idx = 0;
419
+ while (idx < value.length - 1 && value.charAt(idx) === "0") {
420
+ idx++;
421
+ }
422
+ if (idx === 0) {
423
+ return value;
424
+ }
425
+ return value.slice(idx);
426
+ };
427
+
428
+ const LazyJsonString = function LazyJsonString(val) {
429
+ const str = Object.assign(new String(val), {
430
+ deserializeJSON() {
431
+ return JSON.parse(String(val));
432
+ },
433
+ toString() {
434
+ return String(val);
435
+ },
436
+ toJSON() {
437
+ return String(val);
438
+ },
439
+ });
440
+ return str;
537
441
  };
538
442
  LazyJsonString.from = (object) => {
539
- if (object && typeof object === "object" && (object instanceof LazyJsonString || "deserializeJSON" in object)) {
540
- return object;
541
- } else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) {
542
- return LazyJsonString(String(object));
543
- }
544
- return LazyJsonString(JSON.stringify(object));
443
+ if (object && typeof object === "object" && (object instanceof LazyJsonString || "deserializeJSON" in object)) {
444
+ return object;
445
+ }
446
+ else if (typeof object === "string" || Object.getPrototypeOf(object) === String.prototype) {
447
+ return LazyJsonString(String(object));
448
+ }
449
+ return LazyJsonString(JSON.stringify(object));
545
450
  };
546
451
  LazyJsonString.fromObject = LazyJsonString.from;
547
452
 
548
- // src/submodules/serde/quote-header.ts
549
453
  function quoteHeader(part) {
550
- if (part.includes(",") || part.includes('"')) {
551
- part = `"${part.replace(/"/g, '\\"')}"`;
552
- }
553
- return part;
454
+ if (part.includes(",") || part.includes('"')) {
455
+ part = `"${part.replace(/"/g, '\\"')}"`;
456
+ }
457
+ return part;
554
458
  }
555
459
 
556
- // src/submodules/serde/split-every.ts
557
460
  function splitEvery(value, delimiter, numDelimiters) {
558
- if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {
559
- throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery.");
560
- }
561
- const segments = value.split(delimiter);
562
- if (numDelimiters === 1) {
563
- return segments;
564
- }
565
- const compoundSegments = [];
566
- let currentSegment = "";
567
- for (let i = 0; i < segments.length; i++) {
568
- if (currentSegment === "") {
569
- currentSegment = segments[i];
570
- } else {
571
- currentSegment += delimiter + segments[i];
572
- }
573
- if ((i + 1) % numDelimiters === 0) {
574
- compoundSegments.push(currentSegment);
575
- currentSegment = "";
576
- }
577
- }
578
- if (currentSegment !== "") {
579
- compoundSegments.push(currentSegment);
580
- }
581
- return compoundSegments;
582
- }
583
-
584
- // src/submodules/serde/split-header.ts
585
- var splitHeader = (value) => {
586
- const z = value.length;
587
- const values = [];
588
- let withinQuotes = false;
589
- let prevChar = void 0;
590
- let anchor = 0;
591
- for (let i = 0; i < z; ++i) {
592
- const char = value[i];
593
- switch (char) {
594
- case `"`:
595
- if (prevChar !== "\\") {
596
- withinQuotes = !withinQuotes;
461
+ if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {
462
+ throw new Error("Invalid number of delimiters (" + numDelimiters + ") for splitEvery.");
463
+ }
464
+ const segments = value.split(delimiter);
465
+ if (numDelimiters === 1) {
466
+ return segments;
467
+ }
468
+ const compoundSegments = [];
469
+ let currentSegment = "";
470
+ for (let i = 0; i < segments.length; i++) {
471
+ if (currentSegment === "") {
472
+ currentSegment = segments[i];
597
473
  }
598
- break;
599
- case ",":
600
- if (!withinQuotes) {
601
- values.push(value.slice(anchor, i));
602
- anchor = i + 1;
474
+ else {
475
+ currentSegment += delimiter + segments[i];
476
+ }
477
+ if ((i + 1) % numDelimiters === 0) {
478
+ compoundSegments.push(currentSegment);
479
+ currentSegment = "";
603
480
  }
604
- break;
605
- default:
606
481
  }
607
- prevChar = char;
608
- }
609
- values.push(value.slice(anchor));
610
- return values.map((v) => {
611
- v = v.trim();
612
- const z2 = v.length;
613
- if (z2 < 2) {
614
- return v;
482
+ if (currentSegment !== "") {
483
+ compoundSegments.push(currentSegment);
615
484
  }
616
- if (v[0] === `"` && v[z2 - 1] === `"`) {
617
- v = v.slice(1, z2 - 1);
485
+ return compoundSegments;
486
+ }
487
+
488
+ const splitHeader = (value) => {
489
+ const z = value.length;
490
+ const values = [];
491
+ let withinQuotes = false;
492
+ let prevChar = undefined;
493
+ let anchor = 0;
494
+ for (let i = 0; i < z; ++i) {
495
+ const char = value[i];
496
+ switch (char) {
497
+ case `"`:
498
+ if (prevChar !== "\\") {
499
+ withinQuotes = !withinQuotes;
500
+ }
501
+ break;
502
+ case ",":
503
+ if (!withinQuotes) {
504
+ values.push(value.slice(anchor, i));
505
+ anchor = i + 1;
506
+ }
507
+ break;
508
+ }
509
+ prevChar = char;
618
510
  }
619
- return v.replace(/\\"/g, '"');
620
- });
511
+ values.push(value.slice(anchor));
512
+ return values.map((v) => {
513
+ v = v.trim();
514
+ const z = v.length;
515
+ if (z < 2) {
516
+ return v;
517
+ }
518
+ if (v[0] === `"` && v[z - 1] === `"`) {
519
+ v = v.slice(1, z - 1);
520
+ }
521
+ return v.replace(/\\"/g, '"');
522
+ });
621
523
  };
622
524
 
623
- // src/submodules/serde/value/NumericValue.ts
624
- var NumericValue = class _NumericValue {
625
- constructor(string, type) {
626
- this.string = string;
627
- this.type = type;
628
- let dot = 0;
629
- for (let i = 0; i < string.length; ++i) {
630
- const char = string.charCodeAt(i);
631
- if (i === 0 && char === 45) {
632
- continue;
633
- }
634
- if (char === 46) {
635
- if (dot) {
636
- throw new Error("@smithy/core/serde - NumericValue must contain at most one decimal point.");
525
+ class NumericValue {
526
+ string;
527
+ type;
528
+ constructor(string, type) {
529
+ this.string = string;
530
+ this.type = type;
531
+ let dot = 0;
532
+ for (let i = 0; i < string.length; ++i) {
533
+ const char = string.charCodeAt(i);
534
+ if (i === 0 && char === 45) {
535
+ continue;
536
+ }
537
+ if (char === 46) {
538
+ if (dot) {
539
+ throw new Error("@smithy/core/serde - NumericValue must contain at most one decimal point.");
540
+ }
541
+ dot = 1;
542
+ continue;
543
+ }
544
+ if (char < 48 || char > 57) {
545
+ throw new Error(`@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`);
546
+ }
637
547
  }
638
- dot = 1;
639
- continue;
640
- }
641
- if (char < 48 || char > 57) {
642
- throw new Error(
643
- `@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".`
644
- );
645
- }
646
- }
647
- }
648
- toString() {
649
- return this.string;
650
- }
651
- static [Symbol.hasInstance](object) {
652
- if (!object || typeof object !== "object") {
653
- return false;
654
- }
655
- const _nv = object;
656
- const prototypeMatch = _NumericValue.prototype.isPrototypeOf(object);
657
- if (prototypeMatch) {
658
- return prototypeMatch;
659
- }
660
- if (typeof _nv.string === "string" && typeof _nv.type === "string" && _nv.constructor?.name?.endsWith("NumericValue")) {
661
- return true;
662
- }
663
- return prototypeMatch;
664
- }
665
- };
548
+ }
549
+ toString() {
550
+ return this.string;
551
+ }
552
+ static [Symbol.hasInstance](object) {
553
+ if (!object || typeof object !== "object") {
554
+ return false;
555
+ }
556
+ const _nv = object;
557
+ const prototypeMatch = NumericValue.prototype.isPrototypeOf(object);
558
+ if (prototypeMatch) {
559
+ return prototypeMatch;
560
+ }
561
+ if (typeof _nv.string === "string" &&
562
+ typeof _nv.type === "string" &&
563
+ _nv.constructor?.name?.endsWith("NumericValue")) {
564
+ return true;
565
+ }
566
+ return prototypeMatch;
567
+ }
568
+ }
666
569
  function nv(input) {
667
- return new NumericValue(String(input), "bigDecimal");
570
+ return new NumericValue(String(input), "bigDecimal");
668
571
  }
669
- // Annotate the CommonJS export names for ESM import in node:
670
- 0 && (module.exports = {
671
- LazyJsonString,
672
- NumericValue,
673
- copyDocumentWithTransform,
674
- dateToUtcString,
675
- expectBoolean,
676
- expectByte,
677
- expectFloat32,
678
- expectInt,
679
- expectInt32,
680
- expectLong,
681
- expectNonNull,
682
- expectNumber,
683
- expectObject,
684
- expectShort,
685
- expectString,
686
- expectUnion,
687
- generateIdempotencyToken,
688
- handleFloat,
689
- limitedParseDouble,
690
- limitedParseFloat,
691
- limitedParseFloat32,
692
- logger,
693
- nv,
694
- parseBoolean,
695
- parseEpochTimestamp,
696
- parseRfc3339DateTime,
697
- parseRfc3339DateTimeWithOffset,
698
- parseRfc7231DateTime,
699
- quoteHeader,
700
- splitEvery,
701
- splitHeader,
702
- strictParseByte,
703
- strictParseDouble,
704
- strictParseFloat,
705
- strictParseFloat32,
706
- strictParseInt,
707
- strictParseInt32,
708
- strictParseLong,
709
- strictParseShort
572
+
573
+ Object.defineProperty(exports, "generateIdempotencyToken", {
574
+ enumerable: true,
575
+ get: function () { return uuid.v4; }
710
576
  });
577
+ exports.LazyJsonString = LazyJsonString;
578
+ exports.NumericValue = NumericValue;
579
+ exports.copyDocumentWithTransform = copyDocumentWithTransform;
580
+ exports.dateToUtcString = dateToUtcString;
581
+ exports.expectBoolean = expectBoolean;
582
+ exports.expectByte = expectByte;
583
+ exports.expectFloat32 = expectFloat32;
584
+ exports.expectInt = expectInt;
585
+ exports.expectInt32 = expectInt32;
586
+ exports.expectLong = expectLong;
587
+ exports.expectNonNull = expectNonNull;
588
+ exports.expectNumber = expectNumber;
589
+ exports.expectObject = expectObject;
590
+ exports.expectShort = expectShort;
591
+ exports.expectString = expectString;
592
+ exports.expectUnion = expectUnion;
593
+ exports.handleFloat = handleFloat;
594
+ exports.limitedParseDouble = limitedParseDouble;
595
+ exports.limitedParseFloat = limitedParseFloat;
596
+ exports.limitedParseFloat32 = limitedParseFloat32;
597
+ exports.logger = logger;
598
+ exports.nv = nv;
599
+ exports.parseBoolean = parseBoolean;
600
+ exports.parseEpochTimestamp = parseEpochTimestamp;
601
+ exports.parseRfc3339DateTime = parseRfc3339DateTime;
602
+ exports.parseRfc3339DateTimeWithOffset = parseRfc3339DateTimeWithOffset;
603
+ exports.parseRfc7231DateTime = parseRfc7231DateTime;
604
+ exports.quoteHeader = quoteHeader;
605
+ exports.splitEvery = splitEvery;
606
+ exports.splitHeader = splitHeader;
607
+ exports.strictParseByte = strictParseByte;
608
+ exports.strictParseDouble = strictParseDouble;
609
+ exports.strictParseFloat = strictParseFloat;
610
+ exports.strictParseFloat32 = strictParseFloat32;
611
+ exports.strictParseInt = strictParseInt;
612
+ exports.strictParseInt32 = strictParseInt32;
613
+ exports.strictParseLong = strictParseLong;
614
+ exports.strictParseShort = strictParseShort;