@zowe/cli 8.36.0 → 8.37.0

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 (576) hide show
  1. package/lib/daemon/DaemonClient.d.ts.map +1 -1
  2. package/lib/daemon/DaemonClient.js +3 -0
  3. package/lib/daemon/DaemonClient.js.map +1 -1
  4. package/lib/zosfiles/-strings-/en.d.ts +2 -0
  5. package/lib/zosfiles/-strings-/en.d.ts.map +1 -1
  6. package/lib/zosfiles/-strings-/en.js +5 -1
  7. package/lib/zosfiles/-strings-/en.js.map +1 -1
  8. package/lib/zosfiles/ZosFiles.options.d.ts.map +1 -1
  9. package/lib/zosfiles/ZosFiles.options.js +3 -1
  10. package/lib/zosfiles/ZosFiles.options.js.map +1 -1
  11. package/lib/zosfiles/create/Create.utils.d.ts.map +1 -1
  12. package/lib/zosfiles/create/Create.utils.js +3 -1
  13. package/lib/zosfiles/create/Create.utils.js.map +1 -1
  14. package/lib/zosfiles/create/ussDir/ussDir.handler.d.ts.map +1 -1
  15. package/lib/zosfiles/create/ussDir/ussDir.handler.js +5 -1
  16. package/lib/zosfiles/create/ussDir/ussDir.handler.js.map +1 -1
  17. package/lib/zosfiles/create/ussFile/ussFile.handler.d.ts.map +1 -1
  18. package/lib/zosfiles/create/ussFile/ussFile.handler.js +5 -1
  19. package/lib/zosfiles/create/ussFile/ussFile.handler.js.map +1 -1
  20. package/lib/zosfiles/create/vsam/vsam.handler.d.ts.map +1 -1
  21. package/lib/zosfiles/create/vsam/vsam.handler.js +3 -1
  22. package/lib/zosfiles/create/vsam/vsam.handler.js.map +1 -1
  23. package/lib/zosfiles/create/zfs/zfs.handler.d.ts.map +1 -1
  24. package/lib/zosfiles/create/zfs/zfs.handler.js +3 -1
  25. package/lib/zosfiles/create/zfs/zfs.handler.js.map +1 -1
  26. package/lib/zosfiles/delete/ds/Ds.handler.d.ts.map +1 -1
  27. package/lib/zosfiles/delete/ds/Ds.handler.js +4 -1
  28. package/lib/zosfiles/delete/ds/Ds.handler.js.map +1 -1
  29. package/lib/zosfiles/delete/uss/Uss.handler.d.ts.map +1 -1
  30. package/lib/zosfiles/delete/uss/Uss.handler.js +5 -1
  31. package/lib/zosfiles/delete/uss/Uss.handler.js.map +1 -1
  32. package/lib/zosfiles/delete/vsam/Vsam.handler.d.ts.map +1 -1
  33. package/lib/zosfiles/delete/vsam/Vsam.handler.js +3 -1
  34. package/lib/zosfiles/delete/vsam/Vsam.handler.js.map +1 -1
  35. package/lib/zosfiles/delete/zfs/zfs.handler.d.ts.map +1 -1
  36. package/lib/zosfiles/delete/zfs/zfs.handler.js +3 -1
  37. package/lib/zosfiles/delete/zfs/zfs.handler.js.map +1 -1
  38. package/lib/zosfiles/download/am/AllMembers.handler.d.ts.map +1 -1
  39. package/lib/zosfiles/download/am/AllMembers.handler.js +3 -1
  40. package/lib/zosfiles/download/am/AllMembers.handler.js.map +1 -1
  41. package/lib/zosfiles/download/amm/AllMembersMatching.handler.d.ts.map +1 -1
  42. package/lib/zosfiles/download/amm/AllMembersMatching.handler.js +2 -0
  43. package/lib/zosfiles/download/amm/AllMembersMatching.handler.js.map +1 -1
  44. package/lib/zosfiles/download/ds/Dataset.handler.d.ts.map +1 -1
  45. package/lib/zosfiles/download/ds/Dataset.handler.js +3 -1
  46. package/lib/zosfiles/download/ds/Dataset.handler.js.map +1 -1
  47. package/lib/zosfiles/download/dsm/DataSetMatching.handler.d.ts.map +1 -1
  48. package/lib/zosfiles/download/dsm/DataSetMatching.handler.js +6 -2
  49. package/lib/zosfiles/download/dsm/DataSetMatching.handler.js.map +1 -1
  50. package/lib/zosfiles/download/uss/UssFile.handler.d.ts.map +1 -1
  51. package/lib/zosfiles/download/uss/UssFile.handler.js +2 -0
  52. package/lib/zosfiles/download/uss/UssFile.handler.js.map +1 -1
  53. package/lib/zosfiles/download/ussdir/UssDir.handler.d.ts.map +1 -1
  54. package/lib/zosfiles/download/ussdir/UssDir.handler.js +6 -2
  55. package/lib/zosfiles/download/ussdir/UssDir.handler.js.map +1 -1
  56. package/lib/zosfiles/edit/Edit.utils.d.ts +2 -2
  57. package/lib/zosfiles/edit/Edit.utils.d.ts.map +1 -1
  58. package/lib/zosfiles/edit/Edit.utils.js +10 -10
  59. package/lib/zosfiles/edit/Edit.utils.js.map +1 -1
  60. package/lib/zosfiles/invoke/amsFile/AmsFile.handler.d.ts.map +1 -1
  61. package/lib/zosfiles/invoke/amsFile/AmsFile.handler.js +5 -1
  62. package/lib/zosfiles/invoke/amsFile/AmsFile.handler.js.map +1 -1
  63. package/lib/zosfiles/invoke/amsStatements/AmsStatements.handler.d.ts.map +1 -1
  64. package/lib/zosfiles/invoke/amsStatements/AmsStatements.handler.js +5 -1
  65. package/lib/zosfiles/invoke/amsStatements/AmsStatements.handler.js.map +1 -1
  66. package/lib/zosfiles/list/alias/Alias.handler.d.ts.map +1 -1
  67. package/lib/zosfiles/list/alias/Alias.handler.js +3 -1
  68. package/lib/zosfiles/list/alias/Alias.handler.js.map +1 -1
  69. package/lib/zosfiles/list/am/AllMembers.handler.d.ts.map +1 -1
  70. package/lib/zosfiles/list/am/AllMembers.handler.js +3 -1
  71. package/lib/zosfiles/list/am/AllMembers.handler.js.map +1 -1
  72. package/lib/zosfiles/list/ds/DataSet.handler.d.ts.map +1 -1
  73. package/lib/zosfiles/list/ds/DataSet.handler.js +3 -1
  74. package/lib/zosfiles/list/ds/DataSet.handler.js.map +1 -1
  75. package/lib/zosfiles/list/fs/Fs.handler.d.ts.map +1 -1
  76. package/lib/zosfiles/list/fs/Fs.handler.js +6 -2
  77. package/lib/zosfiles/list/fs/Fs.handler.js.map +1 -1
  78. package/lib/zosfiles/list/uss/UssFile.handler.d.ts.map +1 -1
  79. package/lib/zosfiles/list/uss/UssFile.handler.js +3 -1
  80. package/lib/zosfiles/list/uss/UssFile.handler.js.map +1 -1
  81. package/lib/zosfiles/mount/fs/fs.handler.d.ts.map +1 -1
  82. package/lib/zosfiles/mount/fs/fs.handler.js +3 -1
  83. package/lib/zosfiles/mount/fs/fs.handler.js.map +1 -1
  84. package/lib/zosfiles/rename/ds/Ds.handler.d.ts.map +1 -1
  85. package/lib/zosfiles/rename/ds/Ds.handler.js +4 -1
  86. package/lib/zosfiles/rename/ds/Ds.handler.js.map +1 -1
  87. package/lib/zosfiles/rename/dsm/Dsm.handler.d.ts.map +1 -1
  88. package/lib/zosfiles/rename/dsm/Dsm.handler.js +4 -1
  89. package/lib/zosfiles/rename/dsm/Dsm.handler.js.map +1 -1
  90. package/lib/zosfiles/search/ds/DataSets.handler.d.ts.map +1 -1
  91. package/lib/zosfiles/search/ds/DataSets.handler.js +10 -2
  92. package/lib/zosfiles/search/ds/DataSets.handler.js.map +1 -1
  93. package/lib/zosfiles/upload/dtp/DirToPds.handler.d.ts.map +1 -1
  94. package/lib/zosfiles/upload/dtp/DirToPds.handler.js +3 -1
  95. package/lib/zosfiles/upload/dtp/DirToPds.handler.js.map +1 -1
  96. package/lib/zosfiles/upload/dtu/DirToUSSDir.handler.d.ts.map +1 -1
  97. package/lib/zosfiles/upload/dtu/DirToUSSDir.handler.js +3 -1
  98. package/lib/zosfiles/upload/dtu/DirToUSSDir.handler.js.map +1 -1
  99. package/lib/zosfiles/upload/ftds/FileToDataSet.handler.d.ts.map +1 -1
  100. package/lib/zosfiles/upload/ftds/FileToDataSet.handler.js +3 -1
  101. package/lib/zosfiles/upload/ftds/FileToDataSet.handler.js.map +1 -1
  102. package/lib/zosfiles/upload/ftu/FileToUSS.handler.d.ts.map +1 -1
  103. package/lib/zosfiles/upload/ftu/FileToUSS.handler.js +3 -1
  104. package/lib/zosfiles/upload/ftu/FileToUSS.handler.js.map +1 -1
  105. package/lib/zosfiles/upload/stds/StdinToDataSet.handler.d.ts.map +1 -1
  106. package/lib/zosfiles/upload/stds/StdinToDataSet.handler.js +3 -1
  107. package/lib/zosfiles/upload/stds/StdinToDataSet.handler.js.map +1 -1
  108. package/lib/zosfiles/view/ds/Dataset.handler.d.ts.map +1 -1
  109. package/lib/zosfiles/view/ds/Dataset.handler.js +3 -1
  110. package/lib/zosfiles/view/ds/Dataset.handler.js.map +1 -1
  111. package/lib/zosfiles/view/uss/USSFile.handler.d.ts.map +1 -1
  112. package/lib/zosfiles/view/uss/USSFile.handler.js +3 -1
  113. package/lib/zosfiles/view/uss/USSFile.handler.js.map +1 -1
  114. package/node_modules/@zowe/core-for-zowe-sdk/lib/rest/ZosmfHeaders.d.ts +14 -0
  115. package/node_modules/@zowe/core-for-zowe-sdk/lib/rest/ZosmfHeaders.d.ts.map +1 -1
  116. package/node_modules/@zowe/core-for-zowe-sdk/lib/rest/ZosmfHeaders.js +14 -0
  117. package/node_modules/@zowe/core-for-zowe-sdk/lib/rest/ZosmfHeaders.js.map +1 -1
  118. package/node_modules/@zowe/core-for-zowe-sdk/package.json +3 -3
  119. package/node_modules/@zowe/imperative/lib/config/src/ConfigSchema.d.ts.map +1 -1
  120. package/node_modules/@zowe/imperative/lib/config/src/ConfigSchema.js +1 -0
  121. package/node_modules/@zowe/imperative/lib/config/src/ConfigSchema.js.map +1 -1
  122. package/node_modules/@zowe/imperative/lib/logger/src/LoggerConfigBuilder.d.ts +1 -0
  123. package/node_modules/@zowe/imperative/lib/logger/src/LoggerConfigBuilder.d.ts.map +1 -1
  124. package/node_modules/@zowe/imperative/lib/logger/src/LoggerConfigBuilder.js +2 -0
  125. package/node_modules/@zowe/imperative/lib/logger/src/LoggerConfigBuilder.js.map +1 -1
  126. package/node_modules/@zowe/imperative/lib/logger/src/log4jsToWinston.d.ts +1 -0
  127. package/node_modules/@zowe/imperative/lib/logger/src/log4jsToWinston.d.ts.map +1 -1
  128. package/node_modules/@zowe/imperative/lib/logger/src/log4jsToWinston.js +11 -3
  129. package/node_modules/@zowe/imperative/lib/logger/src/log4jsToWinston.js.map +1 -1
  130. package/node_modules/@zowe/imperative/lib/utilities/src/TextUtils.d.ts.map +1 -1
  131. package/node_modules/@zowe/imperative/lib/utilities/src/TextUtils.js +25 -0
  132. package/node_modules/@zowe/imperative/lib/utilities/src/TextUtils.js.map +1 -1
  133. package/node_modules/@zowe/imperative/package.json +3 -3
  134. package/node_modules/@zowe/imperative/web-help/package-lock.json +62 -62
  135. package/node_modules/@zowe/provisioning-for-zowe-sdk/package.json +4 -4
  136. package/node_modules/@zowe/secrets-for-zowe-sdk/README.md +70 -0
  137. package/node_modules/@zowe/secrets-for-zowe-sdk/package.json +1 -1
  138. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.darwin-arm64.node +0 -0
  139. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.darwin-x64.node +0 -0
  140. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.linux-arm-gnueabihf.node +0 -0
  141. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.linux-arm64-gnu.node +0 -0
  142. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.linux-ia32-gnu.node +0 -0
  143. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.linux-x64-gnu.node +0 -0
  144. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.win32-arm64-msvc.node +0 -0
  145. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.win32-ia32-msvc.node +0 -0
  146. package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.win32-x64-msvc.node +0 -0
  147. package/node_modules/@zowe/zos-console-for-zowe-sdk/package.json +4 -4
  148. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/doc/IZosFilesOptions.d.ts +12 -0
  149. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/doc/IZosFilesOptions.d.ts.map +1 -1
  150. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/copy/Copy.js +1 -1
  151. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/copy/Copy.js.map +1 -1
  152. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/create/Create.d.ts.map +1 -1
  153. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/create/Create.js +18 -3
  154. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/create/Create.js.map +1 -1
  155. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/delete/Delete.d.ts.map +1 -1
  156. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/delete/Delete.js +7 -3
  157. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/delete/Delete.js.map +1 -1
  158. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/download/Download.js +1 -1
  159. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/download/Download.js.map +1 -1
  160. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/invoke/Invoke.d.ts.map +1 -1
  161. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/invoke/Invoke.js +2 -1
  162. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/invoke/Invoke.js.map +1 -1
  163. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/list/List.d.ts.map +1 -1
  164. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/list/List.js +6 -5
  165. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/list/List.js.map +1 -1
  166. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/mount/Mount.d.ts.map +1 -1
  167. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/mount/Mount.js +6 -0
  168. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/mount/Mount.js.map +1 -1
  169. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/rename/Rename.d.ts.map +1 -1
  170. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/rename/Rename.js +2 -1
  171. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/rename/Rename.js.map +1 -1
  172. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/unmount/Unmount.d.ts.map +1 -1
  173. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/unmount/Unmount.js +3 -1
  174. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/unmount/Unmount.js.map +1 -1
  175. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/upload/Upload.d.ts.map +1 -1
  176. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/upload/Upload.js +5 -5
  177. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/upload/Upload.js.map +1 -1
  178. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/utilities/Utilities.d.ts +4 -4
  179. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/utilities/Utilities.d.ts.map +1 -1
  180. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/utilities/Utilities.js +10 -33
  181. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/utilities/Utilities.js.map +1 -1
  182. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/utils/ZosFilesUtils.d.ts +7 -0
  183. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/utils/ZosFilesUtils.d.ts.map +1 -1
  184. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/utils/ZosFilesUtils.js +16 -0
  185. package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/utils/ZosFilesUtils.js.map +1 -1
  186. package/node_modules/@zowe/zos-files-for-zowe-sdk/package.json +5 -5
  187. package/node_modules/@zowe/zos-jobs-for-zowe-sdk/package.json +5 -5
  188. package/node_modules/@zowe/zos-logs-for-zowe-sdk/package.json +4 -4
  189. package/node_modules/@zowe/zos-tso-for-zowe-sdk/package.json +5 -5
  190. package/node_modules/@zowe/zos-uss-for-zowe-sdk/package.json +3 -3
  191. package/node_modules/@zowe/zos-workflows-for-zowe-sdk/package.json +5 -5
  192. package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.constants.d.ts.map +1 -1
  193. package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.constants.js +21 -0
  194. package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.constants.js.map +1 -1
  195. package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.profile.d.ts.map +1 -1
  196. package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.profile.js +8 -0
  197. package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.profile.js.map +1 -1
  198. package/node_modules/@zowe/zosmf-for-zowe-sdk/package.json +4 -4
  199. package/node_modules/js-yaml/dist/js-yaml.js +11 -3
  200. package/node_modules/js-yaml/dist/js-yaml.js.map +1 -1
  201. package/node_modules/js-yaml/dist/js-yaml.min.js +1 -1
  202. package/node_modules/js-yaml/dist/js-yaml.min.js.map +1 -1
  203. package/node_modules/js-yaml/dist/js-yaml.mjs +11 -3
  204. package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
  205. package/node_modules/js-yaml/lib/loader.js +16 -3
  206. package/node_modules/js-yaml/package.json +1 -1
  207. package/node_modules/sanitize-html/README.md +13 -0
  208. package/node_modules/sanitize-html/index.js +86 -12
  209. package/node_modules/sanitize-html/node_modules/dom-serializer/LICENSE +7 -0
  210. package/node_modules/{dom-serializer → sanitize-html/node_modules/dom-serializer}/README.md +14 -8
  211. package/node_modules/sanitize-html/node_modules/dom-serializer/dist/foreign-names.d.ts +11 -0
  212. package/node_modules/sanitize-html/node_modules/dom-serializer/dist/foreign-names.d.ts.map +1 -0
  213. package/node_modules/sanitize-html/node_modules/dom-serializer/dist/foreign-names.js +15 -0
  214. package/node_modules/sanitize-html/node_modules/dom-serializer/dist/foreign-names.js.map +1 -0
  215. package/node_modules/sanitize-html/node_modules/dom-serializer/dist/index.d.ts +72 -0
  216. package/node_modules/sanitize-html/node_modules/dom-serializer/dist/index.d.ts.map +1 -0
  217. package/node_modules/sanitize-html/node_modules/dom-serializer/dist/index.js +173 -0
  218. package/node_modules/sanitize-html/node_modules/dom-serializer/dist/index.js.map +1 -0
  219. package/node_modules/sanitize-html/node_modules/dom-serializer/package.json +69 -0
  220. package/node_modules/sanitize-html/node_modules/dom-serializer/src/foreign-names.ts +19 -0
  221. package/node_modules/sanitize-html/node_modules/dom-serializer/src/index.ts +315 -0
  222. package/node_modules/{domelementtype/lib → sanitize-html/node_modules/domelementtype/dist}/index.d.ts +12 -12
  223. package/node_modules/sanitize-html/node_modules/domelementtype/dist/index.d.ts.map +1 -0
  224. package/node_modules/{domelementtype/lib/esm → sanitize-html/node_modules/domelementtype/dist}/index.js +15 -6
  225. package/node_modules/sanitize-html/node_modules/domelementtype/package.json +59 -0
  226. package/node_modules/{domhandler/lib → sanitize-html/node_modules/domhandler/dist}/index.d.ts +9 -6
  227. package/node_modules/sanitize-html/node_modules/domhandler/dist/index.d.ts.map +1 -0
  228. package/node_modules/{domhandler/lib/esm → sanitize-html/node_modules/domhandler/dist}/index.js +34 -25
  229. package/node_modules/{domhandler/lib → sanitize-html/node_modules/domhandler/dist}/node.d.ts +34 -15
  230. package/node_modules/sanitize-html/node_modules/domhandler/dist/node.d.ts.map +1 -0
  231. package/node_modules/{domhandler/lib/esm → sanitize-html/node_modules/domhandler/dist}/node.js +81 -60
  232. package/node_modules/sanitize-html/node_modules/domhandler/package.json +65 -0
  233. package/node_modules/{domhandler → sanitize-html/node_modules/domhandler}/readme.md +1 -7
  234. package/node_modules/{domutils/lib → sanitize-html/node_modules/domutils/dist}/feeds.d.ts +2 -2
  235. package/node_modules/sanitize-html/node_modules/domutils/dist/feeds.d.ts.map +1 -0
  236. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/feeds.js +22 -25
  237. package/node_modules/sanitize-html/node_modules/domutils/dist/feeds.js.map +1 -0
  238. package/node_modules/{domutils/lib → sanitize-html/node_modules/domutils/dist}/helpers.d.ts +1 -1
  239. package/node_modules/sanitize-html/node_modules/domutils/dist/helpers.d.ts.map +1 -0
  240. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/helpers.js +16 -16
  241. package/node_modules/sanitize-html/node_modules/domutils/dist/helpers.js.map +1 -0
  242. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/index.d.ts +5 -7
  243. package/node_modules/sanitize-html/node_modules/domutils/dist/index.d.ts.map +1 -0
  244. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/index.js +5 -7
  245. package/node_modules/sanitize-html/node_modules/domutils/dist/index.js.map +1 -0
  246. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/legacy.d.ts +1 -1
  247. package/node_modules/sanitize-html/node_modules/domutils/dist/legacy.d.ts.map +1 -0
  248. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/legacy.js +15 -15
  249. package/node_modules/sanitize-html/node_modules/domutils/dist/legacy.js.map +1 -0
  250. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/manipulation.d.ts +9 -9
  251. package/node_modules/sanitize-html/node_modules/domutils/dist/manipulation.d.ts.map +1 -0
  252. package/node_modules/sanitize-html/node_modules/domutils/dist/manipulation.js +138 -0
  253. package/node_modules/sanitize-html/node_modules/domutils/dist/manipulation.js.map +1 -0
  254. package/node_modules/{domutils/lib → sanitize-html/node_modules/domutils/dist}/querying.d.ts +6 -16
  255. package/node_modules/sanitize-html/node_modules/domutils/dist/querying.d.ts.map +1 -0
  256. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/querying.js +13 -26
  257. package/node_modules/sanitize-html/node_modules/domutils/dist/querying.js.map +1 -0
  258. package/node_modules/{domutils/lib → sanitize-html/node_modules/domutils/dist}/stringify.d.ts +2 -2
  259. package/node_modules/sanitize-html/node_modules/domutils/dist/stringify.d.ts.map +1 -0
  260. package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/stringify.js +1 -1
  261. package/node_modules/sanitize-html/node_modules/domutils/dist/stringify.js.map +1 -0
  262. package/node_modules/sanitize-html/node_modules/domutils/dist/traversal.d.ts +74 -0
  263. package/node_modules/sanitize-html/node_modules/domutils/dist/traversal.d.ts.map +1 -0
  264. package/node_modules/sanitize-html/node_modules/domutils/dist/traversal.js +105 -0
  265. package/node_modules/sanitize-html/node_modules/domutils/dist/traversal.js.map +1 -0
  266. package/node_modules/sanitize-html/node_modules/domutils/package.json +69 -0
  267. package/node_modules/{domutils → sanitize-html/node_modules/domutils}/readme.md +0 -6
  268. package/node_modules/sanitize-html/node_modules/domutils/src/__snapshots__/feeds.spec.ts.snap +103 -0
  269. package/node_modules/sanitize-html/node_modules/domutils/src/feeds.ts +301 -0
  270. package/node_modules/{domutils/lib/helpers.js → sanitize-html/node_modules/domutils/src/helpers.ts} +55 -43
  271. package/node_modules/{domutils/lib/index.d.ts → sanitize-html/node_modules/domutils/src/index.ts} +5 -8
  272. package/node_modules/sanitize-html/node_modules/domutils/src/legacy.ts +224 -0
  273. package/node_modules/sanitize-html/node_modules/domutils/src/manipulation.ts +156 -0
  274. package/node_modules/{domutils/lib/querying.js → sanitize-html/node_modules/domutils/src/querying.ts} +77 -60
  275. package/node_modules/sanitize-html/node_modules/domutils/src/stringify.ts +90 -0
  276. package/node_modules/sanitize-html/node_modules/domutils/src/traversal.ts +132 -0
  277. package/node_modules/sanitize-html/node_modules/entities/dist/decode-codepoint.d.ts +28 -0
  278. package/node_modules/sanitize-html/node_modules/entities/dist/decode-codepoint.d.ts.map +1 -0
  279. package/node_modules/sanitize-html/node_modules/entities/dist/decode-codepoint.js +61 -0
  280. package/node_modules/sanitize-html/node_modules/entities/dist/decode-codepoint.js.map +1 -0
  281. package/node_modules/{htmlparser2/node_modules/entities/dist/commonjs → sanitize-html/node_modules/entities/dist}/decode.d.ts +66 -44
  282. package/node_modules/sanitize-html/node_modules/entities/dist/decode.d.ts.map +1 -0
  283. package/node_modules/sanitize-html/node_modules/entities/dist/decode.js +1132 -0
  284. package/node_modules/sanitize-html/node_modules/entities/dist/decode.js.map +1 -0
  285. package/node_modules/{htmlparser2/node_modules/entities/dist/commonjs → sanitize-html/node_modules/entities/dist}/encode.d.ts +4 -0
  286. package/node_modules/sanitize-html/node_modules/entities/dist/encode.d.ts.map +1 -0
  287. package/node_modules/sanitize-html/node_modules/entities/dist/encode.js +295 -0
  288. package/node_modules/sanitize-html/node_modules/entities/dist/encode.js.map +1 -0
  289. package/node_modules/{htmlparser2/node_modules/entities/dist/commonjs → sanitize-html/node_modules/entities/dist}/escape.d.ts +23 -9
  290. package/node_modules/sanitize-html/node_modules/entities/dist/escape.d.ts.map +1 -0
  291. package/node_modules/sanitize-html/node_modules/entities/dist/escape.js +172 -0
  292. package/node_modules/sanitize-html/node_modules/entities/dist/escape.js.map +1 -0
  293. package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-html.d.ts +3 -0
  294. package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-html.d.ts.map +1 -0
  295. package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-html.js +5 -0
  296. package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-html.js.map +1 -0
  297. package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-xml.d.ts +3 -0
  298. package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-xml.d.ts.map +1 -0
  299. package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-xml.js +7 -0
  300. package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-xml.js.map +1 -0
  301. package/node_modules/sanitize-html/node_modules/entities/dist/generated/encode-html.d.ts +3 -0
  302. package/node_modules/sanitize-html/node_modules/entities/dist/generated/encode-html.d.ts.map +1 -0
  303. package/node_modules/sanitize-html/node_modules/entities/dist/generated/encode-html.js +3 -0
  304. package/node_modules/sanitize-html/node_modules/entities/dist/generated/encode-html.js.map +1 -0
  305. package/node_modules/{htmlparser2/node_modules/entities/dist/commonjs → sanitize-html/node_modules/entities/dist}/index.d.ts +11 -18
  306. package/node_modules/sanitize-html/node_modules/entities/dist/index.d.ts.map +1 -0
  307. package/node_modules/{htmlparser2/node_modules/entities/dist/esm → sanitize-html/node_modules/entities/dist}/index.js +9 -29
  308. package/node_modules/sanitize-html/node_modules/entities/dist/index.js.map +1 -0
  309. package/node_modules/sanitize-html/node_modules/entities/dist/internal/bin-trie-flags.d.ts +48 -0
  310. package/node_modules/sanitize-html/node_modules/entities/dist/internal/bin-trie-flags.d.ts.map +1 -0
  311. package/node_modules/sanitize-html/node_modules/entities/dist/internal/bin-trie-flags.js +49 -0
  312. package/node_modules/sanitize-html/node_modules/entities/dist/internal/bin-trie-flags.js.map +1 -0
  313. package/node_modules/sanitize-html/node_modules/entities/dist/internal/decode-shared.d.ts +38 -0
  314. package/node_modules/sanitize-html/node_modules/entities/dist/internal/decode-shared.d.ts.map +1 -0
  315. package/node_modules/sanitize-html/node_modules/entities/dist/internal/decode-shared.js +195 -0
  316. package/node_modules/sanitize-html/node_modules/entities/dist/internal/decode-shared.js.map +1 -0
  317. package/node_modules/sanitize-html/node_modules/entities/package.json +83 -0
  318. package/node_modules/{htmlparser2 → sanitize-html}/node_modules/entities/readme.md +4 -16
  319. package/node_modules/sanitize-html/node_modules/entities/src/decode-codepoint.ts +69 -0
  320. package/node_modules/sanitize-html/node_modules/entities/src/decode.ts +1368 -0
  321. package/node_modules/sanitize-html/node_modules/entities/src/encode.ts +337 -0
  322. package/node_modules/sanitize-html/node_modules/entities/src/escape.ts +187 -0
  323. package/node_modules/sanitize-html/node_modules/entities/src/generated/decode-data-html.ts +12 -0
  324. package/node_modules/sanitize-html/node_modules/entities/src/generated/decode-data-xml.ts +7 -0
  325. package/node_modules/sanitize-html/node_modules/entities/src/generated/encode-html.ts +3 -0
  326. package/node_modules/{htmlparser2 → sanitize-html}/node_modules/entities/src/index.ts +14 -41
  327. package/node_modules/sanitize-html/node_modules/entities/src/internal/bin-trie-flags.ts +47 -0
  328. package/node_modules/sanitize-html/node_modules/entities/src/internal/decode-shared.ts +209 -0
  329. package/node_modules/sanitize-html/node_modules/htmlparser2/README.md +257 -0
  330. package/node_modules/{htmlparser2/dist/esm → sanitize-html/node_modules/htmlparser2/dist}/Parser.d.ts +97 -38
  331. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Parser.d.ts.map +1 -0
  332. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Parser.js +644 -0
  333. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Parser.js.map +1 -0
  334. package/node_modules/{htmlparser2/dist/commonjs → sanitize-html/node_modules/htmlparser2/dist}/Tokenizer.d.ts +75 -7
  335. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Tokenizer.d.ts.map +1 -0
  336. package/node_modules/{htmlparser2/dist/esm → sanitize-html/node_modules/htmlparser2/dist}/Tokenizer.js +434 -179
  337. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Tokenizer.js.map +1 -0
  338. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WebWritableStream.d.ts +24 -0
  339. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WebWritableStream.d.ts.map +1 -0
  340. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WebWritableStream.js +44 -0
  341. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WebWritableStream.js.map +1 -0
  342. package/node_modules/{htmlparser2/dist/commonjs → sanitize-html/node_modules/htmlparser2/dist}/WritableStream.d.ts +1 -2
  343. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WritableStream.d.ts.map +1 -0
  344. package/node_modules/{htmlparser2/dist/esm → sanitize-html/node_modules/htmlparser2/dist}/WritableStream.js +3 -3
  345. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WritableStream.js.map +1 -0
  346. package/node_modules/{htmlparser2/dist/commonjs → sanitize-html/node_modules/htmlparser2/dist}/index.d.ts +6 -26
  347. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/index.d.ts.map +1 -0
  348. package/node_modules/{htmlparser2/dist/esm → sanitize-html/node_modules/htmlparser2/dist}/index.js +2 -30
  349. package/node_modules/sanitize-html/node_modules/htmlparser2/dist/index.js.map +1 -0
  350. package/node_modules/sanitize-html/node_modules/htmlparser2/package.json +86 -0
  351. package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/src/Parser.ts +260 -100
  352. package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/src/Tokenizer.ts +438 -165
  353. package/node_modules/sanitize-html/node_modules/htmlparser2/src/WebWritableStream.ts +47 -0
  354. package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/src/WritableStream.ts +1 -2
  355. package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/src/index.ts +14 -43
  356. package/node_modules/sanitize-html/package.json +5 -2
  357. package/package.json +15 -15
  358. package/scripts/validateSecretsPrebuild.js +231 -0
  359. package/node_modules/dom-serializer/LICENSE +0 -11
  360. package/node_modules/dom-serializer/lib/esm/foreignNames.d.ts +0 -3
  361. package/node_modules/dom-serializer/lib/esm/foreignNames.d.ts.map +0 -1
  362. package/node_modules/dom-serializer/lib/esm/foreignNames.js +0 -100
  363. package/node_modules/dom-serializer/lib/esm/index.d.ts +0 -52
  364. package/node_modules/dom-serializer/lib/esm/index.d.ts.map +0 -1
  365. package/node_modules/dom-serializer/lib/esm/index.js +0 -190
  366. package/node_modules/dom-serializer/lib/esm/package.json +0 -1
  367. package/node_modules/dom-serializer/lib/foreignNames.d.ts +0 -3
  368. package/node_modules/dom-serializer/lib/foreignNames.d.ts.map +0 -1
  369. package/node_modules/dom-serializer/lib/foreignNames.js +0 -103
  370. package/node_modules/dom-serializer/lib/index.d.ts +0 -52
  371. package/node_modules/dom-serializer/lib/index.d.ts.map +0 -1
  372. package/node_modules/dom-serializer/lib/index.js +0 -229
  373. package/node_modules/dom-serializer/package.json +0 -69
  374. package/node_modules/domelementtype/lib/esm/index.d.ts +0 -48
  375. package/node_modules/domelementtype/lib/esm/index.d.ts.map +0 -1
  376. package/node_modules/domelementtype/lib/esm/package.json +0 -1
  377. package/node_modules/domelementtype/lib/index.d.ts.map +0 -1
  378. package/node_modules/domelementtype/lib/index.js +0 -55
  379. package/node_modules/domelementtype/package.json +0 -54
  380. package/node_modules/domhandler/lib/esm/index.d.ts +0 -76
  381. package/node_modules/domhandler/lib/esm/index.d.ts.map +0 -1
  382. package/node_modules/domhandler/lib/esm/node.d.ts +0 -245
  383. package/node_modules/domhandler/lib/esm/node.d.ts.map +0 -1
  384. package/node_modules/domhandler/lib/esm/package.json +0 -1
  385. package/node_modules/domhandler/lib/index.d.ts.map +0 -1
  386. package/node_modules/domhandler/lib/index.js +0 -165
  387. package/node_modules/domhandler/lib/node.d.ts.map +0 -1
  388. package/node_modules/domhandler/lib/node.js +0 -474
  389. package/node_modules/domhandler/package.json +0 -73
  390. package/node_modules/domutils/lib/esm/feeds.d.ts +0 -71
  391. package/node_modules/domutils/lib/esm/feeds.d.ts.map +0 -1
  392. package/node_modules/domutils/lib/esm/feeds.js.map +0 -1
  393. package/node_modules/domutils/lib/esm/helpers.d.ts +0 -59
  394. package/node_modules/domutils/lib/esm/helpers.d.ts.map +0 -1
  395. package/node_modules/domutils/lib/esm/helpers.js.map +0 -1
  396. package/node_modules/domutils/lib/esm/index.d.ts.map +0 -1
  397. package/node_modules/domutils/lib/esm/index.js.map +0 -1
  398. package/node_modules/domutils/lib/esm/legacy.d.ts.map +0 -1
  399. package/node_modules/domutils/lib/esm/legacy.js.map +0 -1
  400. package/node_modules/domutils/lib/esm/manipulation.d.ts.map +0 -1
  401. package/node_modules/domutils/lib/esm/manipulation.js +0 -134
  402. package/node_modules/domutils/lib/esm/manipulation.js.map +0 -1
  403. package/node_modules/domutils/lib/esm/package.json +0 -1
  404. package/node_modules/domutils/lib/esm/querying.d.ts +0 -64
  405. package/node_modules/domutils/lib/esm/querying.d.ts.map +0 -1
  406. package/node_modules/domutils/lib/esm/querying.js.map +0 -1
  407. package/node_modules/domutils/lib/esm/stringify.d.ts +0 -46
  408. package/node_modules/domutils/lib/esm/stringify.d.ts.map +0 -1
  409. package/node_modules/domutils/lib/esm/stringify.js.map +0 -1
  410. package/node_modules/domutils/lib/esm/traversal.d.ts +0 -67
  411. package/node_modules/domutils/lib/esm/traversal.d.ts.map +0 -1
  412. package/node_modules/domutils/lib/esm/traversal.js +0 -112
  413. package/node_modules/domutils/lib/esm/traversal.js.map +0 -1
  414. package/node_modules/domutils/lib/feeds.d.ts.map +0 -1
  415. package/node_modules/domutils/lib/feeds.js +0 -190
  416. package/node_modules/domutils/lib/feeds.js.map +0 -1
  417. package/node_modules/domutils/lib/helpers.d.ts.map +0 -1
  418. package/node_modules/domutils/lib/helpers.js.map +0 -1
  419. package/node_modules/domutils/lib/index.d.ts.map +0 -1
  420. package/node_modules/domutils/lib/index.js +0 -33
  421. package/node_modules/domutils/lib/index.js.map +0 -1
  422. package/node_modules/domutils/lib/legacy.d.ts +0 -79
  423. package/node_modules/domutils/lib/legacy.d.ts.map +0 -1
  424. package/node_modules/domutils/lib/legacy.js +0 -168
  425. package/node_modules/domutils/lib/legacy.js.map +0 -1
  426. package/node_modules/domutils/lib/manipulation.d.ts +0 -49
  427. package/node_modules/domutils/lib/manipulation.d.ts.map +0 -1
  428. package/node_modules/domutils/lib/manipulation.js +0 -142
  429. package/node_modules/domutils/lib/manipulation.js.map +0 -1
  430. package/node_modules/domutils/lib/querying.d.ts.map +0 -1
  431. package/node_modules/domutils/lib/querying.js.map +0 -1
  432. package/node_modules/domutils/lib/stringify.d.ts.map +0 -1
  433. package/node_modules/domutils/lib/stringify.js +0 -91
  434. package/node_modules/domutils/lib/stringify.js.map +0 -1
  435. package/node_modules/domutils/lib/traversal.d.ts +0 -67
  436. package/node_modules/domutils/lib/traversal.d.ts.map +0 -1
  437. package/node_modules/domutils/lib/traversal.js +0 -125
  438. package/node_modules/domutils/lib/traversal.js.map +0 -1
  439. package/node_modules/domutils/package.json +0 -79
  440. package/node_modules/htmlparser2/README.md +0 -171
  441. package/node_modules/htmlparser2/WritableStream.js +0 -3
  442. package/node_modules/htmlparser2/dist/commonjs/Parser.d.ts +0 -198
  443. package/node_modules/htmlparser2/dist/commonjs/Parser.d.ts.map +0 -1
  444. package/node_modules/htmlparser2/dist/commonjs/Parser.js +0 -527
  445. package/node_modules/htmlparser2/dist/commonjs/Parser.js.map +0 -1
  446. package/node_modules/htmlparser2/dist/commonjs/Tokenizer.d.ts.map +0 -1
  447. package/node_modules/htmlparser2/dist/commonjs/Tokenizer.js +0 -805
  448. package/node_modules/htmlparser2/dist/commonjs/Tokenizer.js.map +0 -1
  449. package/node_modules/htmlparser2/dist/commonjs/WritableStream.d.ts.map +0 -1
  450. package/node_modules/htmlparser2/dist/commonjs/WritableStream.js +0 -36
  451. package/node_modules/htmlparser2/dist/commonjs/WritableStream.js.map +0 -1
  452. package/node_modules/htmlparser2/dist/commonjs/index.d.ts.map +0 -1
  453. package/node_modules/htmlparser2/dist/commonjs/index.js +0 -123
  454. package/node_modules/htmlparser2/dist/commonjs/index.js.map +0 -1
  455. package/node_modules/htmlparser2/dist/commonjs/package.json +0 -3
  456. package/node_modules/htmlparser2/dist/esm/Parser.d.ts.map +0 -1
  457. package/node_modules/htmlparser2/dist/esm/Parser.js +0 -490
  458. package/node_modules/htmlparser2/dist/esm/Parser.js.map +0 -1
  459. package/node_modules/htmlparser2/dist/esm/Tokenizer.d.ts +0 -126
  460. package/node_modules/htmlparser2/dist/esm/Tokenizer.d.ts.map +0 -1
  461. package/node_modules/htmlparser2/dist/esm/Tokenizer.js.map +0 -1
  462. package/node_modules/htmlparser2/dist/esm/WritableStream.d.ts +0 -15
  463. package/node_modules/htmlparser2/dist/esm/WritableStream.d.ts.map +0 -1
  464. package/node_modules/htmlparser2/dist/esm/WritableStream.js.map +0 -1
  465. package/node_modules/htmlparser2/dist/esm/index.d.ts +0 -54
  466. package/node_modules/htmlparser2/dist/esm/index.d.ts.map +0 -1
  467. package/node_modules/htmlparser2/dist/esm/index.js.map +0 -1
  468. package/node_modules/htmlparser2/dist/esm/package.json +0 -3
  469. package/node_modules/htmlparser2/node_modules/entities/decode.d.ts +0 -3
  470. package/node_modules/htmlparser2/node_modules/entities/decode.js +0 -3
  471. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.d.ts +0 -19
  472. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.d.ts.map +0 -1
  473. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js +0 -77
  474. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js.map +0 -1
  475. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.d.ts.map +0 -1
  476. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js +0 -568
  477. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js.map +0 -1
  478. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.d.ts.map +0 -1
  479. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.js +0 -92
  480. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.js.map +0 -1
  481. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.d.ts.map +0 -1
  482. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.js +0 -138
  483. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.js.map +0 -1
  484. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts +0 -2
  485. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts.map +0 -1
  486. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js +0 -7
  487. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +0 -1
  488. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts +0 -2
  489. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts.map +0 -1
  490. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +0 -7
  491. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +0 -1
  492. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.d.ts +0 -3
  493. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.d.ts.map +0 -1
  494. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.js +0 -14
  495. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.js.map +0 -1
  496. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.d.ts.map +0 -1
  497. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.js +0 -131
  498. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.js.map +0 -1
  499. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts +0 -17
  500. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts.map +0 -1
  501. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +0 -21
  502. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js.map +0 -1
  503. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts +0 -2
  504. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts.map +0 -1
  505. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.js +0 -31
  506. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.js.map +0 -1
  507. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts +0 -32
  508. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts.map +0 -1
  509. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.js +0 -94
  510. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.js.map +0 -1
  511. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/package.json +0 -3
  512. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.d.ts +0 -19
  513. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.d.ts.map +0 -1
  514. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.js +0 -72
  515. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.js.map +0 -1
  516. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.d.ts +0 -205
  517. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.d.ts.map +0 -1
  518. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.js +0 -554
  519. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.js.map +0 -1
  520. package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.d.ts +0 -22
  521. package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.d.ts.map +0 -1
  522. package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.js +0 -88
  523. package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.js.map +0 -1
  524. package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.d.ts +0 -46
  525. package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.d.ts.map +0 -1
  526. package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.js +0 -134
  527. package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.js.map +0 -1
  528. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.d.ts +0 -2
  529. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.d.ts.map +0 -1
  530. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.js +0 -4
  531. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.js.map +0 -1
  532. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts +0 -2
  533. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts.map +0 -1
  534. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.js +0 -4
  535. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.js.map +0 -1
  536. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.d.ts +0 -3
  537. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.d.ts.map +0 -1
  538. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.js +0 -11
  539. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.js.map +0 -1
  540. package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.d.ts +0 -96
  541. package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.d.ts.map +0 -1
  542. package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.js.map +0 -1
  543. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts +0 -17
  544. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts.map +0 -1
  545. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.js +0 -18
  546. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.js.map +0 -1
  547. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.d.ts +0 -2
  548. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.d.ts.map +0 -1
  549. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.js +0 -28
  550. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.js.map +0 -1
  551. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.d.ts +0 -32
  552. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.d.ts.map +0 -1
  553. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.js +0 -91
  554. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.js.map +0 -1
  555. package/node_modules/htmlparser2/node_modules/entities/dist/esm/package.json +0 -3
  556. package/node_modules/htmlparser2/node_modules/entities/escape.d.ts +0 -3
  557. package/node_modules/htmlparser2/node_modules/entities/escape.js +0 -3
  558. package/node_modules/htmlparser2/node_modules/entities/package.json +0 -120
  559. package/node_modules/htmlparser2/node_modules/entities/src/decode-codepoint.ts +0 -81
  560. package/node_modules/htmlparser2/node_modules/entities/src/decode.ts +0 -685
  561. package/node_modules/htmlparser2/node_modules/entities/src/encode.ts +0 -93
  562. package/node_modules/htmlparser2/node_modules/entities/src/escape.ts +0 -161
  563. package/node_modules/htmlparser2/node_modules/entities/src/generated/.eslintrc.json +0 -10
  564. package/node_modules/htmlparser2/node_modules/entities/src/generated/decode-data-html.ts +0 -6
  565. package/node_modules/htmlparser2/node_modules/entities/src/generated/decode-data-xml.ts +0 -6
  566. package/node_modules/htmlparser2/node_modules/entities/src/generated/encode-html.ts +0 -17
  567. package/node_modules/htmlparser2/node_modules/entities/src/internal/bin-trie-flags.ts +0 -16
  568. package/node_modules/htmlparser2/node_modules/entities/src/internal/decode-shared.ts +0 -30
  569. package/node_modules/htmlparser2/node_modules/entities/src/internal/encode-shared.ts +0 -121
  570. package/node_modules/htmlparser2/package.json +0 -113
  571. /package/node_modules/{domelementtype → sanitize-html/node_modules/domelementtype}/LICENSE +0 -0
  572. /package/node_modules/{domelementtype → sanitize-html/node_modules/domelementtype}/readme.md +0 -0
  573. /package/node_modules/{domhandler → sanitize-html/node_modules/domhandler}/LICENSE +0 -0
  574. /package/node_modules/{domutils → sanitize-html/node_modules/domutils}/LICENSE +0 -0
  575. /package/node_modules/{htmlparser2 → sanitize-html}/node_modules/entities/LICENSE +0 -0
  576. /package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/LICENSE +0 -0
