@cdklabs/cdk-ssm-documents 0.0.66 → 0.0.67

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 (358) hide show
  1. package/.jsii +13 -13
  2. package/lib/construct/synth-utils.js +1 -1
  3. package/lib/document/automation-document.js +1 -1
  4. package/lib/document/command-document.js +1 -1
  5. package/lib/document/document-builder.js +2 -2
  6. package/lib/document/ssm-document.js +1 -1
  7. package/lib/domain/aws-service.js +1 -1
  8. package/lib/domain/choice.js +1 -1
  9. package/lib/domain/data-type.js +1 -1
  10. package/lib/domain/enum/install-action.js +2 -2
  11. package/lib/domain/enum/install-uninstall-repair.js +2 -2
  12. package/lib/domain/enum/installation-type.js +2 -2
  13. package/lib/domain/enum/package-name.js +2 -2
  14. package/lib/domain/input.js +1 -1
  15. package/lib/domain/operation.js +1 -1
  16. package/lib/domain/platform.js +1 -1
  17. package/lib/domain/precondition.js +1 -1
  18. package/lib/incident-response/incident-response.js +3 -3
  19. package/lib/interface/approve-hook.js +2 -2
  20. package/lib/interface/auth-method.js +3 -3
  21. package/lib/interface/aws-invoker.js +2 -2
  22. package/lib/interface/downloadable-content.js +8 -8
  23. package/lib/interface/environment.js +3 -3
  24. package/lib/interface/execute-automation-hook/api-execute-automation-hook.js +1 -1
  25. package/lib/interface/observer.js +1 -1
  26. package/lib/interface/on-failure.js +6 -6
  27. package/lib/interface/pause-hook.js +2 -2
  28. package/lib/interface/run-command-hook/api-run-command-hook.js +1 -1
  29. package/lib/interface/run-document-location.js +2 -2
  30. package/lib/interface/sleep-hook.js +2 -2
  31. package/lib/interface/step-ref.js +1 -1
  32. package/lib/interface/variables/boolean-variable.js +2 -2
  33. package/lib/interface/variables/map-list-variable.js +2 -2
  34. package/lib/interface/variables/number-variable.js +2 -2
  35. package/lib/interface/variables/secure-string-variable.js +4 -4
  36. package/lib/interface/variables/string-list-variable.js +2 -2
  37. package/lib/interface/variables/string-map-variable.js +2 -2
  38. package/lib/interface/variables/string-variable.js +4 -4
  39. package/lib/interface/variables/variable.js +2 -2
  40. package/lib/interface/webhook.js +1 -1
  41. package/lib/parent-steps/automation/approve-step.js +1 -1
  42. package/lib/parent-steps/automation/assert-aws-resource-step.js +1 -1
  43. package/lib/parent-steps/automation/aws-api-step.js +1 -1
  44. package/lib/parent-steps/automation/branch-step.js +1 -1
  45. package/lib/parent-steps/automation/change-instance-state-step.js +3 -3
  46. package/lib/parent-steps/automation/copy-image-step.js +1 -1
  47. package/lib/parent-steps/automation/create-image-step.js +1 -1
  48. package/lib/parent-steps/automation/create-stack-step.js +3 -3
  49. package/lib/parent-steps/automation/create-tags-step.js +3 -3
  50. package/lib/parent-steps/automation/delete-image-step.js +1 -1
  51. package/lib/parent-steps/automation/delete-stack-step.js +1 -1
  52. package/lib/parent-steps/automation/execute-automation-step.js +1 -1
  53. package/lib/parent-steps/automation/execute-script-step.js +5 -5
  54. package/lib/parent-steps/automation/execute-state-machine-step.js +1 -1
  55. package/lib/parent-steps/automation/invoke-lambda-function-step.js +1 -1
  56. package/lib/parent-steps/automation/invoke-webhook-step.js +1 -1
  57. package/lib/parent-steps/automation/pause-step.js +1 -1
  58. package/lib/parent-steps/automation/run-command-step.js +3 -3
  59. package/lib/parent-steps/automation/run-instance-step.js +1 -1
  60. package/lib/parent-steps/automation/sleep-step.js +1 -1
  61. package/lib/parent-steps/automation/update-variable.js +1 -1
  62. package/lib/parent-steps/automation/wait-for-resource-step.js +1 -1
  63. package/lib/parent-steps/automation-step.js +1 -1
  64. package/lib/parent-steps/command/applications-step.js +1 -1
  65. package/lib/parent-steps/command/configure-docker-step.js +1 -1
  66. package/lib/parent-steps/command/configure-package-step.js +1 -1
  67. package/lib/parent-steps/command/domain-join-step.js +1 -1
  68. package/lib/parent-steps/command/download-content-step.js +1 -1
  69. package/lib/parent-steps/command/ps-module-step.js +1 -1
  70. package/lib/parent-steps/command/run-docker-action-step.js +1 -1
  71. package/lib/parent-steps/command/run-document-step.js +1 -1
  72. package/lib/parent-steps/command/run-powershell-script-step.js +1 -1
  73. package/lib/parent-steps/command/run-shell-script-step.js +1 -1
  74. package/lib/parent-steps/command/software-inventory-step.js +1 -1
  75. package/lib/parent-steps/command/update-agent-step.js +1 -1
  76. package/lib/parent-steps/command/update-ssm-agent-step.js +1 -1
  77. package/lib/parent-steps/command-step.js +1 -1
  78. package/lib/parent-steps/step.js +1 -1
  79. package/lib/patterns/automation/composite-step.js +2 -2
  80. package/lib/patterns/automation/reboot-instance-and-wait.js +1 -1
  81. package/lib/patterns/automation/string-step.js +1 -1
  82. package/lib/patterns/document/string-document.js +1 -1
  83. package/lib/patterns/document/timed-document.js +1 -1
  84. package/lib/samples/hello-world.js +1 -1
  85. package/lib/simulation/automation/approve-simulation.js +1 -1
  86. package/lib/simulation/automation/assert-aws-resource-simulation.js +1 -1
  87. package/lib/simulation/automation/automation-simulation-base.js +1 -1
  88. package/lib/simulation/automation/aws-api-simulation.js +1 -1
  89. package/lib/simulation/automation/branch-simulation.js +1 -1
  90. package/lib/simulation/automation/change-instance-state-simulation.js +1 -1
  91. package/lib/simulation/automation/copy-image-simulation.js +1 -1
  92. package/lib/simulation/automation/create-image-simulation.js +1 -1
  93. package/lib/simulation/automation/create-stack-simulation.js +1 -1
  94. package/lib/simulation/automation/create-tags-simulation.js +1 -1
  95. package/lib/simulation/automation/delete-image-simulation.js +1 -1
  96. package/lib/simulation/automation/delete-stack-simulation.js +1 -1
  97. package/lib/simulation/automation/execute-script-simulation.js +1 -1
  98. package/lib/simulation/automation/execute-state-machine-simulation.js +1 -1
  99. package/lib/simulation/automation/invoke-lambda-function-simulation.js +1 -1
  100. package/lib/simulation/automation/invoke-webhook-simulation.js +1 -1
  101. package/lib/simulation/automation/pause-simulation.js +1 -1
  102. package/lib/simulation/automation/run-command-simulation.js +1 -1
  103. package/lib/simulation/automation/run-instance-simulation.js +1 -1
  104. package/lib/simulation/automation/sleep-simulation.js +1 -1
  105. package/lib/simulation/automation/update-variable-simulation.js +1 -1
  106. package/lib/simulation/automation/wait-for-resource-simulation.js +1 -1
  107. package/lib/simulation/automation-step-simulation.js +1 -1
  108. package/lib/simulation/command/command-simulation-base.js +1 -1
  109. package/lib/simulation/command/ps-module-simulation.js +1 -1
  110. package/lib/simulation/command/run-powershell-script-simulation.js +1 -1
  111. package/lib/simulation/command/run-shell-script-simulation.js +1 -1
  112. package/lib/simulation/command-step-simulation.js +1 -1
  113. package/lib/simulation/document/automation-simulation.js +1 -1
  114. package/lib/simulation/document/command-simulation.js +1 -1
  115. package/lib/simulation/simulation.js +1 -1
  116. package/node_modules/@aws-sdk/checksums/package.json +2 -2
  117. package/node_modules/@aws-sdk/client-cloudformation/package.json +3 -3
  118. package/node_modules/@aws-sdk/client-cloudwatch/package.json +3 -3
  119. package/node_modules/@aws-sdk/client-ec2/dist-cjs/schemas/schemas_0.js +37 -4
  120. package/node_modules/@aws-sdk/client-ec2/dist-es/schemas/schemas_0.js +35 -4
  121. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/AttachImageWatermarkCommand.d.ts +2 -3
  122. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CancelCapacityReservationCommand.d.ts +10 -16
  123. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetAllowedImagesSettingsCommand.d.ts +8 -0
  124. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetAwsNetworkPerformanceDataCommand.d.ts +2 -1
  125. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyIpamScopeCommand.d.ts +1 -2
  126. package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReplaceImageCriteriaInAllowedImagesSettingsCommand.d.ts +15 -0
  127. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_5.d.ts +42 -15
  128. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_6.d.ts +17 -35
  129. package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_7.d.ts +86 -1
  130. package/node_modules/@aws-sdk/client-ec2/dist-types/schemas/schemas_0.d.ts +2 -0
  131. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetAwsNetworkPerformanceDataCommand.d.ts +2 -4
  132. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyIpamScopeCommand.d.ts +4 -2
  133. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_5.d.ts +7 -4
  134. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_6.d.ts +5 -9
  135. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_7.d.ts +15 -0
  136. package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/schemas/schemas_0.d.ts +2 -0
  137. package/node_modules/@aws-sdk/client-ec2/package.json +4 -4
  138. package/node_modules/@aws-sdk/client-iam/package.json +3 -3
  139. package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetProvisionedConcurrencyConfigCommand.d.ts +4 -4
  140. package/node_modules/@aws-sdk/client-lambda/package.json +3 -3
  141. package/node_modules/@aws-sdk/client-s3/package.json +6 -6
  142. package/node_modules/@aws-sdk/client-sns/package.json +3 -3
  143. package/node_modules/@aws-sdk/client-sqs/package.json +3 -3
  144. package/node_modules/@aws-sdk/client-ssm/package.json +3 -3
  145. package/node_modules/@aws-sdk/core/package.json +2 -2
  146. package/node_modules/@aws-sdk/credential-provider-env/package.json +2 -2
  147. package/node_modules/@aws-sdk/credential-provider-http/package.json +2 -2
  148. package/node_modules/@aws-sdk/credential-provider-ini/package.json +9 -9
  149. package/node_modules/@aws-sdk/credential-provider-login/package.json +3 -3
  150. package/node_modules/@aws-sdk/credential-provider-node/package.json +7 -7
  151. package/node_modules/@aws-sdk/credential-provider-process/package.json +2 -2
  152. package/node_modules/@aws-sdk/credential-provider-sso/package.json +4 -4
  153. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +3 -3
  154. package/node_modules/@aws-sdk/middleware-flexible-checksums/package.json +2 -2
  155. package/node_modules/@aws-sdk/middleware-sdk-ec2/package.json +2 -2
  156. package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +2 -2
  157. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  158. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  159. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  160. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  161. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  162. package/node_modules/@aws-sdk/nested-clients/package.json +2 -2
  163. package/node_modules/@aws-sdk/token-providers/package.json +3 -3
  164. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.browser.js +1 -1
  165. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-parser.js +233 -43
  166. package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.browser.js +1 -1
  167. package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.js +233 -43
  168. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/xml-parser.d.ts +1 -1
  169. package/node_modules/@aws-sdk/xml-builder/dist-types/xml-parser.d.ts +2 -1
  170. package/node_modules/@aws-sdk/xml-builder/package.json +4 -4
  171. package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.browser.js +355 -145
  172. package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.js +456 -142
  173. package/node_modules/@smithy/core/dist-cjs/submodules/checksum/index.native.js +355 -145
  174. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +5 -2
  175. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +30 -36
  176. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +54 -110
  177. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +30 -36
  178. package/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Js.js +27 -0
  179. package/node_modules/@smithy/core/dist-es/submodules/checksum/crc32/Crc32Node.js +21 -0
  180. package/node_modules/@smithy/core/dist-es/submodules/checksum/index.browser.js +7 -1
  181. package/node_modules/@smithy/core/dist-es/submodules/checksum/index.js +7 -1
  182. package/node_modules/@smithy/core/dist-es/submodules/checksum/index.native.js +7 -1
  183. package/node_modules/@smithy/core/dist-es/submodules/checksum/md5/Md5Js.js +92 -0
  184. package/node_modules/@smithy/core/dist-es/submodules/checksum/md5/Md5Node.js +29 -0
  185. package/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Js.js +179 -0
  186. package/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256Node.js +59 -0
  187. package/node_modules/@smithy/core/dist-es/submodules/checksum/sha256/Sha256WebCrypto.js +71 -0
  188. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +4 -1
  189. package/node_modules/@smithy/core/dist-es/submodules/serde/concatBytes.js +15 -0
  190. package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +2 -0
  191. package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +2 -0
  192. package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +2 -0
  193. package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/checksum/ChecksumStream.js +4 -0
  194. package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/headStream.js +2 -1
  195. package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.browser.js +12 -38
  196. package/node_modules/@smithy/core/dist-es/submodules/serde/util-stream/stream-collector.js +18 -33
  197. package/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.browser.js +3 -0
  198. package/node_modules/@smithy/core/dist-es/submodules/serde/util-utf8/toUint8Array.js +3 -0
  199. package/node_modules/@smithy/core/dist-types/submodules/checksum/crc32/Crc32Js.d.ts +13 -0
  200. package/node_modules/@smithy/core/dist-types/submodules/checksum/crc32/Crc32Node.d.ts +13 -0
  201. package/node_modules/@smithy/core/dist-types/submodules/checksum/index.browser.d.ts +7 -1
  202. package/node_modules/@smithy/core/dist-types/submodules/checksum/index.d.ts +7 -1
  203. package/node_modules/@smithy/core/dist-types/submodules/checksum/index.native.d.ts +7 -1
  204. package/node_modules/@smithy/core/dist-types/submodules/checksum/md5/Md5Js.d.ts +19 -0
  205. package/node_modules/@smithy/core/dist-types/submodules/checksum/md5/Md5Node.d.ts +17 -0
  206. package/node_modules/@smithy/core/dist-types/submodules/checksum/sha256/Sha256Js.d.ts +28 -0
  207. package/node_modules/@smithy/core/dist-types/submodules/checksum/sha256/Sha256Node.d.ts +13 -0
  208. package/node_modules/@smithy/core/dist-types/submodules/checksum/sha256/Sha256WebCrypto.d.ts +22 -0
  209. package/node_modules/@smithy/core/dist-types/submodules/serde/concatBytes.d.ts +6 -0
  210. package/node_modules/@smithy/core/dist-types/submodules/serde/index.browser.d.ts +2 -0
  211. package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +2 -0
  212. package/node_modules/@smithy/core/dist-types/submodules/serde/index.native.d.ts +2 -0
  213. package/node_modules/@smithy/core/dist-types/submodules/serde/util-stream/checksum/ChecksumStream.d.ts +9 -0
  214. package/node_modules/@smithy/core/dist-types/submodules/serde/util-stream/stream-collector.browser.d.ts +8 -2
  215. package/node_modules/@smithy/core/dist-types/submodules/serde/util-stream/stream-collector.d.ts +4 -1
  216. package/node_modules/@smithy/core/package.json +4 -3
  217. package/node_modules/@smithy/credential-provider-imds/package.json +2 -2
  218. package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +2 -55
  219. package/node_modules/@smithy/fetch-http-handler/dist-es/index.js +2 -2
  220. package/node_modules/@smithy/fetch-http-handler/dist-types/index.d.ts +2 -2
  221. package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
  222. package/node_modules/@smithy/middleware-compression/package.json +2 -2
  223. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +3 -51
  224. package/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -3
  225. package/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -3
  226. package/node_modules/@smithy/node-http-handler/package.json +2 -2
  227. package/node_modules/@smithy/signature-v4/package.json +2 -2
  228. package/node_modules/immutable/dist/immutable.es.js +161 -15
  229. package/node_modules/immutable/dist/immutable.js +161 -15
  230. package/node_modules/immutable/dist/immutable.min.js +33 -32
  231. package/node_modules/immutable/package.json +1 -1
  232. package/node_modules/js-yaml/README.md +5 -3
  233. package/node_modules/js-yaml/dist/js-yaml.js +3009 -2402
  234. package/node_modules/js-yaml/dist/js-yaml.js.map +1 -1
  235. package/node_modules/js-yaml/dist/js-yaml.min.js +2 -33
  236. package/node_modules/js-yaml/dist/js-yaml.min.js.map +1 -1
  237. package/node_modules/js-yaml/dist/js-yaml.mjs +3073 -2381
  238. package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
  239. package/node_modules/js-yaml/lib/loader.js +7 -11
  240. package/node_modules/js-yaml/lib/type/float.js +1 -1
  241. package/node_modules/js-yaml/lib/type/int.js +4 -4
  242. package/node_modules/js-yaml/package.json +10 -4
  243. package/package.json +12 -12
  244. package/node_modules/@aws-sdk/xml-builder/dist-cjs/xml-external/nodable_entities.js +0 -333
  245. package/node_modules/@aws-sdk/xml-builder/dist-es/xml-external/nodable_entities.js +0 -332
  246. package/node_modules/@aws-sdk/xml-builder/dist-types/ts3.4/xml-external/nodable_entities.d.ts +0 -66
  247. package/node_modules/@aws-sdk/xml-builder/dist-types/xml-external/nodable_entities.d.ts +0 -65
  248. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/CHANGELOG.md +0 -827
  249. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/LICENSE +0 -21
  250. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/README.md +0 -202
  251. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxbuilder.min.js +0 -2
  252. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxbuilder.min.js.map +0 -1
  253. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.cjs +0 -1
  254. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.d.cts +0 -770
  255. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js +0 -2
  256. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxp.min.js.map +0 -1
  257. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js +0 -2
  258. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxparser.min.js.map +0 -1
  259. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxvalidator.min.js +0 -2
  260. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/lib/fxvalidator.min.js.map +0 -1
  261. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/package.json +0 -93
  262. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/cli/cli.js +0 -97
  263. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/cli/man.js +0 -17
  264. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/cli/read.js +0 -43
  265. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/fxp.d.ts +0 -739
  266. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/fxp.js +0 -14
  267. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/ignoreAttributes.js +0 -18
  268. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/util.js +0 -61
  269. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/CharsSymbol.js +0 -16
  270. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/EntitiesParser.js +0 -106
  271. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OptionsBuilder.js +0 -61
  272. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/BaseOutputBuilder.js +0 -69
  273. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsArrBuilder.js +0 -103
  274. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsMinArrBuilder.js +0 -100
  275. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/JsObjBuilder.js +0 -154
  276. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/OutputBuilders/ParserOptionsBuilder.js +0 -94
  277. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/Report.js +0 -0
  278. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/TagPath.js +0 -81
  279. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/TagPathMatcher.js +0 -13
  280. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/XMLParser.js +0 -83
  281. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/Xml2JsParser.js +0 -235
  282. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/XmlPartReader.js +0 -210
  283. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/XmlSpecialTagsReader.js +0 -111
  284. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/inputSource/BufferSource.js +0 -116
  285. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/inputSource/StringSource.js +0 -121
  286. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/EntitiesParser.js +0 -105
  287. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParser.js +0 -22
  288. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/booleanParserExt.js +0 -19
  289. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/currency.js +0 -38
  290. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/join.js +0 -13
  291. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/number.js +0 -14
  292. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/v6/valueParsers/trim.js +0 -6
  293. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/validator.js +0 -425
  294. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +0 -6
  295. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js +0 -407
  296. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js +0 -163
  297. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +0 -840
  298. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js +0 -71
  299. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/node2json.js +0 -177
  300. package/node_modules/@aws-sdk/xml-builder/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js +0 -40
  301. package/node_modules/@aws-sdk/xml-builder/node_modules/strnum/CHANGELOG.md +0 -51
  302. package/node_modules/@aws-sdk/xml-builder/node_modules/strnum/LICENSE +0 -21
  303. package/node_modules/@aws-sdk/xml-builder/node_modules/strnum/README.md +0 -113
  304. package/node_modules/@aws-sdk/xml-builder/node_modules/strnum/package.json +0 -36
  305. package/node_modules/@aws-sdk/xml-builder/node_modules/strnum/strnum.js +0 -171
  306. package/node_modules/@nodable/entities/README.md +0 -41
  307. package/node_modules/@nodable/entities/package.json +0 -57
  308. package/node_modules/@nodable/entities/src/EntityDecoder.js +0 -644
  309. package/node_modules/@nodable/entities/src/EntityEncoder.js +0 -194
  310. package/node_modules/@nodable/entities/src/entities.js +0 -1159
  311. package/node_modules/@nodable/entities/src/entityTries.js +0 -49
  312. package/node_modules/@nodable/entities/src/index.d.ts +0 -341
  313. package/node_modules/@nodable/entities/src/index.js +0 -29
  314. package/node_modules/@smithy/core/dist-es/submodules/checksum/md5-js/constants.js +0 -3
  315. package/node_modules/@smithy/core/dist-es/submodules/checksum/md5-js/md5.js +0 -168
  316. package/node_modules/@smithy/core/dist-types/submodules/checksum/md5-js/constants.d.ts +0 -12
  317. package/node_modules/@smithy/core/dist-types/submodules/checksum/md5-js/md5.d.ts +0 -16
  318. package/node_modules/@smithy/fetch-http-handler/dist-es/stream-collector.js +0 -53
  319. package/node_modules/@smithy/fetch-http-handler/dist-types/stream-collector.d.ts +0 -2
  320. package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/collector.js +0 -8
  321. package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/index.js +0 -41
  322. package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/collector.d.ts +0 -5
  323. package/node_modules/@smithy/node-http-handler/dist-types/stream-collector/index.d.ts +0 -7
  324. package/node_modules/anynum/LICENSE +0 -21
  325. package/node_modules/anynum/README.md +0 -142
  326. package/node_modules/anynum/anynum.js +0 -135
  327. package/node_modules/anynum/digitTable.js +0 -116
  328. package/node_modules/anynum/package.json +0 -42
  329. package/node_modules/fast-xml-builder/CHANGELOG.md +0 -40
  330. package/node_modules/fast-xml-builder/LICENSE +0 -21
  331. package/node_modules/fast-xml-builder/README.md +0 -74
  332. package/node_modules/fast-xml-builder/lib/fxb.cjs +0 -1
  333. package/node_modules/fast-xml-builder/lib/fxb.d.cts +0 -270
  334. package/node_modules/fast-xml-builder/lib/fxb.min.js +0 -2
  335. package/node_modules/fast-xml-builder/lib/fxb.min.js.map +0 -1
  336. package/node_modules/fast-xml-builder/package.json +0 -81
  337. package/node_modules/fast-xml-builder/src/fxb.d.ts +0 -270
  338. package/node_modules/fast-xml-builder/src/fxb.js +0 -599
  339. package/node_modules/fast-xml-builder/src/ignoreAttributes.js +0 -18
  340. package/node_modules/fast-xml-builder/src/orderedJs2Xml.js +0 -359
  341. package/node_modules/fast-xml-builder/src/prettifyJs2Xml.js +0 -0
  342. package/node_modules/fast-xml-builder/src/util.js +0 -16
  343. package/node_modules/path-expression-matcher/LICENSE +0 -21
  344. package/node_modules/path-expression-matcher/README.md +0 -947
  345. package/node_modules/path-expression-matcher/lib/pem.cjs +0 -1
  346. package/node_modules/path-expression-matcher/lib/pem.d.cts +0 -715
  347. package/node_modules/path-expression-matcher/lib/pem.min.js +0 -2
  348. package/node_modules/path-expression-matcher/lib/pem.min.js.map +0 -1
  349. package/node_modules/path-expression-matcher/package.json +0 -79
  350. package/node_modules/path-expression-matcher/src/Expression.js +0 -232
  351. package/node_modules/path-expression-matcher/src/ExpressionSet.js +0 -225
  352. package/node_modules/path-expression-matcher/src/Matcher.js +0 -660
  353. package/node_modules/path-expression-matcher/src/index.d.ts +0 -589
  354. package/node_modules/path-expression-matcher/src/index.js +0 -29
  355. package/node_modules/xml-naming/README.md +0 -189
  356. package/node_modules/xml-naming/package.json +0 -54
  357. package/node_modules/xml-naming/src/index.d.ts +0 -74
  358. package/node_modules/xml-naming/src/index.js +0 -270
