From 434f731380a209abe8599970950c7a4fec0fd30e Mon Sep 17 00:00:00 2001 From: ZenShibata Date: Fri, 20 Oct 2023 14:58:05 +0700 Subject: [PATCH 1/9] feat: initialize bot framework --- .env_example | 10 + .gitignore | 2 + Dockerfile | 4 +- README.md | 4 +- package.json | 36 +- pnpm-lock.yaml | 1056 ++++++++++++++++- src/commands/general/PingCommand.ts | 18 + src/constants/EventEnums.ts | 25 + src/constants/config.ts | 5 + src/index.ts | 103 +- src/lib/FlagUnorderedStrategy.ts | 57 + src/lib/errors/Identifiers.ts | 9 + src/lib/errors/PreconditionError.ts | 28 + src/lib/errors/UserError.ts | 23 + .../preconditions/IPreconditionContainer.ts | 17 + .../PreconditionContainerArray.ts | 97 ++ .../PreconditionContainerSingle.ts | 50 + .../conditions/IPreconditionCondition.ts | 23 + .../conditions/PreconditionConditionAnd.ts | 17 + .../conditions/PreconditionConditionOr.ts | 27 + .../commands/messageCommandDeniedListener.ts | 18 + .../possibleMessageCommandListener.ts | 34 + .../commands/preMessageCommandRunListener.ts | 37 + src/listeners/connectionUpdateListener.ts | 33 + src/listeners/credsUpdateListener.ts | 13 + src/listeners/messagesUpsertListener.ts | 31 + src/preconditions/isDev.ts | 28 + src/preconditions/isGroup.ts | 24 + src/stores/Command.ts | 51 + src/stores/CommandStore.ts | 8 + src/stores/Listener.ts | 81 ++ src/stores/ListenerStore.ts | 8 + src/stores/Precondition.ts | 42 + src/stores/PreconditionStore.ts | 57 + src/structures/BotClient.ts | 75 ++ src/utils/Logger.ts | 39 + tsconfig.json | 2 +- 37 files changed, 2088 insertions(+), 104 deletions(-) create mode 100644 .env_example create mode 100644 src/commands/general/PingCommand.ts create mode 100644 src/constants/EventEnums.ts create mode 100644 src/constants/config.ts create mode 100644 src/lib/FlagUnorderedStrategy.ts create mode 100644 src/lib/errors/Identifiers.ts create mode 100644 src/lib/errors/PreconditionError.ts create mode 100644 src/lib/errors/UserError.ts create mode 100644 src/lib/preconditions/IPreconditionContainer.ts create mode 100644 src/lib/preconditions/PreconditionContainerArray.ts create mode 100644 src/lib/preconditions/PreconditionContainerSingle.ts create mode 100644 src/lib/preconditions/conditions/IPreconditionCondition.ts create mode 100644 src/lib/preconditions/conditions/PreconditionConditionAnd.ts create mode 100644 src/lib/preconditions/conditions/PreconditionConditionOr.ts create mode 100644 src/listeners/commands/messageCommandDeniedListener.ts create mode 100644 src/listeners/commands/possibleMessageCommandListener.ts create mode 100644 src/listeners/commands/preMessageCommandRunListener.ts create mode 100644 src/listeners/connectionUpdateListener.ts create mode 100644 src/listeners/credsUpdateListener.ts create mode 100644 src/listeners/messagesUpsertListener.ts create mode 100644 src/preconditions/isDev.ts create mode 100644 src/preconditions/isGroup.ts create mode 100644 src/stores/Command.ts create mode 100644 src/stores/CommandStore.ts create mode 100644 src/stores/Listener.ts create mode 100644 src/stores/ListenerStore.ts create mode 100644 src/stores/Precondition.ts create mode 100644 src/stores/PreconditionStore.ts create mode 100644 src/structures/BotClient.ts create mode 100644 src/utils/Logger.ts diff --git a/.env_example b/.env_example new file mode 100644 index 0000000..7599d9a --- /dev/null +++ b/.env_example @@ -0,0 +1,10 @@ +# The bot's environment (production or development) +NODE_ENV=development + +# The bot's prefix +BOT_PREFIX=/ + +# Developers' number +# Format: country code + number +# Example: 6281010101010 +DEVS=["62xxxxxxxx"] \ No newline at end of file diff --git a/.gitignore b/.gitignore index 64eda3e..0d1ae15 100644 --- a/.gitignore +++ b/.gitignore @@ -98,3 +98,5 @@ dist # TernJS port file .tern-port + +auth_state/ diff --git a/Dockerfile b/Dockerfile index 29f4a24..29df8ca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,8 +24,8 @@ RUN pnpm prune --production # Get ready for production FROM ghcr.io/hazmi35/node:20-alpine -LABEL name "template" -LABEL maintainer "Clytage " +LABEL name "katheryne" +LABEL maintainer "Zen " # Copy needed files COPY --from=build-stage /tmp/build/package.json . diff --git a/README.md b/README.md index ae7c31f..b39aa5f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# @clytage/template +# katheryne -A template to generate well-configured project base for Clytage. +A useful WhatsApp bot. \ No newline at end of file diff --git a/package.json b/package.json index c58488e..3218db1 100644 --- a/package.json +++ b/package.json @@ -1,27 +1,27 @@ { - "name": "template", - "version": "1.0.0", - "description": "A template to generate well-configured project base for Clytage.", + "name": "katheryne", + "version": "0.0.0", + "description": "A useful WhatsApp bot.", "main": "dist/index.js", "type": "module", "scripts": { - "build": "npm run lint && npm run compile", + "build": "pnpm run lint && pnpm run compile", "compile": "tsc --build tsconfig.json", "lint": "eslint . --ignore-path .gitignore --ext .ts", - "lint:fix": "npm run lint -- --fix", + "lint:fix": "pnpm run lint -- --fix", "start": "node --es-module-specifier-resolution=node .", - "start:dev": "rimraf ./dist && npm run compile && npm start" + "start:dev": "rimraf ./dist && pnpm run compile && pnpm start" }, "repository": { "type": "git", - "url": "git+https://github.com/clytage/template.git" + "url": "git+https://github.com/ZenShibata/katheryne.git" }, - "author": "Clytage ", + "author": "Zen Shibata ", "license": "AGPL-3.0", "bugs": { - "url": "https://github.com/clytage/template/issues" + "url": "https://github.com/ZenShibata/katheryne/issues" }, - "homepage": "https://github.com/clytage/template#readme", + "homepage": "https://github.com/ZenShibata/katheryne#readme", "engines": { "node": ">=16.6.0", "npm": ">=7.0.0" @@ -38,5 +38,21 @@ "eslint": "^8.47.0", "rimraf": "^5.0.5", "typescript": "^5.1.6" + }, + "dependencies": { + "@discordjs/collection": "^1.5.3", + "@hapi/boom": "^10.0.1", + "@nezuchan/decorators": "^0.1.0", + "@sapphire/lexure": "^1.1.5", + "@sapphire/pieces": "^3.7.0", + "@sapphire/result": "^2.6.4", + "@sapphire/time-utilities": "^1.7.10", + "@sapphire/utilities": "^3.13.0", + "@whiskeysockets/baileys": "^6.5.0", + "pino": "^8.16.0", + "pino-loki": "^2.1.3", + "pino-pretty": "^10.2.3", + "qrcode-terminal": "^0.12.0", + "tslib": "^2.6.2" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bbc23a1..440c444 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,50 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +dependencies: + '@discordjs/collection': + specifier: ^1.5.3 + version: 1.5.3 + '@hapi/boom': + specifier: ^10.0.1 + version: 10.0.1 + '@nezuchan/decorators': + specifier: ^0.1.0 + version: 0.1.0 + '@sapphire/lexure': + specifier: ^1.1.5 + version: 1.1.5 + '@sapphire/pieces': + specifier: ^3.7.0 + version: 3.7.0 + '@sapphire/result': + specifier: ^2.6.4 + version: 2.6.4 + '@sapphire/time-utilities': + specifier: ^1.7.10 + version: 1.7.10 + '@sapphire/utilities': + specifier: ^3.13.0 + version: 3.13.0 + '@whiskeysockets/baileys': + specifier: ^6.5.0 + version: 6.5.0(qrcode-terminal@0.12.0) + pino: + specifier: ^8.16.0 + version: 8.16.0 + pino-loki: + specifier: ^2.1.3 + version: 2.1.3 + pino-pretty: + specifier: ^10.2.3 + version: 10.2.3 + qrcode-terminal: + specifier: ^0.12.0 + version: 0.12.0 + tslib: + specifier: ^2.6.2 + version: 2.6.2 + devDependencies: '@clytage/eslint-config': specifier: ^3.0.1 @@ -34,6 +78,10 @@ packages: engines: {node: '>=0.10.0'} dev: true + /@adiwajshing/keyed-db@0.2.4: + resolution: {integrity: sha512-yprSnAtj80/VKuDqRcFFLDYltoNV8tChNwFfIgcf6PGD4sjzWIBgs08pRuTqGH5mk5wgL6PBRSsMCZqtZwzFEw==} + dev: false + /@clytage/eslint-config@3.0.1(@eslint/js@8.47.0)(@typescript-eslint/eslint-plugin@6.4.1)(@typescript-eslint/parser@6.4.1)(eslint@8.47.0)(typescript@5.1.6): resolution: {integrity: sha512-vSxaKElSjPs7jLu7qTP4K14P73UNKU3TPme2jZpr8iJ/UE20WNq2Xdv9sruCWNRc1sKd6xWEiABUtTG9nD/Tbw==} peerDependencies: @@ -57,6 +105,15 @@ packages: typescript: 5.1.6 dev: true + /@discordjs/collection@1.5.3: + resolution: {integrity: sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==} + engines: {node: '>=16.11.0'} + dev: false + + /@eshaz/web-worker@1.2.1: + resolution: {integrity: sha512-v5AKAVtM0toVD2rDCGjzhySWlXG/sG5HVialdzrxFKTAnFZNCjQelX0n2tPK0tE86jf4s3hpWlpRtOh8OObktg==} + dev: false + /@eslint-community/eslint-utils@4.4.0(eslint@8.47.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -94,6 +151,26 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@hapi/boom@10.0.1: + resolution: {integrity: sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==} + dependencies: + '@hapi/hoek': 11.0.2 + dev: false + + /@hapi/boom@9.1.4: + resolution: {integrity: sha512-Ls1oH8jaN1vNsqcaHVYJrKmgMcKsC1wcp8bujvXrHaAqD2iDYq3HoOwsxwo09Cuda5R5nC0o0IxlrlTuvPuzSw==} + dependencies: + '@hapi/hoek': 9.3.0 + dev: false + + /@hapi/hoek@11.0.2: + resolution: {integrity: sha512-aKmlCO57XFZ26wso4rJsW4oTUnrgTFw2jh3io7CAtO9w4UltBNwRXvXIVzzyfkaaLRo3nluP/19msA8vDUUuKw==} + dev: false + + /@hapi/hoek@9.3.0: + resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} + dev: false + /@humanwhocodes/config-array@0.11.10: resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} engines: {node: '>=10.10.0'} @@ -126,6 +203,13 @@ packages: wrap-ansi-cjs: /wrap-ansi@7.0.0 dev: true + /@nezuchan/decorators@0.1.0: + resolution: {integrity: sha512-g4vgL9BFjzp/0gwDSXpnmyZS4kG4TvhZe0GDSpWzhc/UM5J3VSc6LDXZIbQpWRjdHEJO4NE+xGMCQde9Am+yaQ==} + dependencies: + '@sapphire/pieces': 3.7.0 + '@sapphire/utilities': 3.13.0 + dev: false + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -154,13 +238,174 @@ packages: dev: true optional: true + /@protobufjs/aspromise@1.1.2: + resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==} + dev: false + + /@protobufjs/base64@1.1.2: + resolution: {integrity: sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==} + dev: false + + /@protobufjs/codegen@2.0.4: + resolution: {integrity: sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==} + dev: false + + /@protobufjs/eventemitter@1.1.0: + resolution: {integrity: sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==} + dev: false + + /@protobufjs/fetch@1.1.0: + resolution: {integrity: sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==} + dependencies: + '@protobufjs/aspromise': 1.1.2 + '@protobufjs/inquire': 1.1.0 + dev: false + + /@protobufjs/float@1.0.2: + resolution: {integrity: sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==} + dev: false + + /@protobufjs/inquire@1.1.0: + resolution: {integrity: sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==} + dev: false + + /@protobufjs/path@1.1.2: + resolution: {integrity: sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==} + dev: false + + /@protobufjs/pool@1.1.0: + resolution: {integrity: sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==} + dev: false + + /@protobufjs/utf8@1.1.0: + resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} + dev: false + + /@sapphire/cron@1.1.1: + resolution: {integrity: sha512-SBQepfBkwCzYBqMfYB+lrfx7AK6zVdT4lK7X4Q0SthxYS82MYw6qAiRUd24bzhaXc33KBk7g7Uljbxu98qDDJw==} + engines: {node: '>=v14.0.0', npm: '>=7.0.0'} + dependencies: + '@sapphire/utilities': 3.13.0 + dev: false + + /@sapphire/duration@1.1.0: + resolution: {integrity: sha512-ATb2pWPLcSgG7bzvT6MglUcDexFSufr2FLXUmhipWGFtZbvDhkopGBIuHyzoGy7LZvL8UY5T6pRLNdFv5pl/Lg==} + engines: {node: '>=v14.0.0', npm: '>=7.0.0'} + dev: false + + /@sapphire/lexure@1.1.5: + resolution: {integrity: sha512-afVTCLHezlyvdvvOcEeCzMA05l1yje9axtY7gWQpDcppOazskYPgGMVCdAbfHz5BsyABMZYT2MznY+phEgFc8Q==} + engines: {node: '>=v14.0.0', npm: '>=7.0.0'} + dependencies: + '@sapphire/result': 2.6.4 + dev: false + + /@sapphire/pieces@3.7.0: + resolution: {integrity: sha512-DgkcvTja63rDPP4uByH2Ky3eNaYp+Yc1WoFaOsme5w5Nptruwj49sktY6KEbdBrxz23l3ofcxaqnfT/8RROJug==} + engines: {node: '>=v14.0.0', npm: '>=7.0.0'} + dependencies: + '@discordjs/collection': 1.5.3 + '@sapphire/utilities': 3.13.0 + tslib: 2.6.2 + dev: false + + /@sapphire/result@2.6.4: + resolution: {integrity: sha512-o6rAnNbtumhR4Iy9t1p3xtOG9WtfO2OyyyaBrGUNThmhqf1cwvl5CO3/E0Hd66qdkuSqpJqC9TnnGzTmSoDd6A==} + engines: {node: '>=v14.0.0', npm: '>=7.0.0'} + dev: false + + /@sapphire/time-utilities@1.7.10: + resolution: {integrity: sha512-icmuse7m3oGJXRtweTmTT6vMMtCpWwGCpzephI5K8aQQRsfZwKYA+jAriSnT4+Lfw6LcR8j7TfkAAX7SyOOggQ==} + engines: {node: '>=v14.0.0', npm: '>=7.0.0'} + dependencies: + '@sapphire/cron': 1.1.1 + '@sapphire/duration': 1.1.0 + '@sapphire/timer-manager': 1.0.0 + '@sapphire/timestamp': 1.0.1 + dev: false + + /@sapphire/timer-manager@1.0.0: + resolution: {integrity: sha512-vxxnv75QPMGKt6IB6nL2xRJfwzcUQ9DBGzJLg6G8eS5O4u7j3IR/yr/GQsa4gIpjw6kQOgn8lUdnSTlpnERTbQ==} + engines: {node: '>=v14.0.0', npm: '>=7.0.0'} + dev: false + + /@sapphire/timestamp@1.0.1: + resolution: {integrity: sha512-uLg+rBFuBiaQY/pFGDDzZSOH2cfv4ONIB7zQGNuRCTpYKBW/iIhRBIZjJZyn8NVkXQhVi+Q94DI4i6gDhYVs7w==} + engines: {node: '>=v14.0.0', npm: '>=7.0.0'} + dev: false + + /@sapphire/utilities@3.13.0: + resolution: {integrity: sha512-BD5ycPjZX5dXxrAb90dJTY8ukpPVBXgU17gA5ghK2memS4hwAzFYpvK+R+6zh4d6HYIKVuqrVhGXjvZenAa/Aw==} + engines: {node: '>=v14.0.0', npm: '>=7.0.0'} + dev: false + + /@sindresorhus/is@4.6.0: + resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} + engines: {node: '>=10'} + dev: false + + /@szmarczak/http-timer@4.0.6: + resolution: {integrity: sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==} + engines: {node: '>=10'} + dependencies: + defer-to-connect: 2.0.1 + dev: false + + /@thi.ng/bitstream@2.2.28: + resolution: {integrity: sha512-aW7cSEaf680nfCIW42C/Hur12Toy8ST3XLRM8OxHXHZySq9cPrJ5stm+uilHlp+L00yBvgAoKk6ZWkDQ8mtYbA==} + engines: {node: '>=12.7'} + dependencies: + '@thi.ng/errors': 2.3.5 + dev: false + + /@thi.ng/errors@2.3.5: + resolution: {integrity: sha512-WH2p02goxTCF11p8H/4VIl8RmPZ7rJ00ogFOrQX7mO3zxi1/vTqygR7sVuJszlx5a5eOrMglNivyqNZwr912cg==} + engines: {node: '>=12.7'} + dev: false + + /@tokenizer/token@0.3.0: + resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==} + dev: false + + /@types/cacheable-request@6.0.3: + resolution: {integrity: sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==} + dependencies: + '@types/http-cache-semantics': 4.0.2 + '@types/keyv': 3.1.4 + '@types/node': 18.18.5 + '@types/responselike': 1.0.1 + dev: false + + /@types/http-cache-semantics@4.0.2: + resolution: {integrity: sha512-FD+nQWA2zJjh4L9+pFXqWOi0Hs1ryBCfI+985NjluQ1p8EYtoLvjLOKidXBtZ4/IcxDX4o8/E8qDS3540tNliw==} + dev: false + /@types/json-schema@7.0.12: resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==} dev: true + /@types/keyv@3.1.4: + resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} + dependencies: + '@types/node': 18.18.5 + dev: false + + /@types/long@4.0.2: + resolution: {integrity: sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==} + dev: false + + /@types/node@10.17.60: + resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==} + dev: false + /@types/node@18.18.5: resolution: {integrity: sha512-4slmbtwV59ZxitY4ixUZdy1uRLf9eSIvBWPQxNjhHYWEtn0FryfKpyS2cvADYXTayWdKEIsJengncrVvkI4I6A==} - dev: true + + /@types/responselike@1.0.1: + resolution: {integrity: sha512-TiGnitEDxj2X0j+98Eqk5lv/Cij8oHd32bU4D/Yw6AOq7vvTk0gSD2GPj0G/HkvhMoVsdlhYF4yqqlyPBTM6Sg==} + dependencies: + '@types/node': 18.18.5 + dev: false /@types/semver@7.5.0: resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} @@ -297,6 +542,72 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@wasm-audio-decoders/common@9.0.1: + resolution: {integrity: sha512-s4KxPsxhD6e+EtjmHPzTmKJSJTEXHGYlBzUGGLN/plV01x3RecybW73nIMtdLLXL8k/zQ8HYFcA6d9lqCJcDjQ==} + dependencies: + '@eshaz/web-worker': 1.2.1 + dev: false + + /@wasm-audio-decoders/flac@0.1.14: + resolution: {integrity: sha512-+ZVIXEDS4gZZn2pd7rnbiUAbHYz+ZeT0IFn2OZU5VODTg17/fjZcQGyGT4QNWY5DUQRLl+GCsIoas0UbXPV3HA==} + dependencies: + '@wasm-audio-decoders/common': 9.0.1 + codec-parser: 2.4.3 + dev: false + + /@wasm-audio-decoders/ogg-vorbis@0.1.11: + resolution: {integrity: sha512-LbsJCWxJfHKNmsmJuOiLI5gFOa/mYQsipmQZgxtXQj10/0iWW33+3APkriO/ERVl5FaH/par3mZ+5X286DBO/Q==} + dependencies: + '@wasm-audio-decoders/common': 9.0.1 + codec-parser: 2.4.3 + dev: false + + /@whiskeysockets/baileys@6.5.0(qrcode-terminal@0.12.0): + resolution: {integrity: sha512-ary0RNivsrl56wnn0ta37LwVGpCDabthERCV5lHHsbhJJFfp04g6+reiQAKvxo61oYxwxKjqq33kvID+AOr++A==} + peerDependencies: + jimp: ^0.16.1 + link-preview-js: ^3.0.0 + qrcode-terminal: ^0.12.0 + sharp: ^0.30.5 + peerDependenciesMeta: + jimp: + optional: true + link-preview-js: + optional: true + qrcode-terminal: + optional: true + sharp: + optional: true + dependencies: + '@adiwajshing/keyed-db': 0.2.4 + '@hapi/boom': 9.1.4 + audio-decode: 2.1.5 + axios: 1.5.1 + cache-manager: 5.2.4 + futoin-hkdf: 1.5.3 + libphonenumber-js: 1.10.48 + libsignal: github.com/adiwajshing/libsignal-node/11dbd962ea108187c79a7c46fe4d6f790e23da97 + music-metadata: 7.13.4 + node-cache: 5.1.2 + pino: 7.11.0 + protobufjs: 6.11.4 + qrcode-terminal: 0.12.0 + uuid: 9.0.1 + ws: 8.14.2 + transitivePeerDependencies: + - bufferutil + - debug + - supports-color + - utf-8-validate + dev: false + + /abort-controller@3.0.0: + resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} + engines: {node: '>=6.5'} + dependencies: + event-target-shim: 5.0.1 + dev: false + /acorn-jsx@5.3.2(acorn@8.10.0): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -351,9 +662,53 @@ packages: engines: {node: '>=8'} dev: true + /asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + dev: false + + /atomic-sleep@1.0.0: + resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==} + engines: {node: '>=8.0.0'} + dev: false + + /audio-buffer@5.0.0: + resolution: {integrity: sha512-gsDyj1wwUp8u7NBB+eW6yhLb9ICf+0eBmDX8NGaAS00w8/fLqFdxUlL5Ge/U8kB64DlQhdonxYC59dXy1J7H/w==} + dev: false + + /audio-decode@2.1.5: + resolution: {integrity: sha512-+dnOsHalaEwYRDOyr+A89cp9Ms7WBaFaPcFuLI1/CJO7lVPUJQyTJWEnZktfh9Aw6zCbdD48jHMg8m33pIt3NQ==} + dependencies: + '@wasm-audio-decoders/flac': 0.1.14 + '@wasm-audio-decoders/ogg-vorbis': 0.1.11 + audio-buffer: 5.0.0 + audio-type: 2.2.1 + mpg123-decoder: 0.4.9 + node-wav: 0.0.2 + ogg-opus-decoder: 1.6.6 + qoa-format: 1.0.1 + dev: false + + /audio-type@2.2.1: + resolution: {integrity: sha512-En9AY6EG1qYqEy5L/quryzbA4akBpJrnBZNxeKTqGHC2xT9Qc4aZ8b7CcbOMFTTc/MGdoNyp+SN4zInZNKxMYA==} + engines: {node: '>=14'} + dev: false + + /axios@1.5.1: + resolution: {integrity: sha512-Q28iYCWzNHjAm+yEAot5QaAMxhMghWLFVf7rRdwhUI+c2jix2DUXjAHXVi+s1ibs3mjPO/cCgbA++3BjD0vP/A==} + dependencies: + follow-redirects: 1.15.3 + form-data: 4.0.0 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + dev: false + /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: true + + /base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + dev: false /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} @@ -366,7 +721,6 @@ packages: resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} dependencies: balanced-match: 1.0.2 - dev: true /braces@3.0.2: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} @@ -375,6 +729,38 @@ packages: fill-range: 7.0.1 dev: true + /buffer@6.0.3: + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + dev: false + + /cache-manager@5.2.4: + resolution: {integrity: sha512-gkuCjug16NdGvKm/sydxGVx17uffrSWcEe2xraBtwRCgdYcFxwJAla4OYpASAZT2yhSoxgDiWL9XH6IAChcZJA==} + dependencies: + lodash.clonedeep: 4.5.0 + lru-cache: 10.0.1 + dev: false + + /cacheable-lookup@5.0.4: + resolution: {integrity: sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==} + engines: {node: '>=10.6.0'} + dev: false + + /cacheable-request@7.0.4: + resolution: {integrity: sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==} + engines: {node: '>=8'} + dependencies: + clone-response: 1.0.3 + get-stream: 5.2.0 + http-cache-semantics: 4.1.1 + keyv: 4.5.4 + lowercase-keys: 2.0.0 + normalize-url: 6.1.0 + responselike: 2.0.1 + dev: false + /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -388,6 +774,21 @@ packages: supports-color: 7.2.0 dev: true + /clone-response@1.0.3: + resolution: {integrity: sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==} + dependencies: + mimic-response: 1.0.1 + dev: false + + /clone@2.1.2: + resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==} + engines: {node: '>=0.8'} + dev: false + + /codec-parser@2.4.3: + resolution: {integrity: sha512-3dAvFtdpxn4YLstqsB2ZiJXXNg7n1j7R5ONeDuk+2kBkb39PwrCRytOFHlSWA8q5jCjW3PumeMv9q37bFHsijg==} + dev: false + /color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} @@ -399,10 +800,31 @@ packages: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} dev: true + /colorette@2.0.20: + resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} + dev: false + + /combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + dependencies: + delayed-stream: 1.0.0 + dev: false + + /commander@10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} + engines: {node: '>=14'} + dev: false + /concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true + /content-type@1.0.5: + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} + dev: false + /cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -412,6 +834,14 @@ packages: which: 2.0.2 dev: true + /curve25519-js@0.0.4: + resolution: {integrity: sha512-axn2UMEnkhyDUPWOwVKBMVIzSQy2ejH2xRGy1wq81dqRwApXfIzfbE3hIX0ZRFBIihf/KDqK158DLwESu4AK1w==} + dev: false + + /dateformat@4.6.3: + resolution: {integrity: sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==} + dev: false + /debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -422,12 +852,28 @@ packages: optional: true dependencies: ms: 2.1.2 - dev: true + + /decompress-response@6.0.0: + resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} + engines: {node: '>=10'} + dependencies: + mimic-response: 3.1.0 + dev: false /deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} dev: true + /defer-to-connect@2.0.1: + resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} + engines: {node: '>=10'} + dev: false + + /delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + dev: false + /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -442,6 +888,15 @@ packages: esutils: 2.0.3 dev: true + /duplexify@4.1.2: + resolution: {integrity: sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==} + dependencies: + end-of-stream: 1.4.4 + inherits: 2.0.4 + readable-stream: 3.6.2 + stream-shift: 1.0.1 + dev: false + /eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true @@ -454,6 +909,12 @@ packages: resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} dev: true + /end-of-stream@1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + dependencies: + once: 1.4.0 + dev: false + /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} @@ -551,6 +1012,20 @@ packages: engines: {node: '>=0.10.0'} dev: true + /event-target-shim@5.0.1: + resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} + engines: {node: '>=6'} + dev: false + + /events@3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} + dev: false + + /fast-copy@3.0.1: + resolution: {integrity: sha512-Knr7NOtK3HWRYGtHoJrjkaWepqT8thIVGAwt0p0aUs1zqkAzXZV4vo9fFNwyb5fcqK1GKYFYxldQdIDVKhUAfA==} + dev: false + /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true @@ -574,6 +1049,15 @@ packages: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true + /fast-redact@3.3.0: + resolution: {integrity: sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ==} + engines: {node: '>=6'} + dev: false + + /fast-safe-stringify@2.1.1: + resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} + dev: false + /fastq@1.15.0: resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} dependencies: @@ -587,6 +1071,15 @@ packages: flat-cache: 3.0.4 dev: true + /file-type@16.5.4: + resolution: {integrity: sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==} + engines: {node: '>=10'} + dependencies: + readable-web-to-node-stream: 3.0.2 + strtok3: 6.3.0 + token-types: 4.2.1 + dev: false + /fill-range@7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} @@ -614,6 +1107,16 @@ packages: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} dev: true + /follow-redirects@1.15.3: + resolution: {integrity: sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + dev: false + /foreground-child@3.1.1: resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} engines: {node: '>=14'} @@ -622,9 +1125,29 @@ packages: signal-exit: 4.0.2 dev: true + /form-data@4.0.0: + resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + engines: {node: '>= 6'} + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + mime-types: 2.1.35 + dev: false + /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - dev: true + + /futoin-hkdf@1.5.3: + resolution: {integrity: sha512-SewY5KdMpaoCeh7jachEWFsh1nNlaDjNHZXWqL5IGwtpEYHTgkr2+AMCgNwKWkcc0wpSYrZfR7he4WdmHFtDxQ==} + engines: {node: '>=8'} + dev: false + + /get-stream@5.2.0: + resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} + engines: {node: '>=8'} + dependencies: + pump: 3.0.0 + dev: false /glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} @@ -663,6 +1186,17 @@ packages: path-is-absolute: 1.0.1 dev: true + /glob@8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.1.6 + once: 1.4.0 + dev: false + /globals@13.20.0: resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} engines: {node: '>=8'} @@ -682,6 +1216,23 @@ packages: slash: 3.0.0 dev: true + /got@11.8.6: + resolution: {integrity: sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==} + engines: {node: '>=10.19.0'} + dependencies: + '@sindresorhus/is': 4.6.0 + '@szmarczak/http-timer': 4.0.6 + '@types/cacheable-request': 6.0.3 + '@types/responselike': 1.0.1 + cacheable-lookup: 5.0.4 + cacheable-request: 7.0.4 + decompress-response: 6.0.0 + http2-wrapper: 1.0.3 + lowercase-keys: 2.0.0 + p-cancelable: 2.1.1 + responselike: 2.0.1 + dev: false + /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true @@ -691,6 +1242,29 @@ packages: engines: {node: '>=8'} dev: true + /help-me@4.2.0: + resolution: {integrity: sha512-TAOnTB8Tz5Dw8penUuzHVrKNKlCIbwwbHnXraNJxPwf8LRtE2HlM84RYuezMFcwOJmoYOCWVDyJ8TQGxn9PgxA==} + dependencies: + glob: 8.1.0 + readable-stream: 3.6.2 + dev: false + + /http-cache-semantics@4.1.1: + resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} + dev: false + + /http2-wrapper@1.0.3: + resolution: {integrity: sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==} + engines: {node: '>=10.19.0'} + dependencies: + quick-lru: 5.1.1 + resolve-alpn: 1.2.1 + dev: false + + /ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + dev: false + /ignore@5.2.4: resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} engines: {node: '>= 4'} @@ -714,11 +1288,9 @@ packages: dependencies: once: 1.4.0 wrappy: 1.0.2 - dev: true /inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true /is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} @@ -760,6 +1332,11 @@ packages: '@pkgjs/parseargs': 0.11.0 dev: true + /joycon@3.1.1: + resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} + engines: {node: '>=10'} + dev: false + /js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true @@ -767,6 +1344,10 @@ packages: argparse: 2.0.1 dev: true + /json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + dev: false + /json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true @@ -775,6 +1356,12 @@ packages: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} dev: true + /keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + dependencies: + json-buffer: 3.0.1 + dev: false + /levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -783,6 +1370,10 @@ packages: type-check: 0.4.0 dev: true + /libphonenumber-js@1.10.48: + resolution: {integrity: sha512-Vvcgt4+o8+puIBJZLdMshPYx9nRN3/kTT7HPtOyfYrSQuN9PGBF1KUv0g07fjNzt4E4GuA7FnsLb+WeAMzyRQg==} + dev: false + /locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -790,15 +1381,33 @@ packages: p-locate: 5.0.0 dev: true + /lodash.clonedeep@4.5.0: + resolution: {integrity: sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==} + dev: false + /lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true + /long@4.0.0: + resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==} + dev: false + + /lowercase-keys@2.0.0: + resolution: {integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==} + engines: {node: '>=8'} + dev: false + /lru-cache@10.0.0: resolution: {integrity: sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==} engines: {node: 14 || >=16.14} dev: true + /lru-cache@10.0.1: + resolution: {integrity: sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==} + engines: {node: 14 || >=16.14} + dev: false + /lru-cache@6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} @@ -806,6 +1415,11 @@ packages: yallist: 4.0.0 dev: true + /media-typer@1.1.0: + resolution: {integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==} + engines: {node: '>= 0.8'} + dev: false + /merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} @@ -819,12 +1433,41 @@ packages: picomatch: 2.3.1 dev: true + /mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + dev: false + + /mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + dependencies: + mime-db: 1.52.0 + dev: false + + /mimic-response@1.0.1: + resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==} + engines: {node: '>=4'} + dev: false + + /mimic-response@3.1.0: + resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} + engines: {node: '>=10'} + dev: false + /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: brace-expansion: 1.1.11 dev: true + /minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 2.0.1 + dev: false + /minimatch@9.0.3: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} @@ -832,24 +1475,81 @@ packages: brace-expansion: 2.0.1 dev: true + /minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + dev: false + /minipass@7.0.2: resolution: {integrity: sha512-eL79dXrE1q9dBbDCLg7xfn/vl7MS4F1gvJAgjJrQli/jbQWdUttuVawphqpffoIYfRdq78LHx6GP4bU/EQ2ATA==} engines: {node: '>=16 || 14 >=14.17'} dev: true + /mpg123-decoder@0.4.9: + resolution: {integrity: sha512-l9e9BJ2/lAXjFuBB+JI+7PAPsEemHuN/LOoiFYAo/9Hu4S8hu5n+4nJMgndgiRcJ/W1CgSZ/AzXOPVdiMfxKBw==} + dependencies: + '@wasm-audio-decoders/common': 9.0.1 + dev: false + /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - dev: true + + /music-metadata@7.13.4: + resolution: {integrity: sha512-eRRoEMhhYdth2Ws24FmkvIqrtkIBE9sqjHbrRNpkg2Iux3zc37PQKRv2/r/mTtELb7XlB1uWC2UcKKX7BzNMGA==} + engines: {node: '>=10'} + dependencies: + '@tokenizer/token': 0.3.0 + content-type: 1.0.5 + debug: 4.3.4 + file-type: 16.5.4 + media-typer: 1.1.0 + strtok3: 6.3.0 + token-types: 4.2.1 + transitivePeerDependencies: + - supports-color + dev: false /natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true + /node-cache@5.1.2: + resolution: {integrity: sha512-t1QzWwnk4sjLWaQAS8CHgOJ+RAfmHpxFWmc36IWTiWHQfs0w5JDMBS1b1ZxQteo0vVVuWJvIUKHDkkeK7vIGCg==} + engines: {node: '>= 8.0.0'} + dependencies: + clone: 2.1.2 + dev: false + + /node-wav@0.0.2: + resolution: {integrity: sha512-M6Rm/bbG6De/gKGxOpeOobx/dnGuP0dz40adqx38boqHhlWssBJZgLCPBNtb9NkrmnKYiV04xELq+R6PFOnoLA==} + engines: {node: '>=4.4.0'} + dev: false + + /normalize-url@6.1.0: + resolution: {integrity: sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==} + engines: {node: '>=10'} + dev: false + + /ogg-opus-decoder@1.6.6: + resolution: {integrity: sha512-u0SVmB0RDXlWSlrFc5IqMDqYexKpxc4qUoY/ZwZLX3JJc/MXMqAL+bGnIZcGSl9213LQYK5uy1i4qbExFTIR1w==} + dependencies: + '@wasm-audio-decoders/common': 9.0.1 + codec-parser: 2.4.3 + opus-decoder: 0.7.2 + dev: false + + /on-exit-leak-free@0.2.0: + resolution: {integrity: sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg==} + dev: false + + /on-exit-leak-free@2.1.2: + resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==} + engines: {node: '>=14.0.0'} + dev: false + /once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} dependencies: wrappy: 1.0.2 - dev: true /optionator@0.9.3: resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} @@ -863,6 +1563,17 @@ packages: type-check: 0.4.0 dev: true + /opus-decoder@0.7.2: + resolution: {integrity: sha512-d0gDTCeZfMStYDRyDhfcSq3RxF0znA78P7AsJwaEdM/UjWbGfvdiE0+azTE8+4kTC4B+lenFb1js4NoOxscb5g==} + dependencies: + '@wasm-audio-decoders/common': 9.0.1 + dev: false + + /p-cancelable@2.1.1: + resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==} + engines: {node: '>=8'} + dev: false + /p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} @@ -912,30 +1623,252 @@ packages: engines: {node: '>=8'} dev: true + /peek-readable@4.1.0: + resolution: {integrity: sha512-ZI3LnwUv5nOGbQzD9c2iDG6toheuXSZP5esSHBjopsXH4dg19soufvpUGA3uohi5anFtGb2lhAVdHzH6R/Evvg==} + engines: {node: '>=8'} + dev: false + /picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} dev: true + /pino-abstract-transport@0.5.0: + resolution: {integrity: sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ==} + dependencies: + duplexify: 4.1.2 + split2: 4.2.0 + dev: false + + /pino-abstract-transport@1.1.0: + resolution: {integrity: sha512-lsleG3/2a/JIWUtf9Q5gUNErBqwIu1tUKTT3dUzaf5DySw9ra1wcqKjJjLX1VTY64Wk1eEOYsVGSaGfCK85ekA==} + dependencies: + readable-stream: 4.4.2 + split2: 4.2.0 + dev: false + + /pino-loki@2.1.3: + resolution: {integrity: sha512-CRJh2u3/5JYYLEspjBRiXxKmR759Qo/yylz/efVFLr2CWERBlsndZHscDtfCzYDxT0P47fVLnbAvIAro0PEjag==} + hasBin: true + dependencies: + commander: 10.0.1 + got: 11.8.6 + pino-abstract-transport: 1.1.0 + pump: 3.0.0 + dev: false + + /pino-pretty@10.2.3: + resolution: {integrity: sha512-4jfIUc8TC1GPUfDyMSlW1STeORqkoxec71yhxIpLDQapUu8WOuoz2TTCoidrIssyz78LZC69whBMPIKCMbi3cw==} + hasBin: true + dependencies: + colorette: 2.0.20 + dateformat: 4.6.3 + fast-copy: 3.0.1 + fast-safe-stringify: 2.1.1 + help-me: 4.2.0 + joycon: 3.1.1 + minimist: 1.2.8 + on-exit-leak-free: 2.1.2 + pino-abstract-transport: 1.1.0 + pump: 3.0.0 + readable-stream: 4.4.2 + secure-json-parse: 2.7.0 + sonic-boom: 3.7.0 + strip-json-comments: 3.1.1 + dev: false + + /pino-std-serializers@4.0.0: + resolution: {integrity: sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q==} + dev: false + + /pino-std-serializers@6.2.2: + resolution: {integrity: sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==} + dev: false + + /pino@7.11.0: + resolution: {integrity: sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg==} + hasBin: true + dependencies: + atomic-sleep: 1.0.0 + fast-redact: 3.3.0 + on-exit-leak-free: 0.2.0 + pino-abstract-transport: 0.5.0 + pino-std-serializers: 4.0.0 + process-warning: 1.0.0 + quick-format-unescaped: 4.0.4 + real-require: 0.1.0 + safe-stable-stringify: 2.4.3 + sonic-boom: 2.8.0 + thread-stream: 0.15.2 + dev: false + + /pino@8.16.0: + resolution: {integrity: sha512-UUmvQ/7KTZt/vHjhRrnyS7h+J7qPBQnpG80V56xmIC+o9IqYmQOw/UIny9S9zYDfRBR0ClouCr464EkBMIT7Fw==} + hasBin: true + dependencies: + atomic-sleep: 1.0.0 + fast-redact: 3.3.0 + on-exit-leak-free: 2.1.2 + pino-abstract-transport: 1.1.0 + pino-std-serializers: 6.2.2 + process-warning: 2.2.0 + quick-format-unescaped: 4.0.4 + real-require: 0.2.0 + safe-stable-stringify: 2.4.3 + sonic-boom: 3.7.0 + thread-stream: 2.4.1 + dev: false + /prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} dev: true + /process-warning@1.0.0: + resolution: {integrity: sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==} + dev: false + + /process-warning@2.2.0: + resolution: {integrity: sha512-/1WZ8+VQjR6avWOgHeEPd7SDQmFQ1B5mC1eRXsCm5TarlNmx/wCsa5GEaxGm05BORRtyG/Ex/3xq3TuRvq57qg==} + dev: false + + /process@0.11.10: + resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} + engines: {node: '>= 0.6.0'} + dev: false + + /protobufjs@6.11.4: + resolution: {integrity: sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw==} + hasBin: true + requiresBuild: true + dependencies: + '@protobufjs/aspromise': 1.1.2 + '@protobufjs/base64': 1.1.2 + '@protobufjs/codegen': 2.0.4 + '@protobufjs/eventemitter': 1.1.0 + '@protobufjs/fetch': 1.1.0 + '@protobufjs/float': 1.0.2 + '@protobufjs/inquire': 1.1.0 + '@protobufjs/path': 1.1.2 + '@protobufjs/pool': 1.1.0 + '@protobufjs/utf8': 1.1.0 + '@types/long': 4.0.2 + '@types/node': 18.18.5 + long: 4.0.0 + dev: false + + /protobufjs@6.8.8: + resolution: {integrity: sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw==} + hasBin: true + requiresBuild: true + dependencies: + '@protobufjs/aspromise': 1.1.2 + '@protobufjs/base64': 1.1.2 + '@protobufjs/codegen': 2.0.4 + '@protobufjs/eventemitter': 1.1.0 + '@protobufjs/fetch': 1.1.0 + '@protobufjs/float': 1.0.2 + '@protobufjs/inquire': 1.1.0 + '@protobufjs/path': 1.1.2 + '@protobufjs/pool': 1.1.0 + '@protobufjs/utf8': 1.1.0 + '@types/long': 4.0.2 + '@types/node': 10.17.60 + long: 4.0.0 + dev: false + + /proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + dev: false + + /pump@3.0.0: + resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + dev: false + /punycode@2.3.0: resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} engines: {node: '>=6'} dev: true + /qoa-format@1.0.1: + resolution: {integrity: sha512-dMB0Z6XQjdpz/Cw4Rf6RiBpQvUSPCfYlQMWvmuWlWkAT7nDQD29cVZ1SwDUB6DYJSitHENwbt90lqfI+7bvMcw==} + dependencies: + '@thi.ng/bitstream': 2.2.28 + dev: false + + /qrcode-terminal@0.12.0: + resolution: {integrity: sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==} + hasBin: true + dev: false + /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true + /quick-format-unescaped@4.0.4: + resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} + dev: false + + /quick-lru@5.1.1: + resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} + engines: {node: '>=10'} + dev: false + + /readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + dev: false + + /readable-stream@4.4.2: + resolution: {integrity: sha512-Lk/fICSyIhodxy1IDK2HazkeGjSmezAWX2egdtJnYhtzKEsBPJowlI6F6LPb5tqIQILrMbx22S5o3GuJavPusA==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dependencies: + abort-controller: 3.0.0 + buffer: 6.0.3 + events: 3.3.0 + process: 0.11.10 + string_decoder: 1.3.0 + dev: false + + /readable-web-to-node-stream@3.0.2: + resolution: {integrity: sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==} + engines: {node: '>=8'} + dependencies: + readable-stream: 3.6.2 + dev: false + + /real-require@0.1.0: + resolution: {integrity: sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg==} + engines: {node: '>= 12.13.0'} + dev: false + + /real-require@0.2.0: + resolution: {integrity: sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==} + engines: {node: '>= 12.13.0'} + dev: false + + /resolve-alpn@1.2.1: + resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} + dev: false + /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} dev: true + /responselike@2.0.1: + resolution: {integrity: sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==} + dependencies: + lowercase-keys: 2.0.0 + dev: false + /reusify@1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -962,6 +1895,19 @@ packages: queue-microtask: 1.2.3 dev: true + /safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + dev: false + + /safe-stable-stringify@2.4.3: + resolution: {integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==} + engines: {node: '>=10'} + dev: false + + /secure-json-parse@2.7.0: + resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==} + dev: false + /semver@7.5.4: resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} engines: {node: '>=10'} @@ -992,6 +1938,27 @@ packages: engines: {node: '>=8'} dev: true + /sonic-boom@2.8.0: + resolution: {integrity: sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg==} + dependencies: + atomic-sleep: 1.0.0 + dev: false + + /sonic-boom@3.7.0: + resolution: {integrity: sha512-IudtNvSqA/ObjN97tfgNmOKyDOs4dNcg4cUUsHDebqsgb8wGBBwb31LIgShNO8fye0dFI52X1+tFoKKI6Rq1Gg==} + dependencies: + atomic-sleep: 1.0.0 + dev: false + + /split2@4.2.0: + resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==} + engines: {node: '>= 10.x'} + dev: false + + /stream-shift@1.0.1: + resolution: {integrity: sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==} + dev: false + /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -1010,6 +1977,12 @@ packages: strip-ansi: 7.1.0 dev: true + /string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + dependencies: + safe-buffer: 5.2.1 + dev: false + /strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -1027,7 +2000,14 @@ packages: /strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - dev: true + + /strtok3@6.3.0: + resolution: {integrity: sha512-fZtbhtvI9I48xDSywd/somNqgUHl2L2cstmXCCif0itOf96jeW18MBSyrLuNicYQVkvpOxkZtkzujiTJ9LW5Jw==} + engines: {node: '>=10'} + dependencies: + '@tokenizer/token': 0.3.0 + peek-readable: 4.1.0 + dev: false /supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} @@ -1040,6 +2020,18 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true + /thread-stream@0.15.2: + resolution: {integrity: sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA==} + dependencies: + real-require: 0.1.0 + dev: false + + /thread-stream@2.4.1: + resolution: {integrity: sha512-d/Ex2iWd1whipbT681JmTINKw0ZwOUBZm7+Gjs64DHuX34mmw8vJL2bFAaNacaW72zYiTJxSHi5abUuOi5nsfg==} + dependencies: + real-require: 0.2.0 + dev: false + /to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -1047,6 +2039,14 @@ packages: is-number: 7.0.0 dev: true + /token-types@4.2.1: + resolution: {integrity: sha512-6udB24Q737UD/SDsKAHI9FCRP7Bqc9D/MQUV02ORQg5iskjtLJlZJNdN4kKtcdtwCeWIwIHDGaUsTsCCAa8sFQ==} + engines: {node: '>=10'} + dependencies: + '@tokenizer/token': 0.3.0 + ieee754: 1.2.1 + dev: false + /ts-api-utils@1.0.1(typescript@5.1.6): resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==} engines: {node: '>=16.13.0'} @@ -1056,6 +2056,10 @@ packages: typescript: 5.1.6 dev: true + /tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + dev: false + /type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -1080,6 +2084,15 @@ packages: punycode: 2.3.0 dev: true + /util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + dev: false + + /uuid@9.0.1: + resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} + hasBin: true + dev: false + /which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -1108,7 +2121,19 @@ packages: /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - dev: true + + /ws@8.14.2: + resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: false /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} @@ -1118,3 +2143,12 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} dev: true + + github.com/adiwajshing/libsignal-node/11dbd962ea108187c79a7c46fe4d6f790e23da97: + resolution: {tarball: https://codeload.github.com/adiwajshing/libsignal-node/tar.gz/11dbd962ea108187c79a7c46fe4d6f790e23da97} + name: libsignal + version: 2.0.1 + dependencies: + curve25519-js: 0.0.4 + protobufjs: 6.8.8 + dev: false diff --git a/src/commands/general/PingCommand.ts b/src/commands/general/PingCommand.ts new file mode 100644 index 0000000..f59b76d --- /dev/null +++ b/src/commands/general/PingCommand.ts @@ -0,0 +1,18 @@ +import { ApplyOptions } from "@nezuchan/decorators"; +import { Command, CommandMessageRunParams, CommandOptions } from "../../stores/Command.js"; +import { cast } from "@sapphire/utilities"; +import { Time } from "@sapphire/time-utilities"; + +@ApplyOptions({ + name: "ping", + description: "Check bot's latency", + preconditions: [] +}) +export class PingCommand extends Command { + public async messageRun({ data }: CommandMessageRunParams): Promise { + const latency = new Date(cast(data.messageTimestamp) * Time.Second).getTime() - Date.now(); + return this.container.client.socket?.sendMessage(data.key.remoteJid!, { + text: `🏓 Took me \`\`\`${latency.toFixed(0)}ms\`\`\` to respond` + }); + } +} diff --git a/src/constants/EventEnums.ts b/src/constants/EventEnums.ts new file mode 100644 index 0000000..5dc79cb --- /dev/null +++ b/src/constants/EventEnums.ts @@ -0,0 +1,25 @@ +export enum ListenerEvents { + ListenerError = "listenerError" +} + +export enum Events { + MessageCreate = "messageCreate", + + PreMessageParsed = "preMessageParsed", + MentionPrefixOnly = "mentionPrefixOnly", + NonPrefixedMessage = "nonPrefixedMessage", + PrefixedMessage = "prefixedMessage", + UnknownMessageCommandName = "unknownMessageCommandName", + CommandDoesNotHaveMessageCommandHandler = "commandDoesNotHaveMessageCommandHandler", + UnknownMessageCommand = "unknownMessageCommand", + + PossibleMessageCommand = "possibleMessageCommand", + PreMessageCommandRun = "preMessageCommandRun", + MessageCommandDisabled = "messageCommandDisabled", + MessageCommandDenied = "messageCommandDenied", + MessageCommandAccepted = "messageCommandAccepted", + MessageCommandError = "messageCommandError", + + RegisteringCommand = "registeringCommand", + CommandRegistered = "commandRegistered" +} diff --git a/src/constants/config.ts b/src/constants/config.ts new file mode 100644 index 0000000..3e08433 --- /dev/null +++ b/src/constants/config.ts @@ -0,0 +1,5 @@ +export const prefix = process.env.BOT_PREFIX!; +export const isDev = process.env.NODE_ENV === "development"; +export const devs: string[] = JSON.parse(process.env.DEVS ?? "[]"); + +if (typeof prefix !== "string" || prefix === "") throw new Error("BOT_PREFIX can't be empty!"); diff --git a/src/index.ts b/src/index.ts index 7d42f91..5af09c0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,79 +1,26 @@ -const hey = [ - 73, - 102, - 32, - 121, - 111, - 117, - 39, - 114, - 101, - 32, - 115, - 101, - 101, - 105, - 110, - 103, - 32, - 116, - 104, - 105, - 115, - 32, - 109, - 101, - 115, - 115, - 97, - 103, - 101, - 44, - 32, - 116, - 104, - 97, - 116, - 32, - 109, - 101, - 97, - 110, - 115, - 32, - 121, - 111, - 117, - 39, - 114, - 101, - 32, - 114, - 101, - 97, - 100, - 121, - 32, - 116, - 111, - 32, - 99, - 114, - 101, - 97, - 116, - 101, - 32, - 97, - 32, - 112, - 114, - 111, - 106, - 101, - 99, - 116, - 33 -]; +import { prefix } from "./constants/config.js"; +import { BotClient } from "./structures/BotClient.js"; -console.log(hey.map(x => String.fromCharCode(x)).join("")); +const client = new BotClient({ + fetchPrefix() { // This could be async and also take "msg" params. + return prefix; + } +}); + +void client.login(); + +process.on("warning", warn => client.logger.warn(warn, "NODEJS_WARNING:")); +process.on("exit", code => client.logger.info(`NodeJS process exited with code ${code}`)); +process.on("unhandledRejection", e => { + if (e instanceof Error) { + client.logger.error(e); + } else { + // eslint-disable-next-line @typescript-eslint/restrict-template-expressions + client.logger.error(Error(`PromiseError: ${e}`)); + } +}); + +process.on("uncaughtException", e => { + client.logger.fatal(e); + process.exit(1); +}); diff --git a/src/lib/FlagUnorderedStrategy.ts b/src/lib/FlagUnorderedStrategy.ts new file mode 100644 index 0000000..8e70bcf --- /dev/null +++ b/src/lib/FlagUnorderedStrategy.ts @@ -0,0 +1,57 @@ +/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */ +import { PrefixedStrategy } from "@sapphire/lexure"; +import { Option } from "@sapphire/result"; + +export interface FlagStrategyOptions { + flags?: boolean | readonly string[]; + options?: boolean | readonly string[]; + prefixes?: string[]; + separators?: string[]; +} + +const never = (): Option.None => Option.none; +const always = (): boolean => true; + +export class FlagUnorderedStrategy extends PrefixedStrategy { + public readonly flags: readonly string[] | true; + public readonly options: readonly string[] | true; + + public constructor({ flags, options, prefixes = ["--", "-", "—"], separators = ["=", ":"] }: FlagStrategyOptions = {}) { + super(prefixes, separators); + this.flags = flags || []; + this.options = options || []; + + if (this.flags === true) this.allowedFlag = always; + else if (this.flags.length === 0) this.matchFlag = never; + + if (this.options === true) { + this.allowedOption = always; + } else if (this.options.length === 0) { + this.matchOption = never; + } + } + + public override matchFlag(s: string): Option { + const result = super.matchFlag(s); + + if (result.isSomeAnd(value => this.allowedFlag(value))) return result; + + return Option.none; + } + + public override matchOption(s: string): Option { + const result = super.matchOption(s); + + if (result.isSomeAnd(option => this.allowedOption(option[0]))) return result; + + return Option.none; + } + + private allowedFlag(s: string): boolean { + return (this.flags as readonly string[]).includes(s); + } + + private allowedOption(s: string): boolean { + return (this.options as readonly string[]).includes(s); + } +} diff --git a/src/lib/errors/Identifiers.ts b/src/lib/errors/Identifiers.ts new file mode 100644 index 0000000..bd050ce --- /dev/null +++ b/src/lib/errors/Identifiers.ts @@ -0,0 +1,9 @@ +export enum Identifiers { + PreconditionUnavailable = "preconditionUnavailable", + + PreconditionMissingMessageHandler = "preconditionMissingMessageHandler", + PreconditionMissingChatInputHandler = "preconditionMissingChatInputHandler", + PreconditionMissingContextMenuHandler = "preconditionMissingContextMenuHandler", + PreconditionMissingContextHandler = "preconditionMissingContextHandler", + PreconditionMissingInteractionHandler = "preconditionMissingInteractionHandler" +} diff --git a/src/lib/errors/PreconditionError.ts b/src/lib/errors/PreconditionError.ts new file mode 100644 index 0000000..f77adf4 --- /dev/null +++ b/src/lib/errors/PreconditionError.ts @@ -0,0 +1,28 @@ +/* eslint-disable class-methods-use-this */ +/* eslint-disable @typescript-eslint/no-namespace */ +import { UserError } from "./UserError.js"; +import { Precondition } from "../../stores/Precondition.js"; + +/** + * Errors thrown by preconditions + * @property name This will be `'PreconditionError'` and can be used to distinguish the type of error when any error gets thrown + */ +export class PreconditionError extends UserError { + public readonly precondition: Precondition; + + public constructor(options: PreconditionError.Options) { + super({ ...options, identifier: options.identifier ?? options.precondition.name }); + this.precondition = options.precondition; + } + + public override get name(): string { + return "PreconditionError"; + } +} + +export namespace PreconditionError { + export interface Options extends Omit { + precondition: Precondition; + identifier?: string; + } +} diff --git a/src/lib/errors/UserError.ts b/src/lib/errors/UserError.ts new file mode 100644 index 0000000..8b8b9fb --- /dev/null +++ b/src/lib/errors/UserError.ts @@ -0,0 +1,23 @@ +/* eslint-disable @typescript-eslint/no-namespace */ +/* eslint-disable class-methods-use-this */ +export class UserError extends Error { + public readonly identifier: string; + public readonly context: unknown; + public constructor(options: UserError.Options) { + super(options.message); + this.identifier = options.identifier; + this.context = options.context ?? null; + } + + public override get name(): string { + return "UserError"; + } +} + +export namespace UserError { + export interface Options { + identifier: string; + message?: string; + context?: unknown; + } +} diff --git a/src/lib/preconditions/IPreconditionContainer.ts b/src/lib/preconditions/IPreconditionContainer.ts new file mode 100644 index 0000000..d5b7b6b --- /dev/null +++ b/src/lib/preconditions/IPreconditionContainer.ts @@ -0,0 +1,17 @@ +import { ArgumentStream } from "@sapphire/lexure"; +import { Result } from "@sapphire/result"; +import { Awaitable } from "@sapphire/utilities"; +import { proto } from "@whiskeysockets/baileys"; +import { Command } from "../../stores/Command.js"; +import { PreconditionContext } from "../../stores/Precondition.js"; +import { UserError } from "../errors/UserError.js"; + +export type PreconditionContainerResult = Result; + +export type PreconditionContainerReturn = Awaitable; + +export type AsyncPreconditionContainerReturn = Promise; + +export interface IPreconditionContainer { + messageRun: (args: ArgumentStream, data: proto.IWebMessageInfo, command: Command, context?: PreconditionContext) => PreconditionContainerReturn; +} diff --git a/src/lib/preconditions/PreconditionContainerArray.ts b/src/lib/preconditions/PreconditionContainerArray.ts new file mode 100644 index 0000000..1592950 --- /dev/null +++ b/src/lib/preconditions/PreconditionContainerArray.ts @@ -0,0 +1,97 @@ +import { IPreconditionContainer, PreconditionContainerReturn } from "./IPreconditionContainer.js"; +import { Collection } from "@discordjs/collection"; +import { PreconditionContainerSingle, PreconditionSingleResolvable, PreconditionSingleResolvableDetails, SimplePreconditionSingleResolvableDetails } from "./PreconditionContainerSingle.js"; +import { IPreconditionCondition } from "./conditions/IPreconditionCondition.js"; +import { PreconditionConditionAnd } from "./conditions/PreconditionConditionAnd.js"; +import { PreconditionConditionOr } from "./conditions/PreconditionConditionOr.js"; +import { PreconditionContext, PreconditionKeys, SimplePreconditionKeys } from "../../stores/Precondition.js"; +import { Command } from "../../stores/Command.js"; +import { ArgumentStream } from "@sapphire/lexure"; +import { proto } from "@whiskeysockets/baileys"; + +export enum PreconditionRunMode { + Sequential = 0, + Parallel = 1 +} + +export enum PreconditionRunCondition { + And = 0, + Or = 1 +} + +export interface PreconditionArrayResolvableDetails { + entries: readonly PreconditionEntryResolvable[]; + mode: PreconditionRunMode; +} + +export type PreconditionArrayResolvable = PreconditionArrayResolvableDetails | readonly PreconditionEntryResolvable[]; + +export type PreconditionEntryResolvable = PreconditionArrayResolvable | PreconditionSingleResolvable; + +function isSingle(entry: PreconditionEntryResolvable): entry is PreconditionSingleResolvable { + return typeof entry === "string" || Reflect.has(entry, "name"); +} + +export class PreconditionContainerArray implements IPreconditionContainer { + public readonly mode: PreconditionRunMode; + + public readonly entries: IPreconditionContainer[]; + + public readonly runCondition: PreconditionRunCondition; + + public static readonly conditions = new Collection([ + [PreconditionRunCondition.And, PreconditionConditionAnd], + [PreconditionRunCondition.Or, PreconditionConditionOr] + ]); + + public constructor(data: PreconditionArrayResolvable = [], parent: PreconditionContainerArray | null = null) { + this.entries = []; + this.runCondition = parent?.runCondition === PreconditionRunCondition.And ? PreconditionRunCondition.Or : PreconditionRunCondition.And; + + if (Array.isArray(data)) { + const casted = data as readonly PreconditionEntryResolvable[]; + + this.mode = parent?.mode ?? PreconditionRunMode.Sequential; + this.parse(casted); + } else { + const casted = data as PreconditionArrayResolvableDetails; + + this.mode = casted.mode; + this.parse(casted.entries); + } + } + + public add(entry: IPreconditionContainer): this { + this.entries.push(entry); + return this; + } + + public append(keyOrEntries: PreconditionContainerArray | SimplePreconditionKeys | SimplePreconditionSingleResolvableDetails): this; + public append(entry: PreconditionSingleResolvableDetails): this; + public append(entry: PreconditionContainerArray | PreconditionSingleResolvable): this { + this.entries.push(entry instanceof PreconditionContainerArray ? entry : new PreconditionContainerSingle(entry)); + return this; + } + + public messageRun(args: ArgumentStream, data: proto.IWebMessageInfo, command: Command, context?: PreconditionContext | undefined): PreconditionContainerReturn { + return this.mode === PreconditionRunMode.Sequential + ? this.condition.messageSequential(args, data, command, this.entries, context) + : this.condition.messageParallel(args, data, command, this.entries, context); + } + + protected parse(entries: Iterable): this { + for (const entry of entries) { + this.add( + isSingle(entry) + ? new PreconditionContainerSingle(entry) + : new PreconditionContainerArray(entry, this) + ); + } + + return this; + } + + protected get condition(): IPreconditionCondition { + return PreconditionContainerArray.conditions.get(this.runCondition)!; + } +} diff --git a/src/lib/preconditions/PreconditionContainerSingle.ts b/src/lib/preconditions/PreconditionContainerSingle.ts new file mode 100644 index 0000000..29c9840 --- /dev/null +++ b/src/lib/preconditions/PreconditionContainerSingle.ts @@ -0,0 +1,50 @@ +/* eslint-disable @typescript-eslint/no-unsafe-member-access */ +import { Result, err } from "@sapphire/result"; +import { IPreconditionContainer } from "./IPreconditionContainer.js"; +import { container } from "@sapphire/pieces"; +import { Awaitable } from "@sapphire/utilities"; +import { PreconditionContext, PreconditionKeys, SimplePreconditionKeys } from "../../stores/Precondition.js"; +import { ArgumentStream } from "@sapphire/lexure"; +import { proto } from "@whiskeysockets/baileys"; +import { UserError } from "../errors/UserError.js"; +import { Identifiers } from "../errors/Identifiers.js"; +import { Command } from "../../stores/Command.js"; + +export interface SimplePreconditionSingleResolvableDetails { + name: SimplePreconditionKeys; +} + +export interface PreconditionSingleResolvableDetails { + name: K; + context: Preconditions[K]; +} + +export type PreconditionSingleResolvable = PreconditionSingleResolvableDetails | SimplePreconditionKeys | SimplePreconditionSingleResolvableDetails; + +export class PreconditionContainerSingle implements IPreconditionContainer { + public readonly context: Record; + public readonly name: string; + + public constructor(data: PreconditionSingleResolvable) { + if (typeof data === "string") { + this.name = data; + this.context = {}; + } else { + this.context = Reflect.get(data, "context") ?? {}; + this.name = data.name; + } + } + + public messageRun(args: ArgumentStream, data: proto.IWebMessageInfo, command: Command, context?: PreconditionContext | undefined): Awaitable> { + const precondition = container.stores.get("preconditions").get(this.name); + if (precondition) { + return precondition.messageRun + ? precondition.messageRun(args, data, command, { ...context, ...this.context }) + : precondition.error({ + identifier: Identifiers.PreconditionMissingMessageHandler, + message: `The precondition "${precondition.name}" is missing a "messageRun" handler, but it was requested for the "${command.name}" command.` + }); + } + return err(new UserError({ identifier: Identifiers.PreconditionUnavailable, message: `The precondition "${this.name}" is not available.` })); + } +} diff --git a/src/lib/preconditions/conditions/IPreconditionCondition.ts b/src/lib/preconditions/conditions/IPreconditionCondition.ts new file mode 100644 index 0000000..c48b579 --- /dev/null +++ b/src/lib/preconditions/conditions/IPreconditionCondition.ts @@ -0,0 +1,23 @@ +import { ArgumentStream } from "@sapphire/lexure"; +import { proto } from "@whiskeysockets/baileys"; +import { IPreconditionContainer, PreconditionContainerReturn } from "../IPreconditionContainer.js"; +import { PreconditionContext } from "../../../stores/Precondition.js"; +import { Command } from "../../../stores/Command.js"; + +export interface IPreconditionCondition { + messageSequential: ( + args: ArgumentStream, + data: proto.IWebMessageInfo, + command: Command, + entries: readonly IPreconditionContainer[], + context?: PreconditionContext | undefined + ) => PreconditionContainerReturn; + + messageParallel: ( + args: ArgumentStream, + data: proto.IWebMessageInfo, + command: Command, + entries: readonly IPreconditionContainer[], + context?: PreconditionContext | undefined + ) => PreconditionContainerReturn; +} diff --git a/src/lib/preconditions/conditions/PreconditionConditionAnd.ts b/src/lib/preconditions/conditions/PreconditionConditionAnd.ts new file mode 100644 index 0000000..66d23a1 --- /dev/null +++ b/src/lib/preconditions/conditions/PreconditionConditionAnd.ts @@ -0,0 +1,17 @@ +import { Result } from "@sapphire/result"; +import { IPreconditionCondition } from "./IPreconditionCondition.js"; + +export const PreconditionConditionAnd: IPreconditionCondition = { + async messageSequential(args, data, command, entries, context) { + for (const child of entries) { + const result = await child.messageRun(args, data, command, context); + if (result.isErr()) return result; + } + + return Result.ok(); + }, + async messageParallel(args, data, command, entries, context) { + const results = await Promise.all(entries.map(entry => entry.messageRun(args, data, command, context))); + return results.find(res => res.isErr()) ?? Result.ok(); + } +}; diff --git a/src/lib/preconditions/conditions/PreconditionConditionOr.ts b/src/lib/preconditions/conditions/PreconditionConditionOr.ts new file mode 100644 index 0000000..b368bbc --- /dev/null +++ b/src/lib/preconditions/conditions/PreconditionConditionOr.ts @@ -0,0 +1,27 @@ +import { Result } from "@sapphire/result"; +import { IPreconditionCondition } from "./IPreconditionCondition.js"; +import { PreconditionContainerResult } from "../IPreconditionContainer.js"; + +export const PreconditionConditionOr: IPreconditionCondition = { + async messageSequential(args, data, command, entries, context) { + let error: PreconditionContainerResult | null = null; + for (const child of entries) { + const result = await child.messageRun(args, data, command, context); + if (result.isOk()) return result; + error = result; + } + + return error ?? Result.ok(); + }, + async messageParallel(args, data, command, entries, context) { + const results = await Promise.all(entries.map(entry => entry.messageRun(args, data, command, context))); + + let error: PreconditionContainerResult | null = null; + for (const result of results) { + if (result.isOk()) return result; + error = result; + } + + return error ?? Result.ok(); + } +}; diff --git a/src/listeners/commands/messageCommandDeniedListener.ts b/src/listeners/commands/messageCommandDeniedListener.ts new file mode 100644 index 0000000..492c14c --- /dev/null +++ b/src/listeners/commands/messageCommandDeniedListener.ts @@ -0,0 +1,18 @@ +import { ApplyOptions } from "@nezuchan/decorators"; +import { Listener, ListenerOptions } from "../../stores/Listener.js"; +import { Events } from "../../constants/EventEnums.js"; +import { proto } from "@whiskeysockets/baileys"; +import { Command } from "../../stores/Command.js"; +import { UserError } from "../../lib/errors/UserError.js"; + +@ApplyOptions({ + event: Events.MessageCommandDenied +}) +export class messageCommandDenied extends Listener { + public async run(res: UserError, { msg }: { msg: proto.IWebMessageInfo; command: Command; rawArgs: string[] }): Promise { + if (!res.message || Reflect.get(msg, "silent") !== undefined) return; + return this.container.client.socket?.sendMessage(msg.key.remoteJid!, { + text: res.message + }); + } +} diff --git a/src/listeners/commands/possibleMessageCommandListener.ts b/src/listeners/commands/possibleMessageCommandListener.ts new file mode 100644 index 0000000..2bdaa63 --- /dev/null +++ b/src/listeners/commands/possibleMessageCommandListener.ts @@ -0,0 +1,34 @@ +import { ApplyOptions } from "@nezuchan/decorators"; +import { Listener, ListenerOptions } from "../../stores/Listener.js"; +import { Events } from "../../constants/EventEnums.js"; +import { proto } from "@whiskeysockets/baileys"; + +@ApplyOptions({ + event: Events.PossibleMessageCommand +}) +export class possibleMessageCommandRun extends Listener { + public run(msg: proto.IWebMessageInfo, content: string): any { + const args = content.split(/ +/g); + const commandName = args[0]; + const command = this.container.client.stores.get("commands") + .find(x => x.name === commandName || x.aliases.includes(commandName)); + + if (!command) { + this.container.client.emit(Events.UnknownMessageCommand, { msg, commandName, rawArgs: args }); + return; + } + + // eslint-disable-next-line @typescript-eslint/no-unnecessary-boolean-literal-compare + if (command.enabled === false) { + this.container.client.emit(Events.MessageCommandDisabled, { msg, commandName, rawArgs: args }); + return; + } + + if (!command.messageRun) { + this.container.client.emit(Events.CommandDoesNotHaveMessageCommandHandler, { msg, commandName, rawArgs: args }); + return; + } + + return this.container.client.emit(Events.PreMessageCommandRun, { msg, command, rawArgs: args }); + } +} diff --git a/src/listeners/commands/preMessageCommandRunListener.ts b/src/listeners/commands/preMessageCommandRunListener.ts new file mode 100644 index 0000000..d06f6f2 --- /dev/null +++ b/src/listeners/commands/preMessageCommandRunListener.ts @@ -0,0 +1,37 @@ +import { ApplyOptions } from "@nezuchan/decorators"; +import { Listener, ListenerOptions } from "../../stores/Listener.js"; +import { Events } from "../../constants/EventEnums.js"; +import { proto } from "@whiskeysockets/baileys"; +import { Command } from "../../stores/Command.js"; +import { ArgumentStream, Parser } from "@sapphire/lexure"; +import { Result } from "@sapphire/result"; + +@ApplyOptions({ + event: Events.PreMessageCommandRun +}) +export class preMessageCommandRun extends Listener { + public async run({ msg, command, rawArgs }: { msg: proto.IWebMessageInfo; command: Command; rawArgs: string[] }): Promise { + const parser = new Parser(command.strategy); + const stream = new ArgumentStream(parser.run(command.lexer.run(rawArgs.join(" ")))); + const payload = { msg, command, rawArgs }; + + const globalResult = await this.container.stores.get("preconditions").messageRun(stream, msg, command, payload); + if (globalResult.isErr()) { + this.container.client.emit(Events.MessageCommandDenied, globalResult.unwrapErr(), payload); + return; + } + + const localResult = await payload.command.preconditions.messageRun(stream, msg, command, payload); + if (localResult.isErr()) { + this.container.client.emit(Events.MessageCommandDenied, localResult.unwrapErr(), payload); + return; + } + + const result = await Result.fromAsync(() => command.messageRun!({ args: stream, data: msg })); + if (result.isOk()) { + this.container.client.emit(Events.MessageCommandAccepted, payload); + } else { + this.container.client.emit(Events.MessageCommandError, result.unwrapErr(), payload); + } + } +} diff --git a/src/listeners/connectionUpdateListener.ts b/src/listeners/connectionUpdateListener.ts new file mode 100644 index 0000000..de6f26f --- /dev/null +++ b/src/listeners/connectionUpdateListener.ts @@ -0,0 +1,33 @@ +import { Listener, ListenerOptions } from "../stores/Listener.js"; +import { BaileysEventMap, DisconnectReason } from "@whiskeysockets/baileys"; +import { Boom } from "@hapi/boom"; +import { rmSync } from "node:fs"; +import { cast } from "@sapphire/utilities"; +import { ApplyOptions } from "@nezuchan/decorators"; + +@ApplyOptions({ + event: "connection.update", + emitter: "_sEmitter" +}) +export class ConnectionUpdate extends Listener { + public async run({ lastDisconnect, connection }: BaileysEventMap["connection.update"]): Promise { + // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison, @typescript-eslint/no-unnecessary-condition + const shouldReconnect = cast(lastDisconnect)?.output?.statusCode !== DisconnectReason.loggedOut; + if (connection === "close") { + this.container.client.logger.warn( + `Connection closed due to ${lastDisconnect?.error?.message ?? "unknown reason" + }, reconnecting ${shouldReconnect}` + ); + if (shouldReconnect) { + await this.container.client.login(); + } else { + rmSync(`${process.cwd()}/auth_state`, { + recursive: true, + force: true + }); + } + } else if (connection === "open") { + this.container.client.logger.info("Opened connection."); + } + } +} diff --git a/src/listeners/credsUpdateListener.ts b/src/listeners/credsUpdateListener.ts new file mode 100644 index 0000000..3a3a448 --- /dev/null +++ b/src/listeners/credsUpdateListener.ts @@ -0,0 +1,13 @@ +import { Listener, ListenerOptions } from "../stores/Listener.js"; +import { ApplyOptions } from "@nezuchan/decorators"; + +@ApplyOptions({ + event: "creds.update", + emitter: "_sEmitter" +}) +export class CredsUpdate extends Listener { + public async run(): Promise { + await this.container.client.authState?.saveCreds(); + this.container.client.logger.info("Credentials has been updated."); + } +} diff --git a/src/listeners/messagesUpsertListener.ts b/src/listeners/messagesUpsertListener.ts new file mode 100644 index 0000000..8a99306 --- /dev/null +++ b/src/listeners/messagesUpsertListener.ts @@ -0,0 +1,31 @@ +import { Listener, ListenerOptions } from "../stores/Listener.js"; +import { BaileysEventMap } from "@whiskeysockets/baileys"; +import { Events } from "../constants/EventEnums.js"; +import { ApplyOptions } from "@nezuchan/decorators"; + +@ApplyOptions({ + event: "messages.upsert", + emitter: "_sEmitter" +}) +export class MessagesUpsert extends Listener { + public run({ messages }: BaileysEventMap["messages.upsert"]): any { + const messageData = messages[0]; + const findMessage = messageData.message?.conversation?.length + ? messageData.message.conversation + : messageData.message?.extendedTextMessage?.text ?? + messageData.message?.imageMessage?.caption ?? + messageData.message?.videoMessage?.caption ?? + messageData.message?.documentWithCaptionMessage?.message + ?.documentMessage?.caption ?? + messageData.message?.groupInviteMessage?.caption ?? + messageData.message?.liveLocationMessage?.caption; + + if (messageData.key.fromMe) return; + const prefix = this.container.client.options.fetchPrefix(messageData); + if (findMessage?.startsWith(prefix)) { + this.container.client.emit( + Events.PossibleMessageCommand, messageData, findMessage.substring(1) + ); + } + } +} diff --git a/src/preconditions/isDev.ts b/src/preconditions/isDev.ts new file mode 100644 index 0000000..7f33250 --- /dev/null +++ b/src/preconditions/isDev.ts @@ -0,0 +1,28 @@ +import { ApplyOptions } from "@nezuchan/decorators"; +import { Precondition, PreconditionOptions } from "../stores/Precondition.js"; +import { ArgumentStream } from "@sapphire/lexure"; +import { proto } from "@whiskeysockets/baileys"; +import { PreconditionContainerReturn } from "../lib/preconditions/IPreconditionContainer.js"; +import { devs } from "../constants/config.js"; + +@ApplyOptions({ + name: isDev.name +}) +export class isDev extends Precondition { + public messageRun(_: ArgumentStream, data: proto.IWebMessageInfo): PreconditionContainerReturn { + const authorNumber = data.key.remoteJid?.split("@")[1] === "g.us" && data.key.participant + ? data.key.participant.split("@")[0] + : data.key.remoteJid?.split("@")[0]; + return devs.includes(authorNumber!) + ? this.ok() + : this.error({ + message: "You only can use this command inside a group chat" + }); + } +} + +declare global { + interface Preconditions { + isDev: never; + } +} diff --git a/src/preconditions/isGroup.ts b/src/preconditions/isGroup.ts new file mode 100644 index 0000000..52c4106 --- /dev/null +++ b/src/preconditions/isGroup.ts @@ -0,0 +1,24 @@ +import { ApplyOptions } from "@nezuchan/decorators"; +import { Precondition, PreconditionOptions } from "../stores/Precondition.js"; +import { ArgumentStream } from "@sapphire/lexure"; +import { proto } from "@whiskeysockets/baileys"; +import { PreconditionContainerReturn } from "../lib/preconditions/IPreconditionContainer.js"; + +@ApplyOptions({ + name: isGroup.name +}) +export class isGroup extends Precondition { + public messageRun(_: ArgumentStream, data: proto.IWebMessageInfo): PreconditionContainerReturn { + return data.key.remoteJid?.split("@")[1] === "g.us" && data.key.participant + ? this.ok() + : this.error({ + message: "You only can use this command inside a group chat" + }); + } +} + +declare global { + interface Preconditions { + isGroup: never; + } +} diff --git a/src/stores/Command.ts b/src/stores/Command.ts new file mode 100644 index 0000000..1c69226 --- /dev/null +++ b/src/stores/Command.ts @@ -0,0 +1,51 @@ +import { AliasPiece, AliasPieceOptions, PieceContext } from "@sapphire/pieces"; +import { FlagStrategyOptions, FlagUnorderedStrategy } from "../lib/FlagUnorderedStrategy.js"; +import { ArgumentStream, IUnorderedStrategy, Lexer } from "@sapphire/lexure"; +import { PreconditionContainerArray, PreconditionEntryResolvable } from "../lib/preconditions/PreconditionContainerArray.js"; +import { proto } from "@whiskeysockets/baileys"; +import { Awaitable } from "@sapphire/utilities"; + +export class Command extends AliasPiece { + public lexer: Lexer; + public fullCategory = this.location.directories; + public strategy: IUnorderedStrategy; + public preconditions: PreconditionContainerArray; + + public get category(): string | null { + return this.fullCategory.length > 0 ? this.fullCategory[0] : null; + } + + public get subCategory(): string | null { + return this.fullCategory.length > 1 ? this.fullCategory[1] : null; + } + + public get parentCategory(): string | null { + return this.fullCategory.length > 1 ? this.fullCategory[this.fullCategory.length - 1] : null; + } + + public constructor(context: PieceContext, options: CommandOptions) { + super(context, options); + + this.lexer = new Lexer({ + quotes: options.quotes ?? [ + ['"', '"'], // Double quotes + ["“", "”"], // Fancy quotes (on iOS) + ["「", "」"], // Corner brackets (CJK) + ["«", "»"] // French quotes (guillemets) + ] + }); + + this.strategy = new FlagUnorderedStrategy(options); + this.preconditions = new PreconditionContainerArray(options.preconditions); + } + + public messageRun?({ args, data }: CommandMessageRunParams): Awaitable; +} + +export interface CommandMessageRunParams { args: ArgumentStream; data: proto.IWebMessageInfo } +export interface CommandOptions extends AliasPieceOptions, FlagStrategyOptions { + quotes?: [string, string][]; + preconditions?: PreconditionEntryResolvable[]; + description: string; + usage?: string; +} diff --git a/src/stores/CommandStore.ts b/src/stores/CommandStore.ts new file mode 100644 index 0000000..42803db --- /dev/null +++ b/src/stores/CommandStore.ts @@ -0,0 +1,8 @@ +import { AliasStore } from "@sapphire/pieces"; +import { Command } from "./Command.js"; + +export class CommandStore extends AliasStore { + public constructor() { + super(Command, { name: "commands" }); + } +} \ No newline at end of file diff --git a/src/stores/Listener.ts b/src/stores/Listener.ts new file mode 100644 index 0000000..8cc8b47 --- /dev/null +++ b/src/stores/Listener.ts @@ -0,0 +1,81 @@ +/* eslint-disable no-nested-ternary */ +/* eslint-disable @typescript-eslint/no-unnecessary-condition */ +import { Piece, PieceContext, PieceOptions } from "@sapphire/pieces"; +import { Result } from "@sapphire/result"; +import { EventEmitter } from "node:events"; + +export abstract class Listener extends Piece { + public emitter: EventEmitter | null; + public event: string | symbol; + public once: boolean; + private _listener: ((...args: any[]) => void) | null; + + public constructor(context: PieceContext, options: ListenerOptions = {}) { + super(context, options); + + this.emitter = + typeof options.emitter === "undefined" + ? this.container.client + : (typeof options.emitter === "string" ? (Reflect.get(this.container.client, options.emitter) as EventEmitter) : options.emitter) ?? + null; + + this.event = options.event ?? this.name; + this.once = options.once ?? false; + + this._listener = this.emitter && this.event ? this.once ? this._runOnce.bind(this) : this._run.bind(this) : null; + + if (this.emitter === null || this._listener === null) this.enabled = false; + } + + public override onLoad(): unknown { + if (this._listener) { + const emitter = this.emitter!; + + // Baileys emitter doesn't have this + if ("getMaxListeners" in emitter) { + const maxListeners = emitter.getMaxListeners(); + if (maxListeners !== 0) emitter.setMaxListeners(maxListeners + 1); + } + + emitter[this.once ? "once" : "on"](this.event, this._listener); + } + return super.onLoad(); + } + + public override onUnload(): unknown { + if (!this.once && this._listener) { + const emitter = this.emitter!; + + // Baileys emitter doesn't have this + if ("getMaxListeners" in emitter) { + const maxListeners = emitter.getMaxListeners(); + if (maxListeners !== 0) emitter.setMaxListeners(maxListeners - 1); + } + + emitter.off(this.event, this._listener); + this._listener = null; + } + + return super.onUnload(); + } + + private async _run(...args: unknown[]): Promise { + const result = await Result.fromAsync(() => this.run(...args)); + if (result.isErr()) { + // this.container.client.emit(ListenerEvents.ListenerError, { listener: this, error: result.err().unwrap() }); + } + } + + private async _runOnce(...args: unknown[]): Promise { + await this._run(...args); + await this.unload(); + } + + public abstract run(...args: unknown[]): unknown; +} + +export interface ListenerOptions extends PieceOptions { + emitter?: EventEmitter | string; + event?: string; + once?: boolean; +} diff --git a/src/stores/ListenerStore.ts b/src/stores/ListenerStore.ts new file mode 100644 index 0000000..c53bf73 --- /dev/null +++ b/src/stores/ListenerStore.ts @@ -0,0 +1,8 @@ +import { Store } from "@sapphire/pieces"; +import { Listener } from "./Listener.js"; + +export class ListenerStore extends Store { + public constructor() { + super(Listener, { name: "listeners" }); + } +} diff --git a/src/stores/Precondition.ts b/src/stores/Precondition.ts new file mode 100644 index 0000000..2095ce2 --- /dev/null +++ b/src/stores/Precondition.ts @@ -0,0 +1,42 @@ +/* eslint-disable @typescript-eslint/no-type-alias */ +/* eslint-disable class-methods-use-this */ +import { Piece, PieceContext, PieceOptions } from "@sapphire/pieces"; +import { Awaitable } from "@sapphire/utilities"; +import { Command } from "./Command.js"; +import { Result } from "@sapphire/result"; +import { UserError } from "../lib/errors/UserError.js"; +import { PreconditionError } from "../lib/errors/PreconditionError.js"; +import { ArgumentStream } from "@sapphire/lexure"; +import { proto } from "@whiskeysockets/baileys"; + +export class Precondition extends Piece { + public readonly position: number | null; + + public constructor(context: PieceContext, options: PreconditionOptions) { + super(context, options); + this.position = options.position ?? null; + } + + public messageRun?(args: ArgumentStream, data: proto.IWebMessageInfo, command: Command, context?: PreconditionContext): Awaitable>; + + public error(options: Omit = {}): Awaitable> { + return Result.err(new PreconditionError({ precondition: this, ...options })); + } + + public ok(): Awaitable> { + return Result.ok(); + } +} + +export interface PreconditionOptions extends PieceOptions { + position?: number; +} + +export interface PreconditionContext extends Record { + external?: boolean; +} + +export type PreconditionKeys = keyof Preconditions; +export type SimplePreconditionKeys = { + [K in PreconditionKeys]: Preconditions[K] extends never ? K : never; +}[PreconditionKeys]; diff --git a/src/stores/PreconditionStore.ts b/src/stores/PreconditionStore.ts new file mode 100644 index 0000000..51a96db --- /dev/null +++ b/src/stores/PreconditionStore.ts @@ -0,0 +1,57 @@ +import { Store } from "@sapphire/pieces"; +import { Precondition, PreconditionContext } from "./Precondition.js"; +import { Command } from "./Command.js"; +import { Result } from "@sapphire/result"; +import { ArgumentStream } from "@sapphire/lexure"; +import { proto } from "@whiskeysockets/baileys"; +import { Identifiers } from "../lib/errors/Identifiers.js"; +import { UserError } from "../lib/errors/UserError.js"; + +export class PreconditionStore extends Store { + private readonly globalPreconditions: Precondition[] = []; + + public constructor() { + super(Precondition, { name: "preconditions" }); + } + + public async messageRun(args: ArgumentStream, data: proto.IWebMessageInfo, command: Command, context: PreconditionContext = {}): Promise> { + for (const precondition of this.globalPreconditions) { + const result = precondition.messageRun + ? await precondition.messageRun(args, data, command, context) + : await precondition.error({ + identifier: Identifiers.PreconditionMissingMessageHandler, + message: `The precondition "${precondition.name}" is missing a "messageRun" handler, but it was requested for the "${command.name}" command.` + }); + + if (result.isErr()) { + return result; + } + } + + return Result.ok(); + } + + public override set(key: string, value: Precondition): this { + if (value.position !== null) { + const index = this.globalPreconditions.findIndex(precondition => precondition.position! >= value.position!); + + if (index === -1) this.globalPreconditions.push(value); + else this.globalPreconditions.splice(index, 0, value); + } + + return super.set(key, value); + } + + public override delete(key: string): boolean { + const index = this.globalPreconditions.findIndex(precondition => precondition.name === key); + + if (index !== -1) this.globalPreconditions.splice(index, 1); + + return super.delete(key); + } + + public override clear(): void { + this.globalPreconditions.length = 0; + return super.clear(); + } +} diff --git a/src/structures/BotClient.ts b/src/structures/BotClient.ts new file mode 100644 index 0000000..9921f9e --- /dev/null +++ b/src/structures/BotClient.ts @@ -0,0 +1,75 @@ +import { CommandStore } from "../stores/CommandStore.js"; +import { PreconditionStore } from "../stores/PreconditionStore.js"; +import { ListenerStore } from "../stores/ListenerStore.js"; +import { makeWASocket, AuthenticationState, makeCacheableSignalKeyStore, useMultiFileAuthState, proto } from "@whiskeysockets/baileys"; +import { createLogger } from "../utils/Logger.js"; +import { Store, container, Piece } from "@sapphire/pieces"; +import { dirname, resolve } from "node:path"; +import { fileURLToPath } from "node:url"; +import EventEmitter from "node:events"; +import { isDev } from "../constants/config.js"; + +export class BotClient extends EventEmitter { + public stores = container.stores; + public socket: ReturnType | undefined; + + public logger = createLogger({ + name: "Katheryne-bot", + debug: isDev + }); + + public authState: { state: AuthenticationState; saveCreds: () => Promise } | undefined; + + public constructor(public readonly options: BotClientOptions) { + super(); + container.client = this; + } + + public async login(): Promise { + this.authState = await useMultiFileAuthState("auth_state"); + this.socket = makeWASocket({ + auth: { + creds: this.authState.state.creds, + // @ts-expect-error-next-line Baileys doesn't update the pino deps. + keys: makeCacheableSignalKeyStore(this.authState.state.keys, this.logger) + }, + printQRInTerminal: true, + // @ts-expect-error-next-line Baileys doesn't update the pino deps. + logger: this.logger + }); + + Object.assign(this, { + _sEmitter: this.socket.ev + }); + + const currentDir = dirname(fileURLToPath(import.meta.url)); + this.stores + .register(new ListenerStore() + .registerPath(resolve(currentDir, "..", "listeners"))) + .register(new CommandStore()) + .register(new PreconditionStore() + .registerPath(resolve(currentDir, "..", "preconditions"))); + + this.stores.registerPath(this.options.baseUserDirectory); + + await Promise.all([...this.stores.values()].map((store: Store) => store.unloadAll())); + await Promise.all([...this.stores.values()].map((store: Store) => store.loadAll())); + } +} + +declare module "@sapphire/pieces" { + interface Container { + client: BotClient; + } + + interface StoreRegistryEntries { + commands: CommandStore; + listeners: ListenerStore; + preconditions: PreconditionStore; + } +} + +export interface BotClientOptions { + baseUserDirectory?: string; + fetchPrefix: (msg: proto.IWebMessageInfo) => string; +} diff --git a/src/utils/Logger.ts b/src/utils/Logger.ts new file mode 100644 index 0000000..4eeaa94 --- /dev/null +++ b/src/utils/Logger.ts @@ -0,0 +1,39 @@ +import { pino, TransportTargetOptions } from "pino"; + +export interface LoggerOptions { + name: string; + debug: boolean; + bindings?: () => { pid: string }; + lokiHost?: URL; + lokiAdditionalLabels?: Record; +} + +export function createLogger(options: LoggerOptions): pino.Logger { + const targets: TransportTargetOptions[] = [ + { + target: "pino-pretty", + level: options.debug ? "debug" : "info", + options: { translateTime: "SYS:yyyy-mm-dd HH:MM:ss.l o" } + } + ]; + + if (options.lokiHost !== undefined) { + targets.push({ + target: "pino-loki", + level: options.debug ? "debug" : "info", + options: { + host: options.lokiHost.href, + labels: { application: options.name, ...options.lokiAdditionalLabels } + } + }); + } + + const logger = pino({ + name: options.name, + timestamp: true, + level: options.debug ? "debug" : "info", + // formatters: options.bindings ? { bindings: options.bindings } : undefined, + transport: { targets } + }); + return logger; +} diff --git a/tsconfig.json b/tsconfig.json index 9c74f0f..315de8c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "ESNext", - "module": "ESNext", + "module": "NodeNext", "moduleResolution": "NodeNext", "lib": [ "ESNext" From 4099f96d433d777cbc8638a83aff082776e79c24 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 07:58:54 +0000 Subject: [PATCH 2/9] chore(deps): update eslint dependencies --- package.json | 8 +-- pnpm-lock.yaml | 159 +++++++++++++++++++++++++------------------------ 2 files changed, 86 insertions(+), 81 deletions(-) diff --git a/package.json b/package.json index 3218db1..f017334 100644 --- a/package.json +++ b/package.json @@ -33,11 +33,11 @@ "devDependencies": { "@clytage/eslint-config": "^3.0.1", "@types/node": "^18.18.5", - "@typescript-eslint/eslint-plugin": "^6.4.1", - "@typescript-eslint/parser": "^6.4.1", - "eslint": "^8.47.0", + "@typescript-eslint/eslint-plugin": "^6.8.0", + "@typescript-eslint/parser": "^6.8.0", + "eslint": "^8.51.0", "rimraf": "^5.0.5", - "typescript": "^5.1.6" + "typescript": "^5.2.2" }, "dependencies": { "@discordjs/collection": "^1.5.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 440c444..78c2b8f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,25 +51,25 @@ dependencies: devDependencies: '@clytage/eslint-config': specifier: ^3.0.1 - version: 3.0.1(@eslint/js@8.47.0)(@typescript-eslint/eslint-plugin@6.4.1)(@typescript-eslint/parser@6.4.1)(eslint@8.47.0)(typescript@5.1.6) + version: 3.0.1(@eslint/js@8.47.0)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2) '@types/node': specifier: ^18.18.5 version: 18.18.5 '@typescript-eslint/eslint-plugin': - specifier: ^6.4.1 - version: 6.4.1(@typescript-eslint/parser@6.4.1)(eslint@8.47.0)(typescript@5.1.6) + specifier: ^6.8.0 + version: 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2) '@typescript-eslint/parser': - specifier: ^6.4.1 - version: 6.4.1(eslint@8.47.0)(typescript@5.1.6) + specifier: ^6.8.0 + version: 6.8.0(eslint@8.51.0)(typescript@5.2.2) eslint: - specifier: ^8.47.0 - version: 8.47.0 + specifier: ^8.51.0 + version: 8.51.0 rimraf: specifier: ^5.0.5 version: 5.0.5 typescript: - specifier: ^5.1.6 - version: 5.1.6 + specifier: ^5.2.2 + version: 5.2.2 packages: @@ -82,7 +82,7 @@ packages: resolution: {integrity: sha512-yprSnAtj80/VKuDqRcFFLDYltoNV8tChNwFfIgcf6PGD4sjzWIBgs08pRuTqGH5mk5wgL6PBRSsMCZqtZwzFEw==} dev: false - /@clytage/eslint-config@3.0.1(@eslint/js@8.47.0)(@typescript-eslint/eslint-plugin@6.4.1)(@typescript-eslint/parser@6.4.1)(eslint@8.47.0)(typescript@5.1.6): + /@clytage/eslint-config@3.0.1(@eslint/js@8.47.0)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2): resolution: {integrity: sha512-vSxaKElSjPs7jLu7qTP4K14P73UNKU3TPme2jZpr8iJ/UE20WNq2Xdv9sruCWNRc1sKd6xWEiABUtTG9nD/Tbw==} peerDependencies: '@eslint/js': ^8.44.0 @@ -99,10 +99,10 @@ packages: optional: true dependencies: '@eslint/js': 8.47.0 - '@typescript-eslint/eslint-plugin': 6.4.1(@typescript-eslint/parser@6.4.1)(eslint@8.47.0)(typescript@5.1.6) - '@typescript-eslint/parser': 6.4.1(eslint@8.47.0)(typescript@5.1.6) - eslint: 8.47.0 - typescript: 5.1.6 + '@typescript-eslint/eslint-plugin': 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.8.0(eslint@8.51.0)(typescript@5.2.2) + eslint: 8.51.0 + typescript: 5.2.2 dev: true /@discordjs/collection@1.5.3: @@ -114,13 +114,13 @@ packages: resolution: {integrity: sha512-v5AKAVtM0toVD2rDCGjzhySWlXG/sG5HVialdzrxFKTAnFZNCjQelX0n2tPK0tE86jf4s3hpWlpRtOh8OObktg==} dev: false - /@eslint-community/eslint-utils@4.4.0(eslint@8.47.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.51.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.47.0 + eslint: 8.51.0 eslint-visitor-keys: 3.4.3 dev: true @@ -151,6 +151,11 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true + /@eslint/js@8.51.0: + resolution: {integrity: sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + dev: true + /@hapi/boom@10.0.1: resolution: {integrity: sha512-ERcCZaEjdH3OgSJlyjVk8pHIFeus91CjKP3v+MpgBNp5IvGzP2l/bRiD78nqYcKPaZdbKkK5vDBVPd2ohHBlsA==} dependencies: @@ -171,11 +176,11 @@ packages: resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} dev: false - /@humanwhocodes/config-array@0.11.10: - resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} + /@humanwhocodes/config-array@0.11.12: + resolution: {integrity: sha512-NlGesA1usRNn6ctHCZ21M4/dKPgW9Nn1FypRdIKKgZOKzkVV4T1FlK5mBiLhHBCDmEbdQG0idrcXlbZfksJ+RA==} engines: {node: '>=10.10.0'} dependencies: - '@humanwhocodes/object-schema': 1.2.1 + '@humanwhocodes/object-schema': 2.0.0 debug: 4.3.4 minimatch: 3.1.2 transitivePeerDependencies: @@ -187,8 +192,8 @@ packages: engines: {node: '>=12.22'} dev: true - /@humanwhocodes/object-schema@1.2.1: - resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} + /@humanwhocodes/object-schema@2.0.0: + resolution: {integrity: sha512-9S9QrXY2K0L4AGDcSgTi9vgiCcG8VcBv4Mp7/1hDPYoswIy6Z6KO5blYto82BT8M0MZNRWmCFLpCs3HlpYGGdw==} dev: true /@isaacs/cliui@8.0.2: @@ -411,8 +416,8 @@ packages: resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} dev: true - /@typescript-eslint/eslint-plugin@6.4.1(@typescript-eslint/parser@6.4.1)(eslint@8.47.0)(typescript@5.1.6): - resolution: {integrity: sha512-3F5PtBzUW0dYlq77Lcqo13fv+58KDwUib3BddilE8ajPJT+faGgxmI9Sw+I8ZS22BYwoir9ZhNXcLi+S+I2bkw==} + /@typescript-eslint/eslint-plugin@6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2): + resolution: {integrity: sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha @@ -423,25 +428,25 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.6.2 - '@typescript-eslint/parser': 6.4.1(eslint@8.47.0)(typescript@5.1.6) - '@typescript-eslint/scope-manager': 6.4.1 - '@typescript-eslint/type-utils': 6.4.1(eslint@8.47.0)(typescript@5.1.6) - '@typescript-eslint/utils': 6.4.1(eslint@8.47.0)(typescript@5.1.6) - '@typescript-eslint/visitor-keys': 6.4.1 + '@typescript-eslint/parser': 6.8.0(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.8.0 + '@typescript-eslint/type-utils': 6.8.0(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.8.0(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.8.0 debug: 4.3.4 - eslint: 8.47.0 + eslint: 8.51.0 graphemer: 1.4.0 ignore: 5.2.4 natural-compare: 1.4.0 semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@5.1.6) - typescript: 5.1.6 + ts-api-utils: 1.0.1(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@6.4.1(eslint@8.47.0)(typescript@5.1.6): - resolution: {integrity: sha512-610G6KHymg9V7EqOaNBMtD1GgpAmGROsmfHJPXNLCU9bfIuLrkdOygltK784F6Crboyd5tBFayPB7Sf0McrQwg==} + /@typescript-eslint/parser@6.8.0(eslint@8.51.0)(typescript@5.2.2): + resolution: {integrity: sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -450,27 +455,27 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.4.1 - '@typescript-eslint/types': 6.4.1 - '@typescript-eslint/typescript-estree': 6.4.1(typescript@5.1.6) - '@typescript-eslint/visitor-keys': 6.4.1 + '@typescript-eslint/scope-manager': 6.8.0 + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.8.0 debug: 4.3.4 - eslint: 8.47.0 - typescript: 5.1.6 + eslint: 8.51.0 + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager@6.4.1: - resolution: {integrity: sha512-p/OavqOQfm4/Hdrr7kvacOSFjwQ2rrDVJRPxt/o0TOWdFnjJptnjnZ+sYDR7fi4OimvIuKp+2LCkc+rt9fIW+A==} + /@typescript-eslint/scope-manager@6.8.0: + resolution: {integrity: sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.4.1 - '@typescript-eslint/visitor-keys': 6.4.1 + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/visitor-keys': 6.8.0 dev: true - /@typescript-eslint/type-utils@6.4.1(eslint@8.47.0)(typescript@5.1.6): - resolution: {integrity: sha512-7ON8M8NXh73SGZ5XvIqWHjgX2f+vvaOarNliGhjrJnv1vdjG0LVIz+ToYfPirOoBi56jxAKLfsLm40+RvxVVXA==} + /@typescript-eslint/type-utils@6.8.0(eslint@8.51.0)(typescript@5.2.2): + resolution: {integrity: sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -479,23 +484,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.4.1(typescript@5.1.6) - '@typescript-eslint/utils': 6.4.1(eslint@8.47.0)(typescript@5.1.6) + '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.2.2) + '@typescript-eslint/utils': 6.8.0(eslint@8.51.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.47.0 - ts-api-utils: 1.0.1(typescript@5.1.6) - typescript: 5.1.6 + eslint: 8.51.0 + ts-api-utils: 1.0.1(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types@6.4.1: - resolution: {integrity: sha512-zAAopbNuYu++ijY1GV2ylCsQsi3B8QvfPHVqhGdDcbx/NK5lkqMnCGU53amAjccSpk+LfeONxwzUhDzArSfZJg==} + /@typescript-eslint/types@6.8.0: + resolution: {integrity: sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.4.1(typescript@5.1.6): - resolution: {integrity: sha512-xF6Y7SatVE/OyV93h1xGgfOkHr2iXuo8ip0gbfzaKeGGuKiAnzS+HtVhSPx8Www243bwlW8IF7X0/B62SzFftg==} + /@typescript-eslint/typescript-estree@6.8.0(typescript@5.2.2): + resolution: {integrity: sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -503,42 +508,42 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.4.1 - '@typescript-eslint/visitor-keys': 6.4.1 + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/visitor-keys': 6.8.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@5.1.6) - typescript: 5.1.6 + ts-api-utils: 1.0.1(typescript@5.2.2) + typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@6.4.1(eslint@8.47.0)(typescript@5.1.6): - resolution: {integrity: sha512-F/6r2RieNeorU0zhqZNv89s9bDZSovv3bZQpUNOmmQK1L80/cV4KEu95YUJWi75u5PhboFoKUJBnZ4FQcoqhDw==} + /@typescript-eslint/utils@6.8.0(eslint@8.51.0)(typescript@5.2.2): + resolution: {integrity: sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.47.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.51.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 6.4.1 - '@typescript-eslint/types': 6.4.1 - '@typescript-eslint/typescript-estree': 6.4.1(typescript@5.1.6) - eslint: 8.47.0 + '@typescript-eslint/scope-manager': 6.8.0 + '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.2.2) + eslint: 8.51.0 semver: 7.5.4 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys@6.4.1: - resolution: {integrity: sha512-y/TyRJsbZPkJIZQXrHfdnxVnxyKegnpEvnRGNam7s3TRR2ykGefEWOhaef00/UUN3IZxizS7BTO3svd3lCOJRQ==} + /@typescript-eslint/visitor-keys@6.8.0: + resolution: {integrity: sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.4.1 + '@typescript-eslint/types': 6.8.0 eslint-visitor-keys: 3.4.3 dev: true @@ -933,16 +938,16 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.47.0: - resolution: {integrity: sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==} + /eslint@8.51.0: + resolution: {integrity: sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.47.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.51.0) '@eslint-community/regexpp': 4.6.2 '@eslint/eslintrc': 2.1.2 - '@eslint/js': 8.47.0 - '@humanwhocodes/config-array': 0.11.10 + '@eslint/js': 8.51.0 + '@humanwhocodes/config-array': 0.11.12 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 ajv: 6.12.6 @@ -2047,13 +2052,13 @@ packages: ieee754: 1.2.1 dev: false - /ts-api-utils@1.0.1(typescript@5.1.6): + /ts-api-utils@1.0.1(typescript@5.2.2): resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==} engines: {node: '>=16.13.0'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.1.6 + typescript: 5.2.2 dev: true /tslib@2.6.2: @@ -2072,8 +2077,8 @@ packages: engines: {node: '>=10'} dev: true - /typescript@5.1.6: - resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + /typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} engines: {node: '>=14.17'} hasBin: true dev: true From ab2f43a7448b93199f109fbcff48efe6625d01a2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 22:46:09 +0000 Subject: [PATCH 3/9] chore(deps): update dependency eslint to ^8.52.0 --- package.json | 2 +- pnpm-lock.yaml | 83 ++++++++++++++++++++++++++------------------------ 2 files changed, 45 insertions(+), 40 deletions(-) diff --git a/package.json b/package.json index f017334..0c33c2a 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@types/node": "^18.18.5", "@typescript-eslint/eslint-plugin": "^6.8.0", "@typescript-eslint/parser": "^6.8.0", - "eslint": "^8.51.0", + "eslint": "^8.52.0", "rimraf": "^5.0.5", "typescript": "^5.2.2" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 78c2b8f..bffbd7f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,19 +51,19 @@ dependencies: devDependencies: '@clytage/eslint-config': specifier: ^3.0.1 - version: 3.0.1(@eslint/js@8.47.0)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2) + version: 3.0.1(@eslint/js@8.51.0)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint@8.52.0)(typescript@5.2.2) '@types/node': specifier: ^18.18.5 version: 18.18.5 '@typescript-eslint/eslint-plugin': specifier: ^6.8.0 - version: 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2) + version: 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.52.0)(typescript@5.2.2) '@typescript-eslint/parser': specifier: ^6.8.0 - version: 6.8.0(eslint@8.51.0)(typescript@5.2.2) + version: 6.8.0(eslint@8.52.0)(typescript@5.2.2) eslint: - specifier: ^8.51.0 - version: 8.51.0 + specifier: ^8.52.0 + version: 8.52.0 rimraf: specifier: ^5.0.5 version: 5.0.5 @@ -82,7 +82,7 @@ packages: resolution: {integrity: sha512-yprSnAtj80/VKuDqRcFFLDYltoNV8tChNwFfIgcf6PGD4sjzWIBgs08pRuTqGH5mk5wgL6PBRSsMCZqtZwzFEw==} dev: false - /@clytage/eslint-config@3.0.1(@eslint/js@8.47.0)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2): + /@clytage/eslint-config@3.0.1(@eslint/js@8.51.0)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint@8.52.0)(typescript@5.2.2): resolution: {integrity: sha512-vSxaKElSjPs7jLu7qTP4K14P73UNKU3TPme2jZpr8iJ/UE20WNq2Xdv9sruCWNRc1sKd6xWEiABUtTG9nD/Tbw==} peerDependencies: '@eslint/js': ^8.44.0 @@ -98,10 +98,10 @@ packages: typescript: optional: true dependencies: - '@eslint/js': 8.47.0 - '@typescript-eslint/eslint-plugin': 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/parser': 6.8.0(eslint@8.51.0)(typescript@5.2.2) - eslint: 8.51.0 + '@eslint/js': 8.51.0 + '@typescript-eslint/eslint-plugin': 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.8.0(eslint@8.52.0)(typescript@5.2.2) + eslint: 8.52.0 typescript: 5.2.2 dev: true @@ -114,13 +114,13 @@ packages: resolution: {integrity: sha512-v5AKAVtM0toVD2rDCGjzhySWlXG/sG5HVialdzrxFKTAnFZNCjQelX0n2tPK0tE86jf4s3hpWlpRtOh8OObktg==} dev: false - /@eslint-community/eslint-utils@4.4.0(eslint@8.51.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.52.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.51.0 + eslint: 8.52.0 eslint-visitor-keys: 3.4.3 dev: true @@ -146,13 +146,13 @@ packages: - supports-color dev: true - /@eslint/js@8.47.0: - resolution: {integrity: sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==} + /@eslint/js@8.51.0: + resolution: {integrity: sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@eslint/js@8.51.0: - resolution: {integrity: sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg==} + /@eslint/js@8.52.0: + resolution: {integrity: sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -176,11 +176,11 @@ packages: resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} dev: false - /@humanwhocodes/config-array@0.11.12: - resolution: {integrity: sha512-NlGesA1usRNn6ctHCZ21M4/dKPgW9Nn1FypRdIKKgZOKzkVV4T1FlK5mBiLhHBCDmEbdQG0idrcXlbZfksJ+RA==} + /@humanwhocodes/config-array@0.11.13: + resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} engines: {node: '>=10.10.0'} dependencies: - '@humanwhocodes/object-schema': 2.0.0 + '@humanwhocodes/object-schema': 2.0.1 debug: 4.3.4 minimatch: 3.1.2 transitivePeerDependencies: @@ -192,8 +192,8 @@ packages: engines: {node: '>=12.22'} dev: true - /@humanwhocodes/object-schema@2.0.0: - resolution: {integrity: sha512-9S9QrXY2K0L4AGDcSgTi9vgiCcG8VcBv4Mp7/1hDPYoswIy6Z6KO5blYto82BT8M0MZNRWmCFLpCs3HlpYGGdw==} + /@humanwhocodes/object-schema@2.0.1: + resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} dev: true /@isaacs/cliui@8.0.2: @@ -416,7 +416,7 @@ packages: resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} dev: true - /@typescript-eslint/eslint-plugin@6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.51.0)(typescript@5.2.2): + /@typescript-eslint/eslint-plugin@6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.52.0)(typescript@5.2.2): resolution: {integrity: sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -428,13 +428,13 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.6.2 - '@typescript-eslint/parser': 6.8.0(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.8.0(eslint@8.52.0)(typescript@5.2.2) '@typescript-eslint/scope-manager': 6.8.0 - '@typescript-eslint/type-utils': 6.8.0(eslint@8.51.0)(typescript@5.2.2) - '@typescript-eslint/utils': 6.8.0(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/type-utils': 6.8.0(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.8.0(eslint@8.52.0)(typescript@5.2.2) '@typescript-eslint/visitor-keys': 6.8.0 debug: 4.3.4 - eslint: 8.51.0 + eslint: 8.52.0 graphemer: 1.4.0 ignore: 5.2.4 natural-compare: 1.4.0 @@ -445,7 +445,7 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@6.8.0(eslint@8.51.0)(typescript@5.2.2): + /@typescript-eslint/parser@6.8.0(eslint@8.52.0)(typescript@5.2.2): resolution: {integrity: sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -460,7 +460,7 @@ packages: '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.2.2) '@typescript-eslint/visitor-keys': 6.8.0 debug: 4.3.4 - eslint: 8.51.0 + eslint: 8.52.0 typescript: 5.2.2 transitivePeerDependencies: - supports-color @@ -474,7 +474,7 @@ packages: '@typescript-eslint/visitor-keys': 6.8.0 dev: true - /@typescript-eslint/type-utils@6.8.0(eslint@8.51.0)(typescript@5.2.2): + /@typescript-eslint/type-utils@6.8.0(eslint@8.52.0)(typescript@5.2.2): resolution: {integrity: sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -485,9 +485,9 @@ packages: optional: true dependencies: '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.2.2) - '@typescript-eslint/utils': 6.8.0(eslint@8.51.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.8.0(eslint@8.52.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.51.0 + eslint: 8.52.0 ts-api-utils: 1.0.1(typescript@5.2.2) typescript: 5.2.2 transitivePeerDependencies: @@ -520,19 +520,19 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@6.8.0(eslint@8.51.0)(typescript@5.2.2): + /@typescript-eslint/utils@6.8.0(eslint@8.52.0)(typescript@5.2.2): resolution: {integrity: sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.51.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.52.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.0 '@typescript-eslint/scope-manager': 6.8.0 '@typescript-eslint/types': 6.8.0 '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.2.2) - eslint: 8.51.0 + eslint: 8.52.0 semver: 7.5.4 transitivePeerDependencies: - supports-color @@ -547,6 +547,10 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@ungap/structured-clone@1.2.0: + resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} + dev: true + /@wasm-audio-decoders/common@9.0.1: resolution: {integrity: sha512-s4KxPsxhD6e+EtjmHPzTmKJSJTEXHGYlBzUGGLN/plV01x3RecybW73nIMtdLLXL8k/zQ8HYFcA6d9lqCJcDjQ==} dependencies: @@ -938,18 +942,19 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.51.0: - resolution: {integrity: sha512-2WuxRZBrlwnXi+/vFSJyjMqrNjtJqiasMzehF0shoLaW7DzS3/9Yvrmq5JiT66+pNjiX4UBnLDiKHcWAr/OInA==} + /eslint@8.52.0: + resolution: {integrity: sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.51.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.52.0) '@eslint-community/regexpp': 4.6.2 '@eslint/eslintrc': 2.1.2 - '@eslint/js': 8.51.0 - '@humanwhocodes/config-array': 0.11.12 + '@eslint/js': 8.52.0 + '@humanwhocodes/config-array': 0.11.13 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 + '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 From 4a8a55ef8f8bfab98251b369c5f76c050bf7fe39 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 18:34:45 +0000 Subject: [PATCH 4/9] chore(deps): update all non-major dependencies --- package.json | 4 ++-- pnpm-lock.yaml | 35 +++++++++++++++-------------------- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 0c33c2a..92c2a7a 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@clytage/eslint-config": "^3.0.1", - "@types/node": "^18.18.5", + "@types/node": "^18.18.6", "@typescript-eslint/eslint-plugin": "^6.8.0", "@typescript-eslint/parser": "^6.8.0", "eslint": "^8.52.0", @@ -49,7 +49,7 @@ "@sapphire/time-utilities": "^1.7.10", "@sapphire/utilities": "^3.13.0", "@whiskeysockets/baileys": "^6.5.0", - "pino": "^8.16.0", + "pino": "^8.16.1", "pino-loki": "^2.1.3", "pino-pretty": "^10.2.3", "qrcode-terminal": "^0.12.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bffbd7f..e0243e3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,8 +33,8 @@ dependencies: specifier: ^6.5.0 version: 6.5.0(qrcode-terminal@0.12.0) pino: - specifier: ^8.16.0 - version: 8.16.0 + specifier: ^8.16.1 + version: 8.16.1 pino-loki: specifier: ^2.1.3 version: 2.1.3 @@ -51,10 +51,10 @@ dependencies: devDependencies: '@clytage/eslint-config': specifier: ^3.0.1 - version: 3.0.1(@eslint/js@8.51.0)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint@8.52.0)(typescript@5.2.2) + version: 3.0.1(@eslint/js@8.52.0)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint@8.52.0)(typescript@5.2.2) '@types/node': - specifier: ^18.18.5 - version: 18.18.5 + specifier: ^18.18.6 + version: 18.18.6 '@typescript-eslint/eslint-plugin': specifier: ^6.8.0 version: 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.52.0)(typescript@5.2.2) @@ -82,7 +82,7 @@ packages: resolution: {integrity: sha512-yprSnAtj80/VKuDqRcFFLDYltoNV8tChNwFfIgcf6PGD4sjzWIBgs08pRuTqGH5mk5wgL6PBRSsMCZqtZwzFEw==} dev: false - /@clytage/eslint-config@3.0.1(@eslint/js@8.51.0)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint@8.52.0)(typescript@5.2.2): + /@clytage/eslint-config@3.0.1(@eslint/js@8.52.0)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint@8.52.0)(typescript@5.2.2): resolution: {integrity: sha512-vSxaKElSjPs7jLu7qTP4K14P73UNKU3TPme2jZpr8iJ/UE20WNq2Xdv9sruCWNRc1sKd6xWEiABUtTG9nD/Tbw==} peerDependencies: '@eslint/js': ^8.44.0 @@ -98,7 +98,7 @@ packages: typescript: optional: true dependencies: - '@eslint/js': 8.51.0 + '@eslint/js': 8.52.0 '@typescript-eslint/eslint-plugin': 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.52.0)(typescript@5.2.2) '@typescript-eslint/parser': 6.8.0(eslint@8.52.0)(typescript@5.2.2) eslint: 8.52.0 @@ -146,11 +146,6 @@ packages: - supports-color dev: true - /@eslint/js@8.51.0: - resolution: {integrity: sha512-HxjQ8Qn+4SI3/AFv6sOrDB+g6PpUTDwSJiQqOrnneEk8L71161srI9gjzzZvYVbzHiVg/BvcH95+cK/zfIt4pg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - /@eslint/js@8.52.0: resolution: {integrity: sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -377,7 +372,7 @@ packages: dependencies: '@types/http-cache-semantics': 4.0.2 '@types/keyv': 3.1.4 - '@types/node': 18.18.5 + '@types/node': 18.18.6 '@types/responselike': 1.0.1 dev: false @@ -392,7 +387,7 @@ packages: /@types/keyv@3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 18.18.5 + '@types/node': 18.18.6 dev: false /@types/long@4.0.2: @@ -403,13 +398,13 @@ packages: resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==} dev: false - /@types/node@18.18.5: - resolution: {integrity: sha512-4slmbtwV59ZxitY4ixUZdy1uRLf9eSIvBWPQxNjhHYWEtn0FryfKpyS2cvADYXTayWdKEIsJengncrVvkI4I6A==} + /@types/node@18.18.6: + resolution: {integrity: sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==} /@types/responselike@1.0.1: resolution: {integrity: sha512-TiGnitEDxj2X0j+98Eqk5lv/Cij8oHd32bU4D/Yw6AOq7vvTk0gSD2GPj0G/HkvhMoVsdlhYF4yqqlyPBTM6Sg==} dependencies: - '@types/node': 18.18.5 + '@types/node': 18.18.6 dev: false /@types/semver@7.5.0: @@ -1712,8 +1707,8 @@ packages: thread-stream: 0.15.2 dev: false - /pino@8.16.0: - resolution: {integrity: sha512-UUmvQ/7KTZt/vHjhRrnyS7h+J7qPBQnpG80V56xmIC+o9IqYmQOw/UIny9S9zYDfRBR0ClouCr464EkBMIT7Fw==} + /pino@8.16.1: + resolution: {integrity: sha512-3bKsVhBmgPjGV9pyn4fO/8RtoVDR8ssW1ev819FsRXlRNgW8gR/9Kx+gCK4UPWd4JjrRDLWpzd/pb1AyWm3MGA==} hasBin: true dependencies: atomic-sleep: 1.0.0 @@ -1763,7 +1758,7 @@ packages: '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 '@types/long': 4.0.2 - '@types/node': 18.18.5 + '@types/node': 18.18.6 long: 4.0.0 dev: false From 224579a016969bac2d2794a2e128a61451c2c254 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 22:31:52 +0000 Subject: [PATCH 5/9] chore(deps): update eslint dependencies to ^6.9.0 --- package.json | 4 +-- pnpm-lock.yaml | 94 +++++++++++++++++++++++--------------------------- 2 files changed, 46 insertions(+), 52 deletions(-) diff --git a/package.json b/package.json index 92c2a7a..92379e5 100644 --- a/package.json +++ b/package.json @@ -33,8 +33,8 @@ "devDependencies": { "@clytage/eslint-config": "^3.0.1", "@types/node": "^18.18.6", - "@typescript-eslint/eslint-plugin": "^6.8.0", - "@typescript-eslint/parser": "^6.8.0", + "@typescript-eslint/eslint-plugin": "^6.9.0", + "@typescript-eslint/parser": "^6.9.0", "eslint": "^8.52.0", "rimraf": "^5.0.5", "typescript": "^5.2.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e0243e3..ad1aa2b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,16 +51,16 @@ dependencies: devDependencies: '@clytage/eslint-config': specifier: ^3.0.1 - version: 3.0.1(@eslint/js@8.52.0)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint@8.52.0)(typescript@5.2.2) + version: 3.0.1(@eslint/js@8.52.0)(@typescript-eslint/eslint-plugin@6.9.0)(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.2.2) '@types/node': specifier: ^18.18.6 version: 18.18.6 '@typescript-eslint/eslint-plugin': - specifier: ^6.8.0 - version: 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.52.0)(typescript@5.2.2) + specifier: ^6.9.0 + version: 6.9.0(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.2.2) '@typescript-eslint/parser': - specifier: ^6.8.0 - version: 6.8.0(eslint@8.52.0)(typescript@5.2.2) + specifier: ^6.9.0 + version: 6.9.0(eslint@8.52.0)(typescript@5.2.2) eslint: specifier: ^8.52.0 version: 8.52.0 @@ -82,7 +82,7 @@ packages: resolution: {integrity: sha512-yprSnAtj80/VKuDqRcFFLDYltoNV8tChNwFfIgcf6PGD4sjzWIBgs08pRuTqGH5mk5wgL6PBRSsMCZqtZwzFEw==} dev: false - /@clytage/eslint-config@3.0.1(@eslint/js@8.52.0)(@typescript-eslint/eslint-plugin@6.8.0)(@typescript-eslint/parser@6.8.0)(eslint@8.52.0)(typescript@5.2.2): + /@clytage/eslint-config@3.0.1(@eslint/js@8.52.0)(@typescript-eslint/eslint-plugin@6.9.0)(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.2.2): resolution: {integrity: sha512-vSxaKElSjPs7jLu7qTP4K14P73UNKU3TPme2jZpr8iJ/UE20WNq2Xdv9sruCWNRc1sKd6xWEiABUtTG9nD/Tbw==} peerDependencies: '@eslint/js': ^8.44.0 @@ -99,8 +99,8 @@ packages: optional: true dependencies: '@eslint/js': 8.52.0 - '@typescript-eslint/eslint-plugin': 6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.52.0)(typescript@5.2.2) - '@typescript-eslint/parser': 6.8.0(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/eslint-plugin': 6.9.0(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.9.0(eslint@8.52.0)(typescript@5.2.2) eslint: 8.52.0 typescript: 5.2.2 dev: true @@ -411,8 +411,8 @@ packages: resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} dev: true - /@typescript-eslint/eslint-plugin@6.8.0(@typescript-eslint/parser@6.8.0)(eslint@8.52.0)(typescript@5.2.2): - resolution: {integrity: sha512-GosF4238Tkes2SHPQ1i8f6rMtG6zlKwMEB0abqSJ3Npvos+doIlc/ATG+vX1G9coDF3Ex78zM3heXHLyWEwLUw==} + /@typescript-eslint/eslint-plugin@6.9.0(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.2.2): + resolution: {integrity: sha512-lgX7F0azQwRPB7t7WAyeHWVfW1YJ9NIgd9mvGhfQpRY56X6AVf8mwM8Wol+0z4liE7XX3QOt8MN1rUKCfSjRIA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha @@ -423,11 +423,11 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.6.2 - '@typescript-eslint/parser': 6.8.0(eslint@8.52.0)(typescript@5.2.2) - '@typescript-eslint/scope-manager': 6.8.0 - '@typescript-eslint/type-utils': 6.8.0(eslint@8.52.0)(typescript@5.2.2) - '@typescript-eslint/utils': 6.8.0(eslint@8.52.0)(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 6.8.0 + '@typescript-eslint/parser': 6.9.0(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.9.0 + '@typescript-eslint/type-utils': 6.9.0(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.9.0(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.9.0 debug: 4.3.4 eslint: 8.52.0 graphemer: 1.4.0 @@ -440,8 +440,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@6.8.0(eslint@8.52.0)(typescript@5.2.2): - resolution: {integrity: sha512-5tNs6Bw0j6BdWuP8Fx+VH4G9fEPDxnVI7yH1IAPkQH5RUtvKwRoqdecAPdQXv4rSOADAaz1LFBZvZG7VbXivSg==} + /@typescript-eslint/parser@6.9.0(eslint@8.52.0)(typescript@5.2.2): + resolution: {integrity: sha512-GZmjMh4AJ/5gaH4XF2eXA8tMnHWP+Pm1mjQR2QN4Iz+j/zO04b9TOvJYOX2sCNIQHtRStKTxRY1FX7LhpJT4Gw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -450,10 +450,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.8.0 - '@typescript-eslint/types': 6.8.0 - '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 6.8.0 + '@typescript-eslint/scope-manager': 6.9.0 + '@typescript-eslint/types': 6.9.0 + '@typescript-eslint/typescript-estree': 6.9.0(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.9.0 debug: 4.3.4 eslint: 8.52.0 typescript: 5.2.2 @@ -461,16 +461,16 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager@6.8.0: - resolution: {integrity: sha512-xe0HNBVwCph7rak+ZHcFD6A+q50SMsFwcmfdjs9Kz4qDh5hWhaPhFjRs/SODEhroBI5Ruyvyz9LfwUJ624O40g==} + /@typescript-eslint/scope-manager@6.9.0: + resolution: {integrity: sha512-1R8A9Mc39n4pCCz9o79qRO31HGNDvC7UhPhv26TovDsWPBDx+Sg3rOZdCELIA3ZmNoWAuxaMOT7aWtGRSYkQxw==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.8.0 - '@typescript-eslint/visitor-keys': 6.8.0 + '@typescript-eslint/types': 6.9.0 + '@typescript-eslint/visitor-keys': 6.9.0 dev: true - /@typescript-eslint/type-utils@6.8.0(eslint@8.52.0)(typescript@5.2.2): - resolution: {integrity: sha512-RYOJdlkTJIXW7GSldUIHqc/Hkto8E+fZN96dMIFhuTJcQwdRoGN2rEWA8U6oXbLo0qufH7NPElUb+MceHtz54g==} + /@typescript-eslint/type-utils@6.9.0(eslint@8.52.0)(typescript@5.2.2): + resolution: {integrity: sha512-XXeahmfbpuhVbhSOROIzJ+b13krFmgtc4GlEuu1WBT+RpyGPIA4Y/eGnXzjbDj5gZLzpAXO/sj+IF/x2GtTMjQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -479,8 +479,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.2.2) - '@typescript-eslint/utils': 6.8.0(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/typescript-estree': 6.9.0(typescript@5.2.2) + '@typescript-eslint/utils': 6.9.0(eslint@8.52.0)(typescript@5.2.2) debug: 4.3.4 eslint: 8.52.0 ts-api-utils: 1.0.1(typescript@5.2.2) @@ -489,13 +489,13 @@ packages: - supports-color dev: true - /@typescript-eslint/types@6.8.0: - resolution: {integrity: sha512-p5qOxSum7W3k+llc7owEStXlGmSl8FcGvhYt8Vjy7FqEnmkCVlM3P57XQEGj58oqaBWDQXbJDZxwUWMS/EAPNQ==} + /@typescript-eslint/types@6.9.0: + resolution: {integrity: sha512-+KB0lbkpxBkBSiVCuQvduqMJy+I1FyDbdwSpM3IoBS7APl4Bu15lStPjgBIdykdRqQNYqYNMa8Kuidax6phaEw==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.8.0(typescript@5.2.2): - resolution: {integrity: sha512-ISgV0lQ8XgW+mvv5My/+iTUdRmGspducmQcDw5JxznasXNnZn3SKNrTRuMsEXv+V/O+Lw9AGcQCfVaOPCAk/Zg==} + /@typescript-eslint/typescript-estree@6.9.0(typescript@5.2.2): + resolution: {integrity: sha512-NJM2BnJFZBEAbCfBP00zONKXvMqihZCrmwCaik0UhLr0vAgb6oguXxLX1k00oQyD+vZZ+CJn3kocvv2yxm4awQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -503,8 +503,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.8.0 - '@typescript-eslint/visitor-keys': 6.8.0 + '@typescript-eslint/types': 6.9.0 + '@typescript-eslint/visitor-keys': 6.9.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -515,8 +515,8 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@6.8.0(eslint@8.52.0)(typescript@5.2.2): - resolution: {integrity: sha512-dKs1itdE2qFG4jr0dlYLQVppqTE+Itt7GmIf/vX6CSvsW+3ov8PbWauVKyyfNngokhIO9sKZeRGCUo1+N7U98Q==} + /@typescript-eslint/utils@6.9.0(eslint@8.52.0)(typescript@5.2.2): + resolution: {integrity: sha512-5Wf+Jsqya7WcCO8me504FBigeQKVLAMPmUzYgDbWchINNh1KJbxCgVya3EQ2MjvJMVeXl3pofRmprqX6mfQkjQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -524,9 +524,9 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.52.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 6.8.0 - '@typescript-eslint/types': 6.8.0 - '@typescript-eslint/typescript-estree': 6.8.0(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.9.0 + '@typescript-eslint/types': 6.9.0 + '@typescript-eslint/typescript-estree': 6.9.0(typescript@5.2.2) eslint: 8.52.0 semver: 7.5.4 transitivePeerDependencies: @@ -534,11 +534,11 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys@6.8.0: - resolution: {integrity: sha512-oqAnbA7c+pgOhW2OhGvxm0t1BULX5peQI/rLsNDpGM78EebV3C9IGbX5HNZabuZ6UQrYveCLjKo8Iy/lLlBkkg==} + /@typescript-eslint/visitor-keys@6.9.0: + resolution: {integrity: sha512-dGtAfqjV6RFOtIP8I0B4ZTBRrlTT8NHHlZZSchQx3qReaoDeXhYM++M4So2AgFK9ZB0emRPA6JI1HkafzA2Ibg==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.8.0 + '@typescript-eslint/types': 6.9.0 eslint-visitor-keys: 3.4.3 dev: true @@ -1403,15 +1403,9 @@ packages: engines: {node: '>=8'} dev: false - /lru-cache@10.0.0: - resolution: {integrity: sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==} - engines: {node: 14 || >=16.14} - dev: true - /lru-cache@10.0.1: resolution: {integrity: sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==} engines: {node: 14 || >=16.14} - dev: false /lru-cache@6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} @@ -1619,7 +1613,7 @@ packages: resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} engines: {node: '>=16 || 14 >=14.17'} dependencies: - lru-cache: 10.0.0 + lru-cache: 10.0.1 minipass: 7.0.2 dev: true From 42f725c5a41521dc79ea54bf3f1cc45ff8949b8e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 20:16:43 +0000 Subject: [PATCH 6/9] chore(deps): update dependency @types/node to ^18.18.7 --- package.json | 2 +- pnpm-lock.yaml | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 92379e5..cfddfca 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@clytage/eslint-config": "^3.0.1", - "@types/node": "^18.18.6", + "@types/node": "^18.18.7", "@typescript-eslint/eslint-plugin": "^6.9.0", "@typescript-eslint/parser": "^6.9.0", "eslint": "^8.52.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ad1aa2b..1f6c461 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,8 +53,8 @@ devDependencies: specifier: ^3.0.1 version: 3.0.1(@eslint/js@8.52.0)(@typescript-eslint/eslint-plugin@6.9.0)(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.2.2) '@types/node': - specifier: ^18.18.6 - version: 18.18.6 + specifier: ^18.18.7 + version: 18.18.7 '@typescript-eslint/eslint-plugin': specifier: ^6.9.0 version: 6.9.0(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.2.2) @@ -372,7 +372,7 @@ packages: dependencies: '@types/http-cache-semantics': 4.0.2 '@types/keyv': 3.1.4 - '@types/node': 18.18.6 + '@types/node': 18.18.7 '@types/responselike': 1.0.1 dev: false @@ -387,7 +387,7 @@ packages: /@types/keyv@3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 18.18.6 + '@types/node': 18.18.7 dev: false /@types/long@4.0.2: @@ -398,13 +398,15 @@ packages: resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==} dev: false - /@types/node@18.18.6: - resolution: {integrity: sha512-wf3Vz+jCmOQ2HV1YUJuCWdL64adYxumkrxtc+H1VUQlnQI04+5HtH+qZCOE21lBE7gIrt+CwX2Wv8Acrw5Ak6w==} + /@types/node@18.18.7: + resolution: {integrity: sha512-bw+lEsxis6eqJYW8Ql6+yTqkE6RuFtsQPSe5JxXbqYRFQEER5aJA9a5UH9igqDWm3X4iLHIKOHlnAXLM4mi7uQ==} + dependencies: + undici-types: 5.26.5 /@types/responselike@1.0.1: resolution: {integrity: sha512-TiGnitEDxj2X0j+98Eqk5lv/Cij8oHd32bU4D/Yw6AOq7vvTk0gSD2GPj0G/HkvhMoVsdlhYF4yqqlyPBTM6Sg==} dependencies: - '@types/node': 18.18.6 + '@types/node': 18.18.7 dev: false /@types/semver@7.5.0: @@ -1752,7 +1754,7 @@ packages: '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 '@types/long': 4.0.2 - '@types/node': 18.18.6 + '@types/node': 18.18.7 long: 4.0.0 dev: false @@ -2077,6 +2079,9 @@ packages: hasBin: true dev: true + /undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + /uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: From 4924b1744066e3081e3bba5f69b75d9beee6170d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 20:38:57 +0000 Subject: [PATCH 7/9] chore(deps): update eslint dependencies to ^6.9.1 --- package.json | 4 +-- pnpm-lock.yaml | 86 +++++++++++++++++++++++++------------------------- 2 files changed, 45 insertions(+), 45 deletions(-) diff --git a/package.json b/package.json index cfddfca..1c95937 100644 --- a/package.json +++ b/package.json @@ -33,8 +33,8 @@ "devDependencies": { "@clytage/eslint-config": "^3.0.1", "@types/node": "^18.18.7", - "@typescript-eslint/eslint-plugin": "^6.9.0", - "@typescript-eslint/parser": "^6.9.0", + "@typescript-eslint/eslint-plugin": "^6.9.1", + "@typescript-eslint/parser": "^6.9.1", "eslint": "^8.52.0", "rimraf": "^5.0.5", "typescript": "^5.2.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1f6c461..4d25564 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,16 +51,16 @@ dependencies: devDependencies: '@clytage/eslint-config': specifier: ^3.0.1 - version: 3.0.1(@eslint/js@8.52.0)(@typescript-eslint/eslint-plugin@6.9.0)(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.2.2) + version: 3.0.1(@eslint/js@8.52.0)(@typescript-eslint/eslint-plugin@6.9.1)(@typescript-eslint/parser@6.9.1)(eslint@8.52.0)(typescript@5.2.2) '@types/node': specifier: ^18.18.7 version: 18.18.7 '@typescript-eslint/eslint-plugin': - specifier: ^6.9.0 - version: 6.9.0(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.2.2) + specifier: ^6.9.1 + version: 6.9.1(@typescript-eslint/parser@6.9.1)(eslint@8.52.0)(typescript@5.2.2) '@typescript-eslint/parser': - specifier: ^6.9.0 - version: 6.9.0(eslint@8.52.0)(typescript@5.2.2) + specifier: ^6.9.1 + version: 6.9.1(eslint@8.52.0)(typescript@5.2.2) eslint: specifier: ^8.52.0 version: 8.52.0 @@ -82,7 +82,7 @@ packages: resolution: {integrity: sha512-yprSnAtj80/VKuDqRcFFLDYltoNV8tChNwFfIgcf6PGD4sjzWIBgs08pRuTqGH5mk5wgL6PBRSsMCZqtZwzFEw==} dev: false - /@clytage/eslint-config@3.0.1(@eslint/js@8.52.0)(@typescript-eslint/eslint-plugin@6.9.0)(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.2.2): + /@clytage/eslint-config@3.0.1(@eslint/js@8.52.0)(@typescript-eslint/eslint-plugin@6.9.1)(@typescript-eslint/parser@6.9.1)(eslint@8.52.0)(typescript@5.2.2): resolution: {integrity: sha512-vSxaKElSjPs7jLu7qTP4K14P73UNKU3TPme2jZpr8iJ/UE20WNq2Xdv9sruCWNRc1sKd6xWEiABUtTG9nD/Tbw==} peerDependencies: '@eslint/js': ^8.44.0 @@ -99,8 +99,8 @@ packages: optional: true dependencies: '@eslint/js': 8.52.0 - '@typescript-eslint/eslint-plugin': 6.9.0(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.2.2) - '@typescript-eslint/parser': 6.9.0(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/eslint-plugin': 6.9.1(@typescript-eslint/parser@6.9.1)(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.9.1(eslint@8.52.0)(typescript@5.2.2) eslint: 8.52.0 typescript: 5.2.2 dev: true @@ -413,8 +413,8 @@ packages: resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} dev: true - /@typescript-eslint/eslint-plugin@6.9.0(@typescript-eslint/parser@6.9.0)(eslint@8.52.0)(typescript@5.2.2): - resolution: {integrity: sha512-lgX7F0azQwRPB7t7WAyeHWVfW1YJ9NIgd9mvGhfQpRY56X6AVf8mwM8Wol+0z4liE7XX3QOt8MN1rUKCfSjRIA==} + /@typescript-eslint/eslint-plugin@6.9.1(@typescript-eslint/parser@6.9.1)(eslint@8.52.0)(typescript@5.2.2): + resolution: {integrity: sha512-w0tiiRc9I4S5XSXXrMHOWgHgxbrBn1Ro+PmiYhSg2ZVdxrAJtQgzU5o2m1BfP6UOn7Vxcc6152vFjQfmZR4xEg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha @@ -425,11 +425,11 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.6.2 - '@typescript-eslint/parser': 6.9.0(eslint@8.52.0)(typescript@5.2.2) - '@typescript-eslint/scope-manager': 6.9.0 - '@typescript-eslint/type-utils': 6.9.0(eslint@8.52.0)(typescript@5.2.2) - '@typescript-eslint/utils': 6.9.0(eslint@8.52.0)(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 6.9.0 + '@typescript-eslint/parser': 6.9.1(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.9.1 + '@typescript-eslint/type-utils': 6.9.1(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.9.1(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.9.1 debug: 4.3.4 eslint: 8.52.0 graphemer: 1.4.0 @@ -442,8 +442,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@6.9.0(eslint@8.52.0)(typescript@5.2.2): - resolution: {integrity: sha512-GZmjMh4AJ/5gaH4XF2eXA8tMnHWP+Pm1mjQR2QN4Iz+j/zO04b9TOvJYOX2sCNIQHtRStKTxRY1FX7LhpJT4Gw==} + /@typescript-eslint/parser@6.9.1(eslint@8.52.0)(typescript@5.2.2): + resolution: {integrity: sha512-C7AK2wn43GSaCUZ9do6Ksgi2g3mwFkMO3Cis96kzmgudoVaKyt62yNzJOktP0HDLb/iO2O0n2lBOzJgr6Q/cyg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -452,10 +452,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.9.0 - '@typescript-eslint/types': 6.9.0 - '@typescript-eslint/typescript-estree': 6.9.0(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 6.9.0 + '@typescript-eslint/scope-manager': 6.9.1 + '@typescript-eslint/types': 6.9.1 + '@typescript-eslint/typescript-estree': 6.9.1(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.9.1 debug: 4.3.4 eslint: 8.52.0 typescript: 5.2.2 @@ -463,16 +463,16 @@ packages: - supports-color dev: true - /@typescript-eslint/scope-manager@6.9.0: - resolution: {integrity: sha512-1R8A9Mc39n4pCCz9o79qRO31HGNDvC7UhPhv26TovDsWPBDx+Sg3rOZdCELIA3ZmNoWAuxaMOT7aWtGRSYkQxw==} + /@typescript-eslint/scope-manager@6.9.1: + resolution: {integrity: sha512-38IxvKB6NAne3g/+MyXMs2Cda/Sz+CEpmm+KLGEM8hx/CvnSRuw51i8ukfwB/B/sESdeTGet1NH1Wj7I0YXswg==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.9.0 - '@typescript-eslint/visitor-keys': 6.9.0 + '@typescript-eslint/types': 6.9.1 + '@typescript-eslint/visitor-keys': 6.9.1 dev: true - /@typescript-eslint/type-utils@6.9.0(eslint@8.52.0)(typescript@5.2.2): - resolution: {integrity: sha512-XXeahmfbpuhVbhSOROIzJ+b13krFmgtc4GlEuu1WBT+RpyGPIA4Y/eGnXzjbDj5gZLzpAXO/sj+IF/x2GtTMjQ==} + /@typescript-eslint/type-utils@6.9.1(eslint@8.52.0)(typescript@5.2.2): + resolution: {integrity: sha512-eh2oHaUKCK58qIeYp19F5V5TbpM52680sB4zNSz29VBQPTWIlE/hCj5P5B1AChxECe/fmZlspAWFuRniep1Skg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -481,8 +481,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.9.0(typescript@5.2.2) - '@typescript-eslint/utils': 6.9.0(eslint@8.52.0)(typescript@5.2.2) + '@typescript-eslint/typescript-estree': 6.9.1(typescript@5.2.2) + '@typescript-eslint/utils': 6.9.1(eslint@8.52.0)(typescript@5.2.2) debug: 4.3.4 eslint: 8.52.0 ts-api-utils: 1.0.1(typescript@5.2.2) @@ -491,13 +491,13 @@ packages: - supports-color dev: true - /@typescript-eslint/types@6.9.0: - resolution: {integrity: sha512-+KB0lbkpxBkBSiVCuQvduqMJy+I1FyDbdwSpM3IoBS7APl4Bu15lStPjgBIdykdRqQNYqYNMa8Kuidax6phaEw==} + /@typescript-eslint/types@6.9.1: + resolution: {integrity: sha512-BUGslGOb14zUHOUmDB2FfT6SI1CcZEJYfF3qFwBeUrU6srJfzANonwRYHDpLBuzbq3HaoF2XL2hcr01c8f8OaQ==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.9.0(typescript@5.2.2): - resolution: {integrity: sha512-NJM2BnJFZBEAbCfBP00zONKXvMqihZCrmwCaik0UhLr0vAgb6oguXxLX1k00oQyD+vZZ+CJn3kocvv2yxm4awQ==} + /@typescript-eslint/typescript-estree@6.9.1(typescript@5.2.2): + resolution: {integrity: sha512-U+mUylTHfcqeO7mLWVQ5W/tMLXqVpRv61wm9ZtfE5egz7gtnmqVIw9ryh0mgIlkKk9rZLY3UHygsBSdB9/ftyw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -505,8 +505,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.9.0 - '@typescript-eslint/visitor-keys': 6.9.0 + '@typescript-eslint/types': 6.9.1 + '@typescript-eslint/visitor-keys': 6.9.1 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -517,8 +517,8 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@6.9.0(eslint@8.52.0)(typescript@5.2.2): - resolution: {integrity: sha512-5Wf+Jsqya7WcCO8me504FBigeQKVLAMPmUzYgDbWchINNh1KJbxCgVya3EQ2MjvJMVeXl3pofRmprqX6mfQkjQ==} + /@typescript-eslint/utils@6.9.1(eslint@8.52.0)(typescript@5.2.2): + resolution: {integrity: sha512-L1T0A5nFdQrMVunpZgzqPL6y2wVreSyHhKGZryS6jrEN7bD9NplVAyMryUhXsQ4TWLnZmxc2ekar/lSGIlprCA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -526,9 +526,9 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.52.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 6.9.0 - '@typescript-eslint/types': 6.9.0 - '@typescript-eslint/typescript-estree': 6.9.0(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.9.1 + '@typescript-eslint/types': 6.9.1 + '@typescript-eslint/typescript-estree': 6.9.1(typescript@5.2.2) eslint: 8.52.0 semver: 7.5.4 transitivePeerDependencies: @@ -536,11 +536,11 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys@6.9.0: - resolution: {integrity: sha512-dGtAfqjV6RFOtIP8I0B4ZTBRrlTT8NHHlZZSchQx3qReaoDeXhYM++M4So2AgFK9ZB0emRPA6JI1HkafzA2Ibg==} + /@typescript-eslint/visitor-keys@6.9.1: + resolution: {integrity: sha512-MUaPUe/QRLEffARsmNfmpghuQkW436DvESW+h+M52w0coICHRfD6Np9/K6PdACwnrq1HmuLl+cSPZaJmeVPkSw==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.9.0 + '@typescript-eslint/types': 6.9.1 eslint-visitor-keys: 3.4.3 dev: true From fe92475e48efa79804f70dbec93c540f27097e7d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 31 Oct 2023 20:03:50 +0000 Subject: [PATCH 8/9] chore(deps): update dependency @types/node to ^18.18.8 --- package.json | 2 +- pnpm-lock.yaml | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 1c95937..bac00c0 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@clytage/eslint-config": "^3.0.1", - "@types/node": "^18.18.7", + "@types/node": "^18.18.8", "@typescript-eslint/eslint-plugin": "^6.9.1", "@typescript-eslint/parser": "^6.9.1", "eslint": "^8.52.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d25564..a817085 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,8 +53,8 @@ devDependencies: specifier: ^3.0.1 version: 3.0.1(@eslint/js@8.52.0)(@typescript-eslint/eslint-plugin@6.9.1)(@typescript-eslint/parser@6.9.1)(eslint@8.52.0)(typescript@5.2.2) '@types/node': - specifier: ^18.18.7 - version: 18.18.7 + specifier: ^18.18.8 + version: 18.18.8 '@typescript-eslint/eslint-plugin': specifier: ^6.9.1 version: 6.9.1(@typescript-eslint/parser@6.9.1)(eslint@8.52.0)(typescript@5.2.2) @@ -372,7 +372,7 @@ packages: dependencies: '@types/http-cache-semantics': 4.0.2 '@types/keyv': 3.1.4 - '@types/node': 18.18.7 + '@types/node': 18.18.8 '@types/responselike': 1.0.1 dev: false @@ -387,7 +387,7 @@ packages: /@types/keyv@3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 18.18.7 + '@types/node': 18.18.8 dev: false /@types/long@4.0.2: @@ -398,15 +398,15 @@ packages: resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==} dev: false - /@types/node@18.18.7: - resolution: {integrity: sha512-bw+lEsxis6eqJYW8Ql6+yTqkE6RuFtsQPSe5JxXbqYRFQEER5aJA9a5UH9igqDWm3X4iLHIKOHlnAXLM4mi7uQ==} + /@types/node@18.18.8: + resolution: {integrity: sha512-OLGBaaK5V3VRBS1bAkMVP2/W9B+H8meUfl866OrMNQqt7wDgdpWPp5o6gmIc9pB+lIQHSq4ZL8ypeH1vPxcPaQ==} dependencies: undici-types: 5.26.5 /@types/responselike@1.0.1: resolution: {integrity: sha512-TiGnitEDxj2X0j+98Eqk5lv/Cij8oHd32bU4D/Yw6AOq7vvTk0gSD2GPj0G/HkvhMoVsdlhYF4yqqlyPBTM6Sg==} dependencies: - '@types/node': 18.18.7 + '@types/node': 18.18.8 dev: false /@types/semver@7.5.0: @@ -1754,7 +1754,7 @@ packages: '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 '@types/long': 4.0.2 - '@types/node': 18.18.7 + '@types/node': 18.18.8 long: 4.0.0 dev: false From d73a4add2740d408ca6c617a632b34adcf0274fe Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 31 Oct 2023 22:11:19 +0000 Subject: [PATCH 9/9] chore(deps): update dependency node to v20 --- .node-version | 2 +- package.json | 2 +- pnpm-lock.yaml | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.node-version b/.node-version index 25bf17f..2edeafb 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -18 \ No newline at end of file +20 \ No newline at end of file diff --git a/package.json b/package.json index bac00c0..bd823ce 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@clytage/eslint-config": "^3.0.1", - "@types/node": "^18.18.8", + "@types/node": "^20.8.10", "@typescript-eslint/eslint-plugin": "^6.9.1", "@typescript-eslint/parser": "^6.9.1", "eslint": "^8.52.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a817085..ca0d930 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -53,8 +53,8 @@ devDependencies: specifier: ^3.0.1 version: 3.0.1(@eslint/js@8.52.0)(@typescript-eslint/eslint-plugin@6.9.1)(@typescript-eslint/parser@6.9.1)(eslint@8.52.0)(typescript@5.2.2) '@types/node': - specifier: ^18.18.8 - version: 18.18.8 + specifier: ^20.8.10 + version: 20.8.10 '@typescript-eslint/eslint-plugin': specifier: ^6.9.1 version: 6.9.1(@typescript-eslint/parser@6.9.1)(eslint@8.52.0)(typescript@5.2.2) @@ -372,7 +372,7 @@ packages: dependencies: '@types/http-cache-semantics': 4.0.2 '@types/keyv': 3.1.4 - '@types/node': 18.18.8 + '@types/node': 20.8.10 '@types/responselike': 1.0.1 dev: false @@ -387,7 +387,7 @@ packages: /@types/keyv@3.1.4: resolution: {integrity: sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==} dependencies: - '@types/node': 18.18.8 + '@types/node': 20.8.10 dev: false /@types/long@4.0.2: @@ -398,15 +398,15 @@ packages: resolution: {integrity: sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==} dev: false - /@types/node@18.18.8: - resolution: {integrity: sha512-OLGBaaK5V3VRBS1bAkMVP2/W9B+H8meUfl866OrMNQqt7wDgdpWPp5o6gmIc9pB+lIQHSq4ZL8ypeH1vPxcPaQ==} + /@types/node@20.8.10: + resolution: {integrity: sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==} dependencies: undici-types: 5.26.5 /@types/responselike@1.0.1: resolution: {integrity: sha512-TiGnitEDxj2X0j+98Eqk5lv/Cij8oHd32bU4D/Yw6AOq7vvTk0gSD2GPj0G/HkvhMoVsdlhYF4yqqlyPBTM6Sg==} dependencies: - '@types/node': 18.18.8 + '@types/node': 20.8.10 dev: false /@types/semver@7.5.0: @@ -1754,7 +1754,7 @@ packages: '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 '@types/long': 4.0.2 - '@types/node': 18.18.8 + '@types/node': 20.8.10 long: 4.0.0 dev: false