diff --git a/package-lock.json b/package-lock.json index 9d5a63b..3d5e7b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,6 @@ "express": "^4.18.2", "helmet": "^6.0.1", "morgan": "^1.10.0", - "puppeteer": "^19.4.1", "ts-node": "^10.9.1", "underscore": "^1.13.6", "unpacker": "^1.0.1" @@ -24,6 +23,7 @@ "devDependencies": { "@commitlint/config-conventional": "^17.4.4", "@tsconfig/recommended": "^1.0.2", + "@types/cors": "^2.8.17", "@types/express": "^4.17.17", "@types/jest": "^29.5.0", "@types/morgan": "^1.9.4", @@ -40,6 +40,7 @@ "prettier": "^3.0.3", "pretty": "^2.0.0", "ts-jest": "^29.1.0", + "tsconfig-paths": "^4.2.0", "tslib": "^2.5.0", "typescript": "^4.9.5" }, @@ -406,6 +407,7 @@ "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, "dependencies": { "color-convert": "^1.9.0" }, @@ -417,6 +419,7 @@ "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, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -2738,6 +2741,15 @@ "@types/node": "*" } }, + "node_modules/@types/cors": { + "version": "2.8.17", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz", + "integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/express": { "version": "4.17.17", "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", @@ -2903,15 +2915,6 @@ "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", "dev": true }, - "node_modules/@types/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", - "optional": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "6.7.5", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.5.tgz", @@ -3324,6 +3327,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, "dependencies": { "debug": "4" }, @@ -3335,6 +3339,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -3350,7 +3355,8 @@ "node_modules/agent-base/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==" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "node_modules/agentkeepalive": { "version": "4.3.0", @@ -3515,7 +3521,8 @@ "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/array-flatten": { "version": "1.1.1", @@ -3728,25 +3735,6 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/basic-auth": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", @@ -3772,16 +3760,6 @@ "node": ">=8" } }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -3930,37 +3908,6 @@ "node-int64": "^0.4.0" } }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "engines": { - "node": "*" - } - }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -4090,6 +4037,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, "engines": { "node": ">=6" } @@ -4254,17 +4202,6 @@ "node": ">=10" } }, - "node_modules/chromium-bidi": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.5.tgz", - "integrity": "sha512-rkav9YzRfAshSTG3wNXF7P7yNiI29QAo1xBXElPoCoSQR5n20q3cOyVhDv6S7+GlF/CJ/emUxlQiR0xOPurkGg==", - "dependencies": { - "mitt": "3.0.0" - }, - "peerDependencies": { - "devtools-protocol": "*" - } - }, "node_modules/ci-info": { "version": "3.8.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", @@ -4406,6 +4343,7 @@ "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, "dependencies": { "color-name": "1.1.3" } @@ -4413,7 +4351,8 @@ "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==" + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true }, "node_modules/color-support": { "version": "1.1.3", @@ -4641,13 +4580,14 @@ } }, "node_modules/cosmiconfig": { - "version": "8.1.3", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.1.3.tgz", - "integrity": "sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw==", + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", + "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", + "dev": true, "dependencies": { - "import-fresh": "^3.2.1", + "import-fresh": "^3.3.0", "js-yaml": "^4.1.0", - "parse-json": "^5.0.0", + "parse-json": "^5.2.0", "path-type": "^4.0.0" }, "engines": { @@ -4655,6 +4595,14 @@ }, "funding": { "url": "https://github.com/sponsors/d-fischer" + }, + "peerDependencies": { + "typescript": ">=4.9.5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/cosmiconfig-typescript-loader": { @@ -4678,14 +4626,6 @@ "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" }, - "node_modules/cross-fetch": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", - "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", - "dependencies": { - "node-fetch": "2.6.7" - } - }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -4925,11 +4865,6 @@ "node": ">=8" } }, - "node_modules/devtools-protocol": { - "version": "0.0.1107588", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1107588.tgz", - "integrity": "sha512-yIR+pG9x65Xko7bErCUSQaDLrO/P1p3JUzEk7JCU4DowPcGHkTGUGQapcfcLc4qj0UaALwZ+cr0riFgiqpixcg==" - }, "node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -5130,6 +5065,7 @@ "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, "optional": true, "dependencies": { "iconv-lite": "^0.6.2" @@ -5139,6 +5075,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -5147,14 +5084,6 @@ "node": ">=0.10.0" } }, - "node_modules/end-of-stream": { - "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==", - "dependencies": { - "once": "^1.4.0" - } - }, "node_modules/entities": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", @@ -5185,6 +5114,7 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, "dependencies": { "is-arrayish": "^0.2.1" } @@ -5219,6 +5149,7 @@ "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, "engines": { "node": ">=0.8.0" } @@ -5701,46 +5632,6 @@ "node": ">=0.10.0" } }, - "node_modules/extract-zip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", - "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", - "dependencies": { - "debug": "^4.1.1", - "get-stream": "^5.1.0", - "yauzl": "^2.10.0" - }, - "bin": { - "extract-zip": "cli.js" - }, - "engines": { - "node": ">= 10.17.0" - }, - "optionalDependencies": { - "@types/yauzl": "^2.9.1" - } - }, - "node_modules/extract-zip/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/extract-zip/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==" - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -5799,14 +5690,6 @@ "bser": "2.1.1" } }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dependencies": { - "pend": "~1.2.0" - } - }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -5920,9 +5803,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", + "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", "funding": [ { "type": "individual", @@ -5985,11 +5868,6 @@ "node": ">= 0.6" } }, - "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==" - }, "node_modules/fs-extra": { "version": "11.1.1", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz", @@ -6098,20 +5976,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/git-raw-commits": { "version": "2.0.11", "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-2.0.11.tgz", @@ -6311,6 +6175,7 @@ "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, "engines": { "node": ">=4" } @@ -6463,6 +6328,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, "dependencies": { "agent-base": "6", "debug": "4" @@ -6475,6 +6341,7 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -6490,7 +6357,8 @@ "node_modules/https-proxy-agent/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==" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "node_modules/human-signals": { "version": "2.1.0", @@ -6536,25 +6404,6 @@ "node": ">=0.10.0" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -6610,6 +6459,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -6714,7 +6564,8 @@ "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==" + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true }, "node_modules/is-binary-path": { "version": "2.1.0", @@ -8754,12 +8605,14 @@ "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, "dependencies": { "argparse": "^2.0.1" }, @@ -8788,7 +8641,8 @@ "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true }, "node_modules/json-parse-helpfulerror": { "version": "1.0.3", @@ -8936,7 +8790,8 @@ "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", - "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true }, "node_modules/locate-path": { "version": "6.0.0", @@ -9783,11 +9638,6 @@ "node": ">=8" } }, - "node_modules/mitt": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.0.tgz", - "integrity": "sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==" - }, "node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -9800,11 +9650,6 @@ "node": ">=10" } }, - "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==" - }, "node_modules/morgan": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", @@ -9850,25 +9695,6 @@ "node": ">= 0.6" } }, - "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/node-gyp": { "version": "9.3.1", "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.1.tgz", @@ -10544,6 +10370,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, "dependencies": { "wrappy": "1" } @@ -10724,6 +10551,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, "dependencies": { "callsites": "^3.0.0" }, @@ -10747,6 +10575,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, "dependencies": { "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", @@ -10849,15 +10678,11 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, "engines": { "node": ">=8" } }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==" - }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -11026,6 +10851,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, "engines": { "node": ">=0.4.0" } @@ -11119,15 +10945,6 @@ "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", "dev": true }, - "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==", - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, "node_modules/punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", @@ -11152,68 +10969,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/puppeteer": { - "version": "19.8.0", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-19.8.0.tgz", - "integrity": "sha512-MpQClmttCUxv4bVokX/YSXLCU12CUApuRf0rIJyGknYcIrDQNkLUx1N7hNt88Ya4lq9VDsdiDEJ3bcPijqJYPQ==", - "hasInstallScript": true, - "dependencies": { - "cosmiconfig": "8.1.3", - "https-proxy-agent": "5.0.1", - "progress": "2.0.3", - "proxy-from-env": "1.1.0", - "puppeteer-core": "19.8.0" - } - }, - "node_modules/puppeteer-core": { - "version": "19.8.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-19.8.0.tgz", - "integrity": "sha512-5gBkLR9nae7chWDhI3mpj5QA+hPmjEOW29qw5ap5g51Uo5Lxe5Yip1uyQwZSjg5Wn/eyE9grh2Lyx3m8rPK90A==", - "dependencies": { - "chromium-bidi": "0.4.5", - "cross-fetch": "3.1.5", - "debug": "4.3.4", - "devtools-protocol": "0.0.1107588", - "extract-zip": "2.0.1", - "https-proxy-agent": "5.0.1", - "proxy-from-env": "1.1.0", - "tar-fs": "2.1.1", - "unbzip2-stream": "1.4.3", - "ws": "8.13.0" - }, - "engines": { - "node": ">=14.14.0" - }, - "peerDependencies": { - "typescript": ">= 4.7.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/puppeteer-core/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/puppeteer-core/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==" - }, "node_modules/pure-rand": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.0.1.tgz", @@ -11535,6 +11290,7 @@ "version": "3.6.2", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -11671,6 +11427,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, "engines": { "node": ">=4" } @@ -12267,6 +12024,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==", + "dev": true, "dependencies": { "safe-buffer": "~5.2.0" } @@ -12356,6 +12114,7 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, "dependencies": { "has-flag": "^3.0.0" }, @@ -12392,37 +12151,6 @@ "node": ">=10" } }, - "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==", - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/tar-fs/node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/tar/node_modules/fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", @@ -12499,7 +12227,8 @@ "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "dev": true }, "node_modules/through2": { "version": "4.0.2", @@ -12572,11 +12301,6 @@ "node": "*" } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, "node_modules/trim-newlines": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", @@ -12710,6 +12434,29 @@ } } }, + "node_modules/tsconfig-paths": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", + "integrity": "sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==", + "dev": true, + "dependencies": { + "json5": "^2.2.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tsconfig-paths/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/tslib": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", @@ -12838,15 +12585,6 @@ "node": ">=4.2.0" } }, - "node_modules/unbzip2-stream": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", - "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", - "dependencies": { - "buffer": "^5.2.1", - "through": "^2.3.8" - } - }, "node_modules/undefsafe": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz", @@ -13021,7 +12759,8 @@ "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==", + "dev": true }, "node_modules/utils-merge": { "version": "1.0.1", @@ -13105,20 +12844,6 @@ "makeerror": "1.0.12" } }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/which": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/which/-/which-3.0.0.tgz", @@ -13278,7 +13003,8 @@ "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==", + "dev": true }, "node_modules/write-file-atomic": { "version": "3.0.3", @@ -13292,26 +13018,6 @@ "typedarray-to-buffer": "^3.1.5" } }, - "node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/xdg-basedir": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", @@ -13349,9 +13055,9 @@ } }, "node_modules/yargs": { - "version": "17.7.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", - "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, "dependencies": { "cliui": "^8.0.1", @@ -13375,15 +13081,6 @@ "node": ">=12" } }, - "node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, "node_modules/yn": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", diff --git a/package.json b/package.json index 83d2253..e13573d 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,6 @@ "express": "^4.18.2", "helmet": "^6.0.1", "morgan": "^1.10.0", - "puppeteer": "^19.4.1", "ts-node": "^10.9.1", "underscore": "^1.13.6", "unpacker": "^1.0.1" @@ -55,6 +54,7 @@ "devDependencies": { "@commitlint/config-conventional": "^17.4.4", "@tsconfig/recommended": "^1.0.2", + "@types/cors": "^2.8.17", "@types/express": "^4.17.17", "@types/jest": "^29.5.0", "@types/morgan": "^1.9.4", @@ -71,6 +71,7 @@ "prettier": "^3.0.3", "pretty": "^2.0.0", "ts-jest": "^29.1.0", + "tsconfig-paths": "^4.2.0", "tslib": "^2.5.0", "typescript": "^4.9.5" } diff --git a/src/index.ts b/src/index.ts index 4c6ac51..1bf9cc6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,26 +2,33 @@ import express from "express"; import morgan from "morgan"; import index from "./routes/app"; import providersList from "./routes/providers"; -import flv from "./routes/v1/anime/animeflv/AnimeflvRoutes"; -import latinhd from "./routes/v1/anime/animelatinohd/AnimeLatinoHDRoutes"; -import gogoanime from "./routes/v1/anime/gogoanime/GogoAnimeRoute"; -import zoro from "./routes/v1/anime/zoro/ZoroRoutes"; -import monoschinos from "./routes/v1/anime/monoschinos/MonosChinosRoute"; -import tioanime from './routes/v1/anime/tioanime/TioAnimeRoute' -import comick from "./routes/v1/manga/comick/ComickRoutes"; - -import inmanga from "./routes/v1/manga/inmanga/InmangaRoutes"; -import nhentai from "./routes/v1/manga/nhentai/NhentaiRoutes" -import mangareader from "./routes/v1/manga/mangareader/MangaReaderRoutes"; -import manganelo from "./routes/v1/manga/manganelo/ManganeloRoutes"; import helmet from "helmet"; import cors from 'cors' -import WcoStream from "./routes/v1/anime/wcostream/wcostreamRoutes"; + + +/* Anime */ +import flv from "@routes/anime/animeflv/AnimeflvRoutes"; +import latinhd from "@routes/anime/animelatinohd/AnimeLatinoHDRoutes"; +import gogoanime from "@routes/anime/gogoanime/GogoAnimeRoute"; +import zoro from "@routes/anime/zoro/ZoroRoutes"; +import monoschinos from "@routes/anime/monoschinos/MonosChinosRoute"; +import tioanime from '@routes/anime/tioanime/TioAnimeRoute' +import WcoStream from "@routes/anime/wcostream/wcostreamRoutes"; +import AnimeBlix from "@routes/anime/animeblix/AnimeBlixRoutes"; + +/* Manga */ +import comick from "@routes/manga/comick/ComickRoutes"; +import inmanga from "@routes/manga/inmanga/InmangaRoutes"; +import nhentai from "@routes/manga/nhentai/NhentaiRoutes" +import mangareader from "@routes/manga/mangareader/MangaReaderRoutes"; +import manganelo from "@routes/manga/manganelo/ManganeloRoutes"; + const app = express(); const port = process.env.PORT || 3000; app.use(index); app.use(providersList); + //config app.use(express.json()); app.use(express.urlencoded({ extended: false })); @@ -31,7 +38,8 @@ app.use(cors()) //routes -/*anime*/ +/* anime */ + app.use(flv); app.use(latinhd); app.use(gogoanime); @@ -39,16 +47,19 @@ app.use(monoschinos); app.use(zoro); app.use(tioanime) app.use(WcoStream); -/*anime*/ +app.use(AnimeBlix); + +/* anime */ + +/* Manga */ -/*Manga*/ app.use(comick); app.use(inmanga); app.use(nhentai) app.use(mangareader); app.use(manganelo); -/*Manga*/ +/* Manga */ /*error */ @@ -60,6 +71,7 @@ interface ErrorResponse { }; } +// eslint-disable-next-line @typescript-eslint/no-unused-vars app.use((err, res, _next) => { //console.log(err.statusCode); let response: ErrorResponse; diff --git a/src/routes/v1/anime/animeblix/AnimeBlixRoutes.ts b/src/routes/v1/anime/animeblix/AnimeBlixRoutes.ts new file mode 100644 index 0000000..2ee8681 --- /dev/null +++ b/src/routes/v1/anime/animeblix/AnimeBlixRoutes.ts @@ -0,0 +1,31 @@ +import { Router } from "express"; +import { AnimeBlix } from "../../../../scraper/sites/anime/AnimeBlix/AnimeBlix"; +const Anime = new AnimeBlix(); +const router = Router(); + +// Filter +router.get("/anime/animeblix/filter", async (req, res) => { + const { search, type, page, year, genre } = req.query + + const data = await Anime.GetAnimeByFilter(search as string, type as unknown as number, page as unknown as number, year as string, genre as string) + res.send(data) +}); + +// Anime Info +(Episodes list) +router.get("/anime/animeblix/name/:name", async (req, res) => { + + const { name } = req.params + const data = await Anime.GetAnimeInfo(name.includes("ver-")? name.replace("ver-","") : name) + res.send(data) + +}); + +// Episode Info +(Video Servers) +router.get("/anime/animeblix/episode/:episode", async (req, res) => { + const { episode } = req.params + const data = await Anime.GetEpisodeServers(episode) + res.send(data) + +}); + +export default router \ No newline at end of file diff --git a/src/routes/v1/anime/animelatinohd/AnimeLatinoHDRoutes.ts b/src/routes/v1/anime/animelatinohd/AnimeLatinoHDRoutes.ts index 9632b11..f1f0326 100644 --- a/src/routes/v1/anime/animelatinohd/AnimeLatinoHDRoutes.ts +++ b/src/routes/v1/anime/animelatinohd/AnimeLatinoHDRoutes.ts @@ -1,5 +1,5 @@ import { Router } from "express"; -import { AnimeLatinoHD } from "../../../../scraper/sites/anime/animelatinohd/AnimeLatinoHD"; +import { AnimeLatinoHD } from "@providers/animelatinohd/AnimeLatinoHD"; const Anime = new AnimeLatinoHD(); const router = Router(); diff --git a/src/routes/v1/anime/wcostream/wcostreamRoutes.ts b/src/routes/v1/anime/wcostream/wcostreamRoutes.ts index c77b860..27b1f5e 100644 --- a/src/routes/v1/anime/wcostream/wcostreamRoutes.ts +++ b/src/routes/v1/anime/wcostream/wcostreamRoutes.ts @@ -1,5 +1,6 @@ import { Router } from "express"; -import { WcoStream } from "../../../../scraper/sites/anime/wcostream/WcoStream"; +import { WcoStream } from "@providers/wcostream/WcoStream"; +import { RuntimeUnpacked } from "@animetypes/utils"; const Anime = new WcoStream(); const router = Router(); @@ -25,14 +26,13 @@ router.get("/anime/wcostream/filter", async (req, res) => { res.send(data) }) -/* - Global API -*/ router.post("/runtime/unpacked", async (req,res) => { - const {base64} = req.body - const data = await Anime.RuntimeUnpacked(base64) + const {base64,unBuffer} = req.body + const data = await RuntimeUnpacked(base64,unBuffer) return res.send(data) }) + + export default router \ No newline at end of file diff --git a/src/routes/v1/manga/comick/ComickRoutes.ts b/src/routes/v1/manga/comick/ComickRoutes.ts index 357db75..545f55a 100644 --- a/src/routes/v1/manga/comick/ComickRoutes.ts +++ b/src/routes/v1/manga/comick/ComickRoutes.ts @@ -1,5 +1,5 @@ import { Router } from "express"; -import { Comick } from "../../../../scraper/sites/manga/comick/Comick"; +import { Comick } from "@providers/comick/Comick"; const Manga = new Comick(); const router = Router(); diff --git a/src/routes/v1/manga/inmanga/InmangaRoutes.ts b/src/routes/v1/manga/inmanga/InmangaRoutes.ts index 74ec504..73ebac3 100644 --- a/src/routes/v1/manga/inmanga/InmangaRoutes.ts +++ b/src/routes/v1/manga/inmanga/InmangaRoutes.ts @@ -1,12 +1,12 @@ import { Router } from "express"; -import { Inmanga } from "../../../../scraper/sites/manga/inmanga/Inmanga"; +import { Inmanga } from "@providers/inmanga/Inmanga"; const Manga = new Inmanga(); const router = Router(); router.get("/manga/inmanga/filter", async (req, res) => { const { search, type, genre } = req.query; - const data = await Manga.GetMangaByFilter(search as string, type as unknown as number, genre as string[]); + const data = await Manga.GetMangaByFilter(search as string, type as unknown as number, genre as []); res.send(data) }); diff --git a/src/scraper/sites/anime/AnimeBlix/AnimeBlix.ts b/src/scraper/sites/anime/AnimeBlix/AnimeBlix.ts new file mode 100644 index 0000000..ef30e47 --- /dev/null +++ b/src/scraper/sites/anime/AnimeBlix/AnimeBlix.ts @@ -0,0 +1,182 @@ +import * as cheerio from "cheerio"; +import axios from "axios"; +import { Anime } from "@animetypes/anime"; +import { Episode, EpisodeServer } from "@animetypes/episode"; +import { AnimeSearch, ResultSearch, IResultSearch, IAnimeSearch } from "@animetypes/search"; +//import { Calendar } from "@animetypes/date"; + +/** List of Domains + * https://vwv.animeblix.org + * + * https://animeblix.xyz + * + * https://animeblix.com + * +*/ + +export class AnimeBlix { + readonly url = "https://vwv.animeblix.org"; + readonly api = "https://api.animelatinohd.com"; + + async GetAnimeInfo(anime: string): Promise { + try { + const { data } = await axios.get(`${this.url}/animes/${anime.includes("ver-") ? anime : "ver-"+anime}`); + const $ = cheerio.load(data); + + const AnimeTypes = $(".cn .info .r .u li span:contains('Tipo:')").next() + const AnimeStatus = $(".cn .info .r .u li span[class='em']").length ? $(".cn .info .r .u li span[class='em']").text() : $(".cn .info .r .u li span[class='fi']").length ? $(".cn .info .r .u li span[class='fi']").text() : $(".cn .info .r .u li span[class='es']").text() + const AnimeDate = $(".cn .info .r .u li span:contains('Fecha de emisión:')").next().text().trim().replace(" -", "").split(" ") + + const Dates = AnimeDate[0] ? new Date(String(AnimeDate[0])) : null + const DateFormat = new Intl.DateTimeFormat("en", { day: "numeric", month: "numeric", year: "numeric" }).format(Dates).split("/") + + + const AcceptAlts = $(".cn .info .r .u").next().find("li").text().replace("Nombre original: ", "").replace("Nombre en inglés: ", "---").replace("Nombre en japones: ", "---") + + let AltsSlice: number = 0 + + if (AcceptAlts.includes("Támbien conocido como:")) { + AltsSlice = AcceptAlts.indexOf("Támbien conocido como:") + } else if (AcceptAlts.includes("Estudio(s):")) { + AltsSlice = AcceptAlts.indexOf("Estudio(s):") + } else if (AcceptAlts.includes("Producido por:")) { + AltsSlice = AcceptAlts.indexOf("Producido por:") + } else if (AcceptAlts.includes("Licenciada por:")) { + AltsSlice = AcceptAlts.indexOf("Licenciada por:") + } + + const AltNames = AcceptAlts.slice(0, AltsSlice) + const AnimeInfo: Anime = { + name: $(".cn .ti h1 strong").text(), + url: `/anime/animeblix/name/${anime}`, + synopsis: $(".cn .info .r .tx .content p").first().text(), + alt_name: [...AltNames.split("---")], + image: { + url: $(".cn .info .l .i img").attr("data-src") + }, + genres: [...$(".cn .info .r .gn li").text().split(",")], + type: AnimeTypes.length ? AnimeTypes.text() == "TV" ? "Anime" : AnimeTypes.text() == "Pelicula" ? "Movie" : AnimeTypes.text() == "Ova" ? "OVA" : "Null" : "Null", //tv,pelicula,especial,ova + status: AnimeStatus, + date: AnimeDate[0] ? { year: DateFormat[2], month: DateFormat[1], day: DateFormat[0] } : null, + episodes: [] + } + + const ListEpisodeIndex = $(".sc .cn #l").html() + const RemoveSymbols: RegExp = /[^0-9,]+/g; + const ReplaceSymbols: RegExp = /(,)+/g; + const ListEpisode = ListEpisodeIndex.slice(ListEpisodeIndex.indexOf("var eps = "), ListEpisodeIndex.indexOf("; { + const AnimeEpisode: Episode = { + name: "Episode " +e, + number: e, + image: "", + url: `/anime/animeblix/episode/${anime+"-"+e}` + } + + AnimeInfo.episodes.push(AnimeEpisode); + }) + + return AnimeInfo; + + } catch (error) { + console.log(error) + } + } + async GetEpisodeServers(episode: string): Promise { + try { + + const number = episode.substring(episode.lastIndexOf("-") + 1) + const anime = episode.substring(0, episode.lastIndexOf("-")) + + const { data } = await axios.get(`${this.url}/${anime.replace("ver-","")}-${number}`); + const $ = cheerio.load(data); + fetch("https://vwv.animeblix.org/back", { + "headers": { + "accept": "*/*", + "accept-language": "es-419,es;q=0.9,es-ES;q=0.8,en;q=0.7,en-GB;q=0.6,en-US;q=0.5", + "content-type": "application/x-www-form-urlencoded; charset=UTF-8", + "sec-ch-ua": "\"Not A(Brand\";v=\"99\", \"Microsoft Edge\";v=\"121\", \"Chromium\";v=\"121\"", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "\"Windows\"", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "same-origin", + "x-requested-with": "XMLHttpRequest", + "cookie": "dom3ic8zudi28v8lr6fgphwffqoz0j6c=85632e4b-e8b5-4427-be7b-8b3c7156a788%3A1%3A1; sb_main_47d33eb2af15845dedc4fb60a160b2b4=1; sb_count_47d33eb2af15845dedc4fb60a160b2b4=2; sb_onpage_47d33eb2af15845dedc4fb60a160b2b4=0; sb_page_47d33eb2af15845dedc4fb60a160b2b4=7; pp_main_325f99fa973f521d38ec7eea8396403e=1; pp_sub_325f99fa973f521d38ec7eea8396403e=1", + + "Referrer-Policy": "strict-origin-when-cross-origin" + }, + "body": "acc=opt&i=333334322d3132", + "method": "POST" +}).then((e) =>e).then(async(e) =>console.log(await e.text())); + + const AnimeEpisodeInfo: Episode = { + name: number, + url: `/anime/animeblix/episode/${episode}`, + number: number, + image: "", + servers: [] + } + + + $("").map((e) => { + + const Server: EpisodeServer = { + name: "e.server.title", + url: "", + } + + Server.url = "https://api.animelatinohd.com/stream/" + Server.name = String(e) + + AnimeEpisodeInfo.servers.push(Server) + }) + + return AnimeEpisodeInfo; + } catch (error) { + console.log(error) + } + } + + async GetAnimeByFilter(search?: string, type?: number, page?: number, year?: string, genre?: string): Promise> { + try { + const { data } = await axios.get(`${this.api}/api/anime/list`, { + params: { + search: search, + type: type, + year: year, + genre: genre, + page: page + } + }); + + const animeSearchParseObj = data + + const animeSearch: ResultSearch = { + nav: { + count: animeSearchParseObj.data.length, + current: animeSearchParseObj.current_page, + next: animeSearchParseObj.data.length < 28 ? 0 : animeSearchParseObj.current_page + 1, + hasNext: animeSearchParseObj.data.length < 28 ? false : true + }, + results: [] + } + animeSearchParseObj.data.map(e => { + const animeSearchData: AnimeSearch = { + name: e.name, + image: "https://www.themoviedb.org/t/p/original" + e.poster + "?&w=53&q=95", + url: `/anime/animelatinohd/name/${e.slug}`, + type: "" + } + animeSearch.results.push(animeSearchData) + }) + return animeSearch; + } catch (error) { + console.log(error) + } + } + +} + + diff --git a/src/scraper/sites/anime/animelatinohd/AnimeLatinoHD.ts b/src/scraper/sites/anime/animelatinohd/AnimeLatinoHD.ts index 4903aeb..fc26a69 100644 --- a/src/scraper/sites/anime/animelatinohd/AnimeLatinoHD.ts +++ b/src/scraper/sites/anime/animelatinohd/AnimeLatinoHD.ts @@ -14,7 +14,9 @@ export class AnimeLatinoHD { const $ = cheerio.load(data); const animeInfoParseObj = JSON.parse($("#__NEXT_DATA__").html()).props.pageProps.data - + const Dates = new Date(String(animeInfoParseObj.aired)) + const DateFormat = new Intl.DateTimeFormat("en",{day:"numeric",month:"numeric",year:"numeric"}).format(Dates).split("/") + const AnimeInfo: Anime = { name: animeInfoParseObj.name, url: `/anime/animelatinohd/name/${anime}`, @@ -26,7 +28,7 @@ export class AnimeLatinoHD { genres: [...animeInfoParseObj.genres.split(",")], type: animeInfoParseObj.type, status: animeInfoParseObj.status == 1 ? "En emisión" : "Finalizado", - date: animeInfoParseObj.aired, + date: {year:DateFormat[2],month:DateFormat[1],day:DateFormat[0]}, episodes: [] } @@ -83,15 +85,49 @@ export class AnimeLatinoHD { } await Promise.all(animeEpisodeParseObj.players[f_index].map(async (e: { server: { title: string; }; id: string; }) => { - //let min = await axios.get("https://api.animelatinohd.com/stream/" + e.id, { headers: { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.62", "Referer": "https://www.animelatinohd.com/" } }) - // let dat = cheerio.load(min.data) - + //const min = await axios.get("https://filemoon.sx/e/smone1s7jjxv/CYM01HNMCGTSKT") + //const pageload = await BrowserHandler("https://animelatinohd.com/") + const Server: EpisodeServer = { name: e.server.title, url: "", } + //const cookies = [{name: 'v_id', value: "https://api.animelatinohd.com/stream/"+e.id},]; Server.url = "https://api.animelatinohd.com/stream/" + e.id Server.name = e.server.title + + + + //await pageload.page.setCookie(...cookies) + /*await pageload.page.evaluate(()=>{ + function getCookie(cname) { + const name = cname + "="; + const decodedCookie = decodeURIComponent(document.cookie); + const ca = decodedCookie.split(';'); + for(let i = 0; i { + let chrono_list: types.IChronology[] = []; + $('section.w-history ul.list-unstyled li').each((_i, element) => { // The chronological anime has to access its year and type as extra // information that is not included in the Chronology class chrono_list.push(new types.Chronology( - $(element).find('h3.title').text(), - PageInfo.url + $(element).find('div.media-body a').attr('href'), - PageInfo.url + $(element).find('figure.fa-play-circle img').attr('src') - )); - }); - return chrono_list; + $(element).find('h3.title').text(), + PageInfo.url + $(element).find('div.media-body a').attr('href'), + PageInfo.url + $(element).find('figure.fa-play-circle img').attr('src') + )); + }); + return chrono_list; } async function getEpisodeServers(url) { 'use strict' let servers: types.IEpisodeServer[] = []; - const $ = cheerio.load((await axios.get(url)).data); + const $ = cheerio.load((await axios.get(url)).data); const script = $($('script').get().pop()).text().trim(); try { const videos = new Function(script.substring(0, script.indexOf('$(document)')) .replace("var videos =", "return"))(); for (let i = 0; i < videos.length; i++) { - servers.push(new types.EpisodeServer(videos[i][0], + servers.push(new types.EpisodeServer(videos[i][0], videos[i][1].replace('\\', '') )); } - + const table_downloads = $($('table.table-downloads tbody')).children(); for (let i = 0; i < table_downloads.length; i++) { const server = $($(table_downloads[i]).find('td')[0]).text().trim(); - const episode_server = servers.find((episode) => { - return episode.name.toLowerCase() === server.toLocaleLowerCase(); + const episode_server = servers.find((episode) => { + return episode.name.toLowerCase() === server.toLocaleLowerCase(); }); if (!(episode_server == undefined || episode_server == null)) { episode_server.file_url = $(table_downloads[i]).find("a").attr('href'); } else { - servers.push({ - name: server, url: null, file_url: $(table_downloads[i]).find("a").attr('href') + servers.push({ + name: server, url: null, file_url: $(table_downloads[i]).find("a").attr('href') }); } + } + + + + } catch (error) { - console.log(error) - } + console.log(error) + } return servers; } async function getAnimeEpisodes(data) { let __episodes: types.IEpisode[] = []; data.episodes.forEach(episode_number => { - let episode = new types.Episode(); - episode.name = `${data.info[2]} Capitulo ${episode_number}`; - episode.image = PageInfo.url +`/uploads/thumbs/${data.info[0]}.jpg`; - episode.url = `/anime/tioanime/episode/${data.info[1]}-${episode_number}`; - episode.number = episode_number; - __episodes.push(episode); + let episode = new types.Episode(); + episode.name = `${data.info[2]} Capitulo ${episode_number}`; + episode.image = PageInfo.url + `/uploads/thumbs/${data.info[0]}.jpg`; + episode.url = `/anime/tioanime/episode/${data.info[1]}-${episode_number}`; + episode.number = episode_number; + __episodes.push(episode); }); return __episodes; } function getEpisode($, element) { - const title = $(element).find('h3.title').text().trim(); + const title = $(element).find('h3.title').text().trim(); const episode = new types.Episode(); episode.image = PageInfo.url + $(element).find('figure.fa-play-circle img').attr('src'); - episode.url = $(element).find('article.episode a').attr('href').replace('/ver/', '/anime/tioanime/servers/') - - for (let i = title.length - 1; i >= 0; i--) { - if (title[i] == ' ') { - episode.name = title.substring(0, i).trim(); + episode.url = $(element).find('article.episode a').attr('href').replace('/ver/', '/anime/tioanime/servers/') + + + for (let i = title.length - 1; i >= 0; i--) { + if (title[i] == ' ') { + episode.name = title.substring(0, i).trim(); episode.number = parseInt(title.substring(i + 1, title.length)); break; - } - } + } + } return episode; } async function getLastEpisodes() { let episodes: types.IEpisode[] = []; - try { - const $ = cheerio.load((await axios.get(PageInfo.url)).data); + try { + const $ = cheerio.load((await axios.get(PageInfo.url)).data); const elements = $('div.container section ul.episodes li').children(); for (let i = 0; i < elements.length; i++) { - episodes.push(getEpisode($, elements[i])); + episodes.push(await getEpisode($, elements[i])); } - } catch (error) { - console.log(error); - } - return episodes; + } catch (error) { + console.log(error); + } + return episodes; } function getGenres($, elements) { - let genres: string[] = []; - elements.each((_i, element) => { - genres.push($(element).find('a').text().trim()); - }); - return genres; + let genres: string[] = []; + elements.each((_i, element) => { + genres.push($(element).find('a').text().trim()); + }); + return genres; } function getScriptAnimeInfo($) { @@ -113,7 +119,7 @@ function getScriptAnimeInfo($) { try { script = script.substring(0, script.indexOf('$(document)')); script = script.substring(0, script.indexOf("var episodes_details")) - + "return { info: anime_info, episodes: episodes };"; + + "return { info: anime_info, episodes: episodes };"; const variables = new Function(script)() return { info: variables.info, episodes: variables.episodes }; } catch (error) { @@ -125,91 +131,92 @@ function getScriptAnimeInfo($) { async function getAnime(url) { // ignore property alt_name const $ = cheerio.load((await axios.get(url)).data); - const data = getScriptAnimeInfo($); + const data = getScriptAnimeInfo($); // It is possible that the object returned by the getScriptAnimeInfo function is null. if (data == null) throw new Error('The getScriptAnimeInfo() function returns a null value.'); - const anime = new types.Anime(); - anime.name = $('div.container h1.title').text(); - //anime.url = url; - anime.url = url.replace('https://tioanime.com/anime/', '/anime/tioanime/name/'); + const anime = new types.Anime(); + anime.name = $('div.container h1.title').text(); + //anime.url = url; + anime.url = url.replace('https://tioanime.com/anime/', '/anime/tioanime/name/'); //anime.type = $('div.meta span.anime-type-peli').text(); - anime.type = (() => { - switch ($('div.meta span.anime-type-peli').text().toLowerCase()) { - case "anime": - return "Anime"; - case "movie": - return "Movie"; - case "one": - return "ONA"; - case "ona": - return "OVA"; - } - return "Null"; - })(); - + anime.type = (() => { + switch ($('div.meta span.anime-type-peli').text().toLowerCase()) { + case "anime": + return "Anime"; + case "movie": + return "Movie"; + case "one": + return "ONA"; + case "ona": + return "OVA"; + } + return "Null"; + })(); + //anime.year = parseInt($('div.meta span.year').text().trim()); - anime.date = new types.DatePeriod(new types.Calendar(data.info.length < 4 ? - parseInt($('div.meta span.year').text().trim().substring(0, 4)) : - new Date(data.info[3]).getFullYear()) - ); - anime.synopsis = $('p.sinopsis').text().trim(); - anime.genres = getGenres($, $('div.container p.genres span')); - anime.image = new types.Image(PageInfo.url + $('div.container div.thumb figure img').attr('src'), - $('figure.backdrop img').attr('src') == undefined ? "" : - PageInfo.url + $('figure.backdrop img').attr('src') - ); - anime.status = $('div.thumb a.status').text().trim() === 'En emision'; - anime.station = $('div.meta span.fa-snowflake').text().trim().split('\n')[0]; - anime.episodes = await getAnimeEpisodes(data); + anime.date = new types.DatePeriod(new types.Calendar(data.info.length < 4 ? + parseInt($('div.meta span.year').text().trim().substring(0, 4)) : + new Date(data.info[3]).getFullYear()) + ); + anime.synopsis = $('p.sinopsis').text().trim(); + anime.genres = getGenres($, $('div.container p.genres span')); + anime.image = new types.Image(PageInfo.url + $('div.container div.thumb figure img').attr('src'), + $('figure.backdrop img').attr('src') == undefined ? "" : + PageInfo.url + $('figure.backdrop img').attr('src') + ); + anime.status = $('div.thumb a.status').text().trim() === 'En emision'; + anime.station = $('div.meta span.fa-snowflake').text().trim().split('\n')[0]; + anime.episodes = await getAnimeEpisodes(data); anime.chronology = getAnimeChronology($); return anime; } async function getLastAnimes(url: string) { - console.log(url) - try { - let animes: types.IAnime[] = []; - const $ = cheerio.load((await axios.get(url ?? PageInfo.url)).data); + + try { + let animes: types.IAnime[] = []; + const $ = cheerio.load((await axios.get(url ?? PageInfo.url)).data); + const elements = $(utils.isUsableValue(url) ? 'ul.animes' : 'div.container section ul.list-unstyled.row li').children(); for (let i = 0; i < elements.length; i++) { - const anime_url = $(elements[i]).find('article.anime a').attr('href'); - if (utils.isUsableValue(anime_url)) { + const anime_url = $(elements[i]).find('article.anime a').attr('href'); + if (utils.isUsableValue(anime_url)) { animes.push(await getAnime(PageInfo.url + anime_url)); - } + } } - return animes; - } catch (error) { - console.log(error); - } - return []; + return animes; + } catch (error) { + console.log(error); + } + return []; } async function getSectionContents(section: number) { let animes: types.IAnime[] = []; - try { - const $ = cheerio.load((await axios.get(`${PageInfo.url}/directorio?type%5B%5D=${section}`)).data); + try { + const $ = cheerio.load((await axios.get(`${PageInfo.url}/directorio?type%5B%5D=${section}`)).data); const elements = $(`ul.animes`).children(); for (let i = 0; i < elements.length; i++) { animes.push(await getAnime(PageInfo.url + $(elements[i]) .find('article.anime a').attr('href'))); } - } catch (error) { - console.log(error); - } - return animes; + } catch (error) { + console.log(error); + } + return animes; } async function getLastMovies() { - return await getSectionContents(1); + return await getSectionContents(1); } async function getLastOvas() { - return await getSectionContents(2); + return await getSectionContents(2); } async function getLastOnas() { - return await getSectionContents(3); + return await getSectionContents(3); } @@ -219,13 +226,12 @@ export interface IYearRange { end: number; } -export class TioAnime -{ +export class TioAnime { getLastEpisodes = getLastEpisodes; getLastAnimes = getLastAnimes; getLastMovies = getLastMovies; getLastOvas = getLastOvas; - getLastOnas = getLastOnas; + getLastOnas = getLastOnas; getEpisodeServers = getEpisodeServers; getAnime = getAnime; @@ -242,13 +248,13 @@ export class TioAnime return elements.length !== 0 ? elements + '&' : ''; } - // 0: Anime (TV), 1 Movie, 2: OVA, 3: ONA - // all genres - // year_range { begin, end } - // 2: Finalizado, 1: En emision, 3: Proximamente - // recent, -recent - - async filter(name: (string | null), types?: string[], genres?: string[], year_range?: IYearRange, status?: number, sort?: string): + // 0: Anime (TV), 1 Movie, 2: OVA, 3: ONA + // all genres + // year_range { begin, end } + // 2: Finalizado, 1: En emision, 3: Proximamente + // recent, -recent + + async filter(name: (string | null), types?: string[], genres?: string[], year_range?: IYearRange, status?: number, sort?: string): Promise> { const animes = new ResultSearch(); let usable; @@ -257,15 +263,17 @@ export class TioAnime (await getLastAnimes(`${PageInfo.url}/directorio?${(usable ? `q=${name}` : `${this.arrayToURLParams('type', types)}${this.arrayToURLParams('genero', genres)}year=${year_range.begin}%2C${year_range.end}&status=${status ?? 2}&sort=${sort ?? 'recent'}`)}`)) .forEach(element => { if (utils.isUsableValue(element)) { - animes.results.push({ name: element.name, image: element.image.url, - url: element.url, type: element.type }) + animes.results.push({ + name: element.name, image: element.image.url, + url: element.url, type: element.type + }) } }); return animes; } }; -/*getEpisodeServers('https://tioanime.com/ver/oniichan-wa-oshimai-3').then(result => { +/*getEpisodeServers('https://tioanime.com/ver/oniichan-wa-oshimai-3').then(result => { console.log(result) })*/ diff --git a/src/scraper/sites/anime/wcostream/WcoStream.ts b/src/scraper/sites/anime/wcostream/WcoStream.ts index c08bc28..e9b1c03 100644 --- a/src/scraper/sites/anime/wcostream/WcoStream.ts +++ b/src/scraper/sites/anime/wcostream/WcoStream.ts @@ -3,7 +3,7 @@ import axios from "axios"; import { Anime } from "@animetypes/anime"; import { Episode, EpisodeServer } from "@animetypes/episode"; import { IResultSearch, IAnimeSearch, ResultSearch, AnimeSearch } from "@animetypes/search"; -import { UnPacked } from "../../../../types/utils"; +import { UnPacked } from"@animetypes/utils"; /** List of Domains * https://wcostream.tv @@ -170,11 +170,10 @@ export class WcoStream { } async RuntimeUnpacked(data:string) { - - const $ = cheerio.load(decodeURI(data)) - - const Buffer = btoa($("script").get().at(-1).children[0].data) - const UnBuffer = UnPacked(Buffer) + const content = Buffer.from(data, 'base64').toString() + const $ = cheerio.load(content) + const Buffers = $("script").get().at(-1).children[0].data + const UnBuffer = UnPacked(Buffer.from(Buffers).toString('base64')) const RequestBR = await eval(UnBuffer.slice(UnBuffer.indexOf("{sources:[{file:") + "{sources:[{file:".length, UnBuffer.indexOf("}],image:", 1))); return RequestBR diff --git a/src/scraper/sites/manga/inmanga/Inmanga.ts b/src/scraper/sites/manga/inmanga/Inmanga.ts index cbd766b..cb88556 100644 --- a/src/scraper/sites/manga/inmanga/Inmanga.ts +++ b/src/scraper/sites/manga/inmanga/Inmanga.ts @@ -1,6 +1,6 @@ import * as cheerio from "cheerio"; import axios from "axios"; -import { Manga, MangaChapter, IMangaResult } from "../../../../types/manga" +import { Manga, MangaChapter, IMangaResult } from "@animetypes/manga" import { IResultSearch } from "@animetypes/search"; //Default Set Axios Cookie @@ -10,21 +10,24 @@ axios.defaults.headers.common["User-Agent"] = "Mozilla/5.0 (Windows NT 10.0; Win export class Inmanga { readonly url = "https://inmanga.com"; - async GetMangaByFilter(search?: string, type?: number, genre?: string[]) { + async GetMangaByFilter(search?: string, type?: number, genre?: []) { try { const formdata = new FormData(); + const genreArray = Array.isArray(genre) formdata.append("filter[queryString]", search); formdata.append("filter[broadcastStatus]", String(type)) formdata.append("filter[skip]", "0"); - formdata.append("filter[take]", "10"); + formdata.append("filter[take]", "70"); const genreList = ['33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60', '61', '62', '63', '64', '65', '66', '67', '68', '69', '70', '71', '72', '73', '74', '75', '76', '77', '78', '79', '80', '81', '82', '83', '84', '85', '86', '87', '88', '-1'] - if (genre) { + if (genre && genreArray) { genre.map((e) => { if (genreList.includes(e)) { formdata.append("filter[generes][]", genreList[genreList.indexOf(e)]); } }) + }else if(genre && !genreArray){ + formdata.append("filter[generes][]", genreList[genreList.indexOf(genre)]); } else { formdata.append("filter[generes][]", "-1"); } diff --git a/src/scraper/sites/manga/manganelo/ManganatoManagerUtils.ts b/src/scraper/sites/manga/manganelo/ManganatoManagerUtils.ts index 92dabde..e985694 100644 --- a/src/scraper/sites/manga/manganelo/ManganatoManagerUtils.ts +++ b/src/scraper/sites/manga/manganelo/ManganatoManagerUtils.ts @@ -4,9 +4,11 @@ export class ManganatoManagerUtils { private static instance: ManganatoManagerUtils; readonly url: ManganatoAdvancedSearchURLManager = new ManganatoAdvancedSearchURLManager(); + private constructor() { } + static get Instance() { - if (!this.instance) this.instance = new ManganatoManagerUtils(); + if (!ManganatoManagerUtils.instance) ManganatoManagerUtils.instance = new ManganatoManagerUtils(); - return this.instance; + return ManganatoManagerUtils.instance; } } diff --git a/src/scraper/sites/manga/manganelo/ManganatoTypes.ts b/src/scraper/sites/manga/manganelo/ManganatoTypes.ts index 925d79e..57e209b 100644 --- a/src/scraper/sites/manga/manganelo/ManganatoTypes.ts +++ b/src/scraper/sites/manga/manganelo/ManganatoTypes.ts @@ -15,6 +15,8 @@ export interface IManganatoFilterParams { page: number; }; +export type ManganatoFilterURLParams = keyof Omit | "g_i" | "s"; + export const manganatoGenreList = { action: 2, adult: 3, diff --git a/src/scraper/sites/manga/manganelo/managers/ManganatoURLManager.ts b/src/scraper/sites/manga/manganelo/managers/ManganatoURLManager.ts index db9655c..68da640 100644 --- a/src/scraper/sites/manga/manganelo/managers/ManganatoURLManager.ts +++ b/src/scraper/sites/manga/manganelo/managers/ManganatoURLManager.ts @@ -1,5 +1,5 @@ import { URLSearchParams } from "url"; -import { IManganatoFilterParams, manganatoGenreList, manganatoOrderByOptions, manganatoOrderByOptionsList } from "../ManganatoTypes"; +import { IManganatoFilterParams, manganatoGenreList, manganatoOrderByOptions, manganatoOrderByOptionsList, ManganatoFilterURLParams } from "../ManganatoTypes"; import { ManganatoManager } from "./ManganatoManager"; export class ManganatoAdvancedSearchURLManager extends ManganatoManager { @@ -38,17 +38,23 @@ export class ManganatoAdvancedSearchURLManager extends ManganatoManager { : ""; } - generate(params: IManganatoFilterParams) { - const splitted = this.splitGenresToArray(params.genres); - const processed = this.processGenres(splitted); - - const urlParams = new URLSearchParams({ + generate(params: Partial) { + const urlParamsObject = { s: "all", - g_i: processed.length ? this.formatGenres(processed) : "", + g_i: "", sts: this.processStatus(params.sts), orby: this.processOrderBy(params.orby), page: params.page ? params.page.toString() : "" - }); + } satisfies Record; + + if (params.genres) { + const splitted = this.splitGenresToArray(params.genres); + const processed = this.processGenres(splitted); + + urlParamsObject.g_i = this.formatGenres(processed); + } + + const urlParams = new URLSearchParams(urlParamsObject); return `${this.baseURL}?${urlParams.toString()}`; } diff --git a/src/types/extractors.ts b/src/types/extractors.ts index 56548a4..c7c8cbc 100644 --- a/src/types/extractors.ts +++ b/src/types/extractors.ts @@ -30,7 +30,7 @@ export const filemoon = async (_url: string) => { let data = await response.text(); - console.log(btoa(data)) + // const $ = cheerio.load(data) //const Buffer = btoa($("script").get().at(-1).children[0].data) diff --git a/src/types/utils.ts b/src/types/utils.ts index a9a47a9..35742af 100644 --- a/src/types/utils.ts +++ b/src/types/utils.ts @@ -1,4 +1,7 @@ import { unpack } from "unpacker"; +import * as cheerio from "cheerio"; +//import chromium from '@sparticuz/chromium'; +//import puppeteer from 'puppeteer-core'; //Spanish Providers - TypeScript version @@ -63,6 +66,50 @@ export const UnPacked = (packedString: string) => { } else { valuePacked = atob(packedString); } - console.log(unpack(valuePacked)) + return unpack(valuePacked); } + +/** + * + * @param data in Base64 + * + */ +export const RuntimeUnpacked = async (data: string, unBuffer?: boolean) => { + try { + const content = unBuffer ? decodeURI(data) : Buffer.from(data, 'base64').toString() + const $ = cheerio.load(content) + const Buffers = $("script").get().at(-1).children[0].data + const UnBuffer = UnPacked(Buffer.from(Buffers).toString('base64')) + const RequestBR = await eval(UnBuffer.slice(UnBuffer.indexOf("{sources:[{file:") + "{sources:[{file:".length, UnBuffer.indexOf("}],image:", 1))); + + + return RequestBR + } catch (error) { + + } +} + + +/** + * + * @param firstpage the name says it + * + */ +/* Working for new method +export const BrowserHandler = async(firstpage:string) => { + + const browser = await puppeteer.launch({ + args: [...chromium.args, "--hide-scrollbars", "--disable-web-security"], + headless: true, + executablePath: await chromium.executablePath("https://github.com/Sparticuz/chromium/releases/download/v119.0.2/chromium-v119.0.2-pack.tar"), + ignoreDefaultArgs: ["--disable-extensions"], + }) + const page = await browser.newPage() + + + await page.goto(firstpage) + + + return {page,browser} +}*/ diff --git a/tsconfig.json b/tsconfig.json index 00c5115..ff689cc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,10 @@ { "extends": "@tsconfig/recommended/tsconfig.json", + "ts-node": { + "require": ["tsconfig-paths/register"] +}, "compilerOptions": { + "target": "es5", "module": "commonjs", "moduleResolution": "node", @@ -20,6 +24,7 @@ "noImplicitThis": false, "strictNullChecks": false, "outDir": "./build", + "baseUrl": ".", "paths": { "@animetypes/*": [ "./src/types/*" @@ -28,10 +33,19 @@ "./src/scraper/sites/anime/*", "./src/scraper/sites/manga/*", "./src/scraper/sites/doramas/*" + + ], + "@routes/anime/*": [ + "./src/routes/v1/anime/*", + + ], + "@routes/manga/*": [ + "./src/routes/v1/manga/*" + ], + "@routes/doramas/*": [ + "./src/routes/v1/doramas/*" + ], - "@routesAnime/*": [ - "./src/routes/v1/anime/*" - ] } }, "include": [