@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
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Mixed-case SVG and MathML element names recognized in foreign content.
3
+ * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign
4
+ */
5
+ export const elementNames = new Map<string, string>(
6
+ "altGlyph altGlyphDef altGlyphItem animateColor animateMotion animateTransform clipPath feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence foreignObject glyphRef linearGradient radialGradient textPath"
7
+ .split(" ")
8
+ .map((name) => [name.toLowerCase(), name]),
9
+ );
10
+
11
+ /**
12
+ * Mixed-case SVG and MathML attribute names recognized in foreign content.
13
+ * @see https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign
14
+ */
15
+ export const attributeNames = new Map<string, string>(
16
+ "definitionURL attributeName attributeType baseFrequency baseProfile calcMode clipPathUnits diffuseConstant edgeMode filterUnits glyphRef gradientTransform gradientUnits kernelMatrix kernelUnitLength keyPoints keySplines keyTimes lengthAdjust limitingConeAngle markerHeight markerUnits markerWidth maskContentUnits maskUnits numOctaves pathLength patternContentUnits patternTransform patternUnits pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits refX refY repeatCount repeatDur requiredExtensions requiredFeatures specularConstant specularExponent spreadMethod startOffset stdDeviation stitchTiles surfaceScale systemLanguage tableValues targetX targetY textLength viewBox viewTarget xChannelSelector yChannelSelector zoomAndPan"
17
+ .split(" ")
18
+ .map((name) => [name.toLowerCase(), name]),
19
+ );
@@ -0,0 +1,315 @@
1
+ import * as ElementType from "domelementtype";
2
+ import type {
3
+ AnyNode,
4
+ CDATA,
5
+ Comment,
6
+ Element,
7
+ ProcessingInstruction,
8
+ Text,
9
+ } from "domhandler";
10
+ import { encodeXML, escapeAttribute, escapeText } from "entities";
11
+ import { attributeNames, elementNames } from "./foreign-names.js";
12
+
13
+ /**
14
+ * Options for DOM serialization.
15
+ */
16
+ export interface DomSerializerOptions {
17
+ /**
18
+ * Print an empty attribute's value.
19
+ * @default xmlMode
20
+ * @example With <code>emptyAttrs: false</code>: <code>&lt;input checked&gt;</code>
21
+ * @example With <code>emptyAttrs: true</code>: <code>&lt;input checked=""&gt;</code>
22
+ */
23
+ emptyAttrs?: boolean;
24
+ /**
25
+ * Print self-closing tags for tags without contents. If `xmlMode` is set,
26
+ * this will apply to all tags. Otherwise, only tags that are defined as
27
+ * self-closing in the HTML specification will be printed as such.
28
+ * @default xmlMode
29
+ * @example With <code>selfClosingTags: false</code>: <code>&lt;foo&gt;&lt;/foo&gt;&lt;br&gt;&lt;/br&gt;</code>
30
+ * @example With <code>xmlMode: true</code> and <code>selfClosingTags: true</code>: <code>&lt;foo/&gt;&lt;br/&gt;</code>
31
+ * @example With <code>xmlMode: false</code> and <code>selfClosingTags: true</code>: <code>&lt;foo&gt;&lt;/foo&gt;&lt;br /&gt;</code>
32
+ */
33
+ selfClosingTags?: boolean;
34
+ /**
35
+ * Treat the input as an XML document; enables the `emptyAttrs` and
36
+ * `selfClosingTags` options.
37
+ *
38
+ * If the value is `"foreign"`, it will try to correct mixed-case attribute
39
+ * names.
40
+ * @default false
41
+ */
42
+ xmlMode?: boolean | "foreign";
43
+ /**
44
+ * Encode characters reserved in HTML or XML in text and attribute values.
45
+ *
46
+ * If `xmlMode` is set or the value is not `'utf8'`, characters outside the
47
+ * ASCII range will also be encoded as numeric entities.
48
+ *
49
+ * **Security:** Setting this to `false` disables encoding of `<`, `>`, `&`,
50
+ * and (in attribute values) `'` — only `"` in attribute values is escaped.
51
+ * This is safe for the round-trip case (DOM was parsed with
52
+ * `decodeEntities: false`, so any markup characters in text or attribute
53
+ * values exist only as entity references), and unsafe otherwise. If text
54
+ * or attribute values in the DOM contain raw `<`, `>`, or `&`, those
55
+ * characters will appear literally in the output.
56
+ * @default `decodeEntities`
57
+ */
58
+ encodeEntities?: boolean | "utf8";
59
+ /**
60
+ * Default for `encodeEntities`. Named to match the parser option of the
61
+ * same name so a single options object can be threaded through parse and
62
+ * serialize for a faithful round-trip — for example, cheerio parses with
63
+ * `decodeEntities: false` to preserve entity references and passes the
64
+ * same option here so they are not re-encoded.
65
+ *
66
+ * Despite the name, on the serializer this option controls *encoding*.
67
+ * Setting it to `false` carries the same caveat as `encodeEntities: false`
68
+ * — see that option.
69
+ * @default true
70
+ */
71
+ decodeEntities?: boolean;
72
+ }
73
+
74
+ // ── Constants ────────────────────────────────────────────────────────
75
+
76
+ /** Elements whose text content is never entity-encoded. */
77
+ const unencodedElements = new Set(
78
+ "style script xmp iframe noembed noframes plaintext noscript".split(" "),
79
+ );
80
+
81
+ /** HTML void elements — they cannot have children. */
82
+ const voidElements = new Set(
83
+ "area base basefont br col command embed frame hr img input isindex keygen link meta param source track wbr".split(
84
+ " ",
85
+ ),
86
+ );
87
+
88
+ /** Elements that switch the parser into foreign (XML-like) mode. */
89
+ const foreignElements = new Set(["svg", "math"]);
90
+
91
+ /**
92
+ * Foreign-mode integration points: children of these elements are parsed
93
+ * as HTML again, not as foreign content.
94
+ */
95
+ const foreignModeIntegrationPoints = new Set(
96
+ "mi mo mn ms mtext annotation-xml foreignObject desc title".split(" "),
97
+ );
98
+
99
+ // ── Public API ───────────────────────────────────────────────────────
100
+
101
+ /**
102
+ * Renders a DOM node or an array of DOM nodes to a string.
103
+ *
104
+ * Can be thought of as the equivalent of the `outerHTML` of the passed
105
+ * node(s).
106
+ * @param node Node to be rendered.
107
+ * @param options Changes serialization behavior
108
+ */
109
+ export function render(
110
+ node: AnyNode | ArrayLike<AnyNode>,
111
+ options: DomSerializerOptions = {},
112
+ ): string {
113
+ const nodes = "length" in node ? node : [node];
114
+
115
+ /*
116
+ * `xmlMode` is threaded as a separate argument through the internal
117
+ * functions so that foreign-mode transitions (svg/mathml ↔ html) can
118
+ * adjust it without copying the options object on every element.
119
+ */
120
+ const xmlMode = options.xmlMode ?? false;
121
+
122
+ let output = "";
123
+ // eslint-disable-next-line unicorn/no-for-loop
124
+ for (let index = 0; index < nodes.length; index++) {
125
+ output += renderNode(nodes[index], options, xmlMode);
126
+ }
127
+
128
+ return output;
129
+ }
130
+
131
+ export default render;
132
+
133
+ // ── Internal rendering ───────────────────────────────────────────────
134
+
135
+ /**
136
+ * Render an array of child nodes (skips the single-node wrapping in `render`).
137
+ * @param children The child nodes to render.
138
+ * @param options The serialization options.
139
+ * @param xmlMode The XML mode to use.
140
+ */
141
+ function renderChildren(
142
+ children: ArrayLike<AnyNode>,
143
+ options: DomSerializerOptions,
144
+ xmlMode: boolean | "foreign",
145
+ ): string {
146
+ let output = "";
147
+ // eslint-disable-next-line unicorn/no-for-loop
148
+ for (let index = 0; index < children.length; index++) {
149
+ output += renderNode(children[index], options, xmlMode);
150
+ }
151
+ return output;
152
+ }
153
+
154
+ function renderNode(
155
+ node: AnyNode,
156
+ options: DomSerializerOptions,
157
+ xmlMode: boolean | "foreign",
158
+ ): string {
159
+ switch (node.type) {
160
+ case ElementType.Root: {
161
+ return renderChildren(node.children, options, xmlMode);
162
+ }
163
+
164
+ case ElementType.Directive: {
165
+ return `<${(node as ProcessingInstruction).data}>`;
166
+ }
167
+
168
+ case ElementType.Comment: {
169
+ return `<!--${(node as Comment).data}-->`;
170
+ }
171
+
172
+ case ElementType.CDATA: {
173
+ return `<![CDATA[${((node as CDATA).children[0] as Text).data}]]>`;
174
+ }
175
+
176
+ case ElementType.Script:
177
+ case ElementType.Style:
178
+ case ElementType.Tag: {
179
+ return renderTag(node as Element, options, xmlMode);
180
+ }
181
+
182
+ case ElementType.Text: {
183
+ const element = node as Text;
184
+ const data = element.data || "";
185
+
186
+ /*
187
+ * Skip encoding when entities weren't decoded on input, or when
188
+ * inside a raw-text element (script, style, etc.) in HTML mode.
189
+ */
190
+ if (
191
+ (options.encodeEntities ?? options.decodeEntities) !== false &&
192
+ !(
193
+ !xmlMode &&
194
+ element.parent &&
195
+ unencodedElements.has((element.parent as Element).name)
196
+ )
197
+ ) {
198
+ // `xmlMode: "foreign"` is truthy
199
+ return xmlMode || options.encodeEntities !== "utf8"
200
+ ? encodeXML(data)
201
+ : escapeText(data);
202
+ }
203
+
204
+ return data;
205
+ }
206
+ }
207
+ }
208
+
209
+ function renderTag(
210
+ element: Element,
211
+ options: DomSerializerOptions,
212
+ xmlMode: boolean | "foreign",
213
+ ) {
214
+ if (xmlMode === "foreign") {
215
+ // Correct lowercase element names back to their canonical mixed-case form
216
+ element.name = elementNames.get(element.name) ?? element.name;
217
+
218
+ // Integration points exit foreign mode: their children are HTML
219
+ if (
220
+ element.parent &&
221
+ foreignModeIntegrationPoints.has((element.parent as Element).name)
222
+ ) {
223
+ xmlMode = false;
224
+ }
225
+ }
226
+
227
+ if (!xmlMode && foreignElements.has(element.name)) {
228
+ xmlMode = "foreign";
229
+ }
230
+
231
+ const { name, children } = element;
232
+
233
+ // Cache the void-element check — used for both self-closing and closing-tag logic
234
+ const isVoid = !xmlMode && voidElements.has(name);
235
+
236
+ let tag = `<${name}${formatAttributes(element.attribs, options, xmlMode)}`;
237
+
238
+ if (
239
+ children.length === 0 &&
240
+ (xmlMode
241
+ ? options.selfClosingTags !== false
242
+ : options.selfClosingTags && isVoid)
243
+ ) {
244
+ // XML: `<br/>`, HTML: `<br />`
245
+ tag += xmlMode ? "/>" : " />";
246
+ } else {
247
+ tag += ">";
248
+
249
+ if (children.length > 0) {
250
+ tag += renderChildren(children, options, xmlMode);
251
+ }
252
+
253
+ if (!isVoid) {
254
+ tag += `</${name}>`;
255
+ }
256
+ }
257
+
258
+ return tag;
259
+ }
260
+
261
+ // ── Attribute formatting ─────────────────────────────────────────────
262
+
263
+ function replaceQuotes(value: string): string {
264
+ return value.replaceAll('"', "&quot;");
265
+ }
266
+
267
+ /**
268
+ * Serialize an element's attribute map to a string.
269
+ *
270
+ * Returns a string with a leading space before each attribute, or an
271
+ * empty string if there are no attributes. This convention lets the
272
+ * caller unconditionally concatenate the result onto the tag name.
273
+ * @param attributes
274
+ * @param options
275
+ * @param xmlMode
276
+ */
277
+ function formatAttributes(
278
+ attributes: Record<string, unknown> | undefined,
279
+ options: DomSerializerOptions,
280
+ xmlMode: boolean | "foreign",
281
+ ) {
282
+ if (!attributes) return "";
283
+
284
+ /*
285
+ * Pick the right encoder:
286
+ * - Encoding disabled → only escape double-quotes (for valid attributes)
287
+ * - XML / non-utf8 → full numeric entity encoding (encodeXML)
288
+ * - HTML + utf8 → minimal escaping (escapeAttribute)
289
+ */
290
+ const encode =
291
+ (options.encodeEntities ?? options.decodeEntities) === false
292
+ ? replaceQuotes
293
+ : xmlMode || options.encodeEntities !== "utf8"
294
+ ? encodeXML
295
+ : escapeAttribute;
296
+
297
+ const isForeign = xmlMode === "foreign";
298
+ const showEmpty = !!(options.emptyAttrs ?? xmlMode);
299
+
300
+ let result = "";
301
+
302
+ for (const key in attributes) {
303
+ if (!Object.hasOwn(attributes, key)) continue;
304
+
305
+ const value = attributes[key];
306
+ const k = isForeign ? (attributeNames.get(key) ?? key) : key;
307
+
308
+ result +=
309
+ !showEmpty && (value == null || value === "")
310
+ ? ` ${k}`
311
+ : ` ${k}="${encode(value == null ? "" : String(value))}"`;
312
+ }
313
+
314
+ return result;
315
+ }
@@ -21,28 +21,28 @@ export declare enum ElementType {
21
21
  }
