@zowe/cli 8.36.1 → 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/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/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
package/node_modules/{domutils/lib/helpers.js → sanitize-html/node_modules/domutils/src/helpers.ts}
RENAMED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.DocumentPosition = void 0;
|
|
4
|
-
exports.removeSubsets = removeSubsets;
|
|
5
|
-
exports.compareDocumentPosition = compareDocumentPosition;
|
|
6
|
-
exports.uniqueSort = uniqueSort;
|
|
7
|
-
var domhandler_1 = require("domhandler");
|
|
1
|
+
import { type AnyNode, hasChildren, type ParentNode } from "domhandler";
|
|
2
|
+
|
|
8
3
|
/**
|
|
9
4
|
* Given an array of nodes, remove any member that is contained by another
|
|
10
5
|
* member.
|
|
@@ -13,44 +8,48 @@ var domhandler_1 = require("domhandler");
|
|
|
13
8
|
* @param nodes Nodes to filter.
|
|
14
9
|
* @returns Remaining nodes that aren't contained by other nodes.
|
|
15
10
|
*/
|
|
16
|
-
function removeSubsets(nodes) {
|
|
17
|
-
|
|
11
|
+
export function removeSubsets(nodes: AnyNode[]): AnyNode[] {
|
|
12
|
+
let index = nodes.length;
|
|
13
|
+
|
|
18
14
|
/*
|
|
19
15
|
* Check if each node (or one of its ancestors) is already contained in the
|
|
20
16
|
* array.
|
|
21
17
|
*/
|
|
22
|
-
while (--
|
|
23
|
-
|
|
18
|
+
while (--index >= 0) {
|
|
19
|
+
const node = nodes[index];
|
|
20
|
+
|
|
24
21
|
/*
|
|
25
22
|
* Remove the node if it is not unique.
|
|
26
23
|
* We are going through the array from the end, so we only
|
|
27
24
|
* have to check nodes that preceed the node under consideration in the array.
|
|
28
25
|
*/
|
|
29
|
-
if (
|
|
30
|
-
nodes.splice(
|
|
26
|
+
if (index > 0 && nodes.lastIndexOf(node, index - 1) >= 0) {
|
|
27
|
+
nodes.splice(index, 1);
|
|
31
28
|
continue;
|
|
32
29
|
}
|
|
33
|
-
|
|
30
|
+
|
|
31
|
+
for (let ancestor = node.parent; ancestor; ancestor = ancestor.parent) {
|
|
34
32
|
if (nodes.includes(ancestor)) {
|
|
35
|
-
nodes.splice(
|
|
33
|
+
nodes.splice(index, 1);
|
|
36
34
|
break;
|
|
37
35
|
}
|
|
38
36
|
}
|
|
39
37
|
}
|
|
38
|
+
|
|
40
39
|
return nodes;
|
|
41
40
|
}
|
|
42
41
|
/**
|
|
43
42
|
* @category Helpers
|
|
44
43
|
* @see {@link http://dom.spec.whatwg.org/#dom-node-comparedocumentposition}
|
|
45
44
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
export const enum DocumentPosition {
|
|
46
|
+
DISCONNECTED = 1,
|
|
47
|
+
PRECEDING = 2,
|
|
48
|
+
FOLLOWING = 4,
|
|
49
|
+
CONTAINS = 8,
|
|
50
|
+
CONTAINED_BY = 16,
|
|
51
|
+
}
|
|
52
|
+
|
|
54
53
|
/**
|
|
55
54
|
* Compare the position of one node against another node in any other document,
|
|
56
55
|
* returning a bitmask with the values from {@link DocumentPosition}.
|
|
@@ -77,34 +76,43 @@ var DocumentPosition;
|
|
|
77
76
|
* See http://dom.spec.whatwg.org/#dom-node-comparedocumentposition for
|
|
78
77
|
* a description of these values.
|
|
79
78
|
*/
|
|
80
|
-
function compareDocumentPosition(
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
export function compareDocumentPosition(
|
|
80
|
+
nodeA: AnyNode,
|
|
81
|
+
nodeB: AnyNode,
|
|
82
|
+
): number {
|
|
83
|
+
const aParents: ParentNode[] = [];
|
|
84
|
+
const bParents: ParentNode[] = [];
|
|
85
|
+
|
|
83
86
|
if (nodeA === nodeB) {
|
|
84
87
|
return 0;
|
|
85
88
|
}
|
|
86
|
-
|
|
89
|
+
|
|
90
|
+
let current = hasChildren(nodeA) ? nodeA : nodeA.parent;
|
|
87
91
|
while (current) {
|
|
88
92
|
aParents.unshift(current);
|
|
89
93
|
current = current.parent;
|
|
90
94
|
}
|
|
91
|
-
current =
|
|
95
|
+
current = hasChildren(nodeB) ? nodeB : nodeB.parent;
|
|
92
96
|
while (current) {
|
|
93
97
|
bParents.unshift(current);
|
|
94
98
|
current = current.parent;
|
|
95
99
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
|
|
101
|
+
const maxIndex = Math.min(aParents.length, bParents.length);
|
|
102
|
+
let index = 0;
|
|
103
|
+
while (index < maxIndex && aParents[index] === bParents[index]) {
|
|
104
|
+
index++;
|
|
100
105
|
}
|
|
101
|
-
|
|
106
|
+
|
|
107
|
+
if (index === 0) {
|
|
102
108
|
return DocumentPosition.DISCONNECTED;
|
|
103
109
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
110
|
+
|
|
111
|
+
const sharedParent = aParents[index - 1];
|
|
112
|
+
const siblings: AnyNode[] = sharedParent.children;
|
|
113
|
+
const aSibling = aParents[index];
|
|
114
|
+
const bSibling = bParents[index];
|
|
115
|
+
|
|
108
116
|
if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) {
|
|
109
117
|
if (sharedParent === nodeB) {
|
|
110
118
|
return DocumentPosition.FOLLOWING | DocumentPosition.CONTAINED_BY;
|
|
@@ -116,6 +124,7 @@ function compareDocumentPosition(nodeA, nodeB) {
|
|
|
116
124
|
}
|
|
117
125
|
return DocumentPosition.PRECEDING;
|
|
118
126
|
}
|
|
127
|
+
|
|
119
128
|
/**
|
|
120
129
|
* Sort an array of nodes based on their relative position in the document,
|
|
121
130
|
* removing any duplicate nodes. If the array contains nodes that do not belong
|
|
@@ -125,18 +134,21 @@ function compareDocumentPosition(nodeA, nodeB) {
|
|
|
125
134
|
* @param nodes Array of DOM nodes.
|
|
126
135
|
* @returns Collection of unique nodes, sorted in document order.
|
|
127
136
|
*/
|
|
128
|
-
function uniqueSort(nodes) {
|
|
129
|
-
nodes = nodes.filter(
|
|
130
|
-
|
|
131
|
-
|
|
137
|
+
export function uniqueSort<T extends AnyNode>(nodes: T[]): T[] {
|
|
138
|
+
nodes = nodes.filter(
|
|
139
|
+
(node, index, array) => !array.includes(node, index + 1),
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
nodes.sort((a, b) => {
|
|
143
|
+
const relative = compareDocumentPosition(a, b);
|
|
132
144
|
if (relative & DocumentPosition.PRECEDING) {
|
|
133
145
|
return -1;
|
|
134
146
|
}
|
|
135
|
-
|
|
147
|
+
if (relative & DocumentPosition.FOLLOWING) {
|
|
136
148
|
return 1;
|
|
137
149
|
}
|
|
138
150
|
return 0;
|
|
139
151
|
});
|
|
152
|
+
|
|
140
153
|
return nodes;
|
|
141
154
|
}
|
|
142
|
-
//# sourceMappingURL=helpers.js.map
|
package/node_modules/{domutils/lib/index.d.ts → sanitize-html/node_modules/domutils/src/index.ts}
RENAMED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
1
|
+
export * from "./feeds.js";
|
|
2
|
+
export * from "./helpers.js";
|
|
3
|
+
export * from "./legacy.js";
|
|
3
4
|
export * from "./manipulation.js";
|
|
4
5
|
export * from "./querying.js";
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./feeds.js";
|
|
8
|
-
/** @deprecated Use these methods from `domhandler` directly. */
|
|
9
|
-
export { isTag, isCDATA, isText, isComment, isDocument, hasChildren, } from "domhandler";
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
6
|
+
export * from "./stringify.js";
|
|
7
|
+
export * from "./traversal.js";
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import type { ElementType } from "domelementtype";
|
|
2
|
+
import { type AnyNode, type Element, isTag, isText } from "domhandler";
|
|
3
|
+
import { filter, findOne } from "./querying.js";
|
|
4
|
+
|
|
5
|
+
type TestType = (element: AnyNode) => boolean;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* An object with keys to check elements against. If a key is `tag_name`,
|
|
9
|
+
* `tag_type` or `tag_contains`, it will check the value against that specific
|
|
10
|
+
* value. Otherwise, it will check an attribute with the key's name.
|
|
11
|
+
*
|
|
12
|
+
* @category Legacy Query Functions
|
|
13
|
+
*/
|
|
14
|
+
// eslint-disable-next-line unicorn/prevent-abbreviations -- Keep the exported API name for backwards compatibility.
|
|
15
|
+
export interface TestElementOpts {
|
|
16
|
+
tag_name?: string | ((name: string) => boolean);
|
|
17
|
+
tag_type?: string | ((name: string) => boolean);
|
|
18
|
+
tag_contains?: string | ((data?: string) => boolean);
|
|
19
|
+
[attributeName: string]:
|
|
20
|
+
| undefined
|
|
21
|
+
| string
|
|
22
|
+
| ((attributeValue: string) => boolean);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* A map of functions to check nodes against.
|
|
27
|
+
*/
|
|
28
|
+
const Checks: Record<
|
|
29
|
+
string,
|
|
30
|
+
(value: string | undefined | ((inputString: string) => boolean)) => TestType
|
|
31
|
+
> = {
|
|
32
|
+
tag_name(name) {
|
|
33
|
+
if (typeof name === "function") {
|
|
34
|
+
return (element: AnyNode) => isTag(element) && name(element.name);
|
|
35
|
+
}
|
|
36
|
+
if (name === "*") {
|
|
37
|
+
return isTag;
|
|
38
|
+
}
|
|
39
|
+
return (element: AnyNode) => isTag(element) && element.name === name;
|
|
40
|
+
},
|
|
41
|
+
tag_type(type) {
|
|
42
|
+
if (typeof type === "function") {
|
|
43
|
+
return (element: AnyNode) => type(element.type);
|
|
44
|
+
}
|
|
45
|
+
return (element: AnyNode) => element.type === type;
|
|
46
|
+
},
|
|
47
|
+
tag_contains(data) {
|
|
48
|
+
if (typeof data === "function") {
|
|
49
|
+
return (element: AnyNode) => isText(element) && data(element.data);
|
|
50
|
+
}
|
|
51
|
+
return (element: AnyNode) => isText(element) && element.data === data;
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Returns a function to check whether a node has an attribute with a particular
|
|
57
|
+
* value.
|
|
58
|
+
*
|
|
59
|
+
* @param attrib Attribute to check.
|
|
60
|
+
* @param value Attribute value to look for.
|
|
61
|
+
* @returns A function to check whether the a node has an attribute with a
|
|
62
|
+
* particular value.
|
|
63
|
+
*/
|
|
64
|
+
function getAttribCheck(
|
|
65
|
+
attrib: string,
|
|
66
|
+
value: undefined | string | ((value: string) => boolean),
|
|
67
|
+
): TestType {
|
|
68
|
+
if (typeof value === "function") {
|
|
69
|
+
return (element: AnyNode) =>
|
|
70
|
+
isTag(element) && value(element.attribs[attrib]);
|
|
71
|
+
}
|
|
72
|
+
return (element: AnyNode) =>
|
|
73
|
+
isTag(element) && element.attribs[attrib] === value;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Returns a function that returns `true` if either of the input functions
|
|
78
|
+
* returns `true` for a node.
|
|
79
|
+
*
|
|
80
|
+
* @param a First function to combine.
|
|
81
|
+
* @param b Second function to combine.
|
|
82
|
+
* @returns A function taking a node and returning `true` if either of the input
|
|
83
|
+
* functions returns `true` for the node.
|
|
84
|
+
*/
|
|
85
|
+
function combineFuncs(a: TestType, b: TestType): TestType {
|
|
86
|
+
return (element: AnyNode) => a(element) || b(element);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Returns a function that executes all checks in `options` and returns `true`
|
|
91
|
+
* if any of them match a node.
|
|
92
|
+
*
|
|
93
|
+
* @param options An object describing nodes to look for.
|
|
94
|
+
* @returns A function that executes all checks in `options` and returns `true`
|
|
95
|
+
* if any of them match a node.
|
|
96
|
+
*/
|
|
97
|
+
function compileTest(options: TestElementOpts): TestType | null {
|
|
98
|
+
const funcs = Object.keys(options).map((key) => {
|
|
99
|
+
const value = options[key];
|
|
100
|
+
return Object.hasOwn(Checks, key)
|
|
101
|
+
? Checks[key](value)
|
|
102
|
+
: getAttribCheck(key, value);
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
return funcs.length === 0 ? null : funcs.reduce(combineFuncs);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Checks whether a node matches the description in `options`.
|
|
110
|
+
*
|
|
111
|
+
* @category Legacy Query Functions
|
|
112
|
+
* @param options An object describing nodes to look for.
|
|
113
|
+
* @param node The element to test.
|
|
114
|
+
* @returns Whether the element matches the description in `options`.
|
|
115
|
+
*/
|
|
116
|
+
export function testElement(options: TestElementOpts, node: AnyNode): boolean {
|
|
117
|
+
const test = compileTest(options);
|
|
118
|
+
return test ? test(node) : true;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Returns all nodes that match `options`.
|
|
123
|
+
*
|
|
124
|
+
* @category Legacy Query Functions
|
|
125
|
+
* @param options An object describing nodes to look for.
|
|
126
|
+
* @param nodes Nodes to search through.
|
|
127
|
+
* @param recurse Also consider child nodes.
|
|
128
|
+
* @param limit Maximum number of nodes to return.
|
|
129
|
+
* @returns All nodes that match `options`.
|
|
130
|
+
*/
|
|
131
|
+
export function getElements(
|
|
132
|
+
options: TestElementOpts,
|
|
133
|
+
nodes: AnyNode | AnyNode[],
|
|
134
|
+
recurse: boolean,
|
|
135
|
+
limit: number = Number.POSITIVE_INFINITY,
|
|
136
|
+
): AnyNode[] {
|
|
137
|
+
const test = compileTest(options);
|
|
138
|
+
return test ? filter(test, nodes, recurse, limit) : [];
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Returns the node with the supplied ID.
|
|
143
|
+
*
|
|
144
|
+
* @category Legacy Query Functions
|
|
145
|
+
* @param id The unique ID attribute value to look for.
|
|
146
|
+
* @param nodes Nodes to search through.
|
|
147
|
+
* @param recurse Also consider child nodes.
|
|
148
|
+
* @returns The node with the supplied ID.
|
|
149
|
+
*/
|
|
150
|
+
export function getElementById(
|
|
151
|
+
id: string | ((id: string) => boolean),
|
|
152
|
+
nodes: AnyNode | AnyNode[],
|
|
153
|
+
recurse = true,
|
|
154
|
+
): Element | null {
|
|
155
|
+
if (!Array.isArray(nodes)) nodes = [nodes];
|
|
156
|
+
return findOne(getAttribCheck("id", id), nodes, recurse);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Returns all nodes with the supplied `tagName`.
|
|
161
|
+
*
|
|
162
|
+
* @category Legacy Query Functions
|
|
163
|
+
* @param tagName Tag name to search for.
|
|
164
|
+
* @param nodes Nodes to search through.
|
|
165
|
+
* @param recurse Also consider child nodes.
|
|
166
|
+
* @param limit Maximum number of nodes to return.
|
|
167
|
+
* @returns All nodes with the supplied `tagName`.
|
|
168
|
+
*/
|
|
169
|
+
export function getElementsByTagName(
|
|
170
|
+
tagName: string | ((name: string) => boolean),
|
|
171
|
+
nodes: AnyNode | AnyNode[],
|
|
172
|
+
recurse = true,
|
|
173
|
+
limit: number = Number.POSITIVE_INFINITY,
|
|
174
|
+
): Element[] {
|
|
175
|
+
return filter(
|
|
176
|
+
Checks["tag_name"](tagName),
|
|
177
|
+
nodes,
|
|
178
|
+
recurse,
|
|
179
|
+
limit,
|
|
180
|
+
) as Element[];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Returns all nodes with the supplied `className`.
|
|
185
|
+
*
|
|
186
|
+
* @category Legacy Query Functions
|
|
187
|
+
* @param className Class name to search for.
|
|
188
|
+
* @param nodes Nodes to search through.
|
|
189
|
+
* @param recurse Also consider child nodes.
|
|
190
|
+
* @param limit Maximum number of nodes to return.
|
|
191
|
+
* @returns All nodes with the supplied `className`.
|
|
192
|
+
*/
|
|
193
|
+
export function getElementsByClassName(
|
|
194
|
+
className: string | ((name: string) => boolean),
|
|
195
|
+
nodes: AnyNode | AnyNode[],
|
|
196
|
+
recurse = true,
|
|
197
|
+
limit: number = Number.POSITIVE_INFINITY,
|
|
198
|
+
): Element[] {
|
|
199
|
+
return filter(
|
|
200
|
+
getAttribCheck("class", className),
|
|
201
|
+
nodes,
|
|
202
|
+
recurse,
|
|
203
|
+
limit,
|
|
204
|
+
) as Element[];
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Returns all nodes with the supplied `type`.
|
|
209
|
+
*
|
|
210
|
+
* @category Legacy Query Functions
|
|
211
|
+
* @param type Element type to look for.
|
|
212
|
+
* @param nodes Nodes to search through.
|
|
213
|
+
* @param recurse Also consider child nodes.
|
|
214
|
+
* @param limit Maximum number of nodes to return.
|
|
215
|
+
* @returns All nodes with the supplied `type`.
|
|
216
|
+
*/
|
|
217
|
+
export function getElementsByTagType(
|
|
218
|
+
type: ElementType | ((type: ElementType) => boolean),
|
|
219
|
+
nodes: AnyNode | AnyNode[],
|
|
220
|
+
recurse = true,
|
|
221
|
+
limit: number = Number.POSITIVE_INFINITY,
|
|
222
|
+
): AnyNode[] {
|
|
223
|
+
return filter(Checks["tag_type"](type as string), nodes, recurse, limit);
|
|
224
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import type { ChildNode, ParentNode } from "domhandler";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Remove an element from the dom
|
|
5
|
+
*
|
|
6
|
+
* @category Manipulation
|
|
7
|
+
* @param element The element to be removed.
|
|
8
|
+
*/
|
|
9
|
+
export function removeElement(element: ChildNode): void {
|
|
10
|
+
if (element.prev) element.prev.next = element.next;
|
|
11
|
+
if (element.next) element.next.prev = element.prev;
|
|
12
|
+
|
|
13
|
+
if (element.parent) {
|
|
14
|
+
const childs = element.parent.children;
|
|
15
|
+
const childsIndex = childs.lastIndexOf(element);
|
|
16
|
+
if (childsIndex !== -1) {
|
|
17
|
+
childs.splice(childsIndex, 1);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
element.next = null;
|
|
21
|
+
element.prev = null;
|
|
22
|
+
element.parent = null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Replace an element in the dom
|
|
27
|
+
*
|
|
28
|
+
* @category Manipulation
|
|
29
|
+
* @param element The element to be replaced.
|
|
30
|
+
* @param replacement The element to be added
|
|
31
|
+
*/
|
|
32
|
+
export function replaceElement(
|
|
33
|
+
element: ChildNode,
|
|
34
|
+
replacement: ChildNode,
|
|
35
|
+
): void {
|
|
36
|
+
replacement.prev = element.prev;
|
|
37
|
+
if (replacement.prev) {
|
|
38
|
+
replacement.prev.next = replacement;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
replacement.next = element.next;
|
|
42
|
+
if (replacement.next) {
|
|
43
|
+
replacement.next.prev = replacement;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
replacement.parent = element.parent;
|
|
47
|
+
if (replacement.parent) {
|
|
48
|
+
const { children } = replacement.parent;
|
|
49
|
+
const elementIndex = children.lastIndexOf(element);
|
|
50
|
+
if (elementIndex === -1) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
children[elementIndex] = replacement;
|
|
55
|
+
element.parent = null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Append a child to an element.
|
|
61
|
+
*
|
|
62
|
+
* @category Manipulation
|
|
63
|
+
* @param parent The element to append to.
|
|
64
|
+
* @param child The element to be added as a child.
|
|
65
|
+
*/
|
|
66
|
+
export function appendChild(parent: ParentNode, child: ChildNode): void {
|
|
67
|
+
removeElement(child);
|
|
68
|
+
|
|
69
|
+
child.next = null;
|
|
70
|
+
child.parent = parent;
|
|
71
|
+
|
|
72
|
+
if (parent.children.push(child) > 1) {
|
|
73
|
+
const sibling = parent.children[parent.children.length - 2];
|
|
74
|
+
sibling.next = child;
|
|
75
|
+
child.prev = sibling;
|
|
76
|
+
} else {
|
|
77
|
+
child.prev = null;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Append an element after another.
|
|
83
|
+
*
|
|
84
|
+
* @category Manipulation
|
|
85
|
+
* @param element The element to append after.
|
|
86
|
+
* @param next The element be added.
|
|
87
|
+
*/
|
|
88
|
+
export function append(element: ChildNode, next: ChildNode): void {
|
|
89
|
+
removeElement(next);
|
|
90
|
+
|
|
91
|
+
const { parent } = element;
|
|
92
|
+
const currentNext = element.next;
|
|
93
|
+
|
|
94
|
+
next.next = currentNext;
|
|
95
|
+
next.prev = element;
|
|
96
|
+
element.next = next;
|
|
97
|
+
next.parent = parent;
|
|
98
|
+
|
|
99
|
+
if (currentNext) {
|
|
100
|
+
currentNext.prev = next;
|
|
101
|
+
if (parent) {
|
|
102
|
+
const childs = parent.children;
|
|
103
|
+
childs.splice(childs.lastIndexOf(currentNext), 0, next);
|
|
104
|
+
}
|
|
105
|
+
} else if (parent) {
|
|
106
|
+
parent.children.push(next);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Prepend a child to an element.
|
|
112
|
+
*
|
|
113
|
+
* @category Manipulation
|
|
114
|
+
* @param parent The element to prepend before.
|
|
115
|
+
* @param child The element to be added as a child.
|
|
116
|
+
*/
|
|
117
|
+
export function prependChild(parent: ParentNode, child: ChildNode): void {
|
|
118
|
+
removeElement(child);
|
|
119
|
+
|
|
120
|
+
child.parent = parent;
|
|
121
|
+
child.prev = null;
|
|
122
|
+
|
|
123
|
+
if (parent.children.unshift(child) === 1) {
|
|
124
|
+
child.next = null;
|
|
125
|
+
} else {
|
|
126
|
+
const sibling = parent.children[1];
|
|
127
|
+
sibling.prev = child;
|
|
128
|
+
child.next = sibling;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Prepend an element before another.
|
|
134
|
+
*
|
|
135
|
+
* @category Manipulation
|
|
136
|
+
* @param element The element to prepend before.
|
|
137
|
+
* @param previous The element to be added.
|
|
138
|
+
*/
|
|
139
|
+
export function prepend(element: ChildNode, previous: ChildNode): void {
|
|
140
|
+
removeElement(previous);
|
|
141
|
+
|
|
142
|
+
const { parent } = element;
|
|
143
|
+
if (parent) {
|
|
144
|
+
const childs = parent.children;
|
|
145
|
+
childs.splice(childs.indexOf(element), 0, previous);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
if (element.prev) {
|
|
149
|
+
element.prev.next = previous;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
previous.parent = parent;
|
|
153
|
+
previous.prev = element.prev;
|
|
154
|
+
previous.next = element;
|
|
155
|
+
element.prev = previous;
|
|
156
|
+
}
|