@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.
- package/lib/daemon/DaemonClient.d.ts.map +1 -1
- package/lib/daemon/DaemonClient.js +3 -0
- package/lib/daemon/DaemonClient.js.map +1 -1
- package/lib/zosfiles/-strings-/en.d.ts +2 -0
- package/lib/zosfiles/-strings-/en.d.ts.map +1 -1
- package/lib/zosfiles/-strings-/en.js +5 -1
- package/lib/zosfiles/-strings-/en.js.map +1 -1
- package/lib/zosfiles/ZosFiles.options.d.ts.map +1 -1
- package/lib/zosfiles/ZosFiles.options.js +3 -1
- package/lib/zosfiles/ZosFiles.options.js.map +1 -1
- package/lib/zosfiles/create/Create.utils.d.ts.map +1 -1
- package/lib/zosfiles/create/Create.utils.js +3 -1
- package/lib/zosfiles/create/Create.utils.js.map +1 -1
- package/lib/zosfiles/create/ussDir/ussDir.handler.d.ts.map +1 -1
- package/lib/zosfiles/create/ussDir/ussDir.handler.js +5 -1
- package/lib/zosfiles/create/ussDir/ussDir.handler.js.map +1 -1
- package/lib/zosfiles/create/ussFile/ussFile.handler.d.ts.map +1 -1
- package/lib/zosfiles/create/ussFile/ussFile.handler.js +5 -1
- package/lib/zosfiles/create/ussFile/ussFile.handler.js.map +1 -1
- package/lib/zosfiles/create/vsam/vsam.handler.d.ts.map +1 -1
- package/lib/zosfiles/create/vsam/vsam.handler.js +3 -1
- package/lib/zosfiles/create/vsam/vsam.handler.js.map +1 -1
- package/lib/zosfiles/create/zfs/zfs.handler.d.ts.map +1 -1
- package/lib/zosfiles/create/zfs/zfs.handler.js +3 -1
- package/lib/zosfiles/create/zfs/zfs.handler.js.map +1 -1
- package/lib/zosfiles/delete/ds/Ds.handler.d.ts.map +1 -1
- package/lib/zosfiles/delete/ds/Ds.handler.js +4 -1
- package/lib/zosfiles/delete/ds/Ds.handler.js.map +1 -1
- package/lib/zosfiles/delete/uss/Uss.handler.d.ts.map +1 -1
- package/lib/zosfiles/delete/uss/Uss.handler.js +5 -1
- package/lib/zosfiles/delete/uss/Uss.handler.js.map +1 -1
- package/lib/zosfiles/delete/vsam/Vsam.handler.d.ts.map +1 -1
- package/lib/zosfiles/delete/vsam/Vsam.handler.js +3 -1
- package/lib/zosfiles/delete/vsam/Vsam.handler.js.map +1 -1
- package/lib/zosfiles/delete/zfs/zfs.handler.d.ts.map +1 -1
- package/lib/zosfiles/delete/zfs/zfs.handler.js +3 -1
- package/lib/zosfiles/delete/zfs/zfs.handler.js.map +1 -1
- package/lib/zosfiles/download/am/AllMembers.handler.d.ts.map +1 -1
- package/lib/zosfiles/download/am/AllMembers.handler.js +3 -1
- package/lib/zosfiles/download/am/AllMembers.handler.js.map +1 -1
- package/lib/zosfiles/download/amm/AllMembersMatching.handler.d.ts.map +1 -1
- package/lib/zosfiles/download/amm/AllMembersMatching.handler.js +2 -0
- package/lib/zosfiles/download/amm/AllMembersMatching.handler.js.map +1 -1
- package/lib/zosfiles/download/ds/Dataset.handler.d.ts.map +1 -1
- package/lib/zosfiles/download/ds/Dataset.handler.js +3 -1
- package/lib/zosfiles/download/ds/Dataset.handler.js.map +1 -1
- package/lib/zosfiles/download/dsm/DataSetMatching.handler.d.ts.map +1 -1
- package/lib/zosfiles/download/dsm/DataSetMatching.handler.js +6 -2
- package/lib/zosfiles/download/dsm/DataSetMatching.handler.js.map +1 -1
- package/lib/zosfiles/download/uss/UssFile.handler.d.ts.map +1 -1
- package/lib/zosfiles/download/uss/UssFile.handler.js +2 -0
- package/lib/zosfiles/download/uss/UssFile.handler.js.map +1 -1
- package/lib/zosfiles/download/ussdir/UssDir.handler.d.ts.map +1 -1
- package/lib/zosfiles/download/ussdir/UssDir.handler.js +6 -2
- package/lib/zosfiles/download/ussdir/UssDir.handler.js.map +1 -1
- package/lib/zosfiles/edit/Edit.utils.d.ts +2 -2
- package/lib/zosfiles/edit/Edit.utils.d.ts.map +1 -1
- package/lib/zosfiles/edit/Edit.utils.js +10 -10
- package/lib/zosfiles/edit/Edit.utils.js.map +1 -1
- package/lib/zosfiles/invoke/amsFile/AmsFile.handler.d.ts.map +1 -1
- package/lib/zosfiles/invoke/amsFile/AmsFile.handler.js +5 -1
- package/lib/zosfiles/invoke/amsFile/AmsFile.handler.js.map +1 -1
- package/lib/zosfiles/invoke/amsStatements/AmsStatements.handler.d.ts.map +1 -1
- package/lib/zosfiles/invoke/amsStatements/AmsStatements.handler.js +5 -1
- package/lib/zosfiles/invoke/amsStatements/AmsStatements.handler.js.map +1 -1
- package/lib/zosfiles/list/alias/Alias.handler.d.ts.map +1 -1
- package/lib/zosfiles/list/alias/Alias.handler.js +3 -1
- package/lib/zosfiles/list/alias/Alias.handler.js.map +1 -1
- package/lib/zosfiles/list/am/AllMembers.handler.d.ts.map +1 -1
- package/lib/zosfiles/list/am/AllMembers.handler.js +3 -1
- package/lib/zosfiles/list/am/AllMembers.handler.js.map +1 -1
- package/lib/zosfiles/list/ds/DataSet.handler.d.ts.map +1 -1
- package/lib/zosfiles/list/ds/DataSet.handler.js +3 -1
- package/lib/zosfiles/list/ds/DataSet.handler.js.map +1 -1
- package/lib/zosfiles/list/fs/Fs.handler.d.ts.map +1 -1
- package/lib/zosfiles/list/fs/Fs.handler.js +6 -2
- package/lib/zosfiles/list/fs/Fs.handler.js.map +1 -1
- package/lib/zosfiles/list/uss/UssFile.handler.d.ts.map +1 -1
- package/lib/zosfiles/list/uss/UssFile.handler.js +3 -1
- package/lib/zosfiles/list/uss/UssFile.handler.js.map +1 -1
- package/lib/zosfiles/mount/fs/fs.handler.d.ts.map +1 -1
- package/lib/zosfiles/mount/fs/fs.handler.js +3 -1
- package/lib/zosfiles/mount/fs/fs.handler.js.map +1 -1
- package/lib/zosfiles/rename/ds/Ds.handler.d.ts.map +1 -1
- package/lib/zosfiles/rename/ds/Ds.handler.js +4 -1
- package/lib/zosfiles/rename/ds/Ds.handler.js.map +1 -1
- package/lib/zosfiles/rename/dsm/Dsm.handler.d.ts.map +1 -1
- package/lib/zosfiles/rename/dsm/Dsm.handler.js +4 -1
- package/lib/zosfiles/rename/dsm/Dsm.handler.js.map +1 -1
- package/lib/zosfiles/search/ds/DataSets.handler.d.ts.map +1 -1
- package/lib/zosfiles/search/ds/DataSets.handler.js +10 -2
- package/lib/zosfiles/search/ds/DataSets.handler.js.map +1 -1
- package/lib/zosfiles/upload/dtp/DirToPds.handler.d.ts.map +1 -1
- package/lib/zosfiles/upload/dtp/DirToPds.handler.js +3 -1
- package/lib/zosfiles/upload/dtp/DirToPds.handler.js.map +1 -1
- package/lib/zosfiles/upload/dtu/DirToUSSDir.handler.d.ts.map +1 -1
- package/lib/zosfiles/upload/dtu/DirToUSSDir.handler.js +3 -1
- package/lib/zosfiles/upload/dtu/DirToUSSDir.handler.js.map +1 -1
- package/lib/zosfiles/upload/ftds/FileToDataSet.handler.d.ts.map +1 -1
- package/lib/zosfiles/upload/ftds/FileToDataSet.handler.js +3 -1
- package/lib/zosfiles/upload/ftds/FileToDataSet.handler.js.map +1 -1
- package/lib/zosfiles/upload/ftu/FileToUSS.handler.d.ts.map +1 -1
- package/lib/zosfiles/upload/ftu/FileToUSS.handler.js +3 -1
- package/lib/zosfiles/upload/ftu/FileToUSS.handler.js.map +1 -1
- package/lib/zosfiles/upload/stds/StdinToDataSet.handler.d.ts.map +1 -1
- package/lib/zosfiles/upload/stds/StdinToDataSet.handler.js +3 -1
- package/lib/zosfiles/upload/stds/StdinToDataSet.handler.js.map +1 -1
- package/lib/zosfiles/view/ds/Dataset.handler.d.ts.map +1 -1
- package/lib/zosfiles/view/ds/Dataset.handler.js +3 -1
- package/lib/zosfiles/view/ds/Dataset.handler.js.map +1 -1
- package/lib/zosfiles/view/uss/USSFile.handler.d.ts.map +1 -1
- package/lib/zosfiles/view/uss/USSFile.handler.js +3 -1
- package/lib/zosfiles/view/uss/USSFile.handler.js.map +1 -1
- package/node_modules/@zowe/core-for-zowe-sdk/lib/rest/ZosmfHeaders.d.ts +14 -0
- package/node_modules/@zowe/core-for-zowe-sdk/lib/rest/ZosmfHeaders.d.ts.map +1 -1
- package/node_modules/@zowe/core-for-zowe-sdk/lib/rest/ZosmfHeaders.js +14 -0
- package/node_modules/@zowe/core-for-zowe-sdk/lib/rest/ZosmfHeaders.js.map +1 -1
- package/node_modules/@zowe/core-for-zowe-sdk/package.json +3 -3
- package/node_modules/@zowe/imperative/lib/config/src/ConfigSchema.d.ts.map +1 -1
- package/node_modules/@zowe/imperative/lib/config/src/ConfigSchema.js +1 -0
- package/node_modules/@zowe/imperative/lib/config/src/ConfigSchema.js.map +1 -1
- package/node_modules/@zowe/imperative/lib/logger/src/LoggerConfigBuilder.d.ts +1 -0
- package/node_modules/@zowe/imperative/lib/logger/src/LoggerConfigBuilder.d.ts.map +1 -1
- package/node_modules/@zowe/imperative/lib/logger/src/LoggerConfigBuilder.js +2 -0
- package/node_modules/@zowe/imperative/lib/logger/src/LoggerConfigBuilder.js.map +1 -1
- package/node_modules/@zowe/imperative/lib/logger/src/log4jsToWinston.d.ts +1 -0
- package/node_modules/@zowe/imperative/lib/logger/src/log4jsToWinston.d.ts.map +1 -1
- package/node_modules/@zowe/imperative/lib/logger/src/log4jsToWinston.js +11 -3
- package/node_modules/@zowe/imperative/lib/logger/src/log4jsToWinston.js.map +1 -1
- package/node_modules/@zowe/imperative/lib/utilities/src/TextUtils.d.ts.map +1 -1
- package/node_modules/@zowe/imperative/lib/utilities/src/TextUtils.js +25 -0
- package/node_modules/@zowe/imperative/lib/utilities/src/TextUtils.js.map +1 -1
- package/node_modules/@zowe/imperative/package.json +3 -3
- package/node_modules/@zowe/imperative/web-help/package-lock.json +62 -62
- package/node_modules/@zowe/provisioning-for-zowe-sdk/package.json +4 -4
- package/node_modules/@zowe/secrets-for-zowe-sdk/README.md +70 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/package.json +1 -1
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.darwin-arm64.node +0 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.darwin-x64.node +0 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.linux-arm-gnueabihf.node +0 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.linux-arm64-gnu.node +0 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.linux-ia32-gnu.node +0 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.linux-x64-gnu.node +0 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.win32-arm64-msvc.node +0 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.win32-ia32-msvc.node +0 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.win32-x64-msvc.node +0 -0
- package/node_modules/@zowe/zos-console-for-zowe-sdk/package.json +4 -4
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/doc/IZosFilesOptions.d.ts +12 -0
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/doc/IZosFilesOptions.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/copy/Copy.js +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/copy/Copy.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/create/Create.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/create/Create.js +18 -3
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/create/Create.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/delete/Delete.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/delete/Delete.js +7 -3
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/delete/Delete.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/download/Download.js +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/download/Download.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/invoke/Invoke.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/invoke/Invoke.js +2 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/invoke/Invoke.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/list/List.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/list/List.js +6 -5
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/list/List.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/mount/Mount.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/mount/Mount.js +6 -0
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/mount/Mount.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/rename/Rename.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/rename/Rename.js +2 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/rename/Rename.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/unmount/Unmount.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/unmount/Unmount.js +3 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/unmount/Unmount.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/upload/Upload.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/upload/Upload.js +5 -5
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/upload/Upload.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/utilities/Utilities.d.ts +4 -4
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/utilities/Utilities.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/utilities/Utilities.js +10 -33
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/utilities/Utilities.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/utils/ZosFilesUtils.d.ts +7 -0
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/utils/ZosFilesUtils.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/utils/ZosFilesUtils.js +16 -0
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/utils/ZosFilesUtils.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/package.json +5 -5
- package/node_modules/@zowe/zos-jobs-for-zowe-sdk/package.json +5 -5
- package/node_modules/@zowe/zos-logs-for-zowe-sdk/package.json +4 -4
- package/node_modules/@zowe/zos-tso-for-zowe-sdk/package.json +5 -5
- package/node_modules/@zowe/zos-uss-for-zowe-sdk/package.json +3 -3
- package/node_modules/@zowe/zos-workflows-for-zowe-sdk/package.json +5 -5
- package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.constants.d.ts.map +1 -1
- package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.constants.js +21 -0
- package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.constants.js.map +1 -1
- package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.profile.d.ts.map +1 -1
- package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.profile.js +8 -0
- package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.profile.js.map +1 -1
- package/node_modules/@zowe/zosmf-for-zowe-sdk/package.json +4 -4
- package/node_modules/js-yaml/dist/js-yaml.js +11 -3
- package/node_modules/js-yaml/dist/js-yaml.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.min.js +1 -1
- package/node_modules/js-yaml/dist/js-yaml.min.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.mjs +11 -3
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
- package/node_modules/js-yaml/lib/loader.js +16 -3
- package/node_modules/js-yaml/package.json +1 -1
- package/node_modules/sanitize-html/README.md +13 -0
- package/node_modules/sanitize-html/index.js +86 -12
- package/node_modules/sanitize-html/node_modules/dom-serializer/LICENSE +7 -0
- package/node_modules/{dom-serializer → sanitize-html/node_modules/dom-serializer}/README.md +14 -8
- package/node_modules/sanitize-html/node_modules/dom-serializer/dist/foreign-names.d.ts +11 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/dist/foreign-names.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/dist/foreign-names.js +15 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/dist/foreign-names.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/dist/index.d.ts +72 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/dist/index.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/dist/index.js +173 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/dist/index.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/package.json +69 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/src/foreign-names.ts +19 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/src/index.ts +315 -0
- package/node_modules/{domelementtype/lib → sanitize-html/node_modules/domelementtype/dist}/index.d.ts +12 -12
- package/node_modules/sanitize-html/node_modules/domelementtype/dist/index.d.ts.map +1 -0
- package/node_modules/{domelementtype/lib/esm → sanitize-html/node_modules/domelementtype/dist}/index.js +15 -6
- package/node_modules/sanitize-html/node_modules/domelementtype/package.json +59 -0
- package/node_modules/{domhandler/lib → sanitize-html/node_modules/domhandler/dist}/index.d.ts +9 -6
- package/node_modules/sanitize-html/node_modules/domhandler/dist/index.d.ts.map +1 -0
- package/node_modules/{domhandler/lib/esm → sanitize-html/node_modules/domhandler/dist}/index.js +34 -25
- package/node_modules/{domhandler/lib → sanitize-html/node_modules/domhandler/dist}/node.d.ts +34 -15
- package/node_modules/sanitize-html/node_modules/domhandler/dist/node.d.ts.map +1 -0
- package/node_modules/{domhandler/lib/esm → sanitize-html/node_modules/domhandler/dist}/node.js +81 -60
- package/node_modules/sanitize-html/node_modules/domhandler/package.json +65 -0
- package/node_modules/{domhandler → sanitize-html/node_modules/domhandler}/readme.md +1 -7
- package/node_modules/{domutils/lib → sanitize-html/node_modules/domutils/dist}/feeds.d.ts +2 -2
- package/node_modules/sanitize-html/node_modules/domutils/dist/feeds.d.ts.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/feeds.js +22 -25
- package/node_modules/sanitize-html/node_modules/domutils/dist/feeds.js.map +1 -0
- package/node_modules/{domutils/lib → sanitize-html/node_modules/domutils/dist}/helpers.d.ts +1 -1
- package/node_modules/sanitize-html/node_modules/domutils/dist/helpers.d.ts.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/helpers.js +16 -16
- package/node_modules/sanitize-html/node_modules/domutils/dist/helpers.js.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/index.d.ts +5 -7
- package/node_modules/sanitize-html/node_modules/domutils/dist/index.d.ts.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/index.js +5 -7
- package/node_modules/sanitize-html/node_modules/domutils/dist/index.js.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/legacy.d.ts +1 -1
- package/node_modules/sanitize-html/node_modules/domutils/dist/legacy.d.ts.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/legacy.js +15 -15
- package/node_modules/sanitize-html/node_modules/domutils/dist/legacy.js.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/manipulation.d.ts +9 -9
- package/node_modules/sanitize-html/node_modules/domutils/dist/manipulation.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/domutils/dist/manipulation.js +138 -0
- package/node_modules/sanitize-html/node_modules/domutils/dist/manipulation.js.map +1 -0
- package/node_modules/{domutils/lib → sanitize-html/node_modules/domutils/dist}/querying.d.ts +6 -16
- package/node_modules/sanitize-html/node_modules/domutils/dist/querying.d.ts.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/querying.js +13 -26
- package/node_modules/sanitize-html/node_modules/domutils/dist/querying.js.map +1 -0
- package/node_modules/{domutils/lib → sanitize-html/node_modules/domutils/dist}/stringify.d.ts +2 -2
- package/node_modules/sanitize-html/node_modules/domutils/dist/stringify.d.ts.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/stringify.js +1 -1
- package/node_modules/sanitize-html/node_modules/domutils/dist/stringify.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/domutils/dist/traversal.d.ts +74 -0
- package/node_modules/sanitize-html/node_modules/domutils/dist/traversal.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/domutils/dist/traversal.js +105 -0
- package/node_modules/sanitize-html/node_modules/domutils/dist/traversal.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/domutils/package.json +69 -0
- package/node_modules/{domutils → sanitize-html/node_modules/domutils}/readme.md +0 -6
- package/node_modules/sanitize-html/node_modules/domutils/src/__snapshots__/feeds.spec.ts.snap +103 -0
- package/node_modules/sanitize-html/node_modules/domutils/src/feeds.ts +301 -0
- package/node_modules/{domutils/lib/helpers.js → sanitize-html/node_modules/domutils/src/helpers.ts} +55 -43
- package/node_modules/{domutils/lib/index.d.ts → sanitize-html/node_modules/domutils/src/index.ts} +5 -8
- package/node_modules/sanitize-html/node_modules/domutils/src/legacy.ts +224 -0
- package/node_modules/sanitize-html/node_modules/domutils/src/manipulation.ts +156 -0
- package/node_modules/{domutils/lib/querying.js → sanitize-html/node_modules/domutils/src/querying.ts} +77 -60
- package/node_modules/sanitize-html/node_modules/domutils/src/stringify.ts +90 -0
- package/node_modules/sanitize-html/node_modules/domutils/src/traversal.ts +132 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/decode-codepoint.d.ts +28 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/decode-codepoint.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/decode-codepoint.js +61 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/decode-codepoint.js.map +1 -0
- package/node_modules/{htmlparser2/node_modules/entities/dist/commonjs → sanitize-html/node_modules/entities/dist}/decode.d.ts +66 -44
- package/node_modules/sanitize-html/node_modules/entities/dist/decode.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/decode.js +1132 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/decode.js.map +1 -0
- package/node_modules/{htmlparser2/node_modules/entities/dist/commonjs → sanitize-html/node_modules/entities/dist}/encode.d.ts +4 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/encode.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/encode.js +295 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/encode.js.map +1 -0
- package/node_modules/{htmlparser2/node_modules/entities/dist/commonjs → sanitize-html/node_modules/entities/dist}/escape.d.ts +23 -9
- package/node_modules/sanitize-html/node_modules/entities/dist/escape.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/escape.js +172 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/escape.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-html.d.ts +3 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-html.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-html.js +5 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-html.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-xml.d.ts +3 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-xml.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-xml.js +7 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-xml.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/encode-html.d.ts +3 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/encode-html.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/encode-html.js +3 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/encode-html.js.map +1 -0
- package/node_modules/{htmlparser2/node_modules/entities/dist/commonjs → sanitize-html/node_modules/entities/dist}/index.d.ts +11 -18
- package/node_modules/sanitize-html/node_modules/entities/dist/index.d.ts.map +1 -0
- package/node_modules/{htmlparser2/node_modules/entities/dist/esm → sanitize-html/node_modules/entities/dist}/index.js +9 -29
- package/node_modules/sanitize-html/node_modules/entities/dist/index.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/internal/bin-trie-flags.d.ts +48 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/internal/bin-trie-flags.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/internal/bin-trie-flags.js +49 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/internal/bin-trie-flags.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/internal/decode-shared.d.ts +38 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/internal/decode-shared.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/internal/decode-shared.js +195 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/internal/decode-shared.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/package.json +83 -0
- package/node_modules/{htmlparser2 → sanitize-html}/node_modules/entities/readme.md +4 -16
- package/node_modules/sanitize-html/node_modules/entities/src/decode-codepoint.ts +69 -0
- package/node_modules/sanitize-html/node_modules/entities/src/decode.ts +1368 -0
- package/node_modules/sanitize-html/node_modules/entities/src/encode.ts +337 -0
- package/node_modules/sanitize-html/node_modules/entities/src/escape.ts +187 -0
- package/node_modules/sanitize-html/node_modules/entities/src/generated/decode-data-html.ts +12 -0
- package/node_modules/sanitize-html/node_modules/entities/src/generated/decode-data-xml.ts +7 -0
- package/node_modules/sanitize-html/node_modules/entities/src/generated/encode-html.ts +3 -0
- package/node_modules/{htmlparser2 → sanitize-html}/node_modules/entities/src/index.ts +14 -41
- package/node_modules/sanitize-html/node_modules/entities/src/internal/bin-trie-flags.ts +47 -0
- package/node_modules/sanitize-html/node_modules/entities/src/internal/decode-shared.ts +209 -0
- package/node_modules/sanitize-html/node_modules/htmlparser2/README.md +257 -0
- package/node_modules/{htmlparser2/dist/esm → sanitize-html/node_modules/htmlparser2/dist}/Parser.d.ts +97 -38
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Parser.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Parser.js +644 -0
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Parser.js.map +1 -0
- package/node_modules/{htmlparser2/dist/commonjs → sanitize-html/node_modules/htmlparser2/dist}/Tokenizer.d.ts +75 -7
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Tokenizer.d.ts.map +1 -0
- package/node_modules/{htmlparser2/dist/esm → sanitize-html/node_modules/htmlparser2/dist}/Tokenizer.js +434 -179
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Tokenizer.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WebWritableStream.d.ts +24 -0
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WebWritableStream.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WebWritableStream.js +44 -0
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WebWritableStream.js.map +1 -0
- package/node_modules/{htmlparser2/dist/commonjs → sanitize-html/node_modules/htmlparser2/dist}/WritableStream.d.ts +1 -2
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WritableStream.d.ts.map +1 -0
- package/node_modules/{htmlparser2/dist/esm → sanitize-html/node_modules/htmlparser2/dist}/WritableStream.js +3 -3
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WritableStream.js.map +1 -0
- package/node_modules/{htmlparser2/dist/commonjs → sanitize-html/node_modules/htmlparser2/dist}/index.d.ts +6 -26
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/index.d.ts.map +1 -0
- package/node_modules/{htmlparser2/dist/esm → sanitize-html/node_modules/htmlparser2/dist}/index.js +2 -30
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/index.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/htmlparser2/package.json +86 -0
- package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/src/Parser.ts +260 -100
- package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/src/Tokenizer.ts +438 -165
- package/node_modules/sanitize-html/node_modules/htmlparser2/src/WebWritableStream.ts +47 -0
- package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/src/WritableStream.ts +1 -2
- package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/src/index.ts +14 -43
- package/node_modules/sanitize-html/package.json +5 -2
- package/package.json +15 -15
- package/scripts/validateSecretsPrebuild.js +231 -0
- package/node_modules/dom-serializer/LICENSE +0 -11
- package/node_modules/dom-serializer/lib/esm/foreignNames.d.ts +0 -3
- package/node_modules/dom-serializer/lib/esm/foreignNames.d.ts.map +0 -1
- package/node_modules/dom-serializer/lib/esm/foreignNames.js +0 -100
- package/node_modules/dom-serializer/lib/esm/index.d.ts +0 -52
- package/node_modules/dom-serializer/lib/esm/index.d.ts.map +0 -1
- package/node_modules/dom-serializer/lib/esm/index.js +0 -190
- package/node_modules/dom-serializer/lib/esm/package.json +0 -1
- package/node_modules/dom-serializer/lib/foreignNames.d.ts +0 -3
- package/node_modules/dom-serializer/lib/foreignNames.d.ts.map +0 -1
- package/node_modules/dom-serializer/lib/foreignNames.js +0 -103
- package/node_modules/dom-serializer/lib/index.d.ts +0 -52
- package/node_modules/dom-serializer/lib/index.d.ts.map +0 -1
- package/node_modules/dom-serializer/lib/index.js +0 -229
- package/node_modules/dom-serializer/package.json +0 -69
- package/node_modules/domelementtype/lib/esm/index.d.ts +0 -48
- package/node_modules/domelementtype/lib/esm/index.d.ts.map +0 -1
- package/node_modules/domelementtype/lib/esm/package.json +0 -1
- package/node_modules/domelementtype/lib/index.d.ts.map +0 -1
- package/node_modules/domelementtype/lib/index.js +0 -55
- package/node_modules/domelementtype/package.json +0 -54
- package/node_modules/domhandler/lib/esm/index.d.ts +0 -76
- package/node_modules/domhandler/lib/esm/index.d.ts.map +0 -1
- package/node_modules/domhandler/lib/esm/node.d.ts +0 -245
- package/node_modules/domhandler/lib/esm/node.d.ts.map +0 -1
- package/node_modules/domhandler/lib/esm/package.json +0 -1
- package/node_modules/domhandler/lib/index.d.ts.map +0 -1
- package/node_modules/domhandler/lib/index.js +0 -165
- package/node_modules/domhandler/lib/node.d.ts.map +0 -1
- package/node_modules/domhandler/lib/node.js +0 -474
- package/node_modules/domhandler/package.json +0 -73
- package/node_modules/domutils/lib/esm/feeds.d.ts +0 -71
- package/node_modules/domutils/lib/esm/feeds.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/feeds.js.map +0 -1
- package/node_modules/domutils/lib/esm/helpers.d.ts +0 -59
- package/node_modules/domutils/lib/esm/helpers.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/helpers.js.map +0 -1
- package/node_modules/domutils/lib/esm/index.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/index.js.map +0 -1
- package/node_modules/domutils/lib/esm/legacy.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/legacy.js.map +0 -1
- package/node_modules/domutils/lib/esm/manipulation.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/manipulation.js +0 -134
- package/node_modules/domutils/lib/esm/manipulation.js.map +0 -1
- package/node_modules/domutils/lib/esm/package.json +0 -1
- package/node_modules/domutils/lib/esm/querying.d.ts +0 -64
- package/node_modules/domutils/lib/esm/querying.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/querying.js.map +0 -1
- package/node_modules/domutils/lib/esm/stringify.d.ts +0 -46
- package/node_modules/domutils/lib/esm/stringify.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/stringify.js.map +0 -1
- package/node_modules/domutils/lib/esm/traversal.d.ts +0 -67
- package/node_modules/domutils/lib/esm/traversal.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/traversal.js +0 -112
- package/node_modules/domutils/lib/esm/traversal.js.map +0 -1
- package/node_modules/domutils/lib/feeds.d.ts.map +0 -1
- package/node_modules/domutils/lib/feeds.js +0 -190
- package/node_modules/domutils/lib/feeds.js.map +0 -1
- package/node_modules/domutils/lib/helpers.d.ts.map +0 -1
- package/node_modules/domutils/lib/helpers.js.map +0 -1
- package/node_modules/domutils/lib/index.d.ts.map +0 -1
- package/node_modules/domutils/lib/index.js +0 -33
- package/node_modules/domutils/lib/index.js.map +0 -1
- package/node_modules/domutils/lib/legacy.d.ts +0 -79
- package/node_modules/domutils/lib/legacy.d.ts.map +0 -1
- package/node_modules/domutils/lib/legacy.js +0 -168
- package/node_modules/domutils/lib/legacy.js.map +0 -1
- package/node_modules/domutils/lib/manipulation.d.ts +0 -49
- package/node_modules/domutils/lib/manipulation.d.ts.map +0 -1
- package/node_modules/domutils/lib/manipulation.js +0 -142
- package/node_modules/domutils/lib/manipulation.js.map +0 -1
- package/node_modules/domutils/lib/querying.d.ts.map +0 -1
- package/node_modules/domutils/lib/querying.js.map +0 -1
- package/node_modules/domutils/lib/stringify.d.ts.map +0 -1
- package/node_modules/domutils/lib/stringify.js +0 -91
- package/node_modules/domutils/lib/stringify.js.map +0 -1
- package/node_modules/domutils/lib/traversal.d.ts +0 -67
- package/node_modules/domutils/lib/traversal.d.ts.map +0 -1
- package/node_modules/domutils/lib/traversal.js +0 -125
- package/node_modules/domutils/lib/traversal.js.map +0 -1
- package/node_modules/domutils/package.json +0 -79
- package/node_modules/htmlparser2/README.md +0 -171
- package/node_modules/htmlparser2/WritableStream.js +0 -3
- package/node_modules/htmlparser2/dist/commonjs/Parser.d.ts +0 -198
- package/node_modules/htmlparser2/dist/commonjs/Parser.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/Parser.js +0 -527
- package/node_modules/htmlparser2/dist/commonjs/Parser.js.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/Tokenizer.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/Tokenizer.js +0 -805
- package/node_modules/htmlparser2/dist/commonjs/Tokenizer.js.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/WritableStream.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/WritableStream.js +0 -36
- package/node_modules/htmlparser2/dist/commonjs/WritableStream.js.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/index.js +0 -123
- package/node_modules/htmlparser2/dist/commonjs/index.js.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/package.json +0 -3
- package/node_modules/htmlparser2/dist/esm/Parser.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/esm/Parser.js +0 -490
- package/node_modules/htmlparser2/dist/esm/Parser.js.map +0 -1
- package/node_modules/htmlparser2/dist/esm/Tokenizer.d.ts +0 -126
- package/node_modules/htmlparser2/dist/esm/Tokenizer.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/esm/Tokenizer.js.map +0 -1
- package/node_modules/htmlparser2/dist/esm/WritableStream.d.ts +0 -15
- package/node_modules/htmlparser2/dist/esm/WritableStream.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/esm/WritableStream.js.map +0 -1
- package/node_modules/htmlparser2/dist/esm/index.d.ts +0 -54
- package/node_modules/htmlparser2/dist/esm/index.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/esm/index.js.map +0 -1
- package/node_modules/htmlparser2/dist/esm/package.json +0 -3
- package/node_modules/htmlparser2/node_modules/entities/decode.d.ts +0 -3
- package/node_modules/htmlparser2/node_modules/entities/decode.js +0 -3
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.d.ts +0 -19
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js +0 -77
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js +0 -568
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.js +0 -92
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.js +0 -138
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js +0 -7
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +0 -7
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.d.ts +0 -3
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.js +0 -14
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.js +0 -131
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts +0 -17
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +0 -21
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.js +0 -31
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts +0 -32
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.js +0 -94
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/package.json +0 -3
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.d.ts +0 -19
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.js +0 -72
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.d.ts +0 -205
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.js +0 -554
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.d.ts +0 -22
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.js +0 -88
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.d.ts +0 -46
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.js +0 -134
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.js +0 -4
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.js +0 -4
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.d.ts +0 -3
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.js +0 -11
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.d.ts +0 -96
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts +0 -17
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.js +0 -18
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.js +0 -28
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.d.ts +0 -32
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.js +0 -91
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/package.json +0 -3
- package/node_modules/htmlparser2/node_modules/entities/escape.d.ts +0 -3
- package/node_modules/htmlparser2/node_modules/entities/escape.js +0 -3
- package/node_modules/htmlparser2/node_modules/entities/package.json +0 -120
- package/node_modules/htmlparser2/node_modules/entities/src/decode-codepoint.ts +0 -81
- package/node_modules/htmlparser2/node_modules/entities/src/decode.ts +0 -685
- package/node_modules/htmlparser2/node_modules/entities/src/encode.ts +0 -93
- package/node_modules/htmlparser2/node_modules/entities/src/escape.ts +0 -161
- package/node_modules/htmlparser2/node_modules/entities/src/generated/.eslintrc.json +0 -10
- package/node_modules/htmlparser2/node_modules/entities/src/generated/decode-data-html.ts +0 -6
- package/node_modules/htmlparser2/node_modules/entities/src/generated/decode-data-xml.ts +0 -6
- package/node_modules/htmlparser2/node_modules/entities/src/generated/encode-html.ts +0 -17
- package/node_modules/htmlparser2/node_modules/entities/src/internal/bin-trie-flags.ts +0 -16
- package/node_modules/htmlparser2/node_modules/entities/src/internal/decode-shared.ts +0 -30
- package/node_modules/htmlparser2/node_modules/entities/src/internal/encode-shared.ts +0 -121
- package/node_modules/htmlparser2/package.json +0 -113
- /package/node_modules/{domelementtype → sanitize-html/node_modules/domelementtype}/LICENSE +0 -0
- /package/node_modules/{domelementtype → sanitize-html/node_modules/domelementtype}/readme.md +0 -0
- /package/node_modules/{domhandler → sanitize-html/node_modules/domhandler}/LICENSE +0 -0
- /package/node_modules/{domutils → sanitize-html/node_modules/domutils}/LICENSE +0 -0
- /package/node_modules/{htmlparser2 → sanitize-html}/node_modules/entities/LICENSE +0 -0
- /package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/LICENSE +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
const { fromCodePoint } = String;
|
|
2
|
+
|
|
1
3
|
import Tokenizer, { type Callbacks, QuoteType } from "./Tokenizer.js";
|
|
2
|
-
import { fromCodePoint } from "entities/decode";
|
|
3
4
|
|
|
4
5
|
const formTags = new Set([
|
|
5
6
|
"input",
|
|
@@ -11,6 +12,7 @@ const formTags = new Set([
|
|
|
11
12
|
"textarea",
|
|
12
13
|
]);
|
|
13
14
|
const pTag = new Set(["p"]);
|
|
15
|
+
const headingTags = new Set(["h1", "h2", "h3", "h4", "h5", "h6", "p"]);
|
|
14
16
|
const tableSectionTags = new Set(["thead", "tbody"]);
|
|
15
17
|
const ddtTags = new Set(["dd", "dt"]);
|
|
16
18
|
const rtpTags = new Set(["rt", "rp"]);
|
|
@@ -20,14 +22,15 @@ const openImpliesClose = new Map<string, Set<string>>([
|
|
|
20
22
|
["th", new Set(["th"])],
|
|
21
23
|
["td", new Set(["thead", "th", "td"])],
|
|
22
24
|
["body", new Set(["head", "link", "script"])],
|
|
25
|
+
["a", new Set(["a"])],
|
|
23
26
|
["li", new Set(["li"])],
|
|
24
27
|
["p", pTag],
|
|
25
|
-
["h1",
|
|
26
|
-
["h2",
|
|
27
|
-
["h3",
|
|
28
|
-
["h4",
|
|
29
|
-
["h5",
|
|
30
|
-
["h6",
|
|
28
|
+
["h1", headingTags],
|
|
29
|
+
["h2", headingTags],
|
|
30
|
+
["h3", headingTags],
|
|
31
|
+
["h4", headingTags],
|
|
32
|
+
["h5", headingTags],
|
|
33
|
+
["h6", headingTags],
|
|
31
34
|
["select", formTags],
|
|
32
35
|
["input", formTags],
|
|
33
36
|
["output", formTags],
|
|
@@ -65,6 +68,8 @@ const openImpliesClose = new Map<string, Set<string>>([
|
|
|
65
68
|
["tfoot", tableSectionTags],
|
|
66
69
|
]);
|
|
67
70
|
|
|
71
|
+
const DOCUMENT_TYPE = "doctype";
|
|
72
|
+
|
|
68
73
|
const voidElements = new Set([
|
|
69
74
|
"area",
|
|
70
75
|
"base",
|
|
@@ -89,6 +94,12 @@ const voidElements = new Set([
|
|
|
89
94
|
|
|
90
95
|
const foreignContextElements = new Set(["math", "svg"]);
|
|
91
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Elements that can be used to integrate HTML content within foreign namespaces (e.g., SVG or MathML).
|
|
99
|
+
*
|
|
100
|
+
* Entries must use the SVG-adjusted casing (e.g. "foreignObject" not
|
|
101
|
+
* "foreignobject") since they are compared against adjusted tag names.
|
|
102
|
+
*/
|
|
92
103
|
const htmlIntegrationElements = new Set([
|
|
93
104
|
"mi",
|
|
94
105
|
"mo",
|
|
@@ -96,39 +107,84 @@ const htmlIntegrationElements = new Set([
|
|
|
96
107
|
"ms",
|
|
97
108
|
"mtext",
|
|
98
109
|
"annotation-xml",
|
|
99
|
-
"
|
|
110
|
+
"foreignObject",
|
|
100
111
|
"desc",
|
|
101
112
|
"title",
|
|
102
113
|
]);
|
|
103
114
|
|
|
115
|
+
const svgTagNameAdjustments = new Map<string, string>([
|
|
116
|
+
["altglyph", "altGlyph"],
|
|
117
|
+
["altglyphdef", "altGlyphDef"],
|
|
118
|
+
["altglyphitem", "altGlyphItem"],
|
|
119
|
+
["animatecolor", "animateColor"],
|
|
120
|
+
["animatemotion", "animateMotion"],
|
|
121
|
+
["animatetransform", "animateTransform"],
|
|
122
|
+
["clippath", "clipPath"],
|
|
123
|
+
["feblend", "feBlend"],
|
|
124
|
+
["fecolormatrix", "feColorMatrix"],
|
|
125
|
+
["fecomponenttransfer", "feComponentTransfer"],
|
|
126
|
+
["fecomposite", "feComposite"],
|
|
127
|
+
["feconvolvematrix", "feConvolveMatrix"],
|
|
128
|
+
["fediffuselighting", "feDiffuseLighting"],
|
|
129
|
+
["fedisplacementmap", "feDisplacementMap"],
|
|
130
|
+
["fedistantlight", "feDistantLight"],
|
|
131
|
+
["fedropshadow", "feDropShadow"],
|
|
132
|
+
["feflood", "feFlood"],
|
|
133
|
+
["fefunca", "feFuncA"],
|
|
134
|
+
["fefuncb", "feFuncB"],
|
|
135
|
+
["fefuncg", "feFuncG"],
|
|
136
|
+
["fefuncr", "feFuncR"],
|
|
137
|
+
["fegaussianblur", "feGaussianBlur"],
|
|
138
|
+
["feimage", "feImage"],
|
|
139
|
+
["femerge", "feMerge"],
|
|
140
|
+
["femergenode", "feMergeNode"],
|
|
141
|
+
["femorphology", "feMorphology"],
|
|
142
|
+
["feoffset", "feOffset"],
|
|
143
|
+
["fepointlight", "fePointLight"],
|
|
144
|
+
["fespecularlighting", "feSpecularLighting"],
|
|
145
|
+
["fespotlight", "feSpotLight"],
|
|
146
|
+
["fetile", "feTile"],
|
|
147
|
+
["feturbulence", "feTurbulence"],
|
|
148
|
+
["foreignobject", "foreignObject"],
|
|
149
|
+
["glyphref", "glyphRef"],
|
|
150
|
+
["lineargradient", "linearGradient"],
|
|
151
|
+
["radialgradient", "radialGradient"],
|
|
152
|
+
["textpath", "textPath"],
|
|
153
|
+
]);
|
|
154
|
+
|
|
155
|
+
const enum ForeignContext {
|
|
156
|
+
None,
|
|
157
|
+
Svg,
|
|
158
|
+
MathML,
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Options for the streaming HTML/XML parser.
|
|
163
|
+
*/
|
|
104
164
|
export interface ParserOptions {
|
|
105
165
|
/**
|
|
106
166
|
* Indicates whether special tags (`<script>`, `<style>`, and `<title>`) should get special treatment
|
|
107
167
|
* and if "empty" tags (eg. `<br>`) can have children. If `false`, the content of special tags
|
|
108
168
|
* will be text only. For feeds and other XML content (documents that don't consist of HTML),
|
|
109
169
|
* set this to `true`.
|
|
110
|
-
*
|
|
111
170
|
* @default false
|
|
112
171
|
*/
|
|
113
172
|
xmlMode?: boolean;
|
|
114
173
|
|
|
115
174
|
/**
|
|
116
175
|
* Decode entities within the document.
|
|
117
|
-
*
|
|
118
176
|
* @default true
|
|
119
177
|
*/
|
|
120
178
|
decodeEntities?: boolean;
|
|
121
179
|
|
|
122
180
|
/**
|
|
123
181
|
* If set to true, all tags will be lowercased.
|
|
124
|
-
*
|
|
125
182
|
* @default !xmlMode
|
|
126
183
|
*/
|
|
127
184
|
lowerCaseTags?: boolean;
|
|
128
185
|
|
|
129
186
|
/**
|
|
130
187
|
* If set to `true`, all attribute names will be lowercased. This has noticeable impact on speed.
|
|
131
|
-
*
|
|
132
188
|
* @default !xmlMode
|
|
133
189
|
*/
|
|
134
190
|
lowerCaseAttributeNames?: boolean;
|
|
@@ -136,7 +192,6 @@ export interface ParserOptions {
|
|
|
136
192
|
/**
|
|
137
193
|
* If set to true, CDATA sections will be recognized as text even if the xmlMode option is not enabled.
|
|
138
194
|
* NOTE: If xmlMode is set to `true` then CDATA sections will always be recognized as text.
|
|
139
|
-
*
|
|
140
195
|
* @default xmlMode
|
|
141
196
|
*/
|
|
142
197
|
recognizeCDATA?: boolean;
|
|
@@ -144,7 +199,6 @@ export interface ParserOptions {
|
|
|
144
199
|
/**
|
|
145
200
|
* If set to `true`, self-closing tags will trigger the onclosetag event even if xmlMode is not set to `true`.
|
|
146
201
|
* NOTE: If xmlMode is set to `true` then self-closing tags will always be recognized.
|
|
147
|
-
*
|
|
148
202
|
* @default xmlMode
|
|
149
203
|
*/
|
|
150
204
|
recognizeSelfClosing?: boolean;
|
|
@@ -155,6 +209,9 @@ export interface ParserOptions {
|
|
|
155
209
|
Tokenizer?: typeof Tokenizer;
|
|
156
210
|
}
|
|
157
211
|
|
|
212
|
+
/**
|
|
213
|
+
* Parser callback interface used by the tokenizer.
|
|
214
|
+
*/
|
|
158
215
|
export interface Handler {
|
|
159
216
|
onparserinit(parser: Parser): void;
|
|
160
217
|
|
|
@@ -196,11 +253,14 @@ export interface Handler {
|
|
|
196
253
|
|
|
197
254
|
const reNameEnd = /\s|\//;
|
|
198
255
|
|
|
256
|
+
/**
|
|
257
|
+
* Incremental parser implementation.
|
|
258
|
+
*/
|
|
199
259
|
export class Parser implements Callbacks {
|
|
200
260
|
/** The start index of the last event. */
|
|
201
|
-
|
|
261
|
+
startIndex = 0;
|
|
202
262
|
/** The end index of the last event. */
|
|
203
|
-
|
|
263
|
+
endIndex = 0;
|
|
204
264
|
/**
|
|
205
265
|
* Store the start index of the current open tag,
|
|
206
266
|
* so we can update the start index for attributes.
|
|
@@ -212,8 +272,7 @@ export class Parser implements Callbacks {
|
|
|
212
272
|
private attribvalue = "";
|
|
213
273
|
private attribs: null | { [key: string]: string } = null;
|
|
214
274
|
private readonly stack: string[] = [];
|
|
215
|
-
|
|
216
|
-
private readonly foreignContext: boolean[];
|
|
275
|
+
private readonly foreignContext: ForeignContext[];
|
|
217
276
|
private readonly cbs: Partial<Handler>;
|
|
218
277
|
private readonly lowerCaseTagNames: boolean;
|
|
219
278
|
private readonly lowerCaseAttributeNames: boolean;
|
|
@@ -244,13 +303,17 @@ export class Parser implements Callbacks {
|
|
|
244
303
|
this.options,
|
|
245
304
|
this,
|
|
246
305
|
);
|
|
247
|
-
this.foreignContext = [
|
|
306
|
+
this.foreignContext = [ForeignContext.None];
|
|
248
307
|
this.cbs.onparserinit?.(this);
|
|
249
308
|
}
|
|
250
309
|
|
|
251
310
|
// Tokenizer event handlers
|
|
252
311
|
|
|
253
|
-
/**
|
|
312
|
+
/**
|
|
313
|
+
* @param start Start index for the current parser event.
|
|
314
|
+
* @param endIndex End index for the current parser event.
|
|
315
|
+
* @internal
|
|
316
|
+
*/
|
|
254
317
|
ontext(start: number, endIndex: number): void {
|
|
255
318
|
const data = this.getSlice(start, endIndex);
|
|
256
319
|
this.endIndex = endIndex - 1;
|
|
@@ -258,54 +321,116 @@ export class Parser implements Callbacks {
|
|
|
258
321
|
this.startIndex = endIndex;
|
|
259
322
|
}
|
|
260
323
|
|
|
261
|
-
/**
|
|
324
|
+
/**
|
|
325
|
+
* @param cp Current Unicode code point.
|
|
326
|
+
* @param endIndex End index for the current parser event.
|
|
327
|
+
* @internal
|
|
328
|
+
*/
|
|
262
329
|
ontextentity(cp: number, endIndex: number): void {
|
|
263
330
|
this.endIndex = endIndex - 1;
|
|
264
331
|
this.cbs.ontext?.(fromCodePoint(cp));
|
|
265
332
|
this.startIndex = endIndex;
|
|
266
333
|
}
|
|
267
334
|
|
|
335
|
+
/** @internal */
|
|
336
|
+
isInForeignContext(): boolean {
|
|
337
|
+
return this.foreignContext[0] !== ForeignContext.None;
|
|
338
|
+
}
|
|
339
|
+
|
|
268
340
|
/**
|
|
269
341
|
* Checks if the current tag is a void element. Override this if you want
|
|
270
342
|
* to specify your own additional void elements.
|
|
343
|
+
* @param name Name of the pseudo selector.
|
|
271
344
|
*/
|
|
272
345
|
protected isVoidElement(name: string): boolean {
|
|
273
346
|
return this.htmlMode && voidElements.has(name);
|
|
274
347
|
}
|
|
275
348
|
|
|
276
|
-
/**
|
|
277
|
-
|
|
278
|
-
|
|
349
|
+
/**
|
|
350
|
+
* Read a tag name from the buffer.
|
|
351
|
+
*
|
|
352
|
+
* When `lowerCaseTagNames` is enabled (the default in HTML mode), the name
|
|
353
|
+
* is lowercased and may be adjusted for SVG casing or the `image` → `img`
|
|
354
|
+
* alias.
|
|
355
|
+
* @param start Start index of the tag name in the buffer.
|
|
356
|
+
* @param endIndex End index of the tag name in the buffer.
|
|
357
|
+
*/
|
|
358
|
+
private readTagName(start: number, endIndex: number): string {
|
|
359
|
+
const name = this.lowerCaseTagNames
|
|
360
|
+
? this.getSlice(start, endIndex).toLowerCase()
|
|
361
|
+
: this.getSlice(start, endIndex);
|
|
279
362
|
|
|
280
|
-
|
|
363
|
+
if (!(this.lowerCaseTagNames && this.htmlMode)) {
|
|
364
|
+
return name;
|
|
365
|
+
}
|
|
281
366
|
|
|
282
|
-
if (this.
|
|
283
|
-
name
|
|
367
|
+
if (this.foreignContext[0] === ForeignContext.Svg) {
|
|
368
|
+
return svgTagNameAdjustments.get(name) ?? name;
|
|
284
369
|
}
|
|
285
370
|
|
|
286
|
-
|
|
371
|
+
/*
|
|
372
|
+
* Closing tags for SVG elements inside HTML integration points
|
|
373
|
+
* (e.g. </foreignObject> while inside its own content) need case
|
|
374
|
+
* adjustment so the name matches what was pushed to the stack.
|
|
375
|
+
* `foreignContext.length > 1` means a foreign ancestor exists —
|
|
376
|
+
* the base [None] entry plus at least one pushed context.
|
|
377
|
+
*/
|
|
378
|
+
if (this.foreignContext.length > 1) {
|
|
379
|
+
const adjusted = svgTagNameAdjustments.get(name);
|
|
380
|
+
if (adjusted !== undefined && this.stack.includes(adjusted)) {
|
|
381
|
+
return adjusted;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
if (!this.isInForeignContext()) {
|
|
386
|
+
return name === "image" ? "img" : name;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
return name;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* @param start Start index for the current parser event.
|
|
394
|
+
* @param endIndex End index for the current parser event.
|
|
395
|
+
* @internal
|
|
396
|
+
*/
|
|
397
|
+
onopentagname(start: number, endIndex: number): void {
|
|
398
|
+
this.endIndex = endIndex;
|
|
399
|
+
this.emitOpenTag(this.readTagName(start, endIndex));
|
|
287
400
|
}
|
|
288
401
|
|
|
289
402
|
private emitOpenTag(name: string) {
|
|
290
403
|
this.openTagStart = this.startIndex;
|
|
291
404
|
this.tagname = name;
|
|
292
405
|
|
|
406
|
+
/*
|
|
407
|
+
* The spec ignores a second <form> when one is already open.
|
|
408
|
+
* Setting tagname to "" suppresses all downstream effects: attribs
|
|
409
|
+
* stays null so endOpenTag is a no-op, and closeCurrentTag can't
|
|
410
|
+
* match "" on the stack.
|
|
411
|
+
*/
|
|
412
|
+
if (this.htmlMode && name === "form" && this.stack.includes("form")) {
|
|
413
|
+
this.tagname = "";
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
|
|
293
417
|
const impliesClose = this.htmlMode && openImpliesClose.get(name);
|
|
294
418
|
|
|
295
419
|
if (impliesClose) {
|
|
296
420
|
while (this.stack.length > 0 && impliesClose.has(this.stack[0])) {
|
|
297
|
-
|
|
298
|
-
this.cbs.onclosetag?.(element, true);
|
|
421
|
+
this.popElement(true);
|
|
299
422
|
}
|
|
300
423
|
}
|
|
301
424
|
if (!this.isVoidElement(name)) {
|
|
302
425
|
this.stack.unshift(name);
|
|
303
426
|
|
|
304
427
|
if (this.htmlMode) {
|
|
305
|
-
if (
|
|
306
|
-
this.foreignContext.unshift(
|
|
428
|
+
if (name === "svg") {
|
|
429
|
+
this.foreignContext.unshift(ForeignContext.Svg);
|
|
430
|
+
} else if (name === "math") {
|
|
431
|
+
this.foreignContext.unshift(ForeignContext.MathML);
|
|
307
432
|
} else if (htmlIntegrationElements.has(name)) {
|
|
308
|
-
this.foreignContext.unshift(
|
|
433
|
+
this.foreignContext.unshift(ForeignContext.None);
|
|
309
434
|
}
|
|
310
435
|
}
|
|
311
436
|
}
|
|
@@ -327,7 +452,10 @@ export class Parser implements Callbacks {
|
|
|
327
452
|
this.tagname = "";
|
|
328
453
|
}
|
|
329
454
|
|
|
330
|
-
/**
|
|
455
|
+
/**
|
|
456
|
+
* @param endIndex End index for the current parser event.
|
|
457
|
+
* @internal
|
|
458
|
+
*/
|
|
331
459
|
onopentagend(endIndex: number): void {
|
|
332
460
|
this.endIndex = endIndex;
|
|
333
461
|
this.endOpenTag(false);
|
|
@@ -336,32 +464,22 @@ export class Parser implements Callbacks {
|
|
|
336
464
|
this.startIndex = endIndex + 1;
|
|
337
465
|
}
|
|
338
466
|
|
|
339
|
-
/**
|
|
467
|
+
/**
|
|
468
|
+
* @param start Start index for the current parser event.
|
|
469
|
+
* @param endIndex End index for the current parser event.
|
|
470
|
+
* @internal
|
|
471
|
+
*/
|
|
340
472
|
onclosetag(start: number, endIndex: number): void {
|
|
341
473
|
this.endIndex = endIndex;
|
|
342
|
-
|
|
343
|
-
let name = this.getSlice(start, endIndex);
|
|
344
|
-
|
|
345
|
-
if (this.lowerCaseTagNames) {
|
|
346
|
-
name = name.toLowerCase();
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
if (
|
|
350
|
-
this.htmlMode &&
|
|
351
|
-
(foreignContextElements.has(name) ||
|
|
352
|
-
htmlIntegrationElements.has(name))
|
|
353
|
-
) {
|
|
354
|
-
this.foreignContext.shift();
|
|
355
|
-
}
|
|
474
|
+
const name = this.readTagName(start, endIndex);
|
|
356
475
|
|
|
357
476
|
if (!this.isVoidElement(name)) {
|
|
358
477
|
const pos = this.stack.indexOf(name);
|
|
359
478
|
if (pos !== -1) {
|
|
360
|
-
for (let index = 0; index
|
|
361
|
-
|
|
362
|
-
// We know the stack has sufficient elements.
|
|
363
|
-
this.cbs.onclosetag?.(element, index !== pos);
|
|
479
|
+
for (let index = 0; index < pos; index++) {
|
|
480
|
+
this.popElement(true);
|
|
364
481
|
}
|
|
482
|
+
this.popElement(false);
|
|
365
483
|
} else if (this.htmlMode && name === "p") {
|
|
366
484
|
// Implicit open before close
|
|
367
485
|
this.emitOpenTag("p");
|
|
@@ -378,10 +496,13 @@ export class Parser implements Callbacks {
|
|
|
378
496
|
this.startIndex = endIndex + 1;
|
|
379
497
|
}
|
|
380
498
|
|
|
381
|
-
/**
|
|
499
|
+
/**
|
|
500
|
+
* @param endIndex End index for the current parser event.
|
|
501
|
+
* @internal
|
|
502
|
+
*/
|
|
382
503
|
onselfclosingtag(endIndex: number): void {
|
|
383
504
|
this.endIndex = endIndex;
|
|
384
|
-
if (this.recognizeSelfClosing || this.
|
|
505
|
+
if (this.recognizeSelfClosing || this.isInForeignContext()) {
|
|
385
506
|
this.closeCurrentTag(false);
|
|
386
507
|
|
|
387
508
|
// Set `startIndex` for next node
|
|
@@ -392,19 +513,39 @@ export class Parser implements Callbacks {
|
|
|
392
513
|
}
|
|
393
514
|
}
|
|
394
515
|
|
|
516
|
+
/**
|
|
517
|
+
* Pop the top element off the stack, emit a close event, and maintain
|
|
518
|
+
* the foreign context stack.
|
|
519
|
+
* @param implied Whether this close is implied (not from an explicit end tag).
|
|
520
|
+
*/
|
|
521
|
+
private popElement(implied: boolean): void {
|
|
522
|
+
// biome-ignore lint/style/noNonNullAssertion: The element is guaranteed to exist.
|
|
523
|
+
const element = this.stack.shift()!;
|
|
524
|
+
if (
|
|
525
|
+
this.htmlMode &&
|
|
526
|
+
(foreignContextElements.has(element) ||
|
|
527
|
+
htmlIntegrationElements.has(element))
|
|
528
|
+
) {
|
|
529
|
+
this.foreignContext.shift();
|
|
530
|
+
}
|
|
531
|
+
this.cbs.onclosetag?.(element, implied);
|
|
532
|
+
}
|
|
533
|
+
|
|
395
534
|
private closeCurrentTag(isOpenImplied: boolean) {
|
|
396
535
|
const name = this.tagname;
|
|
397
536
|
this.endOpenTag(isOpenImplied);
|
|
398
537
|
|
|
399
538
|
// Self-closing tags will be on the top of the stack
|
|
400
539
|
if (this.stack[0] === name) {
|
|
401
|
-
|
|
402
|
-
this.cbs.onclosetag?.(name, !isOpenImplied);
|
|
403
|
-
this.stack.shift();
|
|
540
|
+
this.popElement(!isOpenImplied);
|
|
404
541
|
}
|
|
405
542
|
}
|
|
406
543
|
|
|
407
|
-
/**
|
|
544
|
+
/**
|
|
545
|
+
* @param start Start index for the current parser event.
|
|
546
|
+
* @param endIndex End index for the current parser event.
|
|
547
|
+
* @internal
|
|
548
|
+
*/
|
|
408
549
|
onattribname(start: number, endIndex: number): void {
|
|
409
550
|
this.startIndex = start;
|
|
410
551
|
const name = this.getSlice(start, endIndex);
|
|
@@ -414,17 +555,28 @@ export class Parser implements Callbacks {
|
|
|
414
555
|
: name;
|
|
415
556
|
}
|
|
416
557
|
|
|
417
|
-
/**
|
|
558
|
+
/**
|
|
559
|
+
* @param start Start index for the current parser event.
|
|
560
|
+
* @param endIndex End index for the current parser event.
|
|
561
|
+
* @internal
|
|
562
|
+
*/
|
|
418
563
|
onattribdata(start: number, endIndex: number): void {
|
|
419
564
|
this.attribvalue += this.getSlice(start, endIndex);
|
|
420
565
|
}
|
|
421
566
|
|
|
422
|
-
/**
|
|
567
|
+
/**
|
|
568
|
+
* @param cp Current Unicode code point.
|
|
569
|
+
* @internal
|
|
570
|
+
*/
|
|
423
571
|
onattribentity(cp: number): void {
|
|
424
572
|
this.attribvalue += fromCodePoint(cp);
|
|
425
573
|
}
|
|
426
574
|
|
|
427
|
-
/**
|
|
575
|
+
/**
|
|
576
|
+
* @param quote Quote type used for the current attribute.
|
|
577
|
+
* @param endIndex End index for the current parser event.
|
|
578
|
+
* @internal
|
|
579
|
+
*/
|
|
428
580
|
onattribend(quote: QuoteType, endIndex: number): void {
|
|
429
581
|
this.endIndex = endIndex;
|
|
430
582
|
|
|
@@ -440,10 +592,7 @@ export class Parser implements Callbacks {
|
|
|
440
592
|
: null,
|
|
441
593
|
);
|
|
442
594
|
|
|
443
|
-
if (
|
|
444
|
-
this.attribs &&
|
|
445
|
-
!Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)
|
|
446
|
-
) {
|
|
595
|
+
if (this.attribs && !Object.hasOwn(this.attribs, this.attribname)) {
|
|
447
596
|
this.attribs[this.attribname] = this.attribvalue;
|
|
448
597
|
}
|
|
449
598
|
this.attribvalue = "";
|
|
@@ -460,13 +609,25 @@ export class Parser implements Callbacks {
|
|
|
460
609
|
return name;
|
|
461
610
|
}
|
|
462
611
|
|
|
463
|
-
/**
|
|
612
|
+
/**
|
|
613
|
+
* @param start Start index for the current parser event.
|
|
614
|
+
* @param endIndex End index for the current parser event.
|
|
615
|
+
* @internal
|
|
616
|
+
*/
|
|
464
617
|
ondeclaration(start: number, endIndex: number): void {
|
|
465
618
|
this.endIndex = endIndex;
|
|
466
619
|
const value = this.getSlice(start, endIndex);
|
|
467
620
|
|
|
468
621
|
if (this.cbs.onprocessinginstruction) {
|
|
469
|
-
|
|
622
|
+
/*
|
|
623
|
+
* In HTML mode, ondeclaration is only reached for DOCTYPE
|
|
624
|
+
* (the tokenizer routes everything else to bogus comments).
|
|
625
|
+
*/
|
|
626
|
+
const name = this.htmlMode
|
|
627
|
+
? this.lowerCaseTagNames
|
|
628
|
+
? DOCUMENT_TYPE
|
|
629
|
+
: value.slice(0, DOCUMENT_TYPE.length)
|
|
630
|
+
: this.getInstructionName(value);
|
|
470
631
|
this.cbs.onprocessinginstruction(`!${name}`, `!${value}`);
|
|
471
632
|
}
|
|
472
633
|
|
|
@@ -474,7 +635,11 @@ export class Parser implements Callbacks {
|
|
|
474
635
|
this.startIndex = endIndex + 1;
|
|
475
636
|
}
|
|
476
637
|
|
|
477
|
-
/**
|
|
638
|
+
/**
|
|
639
|
+
* @param start Start index for the current parser event.
|
|
640
|
+
* @param endIndex End index for the current parser event.
|
|
641
|
+
* @internal
|
|
642
|
+
*/
|
|
478
643
|
onprocessinginstruction(start: number, endIndex: number): void {
|
|
479
644
|
this.endIndex = endIndex;
|
|
480
645
|
const value = this.getSlice(start, endIndex);
|
|
@@ -488,7 +653,12 @@ export class Parser implements Callbacks {
|
|
|
488
653
|
this.startIndex = endIndex + 1;
|
|
489
654
|
}
|
|
490
655
|
|
|
491
|
-
/**
|
|
656
|
+
/**
|
|
657
|
+
* @param start Start index for the current parser event.
|
|
658
|
+
* @param endIndex End index for the current parser event.
|
|
659
|
+
* @param offset Offset applied when computing parser indices.
|
|
660
|
+
* @internal
|
|
661
|
+
*/
|
|
492
662
|
oncomment(start: number, endIndex: number, offset: number): void {
|
|
493
663
|
this.endIndex = endIndex;
|
|
494
664
|
|
|
@@ -499,7 +669,12 @@ export class Parser implements Callbacks {
|
|
|
499
669
|
this.startIndex = endIndex + 1;
|
|
500
670
|
}
|
|
501
671
|
|
|
502
|
-
/**
|
|
672
|
+
/**
|
|
673
|
+
* @param start Start index for the current parser event.
|
|
674
|
+
* @param endIndex End index for the current parser event.
|
|
675
|
+
* @param offset Offset applied when computing parser indices.
|
|
676
|
+
* @internal
|
|
677
|
+
*/
|
|
503
678
|
oncdata(start: number, endIndex: number, offset: number): void {
|
|
504
679
|
this.endIndex = endIndex;
|
|
505
680
|
const value = this.getSlice(start, endIndex - offset);
|
|
@@ -508,6 +683,8 @@ export class Parser implements Callbacks {
|
|
|
508
683
|
this.cbs.oncdatastart?.();
|
|
509
684
|
this.cbs.ontext?.(value);
|
|
510
685
|
this.cbs.oncdataend?.();
|
|
686
|
+
} else if (this.isInForeignContext()) {
|
|
687
|
+
this.cbs.ontext?.(value);
|
|
511
688
|
} else {
|
|
512
689
|
this.cbs.oncomment?.(`[CDATA[${value}]]`);
|
|
513
690
|
this.cbs.oncommentend?.();
|
|
@@ -532,11 +709,12 @@ export class Parser implements Callbacks {
|
|
|
532
709
|
/**
|
|
533
710
|
* Resets the parser to a blank state, ready to parse a new HTML document
|
|
534
711
|
*/
|
|
535
|
-
|
|
712
|
+
reset(): void {
|
|
536
713
|
this.cbs.onreset?.();
|
|
537
714
|
this.tokenizer.reset();
|
|
538
715
|
this.tagname = "";
|
|
539
716
|
this.attribname = "";
|
|
717
|
+
this.attribvalue = "";
|
|
540
718
|
this.attribs = null;
|
|
541
719
|
this.stack.length = 0;
|
|
542
720
|
this.startIndex = 0;
|
|
@@ -544,7 +722,7 @@ export class Parser implements Callbacks {
|
|
|
544
722
|
this.cbs.onparserinit?.(this);
|
|
545
723
|
this.buffers.length = 0;
|
|
546
724
|
this.foreignContext.length = 0;
|
|
547
|
-
this.foreignContext.unshift(
|
|
725
|
+
this.foreignContext.unshift(ForeignContext.None);
|
|
548
726
|
this.bufferOffset = 0;
|
|
549
727
|
this.writeIndex = 0;
|
|
550
728
|
this.ended = false;
|
|
@@ -553,15 +731,18 @@ export class Parser implements Callbacks {
|
|
|
553
731
|
/**
|
|
554
732
|
* Resets the parser, then parses a complete document and
|
|
555
733
|
* pushes it to the handler.
|
|
556
|
-
*
|
|
557
734
|
* @param data Document to parse.
|
|
558
735
|
*/
|
|
559
|
-
|
|
736
|
+
parseComplete(data: string): void {
|
|
560
737
|
this.reset();
|
|
561
738
|
this.end(data);
|
|
562
739
|
}
|
|
563
740
|
|
|
564
741
|
private getSlice(start: number, end: number) {
|
|
742
|
+
if (start === end) {
|
|
743
|
+
return "";
|
|
744
|
+
}
|
|
745
|
+
|
|
565
746
|
while (start - this.bufferOffset >= this.buffers[0].length) {
|
|
566
747
|
this.shiftBuffer();
|
|
567
748
|
}
|
|
@@ -587,10 +768,9 @@ export class Parser implements Callbacks {
|
|
|
587
768
|
|
|
588
769
|
/**
|
|
589
770
|
* Parses a chunk of data and calls the corresponding callbacks.
|
|
590
|
-
*
|
|
591
771
|
* @param chunk Chunk to parse.
|
|
592
772
|
*/
|
|
593
|
-
|
|
773
|
+
write(chunk: string): void {
|
|
594
774
|
if (this.ended) {
|
|
595
775
|
this.cbs.onerror?.(new Error(".write() after done!"));
|
|
596
776
|
return;
|
|
@@ -605,10 +785,9 @@ export class Parser implements Callbacks {
|
|
|
605
785
|
|
|
606
786
|
/**
|
|
607
787
|
* Parses the end of the buffer and clears the stack, calls onend.
|
|
608
|
-
*
|
|
609
788
|
* @param chunk Optional final chunk to parse.
|
|
610
789
|
*/
|
|
611
|
-
|
|
790
|
+
end(chunk?: string): void {
|
|
612
791
|
if (this.ended) {
|
|
613
792
|
this.cbs.onerror?.(new Error(".end() after done!"));
|
|
614
793
|
return;
|
|
@@ -622,14 +801,14 @@ export class Parser implements Callbacks {
|
|
|
622
801
|
/**
|
|
623
802
|
* Pauses parsing. The parser won't emit events until `resume` is called.
|
|
624
803
|
*/
|
|
625
|
-
|
|
804
|
+
pause(): void {
|
|
626
805
|
this.tokenizer.pause();
|
|
627
806
|
}
|
|
628
807
|
|
|
629
808
|
/**
|
|
630
809
|
* Resumes parsing after `pause` was called.
|
|
631
810
|
*/
|
|
632
|
-
|
|
811
|
+
resume(): void {
|
|
633
812
|
this.tokenizer.resume();
|
|
634
813
|
|
|
635
814
|
while (
|
|
@@ -641,23 +820,4 @@ export class Parser implements Callbacks {
|
|
|
641
820
|
|
|
642
821
|
if (this.ended) this.tokenizer.end();
|
|
643
822
|
}
|
|
644
|
-
|
|
645
|
-
/**
|
|
646
|
-
* Alias of `write`, for backwards compatibility.
|
|
647
|
-
*
|
|
648
|
-
* @param chunk Chunk to parse.
|
|
649
|
-
* @deprecated
|
|
650
|
-
*/
|
|
651
|
-
public parseChunk(chunk: string): void {
|
|
652
|
-
this.write(chunk);
|
|
653
|
-
}
|
|
654
|
-
/**
|
|
655
|
-
* Alias of `end`, for backwards compatibility.
|
|
656
|
-
*
|
|
657
|
-
* @param chunk Optional final chunk to parse.
|
|
658
|
-
* @deprecated
|
|
659
|
-
*/
|
|
660
|
-
public done(chunk?: string): void {
|
|
661
|
-
this.end(chunk);
|
|
662
|
-
}
|
|
663
823
|
}
|