22
22
  /**
23
23
  * Tests whether an element is a tag or not.
24
- *
25
- * @param elem Element to test
24
+ * @param element Element to test
25
+ * @param element.type Node type discriminator to check.
26
26
  */
27
- export declare function isTag(elem: {
27
+ export declare function isTag(element: {
28
28
  type: ElementType;
29
29
  }): boolean;
30
30
  /** Type for the root element of a document */
31
- export declare const Root = ElementType.Root;
31
+ export declare const Root: ElementType.Root;
32
32
  /** Type for Text */
33
- export declare const Text = ElementType.Text;
33
+ export declare const Text: ElementType.Text;
34
34
  /** Type for <? ... ?> */
35
- export declare const Directive = ElementType.Directive;
35
+ export declare const Directive: ElementType.Directive;
36
36
  /** Type for <!-- ... --> */
37
- export declare const Comment = ElementType.Comment;
37
+ export declare const Comment: ElementType.Comment;
38
38
  /** Type for <script> tags */
39
- export declare const Script = ElementType.Script;
39
+ export declare const Script: ElementType.Script;
40
40
  /** Type for <style> tags */
41
- export declare const Style = ElementType.Style;
41
+ export declare const Style: ElementType.Style;
42
42
  /** Type for Any tag */
43
- export declare const Tag = ElementType.Tag;
43
+ export declare const Tag: ElementType.Tag;
44
44
  /** Type for <![CDATA[ ... ]]> */
45
- export declare const CDATA = ElementType.CDATA;
45
+ export declare const CDATA: ElementType.CDATA;
46
46
  /** Type for <!doctype ...> */
47
- export declare const Doctype = ElementType.Doctype;
47
+ export declare const Doctype: ElementType.Doctype;
48
48
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,oBAAY,WAAW;IACnB,8CAA8C;IAC9C,IAAI,SAAS;IACb,oBAAoB;IACpB,IAAI,SAAS;IACb,yBAAyB;IACzB,SAAS,cAAc;IACvB,4BAA4B;IAC5B,OAAO,YAAY;IACnB,6BAA6B;IAC7B,MAAM,WAAW;IACjB,4BAA4B;IAC5B,KAAK,UAAU;IACf,uBAAuB;IACvB,GAAG,QAAQ;IACX,iCAAiC;IACjC,KAAK,UAAU;IACf,8BAA8B;IAC9B,OAAO,YAAY;CACtB;AAED;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,OAAO,EAAE;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,GAAG,OAAO,CAM7D;AAGD,8CAA8C;AAE9C,eAAO,MAAM,IAAI,EAAE,WAAW,CAAC,IAAuB,CAAC;AACvD,oBAAoB;AAEpB,eAAO,MAAM,IAAI,EAAE,WAAW,CAAC,IAAuB,CAAC;AACvD,yBAAyB;AAEzB,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,SAAiC,CAAC;AACtE,4BAA4B;AAE5B,eAAO,MAAM,OAAO,EAAE,WAAW,CAAC,OAA6B,CAAC;AAChE,6BAA6B;AAE7B,eAAO,MAAM,MAAM,EAAE,WAAW,CAAC,MAA2B,CAAC;AAC7D,4BAA4B;AAE5B,eAAO,MAAM,KAAK,EAAE,WAAW,CAAC,KAAyB,CAAC;AAC1D,uBAAuB;AAEvB,eAAO,MAAM,GAAG,EAAE,WAAW,CAAC,GAAqB,CAAC;AACpD,iCAAiC;AAEjC,eAAO,MAAM,KAAK,EAAE,WAAW,CAAC,KAAyB,CAAC;AAC1D,8BAA8B;AAE9B,eAAO,MAAM,OAAO,EAAE,WAAW,CAAC,OAA6B,CAAC"}
@@ -22,30 +22,39 @@ export var ElementType;
22
22
  })(ElementType || (ElementType = {}));