@@ -1,4 +1,4 @@
1
- import { DecodingMode, decodeHTML, decodeXML } from "./decode.js";
1
+ import { type DecodingMode, decodeHTML, decodeXML } from "./decode.js";
2
2
  import { encodeHTML, encodeNonAsciiHTML } from "./encode.js";
3
3
  import {
4
4
  encodeXML,
@@ -15,6 +15,9 @@ export enum EntityLevel {
15
15
  HTML = 1,
16
16
  }
17
17
 
18
+ /**
19
+ * Encoding strategy used by `encode`.
20
+ */
18
21
  export enum EncodingMode {
19
22
  /**
20
23
  * The output is UTF-8 encoded. Only characters that need escaping within
@@ -44,6 +47,9 @@ export enum EncodingMode {
44
47
  Text,
45
48
  }
46
49
 
50
+ /**
51
+ * Options for `decode`.
52
+ */
47
53
  export interface DecodingOptions {
48
54
  /**
49
55
  * The level of entities to support.
@@ -54,11 +60,8 @@ export interface DecodingOptions {
54
60
  * Decoding mode. If `Legacy`, will support legacy entities not terminated
55
61
  * with a semicolon (`;`).
56
62
  *
57
- * Always `Strict` for XML. For HTML, set this to `true` if you are parsing
58
- * an attribute value.
59
- *
60
- * The deprecated `decodeStrict` function defaults this to `Strict`.
61
- *
63
+ * Always `Strict` for XML. For HTML, set this to
64
+ * {@link DecodingMode.Attribute} if you are parsing an attribute value.
62
65
  * @default {@link DecodingMode.Legacy}
63
66
  */
64
67
  mode?: DecodingMode | undefined;
@@ -66,7 +69,6 @@ export interface DecodingOptions {
66
69
 
67
70
  /**
68
71
  * Decodes a string with entities.
69
- *
70
72
  * @param input String to decode.
71
73
  * @param options Decoding options.
72
74
  */
@@ -84,24 +86,6 @@ export function decode(
84
86
  return decodeXML(input);
85
87
  }
86
88
 
87
- /**
88
- * Decodes a string with entities. Does not allow missing trailing semicolons for entities.
89
- *
90
- * @param input String to decode.
91
- * @param options Decoding options.
92
- * @deprecated Use `decode` with the `mode` set to `Strict`.
93
- */
94
- export function decodeStrict(
95
- input: string,
96
- options: DecodingOptions | EntityLevel = EntityLevel.XML,
97
- ): string {
98
- const normalizedOptions =
99
- typeof options === "number" ? { level: options } : options;
100
- normalizedOptions.mode ??= DecodingMode.Strict;
101
-
102
- return decode(input, normalizedOptions);
103
- }
104
-
105
89
  /**
106
90
  * Options for `encode`.
107
91
  */
@@ -120,7 +104,6 @@ export interface EncodingOptions {
120
104
 
121
105
  /**
122
106
  * Encodes a string with entities.
123
- *
124
107
  * @param input String to encode.
125
108
  * @param options Encoding options.
126
109
  */
@@ -142,16 +125,14 @@ export function encode(
142
125
  return escapeText(input);
143
126
  }
144
127
  case EncodingMode.ASCII: {
145
- return level === EntityLevel.HTML
146
- ? encodeNonAsciiHTML(input)
147
- : encodeXML(input);
128
+ return (
129
+ level === EntityLevel.HTML ? encodeNonAsciiHTML : encodeXML
130
+ )(input);
148
131
  }
149
132
  // biome-ignore lint/complexity/noUselessSwitchCase: we get an error for the switch not being exhaustive
150
- case EncodingMode.Extensive: // eslint-disable-line unicorn/no-useless-switch-case
133
+ case EncodingMode.Extensive:
151
134
  default: {
152
- return level === EntityLevel.HTML
153
- ? encodeHTML(input)
154
- : encodeXML(input);
135
+ return (level === EntityLevel.HTML ? encodeHTML : encodeXML)(input);
155
136
  }
156
137
  }
157
138
  }
@@ -159,13 +140,8 @@ export function encode(
159
140
  export {
160
141
  DecodingMode,
161
142
  decodeHTML,
162
- // Legacy aliases (deprecated)
163
- decodeHTML as decodeHTML4,
164
- decodeHTML as decodeHTML5,
165
143
  decodeHTMLAttribute,
166
144
  decodeHTMLStrict,
167
- decodeHTMLStrict as decodeHTML4Strict,
168
- decodeHTMLStrict as decodeHTML5Strict,
169
145
  decodeXML,
170
146
  decodeXML as decodeXMLStrict,
171
147
  EntityDecoder,
@@ -173,9 +149,6 @@ export {
173
149
 
174
150
  export {
175
151
  encodeHTML,
176
- // Legacy aliases (deprecated)
177
- encodeHTML as encodeHTML4,
178
- encodeHTML as encodeHTML5,
179
152
  encodeNonAsciiHTML,
180
153
  } from "./encode.js";
181
154
  export {
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Bit flags & masks for the binary trie encoding used for entity decoding.
3
+ *
4
+ * The trie is a flat `Uint16Array`. Every node starts with one header word:
5
+ *
6
+ * 15..14 VALUE_LENGTH Number of words the value occupies, +1.
7
+ * 0 = no value; 1 = value inline in bits 12..0;
8
+ * 2/3 = value in the 1/2 words after the header.
9
+ * 13 FLAG13 If VALUE_LENGTH > 0: semicolon required ("strict"
10
+ * entity; `;` is never stored as a branch).
11
+ * If VALUE_LENGTH == 0: this node is a compact run.
12
+ * 12..7 BRANCH_LENGTH Number of branches (or run length for runs).
13
+ * 6..0 JUMP_TABLE Jump-table offset / single-branch char / first
14
+ * run char (see below).
15
+ *
16
+ * Branch data follows the header and any value words. Its shape is selected
17
+ * by (JUMP_TABLE, BRANCH_LENGTH) in the header:
18
+ *
19
+ * Single branch JUMP_TABLE = the only child's char, BRANCH_LENGTH = 0.
20
+ * No branch words; the child node follows immediately.
21
+ * Jump table JUMP_TABLE = first covered char (> 0), BRANCH_LENGTH =
22
+ * table length. One word per covered char: 0 = no branch,
23
+ * otherwise the child's offset from the END of the table,
24
+ * +1 (so 0 stays the no-branch sentinel).
25
+ * Dictionary JUMP_TABLE = 0, BRANCH_LENGTH = number of branches.
26
+ * ceil(n/2) words of sorted keys packed two per word
27
+ * (low byte first), then n pointer words storing the
28
+ * child's offset from the END of the branch data.
29
+ * Compact run VALUE_LENGTH = 0, FLAG13 set. BRANCH_LENGTH = run
30
+ * length (3..63), JUMP_TABLE = first char; remaining run
31
+ * chars packed two per word after the header. The target
32
+ * node follows the packed words immediately.
33
+ *
34
+ * Pointers are end-relative (rather than relative to the pointer's own
35
+ * position) because that makes the common "child encoded right after the
36
+ * branch data" case a small constant, which compresses far better. Offsets
37
+ * to already-encoded (shared) nodes wrap via uint16 modulo arithmetic; the
38
+ * decoder masks navigation results with `& 0xff_ff` to match.
39
+ */
40
+ export const enum BinTrieFlags {
41
+ VALUE_LENGTH = 0b1100_0000_0000_0000,
42
+ FLAG13 = 0b0010_0000_0000_0000,
43
+ BRANCH_LENGTH = 0b0001_1111_1000_0000,
44
+ JUMP_TABLE = 0b0000_0000_0111_1111,
45
+ /** Bits 12..0: the inline value of a VALUE_LENGTH = 1 header word. */
46
+ VALUE_MASK = 0b0001_1111_1111_1111,
47
+ }
@@ -0,0 +1,209 @@
1
+ /*
2
+ * Inverse of the encoder's SAFE alphabet (0x21..0x7E minus 0x22, 0x24, 0x5C),
3
+ * precomputed once at module load. Entries for excluded chars stay 0 but
4
+ * are never read.
5
+ */
6
+ const BASE91_INVERSE = /* #__PURE__ */ (() => {
7
+ const table = new Uint8Array(127);
8
+ let code = 0;
9
+ for (let char = 0x21; char <= 0x7e; char++) {
10
+ if (char !== 0x22 && char !== 0x24 && char !== 0x5c) {
11
+ table[char] = code++;
12
+ }
13
+ }
14
+ return table;
15
+ })();
16
+
17
+ /**
18
+ * Decode a dictionary-encoded trie string back into its Uint16Array.
19
+ *
20
+ * Stream layout (consumed in this order):
21
+ * 1. dict1 atoms — `dict1AtomCount` uint16 values, delta+RLE encoded.
22
+ * 2. dict2 atoms — `atomCount - dict1AtomCount` values, delta+RLE.
23
+ * 3. dict2 ngrams — `ngramCount - (dictSize - dict1AtomCount)` entries,
24
+ * each a pair of slot codes that resolve to earlier slots.
25
+ * 4. dict1 ngrams — `dictSize - dict1AtomCount` entries, same shape.
26
+ * 5. data — slot codes, each expanding to one or more uint16 values.
27
+ *
28
+ * Codes use a 91-char base (printable ASCII minus `"`, `$`, `\`):
29
+ * - char1 < dictSize → 1-char code, slot = char1
30
+ * - char1 ≥ dictSize → 2-char code, slot = dictSize + (char1 - dictSize)*91 + char2
31
+ *
32
+ * Slot index → token kind:
33
+ * [0, A) dict1 atoms (1-char codes)
34
+ * [A, dictSize) dict1 ngrams (1-char codes)
35
+ * [dictSize, dictSize+D) dict2 atoms (2-char codes)
36
+ * [dictSize+D, end) dict2 ngrams (2-char codes)
37
+ *
38
+ * Both atom dicts decode before any ngram, and dict2 ngrams decode before
39
+ * dict1 ngrams. So every ngram entry references slots whose contents are
40
+ * already filled — no forward references to handle.
41
+ *
42
+ * This runs on library import. Flat typed arrays store each slot as either
43
+ * a plain value (`single`, covering every atom) or a range in a shared
44
+ * `pool` (ngrams).
45
+ * @param input Packed trie string.
46
+ * @param resultLength Expected number of uint16 values in the output.
47
+ * @param atomCount Total number of distinct uint16 values in the trie.
48
+ * @param dict1AtomCount Atoms in the 1-char range (`A` above).
49
+ * @param ngramCount Total number of ngram entries (dict1 + dict2).
50
+ * @param dictSize Number of 1-char code slots; the rest of `BASE - dictSize`
51
+ * first-byte values are 2-char codes.
52
+ */
53
+ export function decodeTrieDict(
54
+ input: string,
55
+ resultLength: number,
56
+ atomCount: number,
57
+ dict1AtomCount: number,
58
+ ngramCount: number,
59
+ dictSize: number,
60
+ ): Uint16Array {
61
+ const base = 91;
62
+ const inputLength = input.length;
63
+ // For 2-char codes, slot = char1 * base - twoCharBias + char2.
64
+ const twoCharBias = dictSize * (base - 1);
65
+
66
+ let pos = 0;
67
+
68
+ /** Read one slot code at `pos` and return its slot index, advancing pos. */
69
+ const readSlotCode = (): number => {
70
+ const c1 = BASE91_INVERSE[input.charCodeAt(pos++)];
71
+ return c1 < dictSize
72
+ ? c1
73
+ : c1 * base - twoCharBias + BASE91_INVERSE[input.charCodeAt(pos++)];
74
+ };
75
+
76
+ const dict2AtomCount = atomCount - dict1AtomCount;
77
+ const slotCount = atomCount + ngramCount;
78
+
79
+ /*
80
+ * Per-slot contents: atoms (always a single value) live directly in
81
+ * `single`; ngram slots hold -1 there and expand to
82
+ * `pool[start[slot] .. start[slot] + length[slot])`.
83
+ */
84
+ const single = new Int32Array(slotCount);
85
+ single.fill(-1, dict1AtomCount, dictSize);
86
+ single.fill(-1, dictSize + dict2AtomCount, slotCount);
87
+ const start = new Int32Array(slotCount);
88
+ const length = new Int32Array(slotCount);
89
+
90
+ /**
91
+ * Decode `count` ascending uint16 values from a delta+RLE stream into
92
+ * `single[off..off+count)`.
93
+ *
94
+ * code < 89 → delta = code
95
+ * code == 89 → run-length: next char encodes runLength-2; emit `runLength` consecutive +1 values
96
+ * code == 90, next < 90 → escape: delta = 89 + next * BASE + after-next
97
+ * code == 90, next == 90 → double-escape: extra char for very large deltas
98
+ * @param count
99
+ * @param off
100
+ */
101
+ function decodeDelta(count: number, off: number): void {
102
+ let previous = 0;
103
+ let slot = off;
104
+ const end = off + count;
105
+ while (slot < end) {
106
+ const code = BASE91_INVERSE[input.charCodeAt(pos++)];
107
+ if (code < 89) {
108
+ previous += code;
109
+ single[slot++] = previous;
110
+ } else if (code === 89) {
111
+ let runLength = BASE91_INVERSE[input.charCodeAt(pos++)] + 2;
112
+ while (runLength--) single[slot++] = ++previous;
113
+ } else {
114
+ const next = BASE91_INVERSE[input.charCodeAt(pos++)];
115
+ previous +=
116
+ 89 +
117
+ // eslint-disable-next-line unicorn/prefer-minimal-ternary -- branches read a different number of side-effecting input bytes
118
+ (next < 90
119
+ ? next * base + BASE91_INVERSE[input.charCodeAt(pos++)]
120
+ : BASE91_INVERSE[input.charCodeAt(pos++)] * 8281 +
121
+ BASE91_INVERSE[input.charCodeAt(pos++)] * base +
122
+ BASE91_INVERSE[input.charCodeAt(pos++)]);
123
+ single[slot++] = previous;
124
+ }
125
+ }
126
+ }
127
+
128
+ // Streams 1 & 2: atoms decoded into their slot ranges.
129
+ decodeDelta(dict1AtomCount, 0);
130
+ decodeDelta(dict2AtomCount, dictSize);
131
+
132
+ /*
133
+ * Streams 3 & 4 are read in two passes: first collect every ngram's two
134
+ * references and derive its expanded length (each ref resolves to an earlier
135
+ * slot, so lengths are already known), which sizes the shared pool.
136
+ * Pool ranges are handed out in decode order, so the second pass fills
137
+ * the pool contiguously with a single write cursor.
138
+ */
139
+ const references = new Int32Array(ngramCount * 2);
140
+ let poolSize = 0;
141
+ let ngramIndex = 0;
142
+
143
+ /**
144
+ * Read `count` ngram entries (each = 2 slot-code references) for the slots
145
+ * starting at `startSlot`, recording references and assigning pool ranges.
146
+ * @param count
147
+ * @param startSlot
148
+ */
149
+ function readNgramReferences(count: number, startSlot: number): void {
150
+ for (let index = 0; index < count; index++) {
151
+ const slot = startSlot + index;
152
+ const a = readSlotCode();
153
+ const b = readSlotCode();
154
+ references[ngramIndex * 2] = a;
155
+ references[ngramIndex * 2 + 1] = b;
156
+ ngramIndex += 1;
157
+ start[slot] = poolSize;
158
+ const entryLength =
159
+ (single[a] < 0 ? length[a] : 1) +
160
+ (single[b] < 0 ? length[b] : 1);
161
+ length[slot] = entryLength;
162
+ poolSize += entryLength;
163
+ }
164
+ }
165
+ readNgramReferences(
166
+ ngramCount - dictSize + dict1AtomCount,
167
+ dictSize + dict2AtomCount,
168
+ );
169
+ readNgramReferences(dictSize - dict1AtomCount, dict1AtomCount);
170
+
171
+ // Second pass: concatenate each ngram's two halves into the pool.
172
+ const pool = new Uint16Array(poolSize);
173
+ let write = 0;
174
+ for (let index = 0; index < ngramIndex; index++) {
175
+ for (let half = 0; half < 2; half++) {
176
+ const source = references[index * 2 + half];
177
+ const value = single[source];
178
+ if (value < 0) {
179
+ let read = start[source];
180
+ const readEnd = read + length[source];
181
+ while (read < readEnd) pool[write++] = pool[read++];
182
+ } else {
183
+ pool[write++] = value;
184
+ }
185
+ }
186
+ }
187
+
188
+ // Stream 5: data. Each code expands to its slot's stored values.
189
+ const out = new Uint16Array(resultLength);
190
+ let outIndex = 0;
191
+ while (pos < inputLength) {
192
+ let slot = BASE91_INVERSE[input.charCodeAt(pos++)];
193
+ if (slot >= dictSize) {
194
+ slot =
195
+ slot * base -
196
+ twoCharBias +
197
+ BASE91_INVERSE[input.charCodeAt(pos++)];
198
+ }
199
+ const value = single[slot];
200
+ if (value < 0) {
201
+ let read = start[slot];
202
+ const readEnd = read + length[slot];
203
+ while (read < readEnd) out[outIndex++] = pool[read++];
204
+ } else {
205
+ out[outIndex++] = value;
206
+ }
207
+ }
208
+ return out;
209
+ }
@@ -0,0 +1,257 @@
1
+ # htmlparser2
2
+
3
+ [![NPM version](https://img.shields.io/npm/v/htmlparser2.svg)](https://npmjs.org/package/htmlparser2)
4
+ [![Downloads](https://img.shields.io/npm/dm/htmlparser2.svg)](https://npmjs.org/package/htmlparser2)
5
+ [![Node.js CI](https://github.com/fb55/htmlparser2/actions/workflows/nodejs-test.yml/badge.svg)](https://github.com/fb55/htmlparser2/actions/workflows/nodejs-test.yml)
6
+ [![Coverage](https://img.shields.io/coveralls/fb55/htmlparser2.svg)](https://coveralls.io/r/fb55/htmlparser2)
7
+
8
+ The fast & forgiving HTML/XML parser.
9
+
10
+ _htmlparser2 is [the fastest HTML parser](#performance), and takes some shortcuts to get there. If you need strict HTML spec compliance, have a look at [parse5](https://github.com/inikulin/parse5)._
11
+
12
+ ## Installation
13
+
14
+ npm install htmlparser2
15
+
16
+ A live demo of `htmlparser2` is available [on AST Explorer](https://astexplorer.net/#/2AmVrGuGVJ).
17
+
18
+ ## Ecosystem
19
+
20
+ | Name | Description |
21
+ | ------------------------------------------------------------- | ------------------------------------------------------- |
22
+ | [htmlparser2](https://github.com/fb55/htmlparser2) | Fast & forgiving HTML/XML parser |
23
+ | [domhandler](https://github.com/fb55/domhandler) | Handler for htmlparser2 that turns documents into a DOM |
24
+ | [domutils](https://github.com/fb55/domutils) | Utilities for working with domhandler's DOM |
25
+ | [css-select](https://github.com/fb55/css-select) | CSS selector engine, compatible with domhandler's DOM |
26
+ | [cheerio](https://github.com/cheeriojs/cheerio) | The jQuery API for domhandler's DOM |
27
+ | [dom-serializer](https://github.com/cheeriojs/dom-serializer) | Serializer for domhandler's DOM |
28
+
29
+ ## Usage
30
+
31
+ `htmlparser2` itself provides a callback interface that allows consumption of documents with minimal allocations.
32
+ For a more ergonomic experience, read [Getting a DOM](#getting-a-dom) below.
33
+
34
+ ```js
35
+ import * as htmlparser2 from "htmlparser2";
36
+
37
+ const parser = new htmlparser2.Parser({
38
+ onopentag(name, attributes) {
39
+ /*
40
+ * This fires when a new tag is opened.
41
+ *
42
+ * If you don't need an aggregated `attributes` object,
43
+ * have a look at the `onopentagname` and `onattribute` events.
44
+ */
45
+ if (name === "script" && attributes.type === "text/javascript") {
46
+ console.log("JS! Hooray!");
47
+ }
48
+ },
49
+ ontext(text) {
50
+ /*
51
+ * Fires whenever a section of text was processed.
52
+ *
53
+ * Note that this can fire at any point within text and you might
54
+ * have to stitch together multiple pieces.
55
+ */
56
+ console.log("-->", text);
57
+ },
58
+ onclosetag(tagname) {
59
+ /*
60
+ * Fires when a tag is closed.
61
+ *
62
+ * You can rely on this event only firing when you have received an
63
+ * equivalent opening tag before. Closing tags without corresponding
64
+ * opening tags will be ignored.
65
+ */
66
+ if (tagname === "script") {
67
+ console.log("That's it?!");
68
+ }
69
+ },
70
+ });
71
+ parser.write(
72
+ "Xyz <script type='text/javascript'>const foo = '<<bar>>';</script>",
73
+ );
74
+ parser.end();
75
+ ```
76
+
77
+ Output (with multiple text events combined):
78
+
79
+ ```
80
+ --> Xyz
81
+ JS! Hooray!
82
+ --> const foo = '<<bar>>';
83
+ That's it?!
84
+ ```
85
+
86
+ ### Parser events
87
+
88
+ All callbacks are optional. The handler object you pass to `Parser` may implement any subset of these:
89
+
90
+ | Event | Description |
91
+ | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
92
+ | `onopentag(name, attribs, isImplied)` | Opening tag. `attribs` is an object mapping attribute names to values. `isImplied` is `true` when the tag was opened implicitly (HTML mode only). |
93
+ | `onopentagname(name)` | Emitted for the tag name as soon as it is available (before attributes are parsed). |
94
+ | `onattribute(name, value, quote)` | Attribute. `quote` is `"` / `'` / `null` (unquoted) / `undefined` (no value, e.g. `disabled`). |
95
+ | `onclosetag(name, isImplied)` | Closing tag. `isImplied` is `true` when the tag was closed implicitly (HTML mode only). |
96
+ | `ontext(data)` | Text content. May fire multiple times for a single text node. |
97
+ | `oncomment(data)` | Comment (content between `<!--` and `-->`). |
98
+ | `oncdatastart()` | Opening of a CDATA section (`<![CDATA[`). |
99
+ | `oncdataend()` | End of a CDATA section (`]]>`). |
100
+ | `onprocessinginstruction(name, data)` | Processing instruction (e.g. `<?xml ...?>`). |
101
+ | `oncommentend()` | Fires after a comment has ended. |
102
+ | `onparserinit(parser)` | Fires when the parser is initialized or reset. |
103
+ | `onreset()` | Fires when `parser.reset()` is called. |
104
+ | `onend()` | Fires when parsing is complete. |
105
+ | `onerror(error)` | Fires on error. |
106
+
107
+ ### Parser options
108
+
109
+ | Option | Type | Default | Description |
110
+ | ------------------------ | --------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
111
+ | `xmlMode` | `boolean` | `false` | Treat the document as XML. This affects entity decoding, self-closing tags, CDATA handling, and more. Set this to `true` for XML, RSS, Atom and RDF feeds. |
112
+ | `decodeEntities` | `boolean` | `true` | Decode HTML entities (e.g. `&amp;` -> `&`). |
113
+ | `lowerCaseTags` | `boolean` | `!xmlMode` | Lowercase tag names. |
114
+ | `lowerCaseAttributeNames`| `boolean` | `!xmlMode` | Lowercase attribute names. |
115
+ | `recognizeSelfClosing` | `boolean` | `xmlMode` | Recognize self-closing tags (e.g. `<br/>`). Always enabled in `xmlMode`. |
116
+ | `recognizeCDATA` | `boolean` | `xmlMode` | Recognize CDATA sections as text. Always enabled in `xmlMode`. |
117
+
118
+ ### Usage with streams
119
+
120
+ While the `Parser` interface closely resembles Node.js streams, it's not a 100% match.
121
+ Use the `WritableStream` interface to process a streaming input:
122
+
123
+ ```js
124
+ import { WritableStream } from "htmlparser2/WritableStream";
125
+
126
+ const parserStream = new WritableStream({
127
+ ontext(text) {
128
+ console.log("Streaming:", text);
129
+ },
130
+ });
131
+
132
+ const htmlStream = fs.createReadStream("./my-file.html");
133
+ htmlStream.pipe(parserStream).on("finish", () => console.log("done"));
134
+ ```
135
+
136
+ ## Getting a DOM
137
+
138
+ The `parseDocument` helper parses a string and returns a DOM tree (a [`Document`](https://github.com/fb55/domhandler) node).
139
+
140
+ ```js
141
+ import * as htmlparser2 from "htmlparser2";
142
+
143
+ const dom = htmlparser2.parseDocument(
144
+ `<ul id="fruits">
145
+ <li class="apple">Apple</li>
146
+ <li class="orange">Orange</li>
147
+ </ul>`,
148
+ );
149
+ ```
150
+
151
+ `parseDocument` accepts an optional second argument with both parser and [DOM handler options](https://github.com/fb55/domhandler):
152
+
153
+ ```js
154
+ const dom = htmlparser2.parseDocument(data, {
155
+ // Parser options
156
+ xmlMode: true,
157
+
158
+ // domhandler options
159
+ withStartIndices: true, // Add `startIndex` to each node
160
+ withEndIndices: true, // Add `endIndex` to each node
161
+ });
162
+ ```
163
+
164
+ ### Searching the DOM
165
+
166
+ The [`DomUtils`](https://github.com/fb55/domutils) module (re-exported on the main `htmlparser2` export) provides helpers for finding nodes:
167
+
168
+ ```js
169
+ import * as htmlparser2 from "htmlparser2";
170
+
171
+ const dom = htmlparser2.parseDocument(`<div><p id="greeting">Hello</p></div>`);
172
+
173
+ // Find elements by ID, tag name, or class
174
+ const greeting = htmlparser2.DomUtils.getElementById("greeting", dom);
175
+ const paragraphs = htmlparser2.DomUtils.getElementsByTagName("p", dom);
176
+
177
+ // Find elements with custom test functions
178
+ const all = htmlparser2.DomUtils.findAll(
179
+ (el) => el.attribs?.class === "active",
180
+ dom,
181
+ );
182
+
183
+ // Get text content
184
+ htmlparser2.DomUtils.textContent(greeting); // "Hello"
185
+ ```
186
+
187
+ For CSS selector queries, use [`css-select`](https://github.com/fb55/css-select):
188
+
189
+ ```js
190
+ import { selectAll, selectOne } from "css-select";
191
+
192
+ const results = selectAll("ul#fruits > li", dom);
193
+ const first = selectOne("li.apple", dom);
194
+ ```
195
+
196
+ Or, if you'd prefer a jQuery-like API, use [`cheerio`](https://github.com/cheeriojs/cheerio).
197
+
198
+ ### Modifying and serializing the DOM
199
+
200
+ Use `DomUtils` to modify the tree, and [`dom-serializer`](https://github.com/cheeriojs/dom-serializer) (also available as `DomUtils.getOuterHTML`) to serialize it back to HTML:
201
+
202
+ ```js
203
+ import * as htmlparser2 from "htmlparser2";
204
+
205
+ const dom = htmlparser2.parseDocument(
206
+ `<ul><li>Apple</li><li>Orange</li></ul>`,
207
+ );
208
+
209
+ // Remove the first <li>
210
+ const items = htmlparser2.DomUtils.getElementsByTagName("li", dom);
211
+ htmlparser2.DomUtils.removeElement(items[0]);
212
+
213
+ // Serialize back to HTML
214
+ const html = htmlparser2.DomUtils.getOuterHTML(dom);
215
+ // "<ul><li>Orange</li></ul>"
216
+ ```
217
+
218
+ Other manipulation helpers include `appendChild`, `prependChild`, `append`, `prepend`, and `replaceElement` -- see the [`domutils` docs](https://github.com/fb55/domutils) for the full API.
219
+
220
+ ## Parsing feeds
221
+
222
+ `htmlparser2` makes it easy to parse RSS, RDF and Atom feeds, by providing a `parseFeed` method:
223
+
224
+ ```javascript
225
+ const feed = htmlparser2.parseFeed(content);
226
+ ```
227
+
228
+ This returns an object with `type`, `title`, `link`, `description`, `updated`, `author`, and `items` (an array of feed entries), or `null` if the document isn't a recognized feed format.
229
+
230
+ The `xmlMode` option is enabled by default for `parseFeed`. If you pass custom options, make sure to include `xmlMode: true`.
231
+
232
+ ## Performance
233
+
234
+ After having some artificial benchmarks for some time, **@AndreasMadsen** published his [`htmlparser-benchmark`](https://github.com/AndreasMadsen/htmlparser-benchmark), which benchmarks HTML parses based on real-world websites.
235
+
236
+ At the time of writing, the latest versions of all supported parsers show the following performance characteristics on GitHub Actions (sourced from [here](https://github.com/AndreasMadsen/htmlparser-benchmark/blob/e78cd8fc6c2adac08deedd4f274c33537451186b/stats.txt)):
237
+
238
+ ```
239
+ htmlparser2 : 2.17215 ms/file ± 3.81587
240
+ node-html-parser : 2.35983 ms/file ± 1.54487
241
+ html5parser : 2.43468 ms/file ± 2.81501
242
+ neutron-html5parser: 2.61356 ms/file ± 1.70324
243
+ htmlparser2-dom : 3.09034 ms/file ± 4.77033
244
+ html-dom-parser : 3.56804 ms/file ± 5.15621
245
+ libxmljs : 4.07490 ms/file ± 2.99869
246
+ htmljs-parser : 6.15812 ms/file ± 7.52497
247
+ parse5 : 9.70406 ms/file ± 6.74872
248
+ htmlparser : 15.0596 ms/file ± 89.0826
249
+ html-parser : 28.6282 ms/file ± 22.6652
250
+ saxes : 45.7921 ms/file ± 128.691
251
+ html5 : 120.844 ms/file ± 153.944
252
+ ```
253
+
254
+ ## Security contact information
255
+
256
+ To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security).
257
+ Tidelift will coordinate the fix and disclosure.