From 13b41c3026c003e87fb716825f938abb71116e70 Mon Sep 17 00:00:00 2001 From: Danil Nikolaev Date: Fri, 1 May 2026 07:05:17 +0300 Subject: [PATCH] bump libs migrate to typescript 6 remove ytdl feature --- .eslintrc.json | 2 +- bun.lock | 31 +- package-lock.json | 1839 +++++++------------- package.json | 9 +- src/base/callback-command.ts | 2 +- src/base/command.ts | 4 +- src/base/requirements.ts | 2 +- src/callback_commands/cancel.ts | 4 +- src/callback_commands/download-yt-video.ts | 36 - src/callback_commands/ollama-cancel.ts | 4 +- src/callback_commands/try-again.ts | 2 +- src/callback_commands/yt-info.ts | 15 - src/commands/admins-add.ts | 2 +- src/commands/admins-remove.ts | 2 +- src/commands/ae.ts | 4 +- src/commands/ban.ts | 2 +- src/commands/choice.ts | 2 +- src/commands/dice.ts | 4 +- src/commands/distort.ts | 4 +- src/commands/gemini-chat.ts | 39 +- src/commands/gemini-generate-image.ts | 20 +- src/commands/gemini-get-model.ts | 4 +- src/commands/gemini-list-models.ts | 2 +- src/commands/help.ts | 1 + src/commands/id.ts | 4 +- src/commands/ignore.ts | 2 +- src/commands/info.ts | 12 +- src/commands/mistral-chat.ts | 27 +- src/commands/mistral-get-model.ts | 5 +- src/commands/mistral-list-models.ts | 43 +- src/commands/ollama-chat.ts | 49 +- src/commands/ollama-get-model.ts | 18 +- src/commands/ollama-prompt.ts | 42 +- src/commands/ollama-search.ts | 8 +- src/commands/ollama-set-model.ts | 7 +- src/commands/openai-chat.ts | 31 +- src/commands/openai-get-model.ts | 2 +- src/commands/qr.ts | 2 +- src/commands/quote.ts | 11 +- src/commands/random-int.ts | 3 + src/commands/random-string.ts | 3 + src/commands/start.ts | 2 +- src/commands/transliteration.ts | 4 +- src/commands/unban.ts | 4 +- src/commands/unignore.ts | 2 +- src/commands/youtube-download.ts | 66 - src/common/environment.ts | 2 +- src/common/message-store.ts | 12 +- src/db/message-dao.ts | 4 +- src/db/user-dao.ts | 2 +- src/index.ts | 15 +- src/model/stored-message.ts | 4 +- src/model/stored-user.ts | 4 +- src/util/utils.ts | 316 ++-- src/util/ytdl.ts | 169 -- tsconfig.build.json | 15 +- 56 files changed, 1069 insertions(+), 1857 deletions(-) delete mode 100644 src/callback_commands/download-yt-video.ts delete mode 100644 src/callback_commands/yt-info.ts delete mode 100644 src/commands/youtube-download.ts delete mode 100644 src/util/ytdl.ts diff --git a/.eslintrc.json b/.eslintrc.json index 18adabe..f3127e9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,6 +1,6 @@ { "env": { - "browser": true, + "browser": false, "es2021": true }, "extends": [ diff --git a/bun.lock b/bun.lock index a5a849b..ab89aef 100644 --- a/bun.lock +++ b/bun.lock @@ -5,7 +5,7 @@ "": { "name": "tg-chat-bot", "dependencies": { - "@google/genai": "^1.50.1", + "@google/genai": "^1.51.0", "@libsql/client": "^0.17.3", "@mistralai/mistralai": "^2.2.1", "@napi-rs/canvas": "^0.1.100", @@ -24,8 +24,7 @@ "systeminformation": "^5.31.5", "twemoji": "^14.0.2", "typescript-telegram-bot-api": "^0.14.0", - "youtubei.js": "^17.0.1", - "zod": "^4.3.6", + "zod": "^4.4.1", }, "devDependencies": { "@types/bun": "^1.3.13", @@ -34,10 +33,10 @@ "@types/qrcode": "^1.5.6", "@typescript-eslint/eslint-plugin": "^8.59.1", "@typescript-eslint/parser": "^8.59.1", - "drizzle-kit": "^1.0.0-beta.22", + "drizzle-kit": "^1.0.0-rc.1", "eslint": "^10.2.1", "tsx": "^4.21.0", - "typescript": "^5.9.3", + "typescript": "^6.0.3", }, }, }, @@ -46,8 +45,6 @@ "@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.28.5", "", {}, "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q=="], - "@bufbuild/protobuf": ["@bufbuild/protobuf@2.11.0", "", {}, "sha512-sBXGT13cpmPR5BMgHE6UEEfEaShh5Ror6rfN3yEK5si7QVrtZg8LEPQb0VVhiLRUslD2yLnXtnRzG035J/mZXQ=="], - "@drizzle-team/brocli": ["@drizzle-team/brocli@0.11.0", "", {}, "sha512-hD3pekGiPg0WPCCGAZmusBBJsDqGUR66Y452YgQsZOnkdQ7ViEPKuyP4huUGEZQefp8g34RRodXYmJ2TbCH+tg=="], "@emnapi/runtime": ["@emnapi/runtime@1.7.1", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA=="], @@ -118,7 +115,7 @@ "@eslint/plugin-kit": ["@eslint/plugin-kit@0.7.1", "", { "dependencies": { "@eslint/core": "^1.2.1", "levn": "^0.4.1" } }, "sha512-rZAP3aVgB9ds9KOeUSL+zZ21hPmo8dh6fnIFwRQj5EAZl9gzR7wxYbYXYysAM8CTqGmUGyp2S4kUdV17MnGuWQ=="], - "@google/genai": ["@google/genai@1.50.1", "", { "dependencies": { "google-auth-library": "^10.3.0", "p-retry": "^4.6.2", "protobufjs": "^7.5.4", "ws": "^8.18.0" }, "peerDependencies": { "@modelcontextprotocol/sdk": "^1.25.2" }, "optionalPeers": ["@modelcontextprotocol/sdk"] }, "sha512-YbkX7H9+1Pt8wOt7DDREy8XSoiL6fRDzZQRyaVBarFf8MR3zHGqVdvM4cLbDXqPhxqvegZShgfxb8kw9C7YhAQ=="], + "@google/genai": ["@google/genai@1.51.0", "", { "dependencies": { "google-auth-library": "^10.3.0", "p-retry": "^4.6.2", "protobufjs": "^7.5.4", "ws": "^8.18.0" }, "peerDependencies": { "@modelcontextprotocol/sdk": "^1.25.2" }, "optionalPeers": ["@modelcontextprotocol/sdk"] }, "sha512-vTZZF3CSimN7cn2zsLpW2p5WF0eZa5Gz69ITMPCNHpPrDlAstOfGifSfi0p/s9Z9400f7xJRkgvkQNrcM7pJ6w=="], "@humanfs/core": ["@humanfs/core@0.19.1", "", {}, "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA=="], @@ -406,7 +403,7 @@ "dotenv": ["dotenv@17.4.2", "", {}, "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw=="], - "drizzle-kit": ["drizzle-kit@1.0.0-beta.9-e89174b", "", { "dependencies": { "@drizzle-team/brocli": "^0.11.0", "@js-temporal/polyfill": "^0.5.1", "esbuild": "^0.25.10", "tsx": "^4.20.6" }, "bin": { "drizzle-kit": "bin.cjs" } }, "sha512-Xrw3k8E2CbSZr+kqe3k5W4oxd2fbEyczjKtyGIkAq0x9Wqpa/VtAT6Mkh83sIzqG4OSN7lOoUafsDxSE/AR7RA=="], + "drizzle-kit": ["drizzle-kit@1.0.0-rc.1", "", { "dependencies": { "@drizzle-team/brocli": "^0.11.0", "@js-temporal/polyfill": "^0.5.1", "esbuild": "^0.25.10", "get-tsconfig": "^4.13.6", "jiti": "^2.6.1" }, "bin": { "drizzle-kit": "bin.cjs" } }, "sha512-eDvXzRhke7OwvmN7AciGOU1E2y17MKNhghGciyw1RbmmkuD/2KDXLn3rFRZcDBmfj6CQSEnyvbU+7Fqrn2JQyA=="], "drizzle-orm": ["drizzle-orm@1.0.0-beta.22", "", { "peerDependencies": { "@aws-sdk/client-rds-data": ">=3", "@cloudflare/workers-types": ">=4", "@effect/sql": "^0.48.5", "@effect/sql-pg": "^0.49.7", "@electric-sql/pglite": ">=0.2.0", "@libsql/client": ">=0.10.0", "@libsql/client-wasm": ">=0.10.0", "@neondatabase/serverless": ">=0.10.0", "@op-engineering/op-sqlite": ">=2", "@opentelemetry/api": "^1.4.1", "@planetscale/database": ">=1.13", "@sinclair/typebox": ">=0.34.8", "@sqlitecloud/drivers": ">=1.0.653", "@tidbcloud/serverless": "*", "@tursodatabase/database": ">=0.2.1", "@tursodatabase/database-common": ">=0.2.1", "@tursodatabase/database-wasm": ">=0.2.1", "@types/better-sqlite3": "*", "@types/mssql": "^9.1.4", "@types/pg": "*", "@types/sql.js": "*", "@upstash/redis": ">=1.34.7", "@vercel/postgres": ">=0.8.0", "@xata.io/client": "*", "arktype": ">=2.0.0", "better-sqlite3": ">=9.3.0", "bun-types": "*", "expo-sqlite": ">=14.0.0", "gel": ">=2", "mssql": "^11.0.1", "mysql2": ">=2", "pg": ">=8", "postgres": ">=3", "sql.js": ">=1", "sqlite3": ">=5", "typebox": ">=1.0.0", "valibot": ">=1.0.0-beta.7", "zod": "^3.25.0 || ^4.0.0" }, "optionalPeers": ["@aws-sdk/client-rds-data", "@cloudflare/workers-types", "@effect/sql", "@effect/sql-pg", "@electric-sql/pglite", "@libsql/client", "@libsql/client-wasm", "@neondatabase/serverless", "@op-engineering/op-sqlite", "@opentelemetry/api", "@planetscale/database", "@sinclair/typebox", "@sqlitecloud/drivers", "@tidbcloud/serverless", "@tursodatabase/database", "@tursodatabase/database-common", "@tursodatabase/database-wasm", "@types/better-sqlite3", "@types/mssql", "@types/pg", "@types/sql.js", "@upstash/redis", "@vercel/postgres", "@xata.io/client", "arktype", "better-sqlite3", "bun-types", "expo-sqlite", "gel", "mssql", "mysql2", "pg", "postgres", "sql.js", "sqlite3", "typebox", "valibot", "zod"] }, "sha512-F+DZyVIvH0oVKa/w08Cle1xfoH+pc+htIXHG/frnMLG72aby9NYYr9oc+9XvghnoO4umxFItduz0OMmQJMnenw=="], @@ -520,7 +517,7 @@ "get-stream": ["get-stream@5.2.0", "", { "dependencies": { "pump": "^3.0.0" } }, "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA=="], - "get-tsconfig": ["get-tsconfig@4.13.0", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ=="], + "get-tsconfig": ["get-tsconfig@4.14.0", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA=="], "get-uri": ["get-uri@6.0.5", "", { "dependencies": { "basic-ftp": "^5.0.2", "data-uri-to-buffer": "^6.0.2", "debug": "^4.3.4" } }, "sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg=="], @@ -580,6 +577,8 @@ "jackspeak": ["jackspeak@3.4.3", "", { "dependencies": { "@isaacs/cliui": "^8.0.2" }, "optionalDependencies": { "@pkgjs/parseargs": "^0.11.0" } }, "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw=="], + "jiti": ["jiti@2.6.1", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ=="], + "js-base64": ["js-base64@3.7.8", "", {}, "sha512-hNngCeKxIUQiEUN3GPJOkz4wF/YvdUdbNL9hsBcMQTkKzboD7T/q3OYOuuPZLUE6dBxSGpwhk5mwuDud7JVAow=="], "js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="], @@ -626,8 +625,6 @@ "merge-deep": ["merge-deep@3.0.3", "", { "dependencies": { "arr-union": "^3.1.0", "clone-deep": "^0.2.4", "kind-of": "^3.0.2" } }, "sha512-qtmzAS6t6grwEkNrunqTBdn0qKwFgNWvlxUbAV8es9M7Ot1EbyApytCnvE0jALPa46ZpKDUo527kKiaWplmlFA=="], - "meriyah": ["meriyah@6.1.4", "", {}, "sha512-Sz8FzjzI0kN13GK/6MVEsVzMZEPvOhnmmI1lU5+/1cGOiK3QUahntrNNtdVeihrO7t9JpoH75iMNXg6R6uWflQ=="], - "mime-db": ["mime-db@1.46.0", "", {}, "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ=="], "mime-types": ["mime-types@2.1.29", "", { "dependencies": { "mime-db": "1.46.0" } }, "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ=="], @@ -794,7 +791,7 @@ "typed-query-selector": ["typed-query-selector@2.12.1", "", {}, "sha512-uzR+FzI8qrUEIu96oaeBJmd9E7CFEiQ3goA5qCVgc4s5llSubcfGHq9yUstZx/k4s9dXHVKsE35YWoFyvEqEHA=="], - "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + "typescript": ["typescript@6.0.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw=="], "typescript-telegram-bot-api": ["typescript-telegram-bot-api@0.14.0", "", { "dependencies": { "axios": "^1.7.7", "form-data": "^4.0.1" } }, "sha512-PjigN50TxenH5LjPLqiZopyNizy3tObh3bdLmKwPBo+rW7zUt7iNzJKcNnX7FkMZUmJ2DBvnZ+W+L4oQNwU7eQ=="], @@ -834,9 +831,7 @@ "yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="], - "youtubei.js": ["youtubei.js@17.0.1", "", { "dependencies": { "@bufbuild/protobuf": "^2.0.0", "meriyah": "^6.1.4" } }, "sha512-1lO4b8UqMDzE0oh2qEGzbBOd4UYRdxn/4PdpRM7BGTHxM6ddsEsKZTu90jp8V9FHVgC2h1UirQyqoqLiKwl+Zg=="], - - "zod": ["zod@4.3.6", "", {}, "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg=="], + "zod": ["zod@4.4.1", "", {}, "sha512-a6ENMBBGZBsnlSebQ/eKCguSBeGKSf4O7BPnqVPmYGtpBYI7VSqoVqw+QcB7kPRjbqPwhYTpFbVj/RqNz/CT0Q=="], "zod-to-json-schema": ["zod-to-json-schema@3.25.1", "", { "peerDependencies": { "zod": "^3.25 || ^4" } }, "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA=="], @@ -850,6 +845,8 @@ "@libsql/isomorphic-ws/ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], + "@mistralai/mistralai/zod": ["zod@4.3.6", "", {}, "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg=="], + "@puppeteer/browsers/semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="], "@puppeteer/browsers/yargs": ["yargs@17.7.2", "", { "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" } }, "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w=="], @@ -902,6 +899,8 @@ "tsx/esbuild": ["esbuild@0.27.2", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.27.2", "@esbuild/android-arm": "0.27.2", "@esbuild/android-arm64": "0.27.2", "@esbuild/android-x64": "0.27.2", "@esbuild/darwin-arm64": "0.27.2", "@esbuild/darwin-x64": "0.27.2", "@esbuild/freebsd-arm64": "0.27.2", "@esbuild/freebsd-x64": "0.27.2", "@esbuild/linux-arm": "0.27.2", "@esbuild/linux-arm64": "0.27.2", "@esbuild/linux-ia32": "0.27.2", "@esbuild/linux-loong64": "0.27.2", "@esbuild/linux-mips64el": "0.27.2", "@esbuild/linux-ppc64": "0.27.2", "@esbuild/linux-riscv64": "0.27.2", "@esbuild/linux-s390x": "0.27.2", "@esbuild/linux-x64": "0.27.2", "@esbuild/netbsd-arm64": "0.27.2", "@esbuild/netbsd-x64": "0.27.2", "@esbuild/openbsd-arm64": "0.27.2", "@esbuild/openbsd-x64": "0.27.2", "@esbuild/openharmony-arm64": "0.27.2", "@esbuild/sunos-x64": "0.27.2", "@esbuild/win32-arm64": "0.27.2", "@esbuild/win32-ia32": "0.27.2", "@esbuild/win32-x64": "0.27.2" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw=="], + "tsx/get-tsconfig": ["get-tsconfig@4.13.0", "", { "dependencies": { "resolve-pkg-maps": "^1.0.0" } }, "sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ=="], + "yargs/find-up": ["find-up@4.1.0", "", { "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" } }, "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw=="], "@isaacs/cliui/string-width/emoji-regex": ["emoji-regex@9.2.2", "", {}, "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="], diff --git a/package-lock.json b/package-lock.json index 5cfa201..06d9b4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "tg-chat-bot", "version": "1.0.0", "dependencies": { - "@google/genai": "^1.50.1", + "@google/genai": "^1.51.0", "@libsql/client": "^0.17.3", "@mistralai/mistralai": "^2.2.1", "@napi-rs/canvas": "^0.1.100", @@ -27,8 +27,7 @@ "systeminformation": "^5.31.5", "twemoji": "^14.0.2", "typescript-telegram-bot-api": "^0.14.0", - "youtubei.js": "^17.0.1", - "zod": "^4.3.6" + "zod": "^4.4.1" }, "devDependencies": { "@types/bun": "^1.3.13", @@ -37,16 +36,16 @@ "@types/qrcode": "^1.5.6", "@typescript-eslint/eslint-plugin": "^8.59.1", "@typescript-eslint/parser": "^8.59.1", - "drizzle-kit": "^1.0.0-beta.22", + "drizzle-kit": "^1.0.0-rc.1", "eslint": "^10.2.1", "tsx": "^4.21.0", - "typescript": "^5.9.3" + "typescript": "^6.0.3" } }, "node_modules/@babel/code-frame": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.28.6.tgz", - "integrity": "sha512-JYgintcMjRiCvS8mMECzaEn+m3PfoQiyqukOMCCVQtoJGYJw8j/8LBJEiqkHLkfwCcs74E3pbAUFNg7d9VNJ+Q==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.0.tgz", + "integrity": "sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==", "license": "MIT", "dependencies": { "@babel/helper-validator-identifier": "^7.28.5", @@ -66,12 +65,6 @@ "node": ">=6.9.0" } }, - "node_modules/@bufbuild/protobuf": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/@bufbuild/protobuf/-/protobuf-2.11.0.tgz", - "integrity": "sha512-sBXGT13cpmPR5BMgHE6UEEfEaShh5Ror6rfN3yEK5si7QVrtZg8LEPQb0VVhiLRUslD2yLnXtnRzG035J/mZXQ==", - "license": "(Apache-2.0 AND BSD-3-Clause)" - }, "node_modules/@drizzle-team/brocli": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@drizzle-team/brocli/-/brocli-0.11.0.tgz", @@ -80,9 +73,9 @@ "license": "Apache-2.0" }, "node_modules/@emnapi/runtime": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.7.1.tgz", - "integrity": "sha512-PVtJr5CmLwYAU9PZDMITZoR5iAOShYREoR45EyyLrbntV50mdePTgUn4AmOw90Ifcj+x2kRjdzr1HP3RrNiHGA==", + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", + "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", "license": "MIT", "optional": true, "dependencies": { @@ -575,45 +568,6 @@ "node": "^20.19.0 || ^22.13.0 || >=24" } }, - "node_modules/@eslint/config-array/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@eslint/config-array/node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@eslint/config-array/node_modules/minimatch": { - "version": "10.2.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", - "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.5" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@eslint/config-helpers": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.5.tgz", @@ -665,9 +619,10 @@ } }, "node_modules/@google/genai": { - "version": "1.50.1", - "resolved": "https://registry.npmjs.org/@google/genai/-/genai-1.50.1.tgz", - "integrity": "sha512-YbkX7H9+1Pt8wOt7DDREy8XSoiL6fRDzZQRyaVBarFf8MR3zHGqVdvM4cLbDXqPhxqvegZShgfxb8kw9C7YhAQ==", + "version": "1.51.0", + "resolved": "https://registry.npmjs.org/@google/genai/-/genai-1.51.0.tgz", + "integrity": "sha512-vTZZF3CSimN7cn2zsLpW2p5WF0eZa5Gz69ITMPCNHpPrDlAstOfGifSfi0p/s9Z9400f7xJRkgvkQNrcM7pJ6w==", + "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "google-auth-library": "^10.3.0", @@ -688,29 +643,43 @@ } }, "node_modules/@humanfs/core": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", - "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", "dev": true, "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, "engines": { "node": ">=18.18.0" } }, "node_modules/@humanfs/node": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", - "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanfs/core": "^0.19.1", + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", "@humanwhocodes/retry": "^0.4.0" }, "engines": { "node": ">=18.18.0" } }, + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", @@ -740,9 +709,9 @@ } }, "node_modules/@img/colour": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.0.0.tgz", - "integrity": "sha512-A5P/LfWGFSl6nsckYtjw9da+19jB8hkJ6ACTGcDfEJ0aE+l2n2El7dsVM7UVHZQ9s2lmYMWlrS21YLy2IR1LUw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz", + "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==", "license": "MIT", "engines": { "node": ">=18" @@ -831,6 +800,9 @@ "cpu": [ "arm" ], + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -847,6 +819,9 @@ "cpu": [ "arm64" ], + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -863,6 +838,9 @@ "cpu": [ "ppc64" ], + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -879,6 +857,9 @@ "cpu": [ "riscv64" ], + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -895,6 +876,9 @@ "cpu": [ "s390x" ], + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -911,6 +895,9 @@ "cpu": [ "x64" ], + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -927,6 +914,9 @@ "cpu": [ "arm64" ], + "libc": [ + "musl" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -943,6 +933,9 @@ "cpu": [ "x64" ], + "libc": [ + "musl" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -959,6 +952,9 @@ "cpu": [ "arm" ], + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -981,6 +977,9 @@ "cpu": [ "arm64" ], + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1003,6 +1002,9 @@ "cpu": [ "ppc64" ], + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1025,6 +1027,9 @@ "cpu": [ "riscv64" ], + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1047,6 +1052,9 @@ "cpu": [ "s390x" ], + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1069,6 +1077,9 @@ "cpu": [ "x64" ], + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1091,6 +1102,9 @@ "cpu": [ "arm64" ], + "libc": [ + "musl" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1113,6 +1127,9 @@ "cpu": [ "x64" ], + "libc": [ + "musl" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1204,23 +1221,6 @@ "url": "https://opencollective.com/libvips" } }, - "node_modules/@isaacs/cliui": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", - "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", - "license": "ISC", - "dependencies": { - "string-width": "^5.1.2", - "string-width-cjs": "npm:string-width@^4.2.0", - "strip-ansi": "^7.0.1", - "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", - "wrap-ansi": "^8.1.0", - "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/@js-temporal/polyfill": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/@js-temporal/polyfill/-/polyfill-0.5.1.tgz", @@ -1520,6 +1520,9 @@ "cpu": [ "arm64" ], + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1540,6 +1543,9 @@ "cpu": [ "arm64" ], + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -1560,6 +1566,9 @@ "cpu": [ "riscv64" ], + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1580,6 +1589,9 @@ "cpu": [ "x64" ], + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -1600,6 +1612,9 @@ "cpu": [ "x64" ], + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -1659,16 +1674,6 @@ "integrity": "sha512-kTPhdZyTQxB+2wpiRcFWrDcejc4JI6tkPuS7UZCG4l6Zvc5kU/gGQ/ozvHTh1XR5tS+UlfAfGuPajjzQjCiHCw==", "license": "MIT" }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -1682,9 +1687,9 @@ "license": "BSD-3-Clause" }, "node_modules/@protobufjs/codegen": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", - "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.5.tgz", + "integrity": "sha512-zgXFLzW3Ap33e6d0Wlj4MGIm6Ce8O89n/apUaGNB/jx+hw+ruWEp7EwGUshdLKVRCxZW12fp9r40E1mQrf/34g==", "license": "BSD-3-Clause" }, "node_modules/@protobufjs/eventemitter": { @@ -1710,9 +1715,9 @@ "license": "BSD-3-Clause" }, "node_modules/@protobufjs/inquire": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", - "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.1.tgz", + "integrity": "sha512-mnzgDV26ueAvk7rsbt9L7bE0SuAoqyuys/sMMrmVcN5x9VsxpcG3rqAUSgDyLp0UZlmNfIbQ4fHfCtreVBk8Ew==", "license": "BSD-3-Clause" }, "node_modules/@protobufjs/path": { @@ -1728,9 +1733,9 @@ "license": "BSD-3-Clause" }, "node_modules/@protobufjs/utf8": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", - "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.1.tgz", + "integrity": "sha512-oOAWABowe8EAbMyWKM0tYDKi8Yaox52D+HWZhAIJqQXbqe0xI/GV7FhLWqlEKreMkfDjshR5FKgi3mnle0h6Eg==", "license": "BSD-3-Clause" }, "node_modules/@puppeteer/browsers": { @@ -1754,114 +1759,6 @@ "node": ">=18" } }, - "node_modules/@puppeteer/browsers/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@puppeteer/browsers/node_modules/cliui": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", - "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", - "license": "ISC", - "dependencies": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.1", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@puppeteer/browsers/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/@puppeteer/browsers/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@puppeteer/browsers/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@puppeteer/browsers/node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/@puppeteer/browsers/node_modules/y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "license": "ISC", - "engines": { - "node": ">=10" - } - }, - "node_modules/@puppeteer/browsers/node_modules/yargs": { - "version": "17.7.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", - "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", - "license": "MIT", - "dependencies": { - "cliui": "^8.0.1", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.3", - "y18n": "^5.0.5", - "yargs-parser": "^21.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@puppeteer/browsers/node_modules/yargs-parser": { - "version": "21.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", - "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, "node_modules/@tootallnate/quickjs-emscripten": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", @@ -1879,9 +1776,9 @@ } }, "node_modules/@types/debug": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", - "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "version": "4.1.13", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.13.tgz", + "integrity": "sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==", "license": "MIT", "dependencies": { "@types/ms": "*" @@ -2146,45 +2043,6 @@ "typescript": ">=4.8.4 <6.1.0" } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "10.2.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", - "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.5" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/@typescript-eslint/utils": { "version": "8.59.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.59.1.tgz", @@ -2290,15 +2148,12 @@ } }, "node_modules/ansi-regex": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", - "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "license": "MIT", "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "node": ">=8" } }, "node_modules/ansi-styles": { @@ -2351,7 +2206,8 @@ "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" }, "node_modules/axios": { "version": "1.15.2", @@ -2364,35 +2220,10 @@ "proxy-from-env": "^2.1.0" } }, - "node_modules/axios/node_modules/form-data": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", - "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/axios/node_modules/proxy-from-env": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", - "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", - "license": "MIT", - "engines": { - "node": ">=10" - } - }, "node_modules/b4a": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.7.3.tgz", - "integrity": "sha512-5Q2mfq2WfGuFp3uS//0s6baOJLMoVduPYVeNmDYxu5OUA1/cBfvr2RIS7vi62LdNj/urk1hfmj867I3qt6uZ7Q==", + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.8.1.tgz", + "integrity": "sha512-aiqre1Nr0B/6DgE2N5vwTc+2/oQZ4Wh1t4NznYY4E00y8LCt6NqdRv81so00oo27D8MVKTpUa/MwUUtBLXCoDw==", "license": "Apache-2.0", "peerDependencies": { "react-native-b4a": "*" @@ -2404,10 +2235,14 @@ } }, "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "license": "MIT" + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } }, "node_modules/bare-events": { "version": "2.8.2", @@ -2424,11 +2259,10 @@ } }, "node_modules/bare-fs": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.5.3.tgz", - "integrity": "sha512-9+kwVx8QYvt3hPWnmb19tPnh38c6Nihz8Lx3t0g9+4GoIf3/fTgYwM4Z6NxgI+B9elLQA7mLE9PpqcWtOMRDiQ==", + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.7.1.tgz", + "integrity": "sha512-WDRsyVN52eAx/lBamKD6uyw8H4228h/x0sGGGegOamM2cd7Pag88GfMQalobXI+HaEUxpCkbKQUDOQqt9wawRw==", "license": "Apache-2.0", - "optional": true, "dependencies": { "bare-events": "^2.5.4", "bare-path": "^3.0.0", @@ -2449,11 +2283,10 @@ } }, "node_modules/bare-os": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.6.2.tgz", - "integrity": "sha512-T+V1+1srU2qYNBmJCXZkUY5vQ0B4FSlL3QDROnKQYOqeiQR8UbjNHlPa+TIbM4cuidiN9GaTaOZgSEgsvPbh5A==", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.9.0.tgz", + "integrity": "sha512-JTjuZyNIDpw+GytMO4a6TK1VXdVKKJr6DRxEHasyuYyShV2deuiHJK/ahGZlebc+SG0/wJCB9XK8gprBGDFi/Q==", "license": "Apache-2.0", - "optional": true, "engines": { "bare": ">=1.14.0" } @@ -2463,25 +2296,28 @@ "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-3.0.0.tgz", "integrity": "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==", "license": "Apache-2.0", - "optional": true, "dependencies": { "bare-os": "^3.0.1" } }, "node_modules/bare-stream": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.7.0.tgz", - "integrity": "sha512-oyXQNicV1y8nc2aKffH+BUHFRXmx6VrPzlnaEvMhram0nPBrKcEdcyBg5r08D0i8VxngHFAiVyn1QKXpSG0B8A==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.13.1.tgz", + "integrity": "sha512-Vp0cnjYyrEC4whYTymQ+YZi6pBpfiICZO3cfRG8sy67ZNWe951urv1x4eW1BKNngw3U+3fPYb5JQvHbCtxH7Ow==", "license": "Apache-2.0", - "optional": true, "dependencies": { - "streamx": "^2.21.0" + "streamx": "^2.25.0", + "teex": "^1.0.1" }, "peerDependencies": { + "bare-abort-controller": "*", "bare-buffer": "*", "bare-events": "*" }, "peerDependenciesMeta": { + "bare-abort-controller": { + "optional": true + }, "bare-buffer": { "optional": true }, @@ -2491,11 +2327,10 @@ } }, "node_modules/bare-url": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/bare-url/-/bare-url-2.3.2.tgz", - "integrity": "sha512-ZMq4gd9ngV5aTMa5p9+UfY0b3skwhHELaDkhEHetMdX0LRkW9kzaym4oo/Eh+Ghm0CCDuMTsRIGM/ytUc1ZYmw==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/bare-url/-/bare-url-2.4.2.tgz", + "integrity": "sha512-/9a2j4ac6ckpmAHvod/ob7x439OAHst/drc2Clnq+reRYd/ovddwcF4LfoxHyNk5AuGBnPg+HqFjmE/Zpq6v0A==", "license": "Apache-2.0", - "optional": true, "dependencies": { "bare-path": "^3.0.0" } @@ -2521,9 +2356,9 @@ "license": "MIT" }, "node_modules/basic-ftp": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.1.0.tgz", - "integrity": "sha512-RkaJzeJKDbaDWTIPiJwubyljaEPwpVWkm9Rt5h9Nd6h7tEXTJ3VB4qxdZBioV7JO5yLUaOKwz7vDOzlncUsegw==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.3.1.tgz", + "integrity": "sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw==", "license": "MIT", "engines": { "node": ">=10.0.0" @@ -2539,12 +2374,16 @@ } }, "node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", + "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", + "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0" + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" } }, "node_modules/buffer-crc32": { @@ -2626,69 +2465,17 @@ } }, "node_modules/cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "license": "ISC", "dependencies": { "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.0" - } - }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cliui/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/clone-deep": { @@ -2729,6 +2516,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", "dependencies": { "delayed-stream": "~1.0.0" }, @@ -2743,9 +2531,9 @@ "license": "MIT" }, "node_modules/cosmiconfig": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.0.tgz", - "integrity": "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-9.0.1.tgz", + "integrity": "sha512-hr4ihw+DBqcvrsEDioRO31Z17x71pUYoNe/4h6Z0wB72p7MU7/9gH8Q3s12NFhHPfYBBOV3qyfUxmr/Yn3shnQ==", "license": "MIT", "dependencies": { "env-paths": "^2.2.1", @@ -2772,6 +2560,7 @@ "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -2850,15 +2639,16 @@ "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/detect-libc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", "license": "Apache-2.0", "engines": { "node": ">=8" @@ -2889,16 +2679,17 @@ } }, "node_modules/drizzle-kit": { - "version": "1.0.0-beta.9-e89174b", - "resolved": "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-1.0.0-beta.9-e89174b.tgz", - "integrity": "sha512-Xrw3k8E2CbSZr+kqe3k5W4oxd2fbEyczjKtyGIkAq0x9Wqpa/VtAT6Mkh83sIzqG4OSN7lOoUafsDxSE/AR7RA==", + "version": "1.0.0-rc.1", + "resolved": "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-1.0.0-rc.1.tgz", + "integrity": "sha512-eDvXzRhke7OwvmN7AciGOU1E2y17MKNhghGciyw1RbmmkuD/2KDXLn3rFRZcDBmfj6CQSEnyvbU+7Fqrn2JQyA==", "dev": true, "license": "MIT", "dependencies": { "@drizzle-team/brocli": "^0.11.0", "@js-temporal/polyfill": "^0.5.1", "esbuild": "^0.25.10", - "tsx": "^4.20.6" + "get-tsconfig": "^4.13.6", + "jiti": "^2.6.1" }, "bin": { "drizzle-kit": "bin.cjs" @@ -3080,12 +2871,6 @@ "node": ">= 0.4" } }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "license": "MIT" - }, "node_modules/ecdsa-sig-formatter": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", @@ -3346,29 +3131,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, - "node_modules/eslint/node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, "node_modules/eslint/node_modules/eslint-visitor-keys": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", @@ -3392,22 +3154,6 @@ "node": ">= 4" } }, - "node_modules/eslint/node_modules/minimatch": { - "version": "10.2.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", - "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.5" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/espree": { "version": "11.2.0", "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", @@ -3686,9 +3432,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.11", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", - "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.0.tgz", + "integrity": "sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==", "funding": [ { "type": "individual", @@ -3726,20 +3472,20 @@ "node": ">=0.10.0" } }, - "node_modules/foreground-child": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", - "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", - "license": "ISC", + "node_modules/form-data": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "license": "MIT", "dependencies": { - "cross-spawn": "^7.0.6", - "signal-exit": "^4.0.1" + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" }, "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">= 6" } }, "node_modules/formdata-polyfill": { @@ -3755,26 +3501,17 @@ } }, "node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" }, "engines": { - "node": ">=6 <7 || >=8" - } - }, - "node_modules/fs-extra/node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", - "license": "MIT", - "optionalDependencies": { - "graceful-fs": "^4.1.6" + "node": ">=12" } }, "node_modules/fs.realpath": { @@ -3808,15 +3545,14 @@ } }, "node_modules/gaxios": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-7.1.3.tgz", - "integrity": "sha512-YGGyuEdVIjqxkxVH1pUTMY/XtmmsApXrCVv5EU25iX6inEPbV+VakJfLealkBtJN69AQmh1eGOdCl9Sm1UP6XQ==", + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-7.1.4.tgz", + "integrity": "sha512-bTIgTsM2bWn3XklZISBTQX7ZSddGW+IO3bMdGaemHZ3tbqExMENHLx6kKZ/KlejgrMtj8q7wBItt51yegqalrA==", "license": "Apache-2.0", "dependencies": { "extend": "^3.0.2", "https-proxy-agent": "^7.0.1", - "node-fetch": "^3.3.2", - "rimraf": "^5.0.1" + "node-fetch": "^3.3.2" }, "engines": { "node": ">=18" @@ -3898,9 +3634,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.13.0", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.13.0.tgz", - "integrity": "sha512-1VKTZJCwBrvbd+Wn3AOgQP/2Av+TfTCOlE4AcRJE72W1ksZXbAx8PPBR9RzgTeSPzlPMHrbANMH3LbltH73wxQ==", + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.0.tgz", + "integrity": "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==", "dev": true, "license": "MIT", "dependencies": { @@ -3934,20 +3670,21 @@ } }, "node_modules/glob": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", - "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "license": "ISC", "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^3.1.2", - "minimatch": "^9.0.4", - "minipass": "^7.1.2", - "package-json-from-dist": "^1.0.0", - "path-scurry": "^1.11.1" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, - "bin": { - "glob": "dist/esm/bin.mjs" + "engines": { + "node": "*" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -3966,18 +3703,45 @@ "node": ">=10.13.0" } }, + "node_modules/glob/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", + "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/google-auth-library": { - "version": "10.5.0", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-10.5.0.tgz", - "integrity": "sha512-7ABviyMOlX5hIVD60YOfHw4/CxOfBhyduaYB+wbFWCWoni4N7SLcV46hrVRktuBbZjFC9ONyqamZITN7q3n32w==", + "version": "10.6.2", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-10.6.2.tgz", + "integrity": "sha512-e27Z6EThmVNNvtYASwQxose/G57rkRuaRbQyxM2bvYLLX/GqWZ5chWq2EBoUchJbCc57eC9ArzO5wMsEmWftCw==", "license": "Apache-2.0", "dependencies": { "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", - "gaxios": "^7.0.0", - "gcp-metadata": "^8.0.0", - "google-logging-utils": "^1.0.0", - "gtoken": "^8.0.0", + "gaxios": "^7.1.4", + "gcp-metadata": "8.1.2", + "google-logging-utils": "1.1.3", "jws": "^4.0.0" }, "engines": { @@ -4011,19 +3775,6 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "license": "ISC" }, - "node_modules/gtoken": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-8.0.0.tgz", - "integrity": "sha512-+CqsMbHPiSTdtSO14O51eMNlrp9N79gmeqmXeouJOhfucAedHw9noVe/n5uJk3tbKE6a+6ZCQg3RPhVhHByAIw==", - "license": "MIT", - "dependencies": { - "gaxios": "^7.0.0", - "jws": "^4.0.0" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/has-symbols": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", @@ -4052,9 +3803,9 @@ } }, "node_modules/hasown": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", - "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", + "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -4143,9 +3894,9 @@ "license": "ISC" }, "node_modules/ip-address": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz", - "integrity": "sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==", + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.1.tgz", + "integrity": "sha512-1FMu8/N15Ck1BL551Jf42NYIoin2unWjLQ2Fze/DXryJRl5twqtwNHlO39qERGbIOcKYWHdgRryhOC+NG4eaLw==", "license": "MIT", "engines": { "node": ">= 12" @@ -4231,19 +3982,14 @@ "node": ">=0.10.0" } }, - "node_modules/jackspeak": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", - "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" + "node_modules/jiti": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.6.1.tgz", + "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" } }, "node_modules/js-base64": { @@ -4314,12 +4060,12 @@ "license": "MIT" }, "node_modules/jsonfile": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-5.0.0.tgz", - "integrity": "sha512-NQRZ5CRo74MhMMC3/3r5g2k4fjodJ/wh8MxjFbCViWKFjxrnudWSY5vomh+23ZaXzAS7J3fBZIR2dV6WbmfM0w==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.1.tgz", + "integrity": "sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==", "license": "MIT", "dependencies": { - "universalify": "^0.1.2" + "universalify": "^2.0.0" }, "optionalDependencies": { "graceful-fs": "^4.1.6" @@ -4423,15 +4169,6 @@ "@libsql/win32-x64-msvc": "0.5.29" } }, - "node_modules/libsql/node_modules/detect-libc": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", - "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", - "license": "Apache-2.0", - "engines": { - "node": ">=8" - } - }, "node_modules/lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", @@ -4461,10 +4198,13 @@ "license": "Apache-2.0" }, "node_modules/lru-cache": { - "version": "10.4.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", - "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", - "license": "ISC" + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "license": "ISC", + "engines": { + "node": ">=12" + } }, "node_modules/math-intrinsics": { "version": "1.1.0", @@ -4489,58 +4229,43 @@ "node": ">=0.10.0" } }, - "node_modules/meriyah": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/meriyah/-/meriyah-6.1.4.tgz", - "integrity": "sha512-Sz8FzjzI0kN13GK/6MVEsVzMZEPvOhnmmI1lU5+/1cGOiK3QUahntrNNtdVeihrO7t9JpoH75iMNXg6R6uWflQ==", - "license": "ISC", - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/mime-db": { - "version": "1.46.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", - "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==", + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { - "version": "2.1.29", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", - "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", "dependencies": { - "mime-db": "1.46.0" + "mime-db": "1.52.0" }, "engines": { "node": ">= 0.6" } }, "node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "license": "ISC", + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", + "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", + "dev": true, + "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^2.0.1" + "brace-expansion": "^5.0.5" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": "18 || 20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/minipass": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", - "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", - "license": "ISC", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, "node_modules/mitt": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", @@ -4583,9 +4308,9 @@ "license": "MIT" }, "node_modules/netmask": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", - "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.1.1.tgz", + "integrity": "sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA==", "license": "MIT", "engines": { "node": ">= 0.4.0" @@ -4772,12 +4497,6 @@ "node": ">= 14" } }, - "node_modules/package-json-from-dist": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", - "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", - "license": "BlueOak-1.0.0" - }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -4830,27 +4549,12 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/path-scurry": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", - "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", - "license": "BlueOak-1.0.0", - "dependencies": { - "lru-cache": "^10.2.0", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" - }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", @@ -4876,6 +4580,15 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/pngjs": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", + "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", + "license": "MIT", + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -4902,22 +4615,22 @@ "license": "ISC" }, "node_modules/protobufjs": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.4.tgz", - "integrity": "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==", + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.6.tgz", + "integrity": "sha512-M71sTMB146U3u0di3yup8iM+zv8yPRNQVr1KK4tyBitl3qFvEGucq/rGDRShD2rsJhtN02RJaJ7j5X5hmy8SJg==", "hasInstallScript": true, "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", - "@protobufjs/codegen": "^2.0.4", + "@protobufjs/codegen": "^2.0.5", "@protobufjs/eventemitter": "^1.1.0", "@protobufjs/fetch": "^1.1.0", "@protobufjs/float": "^1.0.2", - "@protobufjs/inquire": "^1.1.0", + "@protobufjs/inquire": "^1.1.1", "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", - "@protobufjs/utf8": "^1.1.0", + "@protobufjs/utf8": "^1.1.1", "@types/node": ">=13.7.0", "long": "^5.0.0" }, @@ -4944,25 +4657,25 @@ "node": ">= 14" } }, - "node_modules/proxy-agent/node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/proxy-from-env": { + "node_modules/proxy-agent/node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", "license": "MIT" }, + "node_modules/proxy-from-env": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/pump": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz", - "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", + "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", @@ -5127,100 +4840,6 @@ } } }, - "node_modules/puppeteer-extra-plugin-user-data-dir/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/puppeteer-extra-plugin-user-data-dir/node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/puppeteer-extra-plugin-user-data-dir/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/puppeteer-extra-plugin-user-data-dir/node_modules/jsonfile": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", - "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", - "license": "MIT", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/puppeteer-extra-plugin-user-data-dir/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/puppeteer-extra-plugin-user-data-dir/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/puppeteer-extra-plugin-user-data-dir/node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "license": "MIT", - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/puppeteer-extra-plugin-user-preferences": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/puppeteer-extra-plugin-user-preferences/-/puppeteer-extra-plugin-user-preferences-2.4.1.tgz", @@ -5265,13 +4884,122 @@ "node": ">=10.13.0" } }, - "node_modules/qrcode/node_modules/pngjs": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-5.0.0.tgz", - "integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==", + "node_modules/qrcode/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/qrcode/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, "engines": { - "node": ">=10.13.0" + "node": ">=8" + } + }, + "node_modules/qrcode/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/qrcode/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/qrcode/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/qrcode/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/qrcode/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "license": "ISC" + }, + "node_modules/qrcode/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "license": "MIT", + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/qrcode/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "license": "ISC", + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" } }, "node_modules/require-directory": { @@ -5318,15 +5046,16 @@ } }, "node_modules/rimraf": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.10.tgz", - "integrity": "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", "license": "ISC", "dependencies": { - "glob": "^10.3.7" + "glob": "^7.1.3" }, "bin": { - "rimraf": "dist/esm/bin.mjs" + "rimraf": "bin.js" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -5450,10 +5179,20 @@ "@img/sharp-win32-x64": "0.34.5" } }, + "node_modules/sharp/node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" @@ -5466,23 +5205,12 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -5494,12 +5222,12 @@ } }, "node_modules/socks": { - "version": "2.8.7", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.7.tgz", - "integrity": "sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==", + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.8.tgz", + "integrity": "sha512-NlGELfPrgX2f1TAAcz0WawlLn+0r3FyhhCRpFFK2CemXenPYvzMWWZINv3eDNo9ucdwme7oCHRY0Jnbs4aIkog==", "license": "MIT", "dependencies": { - "ip-address": "^10.0.1", + "ip-address": "^10.1.1", "smart-buffer": "^4.2.0" }, "engines": { @@ -5532,9 +5260,9 @@ } }, "node_modules/streamx": { - "version": "2.23.0", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.23.0.tgz", - "integrity": "sha512-kn+e44esVfn2Fa/O0CPFcex27fjIL6MkVae0Mm6q+E6f0hWv578YCERbv+4m02cjxvDsPKLnmxral/rR6lBMAg==", + "version": "2.25.0", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.25.0.tgz", + "integrity": "sha512-0nQuG6jf1w+wddNEEXCF4nTg3LtufWINB5eFEN+5TNZW7KWJp6x87+JFL43vaAUPyCfH1wID+mNVyW6OHtFamg==", "license": "MIT", "dependencies": { "events-universal": "^1.0.0", @@ -5543,24 +5271,6 @@ } }, "node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "license": "MIT", - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string-width-cjs": { - "name": "string-width", "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", @@ -5574,56 +5284,13 @@ "node": ">=8" } }, - "node_modules/string-width-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width-cjs/node_modules/emoji-regex": { + "node_modules/string-width/node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "license": "MIT" }, - "node_modules/string-width-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "license": "MIT" - }, "node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/strip-ansi-cjs": { - "name": "strip-ansi", "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", @@ -5635,15 +5302,6 @@ "node": ">=8" } }, - "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/systeminformation": { "version": "5.31.5", "resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.31.5.tgz", @@ -5671,9 +5329,9 @@ } }, "node_modules/tar-fs": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.1.tgz", - "integrity": "sha512-LZA0oaPOc2fVo82Txf3gw+AkEd38szODlptMYejQUhndHMLQ9M059uXR+AfS7DNo0NpINvSqDsvyaCrBVkptWg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.2.tgz", + "integrity": "sha512-QGxxTxxyleAdyM3kpFs14ymbYmNFrfY+pHj7Z8FgtbZ7w2//VAgLMac7sT6nRpIHjppXO2AwwEOg0bPFVRcmXw==", "license": "MIT", "dependencies": { "pump": "^3.0.0", @@ -5685,20 +5343,30 @@ } }, "node_modules/tar-stream": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", - "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.2.0.tgz", + "integrity": "sha512-ojzvCvVaNp6aOTFmG7jaRD0meowIAuPc3cMMhSgKiVWws1GyHbGd/xvnyuRKcKlMpt3qvxx6r0hreCNITP9hIg==", "license": "MIT", "dependencies": { "b4a": "^1.6.4", + "bare-fs": "^4.5.5", "fast-fifo": "^1.2.0", "streamx": "^2.15.0" } }, + "node_modules/teex": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/teex/-/teex-1.0.1.tgz", + "integrity": "sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==", + "license": "MIT", + "dependencies": { + "streamx": "^2.12.5" + } + }, "node_modules/text-decoder": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.3.tgz", - "integrity": "sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.7.tgz", + "integrity": "sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==", "license": "Apache-2.0", "dependencies": { "b4a": "^1.6.4" @@ -5761,9 +5429,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/aix-ppc64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.2.tgz", - "integrity": "sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz", + "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==", "cpu": [ "ppc64" ], @@ -5778,9 +5446,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/android-arm": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.2.tgz", - "integrity": "sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz", + "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==", "cpu": [ "arm" ], @@ -5795,9 +5463,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/android-arm64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.2.tgz", - "integrity": "sha512-pvz8ZZ7ot/RBphf8fv60ljmaoydPU12VuXHImtAs0XhLLw+EXBi2BLe3OYSBslR4rryHvweW5gmkKFwTiFy6KA==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz", + "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==", "cpu": [ "arm64" ], @@ -5812,9 +5480,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/android-x64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.2.tgz", - "integrity": "sha512-z8Ank4Byh4TJJOh4wpz8g2vDy75zFL0TlZlkUkEwYXuPSgX8yzep596n6mT7905kA9uHZsf/o2OJZubl2l3M7A==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz", + "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==", "cpu": [ "x64" ], @@ -5829,9 +5497,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/darwin-arm64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.2.tgz", - "integrity": "sha512-davCD2Zc80nzDVRwXTcQP/28fiJbcOwvdolL0sOiOsbwBa72kegmVU0Wrh1MYrbuCL98Omp5dVhQFWRKR2ZAlg==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz", + "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==", "cpu": [ "arm64" ], @@ -5846,9 +5514,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/darwin-x64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.2.tgz", - "integrity": "sha512-ZxtijOmlQCBWGwbVmwOF/UCzuGIbUkqB1faQRf5akQmxRJ1ujusWsb3CVfk/9iZKr2L5SMU5wPBi1UWbvL+VQA==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz", + "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==", "cpu": [ "x64" ], @@ -5863,9 +5531,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/freebsd-arm64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.2.tgz", - "integrity": "sha512-lS/9CN+rgqQ9czogxlMcBMGd+l8Q3Nj1MFQwBZJyoEKI50XGxwuzznYdwcav6lpOGv5BqaZXqvBSiB/kJ5op+g==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz", + "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==", "cpu": [ "arm64" ], @@ -5880,9 +5548,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/freebsd-x64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.2.tgz", - "integrity": "sha512-tAfqtNYb4YgPnJlEFu4c212HYjQWSO/w/h/lQaBK7RbwGIkBOuNKQI9tqWzx7Wtp7bTPaGC6MJvWI608P3wXYA==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz", + "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==", "cpu": [ "x64" ], @@ -5897,9 +5565,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/linux-arm": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.2.tgz", - "integrity": "sha512-vWfq4GaIMP9AIe4yj1ZUW18RDhx6EPQKjwe7n8BbIecFtCQG4CfHGaHuh7fdfq+y3LIA2vGS/o9ZBGVxIDi9hw==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz", + "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==", "cpu": [ "arm" ], @@ -5914,9 +5582,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/linux-arm64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.2.tgz", - "integrity": "sha512-hYxN8pr66NsCCiRFkHUAsxylNOcAQaxSSkHMMjcpx0si13t1LHFphxJZUiGwojB1a/Hd5OiPIqDdXONia6bhTw==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz", + "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==", "cpu": [ "arm64" ], @@ -5931,9 +5599,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/linux-ia32": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.2.tgz", - "integrity": "sha512-MJt5BRRSScPDwG2hLelYhAAKh9imjHK5+NE/tvnRLbIqUWa+0E9N4WNMjmp/kXXPHZGqPLxggwVhz7QP8CTR8w==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz", + "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==", "cpu": [ "ia32" ], @@ -5948,9 +5616,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/linux-loong64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.2.tgz", - "integrity": "sha512-lugyF1atnAT463aO6KPshVCJK5NgRnU4yb3FUumyVz+cGvZbontBgzeGFO1nF+dPueHD367a2ZXe1NtUkAjOtg==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz", + "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==", "cpu": [ "loong64" ], @@ -5965,9 +5633,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/linux-mips64el": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.2.tgz", - "integrity": "sha512-nlP2I6ArEBewvJ2gjrrkESEZkB5mIoaTswuqNFRv/WYd+ATtUpe9Y09RnJvgvdag7he0OWgEZWhviS1OTOKixw==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz", + "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==", "cpu": [ "mips64el" ], @@ -5982,9 +5650,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/linux-ppc64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.2.tgz", - "integrity": "sha512-C92gnpey7tUQONqg1n6dKVbx3vphKtTHJaNG2Ok9lGwbZil6DrfyecMsp9CrmXGQJmZ7iiVXvvZH6Ml5hL6XdQ==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz", + "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==", "cpu": [ "ppc64" ], @@ -5999,9 +5667,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/linux-riscv64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.2.tgz", - "integrity": "sha512-B5BOmojNtUyN8AXlK0QJyvjEZkWwy/FKvakkTDCziX95AowLZKR6aCDhG7LeF7uMCXEJqwa8Bejz5LTPYm8AvA==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz", + "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==", "cpu": [ "riscv64" ], @@ -6016,9 +5684,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/linux-s390x": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.2.tgz", - "integrity": "sha512-p4bm9+wsPwup5Z8f4EpfN63qNagQ47Ua2znaqGH6bqLlmJ4bx97Y9JdqxgGZ6Y8xVTixUnEkoKSHcpRlDnNr5w==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz", + "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==", "cpu": [ "s390x" ], @@ -6033,9 +5701,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/linux-x64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.2.tgz", - "integrity": "sha512-uwp2Tip5aPmH+NRUwTcfLb+W32WXjpFejTIOWZFw/v7/KnpCDKG66u4DLcurQpiYTiYwQ9B7KOeMJvLCu/OvbA==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz", + "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==", "cpu": [ "x64" ], @@ -6050,9 +5718,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/netbsd-arm64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.2.tgz", - "integrity": "sha512-Kj6DiBlwXrPsCRDeRvGAUb/LNrBASrfqAIok+xB0LxK8CHqxZ037viF13ugfsIpePH93mX7xfJp97cyDuTZ3cw==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz", + "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==", "cpu": [ "arm64" ], @@ -6067,9 +5735,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/netbsd-x64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.2.tgz", - "integrity": "sha512-HwGDZ0VLVBY3Y+Nw0JexZy9o/nUAWq9MlV7cahpaXKW6TOzfVno3y3/M8Ga8u8Yr7GldLOov27xiCnqRZf0tCA==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz", + "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==", "cpu": [ "x64" ], @@ -6084,9 +5752,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/openbsd-arm64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.2.tgz", - "integrity": "sha512-DNIHH2BPQ5551A7oSHD0CKbwIA/Ox7+78/AWkbS5QoRzaqlev2uFayfSxq68EkonB+IKjiuxBFoV8ESJy8bOHA==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz", + "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==", "cpu": [ "arm64" ], @@ -6101,9 +5769,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/openbsd-x64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.2.tgz", - "integrity": "sha512-/it7w9Nb7+0KFIzjalNJVR5bOzA9Vay+yIPLVHfIQYG/j+j9VTH84aNB8ExGKPU4AzfaEvN9/V4HV+F+vo8OEg==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz", + "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==", "cpu": [ "x64" ], @@ -6118,9 +5786,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/openharmony-arm64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.2.tgz", - "integrity": "sha512-LRBbCmiU51IXfeXk59csuX/aSaToeG7w48nMwA6049Y4J4+VbWALAuXcs+qcD04rHDuSCSRKdmY63sruDS5qag==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz", + "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==", "cpu": [ "arm64" ], @@ -6135,9 +5803,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/sunos-x64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.2.tgz", - "integrity": "sha512-kMtx1yqJHTmqaqHPAzKCAkDaKsffmXkPHThSfRwZGyuqyIeBvf08KSsYXl+abf5HDAPMJIPnbBfXvP2ZC2TfHg==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz", + "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==", "cpu": [ "x64" ], @@ -6152,9 +5820,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/win32-arm64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.2.tgz", - "integrity": "sha512-Yaf78O/B3Kkh+nKABUF++bvJv5Ijoy9AN1ww904rOXZFLWVc5OLOfL56W+C8F9xn5JQZa3UX6m+IktJnIb1Jjg==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz", + "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==", "cpu": [ "arm64" ], @@ -6169,9 +5837,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/win32-ia32": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.2.tgz", - "integrity": "sha512-Iuws0kxo4yusk7sw70Xa2E2imZU5HoixzxfGCdxwBdhiDgt9vX9VUCBhqcwY7/uh//78A1hMkkROMJq9l27oLQ==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz", + "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==", "cpu": [ "ia32" ], @@ -6186,9 +5854,9 @@ } }, "node_modules/tsx/node_modules/@esbuild/win32-x64": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.2.tgz", - "integrity": "sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz", + "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==", "cpu": [ "x64" ], @@ -6203,9 +5871,9 @@ } }, "node_modules/tsx/node_modules/esbuild": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.2.tgz", - "integrity": "sha512-HyNQImnsOC7X9PMNaCIeAm4ISCQXs5a5YasTXVliKv4uuBo1dKrG0A+uQS8M5eXjVMnLg3WgXaKvprHlFJQffw==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", + "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -6216,32 +5884,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.27.2", - "@esbuild/android-arm": "0.27.2", - "@esbuild/android-arm64": "0.27.2", - "@esbuild/android-x64": "0.27.2", - "@esbuild/darwin-arm64": "0.27.2", - "@esbuild/darwin-x64": "0.27.2", - "@esbuild/freebsd-arm64": "0.27.2", - "@esbuild/freebsd-x64": "0.27.2", - "@esbuild/linux-arm": "0.27.2", - "@esbuild/linux-arm64": "0.27.2", - "@esbuild/linux-ia32": "0.27.2", - "@esbuild/linux-loong64": "0.27.2", - "@esbuild/linux-mips64el": "0.27.2", - "@esbuild/linux-ppc64": "0.27.2", - "@esbuild/linux-riscv64": "0.27.2", - "@esbuild/linux-s390x": "0.27.2", - "@esbuild/linux-x64": "0.27.2", - "@esbuild/netbsd-arm64": "0.27.2", - "@esbuild/netbsd-x64": "0.27.2", - "@esbuild/openbsd-arm64": "0.27.2", - "@esbuild/openbsd-x64": "0.27.2", - "@esbuild/openharmony-arm64": "0.27.2", - "@esbuild/sunos-x64": "0.27.2", - "@esbuild/win32-arm64": "0.27.2", - "@esbuild/win32-ia32": "0.27.2", - "@esbuild/win32-x64": "0.27.2" + "@esbuild/aix-ppc64": "0.27.7", + "@esbuild/android-arm": "0.27.7", + "@esbuild/android-arm64": "0.27.7", + "@esbuild/android-x64": "0.27.7", + "@esbuild/darwin-arm64": "0.27.7", + "@esbuild/darwin-x64": "0.27.7", + "@esbuild/freebsd-arm64": "0.27.7", + "@esbuild/freebsd-x64": "0.27.7", + "@esbuild/linux-arm": "0.27.7", + "@esbuild/linux-arm64": "0.27.7", + "@esbuild/linux-ia32": "0.27.7", + "@esbuild/linux-loong64": "0.27.7", + "@esbuild/linux-mips64el": "0.27.7", + "@esbuild/linux-ppc64": "0.27.7", + "@esbuild/linux-riscv64": "0.27.7", + "@esbuild/linux-s390x": "0.27.7", + "@esbuild/linux-x64": "0.27.7", + "@esbuild/netbsd-arm64": "0.27.7", + "@esbuild/netbsd-x64": "0.27.7", + "@esbuild/openbsd-arm64": "0.27.7", + "@esbuild/openbsd-x64": "0.27.7", + "@esbuild/openharmony-arm64": "0.27.7", + "@esbuild/sunos-x64": "0.27.7", + "@esbuild/win32-arm64": "0.27.7", + "@esbuild/win32-ia32": "0.27.7", + "@esbuild/win32-x64": "0.27.7" } }, "node_modules/twemoji": { @@ -6262,6 +5930,50 @@ "integrity": "sha512-9DUOTGLOWs0pFWnh1p6NF+C3CkQ96PWmEFwhOVmT3WbecRC+68AIqpsnJXygfkFcp4aXbOp8Dwbhh/HQgvoRxA==", "license": "MIT" }, + "node_modules/twemoji/node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/twemoji/node_modules/fs-extra/node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "license": "MIT", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/twemoji/node_modules/jsonfile": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-5.0.0.tgz", + "integrity": "sha512-NQRZ5CRo74MhMMC3/3r5g2k4fjodJ/wh8MxjFbCViWKFjxrnudWSY5vomh+23ZaXzAS7J3fBZIR2dV6WbmfM0w==", + "license": "MIT", + "dependencies": { + "universalify": "^0.1.2" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/twemoji/node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -6276,15 +5988,15 @@ } }, "node_modules/typed-query-selector": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.1.tgz", - "integrity": "sha512-uzR+FzI8qrUEIu96oaeBJmd9E7CFEiQ3goA5qCVgc4s5llSubcfGHq9yUstZx/k4s9dXHVKsE35YWoFyvEqEHA==", + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.2.tgz", + "integrity": "sha512-EOPFbyIub4ngnEdqi2yOcNeDLaX/0jcE1JoAXQDDMIthap7FoN795lc/SHfIq2d416VufXpM8z/lD+WRm2gfOQ==", "license": "MIT" }, "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", "devOptional": true, "license": "Apache-2.0", "bin": { @@ -6305,22 +6017,6 @@ "form-data": "^4.0.1" } }, - "node_modules/typescript-telegram-bot-api/node_modules/form-data": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", - "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.2", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/undici-types": { "version": "7.19.2", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz", @@ -6328,12 +6024,12 @@ "license": "MIT" }, "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "license": "MIT", "engines": { - "node": ">= 4.0.0" + "node": ">= 10.0.0" } }, "node_modules/uri-js": { @@ -6371,6 +6067,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -6399,24 +6096,6 @@ } }, "node_modules/wrap-ansi": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", - "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.1.0", - "string-width": "^5.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" - } - }, - "node_modules/wrap-ansi-cjs": { - "name": "wrap-ansi", "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", @@ -6433,59 +6112,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/wrap-ansi-cjs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", - "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -6493,9 +6119,9 @@ "license": "ISC" }, "node_modules/ws": { - "version": "8.19.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz", - "integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==", + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.20.0.tgz", + "integrity": "sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==", "license": "MIT", "engines": { "node": ">=10.0.0" @@ -6514,137 +6140,39 @@ } }, "node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "license": "ISC" + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "license": "ISC", + "engines": { + "node": ">=10" + } }, "node_modules/yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "license": "MIT", "dependencies": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" }, "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "license": "ISC", - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - }, "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "license": "MIT" - }, - "node_modules/yargs/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "license": "MIT", - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "license": "MIT", - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "license": "MIT", - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/yargs/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "license": "MIT", - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "license": "MIT", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "license": "MIT", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" + "node": ">=12" } }, "node_modules/yauzl": { @@ -6670,35 +6198,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/youtubei.js": { - "version": "17.0.1", - "resolved": "https://registry.npmjs.org/youtubei.js/-/youtubei.js-17.0.1.tgz", - "integrity": "sha512-1lO4b8UqMDzE0oh2qEGzbBOd4UYRdxn/4PdpRM7BGTHxM6ddsEsKZTu90jp8V9FHVgC2h1UirQyqoqLiKwl+Zg==", - "funding": [ - "https://github.com/sponsors/LuanRT" - ], - "license": "MIT", - "dependencies": { - "@bufbuild/protobuf": "^2.0.0", - "meriyah": "^6.1.4" - } - }, "node_modules/zod": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", - "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.1.tgz", + "integrity": "sha512-a6ENMBBGZBsnlSebQ/eKCguSBeGKSf4O7BPnqVPmYGtpBYI7VSqoVqw+QcB7kPRjbqPwhYTpFbVj/RqNz/CT0Q==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" } }, "node_modules/zod-to-json-schema": { - "version": "3.25.1", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz", - "integrity": "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==", + "version": "3.25.2", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.2.tgz", + "integrity": "sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA==", "license": "ISC", "peerDependencies": { - "zod": "^3.25 || ^4" + "zod": "^3.25.28 || ^4" } } } diff --git a/package.json b/package.json index e13d772..daf4fa9 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "bun:start": "bun run dist/index.js" }, "dependencies": { - "@google/genai": "^1.50.1", + "@google/genai": "^1.51.0", "@libsql/client": "^0.17.3", "@mistralai/mistralai": "^2.2.1", "@napi-rs/canvas": "^0.1.100", @@ -27,8 +27,7 @@ "systeminformation": "^5.31.5", "twemoji": "^14.0.2", "typescript-telegram-bot-api": "^0.14.0", - "youtubei.js": "^17.0.1", - "zod": "^4.3.6" + "zod": "^4.4.1" }, "devDependencies": { "@types/bun": "^1.3.13", @@ -37,9 +36,9 @@ "@types/fluent-ffmpeg": "^2.1.28", "@typescript-eslint/eslint-plugin": "^8.59.1", "@typescript-eslint/parser": "^8.59.1", - "drizzle-kit": "^1.0.0-beta.22", + "drizzle-kit": "^1.0.0-rc.1", "eslint": "^10.2.1", "tsx": "^4.21.0", - "typescript": "^5.9.3" + "typescript": "^6.0.3" } } diff --git a/src/base/callback-command.ts b/src/base/callback-command.ts index 0f3852a..2e8769b 100644 --- a/src/base/callback-command.ts +++ b/src/base/callback-command.ts @@ -8,7 +8,7 @@ export abstract class CallbackCommand { abstract text: string; abstract data: string; - requirements?: Requirements = null; + requirements?: Requirements | null = null; abstract execute(query: CallbackQuery): Promise; diff --git a/src/base/command.ts b/src/base/command.ts index b7a5301..b416a0a 100644 --- a/src/base/command.ts +++ b/src/base/command.ts @@ -9,7 +9,7 @@ export abstract class Command { command?: string | string[]; argsMode: ArgsMode = "none"; - requirements?: Requirements = null; + requirements?: Requirements | null = null; title?: string; description?: string; @@ -24,7 +24,7 @@ export abstract class Command { abstract execute( msg: Message, - match?: RegExpExecArray + match?: RegExpExecArray | null ): Promise; } diff --git a/src/base/requirements.ts b/src/base/requirements.ts index 00c1ff3..c0831e1 100644 --- a/src/base/requirements.ts +++ b/src/base/requirements.ts @@ -4,7 +4,7 @@ export class Requirements { requirements: Requirement[] = []; private constructor(requirements?: Requirement[]) { - this.requirements = requirements; + this.requirements = requirements || []; } static Build(...requirements: Requirement[]): Requirements { diff --git a/src/callback_commands/cancel.ts b/src/callback_commands/cancel.ts index 69e2eb2..89a6cad 100644 --- a/src/callback_commands/cancel.ts +++ b/src/callback_commands/cancel.ts @@ -3,7 +3,7 @@ import {CallbackCommand} from "../base/callback-command"; export class Cancel extends CallbackCommand { text = "❌ Отменить"; - data = null; + data = ""; constructor(text?: string, data?: string) { super(); @@ -13,7 +13,7 @@ export class Cancel extends CallbackCommand { } static withData(data?: string): Cancel { - return new Cancel(null, data); + return new Cancel("", data); } async execute(): Promise { diff --git a/src/callback_commands/download-yt-video.ts b/src/callback_commands/download-yt-video.ts deleted file mode 100644 index d867540..0000000 --- a/src/callback_commands/download-yt-video.ts +++ /dev/null @@ -1,36 +0,0 @@ -import {CallbackCommand} from "../base/callback-command"; -import {CallbackQuery} from "typescript-telegram-bot-api"; -import {Requirements} from "../base/requirements"; -import {Requirement} from "../base/requirement"; -import {commands} from "../index"; -import {YouTubeDownload} from "../commands/youtube-download"; - -const downloadText = " 📥 Скачать"; -const getFromCacheText = "📥 Загрузить из кэша"; - -export class DownloadYtVideo extends CallbackCommand { - data = "/ytdl"; - text = " 📥 Скачать"; - - requirements = Requirements.Build(Requirement.SAME_USER); - - constructor(text?: string, data?: string) { - super(); - - this.text = text || this.text; - this.data = data || this.data; - } - - static withData(inCache?: boolean, data?: string): DownloadYtVideo { - return new DownloadYtVideo(inCache ? getFromCacheText : downloadText, data); - } - - async execute(query: CallbackQuery): Promise { - const videoId = query.data.split(" ")[1]; - if (!videoId) return; - - const yt = commands.find(c => c instanceof YouTubeDownload); - if (!yt) return; - await yt.downloadYouTubeVideo(query.message, {videoId: videoId}); - } -} \ No newline at end of file diff --git a/src/callback_commands/ollama-cancel.ts b/src/callback_commands/ollama-cancel.ts index 93b238a..c9daaef 100644 --- a/src/callback_commands/ollama-cancel.ts +++ b/src/callback_commands/ollama-cancel.ts @@ -16,6 +16,8 @@ export class OllamaCancel extends CallbackCommand { requirements = Requirements.Build(Requirement.SAME_USER); async execute(query: CallbackQuery): Promise { + if (!query.message || !query.data) return; + const chatId = query.message.chat.id; const fromId = query.from.id; const messageId = query.message.message_id; @@ -44,7 +46,7 @@ export class OllamaCancel extends CallbackCommand { let content: string | null = null; - if (msg?.text?.trim()?.length > 0) { + if (msg?.text?.trim()?.length) { content = msg?.text.trim(); if (content.length + Environment.ollamaCancelledText.length > 4096) { content = content.substring(0, 4096 - Environment.ollamaCancelledText.length - 2) + "\n"; diff --git a/src/callback_commands/try-again.ts b/src/callback_commands/try-again.ts index 29af38a..331a424 100644 --- a/src/callback_commands/try-again.ts +++ b/src/callback_commands/try-again.ts @@ -12,7 +12,7 @@ export class TryAgain extends CallbackCommand { } static withData(data?: string): TryAgain { - return new TryAgain(null, data); + return new TryAgain("", data); } async execute(): Promise { diff --git a/src/callback_commands/yt-info.ts b/src/callback_commands/yt-info.ts deleted file mode 100644 index 8a676d7..0000000 --- a/src/callback_commands/yt-info.ts +++ /dev/null @@ -1,15 +0,0 @@ -import {CallbackCommand} from "../base/callback-command"; -import {CallbackQuery} from "typescript-telegram-bot-api"; -import {processYouTubeLink} from "../util/utils"; - -export class YtInfo extends CallbackCommand { - data = "/ytinfo"; - text: string; - - async execute(query: CallbackQuery): Promise { - const videoId = query.data.split(" ")[1]; - if (!videoId) return; - - await processYouTubeLink(query.message, null, videoId); - } -} \ No newline at end of file diff --git a/src/commands/admins-add.ts b/src/commands/admins-add.ts index e33272a..15413dc 100644 --- a/src/commands/admins-add.ts +++ b/src/commands/admins-add.ts @@ -18,7 +18,7 @@ export class AdminsAdd extends Command { ); async execute(msg: Message): Promise { - if (!msg.reply_to_message) return; + if (!msg.reply_to_message || !msg.reply_to_message.from) return; const id = msg.reply_to_message.from.id; const text = fullName(msg.reply_to_message.from); diff --git a/src/commands/admins-remove.ts b/src/commands/admins-remove.ts index f50560d..a452426 100644 --- a/src/commands/admins-remove.ts +++ b/src/commands/admins-remove.ts @@ -18,7 +18,7 @@ export class AdminsRemove extends Command { ); async execute(msg: Message): Promise { - if (!msg.reply_to_message) return; + if (!msg.reply_to_message || !msg.reply_to_message.from) return; const id = msg.reply_to_message.from.id; const text = fullName(msg.reply_to_message.from); diff --git a/src/commands/ae.ts b/src/commands/ae.ts index 927bf2c..f9c0a9e 100644 --- a/src/commands/ae.ts +++ b/src/commands/ae.ts @@ -13,7 +13,7 @@ export class Ae extends Command { requirements = Requirements.Build(Requirement.BOT_CREATOR); async execute(msg: Message, params?: RegExpExecArray) { - const match = params?.[3]; + const match = params?.[3] || ""; try { let e = eval(match); @@ -21,7 +21,7 @@ export class Ae extends Command { e = ((typeof e == "string") ? e : JSON.stringify(e)); await oldSendMessage(msg, e).catch(async () => await errorPlaceholder(msg)); - } catch (e) { + } catch (e: any) { const text = e.message.toString(); if (text.includes("is not defined")) { diff --git a/src/commands/ban.ts b/src/commands/ban.ts index 269f45d..890465a 100644 --- a/src/commands/ban.ts +++ b/src/commands/ban.ts @@ -19,7 +19,7 @@ export class Ban extends Command { ); async execute(msg: Message) { - if (!msg.reply_to_message) return; + if (!msg.reply_to_message || !msg.from || ! msg.reply_to_message.from) return; const user = msg.reply_to_message.from; const userId = user.id; diff --git a/src/commands/choice.ts b/src/commands/choice.ts index 7b3ed61..e0a66c0 100644 --- a/src/commands/choice.ts +++ b/src/commands/choice.ts @@ -12,7 +12,7 @@ export class Choice extends Command { async execute(msg: Message, match?: RegExpExecArray): Promise { console.log("match", match); - const payload = match[3]; + const payload = match?.[3] || ""; const re = /\s*(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|([^,]+?))\s*(?:,|$)/g; diff --git a/src/commands/dice.ts b/src/commands/dice.ts index 813f41c..94b8902 100644 --- a/src/commands/dice.ts +++ b/src/commands/dice.ts @@ -11,8 +11,8 @@ export class Dice extends Command { description = "Sends random or specific dice"; async execute(msg: Message): Promise { - const split = msg.text.split("/dice "); - const secondPart = split[1]?.trim(); + const split = msg.text?.split("/dice "); + const secondPart = split?.[1]?.trim() || ""; const emojiIndex = emojis.indexOf(secondPart); const emojiToDice: DiceEmoji = (emojiIndex >= 0 ? emojis[emojiIndex] : randomValue(emojis)) as DiceEmoji; diff --git a/src/commands/distort.ts b/src/commands/distort.ts index 36e3061..7785458 100644 --- a/src/commands/distort.ts +++ b/src/commands/distort.ts @@ -47,14 +47,14 @@ export class Distort extends Command { const inputBuf = await downloadTelegramFile(file.file_path); - const outBuf = await waveDistortSharp(inputBuf, amp, wavelength); + const outBuf = await waveDistortSharp(inputBuf, amp, wavelength); await bot.sendPhoto({ chat_id: chatId, photo: outBuf, caption: `Искажение готово ✅ (amp=${amp}, wavelength=${wavelength})`, }); - } catch (e) { + } catch (e: any) { await oldReplyToMessage( msg, `Не получилось исказить изображение: ${e?.message ?? String(e)}` ).catch(logError); diff --git a/src/commands/gemini-chat.ts b/src/commands/gemini-chat.ts index b03d208..9f6a9a4 100644 --- a/src/commands/gemini-chat.ts +++ b/src/commands/gemini-chat.ts @@ -4,7 +4,7 @@ import {bot, googleAi} from "../index"; import {MessageStore} from "../common/message-store"; import {Requirements} from "../base/requirements"; import {Requirement} from "../base/requirement"; -import {ApiError} from "@google/genai"; + import { collectReplyChainText, escapeMarkdownV2Text, @@ -14,6 +14,7 @@ import { startIntervalEditor } from "../util/utils"; import {ChatCommand} from "../base/chat-command"; +import {ApiError} from "@google/genai"; export class GeminiChat extends ChatCommand { command = "gemini"; @@ -26,11 +27,11 @@ export class GeminiChat extends ChatCommand { async execute(msg: Message, match?: RegExpExecArray): Promise { console.log("match", match); - return this.executeGemini(msg, match?.[3]); + return this.executeGemini(msg, match?.[3] || ""); } async executeGemini(msg: Message, text: string): Promise { - if (!text || text.trim().length === 0) return; + if (!text || !text.trim().length) return; const chatId = msg.chat.id; @@ -77,7 +78,7 @@ export class GeminiChat extends ChatCommand { }); } - let waitMessage: Message; + let waitMessage: Message | null = null; const startTime = Date.now(); @@ -95,7 +96,7 @@ export class GeminiChat extends ChatCommand { const stream = await googleAi.interactions.create({ model: Environment.GEMINI_MODEL, - input: input, + input: input as any, stream: true }); @@ -109,7 +110,7 @@ export class GeminiChat extends ChatCommand { await bot.editMessageText( { chat_id: chatId, - message_id: waitMessage.message_id, + message_id: waitMessage?.message_id, text: escapeMarkdownV2Text(text), parse_mode: "MarkdownV2" } @@ -117,9 +118,11 @@ export class GeminiChat extends ChatCommand { console.log("editMessageText", text); - waitMessage.reply_to_message = msg; - waitMessage.text = text; - await MessageStore.put(waitMessage); + if (waitMessage) { + waitMessage.reply_to_message = msg; + waitMessage.text = text; + await MessageStore.put(waitMessage); + } }, onStop: async () => { } @@ -175,17 +178,19 @@ export class GeminiChat extends ChatCommand { await replyToMessage({message: waitMessage, text: `⏱️ ${diff}s`}); } } - } catch (error) { - logError(error); + } catch (e: any) { + logError(e); - if (error instanceof ApiError) { - if (error.status === 429) { - await oldReplyToMessage(waitMessage, "На сегодня всё, лимиты закончились.").catch(logError); - return; + if (waitMessage) { + if (e instanceof ApiError) { + if (e.status === 429) { + await oldReplyToMessage(waitMessage, "На сегодня всё, лимиты закончились.").catch(logError); + return; + } } - } - await oldReplyToMessage(waitMessage, `Произошла ошибка!\n${error.toString()}`).catch(logError); + await oldReplyToMessage(waitMessage, `Произошла ошибка!\n${e.toString()}`).catch(logError); + } } } } \ No newline at end of file diff --git a/src/commands/gemini-generate-image.ts b/src/commands/gemini-generate-image.ts index 68932a1..ea451ab 100644 --- a/src/commands/gemini-generate-image.ts +++ b/src/commands/gemini-generate-image.ts @@ -18,14 +18,14 @@ export class GeminiGenerateImage extends Command { async execute(msg: Message, match?: RegExpExecArray): Promise { console.log("match", match); - const prompt = match?.[3]; + const prompt = match?.[3] || ""; return this.executeGenImage(msg, prompt); } async executeGenImage(msg: Message, text: string): Promise { - if (!text || text.trim().length === 0) return; + if (!text || !text.trim().length) return; - let waitMessage: Message; + let waitMessage: Message | null = null; try { waitMessage = await replyToMessage({ @@ -47,14 +47,16 @@ export class GeminiGenerateImage extends Command { console.log(`Output ${index + 1}: ${output}`); } }); - } catch (e) { + } catch (e: any) { logError(e); - await replyToMessage({ - message: waitMessage, - text: `Произошла ошибка!\n${e.toString()}`, - link_preview_options: {is_disabled: true} - }).catch(logError); + if (waitMessage) { + await replyToMessage({ + message: waitMessage, + text: `Произошла ошибка!\n${e.toString()}`, + link_preview_options: {is_disabled: true} + }).catch(logError); + } } } } \ No newline at end of file diff --git a/src/commands/gemini-get-model.ts b/src/commands/gemini-get-model.ts index 38a053e..1f28f5d 100644 --- a/src/commands/gemini-get-model.ts +++ b/src/commands/gemini-get-model.ts @@ -20,9 +20,9 @@ export class GeminiGetModel extends Command { return { vision: {supported: true}, - ocr: null, + ocr: undefined, thinking: {supported: info.thinking}, - tools: null + tools: undefined }; } catch (e) { logError(e); diff --git a/src/commands/gemini-list-models.ts b/src/commands/gemini-list-models.ts index 2d01b1a..44c8321 100644 --- a/src/commands/gemini-list-models.ts +++ b/src/commands/gemini-list-models.ts @@ -17,7 +17,7 @@ export class GeminiListModels extends Command { console.log(listResponse); const modelsString = listResponse.page - .sort((a, b) => a.name.localeCompare(b.name)) + .sort((a, b) => (a.name || "").localeCompare((b.name || ""))) .map(e => `${e.name}`) .join("\n"); diff --git a/src/commands/help.ts b/src/commands/help.ts index f9a53f1..df362d4 100644 --- a/src/commands/help.ts +++ b/src/commands/help.ts @@ -11,6 +11,7 @@ export class Help extends Command { description = "Show list of commands"; async execute(msg: Message) { + if (!msg.from) return; let text = "Commands:\n\n"; commands.forEach(c => { diff --git a/src/commands/id.ts b/src/commands/id.ts index 5bba0f9..911f496 100644 --- a/src/commands/id.ts +++ b/src/commands/id.ts @@ -7,9 +7,9 @@ export class Id extends Command { description = "ID of chat, user and reply (if replied to any message)"; async execute(msg: Message): Promise { - let text = `chat id: \n\`\`\`${msg.chat.id}\`\`\` \nfrom id: \n\`\`\`${msg.from.id}\`\`\``; + let text = `chat id: \n\`\`\`${msg.chat.id}\`\`\` \nfrom id: \n\`\`\`${msg.from?.id}\`\`\``; if (msg.reply_to_message) { - text += ` \nreply id: \n\`\`\`${msg.reply_to_message.from.id}\`\`\``; + text += ` \nreply id: \n\`\`\`${msg.reply_to_message.from?.id}\`\`\``; } await oldReplyToMessage(msg, text, "MarkdownV2").catch(logError); diff --git a/src/commands/ignore.ts b/src/commands/ignore.ts index ae9339e..ab20492 100644 --- a/src/commands/ignore.ts +++ b/src/commands/ignore.ts @@ -19,7 +19,7 @@ export class Ignore extends Command { ); async execute(msg: Message) { - if (!msg.reply_to_message) return; + if (!msg.reply_to_message || !msg.reply_to_message.from) return; const id = msg.reply_to_message.from.id; const text = fullName(msg.reply_to_message.from); diff --git a/src/commands/info.ts b/src/commands/info.ts index f3c20d3..d8c8405 100644 --- a/src/commands/info.ts +++ b/src/commands/info.ts @@ -16,7 +16,7 @@ export class Info extends Command { async execute(msg: Message): Promise { const aiProvider = Environment.DEFAULT_AI_PROVIDER; const aiModel = getCurrentModel(); - let aiModelCapabilities: AiModelCapabilities = {}; + let aiModelCapabilities: AiModelCapabilities | null = {}; try { aiModelCapabilities = await getCurrentModelCapabilities(); @@ -33,11 +33,11 @@ export class Info extends Command { `provider: ${aiProvider.toLowerCase()}\n` + `model: ${aiModel}\n\n` + - `vision${aiModelCapabilities.vision?.external ? "(ext)" : ""}: ${boolToEmoji(aiModelCapabilities.vision?.supported)}\n` + - `ocr${aiModelCapabilities.ocr?.external ? "(ext)" : ""}: ${boolToEmoji(aiModelCapabilities.ocr?.supported)}\n` + - `thinking${aiModelCapabilities.thinking?.external ? "(ext)" : ""}: ${boolToEmoji(aiModelCapabilities.thinking?.supported)}\n` + - `tools${aiModelCapabilities.tools?.external ? "(ext)" : ""}: ${boolToEmoji(aiModelCapabilities.tools?.supported)}\n` + - `audio${aiModelCapabilities.audio?.external ? "(ext)": ""}: ${boolToEmoji(aiModelCapabilities.audio?.supported)}` + + `vision${aiModelCapabilities?.vision?.external ? "(ext)" : ""}: ${boolToEmoji(aiModelCapabilities?.vision?.supported)}\n` + + `ocr${aiModelCapabilities?.ocr?.external ? "(ext)" : ""}: ${boolToEmoji(aiModelCapabilities?.ocr?.supported)}\n` + + `thinking${aiModelCapabilities?.thinking?.external ? "(ext)" : ""}: ${boolToEmoji(aiModelCapabilities?.thinking?.supported)}\n` + + `tools${aiModelCapabilities?.tools?.external ? "(ext)" : ""}: ${boolToEmoji(aiModelCapabilities?.tools?.supported)}\n` + + `audio${aiModelCapabilities?.audio?.external ? "(ext)" : ""}: ${boolToEmoji(aiModelCapabilities?.audio?.supported)}` + "```"; const cmds = commands.filter(c => !(c instanceof ChatCommand)); diff --git a/src/commands/mistral-chat.ts b/src/commands/mistral-chat.ts index 83f5cd5..a076a65 100644 --- a/src/commands/mistral-chat.ts +++ b/src/commands/mistral-chat.ts @@ -26,11 +26,11 @@ export class MistralChat extends ChatCommand { async execute(msg: Message, match?: RegExpExecArray): Promise { console.log("match", match); - return this.executeMistral(msg, match?.[3]); + return this.executeMistral(msg, match?.[3] || ""); } async executeMistral(msg: Message, text: string): Promise { - if (!text || text.trim().length === 0) return; + if (!text || !text.trim().length) return; const chatId = msg.chat.id; @@ -63,7 +63,7 @@ export class MistralChat extends ChatCommand { chatMessages.unshift({role: "system", content: [{type: "text", text: Environment.SYSTEM_PROMPT}]}); } - let waitMessage: Message; + let waitMessage: Message | null = null; const startTime = Date.now(); @@ -74,7 +74,7 @@ export class MistralChat extends ChatCommand { if (imagesCount) { try { - const modelInfo = await commands.find(c => c instanceof MistralGetModel).getModelCapabilities(); + const modelInfo = await commands.find(c => c instanceof MistralGetModel)?.getModelCapabilities(); if (modelInfo) { if (!modelInfo.vision?.supported) { await replyToMessage({ @@ -117,7 +117,7 @@ export class MistralChat extends ChatCommand { await bot.editMessageText( { chat_id: chatId, - message_id: waitMessage.message_id, + message_id: waitMessage?.message_id, text: escapeMarkdownV2Text(text), parse_mode: "MarkdownV2" } @@ -125,9 +125,11 @@ export class MistralChat extends ChatCommand { console.log("editMessageText", text); - waitMessage.reply_to_message = msg; - waitMessage.text = text; - await MessageStore.put(waitMessage); + if (waitMessage) { + waitMessage.reply_to_message = msg; + waitMessage.text = text; + await MessageStore.put(waitMessage); + } }, onStop: async () => { } @@ -172,9 +174,12 @@ export class MistralChat extends ChatCommand { await replyToMessage({message: waitMessage, text: `⏱️ ${diff}s`}); } } - } catch (error) { - logError(error); - await oldReplyToMessage(waitMessage, `Произошла ошибка!\n${error.toString()}`).catch(logError); + } catch (e: any) { + logError(e); + + if (waitMessage) { + await oldReplyToMessage(waitMessage, `Произошла ошибка!\n${e.toString()}`).catch(logError); + } } } } \ No newline at end of file diff --git a/src/commands/mistral-get-model.ts b/src/commands/mistral-get-model.ts index c71a975..1c18aaa 100644 --- a/src/commands/mistral-get-model.ts +++ b/src/commands/mistral-get-model.ts @@ -6,7 +6,6 @@ import {Requirements} from "../base/requirements"; import {Requirement} from "../base/requirement"; import {mistralAi} from "../index"; import {AiModelCapabilities} from "../model/ai-model-capabilities"; -import {BaseModelCard} from "@mistralai/mistralai/models/components/basemodelcard"; export class MistralGetModel extends Command { title = "/mistralGetModel"; @@ -20,13 +19,13 @@ export class MistralGetModel extends Command { async getModelCapabilities(): Promise { try { - const info: BaseModelCard = await mistralAi.models.retrieve({modelId: Environment.MISTRAL_MODEL}) as BaseModelCard; + const info = await mistralAi.models.retrieve({modelId: Environment.MISTRAL_MODEL}) as any; console.log(info); return { vision: {supported: info.capabilities.vision}, ocr: {supported: info.capabilities.ocr}, - thinking: null, + thinking: undefined, tools: {supported: info.capabilities.functionCalling}, audio: {supported: info.capabilities.audioTranscription} }; diff --git a/src/commands/mistral-list-models.ts b/src/commands/mistral-list-models.ts index 9ab6346..68ca1c4 100644 --- a/src/commands/mistral-list-models.ts +++ b/src/commands/mistral-list-models.ts @@ -4,7 +4,6 @@ import {Requirement} from "../base/requirement"; import {Message} from "typescript-telegram-bot-api"; import {mistralAi} from "../index"; import {logError, oldReplyToMessage, replyToMessage} from "../util/utils"; -import {BaseModelCard} from "@mistralai/mistralai/models/components/basemodelcard"; export class MistralListModels extends Command { title = "/mistralListModels"; @@ -21,7 +20,7 @@ export class MistralListModels extends Command { console.log(listResponse); const modelsString = listResponse.data - .sort((a, b) => a.name.localeCompare(b.name)) + .sort((a, b) => a?.name?.localeCompare(b.name || "") || -1) .map(e => `${e.id}`) .join("\n"); @@ -37,4 +36,42 @@ export class MistralListModels extends Command { await oldReplyToMessage(msg, "Не получилось загрузить список моделей").catch(logError); } } -} \ No newline at end of file +} + +type BaseModelCard = { + id: string; + object: string; + created?: number | undefined; + ownedBy: string; + /** + * This is populated by Harmattan, but some fields have a name + * + * @remarks + * that we don't want to expose in the API. + */ + capabilities: ModelCapabilities; + name?: string | null | undefined; + description?: string | null | undefined; + maxContextLength: number; + aliases?: Array | undefined; + deprecation?: Date | null | undefined; + deprecationReplacementModel?: string | null | undefined; + defaultModelTemperature?: number | null | undefined; + type: "base"; +}; + +type ModelCapabilities = { + completionChat: boolean; + functionCalling: boolean; + reasoning: boolean; + completionFim: boolean; + fineTuning: boolean; + vision: boolean; + ocr: boolean; + classification: boolean; + moderation: boolean; + audio: boolean; + audioTranscription: boolean; + audioTranscriptionRealtime: boolean; + audioSpeech: boolean; +}; \ No newline at end of file diff --git a/src/commands/ollama-chat.ts b/src/commands/ollama-chat.ts index 5644b6d..c5ee3db 100644 --- a/src/commands/ollama-chat.ts +++ b/src/commands/ollama-chat.ts @@ -28,11 +28,12 @@ export class OllamaChat extends ChatCommand { async execute(msg: Message, match?: RegExpExecArray | null): Promise { console.log("match", match); - return this.executeOllama(msg, match?.[3], match?.[1]?.toLowerCase()?.startsWith("ollamathink")); + return this.executeOllama(msg, match?.[3] || "", match?.[1]?.toLowerCase()?.startsWith("ollamathink")); } - async executeOllama(msg: Message, text: string, think: boolean = false, voiceB64?: string): Promise { - if ((!text || text.trim().length === 0) && !voiceB64) return; + async executeOllama(msg: Message, text: string, think: boolean = false, voiceB64?: string | null): Promise { + if (!msg.from) return; + if ((!text || !text.trim().length) && !voiceB64) return; const chatId = msg.chat.id; @@ -66,7 +67,7 @@ export class OllamaChat extends ChatCommand { chatMessages.unshift({role: "system", content: Environment.SYSTEM_PROMPT, images: []}); } - let waitMessage: Message; + let waitMessage: Message | null = null; const startTime = Date.now(); @@ -77,7 +78,7 @@ export class OllamaChat extends ChatCommand { if (!think && imagesCount) { try { - const modelInfo = await commands.find(c => c instanceof OllamaGetModel).loadImageModelInfo(); + const modelInfo = await commands.find(c => c instanceof OllamaGetModel)?.loadImageModelInfo(); if (modelInfo) { if (!modelInfo.vision?.supported) { await replyToMessage({ @@ -94,7 +95,7 @@ export class OllamaChat extends ChatCommand { if (think) { try { - const modelInfo = await commands.find(c => c instanceof OllamaGetModel).loadThinkModelInfo(); + const modelInfo = await commands.find(c => c instanceof OllamaGetModel)?.loadThinkModelInfo(); if (modelInfo) { if (!modelInfo.thinking?.supported) { await replyToMessage({ @@ -131,11 +132,11 @@ export class OllamaChat extends ChatCommand { } const stream = await ollama.chat({ - model: think ? Environment.OLLAMA_THINK_MODEL : imagesCount ? Environment.OLLAMA_IMAGE_MODEL : Environment.OLLAMA_MODEL, + model: (think ? Environment.OLLAMA_THINK_MODEL : imagesCount ? Environment.OLLAMA_IMAGE_MODEL : Environment.OLLAMA_MODEL), stream: true, think: think, messages: chatMessages, - options: options + options: >options }); const newRequest = { @@ -170,7 +171,7 @@ export class OllamaChat extends ChatCommand { try { await bot.editMessageText({ chat_id: chatId, - message_id: waitMessage.message_id, + message_id: waitMessage?.message_id, text: escapeMarkdownV2Text(text), parse_mode: "MarkdownV2", reply_markup: cancelMarkup @@ -178,9 +179,11 @@ export class OllamaChat extends ChatCommand { console.log("editMessageText", text); - waitMessage.reply_to_message = msg; - waitMessage.text = text; - await MessageStore.put(waitMessage); + if (waitMessage) { + waitMessage.reply_to_message = msg; + waitMessage.text = text; + await MessageStore.put(waitMessage); + } } catch (e) { logError(e); } @@ -225,7 +228,7 @@ export class OllamaChat extends ChatCommand { shouldBreak = true; } - if (getOllamaRequest(uuid).done) { + if (getOllamaRequest(uuid)?.done) { shouldBreak = true; } @@ -266,17 +269,19 @@ export class OllamaChat extends ChatCommand { }).catch(logError); console.log(`aborted request ${uuid}:`, abortOllamaRequest(uuid)); } - } catch (error) { - if (error.message.toLowerCase().includes("aborted")) return; + } catch (e: any) { + if (e.message.toLowerCase().includes("aborted")) return; + logError(e); - await bot.editMessageReplyMarkup({ - chat_id: chatId, - message_id: waitMessage.message_id, - reply_markup: {inline_keyboard: []} - }).catch(logError); + if (waitMessage) { + await bot.editMessageReplyMarkup({ + chat_id: chatId, + message_id: waitMessage.message_id, + reply_markup: {inline_keyboard: []} + }).catch(logError); - logError(error); - await oldReplyToMessage(waitMessage, `Произошла ошибка!\n${error.toString()}`).catch(logError); + await oldReplyToMessage(waitMessage, `Произошла ошибка!\n${e.toString()}`).catch(logError); + } } } } \ No newline at end of file diff --git a/src/commands/ollama-get-model.ts b/src/commands/ollama-get-model.ts index bf3c3f1..f4b25c3 100644 --- a/src/commands/ollama-get-model.ts +++ b/src/commands/ollama-get-model.ts @@ -56,22 +56,24 @@ export class OllamaGetModel extends Command { parse_mode: "Markdown" }).catch(logError); - } catch (e) { + } catch (e: any) { logError(e); await replyToMessage({message: msg, text: e.toString()}).catch(logError); } } - private getModelText(model: string, info: AiModelCapabilities): string { + private getModelText(model: string | undefined, info: AiModelCapabilities | null): string { return `model: ${model}\n\n` + - `vision: ${boolToEmoji(info.vision?.supported)}\n` + - `ocr: ${boolToEmoji(info.ocr?.supported)}\n` + - `thinking: ${boolToEmoji(info.thinking?.supported)}\n` + - `tools: ${boolToEmoji(info.tools?.supported)}\n` + - `audio: ${boolToEmoji(info.audio?.supported)}`; + `vision: ${boolToEmoji(info?.vision?.supported)}\n` + + `ocr: ${boolToEmoji(info?.ocr?.supported)}\n` + + `thinking: ${boolToEmoji(info?.thinking?.supported)}\n` + + `tools: ${boolToEmoji(info?.tools?.supported)}\n` + + `audio: ${boolToEmoji(info?.audio?.supported)}`; } - async getModelCapabilities(model: string = Environment.OLLAMA_MODEL): Promise { + async getModelCapabilities(model: string | undefined = Environment.OLLAMA_MODEL): Promise { + if (!model) return null; + try { const info = await ollama.show({model: model}); console.log(info); diff --git a/src/commands/ollama-prompt.ts b/src/commands/ollama-prompt.ts index 8a1cd0f..70199eb 100644 --- a/src/commands/ollama-prompt.ts +++ b/src/commands/ollama-prompt.ts @@ -20,14 +20,16 @@ export class OllamaPrompt extends Command { async execute(msg: Message, match?: RegExpExecArray): Promise { console.log("match", match); - return this.executeOllama(msg, match?.[3]); + return this.executeOllama(msg, match?.[3] || ""); } async executeOllama(msg: Message, text: string): Promise { - if (!text || text.trim().length === 0) return; + if (!text || !text.trim().length) return; + if (!msg.from) return; + const chatId = msg.chat.id; - let waitMessage: Message; + let waitMessage: Message | null = null; const startTime = Date.now(); @@ -45,7 +47,7 @@ export class OllamaPrompt extends Command { }); const stream = await ollama.generate({ - model: Environment.OLLAMA_MODEL, + model: Environment.OLLAMA_MODEL, stream: true, think: false, prompt: text @@ -83,7 +85,7 @@ export class OllamaPrompt extends Command { try { await bot.editMessageText({ chat_id: chatId, - message_id: waitMessage.message_id, + message_id: waitMessage?.message_id, text: escapeMarkdownV2Text(text), parse_mode: "Markdown", reply_markup: cancelMarkup @@ -91,9 +93,11 @@ export class OllamaPrompt extends Command { console.log("editMessageText", text); - waitMessage.reply_to_message = msg; - waitMessage.text = text; - await MessageStore.put(waitMessage); + if (waitMessage) { + waitMessage.reply_to_message = msg; + waitMessage.text = text; + await MessageStore.put(waitMessage); + } } catch (e) { logError(e); } @@ -138,7 +142,7 @@ export class OllamaPrompt extends Command { shouldBreak = true; } - if (getOllamaRequest(uuid).done) { + if (getOllamaRequest(uuid)?.done) { shouldBreak = true; } @@ -173,17 +177,19 @@ export class OllamaPrompt extends Command { reply_markup: {inline_keyboard: []} }).catch(logError); } - } catch (error) { - if (error.message.toLowerCase().includes("aborted")) return; + } catch (e: any) { + if (e.message.toLowerCase().includes("aborted")) return; + logError(e); - await bot.editMessageReplyMarkup({ - chat_id: chatId, - message_id: waitMessage.message_id, - reply_markup: {inline_keyboard: []} - }).catch(logError); + if (waitMessage) { + await bot.editMessageReplyMarkup({ + chat_id: chatId, + message_id: waitMessage.message_id, + reply_markup: {inline_keyboard: []} + }).catch(logError); - logError(error); - await oldReplyToMessage(waitMessage, `Произошла ошибка!\n${error.toString()}`).catch(logError); + await oldReplyToMessage(waitMessage, `Произошла ошибка!\n${e.toString()}`).catch(logError); + } } } } \ No newline at end of file diff --git a/src/commands/ollama-search.ts b/src/commands/ollama-search.ts index c3a5634..825236b 100644 --- a/src/commands/ollama-search.ts +++ b/src/commands/ollama-search.ts @@ -4,7 +4,7 @@ import {Requirement} from "../base/requirement"; import {Message} from "typescript-telegram-bot-api"; import {bot, ollama} from "../index"; import {WebSearchResponse} from "../model/web-search-response"; -import {oldEditMessageText, logError} from "../util/utils"; +import {logError, oldEditMessageText} from "../util/utils"; import {Environment} from "../common/environment"; export class OllamaSearch extends Command { @@ -18,6 +18,10 @@ export class OllamaSearch extends Command { async execute(msg: Message, match?: RegExpExecArray | null): Promise { console.log("match", match); + + const query = match?.[3] || ""; + if (!query || !query.length) return; + const chatId = msg.chat.id; try { @@ -31,7 +35,7 @@ export class OllamaSearch extends Command { parse_mode: "Markdown" }); - const results = await ollama.webSearch({query: match?.[3]}); + const results = await ollama.webSearch({query: query}); console.log("results", results); let message = "Результаты:\n\n"; diff --git a/src/commands/ollama-set-model.ts b/src/commands/ollama-set-model.ts index 42ea5de..4cccbf3 100644 --- a/src/commands/ollama-set-model.ts +++ b/src/commands/ollama-set-model.ts @@ -15,18 +15,19 @@ export class OllamaSetModel extends Command { requirements = Requirements.Build(Requirement.BOT_CREATOR); async execute(msg: Message, match?: RegExpExecArray | null): Promise { - const newModel = match?.[3]; + const newModel = match?.[3] || ""; + if (!newModel || !newModel.length) return; try { await ollama.show({model: newModel}); - Environment.setOllamaModel(newModel || Environment.OLLAMA_MODEL); + Environment.setOllamaModel(newModel || Environment.OLLAMA_MODEL); const text = newModel ? `Выбрана модель "${newModel}"` : `Модель не задана. Будет использоваться стандартная модель "${Environment.OLLAMA_MODEL}".`; await replyToMessage({message: msg, text: text}).catch(logError); - } catch (e) { + } catch (e: any) { logError(e); await replyToMessage({message: msg, text: e.toString()}).catch(logError); } diff --git a/src/commands/openai-chat.ts b/src/commands/openai-chat.ts index 0d096ee..342a93a 100644 --- a/src/commands/openai-chat.ts +++ b/src/commands/openai-chat.ts @@ -24,11 +24,11 @@ export class OpenAIChat extends ChatCommand { async execute(msg: Message, match?: RegExpExecArray): Promise { console.log("OpenAI Chat: ", match); - return this.executeOpenAI(msg, match?.[3]); + return this.executeOpenAI(msg, match?.[3] || ""); } async executeOpenAI(msg: Message, text: string): Promise { - if (!text || text.trim().length === 0) return; + if (!text || !text.trim().length) return; const chatId = msg.chat.id; @@ -67,7 +67,7 @@ export class OpenAIChat extends ChatCommand { }); } - let waitMessage: Message; + let waitMessage: Message | null = null; const startTime = Date.now(); @@ -98,7 +98,7 @@ export class OpenAIChat extends ChatCommand { await bot.editMessageText( { chat_id: chatId, - message_id: waitMessage.message_id, + message_id: waitMessage?.message_id, text: escapeMarkdownV2Text(text), parse_mode: "MarkdownV2" } @@ -106,9 +106,11 @@ export class OpenAIChat extends ChatCommand { console.log("editMessageText", text); - waitMessage.reply_to_message = msg; - waitMessage.text = text; - await MessageStore.put(waitMessage); + if (waitMessage) { + waitMessage.reply_to_message = msg; + waitMessage.text = text; + await MessageStore.put(waitMessage); + } }, onStop: async () => { } @@ -156,12 +158,15 @@ export class OpenAIChat extends ChatCommand { await replyToMessage({message: waitMessage, text: `⏱️ ${diff}s`}); } } - } catch (error) { - logError(error); - await replyToMessage({ - message: waitMessage, - text: `Произошла ошибка!\n${error.toString()}` - }).catch(logError); + } catch (e: any) { + logError(e); + + if (waitMessage) { + await replyToMessage({ + message: waitMessage, + text: `Произошла ошибка!\n${e.toString()}` + }).catch(logError); + } } } } \ No newline at end of file diff --git a/src/commands/openai-get-model.ts b/src/commands/openai-get-model.ts index aa0f42f..8227e4c 100644 --- a/src/commands/openai-get-model.ts +++ b/src/commands/openai-get-model.ts @@ -17,7 +17,7 @@ export class OpenAIGetModel extends Command { try { return { vision: {supported: true}, - ocr: null, + ocr: undefined, thinking: {supported: true}, tools: {supported: true}, }; diff --git a/src/commands/qr.ts b/src/commands/qr.ts index 3488373..851036c 100644 --- a/src/commands/qr.ts +++ b/src/commands/qr.ts @@ -61,7 +61,7 @@ export class Qr extends Command { }, parse_mode: "HTML" }); - } catch (e) { + } catch (e: any) { await replyToMessage({ message: msg, text: `Не получилось сгенерировать QR: ${e?.message ?? String(e)}` diff --git a/src/commands/quote.ts b/src/commands/quote.ts index a71a118..e75ac7f 100644 --- a/src/commands/quote.ts +++ b/src/commands/quote.ts @@ -48,6 +48,7 @@ export class Quote extends Command { async execute(msg: Message): Promise { const chatId = msg.chat.id; const reply = msg.reply_to_message; + if (!reply) return; try { const quoteRaw = (msg.quote?.text ?? reply.text ?? reply.caption ?? "").trim(); @@ -97,7 +98,9 @@ function twemojiUrl(emoji: string) { return `https://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/72x72/${code}.png`; } -async function loadEmoji(emoji: string): Promise { +async function loadEmoji(emoji: string | undefined): Promise { + if (!emoji) return null; + const downloadAndCache = async (url: string): Promise => { const res = await axios.get(url, {responseType: "arraybuffer"}); const img = await loadImage(Buffer.from(res.data)); @@ -491,7 +494,7 @@ async function drawLine(ctx: SKRSContext2D, line: Segment[], x: number, baseline try { const img = await loadEmoji(seg.v); const y = baselineY - emojiSize + Math.round(fontSize * 0.2); - ctx.drawImage(img, cx, y, emojiSize, emojiSize); + ctx.drawImage(img, cx, y, emojiSize, emojiSize); } catch (e) { logError(e); ctx.fillText(seg.v, cx, baselineY); @@ -506,7 +509,7 @@ async function drawLine(ctx: SKRSContext2D, line: Segment[], x: number, baseline } else { const img = await loadEmoji("😥"); const y = baselineY - emojiSize + Math.round(fontSize * 0.2); - ctx.drawImage(img, cx, y, emojiSize, emojiSize); + ctx.drawImage(img, cx, y, emojiSize, emojiSize); } } catch (e) { console.warn("Failed to draw custom emoji:", e); @@ -514,7 +517,7 @@ async function drawLine(ctx: SKRSContext2D, line: Segment[], x: number, baseline try { const img = await loadEmoji("😥"); const y = baselineY - emojiSize + Math.round(fontSize * 0.2); - ctx.drawImage(img, cx, y, emojiSize, emojiSize); + ctx.drawImage(img, cx, y, emojiSize, emojiSize); } catch (e) { logError(e); diff --git a/src/commands/random-int.ts b/src/commands/random-int.ts index 2bac8ee..230a078 100644 --- a/src/commands/random-int.ts +++ b/src/commands/random-int.ts @@ -9,6 +9,9 @@ export class RandomInt extends Command { description = "Ranged random integer from parameters"; async execute(msg: Message) { + // TODO: 01/05/2026, Danil Nikolaev: improve + if (!msg.text) return; + const split = msg.text.split(" "); const min = parseInt(split[1]); const max = parseInt(split[2]); diff --git a/src/commands/random-string.ts b/src/commands/random-string.ts index 2a7f78c..31dacc2 100644 --- a/src/commands/random-string.ts +++ b/src/commands/random-string.ts @@ -9,6 +9,9 @@ export class RandomString extends Command { description = "literally random string (up to 4096 symbols)"; async execute(msg: Message) { + // TODO: 01/05/2026, Danil Nikolaev: improve + if (!msg.text) return; + const split = msg.text.split(" "); const l = parseInt(split.length > 1 ? split[1] : "1"); diff --git a/src/commands/start.ts b/src/commands/start.ts index b0fa959..e224b85 100644 --- a/src/commands/start.ts +++ b/src/commands/start.ts @@ -8,6 +8,6 @@ export class Start extends Command { description = "Start the bot"; async execute(msg: Message): Promise { - await commands.find(e => e instanceof Help).execute(msg); + await commands.find(e => e instanceof Help)?.execute(msg); } } \ No newline at end of file diff --git a/src/commands/transliteration.ts b/src/commands/transliteration.ts index ab4e564..9b29b17 100644 --- a/src/commands/transliteration.ts +++ b/src/commands/transliteration.ts @@ -81,12 +81,14 @@ export class Transliteration extends Command { description = "Transliteration EN <--> RU"; async execute(msg: Message): Promise { + if (!msg.text && !msg.caption) return; + let text: string = ""; if (msg.reply_to_message) { text = (msg.reply_to_message.text || msg.reply_to_message.caption || ""); } else { - const split = (msg.text || msg.caption).split("/tr "); + const split = ((msg.text || msg.caption)).split("/tr "); if (split.length > 1) { text = split[1].trim(); } diff --git a/src/commands/unban.ts b/src/commands/unban.ts index 978069c..a00a4bb 100644 --- a/src/commands/unban.ts +++ b/src/commands/unban.ts @@ -19,7 +19,7 @@ export class Unban extends Command { ); async execute(msg: Message) { - if (!msg.reply_to_message) return; + if (!msg.reply_to_message || !msg.reply_to_message.from) return; const user = msg.reply_to_message.from; const userId = user.id; @@ -34,7 +34,7 @@ export class Unban extends Command { return; } - if (msg.from.id !== Environment.CREATOR_ID && Environment.ADMIN_IDS.has(userId)) { + if (msg.from?.id !== Environment.CREATOR_ID && Environment.ADMIN_IDS.has(userId)) { await oldReplyToMessage(msg, "Админимтраторы бота и так не в бане.").catch(logError); return; } diff --git a/src/commands/unignore.ts b/src/commands/unignore.ts index 7c6025e..085d7f3 100644 --- a/src/commands/unignore.ts +++ b/src/commands/unignore.ts @@ -18,7 +18,7 @@ export class Unignore extends Command { ); async execute(msg: Message) { - if (!msg.reply_to_message) return; + if (!msg.reply_to_message || !msg.reply_to_message.from) return; const id = msg.reply_to_message.from.id; const text = fullName(msg.reply_to_message.from); diff --git a/src/commands/youtube-download.ts b/src/commands/youtube-download.ts deleted file mode 100644 index 39714a7..0000000 --- a/src/commands/youtube-download.ts +++ /dev/null @@ -1,66 +0,0 @@ -import {Command} from "../base/command"; -import {Message} from "typescript-telegram-bot-api"; -import {editMessageText, logError, replyToMessage} from "../util/utils"; -import {bot, botUser} from "../index"; -import {DownloadOptions, downloadVideoFromYouTube, getYouTubeVideoId} from "../util/ytdl"; -import {Environment} from "../common/environment"; -import {TryAgain} from "../callback_commands/try-again"; - -export class YouTubeDownload extends Command { - command = ["ytdl", "youtube"]; - argsMode = "required" as const; - - async execute(msg: Message, match?: RegExpExecArray): Promise { - const url = match?.[3]; - return this.downloadYouTubeVideo(msg, {url: url}); - } - - async downloadYouTubeVideo(msg: Message, options: DownloadOptions): Promise { - // TODO: 02.03.2026, Danil Nikolaev: add check for date - let waitMessage: Message | null = (msg.from.id === botUser.id) ? msg : null; - const videoId = "videoId" in options ? options.videoId : getYouTubeVideoId(options.url); - - try { - if (!waitMessage) { - waitMessage = await replyToMessage({message: msg, text: "⏳ Скачиваю видео..."}); - } else { - await editMessageText({message: msg, text: "⏳ Скачиваю видео..."}); - } - - const {time, exists, buffer} = await downloadVideoFromYouTube({videoId: videoId}); - if (buffer) { - const start = Date.now(); - waitMessage = await bot.editMessageMedia({ - chat_id: msg.chat.id, - message_id: waitMessage.message_id, - media: { - type: "video", - media: buffer - } - }) as Message; - - const diff = Date.now() - start; - waitMessage = await bot.editMessageCaption({ - chat_id: msg.chat.id, - message_id: waitMessage.message_id, - caption: "✅ Видео" + (exists ? " загружено из кэша" : " успешно скачано") + " за " + (time + diff) + "мс", - }) as Message; - } - } catch (e) { - logError(e); - - if (waitMessage && "text" in waitMessage) { - await bot.editMessageText({ - chat_id: msg.chat.id, - message_id: waitMessage.message_id, - text: Environment.errorText, - reply_markup: { - inline_keyboard: [[ - TryAgain.withData("/ytdl " + videoId).asButton() - ]] - } - }); - } - } - } -} \ No newline at end of file diff --git a/src/common/environment.ts b/src/common/environment.ts index a14fcaa..b3d8403 100644 --- a/src/common/environment.ts +++ b/src/common/environment.ts @@ -67,7 +67,7 @@ export class Environment { static ollamaCancelledText = "```Ollama\n❌ Отменено```"; static load() { - Environment.BOT_TOKEN = process.env.BOT_TOKEN; + Environment.BOT_TOKEN = process.env.BOT_TOKEN; Environment.TEST_ENVIRONMENT = ifTrue(process.env.TEST_ENVIRONMENT); Environment.CHAT_IDS_WHITELIST = new Set(process.env.CHAT_IDS_WHITELIST?.split(",")?.map(e => parseInt(e.trim(), 10)) || []); Environment.BOT_PREFIX = process.env.BOT_PREFIX || ""; diff --git a/src/common/message-store.ts b/src/common/message-store.ts index f067906..c15d409 100644 --- a/src/common/message-store.ts +++ b/src/common/message-store.ts @@ -15,14 +15,16 @@ export class MessageStore { } static async put(m: Message | StoredMessage): Promise { + const maxSizePath = isStoredMessage(m) ? null : getPhotoMaxSize(m.photo)?.file_unique_id; + const msg: StoredMessage = isStoredMessage(m) ? m : { chatId: m.chat.id, id: m.message_id, - replyToMessageId: m.reply_to_message?.message_id ?? null, - fromId: m.from.id, + replyToMessageId: m.reply_to_message?.message_id, + fromId: m.from?.id, text: extractTextMessage(m), date: m.date ?? 0, - photoMaxSizeFilePath: m.photo ? [getPhotoMaxSize(m.photo).file_unique_id] : null + photoMaxSizeFilePath: maxSizePath ? [maxSizePath] : undefined, }; this.map.set(this.key(msg.chatId, msg.id), msg); @@ -30,7 +32,9 @@ export class MessageStore { return msg; } - static async get(chatId: number, messageId: number): Promise { + static async get(chatId: number, messageId: number | undefined): Promise { + if (!messageId) return null; + const message = await messageDao.getById({chatId: chatId, id: messageId}); if (!message) return null; diff --git a/src/db/message-dao.ts b/src/db/message-dao.ts index 2bf7768..2eace4a 100644 --- a/src/db/message-dao.ts +++ b/src/db/message-dao.ts @@ -98,8 +98,8 @@ export class MessageDao extends Dao { return messages.map(m => { return { chatId: m.chatId, - id: m.id, - replyToMessageId: m.replyToMessageId, + id: m.id, + replyToMessageId: m.replyToMessageId || undefined, fromId: m.fromId, text: m.text, date: m.date, diff --git a/src/db/user-dao.ts b/src/db/user-dao.ts index 4223f7e..914308e 100644 --- a/src/db/user-dao.ts +++ b/src/db/user-dao.ts @@ -93,7 +93,7 @@ export class UserDao extends Dao { mapFrom(users: UserInsert[]): StoredUser[] { return users.map(u => { return { - id: u.id, + id: u.id, isBot: u.isBot === 1, firstName: u.firstName, lastName: u.lastName, diff --git a/src/index.ts b/src/index.ts index d94cdf8..efd5790 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,6 @@ import "dotenv/config"; import {Environment} from "./common/environment"; -import {TelegramBot, User} from "typescript-telegram-bot-api"; +import {BotCommand, TelegramBot, User} from "typescript-telegram-bot-api"; import {Command} from "./base/command"; import { delay, @@ -67,7 +67,6 @@ import {GeminiGetModel} from "./commands/gemini-get-model"; import {GeminiSetModel} from "./commands/gemini-set-model"; import {Debug} from "./commands/debug"; import {GeminiGenerateImage} from "./commands/gemini-generate-image"; -import {YouTubeDownload} from "./commands/youtube-download"; import fs from "node:fs"; import path from "node:path"; import {setInterval} from "node:timers"; @@ -79,8 +78,6 @@ import {OpenAISetModel} from "./commands/openai-set-model"; import {Info} from "./commands/info"; import {OpenAIGenImage} from "./commands/openai-gen-image"; import {clearUpFolderFromOldFiles} from "./util/files"; -import {DownloadYtVideo} from "./callback_commands/download-yt-video"; -import {YtInfo} from "./callback_commands/yt-info"; import {AdminsList} from "./commands/admins-list"; import {ExportDb} from "./commands/export-db"; @@ -106,7 +103,7 @@ export const ollama = new Ollama({ export const ollamaRequests: OllamaRequest[] = []; -export function getOllamaRequest(uuid: string): OllamaRequest | null { +export function getOllamaRequest(uuid: string): OllamaRequest | undefined { return ollamaRequests.find(r => r.uuid === uuid); } @@ -169,8 +166,6 @@ export const commands: Command[] = [ new Shutdown(), new Leave(), - - new YouTubeDownload() ]; if (Environment.ENABLE_UNSAFE_EVAL) { @@ -179,8 +174,6 @@ if (Environment.ENABLE_UNSAFE_EVAL) { export const callbackCommands: CallbackCommand[] = [ new OllamaCancel(), - new DownloadYtVideo(), - new YtInfo() ]; if (Environment.OLLAMA_ADDRESS && Environment.OLLAMA_MODEL) { @@ -288,10 +281,10 @@ async function main() { return cmd.title && cmd.title.startsWith("/") && cmd.title.split(" ").length === 1 && cmd.description; }).map(cmd => { return { - command: cmd.title.toLowerCase(), + command: cmd.title?.toLowerCase() || "", description: cmd.description, }; - }); + }) as BotCommand[]; try { const results = await Promise.all( diff --git a/src/model/stored-message.ts b/src/model/stored-message.ts index 6d06abf..4b5088a 100644 --- a/src/model/stored-message.ts +++ b/src/model/stored-message.ts @@ -3,7 +3,7 @@ export type StoredMessage = { id: number; replyToMessageId?: number; fromId: number; - text?: string; + text?: string | null; date: number; - photoMaxSizeFilePath?: string[]; + photoMaxSizeFilePath?: string[] | null; }; \ No newline at end of file diff --git a/src/model/stored-user.ts b/src/model/stored-user.ts index 1033c74..bc58ae5 100644 --- a/src/model/stored-user.ts +++ b/src/model/stored-user.ts @@ -2,7 +2,7 @@ export type StoredUser = { id: number; isBot: boolean; firstName: string; - lastName?: string; - userName?: string; + lastName?: string | null; + userName?: string | null; isPremium?: boolean; } \ No newline at end of file diff --git a/src/util/utils.ts b/src/util/utils.ts index d2fc987..ea67c92 100644 --- a/src/util/utils.ts +++ b/src/util/utils.ts @@ -32,8 +32,6 @@ import {MessageStore} from "../common/message-store"; import {SystemInfo} from "../commands/system-info"; import {PrefixResponse} from "../commands/prefix-response"; import {OllamaChat} from "../commands/ollama-chat"; -import {getYouTubeVideoId, getYouTubeVideoInfo, isVideoExists} from "./ytdl"; -import {YouTubeDownload} from "../commands/youtube-download"; import {ChatCommand} from "../base/chat-command"; import {WebSearchResponse} from "../model/web-search-response"; import {GeminiChat} from "../commands/gemini-chat"; @@ -47,9 +45,6 @@ import {MistralGetModel} from "../commands/mistral-get-model"; import {OpenAIGetModel} from "../commands/openai-get-model"; import {SendOptions} from "../model/send-options"; import {EditOptions} from "../model/edit-options"; -import VideoInfo from "youtubei.js/dist/src/parser/youtube/VideoInfo"; -import {DownloadYtVideo} from "../callback_commands/download-yt-video"; -import {TryAgain} from "../callback_commands/try-again"; import {StoredUser} from "../model/stored-user"; import {performFFmpeg} from "./ffmpeg"; @@ -68,7 +63,7 @@ export const ignoreIfMarkupFailed = (e: Error | TelegramError) => { } }; -export const logError = (e: Error | TelegramError | string) => { +export const logError = (e: Error | TelegramError | string | unknown) => { console.error(e); }; @@ -91,7 +86,7 @@ export const isMessageTooLong = (e: Error | TelegramError) => { export function searchChatCommand( commands: Command[], text: string, - botUsername: string = botUser.username + botUsername: string | undefined = botUser.username ): Command | null { for (const command of commands) { const match = command.finalRegexp.exec(text); @@ -129,7 +124,7 @@ export async function checkRequirements(cmd: Command | CallbackCommand | null, m let title: string; if (isChatCommand) { - title = cmd.title; + title = cmd.title || ""; } else if (isCallbackCommand) { title = cmd.data; } else { @@ -138,7 +133,7 @@ export async function checkRequirements(cmd: Command | CallbackCommand | null, m const cbId = cb?.id; const chatId = msg?.chat?.id || cb?.message?.chat?.id || -1; - const messageId = msg?.message_id || (cb && cb.message && "reply_to_message" in cb.message ? cb.message.reply_to_message.message_id : null) || -1; + const messageId = msg?.message_id || (cb && cb.message && "reply_to_message" in cb.message ? cb.message.reply_to_message?.message_id : null) || -1; const fromId = msg?.from?.id || cb?.from?.id || -1; const chatType = msg?.chat?.type || cb?.message?.chat?.type || null; @@ -162,7 +157,7 @@ export async function checkRequirements(cmd: Command | CallbackCommand | null, m await replyToMessage({chat_id: chatId, message_id: messageId, text: text}); } else if (cb) { await bot.answerCallbackQuery({ - callback_query_id: cbId, + callback_query_id: cbId || "", text: text, cache_time: 0, show_alert: true @@ -182,7 +177,7 @@ export async function checkRequirements(cmd: Command | CallbackCommand | null, m return false; } - if (reqs.isRequiresChat() && msg.chat.type === "private") { + if (reqs.isRequiresChat() && msg?.chat?.type === "private") { console.log(`${title}: chatId is bad`); await notifyUser("Тут Вам не чат."); return false; @@ -215,13 +210,13 @@ export async function checkRequirements(cmd: Command | CallbackCommand | null, m } if (reqs.isRequiresSameUser()) { - let originalFromId: number | null; + let originalFromId: number | undefined; try { const originalMessage = await MessageStore.get(chatId, messageId); originalFromId = originalMessage?.fromId; } catch (e) { logError(e); - originalFromId = null; + originalFromId = undefined; } if (originalFromId && fromId !== originalFromId && fromId !== Environment.CREATOR_ID) { @@ -239,7 +234,7 @@ export async function executeChatCommand(cmd: Command | null, msg: Message, text if (!await checkRequirements(cmd, msg)) return false; - await cmd.execute(msg, cmd.regexp.exec(text)); + await cmd.execute(msg, cmd.regexp?.exec(text)); return true; } @@ -249,7 +244,7 @@ export async function findAndExecuteCallbackCommand(commands: CallbackCommand[], const cmd = searchCallbackCommand(commands, data); if (!cmd) return false; - if (!await checkRequirements(cmd, null, query)) return false; + if (!await checkRequirements(cmd, undefined, query)) return false; await cmd.execute(query); await cmd.answerCallbackQuery(query); @@ -281,7 +276,7 @@ export async function editMessageText(options: EditOptions) { link_preview_options: options.link_preview_options, }); return Promise.resolve(message); - } catch (e) { + } catch (e: any) { logError(e); if (isMarkupFailed(e)) { @@ -295,6 +290,8 @@ export async function editMessageText(options: EditOptions) { return Promise.reject(e); } } + + return Promise.resolve(false); } export async function oldSendMessage(message: Message, text: string, parseMode?: ParseMode): Promise { @@ -337,7 +334,7 @@ export async function replyToMessage(options: SendOptions): Promise { text: options.text, parse_mode: options.parse_mode, reply_parameters: { - message_id: "message" in options ? options.message.message_id : options.message_id + message_id: ("message" in options ? options.message.message_id : options.message_id) }, link_preview_options: options.link_preview_options }); @@ -1177,12 +1174,13 @@ export function extractTextMessage(msg: Message | StoredMessage | string): strin if (!msg) return null; if (typeof msg === "string") return msg; - const text = (isStoredMessage(msg) ? msg.text : msg.text || msg.caption || "").trim(); - if (text.length === 0) return null; + const text = (isStoredMessage(msg) ? msg.text : msg.text || msg.caption || "")?.trim(); + if (!text || !text?.length) return null; return text; } -export function cutPrefixes(msg: Message | StoredMessage | string): string { +export function cutPrefixes(msg: Message | StoredMessage | string | null): string | null { + if (!msg) return null; const chatCommands = commands.filter(c => c instanceof ChatCommand); const prefixes = [Environment.BOT_PREFIX]; @@ -1193,10 +1191,12 @@ export function cutPrefixes(msg: Message | StoredMessage | string): string { chatCommands.forEach((cmd) => { const command = cmd.command; - if (Array.isArray(command)) { - command.forEach(pushPrefix); - } else { - pushPrefix(command); + if (command) { + if (Array.isArray(command)) { + command.forEach(pushPrefix); + } else { + pushPrefix(command); + } } }); @@ -1216,10 +1216,10 @@ export function cutPrefixes(msg: Message | StoredMessage | string): string { } export function isStoredMessage(msg: Message | StoredMessage | null): msg is StoredMessage { - return msg && "id" in msg; + return !!msg && "id" in msg; } -export async function loadImagesIfExists(msg: Message | StoredMessage): Promise { +export async function loadImagesIfExists(msg: Message | StoredMessage): Promise { if (isStoredMessage(msg)) { return msg.photoMaxSizeFilePath; } @@ -1237,7 +1237,7 @@ export async function loadImagesIfExists(msg: Message | StoredMessage): Promise< const maxSize = await mapPhotoSizeToMax(getPhotoMaxSize(msg.photo)); if (maxSize) { - let imageFilePath = path.join(photoDir, maxSize.unique_file_id + ".jpg"); + let imageFilePath: string | null = path.join(photoDir, maxSize.unique_file_id + ".jpg"); if (!fs.existsSync(imageFilePath)) { const res = await axios.get(maxSize.url, {responseType: "arraybuffer"}); const src = Buffer.from(res.data); @@ -1268,7 +1268,7 @@ export async function loadImagesFromFileIds(sizes: PhotoSize[]): Promise !fs.existsSync(photoPathByUniqueId(s.file_unique_id))) .map(s => mapPhotoSizeToMax(s)); - const maxSizes = await Promise.all(promises); + const maxSizes = (await Promise.all(promises)).filter(e => !!e); const imagePromises = maxSizes.map((size) => { return axios.get(size.url, {responseType: "arraybuffer"}); @@ -1287,37 +1287,40 @@ export async function loadImagesFromFileIds(sizes: PhotoSize[]): Promise p); - finalPaths.unshift(...existing); + const finalPaths = existing.concat(...paths.filter(p => !!p).map(p => p)); return finalPaths; } -export async function collectReplyChainText(triggerMsg: Message | StoredMessage, limit: number = 40, includeTrigger = true, cutPrefix: boolean = true): Promise { +export async function collectReplyChainText(triggerMsg: Message | StoredMessage | null, limit: number = 40, includeTrigger = true, cutPrefix: boolean = true): Promise { + if (!triggerMsg) return []; + const parts: MessagePart[] = []; - const pushPart = async (msg: Message | StoredMessage, textRequired: boolean = false) => { - const rawText = extractTextMessage(msg); - const cleanText = cutPrefix ? cutPrefixes(rawText) : rawText; - const imageNames = await loadImagesIfExists(msg); + const pushPart = async (msg: Message | StoredMessage | undefined | null, textRequired: boolean = false) => { + if (msg) { + const rawText = extractTextMessage(msg); + const cleanText = cutPrefix ? cutPrefixes(rawText) : rawText; + const imageNames = await loadImagesIfExists(msg); - if (!cleanText && textRequired) return; - if (!cleanText && !imageNames?.length) return; + if (!cleanText && textRequired) return; + if (!cleanText && !imageNames?.length) return; - const fromId = isStoredMessage(msg) ? msg.fromId : msg.from.id; - const firstName = isStoredMessage(msg) ? - (await UserStore.get(msg.fromId))?.firstName : msg.from.first_name; + const fromId = isStoredMessage(msg) ? msg.fromId : msg.from?.id; + const firstName = isStoredMessage(msg) ? + (await UserStore.get(msg.fromId))?.firstName : msg.from?.first_name; - const images = imageNames ? imageNames.map(n => { - const filePath = photoPathByUniqueId(n); - return Buffer.from(fs.readFileSync(filePath)).toString("base64"); - }) : null; + const images = imageNames ? imageNames.map(n => { + const filePath = photoPathByUniqueId(n); + return Buffer.from(fs.readFileSync(filePath)).toString("base64"); + }) : null; - parts.push({ - bot: fromId === botUser.id, - content: cleanText ? cleanText : "", - name: firstName, - images: images ? images : [] - }); + parts.push({ + bot: fromId === botUser.id, + content: cleanText ? cleanText : "", + name: firstName, + images: images ? images : [] + }); + } }; const chatId = isStoredMessage(triggerMsg) ? triggerMsg.chatId as number : triggerMsg.chat.id; @@ -1428,7 +1431,8 @@ export async function waveDistortSharp( .toBuffer(); } -export async function downloadTelegramFile(filePath: string): Promise { +export async function downloadTelegramFile(filePath?: string | null): Promise { + if (!filePath) return null; const url = `https://api.telegram.org/file/bot${Environment.BOT_TOKEN}/${filePath}`; const res = await fetch(url); if (!res.ok) throw new Error(`Failed to download file: ${res.status} ${res.statusText}`); @@ -1606,7 +1610,7 @@ export function startIntervalEditor(params: { try { await params.editFn(next); lastSent = next; - } catch (e) { + } catch (e: any) { if ((e?.description ?? e?.message ?? "").includes("message is not modified")) return; logError("edit failed: " + e); } @@ -1624,7 +1628,7 @@ export function startIntervalEditor(params: { }; } -export function boolToInt(bool: boolean): number { +export function boolToInt(bool: boolean | undefined): number { return bool ? 1 : 0; } @@ -1645,7 +1649,7 @@ export function buildExcludedSet< const entries = Object.keys(cols) .filter((key) => !excludeSet.has(key)) .map((key) => { - const realName = (cols as unknown)[key].name; // actual DB column name + const realName = (cols as any)[key].name; // actual DB column name return [key, sql.raw(`excluded.${realName}`)] as const; }); @@ -1674,7 +1678,7 @@ export function getRuntimeInfo(): RuntimeInfo { export type PhotoMaxSize = { width: number, height: number, url: string; file_id: string; unique_file_id: string; }; -export function getPhotoMaxSize(photos: PhotoSize[], target: number = Environment.MAX_PHOTO_SIZE): PhotoSize | null { +export function getPhotoMaxSize(photos: PhotoSize[] | undefined, target: number = Environment.MAX_PHOTO_SIZE): PhotoSize | null { if (!photos) return null; photos = photos.filter(p => Math.max(p.width, p.height) <= target); @@ -1687,12 +1691,11 @@ export function getPhotoMaxSize(photos: PhotoSize[], target: number = Environmen return photos.reduce((prev, cur) => { if (!prev) return cur; - return cur.width * cur.height > prev.width * prev.height ? cur : prev; - }, null); + }); } -export async function mapPhotoSizeToMax(size: PhotoSize): Promise { +export async function mapPhotoSizeToMax(size: PhotoSize | null): Promise { if (!size) return null; return { width: size.width, @@ -1733,7 +1736,7 @@ export function boolToEmoji(bool: boolean | undefined): string { export const albumCache = new Map(); -async function processAlbum(groupId: string): Promise { +async function processAlbum(groupId: string): Promise { const entry = albumCache.get(groupId); if (!entry) return; @@ -1741,10 +1744,10 @@ async function processAlbum(groupId: string): Promise { .filter(m => m.photo) .map(m => m.photo); - const allPhotoMaxSizes = await Promise.all(allPhotos.map(photo => getPhotoMaxSize(photo))); + const allPhotoMaxSizes = await Promise.all(allPhotos.map(photo => getPhotoMaxSize(photo)).filter(s => !!s)); const ids = await loadImagesFromFileIds(allPhotoMaxSizes); - console.log(`Received album ${groupId} with ${ids.length} photos.`); + console.log(`Received album ${groupId} with ${ids?.length} photos.`); console.log("File IDs:", ids); albumCache.delete(groupId); @@ -1755,7 +1758,7 @@ export function photoPathByUniqueId(uniqueId: string): string { return path.join(photoDir, uniqueId + ".jpg"); } -export function getCurrentModel(): string { +export function getCurrentModel(): string | undefined { switch (Environment.DEFAULT_AI_PROVIDER) { case AiProvider.OLLAMA: return Environment.OLLAMA_MODEL; @@ -1769,7 +1772,7 @@ export function getCurrentModel(): string { } export async function getCurrentModelCapabilities(): Promise { - let promise: Promise = null; + let promise: Promise | null | undefined = null; switch (Environment.DEFAULT_AI_PROVIDER) { case AiProvider.OLLAMA: { const ollamaGetModel = commands.find(c => c instanceof OllamaGetModel); @@ -1779,13 +1782,14 @@ export async function getCurrentModelCapabilities(): Promise { try { const defaultModelCapabilities = await ollamaGetModel.getModelCapabilities(); + const imageModelCapabilities = await ollamaGetModel.loadImageModelInfo(); const result = { - vision: (await ollamaGetModel.loadImageModelInfo()).vision, - ocr: null, - thinking: (await ollamaGetModel.loadThinkModelInfo()).thinking, - tools: defaultModelCapabilities.tools, - audio: defaultModelCapabilities.audio + vision: imageModelCapabilities?.vision, + ocr: imageModelCapabilities?.ocr, + thinking: (await ollamaGetModel.loadThinkModelInfo())?.thinking, + tools: defaultModelCapabilities?.tools, + audio: defaultModelCapabilities?.audio }; resolve(result); } catch (e) { @@ -1824,6 +1828,7 @@ export async function processMyChatMember(u: ChatMemberUpdated): Promise { export async function processNewMessage(msg: Message): Promise { console.log("New Message", msg); + if (!msg.from) return; const envFile: string = fs.readFileSync(".env").toString(); const env = new Map( @@ -2002,14 +2007,16 @@ export async function processNewMessage(msg: Message): Promise { const photos = await processAlbum(groupId); console.log("processedAlbum", photos); - storedMsg.photoMaxSizeFilePath = photos; - await MessageStore.put(storedMsg).catch(logError); + if (storedMsg) { + storedMsg.photoMaxSizeFilePath = photos; + await MessageStore.put(storedMsg).catch(logError); + } resolve(true); }, 1000) }); } else { const entry = albumCache.get(groupId); - entry.messages.push(msg); + entry?.messages?.push(msg); } }); } @@ -2044,9 +2051,7 @@ export async function processNewMessage(msg: Message): Promise { const textToCheck = startsWithPrefix ? messageWithoutPrefix : cmdText; - if (Environment.PROCESS_LINKS && await processYouTubeLink(msg, getFirstLink(msg))) return; - - if (msg.chat.type !== "private" && (!msg.reply_to_message || msg.reply_to_message.from.id !== botUser.id) && !startsWithPrefix && !msg.voice) return; + if (msg.chat.type !== "private" && (!msg.reply_to_message || msg.reply_to_message.from?.id !== botUser.id) && !startsWithPrefix && !msg.voice) return; if (msg.chat.type === "private" && !Environment.ADMIN_IDS.has(msg.chat.id)) return; @@ -2060,167 +2065,52 @@ export async function processNewMessage(msg: Message): Promise { const input = path.join(Environment.DATA_PATH, "input.ogg"); const output = path.join(Environment.DATA_PATH, "output.wav") - try { - fs.writeFileSync(input, fileBuffer); - await performFFmpeg(() => - ffmpeg(input) - .toFormat("wav") - .save(output) - .on("progress", (progress) => { - console.log("progress", progress); - }) - ); + if (fileBuffer) { + try { + fs.writeFileSync(input, fileBuffer); + await performFFmpeg(() => + ffmpeg(input) + .toFormat("wav") + .save(output) + .on("progress", (progress) => { + console.log("progress", progress); + }) + ); - fileBuffer = fs.readFileSync(output); - voiceB64 = fileBuffer.toString("base64"); - fs.rmSync(input); - fs.rmSync(output); - } catch (e) { - logError(e); + fileBuffer = fs.readFileSync(output); + voiceB64 = fileBuffer.toString("base64"); + fs.rmSync(input); + fs.rmSync(output); + + } catch (e) { + logError(e); + } } } switch (Environment.DEFAULT_AI_PROVIDER) { case AiProvider.OLLAMA: { - await commands.find(e => e instanceof OllamaChat).executeOllama(msg, textToCheck, false, voiceB64); + await commands.find(e => e instanceof OllamaChat)?.executeOllama(msg, textToCheck, false, voiceB64); break; } case AiProvider.GEMINI: { - await commands.find(e => e instanceof GeminiChat).executeGemini(msg, textToCheck); + await commands.find(e => e instanceof GeminiChat)?.executeGemini(msg, textToCheck); break; } case AiProvider.MISTRAL: { - await commands.find(e => e instanceof MistralChat).executeMistral(msg, textToCheck); + await commands.find(e => e instanceof MistralChat)?.executeMistral(msg, textToCheck); break; } case AiProvider.OPENAI: { - await commands.find(e => e instanceof OpenAIChat).executeOpenAI(msg, textToCheck); + await commands.find(e => e instanceof OpenAIChat)?.executeOpenAI(msg, textToCheck); break; } } } -function getFirstLink(msg: Message): string | null { - if (msg.entities) { - const urlEntities = msg.entities.filter(e => e.type === "url"); - if (urlEntities.length) { - const e = urlEntities[0]; - return msg.text.substring(e.offset, e.offset + e.length); - } - } - - return null; -} - -export async function processYouTubeLink(msg: Message, url?: string, id?: string): Promise { - if (!url && !id) return false; - - let waitMessage: Message | null = msg.from.id === botUser.id ? msg : null; - let videoId: string | null = null; - - try { - try { - videoId = id || getYouTubeVideoId(url); - } catch (e) { - logError(e); - return false; - } - - const yt = commands.find(e => e instanceof YouTubeDownload); - - if (await checkRequirements(yt, msg)) { - if (!waitMessage) { - waitMessage = await replyToMessage({ - message: msg, - text: "⏳ Ищу информацию о видео..." - }); - } else { - await editMessageText({message: msg, text: "⏳ Ищу информацию о видео..."}); - - } - - let videoInfo: VideoInfo | null = null; - let ytError: string = null; - - try { - videoInfo = await getYouTubeVideoInfo(videoId); - } catch (e) { - logError(e); - - if ("version" in e) { - ytError = e.message; - } - } - - console.log("VIDEO_INFO", videoInfo); - - let text: string = null; - - const inCache = isVideoExists({videoId: videoId}); - - const duration = videoInfo?.basic_info?.duration || null; - const canDownload = inCache || duration && duration <= 300; - - if (videoInfo) { - text = "Видео с YouTube\n\n" + - `Название: ${videoInfo.basic_info?.title}\n` + - `Автор: ${videoInfo.secondary_info?.owner?.author?.name}\n` + - `Длительность: ${duration} сек.`; - - if (!canDownload) { - text += `\n\nВидео слишком длинное (${duration} сек. > 300 сек.)`; - } - } else if (!ytError) { - text = "Информация о видео не найдена"; - } - - const errorButInCache = !videoInfo && ytError && inCache; - if (errorButInCache) { - text = "Я не смог получить информацию о видео, но нашёл его в кэше."; - } - - if (!text && ytError) { - await editMessageText({ - message: waitMessage, - text: Environment.errorText, - reply_markup: { - inline_keyboard: [[ - TryAgain.withData("/ytinfo " + videoId).asButton() - ]] - } - }); - } else { - await editMessageText({ - message: waitMessage, - text: text, - reply_markup: canDownload ? { - inline_keyboard: [[ - DownloadYtVideo.withData(inCache, "/ytdl " + videoId).asButton() - ]] - } : {inline_keyboard: []} - }); - } - } - return true; - } catch (e) { - logError(e); - - await editMessageText({ - message: waitMessage, - text: Environment.errorText, - reply_markup: { - inline_keyboard: [[ - TryAgain.withData("/ytinfo " + videoId).asButton() - ]] - } - }); - } - - return false; -} - export async function processEditedMessage(msg: Message): Promise { console.log("Edited Message", msg); + if (!msg.from) return; await UserStore.put(msg.from); diff --git a/src/util/ytdl.ts b/src/util/ytdl.ts deleted file mode 100644 index 7965915..0000000 --- a/src/util/ytdl.ts +++ /dev/null @@ -1,169 +0,0 @@ -import fs from "node:fs"; -import path from "node:path"; -import {videoDir, videoTempDir} from "../index"; -import ffmpeg from "fluent-ffmpeg"; -import Innertube, {Platform, Types} from "youtubei.js"; -import {Readable} from "node:stream"; -import {logError} from "./utils"; -import {performFFmpeg} from "./ffmpeg"; -import VideoInfo from "youtubei.js/dist/src/parser/youtube/VideoInfo"; - -let innertube: Innertube | null = null; - -export async function getYT(): Promise { - if (innertube) { - return innertube; - } else { - innertube = await Innertube.create({ - generate_session_locally: true, - retrieve_player: true - }); - return innertube; - } -} - -export function getYouTubeVideoId(url: string): string { - const regex = /(?:(?:youtube\.com|music\.youtube\.com)\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?|shorts|clip)\/|.*[?&]v=)|youtu\.be\/)([^"&?/\s]{11})/i; - const match = url.match(regex); - if (!match || !match[1]) throw new Error("Invalid YouTube or Shorts URL"); - return match[1]; -} - -export async function getYouTubeVideoInfo(videoId: string): Promise { - try { - return (await getYT()).getInfo(videoId, {client: "ANDROID"}); - } catch (e) { - logError(e); - } -} - -export function isVideoExists(options: DownloadOptions): boolean { - const videoId = "videoId" in options ? options.videoId : getYouTubeVideoId(options.url); - const filePath = path.join(videoDir, `${videoId}.mp4`); - return fs.existsSync(filePath); -} - -export function getVideoFromCache(videoId: string): Buffer | null { - if (!isVideoExists({videoId: videoId})) return null; - - const filePath = path.join(videoDir, `${videoId}.mp4`); - return Buffer.from(fs.readFileSync(filePath)); -} - -export type DownloadOptions = { - url: string -} | { - videoId: string; -} - -export async function downloadVideoFromYouTube(options: DownloadOptions): Promise<{ - time: number, - exists?: boolean, - buffer: Buffer | null -}> { - const start = Date.now(); - let buffer: Buffer | null = null; - - try { - const videoId = "videoId" in options ? options.videoId : getYouTubeVideoId(options.url); - const filePath = path.join(videoDir, `${videoId}.mp4`); - if (fs.existsSync(filePath)) { - const buffer = Buffer.from(fs.readFileSync(filePath)); - return { - time: Date.now() - start, - exists: true, - buffer: buffer - }; - } - - Platform.shim.eval = async (data: Types.BuildScriptResult, env: Record) => { - const properties = []; - if (env.n) properties.push(`n: exportedVars.nFunction("${env.n}")`); - if (env.sig) properties.push(`sig: exportedVars.sigFunction("${env.sig}")`); - - const code = `${data.output}\nreturn { ${properties.join(", ")} }`; - return new Function(code)(); - }; - - const yt = await getYT(); - - const videoInfo = await yt.getInfo(videoId, {client: "ANDROID"}); - console.log("Video info", videoInfo); - - console.log(`Fetching metadata for: ${videoId}...`); - - const targetQuality = "360p"; - - const videoFormat = videoInfo.streaming_data?.formats.find(f => f.quality_label.startsWith(targetQuality)) - || videoInfo.streaming_data?.adaptive_formats.find(f => f.quality_label.startsWith(targetQuality)); - - const audioFormat = videoInfo.chooseFormat({type: "audio", quality: "best", language: "original"}); - - console.log("Video format: ", videoFormat); - console.log("Audio Format: ", audioFormat); - - if (!videoFormat) { - console.log(`Quality ${targetQuality} not found. Falling back to best available.`); - } - - const videoWebStream = await videoInfo.download({ - itag: videoFormat.itag, - client: "ANDROID" - }); - - const audioWebStream = await videoInfo.download({ - itag: audioFormat.itag, - client: "ANDROID" - }); - - const videoStream = Readable.fromWeb(videoWebStream as any); - const audioStream = Readable.fromWeb(audioWebStream as any); - - const videoPath = path.join(videoTempDir, `temp_video_${videoId}.mp4`); - const audioPath = path.join(videoTempDir, `temp_audio_${videoId}.mp4`); - - const writeStream = (stream: any, path: string) => - new Promise((resolve, reject) => { - const file = fs.createWriteStream(path); - stream.pipe(file); - file.on("finish", resolve); - file.on("error", reject); - }); - - await Promise.all([ - writeStream(videoStream, videoPath), - writeStream(audioStream, audioPath) - ]); - - await performFFmpeg(() => - ffmpeg() - .input(videoPath) - .input(audioPath) - .videoCodec("copy") - .audioCodec("copy") - .save(filePath) - .on("progress", (progress) => { - console.log("progress", progress); - }) - ).catch(logError); - - fs.unlinkSync(videoPath); - fs.unlinkSync(audioPath); - - buffer = fs.readFileSync(filePath); - - console.log(`✅ Saved to ${videoId}.mp4`); - } catch (error) { - console.error("❌ Download failed:", error instanceof Error ? error.message : error); - throw error; - } - - const end = Date.now(); - const diff = end - start; - console.log(`Video downloaded.\ntook ${diff}ms`); - - return { - time: diff, - buffer: buffer, - }; -} \ No newline at end of file diff --git a/tsconfig.build.json b/tsconfig.build.json index 451301e..25c5f9d 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -4,7 +4,20 @@ "rootDir": "src", "outDir": "dist", "types": ["node"], - "skipLibCheck": true + "skipLibCheck": true, + "moduleResolution": "bundler", + "module": "esnext", + "target": "es2024", + "esModuleInterop": true, + "lib": ["dom", "dom.iterable", "ESNext"], + "allowJs": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, }, "include": ["src/**/*.ts"], "exclude": ["node_modules"]