From 93fb85b71e33590adf6bc586b1ab640f525a475c Mon Sep 17 00:00:00 2001 From: codeSTACKr Date: Tue, 8 Mar 2022 16:25:54 -0600 Subject: [PATCH] should be the last update for 2.0 --- .gitignore | 2 + package-lock.json | 1031 ++++++++++++++++- package.json | 22 +- src/config.js | 82 +- utils/functions/fetchWithRetry.js | 18 +- .../{ => functions}/getRarity_fromMetadata.js | 0 utils/{ => functions}/rarity_rank.js | 0 utils/functions/refreshOpensea.js | 46 +- utils/functions/txnCheck.js | 54 +- utils/nftport/checkTxns.js | 91 +- utils/nftport/deployContract.js | 58 +- utils/nftport/genericMetas.js | 7 +- utils/nftport/mint.js | 81 +- utils/nftport/retrieveContract.js | 13 +- utils/nftport/revealNFTs.js | 96 +- utils/nftport/uploadFiles.js | 10 +- utils/nftport/uploadMetas.js | 20 +- yarn.lock | 406 ++++++- 18 files changed, 1798 insertions(+), 239 deletions(-) rename utils/{ => functions}/getRarity_fromMetadata.js (100%) rename utils/{ => functions}/rarity_rank.js (100%) diff --git a/.gitignore b/.gitignore index 49d8589c..de1ee3f0 100644 --- a/.gitignore +++ b/.gitignore @@ -142,3 +142,5 @@ dist # OSX .DS_Store + +build* \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 8e9e7db9..9d062ea2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,9 @@ "gif-encoder-2": "^1.0.5", "node-fetch": "^2.6.6", "puppeteer": "^13.4.1", + "puppeteer-extra": "^3.2.3", + "puppeteer-extra-plugin-adblocker": "^2.12.0", + "puppeteer-extra-plugin-stealth": "^2.9.0", "sha1": "^1.1.1", "yesno": "^0.3.1" }, @@ -22,6 +25,34 @@ "10k-collection-video": "index.js" } }, + "node_modules/@cliqz/adblocker": { + "version": "1.23.6", + "resolved": "https://registry.npmjs.org/@cliqz/adblocker/-/adblocker-1.23.6.tgz", + "integrity": "sha512-+Ojm25XwIkiD0THvf+WHZ3+zq65DuES7B6XlsMpbYC0JD8J9crpswLHsAmj97o0KVN+vmK2fYrqa2DgOUnFzYg==", + "dependencies": { + "@cliqz/adblocker-content": "^1.23.6", + "@cliqz/adblocker-extended-selectors": "^1.23.6", + "@remusao/guess-url-type": "^1.1.2", + "@remusao/small": "^1.1.2", + "@remusao/smaz": "^1.7.1", + "@types/chrome": "^0.0.178", + "@types/firefox-webext-browser": "^94.0.0", + "tldts-experimental": "^5.6.21" + } + }, + "node_modules/@cliqz/adblocker-content": { + "version": "1.23.6", + "resolved": "https://registry.npmjs.org/@cliqz/adblocker-content/-/adblocker-content-1.23.6.tgz", + "integrity": "sha512-rzFAtp8nGc6bbQoSjN6Xo0l1OHzqS9Z86nlyFD3yLsd9g2d/CLnx0WFDVsk6iE+N9yu2UpHbgWT+siShF0rHqw==", + "dependencies": { + "@cliqz/adblocker-extended-selectors": "^1.23.6" + } + }, + "node_modules/@cliqz/adblocker-extended-selectors": { + "version": "1.23.6", + "resolved": "https://registry.npmjs.org/@cliqz/adblocker-extended-selectors/-/adblocker-extended-selectors-1.23.6.tgz", + "integrity": "sha512-qnn2LrE/0YswjL4399M1ldKityLxDT9r/b9MUOPboz+4EiE/ew6hTl35yNg2g8nZU3tXSzrnvAYcqLw607kSYg==" + }, "node_modules/@mapbox/node-pre-gyp": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.6.tgz", @@ -41,11 +72,100 @@ "node-pre-gyp": "bin/node-pre-gyp" } }, + "node_modules/@remusao/guess-url-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@remusao/guess-url-type/-/guess-url-type-1.2.1.tgz", + "integrity": "sha512-rbOqre2jW8STjheOsOaQHLgYBaBZ9Owbdt8NO7WvNZftJlaG3y/K9oOkl8ZUpuFBisIhmBuMEW6c+YrQl5inRA==" + }, + "node_modules/@remusao/small": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@remusao/small/-/small-1.2.1.tgz", + "integrity": "sha512-7MjoGt0TJMVw1GPKgWq6SJPws1SLsUXQRa43Umht+nkyw2jnpy3WpiLNqGdwo5rHr5Wp9B2W/Pm5RQp656UJdw==" + }, + "node_modules/@remusao/smaz": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@remusao/smaz/-/smaz-1.9.1.tgz", + "integrity": "sha512-e6BLuP8oaXCZ9+v46Is4ilAZ/Vq6YLgmBP204Ixgk1qTjXmqvFYG7+AS7v9nsZdGOy96r9DWGFbbDVgMxwu1rA==", + "dependencies": { + "@remusao/smaz-compress": "^1.9.1", + "@remusao/smaz-decompress": "^1.9.1" + } + }, + "node_modules/@remusao/smaz-compress": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@remusao/smaz-compress/-/smaz-compress-1.9.1.tgz", + "integrity": "sha512-E2f48TwloQu3r6BdLOGF2aczeH7bJ/32oJGqvzT9SKur0cuUnLcZ7ZXP874E2fwmdE+cXzfC7bKzp79cDnmeyw==", + "dependencies": { + "@remusao/trie": "^1.4.1" + } + }, + "node_modules/@remusao/smaz-decompress": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@remusao/smaz-decompress/-/smaz-decompress-1.9.1.tgz", + "integrity": "sha512-TfjKKprYe3n47od8auhvJ/Ikj9kQTbDTe71ynKlxslrvvUhlIV3VQSuwYuMWMbdz1fIs0H/fxCN1Z8/H3km6/A==" + }, + "node_modules/@remusao/trie": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@remusao/trie/-/trie-1.4.1.tgz", + "integrity": "sha512-yvwa+aCyYI/UjeD39BnpMypG8N06l86wIDW1/PAc6ihBRnodIfZDwccxQN3n1t74wduzaz74m4ZMHZnB06567Q==" + }, + "node_modules/@types/chrome": { + "version": "0.0.178", + "resolved": "https://registry.npmjs.org/@types/chrome/-/chrome-0.0.178.tgz", + "integrity": "sha512-U+G5YG2pH0qvLrYVJ9aT5VbPXYR3fAFyCuRBRAA14Pv7GrkFzDJuXPspgdeLYaKzGEp4rymUkuqUOuFz18LI1g==", + "dependencies": { + "@types/filesystem": "*", + "@types/har-format": "*" + } + }, + "node_modules/@types/debug": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + "dependencies": { + "@types/ms": "*" + } + }, + "node_modules/@types/filesystem": { + "version": "0.0.32", + "resolved": "https://registry.npmjs.org/@types/filesystem/-/filesystem-0.0.32.tgz", + "integrity": "sha512-Yuf4jR5YYMR2DVgwuCiP11s0xuVRyPKmz8vo6HBY3CGdeMj8af93CFZX+T82+VD1+UqHOxTq31lO7MI7lepBtQ==", + "dependencies": { + "@types/filewriter": "*" + } + }, + "node_modules/@types/filewriter": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/filewriter/-/filewriter-0.0.29.tgz", + "integrity": "sha512-BsPXH/irW0ht0Ji6iw/jJaK8Lj3FJemon2gvEqHKpCdDCeemHa+rI3WBGq5z7cDMZgoLjY40oninGxqk+8NzNQ==" + }, + "node_modules/@types/firefox-webext-browser": { + "version": "94.0.1", + "resolved": "https://registry.npmjs.org/@types/firefox-webext-browser/-/firefox-webext-browser-94.0.1.tgz", + "integrity": "sha512-I6iHRQJSTZ+gYt2IxdH2RRAMvcUyK8v5Ig7fHQR0IwUNYP7hz9+cziBVIKxLCO6XI7fiyRsNOWObfl3/4Js2Lg==" + }, + "node_modules/@types/har-format": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@types/har-format/-/har-format-1.2.8.tgz", + "integrity": "sha512-OP6L9VuZNdskgNN3zFQQ54ceYD8OLq5IbqO4VK91ORLfOm7WdT/CiT/pHEBSQEqCInJ2y3O6iCm/zGtPElpgJQ==" + }, + "node_modules/@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" + }, "node_modules/@types/node": { "version": "17.0.21", "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.21.tgz", - "integrity": "sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==", - "optional": true + "integrity": "sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==" + }, + "node_modules/@types/puppeteer": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/@types/puppeteer/-/puppeteer-5.4.5.tgz", + "integrity": "sha512-lxCjpDEY+DZ66+W3x5Af4oHnEmUXt0HuaRzkBGE2UZiZEp/V1d3StpLPlmNVu/ea091bdNmVPl44lu8Wy/0ZCA==", + "dependencies": { + "@types/node": "*" + } }, "node_modules/@types/yauzl": { "version": "2.9.2", @@ -97,6 +217,14 @@ "node": ">=10" } }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/async-sema": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/async-sema/-/async-sema-3.1.1.tgz", @@ -211,6 +339,21 @@ "node": ">=10" } }, + "node_modules/clone-deep": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.2.4.tgz", + "integrity": "sha1-TnPdCen7lxzDhnDF3O2cGJZIHMY=", + "dependencies": { + "for-own": "^0.1.3", + "is-plain-object": "^2.0.1", + "kind-of": "^3.0.2", + "lazy-cache": "^1.0.3", + "shallow-clone": "^0.1.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/color-support": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", @@ -283,6 +426,14 @@ "node": ">=8" } }, + "node_modules/deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -359,6 +510,25 @@ "node": ">=8" } }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "dependencies": { + "for-in": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -377,6 +547,19 @@ "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": "10.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", + "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", @@ -447,6 +630,11 @@ "node": "*" } }, + "node_modules/graceful-fs": { + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==" + }, "node_modules/has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", @@ -497,6 +685,19 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", @@ -505,6 +706,55 @@ "node": ">=4" } }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -546,6 +796,19 @@ "semver": "bin/semver.js" } }, + "node_modules/merge-deep": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/merge-deep/-/merge-deep-3.0.3.tgz", + "integrity": "sha512-qtmzAS6t6grwEkNrunqTBdn0qKwFgNWvlxUbAV8es9M7Ot1EbyApytCnvE0jALPa46ZpKDUo527kKiaWplmlFA==", + "dependencies": { + "arr-union": "^3.1.0", + "clone-deep": "^0.2.4", + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/mime-db": { "version": "1.51.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", @@ -584,6 +847,12 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "peer": true + }, "node_modules/minipass": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.5.tgz", @@ -607,6 +876,26 @@ "node": ">= 8" } }, + "node_modules/mixin-object": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", + "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", + "dependencies": { + "for-in": "^0.1.3", + "is-extendable": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mixin-object/node_modules/for-in": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", + "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -803,6 +1092,234 @@ "node": ">=10.18.1" } }, + "node_modules/puppeteer-extra": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/puppeteer-extra/-/puppeteer-extra-3.2.3.tgz", + "integrity": "sha512-CnSN9yIedbAbS8WmRybaDHJLf6goRk+VYM/kbH6i/+EMadCaAeh2O+1/mFUMN2LbkbDNAp2Vd/UwrTVCHjTxyg==", + "dependencies": { + "@types/debug": "^4.1.0", + "@types/puppeteer": "*", + "debug": "^4.1.1", + "deepmerge": "^4.2.2" + }, + "engines": { + "node": ">=8" + }, + "peerDependencies": { + "puppeteer": "*" + } + }, + "node_modules/puppeteer-extra-plugin": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/puppeteer-extra-plugin/-/puppeteer-extra-plugin-3.2.0.tgz", + "integrity": "sha512-wbiw12USE3b+maMk/IMaroYsz7rusVI9G+ml6pCFCnFFh91Z9BAEiVzhCpOHuquVXEiCCsDTWhDUgvdNxQHOyw==", + "dependencies": { + "@types/debug": "^4.1.0", + "debug": "^4.1.1", + "merge-deep": "^3.0.1" + }, + "engines": { + "node": ">=9.11.2" + }, + "peerDependencies": { + "puppeteer-extra": "*" + } + }, + "node_modules/puppeteer-extra-plugin-adblocker": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/puppeteer-extra-plugin-adblocker/-/puppeteer-extra-plugin-adblocker-2.12.0.tgz", + "integrity": "sha512-x0/G6suPa28FomEuCGAKGTvqcxt2efZWXE8mjEPRASGQaMe4smHYM1xT2nYS5Z82wIOqPZQVVJ7l3dGY9E+BuQ==", + "dependencies": { + "@cliqz/adblocker-puppeteer": "1.22.6", + "debug": "^4.1.1", + "node-fetch": "^2.6.0", + "puppeteer-extra-plugin": "^3.2.0" + }, + "engines": { + "node": ">=8" + }, + "peerDependencies": { + "puppeteer-extra": "*" + } + }, + "node_modules/puppeteer-extra-plugin-adblocker/node_modules/@cliqz/adblocker-puppeteer": { + "version": "1.22.6", + "resolved": "https://registry.npmjs.org/@cliqz/adblocker-puppeteer/-/adblocker-puppeteer-1.22.6.tgz", + "integrity": "sha512-Yg+64gsBfG8NKIJTKRg+sgK8G32W/z4qNEoMGdGJc7mdKVCn+y93WklDMO3pCy64u9jqUVS/Rd7z/Z96dX3K8Q==", + "dependencies": { + "@cliqz/adblocker": "^1.22.6", + "@cliqz/adblocker-content": "^1.22.6", + "tldts-experimental": "^5.6.21" + }, + "peerDependencies": { + "puppeteer": "5.x || 6.x || 7.x || 8.x || 9.x || 10.x" + } + }, + "node_modules/puppeteer-extra-plugin-adblocker/node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "peer": true + }, + "node_modules/puppeteer-extra-plugin-adblocker/node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/puppeteer-extra-plugin-adblocker/node_modules/devtools-protocol": { + "version": "0.0.901419", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.901419.tgz", + "integrity": "sha512-4INMPwNm9XRpBukhNbF7OB6fNTTCaI8pzy/fXg0xQzAy5h3zL1P8xT3QazgKqBrb/hAYwIBizqDBZ7GtJE74QQ==", + "peer": true + }, + "node_modules/puppeteer-extra-plugin-adblocker/node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "peer": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/puppeteer-extra-plugin-adblocker/node_modules/node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "node_modules/puppeteer-extra-plugin-adblocker/node_modules/progress": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz", + "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==", + "peer": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/puppeteer-extra-plugin-adblocker/node_modules/puppeteer": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-10.4.0.tgz", + "integrity": "sha512-2cP8mBoqnu5gzAVpbZ0fRaobBWZM8GEUF4I1F6WbgHrKV/rz7SX8PG2wMymZgD0wo0UBlg2FBPNxlF/xlqW6+w==", + "deprecated": "Version no longer supported. Upgrade to @latest", + "hasInstallScript": true, + "peer": true, + "dependencies": { + "debug": "4.3.1", + "devtools-protocol": "0.0.901419", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.0", + "node-fetch": "2.6.1", + "pkg-dir": "4.2.0", + "progress": "2.0.1", + "proxy-from-env": "1.1.0", + "rimraf": "3.0.2", + "tar-fs": "2.0.0", + "unbzip2-stream": "1.3.3", + "ws": "7.4.6" + }, + "engines": { + "node": ">=10.18.1" + } + }, + "node_modules/puppeteer-extra-plugin-adblocker/node_modules/tar-fs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.0.tgz", + "integrity": "sha512-vaY0obB6Om/fso8a8vakQBzwholQ7v5+uy+tF3Ozvxv1KNezmVQAiWtcNmMHFSFPqL3dJA8ha6gdtFbfX9mcxA==", + "peer": true, + "dependencies": { + "chownr": "^1.1.1", + "mkdirp": "^0.5.1", + "pump": "^3.0.0", + "tar-stream": "^2.0.0" + } + }, + "node_modules/puppeteer-extra-plugin-adblocker/node_modules/unbzip2-stream": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz", + "integrity": "sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg==", + "peer": true, + "dependencies": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "node_modules/puppeteer-extra-plugin-adblocker/node_modules/ws": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "peer": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/puppeteer-extra-plugin-stealth": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/puppeteer-extra-plugin-stealth/-/puppeteer-extra-plugin-stealth-2.9.0.tgz", + "integrity": "sha512-erZ9lkIcOkfYmLPP2jv2AiqvNBFhQJinWJhcm40pqSjwJTsZXHsTARUyRCsBYEEBvNIs3Wz3E0zVlTRc4IJ6Hg==", + "dependencies": { + "debug": "^4.1.1", + "puppeteer-extra-plugin": "^3.2.0", + "puppeteer-extra-plugin-user-preferences": "^2.3.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/puppeteer-extra-plugin-user-data-dir": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/puppeteer-extra-plugin-user-data-dir/-/puppeteer-extra-plugin-user-data-dir-2.3.1.tgz", + "integrity": "sha512-yhaYMaNFdfQ1LbA94ZElW1zU8rh+MFmO+GZA0gtQ8BXc+UZ6aRrWS9flIZvlXDzk+ZsXhCbTEohEwZ8lEDLRVA==", + "dependencies": { + "debug": "^4.1.1", + "fs-extra": "^10.0.0", + "puppeteer-extra-plugin": "^3.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/puppeteer-extra-plugin-user-preferences": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/puppeteer-extra-plugin-user-preferences/-/puppeteer-extra-plugin-user-preferences-2.3.1.tgz", + "integrity": "sha512-t/FyGQj2aqtHOROqL02z+k2kNQe0cjT0Hd9pG5FJ7x0JXx1722PhOuK7FeJLQMJ+BLl2YvCUgaWSC8Zohjts5A==", + "dependencies": { + "debug": "^4.1.1", + "deepmerge": "^4.2.2", + "puppeteer-extra-plugin": "^3.2.0", + "puppeteer-extra-plugin-user-data-dir": "^2.3.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -863,6 +1380,39 @@ "node": "*" } }, + "node_modules/shallow-clone": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", + "integrity": "sha1-WQnodLp3EG1zrEFM/sH/yofZcGA=", + "dependencies": { + "is-extendable": "^0.1.1", + "kind-of": "^2.0.1", + "lazy-cache": "^0.2.3", + "mixin-object": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shallow-clone/node_modules/kind-of": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", + "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", + "dependencies": { + "is-buffer": "^1.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shallow-clone/node_modules/lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/signal-exit": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", @@ -966,6 +1516,19 @@ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, + "node_modules/tldts-core": { + "version": "5.7.69", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-5.7.69.tgz", + "integrity": "sha512-YyFzp5ibo24Z0sxGOOkghFszu0sZ/fBF8mexd9kabft8XgWPs265G4IxhZ+SCZg3stzpGYzw8bDKvn8lVziSlg==" + }, + "node_modules/tldts-experimental": { + "version": "5.7.69", + "resolved": "https://registry.npmjs.org/tldts-experimental/-/tldts-experimental-5.7.69.tgz", + "integrity": "sha512-p1o1W4B358D+0pyh7MmC4BZkk95aBY5+iIcuHF1bCQS9f3IRaPipO7xVqStFek0i9bAmncErR4R+7XnNShf58g==", + "dependencies": { + "tldts-core": "^5.7.69" + } + }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -980,6 +1543,14 @@ "through": "^2.3.8" } }, + "node_modules/universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -1053,6 +1624,34 @@ } }, "dependencies": { + "@cliqz/adblocker": { + "version": "1.23.6", + "resolved": "https://registry.npmjs.org/@cliqz/adblocker/-/adblocker-1.23.6.tgz", + "integrity": "sha512-+Ojm25XwIkiD0THvf+WHZ3+zq65DuES7B6XlsMpbYC0JD8J9crpswLHsAmj97o0KVN+vmK2fYrqa2DgOUnFzYg==", + "requires": { + "@cliqz/adblocker-content": "^1.23.6", + "@cliqz/adblocker-extended-selectors": "^1.23.6", + "@remusao/guess-url-type": "^1.1.2", + "@remusao/small": "^1.1.2", + "@remusao/smaz": "^1.7.1", + "@types/chrome": "^0.0.178", + "@types/firefox-webext-browser": "^94.0.0", + "tldts-experimental": "^5.6.21" + } + }, + "@cliqz/adblocker-content": { + "version": "1.23.6", + "resolved": "https://registry.npmjs.org/@cliqz/adblocker-content/-/adblocker-content-1.23.6.tgz", + "integrity": "sha512-rzFAtp8nGc6bbQoSjN6Xo0l1OHzqS9Z86nlyFD3yLsd9g2d/CLnx0WFDVsk6iE+N9yu2UpHbgWT+siShF0rHqw==", + "requires": { + "@cliqz/adblocker-extended-selectors": "^1.23.6" + } + }, + "@cliqz/adblocker-extended-selectors": { + "version": "1.23.6", + "resolved": "https://registry.npmjs.org/@cliqz/adblocker-extended-selectors/-/adblocker-extended-selectors-1.23.6.tgz", + "integrity": "sha512-qnn2LrE/0YswjL4399M1ldKityLxDT9r/b9MUOPboz+4EiE/ew6hTl35yNg2g8nZU3tXSzrnvAYcqLw607kSYg==" + }, "@mapbox/node-pre-gyp": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.6.tgz", @@ -1069,11 +1668,100 @@ "tar": "^6.1.11" } }, + "@remusao/guess-url-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@remusao/guess-url-type/-/guess-url-type-1.2.1.tgz", + "integrity": "sha512-rbOqre2jW8STjheOsOaQHLgYBaBZ9Owbdt8NO7WvNZftJlaG3y/K9oOkl8ZUpuFBisIhmBuMEW6c+YrQl5inRA==" + }, + "@remusao/small": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@remusao/small/-/small-1.2.1.tgz", + "integrity": "sha512-7MjoGt0TJMVw1GPKgWq6SJPws1SLsUXQRa43Umht+nkyw2jnpy3WpiLNqGdwo5rHr5Wp9B2W/Pm5RQp656UJdw==" + }, + "@remusao/smaz": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@remusao/smaz/-/smaz-1.9.1.tgz", + "integrity": "sha512-e6BLuP8oaXCZ9+v46Is4ilAZ/Vq6YLgmBP204Ixgk1qTjXmqvFYG7+AS7v9nsZdGOy96r9DWGFbbDVgMxwu1rA==", + "requires": { + "@remusao/smaz-compress": "^1.9.1", + "@remusao/smaz-decompress": "^1.9.1" + } + }, + "@remusao/smaz-compress": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@remusao/smaz-compress/-/smaz-compress-1.9.1.tgz", + "integrity": "sha512-E2f48TwloQu3r6BdLOGF2aczeH7bJ/32oJGqvzT9SKur0cuUnLcZ7ZXP874E2fwmdE+cXzfC7bKzp79cDnmeyw==", + "requires": { + "@remusao/trie": "^1.4.1" + } + }, + "@remusao/smaz-decompress": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@remusao/smaz-decompress/-/smaz-decompress-1.9.1.tgz", + "integrity": "sha512-TfjKKprYe3n47od8auhvJ/Ikj9kQTbDTe71ynKlxslrvvUhlIV3VQSuwYuMWMbdz1fIs0H/fxCN1Z8/H3km6/A==" + }, + "@remusao/trie": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/@remusao/trie/-/trie-1.4.1.tgz", + "integrity": "sha512-yvwa+aCyYI/UjeD39BnpMypG8N06l86wIDW1/PAc6ihBRnodIfZDwccxQN3n1t74wduzaz74m4ZMHZnB06567Q==" + }, + "@types/chrome": { + "version": "0.0.178", + "resolved": "https://registry.npmjs.org/@types/chrome/-/chrome-0.0.178.tgz", + "integrity": "sha512-U+G5YG2pH0qvLrYVJ9aT5VbPXYR3fAFyCuRBRAA14Pv7GrkFzDJuXPspgdeLYaKzGEp4rymUkuqUOuFz18LI1g==", + "requires": { + "@types/filesystem": "*", + "@types/har-format": "*" + } + }, + "@types/debug": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", + "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", + "requires": { + "@types/ms": "*" + } + }, + "@types/filesystem": { + "version": "0.0.32", + "resolved": "https://registry.npmjs.org/@types/filesystem/-/filesystem-0.0.32.tgz", + "integrity": "sha512-Yuf4jR5YYMR2DVgwuCiP11s0xuVRyPKmz8vo6HBY3CGdeMj8af93CFZX+T82+VD1+UqHOxTq31lO7MI7lepBtQ==", + "requires": { + "@types/filewriter": "*" + } + }, + "@types/filewriter": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/filewriter/-/filewriter-0.0.29.tgz", + "integrity": "sha512-BsPXH/irW0ht0Ji6iw/jJaK8Lj3FJemon2gvEqHKpCdDCeemHa+rI3WBGq5z7cDMZgoLjY40oninGxqk+8NzNQ==" + }, + "@types/firefox-webext-browser": { + "version": "94.0.1", + "resolved": "https://registry.npmjs.org/@types/firefox-webext-browser/-/firefox-webext-browser-94.0.1.tgz", + "integrity": "sha512-I6iHRQJSTZ+gYt2IxdH2RRAMvcUyK8v5Ig7fHQR0IwUNYP7hz9+cziBVIKxLCO6XI7fiyRsNOWObfl3/4Js2Lg==" + }, + "@types/har-format": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@types/har-format/-/har-format-1.2.8.tgz", + "integrity": "sha512-OP6L9VuZNdskgNN3zFQQ54ceYD8OLq5IbqO4VK91ORLfOm7WdT/CiT/pHEBSQEqCInJ2y3O6iCm/zGtPElpgJQ==" + }, + "@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" + }, "@types/node": { "version": "17.0.21", "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.21.tgz", - "integrity": "sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==", - "optional": true + "integrity": "sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==" + }, + "@types/puppeteer": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/@types/puppeteer/-/puppeteer-5.4.5.tgz", + "integrity": "sha512-lxCjpDEY+DZ66+W3x5Af4oHnEmUXt0HuaRzkBGE2UZiZEp/V1d3StpLPlmNVu/ea091bdNmVPl44lu8Wy/0ZCA==", + "requires": { + "@types/node": "*" + } }, "@types/yauzl": { "version": "2.9.2", @@ -1116,6 +1804,11 @@ "readable-stream": "^3.6.0" } }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, "async-sema": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/async-sema/-/async-sema-3.1.1.tgz", @@ -1189,6 +1882,18 @@ "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" }, + "clone-deep": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.2.4.tgz", + "integrity": "sha1-TnPdCen7lxzDhnDF3O2cGJZIHMY=", + "requires": { + "for-own": "^0.1.3", + "is-plain-object": "^2.0.1", + "kind-of": "^3.0.2", + "lazy-cache": "^1.0.3", + "shallow-clone": "^0.1.2" + } + }, "color-support": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", @@ -1241,6 +1946,11 @@ "mimic-response": "^2.0.0" } }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -1297,6 +2007,19 @@ "path-exists": "^4.0.0" } }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "for-own": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", + "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", + "requires": { + "for-in": "^1.0.1" + } + }, "form-data": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", @@ -1312,6 +2035,16 @@ "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" }, + "fs-extra": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", + "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, "fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", @@ -1367,6 +2100,11 @@ "path-is-absolute": "^1.0.0" } }, + "graceful-fs": { + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", + "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==" + }, "has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", @@ -1400,11 +2138,56 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "^3.0.1" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "jsonfile": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^2.0.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + }, "locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -1436,6 +2219,16 @@ } } }, + "merge-deep": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/merge-deep/-/merge-deep-3.0.3.tgz", + "integrity": "sha512-qtmzAS6t6grwEkNrunqTBdn0qKwFgNWvlxUbAV8es9M7Ot1EbyApytCnvE0jALPa46ZpKDUo527kKiaWplmlFA==", + "requires": { + "arr-union": "^3.1.0", + "clone-deep": "^0.2.4", + "kind-of": "^3.0.2" + } + }, "mime-db": { "version": "1.51.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", @@ -1462,6 +2255,12 @@ "brace-expansion": "^1.1.7" } }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "peer": true + }, "minipass": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.5.tgz", @@ -1479,6 +2278,22 @@ "yallist": "^4.0.0" } }, + "mixin-object": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz", + "integrity": "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=", + "requires": { + "for-in": "^0.1.3", + "is-extendable": "^0.1.1" + }, + "dependencies": { + "for-in": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz", + "integrity": "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=" + } + } + }, "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -1621,6 +2436,170 @@ "ws": "8.5.0" } }, + "puppeteer-extra": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/puppeteer-extra/-/puppeteer-extra-3.2.3.tgz", + "integrity": "sha512-CnSN9yIedbAbS8WmRybaDHJLf6goRk+VYM/kbH6i/+EMadCaAeh2O+1/mFUMN2LbkbDNAp2Vd/UwrTVCHjTxyg==", + "requires": { + "@types/debug": "^4.1.0", + "@types/puppeteer": "*", + "debug": "^4.1.1", + "deepmerge": "^4.2.2" + } + }, + "puppeteer-extra-plugin": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/puppeteer-extra-plugin/-/puppeteer-extra-plugin-3.2.0.tgz", + "integrity": "sha512-wbiw12USE3b+maMk/IMaroYsz7rusVI9G+ml6pCFCnFFh91Z9BAEiVzhCpOHuquVXEiCCsDTWhDUgvdNxQHOyw==", + "requires": { + "@types/debug": "^4.1.0", + "debug": "^4.1.1", + "merge-deep": "^3.0.1" + } + }, + "puppeteer-extra-plugin-adblocker": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/puppeteer-extra-plugin-adblocker/-/puppeteer-extra-plugin-adblocker-2.12.0.tgz", + "integrity": "sha512-x0/G6suPa28FomEuCGAKGTvqcxt2efZWXE8mjEPRASGQaMe4smHYM1xT2nYS5Z82wIOqPZQVVJ7l3dGY9E+BuQ==", + "requires": { + "@cliqz/adblocker-puppeteer": "1.22.6", + "debug": "^4.1.1", + "node-fetch": "^2.6.0", + "puppeteer-extra-plugin": "^3.2.0" + }, + "dependencies": { + "@cliqz/adblocker-puppeteer": { + "version": "1.22.6", + "resolved": "https://registry.npmjs.org/@cliqz/adblocker-puppeteer/-/adblocker-puppeteer-1.22.6.tgz", + "integrity": "sha512-Yg+64gsBfG8NKIJTKRg+sgK8G32W/z4qNEoMGdGJc7mdKVCn+y93WklDMO3pCy64u9jqUVS/Rd7z/Z96dX3K8Q==", + "requires": { + "@cliqz/adblocker": "^1.22.6", + "@cliqz/adblocker-content": "^1.22.6", + "tldts-experimental": "^5.6.21" + } + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "peer": true + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "requires": { + "ms": "2.1.2" + } + }, + "devtools-protocol": { + "version": "0.0.901419", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.901419.tgz", + "integrity": "sha512-4INMPwNm9XRpBukhNbF7OB6fNTTCaI8pzy/fXg0xQzAy5h3zL1P8xT3QazgKqBrb/hAYwIBizqDBZ7GtJE74QQ==", + "peer": true + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "peer": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + }, + "progress": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz", + "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==", + "peer": true + }, + "puppeteer": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-10.4.0.tgz", + "integrity": "sha512-2cP8mBoqnu5gzAVpbZ0fRaobBWZM8GEUF4I1F6WbgHrKV/rz7SX8PG2wMymZgD0wo0UBlg2FBPNxlF/xlqW6+w==", + "peer": true, + "requires": { + "debug": "4.3.1", + "devtools-protocol": "0.0.901419", + "extract-zip": "2.0.1", + "https-proxy-agent": "5.0.0", + "node-fetch": "2.6.1", + "pkg-dir": "4.2.0", + "progress": "2.0.1", + "proxy-from-env": "1.1.0", + "rimraf": "3.0.2", + "tar-fs": "2.0.0", + "unbzip2-stream": "1.3.3", + "ws": "7.4.6" + } + }, + "tar-fs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.0.tgz", + "integrity": "sha512-vaY0obB6Om/fso8a8vakQBzwholQ7v5+uy+tF3Ozvxv1KNezmVQAiWtcNmMHFSFPqL3dJA8ha6gdtFbfX9mcxA==", + "peer": true, + "requires": { + "chownr": "^1.1.1", + "mkdirp": "^0.5.1", + "pump": "^3.0.0", + "tar-stream": "^2.0.0" + } + }, + "unbzip2-stream": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz", + "integrity": "sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg==", + "peer": true, + "requires": { + "buffer": "^5.2.1", + "through": "^2.3.8" + } + }, + "ws": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "peer": true, + "requires": {} + } + } + }, + "puppeteer-extra-plugin-stealth": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/puppeteer-extra-plugin-stealth/-/puppeteer-extra-plugin-stealth-2.9.0.tgz", + "integrity": "sha512-erZ9lkIcOkfYmLPP2jv2AiqvNBFhQJinWJhcm40pqSjwJTsZXHsTARUyRCsBYEEBvNIs3Wz3E0zVlTRc4IJ6Hg==", + "requires": { + "debug": "^4.1.1", + "puppeteer-extra-plugin": "^3.2.0", + "puppeteer-extra-plugin-user-preferences": "^2.3.1" + } + }, + "puppeteer-extra-plugin-user-data-dir": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/puppeteer-extra-plugin-user-data-dir/-/puppeteer-extra-plugin-user-data-dir-2.3.1.tgz", + "integrity": "sha512-yhaYMaNFdfQ1LbA94ZElW1zU8rh+MFmO+GZA0gtQ8BXc+UZ6aRrWS9flIZvlXDzk+ZsXhCbTEohEwZ8lEDLRVA==", + "requires": { + "debug": "^4.1.1", + "fs-extra": "^10.0.0", + "puppeteer-extra-plugin": "^3.2.0" + } + }, + "puppeteer-extra-plugin-user-preferences": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/puppeteer-extra-plugin-user-preferences/-/puppeteer-extra-plugin-user-preferences-2.3.1.tgz", + "integrity": "sha512-t/FyGQj2aqtHOROqL02z+k2kNQe0cjT0Hd9pG5FJ7x0JXx1722PhOuK7FeJLQMJ+BLl2YvCUgaWSC8Zohjts5A==", + "requires": { + "debug": "^4.1.1", + "deepmerge": "^4.2.2", + "puppeteer-extra-plugin": "^3.2.0", + "puppeteer-extra-plugin-user-data-dir": "^2.3.1" + } + }, "readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -1666,6 +2645,32 @@ "crypt": ">= 0.0.1" } }, + "shallow-clone": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", + "integrity": "sha1-WQnodLp3EG1zrEFM/sH/yofZcGA=", + "requires": { + "is-extendable": "^0.1.1", + "kind-of": "^2.0.1", + "lazy-cache": "^0.2.3", + "mixin-object": "^2.0.1" + }, + "dependencies": { + "kind-of": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", + "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", + "requires": { + "is-buffer": "^1.0.2" + } + }, + "lazy-cache": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", + "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" + } + } + }, "signal-exit": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", @@ -1759,6 +2764,19 @@ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, + "tldts-core": { + "version": "5.7.69", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-5.7.69.tgz", + "integrity": "sha512-YyFzp5ibo24Z0sxGOOkghFszu0sZ/fBF8mexd9kabft8XgWPs265G4IxhZ+SCZg3stzpGYzw8bDKvn8lVziSlg==" + }, + "tldts-experimental": { + "version": "5.7.69", + "resolved": "https://registry.npmjs.org/tldts-experimental/-/tldts-experimental-5.7.69.tgz", + "integrity": "sha512-p1o1W4B358D+0pyh7MmC4BZkk95aBY5+iIcuHF1bCQS9f3IRaPipO7xVqStFek0i9bAmncErR4R+7XnNShf58g==", + "requires": { + "tldts-core": "^5.7.69" + } + }, "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -1773,6 +2791,11 @@ "through": "^2.3.8" } }, + "universalify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", + "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", diff --git a/package.json b/package.json index c03d55a0..a2326317 100644 --- a/package.json +++ b/package.json @@ -15,18 +15,21 @@ "build": "node index.js", "generate": "node index.js", "rarity": "node utils/rarity", - "rarity_md": "node utils/getRarity_fromMetadata", - "rarity_rank": "node utils/rarity_rank.js", + "rarity_md": "node utils/functions/getRarity_fromMetadata", + "rarity_rank": "node utils/functions/rarity_rank.js", "preview": "node utils/preview.js", "pixelate": "node utils/pixelate.js", "update_info": "node utils/update_info.js", "preview_gif": "node utils/preview_gif.js", - "create_generic": "node utils/genericMetas", - "deploy_contract": "node utils/deployContract", - "get_contract": "node utils/retrieveContract", - "mint": "node utils/mint $npm_config_start $npm_config_end", - "check_txns": "node utils/checkTxns $npm_config_dir", - "refresh_os": "node utils/refreshOpensea $npm_config_start $npm_config_end" + "create_generic": "node utils/nftport/genericMetas", + "upload_files": "node utils/nftport/uploadFiles", + "upload_metadata": "node utils/nftport/uploadMetas", + "deploy_contract": "node utils/nftport/deployContract", + "get_contract": "node utils/nftport/retrieveContract", + "mint": "node utils/nftport/mint %npm_config_start% %npm_config_end%", + "reveal": "node utils/nftport/revealNFTs %npm_config_start% %npm_config_end%", + "check_txns": "node utils/nftport/checkTxns %npm_config_dir%", + "refresh_os": "node utils/functions/refreshOpensea %npm_config_start% %npm_config_end%" }, "author": "Jesse Hall (codeSTACKr)", "license": "MIT", @@ -37,6 +40,9 @@ "gif-encoder-2": "^1.0.5", "node-fetch": "^2.6.6", "puppeteer": "^13.4.1", + "puppeteer-extra": "^3.2.3", + "puppeteer-extra-plugin-adblocker": "^2.12.0", + "puppeteer-extra-plugin-stealth": "^2.9.0", "sha1": "^1.1.1", "yesno": "^0.3.1" } diff --git a/src/config.js b/src/config.js index 047e3da4..41f623df 100644 --- a/src/config.js +++ b/src/config.js @@ -1,9 +1,45 @@ const basePath = process.cwd(); +const fs = require("fs"); const { MODE } = require(`${basePath}/constants/blend_mode.js`); const { NETWORK } = require(`${basePath}/constants/network.js`); const network = NETWORK.eth; +// General metadata for Ethereum +const namePrefix = "YOUR COLLECTION NAME"; +const description = "Remember to replace this description"; +const baseUri = "ipfs://NewUriToReplace"; // This will be replaced automatically + +// If you have selected Solana then the collection starts from 0 automatically +const layerConfigurations = [ + { + growEditionSizeTo: 50, + layersOrder: [ + { name: "Background" }, + { name: "Eyeball" }, + { name: "Eye color" }, + { name: "Iris" }, + { name: "Shine" }, + { name: "Bottom lid" }, + { name: "Top lid" }, + ], + }, +]; + +const shuffleLayerConfigurations = false; + +const debugLogs = false; + +const format = { + width: 512, + height: 512, + smoothing: false, +}; + +const extraMetadata = { + external_url: "https://codecats.xyz", // Replace with your website or remove this line if you do not have one. +}; + // NFTPort Info // ** REQUIRED ** const AUTH = 'YOUR API KEY HERE'; @@ -13,13 +49,14 @@ const CONTRACT_SYMBOL = 'CP'; const CONTRACT_TYPE = 'erc721'; const MINT_TO_ADDRESS = 'YOUR WALLET ADDRESS HERE'; const CHAIN = 'rinkeby'; +const METADATA_UPDATABLE = true; // set to false if you don't want to allow metadata updates after minting // ** OPTIONAL ** -let CONTRACT_ADDRESS = 'Your Contract Address'; // If you want to manually include it +let CONTRACT_ADDRESS = 'YOUR CONTRACT ADDRESS'; // If you want to manually include it // Generic Metadata is optional if you want to reveal your NFTs const GENERIC = false; // Set to true if you want to upload generic metas and reveal the real NFTs in the future const GENERIC_TITLE = "Unknown" // Replace with what you want the generic titles to say. const GENERIC_DESCRIPTION = "Unknown" // Replace with what you want the generic descriptions to say. -const GENERIC_IMAGE = ["https://ipfs.io/ipfs/QmUf9tDbkqnfHkQaMdFWSGAeXwVXWA61pFED7ypx4hcsfh"] // Replace with your generic image(s). +const GENERIC_IMAGE = ["https://ipfs.io/ipfs/QmUf9tDbkqnfHkQaMdFWSGAeXwVXWA61pFED7ypx4hcsfh"] // Replace with your generic image(s). If multiple, separate with a comma. const REVEAL_PROMPT = true; // Set to false if you want to disable the prompt to confirm each reveal. const INTERVAL = 900000; // Milliseconds. This is the interval for it to check for sales and reveal the NFT. 900000 = 15 minutes. @@ -29,17 +66,11 @@ try { const contractData = JSON.parse(rawContractData); if (contractData.response === "OK" && contractData.error === null) { CONTRACT_ADDRESS = contractData.contract_address; - } else { - console.log(`Using manual contract address: ${CONTRACT_ADDRESS}`); } } catch (error) { - console.log(`Using manual contract address: ${CONTRACT_ADDRESS}`); + // Do nothing, falling back to manual contract address } - -// General metadata for Ethereum -const namePrefix = "Your Collection"; -const description = "Remember to replace this description"; -const baseUri = "ipfs://NewUriToReplace"; +// END NFTPort Info const solanaMetadata = { symbol: "YC", @@ -53,32 +84,6 @@ const solanaMetadata = { ], }; -// If you have selected Solana then the collection starts from 0 automatically -const layerConfigurations = [ - { - growEditionSizeTo: 5, - layersOrder: [ - { name: "Background" }, - { name: "Eyeball" }, - { name: "Eye color" }, - { name: "Iris" }, - { name: "Shine" }, - { name: "Bottom lid" }, - { name: "Top lid" }, - ], - }, -]; - -const shuffleLayerConfigurations = false; - -const debugLogs = false; - -const format = { - width: 512, - height: 512, - smoothing: false, -}; - const gif = { export: false, repeat: 0, @@ -110,10 +115,6 @@ const background = { default: "#000000", }; -const extraMetadata = { - external_url: "https://codecats.xyz", // Replace with your website or remove this line if you do not have one. -}; - const rarityDelimiter = "#"; const uniqueDnaTorrance = 10000; @@ -167,4 +168,5 @@ module.exports = { CONTRACT_SYMBOL, CONTRACT_TYPE, REVEAL_PROMPT, + METADATA_UPDATABLE, }; diff --git a/utils/functions/fetchWithRetry.js b/utils/functions/fetchWithRetry.js index ea874ab3..8c9a73ae 100644 --- a/utils/functions/fetchWithRetry.js +++ b/utils/functions/fetchWithRetry.js @@ -1,17 +1,11 @@ +const basePath = process.cwd(); const fetch = require("node-fetch"); const { AUTH } = require(`${basePath}/src/config.js`); -function fetchWithRetry(data, url, method) { +function fetchWithRetry(url, options) { return new Promise((resolve, reject) => { - const fetch_retry = (_data) => { - let options = { - method: method, - headers: { - "Content-Type": "application/json", - Authorization: AUTH, - }, - body: _data, - }; + const fetch_retry = () => { + options.headers.Authorization = AUTH; return fetch(url, options) .then((res) => { @@ -33,10 +27,10 @@ function fetchWithRetry(data, url, method) { .catch((error) => { console.error(`CATCH ERROR: ${error}`); console.log("Retrying"); - fetch_retry(_data); + fetch_retry(); }); }; - return fetch_retry(data); + return fetch_retry(); }); } diff --git a/utils/getRarity_fromMetadata.js b/utils/functions/getRarity_fromMetadata.js similarity index 100% rename from utils/getRarity_fromMetadata.js rename to utils/functions/getRarity_fromMetadata.js diff --git a/utils/rarity_rank.js b/utils/functions/rarity_rank.js similarity index 100% rename from utils/rarity_rank.js rename to utils/functions/rarity_rank.js diff --git a/utils/functions/refreshOpensea.js b/utils/functions/refreshOpensea.js index 93c22e1b..d9427ded 100644 --- a/utils/functions/refreshOpensea.js +++ b/utils/functions/refreshOpensea.js @@ -1,42 +1,54 @@ const basePath = process.cwd(); -const puppeteer = require("puppeteer"); +const puppeteer = require("puppeteer-extra"); +const StealthPlugin = require("puppeteer-extra-plugin-stealth"); +puppeteer.use(StealthPlugin()); +const AdblockerPlugin = require("puppeteer-extra-plugin-adblocker"); +puppeteer.use(AdblockerPlugin({ blockTrackers: true })); let [START, END] = process.argv.slice(2); -const { CONTRACT_ADDRESS } = require(`${basePath}/src/config.js`); +const { CONTRACT_ADDRESS, CHAIN } = require(`${basePath}/src/config.js`); -if(!START || !END) { - console.log("Please provide a start and end edition number. Example: node refreshOpensea.js 1 100"); +START = parseInt(START); +END = parseInt(END); +if (!START || !END) { + console.log( + "Please provide a start and end edition number. Example: npm run refresh_os --start 1 --end 10" + ); process.exit(1); } -const COLLECTION_BASE_URL = `https://opensea.io/assets/matic/${CONTRACT_ADDRESS}/`; +const COLLECTION_BASE_URL = + CHAIN.toLowerCase() === "rinkeby" + ? `https://testnets.opensea.io/assets` + : "https://opensea.io/assets/matic"; async function main() { + const notFound = []; + const errors = []; const browser = await puppeteer.launch({ headless: false, - timeout: 60000, }); - const notFound = []; - const errors = []; - console.log(`Beginning OpenSea Refresh - ${COLLECTION_BASE_URL}`); + console.log(`Beginning OpenSea Refresh`); const page = await browser.newPage(); for (let i = START; i <= END; i++) { try { console.log(`Refreshing Edition: ${i}`); - const url = COLLECTION_BASE_URL + i.toString(); + const url = `${COLLECTION_BASE_URL}/${CONTRACT_ADDRESS}/${i}`; await page.goto(url); - await page.waitForSelector('main'); - let pageTitle = await page.$$eval('title', title => title.map(title => title.textContent)); - if(pageTitle[0] === "Not Found | OpenSea") { + await page.waitForSelector('button>div>i[value="refresh"]'); + let pageTitle = await page.$$eval("title", (title) => + title.map((title) => title.textContent) + ); + if (pageTitle[0].includes("Not Found")) { console.log(`Edition ${i} not found!`); notFound.push(i); } - await page.click('button>div>i[value="refresh"]') + await page.click('button>div>i[value="refresh"]'); await page.waitForTimeout(5000); console.log(`Refreshed Edition: ${i}`); @@ -48,13 +60,11 @@ async function main() { await browser.close(); - if(notFound.length > 0 || errors.length > 0) { + if (notFound.length > 0 || errors.length > 0) { console.log(`Not Found: ${notFound}`); console.log(`Errors: ${errors}`); } - console.log( - `Finished OpenSea Refresh - ${COLLECTION_BASE_URL}` - ); + console.log(`Finished OpenSea Refresh`); } main(); diff --git a/utils/functions/txnCheck.js b/utils/functions/txnCheck.js index 66637bd0..2c85bf10 100644 --- a/utils/functions/txnCheck.js +++ b/utils/functions/txnCheck.js @@ -1,35 +1,29 @@ -const fetch = require("node-fetch"); +const puppeteer = require("puppeteer-extra"); +const StealthPlugin = require("puppeteer-extra-plugin-stealth"); +puppeteer.use(StealthPlugin()); +const AdblockerPlugin = require("puppeteer-extra-plugin-adblocker"); +puppeteer.use(AdblockerPlugin({ blockTrackers: true })); async function txnCheck(url) { - return new Promise((resolve, reject) => { - const options = { - method: "GET", - headers: { - "Content-Type": "application/json", - }, - }; - - fetch(url, options) - .then((response) => { - return response.text(); - }) - .then((text) => { - if ( - text.toLowerCase().includes("search not found") || - text.toLowerCase().includes("fail") || - text.toLowerCase().includes("failed") - ) { - resolve('Failed'); - } else if (text.toLowerCase().includes("success")) { - resolve('Success'); - } else { - resolve('Unknown'); - } - }) - .catch((err) => { - console.error("error:" + err); - reject(err); - }); + return new Promise(async (resolve, reject) => { + const browser = await puppeteer.launch({ + headless: false, + }); + const page = await browser.newPage(); + const session = await page.target().createCDPSession(); + const {windowId} = await session.send('Browser.getWindowForTarget'); + await session.send('Browser.setWindowBounds', {windowId, bounds: {windowState: 'minimized'}}); + await page.goto(url); + await page.waitForSelector("#ContentPlaceHolder1_maintable"); + + try { + let cardText = await page.$eval("#ContentPlaceHolder1_maintable .row:nth-child(4) div:nth-child(2)", (text) => text.textContent); + await browser.close(); + resolve(cardText); + } catch (error) { + await browser.close(); + resolve("Unknown"); + } }); } diff --git a/utils/nftport/checkTxns.js b/utils/nftport/checkTxns.js index 2a4698d4..308d4eb6 100644 --- a/utils/nftport/checkTxns.js +++ b/utils/nftport/checkTxns.js @@ -5,50 +5,90 @@ const { txnCheck } = require(`${basePath}/utils/functions/txnCheck.js`); const regex = new RegExp("^([0-9]+).json$"); let [dir] = process.argv.slice(2); -if(dir !== 'minted' || dir !== 'revealed') { - console.log('Please specify the directory to check. Use "minted" or "revealed"'); +const acceptedDirectories = ["minted", "revealed"]; +if (!acceptedDirectories.includes(dir)) { + console.log( + 'Please specify the directory to check. Use "minted" or "revealed"' + ); process.exit(1); } let success = []; let failed = []; +let pending = []; let unknown = []; async function main() { console.log("Checking transactions..."); const files = fs.readdirSync(`${basePath}/build/${dir}`); - files.sort(function(a, b){ + files.sort(function (a, b) { return a.split(".")[0] - b.split(".")[0]; }); for (const file of files) { try { if (regex.test(file)) { const edition = path.parse(file).name; - let jsonFile = fs.readFileSync(`${basePath}/build/${dir}/${edition}.json`); + let jsonFile = fs.readFileSync( + `${basePath}/build/${dir}/${edition}.json` + ); let txnData = JSON.parse(jsonFile); - if ( - txnData.mintData.response !== "OK" || - txnData.mintData.error !== null - ) { + const response = + dir === "minted" + ? txnData.mintData.response + : txnData.updateData.response; + const err = + dir === "minted" ? txnData.mintData.error : txnData.updateData.error; + const verified = + dir === "minted" + ? txnData.mintData.transaction_verified + : txnData.updateData.transaction_verified; + const txUrl = + dir === "minted" + ? txnData.mintData.transaction_external_url + : txnData.updateData.transaction_external_url; + + if (response !== "OK" || err !== null) { failed.push(edition); - console.log( - `Edition #${edition}: Transaction failed` - ); + console.log(`Edition #${edition}: Transaction failed`); + } else if (verified === true) { + success.push(edition); + console.log(`Edition #${edition}: Transaction success!`); } else { - let check = await txnCheck( - txnData.mintData.transaction_external_url - ); + let check = await txnCheck(txUrl); if (check === "Failed") { failed.push(edition); console.log( `Edition #${edition}: Transaction failed or not found.` ); - } else if (check === "Unknown") { - unknown.push(edition); - console.log(`Edition #${edition}: Transaction pending..`); - } else if (check === "Success") { + } else if (check.includes("Success")) { + if (dir === "minted") { + txnData.mintData.transaction_verified = true; + } else if (dir === "revealed") { + txnData.updateData.transaction_verified = true; + } + fs.writeFileSync( + `${basePath}/build/${dir}/${edition}.json`, + JSON.stringify(txnData, null, 2) + ); success.push(edition); console.log(`Edition #${edition}: Transaction success!`); + } else if (check.includes("Pending")) { + pending.push(edition); + console.log( + `Edition #${edition}: Transaction pending, check again in a few minutes..` + ); + } else if (check.includes("Indexing")) { + pending.push(edition); + console.log( + `Edition #${edition}: Transaction indexing, check again in a few minutes..` + ); + } else { + unknown.push(edition); + console.log( + `Edition #${edition}: Transaction unknown, please manually check Edition #${edition}`, + `Directory: ${`${basePath}/build/${dir}/${edition}.json`}`, + `Received: ${check}` + ); } } } @@ -56,14 +96,21 @@ async function main() { console.log(`Catch: ${error}`); } } - if(failed.length > 0) { + console.log(`All transactions checked.`); + if (failed.length > 0) { console.log(`Failed Txn Count: ${failed.length}`); console.log(`Failed Txns: ${failed}`); + } else if (pending.length > 0) { + console.log(`Pending Txn Count: ${pending.length}`); + console.log(`Pending Txns: ${pending}`); + console.log(`There are some transactions pending.`); } else if (unknown.length > 0) { console.log(`Unknown Txn Count: ${unknown.length}`); console.log(`Unknown Txns: ${unknown}`); - console.log(`There are some transactions pending.`); + console.log(`There are some unknown transaction statuses'.`); } else if (success.length > 0) { - console.log(`Successful Txn Count: ${success}`); + console.log(`Successful Txn Count: ${success.length}`); } -} \ No newline at end of file +} + +main(); diff --git a/utils/nftport/deployContract.js b/utils/nftport/deployContract.js index 77e3df1f..06aee991 100644 --- a/utils/nftport/deployContract.js +++ b/utils/nftport/deployContract.js @@ -1,17 +1,8 @@ +const path = require("path"); const basePath = process.cwd(); const fs = require("fs"); const yesno = require('yesno'); -const ok = await yesno({ - question: `Is all REQUIRED contract information correct in config.js?`, - default: null, -}); - -if(!ok) { - console.log("Exiting..."); - process.exit(0); -} - const { fetchWithRetry, } = require(`${basePath}/utils/functions/fetchWithRetry.js`); @@ -21,33 +12,50 @@ const { CONTRACT_SYMBOL, CONTRACT_TYPE, MINT_TO_ADDRESS, + METADATA_UPDATABLE, } = require(`${basePath}/src/config.js`); -const contract = { - chain: CHAIN.toLowerCase(), - name: CONTRACT_NAME, - symbol: CONTRACT_SYMBOL, - owner_address: MINT_TO_ADDRESS, - type: CONTRACT_TYPE, - metadata_updatable: true, // set to false if you don't want to allow metadata updates after minting -}; +const deployContract = async () => { + const ok = await yesno({ + question: `Is all REQUIRED contract information correct in config.js? (y/n):`, + default: null, + }); + + if(!ok) { + console.log("Exiting..."); + process.exit(0); + } -if (!fs.existsSync(path.join(`${basePath}/build`, "/contract"))) { - fs.mkdirSync(path.join(`${basePath}/build`, "contract")); -} + if (!fs.existsSync(path.join(`${basePath}/build`, "/contract"))) { + fs.mkdirSync(path.join(`${basePath}/build`, "contract")); + } -const deployContract = async () => { try { const url = `https://api.nftport.xyz/v0/contracts`; - const response = await fetchWithRetry(JSON.stringify(contract), url, "POST"); + const contract = { + chain: CHAIN.toLowerCase(), + name: CONTRACT_NAME, + symbol: CONTRACT_SYMBOL, + owner_address: MINT_TO_ADDRESS, + type: CONTRACT_TYPE, + metadata_updatable: METADATA_UPDATABLE + }; + const options = { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(contract), + }; + const response = await fetchWithRetry(url, options); fs.writeFileSync(`${basePath}/build/contract/_deployContractResponse.json`, JSON.stringify(response, null, 2)); - if(response.response === "OK" && response.error === null) { + if(response.response === "OK") { console.log(`Contract ${CONTRACT_NAME} deployment started.`); } else { console.log(`Contract ${CONTRACT_NAME} deployment failed`); } } catch (error) { - console.log(`Contract ${CONTRACT_NAME} deployment failed`); + console.log(`CATCH: Contract ${CONTRACT_NAME} deployment failed`, `ERROR: ${error}`); } }; diff --git a/utils/nftport/genericMetas.js b/utils/nftport/genericMetas.js index c1801af9..de21e2ed 100644 --- a/utils/nftport/genericMetas.js +++ b/utils/nftport/genericMetas.js @@ -18,20 +18,21 @@ let data = JSON.parse(rawdata); console.log("Starting generic metadata creation."); -for (let item in data) { +for (let item of data) { const genericImage = GENERIC_IMAGE[Math.floor(Math.random() * GENERIC_IMAGE.length)]; item.name = `${GENERIC_TITLE} #${item.custom_fields.edition}`; item.description = GENERIC_DESCRIPTION; item.file_url = genericImage; + item.image = genericImage; delete item.attributes; delete item.custom_fields.dna; fs.writeFileSync( - `${buildDir}/genericJson/${item}`, + `${buildDir}/genericJson/${item.custom_fields.edition}.json`, JSON.stringify(item, null, 2) ); - console.log(`${item} copied and updated!`); + console.log(`${item.name} copied and updated!`); } fs.writeFileSync( diff --git a/utils/nftport/mint.js b/utils/nftport/mint.js index 08ae3b9d..af2fe287 100644 --- a/utils/nftport/mint.js +++ b/utils/nftport/mint.js @@ -3,19 +3,11 @@ const path = require("path"); const basePath = process.cwd(); const fs = require("fs"); let [START, END] = process.argv.slice(2); -let range = START ? END ? `${START}-${END}` : START : "ALL"; +START = parseInt(START); +END = parseInt(END); +let range = START ? END ? `${START}-${END}` : `${START}-Remaining` : "ALL"; const yesno = require('yesno'); -const ok = await yesno({ - question: `OK to mint ${range}?`, - default: null, -}); - -if(!ok) { - console.log("Exiting..."); - process.exit(0); -} - const { txnCheck } = require(`${basePath}/utils/functions/txnCheck.js`); const { fetchWithRetry, @@ -25,31 +17,40 @@ const { CONTRACT_ADDRESS, MINT_TO_ADDRESS, CHAIN, - LIMIT, GENERIC, } = require(`${basePath}/src/config.js`); -const _limit = RateLimit(LIMIT); +const _limit = RateLimit(1); // Currently, minting is limited to 1/second. const ipfsMetasFile = GENERIC ? `${basePath}/build/ipfsMetasGeneric/_ipfsMetas.json` : `${basePath}/build/ipfsMetas/_ipfsMetas.json`; -if (!fs.existsSync(path.join(`${basePath}/build`, "/minted"))) { - fs.mkdirSync(path.join(`${basePath}/build`, "minted")); -} - async function main() { + const ok = await yesno({ + question: `OK to mint ${range}? (y/n):`, + default: null, + }); + + if(!ok) { + console.log("Exiting..."); + process.exit(0); + } + + if (!fs.existsSync(path.join(`${basePath}/build`, "/minted"))) { + fs.mkdirSync(path.join(`${basePath}/build`, "minted")); + } + const ipfsMetas = JSON.parse(fs.readFileSync(ipfsMetasFile)); for (const meta of ipfsMetas) { const edition = meta.custom_fields.edition; if (START && END) { if (edition < START || edition > END) { - return; + continue; } } else if (START) { - if (edition !== START) { - return; + if (edition < START) { + continue; } } @@ -70,19 +71,35 @@ async function main() { `Retrying Edition #${edition}` ); throw "Edition not minted"; + } else if(mintedMeta.mintData.transaction_verified === true) { + console.log(`${meta.name} already minted`); } else { let check = await txnCheck( mintedMeta.mintData.transaction_external_url ); - if (check !== "Success") { + if (check.includes("Success")) { + mintedMeta.mintData.transaction_verified = true; + fs.writeFileSync(mintFile,JSON.stringify(mintedMeta, null, 2)); + console.log(`${meta.name} already minted`); + } else if (check.includes("Fail")) { console.log( `Transaction failed or not found, will retry Edition #${edition}` ); - throw "Transaction failed or not found"; + throw `Transaction failed, will retry Edition #${edition}`; + } else if(check.includes("Pending")) { + console.log( + `Transaction transaction still pending for Edition #${edition}` + ); + } else { + console.log( + `Transaction unknown, please manually check Edition #${edition}`, + `Directory: ${mintFile}` + ); } } + } else { + throw `Edition #${edition} not minted`; } - console.log(`${meta.name} already minted`); } catch (err) { try { await _limit(); @@ -93,11 +110,15 @@ async function main() { mint_to_address: MINT_TO_ADDRESS, token_id: edition, }; - let mintData = await fetchWithRetry( - JSON.stringify(mintInfo), - "https://api.nftport.xyz/v0/mints/customizable", - "POST" - ); + const url = 'https://api.nftport.xyz/v0/mints/customizable'; + const options = { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(mintInfo), + }; + let mintData = await fetchWithRetry(url, options); const combinedData = { metaData: meta, mintData: mintData, @@ -109,7 +130,7 @@ async function main() { if (mintData.response !== "OK" || mintData.error !== null) { console.log( - `Minting ${meta.name} failed!`, + `Minting ${meta.name} failed :(`, `Response: ${mintData.response}`, `Error: ${mintData.error}` ); @@ -122,7 +143,7 @@ async function main() { } } - console.log("Minting complete. Run mintCheck to check for errors."); + console.log("Minting complete. To check for errors run command: npm run check_txns --dir=minted"); } main(); diff --git a/utils/nftport/retrieveContract.js b/utils/nftport/retrieveContract.js index c730c849..5d265eea 100644 --- a/utils/nftport/retrieveContract.js +++ b/utils/nftport/retrieveContract.js @@ -12,12 +12,17 @@ const retrieveContract = async () => { `${basePath}/build/contract/_deployContractResponse.json` ); const deployData = JSON.parse(rawDeployData); - if (deployData.response === "OK" && deployData.error === null) { + if (deployData.response === "OK") { const txnHash = deployData.transaction_hash; const chain = CHAIN.toLowerCase(); const url = `https://api.nftport.xyz/v0/contracts/${txnHash}?chain=${chain}`; - - const response = await fetchWithRetry(null, url, "GET"); + const options = { + method: "GET", + headers: { + "Content-Type": "application/json", + }, + }; + const response = await fetchWithRetry(url, options); fs.writeFileSync( `${basePath}/build/contract/_contract.json`, JSON.stringify(response, null, 2) @@ -31,7 +36,7 @@ const retrieveContract = async () => { console.log(`Contract ${CONTRACT_NAME} deployment failed`); } } catch (error) { - console.log(`Contract ${CONTRACT_NAME} deployment failed`); + console.log(`CATCH: Contract ${CONTRACT_NAME} deployment failed`, `ERROR: ${error}`); } }; diff --git a/utils/nftport/revealNFTs.js b/utils/nftport/revealNFTs.js index 60f9e60a..769c4383 100644 --- a/utils/nftport/revealNFTs.js +++ b/utils/nftport/revealNFTs.js @@ -6,8 +6,8 @@ const { RateLimit } = require("async-sema"); const { fetchWithRetry, } = require(`${basePath}/utils/functions/fetchWithRetry.js`); +const { txnCheck } = require(`${basePath}/utils/functions/txnCheck.js`); const { - AUTH, CONTRACT_ADDRESS, MINT_TO_ADDRESS, CHAIN, @@ -17,18 +17,11 @@ const { } = require(`${basePath}/src/config.js`); const _limit = RateLimit(LIMIT); let [START, END] = process.argv.slice(2); - -if(CHAIN === 'rinkeby') { - console.log('Rinkeby is not supported for checking ownership of NFTs.'); - process.exit(1); -} +START = parseInt(START); +END = parseInt(END); const ownedNFTs = []; -if (!fs.existsSync(path.join(`${basePath}/build`, "/revealed"))) { - fs.mkdirSync(path.join(`${basePath}/build`, "revealed")); -} - async function checkOwnedNFTs() { try { let page = 1; @@ -38,7 +31,6 @@ async function checkOwnedNFTs() { method: "GET", headers: { "Content-Type": "application/json", - Authorization: AUTH, }, }; @@ -62,12 +54,15 @@ async function checkOwnedNFTs() { console.log(`Catch: Error: ${error}`); } + console.log(`Found ${ownedNFTs.length} owned NFTs.`); + console.log(`Revealing unowned NFTs...`); reveal(); } async function reveal() { - console.log(`Found ${ownedNFTs.length} owned NFTs.`); - console.log(`Revealing unowned NFTs...`); + if (!fs.existsSync(path.join(`${basePath}/build`, "/revealed"))) { + fs.mkdirSync(path.join(`${basePath}/build`, "revealed")); + } const ipfsMetas = JSON.parse( fs.readFileSync(`${basePath}/build/ipfsMetas/_ipfsMetas.json`) ); @@ -75,11 +70,11 @@ async function reveal() { const edition = meta.custom_fields.edition; if (START && END) { if (edition < START || edition > END) { - return; + continue; } } else if (START) { - if (edition !== START) { - return; + if (edition < START) { + continue; } } if (!ownedNFTs.includes(edition)) { @@ -89,9 +84,34 @@ async function reveal() { const revealedFile = fs.readFileSync(revealedFilePath); if (revealedFile.length > 0) { const revealedFileJson = JSON.parse(revealedFile); - if (revealedFileJson.updateData.response !== "OK") + if (revealedFileJson.updateData.response !== "OK" || revealedFileJson.updateData.error !== null) { throw "not revealed"; - console.log(`${meta.name} already revealed`); + } else if(revealedFileJson.updateData.transaction_verified === true) { + console.log(`${meta.name} already revealed.`); + } else { + let check = await txnCheck( + revealedFileJson.updateData.transaction_external_url + ); + if (check.includes("Success")) { + revealedFileJson.updateData.transaction_verified = true; + fs.writeFileSync(revealedFilePath,JSON.stringify(revealedFileJson, null, 2)); + console.log(`${meta.name} already revealed.`); + } else if (check.includes("Fail")) { + console.log( + `Transaction failed or not found, will retry revealing Edition #${edition}` + ); + throw `Transaction failed, will retry revealing Edition #${edition}`; + } else if(check.includes("Pending")) { + console.log( + `Transaction transaction still pending for Edition #${edition}` + ); + } else { + console.log( + `Transaction unknown, please manually check Edition #${edition}`, + `Directory: ${mintFile}` + ); + } + } } else { throw "not revealed"; } @@ -99,31 +119,30 @@ async function reveal() { let ok = true; if (REVEAL_PROMPT) { ok = await yesno({ - question: `Reveal ${meta.name}?`, + question: `Reveal ${meta.name}? (y/n):`, default: null, }); } if (ok) { try { - let url = "https://api.nftport.xyz/v0/mints/customizable"; - + await _limit(); + const url = "https://api.nftport.xyz/v0/mints/customizable"; const updateInfo = { chain: CHAIN.toLowerCase(), contract_address: CONTRACT_ADDRESS, metadata_uri: meta.metadata_uri, token_id: meta.custom_fields.edition, }; + const options = { + method: "PUT", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify(updateInfo), + }; + let updateData = await fetchWithRetry(url, options); - await _limit(); - - let updateData = await fetchWithRetry( - JSON.stringify(updateInfo), - url, - "PUT" - ); - - console.log(`Updated transaction created: ${meta.name}`); - + const combinedData = { metaData: meta, updateData: updateData, @@ -131,11 +150,13 @@ async function reveal() { fs.writeFileSync( `${basePath}/build/revealed/${meta.custom_fields.edition}.json`, JSON.stringify(combinedData, null, 2) - ); - console.log(`Updated: ${meta.name}`); + ); + console.log(`Updated transaction created for ${meta.name}`); } catch (err) { console.log(err); } + } else { + console.log(`Skipped: ${meta.name}`); } } } @@ -144,12 +165,21 @@ async function reveal() { console.log( `Done revealing! Will run again in ${INTERVAL / 1000 / 60} minutes` ); + } else { + console.log( + `Done revealing!` + ); } + console.log("To check for errors run command: npm run check_txns --dir=revealed"); } if (START) { reveal(); } else { + if(CHAIN === 'rinkeby') { + console.log('Rinkeby is not supported for checking ownership of NFTs.'); + process.exit(1); + } setInterval(checkOwnedNFTs, INTERVAL); checkOwnedNFTs(); } diff --git a/utils/nftport/uploadFiles.js b/utils/nftport/uploadFiles.js index 9008f5ea..bc2122b6 100644 --- a/utils/nftport/uploadFiles.js +++ b/utils/nftport/uploadFiles.js @@ -27,10 +27,16 @@ async function main() { if(!metaData.file_url.includes('https://')) { await _limit() - const fileStream = fs.createReadStream(`${basePath}/build/images/${file}`); + const url = "https://api.nftport.xyz/v0/files"; const formData = new FormData(); + const fileStream = fs.createReadStream(`${basePath}/build/images/${file}`); formData.append("file", fileStream); - const response = await fetchWithRetry(formData, "https://api.nftport.xyz/v0/files", "POST"); + const options = { + method: "POST", + headers: {}, + body: formData, + }; + const response = await fetchWithRetry(url, options); metaData.file_url = response.ipfs_url; metaData.image = response.ipfs_url; diff --git a/utils/nftport/uploadMetas.js b/utils/nftport/uploadMetas.js index 18be5143..ce1490fd 100644 --- a/utils/nftport/uploadMetas.js +++ b/utils/nftport/uploadMetas.js @@ -9,8 +9,7 @@ const { LIMIT, GENERIC } = require(`${basePath}/src/config.js`); const _limit = RateLimit(LIMIT); const regex = new RegExp("^([0-9]+).json$"); - -const allMetadata = []; +let genericUploaded = false; if (!fs.existsSync(path.join(`${basePath}/build`, "/ipfsMetas"))) { fs.mkdirSync(path.join(`${basePath}/build`, "ipfsMetas")); @@ -20,7 +19,8 @@ let readDir = `${basePath}/build/json`; let writeDir = `${basePath}/build/ipfsMetas`; async function main() { - console.log("Starting upload of metadata..."); + console.log(`Starting upload of ${GENERIC ? genericUploaded ? 'generic ' : '' : ''}metadata...`); + const allMetadata = []; const files = fs.readdirSync(readDir); files.sort(function (a, b) { return a.split(".")[0] - b.split(".")[0]; @@ -45,7 +45,15 @@ async function main() { } catch (err) { try { await _limit(); - const response = await fetchWithRetry(jsonFile, 'https://api.nftport.xyz/v0/metadata', "POST"); + const url = "https://api.nftport.xyz/v0/metadata"; + const options = { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: jsonFile, + }; + const response = await fetchWithRetry(url, options); allMetadata.push(response); fs.writeFileSync(uploadedMeta, JSON.stringify(response, null, 2)); console.log(`${response.name} metadata uploaded!`); @@ -61,14 +69,14 @@ async function main() { } // Upload Generic Metadata if GENERIC is true - if (GENERIC) { + if (GENERIC && !genericUploaded) { if (!fs.existsSync(path.join(`${basePath}/build`, "/ipfsMetasGeneric"))) { fs.mkdirSync(path.join(`${basePath}/build`, "ipfsMetasGeneric")); } readDir = `${basePath}/build/genericJson`; writeDir = `${basePath}/build/ipfsMetasGeneric`; - console.log("Starting upload of generic metadata..."); + genericUploaded = true; main(); } } diff --git a/yarn.lock b/yarn.lock index 1389c59b..6a73ea68 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,41 @@ # yarn lockfile v1 +"@cliqz/adblocker-content@^1.22.6", "@cliqz/adblocker-content@^1.23.6": + "integrity" "sha512-rzFAtp8nGc6bbQoSjN6Xo0l1OHzqS9Z86nlyFD3yLsd9g2d/CLnx0WFDVsk6iE+N9yu2UpHbgWT+siShF0rHqw==" + "resolved" "https://registry.npmjs.org/@cliqz/adblocker-content/-/adblocker-content-1.23.6.tgz" + "version" "1.23.6" + dependencies: + "@cliqz/adblocker-extended-selectors" "^1.23.6" + +"@cliqz/adblocker-extended-selectors@^1.23.6": + "integrity" "sha512-qnn2LrE/0YswjL4399M1ldKityLxDT9r/b9MUOPboz+4EiE/ew6hTl35yNg2g8nZU3tXSzrnvAYcqLw607kSYg==" + "resolved" "https://registry.npmjs.org/@cliqz/adblocker-extended-selectors/-/adblocker-extended-selectors-1.23.6.tgz" + "version" "1.23.6" + +"@cliqz/adblocker-puppeteer@1.22.6": + "integrity" "sha512-Yg+64gsBfG8NKIJTKRg+sgK8G32W/z4qNEoMGdGJc7mdKVCn+y93WklDMO3pCy64u9jqUVS/Rd7z/Z96dX3K8Q==" + "resolved" "https://registry.npmjs.org/@cliqz/adblocker-puppeteer/-/adblocker-puppeteer-1.22.6.tgz" + "version" "1.22.6" + dependencies: + "@cliqz/adblocker" "^1.22.6" + "@cliqz/adblocker-content" "^1.22.6" + "tldts-experimental" "^5.6.21" + +"@cliqz/adblocker@^1.22.6": + "integrity" "sha512-+Ojm25XwIkiD0THvf+WHZ3+zq65DuES7B6XlsMpbYC0JD8J9crpswLHsAmj97o0KVN+vmK2fYrqa2DgOUnFzYg==" + "resolved" "https://registry.npmjs.org/@cliqz/adblocker/-/adblocker-1.23.6.tgz" + "version" "1.23.6" + dependencies: + "@cliqz/adblocker-content" "^1.23.6" + "@cliqz/adblocker-extended-selectors" "^1.23.6" + "@remusao/guess-url-type" "^1.1.2" + "@remusao/small" "^1.1.2" + "@remusao/smaz" "^1.7.1" + "@types/chrome" "^0.0.178" + "@types/firefox-webext-browser" "^94.0.0" + "tldts-experimental" "^5.6.21" + "@mapbox/node-pre-gyp@^1.0.0": "integrity" "sha512-qK1ECws8UxuPqOA8F5LFD90vyVU33W7N3hGfgsOVfrJaRVc8McC3JClTDHpeSbL9CBrOHly/4GsNPAvIgNZE+g==" "resolved" "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.6.tgz" @@ -17,11 +52,95 @@ "semver" "^7.3.5" "tar" "^6.1.11" +"@remusao/guess-url-type@^1.1.2": + "integrity" "sha512-rbOqre2jW8STjheOsOaQHLgYBaBZ9Owbdt8NO7WvNZftJlaG3y/K9oOkl8ZUpuFBisIhmBuMEW6c+YrQl5inRA==" + "resolved" "https://registry.npmjs.org/@remusao/guess-url-type/-/guess-url-type-1.2.1.tgz" + "version" "1.2.1" + +"@remusao/small@^1.1.2": + "integrity" "sha512-7MjoGt0TJMVw1GPKgWq6SJPws1SLsUXQRa43Umht+nkyw2jnpy3WpiLNqGdwo5rHr5Wp9B2W/Pm5RQp656UJdw==" + "resolved" "https://registry.npmjs.org/@remusao/small/-/small-1.2.1.tgz" + "version" "1.2.1" + +"@remusao/smaz-compress@^1.9.1": + "integrity" "sha512-E2f48TwloQu3r6BdLOGF2aczeH7bJ/32oJGqvzT9SKur0cuUnLcZ7ZXP874E2fwmdE+cXzfC7bKzp79cDnmeyw==" + "resolved" "https://registry.npmjs.org/@remusao/smaz-compress/-/smaz-compress-1.9.1.tgz" + "version" "1.9.1" + dependencies: + "@remusao/trie" "^1.4.1" + +"@remusao/smaz-decompress@^1.9.1": + "integrity" "sha512-TfjKKprYe3n47od8auhvJ/Ikj9kQTbDTe71ynKlxslrvvUhlIV3VQSuwYuMWMbdz1fIs0H/fxCN1Z8/H3km6/A==" + "resolved" "https://registry.npmjs.org/@remusao/smaz-decompress/-/smaz-decompress-1.9.1.tgz" + "version" "1.9.1" + +"@remusao/smaz@^1.7.1": + "integrity" "sha512-e6BLuP8oaXCZ9+v46Is4ilAZ/Vq6YLgmBP204Ixgk1qTjXmqvFYG7+AS7v9nsZdGOy96r9DWGFbbDVgMxwu1rA==" + "resolved" "https://registry.npmjs.org/@remusao/smaz/-/smaz-1.9.1.tgz" + "version" "1.9.1" + dependencies: + "@remusao/smaz-compress" "^1.9.1" + "@remusao/smaz-decompress" "^1.9.1" + +"@remusao/trie@^1.4.1": + "integrity" "sha512-yvwa+aCyYI/UjeD39BnpMypG8N06l86wIDW1/PAc6ihBRnodIfZDwccxQN3n1t74wduzaz74m4ZMHZnB06567Q==" + "resolved" "https://registry.npmjs.org/@remusao/trie/-/trie-1.4.1.tgz" + "version" "1.4.1" + +"@types/chrome@^0.0.178": + "integrity" "sha512-U+G5YG2pH0qvLrYVJ9aT5VbPXYR3fAFyCuRBRAA14Pv7GrkFzDJuXPspgdeLYaKzGEp4rymUkuqUOuFz18LI1g==" + "resolved" "https://registry.npmjs.org/@types/chrome/-/chrome-0.0.178.tgz" + "version" "0.0.178" + dependencies: + "@types/filesystem" "*" + "@types/har-format" "*" + +"@types/debug@^4.1.0": + "integrity" "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==" + "resolved" "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz" + "version" "4.1.7" + dependencies: + "@types/ms" "*" + +"@types/filesystem@*": + "integrity" "sha512-Yuf4jR5YYMR2DVgwuCiP11s0xuVRyPKmz8vo6HBY3CGdeMj8af93CFZX+T82+VD1+UqHOxTq31lO7MI7lepBtQ==" + "resolved" "https://registry.npmjs.org/@types/filesystem/-/filesystem-0.0.32.tgz" + "version" "0.0.32" + dependencies: + "@types/filewriter" "*" + +"@types/filewriter@*": + "integrity" "sha512-BsPXH/irW0ht0Ji6iw/jJaK8Lj3FJemon2gvEqHKpCdDCeemHa+rI3WBGq5z7cDMZgoLjY40oninGxqk+8NzNQ==" + "resolved" "https://registry.npmjs.org/@types/filewriter/-/filewriter-0.0.29.tgz" + "version" "0.0.29" + +"@types/firefox-webext-browser@^94.0.0": + "integrity" "sha512-I6iHRQJSTZ+gYt2IxdH2RRAMvcUyK8v5Ig7fHQR0IwUNYP7hz9+cziBVIKxLCO6XI7fiyRsNOWObfl3/4Js2Lg==" + "resolved" "https://registry.npmjs.org/@types/firefox-webext-browser/-/firefox-webext-browser-94.0.1.tgz" + "version" "94.0.1" + +"@types/har-format@*": + "integrity" "sha512-OP6L9VuZNdskgNN3zFQQ54ceYD8OLq5IbqO4VK91ORLfOm7WdT/CiT/pHEBSQEqCInJ2y3O6iCm/zGtPElpgJQ==" + "resolved" "https://registry.npmjs.org/@types/har-format/-/har-format-1.2.8.tgz" + "version" "1.2.8" + +"@types/ms@*": + "integrity" "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==" + "resolved" "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz" + "version" "0.7.31" + "@types/node@*": "integrity" "sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==" "resolved" "https://registry.npmjs.org/@types/node/-/node-17.0.21.tgz" "version" "17.0.21" +"@types/puppeteer@*": + "integrity" "sha512-lxCjpDEY+DZ66+W3x5Af4oHnEmUXt0HuaRzkBGE2UZiZEp/V1d3StpLPlmNVu/ea091bdNmVPl44lu8Wy/0ZCA==" + "resolved" "https://registry.npmjs.org/@types/puppeteer/-/puppeteer-5.4.5.tgz" + "version" "5.4.5" + dependencies: + "@types/node" "*" + "@types/yauzl@^2.9.1": "integrity" "sha512-8uALY5LTvSuHgloDVUvWP3pIauILm+8/0pDMokuDYIoNsOkSwd5AiHBTSEJjKTDcZr5z8UpgOWZkxBF4iJftoA==" "resolved" "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.2.tgz" @@ -59,6 +178,11 @@ "delegates" "^1.0.0" "readable-stream" "^3.6.0" +"arr-union@^3.1.0": + "integrity" "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + "resolved" "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz" + "version" "3.1.0" + "async-sema@^3.1.1": "integrity" "sha512-tLRNUXati5MFePdAk8dw7Qt7DpxPB60ofAgn8WRhW6a2rcimZnYBP9oxHiv0OHy+Wz7kPMG+t4LGdt31+4EmGg==" "resolved" "https://registry.npmjs.org/async-sema/-/async-sema-3.1.1.tgz" @@ -133,6 +257,17 @@ "resolved" "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz" "version" "2.0.0" +"clone-deep@^0.2.4": + "integrity" "sha1-TnPdCen7lxzDhnDF3O2cGJZIHMY=" + "resolved" "https://registry.npmjs.org/clone-deep/-/clone-deep-0.2.4.tgz" + "version" "0.2.4" + dependencies: + "for-own" "^0.1.3" + "is-plain-object" "^2.0.1" + "kind-of" "^3.0.2" + "lazy-cache" "^1.0.3" + "shallow-clone" "^0.1.2" + "color-support@^1.1.2": "integrity" "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==" "resolved" "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz" @@ -174,6 +309,13 @@ dependencies: "ms" "2.1.2" +"debug@4.3.1": + "integrity" "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==" + "resolved" "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz" + "version" "4.3.1" + dependencies: + "ms" "2.1.2" + "decompress-response@^4.2.0": "integrity" "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==" "resolved" "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz" @@ -181,6 +323,11 @@ dependencies: "mimic-response" "^2.0.0" +"deepmerge@^4.2.2": + "integrity" "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" + "resolved" "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz" + "version" "4.2.2" + "delayed-stream@~1.0.0": "integrity" "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" "resolved" "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" @@ -196,6 +343,11 @@ "resolved" "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz" "version" "1.0.3" +"devtools-protocol@0.0.901419": + "integrity" "sha512-4INMPwNm9XRpBukhNbF7OB6fNTTCaI8pzy/fXg0xQzAy5h3zL1P8xT3QazgKqBrb/hAYwIBizqDBZ7GtJE74QQ==" + "resolved" "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.901419.tgz" + "version" "0.0.901419" + "devtools-protocol@0.0.960912": "integrity" "sha512-I3hWmV9rWHbdnUdmMKHF2NuYutIM2kXz2mdXW8ha7TbRlGTVs+PF+PsB5QWvpCek4Fy9B+msiispCfwlhG5Sqg==" "resolved" "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.960912.tgz" @@ -234,6 +386,23 @@ "locate-path" "^5.0.0" "path-exists" "^4.0.0" +"for-in@^0.1.3": + "integrity" "sha1-2Hc5COMSVhCZUrH9ubP6hn0ndeE=" + "resolved" "https://registry.npmjs.org/for-in/-/for-in-0.1.8.tgz" + "version" "0.1.8" + +"for-in@^1.0.1": + "integrity" "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + "resolved" "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz" + "version" "1.0.2" + +"for-own@^0.1.3": + "integrity" "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=" + "resolved" "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz" + "version" "0.1.5" + dependencies: + "for-in" "^1.0.1" + "form-data@^4.0.0": "integrity" "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==" "resolved" "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz" @@ -248,6 +417,15 @@ "resolved" "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz" "version" "1.0.0" +"fs-extra@^10.0.0": + "integrity" "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==" + "resolved" "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz" + "version" "10.0.1" + dependencies: + "graceful-fs" "^4.2.0" + "jsonfile" "^6.0.1" + "universalify" "^2.0.0" + "fs-minipass@^2.0.0": "integrity" "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==" "resolved" "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz" @@ -299,6 +477,11 @@ "once" "^1.3.0" "path-is-absolute" "^1.0.0" +"graceful-fs@^4.1.6", "graceful-fs@^4.2.0": + "integrity" "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==" + "resolved" "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz" + "version" "4.2.9" + "has-unicode@^2.0.1": "integrity" "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" "resolved" "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz" @@ -330,11 +513,66 @@ "resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" "version" "2.0.4" +"is-buffer@^1.0.2", "is-buffer@^1.1.5": + "integrity" "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + "resolved" "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz" + "version" "1.1.6" + +"is-extendable@^0.1.1": + "integrity" "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + "resolved" "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" + "version" "0.1.1" + "is-fullwidth-code-point@^2.0.0": "integrity" "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" "resolved" "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz" "version" "2.0.0" +"is-plain-object@^2.0.1": + "integrity" "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==" + "resolved" "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz" + "version" "2.0.4" + dependencies: + "isobject" "^3.0.1" + +"isobject@^3.0.1": + "integrity" "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + "resolved" "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz" + "version" "3.0.1" + +"jsonfile@^6.0.1": + "integrity" "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==" + "resolved" "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz" + "version" "6.1.0" + dependencies: + "universalify" "^2.0.0" + optionalDependencies: + "graceful-fs" "^4.1.6" + +"kind-of@^2.0.1": + "integrity" "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=" + "resolved" "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz" + "version" "2.0.1" + dependencies: + "is-buffer" "^1.0.2" + +"kind-of@^3.0.2": + "integrity" "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=" + "resolved" "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz" + "version" "3.2.2" + dependencies: + "is-buffer" "^1.1.5" + +"lazy-cache@^0.2.3": + "integrity" "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=" + "resolved" "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz" + "version" "0.2.7" + +"lazy-cache@^1.0.3": + "integrity" "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" + "resolved" "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz" + "version" "1.0.4" + "locate-path@^5.0.0": "integrity" "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==" "resolved" "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" @@ -356,6 +594,15 @@ dependencies: "semver" "^6.0.0" +"merge-deep@^3.0.1": + "integrity" "sha512-qtmzAS6t6grwEkNrunqTBdn0qKwFgNWvlxUbAV8es9M7Ot1EbyApytCnvE0jALPa46ZpKDUo527kKiaWplmlFA==" + "resolved" "https://registry.npmjs.org/merge-deep/-/merge-deep-3.0.3.tgz" + "version" "3.0.3" + dependencies: + "arr-union" "^3.1.0" + "clone-deep" "^0.2.4" + "kind-of" "^3.0.2" + "mime-db@1.51.0": "integrity" "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==" "resolved" "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz" @@ -380,6 +627,11 @@ dependencies: "brace-expansion" "^1.1.7" +"minimist@^1.2.5": + "integrity" "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "resolved" "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz" + "version" "1.2.5" + "minipass@^3.0.0": "integrity" "sha512-+8NzxD82XQoNKNrl1d/FSi+X8wAEWR+sbYAfIvub4Nz0d22plFG72CEVVaufV8PNf4qSslFTD8VMOxNVhHCjTw==" "resolved" "https://registry.npmjs.org/minipass/-/minipass-3.1.5.tgz" @@ -395,11 +647,26 @@ "minipass" "^3.0.0" "yallist" "^4.0.0" +"mixin-object@^2.0.1": + "integrity" "sha1-T7lJRB2rGCVA8f4DW6YOGUel5X4=" + "resolved" "https://registry.npmjs.org/mixin-object/-/mixin-object-2.0.1.tgz" + "version" "2.0.1" + dependencies: + "for-in" "^0.1.3" + "is-extendable" "^0.1.1" + "mkdirp-classic@^0.5.2": "integrity" "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" "resolved" "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz" "version" "0.5.3" +"mkdirp@^0.5.1": + "integrity" "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==" + "resolved" "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz" + "version" "0.5.5" + dependencies: + "minimist" "^1.2.5" + "mkdirp@^1.0.3": "integrity" "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" "resolved" "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz" @@ -415,6 +682,11 @@ "resolved" "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz" "version" "2.15.0" +"node-fetch@^2.6.0", "node-fetch@2.6.1": + "integrity" "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + "resolved" "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz" + "version" "2.6.1" + "node-fetch@^2.6.5", "node-fetch@^2.6.6", "node-fetch@2.6.7": "integrity" "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==" "resolved" "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz" @@ -492,6 +764,11 @@ dependencies: "find-up" "^4.0.0" +"progress@2.0.1": + "integrity" "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==" + "resolved" "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz" + "version" "2.0.1" + "progress@2.0.3": "integrity" "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==" "resolved" "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz" @@ -510,7 +787,64 @@ "end-of-stream" "^1.1.0" "once" "^1.3.1" -"puppeteer@^13.4.1": +"puppeteer-extra-plugin-adblocker@^2.12.0": + "integrity" "sha512-x0/G6suPa28FomEuCGAKGTvqcxt2efZWXE8mjEPRASGQaMe4smHYM1xT2nYS5Z82wIOqPZQVVJ7l3dGY9E+BuQ==" + "resolved" "https://registry.npmjs.org/puppeteer-extra-plugin-adblocker/-/puppeteer-extra-plugin-adblocker-2.12.0.tgz" + "version" "2.12.0" + dependencies: + "@cliqz/adblocker-puppeteer" "1.22.6" + "debug" "^4.1.1" + "node-fetch" "^2.6.0" + "puppeteer-extra-plugin" "^3.2.0" + +"puppeteer-extra-plugin-stealth@^2.9.0": + "integrity" "sha512-erZ9lkIcOkfYmLPP2jv2AiqvNBFhQJinWJhcm40pqSjwJTsZXHsTARUyRCsBYEEBvNIs3Wz3E0zVlTRc4IJ6Hg==" + "resolved" "https://registry.npmjs.org/puppeteer-extra-plugin-stealth/-/puppeteer-extra-plugin-stealth-2.9.0.tgz" + "version" "2.9.0" + dependencies: + "debug" "^4.1.1" + "puppeteer-extra-plugin" "^3.2.0" + "puppeteer-extra-plugin-user-preferences" "^2.3.1" + +"puppeteer-extra-plugin-user-data-dir@^2.3.1": + "integrity" "sha512-yhaYMaNFdfQ1LbA94ZElW1zU8rh+MFmO+GZA0gtQ8BXc+UZ6aRrWS9flIZvlXDzk+ZsXhCbTEohEwZ8lEDLRVA==" + "resolved" "https://registry.npmjs.org/puppeteer-extra-plugin-user-data-dir/-/puppeteer-extra-plugin-user-data-dir-2.3.1.tgz" + "version" "2.3.1" + dependencies: + "debug" "^4.1.1" + "fs-extra" "^10.0.0" + "puppeteer-extra-plugin" "^3.2.0" + +"puppeteer-extra-plugin-user-preferences@^2.3.1": + "integrity" "sha512-t/FyGQj2aqtHOROqL02z+k2kNQe0cjT0Hd9pG5FJ7x0JXx1722PhOuK7FeJLQMJ+BLl2YvCUgaWSC8Zohjts5A==" + "resolved" "https://registry.npmjs.org/puppeteer-extra-plugin-user-preferences/-/puppeteer-extra-plugin-user-preferences-2.3.1.tgz" + "version" "2.3.1" + dependencies: + "debug" "^4.1.1" + "deepmerge" "^4.2.2" + "puppeteer-extra-plugin" "^3.2.0" + "puppeteer-extra-plugin-user-data-dir" "^2.3.1" + +"puppeteer-extra-plugin@^3.2.0": + "integrity" "sha512-wbiw12USE3b+maMk/IMaroYsz7rusVI9G+ml6pCFCnFFh91Z9BAEiVzhCpOHuquVXEiCCsDTWhDUgvdNxQHOyw==" + "resolved" "https://registry.npmjs.org/puppeteer-extra-plugin/-/puppeteer-extra-plugin-3.2.0.tgz" + "version" "3.2.0" + dependencies: + "@types/debug" "^4.1.0" + "debug" "^4.1.1" + "merge-deep" "^3.0.1" + +"puppeteer-extra@*", "puppeteer-extra@^3.2.3": + "integrity" "sha512-CnSN9yIedbAbS8WmRybaDHJLf6goRk+VYM/kbH6i/+EMadCaAeh2O+1/mFUMN2LbkbDNAp2Vd/UwrTVCHjTxyg==" + "resolved" "https://registry.npmjs.org/puppeteer-extra/-/puppeteer-extra-3.2.3.tgz" + "version" "3.2.3" + dependencies: + "@types/debug" "^4.1.0" + "@types/puppeteer" "*" + "debug" "^4.1.1" + "deepmerge" "^4.2.2" + +"puppeteer@*", "puppeteer@^13.4.1": "integrity" "sha512-2arcYPEGvLV9HvOw01Zv1b1IAXrMWHqsFJn0Hn00qe9HtCmaF0b8FlrbdLjCIbkaFc6icH5+GqcG8R5KxlJSRg==" "resolved" "https://registry.npmjs.org/puppeteer/-/puppeteer-13.4.1.tgz" "version" "13.4.1" @@ -528,6 +862,24 @@ "unbzip2-stream" "1.4.3" "ws" "8.5.0" +"puppeteer@5.x || 6.x || 7.x || 8.x || 9.x || 10.x": + "integrity" "sha512-2cP8mBoqnu5gzAVpbZ0fRaobBWZM8GEUF4I1F6WbgHrKV/rz7SX8PG2wMymZgD0wo0UBlg2FBPNxlF/xlqW6+w==" + "resolved" "https://registry.npmjs.org/puppeteer/-/puppeteer-10.4.0.tgz" + "version" "10.4.0" + dependencies: + "debug" "4.3.1" + "devtools-protocol" "0.0.901419" + "extract-zip" "2.0.1" + "https-proxy-agent" "5.0.0" + "node-fetch" "2.6.1" + "pkg-dir" "4.2.0" + "progress" "2.0.1" + "proxy-from-env" "1.1.0" + "rimraf" "3.0.2" + "tar-fs" "2.0.0" + "unbzip2-stream" "1.3.3" + "ws" "7.4.6" + "readable-stream@^3.1.1", "readable-stream@^3.4.0", "readable-stream@^3.6.0": "integrity" "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==" "resolved" "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz" @@ -574,6 +926,16 @@ "charenc" ">= 0.0.1" "crypt" ">= 0.0.1" +"shallow-clone@^0.1.2": + "integrity" "sha1-WQnodLp3EG1zrEFM/sH/yofZcGA=" + "resolved" "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz" + "version" "0.1.2" + dependencies: + "is-extendable" "^0.1.1" + "kind-of" "^2.0.1" + "lazy-cache" "^0.2.3" + "mixin-object" "^2.0.1" + "signal-exit@^3.0.0": "integrity" "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==" "resolved" "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz" @@ -615,6 +977,16 @@ dependencies: "ansi-regex" "^3.0.0" +"tar-fs@2.0.0": + "integrity" "sha512-vaY0obB6Om/fso8a8vakQBzwholQ7v5+uy+tF3Ozvxv1KNezmVQAiWtcNmMHFSFPqL3dJA8ha6gdtFbfX9mcxA==" + "resolved" "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.0.tgz" + "version" "2.0.0" + dependencies: + "chownr" "^1.1.1" + "mkdirp" "^0.5.1" + "pump" "^3.0.0" + "tar-stream" "^2.0.0" + "tar-fs@2.1.1": "integrity" "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==" "resolved" "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz" @@ -625,7 +997,7 @@ "pump" "^3.0.0" "tar-stream" "^2.1.4" -"tar-stream@^2.1.4": +"tar-stream@^2.0.0", "tar-stream@^2.1.4": "integrity" "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==" "resolved" "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz" "version" "2.2.0" @@ -653,11 +1025,31 @@ "resolved" "https://registry.npmjs.org/through/-/through-2.3.8.tgz" "version" "2.3.8" +"tldts-core@^5.7.69": + "integrity" "sha512-YyFzp5ibo24Z0sxGOOkghFszu0sZ/fBF8mexd9kabft8XgWPs265G4IxhZ+SCZg3stzpGYzw8bDKvn8lVziSlg==" + "resolved" "https://registry.npmjs.org/tldts-core/-/tldts-core-5.7.69.tgz" + "version" "5.7.69" + +"tldts-experimental@^5.6.21": + "integrity" "sha512-p1o1W4B358D+0pyh7MmC4BZkk95aBY5+iIcuHF1bCQS9f3IRaPipO7xVqStFek0i9bAmncErR4R+7XnNShf58g==" + "resolved" "https://registry.npmjs.org/tldts-experimental/-/tldts-experimental-5.7.69.tgz" + "version" "5.7.69" + dependencies: + "tldts-core" "^5.7.69" + "tr46@~0.0.3": "integrity" "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" "resolved" "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" "version" "0.0.3" +"unbzip2-stream@1.3.3": + "integrity" "sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg==" + "resolved" "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz" + "version" "1.3.3" + dependencies: + "buffer" "^5.2.1" + "through" "^2.3.8" + "unbzip2-stream@1.4.3": "integrity" "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==" "resolved" "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz" @@ -666,6 +1058,11 @@ "buffer" "^5.2.1" "through" "^2.3.8" +"universalify@^2.0.0": + "integrity" "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==" + "resolved" "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz" + "version" "2.0.0" + "util-deprecate@^1.0.1": "integrity" "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" "resolved" "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" @@ -696,6 +1093,11 @@ "resolved" "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" "version" "1.0.2" +"ws@7.4.6": + "integrity" "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==" + "resolved" "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz" + "version" "7.4.6" + "ws@8.5.0": "integrity" "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==" "resolved" "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz"