diff --git a/.husky/pre-commit b/.husky/pre-commit index d0a7784..0723b5b 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1 @@ -npx lint-staged \ No newline at end of file +npx biome check --write diff --git a/biome.json b/biome.json index 6b405c8..ef954dd 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", + "$schema": "https://biomejs.dev/schemas/2.0.0/schema.json", "vcs": { "enabled": true, "clientKind": "git", @@ -8,7 +8,16 @@ }, "files": { "ignoreUnknown": true, - "ignore": ["node_modules/", "build", "lib", "__test__", "package.json", "tsconfig.json", ".vscode"] + "includes": [ + "**/src/**", + "!/node_modules/", + "!/build", + "!/lib", + "!/__test__", + "!/package.json", + "!/tsconfig.json", + "!/.vscode" + ] }, "formatter": { "enabled": true, @@ -18,14 +27,17 @@ "lineEnding": "crlf", "formatWithErrors": true }, - "organizeImports": { - "enabled": true + "assist": { + "actions": { + "source": { + "organizeImports": "on" + } + } }, "linter": { "enabled": true, "rules": { "recommended": false, - "all": true, "security": { "noGlobalEval": "off" }, @@ -41,9 +53,7 @@ }, "correctness": { "noNodejsModules": "off", - "useImportExtensions": "off", - "noUnusedFunctionParameters": "off", - "noUnusedVariables": "off" + "useImportExtensions": "off" }, "style": { "noDefaultExport": "off", @@ -56,8 +66,7 @@ "noParameterAssign": "off", "useFilenamingConvention": "off", "useEnumInitializers": "off", - "useExplicitLengthCheck": "off", - "noNamespaceImport": "off" + "useExplicitLengthCheck": "off" }, "complexity": { "noForEach": "off", @@ -69,7 +78,8 @@ "noBarrelFile": "off", "noDelete": "off", "noReExportAll": "off", - "useTopLevelRegex": "off" + "useTopLevelRegex": "off", + "noNamespaceImport": "off" } } }, diff --git a/package.json b/package.json index 9c54616..9b740f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "seyfert", - "version": "3.2.0", + "version": "3.2.1", "description": "The most advanced framework for discord bots", "main": "./lib/index.js", "module": "./lib/index.js", @@ -21,15 +21,14 @@ "author": "MARCROCK22", "license": "MIT", "devDependencies": { - "@biomejs/biome": "1.9.4", + "@biomejs/biome": "2.0.0", "@changesets/cli": "^2.29.4", "@commitlint/cli": "^19.8.1", "@commitlint/config-conventional": "^19.8.1", - "@types/node": "^24.0.1", + "@types/node": "^24.0.3", "husky": "^9.1.7", - "lint-staged": "^15.5.1", "typescript": "^5.8.3", - "vitest": "^3.2.3" + "vitest": "^3.2.4" }, "homepage": "https://seyfert.dev", "repository": { @@ -65,15 +64,10 @@ "url": "https://github.com/Drylozu" } ], - "lint-staged": { - "*.ts": [ - "biome check --write" - ] - }, "pnpm": { "onlyBuiltDependencies": [ "@biomejs/biome", "esbuild" ] } -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0333616..dcdb522 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,32 +9,29 @@ importers: .: devDependencies: '@biomejs/biome': - specifier: 1.9.4 - version: 1.9.4 + specifier: 2.0.0 + version: 2.0.0 '@changesets/cli': specifier: ^2.29.4 version: 2.29.4 '@commitlint/cli': specifier: ^19.8.1 - version: 19.8.1(@types/node@24.0.1)(typescript@5.8.3) + version: 19.8.1(@types/node@24.0.3)(typescript@5.8.3) '@commitlint/config-conventional': specifier: ^19.8.1 version: 19.8.1 '@types/node': - specifier: ^24.0.1 - version: 24.0.1 + specifier: ^24.0.3 + version: 24.0.3 husky: specifier: ^9.1.7 version: 9.1.7 - lint-staged: - specifier: ^15.5.1 - version: 15.5.1 typescript: specifier: ^5.8.3 version: 5.8.3 vitest: - specifier: ^3.2.3 - version: 3.2.3(@types/node@24.0.1)(jiti@2.4.2)(yaml@2.8.0) + specifier: ^3.2.4 + version: 3.2.4(@types/node@24.0.3)(jiti@2.4.2)(yaml@2.8.0) packages: @@ -50,55 +47,55 @@ packages: resolution: {integrity: sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==} engines: {node: '>=6.9.0'} - '@biomejs/biome@1.9.4': - resolution: {integrity: sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==} + '@biomejs/biome@2.0.0': + resolution: {integrity: sha512-BlUoXEOI/UQTDEj/pVfnkMo8SrZw3oOWBDrXYFT43V7HTkIUDkBRY53IC5Jx1QkZbaB+0ai1wJIfYwp9+qaJTQ==} engines: {node: '>=14.21.3'} hasBin: true - '@biomejs/cli-darwin-arm64@1.9.4': - resolution: {integrity: sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==} + '@biomejs/cli-darwin-arm64@2.0.0': + resolution: {integrity: sha512-QvqWYtFFhhxdf8jMAdJzXW+Frc7X8XsnHQLY+TBM1fnT1TfeV/v9vsFI5L2J7GH6qN1+QEEJ19jHibCY2Ypplw==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [darwin] - '@biomejs/cli-darwin-x64@1.9.4': - resolution: {integrity: sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==} + '@biomejs/cli-darwin-x64@2.0.0': + resolution: {integrity: sha512-5JFhls1EfmuIH4QGFPlNpxJQFC6ic3X1ltcoLN+eSRRIPr6H/lUS1ttuD0Fj7rPgPhZqopK/jfH8UVj/1hIsQw==} engines: {node: '>=14.21.3'} cpu: [x64] os: [darwin] - '@biomejs/cli-linux-arm64-musl@1.9.4': - resolution: {integrity: sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==} + '@biomejs/cli-linux-arm64-musl@2.0.0': + resolution: {integrity: sha512-Bxsz8ki8+b3PytMnS5SgrGV+mbAWwIxI3ydChb/d1rURlJTMdxTTq5LTebUnlsUWAX6OvJuFeiVq9Gjn1YbCyA==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-arm64@1.9.4': - resolution: {integrity: sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==} + '@biomejs/cli-linux-arm64@2.0.0': + resolution: {integrity: sha512-BAH4QVi06TzAbVchXdJPsL0Z/P87jOfes15rI+p3EX9/EGTfIjaQ9lBVlHunxcmoptaA5y1Hdb9UYojIhmnjIw==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-x64-musl@1.9.4': - resolution: {integrity: sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==} + '@biomejs/cli-linux-x64-musl@2.0.0': + resolution: {integrity: sha512-tiQ0ABxMJb9I6GlfNp0ulrTiQSFacJRJO8245FFwE3ty3bfsfxlU/miblzDIi+qNrgGsLq5wIZcVYGp4c+HXZA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-linux-x64@1.9.4': - resolution: {integrity: sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==} + '@biomejs/cli-linux-x64@2.0.0': + resolution: {integrity: sha512-09PcOGYTtkopWRm6mZ/B6Mr6UHdkniUgIG/jLBv+2J8Z61ezRE+xQmpi3yNgUrFIAU4lPA9atg7mhvE/5Bo7Wg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-win32-arm64@1.9.4': - resolution: {integrity: sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==} + '@biomejs/cli-win32-arm64@2.0.0': + resolution: {integrity: sha512-vrTtuGu91xNTEQ5ZcMJBZuDlqr32DWU1r14UfePIGndF//s2WUAmer4FmgoPgruo76rprk37e8S2A2c0psXdxw==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [win32] - '@biomejs/cli-win32-x64@1.9.4': - resolution: {integrity: sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==} + '@biomejs/cli-win32-x64@2.0.0': + resolution: {integrity: sha512-2USVQ0hklNsph/KIR72ZdeptyXNnQ3JdzPn3NbjI4Sna34CnxeiYAaZcZzXPDl5PYNFBivV4xmvT3Z3rTmyDBg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [win32] @@ -516,14 +513,14 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@24.0.1': - resolution: {integrity: sha512-MX4Zioh39chHlDJbKmEgydJDS3tspMP/lnQC67G3SWsTnb9NeYVWOjkxpOSy4oMfPs4StcWHwBrvUb4ybfnuaw==} + '@types/node@24.0.3': + resolution: {integrity: sha512-R4I/kzCYAdRLzfiCabn9hxWfbuHS573x+r0dJMkkzThEa7pbrcDWK+9zu3e7aBOouf+rQAciqPFMnxwr0aWgKg==} - '@vitest/expect@3.2.3': - resolution: {integrity: sha512-W2RH2TPWVHA1o7UmaFKISPvdicFJH+mjykctJFoAkUw+SPTJTGjUNdKscFBrqM7IPnCVu6zihtKYa7TkZS1dkQ==} + '@vitest/expect@3.2.4': + resolution: {integrity: sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==} - '@vitest/mocker@3.2.3': - resolution: {integrity: sha512-cP6fIun+Zx8he4rbWvi+Oya6goKQDZK+Yq4hhlggwQBbrlOQ4qtZ+G4nxB6ZnzI9lyIb+JnvyiJnPC2AGbKSPA==} + '@vitest/mocker@3.2.4': + resolution: {integrity: sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==} peerDependencies: msw: ^2.4.9 vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 @@ -533,20 +530,20 @@ packages: vite: optional: true - '@vitest/pretty-format@3.2.3': - resolution: {integrity: sha512-yFglXGkr9hW/yEXngO+IKMhP0jxyFw2/qys/CK4fFUZnSltD+MU7dVYGrH8rvPcK/O6feXQA+EU33gjaBBbAng==} + '@vitest/pretty-format@3.2.4': + resolution: {integrity: sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==} - '@vitest/runner@3.2.3': - resolution: {integrity: sha512-83HWYisT3IpMaU9LN+VN+/nLHVBCSIUKJzGxC5RWUOsK1h3USg7ojL+UXQR3b4o4UBIWCYdD2fxuzM7PQQ1u8w==} + '@vitest/runner@3.2.4': + resolution: {integrity: sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==} - '@vitest/snapshot@3.2.3': - resolution: {integrity: sha512-9gIVWx2+tysDqUmmM1L0hwadyumqssOL1r8KJipwLx5JVYyxvVRfxvMq7DaWbZZsCqZnu/dZedaZQh4iYTtneA==} + '@vitest/snapshot@3.2.4': + resolution: {integrity: sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==} - '@vitest/spy@3.2.3': - resolution: {integrity: sha512-JHu9Wl+7bf6FEejTCREy+DmgWe+rQKbK+y32C/k5f4TBIAlijhJbRBIRIOCEpVevgRsCQR2iHRUH2/qKVM/plw==} + '@vitest/spy@3.2.4': + resolution: {integrity: sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==} - '@vitest/utils@3.2.3': - resolution: {integrity: sha512-4zFBCU5Pf+4Z6v+rwnZ1HU1yzOKKvDkMXZrymE2PBlbjKJRlrOxbvpfPSvJTGRIwGoahaOGvp+kbCoxifhzJ1Q==} + '@vitest/utils@3.2.4': + resolution: {integrity: sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==} JSONStream@1.3.5: resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} @@ -559,26 +556,14 @@ packages: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} engines: {node: '>=6'} - ansi-escapes@7.0.0: - resolution: {integrity: sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==} - engines: {node: '>=18'} - ansi-regex@5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - ansi-regex@6.1.0: - resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} - engines: {node: '>=12'} - ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} - ansi-styles@6.2.1: - resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} - engines: {node: '>=12'} - argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} @@ -631,14 +616,6 @@ packages: resolution: {integrity: sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==} engines: {node: '>=8'} - cli-cursor@5.0.0: - resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==} - engines: {node: '>=18'} - - cli-truncate@4.0.0: - resolution: {integrity: sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==} - engines: {node: '>=18'} - cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -650,13 +627,6 @@ packages: color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - colorette@2.0.20: - resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} - - commander@13.1.0: - resolution: {integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==} - engines: {node: '>=18'} - compare-func@2.0.0: resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} @@ -723,9 +693,6 @@ packages: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} - emoji-regex@10.4.0: - resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==} - emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -737,10 +704,6 @@ packages: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} - environment@1.1.0: - resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==} - engines: {node: '>=18'} - error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} @@ -764,13 +727,6 @@ packages: estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} - eventemitter3@5.0.1: - resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} - - execa@8.0.1: - resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} - engines: {node: '>=16.17'} - expect-type@1.2.1: resolution: {integrity: sha512-/kP8CAwxzLVEeFrMm4kMmy4CCDlpipyA7MYLVrdJIkV0fYF0UaigQHRsxHiuY/GEea+bh4KSv3TIlgr+2UL6bw==} engines: {node: '>=12.0.0'} @@ -832,14 +788,6 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - get-east-asian-width@1.3.0: - resolution: {integrity: sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==} - engines: {node: '>=18'} - - get-stream@8.0.1: - resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} - engines: {node: '>=16'} - git-raw-commits@4.0.0: resolution: {integrity: sha512-ICsMM1Wk8xSGMowkOmPrzo2Fgmfo4bMHLNX6ytHjajRJUqvHOw/TFapQ+QG75c3X/tTDDhOSRPGC52dDbNM8FQ==} engines: {node: '>=16'} @@ -864,10 +812,6 @@ packages: resolution: {integrity: sha512-3gKm/gCSUipeLsRYZbbdA1BD83lBoWUkZ7G9VFrhWPAU76KwYo5KR8V28bpoPm/ygy0x5/GCbpRQdY7VLYCoIg==} hasBin: true - human-signals@5.0.0: - resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} - engines: {node: '>=16.17.0'} - husky@9.1.7: resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==} engines: {node: '>=18'} @@ -903,14 +847,6 @@ packages: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} - is-fullwidth-code-point@4.0.0: - resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==} - engines: {node: '>=12'} - - is-fullwidth-code-point@5.0.0: - resolution: {integrity: sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==} - engines: {node: '>=18'} - is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -923,10 +859,6 @@ packages: resolution: {integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==} engines: {node: '>=8'} - is-stream@3.0.0: - resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - is-subdir@1.2.0: resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} engines: {node: '>=4'} @@ -973,22 +905,9 @@ packages: resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} engines: {'0': node >= 0.2.0} - lilconfig@3.1.3: - resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} - engines: {node: '>=14'} - lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - lint-staged@15.5.1: - resolution: {integrity: sha512-6m7u8mue4Xn6wK6gZvSCQwBvMBR36xfY24nF5bMTf2MHDYG6S3yhJuOgdYVw99hsjyDt2d4z168b3naI8+NWtQ==} - engines: {node: '>=18.12.0'} - hasBin: true - - listr2@8.3.3: - resolution: {integrity: sha512-LWzX2KsqcB1wqQ4AHgYb4RsDXauQiqhjLk+6hjbaeHG4zpjjVAB6wC/gz6X0l+Du1cN3pUB5ZlrvTbhGSNnUQQ==} - engines: {node: '>=18.0.0'} - locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -1024,12 +943,8 @@ packages: lodash.upperfirst@4.3.1: resolution: {integrity: sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==} - log-update@6.1.0: - resolution: {integrity: sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==} - engines: {node: '>=18'} - - loupe@3.1.3: - resolution: {integrity: sha512-kkIp7XSkP78ZxJEsSxW3712C6teJVoeHHwgo9zJ380de7IYyJ2ISlxojcH2pC5OFLewESmnRi/+XCDIEEVyoug==} + loupe@3.1.4: + resolution: {integrity: sha512-wJzkKwJrheKtknCOKNEtDK4iqg/MxmZheEMtSTYvnzRdEYaZzmgH976nenp8WdJRdx5Vc1X/9MO0Oszl6ezeXg==} magic-string@0.30.17: resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} @@ -1038,9 +953,6 @@ packages: resolution: {integrity: sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==} engines: {node: '>=16.10'} - merge-stream@2.0.0: - resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} - merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} @@ -1049,14 +961,6 @@ packages: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} - mimic-fn@4.0.0: - resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} - engines: {node: '>=12'} - - mimic-function@5.0.1: - resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} - engines: {node: '>=18'} - minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -1072,18 +976,6 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - npm-run-path@5.3.0: - resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - - onetime@6.0.0: - resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} - engines: {node: '>=12'} - - onetime@7.0.0: - resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} - engines: {node: '>=18'} - os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} @@ -1142,10 +1034,6 @@ packages: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} - path-key@4.0.0: - resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} - engines: {node: '>=12'} - path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -1168,17 +1056,12 @@ packages: resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} engines: {node: '>=12'} - pidtree@0.6.0: - resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==} - engines: {node: '>=0.10'} - hasBin: true - pify@4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} - postcss@8.5.5: - resolution: {integrity: sha512-d/jtm+rdNT8tpXuHY5MMtcbJFBkhXE6593XVR9UoGCH8jSFGci7jGvMGH5RYd5PBJW+00NZQt6gf7CbagJCrhg==} + postcss@8.5.6: + resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} prettier@2.8.8: @@ -1212,17 +1095,10 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} - restore-cursor@5.1.0: - resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} - engines: {node: '>=18'} - reusify@1.1.0: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rfdc@1.4.1: - resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} - rollup@4.43.0: resolution: {integrity: sha512-wdN2Kd3Twh8MAEOEJZsuxuLKCsBEo4PVNLK6tQWAn10VhsVewQLzcucMgLolRlhFybGxfclbPeEYBaP6RvUFGg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -1258,14 +1134,6 @@ packages: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} - slice-ansi@5.0.0: - resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==} - engines: {node: '>=12'} - - slice-ansi@7.1.0: - resolution: {integrity: sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==} - engines: {node: '>=18'} - source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} @@ -1286,34 +1154,18 @@ packages: std-env@3.9.0: resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} - string-argv@0.3.2: - resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} - engines: {node: '>=0.6.19'} - string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} - string-width@7.2.0: - resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} - engines: {node: '>=18'} - strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} - strip-ansi@7.1.0: - resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} - engines: {node: '>=12'} - strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} - strip-final-newline@3.0.0: - resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} - engines: {node: '>=12'} - strip-literal@3.0.0: resolution: {integrity: sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==} @@ -1341,8 +1193,8 @@ packages: resolution: {integrity: sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==} engines: {node: '>=12.0.0'} - tinypool@1.1.0: - resolution: {integrity: sha512-7CotroY9a8DKsKprEy/a14aCCm8jYVmR7aFy4fpkZM8sdpNJbKkixuNjgM50yCmip2ezc8z4N7k3oe2+rfRJCQ==} + tinypool@1.1.1: + resolution: {integrity: sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==} engines: {node: ^18.0.0 || >=20.0.0} tinyrainbow@2.0.0: @@ -1377,8 +1229,8 @@ packages: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} - vite-node@3.2.3: - resolution: {integrity: sha512-gc8aAifGuDIpZHrPjuHyP4dpQmYXqWw7D1GmDnWeNWP654UEXzVfQ5IHPSK5HaHkwB/+p1atpYpSdw/2kOv8iQ==} + vite-node@3.2.4: + resolution: {integrity: sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true @@ -1422,16 +1274,16 @@ packages: yaml: optional: true - vitest@3.2.3: - resolution: {integrity: sha512-E6U2ZFXe3N/t4f5BwUaVCKRLHqUpk1CBWeMh78UT4VaTPH/2dyvH6ALl29JTovEPu9dVKr/K/J4PkXgrMbw4Ww==} + vitest@3.2.4: + resolution: {integrity: sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/debug': ^4.1.12 '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 - '@vitest/browser': 3.2.3 - '@vitest/ui': 3.2.3 + '@vitest/browser': 3.2.4 + '@vitest/ui': 3.2.4 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -1464,10 +1316,6 @@ packages: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} - wrap-ansi@9.0.0: - resolution: {integrity: sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==} - engines: {node: '>=18'} - y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -1501,39 +1349,39 @@ snapshots: '@babel/runtime@7.27.6': {} - '@biomejs/biome@1.9.4': + '@biomejs/biome@2.0.0': optionalDependencies: - '@biomejs/cli-darwin-arm64': 1.9.4 - '@biomejs/cli-darwin-x64': 1.9.4 - '@biomejs/cli-linux-arm64': 1.9.4 - '@biomejs/cli-linux-arm64-musl': 1.9.4 - '@biomejs/cli-linux-x64': 1.9.4 - '@biomejs/cli-linux-x64-musl': 1.9.4 - '@biomejs/cli-win32-arm64': 1.9.4 - '@biomejs/cli-win32-x64': 1.9.4 + '@biomejs/cli-darwin-arm64': 2.0.0 + '@biomejs/cli-darwin-x64': 2.0.0 + '@biomejs/cli-linux-arm64': 2.0.0 + '@biomejs/cli-linux-arm64-musl': 2.0.0 + '@biomejs/cli-linux-x64': 2.0.0 + '@biomejs/cli-linux-x64-musl': 2.0.0 + '@biomejs/cli-win32-arm64': 2.0.0 + '@biomejs/cli-win32-x64': 2.0.0 - '@biomejs/cli-darwin-arm64@1.9.4': + '@biomejs/cli-darwin-arm64@2.0.0': optional: true - '@biomejs/cli-darwin-x64@1.9.4': + '@biomejs/cli-darwin-x64@2.0.0': optional: true - '@biomejs/cli-linux-arm64-musl@1.9.4': + '@biomejs/cli-linux-arm64-musl@2.0.0': optional: true - '@biomejs/cli-linux-arm64@1.9.4': + '@biomejs/cli-linux-arm64@2.0.0': optional: true - '@biomejs/cli-linux-x64-musl@1.9.4': + '@biomejs/cli-linux-x64-musl@2.0.0': optional: true - '@biomejs/cli-linux-x64@1.9.4': + '@biomejs/cli-linux-x64@2.0.0': optional: true - '@biomejs/cli-win32-arm64@1.9.4': + '@biomejs/cli-win32-arm64@2.0.0': optional: true - '@biomejs/cli-win32-x64@1.9.4': + '@biomejs/cli-win32-x64@2.0.0': optional: true '@changesets/apply-release-plan@7.0.12': @@ -1678,11 +1526,11 @@ snapshots: human-id: 4.1.1 prettier: 2.8.8 - '@commitlint/cli@19.8.1(@types/node@24.0.1)(typescript@5.8.3)': + '@commitlint/cli@19.8.1(@types/node@24.0.3)(typescript@5.8.3)': dependencies: '@commitlint/format': 19.8.1 '@commitlint/lint': 19.8.1 - '@commitlint/load': 19.8.1(@types/node@24.0.1)(typescript@5.8.3) + '@commitlint/load': 19.8.1(@types/node@24.0.3)(typescript@5.8.3) '@commitlint/read': 19.8.1 '@commitlint/types': 19.8.1 tinyexec: 1.0.1 @@ -1729,7 +1577,7 @@ snapshots: '@commitlint/rules': 19.8.1 '@commitlint/types': 19.8.1 - '@commitlint/load@19.8.1(@types/node@24.0.1)(typescript@5.8.3)': + '@commitlint/load@19.8.1(@types/node@24.0.3)(typescript@5.8.3)': dependencies: '@commitlint/config-validator': 19.8.1 '@commitlint/execute-rule': 19.8.1 @@ -1737,7 +1585,7 @@ snapshots: '@commitlint/types': 19.8.1 chalk: 5.4.1 cosmiconfig: 9.0.0(typescript@5.8.3) - cosmiconfig-typescript-loader: 6.1.0(@types/node@24.0.1)(cosmiconfig@9.0.0(typescript@5.8.3))(typescript@5.8.3) + cosmiconfig-typescript-loader: 6.1.0(@types/node@24.0.3)(cosmiconfig@9.0.0(typescript@5.8.3))(typescript@5.8.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -1959,7 +1807,7 @@ snapshots: '@types/conventional-commits-parser@5.0.1': dependencies: - '@types/node': 24.0.1 + '@types/node': 24.0.3 '@types/deep-eql@4.0.2': {} @@ -1969,50 +1817,50 @@ snapshots: '@types/node@12.20.55': {} - '@types/node@24.0.1': + '@types/node@24.0.3': dependencies: undici-types: 7.8.0 - '@vitest/expect@3.2.3': + '@vitest/expect@3.2.4': dependencies: '@types/chai': 5.2.2 - '@vitest/spy': 3.2.3 - '@vitest/utils': 3.2.3 + '@vitest/spy': 3.2.4 + '@vitest/utils': 3.2.4 chai: 5.2.0 tinyrainbow: 2.0.0 - '@vitest/mocker@3.2.3(vite@6.3.5(@types/node@24.0.1)(jiti@2.4.2)(yaml@2.8.0))': + '@vitest/mocker@3.2.4(vite@6.3.5(@types/node@24.0.3)(jiti@2.4.2)(yaml@2.8.0))': dependencies: - '@vitest/spy': 3.2.3 + '@vitest/spy': 3.2.4 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 6.3.5(@types/node@24.0.1)(jiti@2.4.2)(yaml@2.8.0) + vite: 6.3.5(@types/node@24.0.3)(jiti@2.4.2)(yaml@2.8.0) - '@vitest/pretty-format@3.2.3': + '@vitest/pretty-format@3.2.4': dependencies: tinyrainbow: 2.0.0 - '@vitest/runner@3.2.3': + '@vitest/runner@3.2.4': dependencies: - '@vitest/utils': 3.2.3 + '@vitest/utils': 3.2.4 pathe: 2.0.3 strip-literal: 3.0.0 - '@vitest/snapshot@3.2.3': + '@vitest/snapshot@3.2.4': dependencies: - '@vitest/pretty-format': 3.2.3 + '@vitest/pretty-format': 3.2.4 magic-string: 0.30.17 pathe: 2.0.3 - '@vitest/spy@3.2.3': + '@vitest/spy@3.2.4': dependencies: tinyspy: 4.0.3 - '@vitest/utils@3.2.3': + '@vitest/utils@3.2.4': dependencies: - '@vitest/pretty-format': 3.2.3 - loupe: 3.1.3 + '@vitest/pretty-format': 3.2.4 + loupe: 3.1.4 tinyrainbow: 2.0.0 JSONStream@1.3.5: @@ -2029,20 +1877,12 @@ snapshots: ansi-colors@4.1.3: {} - ansi-escapes@7.0.0: - dependencies: - environment: 1.1.0 - ansi-regex@5.0.1: {} - ansi-regex@6.1.0: {} - ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 - ansi-styles@6.2.1: {} - argparse@1.0.10: dependencies: sprintf-js: 1.0.3 @@ -2072,7 +1912,7 @@ snapshots: assertion-error: 2.0.1 check-error: 2.1.1 deep-eql: 5.0.2 - loupe: 3.1.3 + loupe: 3.1.4 pathval: 2.0.0 chalk@5.4.1: {} @@ -2083,15 +1923,6 @@ snapshots: ci-info@3.9.0: {} - cli-cursor@5.0.0: - dependencies: - restore-cursor: 5.1.0 - - cli-truncate@4.0.0: - dependencies: - slice-ansi: 5.0.0 - string-width: 7.2.0 - cliui@8.0.1: dependencies: string-width: 4.2.3 @@ -2104,10 +1935,6 @@ snapshots: color-name@1.1.4: {} - colorette@2.0.20: {} - - commander@13.1.0: {} - compare-func@2.0.0: dependencies: array-ify: 1.0.0 @@ -2128,9 +1955,9 @@ snapshots: meow: 12.1.1 split2: 4.2.0 - cosmiconfig-typescript-loader@6.1.0(@types/node@24.0.1)(cosmiconfig@9.0.0(typescript@5.8.3))(typescript@5.8.3): + cosmiconfig-typescript-loader@6.1.0(@types/node@24.0.3)(cosmiconfig@9.0.0(typescript@5.8.3))(typescript@5.8.3): dependencies: - '@types/node': 24.0.1 + '@types/node': 24.0.3 cosmiconfig: 9.0.0(typescript@5.8.3) jiti: 2.4.2 typescript: 5.8.3 @@ -2168,8 +1995,6 @@ snapshots: dependencies: is-obj: 2.0.0 - emoji-regex@10.4.0: {} - emoji-regex@8.0.0: {} enquirer@2.4.1: @@ -2179,8 +2004,6 @@ snapshots: env-paths@2.2.1: {} - environment@1.1.0: {} - error-ex@1.3.2: dependencies: is-arrayish: 0.2.1 @@ -2223,20 +2046,6 @@ snapshots: dependencies: '@types/estree': 1.0.8 - eventemitter3@5.0.1: {} - - execa@8.0.1: - dependencies: - cross-spawn: 7.0.6 - get-stream: 8.0.1 - human-signals: 5.0.0 - is-stream: 3.0.0 - merge-stream: 2.0.0 - npm-run-path: 5.3.0 - onetime: 6.0.0 - signal-exit: 4.1.0 - strip-final-newline: 3.0.0 - expect-type@1.2.1: {} extendable-error@0.1.7: {} @@ -2299,10 +2108,6 @@ snapshots: get-caller-file@2.0.5: {} - get-east-asian-width@1.3.0: {} - - get-stream@8.0.1: {} - git-raw-commits@4.0.0: dependencies: dargs: 8.1.0 @@ -2330,8 +2135,6 @@ snapshots: human-id@4.1.1: {} - human-signals@5.0.0: {} - husky@9.1.7: {} iconv-lite@0.4.24: @@ -2355,12 +2158,6 @@ snapshots: is-fullwidth-code-point@3.0.0: {} - is-fullwidth-code-point@4.0.0: {} - - is-fullwidth-code-point@5.0.0: - dependencies: - get-east-asian-width: 1.3.0 - is-glob@4.0.3: dependencies: is-extglob: 2.1.1 @@ -2369,8 +2166,6 @@ snapshots: is-obj@2.0.0: {} - is-stream@3.0.0: {} - is-subdir@1.2.0: dependencies: better-path-resolve: 1.0.0 @@ -2408,34 +2203,8 @@ snapshots: jsonparse@1.3.1: {} - lilconfig@3.1.3: {} - lines-and-columns@1.2.4: {} - lint-staged@15.5.1: - dependencies: - chalk: 5.4.1 - commander: 13.1.0 - debug: 4.4.1 - execa: 8.0.1 - lilconfig: 3.1.3 - listr2: 8.3.3 - micromatch: 4.0.8 - pidtree: 0.6.0 - string-argv: 0.3.2 - yaml: 2.8.0 - transitivePeerDependencies: - - supports-color - - listr2@8.3.3: - dependencies: - cli-truncate: 4.0.0 - colorette: 2.0.20 - eventemitter3: 5.0.1 - log-update: 6.1.0 - rfdc: 1.4.1 - wrap-ansi: 9.0.0 - locate-path@5.0.0: dependencies: p-locate: 4.1.0 @@ -2462,15 +2231,7 @@ snapshots: lodash.upperfirst@4.3.1: {} - log-update@6.1.0: - dependencies: - ansi-escapes: 7.0.0 - cli-cursor: 5.0.0 - slice-ansi: 7.1.0 - strip-ansi: 7.1.0 - wrap-ansi: 9.0.0 - - loupe@3.1.3: {} + loupe@3.1.4: {} magic-string@0.30.17: dependencies: @@ -2478,8 +2239,6 @@ snapshots: meow@12.1.1: {} - merge-stream@2.0.0: {} - merge2@1.4.1: {} micromatch@4.0.8: @@ -2487,10 +2246,6 @@ snapshots: braces: 3.0.3 picomatch: 2.3.1 - mimic-fn@4.0.0: {} - - mimic-function@5.0.1: {} - minimist@1.2.8: {} mri@1.2.0: {} @@ -2499,18 +2254,6 @@ snapshots: nanoid@3.3.11: {} - npm-run-path@5.3.0: - dependencies: - path-key: 4.0.0 - - onetime@6.0.0: - dependencies: - mimic-fn: 4.0.0 - - onetime@7.0.0: - dependencies: - mimic-function: 5.0.1 - os-tmpdir@1.0.2: {} outdent@0.5.0: {} @@ -2560,8 +2303,6 @@ snapshots: path-key@3.1.1: {} - path-key@4.0.0: {} - path-type@4.0.0: {} pathe@2.0.3: {} @@ -2574,11 +2315,9 @@ snapshots: picomatch@4.0.2: {} - pidtree@0.6.0: {} - pify@4.0.1: {} - postcss@8.5.5: + postcss@8.5.6: dependencies: nanoid: 3.3.11 picocolors: 1.1.1 @@ -2605,15 +2344,8 @@ snapshots: resolve-from@5.0.0: {} - restore-cursor@5.1.0: - dependencies: - onetime: 7.0.0 - signal-exit: 4.1.0 - reusify@1.1.0: {} - rfdc@1.4.1: {} - rollup@4.43.0: dependencies: '@types/estree': 1.0.7 @@ -2660,16 +2392,6 @@ snapshots: slash@3.0.0: {} - slice-ansi@5.0.0: - dependencies: - ansi-styles: 6.2.1 - is-fullwidth-code-point: 4.0.0 - - slice-ansi@7.1.0: - dependencies: - ansi-styles: 6.2.1 - is-fullwidth-code-point: 5.0.0 - source-map-js@1.2.1: {} spawndamnit@3.0.1: @@ -2685,32 +2407,18 @@ snapshots: std-env@3.9.0: {} - string-argv@0.3.2: {} - string-width@4.2.3: dependencies: emoji-regex: 8.0.0 is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 - string-width@7.2.0: - dependencies: - emoji-regex: 10.4.0 - get-east-asian-width: 1.3.0 - strip-ansi: 7.1.0 - strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 - strip-ansi@7.1.0: - dependencies: - ansi-regex: 6.1.0 - strip-bom@3.0.0: {} - strip-final-newline@3.0.0: {} - strip-literal@3.0.0: dependencies: js-tokens: 9.0.1 @@ -2732,7 +2440,7 @@ snapshots: fdir: 6.4.6(picomatch@4.0.2) picomatch: 4.0.2 - tinypool@1.1.0: {} + tinypool@1.1.1: {} tinyrainbow@2.0.0: {} @@ -2754,13 +2462,13 @@ snapshots: universalify@0.1.2: {} - vite-node@3.2.3(@types/node@24.0.1)(jiti@2.4.2)(yaml@2.8.0): + vite-node@3.2.4(@types/node@24.0.3)(jiti@2.4.2)(yaml@2.8.0): dependencies: cac: 6.7.14 debug: 4.4.1 es-module-lexer: 1.7.0 pathe: 2.0.3 - vite: 6.3.5(@types/node@24.0.1)(jiti@2.4.2)(yaml@2.8.0) + vite: 6.3.5(@types/node@24.0.3)(jiti@2.4.2)(yaml@2.8.0) transitivePeerDependencies: - '@types/node' - jiti @@ -2775,30 +2483,30 @@ snapshots: - tsx - yaml - vite@6.3.5(@types/node@24.0.1)(jiti@2.4.2)(yaml@2.8.0): + vite@6.3.5(@types/node@24.0.3)(jiti@2.4.2)(yaml@2.8.0): dependencies: esbuild: 0.25.5 fdir: 6.4.6(picomatch@4.0.2) picomatch: 4.0.2 - postcss: 8.5.5 + postcss: 8.5.6 rollup: 4.43.0 tinyglobby: 0.2.14 optionalDependencies: - '@types/node': 24.0.1 + '@types/node': 24.0.3 fsevents: 2.3.3 jiti: 2.4.2 yaml: 2.8.0 - vitest@3.2.3(@types/node@24.0.1)(jiti@2.4.2)(yaml@2.8.0): + vitest@3.2.4(@types/node@24.0.3)(jiti@2.4.2)(yaml@2.8.0): dependencies: '@types/chai': 5.2.2 - '@vitest/expect': 3.2.3 - '@vitest/mocker': 3.2.3(vite@6.3.5(@types/node@24.0.1)(jiti@2.4.2)(yaml@2.8.0)) - '@vitest/pretty-format': 3.2.3 - '@vitest/runner': 3.2.3 - '@vitest/snapshot': 3.2.3 - '@vitest/spy': 3.2.3 - '@vitest/utils': 3.2.3 + '@vitest/expect': 3.2.4 + '@vitest/mocker': 3.2.4(vite@6.3.5(@types/node@24.0.3)(jiti@2.4.2)(yaml@2.8.0)) + '@vitest/pretty-format': 3.2.4 + '@vitest/runner': 3.2.4 + '@vitest/snapshot': 3.2.4 + '@vitest/spy': 3.2.4 + '@vitest/utils': 3.2.4 chai: 5.2.0 debug: 4.4.1 expect-type: 1.2.1 @@ -2809,13 +2517,13 @@ snapshots: tinybench: 2.9.0 tinyexec: 0.3.2 tinyglobby: 0.2.14 - tinypool: 1.1.0 + tinypool: 1.1.1 tinyrainbow: 2.0.0 - vite: 6.3.5(@types/node@24.0.1)(jiti@2.4.2)(yaml@2.8.0) - vite-node: 3.2.3(@types/node@24.0.1)(jiti@2.4.2)(yaml@2.8.0) + vite: 6.3.5(@types/node@24.0.3)(jiti@2.4.2)(yaml@2.8.0) + vite-node: 3.2.4(@types/node@24.0.3)(jiti@2.4.2)(yaml@2.8.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 24.0.1 + '@types/node': 24.0.3 transitivePeerDependencies: - jiti - less @@ -2845,15 +2553,10 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 - wrap-ansi@9.0.0: - dependencies: - ansi-styles: 6.2.1 - string-width: 7.2.0 - strip-ansi: 7.1.0 - y18n@5.0.8: {} - yaml@2.8.0: {} + yaml@2.8.0: + optional: true yargs-parser@21.1.1: {} diff --git a/src/api/Routes/guilds.ts b/src/api/Routes/guilds.ts index 384b9cb..dc75b0c 100644 --- a/src/api/Routes/guilds.ts +++ b/src/api/Routes/guilds.ts @@ -39,10 +39,10 @@ import type { RESTGetAPIGuildRolesResult, RESTGetAPIGuildScheduledEventQuery, RESTGetAPIGuildScheduledEventResult, - RESTGetAPIGuildScheduledEventUsersQuery, - RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, + RESTGetAPIGuildScheduledEventUsersQuery, + RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildSoundboardSoundsResult, RESTGetAPIGuildStickerResult, RESTGetAPIGuildStickersResult, @@ -107,12 +107,12 @@ import type { RESTPostAPIGuildSoundboardSoundResult, RESTPostAPIGuildStickerFormDataBody, RESTPostAPIGuildStickerResult, - RESTPostAPIGuildTemplatesJSONBody, - RESTPostAPIGuildTemplatesResult, RESTPostAPIGuildsJSONBody, RESTPostAPIGuildsMFAJSONBody, RESTPostAPIGuildsMFAResult, RESTPostAPIGuildsResult, + RESTPostAPIGuildTemplatesJSONBody, + RESTPostAPIGuildTemplatesResult, RESTPostAPITemplateCreateGuildJSONBody, RESTPostAPITemplateCreateGuildResult, RESTPutAPIGuildBanJSONBody, diff --git a/src/api/api.ts b/src/api/api.ts index 54b810d..c17fc56 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -1,11 +1,11 @@ -import { type UUID, randomUUID } from 'node:crypto'; -import { type Awaitable, BASE_HOST, Logger, delay, lazyLoadPackage, snowflakeToTimestamp } from '../common'; +import { randomUUID, type UUID } from 'node:crypto'; +import { type Awaitable, BASE_HOST, delay, Logger, lazyLoadPackage, snowflakeToTimestamp } from '../common'; import { toArrayBuffer, toBuffer } from '../common/it/utils'; import type { WorkerData } from '../websocket'; import type { WorkerSendApiRequest } from '../websocket/discord/worker'; +import { Bucket } from './bucket'; import { CDNRouter, Router } from './Router'; import type { APIRoutes } from './Routes'; -import { Bucket } from './bucket'; import { type ApiHandlerInternalOptions, type ApiHandlerOptions, @@ -384,11 +384,7 @@ export class ApiHandler { } } - parseRequest(options: { - url: string; - headers: RequestHeaders; - request: ApiRequestOptions; - }) { + parseRequest(options: { url: string; headers: RequestHeaders; request: ApiRequestOptions }) { let finalUrl = options.url; let data: string | FormData | undefined; if (options.request.auth) { diff --git a/src/api/index.ts b/src/api/index.ts index 179d197..2928ab0 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,4 +1,4 @@ +export * from './api'; export * from './Router'; export * from './Routes'; -export * from './api'; export * from './shared'; diff --git a/src/builders/Container.ts b/src/builders/Container.ts index 20a9a59..f178e5d 100644 --- a/src/builders/Container.ts +++ b/src/builders/Container.ts @@ -1,6 +1,6 @@ -import { type ActionRow, fromComponent } from '.'; import { type ColorResolvable, type RestOrArray, resolveColor } from '../common'; import { type APIContainerComponent, ComponentType } from '../types'; +import { type ActionRow, fromComponent } from '.'; import { BaseComponentBuilder } from './Base'; import type { File } from './File'; import type { MediaGallery } from './MediaGallery'; diff --git a/src/builders/Section.ts b/src/builders/Section.ts index d6f9e73..6d4892b 100644 --- a/src/builders/Section.ts +++ b/src/builders/Section.ts @@ -1,6 +1,6 @@ -import { type Button, fromComponent } from '.'; import type { RestOrArray } from '../common'; import { type APISectionComponent, ComponentType } from '../types'; +import { type Button, fromComponent } from '.'; import { BaseComponentBuilder } from './Base'; import type { TextDisplay } from './TextDisplay'; import type { Thumbnail } from './Thumbnail'; diff --git a/src/cache/index.ts b/src/cache/index.ts index 8e33b8b..99b24f2 100644 --- a/src/cache/index.ts +++ b/src/cache/index.ts @@ -1,11 +1,5 @@ -import { type If, Logger } from '../common'; - -import type { Adapter } from './adapters'; - -import { Guilds } from './resources/guilds'; -import { Users } from './resources/users'; - import type { InternalOptions, UsingClient } from '../commands'; +import { type If, Logger } from '../common'; import { type APIChannel, type APIEmoji, @@ -20,9 +14,11 @@ import { GuildMemberFlags, OverwriteType, } from '../types'; +import type { Adapter } from './adapters'; import { Bans } from './resources/bans'; import { Channels } from './resources/channels'; import { Emojis } from './resources/emojis'; +import { Guilds } from './resources/guilds'; import { Members } from './resources/members'; import { Messages } from './resources/messages'; import { Overwrites } from './resources/overwrites'; @@ -30,7 +26,9 @@ import { Presences } from './resources/presence'; import { Roles } from './resources/roles'; import { StageInstances } from './resources/stage-instances'; import { Stickers } from './resources/stickers'; +import { Users } from './resources/users'; import { VoiceStates } from './resources/voice-states'; + export { BaseResource } from './resources/default/base'; export { GuildBasedResource } from './resources/default/guild-based'; export { GuildRelatedResource } from './resources/default/guild-related'; diff --git a/src/cache/resources/guilds.ts b/src/cache/resources/guilds.ts index a2db4e2..f402851 100644 --- a/src/cache/resources/guilds.ts +++ b/src/cache/resources/guilds.ts @@ -1,7 +1,7 @@ -import type { Cache, CacheFrom, ReturnCache } from '..'; import { type GuildStructure, Transformers } from '../../client/transformers'; import { fakePromise } from '../../common'; import type { APIGuild, GatewayGuildCreateDispatchData } from '../../types'; +import type { Cache, CacheFrom, ReturnCache } from '..'; import { BaseResource } from './default/base'; export class Guilds extends BaseResource { diff --git a/src/client/base.ts b/src/client/base.ts index fe3dc19..12e56a4 100644 --- a/src/client/base.ts +++ b/src/client/base.ts @@ -1,5 +1,7 @@ +import { promises } from 'node:fs'; import { join } from 'node:path'; import { ApiHandler } from '../api'; +import { isBufferLike } from '../api/utils/utils'; import type { Adapter, DisabledCache } from '../cache'; import { Cache, MemoryAdapter } from '../cache'; import type { @@ -16,34 +18,31 @@ import type { UsingClient, } from '../commands'; import { IgnoreCommand, type InferWithPrefix, type MiddlewareContext } from '../commands/applications/shared'; +import { HandleCommand } from '../commands/handle'; import { CommandHandler } from '../commands/handler'; import { ApplicationShorter, + assertString, ChannelShorter, EmojiShorter, + filterSplit, GuildShorter, InteractionShorter, InvitesShorter, - LogLevels, Logger, + LogLevels, type MakeRequired, MemberShorter, MergeOptions, MessageShorter, + magicImport, ReactionShorter, RoleShorter, TemplateShorter, ThreadShorter, UsersShorter, WebhookShorter, - assertString, - filterSplit, - magicImport, } from '../common'; - -import { promises } from 'node:fs'; -import { isBufferLike } from '../api/utils/utils'; -import { HandleCommand } from '../commands/handle'; import { BanShorter } from '../common/shorters/bans'; import { SoundboardShorter } from '../common/shorters/soundboard'; import { VoiceStateShorter } from '../common/shorters/voiceStates'; diff --git a/src/client/client.ts b/src/client/client.ts index c6079a0..fe76ed6 100644 --- a/src/client/client.ts +++ b/src/client/client.ts @@ -1,17 +1,17 @@ import type { CommandContext, Message } from '..'; import { type Awaitable, + assertString, type DeepPartial, type If, + lazyLoadPackage, type PickPartial, type WatcherPayload, type WatcherSendToShard, - assertString, - lazyLoadPackage, } from '../common'; import { EventHandler } from '../events'; import type { GatewayDispatchPayload, GatewayPresenceUpdateData } from '../types'; -import { ShardManager, type ShardManagerOptions, properties } from '../websocket'; +import { properties, ShardManager, type ShardManagerOptions } from '../websocket'; import { MemberUpdateHandler } from '../websocket/discord/events/memberUpdate'; import { PresenceUpdateHandler } from '../websocket/discord/events/presenceUpdate'; import type { BaseClientOptions, InternalRuntimeConfig, ServicesOptions, StartOptions } from './base'; diff --git a/src/client/collectors.ts b/src/client/collectors.ts index 782aaf3..647ce5a 100644 --- a/src/client/collectors.ts +++ b/src/client/collectors.ts @@ -1,4 +1,4 @@ -import { type UUID, randomUUID } from 'node:crypto'; +import { randomUUID, type UUID } from 'node:crypto'; import type { UsingClient } from '../commands'; import type { Awaitable, CamelCase } from '../common'; import type { CallbackEventHandler, CustomEventsKeys, GatewayEvents } from '../events'; diff --git a/src/client/index.ts b/src/client/index.ts index 8524207..84e42d3 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -1,5 +1,5 @@ export type { RuntimeConfig, RuntimeConfigHTTP } from './base'; export * from './client'; export * from './httpclient'; -export * from './workerclient'; export * from './transformers'; +export * from './workerclient'; diff --git a/src/client/transformers.ts b/src/client/transformers.ts index e60f3b7..4bfbf72 100644 --- a/src/client/transformers.ts +++ b/src/client/transformers.ts @@ -8,8 +8,8 @@ import { BaseGuildChannel, CategoryChannel, ClientUser, - DMChannel, DirectoryChannel, + DMChannel, Emoji, Entitlement, ForumChannel, diff --git a/src/client/workerclient.ts b/src/client/workerclient.ts index 14f1769..490818f 100644 --- a/src/client/workerclient.ts +++ b/src/client/workerclient.ts @@ -1,18 +1,22 @@ -import { type UUID, randomUUID } from 'node:crypto'; +import { randomUUID, type UUID } from 'node:crypto'; import { ApiHandler, Logger } from '..'; import { WorkerAdapter } from '../cache'; import { type Awaitable, + calculateShardId, type DeepPartial, LogLevels, + lazyLoadPackage, type MakeRequired, type When, - calculateShardId, - lazyLoadPackage, } from '../common'; import { EventHandler } from '../events'; import type { GatewayDispatchPayload, GatewaySendPayload } from '../types'; -import { Shard, type ShardManagerOptions, ShardSocketCloseCodes, type WorkerData, properties } from '../websocket'; +import { properties, Shard, type ShardManagerOptions, ShardSocketCloseCodes, type WorkerData } from '../websocket'; +import { MemberUpdateHandler } from '../websocket/discord/events/memberUpdate'; +import { PresenceUpdateHandler } from '../websocket/discord/events/presenceUpdate'; +import type { WorkerHeartbeaterMessages } from '../websocket/discord/heartbeater'; +import type { ShardData } from '../websocket/discord/shared'; import type { ClientHeartbeaterMessages, WorkerDisconnectedAllShardsResharding, @@ -36,11 +40,6 @@ import type { ManagerMessages, ManagerSpawnShards } from '../websocket/discord/w import type { BaseClientOptions, ServicesOptions, StartOptions } from './base'; import { BaseClient } from './base'; import type { Client, ClientOptions } from './client'; - -import { MemberUpdateHandler } from '../websocket/discord/events/memberUpdate'; -import { PresenceUpdateHandler } from '../websocket/discord/events/presenceUpdate'; -import type { WorkerHeartbeaterMessages } from '../websocket/discord/heartbeater'; -import type { ShardData } from '../websocket/discord/shared'; import { Collectors } from './collectors'; import { type ClientUserStructure, Transformers } from './transformers'; diff --git a/src/commands/applications/entryPoint.ts b/src/commands/applications/entryPoint.ts index 77136de..ef2974c 100644 --- a/src/commands/applications/entryPoint.ts +++ b/src/commands/applications/entryPoint.ts @@ -1,4 +1,4 @@ -import { type PermissionStrings, magicImport } from '../../common'; +import { magicImport, type PermissionStrings } from '../../common'; import { ApplicationCommandType, type ApplicationIntegrationType, diff --git a/src/commands/applications/menu.ts b/src/commands/applications/menu.ts index 9ea09ca..7b720d7 100644 --- a/src/commands/applications/menu.ts +++ b/src/commands/applications/menu.ts @@ -1,4 +1,4 @@ -import { type PermissionStrings, magicImport } from '../../common'; +import { magicImport, type PermissionStrings } from '../../common'; import type { ApplicationCommandType, ApplicationIntegrationType, diff --git a/src/commands/applications/menucontext.ts b/src/commands/applications/menucontext.ts index ee47bd1..1d66f7c 100644 --- a/src/commands/applications/menucontext.ts +++ b/src/commands/applications/menucontext.ts @@ -13,9 +13,9 @@ import { type MakeRequired, type MessageWebhookCreateBodyRequest, type ModalCreateBodyRequest, + toSnakeCase, type UnionToTuple, type When, - toSnakeCase, } from '../../common'; import type { AllChannels, MessageCommandInteraction, UserCommandInteraction } from '../../structures'; import { type APIMessage, ApplicationCommandType, MessageFlags, type RESTGetAPIGuildQuery } from '../../types'; @@ -47,7 +47,6 @@ export class MenuCommandContext< metadata: CommandMetadata> = {} as never; globalMetadata: GlobalMetadata = {}; - // biome-ignore lint/suspicious/useGetterReturn: default don't exist. get target(): InteractionTarget { switch (this.interaction.data.type) { case ApplicationCommandType.Message: { diff --git a/src/commands/applications/options.ts b/src/commands/applications/options.ts index 06691a9..5c46a1e 100644 --- a/src/commands/applications/options.ts +++ b/src/commands/applications/options.ts @@ -1,10 +1,3 @@ -import type { - AutocompleteCallback, - EntryPointContext, - MenuCommandContext, - OnAutocompleteErrorCallback, - ReturnOptionsTypes, -} from '..'; import type { Awaitable, FlatObjectKeys } from '../../common'; import type { ModalContext } from '../../components'; import type { ComponentContext } from '../../components/componentcontext'; @@ -15,6 +8,13 @@ import { ApplicationCommandOptionType, } from '../../types'; import type { LocalizationMap } from '../../types/payloads'; +import type { + AutocompleteCallback, + EntryPointContext, + MenuCommandContext, + OnAutocompleteErrorCallback, + ReturnOptionsTypes, +} from '..'; import type { CommandContext } from './chatcontext'; import type { DefaultLocale, MiddlewareContext, OKFunction, SeyfertChannelMap, StopFunction } from './shared'; diff --git a/src/commands/applications/shared.ts b/src/commands/applications/shared.ts index f4d3ab5..99bc8da 100644 --- a/src/commands/applications/shared.ts +++ b/src/commands/applications/shared.ts @@ -1,7 +1,7 @@ import type { CategoryChannelStructure, - DMChannelStructure, DirectoryChannelStructure, + DMChannelStructure, ForumChannelStructure, MediaChannelStructure, NewsChannelStructure, diff --git a/src/commands/handle.ts b/src/commands/handle.ts index c59bee2..89f388a 100644 --- a/src/commands/handle.ts +++ b/src/commands/handle.ts @@ -1,3 +1,32 @@ +import type { Client, WorkerClient } from '../client'; +import { type MessageStructure, type OptionResolverStructure, Transformers } from '../client/transformers'; +import type { MakeRequired } from '../common'; +import { INTEGER_OPTION_VALUE_LIMIT } from '../common/it/constants'; +import { ComponentContext, ModalContext } from '../components'; +import { + type __InternalReplyFunction, + AutocompleteInteraction, + BaseInteraction, + type ChatInputCommandInteraction, + type ComponentInteraction, + type EntryPointInteraction, + type MessageCommandInteraction, + type ModalSubmitInteraction, + type UserCommandInteraction, +} from '../structures'; +import type { PermissionsBitField } from '../structures/extra/Permissions'; +import { + type APIApplicationCommandInteraction, + type APIApplicationCommandInteractionDataOption, + type APIInteraction, + type APIInteractionDataResolvedChannel, + ApplicationCommandOptionType, + ApplicationCommandType, + ChannelType, + type GatewayMessageCreateDispatchData, + InteractionContextType, + InteractionType, +} from '../types'; import { BaseCommand, Command, @@ -19,35 +48,6 @@ import { SubCommand, type UsingClient, } from '.'; -import type { Client, WorkerClient } from '../client'; -import { type MessageStructure, type OptionResolverStructure, Transformers } from '../client/transformers'; -import type { MakeRequired } from '../common'; -import { INTEGER_OPTION_VALUE_LIMIT } from '../common/it/constants'; -import { ComponentContext, ModalContext } from '../components'; -import { - AutocompleteInteraction, - BaseInteraction, - type ChatInputCommandInteraction, - type ComponentInteraction, - type EntryPointInteraction, - type MessageCommandInteraction, - type ModalSubmitInteraction, - type UserCommandInteraction, - type __InternalReplyFunction, -} from '../structures'; -import type { PermissionsBitField } from '../structures/extra/Permissions'; -import { - type APIApplicationCommandInteraction, - type APIApplicationCommandInteractionDataOption, - type APIInteraction, - type APIInteractionDataResolvedChannel, - ApplicationCommandOptionType, - ApplicationCommandType, - ChannelType, - type GatewayMessageCreateDispatchData, - InteractionContextType, - InteractionType, -} from '../types'; export type CommandOptionWithType = CommandOption & { type: ApplicationCommandOptionType; diff --git a/src/commands/handler.ts b/src/commands/handler.ts index 4246ce6..23e15f2 100644 --- a/src/commands/handler.ts +++ b/src/commands/handler.ts @@ -1,6 +1,5 @@ import { promises } from 'node:fs'; import { basename, dirname } from 'node:path'; -import type { EntryPointCommand } from '.'; import type { Logger, NulleableCoalising, OmitInsert } from '../common'; import { BaseHandler, isCloudfareWorker } from '../common'; import { PermissionsBitField } from '../structures/extra/Permissions'; @@ -17,6 +16,7 @@ import { type LocaleString, type LocalizationMap, } from '../types'; +import type { EntryPointCommand } from '.'; import { Command, type CommandOption, SubCommand } from './applications/chat'; import { ContextMenuCommand } from './applications/menu'; import { IgnoreCommand, type UsingClient } from './applications/shared'; diff --git a/src/commands/index.ts b/src/commands/index.ts index 380829a..8440c93 100644 --- a/src/commands/index.ts +++ b/src/commands/index.ts @@ -1,11 +1,11 @@ -export * from './applications/shared'; // export * from './applications/chat'; export * from './applications/chatcontext'; +export * from './applications/entrycontext'; +export * from './applications/entryPoint'; export * from './applications/menu'; export * from './applications/menucontext'; export * from './applications/options'; -export * from './applications/entryPoint'; -export * from './applications/entrycontext'; +export * from './applications/shared'; export * from './decorators'; export * from './optionresolver'; diff --git a/src/common/index.ts b/src/common/index.ts index 673475c..b639b20 100644 --- a/src/common/index.ts +++ b/src/common/index.ts @@ -1,28 +1,28 @@ -export * from './it/constants'; -export * from './it/utils'; +// +export * from './bot/watcher'; export * from './it/colors'; -export { CustomizeLoggerCallback, AssignFilenameCallback, LogLevels, Logger, LoggerOptions } from './it/logger'; +export * from './it/constants'; export * from './it/formatter'; -// circular lol -export * from './shorters/invites'; +export { AssignFilenameCallback, CustomizeLoggerCallback, Logger, LoggerOptions, LogLevels } from './it/logger'; +export * from './it/utils'; +export * from './shorters/application'; // export * from './shorters/channels'; export * from './shorters/emojis'; export * from './shorters/guilds'; +export * from './shorters/interaction'; +// circular lol +export * from './shorters/invites'; export * from './shorters/members'; export * from './shorters/messages'; export * from './shorters/reactions'; export * from './shorters/roles'; export * from './shorters/templates'; -export * from './shorters/users'; export * from './shorters/threads'; +export * from './shorters/users'; export * from './shorters/webhook'; -export * from './shorters/interaction'; -export * from './shorters/application'; // export * from './types/options'; export * from './types/resolvables'; export * from './types/util'; export * from './types/write'; -// -export * from './bot/watcher'; diff --git a/src/common/it/logger.ts b/src/common/it/logger.ts index 7d467ed..fc51b53 100644 --- a/src/common/it/logger.ts +++ b/src/common/it/logger.ts @@ -1,4 +1,4 @@ -import { type WriteStream, createWriteStream, existsSync, mkdirSync, promises } from 'node:fs'; +import { createWriteStream, existsSync, mkdirSync, promises, type WriteStream } from 'node:fs'; import { join } from 'node:path'; import { bgBrightWhite, black, bold, brightBlack, cyan, gray, italic, red, stripColor, yellow } from './colors'; import { MergeOptions } from './utils'; diff --git a/src/common/it/utils.ts b/src/common/it/utils.ts index ed97ba0..f6002a0 100644 --- a/src/common/it/utils.ts +++ b/src/common/it/utils.ts @@ -1,5 +1,7 @@ import { promises } from 'node:fs'; import { basename, join } from 'node:path'; +import type { Cache } from '../../cache'; +import { type APIPartialEmoji, FormattingPatterns, GatewayIntentBits } from '../../types'; import { type ColorResolvable, DiscordEpoch, @@ -10,8 +12,6 @@ import { type ObjectToSnake, type TypeArray, } from '..'; -import type { Cache } from '../../cache'; -import { type APIPartialEmoji, FormattingPatterns, GatewayIntentBits } from '../../types'; /** * Calculates the shard ID for a guild based on its ID. @@ -304,8 +304,6 @@ export function lazyLoadPackage(mod: string): T | undefined { try { return require(mod); } catch (e) { - // biome-ignore lint/suspicious/noConsoleLog: - // biome-ignore lint/suspicious/noConsole: console.log(`Cannot import ${mod}`, e); return; } diff --git a/src/common/shorters/channels.ts b/src/common/shorters/channels.ts index f88ba78..ddb68dd 100644 --- a/src/common/shorters/channels.ts +++ b/src/common/shorters/channels.ts @@ -1,7 +1,7 @@ import { CacheFrom } from '../../cache'; import type { Overwrites } from '../../cache/resources/overwrites'; import { type MessageStructure, type ThreadChannelStructure, Transformers } from '../../client/transformers'; -import { type AllChannels, BaseChannel, type GuildMember, type GuildRole, channelFrom } from '../../structures'; +import { type AllChannels, BaseChannel, channelFrom, type GuildMember, type GuildRole } from '../../structures'; import { PermissionsBitField } from '../../structures/extra/Permissions'; import type { APIChannel, diff --git a/src/common/shorters/guilds.ts b/src/common/shorters/guilds.ts index 5c31c62..82078e7 100644 --- a/src/common/shorters/guilds.ts +++ b/src/common/shorters/guilds.ts @@ -14,8 +14,8 @@ import { type AllChannels, BaseChannel, type CreateStickerBodyRequest, - type GuildChannelTypes, channelFrom, + type GuildChannelTypes, } from '../../structures'; import type { APIChannel, diff --git a/src/common/shorters/messages.ts b/src/common/shorters/messages.ts index fc1077e..4c8f1d4 100644 --- a/src/common/shorters/messages.ts +++ b/src/common/shorters/messages.ts @@ -1,4 +1,7 @@ +import type { ValidAnswerId } from '../../api/Routes/channels'; import { resolveFiles } from '../../builders'; +import { CacheFrom } from '../../cache'; +import { type MessageStructure, type ThreadChannelStructure, Transformers, type UserStructure } from '../../client'; import { MessagesMethods } from '../../structures'; import type { RESTGetAPIChannelMessagesQuery, @@ -6,10 +9,6 @@ import type { RESTPostAPIChannelMessageJSONBody, RESTPostAPIChannelMessagesThreadsJSONBody, } from '../../types'; - -import type { ValidAnswerId } from '../../api/Routes/channels'; -import { CacheFrom } from '../../cache'; -import { type MessageStructure, type ThreadChannelStructure, Transformers, type UserStructure } from '../../client'; import type { MessageCreateBodyRequest, MessageUpdateBodyRequest } from '../types/write'; import { BaseShorter } from './base'; diff --git a/src/common/shorters/webhook.ts b/src/common/shorters/webhook.ts index fc5106e..82f9a50 100644 --- a/src/common/shorters/webhook.ts +++ b/src/common/shorters/webhook.ts @@ -1,9 +1,9 @@ import { resolveFiles } from '../../builders'; import { Transformers, type WebhookMessageStructure, type WebhookStructure } from '../../client/transformers'; import { + MessagesMethods, type MessageWebhookMethodEditParams, type MessageWebhookMethodWriteParams, - MessagesMethods, } from '../../structures'; import type { APIWebhook, diff --git a/src/common/types/options.ts b/src/common/types/options.ts index 437ad5c..306798f 100644 --- a/src/common/types/options.ts +++ b/src/common/types/options.ts @@ -1,6 +1,6 @@ -import type { Identify } from '..'; import type { CDNUrlOptions } from '../../api'; import type { UsingClient } from '../../commands'; +import type { Identify } from '..'; export type ImageOptions = CDNUrlOptions; diff --git a/src/common/types/resolvables.ts b/src/common/types/resolvables.ts index 6dbb36a..daea0f5 100644 --- a/src/common/types/resolvables.ts +++ b/src/common/types/resolvables.ts @@ -1,7 +1,7 @@ -import type { EmbedColors, OmitInsert } from '..'; import type { Attachment, AttachmentDataType, AttachmentResolvable } from '../../builders'; import type { GuildMember } from '../../structures'; import type { APIGuildMember, APIPartialEmoji, RESTPostAPIApplicationEmojiJSONBody } from '../../types'; +import type { EmbedColors, OmitInsert } from '..'; export type EmojiResolvable = string | Partial | `<${string | undefined}:${string}:${string}>`; export type GuildMemberResolvable = string | Partial | APIGuildMember; diff --git a/src/common/types/util.ts b/src/common/types/util.ts index 7c68058..936f82d 100644 --- a/src/common/types/util.ts +++ b/src/common/types/util.ts @@ -171,14 +171,10 @@ type OptionalizeAux = Identify< * it is recursive */ export type Optionalize = T extends object - ? // biome-ignore lint/style/useShorthandArrayType: typescript things - // biome-ignore lint/style/useConsistentArrayType: - T extends Array + ? T extends Array ? number extends T['length'] ? T[number] extends object - ? // biome-ignore lint/style/useShorthandArrayType: - // biome-ignore lint/style/useConsistentArrayType: - Array> + ? Array> : T : Partial : OptionalizeAux diff --git a/src/components/BaseComponent.ts b/src/components/BaseComponent.ts index c78c572..981808b 100644 --- a/src/components/BaseComponent.ts +++ b/src/components/BaseComponent.ts @@ -4,6 +4,7 @@ import { type ChannelSelectMenu, type Container, type File, + fromComponent, type MediaGallery, type MentionableSelectMenu, type RoleSelectMenu, @@ -14,7 +15,6 @@ import { type TextInput, type Thumbnail, type UserSelectMenu, - fromComponent, } from '../builders'; import { type APIActionRowComponent, diff --git a/src/components/Container.ts b/src/components/Container.ts index 81e4ad7..22f2a8f 100644 --- a/src/components/Container.ts +++ b/src/components/Container.ts @@ -1,5 +1,5 @@ -import { type ContainerComponents, componentFactory } from '.'; import type { APIContainerComponent, ComponentType } from '../types'; +import { type ContainerComponents, componentFactory } from '.'; import { BaseComponent } from './BaseComponent'; export class ContainerComponent extends BaseComponent { diff --git a/src/components/Section.ts b/src/components/Section.ts index 874ea9a..816c8b6 100644 --- a/src/components/Section.ts +++ b/src/components/Section.ts @@ -1,5 +1,5 @@ -import { componentFactory } from '.'; import type { APISectionComponent, ComponentType } from '../types'; +import { componentFactory } from '.'; import { BaseComponent } from './BaseComponent'; import type { ButtonComponent } from './ButtonComponent'; import type { TextDisplayComponent } from './TextDisplay'; diff --git a/src/components/handler.ts b/src/components/handler.ts index 8460e50..617179a 100644 --- a/src/components/handler.ts +++ b/src/components/handler.ts @@ -9,7 +9,7 @@ import type { import { LimitedCollection } from '../collection'; import { BaseCommand, type RegisteredMiddlewares, type UsingClient } from '../commands'; import type { FileLoaded } from '../commands/handler'; -import { BaseHandler, type Logger, type OnFailCallback, isCloudfareWorker, magicImport } from '../common'; +import { BaseHandler, isCloudfareWorker, type Logger, magicImport, type OnFailCallback } from '../common'; import type { ComponentInteraction, ModalSubmitInteraction, StringSelectMenuInteraction } from '../structures'; import { ComponentCommand, InteractionCommandType } from './componentcommand'; import type { ComponentContext } from './componentcontext'; diff --git a/src/events/handler.ts b/src/events/handler.ts index 6475e06..0d28f0a 100644 --- a/src/events/handler.ts +++ b/src/events/handler.ts @@ -4,11 +4,11 @@ import type { FileLoaded } from '../commands/handler'; import { BaseHandler, type CamelCase, + isCloudfareWorker, type MakeRequired, + magicImport, ReplaceRegex, type SnakeCase, - isCloudfareWorker, - magicImport, } from '../common'; import type { ClientEvents } from '../events/hooks'; import * as RawEvents from '../events/hooks'; diff --git a/src/events/hooks/channel.ts b/src/events/hooks/channel.ts index 0b11738..294388e 100644 --- a/src/events/hooks/channel.ts +++ b/src/events/hooks/channel.ts @@ -1,3 +1,6 @@ +import type { UsingClient } from '../../commands'; +import { toCamelCase } from '../../common'; +import { type AllChannels, channelFrom } from '../../structures'; import type { GatewayChannelCreateDispatchData, GatewayChannelDeleteDispatchData, @@ -5,10 +8,6 @@ import type { GatewayChannelUpdateDispatchData, } from '../../types'; -import type { UsingClient } from '../../commands'; -import { toCamelCase } from '../../common'; -import { type AllChannels, channelFrom } from '../../structures'; - export const CHANNEL_CREATE = (self: UsingClient, data: GatewayChannelCreateDispatchData): AllChannels => { return channelFrom(data, self); }; diff --git a/src/events/hooks/guild.ts b/src/events/hooks/guild.ts index ef68bbd..c0f3413 100644 --- a/src/events/hooks/guild.ts +++ b/src/events/hooks/guild.ts @@ -20,8 +20,8 @@ import type { GatewayGuildIntegrationsUpdateDispatchData, GatewayGuildMemberAddDispatchData, GatewayGuildMemberRemoveDispatchData, - GatewayGuildMemberUpdateDispatchData, GatewayGuildMembersChunkDispatchData, + GatewayGuildMemberUpdateDispatchData, GatewayGuildRoleCreateDispatchData, GatewayGuildRoleDeleteDispatchData, GatewayGuildRoleUpdateDispatchData, diff --git a/src/events/hooks/index.ts b/src/events/hooks/index.ts index 70f8adf..c072a90 100644 --- a/src/events/hooks/index.ts +++ b/src/events/hooks/index.ts @@ -10,13 +10,13 @@ export * from './interactions'; export * from './invite'; export * from './message'; export * from './presence'; +export * from './soundboard'; export * from './stage'; export * from './thread'; export * from './typing'; export * from './user'; export * from './voice'; export * from './webhook'; -export * from './soundboard'; import type { CamelCase } from '../../common'; import type * as RawEvents from './index'; diff --git a/src/events/hooks/message.ts b/src/events/hooks/message.ts index d1e74f0..1b78093 100644 --- a/src/events/hooks/message.ts +++ b/src/events/hooks/message.ts @@ -1,6 +1,6 @@ import { type MessageStructure, Transformers } from '../../client/transformers'; import type { UsingClient } from '../../commands'; -import { type ObjectToLower, type OmitInsert, fakePromise, toCamelCase } from '../../common'; +import { fakePromise, type ObjectToLower, type OmitInsert, toCamelCase } from '../../common'; import type { GatewayMessageCreateDispatchData, GatewayMessageDeleteBulkDispatchData, diff --git a/src/events/hooks/soundboard.ts b/src/events/hooks/soundboard.ts index 8e1aba9..a9aa05d 100644 --- a/src/events/hooks/soundboard.ts +++ b/src/events/hooks/soundboard.ts @@ -5,8 +5,8 @@ import type { APISoundBoard, GatewayGuildSoundboardSoundCreateDispatchData, GatewayGuildSoundboardSoundDeleteDispatchData, - GatewayGuildSoundboardSoundUpdateDispatchData, GatewayGuildSoundboardSoundsUpdateDispatchData, + GatewayGuildSoundboardSoundUpdateDispatchData, GatewaySoundboardSoundsDispatchData, } from '../../types'; diff --git a/src/events/hooks/thread.ts b/src/events/hooks/thread.ts index 222960b..cd747c1 100644 --- a/src/events/hooks/thread.ts +++ b/src/events/hooks/thread.ts @@ -5,8 +5,8 @@ import type { GatewayThreadCreateDispatchData, GatewayThreadDeleteDispatchData, GatewayThreadListSyncDispatchData, - GatewayThreadMemberUpdateDispatchData, GatewayThreadMembersUpdateDispatchData, + GatewayThreadMemberUpdateDispatchData, GatewayThreadUpdateDispatchData, } from '../../types'; diff --git a/src/index.ts b/src/index.ts index 00f8556..c453bb0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ export * from './client'; + import { BaseClient, type BaseClientOptions, @@ -10,21 +11,22 @@ import { import { isCloudfareWorker } from './common'; import type { ClientNameEvents, CustomEventsKeys, ResolveEventParams } from './events'; import { GatewayIntentBits } from './types'; -export { Logger, PermissionStrings, Formatter } from './common'; -// -export { Collection, LimitedCollection } from './collection'; + // export * from './api'; export * from './builders'; export * from './cache'; +// +export { Collection, LimitedCollection } from './collection'; export * from './commands'; +export { Formatter, Logger, PermissionStrings } from './common'; export * from './components'; export * from './events'; export * from './langs'; // -export { ShardManager, WorkerManager } from './websocket/discord'; -// export * from './structures'; +// +export { ShardManager, WorkerManager } from './websocket/discord'; /** * Creates an event with the specified data and run function. diff --git a/src/structures/Guild.ts b/src/structures/Guild.ts index febe732..7f96719 100644 --- a/src/structures/Guild.ts +++ b/src/structures/Guild.ts @@ -4,15 +4,15 @@ import type { CreateInviteFromChannel } from '../common'; import type { ObjectToLower, StructPropState, StructStates, ToClass } from '../common/types/util'; import type { APIGuild, APIPartialGuild, GatewayGuildCreateDispatchData, RESTPatchAPIGuildJSONBody } from '../types'; import { AutoModerationRule } from './AutoModerationRule'; +import { BaseChannel, WebhookGuildMethods } from './channels'; import { GuildEmoji } from './Emoji'; +import { BaseGuild } from './extra/BaseGuild'; +import type { DiscordBase } from './extra/DiscordBase'; import { GuildBan } from './GuildBan'; import { GuildMember } from './GuildMember'; import { GuildRole } from './GuildRole'; import { GuildTemplate } from './GuildTemplate'; import { Sticker } from './Sticker'; -import { BaseChannel, WebhookGuildMethods } from './channels'; -import { BaseGuild } from './extra/BaseGuild'; -import type { DiscordBase } from './extra/DiscordBase'; export interface Guild extends ObjectToLower>, DiscordBase {} export class Guild extends (BaseGuild as unknown as ToClass< diff --git a/src/structures/GuildBan.ts b/src/structures/GuildBan.ts index 2685481..e0798cb 100644 --- a/src/structures/GuildBan.ts +++ b/src/structures/GuildBan.ts @@ -3,7 +3,7 @@ import type { GuildBanStructure, GuildStructure } from '../client'; import type { UsingClient } from '../commands'; import { Formatter, type MethodContext, type ObjectToLower } from '../common'; import type { BanShorter } from '../common/shorters/bans'; -import type { APIBan, ActuallyBan, RESTGetAPIGuildBansQuery } from '../types'; +import type { ActuallyBan, APIBan, RESTGetAPIGuildBansQuery } from '../types'; import { DiscordBase } from './extra/DiscordBase'; export interface GuildBan extends DiscordBase, ObjectToLower> {} diff --git a/src/structures/Interaction.ts b/src/structures/Interaction.ts index 05281fa..5a942a6 100644 --- a/src/structures/Interaction.ts +++ b/src/structures/Interaction.ts @@ -1,3 +1,33 @@ +import type { RawFile } from '../api'; +import { ActionRow, Embed, Modal, PollBuilder, resolveAttachment, resolveFiles } from '../builders'; +import type { ReturnCache } from '../cache'; +import { + type EntitlementStructure, + type GuildRoleStructure, + type GuildStructure, + type InteractionGuildMemberStructure, + type MessageStructure, + type OptionResolverStructure, + Transformers, + type UserStructure, + type WebhookMessageStructure, +} from '../client/transformers'; +import type { ContextOptionsResolved, UsingClient } from '../commands'; +import { + type ComponentInteractionMessageUpdate, + type InteractionCreateBodyRequest, + type InteractionMessageUpdateBodyRequest, + type MessageCreateBodyRequest, + type MessageUpdateBodyRequest, + type MessageWebhookCreateBodyRequest, + type ModalCreateBodyRequest, + type ObjectToLower, + type OmitInsert, + type ToClass, + toCamelCase, + type When, +} from '../common'; +import { mix } from '../deps/mixer'; import { type APIActionRowComponent, type APIApplicationCommandAutocompleteInteraction, @@ -41,37 +71,6 @@ import { type RESTPostAPIInteractionCallbackJSONBody, type RESTPostAPIInteractionCallbackResult, } from '../types'; - -import type { RawFile } from '../api'; -import { ActionRow, Embed, Modal, PollBuilder, resolveAttachment, resolveFiles } from '../builders'; -import type { ReturnCache } from '../cache'; -import { - type EntitlementStructure, - type GuildRoleStructure, - type GuildStructure, - type InteractionGuildMemberStructure, - type MessageStructure, - type OptionResolverStructure, - Transformers, - type UserStructure, - type WebhookMessageStructure, -} from '../client/transformers'; -import type { ContextOptionsResolved, UsingClient } from '../commands'; -import { - type ComponentInteractionMessageUpdate, - type InteractionCreateBodyRequest, - type InteractionMessageUpdateBodyRequest, - type MessageCreateBodyRequest, - type MessageUpdateBodyRequest, - type MessageWebhookCreateBodyRequest, - type ModalCreateBodyRequest, - type ObjectToLower, - type OmitInsert, - type ToClass, - type When, - toCamelCase, -} from '../common'; -import { mix } from '../deps/mixer'; import { type AllChannels, channelFrom } from './'; import { DiscordBase } from './extra/DiscordBase'; import { PermissionsBitField } from './extra/Permissions'; @@ -315,7 +314,6 @@ export class BaseInteraction< switch (gateway.type) { case InteractionType.ApplicationCommandAutocomplete: return new AutocompleteInteraction(client, gateway, undefined, __reply); - // biome-ignore lint/suspicious/noFallthroughSwitchClause: bad interaction between biome and ts-server case InteractionType.ApplicationCommand: switch (gateway.data.type) { case ApplicationCommandType.ChatInput: diff --git a/src/structures/Message.ts b/src/structures/Message.ts index 91c12b1..cdad079 100644 --- a/src/structures/Message.ts +++ b/src/structures/Message.ts @@ -1,4 +1,4 @@ -import { type AllChannels, Embed, type ReturnCache, componentFactory } from '..'; +import { type AllChannels, componentFactory, Embed, type ReturnCache } from '..'; import type { ListenerOptions } from '../builders'; import { type GuildMemberStructure, @@ -11,8 +11,7 @@ import { type WebhookStructure, } from '../client/transformers'; import type { UsingClient } from '../commands'; -import { type ObjectToLower, toCamelCase } from '../common'; -import { Formatter } from '../common'; +import { Formatter, type ObjectToLower, toCamelCase } from '../common'; import type { EmojiResolvable } from '../common/types/resolvables'; import type { MessageCreateBodyRequest, MessageUpdateBodyRequest } from '../common/types/write'; import type { TopLevelComponents } from '../components'; @@ -24,8 +23,8 @@ import type { APIUser, GatewayMessageCreateDispatchData, } from '../types'; -import type { MessageWebhookMethodEditParams, MessageWebhookMethodWriteParams } from './Webhook'; import { DiscordBase } from './extra/DiscordBase'; +import type { MessageWebhookMethodEditParams, MessageWebhookMethodWriteParams } from './Webhook'; export type MessageData = APIMessage | GatewayMessageCreateDispatchData; diff --git a/src/structures/channels.ts b/src/structures/channels.ts index fd93c3b..14a4351 100644 --- a/src/structures/channels.ts +++ b/src/structures/channels.ts @@ -5,8 +5,8 @@ import { type BaseChannelStructure, type BaseGuildChannelStructure, type CategoryChannelStructure, - type DMChannelStructure, type DirectoryChannelStructure, + type DMChannelStructure, type ForumChannelStructure, type GuildMemberStructure, type GuildStructure, @@ -26,13 +26,13 @@ import type { SeyfertChannelMap, UsingClient } from '../commands'; import { type CreateInviteFromChannel, type EmojiResolvable, + fakePromise, type MessageCreateBodyRequest, type MessageUpdateBodyRequest, type MethodContext, type ObjectToLower, type StringToNumber, type ToClass, - fakePromise, } from '../common'; import { mix } from '../deps/mixer'; import { @@ -63,9 +63,9 @@ import { type ThreadAutoArchiveDuration, VideoQualityMode, } from '../types'; +import { DiscordBase } from './extra/DiscordBase'; import type { GuildMember } from './GuildMember'; import type { GuildRole } from './GuildRole'; -import { DiscordBase } from './extra/DiscordBase'; export class BaseNoEditableChannel extends DiscordBase> { declare type: T; diff --git a/src/structures/extra/BaseGuild.ts b/src/structures/extra/BaseGuild.ts index 9512aff..6dccba1 100644 --- a/src/structures/extra/BaseGuild.ts +++ b/src/structures/extra/BaseGuild.ts @@ -1,6 +1,6 @@ import type { ReturnCache, WorkerClient } from '../..'; import type { GuildStructure } from '../../client'; -import { type ObjectToLower, calculateShardId } from '../../common'; +import { calculateShardId, type ObjectToLower } from '../../common'; import type { ImageOptions } from '../../common/types/options'; import { type APIPartialGuild, GuildFeature } from '../../types'; import type { ShardManager } from '../../websocket'; diff --git a/src/structures/index.ts b/src/structures/index.ts index 3426842..c09c66c 100644 --- a/src/structures/index.ts +++ b/src/structures/index.ts @@ -1,19 +1,19 @@ export * from './AnonymousGuild'; export * from './AutoModerationRule'; export * from './ClientUser'; -export * from './Guild'; +export * from './channels'; export * from './Emoji'; +export * from './Entitlement'; +export * from './Guild'; +export * from './GuildBan'; export * from './GuildMember'; export * from './GuildPreview'; export * from './GuildRole'; export * from './GuildTemplate'; export * from './Interaction'; export * from './Message'; +export * from './Poll'; export * from './Sticker'; export * from './User'; export * from './VoiceState'; export * from './Webhook'; -export * from './channels'; -export * from './Poll'; -export * from './GuildBan'; -export * from './Entitlement'; diff --git a/src/types/index.ts b/src/types/index.ts index edd6202..633a7c0 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -23,9 +23,9 @@ */ export * from './gateway'; -export * from './rest'; export * from './payloads'; export * from './rest'; +export * from './rest'; export * from './utils'; /** diff --git a/src/types/payloads/_interactions/base.ts b/src/types/payloads/_interactions/base.ts index 57dd729..cdb0788 100644 --- a/src/types/payloads/_interactions/base.ts +++ b/src/types/payloads/_interactions/base.ts @@ -1,7 +1,6 @@ -import type { ApplicationIntegrationType, InteractionContextType } from '..'; import type { ChannelType, Permissions, Snowflake } from '../..'; - import type { LocaleString } from '../../rest'; +import type { ApplicationIntegrationType, InteractionContextType } from '..'; import type { APIAttachment, APIChannel, diff --git a/src/types/payloads/application.ts b/src/types/payloads/application.ts index 4abd10e..03f65bc 100644 --- a/src/types/payloads/application.ts +++ b/src/types/payloads/application.ts @@ -2,9 +2,9 @@ * Types extracted from https://discord.com/developers/docs/resources/application */ -import type { APIEmoji, LocalizationMap } from '.'; -import type { Permissions, Snowflake } from '..'; import type { MakeRequired } from '../../common'; +import type { Permissions, Snowflake } from '..'; +import type { APIEmoji, LocalizationMap } from '.'; import type { APIPartialGuild } from './guild'; import type { ApplicationIntegrationType } from './interactions'; import type { OAuth2Scopes } from './oauth2'; diff --git a/src/types/payloads/components.ts b/src/types/payloads/components.ts index 325792d..501f163 100644 --- a/src/types/payloads/components.ts +++ b/src/types/payloads/components.ts @@ -1,5 +1,5 @@ -import type { APIAttachment, Snowflake } from '..'; import type { Identify, MakeRequired } from '../../common'; +import type { APIAttachment, Snowflake } from '..'; import type { ChannelType } from '../utils'; /** diff --git a/src/types/payloads/guildScheduledEvent.ts b/src/types/payloads/guildScheduledEvent.ts index 3c23b3b..002d888 100644 --- a/src/types/payloads/guildScheduledEvent.ts +++ b/src/types/payloads/guildScheduledEvent.ts @@ -1,6 +1,7 @@ import type { Snowflake } from '..'; import type { APIGuildMember } from './guild'; import type { APIUser } from './user'; + interface APIGuildScheduledEventBase { /** * The id of the guild event diff --git a/src/types/payloads/index.ts b/src/types/payloads/index.ts index 2299535..04c9023 100644 --- a/src/types/payloads/index.ts +++ b/src/types/payloads/index.ts @@ -2,15 +2,18 @@ export * from './application'; export * from './auditLog'; export * from './autoModeration'; export * from './channel'; +export * from './components'; export * from './emoji'; export * from './gateway'; export * from './guild'; export * from './guildScheduledEvent'; export * from './interactions'; export * from './invite'; +export * from './monetization'; export * from './oauth2'; -export * from './poll'; export * from './permissions'; +export * from './poll'; +export * from './soundboard'; export * from './stageInstance'; export * from './sticker'; export * from './teams'; @@ -18,9 +21,6 @@ export * from './template'; export * from './user'; export * from './voice'; export * from './webhook'; -export * from './monetization'; -export * from './soundboard'; -export * from './components'; import type { LocaleString } from '../rest'; diff --git a/src/types/rest/index.ts b/src/types/rest/index.ts index 86dac20..c011ba7 100644 --- a/src/types/rest/index.ts +++ b/src/types/rest/index.ts @@ -10,16 +10,16 @@ export * from './guild'; export * from './guildScheduledEvent'; export * from './interactions'; export * from './invite'; +export * from './monetization'; export * from './oauth2'; export * from './poll'; +export * from './soundboard'; export * from './stageInstance'; export * from './sticker'; export * from './template'; export * from './user'; export * from './voice'; export * from './webhook'; -export * from './monetization'; -export * from './soundboard'; export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5; diff --git a/src/websocket/SharedTypes.ts b/src/websocket/SharedTypes.ts index 3e71444..cc6fb39 100644 --- a/src/websocket/SharedTypes.ts +++ b/src/websocket/SharedTypes.ts @@ -23,8 +23,8 @@ import type { GatewayGuildIntegrationsUpdateDispatchData, GatewayGuildMemberAddDispatchData, GatewayGuildMemberRemoveDispatchData, - GatewayGuildMemberUpdateDispatchData, GatewayGuildMembersChunkDispatchData, + GatewayGuildMemberUpdateDispatchData, GatewayGuildRoleCreateDispatchData, GatewayGuildRoleDeleteDispatchData, GatewayGuildRoleUpdateDispatchData, @@ -55,8 +55,8 @@ import type { GatewayThreadCreateDispatchData, GatewayThreadDeleteDispatchData, GatewayThreadListSyncDispatchData, - GatewayThreadMemberUpdateDispatchData, GatewayThreadMembersUpdateDispatchData, + GatewayThreadMemberUpdateDispatchData, GatewayTypingStartDispatchData, GatewayUserUpdateDispatchData, GatewayVoiceChannelEffectSendDispachData, diff --git a/src/websocket/discord/shard.ts b/src/websocket/discord/shard.ts index 182df7e..0a34ec2 100644 --- a/src/websocket/discord/shard.ts +++ b/src/websocket/discord/shard.ts @@ -1,5 +1,5 @@ import { inflateSync } from 'node:zlib'; -import { LogLevels, Logger, type MakeRequired, MergeOptions, delay, hasIntent } from '../../common'; +import { delay, hasIntent, Logger, LogLevels, type MakeRequired, MergeOptions } from '../../common'; import { type APIGuildMember, GatewayCloseCodes, @@ -56,10 +56,7 @@ export class Shard { { members: APIGuildMember[]; presences: GatewayGuildMembersChunkPresence[]; - resolve: (value: { - members: APIGuildMember[]; - presences: GatewayGuildMembersChunkPresence[]; - }) => void; + resolve: (value: { members: APIGuildMember[]; presences: GatewayGuildMembersChunkPresence[] }) => void; reject: (reason?: any) => void; } >(); @@ -138,7 +135,6 @@ export class Shard { ); // @ts-expect-error Use native websocket when using Bun - // biome-ignore lint/correctness/noUndeclaredVariables: /\ this.websocket = new BaseSocket(typeof Bun === 'undefined' ? 'ws' : 'bun', this.currentGatewayURL); this.websocket.onmessage = ({ data }: { data: string | Buffer }) => { @@ -374,10 +370,7 @@ export class Shard { ) { const nonce = Date.now().toString() + Math.random().toString(36); - let resolve: (value: { - members: APIGuildMember[]; - presences: GatewayGuildMembersChunkPresence[]; - }) => void = () => { + let resolve: (value: { members: APIGuildMember[]; presences: GatewayGuildMembersChunkPresence[] }) => void = () => { // }; let reject: (reason?: any) => void = () => { diff --git a/src/websocket/discord/sharder.ts b/src/websocket/discord/sharder.ts index 3637dd1..f9b56dc 100644 --- a/src/websocket/discord/sharder.ts +++ b/src/websocket/discord/sharder.ts @@ -1,11 +1,11 @@ import { - LogLevels, + calculateShardId, Logger, + LogLevels, + lazyLoadPackage, type MakeRequired, MergeOptions, type WatcherSendToShard, - calculateShardId, - lazyLoadPackage, } from '../../common'; import type { DeepPartial, MakeDeepPartial } from '../../common/types/util'; import { diff --git a/src/websocket/discord/socket/custom.ts b/src/websocket/discord/socket/custom.ts index 34ac455..3fdb867 100644 --- a/src/websocket/discord/socket/custom.ts +++ b/src/websocket/discord/socket/custom.ts @@ -1,4 +1,4 @@ -import { type UUID, createHash, randomBytes, randomUUID } from 'node:crypto'; +import { createHash, randomBytes, randomUUID, type UUID } from 'node:crypto'; import { request } from 'node:https'; import type { Socket } from 'node:net'; diff --git a/src/websocket/discord/workermanager.ts b/src/websocket/discord/workermanager.ts index ed8dfb1..ae5d25e 100644 --- a/src/websocket/discord/workermanager.ts +++ b/src/websocket/discord/workermanager.ts @@ -1,12 +1,12 @@ import cluster, { type Worker as ClusterWorker } from 'node:cluster'; -import { type UUID, randomUUID } from 'node:crypto'; +import { randomUUID, type UUID } from 'node:crypto'; import type { Worker as WorkerThreadsWorker } from 'node:worker_threads'; import { ApiHandler, type CustomWorkerManagerEvents, Logger, type UsingClient, type WorkerClient } from '../..'; import { type Adapter, MemoryAdapter } from '../../cache'; import { BaseClient, type InternalRuntimeConfig } from '../../client/base'; -import { BASE_HOST, type Identify, MergeOptions, type PickPartial, lazyLoadPackage } from '../../common'; +import { BASE_HOST, type Identify, lazyLoadPackage, MergeOptions, type PickPartial } from '../../common'; import type { GatewayPresenceUpdateData, GatewaySendPayload, RESTGetAPIGatewayBotResult } from '../../types'; -import { WorkerManagerDefaults, properties } from '../constants'; +import { properties, WorkerManagerDefaults } from '../constants'; import { DynamicBucket } from '../structures'; import { ConnectQueue } from '../structures/timeout'; import { Heartbeater, type WorkerHeartbeaterMessages } from './heartbeater'; diff --git a/src/websocket/index.ts b/src/websocket/index.ts index 0285137..6361ee3 100644 --- a/src/websocket/index.ts +++ b/src/websocket/index.ts @@ -1,3 +1,3 @@ -export * from './SharedTypes'; export * from './constants'; export * from './discord'; +export * from './SharedTypes'; diff --git a/src/websocket/structures/index.ts b/src/websocket/structures/index.ts index 8c6b07c..841fd12 100644 --- a/src/websocket/structures/index.ts +++ b/src/websocket/structures/index.ts @@ -1,4 +1,4 @@ -import { type Logger, delay } from '../../common'; +import { delay, type Logger } from '../../common'; /** * options of the dynamic bucket