@cdklabs/cdk-construct-connect-datalake 0.0.0 → 0.0.2

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 (355) hide show
  1. package/.jsii +10 -10
  2. package/.jsii.tabl.json +1 -1
  3. package/lib/index.js +1 -1
  4. package/node_modules/@aws/lambda-invoke-store/dist-cjs/invoke-store.js +2 -2
  5. package/node_modules/@aws/lambda-invoke-store/dist-es/invoke-store.js +2 -2
  6. package/node_modules/@aws/lambda-invoke-store/dist-types/invoke-store.d.ts +1 -1
  7. package/node_modules/@aws/lambda-invoke-store/package.json +1 -1
  8. package/node_modules/@aws-sdk/client-cloudformation/README.md +26 -46
  9. package/node_modules/@aws-sdk/client-cloudformation/package.json +39 -39
  10. package/node_modules/@aws-sdk/client-connect/README.md +47 -46
  11. package/node_modules/@aws-sdk/client-connect/dist-cjs/index.js +43 -0
  12. package/node_modules/@aws-sdk/client-connect/dist-cjs/schemas/schemas_0.js +109 -41
  13. package/node_modules/@aws-sdk/client-connect/dist-es/Connect.js +6 -0
  14. package/node_modules/@aws-sdk/client-connect/dist-es/commands/AssociateQueueEmailAddressesCommand.js +16 -0
  15. package/node_modules/@aws-sdk/client-connect/dist-es/commands/DisassociateQueueEmailAddressesCommand.js +16 -0
  16. package/node_modules/@aws-sdk/client-connect/dist-es/commands/ListQueueEmailAddressesCommand.js +16 -0
  17. package/node_modules/@aws-sdk/client-connect/dist-es/commands/index.js +3 -0
  18. package/node_modules/@aws-sdk/client-connect/dist-es/models/enums.js +1 -0
  19. package/node_modules/@aws-sdk/client-connect/dist-es/schemas/schemas_0.js +78 -10
  20. package/node_modules/@aws-sdk/client-connect/dist-types/Connect.d.ts +21 -0
  21. package/node_modules/@aws-sdk/client-connect/dist-types/ConnectClient.d.ts +5 -2
  22. package/node_modules/@aws-sdk/client-connect/dist-types/commands/AssociateQueueEmailAddressesCommand.d.ts +120 -0
  23. package/node_modules/@aws-sdk/client-connect/dist-types/commands/CreateQueueCommand.d.ts +5 -0
  24. package/node_modules/@aws-sdk/client-connect/dist-types/commands/CreateTestCaseCommand.d.ts +4 -1
  25. package/node_modules/@aws-sdk/client-connect/dist-types/commands/DescribeContactEvaluationCommand.d.ts +4 -2
  26. package/node_modules/@aws-sdk/client-connect/dist-types/commands/DescribeTestCaseCommand.d.ts +4 -1
  27. package/node_modules/@aws-sdk/client-connect/dist-types/commands/DisassociateQueueEmailAddressesCommand.d.ts +109 -0
  28. package/node_modules/@aws-sdk/client-connect/dist-types/commands/GetTestCaseExecutionSummaryCommand.d.ts +2 -1
  29. package/node_modules/@aws-sdk/client-connect/dist-types/commands/GetTrafficDistributionCommand.d.ts +1 -2
  30. package/node_modules/@aws-sdk/client-connect/dist-types/commands/ListQueueEmailAddressesCommand.d.ts +121 -0
  31. package/node_modules/@aws-sdk/client-connect/dist-types/commands/SearchContactEvaluationsCommand.d.ts +1 -2
  32. package/node_modules/@aws-sdk/client-connect/dist-types/commands/SearchRoutingProfilesCommand.d.ts +1 -2
  33. package/node_modules/@aws-sdk/client-connect/dist-types/commands/SearchSecurityProfilesCommand.d.ts +1 -2
  34. package/node_modules/@aws-sdk/client-connect/dist-types/commands/SearchTestCasesCommand.d.ts +5 -3
  35. package/node_modules/@aws-sdk/client-connect/dist-types/commands/UpdateTestCaseCommand.d.ts +4 -1
  36. package/node_modules/@aws-sdk/client-connect/dist-types/commands/index.d.ts +3 -0
  37. package/node_modules/@aws-sdk/client-connect/dist-types/models/enums.d.ts +1 -0
  38. package/node_modules/@aws-sdk/client-connect/dist-types/models/models_0.d.ts +62 -88
  39. package/node_modules/@aws-sdk/client-connect/dist-types/models/models_1.d.ts +137 -81
  40. package/node_modules/@aws-sdk/client-connect/dist-types/models/models_2.d.ts +147 -148
  41. package/node_modules/@aws-sdk/client-connect/dist-types/models/models_3.d.ts +150 -3
  42. package/node_modules/@aws-sdk/client-connect/dist-types/schemas/schemas_0.d.ts +10 -0
  43. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/Connect.d.ts +51 -0
  44. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/ConnectClient.d.ts +18 -0
  45. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/AssociateQueueEmailAddressesCommand.d.ts +47 -0
  46. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/DisassociateQueueEmailAddressesCommand.d.ts +47 -0
  47. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/GetTestCaseExecutionSummaryCommand.d.ts +2 -4
  48. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/GetTrafficDistributionCommand.d.ts +4 -2
  49. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/ListQueueEmailAddressesCommand.d.ts +51 -0
  50. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/SearchRoutingProfilesCommand.d.ts +4 -2
  51. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/SearchSecurityProfilesCommand.d.ts +4 -2
  52. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/SearchTestCasesCommand.d.ts +4 -2
  53. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/commands/index.d.ts +3 -0
  54. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/enums.d.ts +1 -0
  55. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/models_0.d.ts +14 -20
  56. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/models_1.d.ts +30 -24
  57. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/models_2.d.ts +35 -35
  58. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/models/models_3.d.ts +34 -3
  59. package/node_modules/@aws-sdk/client-connect/dist-types/ts3.4/schemas/schemas_0.d.ts +10 -0
  60. package/node_modules/@aws-sdk/client-connect/package.json +38 -38
  61. package/node_modules/@aws-sdk/client-glue/README.md +26 -46
  62. package/node_modules/@aws-sdk/client-glue/dist-cjs/index.js +5 -0
  63. package/node_modules/@aws-sdk/client-glue/dist-cjs/schemas/schemas_0.js +5 -4
  64. package/node_modules/@aws-sdk/client-glue/dist-es/models/enums.js +4 -0
  65. package/node_modules/@aws-sdk/client-glue/dist-es/schemas/schemas_0.js +5 -4
  66. package/node_modules/@aws-sdk/client-glue/dist-types/commands/BatchGetPartitionCommand.d.ts +16 -0
  67. package/node_modules/@aws-sdk/client-glue/dist-types/commands/CreateCatalogCommand.d.ts +1 -0
  68. package/node_modules/@aws-sdk/client-glue/dist-types/commands/CreateDataQualityRulesetCommand.d.ts +1 -2
  69. package/node_modules/@aws-sdk/client-glue/dist-types/commands/UpdateCatalogCommand.d.ts +1 -0
  70. package/node_modules/@aws-sdk/client-glue/dist-types/models/enums.d.ts +12 -0
  71. package/node_modules/@aws-sdk/client-glue/dist-types/models/models_0.d.ts +50 -43
  72. package/node_modules/@aws-sdk/client-glue/dist-types/models/models_1.d.ts +41 -21
  73. package/node_modules/@aws-sdk/client-glue/dist-types/models/models_2.d.ts +23 -33
  74. package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/commands/CreateDataQualityRulesetCommand.d.ts +4 -2
  75. package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/models/enums.d.ts +6 -0
  76. package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/models/models_0.d.ts +13 -9
  77. package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/models/models_1.d.ts +9 -5
  78. package/node_modules/@aws-sdk/client-glue/dist-types/ts3.4/models/models_2.d.ts +6 -8
  79. package/node_modules/@aws-sdk/client-glue/package.json +38 -38
  80. package/node_modules/@aws-sdk/client-lakeformation/README.md +26 -46
  81. package/node_modules/@aws-sdk/client-lakeformation/package.json +39 -39
  82. package/node_modules/@aws-sdk/client-ram/README.md +26 -46
  83. package/node_modules/@aws-sdk/client-ram/dist-cjs/schemas/schemas_0.js +14 -6
  84. package/node_modules/@aws-sdk/client-ram/dist-es/schemas/schemas_0.js +12 -4
  85. package/node_modules/@aws-sdk/client-ram/dist-types/commands/CreateResourceShareCommand.d.ts +6 -0
  86. package/node_modules/@aws-sdk/client-ram/dist-types/commands/GetResourceSharesCommand.d.ts +3 -0
  87. package/node_modules/@aws-sdk/client-ram/dist-types/commands/UpdateResourceShareCommand.d.ts +3 -0
  88. package/node_modules/@aws-sdk/client-ram/dist-types/models/models_0.d.ts +21 -0
  89. package/node_modules/@aws-sdk/client-ram/dist-types/schemas/schemas_0.d.ts +1 -0
  90. package/node_modules/@aws-sdk/client-ram/dist-types/ts3.4/models/models_0.d.ts +5 -0
  91. package/node_modules/@aws-sdk/client-ram/dist-types/ts3.4/schemas/schemas_0.d.ts +1 -0
  92. package/node_modules/@aws-sdk/client-ram/package.json +38 -38
  93. package/node_modules/@aws-sdk/client-sts/README.md +26 -46
  94. package/node_modules/@aws-sdk/client-sts/package.json +43 -39
  95. package/node_modules/@aws-sdk/core/dist-cjs/index.js +11 -15
  96. package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +11 -15
  97. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +2 -0
  98. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +2 -8
  99. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js +3 -0
  100. package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js +5 -7
  101. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +2 -0
  102. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/AwsEc2QueryProtocol.d.ts +4 -0
  103. package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/query/QuerySerializerSettings.d.ts +3 -0
  104. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +2 -0
  105. package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsEc2QueryProtocol.d.ts +1 -0
  106. package/node_modules/@aws-sdk/core/package.json +14 -14
  107. package/node_modules/@aws-sdk/credential-provider-env/package.json +6 -6
  108. package/node_modules/@aws-sdk/credential-provider-http/package.json +11 -11
  109. package/node_modules/@aws-sdk/credential-provider-ini/package.json +15 -15
  110. package/node_modules/@aws-sdk/credential-provider-login/package.json +9 -9
  111. package/node_modules/@aws-sdk/credential-provider-node/package.json +13 -13
  112. package/node_modules/@aws-sdk/credential-provider-process/package.json +7 -7
  113. package/node_modules/@aws-sdk/credential-provider-sso/package.json +9 -9
  114. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +8 -8
  115. package/node_modules/@aws-sdk/middleware-host-header/package.json +5 -5
  116. package/node_modules/@aws-sdk/middleware-logger/package.json +4 -4
  117. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +5 -5
  118. package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +9 -9
  119. package/node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js +9 -9
  120. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/check-features.d.ts +4 -2
  121. package/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/check-features.d.ts +3 -3
  122. package/node_modules/@aws-sdk/middleware-user-agent/package.json +9 -8
  123. package/node_modules/@aws-sdk/nested-clients/package.json +39 -37
  124. package/node_modules/@aws-sdk/region-config-resolver/package.json +6 -6
  125. package/node_modules/@aws-sdk/token-providers/package.json +8 -8
  126. package/node_modules/@aws-sdk/types/package.json +3 -3
  127. package/node_modules/@aws-sdk/util-endpoints/package.json +6 -6
  128. package/node_modules/@aws-sdk/util-locate-window/package.json +2 -2
  129. package/node_modules/@aws-sdk/util-user-agent-browser/package.json +4 -4
  130. package/node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js +87 -14
  131. package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getNodeModulesParentDirs.js +15 -0
  132. package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getSanitizedDevTypeScriptVersion.js +14 -0
  133. package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getSanitizedTypeScriptVersion.js +9 -0
  134. package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptUserAgentPair.js +59 -8
  135. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/getNodeModulesParentDirs.d.ts +10 -0
  136. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/getSanitizedDevTypeScriptVersion.d.ts +8 -0
  137. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/getSanitizedTypeScriptVersion.d.ts +8 -0
  138. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getNodeModulesParentDirs.d.ts +1 -0
  139. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getSanitizedDevTypeScriptVersion.d.ts +3 -0
  140. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getSanitizedTypeScriptVersion.d.ts +3 -0
  141. package/node_modules/@aws-sdk/util-user-agent-node/package.json +7 -6
  142. package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +21 -11
  143. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +5 -0
  144. package/node_modules/@aws-sdk/xml-builder/dist-es/escape-attribute.js +8 -1
  145. package/node_modules/@aws-sdk/xml-builder/dist-es/escape-element.js +13 -10
  146. package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.js +5 -0
  147. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/CHANGELOG.md +59 -0
  148. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/README.md +8 -7
  149. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxbuilder.min.js +1 -1
  150. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +1 -1
  151. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.cjs +1 -1
  152. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.d.cts +97 -21
  153. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js +1 -1
  154. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js.map +1 -1
  155. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js +1 -1
  156. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js.map +1 -1
  157. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxvalidator.min.js +1 -1
  158. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +1 -1
  159. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/pem.d.cts +148 -0
  160. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/package.json +5 -3
  161. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/fxp.d.ts +91 -19
  162. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/fxp.js +1 -1
  163. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/pem.d.ts +135 -0
  164. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/util.js +18 -25
  165. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/EntitiesParser.js +87 -87
  166. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OptionsBuilder.js +10 -10
  167. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/BaseOutputBuilder.js +23 -23
  168. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsArrBuilder.js +29 -29
  169. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsObjBuilder.js +39 -39
  170. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +17 -17
  171. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/XMLParser.js +22 -22
  172. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/EntitiesParser.js +85 -85
  173. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/validator.js +34 -34
  174. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +5 -284
  175. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +37 -18
  176. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +78 -5
  177. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +317 -113
  178. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +23 -23
  179. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/node2json.js +96 -42
  180. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +10 -10
  181. package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/CHANGELOG.md +9 -2
  182. package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/README.md +1 -0
  183. package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/package.json +3 -3
  184. package/node_modules/@aws-sdk/xml-builder/node_modules/strnum/strnum.js +161 -0
  185. package/node_modules/@aws-sdk/xml-builder/node_modules/strnum/tests/infinity_test.js +18 -0
  186. package/node_modules/{strnum/strnum.test.js → @aws-sdk/xml-builder/node_modules/strnum/tests/strnum_test.js} +70 -68
  187. package/node_modules/@aws-sdk/xml-builder/node_modules/strnum/tests/temp.js +8 -0
  188. package/node_modules/@aws-sdk/xml-builder/package.json +4 -4
  189. package/node_modules/@smithy/abort-controller/package.json +3 -3
  190. package/node_modules/@smithy/config-resolver/dist-cjs/index.js +12 -0
  191. package/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js +5 -0
  192. package/node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseFipsEndpointConfigOptions.js +5 -0
  193. package/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/NodeUseDualstackEndpointConfigOptions.d.ts +6 -0
  194. package/node_modules/@smithy/config-resolver/dist-types/endpointsConfig/NodeUseFipsEndpointConfigOptions.d.ts +6 -0
  195. package/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/NodeUseDualstackEndpointConfigOptions.d.ts +6 -0
  196. package/node_modules/@smithy/config-resolver/dist-types/ts3.4/endpointsConfig/NodeUseFipsEndpointConfigOptions.d.ts +6 -0
  197. package/node_modules/@smithy/config-resolver/package.json +7 -7
  198. package/node_modules/@smithy/core/dist-cjs/index.js +1 -2
  199. package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +9 -9
  200. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +22 -0
  201. package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +1 -1
  202. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +11 -1
  203. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +42 -5
  204. package/node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +1 -2
  205. package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +2 -8
  206. package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +7 -1
  207. package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.js +1 -0
  208. package/node_modules/@smithy/core/dist-es/submodules/endpoints/toEndpointV1.js +17 -0
  209. package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +1 -1
  210. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +10 -0
  211. package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +1 -1
  212. package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +3 -2
  213. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js +31 -2
  214. package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js +5 -1
  215. package/node_modules/@smithy/core/dist-types/submodules/endpoints/index.d.ts +1 -0
  216. package/node_modules/@smithy/core/dist-types/submodules/endpoints/toEndpointV1.d.ts +6 -0
  217. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/NormalizedSchema.d.ts +11 -0
  218. package/node_modules/@smithy/core/dist-types/submodules/schema/schemas/translateTraits.d.ts +6 -0
  219. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/index.d.ts +1 -0
  220. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/toEndpointV1.d.ts +6 -0
  221. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/NormalizedSchema.d.ts +11 -0
  222. package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/schemas/translateTraits.d.ts +6 -0
  223. package/node_modules/@smithy/core/endpoints.d.ts +7 -0
  224. package/node_modules/@smithy/core/endpoints.js +6 -0
  225. package/node_modules/@smithy/core/package.json +21 -12
  226. package/node_modules/@smithy/credential-provider-imds/package.json +6 -6
  227. package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +21 -4
  228. package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +21 -4
  229. package/node_modules/@smithy/fetch-http-handler/package.json +7 -7
  230. package/node_modules/@smithy/hash-node/package.json +5 -5
  231. package/node_modules/@smithy/invalid-dependency/package.json +3 -3
  232. package/node_modules/@smithy/is-array-buffer/package.json +2 -2
  233. package/node_modules/@smithy/middleware-content-length/package.json +4 -4
  234. package/node_modules/@smithy/middleware-endpoint/dist-cjs/index.js +17 -1
  235. package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js +9 -0
  236. package/node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js +8 -1
  237. package/node_modules/@smithy/middleware-endpoint/dist-types/adaptors/toEndpointV1.d.ts +1 -0
  238. package/node_modules/@smithy/middleware-endpoint/dist-types/resolveEndpointConfig.d.ts +2 -2
  239. package/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/adaptors/toEndpointV1.d.ts +1 -0
  240. package/node_modules/@smithy/middleware-endpoint/dist-types/ts3.4/resolveEndpointConfig.d.ts +2 -2
  241. package/node_modules/@smithy/middleware-endpoint/package.json +9 -9
  242. package/node_modules/@smithy/middleware-retry/dist-cjs/index.js +9 -12
  243. package/node_modules/@smithy/middleware-retry/dist-es/configurations.js +9 -12
  244. package/node_modules/@smithy/middleware-retry/package.json +10 -10
  245. package/node_modules/@smithy/middleware-serde/dist-cjs/index.js +3 -2
  246. package/node_modules/@smithy/middleware-serde/dist-es/serializerMiddleware.js +3 -2
  247. package/node_modules/@smithy/middleware-serde/package.json +5 -4
  248. package/node_modules/@smithy/middleware-stack/package.json +3 -3
  249. package/node_modules/@smithy/node-config-provider/package.json +5 -5
  250. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +68 -45
  251. package/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +19 -0
  252. package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +41 -35
  253. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +1 -1
  254. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +4 -5
  255. package/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +1 -1
  256. package/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +6 -6
  257. package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +1 -1
  258. package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +1 -1
  259. package/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +1 -1
  260. package/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +10 -0
  261. package/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +1 -1
  262. package/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +4 -4
  263. package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +1 -1
  264. package/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +1 -1
  265. package/node_modules/@smithy/node-http-handler/dist-types/readable.mock.d.ts +2 -2
  266. package/node_modules/@smithy/node-http-handler/dist-types/server.mock.d.ts +3 -3
  267. package/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +1 -1
  268. package/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +1 -1
  269. package/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +1 -1
  270. package/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +1 -1
  271. package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +1 -1
  272. package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/readable.mock.d.ts +2 -2
  273. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +10 -0
  274. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +1 -1
  275. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +4 -4
  276. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +1 -1
  277. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +1 -1
  278. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/readable.mock.d.ts +2 -2
  279. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/server.mock.d.ts +3 -3
  280. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +1 -1
  281. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +1 -1
  282. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +1 -1
  283. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +1 -1
  284. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/collector.d.ts +1 -1
  285. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/stream-collector/readable.mock.d.ts +2 -2
  286. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +2 -2
  287. package/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +2 -2
  288. package/node_modules/@smithy/node-http-handler/package.json +6 -6
  289. package/node_modules/@smithy/property-provider/package.json +3 -3
  290. package/node_modules/@smithy/protocol-http/package.json +3 -3
  291. package/node_modules/@smithy/querystring-builder/package.json +4 -4
  292. package/node_modules/@smithy/querystring-parser/package.json +3 -3
  293. package/node_modules/@smithy/service-error-classification/package.json +3 -3
  294. package/node_modules/@smithy/shared-ini-file-loader/package.json +3 -3
  295. package/node_modules/@smithy/signature-v4/package.json +9 -9
  296. package/node_modules/@smithy/smithy-client/package.json +8 -8
  297. package/node_modules/@smithy/types/dist-types/http.d.ts +1 -0
  298. package/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts +1 -0
  299. package/node_modules/@smithy/types/package.json +1 -1
  300. package/node_modules/@smithy/url-parser/package.json +4 -4
  301. package/node_modules/@smithy/util-base64/package.json +4 -4
  302. package/node_modules/@smithy/util-body-length-browser/package.json +2 -2
  303. package/node_modules/@smithy/util-body-length-node/package.json +2 -2
  304. package/node_modules/@smithy/util-buffer-from/package.json +3 -3
  305. package/node_modules/@smithy/util-config-provider/package.json +2 -2
  306. package/node_modules/@smithy/util-defaults-mode-browser/package.json +5 -5
  307. package/node_modules/@smithy/util-defaults-mode-node/package.json +8 -8
  308. package/node_modules/@smithy/util-endpoints/package.json +4 -4
  309. package/node_modules/@smithy/util-hex-encoding/package.json +2 -2
  310. package/node_modules/@smithy/util-middleware/package.json +3 -3
  311. package/node_modules/@smithy/util-retry/package.json +4 -4
  312. package/node_modules/@smithy/util-stream/package.json +9 -9
  313. package/node_modules/@smithy/util-uri-escape/package.json +2 -2
  314. package/node_modules/@smithy/util-utf8/package.json +3 -3
  315. package/node_modules/@smithy/util-waiter/dist-cjs/index.js +1 -1
  316. package/node_modules/@smithy/util-waiter/dist-es/poller.js +1 -1
  317. package/node_modules/@smithy/util-waiter/package.json +4 -4
  318. package/node_modules/@smithy/uuid/package.json +2 -2
  319. package/node_modules/fast-xml-builder/CHANGELOG.md +16 -0
  320. package/node_modules/fast-xml-builder/LICENSE +21 -0
  321. package/node_modules/fast-xml-builder/README.md +23 -0
  322. package/node_modules/fast-xml-builder/lib/fxb.cjs +1 -0
  323. package/node_modules/fast-xml-builder/lib/fxb.d.cts +180 -0
  324. package/node_modules/fast-xml-builder/lib/fxb.min.js +2 -0
  325. package/node_modules/fast-xml-builder/lib/fxb.min.js.map +1 -0
  326. package/node_modules/fast-xml-builder/package.json +80 -0
  327. package/node_modules/fast-xml-builder/src/fxb.d.ts +180 -0
  328. package/node_modules/fast-xml-builder/src/fxb.js +529 -0
  329. package/node_modules/fast-xml-builder/src/ignoreAttributes.js +18 -0
  330. package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +292 -0
  331. package/node_modules/path-expression-matcher/LICENSE +21 -0
  332. package/node_modules/path-expression-matcher/README.md +720 -0
  333. package/node_modules/path-expression-matcher/lib/pem.cjs +1 -0
  334. package/node_modules/path-expression-matcher/lib/pem.d.cts +523 -0
  335. package/node_modules/path-expression-matcher/lib/pem.min.js +2 -0
  336. package/node_modules/path-expression-matcher/lib/pem.min.js.map +1 -0
  337. package/node_modules/path-expression-matcher/package.json +78 -0
  338. package/node_modules/path-expression-matcher/src/Expression.js +232 -0
  339. package/node_modules/path-expression-matcher/src/Matcher.js +498 -0
  340. package/node_modules/path-expression-matcher/src/index.d.ts +518 -0
  341. package/node_modules/path-expression-matcher/src/index.js +28 -0
  342. package/node_modules/xml2js/node_modules/sax/lib/sax.js +151 -7
  343. package/node_modules/xml2js/node_modules/sax/package.json +5 -2
  344. package/package.json +10 -10
  345. package/node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptPackageJsonPath.js +0 -14
  346. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/getTypeScriptPackageJsonPath.d.ts +0 -9
  347. package/node_modules/@aws-sdk/util-user-agent-node/dist-types/ts3.4/getTypeScriptPackageJsonPath.d.ts +0 -1
  348. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +0 -134
  349. package/node_modules/strnum/strnum.js +0 -129
  350. package/node_modules/strnum/test.js +0 -9
  351. /package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/.github/SECURITY.md +0 -0
  352. /package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/.vscode/launch.json +0 -0
  353. /package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/LICENSE +0 -0
  354. /package/node_modules/{strnum → @aws-sdk/xml-builder/node_modules/strnum}/algo.stflow +0 -0
  355. /package/node_modules/{@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlbuilder → fast-xml-builder/src}/prettifyJs2Xml.js +0 -0
