diff --git a/eslint.config.js b/eslint.config.js index 86ea25d..884fbf5 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,7 +1,7 @@ -import globals from 'globals'; +import js from '@eslint/js'; import path from 'node:path'; +import globals from 'globals'; import {fileURLToPath} from 'node:url'; -import js from '@eslint/js'; import {FlatCompat} from '@eslint/eslintrc'; import babelParser from "@babel/eslint-parser"; @@ -10,13 +10,13 @@ const __dirname = path.dirname(__filename); const compat = new FlatCompat({ baseDirectory: __dirname, recommendedConfig: js.configs.recommended, - allConfig: js.configs.all + allConfig: js.configs.all, }); export default [ { ignores: [ - 'tests/resources', + 'tests/resources/', '**/jquery*.js', '**/*tmp*.*', '**/*tmp*/', @@ -30,14 +30,10 @@ export default [ parser: babelParser, parserOptions: { requireConfigFile: false, - babelOptions: { - plugins: ['@babel/plugin-syntax-import-assertions'], - } }, globals: { ...globals.browser, - ...globals.node, - ...globals.commonjs, + ...globals.nodeBuiltin, }, ecmaVersion: 'latest', sourceType: 'module', diff --git a/package-lock.json b/package-lock.json index c78a9db..9e5d923 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,30 +9,22 @@ "version": "2.0.3", "license": "MIT", "dependencies": { - "flast": "^2.0.2", + "flast": "^2.0.3", "isolated-vm": "^5.0.1", "jsdom": "^25.0.1", - "obfuscation-detector": "^2.0.1" + "obfuscation-detector": "^2.0.2" }, "bin": { - "restringer": "src/restringer.js" + "restringer": "bin/deobfuscate.js" }, "devDependencies": { "@babel/eslint-parser": "^7.25.8", "@babel/plugin-syntax-import-assertions": "^7.25.7", "eslint": "^9.12.0", + "globals": "^15.12.0", "husky": "^9.1.6" } }, - "node_modules/@aashutoshrathi/word-wrap": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", - "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@ampproject/remapping": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", @@ -49,14 +41,15 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.25.7.tgz", - "integrity": "sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/highlight": "^7.25.7", + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", "picocolors": "^1.0.0" }, "engines": { @@ -64,9 +57,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.8.tgz", - "integrity": "sha512-ZsysZyXY4Tlx+Q53XdnOFmqwfB9QDTHYxaZYajWRoBLuLEAwI2UIbtxOjWh/cFaa9IKUlcB+DDuoskLuKu56JA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.2.tgz", + "integrity": "sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==", "dev": true, "license": "MIT", "peer": true, @@ -75,23 +68,23 @@ } }, "node_modules/@babel/core": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.8.tgz", - "integrity": "sha512-Oixnb+DzmRT30qu9d3tJSQkxuygWm32DFykT4bRoORPa9hZ/L4KhVB/XiRm6KG+roIEM7DBQlmg27kw2HZkdZg==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz", + "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.25.7", - "@babel/generator": "^7.25.7", - "@babel/helper-compilation-targets": "^7.25.7", - "@babel/helper-module-transforms": "^7.25.7", - "@babel/helpers": "^7.25.7", - "@babel/parser": "^7.25.8", - "@babel/template": "^7.25.7", - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.8", + "@babel/code-frame": "^7.26.0", + "@babel/generator": "^7.26.0", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.0", + "@babel/parser": "^7.26.0", + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.26.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -106,21 +99,10 @@ "url": "https://opencollective.com/babel" } }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "peer": true, - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@babel/eslint-parser": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.25.8.tgz", - "integrity": "sha512-Po3VLMN7fJtv0nsOjBDSbO1J71UhzShE9MuOSkWEV9IZQXzhZklYtzKZ8ZD/Ij3a0JBv1AG3Ny2L3jvAHQVOGg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.25.9.tgz", + "integrity": "sha512-5UXfgpK0j0Xr/xIdgdLEhOFxaDZ0bRPWJJchRpqOSur/3rZoPbqqki5mm0p4NE2cs28krBEiSM2MB7//afRSQQ==", "dev": true, "license": "MIT", "dependencies": { @@ -136,35 +118,16 @@ "eslint": "^7.5.0 || ^8.0.0 || ^9.0.0" } }, - "node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=10" - } - }, - "node_modules/@babel/eslint-parser/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - } - }, "node_modules/@babel/generator": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.7.tgz", - "integrity": "sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.2.tgz", + "integrity": "sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/types": "^7.25.7", + "@babel/parser": "^7.26.2", + "@babel/types": "^7.26.0", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" @@ -174,15 +137,15 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.7.tgz", - "integrity": "sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", + "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/compat-data": "^7.25.7", - "@babel/helper-validator-option": "^7.25.7", + "@babel/compat-data": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", "browserslist": "^4.24.0", "lru-cache": "^5.1.1", "semver": "^6.3.1" @@ -191,63 +154,32 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "license": "ISC", - "peer": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "license": "ISC", - "peer": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "license": "ISC", - "peer": true - }, "node_modules/@babel/helper-module-imports": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.7.tgz", - "integrity": "sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.7.tgz", - "integrity": "sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-module-imports": "^7.25.7", - "@babel/helper-simple-access": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "@babel/traverse": "^7.25.7" + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -257,34 +189,19 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.7.tgz", - "integrity": "sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.25.7.tgz", - "integrity": "sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz", + "integrity": "sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==", "dev": true, "license": "MIT", - "peer": true, - "dependencies": { - "@babel/traverse": "^7.25.7", - "@babel/types": "^7.25.7" - }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz", - "integrity": "sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, "license": "MIT", "peer": true, @@ -293,9 +210,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz", - "integrity": "sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, "license": "MIT", "peer": true, @@ -304,9 +221,9 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.7.tgz", - "integrity": "sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", "dev": true, "license": "MIT", "peer": true, @@ -315,131 +232,29 @@ } }, "node_modules/@babel/helpers": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.7.tgz", - "integrity": "sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@babel/template": "^7.25.7", - "@babel/types": "^7.25.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.25.7.tgz", - "integrity": "sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", + "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.25.7", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0", - "picocolors": "^1.0.0" + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/@babel/parser": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.8.tgz", - "integrity": "sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.2.tgz", + "integrity": "sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/types": "^7.25.8" + "@babel/types": "^7.26.0" }, "bin": { "parser": "bin/babel-parser.js" @@ -449,13 +264,13 @@ } }, "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.25.7.tgz", - "integrity": "sha512-ZvZQRmME0zfJnDQnVBKYzHxXT7lYBB3Revz1GuS7oLXWMgqUPX4G+DDbT30ICClht9WKV34QVrZhSw6WdklwZQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.26.0.tgz", + "integrity": "sha512-QCWT5Hh830hK5EQa7XzuqIkQU9tT/whqbDz7kuaZMHFl1inRRg7JnuAEOQ0Ur0QUl0NufCk1msK2BeY79Aj/eg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.25.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -465,34 +280,34 @@ } }, "node_modules/@babel/template": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.7.tgz", - "integrity": "sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", + "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/code-frame": "^7.25.7", - "@babel/parser": "^7.25.7", - "@babel/types": "^7.25.7" + "@babel/code-frame": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.25.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.7.tgz", - "integrity": "sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.9.tgz", + "integrity": "sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/code-frame": "^7.25.7", - "@babel/generator": "^7.25.7", - "@babel/parser": "^7.25.7", - "@babel/template": "^7.25.7", - "@babel/types": "^7.25.7", + "@babel/code-frame": "^7.25.9", + "@babel/generator": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/template": "^7.25.9", + "@babel/types": "^7.25.9", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -512,40 +327,56 @@ } }, "node_modules/@babel/types": { - "version": "7.25.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.8.tgz", - "integrity": "sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.0.tgz", + "integrity": "sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@babel/helper-string-parser": "^7.25.7", - "@babel/helper-validator-identifier": "^7.25.7", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", "dev": true, + "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@eslint-community/regexpp": { - "version": "4.11.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", - "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, "license": "MIT", "engines": { @@ -568,9 +399,9 @@ } }, "node_modules/@eslint/core": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.6.0.tgz", - "integrity": "sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.7.0.tgz", + "integrity": "sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -601,10 +432,23 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@eslint/js": { - "version": "9.12.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.12.0.tgz", - "integrity": "sha512-eohesHH8WFRUprDNyEREgqP6beG6htMeUYeCpkEgBCieCMme5r9zFWjzAJp//9S+Kub4rqE+jXe9Cp1a7IYIIA==", + "version": "9.14.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.14.0.tgz", + "integrity": "sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg==", "dev": true, "license": "MIT", "engines": { @@ -622,9 +466,9 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.0.tgz", - "integrity": "sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.2.tgz", + "integrity": "sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -635,9 +479,9 @@ } }, "node_modules/@humanfs/core": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.0.tgz", - "integrity": "sha512-2cbWIHbZVEweE853g8jymffCA+NCMiuqeECeBBLm8dg2oFdjuGJhgN4UAbI+6v0CKbbhvtXA4qV8YR5Ji86nmw==", + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -645,24 +489,39 @@ } }, "node_modules/@humanfs/node": { - "version": "0.16.5", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.5.tgz", - "integrity": "sha512-KSPA4umqSG4LHYRodq31VDwKAvaTF4xmVlzM8Aeh4PlU1JQ3IG0wiA8C25d3RQ9nJyM3mBHyI53K06VVL/oFFg==", + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanfs/core": "^0.19.0", + "@humanfs/core": "^0.19.1", "@humanwhocodes/retry": "^0.3.0" }, "engines": { "node": ">=18.18.0" } }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=12.22" }, @@ -672,9 +531,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", + "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -685,6 +544,15 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@javascript-obfuscator/estraverse": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@javascript-obfuscator/estraverse/-/estraverse-5.4.0.tgz", + "integrity": "sha512-CZFX7UZVN9VopGbjTx4UXaXsi9ewoM1buL0kY7j1ftYdSs7p2spv9opxFjHlQ/QGTgh4UqufYqJJ0WKLml7b6w==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", @@ -753,30 +621,6 @@ "eslint-scope": "5.1.1" } }, - "node_modules/@nicolo-ribaudo/eslint-scope-5-internals/node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/@nicolo-ribaudo/eslint-scope-5-internals/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -792,9 +636,10 @@ "license": "MIT" }, "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "version": "8.14.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "license": "MIT", "bin": { "acorn": "bin/acorn" }, @@ -806,6 +651,7 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "license": "MIT", "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -814,6 +660,7 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", + "license": "MIT", "dependencies": { "debug": "^4.3.4" }, @@ -843,6 +690,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -863,7 +711,8 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" }, "node_modules/balanced-match": { "version": "1.0.2", @@ -889,12 +738,14 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/bl": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "license": "MIT", "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", @@ -913,9 +764,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", - "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", "dev": true, "funding": [ { @@ -934,10 +785,10 @@ "license": "MIT", "peer": true, "dependencies": { - "caniuse-lite": "^1.0.30001663", - "electron-to-chromium": "^1.5.28", + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -964,6 +815,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -980,9 +832,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001668", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001668.tgz", - "integrity": "sha512-nWLrdxqCdblixUO+27JtGJJE/txpJlyUy5YN1u53wLZkP0emYCo5zgS6QYft7VUYR42LGgi/S5hdLZTrnyIddw==", + "version": "1.0.30001677", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001677.tgz", + "integrity": "sha512-fmfjsOlJUpMWu+mAAtZZZHz7UEwsUxIIvu1TJfO1HqFQvB/B+ii0xr9B5HpbZY/mC4XZ8SvjHJqtAY6pDPQEog==", "dev": true, "funding": [ { @@ -1006,6 +858,7 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -1020,13 +873,15 @@ "node_modules/chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "license": "ISC" }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -1038,12 +893,14 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -1071,6 +928,7 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -1096,6 +954,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", + "license": "MIT", "dependencies": { "whatwg-mimetype": "^4.0.0", "whatwg-url": "^14.0.0" @@ -1105,11 +964,12 @@ } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -1123,12 +983,14 @@ "node_modules/decimal.js": { "version": "10.4.3", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz", - "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==" + "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", + "license": "MIT" }, "node_modules/decompress-response": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "license": "MIT", "dependencies": { "mimic-response": "^3.1.0" }, @@ -1143,6 +1005,7 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "license": "MIT", "engines": { "node": ">=4.0.0" } @@ -1151,28 +1014,30 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "license": "MIT" }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/detect-libc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", - "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", + "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", + "license": "Apache-2.0", "engines": { "node": ">=8" } }, "node_modules/electron-to-chromium": { - "version": "1.5.38", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.38.tgz", - "integrity": "sha512-VbeVexmZ1IFh+5EfrYz1I0HTzHVIlJa112UEWhciPyeOcKJGeTv6N8WnG4wsQB81DGCaVEGhpSb6o6a8WYFXXg==", + "version": "1.5.52", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.52.tgz", + "integrity": "sha512-xtoijJTZ+qeucLBDNztDOuQBE1ksqjvNjvqFoST3nGC7fSpqJ+X6BdTBaY5BHG+IhWWmpc6b/KfpeuEDupEPOQ==", "dev": true, "license": "ISC", "peer": true @@ -1181,6 +1046,7 @@ "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "license": "MIT", "dependencies": { "once": "^1.4.0" } @@ -1189,6 +1055,7 @@ "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "license": "BSD-2-Clause", "engines": { "node": ">=0.12" }, @@ -1212,6 +1079,7 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -1220,17 +1088,16 @@ } }, "node_modules/escodegen": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", - "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "name": "@javascript-obfuscator/escodegen", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@javascript-obfuscator/escodegen/-/escodegen-2.3.0.tgz", + "integrity": "sha512-QVXwMIKqYMl3KwtTirYIA6gOCiJ0ZDtptXqAv/8KWLG9uQU2fZqTVy7a/A5RvcoZhbDoFfveTxuGxJ5ibzQtkw==", + "license": "BSD-2-Clause", "dependencies": { + "@javascript-obfuscator/estraverse": "^5.3.0", "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" + "esutils": "^2.0.2", + "optionator": "^0.8.1" }, "engines": { "node": ">=6.0" @@ -1239,23 +1106,73 @@ "source-map": "~0.6.1" } }, + "node_modules/escodegen/node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "license": "MIT", + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "license": "MIT", + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/eslint": { - "version": "9.12.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.12.0.tgz", - "integrity": "sha512-UVIOlTEWxwIopRL1wgSQYdnVDcEvs2wyaO6DGo5mXqe3r16IoCNWkR29iHhyaP4cICWjbgbmFUGAhh0GJRuGZw==", + "version": "9.14.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.14.0.tgz", + "integrity": "sha512-c2FHsVBr87lnUtjP4Yhvk4yEhKrQavGafRA/Se1ouse8PfbfC/Qh9Mxa00yWsZRlqeUB9raXip0aiiUZkgnr9g==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.11.0", + "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.18.0", - "@eslint/core": "^0.6.0", + "@eslint/core": "^0.7.0", "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "9.12.0", + "@eslint/js": "9.14.0", "@eslint/plugin-kit": "^0.2.0", - "@humanfs/node": "^0.16.5", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.3.1", + "@humanwhocodes/retry": "^0.4.0", "@types/estree": "^1.0.6", "@types/json-schema": "^7.0.15", "ajv": "^6.12.4", @@ -1263,9 +1180,9 @@ "cross-spawn": "^7.0.2", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.1.0", - "eslint-visitor-keys": "^4.1.0", - "espree": "^10.2.0", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -1301,37 +1218,50 @@ } }, "node_modules/eslint-scope": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.1.0.tgz", - "integrity": "sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" + "estraverse": "^4.1.1" }, "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" + "node": ">=8.0.0" } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true, + "license": "Apache-2.0", "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": ">=10" + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", - "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1341,15 +1271,25 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, "node_modules/espree": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.2.0.tgz", - "integrity": "sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.12.0", + "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.1.0" + "eslint-visitor-keys": "^4.2.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1359,9 +1299,9 @@ } }, "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.1.0.tgz", - "integrity": "sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1374,6 +1314,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -1383,10 +1324,11 @@ } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -1394,10 +1336,21 @@ "node": ">=0.10" } }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -1405,10 +1358,21 @@ "node": ">=4.0" } }, - "node_modules/estraverse": { + "node_modules/esrecurse/node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -1417,6 +1381,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } @@ -1425,6 +1390,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "license": "(MIT OR WTFPL)", "engines": { "node": ">=6" } @@ -1447,7 +1413,7 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "license": "MIT" }, "node_modules/file-entry-cache": { "version": "8.0.0", @@ -1467,6 +1433,7 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -1479,17 +1446,42 @@ } }, "node_modules/flast": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flast/-/flast-2.0.2.tgz", - "integrity": "sha512-T5nDMjNysqlaoew7I9+QWcu/6kaDfNff8VpJs6PKBBQiJmliskZqF84QpAQuttfeYwq8j/knskCeCetqih/gVQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/flast/-/flast-2.0.3.tgz", + "integrity": "sha512-T44oiMvVTd9rGVxIBfJ7jYVL2gtKr39pNP8IRm+AkLaxekZH0LzHcyJKsvoyzA5Ebl2/qWWNyhrofFlPlt+UYw==", "license": "MIT", "dependencies": { - "escodegen": "^2.1.0", + "escodegen": "npm:@javascript-obfuscator/escodegen", "eslint-scope": "^8.1.0", - "espree": "^10.2.0", + "espree": "^10.3.0", "estraverse": "^5.3.0" } }, + "node_modules/flast/node_modules/eslint-scope": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/flast/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, "node_modules/flat-cache": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", @@ -1512,9 +1504,10 @@ "license": "ISC" }, "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", @@ -1527,7 +1520,8 @@ "node_modules/fs-constants": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "license": "MIT" }, "node_modules/gensync": { "version": "1.0.0-beta.2", @@ -1543,13 +1537,15 @@ "node_modules/github-from-package": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==" + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "license": "MIT" }, "node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.3" }, @@ -1558,9 +1554,9 @@ } }, "node_modules/globals": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", - "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "version": "15.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.12.0.tgz", + "integrity": "sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==", "dev": true, "license": "MIT", "engines": { @@ -1575,6 +1571,7 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -1583,6 +1580,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", + "license": "MIT", "dependencies": { "whatwg-encoding": "^3.1.1" }, @@ -1594,6 +1592,7 @@ "version": "7.0.2", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", + "license": "MIT", "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -1606,6 +1605,7 @@ "version": "7.0.5", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", + "license": "MIT", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -1634,6 +1634,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" }, @@ -1658,7 +1659,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "BSD-3-Clause" }, "node_modules/ignore": { "version": "5.3.2", @@ -1692,6 +1694,7 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.19" } @@ -1699,18 +1702,21 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" }, "node_modules/ini": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "license": "ISC" }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -1720,6 +1726,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -1730,19 +1737,22 @@ "node_modules/is-potential-custom-element-name": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", - "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==" + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "license": "MIT" }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/isolated-vm": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/isolated-vm/-/isolated-vm-5.0.1.tgz", "integrity": "sha512-hs7+ff59Z2zDvavfcjuot/r1gm6Bmpt+GoZxmVfxUmXaX5scOvUq/Rnme+mUtSh5lW41hH8gAuvk/yTJDYO8Fg==", "hasInstallScript": true, + "license": "ISC", "dependencies": { "prebuild-install": "^7.1.1" }, @@ -1843,7 +1853,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json5": { "version": "2.2.3", @@ -1874,6 +1885,7 @@ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -1887,6 +1899,7 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -1901,23 +1914,25 @@ "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "peer": true, "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" + "yallist": "^3.0.2" } }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -1926,6 +1941,7 @@ "version": "2.1.35", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -1937,6 +1953,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "license": "MIT", "engines": { "node": ">=10" }, @@ -1961,6 +1978,7 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -1968,28 +1986,33 @@ "node_modules/mkdirp-classic": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "license": "MIT" }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/napi-build-utils": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", + "license": "MIT" }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/node-abi": { - "version": "3.54.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.54.0.tgz", - "integrity": "sha512-p7eGEiQil0YUV3ItH4/tBb781L5impVmmx2E9FRKF7d18XXzp4PGT2tdYMFY6wQqgxD0IwNZOiSJ0/K0fSi/OA==", + "version": "3.71.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.71.0.tgz", + "integrity": "sha512-SZ40vRiy/+wRTf21hxkkEjPJZpARzUMVcJoQse2EF8qkUWbbO2z7vd5oA/H6bVH6SZQ5STGcu0KRDS7biNRfxw==", + "license": "MIT", "dependencies": { "semver": "^7.3.5" }, @@ -1997,6 +2020,18 @@ "node": ">=10" } }, + "node_modules/node-abi/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/node-releases": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", @@ -2012,12 +2047,12 @@ "license": "MIT" }, "node_modules/obfuscation-detector": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/obfuscation-detector/-/obfuscation-detector-2.0.1.tgz", - "integrity": "sha512-Rh7ik2w6yTiqXMlTiyF7ykBtmZ+ZAbvOMOazsIKJ817SqzSVAfrb70goVcgeqH6Ok1WqA8q4NGINR+AWg9vnGA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/obfuscation-detector/-/obfuscation-detector-2.0.2.tgz", + "integrity": "sha512-x3+3vN1uq0Bo+jvr3ZjD/8Q/iKWc4hE6hZSdq6bvakn1nxmLQ1yXinBS1jl+3BFxYNUIsPD61ZQX4IsDJgcPuw==", "license": "MIT", "dependencies": { - "flast": "^2.0.2" + "flast": "^2.0.3" }, "bin": { "obfuscation-detector": "bin/obfuscation-detector.js" @@ -2027,22 +2062,24 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", "dependencies": { "wrappy": "1" } }, "node_modules/optionator": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", - "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, + "license": "MIT", "dependencies": { - "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0" + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" @@ -2053,6 +2090,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -2068,6 +2106,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -2092,11 +2131,12 @@ } }, "node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz", + "integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==", + "license": "MIT", "dependencies": { - "entities": "^4.4.0" + "entities": "^4.5.0" }, "funding": { "url": "https://github.com/inikulin/parse5?sponsor=1" @@ -2107,6 +2147,7 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2116,22 +2157,24 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true, "license": "ISC", "peer": true }, "node_modules/prebuild-install": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", - "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.2.tgz", + "integrity": "sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==", + "license": "MIT", "dependencies": { "detect-libc": "^2.0.0", "expand-template": "^2.0.3", @@ -2158,14 +2201,16 @@ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } }, "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", + "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", + "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -2175,6 +2220,7 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", "engines": { "node": ">=6" } @@ -2183,6 +2229,7 @@ "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", "dependencies": { "deep-extend": "^0.6.0", "ini": "~1.3.0", @@ -2197,6 +2244,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2205,6 +2253,7 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -2247,17 +2296,20 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" }, "node_modules/saxes": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", "integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==", + "license": "ISC", "dependencies": { "xmlchars": "^2.2.0" }, @@ -2266,17 +2318,13 @@ } }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dependencies": { - "lru-cache": "^6.0.0" - }, + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" } }, "node_modules/shebang-command": { @@ -2284,6 +2332,7 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -2296,6 +2345,7 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2317,7 +2367,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/simple-get": { "version": "4.0.1", @@ -2337,6 +2388,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "decompress-response": "^6.0.0", "once": "^1.3.1", @@ -2347,6 +2399,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "license": "BSD-3-Clause", "optional": true, "engines": { "node": ">=0.10.0" @@ -2356,6 +2409,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", "dependencies": { "safe-buffer": "~5.2.0" } @@ -2378,6 +2432,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2388,12 +2443,14 @@ "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", - "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==" + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "license": "MIT" }, "node_modules/tar-fs": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "license": "MIT", "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", @@ -2405,6 +2462,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "license": "MIT", "dependencies": { "bl": "^4.0.3", "end-of-stream": "^1.4.1", @@ -2420,37 +2478,27 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/tldts": { - "version": "6.1.50", - "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.50.tgz", - "integrity": "sha512-q9GOap6q3KCsLMdOjXhWU5jVZ8/1dIib898JBRLsN+tBhENpBDcAVQbE0epADOjw11FhQQy9AcbqKGBQPUfTQA==", + "version": "6.1.58", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.58.tgz", + "integrity": "sha512-MQJrJhjHOYGYb8DobR6Y4AdDbd4TYkyQ+KBDVc5ODzs1cbrvPpfN1IemYi9jfipJ/vR1YWvrDli0hg1y19VRoA==", "license": "MIT", "dependencies": { - "tldts-core": "^6.1.50" + "tldts-core": "^6.1.58" }, "bin": { "tldts": "bin/cli.js" } }, "node_modules/tldts-core": { - "version": "6.1.50", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.50.tgz", - "integrity": "sha512-na2EcZqmdA2iV9zHV7OHQDxxdciEpxrjbkp+aHmZgnZKHzoElLajP59np5/4+sare9fQBfixgvXKx8ev1d7ytw==", + "version": "6.1.58", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.58.tgz", + "integrity": "sha512-dR936xmhBm7AeqHIhCWwK765gZ7dFyL+IqLSFAjJbFlUXGMLCb8i2PzlzaOuWBuplBTaBYseSb565nk/ZEM0Bg==", "license": "MIT" }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=4" - } - }, "node_modules/tough-cookie": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-5.0.0.tgz", @@ -2467,6 +2515,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", + "license": "MIT", "dependencies": { "punycode": "^2.3.1" }, @@ -2478,6 +2527,7 @@ "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "license": "Apache-2.0", "dependencies": { "safe-buffer": "^5.0.1" }, @@ -2490,6 +2540,7 @@ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -2542,12 +2593,14 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" }, "node_modules/w3c-xmlserializer": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", + "license": "MIT", "dependencies": { "xml-name-validator": "^5.0.0" }, @@ -2559,6 +2612,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "license": "BSD-2-Clause", "engines": { "node": ">=12" } @@ -2567,6 +2621,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "license": "MIT", "dependencies": { "iconv-lite": "0.6.3" }, @@ -2578,6 +2633,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "license": "MIT", "engines": { "node": ">=18" } @@ -2586,6 +2642,7 @@ "version": "14.0.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz", "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", + "license": "MIT", "dependencies": { "tr46": "^5.0.0", "webidl-conversions": "^7.0.0" @@ -2599,6 +2656,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -2609,15 +2667,26 @@ "node": ">= 8" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" }, "node_modules/ws": { "version": "8.18.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "license": "MIT", "engines": { "node": ">=10.0.0" }, @@ -2638,6 +2707,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", + "license": "Apache-2.0", "engines": { "node": ">=18" } @@ -2645,18 +2715,23 @@ "node_modules/xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", - "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==" + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "license": "MIT" }, "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC", + "peer": true }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, diff --git a/package.json b/package.json index 61bc4e0..559d296 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,10 @@ "test": "tests" }, "dependencies": { - "flast": "^2.0.2", + "flast": "^2.0.3", "isolated-vm": "^5.0.1", "jsdom": "^25.0.1", - "obfuscation-detector": "^2.0.1" + "obfuscation-detector": "^2.0.2" }, "scripts": { "test": "node --test --trace-warnings --no-node-snapshot", @@ -43,6 +43,7 @@ "@babel/eslint-parser": "^7.25.8", "@babel/plugin-syntax-import-assertions": "^7.25.7", "eslint": "^9.12.0", + "globals": "^15.12.0", "husky": "^9.1.6" } } diff --git a/src/modules/safe/replaceEvalCallsWithLiteralContent.js b/src/modules/safe/replaceEvalCallsWithLiteralContent.js index 59a8ac0..0e59559 100644 --- a/src/modules/safe/replaceEvalCallsWithLiteralContent.js +++ b/src/modules/safe/replaceEvalCallsWithLiteralContent.js @@ -1,6 +1,6 @@ import {getCache} from '../utils/getCache.js'; -import {generateHash} from '../utils/generateHash.js'; import {generateFlatAST, logger} from 'flast'; +import {generateHash} from '../utils/generateHash.js'; /** * Extract string values of eval call expressions, and replace calls with the actual code, without running it through eval. @@ -23,21 +23,16 @@ function replaceEvalCallsWithLiteralContent(arb, candidateFilter = () => true) { try { if (!cache[cacheName]) { let body; - if (n.arguments[0].value) { - body = generateFlatAST(n.arguments[0].value, {detailed: false, includeSrc: false})[0].body; - if (body.length > 1) { - body = { - type: 'BlockStatement', - body, - }; - } else { - body = body[0]; - if (body.type === 'ExpressionStatement') body = body.expression; - } - } else body = { - type: 'Literal', - value: n.arguments[0].value, - }; + body = generateFlatAST(n.arguments[0].value, {detailed: false, includeSrc: false})[0].body; + if (body.length > 1) { + body = { + type: 'BlockStatement', + body, + }; + } else { + body = body[0]; + if (body.type === 'ExpressionStatement') body = body.expression; + } cache[cacheName] = body; } let replacementNode = cache[cacheName]; diff --git a/src/modules/utils/areReferencesModified.js b/src/modules/utils/areReferencesModified.js index d299fb9..a88da09 100644 --- a/src/modules/utils/areReferencesModified.js +++ b/src/modules/utils/areReferencesModified.js @@ -15,9 +15,12 @@ function areReferencesModified(ast, refs) { (r.parentNode.type === 'VariableDeclarator' && r.parentKey === 'id') || // Verify no modifying calls are executed on any of the references (r.parentNode.type === 'MemberExpression' && - r.parentNode.parentNode.type === 'CallExpression' && + (r.parentNode.parentNode.type === 'CallExpression' && r.parentNode.parentNode.callee?.object === r && propertiesThatModifyContent.includes(r.parentNode.property?.value || r.parentNode.property?.name)) || + // Verify the object's properties aren't being assigned to + (r.parentNode.parentNode.type === 'AssignmentExpression' && + r.parentNode.parentKey === 'left')) || // Verify there are no member expressions among the references which are being assigned to (r.type === 'MemberExpression' && ast.some(n => n.type === 'AssignmentExpression' && diff --git a/src/modules/utils/getDeclarationWithContext.js b/src/modules/utils/getDeclarationWithContext.js index a0d0745..f85ec3d 100644 --- a/src/modules/utils/getDeclarationWithContext.js +++ b/src/modules/utils/getDeclarationWithContext.js @@ -199,25 +199,25 @@ export function getDeclarationWithContext(originNode, excludeOriginNode = false) } } } - cached = []; + cached = new Set(); for (let i = 0; i < collected.length; i++) { const n = collected[i]; if (!( - cached.includes(n) || + cached.has(n) || irrelevantTypesToBeFilteredOut.includes(n.type)) && !(excludeOriginNode && isNodeInRanges(n, [originNode.range]))) { // A fix to ignore reassignments in cases where functions are overwritten as part of an anti-debugging mechanism - if (n.type === 'FunctionDeclaration' && n.id && n.references?.length) { - for (let j = 0; j < n.references.length; j++) { - const ref = n.references[j]; + if (n.type === 'FunctionDeclaration' && n.id && n.id.references?.length) { + for (let j = 0; j < n.id.references.length; j++) { + const ref = n.id.references[j]; if (!(ref.parentKey === 'left' && ref.parentNode.type === 'AssignmentExpression')) { - cached.push(n); + cached.add(n); } } - } else cached.push(n); + } else cached.add(n); } } - cached = removeRedundantNodes(cached); + cached = removeRedundantNodes([...cached]); cache[cacheNameId] = cached; // Caching context for the same node cache[cacheNameSrc] = cached; // Caching context for a different node with similar content } diff --git a/src/modules/utils/getObjType.js b/src/modules/utils/getObjType.js index 6af06aa..3d7525f 100644 --- a/src/modules/utils/getObjType.js +++ b/src/modules/utils/getObjType.js @@ -3,8 +3,7 @@ * @return {string} The type of whatever object is provided if possible; empty string otherwise. */ function getObjType(unknownObject) { - const match = ({}).toString.call(unknownObject).match(/\[object (.*)]/); - return match ? match[1] : ''; + return ({}).toString.call(unknownObject).slice(8, -1); } export {getObjType}; \ No newline at end of file diff --git a/tests/deobfuscation.test.js b/tests/deobfuscation.test.js index f107116..169d915 100644 --- a/tests/deobfuscation.test.js +++ b/tests/deobfuscation.test.js @@ -53,12 +53,7 @@ const c = l.length + 1; var v = l[b]; l[b] = l[c]; l[c] = v;`; - const expected = `var l = []; -const b = l.length * 2; -const c = l.length + 1; -var v = l[b]; -l[b] = l[c]; -l[c] = v;`; + const expected = code; const result = getDeobfuscatedCode(code); assert.strictEqual(result, expected); }); diff --git a/tests/modules.test.js b/tests/modules.safe.test.js similarity index 61% rename from tests/modules.test.js rename to tests/modules.safe.test.js index 37bca04..c08d869 100644 --- a/tests/modules.test.js +++ b/tests/modules.safe.test.js @@ -116,7 +116,7 @@ describe('SAFE: rearrangeSwitches', async () => { it('TP-1', () => { const code = `(() => {let a = 1;\twhile (true) {switch (a) {case 3: return console.log(3); case 2: console.log(2); a = 3; break; case 1: console.log(1); a = 2; break;}}})();`; - const expected = `(() => { + const expected = `((() => { let a = 1; while (true) { { @@ -127,7 +127,7 @@ case 1: console.log(1); a = 2; break;}}})();`; return console.log(3); } } -})();`; +})());`; const result = applyModuleToCode(code, targetModule); assert.strictEqual(result, expected); }); @@ -178,7 +178,7 @@ describe('SAFE: replaceEvalCallsWithLiteralContent', async () => { }); it('TP-4: Replace eval call wrapped in a call expression', () => { const code = `eval('()=>1')();`; - const expected = `(() => 1)();`; + const expected = `((() => 1)());`; const result = applyModuleToCode(code, targetModule); assert.strictEqual(result, expected); }); @@ -259,7 +259,7 @@ describe('SAFE: replaceNewFuncCallsWithLiteralContent', async () => { const targetModule = (await import('../src/modules/safe/replaceNewFuncCallsWithLiteralContent.js')).default; it('TP-1', () => { const code = `new Function("!function() {console.log('hello world')}()")();`; - const expected = `!function () {\n console.log('hello world');\n}();`; + const expected = `!(function () {\n console.log('hello world');\n}());`; const result = applyModuleToCode(code, targetModule); assert.strictEqual(result, expected); }); @@ -663,7 +663,7 @@ describe('SAFE: separateChainedDeclarators', async () => { }); it('TP-3: A var and a let', () => { const code = `!function() {var a, b = 2; let c, d = 3;}();`; - const expected = `!function () {\n var a;\n var b = 2;\n let c;\n let d = 3;\n}();`; + const expected = `!(function () {\n var a;\n var b = 2;\n let c;\n let d = 3;\n}());`; const result = applyModuleToCode(code, targetModule, true); assert.strictEqual(result, expected); }); @@ -745,458 +745,4 @@ describe('SAFE: simplifyIfStatements', async () => { const result = applyModuleToCode(code, targetModule); assert.strictEqual(result, expected); }); -}); - -describe('UNSAFE: normalizeRedundantNotOperator', async () => { - const targetModule = (await import('../src/modules/unsafe/normalizeRedundantNotOperator.js')).default; - it('TP-1', () => { - const code = `!true || !false || !0 || !1 || !a || !'a' || ![] || !{} || !-1 || !!true || !!!true`; - const expected = `false || true || true || false || !a || false || false || false || false || true || false;`; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); -}); -describe('UNSAFE: resolveAugmentedFunctionWrappedArrayReplacements', async () => { - // Load the module even though there are no tests for it - to include it in the coverage report - // noinspection JSUnusedLocalSymbols - const targetModule = (await import('../src/modules/unsafe/resolveAugmentedFunctionWrappedArrayReplacements.js')).evalWithDom; - it.todo('TODO: Write tests for function', () => {}); -}); -describe('UNSAFE: resolveBuiltinCalls', async () => { - const targetModule = (await import('../src/modules/unsafe/resolveBuiltinCalls.js')).default; - it('TP-1: atob', () => { - const code = `atob('c29sdmVkIQ==');`; - const expected = `'solved!';`; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); - it('TP-2: btoa', () => { - const code = `btoa('solved!');`; - const expected = `'c29sdmVkIQ==';`; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); - it('TP-3: split', () => { - const code = `'ok'.split('');`; - const expected = `[\n 'o',\n 'k'\n];`; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); - it('TN-1: querySelector', () => { - const code = `document.querySelector('div');`; - const expected = code; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); - it('TN-2: Unknown variable', () => { - const code = `atob(x)`; - const expected = code; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); - it('TN-3: Overwritten builtin', () => { - const code = `function atob() {return 1;} atob('test');`; - const expected = code; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); -}); -describe('UNSAFE: resolveDefiniteBinaryExpressions', async () => { - const targetModule = (await import('../src/modules/unsafe/resolveDefiniteBinaryExpressions.js')).default; - it('TP-1', () => { - const code = `5 * 3; '2' + 2; '10' - 1; 'o' + 'k'; 'o' - 'k'; 3 - -1;`; - const expected = `15;\n'22';\n9;\n'ok';\nNaN;\n4;`; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); -}); -describe('UNSAFE: resolveDefiniteMemberExpressions', async () => { - const targetModule = (await import('../src/modules/unsafe/resolveDefiniteMemberExpressions.js')).default; - it('TP-1', () => { - const code = `'123'[0]; 'hello'.length;`; - const expected = `'1';\n5;`; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); - it('TN-1', () => { - const code = `++[[]][0];`; - const expected = code; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); -}); -describe('UNSAFE: resolveDeterministicConditionalExpressions', async () => { - const targetModule = (await import('../src/modules/unsafe/resolveDeterministicConditionalExpressions.js')).default; - it('TP-1', () => { - const code = `(true ? 1 : 2); (false ? 3 : 4);`; - const expected = `1;\n4;`; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); - it('TN-1', () => { - const code = `({} ? 1 : 2); ([].length ? 3 : 4);`; - const expected = code; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); -}); -describe('UNSAFE: resolveEvalCallsOnNonLiterals', async () => { - const targetModule = (await import('../src/modules/unsafe/resolveEvalCallsOnNonLiterals.js')).default; - it('TP-1', () => { - const code = `eval(function(a) {return a}('atob'));`; - const expected = `atob;`; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); - it('TP-2', () => { - const code = `eval([''][0]);`; - const expected = `''`; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); -}); -describe('UNSAFE: resolveFunctionToArray', async () => { - const targetModule = (await import('../src/modules/unsafe/resolveFunctionToArray.js')).default; - it('TP-1', () => { - const code = `function a() {return [1];}\nconst b = a();`; - const expected = `function a() {\n return [1];\n}\nconst b = [1];`; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); -}); -describe('UNSAFE: resolveInjectedPrototypeMethodCalls', async () => { - const targetModule = (await import('../src/modules/unsafe/resolveInjectedPrototypeMethodCalls.js')).default; - it('TP-1', () => { - const code = `String.prototype.secret = function () {return 'secret ' + this;}; 'hello'.secret();`; - const expected = `String.prototype.secret = function () {\n return 'secret ' + this;\n};\n'secret hello';`; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); -}); -describe('UNSAFE: resolveLocalCalls', async () => { - const targetModule = (await import('../src/modules/unsafe/resolveLocalCalls.js')).default; - it('TP-1: Function declaration', () => { - const code = `function add(a, b) {return a + b;} add(1, 2);`; - const expected = `function add(a, b) {\n return a + b;\n}\n3;`; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); - it('TP-2: Arrow function', () => { - const code = `const add = (a, b) => a + b; add(1, 2);`; - const expected = `const add = (a, b) => a + b;\n3;`; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); - it('TP-3: Overwritten builtin', () => { - const code = `const atob = (a, b) => a + b; atob('got-');`; - const expected = `const atob = (a, b) => a + b;\n'got-undefined';`; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); - it('TN-1: Missing declaration', () => { - const code = `add(1, 2);`; - const expected = code; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); - it('TN-2: Skipped builtin', () => { - const code = `btoa('a');`; - const expected = code; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); - it('TN-2: No replacement with undefined', () => { - const code = `function a() {} a();`; - const expected = code; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); -}); -describe('UNSAFE: resolveMinimalAlphabet', async () => { - const targetModule = (await import('../src/modules/unsafe/resolveMinimalAlphabet.js')).default; - it('TP-1', () => { - const code = `+true; -true; +false; -false; +[]; ~true; ~false; ~[]; +[3]; +['']; -[4]; ![]; +[[]];`; - const expected = `1;\n-'1';\n0;\n-0;\n0;\n-'2';\n-'1';\n-'1';\n3;\n0;\n-'4';\nfalse;\n0;`; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); - it('TP-2', () => { - const code = `[] + []; [+[]]; (![]+[]); +[!+[]+!+[]];`; - const expected = `'';\n[0];\n'false';\n2;`; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); - it('TN-1', () => { - const code = `-false; -[]; +{}; -{}; -'a'; ~{}; -['']; +[1, 2]; +this; +[this];`; - const expected = `-0;\n-0;\n+{};\n-{};\nNaN;\n~{};\n-0;\nNaN;\n+this;\n+[this];`; - const result = applyModuleToCode(code, targetModule); - assert.deepStrictEqual(result, expected); - }); -}); - -describe('UTILS: evalInVm', async () => { - const targetModule = (await import('../src/modules/utils/evalInVm.js')).evalInVm; - it('TP-1', () => { - const code = `'hello ' + 'there';`; - const expected = {type: 'Literal', value: 'hello there', raw: 'hello there'}; - const result = targetModule(code); - assert.deepStrictEqual(result, expected); - }); - it('TN-1', () => { - const code = `Math.random();`; - const expected = badValue; - const result = targetModule(code); - assert.deepStrictEqual(result, expected); - }); - it('TN-2', () => { - const code = `function a() {return console;} a();`; - const expected = badValue; - const result = targetModule(code); - assert.deepStrictEqual(result, expected); - }); -}); -describe('UTILS: evalWithDom', async () => { - // Load the module even though there are no tests for it - to include it in the coverage report - // noinspection JSUnusedLocalSymbols - const targetModule = (await import('../src/modules/utils/evalWithDom.js')).evalWithDom; - it.todo('TODO: Write tests for function', () => {}); -}); -describe('UTILS: areReferencesModified', async () => { - const targetModule = (await import('../src/modules/utils/areReferencesModified.js')).areReferencesModified; - it('TP-1', () => { - const code = `let a = 1; let b = 2 + a, c = a + 3; a++;`; - const expected = true; - const ast = generateFlatAST(code); - const result = targetModule(ast, ast.find(n => n.src === 'a = 1').id.references); - assert.deepStrictEqual(result, expected); - }); - it('TP-2', () => { - const code = `let a = 1; let b = 2 + a, c = (a += 2) + 3;`; - const expected = true; - const ast = generateFlatAST(code); - const result = targetModule(ast, ast.find(n => n.src === 'a = 1').id.references); - assert.deepStrictEqual(result, expected); - }); - it('TN-1', () => { - const code = `const a = 1; let b = 2 + a, c = a + 3;`; - const expected = false; - const ast = generateFlatAST(code); - const result = targetModule(ast, ast.find(n => n.src === 'a = 1').id.references); - assert.deepStrictEqual(result, expected); - }); -}); -describe('UTILS: createNewNode', async () => { - const targetModule = (await import('../src/modules/utils/createNewNode.js')).createNewNode; - it('Literan: String', () => { - const code = 'Baryo'; - const expected = {type: 'Literal', value: 'Baryo', raw: 'Baryo'}; - const result = targetModule(code); - assert.deepStrictEqual(result, expected); - }); - it('Literal: Number - positive number', () => { - const code = 3; - const expected = {type: 'Literal', value: 3, raw: '3'}; - const result = targetModule(code); - assert.deepStrictEqual(result, expected); - }); - it('Literal: Number - negative number', () => { - const code = -3; - const expected = {type: 'UnaryExpression', operator: '-', argument: {type: 'Literal', value: '3', raw: '3'}}; - const result = targetModule(code); - assert.deepStrictEqual(result, expected); - }); - it('Literal: Number - negative infinity', () => { - const code = -Infinity; - const expected = {type: 'UnaryExpression', operator: '-', argument: {type: 'Identifier', name: 'Infinity'}}; - const result = targetModule(code); - assert.deepStrictEqual(result, expected); - }); - it('Literal: Number - NOT operator', () => { - const code = '!3'; - const expected = {type: 'UnaryExpression', operator: '!', argument: {type: 'Literal', value: '3', raw: '3'}}; - const result = targetModule(code); - assert.deepStrictEqual(result, expected); - }); - it('Literal: Number - Identifier', () => { - const code1 = Infinity; - const expected1 = {type: 'Identifier', name: 'Infinity'}; - const result1 = targetModule(code1); - assert.deepStrictEqual(result1, expected1); - const code2 = NaN; - const expected2 = {type: 'Identifier', name: 'NaN'}; - const result2 = targetModule(code2); - assert.deepStrictEqual(result2, expected2); - }); - it('Literal: Boolean', () => { - const code = true; - const expected = {type: 'Literal', value: true, 'raw': 'true'}; - const result = targetModule(code); - assert.deepStrictEqual(result, expected); - }); - it('Array: empty', () => { - const code = []; - const expected = {type: 'ArrayExpression', elements: []}; - const result = targetModule(code); - assert.deepStrictEqual(result, expected); - }); - it('Array: populated', () => { - const code = [1, 'a']; - const expected = {type: 'ArrayExpression', elements: [ - {type: 'Literal', value: 1, raw: '1'}, - {type: 'Literal', value: 'a', raw: 'a'} - ]}; - const result = targetModule(code); - assert.deepEqual(result, expected); - }); - it('Object: empty', () => { - const code = {}; - const expected = {type: 'ObjectExpression', properties: []}; - const result = targetModule(code); - assert.deepStrictEqual(result, expected); - }); - it('Object: populated', () => { - const code = {a: 1}; - const expected = {type: 'ObjectExpression', properties: [{ - type: 'Property', - key: {type: 'Literal', value: 'a', raw: 'a'}, - value: {type: 'Literal', value: 1, raw: '1'} - }]}; - const result = targetModule(code); - assert.deepEqual(result, expected); - }); - it('Object: populated with BadValue', () => { - const code = {a() {}}; - const expected = badValue; - const result = targetModule(code); - assert.deepEqual(result, expected); - }); - it('Undefined', () => { - const code = undefined; - const expected = {type: 'Identifier', name: 'undefined'}; - const result = targetModule(code); - assert.deepStrictEqual(result, expected); - }); - it('Null', () => { - const code = null; - const expected = {type: 'Literal', raw: 'null'}; - const result = targetModule(code); - assert.deepStrictEqual(result, expected); - }); - it.todo('TODO: Implement Function', () => { - }); - it('RegExp', () => { - const code = /regexp/gi; - const expected = {type: 'Literal', regex: {flags: 'gi', pattern: 'regexp'}}; - const result = targetModule(code); - assert.deepStrictEqual(result, expected); - }); - -}); -describe('UTILS: createOrderedSrc', async () => { - const targetModule = (await import('../src/modules/utils/createOrderedSrc.js')).createOrderedSrc; - it('TP-1: Re-order nodes', () => { - const code = 'a; b;'; - const expected = `a\nb\n`; - const ast = generateFlatAST(code); - const targetNodes = [ - 4, // b() - 2, // a() - ]; - const result = targetModule(targetNodes.map(n => ast[n])); - assert.deepStrictEqual(result, expected); - }); - it('TP-2: Wrap calls in expressions', () => { - const code = 'a();'; - const expected = `a();\n`; - const ast = generateFlatAST(code);const targetNodes = [ - 2, // a() - ]; - const result = targetModule(targetNodes.map(n => ast[n])); - assert.deepStrictEqual(result, expected); - }); - it('TP-3: Push IIFEs to the end in order', () => { - const code = '(function(a){})(); a(); (function(b){})(); b();'; - const expected = `a();\nb();\n(function(a){})();\n(function(b){})();\n`; - const ast = generateFlatAST(code); - const targetNodes = [ - 10, // (function(b){})() - 15, // b() - 7, // a() - 2, // (function(a){})() - ]; - const result = targetModule(targetNodes.map(n => ast[n])); - assert.deepStrictEqual(result, expected); - }); - it('TP-4: Add dynamic name to IIFEs', () => { - const code = '!function(a){}(); a();'; - const expected = `a();\n(function func3(a){}());\n`; - const ast = generateFlatAST(code);const targetNodes = [ - 3, // function(a){}() - 8, // a() - ]; - const result = targetModule(targetNodes.map(n => ast[n])); - assert.deepStrictEqual(result, expected); - }); - it('TP-5: Add variable name to IIFEs', () => { - const code = 'const b = function(a){}(); a();'; - const expected = `a();\n(function b(a){}());\n`; - const ast = generateFlatAST(code);const targetNodes = [ - 4, // function(a){}() - 9, // a() - ]; - const result = targetModule(targetNodes.map(n => ast[n])); - assert.deepStrictEqual(result, expected); - }); - it(`TP-6: Preserve node order`, () => { - const code = '(function(a){})(); a(); (function(b){})(); b();'; - const expected = `(function(a){})();\na();\n(function(b){})();\nb();\n`; - const ast = generateFlatAST(code); - const targetNodes = [ - 10, // (function(b){})() - 7, // a() - 15, // b() - 2, // (function(a){})() - ]; - const result = targetModule(targetNodes.map(n => ast[n]), true); - assert.deepStrictEqual(result, expected); - }); - it(`TP-7: Standalone FEs`, () => { - const code = '~function(iife1){}();~function(iife2){}();'; - const expected = `(function func4(iife1){});\n(function func10(iife2){});\n`; - const ast = generateFlatAST(code); - const targetNodes = [ - 10, // function(iife2){} - 4, // function(iife1){} - ]; - const result = targetModule(targetNodes.map(n => ast[n]), true); - assert.deepStrictEqual(result, expected); - }); -}); -describe('UTILS: getCache', async () => { - const getCache = (await import('../src/modules/utils/getCache.js')).getCache; - it('TP-1: Retain values', () => { - const key1 = 'hash1'; - const key2 = 'hash2'; - const cache = getCache(key1); - assert.deepStrictEqual(cache, {}); - cache['key1'] = 'value1'; - const expectedC1 = {key1: 'value1'}; - assert.deepStrictEqual(cache, expectedC1); - const cache2 = getCache(key1); - assert.deepStrictEqual(cache2, expectedC1); - const cache3 = getCache(key2); - assert.deepStrictEqual(cache3, {}); - }); - it('TP-2: Flush cache', () => { - const key = 'flush1'; - let cache = getCache(key); - assert.deepStrictEqual(cache, {}); - cache['k'] = 'v'; - const expectedC1 = {k: 'v'}; - assert.deepStrictEqual(cache, expectedC1); - getCache.flush(); - cache = getCache(key); - assert.deepStrictEqual(cache, {}); - }); -}); - +}); \ No newline at end of file diff --git a/tests/modules.unsafe.test.js b/tests/modules.unsafe.test.js new file mode 100644 index 0000000..d21d178 --- /dev/null +++ b/tests/modules.unsafe.test.js @@ -0,0 +1,212 @@ +/* eslint-disable no-unused-vars */ +import assert from 'node:assert'; +import {describe, it} from 'node:test'; +import {badValue} from '../src/modules/config.js'; +import {Arborist, generateFlatAST, applyIteratively} from 'flast'; + +/** + * Apply a module to a given code snippet. + * @param {string} code The code snippet to apply the module to + * @param {function} func The function to apply + * @param {boolean} [looped] Whether to apply the module iteratively until no longer effective + * @return {string} The result of the operation + */ +function applyModuleToCode(code, func, looped = false) { + let result; + if (looped) { + result = applyIteratively(code, [func]); + } else { + const arb = new Arborist(code); + result = func(arb); + result.applyChanges(); + result = result.script; + } + return result; +} + +describe('UNSAFE: normalizeRedundantNotOperator', async () => { + const targetModule = (await import('../src/modules/unsafe/normalizeRedundantNotOperator.js')).default; + it('TP-1', () => { + const code = `!true || !false || !0 || !1 || !a || !'a' || ![] || !{} || !-1 || !!true || !!!true`; + const expected = `false || true || true || false || !a || false || false || false || false || true || false;`; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); +}); +describe('UNSAFE: resolveAugmentedFunctionWrappedArrayReplacements', async () => { + // Load the module even though there are no tests for it - to include it in the coverage report + // noinspection JSUnusedLocalSymbols + const targetModule = (await import('../src/modules/unsafe/resolveAugmentedFunctionWrappedArrayReplacements.js')).evalWithDom; + it.todo('TODO: Write tests for function', () => {}); +}); +describe('UNSAFE: resolveBuiltinCalls', async () => { + const targetModule = (await import('../src/modules/unsafe/resolveBuiltinCalls.js')).default; + it('TP-1: atob', () => { + const code = `atob('c29sdmVkIQ==');`; + const expected = `'solved!';`; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); + it('TP-2: btoa', () => { + const code = `btoa('solved!');`; + const expected = `'c29sdmVkIQ==';`; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); + it('TP-3: split', () => { + const code = `'ok'.split('');`; + const expected = `[\n 'o',\n 'k'\n];`; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); + it('TN-1: querySelector', () => { + const code = `document.querySelector('div');`; + const expected = code; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); + it('TN-2: Unknown variable', () => { + const code = `atob(x)`; + const expected = code; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); + it('TN-3: Overwritten builtin', () => { + const code = `function atob() {return 1;} atob('test');`; + const expected = code; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); +}); +describe('UNSAFE: resolveDefiniteBinaryExpressions', async () => { + const targetModule = (await import('../src/modules/unsafe/resolveDefiniteBinaryExpressions.js')).default; + it('TP-1', () => { + const code = `5 * 3; '2' + 2; '10' - 1; 'o' + 'k'; 'o' - 'k'; 3 - -1;`; + const expected = `15;\n'22';\n9;\n'ok';\nNaN;\n4;`; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); +}); +describe('UNSAFE: resolveDefiniteMemberExpressions', async () => { + const targetModule = (await import('../src/modules/unsafe/resolveDefiniteMemberExpressions.js')).default; + it('TP-1', () => { + const code = `'123'[0]; 'hello'.length;`; + const expected = `'1';\n5;`; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); + it('TN-1', () => { + const code = `++[[]][0];`; + const expected = code; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); +}); +describe('UNSAFE: resolveDeterministicConditionalExpressions', async () => { + const targetModule = (await import('../src/modules/unsafe/resolveDeterministicConditionalExpressions.js')).default; + it('TP-1', () => { + const code = `(true ? 1 : 2); (false ? 3 : 4);`; + const expected = `1;\n4;`; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); + it('TN-1', () => { + const code = `({} ? 1 : 2); ([].length ? 3 : 4);`; + const expected = code; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); +}); +describe('UNSAFE: resolveEvalCallsOnNonLiterals', async () => { + const targetModule = (await import('../src/modules/unsafe/resolveEvalCallsOnNonLiterals.js')).default; + it('TP-1', () => { + const code = `eval(function(a) {return a}('atob'));`; + const expected = `atob;`; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); + it('TP-2', () => { + const code = `eval([''][0]);`; + const expected = `''`; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); +}); +describe('UNSAFE: resolveFunctionToArray', async () => { + const targetModule = (await import('../src/modules/unsafe/resolveFunctionToArray.js')).default; + it('TP-1', () => { + const code = `function a() {return [1];}\nconst b = a();`; + const expected = `function a() {\n return [1];\n}\nconst b = [1];`; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); +}); +describe('UNSAFE: resolveInjectedPrototypeMethodCalls', async () => { + const targetModule = (await import('../src/modules/unsafe/resolveInjectedPrototypeMethodCalls.js')).default; + it('TP-1', () => { + const code = `String.prototype.secret = function () {return 'secret ' + this;}; 'hello'.secret();`; + const expected = `String.prototype.secret = function () {\n return 'secret ' + this;\n};\n'secret hello';`; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); +}); +describe('UNSAFE: resolveLocalCalls', async () => { + const targetModule = (await import('../src/modules/unsafe/resolveLocalCalls.js')).default; + it('TP-1: Function declaration', () => { + const code = `function add(a, b) {return a + b;} add(1, 2);`; + const expected = `function add(a, b) {\n return a + b;\n}\n3;`; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); + it('TP-2: Arrow function', () => { + const code = `const add = (a, b) => a + b; add(1, 2);`; + const expected = `const add = (a, b) => a + b;\n3;`; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); + it('TP-3: Overwritten builtin', () => { + const code = `const atob = (a, b) => a + b; atob('got-');`; + const expected = `const atob = (a, b) => a + b;\n'got-undefined';`; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); + it('TN-1: Missing declaration', () => { + const code = `add(1, 2);`; + const expected = code; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); + it('TN-2: Skipped builtin', () => { + const code = `btoa('a');`; + const expected = code; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); + it('TN-2: No replacement with undefined', () => { + const code = `function a() {} a();`; + const expected = code; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); +}); +describe('UNSAFE: resolveMinimalAlphabet', async () => { + const targetModule = (await import('../src/modules/unsafe/resolveMinimalAlphabet.js')).default; + it('TP-1', () => { + const code = `+true; -true; +false; -false; +[]; ~true; ~false; ~[]; +[3]; +['']; -[4]; ![]; +[[]];`; + const expected = `1;\n-'1';\n0;\n-0;\n0;\n-'2';\n-'1';\n-'1';\n3;\n0;\n-'4';\nfalse;\n0;`; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); + it('TP-2', () => { + const code = `[] + []; [+[]]; (![]+[]); +[!+[]+!+[]];`; + const expected = `'';\n[0];\n'false';\n2;`; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); + it('TN-1', () => { + const code = `-false; -[]; +{}; -{}; -'a'; ~{}; -['']; +[1, 2]; +this; +[this];`; + const expected = `-0;\n-0;\n+{};\n-{};\nNaN;\n~{};\n-0;\nNaN;\n+this;\n+[this];`; + const result = applyModuleToCode(code, targetModule); + assert.deepStrictEqual(result, expected); + }); +}); \ No newline at end of file diff --git a/tests/modules.utils.test.js b/tests/modules.utils.test.js new file mode 100644 index 0000000..20f9877 --- /dev/null +++ b/tests/modules.utils.test.js @@ -0,0 +1,506 @@ +/* eslint-disable no-unused-vars */ +import assert from 'node:assert'; +import {describe, it, beforeEach} from 'node:test'; +import {badValue} from '../src/modules/config.js'; +import {generateFlatAST} from 'flast'; + +describe('UTILS: evalInVm', async () => { + const targetModule = (await import('../src/modules/utils/evalInVm.js')).evalInVm; + it('TP-1', () => { + const code = `'hello ' + 'there';`; + const expected = {type: 'Literal', value: 'hello there', raw: 'hello there'}; + const result = targetModule(code); + assert.deepStrictEqual(result, expected); + }); + it('TN-1', () => { + const code = `Math.random();`; + const expected = badValue; + const result = targetModule(code); + assert.deepStrictEqual(result, expected); + }); + it('TN-2', () => { + const code = `function a() {return console;} a();`; + const expected = badValue; + const result = targetModule(code); + assert.deepStrictEqual(result, expected); + }); +}); +describe.todo('UTILS: evalWithDom', async () => { + // Load the module even though there are no tests for it - to include it in the coverage report + // noinspection JSUnusedLocalSymbols + const targetModule = (await import('../src/modules/utils/evalWithDom.js')).evalWithDom; +}); +describe('UTILS: areReferencesModified', async () => { + const targetModule = (await import('../src/modules/utils/areReferencesModified.js')).areReferencesModified; + it('TP-1: Update expression', () => { + const code = `let a = 1; let b = 2 + a, c = a + 3; a++;`; + const ast = generateFlatAST(code); + const result = targetModule(ast, ast.find(n => n.src === 'a = 1').id.references); + assert.ok(result); + }); + it('TP-2: Direct assignment', () => { + const code = `let a = 1; let b = 2 + a, c = (a += 2) + 3;`; + const ast = generateFlatAST(code); + const result = targetModule(ast, ast.find(n => n.src === 'a = 1').id.references); + assert.ok(result); + }); + it('TP-3: Assignment to property', () => { + const code = `const a = {b: 2}; a.b = 1;`; + const ast = generateFlatAST(code); + const result = targetModule(ast, ast.find(n => n.src === 'a = {b: 2}').id.references); + assert.ok(result); + }); + it('TP-4: Re-assignment to property', () => { + const code = `const a = {b: 2}; a.b = 1; a.c = a.b; a.b = 3;`; + const ast = generateFlatAST(code); + const result = targetModule(ast, [ast.find(n => n.src === `a.c = a.b`)?.right]); + assert.ok(result); + }); + it('TN-1: No assignment', () => { + const code = `const a = 1; let b = 2 + a, c = a + 3;`; + const expected = false; + const ast = generateFlatAST(code); + const result = targetModule(ast, ast.find(n => n.src === 'a = 1').id.references); + assert.deepStrictEqual(result, expected); + }); +}); +describe('UTILS: createNewNode', async () => { + const targetModule = (await import('../src/modules/utils/createNewNode.js')).createNewNode; + it('Literan: String', () => { + const code = 'Baryo'; + const expected = {type: 'Literal', value: 'Baryo', raw: 'Baryo'}; + const result = targetModule(code); + assert.deepStrictEqual(result, expected); + }); + it('Literan: String that starts with !', () => { + const code = '!Baryo'; + const expected = {type: 'Literal', value: '!Baryo', raw: '!Baryo'}; + const result = targetModule(code); + assert.deepStrictEqual(result, expected); + }); + it('Literal: Number - positive number', () => { + const code = 3; + const expected = {type: 'Literal', value: 3, raw: '3'}; + const result = targetModule(code); + assert.deepStrictEqual(result, expected); + }); + it('Literal: Number - negative number', () => { + const code = -3; + const expected = {type: 'UnaryExpression', operator: '-', argument: {type: 'Literal', value: '3', raw: '3'}}; + const result = targetModule(code); + assert.deepStrictEqual(result, expected); + }); + it('Literal: Number - negative infinity', () => { + const code = -Infinity; + const expected = {type: 'UnaryExpression', operator: '-', argument: {type: 'Identifier', name: 'Infinity'}}; + const result = targetModule(code); + assert.deepStrictEqual(result, expected); + }); + it('Literal: Number - negative zero', () => { + const code = -0; + const expected = {type: 'UnaryExpression', operator: '-', argument: {type: 'Literal', value: 0, raw: '0'}}; + const result = targetModule(code); + assert.deepStrictEqual(result, expected); + }); + it('Literal: Number - NOT operator', () => { + const code = '!3'; + const expected = {type: 'UnaryExpression', operator: '!', argument: {type: 'Literal', value: '3', raw: '3'}}; + const result = targetModule(code); + assert.deepStrictEqual(result, expected); + }); + it('Literal: Number - Identifier', () => { + const code1 = Infinity; + const expected1 = {type: 'Identifier', name: 'Infinity'}; + const result1 = targetModule(code1); + assert.deepStrictEqual(result1, expected1); + const code2 = NaN; + const expected2 = {type: 'Identifier', name: 'NaN'}; + const result2 = targetModule(code2); + assert.deepStrictEqual(result2, expected2); + }); + it('Literal: Boolean', () => { + const code = true; + const expected = {type: 'Literal', value: true, 'raw': 'true'}; + const result = targetModule(code); + assert.deepStrictEqual(result, expected); + }); + it('Array: empty', () => { + const code = []; + const expected = {type: 'ArrayExpression', elements: []}; + const result = targetModule(code); + assert.deepStrictEqual(result, expected); + }); + it('Array: populated', () => { + const code = [1, 'a']; + const expected = {type: 'ArrayExpression', elements: [ + {type: 'Literal', value: 1, raw: '1'}, + {type: 'Literal', value: 'a', raw: 'a'} + ]}; + const result = targetModule(code); + assert.deepEqual(result, expected); + }); + it('Object: empty', () => { + const code = {}; + const expected = {type: 'ObjectExpression', properties: []}; + const result = targetModule(code); + assert.deepStrictEqual(result, expected); + }); + it('Object: populated', () => { + const code = {a: 1}; + const expected = {type: 'ObjectExpression', properties: [{ + type: 'Property', + key: {type: 'Literal', value: 'a', raw: 'a'}, + value: {type: 'Literal', value: 1, raw: '1'} + }]}; + const result = targetModule(code); + assert.deepEqual(result, expected); + }); + it('Object: populated with BadValue', () => { + const code = {a() {}}; + const expected = badValue; + const result = targetModule(code); + assert.deepEqual(result, expected); + }); + it('Undefined', () => { + const code = undefined; + const expected = {type: 'Identifier', name: 'undefined'}; + const result = targetModule(code); + assert.deepStrictEqual(result, expected); + }); + it('Null', () => { + const code = null; + const expected = {type: 'Literal', raw: 'null'}; + const result = targetModule(code); + assert.deepStrictEqual(result, expected); + }); + it.todo('TODO: Implement Function', () => { + }); + it('RegExp', () => { + const code = /regexp/gi; + const expected = {type: 'Literal', regex: {flags: 'gi', pattern: 'regexp'}}; + const result = targetModule(code); + assert.deepStrictEqual(result, expected); + }); + +}); +describe('UTILS: createOrderedSrc', async () => { + const targetModule = (await import('../src/modules/utils/createOrderedSrc.js')).createOrderedSrc; + it('TP-1: Re-order nodes', () => { + const code = 'a; b;'; + const expected = `a\nb\n`; + const ast = generateFlatAST(code); + const targetNodes = [ + 4, // b() + 2, // a() + ]; + const result = targetModule(targetNodes.map(n => ast[n])); + assert.deepStrictEqual(result, expected); + }); + it('TP-2: Wrap calls in expressions', () => { + const code = 'a();'; + const expected = `a();\n`; + const ast = generateFlatAST(code);const targetNodes = [ + 2, // a() + ]; + const result = targetModule(targetNodes.map(n => ast[n])); + assert.deepStrictEqual(result, expected); + }); + it('TP-3: Push IIFEs to the end in order', () => { + const code = '(function(a){})(); a(); (function(b){})(); b();'; + const expected = `a();\nb();\n(function(a){})();\n(function(b){})();\n`; + const ast = generateFlatAST(code); + const targetNodes = [ + 10, // (function(b){})() + 15, // b() + 7, // a() + 2, // (function(a){})() + ]; + const result = targetModule(targetNodes.map(n => ast[n])); + assert.deepStrictEqual(result, expected); + }); + it('TP-4: Add dynamic name to IIFEs', () => { + const code = '!function(a){}(); a();'; + const expected = `a();\n(function func3(a){}());\n`; + const ast = generateFlatAST(code);const targetNodes = [ + 3, // function(a){}() + 8, // a() + ]; + const result = targetModule(targetNodes.map(n => ast[n])); + assert.deepStrictEqual(result, expected); + }); + it('TP-5: Add variable name to IIFEs', () => { + const code = 'const b = function(a){}(); a();'; + const expected = `a();\n(function b(a){}());\n`; + const ast = generateFlatAST(code);const targetNodes = [ + 4, // function(a){}() + 9, // a() + ]; + const result = targetModule(targetNodes.map(n => ast[n])); + assert.deepStrictEqual(result, expected); + }); + it(`TP-6: Preserve node order`, () => { + const code = '(function(a){})(); a(); (function(b){})(); b();'; + const expected = `(function(a){})();\na();\n(function(b){})();\nb();\n`; + const ast = generateFlatAST(code); + const targetNodes = [ + 10, // (function(b){})() + 7, // a() + 15, // b() + 2, // (function(a){})() + ]; + const result = targetModule(targetNodes.map(n => ast[n]), true); + assert.deepStrictEqual(result, expected); + }); + it(`TP-7: Standalone FEs`, () => { + const code = '~function(iife1){}();~function(iife2){}();'; + const expected = `(function func4(iife1){});\n(function func10(iife2){});\n`; + const ast = generateFlatAST(code); + const targetNodes = [ + 10, // function(iife2){} + 4, // function(iife1){} + ]; + const result = targetModule(targetNodes.map(n => ast[n]), true); + assert.deepStrictEqual(result, expected); + }); +}); +describe('UTILS: doesBinaryExpressionContainOnlyLiterals', async () => { + const targetModule = (await import('../src/modules/utils/doesBinaryExpressionContainOnlyLiterals.js')).doesBinaryExpressionContainOnlyLiterals; + it('TP-1: Literal', () => { + const code = `'a';`; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'Literal')); + assert.ok(result); + }); + it('TP-2: Unary literal', () => { + const code = `-'a';`; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'UnaryExpression')); + assert.ok(result); + }); + it('TP-3: Binary expression', () => { + const code = `1 + 2`; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'BinaryExpression')); + assert.ok(result); + }); + it('TP-4: Nesting binary expressions', () => { + const code = `1 + 2 + 3 + 4`; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'BinaryExpression')); + assert.ok(result); + }); + it('TN-1: Identifier', () => { + const code = `a`; + const expected = false; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'Identifier')); + assert.strictEqual(result, expected); + }); + it('TN-2: Unary Identifier', () => { + const code = `!a`; + const expected = false; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'UnaryExpression')); + assert.strictEqual(result, expected); + }); + it('TN-3: Binary expression', () => { + const code = `1 + b`; + const expected = false; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'BinaryExpression')); + assert.strictEqual(result, expected); + }); + it('TN-3: Nesting binary expression', () => { + const code = `1 + b + 3 + 4`; + const expected = false; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'BinaryExpression')); + assert.strictEqual(result, expected); + }); +}); +describe('UTILS: getCache', async () => { + const getCache = (await import('../src/modules/utils/getCache.js')).getCache; + it('TP-1: Retain values', () => { + const key1 = 'hash1'; + const key2 = 'hash2'; + const cache = getCache(key1); + assert.deepStrictEqual(cache, {}); + cache['key1'] = 'value1'; + const expectedC1 = {key1: 'value1'}; + assert.deepStrictEqual(cache, expectedC1); + const cache2 = getCache(key1); + assert.deepStrictEqual(cache2, expectedC1); + const cache3 = getCache(key2); + assert.deepStrictEqual(cache3, {}); + }); + it('TP-2: Flush cache', () => { + const key = 'flush1'; + let cache = getCache(key); + assert.deepStrictEqual(cache, {}); + cache['k'] = 'v'; + const expectedC1 = {k: 'v'}; + assert.deepStrictEqual(cache, expectedC1); + getCache.flush(); + cache = getCache(key); + assert.deepStrictEqual(cache, {}); + }); +}); +describe('UTILS: getCalleeName', async () => { + const targetModule = (await import('../src/modules/utils/getCalleeName.js')).getCalleeName; + it('TP-1: Simple call expression', () => { + const code = `a();`; + const expected = 'a'; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'CallExpression')); + assert.deepStrictEqual(result, expected); + }); + it('TP-2: Member expression callee', () => { + const code = `a.b();`; + const expected = 'a'; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'CallExpression')); + assert.deepStrictEqual(result, expected); + }); + it('TP-3: Nested member expression callee', () => { + const code = `a.b.c();`; + const expected = 'a'; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'CallExpression')); + assert.deepStrictEqual(result, expected); + }); + it('TP-4: Literal callee (string)', () => { + const code = `'a'.split('');`; + const expected = 'a'; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'CallExpression')); + assert.deepStrictEqual(result, expected); + }); + it('TP-5: Literal callee (number)', () => { + const code = `1..toString();`; + const expected = 1; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'CallExpression')); + assert.deepStrictEqual(result, expected); + }); +}); +describe('UTILS: getDeclarationWithContext', async () => { + const targetModule = (await import('../src/modules/utils/getDeclarationWithContext.js')).getDeclarationWithContext; + const getCache = (await import('../src/modules/utils/getCache.js')).getCache; + beforeEach(() => { + getCache.flush(); + }); + it(`TP-1: Call expression with function declaration`, () => { + const code = `function a() {return 1;}\na();`; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'CallExpression')); + const expected = [ast[7], ast[1]]; + assert.deepStrictEqual(result, expected); + }); + it(`TP-2: Call expression with function expression`, () => { + const code = `const a = () => 2;\na();`; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'CallExpression')); + const expected = [ast[7], ast[2]]; + assert.deepStrictEqual(result, expected); + }); + it(`TP-3: Nested call with FE`, () => { + const code = `const b = 3;\nconst a = () => b;\na();`; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'CallExpression')); + const expected = [ast[11], ast[6], ast[2]]; + assert.deepStrictEqual(result, expected); + }); + it(`TP-4: Anti-debugging function overwrite`, () => { + const code = `function a() {}\na = {};\na.b = 2;\na = {};\na(a.b);`; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'FunctionDeclaration')); + const expected = [ast[1], ast[9]]; + assert.deepStrictEqual(result, expected); + }); + it(`TP-5: Collect assignments on references`, () => { + const code = `let a = 1; function b(arg) {arg = 3;} b(a);`; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'Identifier' && n.name === 'a')); + const expected = [ast[2], ast[14], ast[5]]; + assert.deepStrictEqual(result, expected); + }); + it(`TP-6: Collect relevant parents for anonymous FE`, () => { + const code = `(function() {})()`; + const ast = generateFlatAST(code); + const result = targetModule(ast.find(n => n.type === 'FunctionExpression')); + const expected = [ast[2]]; + assert.deepStrictEqual(result, expected); + }); + it(`TN-1: Prevent collection before changes are applied` , () => { + const code = `function a() {}\na = {};\na.b = 2;\na = a.b;\na(a.b);`; + const ast = generateFlatAST(code); + ast[9].isMarked = true; + const result = targetModule(ast.find(n => n.src === 'a = a.b'), true); + const expected = []; + assert.deepStrictEqual(result, expected); + }); +}); +describe('UTILS: getDescendants', async () => { + const targetModule = (await import('../src/modules/utils/getDescendants.js')).getDescendants; + it('TP-1', () => { + const code = `a + b;`; + const ast = generateFlatAST(code); + const targetNode = ast.find(n => n.type === 'BinaryExpression'); + const expected = ast.slice(targetNode.nodeId + 1); + const result = targetModule(targetNode); + assert.deepStrictEqual(result, expected); + }); + it('TP-2: Limited scope', () => { + const code = `a + -b; c + d;`; + const ast = generateFlatAST(code); + const targetNode = ast.find(n => n.type === 'BinaryExpression'); + const expected = ast.slice(targetNode.nodeId + 1, targetNode.nodeId + 4); + const result = targetModule(targetNode); + assert.deepStrictEqual(result, expected); + }); + it('TN-1: No descendants', () => { + const code = `a; b; c;`; + const ast = generateFlatAST(code); + const targetNode = ast.find(n => n.type === 'Identifier'); + const expected = []; + const result = targetModule(targetNode); + assert.deepStrictEqual(result, expected); + }); +}); +describe('UTILS: getMainDeclaredObjectOfMemberExpression', async () => { + const targetModule = (await import('../src/modules/utils/getMainDeclaredObjectOfMemberExpression.js')).getMainDeclaredObjectOfMemberExpression; + it('TP-1', () => { + const code = `a.b;`; + const ast = generateFlatAST(code); + const targetNode = ast.find(n => n.type === 'MemberExpression'); + const expected = targetNode.object; + const result = targetModule(targetNode); + assert.deepStrictEqual(result, expected); + }); + it('TP-2: Nested member expression', () => { + const code = `a.b.c.d;`; + const ast = generateFlatAST(code); + const targetNode = ast.find(n => n.type === 'MemberExpression'); + const expected = ast.find(n => n.type === 'Identifier' && n.src === 'a'); + const result = targetModule(targetNode); + assert.deepStrictEqual(result, expected); + }); +}); +describe('UTILS: isNodeInRanges', async () => { + const targetModule = (await import('../src/modules/utils/isNodeInRanges.js')).isNodeInRanges; + it('TP-1: In range', () => { + const code = `a.b;`; + const ast = generateFlatAST(code); + const targetNode = ast.find(n => n.src === 'b'); + const result = targetModule(targetNode, [[2, 3]]); + assert.ok(result); + }); + it('TN-1: Not in range', () => { + const code = `a.b;`; + const ast = generateFlatAST(code); + const targetNode = ast.find(n => n.src === 'b'); + const result = targetModule(targetNode, [[1, 2]]); + const expected = false; + assert.strictEqual(result, expected); + }); +}); \ No newline at end of file diff --git a/tests/resources/localProxies.js-deob.js b/tests/resources/localProxies.js-deob.js index bea9299..56ed804 100644 --- a/tests/resources/localProxies.js-deob.js +++ b/tests/resources/localProxies.js-deob.js @@ -799,7 +799,7 @@ const _0x29754e = _0x41e312 => { return _0x41e312.charAt(0).toUpperCase() + _0x41e312.slice(1); }; function _0x18585b(_0x39d250, _0x5b10a5, _0x5e9dc9) { - var _0x2dbea1 = function () { + var _0x2dbea1 = (function () { var _0x1dea60 = true; return function (_0x1094d5, _0x1b8cdc) { var _0x824ac8 = _0x1dea60 ? function () { @@ -813,7 +813,7 @@ function _0x18585b(_0x39d250, _0x5b10a5, _0x5e9dc9) { _0x1dea60 = false; return _0x824ac8; }; - }(); + }()); var _0x5d8b17 = _0x2dbea1(this, function () { var _0x5efb50 = function () { var _0x5d91f6 = /^([^ ]+( +[^ ]+)+)+[^ ]}/; diff --git a/tests/resources/obfuscatorIo.js-deob.js b/tests/resources/obfuscatorIo.js-deob.js index 8397f5f..034000b 100644 --- a/tests/resources/obfuscatorIo.js-deob.js +++ b/tests/resources/obfuscatorIo.js-deob.js @@ -127,7 +127,7 @@ var _yb = function (a, b) { } return c; }; -var _yg = function () { +var _yg = (function () { var a = true; return function (b, c) { var d = a ? function () { @@ -141,7 +141,7 @@ var _yg = function () { a = false; return d; }; -}(); +}()); var _yh = _yg(this, function () { var a = function () { var b = /^([^ ]+( +[^ ]+)+)+[^ ]}/; @@ -150,7 +150,7 @@ var _yh = _yg(this, function () { return a(); }); _yh(); -var _yi = function () { +var _yi = (function () { var a = true; return function (b, c) { var d = a ? function () { @@ -164,7 +164,7 @@ var _yi = function () { a = false; return d; }; -}(); +}()); (function () { _yi(this, function () { var a = new RegExp('function *\\( *\\)');