@mavogel/awscdk-rootmail 0.0.323 → 0.0.325

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 (395) hide show
  1. package/.jsii +2 -2
  2. package/lib/rootmail.js +1 -1
  3. package/lib/ses-receive.js +1 -1
  4. package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-cjs/index.js +4442 -4660
  5. package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/models/models_0.d.ts +2 -2
  6. package/node_modules/@aws-sdk/client-cloudwatch-logs/package.json +38 -38
  7. package/node_modules/@aws-sdk/client-route-53/dist-cjs/index.js +7328 -7804
  8. package/node_modules/@aws-sdk/client-route-53/dist-types/models/models_0.d.ts +1 -1
  9. package/node_modules/@aws-sdk/client-route-53/package.json +38 -38
  10. package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +11771 -11916
  11. package/node_modules/@aws-sdk/client-s3/dist-types/models/models_0.d.ts +4 -4
  12. package/node_modules/@aws-sdk/client-s3/package.json +52 -52
  13. package/node_modules/@aws-sdk/client-ses/dist-cjs/index.js +7284 -7626
  14. package/node_modules/@aws-sdk/client-ses/package.json +36 -36
  15. package/node_modules/@aws-sdk/client-ssm/dist-cjs/endpoint/ruleset.js +1 -1
  16. package/node_modules/@aws-sdk/client-ssm/dist-cjs/index.js +12508 -13696
  17. package/node_modules/@aws-sdk/client-ssm/dist-es/endpoint/ruleset.js +1 -1
  18. package/node_modules/@aws-sdk/client-ssm/package.json +36 -36
  19. package/node_modules/@aws-sdk/client-sso/dist-cjs/index.js +478 -596
  20. package/node_modules/@aws-sdk/client-sso/package.json +34 -34
  21. package/node_modules/@aws-sdk/core/dist-cjs/index.js +1969 -6
  22. package/node_modules/@aws-sdk/core/dist-cjs/submodules/account-id-endpoint/index.js +48 -88
  23. package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +35 -74
  24. package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +273 -365
  25. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +1581 -1863
  26. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js +1 -1
  27. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +4 -4
  28. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +3 -3
  29. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +4 -4
  30. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +4 -4
  31. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js +4 -4
  32. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js +4 -4
  33. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/AwsRestXmlProtocol.js +3 -3
  34. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js +4 -4
  35. package/node_modules/@aws-sdk/core/dist-types/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +1 -1
  36. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +1 -1
  37. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +1 -1
  38. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.d.ts +1 -1
  39. package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +1 -1
  40. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/ConfigurableSerdeContext.d.ts +1 -1
  41. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/ProtocolLib.d.ts +4 -4
  42. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonCodec.d.ts +1 -1
  43. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeDeserializer.d.ts +1 -1
  44. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonShapeSerializer.d.ts +2 -2
  45. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/QuerySerializerSettings.d.ts +1 -1
  46. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +1 -2
  47. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/xml/XmlCodec.d.ts +1 -1
  48. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/ProtocolLib.d.ts +7 -7
  49. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +1 -1
  50. package/node_modules/@aws-sdk/core/package.json +12 -12
  51. package/node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js +38 -73
  52. package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
  53. package/node_modules/@aws-sdk/credential-provider-http/package.json +10 -10
  54. package/node_modules/@aws-sdk/credential-provider-ini/dist-cjs/index.js +194 -259
  55. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveAssumeRoleCredentials.js +1 -2
  56. package/node_modules/@aws-sdk/credential-provider-ini/dist-es/resolveProfileData.js +1 -1
  57. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveAssumeRoleCredentials.d.ts +2 -1
  58. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/resolveProfileData.d.ts +4 -0
  59. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveAssumeRoleCredentials.d.ts +3 -1
  60. package/node_modules/@aws-sdk/credential-provider-ini/dist-types/ts3.4/resolveProfileData.d.ts +1 -0
  61. package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
  62. package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +72 -132
  63. package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
  64. package/node_modules/@aws-sdk/credential-provider-process/dist-cjs/index.js +71 -107
  65. package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
  66. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/index.js +176 -249
  67. package/node_modules/@aws-sdk/credential-provider-sso/dist-cjs/loadSso-CVy8iqsZ.js +14 -0
  68. package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
  69. package/node_modules/@aws-sdk/credential-provider-web-identity/dist-cjs/index.js +16 -25
  70. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
  71. package/node_modules/@aws-sdk/middleware-bucket-endpoint/dist-cjs/index.js +334 -450
  72. package/node_modules/@aws-sdk/middleware-bucket-endpoint/package.json +5 -5
  73. package/node_modules/@aws-sdk/middleware-expect-continue/dist-cjs/index.js +30 -60
  74. package/node_modules/@aws-sdk/middleware-expect-continue/package.json +4 -4
  75. package/node_modules/@aws-sdk/middleware-flexible-checksums/dist-cjs/index.js +381 -478
  76. package/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +9 -9
  77. package/node_modules/@aws-sdk/middleware-host-header/dist-cjs/index.js +35 -63
  78. package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
  79. package/node_modules/@aws-sdk/middleware-location-constraint/dist-cjs/index.js +23 -57
  80. package/node_modules/@aws-sdk/middleware-location-constraint/dist-es/index.js +4 -7
  81. package/node_modules/@aws-sdk/middleware-location-constraint/package.json +3 -3
  82. package/node_modules/@aws-sdk/middleware-logger/dist-cjs/index.js +44 -75
  83. package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
  84. package/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js +19 -48
  85. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +4 -4
  86. package/node_modules/@aws-sdk/middleware-sdk-route53/dist-cjs/index.js +71 -109
  87. package/node_modules/@aws-sdk/middleware-sdk-route53/package.json +3 -3
  88. package/node_modules/@aws-sdk/middleware-sdk-s3/dist-cjs/index.js +511 -641
  89. package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +11 -11
  90. package/node_modules/@aws-sdk/middleware-ssec/dist-cjs/index.js +65 -92
  91. package/node_modules/@aws-sdk/middleware-ssec/package.json +3 -3
  92. package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +170 -203
  93. package/node_modules/@aws-sdk/middleware-user-agent/package.json +7 -7
  94. package/node_modules/@aws-sdk/nested-clients/dist-cjs/index.js +2 -2
  95. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +583 -858
  96. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +795 -928
  97. package/node_modules/@aws-sdk/nested-clients/package.json +34 -34
  98. package/node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js +59 -95
  99. package/node_modules/@aws-sdk/region-config-resolver/package.json +5 -5
  100. package/node_modules/@aws-sdk/signature-v4-multi-region/dist-cjs/index.js +108 -137
  101. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +6 -6
  102. package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +147 -222
  103. package/node_modules/@aws-sdk/token-providers/package.json +7 -7
  104. package/node_modules/@aws-sdk/types/dist-cjs/index.js +18 -290
  105. package/node_modules/@aws-sdk/types/package.json +2 -2
  106. package/node_modules/@aws-sdk/util-endpoints/dist-cjs/index.js +395 -469
  107. package/node_modules/@aws-sdk/util-endpoints/package.json +5 -5
  108. package/node_modules/@aws-sdk/util-user-agent-browser/README.md +22 -3
  109. package/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/createUserAgentStringParsingProvider.js +57 -0
  110. package/node_modules/@aws-sdk/util-user-agent-browser/dist-cjs/index.js +39 -8
  111. package/node_modules/@aws-sdk/util-user-agent-browser/dist-es/createUserAgentStringParsingProvider.js +20 -0
  112. package/node_modules/@aws-sdk/util-user-agent-browser/dist-es/index.js +37 -6
  113. package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/createUserAgentStringParsingProvider.d.ts +14 -0
  114. package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/index.d.ts +14 -4
  115. package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/index.native.d.ts +4 -3
  116. package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/ts3.4/createUserAgentStringParsingProvider.d.ts +9 -0
  117. package/node_modules/@aws-sdk/util-user-agent-browser/dist-types/ts3.4/index.d.ts +5 -0
  118. package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
  119. package/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +50 -94
  120. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/crt-availability.d.ts +1 -2
  121. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/defaultUserAgent.d.ts +10 -5
  122. package/node_modules/@aws-sdk/util-user-agent-node/package.json +5 -5
  123. package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +106 -160
  124. package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.browser.js +4 -1
  125. package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
  126. package/node_modules/@smithy/abort-controller/package.json +2 -2
  127. package/node_modules/@smithy/chunked-blob-reader-native/package.json +2 -2
  128. package/node_modules/@smithy/config-resolver/package.json +4 -4
  129. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +4 -16
  130. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +5 -4
  131. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +51 -47
  132. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +234 -265
  133. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +126 -34
  134. package/node_modules/@smithy/core/dist-es/index.js +1 -1
  135. package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +6 -17
  136. package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +5 -4
  137. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +4 -4
  138. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +10 -9
  139. package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +2 -2
  140. package/node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js +6 -0
  141. package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +1 -0
  142. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js +22 -22
  143. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/HttpInterceptingShapeDeserializer.js +3 -2
  144. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/ToStringShapeSerializer.js +7 -9
  145. package/node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js +5 -6
  146. package/node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js +18 -11
  147. package/node_modules/@smithy/core/dist-es/submodules/schema/index.js +2 -0
  148. package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +3 -1
  149. package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +3 -1
  150. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +100 -185
  151. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/Schema.js +0 -2
  152. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js +6 -0
  153. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js +7 -0
  154. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js +22 -0
  155. package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
  156. package/node_modules/@smithy/core/dist-es/submodules/serde/schema-serde-lib/schema-date-utils.js +110 -0
  157. package/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +4 -26
  158. package/node_modules/@smithy/core/dist-types/index.d.ts +1 -1
  159. package/node_modules/@smithy/core/dist-types/submodules/cbor/CborCodec.d.ts +5 -10
  160. package/node_modules/@smithy/core/dist-types/submodules/protocols/HttpProtocol.d.ts +5 -2
  161. package/node_modules/@smithy/core/dist-types/submodules/protocols/SerdeContext.d.ts +8 -0
  162. package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +1 -0
  163. package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/FromStringShapeDeserializer.d.ts +3 -4
  164. package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/HttpInterceptingShapeDeserializer.d.ts +5 -2
  165. package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/HttpInterceptingShapeSerializer.d.ts +5 -2
  166. package/node_modules/@smithy/core/dist-types/submodules/protocols/serde/ToStringShapeSerializer.d.ts +3 -4
  167. package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +5 -6
  168. package/node_modules/@smithy/core/dist-types/submodules/schema/index.d.ts +2 -0
  169. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/ErrorSchema.d.ts +2 -0
  170. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/ListSchema.d.ts +2 -0
  171. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/MapSchema.d.ts +2 -0
  172. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +12 -27
  173. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/OperationSchema.d.ts +2 -0
  174. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/Schema.d.ts +1 -0
  175. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/SimpleSchema.d.ts +7 -0
  176. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/StructureSchema.d.ts +2 -0
  177. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/operation.d.ts +7 -0
  178. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/sentinels.d.ts +2 -0
  179. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/translateTraits.d.ts +7 -0
  180. package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
  181. package/node_modules/@smithy/core/dist-types/submodules/serde/schema-serde-lib/schema-date-utils.d.ts +47 -0
  182. package/node_modules/@smithy/core/dist-types/ts3.4/index.d.ts +1 -1
  183. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/CborCodec.d.ts +5 -10
  184. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/HttpProtocol.d.ts +5 -2
  185. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/SerdeContext.d.ts +8 -0
  186. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +1 -0
  187. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/FromStringShapeDeserializer.d.ts +3 -4
  188. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/HttpInterceptingShapeDeserializer.d.ts +5 -2
  189. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/HttpInterceptingShapeSerializer.d.ts +5 -2
  190. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/serde/ToStringShapeSerializer.d.ts +3 -4
  191. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/TypeRegistry.d.ts +5 -6
  192. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/index.d.ts +2 -0
  193. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/ErrorSchema.d.ts +2 -0
  194. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/ListSchema.d.ts +2 -0
  195. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/MapSchema.d.ts +2 -0
  196. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +12 -27
  197. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/OperationSchema.d.ts +2 -0
  198. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/Schema.d.ts +1 -0
  199. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/SimpleSchema.d.ts +7 -0
  200. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/StructureSchema.d.ts +2 -0
  201. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/operation.d.ts +7 -0
  202. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/sentinels.d.ts +2 -0
  203. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/translateTraits.d.ts +7 -0
  204. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
  205. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/schema-serde-lib/schema-date-utils.d.ts +47 -0
  206. package/node_modules/@smithy/core/package.json +8 -8
  207. package/node_modules/@smithy/credential-provider-imds/package.json +5 -5
  208. package/node_modules/@smithy/eventstream-codec/package.json +2 -2
  209. package/node_modules/@smithy/eventstream-serde-browser/package.json +3 -3
  210. package/node_modules/@smithy/eventstream-serde-config-resolver/package.json +2 -2
  211. package/node_modules/@smithy/eventstream-serde-node/package.json +3 -3
  212. package/node_modules/@smithy/eventstream-serde-universal/package.json +6 -4
  213. package/node_modules/@smithy/fetch-http-handler/package.json +6 -6
  214. package/node_modules/@smithy/hash-blob-browser/package.json +3 -3
  215. package/node_modules/@smithy/hash-node/package.json +2 -2
  216. package/node_modules/@smithy/hash-stream-node/package.json +2 -2
  217. package/node_modules/@smithy/invalid-dependency/package.json +2 -2
  218. package/node_modules/@smithy/md5-js/package.json +3 -3
  219. package/node_modules/@smithy/middleware-content-length/package.json +3 -3
  220. package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
  221. package/node_modules/@smithy/middleware-retry/package.json +8 -8
  222. package/node_modules/@smithy/middleware-serde/package.json +3 -3
  223. package/node_modules/@smithy/middleware-stack/package.json +2 -2
  224. package/node_modules/@smithy/node-config-provider/package.json +4 -4
  225. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +30 -6
  226. package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +7 -3
  227. package/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +1 -1
  228. package/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +21 -0
  229. package/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +2 -3
  230. package/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +6 -0
  231. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +6 -0
  232. package/node_modules/@smithy/node-http-handler/package.json +5 -5
  233. package/node_modules/@smithy/property-provider/package.json +2 -2
  234. package/node_modules/@smithy/protocol-http/package.json +2 -2
  235. package/node_modules/@smithy/querystring-builder/package.json +2 -2
  236. package/node_modules/@smithy/querystring-parser/package.json +2 -2
  237. package/node_modules/@smithy/service-error-classification/package.json +2 -2
  238. package/node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js +2 -1
  239. package/node_modules/@smithy/shared-ini-file-loader/dist-es/constants.js +1 -0
  240. package/node_modules/@smithy/shared-ini-file-loader/dist-es/getConfigData.js +1 -1
  241. package/node_modules/@smithy/shared-ini-file-loader/dist-es/loadSharedConfigFiles.js +1 -1
  242. package/node_modules/@smithy/shared-ini-file-loader/dist-es/parseIni.js +1 -1
  243. package/node_modules/@smithy/shared-ini-file-loader/dist-types/constants.d.ts +4 -0
  244. package/node_modules/@smithy/shared-ini-file-loader/dist-types/loadSharedConfigFiles.d.ts +1 -4
  245. package/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/constants.d.ts +4 -0
  246. package/node_modules/@smithy/shared-ini-file-loader/dist-types/ts3.4/loadSharedConfigFiles.d.ts +1 -4
  247. package/node_modules/@smithy/shared-ini-file-loader/package.json +2 -2
  248. package/node_modules/@smithy/signature-v4/package.json +4 -4
  249. package/node_modules/@smithy/smithy-client/dist-cjs/index.js +5 -4
  250. package/node_modules/@smithy/smithy-client/dist-es/command.js +5 -4
  251. package/node_modules/@smithy/smithy-client/dist-types/command.d.ts +3 -3
  252. package/node_modules/@smithy/smithy-client/dist-types/ts3.4/command.d.ts +3 -3
  253. package/node_modules/@smithy/smithy-client/package.json +7 -7
  254. package/node_modules/@smithy/types/dist-es/index.js +2 -0
  255. package/node_modules/@smithy/types/dist-es/schema/schema-deprecated.js +1 -0
  256. package/node_modules/@smithy/types/dist-es/schema/static-schemas.js +1 -0
  257. package/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts +17 -10
  258. package/node_modules/@smithy/types/dist-types/index.d.ts +2 -0
  259. package/node_modules/@smithy/types/dist-types/schema/schema-deprecated.d.ts +136 -0
  260. package/node_modules/@smithy/types/dist-types/schema/schema.d.ts +27 -68
  261. package/node_modules/@smithy/types/dist-types/schema/static-schemas.d.ts +82 -0
  262. package/node_modules/@smithy/types/dist-types/serde.d.ts +2 -2
  263. package/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +17 -10
  264. package/node_modules/@smithy/types/dist-types/ts3.4/index.d.ts +2 -0
  265. package/node_modules/@smithy/types/dist-types/ts3.4/schema/schema-deprecated.d.ts +142 -0
  266. package/node_modules/@smithy/types/dist-types/ts3.4/schema/schema.d.ts +28 -72
  267. package/node_modules/@smithy/types/dist-types/ts3.4/schema/static-schemas.d.ts +101 -0
  268. package/node_modules/@smithy/types/dist-types/ts3.4/serde.d.ts +2 -2
  269. package/node_modules/@smithy/types/package.json +1 -1
  270. package/node_modules/@smithy/url-parser/package.json +3 -3
  271. package/node_modules/@smithy/util-base64/dist-cjs/constants.browser.js +9 -32
  272. package/node_modules/@smithy/util-base64/dist-es/constants.browser.js +9 -28
  273. package/node_modules/@smithy/util-base64/dist-types/constants.browser.d.ts +5 -6
  274. package/node_modules/@smithy/util-base64/dist-types/ts3.4/constants.browser.d.ts +5 -6
  275. package/node_modules/@smithy/util-base64/package.json +1 -1
  276. package/node_modules/@smithy/util-body-length-node/dist-cjs/index.js +8 -6
  277. package/node_modules/@smithy/util-body-length-node/dist-es/calculateBodyLength.js +8 -6
  278. package/node_modules/@smithy/util-body-length-node/package.json +1 -1
  279. package/node_modules/@smithy/util-defaults-mode-browser/dist-cjs/resolveDefaultsModeConfig.js +11 -9
  280. package/node_modules/@smithy/util-defaults-mode-browser/dist-es/resolveDefaultsModeConfig.js +11 -8
  281. package/node_modules/@smithy/util-defaults-mode-browser/package.json +4 -5
  282. package/node_modules/@smithy/util-defaults-mode-node/package.json +7 -7
  283. package/node_modules/@smithy/util-endpoints/dist-cjs/index.js +31 -22
  284. package/node_modules/@smithy/util-endpoints/dist-es/utils/callFunction.js +1 -11
  285. package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js +15 -2
  286. package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js +17 -2
  287. package/node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTreeRule.js +1 -13
  288. package/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js +25 -2
  289. package/node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperty.js +1 -21
  290. package/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/callFunction.d.ts +1 -2
  291. package/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateExpression.d.ts +7 -2
  292. package/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateRules.d.ts +6 -1
  293. package/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/evaluateTreeRule.d.ts +1 -3
  294. package/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getEndpointProperties.d.ts +6 -0
  295. package/node_modules/@smithy/util-endpoints/dist-types/ts3.4/utils/getEndpointProperty.d.ts +1 -3
  296. package/node_modules/@smithy/util-endpoints/dist-types/utils/callFunction.d.ts +1 -2
  297. package/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateExpression.d.ts +7 -2
  298. package/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateRules.d.ts +6 -1
  299. package/node_modules/@smithy/util-endpoints/dist-types/utils/evaluateTreeRule.d.ts +1 -3
  300. package/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointProperties.d.ts +6 -0
  301. package/node_modules/@smithy/util-endpoints/dist-types/utils/getEndpointProperty.d.ts +1 -3
  302. package/node_modules/@smithy/util-endpoints/package.json +3 -3
  303. package/node_modules/@smithy/util-middleware/package.json +2 -2
  304. package/node_modules/@smithy/util-retry/package.json +3 -3
  305. package/node_modules/@smithy/util-stream/dist-cjs/index.js +10 -19
  306. package/node_modules/@smithy/util-stream/dist-es/blob/Uint8ArrayBlobAdapter.js +12 -7
  307. package/node_modules/@smithy/util-stream/dist-types/blob/Uint8ArrayBlobAdapter.d.ts +1 -0
  308. package/node_modules/@smithy/util-stream/dist-types/ts3.4/blob/Uint8ArrayBlobAdapter.d.ts +1 -0
  309. package/node_modules/@smithy/util-stream/package.json +5 -5
  310. package/node_modules/@smithy/util-waiter/package.json +3 -3
  311. package/node_modules/cdk-nag/.jsii +3 -3
  312. package/node_modules/cdk-nag/lib/ignore-suppression-conditions.js +5 -5
  313. package/node_modules/cdk-nag/lib/nag-logger.js +2 -2
  314. package/node_modules/cdk-nag/lib/nag-pack.js +1 -1
  315. package/node_modules/cdk-nag/lib/nag-rules.js +1 -1
  316. package/node_modules/cdk-nag/lib/nag-suppressions.js +1 -1
  317. package/node_modules/cdk-nag/lib/packs/aws-solutions.js +1 -1
  318. package/node_modules/cdk-nag/lib/packs/hipaa-security.js +1 -1
  319. package/node_modules/cdk-nag/lib/packs/nist-800-53-r4.js +1 -1
  320. package/node_modules/cdk-nag/lib/packs/nist-800-53-r5.js +1 -1
  321. package/node_modules/cdk-nag/lib/packs/pci-dss-321.js +1 -1
  322. package/node_modules/cdk-nag/lib/packs/serverless.js +1 -1
  323. package/node_modules/cdk-nag/package.json +4 -4
  324. package/node_modules/mailparser/CHANGELOG.md +7 -0
  325. package/node_modules/mailparser/lib/mail-parser.js +12 -3
  326. package/node_modules/mailparser/node_modules/iconv-lite/Changelog.md +236 -0
  327. package/node_modules/mailparser/node_modules/iconv-lite/LICENSE +21 -0
  328. package/node_modules/mailparser/node_modules/iconv-lite/README.md +138 -0
  329. package/node_modules/mailparser/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
  330. package/node_modules/mailparser/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
  331. package/node_modules/mailparser/node_modules/iconv-lite/encodings/index.js +23 -0
  332. package/node_modules/mailparser/node_modules/iconv-lite/encodings/internal.js +218 -0
  333. package/node_modules/mailparser/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
  334. package/node_modules/mailparser/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
  335. package/node_modules/mailparser/node_modules/iconv-lite/encodings/sbcs-data.js +178 -0
  336. package/node_modules/mailparser/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
  337. package/node_modules/mailparser/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
  338. package/node_modules/mailparser/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
  339. package/node_modules/mailparser/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
  340. package/node_modules/mailparser/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
  341. package/node_modules/mailparser/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
  342. package/node_modules/mailparser/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
  343. package/node_modules/mailparser/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
  344. package/node_modules/mailparser/node_modules/iconv-lite/encodings/utf16.js +187 -0
  345. package/node_modules/mailparser/node_modules/iconv-lite/encodings/utf32.js +307 -0
  346. package/node_modules/mailparser/node_modules/iconv-lite/encodings/utf7.js +283 -0
  347. package/node_modules/mailparser/node_modules/iconv-lite/lib/bom-handling.js +48 -0
  348. package/node_modules/mailparser/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
  349. package/node_modules/mailparser/node_modules/iconv-lite/lib/index.d.ts +41 -0
  350. package/node_modules/mailparser/node_modules/iconv-lite/lib/index.js +183 -0
  351. package/node_modules/mailparser/node_modules/iconv-lite/lib/streams.js +105 -0
  352. package/node_modules/mailparser/node_modules/iconv-lite/package.json +59 -0
  353. package/node_modules/mailparser/package.json +5 -5
  354. package/node_modules/mailsplit/index.js +2 -0
  355. package/node_modules/mailsplit/lib/chunked-passthrough.js +37 -0
  356. package/node_modules/mailsplit/package.json +1 -1
  357. package/node_modules/nodemailer/.ncurc.js +3 -5
  358. package/node_modules/nodemailer/.prettierignore +8 -0
  359. package/node_modules/nodemailer/.prettierrc +12 -0
  360. package/node_modules/nodemailer/.prettierrc.js +2 -0
  361. package/node_modules/nodemailer/.release-please-config.json +9 -0
  362. package/node_modules/nodemailer/CHANGELOG.md +323 -305
  363. package/node_modules/nodemailer/CODE_OF_CONDUCT.md +13 -13
  364. package/node_modules/nodemailer/README.md +10 -10
  365. package/node_modules/nodemailer/eslint.config.js +88 -0
  366. package/node_modules/nodemailer/lib/addressparser/index.js +47 -7
  367. package/node_modules/nodemailer/lib/base64/index.js +11 -14
  368. package/node_modules/nodemailer/lib/dkim/index.js +3 -1
  369. package/node_modules/nodemailer/lib/dkim/sign.js +1 -1
  370. package/node_modules/nodemailer/lib/fetch/index.js +7 -1
  371. package/node_modules/nodemailer/lib/mail-composer/index.js +47 -9
  372. package/node_modules/nodemailer/lib/mailer/index.js +8 -1
  373. package/node_modules/nodemailer/lib/mailer/mail-message.js +2 -1
  374. package/node_modules/nodemailer/lib/mime-funcs/index.js +2 -2
  375. package/node_modules/nodemailer/lib/mime-funcs/mime-types.js +12 -3
  376. package/node_modules/nodemailer/lib/mime-node/index.js +11 -9
  377. package/node_modules/nodemailer/lib/nodemailer.js +3 -1
  378. package/node_modules/nodemailer/lib/qp/index.js +10 -2
  379. package/node_modules/nodemailer/lib/shared/index.js +108 -42
  380. package/node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js +2 -2
  381. package/node_modules/nodemailer/lib/smtp-connection/index.js +13 -6
  382. package/node_modules/nodemailer/lib/smtp-pool/pool-resource.js +3 -2
  383. package/node_modules/nodemailer/lib/smtp-transport/index.js +1 -1
  384. package/node_modules/nodemailer/lib/well-known/services.json +277 -42
  385. package/node_modules/nodemailer/lib/xoauth2/index.js +58 -7
  386. package/node_modules/nodemailer/package.json +9 -5
  387. package/node_modules/tlds/index.json +0 -1
  388. package/node_modules/tlds/package.json +1 -1
  389. package/package.json +1 -1
  390. package/node_modules/@smithy/util-stream/dist-es/blob/transforms.js +0 -15
  391. package/node_modules/@smithy/util-stream/dist-types/blob/transforms.d.ts +0 -9
  392. package/node_modules/@smithy/util-stream/dist-types/ts3.4/blob/transforms.d.ts +0 -9
  393. /package/node_modules/@smithy/core/dist-es/{protocols → request-builder}/requestBuilder.js +0 -0
  394. /package/node_modules/@smithy/core/dist-types/{protocols → request-builder}/requestBuilder.d.ts +0 -0
  395. /package/node_modules/@smithy/core/dist-types/ts3.4/{protocols → request-builder}/requestBuilder.d.ts +0 -0