@@ -1,11 +1,12 @@
1
1
  'use strict';
2
2
  ///@ts-check
3
3
 
4
- import { getAllMatches, isExist } from '../util.js';
4
+ import { getAllMatches, isExist, DANGEROUS_PROPERTY_NAMES, criticalProperties } from '../util.js';
5
5
  import xmlNode from './xmlNode.js';
6
6
  import DocTypeReader from './DocTypeReader.js';
7
7
  import toNumber from "strnum";
8
8
  import getIgnoreAttributesFn from "../ignoreAttributes.js";
9
+ import { Expression, Matcher } from 'path-expression-matcher';
9
10
 
10
11
  // const regx =
11
12
  // '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)'
@@ -14,6 +15,57 @@ import getIgnoreAttributesFn from "../ignoreAttributes.js";
14
15
  //const tagsRegx = new RegExp("<(\\/?[\\w:\\-\._]+)([^>]*)>(\\s*"+cdataRegx+")*([^<]+)?","g");
15
16
  //const tagsRegx = new RegExp("<(\\/?)((\\w*:)?([\\w:\\-\._]+))([^>]*)>([^<]*)("+cdataRegx+"([^<]*))*([^<]+)?","g");
16
17
 
18
+ // Helper functions for attribute and namespace handling
19
+
20
+ /**
21
+ * Extract raw attributes (without prefix) from prefixed attribute map
22
+ * @param {object} prefixedAttrs - Attributes with prefix from buildAttributesMap
23
+ * @param {object} options - Parser options containing attributeNamePrefix
24
+ * @returns {object} Raw attributes for matcher
25
+ */
26
+ function extractRawAttributes(prefixedAttrs, options) {
27
+ if (!prefixedAttrs) return {};
28
+
29
+ // Handle attributesGroupName option
30
+ const attrs = options.attributesGroupName
31
+ ? prefixedAttrs[options.attributesGroupName]
32
+ : prefixedAttrs;
33
+
34
+ if (!attrs) return {};
35
+
36
+ const rawAttrs = {};
37
+ for (const key in attrs) {
38
+ // Remove the attribute prefix to get raw name
39
+ if (key.startsWith(options.attributeNamePrefix)) {
40
+ const rawName = key.substring(options.attributeNamePrefix.length);
41
+ rawAttrs[rawName] = attrs[key];
42
+ } else {
43
+ // Attribute without prefix (shouldn't normally happen, but be safe)
44
+ rawAttrs[key] = attrs[key];
45
+ }
46
+ }
47
+ return rawAttrs;
48
+ }
49
+
50
+ /**
51
+ * Extract namespace from raw tag name
52
+ * @param {string} rawTagName - Tag name possibly with namespace (e.g., "soap:Envelope")
53
+ * @returns {string|undefined} Namespace or undefined
54
+ */
55
+ function extractNamespace(rawTagName) {
56
+ if (!rawTagName || typeof rawTagName !== 'string') return undefined;
57
+
58
+ const colonIndex = rawTagName.indexOf(':');
59
+ if (colonIndex !== -1 && colonIndex > 0) {
60
+ const ns = rawTagName.substring(0, colonIndex);
61
+ // Don't treat xmlns as a namespace
62
+ if (ns !== 'xmlns') {
63
+ return ns;
64
+ }
65
+ }
66
+ return undefined;
67
+ }
68
+
17
69
  export default class OrderedObjParser {
18
70
  constructor(options) {
19
71
  this.options = options;
@@ -58,16 +110,27 @@ export default class OrderedObjParser {
58
110
  this.entityExpansionCount = 0;
59
111
  this.currentExpandedLength = 0;
60
112
 
113
+ // Initialize path matcher for path-expression-matcher
114
+ this.matcher = new Matcher();
115
+
116
+ // Live read-only proxy of matcher — PEM creates and caches this internally.
117
+ // All user callbacks receive this instead of the mutable matcher.
118
+ this.readonlyMatcher = this.matcher.readOnly();
119
+
120
+ // Flag to track if current node is a stop node (optimization)
121
+ this.isCurrentNodeStopNode = false;
122
+
123
+ // Pre-compile stopNodes expressions
61
124
  if (this.options.stopNodes && this.options.stopNodes.length > 0) {
62
- this.stopNodesExact = new Set();
63
- this.stopNodesWildcard = new Set();
125
+ this.stopNodeExpressions = [];
64
126
  for (let i = 0; i < this.options.stopNodes.length; i++) {
65
127
  const stopNodeExp = this.options.stopNodes[i];
66
- if (typeof stopNodeExp !== 'string') continue;
67
- if (stopNodeExp.startsWith("*.")) {
68
- this.stopNodesWildcard.add(stopNodeExp.substring(2));
69
- } else {
70
- this.stopNodesExact.add(stopNodeExp);
128
+ if (typeof stopNodeExp === 'string') {
129
+ // Convert string to Expression object
130
+ this.stopNodeExpressions.push(new Expression(stopNodeExp));
131
+ } else if (stopNodeExp instanceof Expression) {
132
+ // Already an Expression object
133
+ this.stopNodeExpressions.push(stopNodeExp);
71
134
  }
72
135
  }
73
136
  }
@@ -90,7 +153,7 @@ function addExternalEntities(externalEntities) {
90
153
  /**
91
154
  * @param {string} val
92
155
  * @param {string} tagName
93
- * @param {string} jPath
156
+ * @param {string|Matcher} jPath - jPath string or Matcher instance based on options.jPath
94
157
  * @param {boolean} dontTrim
95
158
  * @param {boolean} hasAttributes
96
159
  * @param {boolean} isLeafNode
@@ -104,7 +167,9 @@ function parseTextData(val, tagName, jPath, dontTrim, hasAttributes, isLeafNode,
104
167
  if (val.length > 0) {
105
168
  if (!escapeEntities) val = this.replaceEntitiesValue(val, tagName, jPath);
106
169
 
107
- const newval = this.options.tagValueProcessor(tagName, val, jPath, hasAttributes, isLeafNode);
170
+ // Pass jPath string or matcher based on options.jPath setting
171
+ const jPathOrMatcher = this.options.jPath ? jPath.toString() : jPath;
172
+ const newval = this.options.tagValueProcessor(tagName, val, jPathOrMatcher, hasAttributes, isLeafNode);
108
173
  if (newval === null || newval === undefined) {
109
174
  //don't parse
110
175
  return val;
@@ -151,24 +216,58 @@ function buildAttributesMap(attrStr, jPath, tagName) {
151
216
  const matches = getAllMatches(attrStr, attrsRegx);
152
217
  const len = matches.length; //don't make it inline
153
218
  const attrs = {};
219
+
220
+ // First pass: parse all attributes and update matcher with raw values
221
+ // This ensures the matcher has all attribute values when processors run
222
+ const rawAttrsForMatcher = {};
223
+ for (let i = 0; i < len; i++) {
224
+ const attrName = this.resolveNameSpace(matches[i][1]);
225
+ const oldVal = matches[i][4];
226
+
227
+ if (attrName.length && oldVal !== undefined) {
228
+ let parsedVal = oldVal;
229
+ if (this.options.trimValues) {
230
+ parsedVal = parsedVal.trim();
231
+ }
232
+ parsedVal = this.replaceEntitiesValue(parsedVal, tagName, this.readonlyMatcher);
233
+ rawAttrsForMatcher[attrName] = parsedVal;
234
+ }
235
+ }
236
+
237
+ // Update matcher with raw attribute values BEFORE running processors
238
+ if (Object.keys(rawAttrsForMatcher).length > 0 && typeof jPath === 'object' && jPath.updateCurrent) {
239
+ jPath.updateCurrent(rawAttrsForMatcher);
240
+ }
241
+
242
+ // Second pass: now process attributes with matcher having full attribute context
154
243
  for (let i = 0; i < len; i++) {
155
244
  const attrName = this.resolveNameSpace(matches[i][1]);
156
- if (this.ignoreAttributesFn(attrName, jPath)) {
245
+
246
+ // Convert jPath to string if needed for ignoreAttributesFn
247
+ const jPathStr = this.options.jPath ? jPath.toString() : this.readonlyMatcher;
248
+ if (this.ignoreAttributesFn(attrName, jPathStr)) {
157
249
  continue
158
250
  }
251
+
159
252
  let oldVal = matches[i][4];
160
253
  let aName = this.options.attributeNamePrefix + attrName;
254
+
161
255
  if (attrName.length) {
162
256
  if (this.options.transformAttributeName) {
163
257
  aName = this.options.transformAttributeName(aName);
164
258
  }
165
- if (aName === "__proto__") aName = "#__proto__";
259
+ //if (aName === "__proto__") aName = "#__proto__";
260
+ aName = sanitizeName(aName, this.options);
261
+
166
262
  if (oldVal !== undefined) {
167
263
  if (this.options.trimValues) {
168
264
  oldVal = oldVal.trim();
169
265
  }
170
- oldVal = this.replaceEntitiesValue(oldVal, tagName, jPath);
171
- const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPath);
266
+ oldVal = this.replaceEntitiesValue(oldVal, tagName, this.readonlyMatcher);
267
+
268
+ // Pass jPath string or readonlyMatcher based on options.jPath setting
269
+ const jPathOrMatcher = this.options.jPath ? jPath.toString() : this.readonlyMatcher;
270
+ const newVal = this.options.attributeValueProcessor(attrName, oldVal, jPathOrMatcher);
172
271
  if (newVal === null || newVal === undefined) {
173
272
  //don't parse
174
273
  attrs[aName] = oldVal;
@@ -188,6 +287,7 @@ function buildAttributesMap(attrStr, jPath, tagName) {
188
287
  }
189
288
  }
190
289
  }
290
+
191
291
  if (!Object.keys(attrs).length) {
192
292
  return;
193
293
  }
@@ -205,7 +305,9 @@ const parseXml = function (xmlData) {
205
305
  const xmlObj = new xmlNode('!xml');
206
306
  let currentNode = xmlObj;
207
307
  let textData = "";
208
- let jPath = "";
308
+
309
+ // Reset matcher for new document
310
+ this.matcher.reset();
209
311
 
210
312
  // Reset entity expansion counters for this document
211
313
  this.entityExpansionCount = 0;
@@ -228,27 +330,25 @@ const parseXml = function (xmlData) {
228
330
  }
229
331
  }
230
332
 
231
- if (this.options.transformTagName) {
232
- tagName = this.options.transformTagName(tagName);
233
- }
333
+ tagName = transformTagName(this.options.transformTagName, tagName, "", this.options).tagName;
234
334
 
235
335
  if (currentNode) {
236
- textData = this.saveTextToParentTag(textData, currentNode, jPath);
336
+ textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);
237
337
  }
238
338
 
239
339
  //check if last tag of nested tag was unpaired tag
240
- const lastTagName = jPath.substring(jPath.lastIndexOf(".") + 1);
340
+ const lastTagName = this.matcher.getCurrentTag();
241
341
  if (tagName && this.options.unpairedTags.indexOf(tagName) !== -1) {
242
342
  throw new Error(`Unpaired tag can not be used as closing tag: </${tagName}>`);
243
343
  }
244
- let propIndex = 0
245
344
  if (lastTagName && this.options.unpairedTags.indexOf(lastTagName) !== -1) {
246
- propIndex = jPath.lastIndexOf('.', jPath.lastIndexOf('.') - 1)
345
+ // Pop the unpaired tag
346
+ this.matcher.pop();
247
347
  this.tagsNodeStack.pop();
248
- } else {
249
- propIndex = jPath.lastIndexOf(".");
250
348
  }
251
- jPath = jPath.substring(0, propIndex);
349
+ // Pop the closing tag
350
+ this.matcher.pop();
351
+ this.isCurrentNodeStopNode = false; // Reset flag when closing tag
252
352
 
253
353
  currentNode = this.tagsNodeStack.pop();//avoid recursion, set the parent tag scope
254
354
  textData = "";
@@ -258,7 +358,7 @@ const parseXml = function (xmlData) {
258
358
  let tagData = readTagExp(xmlData, i, false, "?>");
259
359
  if (!tagData) throw new Error("Pi Tag is not closed.");
260
360
 
261
- textData = this.saveTextToParentTag(textData, currentNode, jPath);
361
+ textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);
262
362
  if ((this.options.ignoreDeclaration && tagData.tagName === "?xml") || this.options.ignorePiTags) {
263
363
  //do nothing
264
364
  } else {
@@ -267,9 +367,9 @@ const parseXml = function (xmlData) {
267
367
  childNode.add(this.options.textNodeName, "");
268
368
 
269
369
  if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent) {
270
- childNode[":@"] = this.buildAttributesMap(tagData.tagExp, jPath, tagData.tagName);
370
+ childNode[":@"] = this.buildAttributesMap(tagData.tagExp, this.matcher, tagData.tagName);
271
371
  }
272
- this.addChild(currentNode, childNode, jPath, i);
372
+ this.addChild(currentNode, childNode, this.readonlyMatcher, i);
273
373
  }
274
374
 
275
375
 
@@ -279,7 +379,7 @@ const parseXml = function (xmlData) {
279
379
  if (this.options.commentPropName) {
280
380
  const comment = xmlData.substring(i + 4, endIndex - 2);
281
381
 
282
- textData = this.saveTextToParentTag(textData, currentNode, jPath);
382
+ textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);
283
383
 
284
384
  currentNode.add(this.options.commentPropName, [{ [this.options.textNodeName]: comment }]);
285
385
  }
@@ -292,9 +392,9 @@ const parseXml = function (xmlData) {
292
392
  const closeIndex = findClosingIndex(xmlData, "]]>", i, "CDATA is not closed.") - 2;
293
393
  const tagExp = xmlData.substring(i + 9, closeIndex);
294
394
 
295
- textData = this.saveTextToParentTag(textData, currentNode, jPath);
395
+ textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher);
296
396
 
297
- let val = this.parseTextData(tagExp, currentNode.tagname, jPath, true, false, true, true);
397
+ let val = this.parseTextData(tagExp, currentNode.tagname, this.readonlyMatcher, true, false, true, true);
298
398
  if (val == undefined) val = "";
299
399
 
300
400
  //cdata should be set even if it is 0 length string
@@ -307,26 +407,36 @@ const parseXml = function (xmlData) {
307
407
  i = closeIndex + 2;
308
408
  } else {//Opening tag
309
409
  let result = readTagExp(xmlData, i, this.options.removeNSPrefix);
410
+
411
+ // Safety check: readTagExp can return undefined
412
+ if (!result) {
413
+ // Log context for debugging
414
+ const context = xmlData.substring(Math.max(0, i - 50), Math.min(xmlData.length, i + 50));
415
+ throw new Error(`readTagExp returned undefined at position ${i}. Context: "${context}"`);
416
+ }
417
+
310
418
  let tagName = result.tagName;
311
419
  const rawTagName = result.rawTagName;
312
420
  let tagExp = result.tagExp;
313
421
  let attrExpPresent = result.attrExpPresent;
314
422
  let closeIndex = result.closeIndex;
315
423
 
316
- if (this.options.transformTagName) {
317
- //console.log(tagExp, tagName)
318
- const newTagName = this.options.transformTagName(tagName);
319
- if (tagExp === tagName) {
320
- tagExp = newTagName
321
- }
322
- tagName = newTagName;
424
+ ({ tagName, tagExp } = transformTagName(this.options.transformTagName, tagName, tagExp, this.options));
425
+
426
+ if (this.options.strictReservedNames &&
427
+ (tagName === this.options.commentPropName
428
+ || tagName === this.options.cdataPropName
429
+ || tagName === this.options.textNodeName
430
+ || tagName === this.options.attributesGroupName
431
+ )) {
432
+ throw new Error(`Invalid tag name: ${tagName}`);
323
433
  }
324
434
 
325
435
  //save text as child node
326
436
  if (currentNode && textData) {
327
437
  if (currentNode.tagname !== '!xml') {
328
438
  //when nested tag is found
329
- textData = this.saveTextToParentTag(textData, currentNode, jPath, false);
439
+ textData = this.saveTextToParentTag(textData, currentNode, this.readonlyMatcher, false);
330
440
  }
331
441
  }
332
442
 
@@ -334,28 +444,65 @@ const parseXml = function (xmlData) {
334
444
  const lastTag = currentNode;
335
445
  if (lastTag && this.options.unpairedTags.indexOf(lastTag.tagname) !== -1) {
336
446
  currentNode = this.tagsNodeStack.pop();
337
- jPath = jPath.substring(0, jPath.lastIndexOf("."));
447
+ this.matcher.pop();
338
448
  }
449
+
450
+ // Clean up self-closing syntax BEFORE processing attributes
451
+ // This is where tagExp gets the trailing / removed
452
+ let isSelfClosing = false;
453
+ if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) {
454
+ isSelfClosing = true;
455
+ if (tagName[tagName.length - 1] === "/") {
456
+ tagName = tagName.substr(0, tagName.length - 1);
457
+ tagExp = tagName;
458
+ } else {
459
+ tagExp = tagExp.substr(0, tagExp.length - 1);
460
+ }
461
+
462
+ // Re-check attrExpPresent after cleaning
463
+ attrExpPresent = (tagName !== tagExp);
464
+ }
465
+
466
+ // Now process attributes with CLEAN tagExp (no trailing /)
467
+ let prefixedAttrs = null;
468
+ let rawAttrs = {};
469
+ let namespace = undefined;
470
+
471
+ // Extract namespace from rawTagName
472
+ namespace = extractNamespace(rawTagName);
473
+
474
+ // Push tag to matcher FIRST (with empty attrs for now) so callbacks see correct path
339
475
  if (tagName !== xmlObj.tagname) {
340
- jPath += jPath ? "." + tagName : tagName;
476
+ this.matcher.push(tagName, {}, namespace);
341
477
  }
478
+
479
+ // Now build attributes - callbacks will see correct matcher state
480
+ if (tagName !== tagExp && attrExpPresent) {
481
+ // Build attributes (returns prefixed attributes for the tree)
482
+ // Note: buildAttributesMap now internally updates the matcher with raw attributes
483
+ prefixedAttrs = this.buildAttributesMap(tagExp, this.matcher, tagName);
484
+
485
+ if (prefixedAttrs) {
486
+ // Extract raw attributes (without prefix) for our use
487
+ rawAttrs = extractRawAttributes(prefixedAttrs, this.options);
488
+ }
489
+ }
490
+
491
+ // Now check if this is a stop node (after attributes are set)
492
+ if (tagName !== xmlObj.tagname) {
493
+ this.isCurrentNodeStopNode = this.isItStopNode(this.stopNodeExpressions, this.matcher);
494
+ }
495
+
342
496
  const startIndex = i;
343
- if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, jPath, tagName)) {
497
+ if (this.isCurrentNodeStopNode) {
344
498
  let tagContent = "";
345
- //self-closing tag
346
- if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) {
347
- if (tagName[tagName.length - 1] === "/") { //remove trailing '/'
348
- tagName = tagName.substr(0, tagName.length - 1);
349
- jPath = jPath.substr(0, jPath.length - 1);
350
- tagExp = tagName;
351
- } else {
352
- tagExp = tagExp.substr(0, tagExp.length - 1);
353
- }
499
+
500
+ // For self-closing tags, content is empty
501
+ if (isSelfClosing) {
354
502
  i = result.closeIndex;
355
503
  }
356
504
  //unpaired tag
357
505
  else if (this.options.unpairedTags.indexOf(tagName) !== -1) {
358
-
359
506
  i = result.closeIndex;
360
507
  }
361
508
  //normal tag
@@ -369,52 +516,54 @@ const parseXml = function (xmlData) {
369
516
 
370
517
  const childNode = new xmlNode(tagName);
371
518
 
372
- if (tagName !== tagExp && attrExpPresent) {
373
- childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName);
374
- }
375
- if (tagContent) {
376
- tagContent = this.parseTextData(tagContent, tagName, jPath, true, attrExpPresent, true, true);
519
+ if (prefixedAttrs) {
520
+ childNode[":@"] = prefixedAttrs;
377
521
  }
378
522
 
379
- jPath = jPath.substr(0, jPath.lastIndexOf("."));
523
+ // For stop nodes, store raw content as-is without any processing
380
524
  childNode.add(this.options.textNodeName, tagContent);
381
525
 
382
- this.addChild(currentNode, childNode, jPath, startIndex);
526
+ this.matcher.pop(); // Pop the stop node tag
527
+ this.isCurrentNodeStopNode = false; // Reset flag
528
+
529
+ this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
383
530
  } else {
384
531
  //selfClosing tag
385
- if (tagExp.length > 0 && tagExp.lastIndexOf("/") === tagExp.length - 1) {
386
- if (tagName[tagName.length - 1] === "/") { //remove trailing '/'
387
- tagName = tagName.substr(0, tagName.length - 1);
388
- jPath = jPath.substr(0, jPath.length - 1);
389
- tagExp = tagName;
390
- } else {
391
- tagExp = tagExp.substr(0, tagExp.length - 1);
392
- }
532
+ if (isSelfClosing) {
533
+ ({ tagName, tagExp } = transformTagName(this.options.transformTagName, tagName, tagExp, this.options));
393
534
 
394
- if (this.options.transformTagName) {
395
- const newTagName = this.options.transformTagName(tagName);
396
- if (tagExp === tagName) {
397
- tagExp = newTagName
398
- }
399
- tagName = newTagName;
535
+ const childNode = new xmlNode(tagName);
536
+ if (prefixedAttrs) {
537
+ childNode[":@"] = prefixedAttrs;
400
538
  }
401
-
539
+ this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
540
+ this.matcher.pop(); // Pop self-closing tag
541
+ this.isCurrentNodeStopNode = false; // Reset flag
542
+ }
543
+ else if (this.options.unpairedTags.indexOf(tagName) !== -1) {//unpaired tag
402
544
  const childNode = new xmlNode(tagName);
403
- if (tagName !== tagExp && attrExpPresent) {
404
- childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName);
545
+ if (prefixedAttrs) {
546
+ childNode[":@"] = prefixedAttrs;
405
547
  }
406
- this.addChild(currentNode, childNode, jPath, startIndex);
407
- jPath = jPath.substr(0, jPath.lastIndexOf("."));
548
+ this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
549
+ this.matcher.pop(); // Pop unpaired tag
550
+ this.isCurrentNodeStopNode = false; // Reset flag
551
+ i = result.closeIndex;
552
+ // Continue to next iteration without changing currentNode
553
+ continue;
408
554
  }
409
555
  //opening tag
410
556
  else {
411
557
  const childNode = new xmlNode(tagName);
558
+ if (this.tagsNodeStack.length > this.options.maxNestedTags) {
559
+ throw new Error("Maximum nested tags exceeded");
560
+ }
412
561
  this.tagsNodeStack.push(currentNode);
413
562
 
414
- if (tagName !== tagExp && attrExpPresent) {
415
- childNode[":@"] = this.buildAttributesMap(tagExp, jPath, tagName);
563
+ if (prefixedAttrs) {
564
+ childNode[":@"] = prefixedAttrs;
416
565
  }
417
- this.addChild(currentNode, childNode, jPath, startIndex);
566
+ this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
418
567
  currentNode = childNode;
419
568
  }
420
569
  textData = "";
@@ -428,10 +577,13 @@ const parseXml = function (xmlData) {
428
577
  return xmlObj.child;
429
578
  }
430
579
 
431
- function addChild(currentNode, childNode, jPath, startIndex) {
580
+ function addChild(currentNode, childNode, matcher, startIndex) {
432
581
  // unset startIndex if not requested
433
582
  if (!this.options.captureMetaData) startIndex = undefined;
434
- const result = this.options.updateTag(childNode.tagname, jPath, childNode[":@"])
583
+
584
+ // Pass jPath string or matcher based on options.jPath setting
585
+ const jPathOrMatcher = this.options.jPath ? matcher.toString() : matcher;
586
+ const result = this.options.updateTag(childNode.tagname, jPathOrMatcher, childNode[":@"])
435
587
  if (result === false) {
436
588
  //do nothing
437
589
  } else if (typeof result === "string") {
@@ -442,33 +594,40 @@ function addChild(currentNode, childNode, jPath, startIndex) {
442
594
  }
443
595
  }
444
596
 
445
- const replaceEntitiesValue = function (val, tagName, jPath) {
446
- // Performance optimization: Early return if no entities to replace
447
- if (val.indexOf('&') === -1) {
448
- return val;
449
- }
450
-
597
+ /**
598
+ * @param {object} val - Entity object with regex and val properties
599
+ * @param {string} tagName - Tag name
600
+ * @param {string|Matcher} jPath - jPath string or Matcher instance based on options.jPath
601
+ */
602
+ function replaceEntitiesValue(val, tagName, jPath) {
451
603
  const entityConfig = this.options.processEntities;
452
604
 
453
- if (!entityConfig.enabled) {
605
+ if (!entityConfig || !entityConfig.enabled) {
454
606
  return val;
455
607
  }
456
608
 
457
- // Check tag-specific filtering
609
+ // Check if tag is allowed to contain entities
458
610
  if (entityConfig.allowedTags) {
459
- if (!entityConfig.allowedTags.includes(tagName)) {
460
- return val; // Skip entity replacement for current tag as not set
611
+ const jPathOrMatcher = this.options.jPath ? jPath.toString() : jPath;
612
+ const allowed = Array.isArray(entityConfig.allowedTags)
613
+ ? entityConfig.allowedTags.includes(tagName)
614
+ : entityConfig.allowedTags(tagName, jPathOrMatcher);
615
+
616
+ if (!allowed) {
617
+ return val;
461
618
  }
462
619
  }
463
620
 
621
+ // Apply custom tag filter if provided
464
622
  if (entityConfig.tagFilter) {
465
- if (!entityConfig.tagFilter(tagName, jPath)) {
623
+ const jPathOrMatcher = this.options.jPath ? jPath.toString() : jPath;
624
+ if (!entityConfig.tagFilter(tagName, jPathOrMatcher)) {
466
625
  return val; // Skip based on custom filter
467
626
  }
468
627
  }
469
628
 
470
629
  // Replace DOCTYPE entities
471
- for (let entityName in this.docTypeEntities) {
630
+ for (const entityName of Object.keys(this.docTypeEntities)) {
472
631
  const entity = this.docTypeEntities[entityName];
473
632
  const matches = val.match(entity.regx);
474
633
 
@@ -500,19 +659,38 @@ const replaceEntitiesValue = function (val, tagName, jPath) {
500
659
  }
501
660
  }
502
661
  }
503
- if (val.indexOf('&') === -1) return val; // Early exit
504
-
505
662
  // Replace standard entities
506
- for (let entityName in this.lastEntities) {
663
+ for (const entityName of Object.keys(this.lastEntities)) {
507
664
  const entity = this.lastEntities[entityName];
665
+ const matches = val.match(entity.regex);
666
+ if (matches) {
667
+ this.entityExpansionCount += matches.length;
668
+ if (entityConfig.maxTotalExpansions &&
669
+ this.entityExpansionCount > entityConfig.maxTotalExpansions) {
670
+ throw new Error(
671
+ `Entity expansion limit exceeded: ${this.entityExpansionCount} > ${entityConfig.maxTotalExpansions}`
672
+ );
673
+ }
674
+ }
508
675
  val = val.replace(entity.regex, entity.val);
509
676
  }
510
- if (val.indexOf('&') === -1) return val; // Early exit
677
+ if (val.indexOf('&') === -1) return val;
511
678
 
512
679
  // Replace HTML entities if enabled
513
680
  if (this.options.htmlEntities) {
514
- for (let entityName in this.htmlEntities) {
681
+ for (const entityName of Object.keys(this.htmlEntities)) {
515
682
  const entity = this.htmlEntities[entityName];
683
+ const matches = val.match(entity.regex);
684
+ if (matches) {
685
+ //console.log(matches);
686
+ this.entityExpansionCount += matches.length;
687
+ if (entityConfig.maxTotalExpansions &&
688
+ this.entityExpansionCount > entityConfig.maxTotalExpansions) {
689
+ throw new Error(
690
+ `Entity expansion limit exceeded: ${this.entityExpansionCount} > ${entityConfig.maxTotalExpansions}`
691
+ );
692
+ }
693
+ }
516
694
  val = val.replace(entity.regex, entity.val);
517
695
  }
518
696
  }
@@ -524,19 +702,19 @@ const replaceEntitiesValue = function (val, tagName, jPath) {
524
702
  }
525
703
 
526
704
 
527
- function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {
705
+ function saveTextToParentTag(textData, parentNode, matcher, isLeafNode) {
528
706
  if (textData) { //store previously collected data as textNode
529
- if (isLeafNode === undefined) isLeafNode = currentNode.child.length === 0
707
+ if (isLeafNode === undefined) isLeafNode = parentNode.child.length === 0
530
708
 
531
709
  textData = this.parseTextData(textData,
532
- currentNode.tagname,
533
- jPath,
710
+ parentNode.tagname,
711
+ matcher,
534
712
  false,
535
- currentNode[":@"] ? Object.keys(currentNode[":@"]).length !== 0 : false,
713
+ parentNode[":@"] ? Object.keys(parentNode[":@"]).length !== 0 : false,
536
714
  isLeafNode);
537
715
 
538
716
  if (textData !== undefined && textData !== "")
539
- currentNode.add(this.options.textNodeName, textData);
717
+ parentNode.add(this.options.textNodeName, textData);
540
718
  textData = "";
541
719
  }
542
720
  return textData;
@@ -544,14 +722,17 @@ function saveTextToParentTag(textData, currentNode, jPath, isLeafNode) {
544
722
 
545
723
  //TODO: use jPath to simplify the logic
546
724
  /**
547
- * @param {Set} stopNodesExact
548
- * @param {Set} stopNodesWildcard
549
- * @param {string} jPath
550
- * @param {string} currentTagName
725
+ * @param {Array<Expression>} stopNodeExpressions - Array of compiled Expression objects
726
+ * @param {Matcher} matcher - Current path matcher
551
727
  */
552
- function isItStopNode(stopNodesExact, stopNodesWildcard, jPath, currentTagName) {
553
- if (stopNodesWildcard && stopNodesWildcard.has(currentTagName)) return true;
554
- if (stopNodesExact && stopNodesExact.has(jPath)) return true;
728
+ function isItStopNode(stopNodeExpressions, matcher) {
729
+ if (!stopNodeExpressions || stopNodeExpressions.length === 0) return false;
730
+
731
+ for (let i = 0; i < stopNodeExpressions.length; i++) {
732
+ if (matcher.matches(stopNodeExpressions[i])) {
733
+ return true;
734
+ }
735
+ }
555
736
  return false;
556
737
  }
557
738
 
@@ -704,4 +885,27 @@ function fromCodePoint(str, base, prefix) {
704
885
  } else {
705
886
  return prefix + str + ";";
706
887
  }
888
+ }
889
+
890
+ function transformTagName(fn, tagName, tagExp, options) {
891
+ if (fn) {
892
+ const newTagName = fn(tagName);
893
+ if (tagExp === tagName) {
894
+ tagExp = newTagName
895
+ }
896
+ tagName = newTagName;
897
+ }
898
+ tagName = sanitizeName(tagName, options);
899
+ return { tagName, tagExp };
900
+ }
901
+
902
+
903
+
904
+ function sanitizeName(name, options) {
905
+ if (criticalProperties.includes(name)) {
906
+ throw new Error(`[SECURITY] Invalid name: "${name}" is a reserved JavaScript keyword that could cause prototype pollution`);
907
+ } else if (DANGEROUS_PROPERTY_NAMES.includes(name)) {
908
+ return options.onDangerousProperty(name);
909
+ }
910
+ return name;
707
911
  }