diff --git a/.prettierignore b/.prettierignore index e4dc9f4..0638a21 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,4 @@ # Ignore artifacts: dist/ -.github/ \ No newline at end of file +.github/ +*.yml \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs index c6524ca..60574e1 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -17,6 +17,10 @@ export default [ files: ["src/**/*.{js,mjs,cjs,ts}"], ignores: ["dist/**/*"], rules: { + "padding-line-between-statements": [ + "error", + { blankLine: "always", prev: "function", next: "function" }, + ], "headers/header-format": [ "error", { diff --git a/package.json b/package.json index 801768f..771658d 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,9 @@ "main": "index.js", "types": "index.d.ts", "author": "Cleboost", + "bin": { + "djs-core": "index.js" + }, "repository": { "url": "https://github.com/Cleboost/djs-core" }, @@ -22,8 +25,13 @@ "preinstall": "npx only-allow pnpm" }, "dependencies": { + "chalk": "4.1.2", + "chokidar": "4.0.3", + "commander": "13.1.0", "discord.js": "14.17.3", - "kolorist": "1.8.0" + "kolorist": "1.8.0", + "ora": "5.4.1", + "tsup": "8.3.6" }, "devDependencies": { "@eslint/js": "9.18.0", @@ -34,7 +42,6 @@ "jest": "29.7.0", "prettier": "3.4.2", "ts-jest": "29.2.5", - "tsup": "8.3.5", "typescript": "5.7.3", "typescript-eslint": "8.21.0" }, diff --git a/playground/package.json b/playground/package.json index aa92971..0213287 100644 --- a/playground/package.json +++ b/playground/package.json @@ -1,8 +1,11 @@ { - "name": "test", + "name": "playground", "version": "1.0.0", "main": "dist/index.js", "scripts": { + "start": "djs-core start", + "dev": "djs-core dev", + "build": "djs-core build", "preinstall": "npx only-allow pnpm" }, "dependencies": { @@ -10,9 +13,8 @@ "dotenv": "16.4.7" }, "devDependencies": { - "cross-env": "^7.0.3", - "ts-node": "^10.9.2", - "typescript": "^5.7.2", - "tsup": "8.3.5" + "cross-env": "7.0.3", + "javascript-obfuscator": "^4.1.1", + "typescript": "5.7.2" } } diff --git a/playground/pnpm-lock.yaml b/playground/pnpm-lock.yaml index 4636ec3..92add62 100644 --- a/playground/pnpm-lock.yaml +++ b/playground/pnpm-lock.yaml @@ -9,32 +9,22 @@ importers: dependencies: djs-core: specifier: file:../dist/ - version: file:../dist + version: file:../dist(typescript@5.7.2) dotenv: specifier: 16.4.7 version: 16.4.7 devDependencies: cross-env: - specifier: ^7.0.3 + specifier: 7.0.3 version: 7.0.3 - ts-node: - specifier: ^10.9.2 - version: 10.9.2(@types/node@22.10.5)(typescript@5.7.3) - tsup: - specifier: 8.3.5 - version: 8.3.5(typescript@5.7.3) + javascript-obfuscator: + specifier: ^4.1.1 + version: 4.1.1 typescript: - specifier: ^5.7.2 - version: 5.7.3 + specifier: 5.7.2 + version: 5.7.2 packages: - "@cspotcode/source-map-support@0.8.1": - resolution: - { - integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==, - } - engines: { node: ">=12" } - "@discordjs/builders@1.10.0": resolution: { @@ -316,6 +306,20 @@ packages: } engines: { node: ">=12" } + "@javascript-obfuscator/escodegen@2.3.0": + resolution: + { + integrity: sha512-QVXwMIKqYMl3KwtTirYIA6gOCiJ0ZDtptXqAv/8KWLG9uQU2fZqTVy7a/A5RvcoZhbDoFfveTxuGxJ5ibzQtkw==, + } + engines: { node: ">=6.0" } + + "@javascript-obfuscator/estraverse@5.4.0": + resolution: + { + integrity: sha512-CZFX7UZVN9VopGbjTx4UXaXsi9ewoM1buL0kY7j1ftYdSs7p2spv9opxFjHlQ/QGTgh4UqufYqJJ0WKLml7b6w==, + } + engines: { node: ">=4.0" } + "@jridgewell/gen-mapping@0.3.8": resolution: { @@ -349,12 +353,6 @@ packages: integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==, } - "@jridgewell/trace-mapping@0.3.9": - resolution: - { - integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==, - } - "@pkgjs/parseargs@0.11.0": resolution: { @@ -535,40 +533,28 @@ packages: } engines: { node: ">=v14.0.0", npm: ">=7.0.0" } - "@tsconfig/node10@1.0.11": - resolution: - { - integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==, - } - - "@tsconfig/node12@1.0.11": - resolution: - { - integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==, - } - - "@tsconfig/node14@1.0.3": + "@types/estree@1.0.6": resolution: { - integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==, + integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==, } - "@tsconfig/node16@1.0.4": + "@types/minimatch@3.0.5": resolution: { - integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==, + integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==, } - "@types/estree@1.0.6": + "@types/node@22.10.5": resolution: { - integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==, + integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==, } - "@types/node@22.10.5": + "@types/validator@13.12.2": resolution: { - integrity: sha512-F8Q+SeGimwOo86fiovQh8qiXfFEh2/ocYv7tU5pJ3EXMSSxk1Joj5wefpFK2fHTf/N6HKGSxIDBT9f3gCxXPkQ==, + integrity: sha512-6SlHBzUW8Jhf3liqrGGXyTJSIFe4nqlJ5A5KaMZ2l/vbM3Wh3KSybots/wfWVzNLK4D1NZluDlSQIbIEPx6oyA==, } "@types/ws@8.5.13": @@ -584,17 +570,10 @@ packages: } engines: { node: ">=v14.0.0", npm: ">=7.0.0" } - acorn-walk@8.3.4: + acorn@8.8.2: resolution: { - integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==, - } - engines: { node: ">=0.4.0" } - - acorn@8.14.0: - resolution: - { - integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==, + integrity: sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==, } engines: { node: ">=0.4.0" } hasBin: true @@ -633,11 +612,39 @@ packages: integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==, } - arg@4.1.3: + array-differ@3.0.0: resolution: { - integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==, + integrity: sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==, } + engines: { node: ">=8" } + + array-union@2.1.0: + resolution: + { + integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==, + } + engines: { node: ">=8" } + + arrify@2.0.1: + resolution: + { + integrity: sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==, + } + engines: { node: ">=8" } + + assert@2.0.0: + resolution: + { + integrity: sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==, + } + + available-typed-arrays@1.0.7: + resolution: + { + integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==, + } + engines: { node: ">= 0.4" } balanced-match@1.0.2: resolution: @@ -645,12 +652,24 @@ packages: integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==, } + brace-expansion@1.1.11: + resolution: + { + integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==, + } + brace-expansion@2.0.1: resolution: { integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==, } + buffer-from@1.1.2: + resolution: + { + integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==, + } + bundle-require@5.1.0: resolution: { @@ -667,6 +686,60 @@ packages: } engines: { node: ">=8" } + call-bind-apply-helpers@1.0.1: + resolution: + { + integrity: sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==, + } + engines: { node: ">= 0.4" } + + call-bind@1.0.8: + resolution: + { + integrity: sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==, + } + engines: { node: ">= 0.4" } + + call-bound@1.0.3: + resolution: + { + integrity: sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==, + } + engines: { node: ">= 0.4" } + + chalk@4.1.2: + resolution: + { + integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==, + } + engines: { node: ">=10" } + + chalk@5.4.1: + resolution: + { + integrity: sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==, + } + engines: { node: ^12.17.0 || ^14.13 || >=16.0.0 } + + chance@1.1.9: + resolution: + { + integrity: sha512-TfxnA/DcZXRTA4OekA2zL9GH8qscbbl6X0ZqU4tXhGveVY/mXWvEQLt5GwZcYXTEyEFflVtj+pG8nc8EwSm1RQ==, + } + + char-regex@1.0.2: + resolution: + { + integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==, + } + engines: { node: ">=10" } + + charenc@0.0.2: + resolution: + { + integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==, + } + chokidar@4.0.3: resolution: { @@ -674,6 +747,26 @@ packages: } engines: { node: ">= 14.16.0" } + class-validator@0.14.1: + resolution: + { + integrity: sha512-2VEG9JICxIqTpoK1eMzZqaV+u/EiwEJkMGzTrZf6sU/fwsnOITVgYJ8yojSy6CaXtO9V0Cc6ZQZ8h8m4UBuLwQ==, + } + + cli-cursor@5.0.0: + resolution: + { + integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==, + } + engines: { node: ">=18" } + + cli-spinners@2.9.2: + resolution: + { + integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==, + } + engines: { node: ">=6" } + color-convert@2.0.1: resolution: { @@ -687,6 +780,20 @@ packages: integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==, } + commander@10.0.0: + resolution: + { + integrity: sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA==, + } + engines: { node: ">=14" } + + commander@13.1.0: + resolution: + { + integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==, + } + engines: { node: ">=18" } + commander@4.1.1: resolution: { @@ -694,18 +801,18 @@ packages: } engines: { node: ">= 6" } - consola@3.3.3: + concat-map@0.0.1: resolution: { - integrity: sha512-Qil5KwghMzlqd51UXM0b6fyaGHtOC22scxrwrz4A2882LyUMwQjnvaedN1HAeXzphspQ6CpHkzMAWxBTUruDLg==, + integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==, } - engines: { node: ^14.18.0 || >=16.10.0 } - create-require@1.1.1: + consola@3.3.3: resolution: { - integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==, + integrity: sha512-Qil5KwghMzlqd51UXM0b6fyaGHtOC22scxrwrz4A2882LyUMwQjnvaedN1HAeXzphspQ6CpHkzMAWxBTUruDLg==, } + engines: { node: ^14.18.0 || >=16.10.0 } cross-env@7.0.3: resolution: @@ -722,6 +829,12 @@ packages: } engines: { node: ">= 8" } + crypt@0.0.2: + resolution: + { + integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==, + } + debug@4.4.0: resolution: { @@ -734,12 +847,25 @@ packages: supports-color: optional: true - diff@4.0.2: + deep-is@0.1.4: resolution: { - integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==, + integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==, } - engines: { node: ">=0.3.1" } + + define-data-property@1.1.4: + resolution: + { + integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==, + } + engines: { node: ">= 0.4" } + + define-properties@1.2.1: + resolution: + { + integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==, + } + engines: { node: ">= 0.4" } discord-api-types@0.37.115: resolution: @@ -757,6 +883,7 @@ packages: djs-core@file:../dist: resolution: { directory: ../dist, type: directory } engines: { node: ">=16.6.0" } + hasBin: true dotenv@16.4.7: resolution: @@ -765,12 +892,25 @@ packages: } engines: { node: ">=12" } + dunder-proto@1.0.1: + resolution: + { + integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==, + } + engines: { node: ">= 0.4" } + eastasianwidth@0.2.0: resolution: { integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==, } + emoji-regex@10.4.0: + resolution: + { + integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==, + } + emoji-regex@8.0.0: resolution: { @@ -783,6 +923,33 @@ packages: integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==, } + es-define-property@1.0.1: + resolution: + { + integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==, + } + engines: { node: ">= 0.4" } + + es-errors@1.3.0: + resolution: + { + integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==, + } + engines: { node: ">= 0.4" } + + es-object-atoms@1.1.1: + resolution: + { + integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==, + } + engines: { node: ">= 0.4" } + + es6-object-assign@1.1.0: + resolution: + { + integrity: sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==, + } + esbuild@0.24.2: resolution: { @@ -791,12 +958,61 @@ packages: engines: { node: ">=18" } hasBin: true + eslint-scope@7.1.1: + resolution: + { + integrity: sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==, + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + + eslint-visitor-keys@3.3.0: + resolution: + { + integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==, + } + engines: { node: ^12.22.0 || ^14.17.0 || >=16.0.0 } + + esprima@4.0.1: + resolution: + { + integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==, + } + engines: { node: ">=4" } + hasBin: true + + esrecurse@4.3.0: + resolution: + { + integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==, + } + engines: { node: ">=4.0" } + + estraverse@5.3.0: + resolution: + { + integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==, + } + engines: { node: ">=4.0" } + + esutils@2.0.3: + resolution: + { + integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==, + } + engines: { node: ">=0.10.0" } + fast-deep-equal@3.1.3: resolution: { integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==, } + fast-levenshtein@2.0.6: + resolution: + { + integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==, + } + fdir@6.4.2: resolution: { @@ -808,6 +1024,13 @@ packages: picomatch: optional: true + for-each@0.3.4: + resolution: + { + integrity: sha512-kKaIINnFpzW6ffJNDjjyjrk21BkDx38c0xa/klsT8VzLCaMEefv4ZTacrcVR4DmgTeBra++jMDAfS/tS799YDw==, + } + engines: { node: ">= 0.4" } + foreground-child@3.3.0: resolution: { @@ -823,6 +1046,33 @@ packages: engines: { node: ^8.16.0 || ^10.6.0 || >=11.0.0 } os: [darwin] + function-bind@1.1.2: + resolution: + { + integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==, + } + + get-east-asian-width@1.3.0: + resolution: + { + integrity: sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==, + } + engines: { node: ">=18" } + + get-intrinsic@1.2.7: + resolution: + { + integrity: sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==, + } + engines: { node: ">= 0.4" } + + get-proto@1.0.1: + resolution: + { + integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==, + } + engines: { node: ">= 0.4" } + glob@10.4.5: resolution: { @@ -830,6 +1080,79 @@ packages: } hasBin: true + gopd@1.2.0: + resolution: + { + integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==, + } + engines: { node: ">= 0.4" } + + has-flag@4.0.0: + resolution: + { + integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==, + } + engines: { node: ">=8" } + + has-property-descriptors@1.0.2: + resolution: + { + integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==, + } + + has-symbols@1.1.0: + resolution: + { + integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==, + } + engines: { node: ">= 0.4" } + + has-tostringtag@1.0.2: + resolution: + { + integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==, + } + engines: { node: ">= 0.4" } + + hasown@2.0.2: + resolution: + { + integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==, + } + engines: { node: ">= 0.4" } + + inherits@2.0.4: + resolution: + { + integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==, + } + + inversify@6.0.1: + resolution: + { + integrity: sha512-B3ex30927698TJENHR++8FfEaJGqoWOgI6ZY5Ht/nLUsFCwHn6akbwtnUAPCgUepAnTpe2qHxhDNjoKLyz6rgQ==, + } + + is-arguments@1.2.0: + resolution: + { + integrity: sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==, + } + engines: { node: ">= 0.4" } + + is-buffer@1.1.6: + resolution: + { + integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==, + } + + is-callable@1.2.7: + resolution: + { + integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==, + } + engines: { node: ">= 0.4" } + is-fullwidth-code-point@3.0.0: resolution: { @@ -837,6 +1160,55 @@ packages: } engines: { node: ">=8" } + is-generator-function@1.1.0: + resolution: + { + integrity: sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==, + } + engines: { node: ">= 0.4" } + + is-interactive@2.0.0: + resolution: + { + integrity: sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==, + } + engines: { node: ">=12" } + + is-nan@1.3.2: + resolution: + { + integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==, + } + engines: { node: ">= 0.4" } + + is-regex@1.2.1: + resolution: + { + integrity: sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==, + } + engines: { node: ">= 0.4" } + + is-typed-array@1.1.15: + resolution: + { + integrity: sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==, + } + engines: { node: ">= 0.4" } + + is-unicode-supported@1.3.0: + resolution: + { + integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==, + } + engines: { node: ">=12" } + + is-unicode-supported@2.1.0: + resolution: + { + integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==, + } + engines: { node: ">=18" } + isexe@2.0.0: resolution: { @@ -849,6 +1221,14 @@ packages: integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==, } + javascript-obfuscator@4.1.1: + resolution: + { + integrity: sha512-gt+KZpIIrrxXHEQGD8xZrL8mTRwRY0U76/xz/YX0gZdPrSqQhT/c7dYLASlLlecT3r+FxE7je/+C0oLnTDCx4A==, + } + engines: { node: ">=12.22.0" } + hasBin: true + joycon@3.1.1: resolution: { @@ -856,12 +1236,32 @@ packages: } engines: { node: ">=10" } + js-string-escape@1.0.1: + resolution: + { + integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==, + } + engines: { node: ">= 0.8" } + kolorist@1.8.0: resolution: { integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==, } + levn@0.3.0: + resolution: + { + integrity: sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==, + } + engines: { node: ">= 0.8.0" } + + libphonenumber-js@1.11.18: + resolution: + { + integrity: sha512-okMm/MCoFrm1vByeVFLBdkFIXLSHy/AIK2AEGgY3eoicfWZeOZqv3GfhtQgICkzs/tqorAMm3a4GBg5qNCrqzg==, + } + lilconfig@3.1.3: resolution: { @@ -900,6 +1300,13 @@ packages: integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==, } + log-symbols@6.0.0: + resolution: + { + integrity: sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==, + } + engines: { node: ">=18" } + lru-cache@10.4.3: resolution: { @@ -912,10 +1319,30 @@ packages: integrity: sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ==, } - make-error@1.3.6: + math-intrinsics@1.1.0: + resolution: + { + integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==, + } + engines: { node: ">= 0.4" } + + md5@2.3.0: resolution: { - integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==, + integrity: sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==, + } + + mimic-function@5.0.1: + resolution: + { + integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==, + } + engines: { node: ">=18" } + + minimatch@3.1.2: + resolution: + { + integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==, } minimatch@9.0.5: @@ -932,12 +1359,27 @@ packages: } engines: { node: ">=16 || 14 >=14.17" } + mkdirp@2.1.3: + resolution: + { + integrity: sha512-sjAkg21peAG9HS+Dkx7hlG9Ztx7HLeKnvB3NQRcu/mltCVmvkF0pisbiTSfDVYTT86XEfZrTUosLdZLStquZUw==, + } + engines: { node: ">=10" } + hasBin: true + ms@2.1.3: resolution: { integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==, } + multimatch@5.0.0: + resolution: + { + integrity: sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA==, + } + engines: { node: ">=10" } + mz@2.7.0: resolution: { @@ -951,6 +1393,48 @@ packages: } engines: { node: ">=0.10.0" } + object-is@1.1.6: + resolution: + { + integrity: sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==, + } + engines: { node: ">= 0.4" } + + object-keys@1.1.1: + resolution: + { + integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==, + } + engines: { node: ">= 0.4" } + + onetime@7.0.0: + resolution: + { + integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==, + } + engines: { node: ">=18" } + + opencollective-postinstall@2.0.3: + resolution: + { + integrity: sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==, + } + hasBin: true + + optionator@0.8.3: + resolution: + { + integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==, + } + engines: { node: ">= 0.8.0" } + + ora@8.1.1: + resolution: + { + integrity: sha512-YWielGi1XzG1UTvOaCFaNgEnuhZVMSHYkW/FQ7UX8O26PtlpdM84c0f7wLPlkvx2RfiQmnzd61d/MGxmpQeJPw==, + } + engines: { node: ">=18" } + package-json-from-dist@1.0.1: resolution: { @@ -989,7 +1473,14 @@ packages: { integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==, } - engines: { node: ">= 6" } + engines: { node: ">= 6" } + + possible-typed-array-names@1.0.0: + resolution: + { + integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==, + } + engines: { node: ">= 0.4" } postcss-load-config@6.0.1: resolution: @@ -1012,6 +1503,20 @@ packages: yaml: optional: true + prelude-ls@1.1.2: + resolution: + { + integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==, + } + engines: { node: ">= 0.8.0" } + + process@0.11.10: + resolution: + { + integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==, + } + engines: { node: ">= 0.6.0" } + punycode@2.3.1: resolution: { @@ -1026,6 +1531,12 @@ packages: } engines: { node: ">= 14.16.0" } + reflect-metadata@0.1.13: + resolution: + { + integrity: sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==, + } + resolve-from@5.0.0: resolution: { @@ -1033,6 +1544,13 @@ packages: } engines: { node: ">=8" } + restore-cursor@5.1.0: + resolution: + { + integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==, + } + engines: { node: ">=18" } + rollup@4.30.1: resolution: { @@ -1041,6 +1559,20 @@ packages: engines: { node: ">=18.0.0", npm: ">=8.0.0" } hasBin: true + safe-regex-test@1.1.0: + resolution: + { + integrity: sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==, + } + engines: { node: ">= 0.4" } + + set-function-length@1.2.2: + resolution: + { + integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==, + } + engines: { node: ">= 0.4" } + shebang-command@2.0.0: resolution: { @@ -1062,6 +1594,19 @@ packages: } engines: { node: ">=14" } + source-map-support@0.5.21: + resolution: + { + integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==, + } + + source-map@0.6.1: + resolution: + { + integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==, + } + engines: { node: ">=0.10.0" } + source-map@0.8.0-beta.0: resolution: { @@ -1069,6 +1614,19 @@ packages: } engines: { node: ">= 8" } + stdin-discarder@0.2.2: + resolution: + { + integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==, + } + engines: { node: ">=18" } + + string-template@1.0.0: + resolution: + { + integrity: sha512-SLqR3GBUXuoPP5MmYtD7ompvXiG87QjT6lzOszyXjTM86Uu7At7vNnt2xgyTLq5o9T4IxTYFyGxcULqpsmsfdg==, + } + string-width@4.2.3: resolution: { @@ -1083,6 +1641,19 @@ packages: } engines: { node: ">=12" } + string-width@7.2.0: + resolution: + { + integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==, + } + engines: { node: ">=18" } + + stringz@2.1.0: + resolution: + { + integrity: sha512-KlywLT+MZ+v0IRepfMxRtnSvDCMc3nR1qqCs3m/qIbSOWkNZYT8XHQA31rS3TnKp0c5xjZu3M4GY/2aRKSi/6A==, + } + strip-ansi@6.0.1: resolution: { @@ -1105,6 +1676,13 @@ packages: engines: { node: ">=16 || 14 >=14.17" } hasBin: true + supports-color@7.2.0: + resolution: + { + integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==, + } + engines: { node: ">=8" } + thenify-all@1.6.0: resolution: { @@ -1156,22 +1734,11 @@ packages: integrity: sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==, } - ts-node@10.9.2: + tslib@2.5.0: resolution: { - integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==, + integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==, } - hasBin: true - peerDependencies: - "@swc/core": ">=1.2.50" - "@swc/wasm": ">=1.2.50" - "@types/node": "*" - typescript: ">=2.7" - peerDependenciesMeta: - "@swc/core": - optional: true - "@swc/wasm": - optional: true tslib@2.8.1: resolution: @@ -1179,10 +1746,10 @@ packages: integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==, } - tsup@8.3.5: + tsup@8.3.6: resolution: { - integrity: sha512-Tunf6r6m6tnZsG9GYWndg0z8dEV7fD733VBFzFJ5Vcm1FtlXB8xBD/rtrBi2a3YKEV7hHtxiZtW5EAVADoe1pA==, + integrity: sha512-XkVtlDV/58S9Ye0JxUUTcrQk4S+EqlOHKzg6Roa62rdjL1nGWNUstG0xgI4vanHdfIpjP448J8vlN0oK6XOJ5g==, } engines: { node: ">=18" } hasBin: true @@ -1201,10 +1768,17 @@ packages: typescript: optional: true - typescript@5.7.3: + type-check@0.3.2: resolution: { - integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==, + integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==, + } + engines: { node: ">= 0.8.0" } + + typescript@5.7.2: + resolution: + { + integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==, } engines: { node: ">=14.17" } hasBin: true @@ -1222,11 +1796,18 @@ packages: } engines: { node: ">=18.17" } - v8-compile-cache-lib@3.0.1: + util@0.12.5: + resolution: + { + integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==, + } + + validator@13.12.0: resolution: { - integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==, + integrity: sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==, } + engines: { node: ">= 0.10" } webidl-conversions@4.0.2: resolution: @@ -1240,6 +1821,13 @@ packages: integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==, } + which-typed-array@1.1.18: + resolution: + { + integrity: sha512-qEcY+KJYlWyLH9vNbsr6/5j59AXk5ni5aakf8ldzBvGde6Iz4sxZGkJyWSAueTG7QhOvNRYb1lDdFmL5Td0QKA==, + } + engines: { node: ">= 0.4" } + which@2.0.2: resolution: { @@ -1248,6 +1836,13 @@ packages: engines: { node: ">= 8" } hasBin: true + word-wrap@1.2.5: + resolution: + { + integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==, + } + engines: { node: ">=0.10.0" } + wrap-ansi@7.0.0: resolution: { @@ -1277,18 +1872,7 @@ packages: utf-8-validate: optional: true - yn@3.1.1: - resolution: - { - integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==, - } - engines: { node: ">=6" } - snapshots: - "@cspotcode/source-map-support@0.8.1": - dependencies: - "@jridgewell/trace-mapping": 0.3.9 - "@discordjs/builders@1.10.0": dependencies: "@discordjs/formatters": 0.6.0 @@ -1420,6 +2004,17 @@ snapshots: wrap-ansi: 8.1.0 wrap-ansi-cjs: wrap-ansi@7.0.0 + "@javascript-obfuscator/escodegen@2.3.0": + dependencies: + "@javascript-obfuscator/estraverse": 5.4.0 + esprima: 4.0.1 + esutils: 2.0.3 + optionator: 0.8.3 + optionalDependencies: + source-map: 0.6.1 + + "@javascript-obfuscator/estraverse@5.4.0": {} + "@jridgewell/gen-mapping@0.3.8": dependencies: "@jridgewell/set-array": 1.2.1 @@ -1437,11 +2032,6 @@ snapshots: "@jridgewell/resolve-uri": 3.1.2 "@jridgewell/sourcemap-codec": 1.5.0 - "@jridgewell/trace-mapping@0.3.9": - dependencies: - "@jridgewell/resolve-uri": 3.1.2 - "@jridgewell/sourcemap-codec": 1.5.0 - "@pkgjs/parseargs@0.11.0": optional: true @@ -1511,31 +2101,23 @@ snapshots: "@sapphire/snowflake@3.5.3": {} - "@tsconfig/node10@1.0.11": {} - - "@tsconfig/node12@1.0.11": {} - - "@tsconfig/node14@1.0.3": {} - - "@tsconfig/node16@1.0.4": {} - "@types/estree@1.0.6": {} + "@types/minimatch@3.0.5": {} + "@types/node@22.10.5": dependencies: undici-types: 6.20.0 + "@types/validator@13.12.2": {} + "@types/ws@8.5.13": dependencies: "@types/node": 22.10.5 "@vladfrangu/async_event_emitter@2.4.6": {} - acorn-walk@8.3.4: - dependencies: - acorn: 8.14.0 - - acorn@8.14.0: {} + acorn@8.8.2: {} ansi-regex@5.0.1: {} @@ -1549,14 +2131,36 @@ snapshots: any-promise@1.3.0: {} - arg@4.1.3: {} + array-differ@3.0.0: {} + + array-union@2.1.0: {} + + arrify@2.0.1: {} + + assert@2.0.0: + dependencies: + es6-object-assign: 1.1.0 + is-nan: 1.3.2 + object-is: 1.1.6 + util: 0.12.5 + + available-typed-arrays@1.0.7: + dependencies: + possible-typed-array-names: 1.0.0 balanced-match@1.0.2: {} + brace-expansion@1.1.11: + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + brace-expansion@2.0.1: dependencies: balanced-match: 1.0.2 + buffer-from@1.1.2: {} + bundle-require@5.1.0(esbuild@0.24.2): dependencies: esbuild: 0.24.2 @@ -1564,21 +2168,67 @@ snapshots: cac@6.7.14: {} + call-bind-apply-helpers@1.0.1: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bind@1.0.8: + dependencies: + call-bind-apply-helpers: 1.0.1 + es-define-property: 1.0.1 + get-intrinsic: 1.2.7 + set-function-length: 1.2.2 + + call-bound@1.0.3: + dependencies: + call-bind-apply-helpers: 1.0.1 + get-intrinsic: 1.2.7 + + chalk@4.1.2: + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + + chalk@5.4.1: {} + + chance@1.1.9: {} + + char-regex@1.0.2: {} + + charenc@0.0.2: {} + chokidar@4.0.3: dependencies: readdirp: 4.0.2 + class-validator@0.14.1: + dependencies: + "@types/validator": 13.12.2 + libphonenumber-js: 1.11.18 + validator: 13.12.0 + + cli-cursor@5.0.0: + dependencies: + restore-cursor: 5.1.0 + + cli-spinners@2.9.2: {} + color-convert@2.0.1: dependencies: color-name: 1.1.4 color-name@1.1.4: {} + commander@10.0.0: {} + + commander@13.1.0: {} + commander@4.1.1: {} - consola@3.3.3: {} + concat-map@0.0.1: {} - create-require@1.1.1: {} + consola@3.3.3: {} cross-env@7.0.3: dependencies: @@ -1590,11 +2240,25 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 + crypt@0.0.2: {} + debug@4.4.0: dependencies: ms: 2.1.3 - diff@4.0.2: {} + deep-is@0.1.4: {} + + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.1 + es-errors: 1.3.0 + gopd: 1.2.0 + + define-properties@1.2.1: + dependencies: + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 + object-keys: 1.1.1 discord-api-types@0.37.115: {} @@ -1616,22 +2280,52 @@ snapshots: - bufferutil - utf-8-validate - djs-core@file:../dist: + djs-core@file:../dist(typescript@5.7.2): dependencies: + chalk: 5.4.1 + commander: 13.1.0 discord.js: 14.17.3 kolorist: 1.8.0 + ora: 8.1.1 + tsup: 8.3.6(typescript@5.7.2) transitivePeerDependencies: + - "@microsoft/api-extractor" + - "@swc/core" - bufferutil + - jiti + - postcss + - supports-color + - tsx + - typescript - utf-8-validate + - yaml dotenv@16.4.7: {} + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.1 + es-errors: 1.3.0 + gopd: 1.2.0 + eastasianwidth@0.2.0: {} + emoji-regex@10.4.0: {} + emoji-regex@8.0.0: {} emoji-regex@9.2.2: {} + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-object-atoms@1.1.1: + dependencies: + es-errors: 1.3.0 + + es6-object-assign@1.1.0: {} + esbuild@0.24.2: optionalDependencies: "@esbuild/aix-ppc64": 0.24.2 @@ -1660,12 +2354,35 @@ snapshots: "@esbuild/win32-ia32": 0.24.2 "@esbuild/win32-x64": 0.24.2 + eslint-scope@7.1.1: + dependencies: + esrecurse: 4.3.0 + estraverse: 5.3.0 + + eslint-visitor-keys@3.3.0: {} + + esprima@4.0.1: {} + + esrecurse@4.3.0: + dependencies: + estraverse: 5.3.0 + + estraverse@5.3.0: {} + + esutils@2.0.3: {} + fast-deep-equal@3.1.3: {} + fast-levenshtein@2.0.6: {} + fdir@6.4.2(picomatch@4.0.2): optionalDependencies: picomatch: 4.0.2 + for-each@0.3.4: + dependencies: + is-callable: 1.2.7 + foreground-child@3.3.0: dependencies: cross-spawn: 7.0.6 @@ -1674,6 +2391,28 @@ snapshots: fsevents@2.3.3: optional: true + function-bind@1.1.2: {} + + get-east-asian-width@1.3.0: {} + + get-intrinsic@1.2.7: + dependencies: + call-bind-apply-helpers: 1.0.1 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + math-intrinsics: 1.1.0 + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.1 + glob@10.4.5: dependencies: foreground-child: 3.3.0 @@ -1683,8 +2422,68 @@ snapshots: package-json-from-dist: 1.0.1 path-scurry: 1.11.1 + gopd@1.2.0: {} + + has-flag@4.0.0: {} + + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.1 + + has-symbols@1.1.0: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.1.0 + + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + + inherits@2.0.4: {} + + inversify@6.0.1: {} + + is-arguments@1.2.0: + dependencies: + call-bound: 1.0.3 + has-tostringtag: 1.0.2 + + is-buffer@1.1.6: {} + + is-callable@1.2.7: {} + is-fullwidth-code-point@3.0.0: {} + is-generator-function@1.1.0: + dependencies: + call-bound: 1.0.3 + get-proto: 1.0.1 + has-tostringtag: 1.0.2 + safe-regex-test: 1.1.0 + + is-interactive@2.0.0: {} + + is-nan@1.3.2: + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + + is-regex@1.2.1: + dependencies: + call-bound: 1.0.3 + gopd: 1.2.0 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + + is-typed-array@1.1.15: + dependencies: + which-typed-array: 1.1.18 + + is-unicode-supported@1.3.0: {} + + is-unicode-supported@2.1.0: {} + isexe@2.0.0: {} jackspeak@3.4.3: @@ -1693,10 +2492,45 @@ snapshots: optionalDependencies: "@pkgjs/parseargs": 0.11.0 + javascript-obfuscator@4.1.1: + dependencies: + "@javascript-obfuscator/escodegen": 2.3.0 + "@javascript-obfuscator/estraverse": 5.4.0 + acorn: 8.8.2 + assert: 2.0.0 + chalk: 4.1.2 + chance: 1.1.9 + class-validator: 0.14.1 + commander: 10.0.0 + eslint-scope: 7.1.1 + eslint-visitor-keys: 3.3.0 + fast-deep-equal: 3.1.3 + inversify: 6.0.1 + js-string-escape: 1.0.1 + md5: 2.3.0 + mkdirp: 2.1.3 + multimatch: 5.0.0 + opencollective-postinstall: 2.0.3 + process: 0.11.10 + reflect-metadata: 0.1.13 + source-map-support: 0.5.21 + string-template: 1.0.0 + stringz: 2.1.0 + tslib: 2.5.0 + joycon@3.1.1: {} + js-string-escape@1.0.1: {} + kolorist@1.8.0: {} + levn@0.3.0: + dependencies: + prelude-ls: 1.1.2 + type-check: 0.3.2 + + libphonenumber-js@1.11.18: {} + lilconfig@3.1.3: {} lines-and-columns@1.2.4: {} @@ -1709,11 +2543,28 @@ snapshots: lodash@4.17.21: {} + log-symbols@6.0.0: + dependencies: + chalk: 5.4.1 + is-unicode-supported: 1.3.0 + lru-cache@10.4.3: {} magic-bytes.js@1.10.0: {} - make-error@1.3.6: {} + math-intrinsics@1.1.0: {} + + md5@2.3.0: + dependencies: + charenc: 0.0.2 + crypt: 0.0.2 + is-buffer: 1.1.6 + + mimic-function@5.0.1: {} + + minimatch@3.1.2: + dependencies: + brace-expansion: 1.1.11 minimatch@9.0.5: dependencies: @@ -1721,8 +2572,18 @@ snapshots: minipass@7.1.2: {} + mkdirp@2.1.3: {} + ms@2.1.3: {} + multimatch@5.0.0: + dependencies: + "@types/minimatch": 3.0.5 + array-differ: 3.0.0 + array-union: 2.1.0 + arrify: 2.0.1 + minimatch: 3.1.2 + mz@2.7.0: dependencies: any-promise: 1.3.0 @@ -1731,6 +2592,40 @@ snapshots: object-assign@4.1.1: {} + object-is@1.1.6: + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + + object-keys@1.1.1: {} + + onetime@7.0.0: + dependencies: + mimic-function: 5.0.1 + + opencollective-postinstall@2.0.3: {} + + optionator@0.8.3: + dependencies: + deep-is: 0.1.4 + fast-levenshtein: 2.0.6 + levn: 0.3.0 + prelude-ls: 1.1.2 + type-check: 0.3.2 + word-wrap: 1.2.5 + + ora@8.1.1: + dependencies: + chalk: 5.4.1 + cli-cursor: 5.0.0 + cli-spinners: 2.9.2 + is-interactive: 2.0.0 + is-unicode-supported: 2.1.0 + log-symbols: 6.0.0 + stdin-discarder: 0.2.2 + string-width: 7.2.0 + strip-ansi: 7.1.0 + package-json-from-dist@1.0.1: {} path-key@3.1.1: {} @@ -1746,16 +2641,29 @@ snapshots: pirates@4.0.6: {} + possible-typed-array-names@1.0.0: {} + postcss-load-config@6.0.1: dependencies: lilconfig: 3.1.3 + prelude-ls@1.1.2: {} + + process@0.11.10: {} + punycode@2.3.1: {} readdirp@4.0.2: {} + reflect-metadata@0.1.13: {} + resolve-from@5.0.0: {} + restore-cursor@5.1.0: + dependencies: + onetime: 7.0.0 + signal-exit: 4.1.0 + rollup@4.30.1: dependencies: "@types/estree": 1.0.6 @@ -1781,6 +2689,21 @@ snapshots: "@rollup/rollup-win32-x64-msvc": 4.30.1 fsevents: 2.3.3 + safe-regex-test@1.1.0: + dependencies: + call-bound: 1.0.3 + es-errors: 1.3.0 + is-regex: 1.2.1 + + set-function-length@1.2.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.7 + gopd: 1.2.0 + has-property-descriptors: 1.0.2 + shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 @@ -1789,10 +2712,21 @@ snapshots: signal-exit@4.1.0: {} + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + + source-map@0.6.1: {} + source-map@0.8.0-beta.0: dependencies: whatwg-url: 7.1.0 + stdin-discarder@0.2.2: {} + + string-template@1.0.0: {} + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 @@ -1805,6 +2739,16 @@ snapshots: emoji-regex: 9.2.2 strip-ansi: 7.1.0 + string-width@7.2.0: + dependencies: + emoji-regex: 10.4.0 + get-east-asian-width: 1.3.0 + strip-ansi: 7.1.0 + + stringz@2.1.0: + dependencies: + char-regex: 1.0.2 + strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 @@ -1823,6 +2767,10 @@ snapshots: pirates: 4.0.6 ts-interface-checker: 0.1.13 + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 + thenify-all@1.6.0: dependencies: thenify: 3.3.1 @@ -1848,27 +2796,11 @@ snapshots: ts-mixer@6.0.4: {} - ts-node@10.9.2(@types/node@22.10.5)(typescript@5.7.3): - dependencies: - "@cspotcode/source-map-support": 0.8.1 - "@tsconfig/node10": 1.0.11 - "@tsconfig/node12": 1.0.11 - "@tsconfig/node14": 1.0.3 - "@tsconfig/node16": 1.0.4 - "@types/node": 22.10.5 - acorn: 8.14.0 - acorn-walk: 8.3.4 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.7.3 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 + tslib@2.5.0: {} tslib@2.8.1: {} - tsup@8.3.5(typescript@5.7.3): + tsup@8.3.6(typescript@5.7.2): dependencies: bundle-require: 5.1.0(esbuild@0.24.2) cac: 6.7.14 @@ -1887,20 +2819,32 @@ snapshots: tinyglobby: 0.2.10 tree-kill: 1.2.2 optionalDependencies: - typescript: 5.7.3 + typescript: 5.7.2 transitivePeerDependencies: - jiti - supports-color - tsx - yaml - typescript@5.7.3: {} + type-check@0.3.2: + dependencies: + prelude-ls: 1.1.2 + + typescript@5.7.2: {} undici-types@6.20.0: {} undici@6.19.8: {} - v8-compile-cache-lib@3.0.1: {} + util@0.12.5: + dependencies: + inherits: 2.0.4 + is-arguments: 1.2.0 + is-generator-function: 1.1.0 + is-typed-array: 1.1.15 + which-typed-array: 1.1.18 + + validator@13.12.0: {} webidl-conversions@4.0.2: {} @@ -1910,10 +2854,21 @@ snapshots: tr46: 1.0.1 webidl-conversions: 4.0.2 + which-typed-array@1.1.18: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.8 + call-bound: 1.0.3 + for-each: 0.3.4 + gopd: 1.2.0 + has-tostringtag: 1.0.2 + which@2.0.2: dependencies: isexe: 2.0.0 + word-wrap@1.2.5: {} + wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0 @@ -1927,5 +2882,3 @@ snapshots: strip-ansi: 7.1.0 ws@8.18.0: {} - - yn@3.1.1: {} diff --git a/playground/tsup.config.ts b/playground/tsup.config.ts deleted file mode 100644 index 550ae19..0000000 --- a/playground/tsup.config.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { defineConfig } from "tsup"; - -export default defineConfig({ - format: ["cjs"], - entry: ["src/**/*.ts"], - outDir: "dist", - splitting: false, - onSuccess: - process.platform === "win32" - ? "copy src/.env dist/.env && cd dist && node index.js" - : "cp src/.env dist/.env && cd dist && node index.js", - silent: true, - clean: true, - skipNodeModulesBundle: true, -}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1287d9c..917ce9b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,12 +7,27 @@ settings: importers: .: dependencies: + chalk: + specifier: 4.1.2 + version: 4.1.2 + chokidar: + specifier: 4.0.3 + version: 4.0.3 + commander: + specifier: 13.1.0 + version: 13.1.0 discord.js: specifier: 14.17.3 version: 14.17.3 kolorist: specifier: 1.8.0 version: 1.8.0 + ora: + specifier: 5.4.1 + version: 5.4.1 + tsup: + specifier: 8.3.6 + version: 8.3.6(typescript@5.7.3) devDependencies: "@eslint/js": specifier: 9.18.0 @@ -38,9 +53,6 @@ importers: ts-jest: specifier: 29.2.5 version: 29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(esbuild@0.24.2)(jest@29.7.0(@types/node@22.10.10)(ts-node@10.9.2(@types/node@22.10.10)(typescript@5.7.3)))(typescript@5.7.3) - tsup: - specifier: 8.3.5 - version: 8.3.5(typescript@5.7.3) typescript: specifier: 5.7.3 version: 5.7.3 @@ -1426,6 +1438,18 @@ packages: integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==, } + base64-js@1.5.1: + resolution: + { + integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==, + } + + bl@4.1.0: + resolution: + { + integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==, + } + brace-expansion@1.1.11: resolution: { @@ -1472,6 +1496,12 @@ packages: integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==, } + buffer@5.7.1: + resolution: + { + integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==, + } + bundle-require@5.1.0: resolution: { @@ -1549,6 +1579,20 @@ packages: integrity: sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==, } + cli-cursor@3.1.0: + resolution: + { + integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==, + } + engines: { node: ">=8" } + + cli-spinners@2.9.2: + resolution: + { + integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==, + } + engines: { node: ">=6" } + cliui@8.0.1: resolution: { @@ -1556,6 +1600,13 @@ packages: } engines: { node: ">=12" } + clone@1.0.4: + resolution: + { + integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==, + } + engines: { node: ">=0.8" } + co@4.6.0: resolution: { @@ -1582,6 +1633,13 @@ packages: integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==, } + commander@13.1.0: + resolution: + { + integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==, + } + engines: { node: ">=18" } + commander@4.1.1: resolution: { @@ -1665,6 +1723,12 @@ packages: } engines: { node: ">=0.10.0" } + defaults@1.0.4: + resolution: + { + integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==, + } + detect-newline@3.1.0: resolution: { @@ -2118,6 +2182,12 @@ packages: } engines: { node: ">=10.17.0" } + ieee754@1.2.1: + resolution: + { + integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==, + } + ignore@5.3.2: resolution: { @@ -2201,6 +2271,13 @@ packages: } engines: { node: ">=0.10.0" } + is-interactive@1.0.0: + resolution: + { + integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==, + } + engines: { node: ">=8" } + is-number@7.0.0: resolution: { @@ -2215,6 +2292,13 @@ packages: } engines: { node: ">=8" } + is-unicode-supported@0.1.0: + resolution: + { + integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==, + } + engines: { node: ">=10" } + isexe@2.0.0: resolution: { @@ -2648,6 +2732,13 @@ packages: integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==, } + log-symbols@4.1.0: + resolution: + { + integrity: sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==, + } + engines: { node: ">=10" } + lru-cache@10.4.3: resolution: { @@ -2810,6 +2901,13 @@ packages: } engines: { node: ">= 0.8.0" } + ora@5.4.1: + resolution: + { + integrity: sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==, + } + engines: { node: ">=10" } + p-limit@2.3.0: resolution: { @@ -3008,6 +3106,13 @@ packages: integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==, } + readable-stream@3.6.2: + resolution: + { + integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==, + } + engines: { node: ">= 6" } + readdirp@4.1.1: resolution: { @@ -3058,6 +3163,13 @@ packages: engines: { node: ">= 0.4" } hasBin: true + restore-cursor@3.1.0: + resolution: + { + integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==, + } + engines: { node: ">=8" } + reusify@1.0.4: resolution: { @@ -3079,6 +3191,12 @@ packages: integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==, } + safe-buffer@5.2.1: + resolution: + { + integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==, + } + semver@6.3.1: resolution: { @@ -3188,6 +3306,12 @@ packages: } engines: { node: ">=12" } + string_decoder@1.3.0: + resolution: + { + integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==, + } + strip-ansi@6.0.1: resolution: { @@ -3382,10 +3506,10 @@ packages: integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==, } - tsup@8.3.5: + tsup@8.3.6: resolution: { - integrity: sha512-Tunf6r6m6tnZsG9GYWndg0z8dEV7fD733VBFzFJ5Vcm1FtlXB8xBD/rtrBi2a3YKEV7hHtxiZtW5EAVADoe1pA==, + integrity: sha512-XkVtlDV/58S9Ye0JxUUTcrQk4S+EqlOHKzg6Roa62rdjL1nGWNUstG0xgI4vanHdfIpjP448J8vlN0oK6XOJ5g==, } engines: { node: ">=18" } hasBin: true @@ -3471,6 +3595,12 @@ packages: integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==, } + util-deprecate@1.0.2: + resolution: + { + integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==, + } + v8-compile-cache-lib@3.0.1: resolution: { @@ -3490,6 +3620,12 @@ packages: integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==, } + wcwidth@1.0.1: + resolution: + { + integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==, + } + webidl-conversions@4.0.2: resolution: { @@ -4525,6 +4661,14 @@ snapshots: balanced-match@1.0.2: {} + base64-js@1.5.1: {} + + bl@4.1.0: + dependencies: + buffer: 5.7.1 + inherits: 2.0.4 + readable-stream: 3.6.2 + brace-expansion@1.1.11: dependencies: balanced-match: 1.0.2 @@ -4555,6 +4699,11 @@ snapshots: buffer-from@1.1.2: {} + buffer@5.7.1: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + bundle-require@5.1.0(esbuild@0.24.2): dependencies: esbuild: 0.24.2 @@ -4585,12 +4734,20 @@ snapshots: cjs-module-lexer@1.4.1: {} + cli-cursor@3.1.0: + dependencies: + restore-cursor: 3.1.0 + + cli-spinners@2.9.2: {} + cliui@8.0.1: dependencies: string-width: 4.2.3 strip-ansi: 6.0.1 wrap-ansi: 7.0.0 + clone@1.0.4: {} + co@4.6.0: {} collect-v8-coverage@1.0.2: {} @@ -4601,6 +4758,8 @@ snapshots: color-name@1.1.4: {} + commander@13.1.0: {} + commander@4.1.1: {} concat-map@0.0.1: {} @@ -4643,6 +4802,10 @@ snapshots: deepmerge@4.3.1: {} + defaults@1.0.4: + dependencies: + clone: 1.0.4 + detect-newline@3.1.0: {} diff-sequences@29.6.3: {} @@ -4937,6 +5100,8 @@ snapshots: human-signals@2.1.0: {} + ieee754@1.2.1: {} + ignore@5.3.2: {} import-fresh@3.3.0: @@ -4974,10 +5139,14 @@ snapshots: dependencies: is-extglob: 2.1.1 + is-interactive@1.0.0: {} + is-number@7.0.0: {} is-stream@2.0.1: {} + is-unicode-supported@0.1.0: {} + isexe@2.0.0: {} istanbul-lib-coverage@3.2.2: {} @@ -5407,6 +5576,11 @@ snapshots: lodash@4.17.21: {} + log-symbols@4.1.0: + dependencies: + chalk: 4.1.2 + is-unicode-supported: 0.1.0 + lru-cache@10.4.3: {} lru-cache@5.1.1: @@ -5489,6 +5663,18 @@ snapshots: type-check: 0.4.0 word-wrap: 1.2.5 + ora@5.4.1: + dependencies: + bl: 4.1.0 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-spinners: 2.9.2 + is-interactive: 1.0.0 + is-unicode-supported: 0.1.0 + log-symbols: 4.1.0 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + p-limit@2.3.0: dependencies: p-try: 2.2.0 @@ -5572,6 +5758,12 @@ snapshots: react-is@18.3.1: {} + readable-stream@3.6.2: + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + readdirp@4.1.1: {} require-directory@2.1.1: {} @@ -5592,6 +5784,11 @@ snapshots: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 + restore-cursor@3.1.0: + dependencies: + onetime: 5.1.2 + signal-exit: 3.0.7 + reusify@1.0.4: {} rollup@4.31.0: @@ -5623,6 +5820,8 @@ snapshots: dependencies: queue-microtask: 1.2.3 + safe-buffer@5.2.1: {} + semver@6.3.1: {} semver@7.6.3: {} @@ -5675,6 +5874,10 @@ snapshots: emoji-regex: 9.2.2 strip-ansi: 7.1.0 + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 @@ -5791,7 +5994,7 @@ snapshots: tslib@2.8.1: {} - tsup@8.3.5(typescript@5.7.3): + tsup@8.3.6(typescript@5.7.3): dependencies: bundle-require: 5.1.0(esbuild@0.24.2) cac: 6.7.14 @@ -5851,6 +6054,8 @@ snapshots: dependencies: punycode: 2.3.1 + util-deprecate@1.0.2: {} + v8-compile-cache-lib@3.0.1: optional: true @@ -5864,6 +6069,10 @@ snapshots: dependencies: makeerror: 1.0.12 + wcwidth@1.0.1: + dependencies: + defaults: 1.0.4 + webidl-conversions@4.0.2: {} whatwg-url@7.1.0: diff --git a/src/index.ts b/src/index.ts index 9eb02a3..79678e8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,6 +12,14 @@ import SubCommandGroup from "./class/interactions/SubCommandGroup"; import Button from "./class/interactions/Button"; import SelectMenu from "./class/interactions/SelectMenu"; import Modal from "./class/interactions/Modal"; +import { program } from "commander"; +import { build } from "tsup"; +import { execSync, spawn } from "child_process"; +import fs from "fs"; +import path from "path"; +import chalk from "chalk"; +import ora from "ora"; +import chokidar from "chokidar"; export { BotClient, @@ -23,3 +31,236 @@ export { Modal, }; export type { Config }; + +if (require.main === module) { + program + .version("1.0.0") + .description("djs-core CLI") + .usage(" [options]"); + + program + .command("init") + .description("Initialize a new project") + .action(() => { + console.log(chalk.yellow.bold("🚧 This feature is coming soon!")); + }); + + program + .command("start") + .description("Start the bot (not recommended for production)") + .action(async () => { + await build({ + entry: ["src/**/*.ts"], + outDir: "dist", + clean: true, + skipNodeModulesBundle: true, + format: ["cjs"], + silent: true, + }); + fs.copyFileSync("src/.env", "dist/.env"); + try { + execSync("node index.js", { + stdio: "inherit", + cwd: path.join(process.cwd(), "dist"), + }); + } catch { + // Do nothing + } + }); + + program + .command("dev") + .description("Start the bot in development mode with file watcher") + .action(async () => { + fs.copyFileSync("src/.env", "dist/.env"); + const spinner = ora(); + spinner.start(chalk.blue.bold("🚀 Starting development bot...")); + await build({ + entry: ["src/**/*.ts"], + outDir: "dist", + clean: true, + skipNodeModulesBundle: true, + format: ["cjs"], + silent: true, + }); + spinner.succeed(chalk.green.bold("Build done!")); + + //start node index + + let bot = spawn("node", ["index.js"], { + stdio: "inherit", + cwd: path.join(process.cwd(), "dist"), + }); + + const watcher = chokidar.watch("src", { + ignored: (path) => + path.includes("node_modules") || path.endsWith(".js"), + cwd: process.cwd(), + persistent: true, + ignoreInitial: true, + }); + + watcher.on("ready", () => { + console.log(chalk.blue.bold("🚀 Watching for file changes...\n\n")); + }); + + watcher.on("change", async (filePath) => { + bot.kill(); + console.log( + chalk.green(`File ${filePath} has been changed. Rebuilding...`), + ); + + await build({ + entry: [filePath.replaceAll("\\", "/")], + outDir: path.join("dist", path.dirname(filePath).replace("src", "")), + clean: false, + format: ["cjs"], + silent: true, + }); + + bot = spawn("node", ["index.js"], { + stdio: "inherit", + cwd: path.join(process.cwd(), "dist"), + }); + }); + }); + + program + .command("build") + .description("Build the project") + .option("-o, --obfuscate", "Obfuscate the code") + .action(async (options) => { + if (options.obfuscate === true) { + console.log(chalk.yellow.bold("⚠️ Obfuscation is experimental!")); + console.log( + chalk.yellow.bold( + "⚠️ This can slow down the bot and bundle size is bigger. Use this function only if you know what you are doing!", + ), + ); + } + const spinner = ora(); + console.log(chalk.blue.bold("🚀 Starting build process...\n")); + await build({ + entry: ["src/**/*.ts"], + outDir: "dist", + clean: true, + minify: true, + skipNodeModulesBundle: true, + format: ["cjs"], + silent: true, + }); + + fs.copyFileSync("src/.env", "dist/.env"); + const pkg = JSON.parse(fs.readFileSync("package.json", "utf-8")); + delete pkg.devDependencies; + pkg.main = "index.js"; + pkg.credit = "Developed and built with djs-core"; + pkg.scripts = { + start: "node index.js", + }; + fs.writeFileSync("dist/package.json", JSON.stringify(pkg, null, 2)); + + spinner.succeed(chalk.green.bold("✅ Build done!")); + if (options.obfuscate === true) { + spinner.start("⚙️ Obfuscating..."); + if (detectPackageManager() === null) { + console.error( + chalk.red.bold( + "❌ No package manager found. Please install pnpm or npm.", + ), + ); + process.exit(1); + } + + if (!fs.existsSync("node_modules/javascript-obfuscator")) { + execSync( + `${detectPackageManager()} install javascript-obfuscator --save-dev`, + { + stdio: "ignore", + }, + ); + } + + // eslint-disable-next-line @typescript-eslint/no-require-imports + const obfuscator = require( + path.join(process.cwd(), "node_modules/javascript-obfuscator"), + ); + + const files = getBuild("dist"); + + for (const file of files) { + if (file.endsWith(".js")) { + //if file in /commands/* but not in /commmands/**/*.js + const rex = [ + /^dist[\\/]+interactions[\\/]+commands[\\/]+[a-z]+[\\/]+[a-z]+\.js$/gm, + /^dist[\\/]+interactions[\\/]+buttons[\\/]+.*\.js$/gm, + /^dist[\\/]+interactions[\\/]+modals[\\/]+.*\.js$/gm, + /^dist[\\/]+interactions[\\/]+selects[\\/]+.*\.js$/gm, + ]; + + const code = fs.readFileSync(file, "utf-8"); + const obfuscated = obfuscator.obfuscate(code, { + target: "node", + compact: true, + controlFlowFlattening: true, + stringArray: true, + stringArrayThreshold: 1, + stringArrayEncoding: ["rc4"], + }); + + fs.writeFileSync(file, obfuscated.getObfuscatedCode()); + + if (rex.some((r) => r.test(file))) { + const rdmName = Math.random().toString(36).substring(7); + const newFile = file.replace( + path.basename(file), + `${rdmName}.js`, + ); + fs.renameSync(file, newFile); + } + } + } + + spinner.succeed(chalk.green.bold(`✅ Obfuscation done!\n`)); + } + console.log( + chalk.blue.bold( + `🎉 You can now run your bot with ${chalk.yellow( + "node dist/index.js", + )} or deploy it to a server.\n`, + ), + ); + console.log(chalk.blue.bold("🚀 Auto-deploy feature coming soon!")); + }); + program.parse(process.argv); +} + +function detectPackageManager() { + const managers = ["pnpm", "npm"]; + for (const manager of managers) { + try { + execSync(`${manager} -v`, { stdio: "ignore" }); + + return manager; + } catch { + continue; + } + } + return null; +} + +function getBuild(dir: string): Array { + const files: Array = []; + const reader = (dir: string) => { + fs.readdirSync(dir).forEach((file) => { + const filePath = path.join(dir, file); + if (fs.statSync(filePath).isDirectory()) { + reader(filePath); + } else { + files.push(filePath); + } + }); + }; + reader(dir); + return files; +} diff --git a/tsup-dev.config.ts b/tsup-dev.config.ts index e905ff2..3277321 100644 --- a/tsup-dev.config.ts +++ b/tsup-dev.config.ts @@ -4,7 +4,7 @@ export default defineConfig({ format: ["cjs"], entryPoints: ["src/index.ts"], outDir: "dist", - onSuccess: "cd playground && tsup", + onSuccess: "cd playground && pnpm run dev", dts: true, skipNodeModulesBundle: true, clean: true,