23
23
  /**
24
24
  * Tests whether an element is a tag or not.
25
- *
26
- * @param elem Element to test
25
+ * @param element Element to test
26
+ * @param element.type Node type discriminator to check.
27
27
  */
28
- export function isTag(elem) {
29
- return (elem.type === ElementType.Tag ||
30
- elem.type === ElementType.Script ||
31
- elem.type === ElementType.Style);
28
+ export function isTag(element) {
29
+ return (element.type === ElementType.Tag ||
30
+ element.type === ElementType.Script ||
31
+ element.type === ElementType.Style);
32
32
  }
33
33
  // Exports for backwards compatibility
34
34
  /** Type for the root element of a document */
35
+ // eslint-disable-next-line prefer-destructuring
35
36
  export const Root = ElementType.Root;
36
37
  /** Type for Text */
38
+ // eslint-disable-next-line prefer-destructuring
37
39
  export const Text = ElementType.Text;
38
40
  /** Type for <? ... ?> */
41
+ // eslint-disable-next-line prefer-destructuring
39
42
  export const Directive = ElementType.Directive;
40
43
  /** Type for <!-- ... --> */
44
+ // eslint-disable-next-line prefer-destructuring
41
45
  export const Comment = ElementType.Comment;
42
46
  /** Type for <script> tags */
47
+ // eslint-disable-next-line prefer-destructuring
43
48
  export const Script = ElementType.Script;
44
49
  /** Type for <style> tags */
50
+ // eslint-disable-next-line prefer-destructuring
45
51
  export const Style = ElementType.Style;
46
52
  /** Type for Any tag */
53
+ // eslint-disable-next-line prefer-destructuring
47
54
  export const Tag = ElementType.Tag;
48
55
  /** Type for <![CDATA[ ... ]]> */
56
+ // eslint-disable-next-line prefer-destructuring
49
57
  export const CDATA = ElementType.CDATA;
50
58
  /** Type for <!doctype ...> */
59
+ // eslint-disable-next-line prefer-destructuring
51
60
  export const Doctype = ElementType.Doctype;
@@ -0,0 +1,59 @@
1
+ {
2
+ "type": "module",
3
+ "name": "domelementtype",
4
+ "version": "3.0.0",
5
+ "description": "all the types of nodes in htmlparser2's dom",
6
+ "author": "Felix Boehm <me@feedic.com>",
7
+ "license": "BSD-2-Clause",
8
+ "funding": [
9
+ {
10
+ "type": "github",
11
+ "url": "https://github.com/sponsors/fb55"
12
+ }
13
+ ],
14
+ "sideEffects": false,
15
+ "main": "dist/index.js",
16
+ "types": "dist/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "default": "./dist/index.js"
21
+ }
22
+ },
23
+ "files": [
24
+ "dist/**/*"
25
+ ],
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git://github.com/fb55/domelementtype.git"
29
+ },
30
+ "keywords": [
31
+ "dom",
32
+ "element",
33
+ "types",
34
+ "htmlparser2"
35
+ ],
36
+ "engines": {
37
+ "node": ">=20.19.0"
38
+ },
39
+ "scripts": {
40
+ "build": "tsc",
41
+ "format": "npm run format:es && npm run format:biome",
42
+ "format:biome": "biome check --write .",
43
+ "format:es": "npm run lint:es -- --fix",
44
+ "lint": "npm run lint:es && npm run lint:biome",
45
+ "lint:biome": "biome check .",
46
+ "lint:es": "eslint .",
47
+ "prepare": "npm run build",
48
+ "test": "npm run lint"
49
+ },
50
+ "devDependencies": {
51
+ "@biomejs/biome": "^2.4.4",
52
+ "@eslint/compat": "^2.0.2",
53
+ "@feedic/eslint-config": "^0.2.3",
54
+ "eslint": "^10.0.1",
55
+ "eslint-config-biome": "^2.1.3",
56
+ "typescript": "^5.7.2",
57
+ "typescript-eslint": "^8.56.0"
58
+ }
59
+ }
@@ -1,11 +1,13 @@
1
- import { ChildNode, Element, DataNode, Document, ParentNode } from "./node.js";
1
+ import { type ChildNode, type DataNode, Document, Element, type ParentNode } from "./node.js";
2
2
  export * from "./node.js";