@@ -0,0 +1,187 @@
1
+ "use strict"
2
+ var Buffer = require("safer-buffer").Buffer
3
+
4
+ // Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js
5
+
6
+ // == UTF16-BE codec. ==========================================================
7
+
8
+ exports.utf16be = Utf16BECodec
9
+ function Utf16BECodec () {
10
+ }
11
+
12
+ Utf16BECodec.prototype.encoder = Utf16BEEncoder
13
+ Utf16BECodec.prototype.decoder = Utf16BEDecoder
14
+ Utf16BECodec.prototype.bomAware = true
15
+
16
+ // -- Encoding
17
+
18
+ function Utf16BEEncoder () {
19
+ }
20
+
21
+ Utf16BEEncoder.prototype.write = function (str) {
22
+ var buf = Buffer.from(str, "ucs2")
23
+ for (var i = 0; i < buf.length; i += 2) {
24
+ var tmp = buf[i]; buf[i] = buf[i + 1]; buf[i + 1] = tmp
25
+ }
26
+ return buf
27
+ }
28
+
29
+ Utf16BEEncoder.prototype.end = function () {
30
+ }
31
+
32
+ // -- Decoding
33
+
34
+ function Utf16BEDecoder () {
35
+ this.overflowByte = -1
36
+ }
37
+
38
+ Utf16BEDecoder.prototype.write = function (buf) {
39
+ if (buf.length == 0) { return "" }
40
+
41
+ var buf2 = Buffer.alloc(buf.length + 1)
42
+ var i = 0; var j = 0
43
+
44
+ if (this.overflowByte !== -1) {
45
+ buf2[0] = buf[0]
46
+ buf2[1] = this.overflowByte
47
+ i = 1; j = 2
48
+ }
49
+
50
+ for (; i < buf.length - 1; i += 2, j += 2) {
51
+ buf2[j] = buf[i + 1]
52
+ buf2[j + 1] = buf[i]
53
+ }
54
+
55
+ this.overflowByte = (i == buf.length - 1) ? buf[buf.length - 1] : -1
56
+
57
+ return buf2.slice(0, j).toString("ucs2")
58
+ }
59
+
60
+ Utf16BEDecoder.prototype.end = function () {
61
+ this.overflowByte = -1
62
+ }
63
+
64
+ // == UTF-16 codec =============================================================
65
+ // Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic.
66
+ // Defaults to UTF-16LE, as it's prevalent and default in Node.
67
+ // http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le
68
+ // Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'});
69
+
70
+ // Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false).
71
+
72
+ exports.utf16 = Utf16Codec
73
+ function Utf16Codec (codecOptions, iconv) {
74
+ this.iconv = iconv
75
+ }
76
+
77
+ Utf16Codec.prototype.encoder = Utf16Encoder
78
+ Utf16Codec.prototype.decoder = Utf16Decoder
79
+
80
+ // -- Encoding (pass-through)
81
+
82
+ function Utf16Encoder (options, codec) {
83
+ options = options || {}
84
+ if (options.addBOM === undefined) { options.addBOM = true }
85
+ this.encoder = codec.iconv.getEncoder("utf-16le", options)
86
+ }
87
+
88
+ Utf16Encoder.prototype.write = function (str) {
89
+ return this.encoder.write(str)
90
+ }
91
+
92
+ Utf16Encoder.prototype.end = function () {
93
+ return this.encoder.end()
94
+ }
95
+
96
+ // -- Decoding
97
+
98
+ function Utf16Decoder (options, codec) {
99
+ this.decoder = null
100
+ this.initialBufs = []
101
+ this.initialBufsLen = 0
102
+
103
+ this.options = options || {}
104
+ this.iconv = codec.iconv
105
+ }
106
+
107
+ Utf16Decoder.prototype.write = function (buf) {
108
+ if (!this.decoder) {
109
+ // Codec is not chosen yet. Accumulate initial bytes.
110
+ this.initialBufs.push(buf)
111
+ this.initialBufsLen += buf.length
112
+
113
+ if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below)
114
+ { return "" }
115
+
116
+ // We have enough bytes -> detect endianness.
117
+ var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding)
118
+ this.decoder = this.iconv.getDecoder(encoding, this.options)
119
+
120
+ var resStr = ""
121
+ for (var i = 0; i < this.initialBufs.length; i++) { resStr += this.decoder.write(this.initialBufs[i]) }
122
+
123
+ this.initialBufs.length = this.initialBufsLen = 0
124
+ return resStr
125
+ }
126
+
127
+ return this.decoder.write(buf)
128
+ }
129
+
130
+ Utf16Decoder.prototype.end = function () {
131
+ if (!this.decoder) {
132
+ var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding)
133
+ this.decoder = this.iconv.getDecoder(encoding, this.options)
134
+
135
+ var resStr = ""
136
+ for (var i = 0; i < this.initialBufs.length; i++) { resStr += this.decoder.write(this.initialBufs[i]) }
137
+
138
+ var trail = this.decoder.end()
139
+ if (trail) { resStr += trail }
140
+
141
+ this.initialBufs.length = this.initialBufsLen = 0
142
+ return resStr
143
+ }
144
+ return this.decoder.end()
145
+ }
146
+
147
+ function detectEncoding (bufs, defaultEncoding) {
148
+ var b = []
149
+ var charsProcessed = 0
150
+ // Number of ASCII chars when decoded as LE or BE.
151
+ var asciiCharsLE = 0
152
+ var asciiCharsBE = 0
153
+
154
+ outerLoop:
155
+ for (var i = 0; i < bufs.length; i++) {
156
+ var buf = bufs[i]
157
+ for (var j = 0; j < buf.length; j++) {
158
+ b.push(buf[j])
159
+ if (b.length === 2) {
160
+ if (charsProcessed === 0) {
161
+ // Check BOM first.
162
+ if (b[0] === 0xFF && b[1] === 0xFE) return "utf-16le"
163
+ if (b[0] === 0xFE && b[1] === 0xFF) return "utf-16be"
164
+ }
165
+
166
+ if (b[0] === 0 && b[1] !== 0) asciiCharsBE++
167
+ if (b[0] !== 0 && b[1] === 0) asciiCharsLE++
168
+
169
+ b.length = 0
170
+ charsProcessed++
171
+
172
+ if (charsProcessed >= 100) {
173
+ break outerLoop
174
+ }
175
+ }
176
+ }
177
+ }
178
+
179
+ // Make decisions.
180
+ // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon.
181
+ // So, we count ASCII as if it was LE or BE, and decide from that.
182
+ if (asciiCharsBE > asciiCharsLE) return "utf-16be"
183
+ if (asciiCharsBE < asciiCharsLE) return "utf-16le"
184
+
185
+ // Couldn't decide (likely all zeros or not enough data).
186
+ return defaultEncoding || "utf-16le"
187
+ }
@@ -0,0 +1,307 @@
1
+ "use strict"
2
+
3
+ var Buffer = require("safer-buffer").Buffer
4
+
5
+ // == UTF32-LE/BE codec. ==========================================================
6
+
7
+ exports._utf32 = Utf32Codec
8
+
9
+ function Utf32Codec (codecOptions, iconv) {
10
+ this.iconv = iconv
11
+ this.bomAware = true
12
+ this.isLE = codecOptions.isLE
13
+ }
14
+
15
+ exports.utf32le = { type: "_utf32", isLE: true }
16
+ exports.utf32be = { type: "_utf32", isLE: false }
17
+
18
+ // Aliases
19
+ exports.ucs4le = "utf32le"
20
+ exports.ucs4be = "utf32be"
21
+
22
+ Utf32Codec.prototype.encoder = Utf32Encoder
23
+ Utf32Codec.prototype.decoder = Utf32Decoder
24
+
25
+ // -- Encoding
26
+
27
+ function Utf32Encoder (options, codec) {
28
+ this.isLE = codec.isLE
29
+ this.highSurrogate = 0
30
+ }
31
+
32
+ Utf32Encoder.prototype.write = function (str) {
33
+ var src = Buffer.from(str, "ucs2")
34
+ var dst = Buffer.alloc(src.length * 2)
35
+ var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE
36
+ var offset = 0
37
+
38
+ for (var i = 0; i < src.length; i += 2) {
39
+ var code = src.readUInt16LE(i)
40
+ var isHighSurrogate = (code >= 0xD800 && code < 0xDC00)
41
+ var isLowSurrogate = (code >= 0xDC00 && code < 0xE000)
42
+
43
+ if (this.highSurrogate) {
44
+ if (isHighSurrogate || !isLowSurrogate) {
45
+ // There shouldn't be two high surrogates in a row, nor a high surrogate which isn't followed by a low
46
+ // surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character
47
+ // (technically wrong, but expected by some applications, like Windows file names).
48
+ write32.call(dst, this.highSurrogate, offset)
49
+ offset += 4
50
+ } else {
51
+ // Create 32-bit value from high and low surrogates;
52
+ var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000
53
+
54
+ write32.call(dst, codepoint, offset)
55
+ offset += 4
56
+ this.highSurrogate = 0
57
+
58
+ continue
59
+ }
60
+ }
61
+
62
+ if (isHighSurrogate) { this.highSurrogate = code } else {
63
+ // Even if the current character is a low surrogate, with no previous high surrogate, we'll
64
+ // encode it as a semi-invalid stand-alone character for the same reasons expressed above for
65
+ // unpaired high surrogates.
66
+ write32.call(dst, code, offset)
67
+ offset += 4
68
+ this.highSurrogate = 0
69
+ }
70
+ }
71
+
72
+ if (offset < dst.length) { dst = dst.slice(0, offset) }
73
+
74
+ return dst
75
+ }
76
+
77
+ Utf32Encoder.prototype.end = function () {
78
+ // Treat any leftover high surrogate as a semi-valid independent character.
79
+ if (!this.highSurrogate) { return }
80
+
81
+ var buf = Buffer.alloc(4)
82
+
83
+ if (this.isLE) { buf.writeUInt32LE(this.highSurrogate, 0) } else { buf.writeUInt32BE(this.highSurrogate, 0) }
84
+
85
+ this.highSurrogate = 0
86
+
87
+ return buf
88
+ }
89
+
90
+ // -- Decoding
91
+
92
+ function Utf32Decoder (options, codec) {
93
+ this.isLE = codec.isLE
94
+ this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0)
95
+ this.overflow = []
96
+ }
97
+
98
+ Utf32Decoder.prototype.write = function (src) {
99
+ if (src.length === 0) { return "" }
100
+
101
+ var i = 0
102
+ var codepoint = 0
103
+ var dst = Buffer.alloc(src.length + 4)
104
+ var offset = 0
105
+ var isLE = this.isLE
106
+ var overflow = this.overflow
107
+ var badChar = this.badChar
108
+
109
+ if (overflow.length > 0) {
110
+ for (; i < src.length && overflow.length < 4; i++) { overflow.push(src[i]) }
111
+
112
+ if (overflow.length === 4) {
113
+ // NOTE: codepoint is a signed int32 and can be negative.
114
+ // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer).
115
+ if (isLE) {
116
+ codepoint = overflow[i] | (overflow[i + 1] << 8) | (overflow[i + 2] << 16) | (overflow[i + 3] << 24)
117
+ } else {
118
+ codepoint = overflow[i + 3] | (overflow[i + 2] << 8) | (overflow[i + 1] << 16) | (overflow[i] << 24)
119
+ }
120
+ overflow.length = 0
121
+
122
+ offset = _writeCodepoint(dst, offset, codepoint, badChar)
123
+ }
124
+ }
125
+
126
+ // Main loop. Should be as optimized as possible.
127
+ for (; i < src.length - 3; i += 4) {
128
+ // NOTE: codepoint is a signed int32 and can be negative.
129
+ if (isLE) {
130
+ codepoint = src[i] | (src[i + 1] << 8) | (src[i + 2] << 16) | (src[i + 3] << 24)
131
+ } else {
132
+ codepoint = src[i + 3] | (src[i + 2] << 8) | (src[i + 1] << 16) | (src[i] << 24)
133
+ }
134
+ offset = _writeCodepoint(dst, offset, codepoint, badChar)
135
+ }
136
+
137
+ // Keep overflowing bytes.
138
+ for (; i < src.length; i++) {
139
+ overflow.push(src[i])
140
+ }
141
+
142
+ return dst.slice(0, offset).toString("ucs2")
143
+ }
144
+
145
+ function _writeCodepoint (dst, offset, codepoint, badChar) {
146
+ // NOTE: codepoint is signed int32 and can be negative. We keep it that way to help V8 with optimizations.
147
+ if (codepoint < 0 || codepoint > 0x10FFFF) {
148
+ // Not a valid Unicode codepoint
149
+ codepoint = badChar
150
+ }
151
+
152
+ // Ephemeral Planes: Write high surrogate.
153
+ if (codepoint >= 0x10000) {
154
+ codepoint -= 0x10000
155
+
156
+ var high = 0xD800 | (codepoint >> 10)
157
+ dst[offset++] = high & 0xff
158
+ dst[offset++] = high >> 8
159
+
160
+ // Low surrogate is written below.
161
+ var codepoint = 0xDC00 | (codepoint & 0x3FF)
162
+ }
163
+
164
+ // Write BMP char or low surrogate.
165
+ dst[offset++] = codepoint & 0xff
166
+ dst[offset++] = codepoint >> 8
167
+
168
+ return offset
169
+ };
170
+
171
+ Utf32Decoder.prototype.end = function () {
172
+ this.overflow.length = 0
173
+ }
174
+
175
+ // == UTF-32 Auto codec =============================================================
176
+ // Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic.
177
+ // Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32
178
+ // Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'});
179
+
180
+ // Encoder prepends BOM (which can be overridden with (addBOM: false}).
181
+
182
+ exports.utf32 = Utf32AutoCodec
183
+ exports.ucs4 = "utf32"
184
+
185
+ function Utf32AutoCodec (options, iconv) {
186
+ this.iconv = iconv
187
+ }
188
+
189
+ Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder
190
+ Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder
191
+
192
+ // -- Encoding
193
+
194
+ function Utf32AutoEncoder (options, codec) {
195
+ options = options || {}
196
+
197
+ if (options.addBOM === undefined) {
198
+ options.addBOM = true
199
+ }
200
+
201
+ this.encoder = codec.iconv.getEncoder(options.defaultEncoding || "utf-32le", options)
202
+ }
203
+
204
+ Utf32AutoEncoder.prototype.write = function (str) {
205
+ return this.encoder.write(str)
206
+ }
207
+
208
+ Utf32AutoEncoder.prototype.end = function () {
209
+ return this.encoder.end()
210
+ }
211
+
212
+ // -- Decoding
213
+
214
+ function Utf32AutoDecoder (options, codec) {
215
+ this.decoder = null
216
+ this.initialBufs = []
217
+ this.initialBufsLen = 0
218
+ this.options = options || {}
219
+ this.iconv = codec.iconv
220
+ }
221
+
222
+ Utf32AutoDecoder.prototype.write = function (buf) {
223
+ if (!this.decoder) {
224
+ // Codec is not chosen yet. Accumulate initial bytes.
225
+ this.initialBufs.push(buf)
226
+ this.initialBufsLen += buf.length
227
+
228
+ if (this.initialBufsLen < 32) // We need more bytes to use space heuristic (see below)
229
+ { return "" }
230
+
231
+ // We have enough bytes -> detect endianness.
232
+ var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding)
233
+ this.decoder = this.iconv.getDecoder(encoding, this.options)
234
+
235
+ var resStr = ""
236
+ for (var i = 0; i < this.initialBufs.length; i++) { resStr += this.decoder.write(this.initialBufs[i]) }
237
+
238
+ this.initialBufs.length = this.initialBufsLen = 0
239
+ return resStr
240
+ }
241
+
242
+ return this.decoder.write(buf)
243
+ }
244
+
245
+ Utf32AutoDecoder.prototype.end = function () {
246
+ if (!this.decoder) {
247
+ var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding)
248
+ this.decoder = this.iconv.getDecoder(encoding, this.options)
249
+
250
+ var resStr = ""
251
+ for (var i = 0; i < this.initialBufs.length; i++) { resStr += this.decoder.write(this.initialBufs[i]) }
252
+
253
+ var trail = this.decoder.end()
254
+ if (trail) { resStr += trail }
255
+
256
+ this.initialBufs.length = this.initialBufsLen = 0
257
+ return resStr
258
+ }
259
+
260
+ return this.decoder.end()
261
+ }
262
+
263
+ function detectEncoding (bufs, defaultEncoding) {
264
+ var b = []
265
+ var charsProcessed = 0
266
+ var invalidLE = 0; var invalidBE = 0 // Number of invalid chars when decoded as LE or BE.
267
+ var bmpCharsLE = 0; var bmpCharsBE = 0 // Number of BMP chars when decoded as LE or BE.
268
+
269
+ outerLoop:
270
+ for (var i = 0; i < bufs.length; i++) {
271
+ var buf = bufs[i]
272
+ for (var j = 0; j < buf.length; j++) {
273
+ b.push(buf[j])
274
+ if (b.length === 4) {
275
+ if (charsProcessed === 0) {
276
+ // Check BOM first.
277
+ if (b[0] === 0xFF && b[1] === 0xFE && b[2] === 0 && b[3] === 0) {
278
+ return "utf-32le"
279
+ }
280
+ if (b[0] === 0 && b[1] === 0 && b[2] === 0xFE && b[3] === 0xFF) {
281
+ return "utf-32be"
282
+ }
283
+ }
284
+
285
+ if (b[0] !== 0 || b[1] > 0x10) invalidBE++
286
+ if (b[3] !== 0 || b[2] > 0x10) invalidLE++
287
+
288
+ if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++
289
+ if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++
290
+
291
+ b.length = 0
292
+ charsProcessed++
293
+
294
+ if (charsProcessed >= 100) {
295
+ break outerLoop
296
+ }
297
+ }
298
+ }
299
+ }
300
+
301
+ // Make decisions.
302
+ if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return "utf-32be"
303
+ if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return "utf-32le"
304
+
305
+ // Couldn't decide (likely all zeros or not enough data).
306
+ return defaultEncoding || "utf-32le"
307
+ }