@@ -1,49 +0,0 @@
1
- // entityTries.js
2
- // Builds integer-keyed tries so the decoder never allocates a string object
3
- // during lookup — every key is a plain charCode number.
4
- //
5
- // trie1: Map<code0, entity>
6
- // trie2: Map<code0, Map<code1, entity>>
7
- // trie3: Map<code0, Map<code1, Map<code2, entity>>>
8
-
9
- import { ALL_ENTITIES } from './entities.js';
10
-
11
- // Reverse map: character sequence → "&name;"
12
- const CHAR_TO_ENTITY = new Map();
13
- for (const [name, chars] of Object.entries(ALL_ENTITIES)) {
14
- CHAR_TO_ENTITY.set(chars, `&${name};`);
15
- }
16
-
17
- export const trie1 = new Map(); // code0 → entity string
18
- export const trie2 = new Map(); // code0 → Map → entity string
19
- export const trie3 = new Map(); // code0 → Map → Map → entity string
20
-
21
- for (const [chars, entity] of CHAR_TO_ENTITY) {
22
- const len = chars.length;
23
-
24
- if (len === 1) {
25
- const c0 = chars.charCodeAt(0);
26
- // Keep shortest match only if no longer match already claimed this code
27
- // (longer matches are inserted in the same pass so we just overwrite —
28
- // trie1 is only consulted after trie2/trie3 both miss, so no conflict)
29
- trie1.set(c0, entity);
30
-
31
- } else if (len === 2) {
32
- const c0 = chars.charCodeAt(0);
33
- const c1 = chars.charCodeAt(1);
34
- let inner = trie2.get(c0);
35
- if (inner === undefined) { inner = new Map(); trie2.set(c0, inner); }
36
- inner.set(c1, entity);
37
-
38
- } else if (len === 3) {
39
- const c0 = chars.charCodeAt(0);
40
- const c1 = chars.charCodeAt(1);
41
- const c2 = chars.charCodeAt(2);
42
- let mid = trie3.get(c0);
43
- if (mid === undefined) { mid = new Map(); trie3.set(c0, mid); }
44
- let inner = mid.get(c1);
45
- if (inner === undefined) { inner = new Map(); mid.set(c1, inner); }
46
- inner.set(c2, entity);
47
- }
48
- // HTML5 has no named entity whose character sequence is longer than 3 chars
49
- }
@@ -1,341 +0,0 @@
1
- // ---------------------------------------------------------------------------
2
- // @nodable/entities — TypeScript declarations
3
- // ---------------------------------------------------------------------------
4
-
5
- /** A function-based entity replacement value (used for numeric refs). */
6
- export type EntityValFn = (match: string, captured: string, ...rest: unknown[]) => string;
7
-
8
- // ---------------------------------------------------------------------------
9
- // Entity registration hook
10
- // ---------------------------------------------------------------------------
11
-
12
- /**
13
- * Actions returned by `onExternalEntity` / `onInputEntity` hooks.
14
- * Use the `ENTITY_ACTION` constant object instead of raw strings to avoid typos.
15
- *
16
- * - `'allow'` — register and expand the entity normally
17
- * - `'block'` — silently skip the entity (not registered, treated as unknown)
18
- * - `'throw'` — abort registration with an error
19
- */
20
- export type EntityHookAction = 'allow' | 'block' | 'throw';
21
-
22
- /**
23
- * Immutable constant bag for entity registration hook return values.
24
- *
25
- * @example
26
- * import { ENTITY_ACTION } from '@nodable/entities';
27
- * const dec = new EntityDecoder({
28
- * onInputEntity: (_name, _value) => ENTITY_ACTION.BLOCK,
29
- * });
30
- */
31
- export const ENTITY_ACTION: Readonly<{
32
- /** Register and expand the entity normally. */
33
- ALLOW: 'allow';
34
- /** Silently skip this entity — it will not be registered. */
35
- BLOCK: 'block';
36
- /** Throw an error, aborting entity registration. */
37
- THROW: 'throw';
38
- }>;
39
-
40
- /**
41
- * Callback signature for `onExternalEntity` and `onInputEntity` hooks.
42
- *
43
- * Called once per entity **at registration time** (not at decode time).
44
- * Return `ENTITY_ACTION.ALLOW` (or `'allow'`) to accept, `ENTITY_ACTION.BLOCK`
45
- * to silently skip, or `ENTITY_ACTION.THROW` to raise an error.
46
- *
47
- * @param name — the entity name without `&` / `;`, e.g. `"brand"`
48
- * @param value — the resolved string value after any `{regex,val}` unwrapping
49
- */
50
- export type EntityRegistrationHook = (name: string, value: string) => EntityHookAction;
51
-
52
- // ---------------------------------------------------------------------------
53
- // Encoder options
54
- // ---------------------------------------------------------------------------
55
-
56
- export interface EntityEncoderOptions {
57
- /**
58
- * Whether to encode XML unsafe characters: `&`, `<`, `>`, `"`, `'`.
59
- * @default true
60
- */
61
- encodeXmlSafe?: boolean;
62
-
63
- /**
64
- * Whether to encode non‑ASCII characters (e.g. `é` → `&eacute;`) using the
65
- * built‑in named entity trie.
66
- * @default true
67
- */
68
- encodeAllNamed?: boolean;
69
-
70
- /**
71
- * Maximum number of replacements performed **cumulatively** across all
72
- * `encode()` calls. `0` means unlimited.
73
- *
74
- * Use `reset()` to reset the internal counter.
75
- * @default 0
76
- */
77
- maxReplacements?: number;
78
- }
79
-
80
- // ---------------------------------------------------------------------------
81
- // EntityEncoder class
82
- // ---------------------------------------------------------------------------
83
-
84
- /**
85
- * High‑performance encoder that replaces characters with XML/HTML entities.
86
- *
87
- * - Escapes XML unsafe characters (`&`, `<`, `>`, `"`, `'`) when `encodeXmlSafe` is true.
88
- * - Replaces non‑ASCII characters (e.g. `é`, `©`) with named entities using
89
- * a compact trie‑based lookup when `encodeAllNamed` is true.
90
- * - Supports a cumulative replacement limit (`maxReplacements`) that persists
91
- * across multiple `encode()` calls until `reset()` is called.
92
- *
93
- * @example
94
- * const encoder = new EntityEncoder({ encodeXmlSafe: true, encodeAllNamed: true });
95
- * encoder.encode('<foo>'); // "&lt;foo&gt;"
96
- * encoder.encode('© 2025'); // "&copy; 2025"
97
- *
98
- * // With limit
99
- * const limited = new EntityEncoder({ maxReplacements: 2 });
100
- * limited.encode('<>&'); // "&lt;&gt;&" (third replacement omitted)
101
- * limited.reset(); // reset counter
102
- */
103
- export class EntityEncoder {
104
- constructor(options?: EntityEncoderOptions);
105
-
106
- /**
107
- * Encode a string by replacing XML‑unsafe characters and (optionally)
108
- * non‑ASCII characters with named entities.
109
- *
110
- * If `maxReplacements` is set and the cumulative limit has been reached,
111
- * the input string is returned unchanged.
112
- *
113
- * @returns Encoded string (may be identical to input if no replacements needed
114
- * or the limit has been exhausted).
115
- */
116
- encode(str: string): string;
117
-
118
- /**
119
- * Reset the internal replacement counter.
120
- * Does **not** change `encodeXmlSafe`, `encodeAllNamed`, or `maxReplacements`.
121
- */
122
- reset(): void;
123
- }
124
-
125
- // ---------------------------------------------------------------------------
126
- // Constructor options for EntityDecoder (existing)
127
- // ---------------------------------------------------------------------------
128
-
129
- /**
130
- * Controls which entity categories count toward the expansion limits.
131
- *
132
- * - `'external'` — only untrusted / injected entities (default)
133
- * - `'base'` — only built‑in XML entities + user‑supplied `namedEntities`
134
- * - `'all'` — all entities regardless of tier
135
- * - `string[]` — explicit combination, e.g. `['external', 'base']`
136
- */
137
- export type ApplyLimitsTo = 'external' | 'base' | 'all' | Array<'external' | 'base'>;
138
-
139
- export interface EntityDecoderLimitOptions {
140
- /**
141
- * Maximum number of entity references expanded **per document**.
142
- * `0` means unlimited.
143
- * @default 0
144
- */
145
- maxTotalExpansions?: number;
146
-
147
- /**
148
- * Maximum number of characters **added** by entity expansion per document.
149
- * `0` means unlimited.
150
- * @default 0
151
- */
152
- maxExpandedLength?: number;
153
-
154
- /**
155
- * Which entity tiers count toward the expansion limits.
156
- *
157
- * - `'external'` (default) – only input/runtime + persistent external entities
158
- * - `'base'` – only built‑in XML + `namedEntities`
159
- * - `'all'` – every entity regardless of tier
160
- * - `string[]` – explicit combination, e.g. `['external', 'base']`
161
- *
162
- * @default 'external'
163
- */
164
- applyLimitsTo?: ApplyLimitsTo;
165
- }
166
-
167
- export interface EntityDecoderNCROptions {
168
- /**
169
- * XML version used for NCR classification.
170
- * @default 1.0
171
- */
172
- xmlVersion?: 1.0 | 1.1;
173
-
174
- /**
175
- * Base action for all numeric references.
176
- * @default 'allow'
177
- */
178
- onNCR?: 'allow' | 'leave' | 'remove' | 'throw';
179
-
180
- /**
181
- * Action for null NCR (U+0000).
182
- * @default 'remove'
183
- */
184
- nullNCR?: 'remove' | 'throw';
185
- }
186
-
187
- export interface EntityDecoderOptions {
188
- /**
189
- * Extra named entities merged into the **base map** (trusted, counts as `'base'` tier).
190
- * These are combined with the built‑in XML entities (`lt`, `gt`, `quot`, `apos`).
191
- * Values containing `&` are silently skipped to prevent recursive expansion.
192
- *
193
- * @default null
194
- */
195
- namedEntities?: Record<string, string | { regex: RegExp; val: string | EntityValFn }> | null;
196
-
197
-
198
- /**
199
- * Hook called once on the fully decoded string (after all replacements).
200
- *
201
- * - Receives `(resolved, original)` and **must return a string**.
202
- * - To reject expansion, return `original`.
203
- * - To sanitize, return a cleaned version of `resolved`.
204
- *
205
- * @example
206
- * postCheck: (resolved, original) =>
207
- * /<[a-z]/i.test(resolved) ? original : resolved
208
- */
209
- postCheck?: ((resolved: string, original: string) => string) | null;
210
-
211
- /**
212
- * Whether numeric character references (`&#NNN;`, `&#xHH;`) are allowed.
213
- * @default true
214
- */
215
- numericAllowed?: boolean;
216
-
217
- /**
218
- * Array of entity names or numeric references to leave unexpanded.
219
- * @default []
220
- */
221
- leave?: string[];
222
-
223
- /**
224
- * Array of entity names or numeric references to remove.
225
- * @default []
226
- */
227
- remove?: string[];
228
-
229
- /**
230
- * Security limits for entity expansion.
231
- */
232
- limit?: EntityDecoderLimitOptions;
233
-
234
- /**
235
- * Numeric Character Reference (NCR) policy.
236
- */
237
- ncr?: EntityDecoderNCROptions;
238
-
239
- /**
240
- * Hook called once **at registration time** for each entity passed to
241
- * `setExternalEntities()` or `addExternalEntity()`.
242
- *
243
- * - `'allow'` (or `ENTITY_ACTION.ALLOW`) — register the entity normally (default)
244
- * - `'block'` (or `ENTITY_ACTION.BLOCK`) — silently skip; the entity is not stored
245
- * - `'throw'` (or `ENTITY_ACTION.THROW`) — abort registration with an `Error`
246
- *
247
- * The hook receives the entity name (without `&`/`;`) and the resolved string
248
- * value. It is **not** called during `decode()` — only when entities are added.
249
- *
250
- * @example
251
- * const dec = new EntityDecoder({
252
- * onExternalEntity: (name, value) =>
253
- * DANGEROUS_NAMES.has(name) ? ENTITY_ACTION.BLOCK : ENTITY_ACTION.ALLOW,
254
- * });
255
- */
256
- onExternalEntity?: EntityRegistrationHook | null;
257
-
258
- /**
259
- * Hook called once **at registration time** for each entity passed to
260
- * `addInputEntities()`.
261
- *
262
- * Follows the same `'allow' | 'block' | 'throw'` contract as `onExternalEntity`.
263
- *
264
- * @example
265
- * const dec = new EntityDecoder({
266
- * // Block all input / DOCTYPE entities unconditionally
267
- * onInputEntity: () => ENTITY_ACTION.BLOCK,
268
- * });
269
- */
270
- onInputEntity?: EntityRegistrationHook | null;
271
- }
272
-
273
- // ---------------------------------------------------------------------------
274
- // EntityDecoder class (default export)
275
- // ---------------------------------------------------------------------------
276
-
277
- /**
278
- * Single‑pass, zero‑regex entity decoder for XML/HTML content.
279
- *
280
- * ## Entity lookup priority (highest → lowest)
281
- * 1. **input / runtime** – injected via `addInputEntities()` (DOCTYPE per document)
282
- * 2. **persistent external** – set via `setExternalEntities()` / `addExternalEntity()`
283
- * 3. **base map** – built‑in XML entities + user‑supplied `namedEntities`
284
- *
285
- * Numeric references (`&#NNN;`, `&#xHH;`) are resolved directly and count as the `'base'` tier.
286
- *
287
- * @example
288
- * const decoder = new EntityDecoder({
289
- * namedEntities: COMMON_HTML,
290
- * maxTotalExpansions: 100
291
- * });
292
- * decoder.setExternalEntities({ brand: 'Acme' });
293
- *
294
- * decoder.addInputEntities({ version: '1.0' });
295
- * decoder.decode('&brand; v&version; &lt;'); // 'Acme v1.0 <'
296
- *
297
- * decoder.reset(); // clears input entities + counters, keeps external entities
298
- */
299
- export default class EntityDecoder {
300
- constructor(options?: EntityDecoderOptions);
301
-
302
- setExternalEntities(
303
- map: Record<string, string | { regex: RegExp; val: string | EntityValFn }>
304
- ): void;
305
-
306
- addExternalEntity(key: string, value: string): void;
307
-
308
- addInputEntities(
309
- map: Record<
310
- string,
311
- | string
312
- | { regx: RegExp; val: string | EntityValFn }
313
- | { regex: RegExp; val: string | EntityValFn }
314
- >
315
- ): void;
316
-
317
- reset(): this;
318
-
319
- decode(str: string): string;
320
- }
321
-
322
- // ---------------------------------------------------------------------------
323
- // Named entity group exports (for use with `namedEntities` option)
324
- // ---------------------------------------------------------------------------
325
-
326
- export const COMMON_HTML: Record<string, string>;
327
- export const ALL_ENTITIES: Record<string, string>;
328
- export const XML: Record<string, string>;
329
- export const BASIC_LATIN: Record<string, string>;
330
- export const LATIN_ACCENTS: Record<string, string>;
331
- export const LATIN_EXTENDED: Record<string, string>;
332
- export const GREEK: Record<string, string>;
333
- export const CYRILLIC: Record<string, string>;
334
- export const MATH: Record<string, string>;
335
- export const MATH_ADVANCED: Record<string, string>;
336
- export const ARROWS: Record<string, string>;
337
- export const SHAPES: Record<string, string>;
338
- export const PUNCTUATION: Record<string, string>;
339
- export const CURRENCY: Record<string, string>;
340
- export const FRACTIONS: Record<string, string>;
341
- export const MISC_SYMBOLS: Record<string, string>;
@@ -1,29 +0,0 @@
1
- /**
2
- * @nodable/entities
3
- *
4
- * Standalone, zero-dependency XML/HTML entity replacement.
5
- *
6
-
7
- */
8
-
9
- export { default as EntityDecoder, ENTITY_ACTION } from './EntityDecoder.js';
10
- export {
11
- COMMON_HTML,
12
- XML,
13
- ALL_ENTITIES,
14
- ARROWS,
15
- BASIC_LATIN,
16
- CURRENCY,
17
- MATH,
18
- MATH_ADVANCED,
19
- CYRILLIC,
20
- FRACTIONS,
21
- GREEK,
22
- LATIN_ACCENTS,
23
- LATIN_EXTENDED,
24
- MISC_SYMBOLS,
25
- PUNCTUATION,
26
- SHAPES,
27
- } from './entities.js';
28
-
29
- export { default as EntityEncoder } from './EntityEncoder.js';
@@ -1,3 +0,0 @@
1
- export const BLOCK_SIZE = 64;
2
- export const DIGEST_LENGTH = 16;
3
- export const INIT = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476];
@@ -1,168 +0,0 @@
1
- import { fromUtf8 } from "@smithy/core/serde";
2
- import { BLOCK_SIZE, DIGEST_LENGTH, INIT } from "./constants";
3
- export class Md5 {
4
- state;
5
- buffer;
6
- bufferLength;
7
- bytesHashed;
8
- finished;
9
- constructor() {
10
- this.reset();
11
- }
12
- update(sourceData) {
13
- if (isEmptyData(sourceData)) {
14
- return;
15
- }
16
- else if (this.finished) {
17
- throw new Error("Attempted to update an already finished hash.");
18
- }
19
- const data = convertToBuffer(sourceData);
20
- let position = 0;
21
- let { byteLength } = data;
22
- this.bytesHashed += byteLength;
23
- while (byteLength > 0) {
24
- this.buffer.setUint8(this.bufferLength++, data[position++]);
25
- byteLength--;
26
- if (this.bufferLength === BLOCK_SIZE) {
27
- this.hashBuffer();
28
- this.bufferLength = 0;
29
- }
30
- }
31
- }
32
- async digest() {
33
- if (!this.finished) {
34
- const { buffer, bufferLength: undecoratedLength, bytesHashed } = this;
35
- const bitsHashed = bytesHashed * 8;
36
- buffer.setUint8(this.bufferLength++, 0b10000000);
37
- if (undecoratedLength % BLOCK_SIZE >= BLOCK_SIZE - 8) {
38
- for (let i = this.bufferLength; i < BLOCK_SIZE; i++) {
39
- buffer.setUint8(i, 0);
40
- }
41
- this.hashBuffer();
42
- this.bufferLength = 0;
43
- }
44
- for (let i = this.bufferLength; i < BLOCK_SIZE - 8; i++) {
45
- buffer.setUint8(i, 0);
46
- }
47
- buffer.setUint32(BLOCK_SIZE - 8, bitsHashed >>> 0, true);
48
- buffer.setUint32(BLOCK_SIZE - 4, Math.floor(bitsHashed / 0x100000000), true);
49
- this.hashBuffer();
50
- this.finished = true;
51
- }
52
- const out = new DataView(new ArrayBuffer(DIGEST_LENGTH));
53
- for (let i = 0; i < 4; i++) {
54
- out.setUint32(i * 4, this.state[i], true);
55
- }
56
- return new Uint8Array(out.buffer, out.byteOffset, out.byteLength);
57
- }
58
- hashBuffer() {
59
- const { buffer, state } = this;
60
- let a = state[0], b = state[1], c = state[2], d = state[3];
61
- a = ff(a, b, c, d, buffer.getUint32(0, true), 7, 0xd76aa478);
62
- d = ff(d, a, b, c, buffer.getUint32(4, true), 12, 0xe8c7b756);
63
- c = ff(c, d, a, b, buffer.getUint32(8, true), 17, 0x242070db);
64
- b = ff(b, c, d, a, buffer.getUint32(12, true), 22, 0xc1bdceee);
65
- a = ff(a, b, c, d, buffer.getUint32(16, true), 7, 0xf57c0faf);
66
- d = ff(d, a, b, c, buffer.getUint32(20, true), 12, 0x4787c62a);
67
- c = ff(c, d, a, b, buffer.getUint32(24, true), 17, 0xa8304613);
68
- b = ff(b, c, d, a, buffer.getUint32(28, true), 22, 0xfd469501);
69
- a = ff(a, b, c, d, buffer.getUint32(32, true), 7, 0x698098d8);
70
- d = ff(d, a, b, c, buffer.getUint32(36, true), 12, 0x8b44f7af);
71
- c = ff(c, d, a, b, buffer.getUint32(40, true), 17, 0xffff5bb1);
72
- b = ff(b, c, d, a, buffer.getUint32(44, true), 22, 0x895cd7be);
73
- a = ff(a, b, c, d, buffer.getUint32(48, true), 7, 0x6b901122);
74
- d = ff(d, a, b, c, buffer.getUint32(52, true), 12, 0xfd987193);
75
- c = ff(c, d, a, b, buffer.getUint32(56, true), 17, 0xa679438e);
76
- b = ff(b, c, d, a, buffer.getUint32(60, true), 22, 0x49b40821);
77
- a = gg(a, b, c, d, buffer.getUint32(4, true), 5, 0xf61e2562);
78
- d = gg(d, a, b, c, buffer.getUint32(24, true), 9, 0xc040b340);
79
- c = gg(c, d, a, b, buffer.getUint32(44, true), 14, 0x265e5a51);
80
- b = gg(b, c, d, a, buffer.getUint32(0, true), 20, 0xe9b6c7aa);
81
- a = gg(a, b, c, d, buffer.getUint32(20, true), 5, 0xd62f105d);
82
- d = gg(d, a, b, c, buffer.getUint32(40, true), 9, 0x02441453);
83
- c = gg(c, d, a, b, buffer.getUint32(60, true), 14, 0xd8a1e681);
84
- b = gg(b, c, d, a, buffer.getUint32(16, true), 20, 0xe7d3fbc8);
85
- a = gg(a, b, c, d, buffer.getUint32(36, true), 5, 0x21e1cde6);
86
- d = gg(d, a, b, c, buffer.getUint32(56, true), 9, 0xc33707d6);
87
- c = gg(c, d, a, b, buffer.getUint32(12, true), 14, 0xf4d50d87);
88
- b = gg(b, c, d, a, buffer.getUint32(32, true), 20, 0x455a14ed);
89
- a = gg(a, b, c, d, buffer.getUint32(52, true), 5, 0xa9e3e905);
90
- d = gg(d, a, b, c, buffer.getUint32(8, true), 9, 0xfcefa3f8);
91
- c = gg(c, d, a, b, buffer.getUint32(28, true), 14, 0x676f02d9);
92
- b = gg(b, c, d, a, buffer.getUint32(48, true), 20, 0x8d2a4c8a);
93
- a = hh(a, b, c, d, buffer.getUint32(20, true), 4, 0xfffa3942);
94
- d = hh(d, a, b, c, buffer.getUint32(32, true), 11, 0x8771f681);
95
- c = hh(c, d, a, b, buffer.getUint32(44, true), 16, 0x6d9d6122);
96
- b = hh(b, c, d, a, buffer.getUint32(56, true), 23, 0xfde5380c);
97
- a = hh(a, b, c, d, buffer.getUint32(4, true), 4, 0xa4beea44);
98
- d = hh(d, a, b, c, buffer.getUint32(16, true), 11, 0x4bdecfa9);
99
- c = hh(c, d, a, b, buffer.getUint32(28, true), 16, 0xf6bb4b60);
100
- b = hh(b, c, d, a, buffer.getUint32(40, true), 23, 0xbebfbc70);
101
- a = hh(a, b, c, d, buffer.getUint32(52, true), 4, 0x289b7ec6);
102
- d = hh(d, a, b, c, buffer.getUint32(0, true), 11, 0xeaa127fa);
103
- c = hh(c, d, a, b, buffer.getUint32(12, true), 16, 0xd4ef3085);
104
- b = hh(b, c, d, a, buffer.getUint32(24, true), 23, 0x04881d05);
105
- a = hh(a, b, c, d, buffer.getUint32(36, true), 4, 0xd9d4d039);
106
- d = hh(d, a, b, c, buffer.getUint32(48, true), 11, 0xe6db99e5);
107
- c = hh(c, d, a, b, buffer.getUint32(60, true), 16, 0x1fa27cf8);
108
- b = hh(b, c, d, a, buffer.getUint32(8, true), 23, 0xc4ac5665);
109
- a = ii(a, b, c, d, buffer.getUint32(0, true), 6, 0xf4292244);
110
- d = ii(d, a, b, c, buffer.getUint32(28, true), 10, 0x432aff97);
111
- c = ii(c, d, a, b, buffer.getUint32(56, true), 15, 0xab9423a7);
112
- b = ii(b, c, d, a, buffer.getUint32(20, true), 21, 0xfc93a039);
113
- a = ii(a, b, c, d, buffer.getUint32(48, true), 6, 0x655b59c3);
114
- d = ii(d, a, b, c, buffer.getUint32(12, true), 10, 0x8f0ccc92);
115
- c = ii(c, d, a, b, buffer.getUint32(40, true), 15, 0xffeff47d);
116
- b = ii(b, c, d, a, buffer.getUint32(4, true), 21, 0x85845dd1);
117
- a = ii(a, b, c, d, buffer.getUint32(32, true), 6, 0x6fa87e4f);
118
- d = ii(d, a, b, c, buffer.getUint32(60, true), 10, 0xfe2ce6e0);
119
- c = ii(c, d, a, b, buffer.getUint32(24, true), 15, 0xa3014314);
120
- b = ii(b, c, d, a, buffer.getUint32(52, true), 21, 0x4e0811a1);
121
- a = ii(a, b, c, d, buffer.getUint32(16, true), 6, 0xf7537e82);
122
- d = ii(d, a, b, c, buffer.getUint32(44, true), 10, 0xbd3af235);
123
- c = ii(c, d, a, b, buffer.getUint32(8, true), 15, 0x2ad7d2bb);
124
- b = ii(b, c, d, a, buffer.getUint32(36, true), 21, 0xeb86d391);
125
- state[0] = (a + state[0]) & 0xffffffff;
126
- state[1] = (b + state[1]) & 0xffffffff;
127
- state[2] = (c + state[2]) & 0xffffffff;
128
- state[3] = (d + state[3]) & 0xffffffff;
129
- }
130
- reset() {
131
- this.state = Uint32Array.from(INIT);
132
- this.buffer = new DataView(new ArrayBuffer(BLOCK_SIZE));
133
- this.bufferLength = 0;
134
- this.bytesHashed = 0;
135
- this.finished = false;
136
- }
137
- }
138
- function cmn(q, a, b, x, s, t) {
139
- a = (((a + q) & 0xffffffff) + ((x + t) & 0xffffffff)) & 0xffffffff;
140
- return (((a << s) | (a >>> (32 - s))) + b) & 0xffffffff;
141
- }
142
- function ff(a, b, c, d, x, s, t) {
143
- return cmn((b & c) | (~b & d), a, b, x, s, t);
144
- }
145
- function gg(a, b, c, d, x, s, t) {
146
- return cmn((b & d) | (c & ~d), a, b, x, s, t);
147
- }
148
- function hh(a, b, c, d, x, s, t) {
149
- return cmn(b ^ c ^ d, a, b, x, s, t);
150
- }
151
- function ii(a, b, c, d, x, s, t) {
152
- return cmn(c ^ (b | ~d), a, b, x, s, t);
153
- }
154
- function isEmptyData(data) {
155
- if (typeof data === "string") {
156
- return data.length === 0;
157
- }
158
- return data.byteLength === 0;
159
- }
160
- function convertToBuffer(data) {
161
- if (typeof data === "string") {
162
- return fromUtf8(data);
163
- }
164
- if (ArrayBuffer.isView(data)) {
165
- return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);
166
- }
167
- return new Uint8Array(data);
168
- }
@@ -1,12 +0,0 @@
1
- /**
2
- * @internal
3
- */
4
- export declare const BLOCK_SIZE = 64;
5
- /**
6
- * @internal
7
- */
8
- export declare const DIGEST_LENGTH = 16;
9
- /**
10
- * @internal
11
- */
12
- export declare const INIT: number[];
@@ -1,16 +0,0 @@
1
- import type { Checksum, SourceData } from "@smithy/types";
2
- /**
3
- * @internal
4
- */
5
- export declare class Md5 implements Checksum {
6
- private state;
7
- private buffer;
8
- private bufferLength;
9
- private bytesHashed;
10
- private finished;
11
- constructor();
12
- update(sourceData: SourceData): void;
13
- digest(): Promise<Uint8Array>;
14
- private hashBuffer;
15
- reset(): void;
16
- }
@@ -1,53 +0,0 @@
1
- import { fromBase64 } from "@smithy/core/serde";
2
- export const streamCollector = async (stream) => {
3
- if ((typeof Blob === "function" && stream instanceof Blob) || stream.constructor?.name === "Blob") {
4
- if (Blob.prototype.arrayBuffer !== undefined) {
5
- return new Uint8Array(await stream.arrayBuffer());
6
- }
7
- return collectBlob(stream);
8
- }
9
- return collectStream(stream);
10
- };
11
- async function collectBlob(blob) {
12
- const base64 = await readToBase64(blob);
13
- const arrayBuffer = fromBase64(base64);
14
- return new Uint8Array(arrayBuffer);
15
- }
16
- async function collectStream(stream) {
17
- const chunks = [];
18
- const reader = stream.getReader();
19
- let isDone = false;
20
- let length = 0;
21
- while (!isDone) {
22
- const { done, value } = await reader.read();
23
- if (value) {
24
- chunks.push(value);
25
- length += value.length;
26
- }
27
- isDone = done;
28
- }
29
- const collected = new Uint8Array(length);
30
- let offset = 0;
31
- for (const chunk of chunks) {
32
- collected.set(chunk, offset);
33
- offset += chunk.length;
34
- }
35
- return collected;
36
- }
37
- function readToBase64(blob) {
38
- return new Promise((resolve, reject) => {
39
- const reader = new FileReader();
40
- reader.onloadend = () => {
41
- if (reader.readyState !== 2) {
42
- return reject(new Error("Reader aborted too early"));
43
- }
44
- const result = (reader.result ?? "");
45
- const commaIndex = result.indexOf(",");
46
- const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;
47
- resolve(result.substring(dataOffset));
48
- };
49
- reader.onabort = () => reject(new Error("Read aborted"));
50
- reader.onerror = () => reject(reader.error);
51
- reader.readAsDataURL(blob);
52
- });
53
- }
@@ -1,2 +0,0 @@
1
- import type { StreamCollector } from "@smithy/types";
2
- export declare const streamCollector: StreamCollector;
@@ -1,8 +0,0 @@
1
- import { Writable } from "node:stream";
2
- export class Collector extends Writable {
3
- bufferedBytes = [];
4
- _write(chunk, encoding, callback) {
5
- this.bufferedBytes.push(chunk);
6
- callback();
7
- }
8
- }