3
+ /**
4
+ * Configuration options for `DomHandler`.
5
+ */
3
6
  export interface DomHandlerOptions {
4
7
  /**
5
8
  * Add a `startIndex` property to nodes.
6
9
  * When the parser is used in a non-streaming fashion, `startIndex` is an integer
7
10
  * indicating the position of the start of the node in the document.
8
- *
9
11
  * @default false
10
12
  */
11
13
  withStartIndices?: boolean;
@@ -13,13 +15,11 @@ export interface DomHandlerOptions {
13
15
  * Add an `endIndex` property to nodes.
14
16
  * When the parser is used in a non-streaming fashion, `endIndex` is an integer
15
17
  * indicating the position of the end of the node in the document.
16
- *
17
18
  * @default false
18
19
  */
19
20
  withEndIndices?: boolean;
20
21
  /**
21
22
  * Treat the markup as XML.
22
- *
23
23
  * @default false
24
24
  */
25
25
  xmlMode?: boolean;
@@ -28,8 +28,11 @@ interface ParserInterface {
28
28
  startIndex: number | null;
29
29
  endIndex: number | null;
30
30
  }
31
- declare type Callback = (error: Error | null, dom: ChildNode[]) => void;
32
- declare type ElementCallback = (element: Element) => void;
31
+ type Callback = (error: Error | null, dom: ChildNode[]) => void;
32
+ type ElementCallback = (element: Element) => void;
33
+ /**
34
+ * Event-based handler that builds a DOM tree from parser callbacks.
35
+ */
33
36
  export declare class DomHandler {
34
37
  /** The elements of the DOM */
35
38
  dom: ChildNode[];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,KAAK,SAAS,EAEd,KAAK,QAAQ,EACb,QAAQ,EACR,OAAO,EACP,KAAK,UAAU,EAGlB,MAAM,WAAW,CAAC;AAEnB,cAAc,WAAW,CAAC;AAE1B;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AASD,UAAU,eAAe;IACrB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,KAAK,QAAQ,GAAG,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;AAChE,KAAK,eAAe,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;AAElD;;GAEG;AACH,qBAAa,UAAU;IACnB,8BAA8B;IAC9B,GAAG,EAAE,SAAS,EAAE,CAAM;IAEtB,mCAAmC;IACnC,IAAI,EAAE,QAAQ,CAA0B;IAExC,yCAAyC;IACzC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkB;IAE3C,gCAAgC;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;IAE5C,yCAAyC;IACzC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyB;IAEnD,oDAAoD;IACpD,OAAO,CAAC,IAAI,CAAS;IAErB,0BAA0B;IAC1B,SAAS,CAAC,QAAQ,EAAE,UAAU,EAAE,CAAe;IAE/C,kDAAkD;IAClD,SAAS,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAQ;IAE3C,uEAAuE;IACvE,OAAO,CAAC,MAAM,CAAgC;IAE9C;;;;OAIG;gBAEC,QAAQ,CAAC,EAAE,QAAQ,GAAG,IAAI,EAC1B,OAAO,CAAC,EAAE,iBAAiB,GAAG,IAAI,EAClC,SAAS,CAAC,EAAE,eAAe;IAiB/B,YAAY,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI;IAK3C,OAAO,IAAI,IAAI;IAUf,KAAK,IAAI,IAAI;IAOb,OAAO,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAI3B,UAAU,IAAI,IAAI;IAYlB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,IAAI;IAOjE,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAe1B,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAW7B,YAAY,IAAI,IAAI;IAIpB,YAAY,IAAI,IAAI;IAUpB,UAAU,IAAI,IAAI;IAIlB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAKzD,SAAS,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI;IAQnD,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI;CAwB3C;AAED,eAAe,UAAU,CAAC"}
@@ -1,43 +1,52 @@
1
1
  import { ElementType } from "domelementtype";
2
- import { Element, Text, Comment, CDATA, Document, ProcessingInstruction, } from "./node.js";
2
+ import { CDATA, Comment, Document, Element, ProcessingInstruction, Text, } from "./node.js";
3
3
  export * from "./node.js";
4
4
  // Default options
5
- const defaultOpts = {
5
+ const defaultOptions = {
6
6
  withStartIndices: false,
7
7
  withEndIndices: false,
8
8
  xmlMode: false,
9
9
  };
10
+ /**
11
+ * Event-based handler that builds a DOM tree from parser callbacks.
12
+ */
10
13
  export class DomHandler {
14
+ /** The elements of the DOM */
15
+ dom = [];
16
+ /** The root element for the DOM */
17
+ root = new Document(this.dom);
18
+ /** Called once parsing has completed. */
19
+ callback;
20
+ /** Settings for the handler. */
21
+ options;
22
+ /** Callback whenever a tag is closed. */
23
+ elementCB;
24
+ /** Indicated whether parsing has been completed. */
25
+ done = false;
26
+ /** Stack of open tags. */
27
+ tagStack = [this.root];
28
+ /** A data node that is still being written to. */
29
+ lastNode = null;
30
+ /** Reference to the parser instance. Used for location information. */
31
+ parser = null;
11
32
  /**
12
33
  * @param callback Called once parsing has completed.
13
34
  * @param options Settings for the handler.
14
35
  * @param elementCB Callback whenever a tag is closed.
15
36
  */
16
37
  constructor(callback, options, elementCB) {
17
- /** The elements of the DOM */
18
- this.dom = [];
19
- /** The root element for the DOM */
20
- this.root = new Document(this.dom);
21
- /** Indicated whether parsing has been completed. */
22
- this.done = false;
23
- /** Stack of open tags. */
24
- this.tagStack = [this.root];
25
- /** A data node that is still being written to. */
26
- this.lastNode = null;
27
- /** Reference to the parser instance. Used for location information. */
28
- this.parser = null;
29
38
  // Make it possible to skip arguments, for backwards-compatibility
30
39
  if (typeof options === "function") {
31
40
  elementCB = options;
32
- options = defaultOpts;
41
+ options = defaultOptions;
33
42
  }
34
43
  if (typeof callback === "object") {
35
44
  options = callback;
36
45
  callback = undefined;
37
46
  }
38
- this.callback = callback !== null && callback !== void 0 ? callback : null;
39
- this.options = options !== null && options !== void 0 ? options : defaultOpts;
40
- this.elementCB = elementCB !== null && elementCB !== void 0 ? elementCB : null;
47
+ this.callback = callback ?? null;
48
+ this.options = options ?? defaultOptions;
49
+ this.elementCB = elementCB ?? null;
41
50
  }
42
51
  onparserinit(parser) {
43
52
  this.parser = parser;
@@ -64,12 +73,12 @@ export class DomHandler {
64
73
  }
65
74
  onclosetag() {
66
75
  this.lastNode = null;
67
- const elem = this.tagStack.pop();
68
- if (this.options.withEndIndices) {
69
- elem.endIndex = this.parser.endIndex;
76
+ const element = this.tagStack.pop();
77
+ if (this.options.withEndIndices && this.parser) {
78
+ element.endIndex = this.parser.endIndex;
70
79
  }
71
80
  if (this.elementCB)
72
- this.elementCB(elem);
81
+ this.elementCB(element);
73
82
  }
74
83
  onopentag(name, attribs) {
75
84
  const type = this.options.xmlMode ? ElementType.Tag : undefined;
@@ -81,7 +90,7 @@ export class DomHandler {
81
90
  const { lastNode } = this;
82
91
  if (lastNode && lastNode.type === ElementType.Text) {
83
92
  lastNode.data += data;
84
- if (this.options.withEndIndices) {
93
+ if (this.options.withEndIndices && this.parser) {
85
94
  lastNode.endIndex = this.parser.endIndex;
86
95
  }
87
96
  }
@@ -128,10 +137,10 @@ export class DomHandler {
128
137
  addNode(node) {
129
138
  const parent = this.tagStack[this.tagStack.length - 1];
130
139
  const previousSibling = parent.children[parent.children.length - 1];
131
- if (this.options.withStartIndices) {
140
+ if (this.options.withStartIndices && this.parser) {
132
141
  node.startIndex = this.parser.startIndex;
133
142
  }
134
- if (this.options.withEndIndices) {
143
+ if (this.options.withEndIndices && this.parser) {
135
144
  node.endIndex = this.parser.endIndex;
136
145
  }
137
146
  parent.children.push(node);