Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 62a0337171 |
@@ -12,7 +12,6 @@ RUN npx tsc -p tsconfig.build.json
|
|||||||
|
|
||||||
# ---- runtime ----
|
# ---- runtime ----
|
||||||
FROM node:lts-alpine AS runner
|
FROM node:lts-alpine AS runner
|
||||||
RUN apk add --no-cache ffmpeg
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ RUN bunx tsc -p tsconfig.build.json
|
|||||||
|
|
||||||
# ---- runtime ----
|
# ---- runtime ----
|
||||||
FROM oven/bun:alpine AS runner
|
FROM oven/bun:alpine AS runner
|
||||||
RUN apk add --no-cache ffmpeg
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|||||||
@@ -5,37 +5,34 @@
|
|||||||
"": {
|
"": {
|
||||||
"name": "tg-chat-bot",
|
"name": "tg-chat-bot",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@google/genai": "^1.50.1",
|
"@google/genai": "^1.39.0",
|
||||||
"@libsql/client": "^0.17.3",
|
"@libsql/client": "^0.17.0",
|
||||||
"@mistralai/mistralai": "^1.15.1",
|
"@mistralai/mistralai": "^1.13.0",
|
||||||
"@napi-rs/canvas": "^0.1.100",
|
"@napi-rs/canvas": "^0.1.89",
|
||||||
"axios": "^1.15.2",
|
"axios": "^1.13.4",
|
||||||
"dotenv": "^17.4.2",
|
"dotenv": "^17.2.3",
|
||||||
"drizzle-orm": "1.0.0-beta.21",
|
"drizzle-orm": "^1.0.0-beta.13-5204f18",
|
||||||
"emoji-regex": "^10.6.0",
|
"emoji-regex": "^10.6.0",
|
||||||
"fluent-ffmpeg": "^2.1.3",
|
|
||||||
"ollama": "^0.6.3",
|
"ollama": "^0.6.3",
|
||||||
"openai": "^6.35.0",
|
"openai": "^6.17.0",
|
||||||
"puppeteer": "^24.42.0",
|
"puppeteer": "^24.36.1",
|
||||||
"puppeteer-extra": "^3.3.6",
|
"puppeteer-extra": "^3.3.6",
|
||||||
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
||||||
"qrcode": "^1.5.4",
|
"qrcode": "^1.5.4",
|
||||||
"sharp": "^0.34.5",
|
"sharp": "^0.34.5",
|
||||||
"systeminformation": "^5.31.5",
|
"systeminformation": "^5.30.7",
|
||||||
"twemoji": "^14.0.2",
|
"twemoji": "^14.0.2",
|
||||||
"typescript-telegram-bot-api": "^0.11.0",
|
"typescript-telegram-bot-api": "^0.11.0",
|
||||||
"youtubei.js": "^16.0.1",
|
"youtubei.js": "^16.0.1",
|
||||||
"zod": "^4.3.6",
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/bun": "^1.3.13",
|
"@types/bun": "^1.3.8",
|
||||||
"@types/fluent-ffmpeg": "^2.1.28",
|
"@types/node": "^25.2.0",
|
||||||
"@types/node": "^25.6.0",
|
|
||||||
"@types/qrcode": "^1.5.6",
|
"@types/qrcode": "^1.5.6",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.59.1",
|
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
||||||
"@typescript-eslint/parser": "^8.59.1",
|
"@typescript-eslint/parser": "^8.54.0",
|
||||||
"drizzle-kit": "^1.0.0-beta.9-e89174b",
|
"drizzle-kit": "^1.0.0-beta.13-5204f18",
|
||||||
"eslint": "^9.39.4",
|
"eslint": "^9.39.2",
|
||||||
"tsx": "^4.21.0",
|
"tsx": "^4.21.0",
|
||||||
"typescript": "^5.9.3",
|
"typescript": "^5.9.3",
|
||||||
},
|
},
|
||||||
@@ -138,25 +135,25 @@
|
|||||||
|
|
||||||
"@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.12", "", { "os": "win32", "cpu": "x64" }, "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA=="],
|
"@esbuild/win32-x64": ["@esbuild/win32-x64@0.25.12", "", { "os": "win32", "cpu": "x64" }, "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA=="],
|
||||||
|
|
||||||
"@eslint-community/eslint-utils": ["@eslint-community/eslint-utils@4.9.1", "", { "dependencies": { "eslint-visitor-keys": "^3.4.3" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ=="],
|
"@eslint-community/eslint-utils": ["@eslint-community/eslint-utils@4.9.0", "", { "dependencies": { "eslint-visitor-keys": "^3.4.3" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g=="],
|
||||||
|
|
||||||
"@eslint-community/regexpp": ["@eslint-community/regexpp@4.12.2", "", {}, "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew=="],
|
"@eslint-community/regexpp": ["@eslint-community/regexpp@4.12.2", "", {}, "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew=="],
|
||||||
|
|
||||||
"@eslint/config-array": ["@eslint/config-array@0.21.2", "", { "dependencies": { "@eslint/object-schema": "^2.1.7", "debug": "^4.3.1", "minimatch": "^3.1.5" } }, "sha512-nJl2KGTlrf9GjLimgIru+V/mzgSK0ABCDQRvxw5BjURL7WfH5uoWmizbH7QB6MmnMBd8cIC9uceWnezL1VZWWw=="],
|
"@eslint/config-array": ["@eslint/config-array@0.21.1", "", { "dependencies": { "@eslint/object-schema": "^2.1.7", "debug": "^4.3.1", "minimatch": "^3.1.2" } }, "sha512-aw1gNayWpdI/jSYVgzN5pL0cfzU02GT3NBpeT/DXbx1/1x7ZKxFPd9bwrzygx/qiwIQiJ1sw/zD8qY/kRvlGHA=="],
|
||||||
|
|
||||||
"@eslint/config-helpers": ["@eslint/config-helpers@0.4.2", "", { "dependencies": { "@eslint/core": "^0.17.0" } }, "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw=="],
|
"@eslint/config-helpers": ["@eslint/config-helpers@0.4.2", "", { "dependencies": { "@eslint/core": "^0.17.0" } }, "sha512-gBrxN88gOIf3R7ja5K9slwNayVcZgK6SOUORm2uBzTeIEfeVaIhOpCtTox3P6R7o2jLFwLFTLnC7kU/RGcYEgw=="],
|
||||||
|
|
||||||
"@eslint/core": ["@eslint/core@0.17.0", "", { "dependencies": { "@types/json-schema": "^7.0.15" } }, "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ=="],
|
"@eslint/core": ["@eslint/core@0.17.0", "", { "dependencies": { "@types/json-schema": "^7.0.15" } }, "sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ=="],
|
||||||
|
|
||||||
"@eslint/eslintrc": ["@eslint/eslintrc@3.3.5", "", { "dependencies": { "ajv": "^6.14.0", "debug": "^4.3.2", "espree": "^10.0.1", "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.1", "minimatch": "^3.1.5", "strip-json-comments": "^3.1.1" } }, "sha512-4IlJx0X0qftVsN5E+/vGujTRIFtwuLbNsVUe7TO6zYPDR1O6nFwvwhIKEKSrl6dZchmYBITazxKoUYOjdtjlRg=="],
|
"@eslint/eslintrc": ["@eslint/eslintrc@3.3.3", "", { "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", "espree": "^10.0.1", "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", "js-yaml": "^4.1.1", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" } }, "sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ=="],
|
||||||
|
|
||||||
"@eslint/js": ["@eslint/js@9.39.4", "", {}, "sha512-nE7DEIchvtiFTwBw4Lfbu59PG+kCofhjsKaCWzxTpt4lfRjRMqG6uMBzKXuEcyXhOHoUp9riAm7/aWYGhXZ9cw=="],
|
"@eslint/js": ["@eslint/js@9.39.2", "", {}, "sha512-q1mjIoW1VX4IvSocvM/vbTiveKC4k9eLrajNEuSsmjymSDEbpGddtpfOoN7YGAqBK3NG+uqo8ia4PDTt8buCYA=="],
|
||||||
|
|
||||||
"@eslint/object-schema": ["@eslint/object-schema@2.1.7", "", {}, "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA=="],
|
"@eslint/object-schema": ["@eslint/object-schema@2.1.7", "", {}, "sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA=="],
|
||||||
|
|
||||||
"@eslint/plugin-kit": ["@eslint/plugin-kit@0.4.1", "", { "dependencies": { "@eslint/core": "^0.17.0", "levn": "^0.4.1" } }, "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA=="],
|
"@eslint/plugin-kit": ["@eslint/plugin-kit@0.4.1", "", { "dependencies": { "@eslint/core": "^0.17.0", "levn": "^0.4.1" } }, "sha512-43/qtrDUokr7LJqoF2c3+RInu/t4zfrpYdoSDfYyhg52rwLV6TnOvdG4fXm7IkSB3wErkcmJS9iEhjVtOSEjjA=="],
|
||||||
|
|
||||||
"@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.39.0", "", { "dependencies": { "google-auth-library": "^10.3.0", "protobufjs": "^7.5.4", "ws": "^8.18.0" }, "peerDependencies": { "@modelcontextprotocol/sdk": "^1.25.2" }, "optionalPeers": ["@modelcontextprotocol/sdk"] }, "sha512-Vz7AQsOdBeiIcxmXIQNy/hzDvyAOE1lSpWA10itUQza7h3aQFF6QSGaQ7o1GYsjMD3XslK4Ee/Ol0eLhRXb7gA=="],
|
||||||
|
|
||||||
"@humanfs/core": ["@humanfs/core@0.19.1", "", {}, "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA=="],
|
"@humanfs/core": ["@humanfs/core@0.19.1", "", {}, "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA=="],
|
||||||
|
|
||||||
@@ -222,57 +219,57 @@
|
|||||||
|
|
||||||
"@js-temporal/polyfill": ["@js-temporal/polyfill@0.5.1", "", { "dependencies": { "jsbi": "^4.3.0" } }, "sha512-hloP58zRVCRSpgDxmqCWJNlizAlUgJFqG2ypq79DCvyv9tHjRYMDOcPFjzfl/A1/YxDvRCZz8wvZvmapQnKwFQ=="],
|
"@js-temporal/polyfill": ["@js-temporal/polyfill@0.5.1", "", { "dependencies": { "jsbi": "^4.3.0" } }, "sha512-hloP58zRVCRSpgDxmqCWJNlizAlUgJFqG2ypq79DCvyv9tHjRYMDOcPFjzfl/A1/YxDvRCZz8wvZvmapQnKwFQ=="],
|
||||||
|
|
||||||
"@libsql/client": ["@libsql/client@0.17.3", "", { "dependencies": { "@libsql/core": "^0.17.3", "@libsql/hrana-client": "^0.10.0", "js-base64": "^3.7.5", "libsql": "^0.5.28", "promise-limit": "^2.7.0" } }, "sha512-HXk9wiAoJbKFbyBH4O+aEhN6ir5ERXuXvwE5OD2eR4/5RUa3Pw/8L9zrnVdU+iNJitRvisPWaIwmhkO3bH7giA=="],
|
"@libsql/client": ["@libsql/client@0.17.0", "", { "dependencies": { "@libsql/core": "^0.17.0", "@libsql/hrana-client": "^0.9.0", "js-base64": "^3.7.5", "libsql": "^0.5.22", "promise-limit": "^2.7.0" } }, "sha512-TLjSU9Otdpq0SpKHl1tD1Nc9MKhrsZbCFGot3EbCxRa8m1E5R1mMwoOjKMMM31IyF7fr+hPNHLpYfwbMKNusmg=="],
|
||||||
|
|
||||||
"@libsql/core": ["@libsql/core@0.17.3", "", { "dependencies": { "js-base64": "^3.7.5" } }, "sha512-2UjK1i7JBkMduJo4WdvvBxMMvVJ31pArBZNONyz/GCJJAH+1UHat2X6vn10S/WpY5fKzIT98WqYFl2vzWRLOfg=="],
|
"@libsql/core": ["@libsql/core@0.17.0", "", { "dependencies": { "js-base64": "^3.7.5" } }, "sha512-hnZRnJHiS+nrhHKLGYPoJbc78FE903MSDrFJTbftxo+e52X+E0Y0fHOCVYsKWcg6XgB7BbJYUrz/xEkVTSaipw=="],
|
||||||
|
|
||||||
"@libsql/darwin-arm64": ["@libsql/darwin-arm64@0.5.29", "", { "os": "darwin", "cpu": "arm64" }, "sha512-K+2RIB1OGFPYQbfay48GakLhqf3ArcbHqPFu7EZiaUcRgFcdw8RoltsMyvbj5ix2fY0HV3Q3Ioa/ByvQdaSM0A=="],
|
"@libsql/darwin-arm64": ["@libsql/darwin-arm64@0.5.22", "", { "os": "darwin", "cpu": "arm64" }, "sha512-4B8ZlX3nIDPndfct7GNe0nI3Yw6ibocEicWdC4fvQbSs/jdq/RC2oCsoJxJ4NzXkvktX70C1J4FcmmoBy069UA=="],
|
||||||
|
|
||||||
"@libsql/darwin-x64": ["@libsql/darwin-x64@0.5.29", "", { "os": "darwin", "cpu": "x64" }, "sha512-OtT+KFHsKFy1R5FVadr8FJ2Bb1mghtXTyJkxv0trocq7NuHntSki1eUbxpO5ezJesDvBlqFjnWaYYY516QNLhQ=="],
|
"@libsql/darwin-x64": ["@libsql/darwin-x64@0.5.22", "", { "os": "darwin", "cpu": "x64" }, "sha512-ny2HYWt6lFSIdNFzUFIJ04uiW6finXfMNJ7wypkAD8Pqdm6nAByO+Fdqu8t7sD0sqJGeUCiOg480icjyQ2/8VA=="],
|
||||||
|
|
||||||
"@libsql/hrana-client": ["@libsql/hrana-client@0.10.0", "", { "dependencies": { "@libsql/isomorphic-ws": "^0.1.5", "js-base64": "^3.7.5" } }, "sha512-OoA4EMqRAC7kn7V2P6EQqRcpZf2W+AjsNIyCizBg339Tq/aMC7sRnzs3SklderhmQWAqEzvv8A2vhxVmWpkVvw=="],
|
"@libsql/hrana-client": ["@libsql/hrana-client@0.9.0", "", { "dependencies": { "@libsql/isomorphic-ws": "^0.1.5", "cross-fetch": "^4.0.0", "js-base64": "^3.7.5", "node-fetch": "^3.3.2" } }, "sha512-pxQ1986AuWfPX4oXzBvLwBnfgKDE5OMhAdR/5cZmRaB4Ygz5MecQybvwZupnRz341r2CtFmbk/BhSu7k2Lm+Jw=="],
|
||||||
|
|
||||||
"@libsql/isomorphic-ws": ["@libsql/isomorphic-ws@0.1.5", "", { "dependencies": { "@types/ws": "^8.5.4", "ws": "^8.13.0" } }, "sha512-DtLWIH29onUYR00i0GlQ3UdcTRC6EP4u9w/h9LxpUZJWRMARk6dQwZ6Jkd+QdwVpuAOrdxt18v0K2uIYR3fwFg=="],
|
"@libsql/isomorphic-ws": ["@libsql/isomorphic-ws@0.1.5", "", { "dependencies": { "@types/ws": "^8.5.4", "ws": "^8.13.0" } }, "sha512-DtLWIH29onUYR00i0GlQ3UdcTRC6EP4u9w/h9LxpUZJWRMARk6dQwZ6Jkd+QdwVpuAOrdxt18v0K2uIYR3fwFg=="],
|
||||||
|
|
||||||
"@libsql/linux-arm-gnueabihf": ["@libsql/linux-arm-gnueabihf@0.5.29", "", { "os": "linux", "cpu": "arm" }, "sha512-CD4n4zj7SJTHso4nf5cuMoWoMSS7asn5hHygsDuhRl8jjjCTT3yE+xdUvI4J7zsyb53VO5ISh4cwwOtf6k2UhQ=="],
|
"@libsql/linux-arm-gnueabihf": ["@libsql/linux-arm-gnueabihf@0.5.22", "", { "os": "linux", "cpu": "arm" }, "sha512-3Uo3SoDPJe/zBnyZKosziRGtszXaEtv57raWrZIahtQDsjxBVjuzYQinCm9LRCJCUT5t2r5Z5nLDPJi2CwZVoA=="],
|
||||||
|
|
||||||
"@libsql/linux-arm-musleabihf": ["@libsql/linux-arm-musleabihf@0.5.29", "", { "os": "linux", "cpu": "arm" }, "sha512-2Z9qBVpEJV7OeflzIR3+l5yAd4uTOLxklScYTwpZnkm2vDSGlC1PRlueLaufc4EFITkLKXK2MWBpexuNJfMVcg=="],
|
"@libsql/linux-arm-musleabihf": ["@libsql/linux-arm-musleabihf@0.5.22", "", { "os": "linux", "cpu": "arm" }, "sha512-LCsXh07jvSojTNJptT9CowOzwITznD+YFGGW+1XxUr7fS+7/ydUrpDfsMX7UqTqjm7xG17eq86VkWJgHJfvpNg=="],
|
||||||
|
|
||||||
"@libsql/linux-arm64-gnu": ["@libsql/linux-arm64-gnu@0.5.29", "", { "os": "linux", "cpu": "arm64" }, "sha512-gURBqaiXIGGwFNEaUj8Ldk7Hps4STtG+31aEidCk5evMMdtsdfL3HPCpvys+ZF/tkOs2MWlRWoSq7SOuCE9k3w=="],
|
"@libsql/linux-arm64-gnu": ["@libsql/linux-arm64-gnu@0.5.22", "", { "os": "linux", "cpu": "arm64" }, "sha512-KSdnOMy88c9mpOFKUEzPskSaF3VLflfSUCBwas/pn1/sV3pEhtMF6H8VUCd2rsedwoukeeCSEONqX7LLnQwRMA=="],
|
||||||
|
|
||||||
"@libsql/linux-arm64-musl": ["@libsql/linux-arm64-musl@0.5.29", "", { "os": "linux", "cpu": "arm64" }, "sha512-fwgYZ0H8mUkyVqXZHF3mT/92iIh1N94Owi/f66cPVNsk9BdGKq5gVpoKO+7UxaNzuEH1roJp2QEwsCZMvBLpqg=="],
|
"@libsql/linux-arm64-musl": ["@libsql/linux-arm64-musl@0.5.22", "", { "os": "linux", "cpu": "arm64" }, "sha512-mCHSMAsDTLK5YH//lcV3eFEgiR23Ym0U9oEvgZA0667gqRZg/2px+7LshDvErEKv2XZ8ixzw3p1IrBzLQHGSsw=="],
|
||||||
|
|
||||||
"@libsql/linux-x64-gnu": ["@libsql/linux-x64-gnu@0.5.29", "", { "os": "linux", "cpu": "x64" }, "sha512-y14V0vY0nmMC6G0pHeJcEarcnGU2H6cm21ZceRkacWHvQAEhAG0latQkCtoS2njFOXiYIg+JYPfAoWKbi82rkg=="],
|
"@libsql/linux-x64-gnu": ["@libsql/linux-x64-gnu@0.5.22", "", { "os": "linux", "cpu": "x64" }, "sha512-kNBHaIkSg78Y4BqAdgjcR2mBilZXs4HYkAmi58J+4GRwDQZh5fIUWbnQvB9f95DkWUIGVeenqLRFY2pcTmlsew=="],
|
||||||
|
|
||||||
"@libsql/linux-x64-musl": ["@libsql/linux-x64-musl@0.5.29", "", { "os": "linux", "cpu": "x64" }, "sha512-gquqwA/39tH4pFl+J9n3SOMSymjX+6kZ3kWgY3b94nXFTwac9bnFNMffIomgvlFaC4ArVqMnOZD3nuJ3H3VO1w=="],
|
"@libsql/linux-x64-musl": ["@libsql/linux-x64-musl@0.5.22", "", { "os": "linux", "cpu": "x64" }, "sha512-UZ4Xdxm4pu3pQXjvfJiyCzZop/9j/eA2JjmhMaAhe3EVLH2g11Fy4fwyUp9sT1QJYR1kpc2JLuybPM0kuXv/Tg=="],
|
||||||
|
|
||||||
"@libsql/win32-x64-msvc": ["@libsql/win32-x64-msvc@0.5.29", "", { "os": "win32", "cpu": "x64" }, "sha512-4/0CvEdhi6+KjMxMaVbFM2n2Z44escBRoEYpR+gZg64DdetzGnYm8mcNLcoySaDJZNaBd6wz5DNdgRmcI4hXcg=="],
|
"@libsql/win32-x64-msvc": ["@libsql/win32-x64-msvc@0.5.22", "", { "os": "win32", "cpu": "x64" }, "sha512-Fj0j8RnBpo43tVZUVoNK6BV/9AtDUM5S7DF3LB4qTYg1LMSZqi3yeCneUTLJD6XomQJlZzbI4mst89yspVSAnA=="],
|
||||||
|
|
||||||
"@mistralai/mistralai": ["@mistralai/mistralai@1.15.1", "", { "dependencies": { "ws": "^8.18.0", "zod": "^3.25.0 || ^4.0.0", "zod-to-json-schema": "^3.24.1" } }, "sha512-fb995eiz3r0KsBGtRjFV+/iLbX+UpfalxpF+YitT3R6ukrPD4PN+FGwwmYcRFhNAzVzDUtTVxQYnjQWEnwV5nw=="],
|
"@mistralai/mistralai": ["@mistralai/mistralai@1.13.0", "", { "dependencies": { "zod": "^3.25.0 || ^4.0.0", "zod-to-json-schema": "^3.24.1" } }, "sha512-eg7/8hQp91SshYDJ5XdWDsJENdIaSu52npJfKLCPuhla8Vm6GlESv2RROQyxESglCl7b1OULWiAv1ERbsrZO7w=="],
|
||||||
|
|
||||||
"@napi-rs/canvas": ["@napi-rs/canvas@0.1.100", "", { "optionalDependencies": { "@napi-rs/canvas-android-arm64": "0.1.100", "@napi-rs/canvas-darwin-arm64": "0.1.100", "@napi-rs/canvas-darwin-x64": "0.1.100", "@napi-rs/canvas-linux-arm-gnueabihf": "0.1.100", "@napi-rs/canvas-linux-arm64-gnu": "0.1.100", "@napi-rs/canvas-linux-arm64-musl": "0.1.100", "@napi-rs/canvas-linux-riscv64-gnu": "0.1.100", "@napi-rs/canvas-linux-x64-gnu": "0.1.100", "@napi-rs/canvas-linux-x64-musl": "0.1.100", "@napi-rs/canvas-win32-arm64-msvc": "0.1.100", "@napi-rs/canvas-win32-x64-msvc": "0.1.100" } }, "sha512-xglYA6q3XO5P3BNJYxVZ1IV7DLVjp1Py6nwag88YntrS+3vKHyYcMqXVS4ZztJmwz2uGvz1FWhI/4LgbR5uQDA=="],
|
"@napi-rs/canvas": ["@napi-rs/canvas@0.1.89", "", { "optionalDependencies": { "@napi-rs/canvas-android-arm64": "0.1.89", "@napi-rs/canvas-darwin-arm64": "0.1.89", "@napi-rs/canvas-darwin-x64": "0.1.89", "@napi-rs/canvas-linux-arm-gnueabihf": "0.1.89", "@napi-rs/canvas-linux-arm64-gnu": "0.1.89", "@napi-rs/canvas-linux-arm64-musl": "0.1.89", "@napi-rs/canvas-linux-riscv64-gnu": "0.1.89", "@napi-rs/canvas-linux-x64-gnu": "0.1.89", "@napi-rs/canvas-linux-x64-musl": "0.1.89", "@napi-rs/canvas-win32-arm64-msvc": "0.1.89", "@napi-rs/canvas-win32-x64-msvc": "0.1.89" } }, "sha512-7GjmkMirJHejeALCqUnZY3QwID7bbumOiLrqq2LKgxrdjdmxWQBTc6rcASa2u8wuWrH7qo4/4n/VNrOwCoKlKg=="],
|
||||||
|
|
||||||
"@napi-rs/canvas-android-arm64": ["@napi-rs/canvas-android-arm64@0.1.100", "", { "os": "android", "cpu": "arm64" }, "sha512-hjhCKhntPv9+t4ckHymdx0phYNcVW+GKQR6Lzw2zE+pOVjOplSmtx9nNNknTjbEDLcuLZqA1y8ufKg1XfgftzQ=="],
|
"@napi-rs/canvas-android-arm64": ["@napi-rs/canvas-android-arm64@0.1.89", "", { "os": "android", "cpu": "arm64" }, "sha512-CXxQTXsjtQqKGENS8Ejv9pZOFJhOPIl2goenS+aU8dY4DygvkyagDhy/I07D1YLqrDtPvLEX5zZHt8qUdnuIpQ=="],
|
||||||
|
|
||||||
"@napi-rs/canvas-darwin-arm64": ["@napi-rs/canvas-darwin-arm64@0.1.100", "", { "os": "darwin", "cpu": "arm64" }, "sha512-2PcswRaC7Ly645DGt88///zuFDhJxJYdKAs1uU3mfk1atYkXufgcgLfBpk6Tm12nCQBaNt1wpybuPZ4qOhTo8A=="],
|
"@napi-rs/canvas-darwin-arm64": ["@napi-rs/canvas-darwin-arm64@0.1.89", "", { "os": "darwin", "cpu": "arm64" }, "sha512-k29cR/Zl20WLYM7M8YePevRu2VQRaKcRedYr1V/8FFHkyIQ8kShEV+MPoPGi+znvmd17Eqjy2Pk2F2kpM2umVg=="],
|
||||||
|
|
||||||
"@napi-rs/canvas-darwin-x64": ["@napi-rs/canvas-darwin-x64@0.1.100", "", { "os": "darwin", "cpu": "x64" }, "sha512-ePNZtj7pNIva/siZMg+HmbeozkIjqUIYdoymH8HaA3qK7LfzFN4WMBM8G6HQ9ZC+H3+Dnn5pqtiXpgLykaPOhw=="],
|
"@napi-rs/canvas-darwin-x64": ["@napi-rs/canvas-darwin-x64@0.1.89", "", { "os": "darwin", "cpu": "x64" }, "sha512-iUragqhBrA5FqU13pkhYBDbUD1WEAIlT8R2+fj6xHICY2nemzwMUI8OENDhRh7zuL06YDcRwENbjAVxOmaX9jg=="],
|
||||||
|
|
||||||
"@napi-rs/canvas-linux-arm-gnueabihf": ["@napi-rs/canvas-linux-arm-gnueabihf@0.1.100", "", { "os": "linux", "cpu": "arm" }, "sha512-d5cDB48oWFGU8/XPhUOFAlySgb/VAu7D+s8fi55K1Pcfg8aPplHWqMgibhVLU8ky7Pyg/fuiVLz4Nf3JrSTuUA=="],
|
"@napi-rs/canvas-linux-arm-gnueabihf": ["@napi-rs/canvas-linux-arm-gnueabihf@0.1.89", "", { "os": "linux", "cpu": "arm" }, "sha512-y3SM9sfDWasY58ftoaI09YBFm35Ig8tosZqgahLJ2WGqawCusGNPV9P0/4PsrLOCZqGg629WxexQMY25n7zcvA=="],
|
||||||
|
|
||||||
"@napi-rs/canvas-linux-arm64-gnu": ["@napi-rs/canvas-linux-arm64-gnu@0.1.100", "", { "os": "linux", "cpu": "arm64" }, "sha512-rDxgxRu69RvDlX/bh9o22DxLsGr8EqsNgotL9+RwQE1S0b0cqeatqsw6aW45mukm0B42DIAaAacKaYQ8cqS1nw=="],
|
"@napi-rs/canvas-linux-arm64-gnu": ["@napi-rs/canvas-linux-arm64-gnu@0.1.89", "", { "os": "linux", "cpu": "arm64" }, "sha512-NEoF9y8xq5fX8HG8aZunBom1ILdTwt7ayBzSBIwrmitk7snj4W6Fz/yN/ZOmlM1iyzHDNX5Xn0n+VgWCF8BEdA=="],
|
||||||
|
|
||||||
"@napi-rs/canvas-linux-arm64-musl": ["@napi-rs/canvas-linux-arm64-musl@0.1.100", "", { "os": "linux", "cpu": "arm64" }, "sha512-K3mDW66N+xT2/V439u1alFANiBUjdEx2gLiNYnCmUsva5jZMxWTjafBYwTzYK+EMFMHrUoabuU+T1BIP5CgbYQ=="],
|
"@napi-rs/canvas-linux-arm64-musl": ["@napi-rs/canvas-linux-arm64-musl@0.1.89", "", { "os": "linux", "cpu": "arm64" }, "sha512-UQQkIEzV12/l60j1ziMjZ+mtodICNUbrd205uAhbyTw0t60CrC/EsKb5/aJWGq1wM0agvcgZV72JJCKfLS6+4w=="],
|
||||||
|
|
||||||
"@napi-rs/canvas-linux-riscv64-gnu": ["@napi-rs/canvas-linux-riscv64-gnu@0.1.100", "", { "os": "linux", "cpu": "none" }, "sha512-mooqUBTIsccZpnoQC4NgrC1v6C1vof39etLNMnBwCY+p0gajWJvAHLGQ6g/gGyS5YrpDW+GefSN4+Cvcr08UWw=="],
|
"@napi-rs/canvas-linux-riscv64-gnu": ["@napi-rs/canvas-linux-riscv64-gnu@0.1.89", "", { "os": "linux", "cpu": "none" }, "sha512-1/VmEoFaIO6ONeeEMGoWF17wOYZOl5hxDC1ios2Bkz/oQjbJJ8DY/X22vWTmvuUKWWhBVlo63pxLGZbjJU/heA=="],
|
||||||
|
|
||||||
"@napi-rs/canvas-linux-x64-gnu": ["@napi-rs/canvas-linux-x64-gnu@0.1.100", "", { "os": "linux", "cpu": "x64" }, "sha512-1eCvkDCazm7FFhsT7DfGOdSaHgZVK3bt/dSBl5EWHOWmnz+I7j8tPseJqqD81NF+MH21jKUK4wQSDjN0mdhnTg=="],
|
"@napi-rs/canvas-linux-x64-gnu": ["@napi-rs/canvas-linux-x64-gnu@0.1.89", "", { "os": "linux", "cpu": "x64" }, "sha512-ebLuqkCuaPIkKgKH9q4+pqWi1tkPOfiTk5PM1LKR1tB9iO9sFNVSIgwEp+SJreTSbA2DK5rW8lQXiN78SjtcvA=="],
|
||||||
|
|
||||||
"@napi-rs/canvas-linux-x64-musl": ["@napi-rs/canvas-linux-x64-musl@0.1.100", "", { "os": "linux", "cpu": "x64" }, "sha512-20arT6lnI19S68qNlii73TSEDbECNgzMz2EpldC1V3mZFuRkeujXkcebRk0LRJe9SEUAooYiLokfMViY8IX7yA=="],
|
"@napi-rs/canvas-linux-x64-musl": ["@napi-rs/canvas-linux-x64-musl@0.1.89", "", { "os": "linux", "cpu": "x64" }, "sha512-w+5qxHzplvA4BkHhCaizNMLLXiI+CfP84YhpHm/PqMub4u8J0uOAv+aaGv40rYEYra5hHRWr9LUd6cfW32o9/A=="],
|
||||||
|
|
||||||
"@napi-rs/canvas-win32-arm64-msvc": ["@napi-rs/canvas-win32-arm64-msvc@0.1.100", "", { "os": "win32", "cpu": "arm64" }, "sha512-DZFFT1wIAg37LJw37yhMRFfjATd3vTQzjZ1Yki8u2vhO6Hi5VE6BVaGQ1aaDu7xb4iMErz+9EOwjpS7xcxFeBw=="],
|
"@napi-rs/canvas-win32-arm64-msvc": ["@napi-rs/canvas-win32-arm64-msvc@0.1.89", "", { "os": "win32", "cpu": "arm64" }, "sha512-DmyXa5lJHcjOsDC78BM3bnEECqbK3xASVMrKfvtT/7S7Z8NGQOugvu+L7b41V6cexCd34mBWgMOsjoEBceeB1Q=="],
|
||||||
|
|
||||||
"@napi-rs/canvas-win32-x64-msvc": ["@napi-rs/canvas-win32-x64-msvc@0.1.100", "", { "os": "win32", "cpu": "x64" }, "sha512-MyT1j3mHC2+Lu4pBi9mKyMJhtP6U7k7EldY7sj/uS5gJA65gTXt8MefJQXLJo5d/vZbuWmfxzkEUNc/urV3pHA=="],
|
"@napi-rs/canvas-win32-x64-msvc": ["@napi-rs/canvas-win32-x64-msvc@0.1.89", "", { "os": "win32", "cpu": "x64" }, "sha512-WMej0LZrIqIncQcx0JHaMXlnAG7sncwJh7obs/GBgp0xF9qABjwoRwIooMWCZkSansapKGNUHhamY6qEnFN7gA=="],
|
||||||
|
|
||||||
"@neon-rs/load": ["@neon-rs/load@0.0.4", "", {}, "sha512-kTPhdZyTQxB+2wpiRcFWrDcejc4JI6tkPuS7UZCG4l6Zvc5kU/gGQ/ozvHTh1XR5tS+UlfAfGuPajjzQjCiHCw=="],
|
"@neon-rs/load": ["@neon-rs/load@0.0.4", "", {}, "sha512-kTPhdZyTQxB+2wpiRcFWrDcejc4JI6tkPuS7UZCG4l6Zvc5kU/gGQ/ozvHTh1XR5tS+UlfAfGuPajjzQjCiHCw=="],
|
||||||
|
|
||||||
@@ -298,57 +295,53 @@
|
|||||||
|
|
||||||
"@protobufjs/utf8": ["@protobufjs/utf8@1.1.0", "", {}, "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="],
|
"@protobufjs/utf8": ["@protobufjs/utf8@1.1.0", "", {}, "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="],
|
||||||
|
|
||||||
"@puppeteer/browsers": ["@puppeteer/browsers@2.13.0", "", { "dependencies": { "debug": "^4.4.3", "extract-zip": "^2.0.1", "progress": "^2.0.3", "proxy-agent": "^6.5.0", "semver": "^7.7.4", "tar-fs": "^3.1.1", "yargs": "^17.7.2" }, "bin": { "browsers": "lib/cjs/main-cli.js" } }, "sha512-46BZJYJjc/WwmKjsvDFykHtXrtomsCIrwYQPOP7VfMJoZY2bsDF9oROBABR3paDjDcmkUye1Pb1BqdcdiipaWA=="],
|
"@puppeteer/browsers": ["@puppeteer/browsers@2.11.2", "", { "dependencies": { "debug": "^4.4.3", "extract-zip": "^2.0.1", "progress": "^2.0.3", "proxy-agent": "^6.5.0", "semver": "^7.7.3", "tar-fs": "^3.1.1", "yargs": "^17.7.2" }, "bin": { "browsers": "lib/cjs/main-cli.js" } }, "sha512-GBY0+2lI9fDrjgb5dFL9+enKXqyOPok9PXg/69NVkjW3bikbK9RQrNrI3qccQXmDNN7ln4j/yL89Qgvj/tfqrw=="],
|
||||||
|
|
||||||
"@tediousjs/connection-string": ["@tediousjs/connection-string@0.5.0", "", {}, "sha512-7qSgZbincDDDFyRweCIEvZULFAw5iz/DeunhvuxpL31nfntX3P4Yd4HkHBRg9H8CdqY1e5WFN1PZIz/REL9MVQ=="],
|
"@tediousjs/connection-string": ["@tediousjs/connection-string@0.5.0", "", {}, "sha512-7qSgZbincDDDFyRweCIEvZULFAw5iz/DeunhvuxpL31nfntX3P4Yd4HkHBRg9H8CdqY1e5WFN1PZIz/REL9MVQ=="],
|
||||||
|
|
||||||
"@tootallnate/quickjs-emscripten": ["@tootallnate/quickjs-emscripten@0.23.0", "", {}, "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA=="],
|
"@tootallnate/quickjs-emscripten": ["@tootallnate/quickjs-emscripten@0.23.0", "", {}, "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA=="],
|
||||||
|
|
||||||
"@types/bun": ["@types/bun@1.3.13", "", { "dependencies": { "bun-types": "1.3.13" } }, "sha512-9fqXWk5YIHGGnUau9TEi+qdlTYDAnOj+xLCmSTwXfAIqXr2x4tytJb43E9uCvt09zJURKXwAtkoH4nLQfzeTXw=="],
|
"@types/bun": ["@types/bun@1.3.8", "", { "dependencies": { "bun-types": "1.3.8" } }, "sha512-3LvWJ2q5GerAXYxO2mffLTqOzEu5qnhEAlh48Vnu8WQfnmSwbgagjGZV6BoHKJztENYEDn6QmVd949W4uESRJA=="],
|
||||||
|
|
||||||
"@types/debug": ["@types/debug@4.1.12", "", { "dependencies": { "@types/ms": "*" } }, "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ=="],
|
"@types/debug": ["@types/debug@4.1.12", "", { "dependencies": { "@types/ms": "*" } }, "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ=="],
|
||||||
|
|
||||||
"@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="],
|
"@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="],
|
||||||
|
|
||||||
"@types/fluent-ffmpeg": ["@types/fluent-ffmpeg@2.1.28", "", { "dependencies": { "@types/node": "*" } }, "sha512-5ovxsDwBcPfJ+eYs1I/ZpcYCnkce7pvH9AHSvrZllAp1ZPpTRDZAFjF3TRFbukxSgIYTTNYePbS0rKUmaxVbXw=="],
|
|
||||||
|
|
||||||
"@types/json-schema": ["@types/json-schema@7.0.15", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="],
|
"@types/json-schema": ["@types/json-schema@7.0.15", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="],
|
||||||
|
|
||||||
"@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="],
|
"@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="],
|
||||||
|
|
||||||
"@types/mssql": ["@types/mssql@9.1.8", "", { "dependencies": { "@types/node": "*", "tarn": "^3.0.1", "tedious": "*" } }, "sha512-mt9h5jWj+DYE5jxnKaWSV/GqDf9FV52XYVk6T3XZF69noEe+JJV6MKirii48l81+cjmAkSq+qeKX+k61fHkYrQ=="],
|
"@types/mssql": ["@types/mssql@9.1.8", "", { "dependencies": { "@types/node": "*", "tarn": "^3.0.1", "tedious": "*" } }, "sha512-mt9h5jWj+DYE5jxnKaWSV/GqDf9FV52XYVk6T3XZF69noEe+JJV6MKirii48l81+cjmAkSq+qeKX+k61fHkYrQ=="],
|
||||||
|
|
||||||
"@types/node": ["@types/node@25.6.0", "", { "dependencies": { "undici-types": "~7.19.0" } }, "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ=="],
|
"@types/node": ["@types/node@25.2.0", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-DZ8VwRFUNzuqJ5khrvwMXHmvPe+zGayJhr2CDNiKB1WBE1ST8Djl00D0IC4vvNmHMdj6DlbYRIaFE7WHjlDl5w=="],
|
||||||
|
|
||||||
"@types/qrcode": ["@types/qrcode@1.5.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-te7NQcV2BOvdj2b1hCAHzAoMNuj65kNBMz0KBaxM6c3VGBOhU0dURQKOtH8CFNI/dsKkwlv32p26qYQTWoB5bw=="],
|
"@types/qrcode": ["@types/qrcode@1.5.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-te7NQcV2BOvdj2b1hCAHzAoMNuj65kNBMz0KBaxM6c3VGBOhU0dURQKOtH8CFNI/dsKkwlv32p26qYQTWoB5bw=="],
|
||||||
|
|
||||||
"@types/readable-stream": ["@types/readable-stream@4.0.23", "", { "dependencies": { "@types/node": "*" } }, "sha512-wwXrtQvbMHxCbBgjHaMGEmImFTQxxpfMOR/ZoQnXxB1woqkUbdLGFDgauo00Py9IudiaqSeiBiulSV9i6XIPig=="],
|
"@types/readable-stream": ["@types/readable-stream@4.0.23", "", { "dependencies": { "@types/node": "*" } }, "sha512-wwXrtQvbMHxCbBgjHaMGEmImFTQxxpfMOR/ZoQnXxB1woqkUbdLGFDgauo00Py9IudiaqSeiBiulSV9i6XIPig=="],
|
||||||
|
|
||||||
"@types/retry": ["@types/retry@0.12.0", "", {}, "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA=="],
|
|
||||||
|
|
||||||
"@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="],
|
"@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="],
|
||||||
|
|
||||||
"@types/yauzl": ["@types/yauzl@2.10.3", "", { "dependencies": { "@types/node": "*" } }, "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q=="],
|
"@types/yauzl": ["@types/yauzl@2.10.3", "", { "dependencies": { "@types/node": "*" } }, "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q=="],
|
||||||
|
|
||||||
"@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.59.1", "", { "dependencies": { "@eslint-community/regexpp": "^4.12.2", "@typescript-eslint/scope-manager": "8.59.1", "@typescript-eslint/type-utils": "8.59.1", "@typescript-eslint/utils": "8.59.1", "@typescript-eslint/visitor-keys": "8.59.1", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.59.1", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-BOziFIfE+6osHO9FoJG4zjoHUcvI7fTNBSpdAwrNH0/TLvzjsk2oo8XSSOT2HhqUyhZPfHv4UOffoJ9oEEQ7Ag=="],
|
"@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.54.0", "", { "dependencies": { "@eslint-community/regexpp": "^4.12.2", "@typescript-eslint/scope-manager": "8.54.0", "@typescript-eslint/type-utils": "8.54.0", "@typescript-eslint/utils": "8.54.0", "@typescript-eslint/visitor-keys": "8.54.0", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.4.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.54.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-hAAP5io/7csFStuOmR782YmTthKBJ9ND3WVL60hcOjvtGFb+HJxH4O5huAcmcZ9v9G8P+JETiZ/G1B8MALnWZQ=="],
|
||||||
|
|
||||||
"@typescript-eslint/parser": ["@typescript-eslint/parser@8.59.1", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.59.1", "@typescript-eslint/types": "8.59.1", "@typescript-eslint/typescript-estree": "8.59.1", "@typescript-eslint/visitor-keys": "8.59.1", "debug": "^4.4.3" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-HDQH9O/47Dxi1ceDhBXdaldtf/WV9yRYMjbjCuNk3qnaTD564qwv61Y7+gTxwxRKzSrgO5uhtw584igXVuuZkA=="],
|
"@typescript-eslint/parser": ["@typescript-eslint/parser@8.54.0", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.54.0", "@typescript-eslint/types": "8.54.0", "@typescript-eslint/typescript-estree": "8.54.0", "@typescript-eslint/visitor-keys": "8.54.0", "debug": "^4.4.3" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-BtE0k6cjwjLZoZixN0t5AKP0kSzlGu7FctRXYuPAm//aaiZhmfq1JwdYpYr1brzEspYyFeF+8XF5j2VK6oalrA=="],
|
||||||
|
|
||||||
"@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.59.1", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.59.1", "@typescript-eslint/types": "^8.59.1", "debug": "^4.4.3" }, "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-+MuHQlHiEr00Of/IQbE/MmEoi44znZHbR/Pz7Opq4HryUOlRi+/44dro9Ycy8Fyo+/024IWtw8m4JUMCGTYxDg=="],
|
"@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.54.0", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.54.0", "@typescript-eslint/types": "^8.54.0", "debug": "^4.4.3" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-YPf+rvJ1s7MyiWM4uTRhE4DvBXrEV+d8oC3P9Y2eT7S+HBS0clybdMIPnhiATi9vZOYDc7OQ1L/i6ga6NFYK/g=="],
|
||||||
|
|
||||||
"@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.59.1", "", { "dependencies": { "@typescript-eslint/types": "8.59.1", "@typescript-eslint/visitor-keys": "8.59.1" } }, "sha512-LwuHQI4pDOYVKvmH2dkaJo6YZCSgouVgnS/z7yBPKBMvgtBvyLqiLy9Z6b7+m/TRcX1NFYUqZetI5Y+aT4GEfg=="],
|
"@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.54.0", "", { "dependencies": { "@typescript-eslint/types": "8.54.0", "@typescript-eslint/visitor-keys": "8.54.0" } }, "sha512-27rYVQku26j/PbHYcVfRPonmOlVI6gihHtXFbTdB5sb6qA0wdAQAbyXFVarQ5t4HRojIz64IV90YtsjQSSGlQg=="],
|
||||||
|
|
||||||
"@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.59.1", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-/0nEyPbX7gRsk0Uwfe4ALwwgxuA66d/l2mhRDNlAvaj4U3juhUtJNq0DsY8M2AYwwb9rEq2hrC3IcIcEt++iJA=="],
|
"@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.54.0", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-dRgOyT2hPk/JwxNMZDsIXDgyl9axdJI3ogZ2XWhBPsnZUv+hPesa5iuhdYt2gzwA9t8RE5ytOJ6xB0moV0Ujvw=="],
|
||||||
|
|
||||||
"@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.59.1", "", { "dependencies": { "@typescript-eslint/types": "8.59.1", "@typescript-eslint/typescript-estree": "8.59.1", "@typescript-eslint/utils": "8.59.1", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-klWPBR2ciQHS3f++ug/mVnWKPjBUo7icEL3FAO1lhAR1Z1i5NQYZ1EannMSRYcq5qCv5wNALlXr6fksRHyYl7w=="],
|
"@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.54.0", "", { "dependencies": { "@typescript-eslint/types": "8.54.0", "@typescript-eslint/typescript-estree": "8.54.0", "@typescript-eslint/utils": "8.54.0", "debug": "^4.4.3", "ts-api-utils": "^2.4.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-hiLguxJWHjjwL6xMBwD903ciAwd7DmK30Y9Axs/etOkftC3ZNN9K44IuRD/EB08amu+Zw6W37x9RecLkOo3pMA=="],
|
||||||
|
|
||||||
"@typescript-eslint/types": ["@typescript-eslint/types@8.59.1", "", {}, "sha512-ZDCjgccSdYPw5Bxh+my4Z0lJU96ZDN7jbBzvmEn0FZx3RtU1C7VWl6NbDx94bwY3V5YsgwRzJPOgeY2Q/nLG8A=="],
|
"@typescript-eslint/types": ["@typescript-eslint/types@8.54.0", "", {}, "sha512-PDUI9R1BVjqu7AUDsRBbKMtwmjWcn4J3le+5LpcFgWULN3LvHC5rkc9gCVxbrsrGmO1jfPybN5s6h4Jy+OnkAA=="],
|
||||||
|
|
||||||
"@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.59.1", "", { "dependencies": { "@typescript-eslint/project-service": "8.59.1", "@typescript-eslint/tsconfig-utils": "8.59.1", "@typescript-eslint/types": "8.59.1", "@typescript-eslint/visitor-keys": "8.59.1", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", "tinyglobby": "^0.2.15", "ts-api-utils": "^2.5.0" }, "peerDependencies": { "typescript": ">=4.8.4 <6.1.0" } }, "sha512-OUd+vJS05sSkOip+BkZ/2NS8RMxrAAJemsC6vU3kmfLyeaJT0TftHkV9mcx2107MmsBVXXexhVu4F0TZXyMl4g=="],
|
"@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.54.0", "", { "dependencies": { "@typescript-eslint/project-service": "8.54.0", "@typescript-eslint/tsconfig-utils": "8.54.0", "@typescript-eslint/types": "8.54.0", "@typescript-eslint/visitor-keys": "8.54.0", "debug": "^4.4.3", "minimatch": "^9.0.5", "semver": "^7.7.3", "tinyglobby": "^0.2.15", "ts-api-utils": "^2.4.0" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-BUwcskRaPvTk6fzVWgDPdUndLjB87KYDrN5EYGetnktoeAvPtO4ONHlAZDnj5VFnUANg0Sjm7j4usBlnoVMHwA=="],
|
||||||
|
|
||||||
"@typescript-eslint/utils": ["@typescript-eslint/utils@8.59.1", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", "@typescript-eslint/scope-manager": "8.59.1", "@typescript-eslint/types": "8.59.1", "@typescript-eslint/typescript-estree": "8.59.1" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "sha512-3pIeoXhCeYH9FSCBI8P3iNwJlGuzPlYKkTlen2O9T1DSeeg8UG8jstq6BLk+Mda0qup7mgk4z4XL4OzRaxZ8LA=="],
|
"@typescript-eslint/utils": ["@typescript-eslint/utils@8.54.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", "@typescript-eslint/scope-manager": "8.54.0", "@typescript-eslint/types": "8.54.0", "@typescript-eslint/typescript-estree": "8.54.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-9Cnda8GS57AQakvRyG0PTejJNlA2xhvyNtEVIMlDWOOeEyBkYWhGPnfrIAnqxLMTSTo6q8g12XVjjev5l1NvMA=="],
|
||||||
|
|
||||||
"@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.59.1", "", { "dependencies": { "@typescript-eslint/types": "8.59.1", "eslint-visitor-keys": "^5.0.0" } }, "sha512-LdDNl6C5iJExcM0Yh0PwAIBb9PrSiCsWamF/JyEZawm3kFDnRoaq3LGE4bpyRao/fWeGKKyw7icx0YxrLFC5Cg=="],
|
"@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.54.0", "", { "dependencies": { "@typescript-eslint/types": "8.54.0", "eslint-visitor-keys": "^4.2.1" } }, "sha512-VFlhGSl4opC0bprJiItPQ1RfUhGDIBokcPwaFH4yiBCaNPeld/9VeXbiPO1cLyorQi1G1vL+ecBk1x8o1axORA=="],
|
||||||
|
|
||||||
"@typespec/ts-http-runtime": ["@typespec/ts-http-runtime@0.3.2", "", { "dependencies": { "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.0", "tslib": "^2.6.2" } }, "sha512-IlqQ/Gv22xUC1r/WQm4StLkYQmaaTsXAhUVsNE0+xiyf0yRFiH5++q78U3bw6bLKDCTmh0uqKB9eG9+Bt75Dkg=="],
|
"@typespec/ts-http-runtime": ["@typespec/ts-http-runtime@0.3.2", "", { "dependencies": { "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.0", "tslib": "^2.6.2" } }, "sha512-IlqQ/Gv22xUC1r/WQm4StLkYQmaaTsXAhUVsNE0+xiyf0yRFiH5++q78U3bw6bLKDCTmh0uqKB9eG9+Bt75Dkg=="],
|
||||||
|
|
||||||
@@ -360,7 +353,7 @@
|
|||||||
|
|
||||||
"agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="],
|
"agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="],
|
||||||
|
|
||||||
"ajv": ["ajv@6.14.0", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw=="],
|
"ajv": ["ajv@6.12.6", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g=="],
|
||||||
|
|
||||||
"ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
"ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
||||||
|
|
||||||
@@ -372,11 +365,9 @@
|
|||||||
|
|
||||||
"ast-types": ["ast-types@0.13.4", "", { "dependencies": { "tslib": "^2.0.1" } }, "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w=="],
|
"ast-types": ["ast-types@0.13.4", "", { "dependencies": { "tslib": "^2.0.1" } }, "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w=="],
|
||||||
|
|
||||||
"async": ["async@0.2.10", "", {}, "sha512-eAkdoKxU6/LkKDBzLpT+t6Ff5EtfSF4wx1WfJiPEEV7WNLnDaRXk0oVysiEPm262roaachGexwUv94WhSgN5TQ=="],
|
|
||||||
|
|
||||||
"asynckit": ["asynckit@0.4.0", "", {}, "sha1-x57Zf380y48robyXkLzDZkdLS3k="],
|
"asynckit": ["asynckit@0.4.0", "", {}, "sha1-x57Zf380y48robyXkLzDZkdLS3k="],
|
||||||
|
|
||||||
"axios": ["axios@1.15.2", "", { "dependencies": { "follow-redirects": "^1.15.11", "form-data": "^4.0.5", "proxy-from-env": "^2.1.0" } }, "sha512-wLrXxPtcrPTsNlJmKjkPnNPK2Ihe0hn0wGSaTEiHRPxwjvJwT3hKmXF4dpqxmPO9SoNb2FsYXj/xEo0gHN+D5A=="],
|
"axios": ["axios@1.13.4", "", { "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.4", "proxy-from-env": "^1.1.0" } }, "sha512-1wVkUaAO6WyaYtCkcYCOx12ZgpGf9Zif+qXa4n+oYzK558YryKqiL6UWwd5DqiH3VRW0GYhTZQ/vlgJrCoNQlg=="],
|
||||||
|
|
||||||
"b4a": ["b4a@1.7.3", "", { "peerDependencies": { "react-native-b4a": "*" }, "optionalPeers": ["react-native-b4a"] }, "sha512-5Q2mfq2WfGuFp3uS//0s6baOJLMoVduPYVeNmDYxu5OUA1/cBfvr2RIS7vi62LdNj/urk1hfmj867I3qt6uZ7Q=="],
|
"b4a": ["b4a@1.7.3", "", { "peerDependencies": { "react-native-b4a": "*" }, "optionalPeers": ["react-native-b4a"] }, "sha512-5Q2mfq2WfGuFp3uS//0s6baOJLMoVduPYVeNmDYxu5OUA1/cBfvr2RIS7vi62LdNj/urk1hfmj867I3qt6uZ7Q=="],
|
||||||
|
|
||||||
@@ -410,7 +401,7 @@
|
|||||||
|
|
||||||
"buffer-equal-constant-time": ["buffer-equal-constant-time@1.0.1", "", {}, "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="],
|
"buffer-equal-constant-time": ["buffer-equal-constant-time@1.0.1", "", {}, "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="],
|
||||||
|
|
||||||
"bun-types": ["bun-types@1.3.13", "", { "dependencies": { "@types/node": "*" } }, "sha512-QXKeHLlOLqQX9LgYaHJfzdBaV21T63HhFJnvuRCcjZiaUDpbs5ED1MgxbMra71CsryN/1dAoXuJJJwIv/2drVA=="],
|
"bun-types": ["bun-types@1.3.8", "", { "dependencies": { "@types/node": "*" } }, "sha512-fL99nxdOWvV4LqjmC+8Q9kW3M4QTtTR1eePs94v5ctGqU8OeceWrSUaRw3JYb7tU3FkMIAjkueehrHPPPGKi5Q=="],
|
||||||
|
|
||||||
"bundle-name": ["bundle-name@4.1.0", "", { "dependencies": { "run-applescript": "^7.0.0" } }, "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q=="],
|
"bundle-name": ["bundle-name@4.1.0", "", { "dependencies": { "run-applescript": "^7.0.0" } }, "sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q=="],
|
||||||
|
|
||||||
@@ -422,7 +413,7 @@
|
|||||||
|
|
||||||
"chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
|
"chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
|
||||||
|
|
||||||
"chromium-bidi": ["chromium-bidi@14.0.0", "", { "dependencies": { "mitt": "^3.0.1", "zod": "^3.24.1" }, "peerDependencies": { "devtools-protocol": "*" } }, "sha512-9gYlLtS6tStdRWzrtXaTMnqcM4dudNegMXJxkR0I/CXObHalYeYcAMPrL19eroNZHtJ8DQmu1E+ZNOYu/IXMXw=="],
|
"chromium-bidi": ["chromium-bidi@13.0.1", "", { "dependencies": { "mitt": "^3.0.1", "zod": "^3.24.1" }, "peerDependencies": { "devtools-protocol": "*" } }, "sha512-c+RLxH0Vg2x2syS9wPw378oJgiJNXtYXUvnVAldUlt5uaHekn0CCU7gPksNgHjrH1qFhmjVXQj4esvuthuC7OQ=="],
|
||||||
|
|
||||||
"cliui": ["cliui@6.0.0", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^6.2.0" } }, "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ=="],
|
"cliui": ["cliui@6.0.0", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^6.2.0" } }, "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ=="],
|
||||||
|
|
||||||
@@ -440,6 +431,8 @@
|
|||||||
|
|
||||||
"cosmiconfig": ["cosmiconfig@9.0.0", "", { "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", "js-yaml": "^4.1.0", "parse-json": "^5.2.0" }, "peerDependencies": { "typescript": ">=4.9.5" }, "optionalPeers": ["typescript"] }, "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg=="],
|
"cosmiconfig": ["cosmiconfig@9.0.0", "", { "dependencies": { "env-paths": "^2.2.1", "import-fresh": "^3.3.0", "js-yaml": "^4.1.0", "parse-json": "^5.2.0" }, "peerDependencies": { "typescript": ">=4.9.5" }, "optionalPeers": ["typescript"] }, "sha512-itvL5h8RETACmOTFc4UfIyB2RfEHi71Ax6E/PivVxq9NseKbOWpeyHEOIbmAw1rs8Ak0VursQNww7lf7YtUwzg=="],
|
||||||
|
|
||||||
|
"cross-fetch": ["cross-fetch@4.1.0", "", { "dependencies": { "node-fetch": "^2.7.0" } }, "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw=="],
|
||||||
|
|
||||||
"cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="],
|
"cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="],
|
||||||
|
|
||||||
"data-uri-to-buffer": ["data-uri-to-buffer@4.0.1", "", {}, "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A=="],
|
"data-uri-to-buffer": ["data-uri-to-buffer@4.0.1", "", {}, "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A=="],
|
||||||
@@ -464,15 +457,15 @@
|
|||||||
|
|
||||||
"detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="],
|
"detect-libc": ["detect-libc@2.1.2", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="],
|
||||||
|
|
||||||
"devtools-protocol": ["devtools-protocol@0.0.1595872", "", {}, "sha512-kRfgp8vWVjBu/fbYCiVFiOqsCk3CrMKEo3WbgGT2NXK2dG7vawWPBljixajVgGK9II8rDO9G0oD0zLt3I1daRg=="],
|
"devtools-protocol": ["devtools-protocol@0.0.1551306", "", {}, "sha512-CFx8QdSim8iIv+2ZcEOclBKTQY6BI1IEDa7Tm9YkwAXzEWFndTEzpTo5jAUhSnq24IC7xaDw0wvGcm96+Y3PEg=="],
|
||||||
|
|
||||||
"dijkstrajs": ["dijkstrajs@1.0.3", "", {}, "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA=="],
|
"dijkstrajs": ["dijkstrajs@1.0.3", "", {}, "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA=="],
|
||||||
|
|
||||||
"dotenv": ["dotenv@17.4.2", "", {}, "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw=="],
|
"dotenv": ["dotenv@17.2.3", "", {}, "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w=="],
|
||||||
|
|
||||||
"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-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-orm": ["drizzle-orm@1.0.0-beta.21", "", { "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/pg", "@types/sql.js", "@upstash/redis", "@vercel/postgres", "@xata.io/client", "arktype", "better-sqlite3", "bun-types", "expo-sqlite", "gel", "mysql2", "pg", "postgres", "sql.js", "sqlite3", "typebox", "valibot", "zod"] }, "sha512-HZcIbVn5J9T/Z91Wj12Pn7Pi8/1aykS/GPJf2lXeZnEuPjxaBfQ+YAt0Sl+XI+9R/D1BpK+2fdIqbpuaTbcvqA=="],
|
"drizzle-orm": ["drizzle-orm@1.0.0-beta.9-e89174b", "", { "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", "@prisma/client": "*", "@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": "*", "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" }, "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", "@prisma/client", "@sqlitecloud/drivers", "@tidbcloud/serverless", "@tursodatabase/database", "@tursodatabase/database-common", "@tursodatabase/database-wasm", "@types/better-sqlite3", "@types/pg", "@types/sql.js", "@upstash/redis", "@vercel/postgres", "@xata.io/client", "better-sqlite3", "bun-types", "expo-sqlite", "gel", "mysql2", "pg", "postgres", "sql.js", "sqlite3"] }, "sha512-B5KR/qYMZ0JMOurK+0xi1ObpOQcgrjaC9wHUiU2eTJjLemuh2CoQIw6yur68NxZG6Xcd0b9qghUNC/78/bEfbg=="],
|
||||||
|
|
||||||
"dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="],
|
"dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="],
|
||||||
|
|
||||||
@@ -504,7 +497,7 @@
|
|||||||
|
|
||||||
"escodegen": ["escodegen@2.1.0", "", { "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", "esutils": "^2.0.2" }, "optionalDependencies": { "source-map": "~0.6.1" }, "bin": { "esgenerate": "bin/esgenerate.js", "escodegen": "bin/escodegen.js" } }, "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w=="],
|
"escodegen": ["escodegen@2.1.0", "", { "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", "esutils": "^2.0.2" }, "optionalDependencies": { "source-map": "~0.6.1" }, "bin": { "esgenerate": "bin/esgenerate.js", "escodegen": "bin/escodegen.js" } }, "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w=="],
|
||||||
|
|
||||||
"eslint": ["eslint@9.39.4", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.21.2", "@eslint/config-helpers": "^0.4.2", "@eslint/core": "^0.17.0", "@eslint/eslintrc": "^3.3.5", "@eslint/js": "9.39.4", "@eslint/plugin-kit": "^0.4.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "ajv": "^6.14.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^8.4.0", "eslint-visitor-keys": "^4.2.1", "espree": "^10.4.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.5", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ=="],
|
"eslint": ["eslint@9.39.2", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", "@eslint/config-array": "^0.21.1", "@eslint/config-helpers": "^0.4.2", "@eslint/core": "^0.17.0", "@eslint/eslintrc": "^3.3.1", "@eslint/js": "9.39.2", "@eslint/plugin-kit": "^0.4.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^8.4.0", "eslint-visitor-keys": "^4.2.1", "espree": "^10.4.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-LEyamqS7W5HB3ujJyvi0HQK/dtVINZvd5mAAp9eT5S/ujByGjiZLCzPcHVzuXbpJDJF/cxwHlfceVUDZ2lnSTw=="],
|
||||||
|
|
||||||
"eslint-scope": ["eslint-scope@8.4.0", "", { "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg=="],
|
"eslint-scope": ["eslint-scope@8.4.0", "", { "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg=="],
|
||||||
|
|
||||||
@@ -554,8 +547,6 @@
|
|||||||
|
|
||||||
"flatted": ["flatted@3.3.3", "", {}, "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg=="],
|
"flatted": ["flatted@3.3.3", "", {}, "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg=="],
|
||||||
|
|
||||||
"fluent-ffmpeg": ["fluent-ffmpeg@2.1.3", "", { "dependencies": { "async": "^0.2.9", "which": "^1.1.1" } }, "sha512-Be3narBNt2s6bsaqP6Jzq91heDgOEaDCJAXcE3qcma/EJBSy5FB4cvO31XBInuAuKBx8Kptf8dkhjK0IOru39Q=="],
|
|
||||||
|
|
||||||
"follow-redirects": ["follow-redirects@1.15.11", "", {}, "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ=="],
|
"follow-redirects": ["follow-redirects@1.15.11", "", {}, "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ=="],
|
||||||
|
|
||||||
"for-in": ["for-in@1.0.2", "", {}, "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ=="],
|
"for-in": ["for-in@1.0.2", "", {}, "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ=="],
|
||||||
@@ -698,7 +689,7 @@
|
|||||||
|
|
||||||
"levn": ["levn@0.4.1", "", { "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" } }, "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ=="],
|
"levn": ["levn@0.4.1", "", { "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" } }, "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ=="],
|
||||||
|
|
||||||
"libsql": ["libsql@0.5.29", "", { "dependencies": { "@neon-rs/load": "^0.0.4", "detect-libc": "2.0.2" }, "optionalDependencies": { "@libsql/darwin-arm64": "0.5.29", "@libsql/darwin-x64": "0.5.29", "@libsql/linux-arm-gnueabihf": "0.5.29", "@libsql/linux-arm-musleabihf": "0.5.29", "@libsql/linux-arm64-gnu": "0.5.29", "@libsql/linux-arm64-musl": "0.5.29", "@libsql/linux-x64-gnu": "0.5.29", "@libsql/linux-x64-musl": "0.5.29", "@libsql/win32-x64-msvc": "0.5.29" }, "os": [ "linux", "win32", "darwin", ], "cpu": [ "arm", "x64", "arm64", ] }, "sha512-8lMP8iMgiBzzoNbAPQ59qdVcj6UaE/Vnm+fiwX4doX4Narook0a4GPKWBEv+CR8a1OwbfkgL18uBfBjWdF0Fzg=="],
|
"libsql": ["libsql@0.5.22", "", { "dependencies": { "@neon-rs/load": "^0.0.4", "detect-libc": "2.0.2" }, "optionalDependencies": { "@libsql/darwin-arm64": "0.5.22", "@libsql/darwin-x64": "0.5.22", "@libsql/linux-arm-gnueabihf": "0.5.22", "@libsql/linux-arm-musleabihf": "0.5.22", "@libsql/linux-arm64-gnu": "0.5.22", "@libsql/linux-arm64-musl": "0.5.22", "@libsql/linux-x64-gnu": "0.5.22", "@libsql/linux-x64-musl": "0.5.22", "@libsql/win32-x64-msvc": "0.5.22" }, "os": [ "linux", "win32", "darwin", ], "cpu": [ "arm", "x64", "arm64", ] }, "sha512-NscWthMQt7fpU8lqd7LXMvT9pi+KhhmTHAJWUB/Lj6MWa0MKFv0F2V4C6WKKpjCVZl0VwcDz4nOI3CyaT1DDiA=="],
|
||||||
|
|
||||||
"lines-and-columns": ["lines-and-columns@1.2.4", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="],
|
"lines-and-columns": ["lines-and-columns@1.2.4", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="],
|
||||||
|
|
||||||
@@ -734,7 +725,7 @@
|
|||||||
|
|
||||||
"mime-types": ["mime-types@2.1.29", "", { "dependencies": { "mime-db": "1.46.0" } }, "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ=="],
|
"mime-types": ["mime-types@2.1.29", "", { "dependencies": { "mime-db": "1.46.0" } }, "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ=="],
|
||||||
|
|
||||||
"minimatch": ["minimatch@3.1.5", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w=="],
|
"minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="],
|
||||||
|
|
||||||
"minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="],
|
"minipass": ["minipass@7.1.2", "", {}, "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw=="],
|
||||||
|
|
||||||
@@ -762,7 +753,7 @@
|
|||||||
|
|
||||||
"open": ["open@10.2.0", "", { "dependencies": { "default-browser": "^5.2.1", "define-lazy-prop": "^3.0.0", "is-inside-container": "^1.0.0", "wsl-utils": "^0.1.0" } }, "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA=="],
|
"open": ["open@10.2.0", "", { "dependencies": { "default-browser": "^5.2.1", "define-lazy-prop": "^3.0.0", "is-inside-container": "^1.0.0", "wsl-utils": "^0.1.0" } }, "sha512-YgBpdJHPyQ2UE5x+hlSXcnejzAvD0b22U2OuAP+8OnlJT+PjWPxtgmGqKKc+RgTM63U9gN0YzrYc71R2WT/hTA=="],
|
||||||
|
|
||||||
"openai": ["openai@6.35.0", "", { "peerDependencies": { "ws": "^8.18.0", "zod": "^3.25 || ^4.0" }, "optionalPeers": ["ws", "zod"], "bin": { "openai": "bin/cli" } }, "sha512-L/skwIGnt5xQZHb0UfTu9uAUKbis3ehKypOuJKi20QvG7UStV6C8IC3myGYHcdiF4kms/bAvOJ9UqqNWqi8x/Q=="],
|
"openai": ["openai@6.17.0", "", { "peerDependencies": { "ws": "^8.18.0", "zod": "^3.25 || ^4.0" }, "optionalPeers": ["ws", "zod"], "bin": { "openai": "bin/cli" } }, "sha512-NHRpPEUPzAvFOAFs9+9pC6+HCw/iWsYsKCMPXH5Kw7BpMxqd8g/A07/1o7Gx2TWtCnzevVRyKMRFqyiHyAlqcA=="],
|
||||||
|
|
||||||
"optionator": ["optionator@0.9.4", "", { "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", "word-wrap": "^1.2.5" } }, "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g=="],
|
"optionator": ["optionator@0.9.4", "", { "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", "word-wrap": "^1.2.5" } }, "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g=="],
|
||||||
|
|
||||||
@@ -770,8 +761,6 @@
|
|||||||
|
|
||||||
"p-locate": ["p-locate@5.0.0", "", { "dependencies": { "p-limit": "^3.0.2" } }, "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw=="],
|
"p-locate": ["p-locate@5.0.0", "", { "dependencies": { "p-limit": "^3.0.2" } }, "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw=="],
|
||||||
|
|
||||||
"p-retry": ["p-retry@4.6.2", "", { "dependencies": { "@types/retry": "0.12.0", "retry": "^0.13.1" } }, "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ=="],
|
|
||||||
|
|
||||||
"p-try": ["p-try@2.2.0", "", {}, "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="],
|
"p-try": ["p-try@2.2.0", "", {}, "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="],
|
||||||
|
|
||||||
"pac-proxy-agent": ["pac-proxy-agent@7.2.0", "", { "dependencies": { "@tootallnate/quickjs-emscripten": "^0.23.0", "agent-base": "^7.1.2", "debug": "^4.3.4", "get-uri": "^6.0.1", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.6", "pac-resolver": "^7.0.1", "socks-proxy-agent": "^8.0.5" } }, "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA=="],
|
"pac-proxy-agent": ["pac-proxy-agent@7.2.0", "", { "dependencies": { "@tootallnate/quickjs-emscripten": "^0.23.0", "agent-base": "^7.1.2", "debug": "^4.3.4", "get-uri": "^6.0.1", "http-proxy-agent": "^7.0.0", "https-proxy-agent": "^7.0.6", "pac-resolver": "^7.0.1", "socks-proxy-agent": "^8.0.5" } }, "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA=="],
|
||||||
@@ -812,15 +801,15 @@
|
|||||||
|
|
||||||
"proxy-agent": ["proxy-agent@6.5.0", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.6", "lru-cache": "^7.14.1", "pac-proxy-agent": "^7.1.0", "proxy-from-env": "^1.1.0", "socks-proxy-agent": "^8.0.5" } }, "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A=="],
|
"proxy-agent": ["proxy-agent@6.5.0", "", { "dependencies": { "agent-base": "^7.1.2", "debug": "^4.3.4", "http-proxy-agent": "^7.0.1", "https-proxy-agent": "^7.0.6", "lru-cache": "^7.14.1", "pac-proxy-agent": "^7.1.0", "proxy-from-env": "^1.1.0", "socks-proxy-agent": "^8.0.5" } }, "sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A=="],
|
||||||
|
|
||||||
"proxy-from-env": ["proxy-from-env@2.1.0", "", {}, "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA=="],
|
"proxy-from-env": ["proxy-from-env@1.1.0", "", {}, "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="],
|
||||||
|
|
||||||
"pump": ["pump@3.0.3", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA=="],
|
"pump": ["pump@3.0.3", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA=="],
|
||||||
|
|
||||||
"punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="],
|
"punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="],
|
||||||
|
|
||||||
"puppeteer": ["puppeteer@24.42.0", "", { "dependencies": { "@puppeteer/browsers": "2.13.0", "chromium-bidi": "14.0.0", "cosmiconfig": "^9.0.0", "devtools-protocol": "0.0.1595872", "puppeteer-core": "24.42.0", "typed-query-selector": "^2.12.1" }, "bin": { "puppeteer": "lib/cjs/puppeteer/node/cli.js" } }, "sha512-94MoPfFp2eY3eYIMdINkez4IOP5TMHntlZbVx06fHlQTtiQiYgaY0L2Zzfod8PVUkPqP7m3Qlre2v8YS8cudPA=="],
|
"puppeteer": ["puppeteer@24.36.1", "", { "dependencies": { "@puppeteer/browsers": "2.11.2", "chromium-bidi": "13.0.1", "cosmiconfig": "^9.0.0", "devtools-protocol": "0.0.1551306", "puppeteer-core": "24.36.1", "typed-query-selector": "^2.12.0" }, "bin": { "puppeteer": "lib/cjs/puppeteer/node/cli.js" } }, "sha512-uPiDUyf7gd7Il1KnqfNUtHqntL0w1LapEw5Zsuh8oCK8GsqdxySX1PzdIHKB2Dw273gWY4MW0zC5gy3Re9XlqQ=="],
|
||||||
|
|
||||||
"puppeteer-core": ["puppeteer-core@24.42.0", "", { "dependencies": { "@puppeteer/browsers": "2.13.0", "chromium-bidi": "14.0.0", "debug": "^4.4.3", "devtools-protocol": "0.0.1595872", "typed-query-selector": "^2.12.1", "webdriver-bidi-protocol": "0.4.1", "ws": "^8.19.0" } }, "sha512-T4zXokk/izH01fYPhyyev1A4piWiOKrYq7CUFpdoYQxmOnXoV6YjUabmfIjCYkNspSoAXIxRid3Tw+Vg0fthYg=="],
|
"puppeteer-core": ["puppeteer-core@24.36.1", "", { "dependencies": { "@puppeteer/browsers": "2.11.2", "chromium-bidi": "13.0.1", "debug": "^4.4.3", "devtools-protocol": "0.0.1551306", "typed-query-selector": "^2.12.0", "webdriver-bidi-protocol": "0.4.0", "ws": "^8.19.0" } }, "sha512-L7ykMWc3lQf3HS7ME3PSjp7wMIjJeW6+bKfH/RSTz5l6VUDGubnrC2BKj3UvM28Y5PMDFW0xniJOZHBZPpW1dQ=="],
|
||||||
|
|
||||||
"puppeteer-extra": ["puppeteer-extra@3.3.6", "", { "dependencies": { "@types/debug": "^4.1.0", "debug": "^4.1.1", "deepmerge": "^4.2.2" }, "peerDependencies": { "@types/puppeteer": "*", "puppeteer": "*", "puppeteer-core": "*" }, "optionalPeers": ["@types/puppeteer", "puppeteer", "puppeteer-core"] }, "sha512-rsLBE/6mMxAjlLd06LuGacrukP2bqbzKCLzV1vrhHFavqQE/taQ2UXv3H5P0Ls7nsrASa+6x3bDbXHpqMwq+7A=="],
|
"puppeteer-extra": ["puppeteer-extra@3.3.6", "", { "dependencies": { "@types/debug": "^4.1.0", "debug": "^4.1.1", "deepmerge": "^4.2.2" }, "peerDependencies": { "@types/puppeteer": "*", "puppeteer": "*", "puppeteer-core": "*" }, "optionalPeers": ["@types/puppeteer", "puppeteer", "puppeteer-core"] }, "sha512-rsLBE/6mMxAjlLd06LuGacrukP2bqbzKCLzV1vrhHFavqQE/taQ2UXv3H5P0Ls7nsrASa+6x3bDbXHpqMwq+7A=="],
|
||||||
|
|
||||||
@@ -844,8 +833,6 @@
|
|||||||
|
|
||||||
"resolve-pkg-maps": ["resolve-pkg-maps@1.0.0", "", {}, "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw=="],
|
"resolve-pkg-maps": ["resolve-pkg-maps@1.0.0", "", {}, "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw=="],
|
||||||
|
|
||||||
"retry": ["retry@0.13.1", "", {}, "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg=="],
|
|
||||||
|
|
||||||
"rfdc": ["rfdc@1.4.1", "", {}, "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA=="],
|
"rfdc": ["rfdc@1.4.1", "", {}, "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA=="],
|
||||||
|
|
||||||
"rimraf": ["rimraf@5.0.10", "", { "dependencies": { "glob": "^10.3.7" }, "bin": { "rimraf": "dist/esm/bin.mjs" } }, "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ=="],
|
"rimraf": ["rimraf@5.0.10", "", { "dependencies": { "glob": "^10.3.7" }, "bin": { "rimraf": "dist/esm/bin.mjs" } }, "sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ=="],
|
||||||
@@ -896,7 +883,7 @@
|
|||||||
|
|
||||||
"supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],
|
"supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],
|
||||||
|
|
||||||
"systeminformation": ["systeminformation@5.31.5", "", { "os": "!aix", "bin": { "systeminformation": "lib/cli.js" } }, "sha512-5SyLdip4/3alxD4Kh+63bUQTJmu7YMfYQTC+koZy7X73HgNqZSD2P4wOZQWtUncvPvcEmnfIjCoygN4MRoEejQ=="],
|
"systeminformation": ["systeminformation@5.30.7", "", { "os": "!aix", "bin": { "systeminformation": "lib/cli.js" } }, "sha512-33B/cftpaWdpvH+Ho9U1b08ss8GQuLxrWHelbJT1yw4M48Taj8W3ezcPuaLoIHZz5V6tVHuQPr5BprEfnBLBMw=="],
|
||||||
|
|
||||||
"tar-fs": ["tar-fs@3.1.1", "", { "dependencies": { "pump": "^3.0.0", "tar-stream": "^3.1.5" }, "optionalDependencies": { "bare-fs": "^4.0.1", "bare-path": "^3.0.0" } }, "sha512-LZA0oaPOc2fVo82Txf3gw+AkEd38szODlptMYejQUhndHMLQ9M059uXR+AfS7DNo0NpINvSqDsvyaCrBVkptWg=="],
|
"tar-fs": ["tar-fs@3.1.1", "", { "dependencies": { "pump": "^3.0.0", "tar-stream": "^3.1.5" }, "optionalDependencies": { "bare-fs": "^4.0.1", "bare-path": "^3.0.0" } }, "sha512-LZA0oaPOc2fVo82Txf3gw+AkEd38szODlptMYejQUhndHMLQ9M059uXR+AfS7DNo0NpINvSqDsvyaCrBVkptWg=="],
|
||||||
|
|
||||||
@@ -910,7 +897,9 @@
|
|||||||
|
|
||||||
"tinyglobby": ["tinyglobby@0.2.15", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.3" } }, "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ=="],
|
"tinyglobby": ["tinyglobby@0.2.15", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.3" } }, "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ=="],
|
||||||
|
|
||||||
"ts-api-utils": ["ts-api-utils@2.5.0", "", { "peerDependencies": { "typescript": ">=4.8.4" } }, "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA=="],
|
"tr46": ["tr46@0.0.3", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="],
|
||||||
|
|
||||||
|
"ts-api-utils": ["ts-api-utils@2.4.0", "", { "peerDependencies": { "typescript": ">=4.8.4" } }, "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA=="],
|
||||||
|
|
||||||
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||||
|
|
||||||
@@ -922,13 +911,13 @@
|
|||||||
|
|
||||||
"type-check": ["type-check@0.4.0", "", { "dependencies": { "prelude-ls": "^1.2.1" } }, "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="],
|
"type-check": ["type-check@0.4.0", "", { "dependencies": { "prelude-ls": "^1.2.1" } }, "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="],
|
||||||
|
|
||||||
"typed-query-selector": ["typed-query-selector@2.12.1", "", {}, "sha512-uzR+FzI8qrUEIu96oaeBJmd9E7CFEiQ3goA5qCVgc4s5llSubcfGHq9yUstZx/k4s9dXHVKsE35YWoFyvEqEHA=="],
|
"typed-query-selector": ["typed-query-selector@2.12.0", "", {}, "sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg=="],
|
||||||
|
|
||||||
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
"typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
|
||||||
|
|
||||||
"typescript-telegram-bot-api": ["typescript-telegram-bot-api@0.11.0", "", { "dependencies": { "axios": "^1.7.7", "form-data": "^4.0.1" } }, "sha512-pWSv0fglpnETAGtptNaqHjqreUTunRstfxeI9opdhq7P8T8T/tbBH8nLzP7WVAoFW55F4I6biKa9NOx1bs5O3Q=="],
|
"typescript-telegram-bot-api": ["typescript-telegram-bot-api@0.11.0", "", { "dependencies": { "axios": "^1.7.7", "form-data": "^4.0.1" } }, "sha512-pWSv0fglpnETAGtptNaqHjqreUTunRstfxeI9opdhq7P8T8T/tbBH8nLzP7WVAoFW55F4I6biKa9NOx1bs5O3Q=="],
|
||||||
|
|
||||||
"undici-types": ["undici-types@7.19.2", "", {}, "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg=="],
|
"undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
|
||||||
|
|
||||||
"universalify": ["universalify@0.1.2", "", {}, "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="],
|
"universalify": ["universalify@0.1.2", "", {}, "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="],
|
||||||
|
|
||||||
@@ -938,11 +927,15 @@
|
|||||||
|
|
||||||
"web-streams-polyfill": ["web-streams-polyfill@3.3.3", "", {}, "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw=="],
|
"web-streams-polyfill": ["web-streams-polyfill@3.3.3", "", {}, "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw=="],
|
||||||
|
|
||||||
"webdriver-bidi-protocol": ["webdriver-bidi-protocol@0.4.1", "", {}, "sha512-ARrjNjtWRRs2w4Tk7nqrf2gBI0QXWuOmMCx2hU+1jUt6d00MjMxURrhxhGbrsoiZKJrhTSTzbIrc554iKI10qw=="],
|
"webdriver-bidi-protocol": ["webdriver-bidi-protocol@0.4.0", "", {}, "sha512-U9VIlNRrq94d1xxR9JrCEAx5Gv/2W7ERSv8oWRoNe/QYbfccS0V3h/H6qeNeCRJxXGMhhnkqvwNrvPAYeuP9VA=="],
|
||||||
|
|
||||||
|
"webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="],
|
||||||
|
|
||||||
"whatwg-fetch": ["whatwg-fetch@3.6.20", "", {}, "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg=="],
|
"whatwg-fetch": ["whatwg-fetch@3.6.20", "", {}, "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg=="],
|
||||||
|
|
||||||
"which": ["which@1.3.1", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "which": "./bin/which" } }, "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ=="],
|
"whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="],
|
||||||
|
|
||||||
|
"which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
|
||||||
|
|
||||||
"which-module": ["which-module@2.0.1", "", {}, "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ=="],
|
"which-module": ["which-module@2.0.1", "", {}, "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ=="],
|
||||||
|
|
||||||
@@ -970,7 +963,7 @@
|
|||||||
|
|
||||||
"youtubei.js": ["youtubei.js@16.0.1", "", { "dependencies": { "@bufbuild/protobuf": "^2.0.0", "meriyah": "^6.1.4" } }, "sha512-3802bCAGkBc2/G5WUTc0l/bO5mPYJbQAHL04d9hE9PnrDHoBUT8MN721Yqt4RCNncAXdHcfee9VdJy3Fhq1r5g=="],
|
"youtubei.js": ["youtubei.js@16.0.1", "", { "dependencies": { "@bufbuild/protobuf": "^2.0.0", "meriyah": "^6.1.4" } }, "sha512-3802bCAGkBc2/G5WUTc0l/bO5mPYJbQAHL04d9hE9PnrDHoBUT8MN721Yqt4RCNncAXdHcfee9VdJy3Fhq1r5g=="],
|
||||||
|
|
||||||
"zod": ["zod@4.3.6", "", {}, "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg=="],
|
"zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="],
|
||||||
|
|
||||||
"zod-to-json-schema": ["zod-to-json-schema@3.25.1", "", { "peerDependencies": { "zod": "^3.25 || ^4" } }, "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA=="],
|
"zod-to-json-schema": ["zod-to-json-schema@3.25.1", "", { "peerDependencies": { "zod": "^3.25 || ^4" } }, "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA=="],
|
||||||
|
|
||||||
@@ -986,12 +979,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=="],
|
"@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=="],
|
||||||
|
|
||||||
"@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=="],
|
"@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=="],
|
||||||
|
|
||||||
"@types/fluent-ffmpeg/@types/node": ["@types/node@25.2.3", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-m0jEgYlYz+mDJZ2+F4v8D1AyQb+QzsNqRuI7xg1VQX/KlKS0qT9r1Mo16yo5F/MtifXFgaofIFsdFMox2SxIbQ=="],
|
|
||||||
|
|
||||||
"@types/mssql/@types/node": ["@types/node@25.0.3", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-W609buLVRVmeW693xKfzHeIV6nJGGz98uCPfeXI1ELMLXVeKYZ9m15fAMSaUPBHYLGFsVRcMmSCksQOrZV9BYA=="],
|
"@types/mssql/@types/node": ["@types/node@25.0.3", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-W609buLVRVmeW693xKfzHeIV6nJGGz98uCPfeXI1ELMLXVeKYZ9m15fAMSaUPBHYLGFsVRcMmSCksQOrZV9BYA=="],
|
||||||
|
|
||||||
"@types/qrcode/@types/node": ["@types/node@25.0.3", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-W609buLVRVmeW693xKfzHeIV6nJGGz98uCPfeXI1ELMLXVeKYZ9m15fAMSaUPBHYLGFsVRcMmSCksQOrZV9BYA=="],
|
"@types/qrcode/@types/node": ["@types/node@25.0.3", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-W609buLVRVmeW693xKfzHeIV6nJGGz98uCPfeXI1ELMLXVeKYZ9m15fAMSaUPBHYLGFsVRcMmSCksQOrZV9BYA=="],
|
||||||
@@ -1002,15 +991,13 @@
|
|||||||
|
|
||||||
"@types/yauzl/@types/node": ["@types/node@25.1.0", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-t7frlewr6+cbx+9Ohpl0NOTKXZNV9xHRmNOvql47BFJKcEG1CxtxlPEEe+gR9uhVWM4DwhnvTF110mIL4yP9RA=="],
|
"@types/yauzl/@types/node": ["@types/node@25.1.0", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-t7frlewr6+cbx+9Ohpl0NOTKXZNV9xHRmNOvql47BFJKcEG1CxtxlPEEe+gR9uhVWM4DwhnvTF110mIL4yP9RA=="],
|
||||||
|
|
||||||
"@typescript-eslint/typescript-estree/minimatch": ["minimatch@10.2.3", "", { "dependencies": { "brace-expansion": "^5.0.2" } }, "sha512-Rwi3pnapEqirPSbWbrZaa6N3nmqq4Xer/2XooiOKyV3q12ML06f7MOuc5DVH8ONZIFhwIYQ3yzPH4nt7iWHaTg=="],
|
"@typescript-eslint/typescript-estree/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
|
||||||
|
|
||||||
"@typescript-eslint/typescript-estree/semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="],
|
"@typescript-eslint/utils/@eslint-community/eslint-utils": ["@eslint-community/eslint-utils@4.9.1", "", { "dependencies": { "eslint-visitor-keys": "^3.4.3" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ=="],
|
||||||
|
|
||||||
"@typescript-eslint/visitor-keys/eslint-visitor-keys": ["eslint-visitor-keys@5.0.1", "", {}, "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA=="],
|
"bun-types/@types/node": ["@types/node@25.1.0", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-t7frlewr6+cbx+9Ohpl0NOTKXZNV9xHRmNOvql47BFJKcEG1CxtxlPEEe+gR9uhVWM4DwhnvTF110mIL4yP9RA=="],
|
||||||
|
|
||||||
"chromium-bidi/zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="],
|
"cross-fetch/node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="],
|
||||||
|
|
||||||
"cross-spawn/which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
|
|
||||||
|
|
||||||
"eslint/ignore": ["ignore@5.3.2", "", {}, "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g=="],
|
"eslint/ignore": ["ignore@5.3.2", "", {}, "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g=="],
|
||||||
|
|
||||||
@@ -1028,8 +1015,6 @@
|
|||||||
|
|
||||||
"protobufjs/@types/node": ["@types/node@25.0.10", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg=="],
|
"protobufjs/@types/node": ["@types/node@25.0.10", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-zWW5KPngR/yvakJgGOmZ5vTBemDoSqF3AcV/LrO5u5wTWyEAVVh+IT39G4gtyAkh3CtTZs8aX/yRM82OfzHJRg=="],
|
||||||
|
|
||||||
"proxy-agent/proxy-from-env": ["proxy-from-env@1.1.0", "", {}, "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="],
|
|
||||||
|
|
||||||
"puppeteer-extra-plugin-user-data-dir/fs-extra": ["fs-extra@10.1.0", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ=="],
|
"puppeteer-extra-plugin-user-data-dir/fs-extra": ["fs-extra@10.1.0", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" } }, "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ=="],
|
||||||
|
|
||||||
"puppeteer-extra-plugin-user-data-dir/rimraf": ["rimraf@3.0.2", "", { "dependencies": { "glob": "^7.1.3" }, "bin": { "rimraf": "bin.js" } }, "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA=="],
|
"puppeteer-extra-plugin-user-data-dir/rimraf": ["rimraf@3.0.2", "", { "dependencies": { "glob": "^7.1.3" }, "bin": { "rimraf": "bin.js" } }, "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA=="],
|
||||||
@@ -1062,32 +1047,18 @@
|
|||||||
|
|
||||||
"@puppeteer/browsers/yargs/yargs-parser": ["yargs-parser@21.1.1", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="],
|
"@puppeteer/browsers/yargs/yargs-parser": ["yargs-parser@21.1.1", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="],
|
||||||
|
|
||||||
"@types/fluent-ffmpeg/@types/node/undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
|
"@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@2.0.2", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="],
|
||||||
|
|
||||||
"@types/mssql/@types/node/undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
|
"@typescript-eslint/utils/@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="],
|
||||||
|
|
||||||
"@types/qrcode/@types/node/undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
|
|
||||||
|
|
||||||
"@types/readable-stream/@types/node/undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
|
|
||||||
|
|
||||||
"@types/ws/@types/node/undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
|
|
||||||
|
|
||||||
"@types/yauzl/@types/node/undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
|
|
||||||
|
|
||||||
"@typescript-eslint/typescript-estree/minimatch/brace-expansion": ["brace-expansion@5.0.3", "", { "dependencies": { "balanced-match": "^4.0.2" } }, "sha512-fy6KJm2RawA5RcHkLa1z/ScpBeA762UF9KmZQxwIbDtRJrgLzM10depAiEQ+CXYcoiqW1/m96OAAoke2nE9EeA=="],
|
|
||||||
|
|
||||||
"glob/minimatch/brace-expansion": ["brace-expansion@2.0.2", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="],
|
"glob/minimatch/brace-expansion": ["brace-expansion@2.0.2", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="],
|
||||||
|
|
||||||
"protobufjs/@types/node/undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
|
|
||||||
|
|
||||||
"puppeteer-extra-plugin-user-data-dir/fs-extra/jsonfile": ["jsonfile@6.2.0", "", { "dependencies": { "universalify": "^2.0.0" }, "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg=="],
|
"puppeteer-extra-plugin-user-data-dir/fs-extra/jsonfile": ["jsonfile@6.2.0", "", { "dependencies": { "universalify": "^2.0.0" }, "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg=="],
|
||||||
|
|
||||||
"puppeteer-extra-plugin-user-data-dir/fs-extra/universalify": ["universalify@2.0.1", "", {}, "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw=="],
|
"puppeteer-extra-plugin-user-data-dir/fs-extra/universalify": ["universalify@2.0.1", "", {}, "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw=="],
|
||||||
|
|
||||||
"puppeteer-extra-plugin-user-data-dir/rimraf/glob": ["glob@7.2.3", "", { "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" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
|
"puppeteer-extra-plugin-user-data-dir/rimraf/glob": ["glob@7.2.3", "", { "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" } }, "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q=="],
|
||||||
|
|
||||||
"tedious/@types/node/undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="],
|
|
||||||
|
|
||||||
"tsx/esbuild/@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.27.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw=="],
|
"tsx/esbuild/@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.27.2", "", { "os": "aix", "cpu": "ppc64" }, "sha512-GZMB+a0mOMZs4MpDbj8RJp4cw+w1WV5NYD6xzgvzUJ5Ek2jerwfO2eADyI6ExDSUED+1X8aMbegahsJi+8mgpw=="],
|
||||||
|
|
||||||
"tsx/esbuild/@esbuild/android-arm": ["@esbuild/android-arm@0.27.2", "", { "os": "android", "cpu": "arm" }, "sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA=="],
|
"tsx/esbuild/@esbuild/android-arm": ["@esbuild/android-arm@0.27.2", "", { "os": "android", "cpu": "arm" }, "sha512-DVNI8jlPa7Ujbr1yjU2PfUSRtAUZPG9I1RwW4F4xFB1Imiu2on0ADiI/c3td+KmDtVKNbi+nffGDQMfcIMkwIA=="],
|
||||||
@@ -1140,16 +1111,10 @@
|
|||||||
|
|
||||||
"tsx/esbuild/@esbuild/win32-x64": ["@esbuild/win32-x64@0.27.2", "", { "os": "win32", "cpu": "x64" }, "sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ=="],
|
"tsx/esbuild/@esbuild/win32-x64": ["@esbuild/win32-x64@0.27.2", "", { "os": "win32", "cpu": "x64" }, "sha512-sRdU18mcKf7F+YgheI/zGf5alZatMUTKj/jNS6l744f9u3WFu4v7twcUI9vu4mknF4Y9aDlblIie0IM+5xxaqQ=="],
|
||||||
|
|
||||||
"typescript-telegram-bot-api/axios/proxy-from-env": ["proxy-from-env@1.1.0", "", {}, "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="],
|
|
||||||
|
|
||||||
"yargs/find-up/locate-path": ["locate-path@5.0.0", "", { "dependencies": { "p-locate": "^4.1.0" } }, "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g=="],
|
"yargs/find-up/locate-path": ["locate-path@5.0.0", "", { "dependencies": { "p-locate": "^4.1.0" } }, "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g=="],
|
||||||
|
|
||||||
"@puppeteer/browsers/yargs/cliui/wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="],
|
"@puppeteer/browsers/yargs/cliui/wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="],
|
||||||
|
|
||||||
"@typescript-eslint/typescript-estree/minimatch/brace-expansion/balanced-match": ["balanced-match@4.0.4", "", {}, "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA=="],
|
|
||||||
|
|
||||||
"puppeteer-extra-plugin-user-data-dir/rimraf/glob/minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="],
|
|
||||||
|
|
||||||
"yargs/find-up/locate-path/p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="],
|
"yargs/find-up/locate-path/p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="],
|
||||||
|
|
||||||
"yargs/find-up/locate-path/p-locate/p-limit": ["p-limit@2.3.0", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="],
|
"yargs/find-up/locate-path/p-locate/p-limit": ["p-limit@2.3.0", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="],
|
||||||
|
|||||||
Generated
+1236
-474
File diff suppressed because it is too large
Load Diff
+17
-20
@@ -8,37 +8,34 @@
|
|||||||
"bun:start": "bun run dist/index.js"
|
"bun:start": "bun run dist/index.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@google/genai": "^1.50.1",
|
"@google/genai": "^1.39.0",
|
||||||
"@libsql/client": "^0.17.3",
|
"@libsql/client": "^0.17.0",
|
||||||
"@mistralai/mistralai": "^1.15.1",
|
"@mistralai/mistralai": "^1.13.0",
|
||||||
"@napi-rs/canvas": "^0.1.100",
|
"@napi-rs/canvas": "^0.1.89",
|
||||||
"axios": "^1.15.2",
|
"axios": "^1.13.4",
|
||||||
"dotenv": "^17.4.2",
|
"dotenv": "^17.2.3",
|
||||||
"drizzle-orm": "1.0.0-rc.3",
|
"drizzle-orm": "^1.0.0-beta.13-5204f18",
|
||||||
"emoji-regex": "^10.6.0",
|
"emoji-regex": "^10.6.0",
|
||||||
"fluent-ffmpeg": "^2.1.3",
|
|
||||||
"ollama": "^0.6.3",
|
"ollama": "^0.6.3",
|
||||||
"openai": "^6.35.0",
|
"openai": "^6.17.0",
|
||||||
"puppeteer": "^24.42.0",
|
"puppeteer": "^24.36.1",
|
||||||
"puppeteer-extra": "^3.3.6",
|
"puppeteer-extra": "^3.3.6",
|
||||||
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
||||||
"qrcode": "^1.5.4",
|
"qrcode": "^1.5.4",
|
||||||
"sharp": "^0.34.5",
|
"sharp": "^0.34.5",
|
||||||
"systeminformation": "^5.31.5",
|
"systeminformation": "^5.30.7",
|
||||||
"twemoji": "^14.0.2",
|
"twemoji": "^14.0.2",
|
||||||
"typescript-telegram-bot-api": "^0.11.0",
|
"typescript-telegram-bot-api": "^0.11.0",
|
||||||
"youtubei.js": "^16.0.1",
|
"youtubei.js": "^16.0.1"
|
||||||
"zod": "^4.3.6"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/bun": "^1.3.13",
|
"@types/bun": "^1.3.8",
|
||||||
"@types/node": "^25.6.0",
|
"@types/node": "^25.2.0",
|
||||||
"@types/qrcode": "^1.5.6",
|
"@types/qrcode": "^1.5.6",
|
||||||
"@types/fluent-ffmpeg": "^2.1.28",
|
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.59.1",
|
"@typescript-eslint/parser": "^8.54.0",
|
||||||
"@typescript-eslint/parser": "^8.59.1",
|
"drizzle-kit": "^1.0.0-beta.15-859cf75",
|
||||||
"drizzle-kit": "^1.0.0-beta.9-e89174b",
|
"eslint": "^9.39.2",
|
||||||
"eslint": "^9.39.4",
|
|
||||||
"tsx": "^4.21.0",
|
"tsx": "^4.21.0",
|
||||||
"typescript": "^5.9.3"
|
"typescript": "^5.9.3"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,8 +38,4 @@ export class Requirements {
|
|||||||
isRequiresSameUser(): boolean {
|
isRequiresSameUser(): boolean {
|
||||||
return this.requirements.includes(Requirement.SAME_USER);
|
return this.requirements.includes(Requirement.SAME_USER);
|
||||||
}
|
}
|
||||||
|
|
||||||
isPublic(): boolean {
|
|
||||||
return !this.isRequiresBotCreator();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -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<void> {
|
|
||||||
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});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
import {CallbackCommand} from "../base/callback-command";
|
|
||||||
|
|
||||||
export class TryAgain extends CallbackCommand {
|
|
||||||
data = "";
|
|
||||||
text = "🔁 Повторить";
|
|
||||||
|
|
||||||
constructor(text?: string, data?: string) {
|
|
||||||
super();
|
|
||||||
|
|
||||||
this.text = text ?? this.text;
|
|
||||||
this.data = data ?? this.data;
|
|
||||||
}
|
|
||||||
|
|
||||||
static withData(data?: string): TryAgain {
|
|
||||||
return new TryAgain(null, data);
|
|
||||||
}
|
|
||||||
|
|
||||||
async execute(): Promise<void> {
|
|
||||||
return Promise.resolve();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -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<void> {
|
|
||||||
const videoId = query.data.split(" ")[1];
|
|
||||||
if (!videoId) return;
|
|
||||||
|
|
||||||
await processYouTubeLink(query.message, null, videoId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,55 +0,0 @@
|
|||||||
import {Command} from "../base/command";
|
|
||||||
import {Message} from "typescript-telegram-bot-api";
|
|
||||||
import {Requirements} from "../base/requirements";
|
|
||||||
import {Requirement} from "../base/requirement";
|
|
||||||
import {Environment} from "../common/environment";
|
|
||||||
import {fullName, logError, replyToMessage, sendErrorPlaceholder} from "../util/utils";
|
|
||||||
import {StoredUser} from "../model/stored-user";
|
|
||||||
import {UserStore} from "../common/user-store";
|
|
||||||
|
|
||||||
export class AdminsList extends Command {
|
|
||||||
|
|
||||||
command = ["adminslist", "admins"];
|
|
||||||
argsMode = "none" as const;
|
|
||||||
|
|
||||||
requirements = Requirements.Build(Requirement.BOT_ADMIN);
|
|
||||||
|
|
||||||
async execute(msg: Message): Promise<void> {
|
|
||||||
try {
|
|
||||||
const adminIds: number[] = [...Environment.ADMIN_IDS];
|
|
||||||
const users: (StoredUser | null)[] = [];
|
|
||||||
|
|
||||||
for (let i = 0; i < adminIds.length; i++) {
|
|
||||||
const id = adminIds[i];
|
|
||||||
const user = await UserStore.get(id);
|
|
||||||
if (user) {
|
|
||||||
users.push(user);
|
|
||||||
} else {
|
|
||||||
users.push(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let text = "*Администраторы*:\n\n";
|
|
||||||
users.forEach(user => {
|
|
||||||
text += "\\* ";
|
|
||||||
|
|
||||||
if (user) {
|
|
||||||
text += `[${fullName(user)}](tg://user?id=${user.id})`;
|
|
||||||
} else {
|
|
||||||
text += "Нет информации о пользователе";
|
|
||||||
}
|
|
||||||
|
|
||||||
text += "\n";
|
|
||||||
});
|
|
||||||
|
|
||||||
await replyToMessage({
|
|
||||||
message: msg,
|
|
||||||
text: text,
|
|
||||||
parse_mode: "MarkdownV2"
|
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
logError(e);
|
|
||||||
await sendErrorPlaceholder(msg).catch(logError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
import {Command} from "../base/command";
|
|
||||||
import {FileOptions, Message} from "typescript-telegram-bot-api";
|
|
||||||
import {Requirements} from "../base/requirements";
|
|
||||||
import {Requirement} from "../base/requirement";
|
|
||||||
import {Environment} from "../common/environment";
|
|
||||||
import fs from "node:fs";
|
|
||||||
import {logError, replyToMessage, sendErrorPlaceholder} from "../util/utils";
|
|
||||||
import {bot} from "../index";
|
|
||||||
|
|
||||||
export class ExportDb extends Command {
|
|
||||||
|
|
||||||
command = ["exportdb"];
|
|
||||||
|
|
||||||
argsMode = "none" as const;
|
|
||||||
|
|
||||||
requirements = Requirements.Build(Requirement.BOT_CREATOR);
|
|
||||||
|
|
||||||
async execute(msg: Message): Promise<void> {
|
|
||||||
const fullPath = Environment.DB_PATH.substring(5);
|
|
||||||
if (!fs.existsSync(fullPath)) {
|
|
||||||
await sendErrorPlaceholder(msg);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
const buffer = fs.readFileSync(fullPath);
|
|
||||||
|
|
||||||
await bot.sendDocument({
|
|
||||||
chat_id: Environment.CREATOR_ID,
|
|
||||||
document: new FileOptions(buffer, {filename: "database.db", contentType: "application/sql"}),
|
|
||||||
caption: "Бэкап базы данных",
|
|
||||||
});
|
|
||||||
|
|
||||||
if (msg.chat.id !== Environment.CREATOR_ID) {
|
|
||||||
await replyToMessage({message: msg, text: "Успешно отправлено в ЛС создателю!"});
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
logError(e);
|
|
||||||
await sendErrorPlaceholder(msg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
collectReplyChainText,
|
collectReplyChainText,
|
||||||
escapeMarkdownV2Text,
|
escapeMarkdownV2Text,
|
||||||
logError,
|
logError,
|
||||||
oldReplyToMessage, replyToMessage,
|
oldReplyToMessage,
|
||||||
startIntervalEditor
|
startIntervalEditor
|
||||||
} from "../util/utils";
|
} from "../util/utils";
|
||||||
import {ChatCommand} from "../base/chat-command";
|
import {ChatCommand} from "../base/chat-command";
|
||||||
@@ -44,10 +44,7 @@ export class GeminiChat extends ChatCommand {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
chatMessages.reverse();
|
chatMessages.reverse();
|
||||||
|
|
||||||
if (Environment.SYSTEM_PROMPT) {
|
|
||||||
chatMessages.unshift({role: "system", content: Environment.SYSTEM_PROMPT});
|
chatMessages.unshift({role: "system", content: Environment.SYSTEM_PROMPT});
|
||||||
}
|
|
||||||
|
|
||||||
let chatContent = "";
|
let chatContent = "";
|
||||||
for (const part of chatMessages) {
|
for (const part of chatMessages) {
|
||||||
@@ -64,10 +61,10 @@ export class GeminiChat extends ChatCommand {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
// TODO: 12/02/2026, Danil Nikolaev: support for multiple images
|
if (messageParts[0].images?.length) {
|
||||||
if (messageParts.some(p => p.images?.length)) {
|
const images = messageParts[0].images;
|
||||||
const firstImages = messageParts.find(p => p.images?.length)?.images ?? [];
|
|
||||||
firstImages.forEach(image => {
|
images.forEach(image => {
|
||||||
input.push({
|
input.push({
|
||||||
type: "image",
|
type: "image",
|
||||||
data: image,
|
data: image,
|
||||||
@@ -83,7 +80,7 @@ export class GeminiChat extends ChatCommand {
|
|||||||
try {
|
try {
|
||||||
waitMessage = await bot.sendMessage({
|
waitMessage = await bot.sendMessage({
|
||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
text: Environment.waitThinkText,
|
text: Environment.waitText,
|
||||||
reply_parameters: {
|
reply_parameters: {
|
||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
message_id: msg.message_id
|
message_id: msg.message_id
|
||||||
@@ -108,7 +105,7 @@ export class GeminiChat extends ChatCommand {
|
|||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
message_id: waitMessage.message_id,
|
message_id: waitMessage.message_id,
|
||||||
text: escapeMarkdownV2Text(text),
|
text: escapeMarkdownV2Text(text),
|
||||||
parse_mode: "MarkdownV2"
|
parse_mode: "Markdown"
|
||||||
}
|
}
|
||||||
).catch(logError);
|
).catch(logError);
|
||||||
|
|
||||||
@@ -167,10 +164,7 @@ export class GeminiChat extends ChatCommand {
|
|||||||
waitMessage.reply_to_message = msg;
|
waitMessage.reply_to_message = msg;
|
||||||
waitMessage.text = currentText;
|
waitMessage.text = currentText;
|
||||||
await MessageStore.put(waitMessage);
|
await MessageStore.put(waitMessage);
|
||||||
|
await oldReplyToMessage(waitMessage, `⏱️ ${diff}s`);
|
||||||
if (Environment.SEND_TIME_TOOK) {
|
|
||||||
await replyToMessage({message: waitMessage, text: `⏱️ ${diff}s`});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logError(error);
|
logError(error);
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export class GeminiGenerateImage extends Command {
|
|||||||
await replyToMessage({
|
await replyToMessage({
|
||||||
message: waitMessage,
|
message: waitMessage,
|
||||||
text: `Произошла ошибка!\n${e.toString()}`,
|
text: `Произошла ошибка!\n${e.toString()}`,
|
||||||
link_preview_options: {is_disabled: true}
|
disableLinkPreview: true
|
||||||
}).catch(logError);
|
}).catch(logError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ import {Command} from "../base/command";
|
|||||||
import {Message} from "typescript-telegram-bot-api";
|
import {Message} from "typescript-telegram-bot-api";
|
||||||
import {logError, replyToMessage} from "../util/utils";
|
import {logError, replyToMessage} from "../util/utils";
|
||||||
import {Environment} from "../common/environment";
|
import {Environment} from "../common/environment";
|
||||||
import {googleAi} from "../index";
|
|
||||||
import {AiModelCapabilities} from "../model/ai-model-capabilities";
|
|
||||||
|
|
||||||
export class GeminiGetModel extends Command {
|
export class GeminiGetModel extends Command {
|
||||||
title = "/geminiGetModel";
|
title = "/geminiGetModel";
|
||||||
@@ -12,21 +10,4 @@ export class GeminiGetModel extends Command {
|
|||||||
async execute(msg: Message): Promise<void> {
|
async execute(msg: Message): Promise<void> {
|
||||||
await replyToMessage({message: msg, text: `Текущая модель: "${Environment.GEMINI_MODEL}"`}).catch(logError);
|
await replyToMessage({message: msg, text: `Текущая модель: "${Environment.GEMINI_MODEL}"`}).catch(logError);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getModelCapabilities(): Promise<AiModelCapabilities | null> {
|
|
||||||
try {
|
|
||||||
const info = await googleAi.models.get({model: Environment.GEMINI_MODEL});
|
|
||||||
console.log(info);
|
|
||||||
|
|
||||||
return {
|
|
||||||
vision: {supported: true},
|
|
||||||
ocr: null,
|
|
||||||
thinking: {supported: info.thinking},
|
|
||||||
tools: null
|
|
||||||
};
|
|
||||||
} catch (e) {
|
|
||||||
logError(e);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
import {ChatCommand} from "../base/chat-command";
|
|
||||||
import {Message} from "typescript-telegram-bot-api";
|
|
||||||
import {callbackCommands, commands} from "../index";
|
|
||||||
import {Environment} from "../common/environment";
|
|
||||||
import {boolToEmoji, getCurrentModel, getCurrentModelCapabilities, logError, replyToMessage} from "../util/utils";
|
|
||||||
import {AiModelCapabilities} from "../model/ai-model-capabilities";
|
|
||||||
import {AiProvider} from "../model/ai-provider";
|
|
||||||
import {Command} from "../base/command";
|
|
||||||
|
|
||||||
export class Info extends Command {
|
|
||||||
command = ["info", "v"];
|
|
||||||
|
|
||||||
title = "/info";
|
|
||||||
description = "Info about bot";
|
|
||||||
|
|
||||||
async execute(msg: Message): Promise<void> {
|
|
||||||
const aiProvider = Environment.DEFAULT_AI_PROVIDER;
|
|
||||||
const aiModel = getCurrentModel();
|
|
||||||
let aiModelCapabilities: AiModelCapabilities = {};
|
|
||||||
|
|
||||||
try {
|
|
||||||
aiModelCapabilities = await getCurrentModelCapabilities();
|
|
||||||
} catch (e) {
|
|
||||||
logError(e);
|
|
||||||
await replyToMessage({message: msg, text: `Произошла ошибка: ${e}`}).catch(logError);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const aiInfo = "```" +
|
|
||||||
"AI\n" +
|
|
||||||
`supported providers: ${Object.keys(AiProvider).filter(key => isNaN(Number(key))).length}\n\n` +
|
|
||||||
|
|
||||||
`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)}` +
|
|
||||||
"```";
|
|
||||||
|
|
||||||
const cmds = commands.filter(c => !(c instanceof ChatCommand));
|
|
||||||
const chatCmds = commands.filter(c => c instanceof ChatCommand);
|
|
||||||
const callbackCmds = callbackCommands;
|
|
||||||
|
|
||||||
const publicCmdsLength = cmds.filter(c => c.requirements?.isPublic()).length;
|
|
||||||
const privateCmdsLength = cmds.length - publicCmdsLength;
|
|
||||||
|
|
||||||
const chatCmdsLength = chatCmds.length;
|
|
||||||
|
|
||||||
const callbackCmdsLength = callbackCmds.length;
|
|
||||||
|
|
||||||
const text =
|
|
||||||
aiInfo + "\n\n" +
|
|
||||||
|
|
||||||
"```" +
|
|
||||||
"Commands\n" +
|
|
||||||
`Public: ${publicCmdsLength}\n` +
|
|
||||||
`Private: ${privateCmdsLength}\n` +
|
|
||||||
`Chat: ${chatCmdsLength}\n` +
|
|
||||||
`Callback: ${callbackCmdsLength}\n` +
|
|
||||||
"```"
|
|
||||||
;
|
|
||||||
|
|
||||||
await replyToMessage({message: msg, text: text, parse_mode: "Markdown"}).catch(logError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -6,14 +6,12 @@ import {
|
|||||||
escapeMarkdownV2Text,
|
escapeMarkdownV2Text,
|
||||||
logError,
|
logError,
|
||||||
oldReplyToMessage,
|
oldReplyToMessage,
|
||||||
replyToMessage,
|
|
||||||
startIntervalEditor
|
startIntervalEditor
|
||||||
} from "../util/utils";
|
} from "../util/utils";
|
||||||
import {Environment} from "../common/environment";
|
import {Environment} from "../common/environment";
|
||||||
import {bot, commands, mistralAi} from "../index";
|
import {bot, mistralAi} from "../index";
|
||||||
import {MessageStore} from "../common/message-store";
|
import {MessageStore} from "../common/message-store";
|
||||||
import {ChatCommand} from "../base/chat-command";
|
import {ChatCommand} from "../base/chat-command";
|
||||||
import {MistralGetModel} from "./mistral-get-model";
|
|
||||||
|
|
||||||
export class MistralChat extends ChatCommand {
|
export class MistralChat extends ChatCommand {
|
||||||
command = "mistral";
|
command = "mistral";
|
||||||
@@ -58,10 +56,7 @@ export class MistralChat extends ChatCommand {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
chatMessages.reverse();
|
chatMessages.reverse();
|
||||||
|
|
||||||
if (Environment.SYSTEM_PROMPT) {
|
|
||||||
chatMessages.unshift({role: "system", content: [{type: "text", text: Environment.SYSTEM_PROMPT}]});
|
chatMessages.unshift({role: "system", content: [{type: "text", text: Environment.SYSTEM_PROMPT}]});
|
||||||
}
|
|
||||||
|
|
||||||
let waitMessage: Message;
|
let waitMessage: Message;
|
||||||
|
|
||||||
@@ -72,28 +67,11 @@ export class MistralChat extends ChatCommand {
|
|||||||
return total + (curr.content.filter(c => c.type === "image_url")?.length ?? 0);
|
return total + (curr.content.filter(c => c.type === "image_url")?.length ?? 0);
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
if (imagesCount) {
|
|
||||||
try {
|
|
||||||
const modelInfo = await commands.find(c => c instanceof MistralGetModel).getModelCapabilities();
|
|
||||||
if (modelInfo) {
|
|
||||||
if (!modelInfo.vision?.supported) {
|
|
||||||
await replyToMessage({
|
|
||||||
message: msg,
|
|
||||||
text: "Моя текущая модель не умеет анализировать изображения 🥹"
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
logError(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
waitMessage = await bot.sendMessage({
|
waitMessage = await bot.sendMessage({
|
||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
text: imagesCount ?
|
text: imagesCount ?
|
||||||
imagesCount > 1 ? Environment.analyzingPicturesText : Environment.analyzingPictureText
|
imagesCount > 1 ? Environment.analyzingPicturesText : Environment.analyzingPictureText
|
||||||
: Environment.waitThinkText,
|
: Environment.waitText,
|
||||||
|
|
||||||
reply_parameters: {
|
reply_parameters: {
|
||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
@@ -119,7 +97,7 @@ export class MistralChat extends ChatCommand {
|
|||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
message_id: waitMessage.message_id,
|
message_id: waitMessage.message_id,
|
||||||
text: escapeMarkdownV2Text(text),
|
text: escapeMarkdownV2Text(text),
|
||||||
parse_mode: "MarkdownV2"
|
parse_mode: "Markdown"
|
||||||
}
|
}
|
||||||
).catch(logError);
|
).catch(logError);
|
||||||
|
|
||||||
@@ -168,9 +146,7 @@ export class MistralChat extends ChatCommand {
|
|||||||
waitMessage.reply_to_message = msg;
|
waitMessage.reply_to_message = msg;
|
||||||
waitMessage.text = currentText;
|
waitMessage.text = currentText;
|
||||||
await MessageStore.put(waitMessage);
|
await MessageStore.put(waitMessage);
|
||||||
if (Environment.SEND_TIME_TOOK) {
|
await oldReplyToMessage(waitMessage, `⏱️ ${diff}s`);
|
||||||
await replyToMessage({message: waitMessage, text: `⏱️ ${diff}s`});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logError(error);
|
logError(error);
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ import {logError, replyToMessage} from "../util/utils";
|
|||||||
import {Environment} from "../common/environment";
|
import {Environment} from "../common/environment";
|
||||||
import {Requirements} from "../base/requirements";
|
import {Requirements} from "../base/requirements";
|
||||||
import {Requirement} from "../base/requirement";
|
import {Requirement} from "../base/requirement";
|
||||||
import {mistralAi} from "../index";
|
|
||||||
import {AiModelCapabilities} from "../model/ai-model-capabilities";
|
|
||||||
|
|
||||||
export class MistralGetModel extends Command {
|
export class MistralGetModel extends Command {
|
||||||
title = "/mistralGetModel";
|
title = "/mistralGetModel";
|
||||||
@@ -16,21 +14,4 @@ export class MistralGetModel extends Command {
|
|||||||
async execute(msg: Message): Promise<void> {
|
async execute(msg: Message): Promise<void> {
|
||||||
await replyToMessage({message: msg, text: `Текущая модель: "${Environment.MISTRAL_MODEL}"`}).catch(logError);
|
await replyToMessage({message: msg, text: `Текущая модель: "${Environment.MISTRAL_MODEL}"`}).catch(logError);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getModelCapabilities(): Promise<AiModelCapabilities | null> {
|
|
||||||
try {
|
|
||||||
const info = await mistralAi.models.retrieve({modelId: Environment.MISTRAL_MODEL});
|
|
||||||
console.log(info);
|
|
||||||
|
|
||||||
return {
|
|
||||||
vision: {supported: info.capabilities.vision},
|
|
||||||
ocr: {supported: info.capabilities.ocr},
|
|
||||||
thinking: null,
|
|
||||||
tools: {supported: info.capabilities.functionCalling}
|
|
||||||
};
|
|
||||||
} catch (e) {
|
|
||||||
logError(e);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -44,10 +44,7 @@ export class OllamaChat extends ChatCommand {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
chatMessages.reverse();
|
chatMessages.reverse();
|
||||||
|
|
||||||
if (Environment.SYSTEM_PROMPT) {
|
|
||||||
chatMessages.unshift({role: "system", content: Environment.SYSTEM_PROMPT, images: []});
|
chatMessages.unshift({role: "system", content: Environment.SYSTEM_PROMPT, images: []});
|
||||||
}
|
|
||||||
|
|
||||||
let waitMessage: Message;
|
let waitMessage: Message;
|
||||||
|
|
||||||
@@ -62,7 +59,8 @@ export class OllamaChat extends ChatCommand {
|
|||||||
try {
|
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) {
|
||||||
if (!modelInfo.vision?.supported) {
|
const caps = modelInfo.capabilities || [];
|
||||||
|
if (!caps.includes("vision")) {
|
||||||
await replyToMessage({
|
await replyToMessage({
|
||||||
message: msg,
|
message: msg,
|
||||||
text: "Моя текущая модель не умеет анализировать изображения 🥹"
|
text: "Моя текущая модель не умеет анализировать изображения 🥹"
|
||||||
@@ -79,7 +77,8 @@ export class OllamaChat extends ChatCommand {
|
|||||||
try {
|
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) {
|
||||||
if (!modelInfo.thinking?.supported) {
|
const caps = modelInfo.capabilities || [];
|
||||||
|
if (!caps.includes("thinking")) {
|
||||||
await replyToMessage({
|
await replyToMessage({
|
||||||
message: msg,
|
message: msg,
|
||||||
text: "Моя текущая модель не умеет размышлять 🥹"
|
text: "Моя текущая модель не умеет размышлять 🥹"
|
||||||
@@ -99,7 +98,7 @@ export class OllamaChat extends ChatCommand {
|
|||||||
message: msg,
|
message: msg,
|
||||||
text: (!think && imagesCount) ?
|
text: (!think && imagesCount) ?
|
||||||
imagesCount > 1 ? Environment.analyzingPicturesText : Environment.analyzingPictureText
|
imagesCount > 1 ? Environment.analyzingPicturesText : Environment.analyzingPictureText
|
||||||
: Environment.waitThinkText
|
: Environment.waitText
|
||||||
});
|
});
|
||||||
|
|
||||||
const stream = await ollama.chat({
|
const stream = await ollama.chat({
|
||||||
@@ -143,7 +142,7 @@ export class OllamaChat extends ChatCommand {
|
|||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
message_id: waitMessage.message_id,
|
message_id: waitMessage.message_id,
|
||||||
text: escapeMarkdownV2Text(text),
|
text: escapeMarkdownV2Text(text),
|
||||||
parse_mode: "MarkdownV2",
|
parse_mode: "Markdown",
|
||||||
reply_markup: cancelMarkup
|
reply_markup: cancelMarkup
|
||||||
}).catch(logError);
|
}).catch(logError);
|
||||||
|
|
||||||
@@ -220,10 +219,7 @@ export class OllamaChat extends ChatCommand {
|
|||||||
waitMessage.reply_to_message = msg;
|
waitMessage.reply_to_message = msg;
|
||||||
waitMessage.text = currentText;
|
waitMessage.text = currentText;
|
||||||
await MessageStore.put(waitMessage);
|
await MessageStore.put(waitMessage);
|
||||||
|
await oldReplyToMessage(waitMessage, `⏱️ ${diff}s`);
|
||||||
if (Environment.SEND_TIME_TOOK) {
|
|
||||||
await replyToMessage({message: waitMessage, text: `⏱️ ${diff}s`});
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {Message} from "typescript-telegram-bot-api";
|
|||||||
import {boolToEmoji, logError, replyToMessage} from "../util/utils";
|
import {boolToEmoji, logError, replyToMessage} from "../util/utils";
|
||||||
import {Environment} from "../common/environment";
|
import {Environment} from "../common/environment";
|
||||||
import {ollama} from "../index";
|
import {ollama} from "../index";
|
||||||
import {AiModelCapabilities} from "../model/ai-model-capabilities";
|
import {ShowResponse} from "ollama";
|
||||||
|
|
||||||
export class OllamaGetModel extends Command {
|
export class OllamaGetModel extends Command {
|
||||||
title = "/ollamaGetModel";
|
title = "/ollamaGetModel";
|
||||||
@@ -15,7 +15,7 @@ export class OllamaGetModel extends Command {
|
|||||||
const imageModel = Environment.OLLAMA_IMAGE_MODEL;
|
const imageModel = Environment.OLLAMA_IMAGE_MODEL;
|
||||||
const thinkModel = Environment.OLLAMA_THINK_MODEL;
|
const thinkModel = Environment.OLLAMA_THINK_MODEL;
|
||||||
|
|
||||||
const promises: (Promise<AiModelCapabilities | null> | null)[] = [this.getModelCapabilities()];
|
const promises: (Promise<ShowResponse | null> | null)[] = [this.loadModelInfo()];
|
||||||
|
|
||||||
if (imageModel && imageModel !== model) {
|
if (imageModel && imageModel !== model) {
|
||||||
promises.push(this.loadImageModelInfo());
|
promises.push(this.loadImageModelInfo());
|
||||||
@@ -62,51 +62,24 @@ export class OllamaGetModel extends Command {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private getModelText(model: string, info: AiModelCapabilities): string {
|
private getModelText(model: string, info: ShowResponse): string {
|
||||||
|
const caps = info.capabilities;
|
||||||
|
|
||||||
return `model: ${model}\n\n` +
|
return `model: ${model}\n\n` +
|
||||||
`vision: ${boolToEmoji(info.vision?.supported)}\n` +
|
`vision: ${boolToEmoji(caps.includes("vision"))}\n` +
|
||||||
`thinking: ${boolToEmoji(info.thinking?.supported)}\n` +
|
`thinking: ${boolToEmoji(caps.includes("thinking"))}\n` +
|
||||||
`tools: ${boolToEmoji(info.tools?.supported)}`;
|
`tools: ${boolToEmoji(caps.includes("tools"))}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
async getModelCapabilities(model: string = Environment.OLLAMA_MODEL): Promise<AiModelCapabilities | null> {
|
async loadModelInfo(): Promise<ShowResponse | null> {
|
||||||
try {
|
return ollama.show({model: Environment.OLLAMA_MODEL});
|
||||||
const info = await ollama.show({model: model});
|
|
||||||
console.log(info);
|
|
||||||
|
|
||||||
return {
|
|
||||||
vision: {
|
|
||||||
supported: info.capabilities.includes("vision"),
|
|
||||||
external: model !== Environment.OLLAMA_MODEL,
|
|
||||||
model: model
|
|
||||||
},
|
|
||||||
ocr: {
|
|
||||||
supported: info.capabilities.includes("ocr"),
|
|
||||||
external: model !== Environment.OLLAMA_MODEL,
|
|
||||||
model: model
|
|
||||||
},
|
|
||||||
thinking: {
|
|
||||||
supported: info.capabilities.includes("thinking"),
|
|
||||||
external: model !== Environment.OLLAMA_MODEL,
|
|
||||||
model: model
|
|
||||||
},
|
|
||||||
tools: {
|
|
||||||
supported: info.capabilities.includes("tools"),
|
|
||||||
external: model !== Environment.OLLAMA_MODEL,
|
|
||||||
model: model
|
|
||||||
},
|
|
||||||
};
|
|
||||||
} catch (e) {
|
|
||||||
logError(e);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadImageModelInfo(): Promise<AiModelCapabilities | null> {
|
async loadImageModelInfo(): Promise<ShowResponse | null> {
|
||||||
return this.getModelCapabilities(Environment.OLLAMA_IMAGE_MODEL);
|
return ollama.show({model: Environment.OLLAMA_IMAGE_MODEL});
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadThinkModelInfo(): Promise<AiModelCapabilities | null> {
|
async loadThinkModelInfo(): Promise<ShowResponse | null> {
|
||||||
return this.getModelCapabilities(Environment.OLLAMA_THINK_MODEL);
|
return ollama.show({model: Environment.OLLAMA_THINK_MODEL});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -37,7 +37,7 @@ export class OllamaPrompt extends Command {
|
|||||||
|
|
||||||
waitMessage = await bot.sendMessage({
|
waitMessage = await bot.sendMessage({
|
||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
text: Environment.waitThinkText,
|
text: Environment.waitText,
|
||||||
reply_parameters: {
|
reply_parameters: {
|
||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
message_id: msg.message_id
|
message_id: msg.message_id
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {Requirement} from "../base/requirement";
|
|||||||
import {Message} from "typescript-telegram-bot-api";
|
import {Message} from "typescript-telegram-bot-api";
|
||||||
import {bot, ollama} from "../index";
|
import {bot, ollama} from "../index";
|
||||||
import {WebSearchResponse} from "../model/web-search-response";
|
import {WebSearchResponse} from "../model/web-search-response";
|
||||||
import {oldEditMessageText, logError} from "../util/utils";
|
import {editMessageText, logError} from "../util/utils";
|
||||||
import {Environment} from "../common/environment";
|
import {Environment} from "../common/environment";
|
||||||
|
|
||||||
export class OllamaSearch extends Command {
|
export class OllamaSearch extends Command {
|
||||||
@@ -23,7 +23,7 @@ export class OllamaSearch extends Command {
|
|||||||
try {
|
try {
|
||||||
const wait = await bot.sendMessage({
|
const wait = await bot.sendMessage({
|
||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
text: Environment.waitThinkText,
|
text: Environment.waitText,
|
||||||
reply_parameters: {
|
reply_parameters: {
|
||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
message_id: msg.message_id
|
message_id: msg.message_id
|
||||||
@@ -40,7 +40,7 @@ export class OllamaSearch extends Command {
|
|||||||
message += `${index + 1}. ${r.url}\n`;
|
message += `${index + 1}. ${r.url}\n`;
|
||||||
});
|
});
|
||||||
|
|
||||||
await oldEditMessageText(chatId, wait.message_id, message);
|
await editMessageText(chatId, wait.message_id, message);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logError(error);
|
logError(error);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,14 +58,11 @@ export class OpenAIChat extends ChatCommand {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
chatMessages.reverse();
|
chatMessages.reverse();
|
||||||
|
|
||||||
if (Environment.SYSTEM_PROMPT) {
|
|
||||||
chatMessages.unshift({
|
chatMessages.unshift({
|
||||||
role: "system",
|
role: "system",
|
||||||
content: [{type: "input_text", text: Environment.SYSTEM_PROMPT}],
|
content: [{type: "input_text", text: Environment.SYSTEM_PROMPT}],
|
||||||
type: "message"
|
type: "message"
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
let waitMessage: Message;
|
let waitMessage: Message;
|
||||||
|
|
||||||
@@ -74,7 +71,7 @@ export class OpenAIChat extends ChatCommand {
|
|||||||
try {
|
try {
|
||||||
waitMessage = await bot.sendMessage({
|
waitMessage = await bot.sendMessage({
|
||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
text: Environment.waitThinkText,
|
text: Environment.waitText,
|
||||||
reply_parameters: {
|
reply_parameters: {
|
||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
message_id: msg.message_id
|
message_id: msg.message_id
|
||||||
@@ -100,7 +97,7 @@ export class OpenAIChat extends ChatCommand {
|
|||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
message_id: waitMessage.message_id,
|
message_id: waitMessage.message_id,
|
||||||
text: escapeMarkdownV2Text(text),
|
text: escapeMarkdownV2Text(text),
|
||||||
parse_mode: "MarkdownV2"
|
parse_mode: "Markdown"
|
||||||
}
|
}
|
||||||
).catch(logError);
|
).catch(logError);
|
||||||
|
|
||||||
@@ -151,11 +148,8 @@ export class OpenAIChat extends ChatCommand {
|
|||||||
waitMessage.reply_to_message = msg;
|
waitMessage.reply_to_message = msg;
|
||||||
waitMessage.text = currentText;
|
waitMessage.text = currentText;
|
||||||
await MessageStore.put(waitMessage);
|
await MessageStore.put(waitMessage);
|
||||||
|
|
||||||
if (Environment.SEND_TIME_TOOK) {
|
|
||||||
await replyToMessage({message: waitMessage, text: `⏱️ ${diff}s`});
|
await replyToMessage({message: waitMessage, text: `⏱️ ${diff}s`});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logError(error);
|
logError(error);
|
||||||
await replyToMessage({
|
await replyToMessage({
|
||||||
|
|||||||
@@ -1,117 +0,0 @@
|
|||||||
import {ChatCommand} from "../base/chat-command";
|
|
||||||
import {Message} from "typescript-telegram-bot-api";
|
|
||||||
import {Requirements} from "../base/requirements";
|
|
||||||
import {Requirement} from "../base/requirement";
|
|
||||||
import {bot, openAi, photoGenDir} from "../index";
|
|
||||||
import fs from "node:fs";
|
|
||||||
import path from "node:path";
|
|
||||||
import {oldEditMessageText, logError, replyToMessage} from "../util/utils";
|
|
||||||
import {Environment} from "../common/environment";
|
|
||||||
import {APIError} from "openai";
|
|
||||||
|
|
||||||
export class OpenAIGenImage extends ChatCommand {
|
|
||||||
command = ["openAiGenImage", "chatGPTGenImage", "imgen"];
|
|
||||||
|
|
||||||
title = "/openAIGenImage";
|
|
||||||
description = "Generate image from OpenAI";
|
|
||||||
|
|
||||||
argsMode = "required" as const;
|
|
||||||
requirements = Requirements.Build(Requirement.BOT_CREATOR);
|
|
||||||
|
|
||||||
async execute(msg: Message, match?: RegExpExecArray): Promise<void> {
|
|
||||||
const prompt = match?.[3]?.trim();
|
|
||||||
if (!prompt?.length) return;
|
|
||||||
|
|
||||||
let waitMessage: Message | null = null;
|
|
||||||
|
|
||||||
try {
|
|
||||||
const totalParts = 3;
|
|
||||||
const model = Environment.OPENAI_IMAGE_MODEL;
|
|
||||||
const fileFullName = `${msg.chat.id}_${msg.message_id}.png`;
|
|
||||||
const getFileLocation = (fn: string) => {
|
|
||||||
return path.join(photoGenDir, fn);
|
|
||||||
};
|
|
||||||
|
|
||||||
waitMessage = await replyToMessage({message: msg, text: "🌈 Генерирую изображение..."});
|
|
||||||
|
|
||||||
const stream = await openAi.images.generate({
|
|
||||||
model: model,
|
|
||||||
prompt: prompt,
|
|
||||||
n: 1,
|
|
||||||
size: "auto",
|
|
||||||
stream: true,
|
|
||||||
partial_images: totalParts,
|
|
||||||
moderation: "low",
|
|
||||||
output_format: "png",
|
|
||||||
});
|
|
||||||
|
|
||||||
const then = Date.now();
|
|
||||||
|
|
||||||
for await (const event of stream) {
|
|
||||||
switch (event.type) {
|
|
||||||
case "image_generation.partial_image": {
|
|
||||||
console.log(` Partial image ${event.partial_image_index + 1}/3 received`);
|
|
||||||
console.log(` Size: ${event.b64_json.length} characters (base64)`);
|
|
||||||
|
|
||||||
const fileName = `partial_${event.partial_image_index + 1}_${fileFullName}`;
|
|
||||||
const imageBuffer = Buffer.from(event.b64_json, "base64");
|
|
||||||
const fileLocation = getFileLocation(fileName);
|
|
||||||
fs.writeFileSync(fileLocation, imageBuffer);
|
|
||||||
console.log(` 💾 Saved to: ${path.resolve(fileLocation)}`);
|
|
||||||
|
|
||||||
await bot.editMessageMedia({
|
|
||||||
chat_id: msg.chat.id,
|
|
||||||
message_id: waitMessage.message_id,
|
|
||||||
media: {
|
|
||||||
type: "photo",
|
|
||||||
media: imageBuffer,
|
|
||||||
caption: `🌈 Генерирую изображение (${(event.partial_image_index + 1)}/${totalParts})...`
|
|
||||||
}
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "image_generation.completed": {
|
|
||||||
console.log("\n✅ Final image completed!");
|
|
||||||
console.log(` Size: ${event.b64_json.length} characters (base64)`);
|
|
||||||
|
|
||||||
const imageBuffer = Buffer.from(event.b64_json, "base64");
|
|
||||||
const fileLocation = getFileLocation(fileFullName);
|
|
||||||
fs.writeFileSync(fileLocation, imageBuffer);
|
|
||||||
console.log(` Saved to: ${path.resolve(fileLocation)}`);
|
|
||||||
|
|
||||||
const diff = Date.now() - then;
|
|
||||||
await bot.editMessageMedia({
|
|
||||||
chat_id: msg.chat.id,
|
|
||||||
message_id: waitMessage.message_id,
|
|
||||||
media: {
|
|
||||||
type: "photo",
|
|
||||||
media: imageBuffer,
|
|
||||||
caption: `🌈 Изображение по запросу "${prompt}" сгенерировано моделью "${model}" размеров ${event.size} за ${diff}ms`
|
|
||||||
}
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
console.log(`❓ Unknown event: ${event}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
logError(e);
|
|
||||||
|
|
||||||
if (e instanceof APIError && e.error.code === "moderation_blocked") {
|
|
||||||
const text = "❌ Мне запрещено такое генерировать 😠";
|
|
||||||
|
|
||||||
if (waitMessage) {
|
|
||||||
await oldEditMessageText(msg.chat.id, waitMessage.message_id, text).catch(logError);
|
|
||||||
} else {
|
|
||||||
await replyToMessage({message: msg, text: text}).catch(logError);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
await replyToMessage({
|
|
||||||
message: waitMessage ? waitMessage : msg,
|
|
||||||
text: `Произошла ошибка: ${e}`
|
|
||||||
}).catch(logError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,7 +2,6 @@ import {Command} from "../base/command";
|
|||||||
import {Message} from "typescript-telegram-bot-api";
|
import {Message} from "typescript-telegram-bot-api";
|
||||||
import {logError, replyToMessage} from "../util/utils";
|
import {logError, replyToMessage} from "../util/utils";
|
||||||
import {Environment} from "../common/environment";
|
import {Environment} from "../common/environment";
|
||||||
import {AiModelCapabilities} from "../model/ai-model-capabilities";
|
|
||||||
|
|
||||||
export class OpenAIGetModel extends Command {
|
export class OpenAIGetModel extends Command {
|
||||||
title = "/openAIGetModel";
|
title = "/openAIGetModel";
|
||||||
@@ -11,19 +10,4 @@ export class OpenAIGetModel extends Command {
|
|||||||
async execute(msg: Message): Promise<void> {
|
async execute(msg: Message): Promise<void> {
|
||||||
await replyToMessage({message: msg, text: `Текущая модель: "${Environment.OPENAI_MODEL}"`}).catch(logError);
|
await replyToMessage({message: msg, text: `Текущая модель: "${Environment.OPENAI_MODEL}"`}).catch(logError);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getModelCapabilities(): Promise<AiModelCapabilities | null> {
|
|
||||||
// TODO: 12/02/2026, Danil Nikolaev: find solution
|
|
||||||
try {
|
|
||||||
return {
|
|
||||||
vision: {supported: true},
|
|
||||||
ocr: null,
|
|
||||||
thinking: {supported: true},
|
|
||||||
tools: {supported: true},
|
|
||||||
};
|
|
||||||
} catch (e) {
|
|
||||||
logError(e);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -25,8 +25,6 @@ export class Qr extends Command {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 16/02/2026, Danil Nikolaev: escape html symbols in payload
|
|
||||||
|
|
||||||
if (payload.length > 1500) {
|
if (payload.length > 1500) {
|
||||||
payload = payload.slice(0, 1500);
|
payload = payload.slice(0, 1500);
|
||||||
|
|
||||||
|
|||||||
+24
-22
@@ -2,7 +2,7 @@ import axios from "axios";
|
|||||||
import sharp from "sharp";
|
import sharp from "sharp";
|
||||||
import emojiRegex from "emoji-regex";
|
import emojiRegex from "emoji-regex";
|
||||||
|
|
||||||
import {createCanvas, GlobalFonts, Image, type Image as CanvasImage, loadImage, SKRSContext2D} from "@napi-rs/canvas";
|
import {createCanvas, GlobalFonts, type Image as CanvasImage, loadImage, SKRSContext2D} from "@napi-rs/canvas";
|
||||||
import {Message, MessageEntity, PhotoSize} from "typescript-telegram-bot-api";
|
import {Message, MessageEntity, PhotoSize} from "typescript-telegram-bot-api";
|
||||||
import {Command} from "../base/command";
|
import {Command} from "../base/command";
|
||||||
import {bot, botUser} from "../index";
|
import {bot, botUser} from "../index";
|
||||||
@@ -12,7 +12,8 @@ import {
|
|||||||
getUserAvatar,
|
getUserAvatar,
|
||||||
logError,
|
logError,
|
||||||
makeDarkGradientBgFancy,
|
makeDarkGradientBgFancy,
|
||||||
replyToMessage
|
oldReplyToMessage,
|
||||||
|
oldSendMessage
|
||||||
} from "../util/utils";
|
} from "../util/utils";
|
||||||
import {Requirements} from "../base/requirements";
|
import {Requirements} from "../base/requirements";
|
||||||
import {Requirement} from "../base/requirement";
|
import {Requirement} from "../base/requirement";
|
||||||
@@ -49,16 +50,21 @@ export class Quote extends Command {
|
|||||||
const chatId = msg.chat.id;
|
const chatId = msg.chat.id;
|
||||||
const reply = msg.reply_to_message;
|
const reply = msg.reply_to_message;
|
||||||
|
|
||||||
|
if (!reply) {
|
||||||
|
await oldReplyToMessage(msg, "Сделай /quote реплаем на сообщение 🙂").catch(logError);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const quoteRaw = (msg.quote?.text ?? reply.text ?? reply.caption ?? "").trim();
|
const quoteRaw = (msg.quote?.text ?? reply.text ?? reply.caption ?? "").trim();
|
||||||
if (quoteRaw.length === 0) {
|
if (quoteRaw.length === 0) {
|
||||||
await replyToMessage({message: msg, text: "Не нашёл в сообщении текста 😢"}).catch(logError);
|
await oldReplyToMessage(msg, "Не нашёл в сообщении текста 😢").catch(logError);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const quote = quoteRaw.length ? quoteRaw : "…";
|
const quote = quoteRaw.length ? quoteRaw : "…";
|
||||||
|
|
||||||
const entities = msg.quote ? msg.quote.entities : reply.entities ?? reply.caption_entities ?? [];
|
const entities = reply.entities ?? reply.caption_entities ?? [];
|
||||||
|
|
||||||
const png = await renderQuoteCard(msg, quote, reply, entities);
|
const png = await renderQuoteCard(msg, quote, reply, entities);
|
||||||
await bot.sendPhoto({
|
await bot.sendPhoto({
|
||||||
@@ -70,7 +76,7 @@ export class Quote extends Command {
|
|||||||
}).catch(logError);
|
}).catch(logError);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logError(e);
|
logError(e);
|
||||||
await replyToMessage({message: msg, text: "Не смог собрать цитату 😢"}).catch(logError);
|
await oldSendMessage(msg, "Не смог собрать цитату 😢").catch(logError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -79,13 +85,6 @@ const emojiCache = new Map<string, CanvasImage>();
|
|||||||
const customEmojiCache = new Map<string, CanvasImage>();
|
const customEmojiCache = new Map<string, CanvasImage>();
|
||||||
|
|
||||||
function appleEmojiUrl(emoji: string): string {
|
function appleEmojiUrl(emoji: string): string {
|
||||||
const codePoints = [...emoji]
|
|
||||||
.map(char => char.codePointAt(0)!.toString(16))
|
|
||||||
.join("-");
|
|
||||||
return `https://cdn.jsdelivr.net/npm/emoji-datasource-apple@15.0.0/img/apple/64/${codePoints}.png`;
|
|
||||||
}
|
|
||||||
|
|
||||||
function githubEmojiUrl(emoji: string): string {
|
|
||||||
const codePoints = [...emoji]
|
const codePoints = [...emoji]
|
||||||
.map(char => char.codePointAt(0)!.toString(16))
|
.map(char => char.codePointAt(0)!.toString(16))
|
||||||
.join("-");
|
.join("-");
|
||||||
@@ -98,24 +97,27 @@ function twemojiUrl(emoji: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function loadEmoji(emoji: string): Promise<CanvasImage> {
|
async function loadEmoji(emoji: string): Promise<CanvasImage> {
|
||||||
const downloadAndCache = async (url: string): Promise<Image> => {
|
let url = appleEmojiUrl(emoji);
|
||||||
|
let cached = emojiCache.get(url);
|
||||||
|
if (cached) return cached;
|
||||||
|
|
||||||
|
try {
|
||||||
const res = await axios.get<ArrayBuffer>(url, {responseType: "arraybuffer"});
|
const res = await axios.get<ArrayBuffer>(url, {responseType: "arraybuffer"});
|
||||||
const img = await loadImage(Buffer.from(res.data));
|
const img = await loadImage(Buffer.from(res.data));
|
||||||
emojiCache.set(url, img);
|
emojiCache.set(url, img);
|
||||||
return img;
|
return img;
|
||||||
};
|
} catch (e) {
|
||||||
|
logError(e);
|
||||||
|
|
||||||
const checkIfCached = async (emoji: string, emojiToUrl: (emoji: string) => string): Promise<CanvasImage> => {
|
url = twemojiUrl(emoji);
|
||||||
const url = emojiToUrl(emoji);
|
cached = emojiCache.get(url);
|
||||||
const cached = emojiCache.get(url);
|
|
||||||
if (cached) return cached;
|
if (cached) return cached;
|
||||||
return await downloadAndCache(emojiToUrl(emoji));
|
|
||||||
};
|
|
||||||
|
|
||||||
const sources = [appleEmojiUrl, githubEmojiUrl, twemojiUrl];
|
|
||||||
for (const source of sources) {
|
|
||||||
try {
|
try {
|
||||||
return await checkIfCached(emoji, source);
|
const res = await axios.get<ArrayBuffer>(url, {responseType: "arraybuffer"});
|
||||||
|
const img = await loadImage(Buffer.from(res.data));
|
||||||
|
emojiCache.set(url, img);
|
||||||
|
return img;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logError(e);
|
logError(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import {logError, oldReplyToMessage, randomValue} from "../util/utils";
|
|||||||
import {Environment} from "../common/environment";
|
import {Environment} from "../common/environment";
|
||||||
|
|
||||||
export class Test extends Command {
|
export class Test extends Command {
|
||||||
regexp = /^(test|тест|еуые|ntcn|инноке(нтий|ш|нтич))$/i;
|
regexp = /^(test|тест|еуые|ntcn|инноке(нтий|ш|нтич))/i;
|
||||||
title = "тест";
|
title = "тест";
|
||||||
description = "System functionality check";
|
description = "System functionality check";
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
import {Command} from "../base/command";
|
import {Command} from "../base/command";
|
||||||
import {Message} from "typescript-telegram-bot-api";
|
import {Message} from "typescript-telegram-bot-api";
|
||||||
import {editMessageText, logError, replyToMessage} from "../util/utils";
|
import {logError, replyToMessage} from "../util/utils";
|
||||||
import {bot, botUser} from "../index";
|
import {bot} from "../index";
|
||||||
import {DownloadOptions, downloadVideoFromYouTube, getYouTubeVideoId} from "../util/ytdl";
|
import {downloadVideoFromYouTube} from "../util/ytdl";
|
||||||
import {Environment} from "../common/environment";
|
|
||||||
import {TryAgain} from "../callback_commands/try-again";
|
|
||||||
|
|
||||||
export class YouTubeDownload extends Command {
|
export class YouTubeDownload extends Command {
|
||||||
command = ["ytdl", "youtube"];
|
command = ["ytdl", "youtube"];
|
||||||
@@ -12,22 +10,16 @@ export class YouTubeDownload extends Command {
|
|||||||
|
|
||||||
async execute(msg: Message, match?: RegExpExecArray): Promise<void> {
|
async execute(msg: Message, match?: RegExpExecArray): Promise<void> {
|
||||||
const url = match?.[3];
|
const url = match?.[3];
|
||||||
return this.downloadYouTubeVideo(msg, {url: url});
|
return this.downloadYouTubeVideo(msg, url);
|
||||||
}
|
}
|
||||||
|
|
||||||
async downloadYouTubeVideo(msg: Message, options: DownloadOptions): Promise<void> {
|
async downloadYouTubeVideo(msg: Message, url: string): Promise<void> {
|
||||||
// TODO: 02.03.2026, Danil Nikolaev: add check for date
|
let waitMessage: Message | null = null;
|
||||||
let waitMessage: Message | null = (msg.from.id === botUser.id) ? msg : null;
|
|
||||||
const videoId = "videoId" in options ? options.videoId : getYouTubeVideoId(options.url);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (!waitMessage) {
|
waitMessage = await replyToMessage({message: msg, text: "⏳ Секунду..."});
|
||||||
waitMessage = await replyToMessage({message: msg, text: "⏳ Скачиваю видео..."});
|
|
||||||
} else {
|
|
||||||
await editMessageText({message: msg, text: "⏳ Скачиваю видео..."});
|
|
||||||
}
|
|
||||||
|
|
||||||
const {time, exists, buffer} = await downloadVideoFromYouTube({videoId: videoId});
|
const {time, exists, buffer} = await downloadVideoFromYouTube(url);
|
||||||
if (buffer) {
|
if (buffer) {
|
||||||
const start = Date.now();
|
const start = Date.now();
|
||||||
waitMessage = await bot.editMessageMedia({
|
waitMessage = await bot.editMessageMedia({
|
||||||
@@ -43,7 +35,8 @@ export class YouTubeDownload extends Command {
|
|||||||
waitMessage = await bot.editMessageCaption({
|
waitMessage = await bot.editMessageCaption({
|
||||||
chat_id: msg.chat.id,
|
chat_id: msg.chat.id,
|
||||||
message_id: waitMessage.message_id,
|
message_id: waitMessage.message_id,
|
||||||
caption: "✅ Видео" + (exists ? " загружено из кэша" : " успешно скачано") + " за " + (time + diff) + "мс",
|
caption: `✅ [Видео](${url})` + (exists ? " загружено из кэша" : " успешно скачано") + " за " + (time + diff) + "мс",
|
||||||
|
parse_mode: "MarkdownV2"
|
||||||
}) as Message;
|
}) as Message;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@@ -53,12 +46,7 @@ export class YouTubeDownload extends Command {
|
|||||||
await bot.editMessageText({
|
await bot.editMessageText({
|
||||||
chat_id: msg.chat.id,
|
chat_id: msg.chat.id,
|
||||||
message_id: waitMessage.message_id,
|
message_id: waitMessage.message_id,
|
||||||
text: Environment.errorText,
|
text: `⚠️ Произошла ошибка.\n${e}`,
|
||||||
reply_markup: {
|
|
||||||
inline_keyboard: [[
|
|
||||||
TryAgain.withData("/ytdl " + videoId).asButton()
|
|
||||||
]]
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-47
@@ -2,8 +2,13 @@ import path from "node:path";
|
|||||||
import {saveData} from "../db/database";
|
import {saveData} from "../db/database";
|
||||||
import {Answers} from "../model/answers";
|
import {Answers} from "../model/answers";
|
||||||
import {ifTrue} from "../util/utils";
|
import {ifTrue} from "../util/utils";
|
||||||
import {AiProvider} from "../model/ai-provider";
|
|
||||||
import {ImageHandleFallbackPolicy, ImageHandlePolicy, RateLimitFallbackPolicy} from "./policies";
|
export enum AiProvider {
|
||||||
|
OLLAMA = "OLLAMA",
|
||||||
|
GEMINI = "GEMINI",
|
||||||
|
MISTRAL = "MISTRAL",
|
||||||
|
OPENAI = "OPENAI",
|
||||||
|
}
|
||||||
|
|
||||||
export class Environment {
|
export class Environment {
|
||||||
static BOT_TOKEN: string;
|
static BOT_TOKEN: string;
|
||||||
@@ -20,24 +25,15 @@ export class Environment {
|
|||||||
|
|
||||||
static ONLY_FOR_CREATOR_MODE: boolean;
|
static ONLY_FOR_CREATOR_MODE: boolean;
|
||||||
|
|
||||||
static ENABLE_UNSAFE_EVAL: boolean;
|
|
||||||
|
|
||||||
static ANSWERS: Answers;
|
static ANSWERS: Answers;
|
||||||
|
|
||||||
static USE_NAMES_IN_PROMPT: boolean;
|
static USE_NAMES_IN_PROMPT: boolean;
|
||||||
|
|
||||||
static MAX_PHOTO_SIZE: number;
|
static MAX_PHOTO_SIZE: number;
|
||||||
|
|
||||||
static PROCESS_LINKS: boolean;
|
|
||||||
|
|
||||||
static DEFAULT_AI_PROVIDER: AiProvider;
|
static DEFAULT_AI_PROVIDER: AiProvider;
|
||||||
|
|
||||||
static RATE_LIMIT_FALLBACK_POLICY: RateLimitFallbackPolicy;
|
|
||||||
static IMAGE_HANDLE_POLICY: ImageHandlePolicy;
|
|
||||||
static IMAGE_HANDLE_FALLBACK_POLICY: ImageHandleFallbackPolicy;
|
|
||||||
|
|
||||||
static SYSTEM_PROMPT?: string;
|
static SYSTEM_PROMPT?: string;
|
||||||
static SEND_TIME_TOOK: boolean;
|
|
||||||
|
|
||||||
static OLLAMA_ADDRESS?: string;
|
static OLLAMA_ADDRESS?: string;
|
||||||
static OLLAMA_MODEL?: string;
|
static OLLAMA_MODEL?: string;
|
||||||
@@ -55,11 +51,8 @@ export class Environment {
|
|||||||
static OPENAI_BASE_URL?: string;
|
static OPENAI_BASE_URL?: string;
|
||||||
static OPENAI_API_KEY?: string;
|
static OPENAI_API_KEY?: string;
|
||||||
static OPENAI_MODEL: string;
|
static OPENAI_MODEL: string;
|
||||||
static OPENAI_IMAGE_MODEL: string;
|
|
||||||
|
|
||||||
static errorText = "⚠️ Произошла ошибка.";
|
static waitText = "⏳ Дайте-ка подумать...";
|
||||||
static waitText = "⏳ Секунду...";
|
|
||||||
static waitThinkText = "⏳ Дайте-ка подумать...";
|
|
||||||
static analyzingPictureText = "🔍 Внимательно изучаю изображение...";
|
static analyzingPictureText = "🔍 Внимательно изучаю изображение...";
|
||||||
static analyzingPicturesText = "🔍 Внимательно изучаю изображения...";
|
static analyzingPicturesText = "🔍 Внимательно изучаю изображения...";
|
||||||
static genImageText = "👨🎨 Генерирую изображение...";
|
static genImageText = "👨🎨 Генерирую изображение...";
|
||||||
@@ -77,14 +70,10 @@ export class Environment {
|
|||||||
|
|
||||||
Environment.ONLY_FOR_CREATOR_MODE = ifTrue(process.env.ONLY_FOR_CREATOR_MODE);
|
Environment.ONLY_FOR_CREATOR_MODE = ifTrue(process.env.ONLY_FOR_CREATOR_MODE);
|
||||||
|
|
||||||
Environment.ENABLE_UNSAFE_EVAL = ifTrue(process.env.ENABLE_UNSAFE_EVAL);
|
|
||||||
|
|
||||||
Environment.USE_NAMES_IN_PROMPT = ifTrue(process.env.USE_NAMES_IN_PROMPT);
|
Environment.USE_NAMES_IN_PROMPT = ifTrue(process.env.USE_NAMES_IN_PROMPT);
|
||||||
|
|
||||||
Environment.MAX_PHOTO_SIZE = Number(process.env.MAX_PHOTO_SIZE || "1280");
|
Environment.MAX_PHOTO_SIZE = Number(process.env.MAX_PHOTO_SIZE || "1280");
|
||||||
|
|
||||||
Environment.PROCESS_LINKS = ifTrue(process.env.PROCESS_LINKS);
|
|
||||||
|
|
||||||
const aiProvider = process.env.DEFAULT_AI_PROVIDER || "OLLAMA";
|
const aiProvider = process.env.DEFAULT_AI_PROVIDER || "OLLAMA";
|
||||||
if (Object.values(AiProvider).includes(aiProvider as AiProvider)) {
|
if (Object.values(AiProvider).includes(aiProvider as AiProvider)) {
|
||||||
Environment.DEFAULT_AI_PROVIDER = aiProvider as AiProvider;
|
Environment.DEFAULT_AI_PROVIDER = aiProvider as AiProvider;
|
||||||
@@ -92,28 +81,7 @@ export class Environment {
|
|||||||
Environment.DEFAULT_AI_PROVIDER = AiProvider.OLLAMA;
|
Environment.DEFAULT_AI_PROVIDER = AiProvider.OLLAMA;
|
||||||
}
|
}
|
||||||
|
|
||||||
const rateLimitFallbackPolicy = process.env.RATE_LIMIT_FALLBACK_POLICY || "NOTIFY_USER";
|
Environment.SYSTEM_PROMPT = process.env.SYSTEM_PROMPT?.trim();
|
||||||
if (Object.values(RateLimitFallbackPolicy).includes(rateLimitFallbackPolicy as RateLimitFallbackPolicy)) {
|
|
||||||
Environment.RATE_LIMIT_FALLBACK_POLICY = rateLimitFallbackPolicy as RateLimitFallbackPolicy;
|
|
||||||
} else {
|
|
||||||
Environment.RATE_LIMIT_FALLBACK_POLICY = RateLimitFallbackPolicy.NOTIFY_USER;
|
|
||||||
}
|
|
||||||
|
|
||||||
const imageHandlePolicy = process.env.IMAGE_HANDLE_POLICY || "HANDLE_IF_CAPABLE";
|
|
||||||
if (Object.values(ImageHandlePolicy).includes(imageHandlePolicy as ImageHandlePolicy)) {
|
|
||||||
Environment.IMAGE_HANDLE_POLICY = imageHandlePolicy as ImageHandlePolicy;
|
|
||||||
} else {
|
|
||||||
Environment.IMAGE_HANDLE_POLICY = ImageHandlePolicy.HANDLE_IF_CAPABLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
const imageHandleFallbackPolicy = process.env.IMAGE_HANDLE_FALLBACK_POLICY || "NOTIFY_USER";
|
|
||||||
if (Object.values(ImageHandleFallbackPolicy).includes(imageHandleFallbackPolicy as ImageHandleFallbackPolicy)) {
|
|
||||||
Environment.IMAGE_HANDLE_FALLBACK_POLICY = imageHandleFallbackPolicy as ImageHandleFallbackPolicy;
|
|
||||||
} else {
|
|
||||||
Environment.IMAGE_HANDLE_FALLBACK_POLICY = ImageHandleFallbackPolicy.NOTIFY_USER;
|
|
||||||
}
|
|
||||||
|
|
||||||
Environment.SEND_TIME_TOOK = ifTrue(process.env.SEND_TOOK_TIME || false);
|
|
||||||
|
|
||||||
Environment.OLLAMA_ADDRESS = process.env.OLLAMA_ADDRESS;
|
Environment.OLLAMA_ADDRESS = process.env.OLLAMA_ADDRESS;
|
||||||
Environment.OLLAMA_MODEL = process.env.OLLAMA_MODEL || "gemma3:4b";
|
Environment.OLLAMA_MODEL = process.env.OLLAMA_MODEL || "gemma3:4b";
|
||||||
@@ -126,16 +94,11 @@ export class Environment {
|
|||||||
Environment.GEMINI_IMAGE_MODEL = process.env.GEMINI_IMAGE_MODEL || "gemini-2.5-flash-image";
|
Environment.GEMINI_IMAGE_MODEL = process.env.GEMINI_IMAGE_MODEL || "gemini-2.5-flash-image";
|
||||||
|
|
||||||
Environment.MISTRAL_API_KEY = process.env.MISTRAL_API_KEY;
|
Environment.MISTRAL_API_KEY = process.env.MISTRAL_API_KEY;
|
||||||
Environment.MISTRAL_MODEL = process.env.MISTRAL_MODEL || "mistral-tiny-latest";
|
Environment.MISTRAL_MODEL = process.env.MISTRAL_MODEL || "mistral-small-latest";
|
||||||
|
|
||||||
Environment.OPENAI_BASE_URL = process.env.OPENAI_BASE_URL;
|
Environment.OPENAI_BASE_URL = process.env.OPENAI_BASE_URL;
|
||||||
Environment.OPENAI_API_KEY = process.env.OPENAI_API_KEY;
|
Environment.OPENAI_API_KEY = process.env.OPENAI_API_KEY;
|
||||||
Environment.OPENAI_MODEL = process.env.OPENAI_MODEL || "gpt-4.1-nano";
|
Environment.OPENAI_MODEL = process.env.OPENAI_MODEL || "gpt-4.1-nano";
|
||||||
Environment.OPENAI_IMAGE_MODEL = process.env.OPENAI_IMAGE_MODEL || "gpt-image-1-mini";
|
|
||||||
}
|
|
||||||
|
|
||||||
static setSystemPrompt(prompt: string) {
|
|
||||||
this.SYSTEM_PROMPT = prompt;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static setAdmins(admins: Set<number>) {
|
static setAdmins(admins: Set<number>) {
|
||||||
|
|||||||
@@ -1,17 +0,0 @@
|
|||||||
export enum RateLimitFallbackPolicy {
|
|
||||||
NOTIFY_USER = "NOTIFY_USER",
|
|
||||||
IGNORE_USER = "IGNORE_USER",
|
|
||||||
USE_OLLAMA = "USE_OLLAMA",
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum ImageHandlePolicy {
|
|
||||||
IGNORE = "IGNORE",
|
|
||||||
FORCE_HANDLE = "FORCE_HANDLE",
|
|
||||||
HANDLE_IF_CAPABLE = "HANDLE_IF_CAPABLE",
|
|
||||||
}
|
|
||||||
|
|
||||||
export enum ImageHandleFallbackPolicy {
|
|
||||||
NOTIFY_USER = "NOTIFY_USER",
|
|
||||||
IGNORE_USER = "IGNORE_USER",
|
|
||||||
USE_OLLAMA = "USE_OLLAMA",
|
|
||||||
}
|
|
||||||
@@ -2,7 +2,6 @@ import * as fs from "fs";
|
|||||||
import {Environment} from "../common/environment";
|
import {Environment} from "../common/environment";
|
||||||
import {logError} from "../util/utils";
|
import {logError} from "../util/utils";
|
||||||
import {Answers} from "../model/answers";
|
import {Answers} from "../model/answers";
|
||||||
import path from "node:path";
|
|
||||||
|
|
||||||
type DataJsonFile = {
|
type DataJsonFile = {
|
||||||
admins: number[]
|
admins: number[]
|
||||||
@@ -28,19 +27,6 @@ export async function readData(): Promise<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function readPrompts(): Promise<void> {
|
|
||||||
try {
|
|
||||||
const prompt = fs.readFileSync(path.join(Environment.DATA_PATH, "system_prompt.txt")).toString().trim();
|
|
||||||
if (prompt.length) {
|
|
||||||
Environment.setSystemPrompt(prompt);
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
logError(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Promise.resolve();
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function saveData(): Promise<void> {
|
export async function saveData(): Promise<void> {
|
||||||
const adminIds: number[] = [];
|
const adminIds: number[] = [];
|
||||||
Environment.ADMIN_IDS.forEach(id => adminIds.push(id));
|
Environment.ADMIN_IDS.forEach(id => adminIds.push(id));
|
||||||
|
|||||||
+13
-65
@@ -4,6 +4,7 @@ import {TelegramBot, User} from "typescript-telegram-bot-api";
|
|||||||
import {Command} from "./base/command";
|
import {Command} from "./base/command";
|
||||||
import {
|
import {
|
||||||
delay,
|
delay,
|
||||||
|
ignore,
|
||||||
initSystemSpecs,
|
initSystemSpecs,
|
||||||
logError,
|
logError,
|
||||||
processCallbackQuery,
|
processCallbackQuery,
|
||||||
@@ -20,7 +21,7 @@ import {Ping} from "./commands/ping";
|
|||||||
import {RandomString} from "./commands/random-string";
|
import {RandomString} from "./commands/random-string";
|
||||||
import {SystemInfo} from "./commands/system-info";
|
import {SystemInfo} from "./commands/system-info";
|
||||||
import {Test} from "./commands/test";
|
import {Test} from "./commands/test";
|
||||||
import {readData, readPrompts, retrieveAnswers} from "./db/database";
|
import {readData, retrieveAnswers} from "./db/database";
|
||||||
import {Uptime} from "./commands/uptime";
|
import {Uptime} from "./commands/uptime";
|
||||||
import {WhatBetter} from "./commands/what-better";
|
import {WhatBetter} from "./commands/what-better";
|
||||||
import {When} from "./commands/when";
|
import {When} from "./commands/when";
|
||||||
@@ -71,18 +72,12 @@ import {YouTubeDownload} from "./commands/youtube-download";
|
|||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import {setInterval} from "node:timers";
|
import {setInterval} from "node:timers";
|
||||||
|
import {clearUpVideoFolder} from "./util/files";
|
||||||
import {OpenAI} from "openai";
|
import {OpenAI} from "openai";
|
||||||
import {OpenAIChat} from "./commands/openai-chat";
|
import {OpenAIChat} from "./commands/openai-chat";
|
||||||
import {OpenAIListModels} from "./commands/openai-list-models";
|
import {OpenAIListModels} from "./commands/openai-list-models";
|
||||||
import {OpenAIGetModel} from "./commands/openai-get-model";
|
import {OpenAIGetModel} from "./commands/openai-get-model";
|
||||||
import {OpenAISetModel} from "./commands/openai-set-model";
|
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";
|
|
||||||
|
|
||||||
process.setUncaughtExceptionCaptureCallback(logError);
|
process.setUncaughtExceptionCaptureCallback(logError);
|
||||||
|
|
||||||
@@ -97,7 +92,7 @@ export let botUser: User;
|
|||||||
|
|
||||||
export const googleAi = new GoogleGenAI({apiKey: Environment.GEMINI_API_KEY});
|
export const googleAi = new GoogleGenAI({apiKey: Environment.GEMINI_API_KEY});
|
||||||
export const mistralAi = new Mistral({apiKey: Environment.MISTRAL_API_KEY});
|
export const mistralAi = new Mistral({apiKey: Environment.MISTRAL_API_KEY});
|
||||||
export const openAi = new OpenAI({apiKey: Environment.OPENAI_API_KEY, baseURL: Environment.OPENAI_BASE_URL, dangerouslyAllowBrowser: true});
|
export const openAi = new OpenAI({apiKey: Environment.OPENAI_API_KEY, baseURL: Environment.OPENAI_BASE_URL});
|
||||||
|
|
||||||
export const ollama = new Ollama({
|
export const ollama = new Ollama({
|
||||||
host: Environment.OLLAMA_ADDRESS,
|
host: Environment.OLLAMA_ADDRESS,
|
||||||
@@ -135,6 +130,7 @@ export const commands: Command[] = [
|
|||||||
new Start(),
|
new Start(),
|
||||||
new Help(),
|
new Help(),
|
||||||
new Test(),
|
new Test(),
|
||||||
|
new Ae(),
|
||||||
new Ignore(),
|
new Ignore(),
|
||||||
new Unignore(),
|
new Unignore(),
|
||||||
new Ping(),
|
new Ping(),
|
||||||
@@ -159,13 +155,9 @@ export const commands: Command[] = [
|
|||||||
new Title(),
|
new Title(),
|
||||||
new Transliteration(),
|
new Transliteration(),
|
||||||
new Debug(),
|
new Debug(),
|
||||||
new Info(),
|
|
||||||
|
|
||||||
new AdminsAdd(),
|
new AdminsAdd(),
|
||||||
new AdminsRemove(),
|
new AdminsRemove(),
|
||||||
new AdminsList(),
|
|
||||||
|
|
||||||
new ExportDb(),
|
|
||||||
|
|
||||||
new Shutdown(),
|
new Shutdown(),
|
||||||
new Leave(),
|
new Leave(),
|
||||||
@@ -173,14 +165,8 @@ export const commands: Command[] = [
|
|||||||
new YouTubeDownload()
|
new YouTubeDownload()
|
||||||
];
|
];
|
||||||
|
|
||||||
if (Environment.ENABLE_UNSAFE_EVAL) {
|
|
||||||
commands.push(new Ae());
|
|
||||||
}
|
|
||||||
|
|
||||||
export const callbackCommands: CallbackCommand[] = [
|
export const callbackCommands: CallbackCommand[] = [
|
||||||
new OllamaCancel(),
|
new OllamaCancel()
|
||||||
new DownloadYtVideo(),
|
|
||||||
new YtInfo()
|
|
||||||
];
|
];
|
||||||
|
|
||||||
if (Environment.OLLAMA_ADDRESS && Environment.OLLAMA_MODEL && Environment.SYSTEM_PROMPT) {
|
if (Environment.OLLAMA_ADDRESS && Environment.OLLAMA_MODEL && Environment.SYSTEM_PROMPT) {
|
||||||
@@ -222,40 +208,15 @@ if (Environment.OPENAI_API_KEY) {
|
|||||||
new OpenAIListModels(),
|
new OpenAIListModels(),
|
||||||
new OpenAIGetModel(),
|
new OpenAIGetModel(),
|
||||||
new OpenAISetModel(),
|
new OpenAISetModel(),
|
||||||
new OpenAIGenImage()
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const cacheDir = path.join(Environment.DATA_PATH, "cache");
|
export const photoDir = path.join(Environment.DATA_PATH, "photo");
|
||||||
export const photoDir = path.join(cacheDir, "photo");
|
export const videoDir = path.join(Environment.DATA_PATH, "video");
|
||||||
export const photoGenDir = path.join(photoDir, "gen");
|
|
||||||
export const videoDir = path.join(cacheDir, "video");
|
|
||||||
export const videoTempDir = path.join(videoDir, "temp");
|
|
||||||
|
|
||||||
let isShuttingDown = false;
|
|
||||||
|
|
||||||
async function shutdown(signal: NodeJS.Signals) {
|
|
||||||
if (isShuttingDown) return;
|
|
||||||
isShuttingDown = true;
|
|
||||||
|
|
||||||
console.log(`Received ${signal}. Stopping bot polling...`);
|
|
||||||
|
|
||||||
try {
|
|
||||||
await bot.stopPolling();
|
|
||||||
} catch (error) {
|
|
||||||
logError(error);
|
|
||||||
} finally {
|
|
||||||
process.exit(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
const start = Date.now();
|
const start = Date.now();
|
||||||
|
|
||||||
await readPrompts();
|
|
||||||
|
|
||||||
console.log(Environment.SYSTEM_PROMPT);
|
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
`TEST_ENVIRONMENT: ${Environment.TEST_ENVIRONMENT}\n` +
|
`TEST_ENVIRONMENT: ${Environment.TEST_ENVIRONMENT}\n` +
|
||||||
`DATA_PATH: ${Environment.DATA_PATH}\n` +
|
`DATA_PATH: ${Environment.DATA_PATH}\n` +
|
||||||
@@ -264,12 +225,8 @@ async function main() {
|
|||||||
`DEFAULT_AI_PROVIDER: ${Environment.DEFAULT_AI_PROVIDER}`
|
`DEFAULT_AI_PROVIDER: ${Environment.DEFAULT_AI_PROVIDER}`
|
||||||
);
|
);
|
||||||
|
|
||||||
const dirsToCheck = [cacheDir, photoDir, photoGenDir, videoDir, videoTempDir];
|
fs.mkdir(photoDir, ignore);
|
||||||
dirsToCheck.forEach(dir => {
|
fs.mkdir(videoDir, ignore);
|
||||||
if (!fs.existsSync(dir)) {
|
|
||||||
fs.mkdirSync(dir);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
|
|
||||||
@@ -278,13 +235,12 @@ async function main() {
|
|||||||
midnight.setDate(now.getDate() + 1);
|
midnight.setDate(now.getDate() + 1);
|
||||||
|
|
||||||
const diff = midnight.getTime() - now.getTime();
|
const diff = midnight.getTime() - now.getTime();
|
||||||
console.log("Clearing up cache will be started in " + diff + "ms");
|
console.log("Clearing up videos will be started in " + diff + "ms");
|
||||||
|
|
||||||
clearUpFolderFromOldFiles(cacheDir);
|
|
||||||
delay(diff).then(() => {
|
delay(diff).then(() => {
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
console.log("Started clearing up cache");
|
console.log("Started clearing up videos");
|
||||||
clearUpFolderFromOldFiles(cacheDir);
|
clearUpVideoFolder();
|
||||||
}, 1000 * 60 * 60 * 24);
|
}, 1000 * 60 * 60 * 24);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -323,12 +279,4 @@ bot.on("message", processNewMessage);
|
|||||||
bot.on("inline_query", processInlineQuery);
|
bot.on("inline_query", processInlineQuery);
|
||||||
bot.on("callback_query", processCallbackQuery);
|
bot.on("callback_query", processCallbackQuery);
|
||||||
|
|
||||||
process.on("SIGTERM", () => {
|
|
||||||
shutdown("SIGTERM").catch(logError);
|
|
||||||
});
|
|
||||||
|
|
||||||
process.on("SIGINT", () => {
|
|
||||||
shutdown("SIGINT").catch(logError);
|
|
||||||
});
|
|
||||||
|
|
||||||
main().catch(logError);
|
main().catch(logError);
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
export type AiCapabilityInfo = {
|
|
||||||
supported?: boolean,
|
|
||||||
external?: boolean,
|
|
||||||
model?: string
|
|
||||||
};
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
import {AiCapabilityInfo} from "./ai-capability-info";
|
|
||||||
|
|
||||||
export class AiModelCapabilities {
|
|
||||||
vision?: AiCapabilityInfo;
|
|
||||||
ocr?: AiCapabilityInfo;
|
|
||||||
thinking?: AiCapabilityInfo;
|
|
||||||
tools?: AiCapabilityInfo;
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
export enum AiProvider {
|
|
||||||
OLLAMA = "OLLAMA",
|
|
||||||
GEMINI = "GEMINI",
|
|
||||||
MISTRAL = "MISTRAL",
|
|
||||||
OPENAI = "OPENAI",
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
import {InlineKeyboardMarkup, Message, ParseMode} from "typescript-telegram-bot-api";
|
|
||||||
import {LinkPreviewOptions, MessageEntity} from "typescript-telegram-bot-api/dist/types";
|
|
||||||
|
|
||||||
export type EditOptions = ({
|
|
||||||
message: Message
|
|
||||||
} | {
|
|
||||||
chat_id: number;
|
|
||||||
message_id: number;
|
|
||||||
}) & {
|
|
||||||
text: string;
|
|
||||||
parse_mode?: ParseMode;
|
|
||||||
entities?: MessageEntity[];
|
|
||||||
link_preview_options?: LinkPreviewOptions;
|
|
||||||
reply_markup?: InlineKeyboardMarkup;
|
|
||||||
}
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
import {InlineKeyboardMarkup, Message, ParseMode} from "typescript-telegram-bot-api";
|
|
||||||
import {
|
|
||||||
ForceReply,
|
|
||||||
LinkPreviewOptions,
|
|
||||||
MessageEntity, ReplyKeyboardMarkup, ReplyKeyboardRemove,
|
|
||||||
ReplyParameters,
|
|
||||||
SuggestedPostParameters
|
|
||||||
} from "typescript-telegram-bot-api/dist/types";
|
|
||||||
|
|
||||||
export type SendOptions = ({
|
|
||||||
message: Message
|
|
||||||
} | {
|
|
||||||
/**
|
|
||||||
* Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
|
|
||||||
*/
|
|
||||||
chat_id: number | string;
|
|
||||||
message_id?: number;
|
|
||||||
}) & {
|
|
||||||
/**
|
|
||||||
* Unique identifier for the target message thread (topic) of the forum; for forum supergroups only
|
|
||||||
*/
|
|
||||||
message_thread_id?: number;
|
|
||||||
/**
|
|
||||||
* Identifier of the direct messages topic to which the message will be sent; required if the message is sent to a
|
|
||||||
* direct messages chat
|
|
||||||
*/
|
|
||||||
direct_messages_topic_id?: number;
|
|
||||||
/**
|
|
||||||
* Text of the message to be sent, 1-4096 characters after entities parsing
|
|
||||||
*/
|
|
||||||
text: string;
|
|
||||||
/**
|
|
||||||
* Mode for parsing entities in the message text. See formatting options for more details.
|
|
||||||
*/
|
|
||||||
parse_mode?: ParseMode;
|
|
||||||
/**
|
|
||||||
* A JSON-serialized list of special entities that appear in message text, which can be specified instead of
|
|
||||||
* parse_mode
|
|
||||||
*/
|
|
||||||
entities?: MessageEntity[];
|
|
||||||
/**
|
|
||||||
* Link preview generation options for the message
|
|
||||||
*/
|
|
||||||
link_preview_options?: LinkPreviewOptions;
|
|
||||||
/**
|
|
||||||
* Sends the message silently. Users will receive a notification with no sound.
|
|
||||||
*/
|
|
||||||
disable_notification?: boolean;
|
|
||||||
/**
|
|
||||||
* Protects the contents of the sent message from forwarding and saving
|
|
||||||
*/
|
|
||||||
protect_content?: boolean;
|
|
||||||
/**
|
|
||||||
* Pass True to allow up to 1000 messages per second, ignoring
|
|
||||||
* [broadcasting limits](https://core.telegram.org/bots/faq#how-can-i-message-all-of-my-bot-39s-subscribers-at-once)
|
|
||||||
* for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance
|
|
||||||
*/
|
|
||||||
allow_paid_broadcast?: boolean;
|
|
||||||
/**
|
|
||||||
* Unique identifier of the message effect to be added to the message; for private chats only
|
|
||||||
*/
|
|
||||||
message_effect_id?: string;
|
|
||||||
/**
|
|
||||||
* A JSON-serialized object containing the parameters of the suggested post to send; for direct messages chats only.
|
|
||||||
* If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.
|
|
||||||
*/
|
|
||||||
suggested_post_parameters?: SuggestedPostParameters;
|
|
||||||
/**
|
|
||||||
* Description of the message to reply to
|
|
||||||
*/
|
|
||||||
reply_parameters?: ReplyParameters;
|
|
||||||
/**
|
|
||||||
* Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard,
|
|
||||||
* instructions to remove a reply keyboard or to force a reply from the user
|
|
||||||
*/
|
|
||||||
reply_markup?: InlineKeyboardMarkup | ReplyKeyboardMarkup | ReplyKeyboardRemove | ForceReply;
|
|
||||||
};
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
import {FfmpegCommand} from "fluent-ffmpeg";
|
|
||||||
|
|
||||||
export async function performFFmpeg(buildFFmpeg: () => FfmpegCommand): Promise<void> {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
buildFFmpeg()
|
|
||||||
.on("end", () => {
|
|
||||||
resolve();
|
|
||||||
})
|
|
||||||
.on("error", reject);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
+18
-22
@@ -1,9 +1,10 @@
|
|||||||
import {logError} from "./utils";
|
import {logError} from "./utils";
|
||||||
import fs from "node:fs";
|
import fs from "node:fs";
|
||||||
|
import {videoDir} from "../index";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
|
|
||||||
export function clearUpFolderFromOldFiles(folder: string, recursive = true) {
|
export function clearUpVideoFolder() {
|
||||||
fs.readdir(folder, (err, files) => {
|
fs.readdir(videoDir, (err, files) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
logError(err);
|
logError(err);
|
||||||
return;
|
return;
|
||||||
@@ -11,35 +12,30 @@ export function clearUpFolderFromOldFiles(folder: string, recursive = true) {
|
|||||||
|
|
||||||
const filenamesToDelete: string[] = [];
|
const filenamesToDelete: string[] = [];
|
||||||
|
|
||||||
files.forEach(filename => {
|
files.forEach((filename, index) => {
|
||||||
const fullPath = path.join(folder, filename);
|
fs.stat(path.join(videoDir, filename), (err, stats) => {
|
||||||
|
if (err) {
|
||||||
try {
|
logError(err);
|
||||||
const stats = fs.statSync(fullPath);
|
|
||||||
if (stats.isDirectory() && recursive) {
|
|
||||||
clearUpFolderFromOldFiles(fullPath, recursive);
|
|
||||||
} else {
|
} else {
|
||||||
const then = stats.mtime.getTime() / 1000;
|
const then = stats.mtime.getTime() / 1000;
|
||||||
const now = Date.now() / 1000;
|
const now = Date.now() / 1000;
|
||||||
const diff = Math.abs(now - then);
|
const diff = Math.abs(now - then);
|
||||||
const moreThanOneDay = diff >= 60 * 60 * 24;
|
const moreThanOneDay = diff >= 60 * 60 * 24;
|
||||||
|
if (moreThanOneDay) {
|
||||||
|
filenamesToDelete.push(filename);
|
||||||
|
}
|
||||||
|
|
||||||
if (stats.isFile() && moreThanOneDay) {
|
if (index === files.length - 1) {
|
||||||
filenamesToDelete.push(fullPath);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (e) {
|
|
||||||
logError(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log("filenamesToDelete", filenamesToDelete);
|
console.log("filenamesToDelete", filenamesToDelete);
|
||||||
if (filenamesToDelete.length) {
|
if (filenamesToDelete.length) {
|
||||||
filenamesToDelete.forEach((filename) => {
|
filenamesToDelete.forEach((filename) => {
|
||||||
fs.rm(filename, (e) => {
|
const fullPath = path.join(videoDir, filename);
|
||||||
if (e) logError(e);
|
fs.rm(fullPath, logError);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
+102
-497
@@ -11,12 +11,11 @@ import {
|
|||||||
Message,
|
Message,
|
||||||
ParseMode,
|
ParseMode,
|
||||||
PhotoSize,
|
PhotoSize,
|
||||||
TelegramBot,
|
|
||||||
User
|
User
|
||||||
} from "typescript-telegram-bot-api";
|
} from "typescript-telegram-bot-api";
|
||||||
import {Environment} from "../common/environment";
|
import {AiProvider, Environment} from "../common/environment";
|
||||||
import {TelegramError} from "typescript-telegram-bot-api/dist/errors";
|
import {TelegramError} from "typescript-telegram-bot-api/dist/errors";
|
||||||
import {bot, botUser, callbackCommands, commands, messageDao, ollama, photoDir} from "../index";
|
import {bot, botUser, callbackCommands, commands, messageDao, ollama} from "../index";
|
||||||
import os from "os";
|
import os from "os";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import {MessagePart} from "../common/message-part";
|
import {MessagePart} from "../common/message-part";
|
||||||
@@ -31,25 +30,13 @@ import {MessageStore} from "../common/message-store";
|
|||||||
import {SystemInfo} from "../commands/system-info";
|
import {SystemInfo} from "../commands/system-info";
|
||||||
import {PrefixResponse} from "../commands/prefix-response";
|
import {PrefixResponse} from "../commands/prefix-response";
|
||||||
import {OllamaChat} from "../commands/ollama-chat";
|
import {OllamaChat} from "../commands/ollama-chat";
|
||||||
import {getYouTubeVideoId, getYouTubeVideoInfo, isVideoExists} from "./ytdl";
|
import {getYouTubeVideoId} from "./ytdl";
|
||||||
import {YouTubeDownload} from "../commands/youtube-download";
|
import {YouTubeDownload} from "../commands/youtube-download";
|
||||||
import {ChatCommand} from "../base/chat-command";
|
import {ChatCommand} from "../base/chat-command";
|
||||||
import {WebSearchResponse} from "../model/web-search-response";
|
import {WebSearchResponse} from "../model/web-search-response";
|
||||||
import {GeminiChat} from "../commands/gemini-chat";
|
import {GeminiChat} from "../commands/gemini-chat";
|
||||||
import {MistralChat} from "../commands/mistral-chat";
|
import {MistralChat} from "../commands/mistral-chat";
|
||||||
import {OpenAIChat} from "../commands/openai-chat";
|
import {OpenAIChat} from "../commands/openai-chat";
|
||||||
import {AiProvider} from "../model/ai-provider";
|
|
||||||
import {AiModelCapabilities} from "../model/ai-model-capabilities";
|
|
||||||
import {OllamaGetModel} from "../commands/ollama-get-model";
|
|
||||||
import {GeminiGetModel} from "../commands/gemini-get-model";
|
|
||||||
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";
|
|
||||||
|
|
||||||
export const ignore = () => {
|
export const ignore = () => {
|
||||||
};
|
};
|
||||||
@@ -61,7 +48,7 @@ export const ignoreIfNotChanged = (e: Error | TelegramError) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const ignoreIfMarkupFailed = (e: Error | TelegramError) => {
|
export const ignoreIfMarkupFailed = (e: Error | TelegramError) => {
|
||||||
if (!isMarkupFailed(e)) {
|
if (!(e instanceof TelegramError && e?.response?.description?.startsWith("Bad Request: can't parse entities"))) {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -74,18 +61,6 @@ export const errorPlaceholder = async (msg: Message) => {
|
|||||||
await sendErrorPlaceholder(msg).catch(logError);
|
await sendErrorPlaceholder(msg).catch(logError);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const isMarkupFailed = (e: Error | TelegramError) => {
|
|
||||||
return TelegramBot.isTelegramError(e) && e?.response?.description?.startsWith("Bad Request: can't parse entities");
|
|
||||||
};
|
|
||||||
|
|
||||||
export const isTooManyRequests = (e: Error | TelegramError) => {
|
|
||||||
return TelegramBot.isTelegramError(e) && e.response.description.includes("Too Many Requests");
|
|
||||||
};
|
|
||||||
|
|
||||||
export const isMessageTooLong = (e: Error | TelegramError) => {
|
|
||||||
return TelegramBot.isTelegramError(e) && e.response.description.includes("MESSAGE_TOO_LONG");
|
|
||||||
};
|
|
||||||
|
|
||||||
export function searchChatCommand(
|
export function searchChatCommand(
|
||||||
commands: Command[],
|
commands: Command[],
|
||||||
text: string,
|
text: string,
|
||||||
@@ -136,7 +111,7 @@ export async function checkRequirements(cmd: Command | CallbackCommand | null, m
|
|||||||
|
|
||||||
const cbId = cb?.id;
|
const cbId = cb?.id;
|
||||||
const chatId = msg?.chat?.id || cb?.message?.chat?.id || -1;
|
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?.message?.message_id || -1;
|
||||||
const fromId = msg?.from?.id || cb?.from?.id || -1;
|
const fromId = msg?.from?.id || cb?.from?.id || -1;
|
||||||
const chatType = msg?.chat?.type || cb?.message?.chat?.type || null;
|
const chatType = msg?.chat?.type || cb?.message?.chat?.type || null;
|
||||||
|
|
||||||
@@ -215,8 +190,11 @@ export async function checkRequirements(cmd: Command | CallbackCommand | null, m
|
|||||||
if (reqs.isRequiresSameUser()) {
|
if (reqs.isRequiresSameUser()) {
|
||||||
let originalFromId: number | null;
|
let originalFromId: number | null;
|
||||||
try {
|
try {
|
||||||
const originalMessage = await MessageStore.get(chatId, messageId);
|
const queryMessage = await MessageStore.get(chatId, messageId);
|
||||||
|
if (queryMessage && queryMessage.replyToMessageId) {
|
||||||
|
const originalMessage = await MessageStore.get(chatId, queryMessage.replyToMessageId);
|
||||||
originalFromId = originalMessage?.fromId;
|
originalFromId = originalMessage?.fromId;
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logError(e);
|
logError(e);
|
||||||
originalFromId = null;
|
originalFromId = null;
|
||||||
@@ -255,93 +233,94 @@ export async function findAndExecuteCallbackCommand(commands: CallbackCommand[],
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function oldEditMessageText(chatId: number, messageId: number, messageText: string, parseMode?: ParseMode, replyMarkup?: InlineKeyboardMarkup): Promise<boolean | Message> {
|
export async function editMessageText(chatId: number, messageId: number, messageText: string, parseMode?: ParseMode, replyMarkup?: InlineKeyboardMarkup): Promise<void> {
|
||||||
return editMessageText({
|
if (messageText.trim().length === 0) return Promise.resolve();
|
||||||
|
try {
|
||||||
|
await bot.editMessageText({
|
||||||
chat_id: chatId,
|
chat_id: chatId,
|
||||||
message_id: messageId,
|
message_id: messageId,
|
||||||
text: messageText,
|
text: messageText,
|
||||||
parse_mode: parseMode,
|
parse_mode: parseMode,
|
||||||
reply_markup: replyMarkup,
|
link_preview_options: {
|
||||||
link_preview_options: {is_disabled: true}
|
is_disabled: true
|
||||||
});
|
},
|
||||||
}
|
reply_markup: replyMarkup
|
||||||
|
}).catch(ignoreIfMarkupFailed);
|
||||||
export async function editMessageText(options: EditOptions) {
|
return Promise.resolve();
|
||||||
if (options.text.trim().length === 0) return Promise.resolve(false);
|
|
||||||
|
|
||||||
try {
|
|
||||||
const message = await bot.editMessageText({
|
|
||||||
chat_id: "message" in options ? options.message.chat.id : options.chat_id,
|
|
||||||
message_id: "message" in options ? options.message.message_id : options.message_id,
|
|
||||||
text: options.text,
|
|
||||||
parse_mode: options.parse_mode,
|
|
||||||
reply_markup: options.reply_markup,
|
|
||||||
link_preview_options: options.link_preview_options,
|
|
||||||
});
|
|
||||||
return Promise.resolve(message);
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
logError(e);
|
logError(e);
|
||||||
|
|
||||||
if (isMarkupFailed(e)) {
|
if (e instanceof TelegramError && e.response.description.includes("Too Many Requests")) {
|
||||||
return Promise.resolve(true);
|
|
||||||
} else if (isTooManyRequests(e)) {
|
|
||||||
const delay = Number(e.message.split("retry after ")[1]) || 30;
|
const delay = Number(e.message.split("retry after ")[1]) || 30;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}, delay * 1000);
|
}, delay * 1000);
|
||||||
} else {
|
} else if (e instanceof TelegramError && e.response.description.includes("MESSAGE_TOO_LONG")) {
|
||||||
return Promise.reject(e);
|
return Promise.reject(e);
|
||||||
|
} else {
|
||||||
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type SendOptions = {
|
||||||
|
chat_id?: number;
|
||||||
|
message?: Message,
|
||||||
|
message_id?: number;
|
||||||
|
text: string,
|
||||||
|
parse_mode?: ParseMode,
|
||||||
|
disableLinkPreview?: boolean
|
||||||
|
};
|
||||||
|
|
||||||
export async function oldSendMessage(message: Message, text: string, parseMode?: ParseMode): Promise<Message> {
|
export async function oldSendMessage(message: Message, text: string, parseMode?: ParseMode): Promise<Message> {
|
||||||
return sendMessage({
|
const response = await bot.sendMessage({
|
||||||
message: message,
|
chat_id: message.chat.id,
|
||||||
text: text,
|
text: text,
|
||||||
parse_mode: parseMode
|
parse_mode: parseMode
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return Promise.resolve(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function sendMessage(options: SendOptions): Promise<Message> {
|
export async function sendMessage(options: SendOptions): Promise<Message> {
|
||||||
const response = await bot.sendMessage({
|
const response = await bot.sendMessage({
|
||||||
chat_id: "message" in options ? options.message.chat.id : options.chat_id,
|
chat_id: options.chat_id ?? options.message?.chat?.id,
|
||||||
text: options.text,
|
text: options.text,
|
||||||
parse_mode: options.parse_mode,
|
parse_mode: options.parse_mode,
|
||||||
link_preview_options: options.link_preview_options,
|
link_preview_options: {
|
||||||
reply_markup: options.reply_markup,
|
is_disabled: options.disableLinkPreview
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
await MessageStore.put(response);
|
return Promise.resolve(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function replyToMessage(options: SendOptions): Promise<Message> {
|
||||||
|
const response = await bot.sendMessage({
|
||||||
|
chat_id: options.chat_id ?? options.message?.chat?.id,
|
||||||
|
text: options.text,
|
||||||
|
parse_mode: options.parse_mode,
|
||||||
|
reply_parameters: {
|
||||||
|
message_id: options.message_id || options.message?.message_id
|
||||||
|
},
|
||||||
|
link_preview_options: {
|
||||||
|
is_disabled: options.disableLinkPreview
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
return Promise.resolve(response);
|
return Promise.resolve(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function oldReplyToMessage(message: Message, text: string, parseMode?: ParseMode): Promise<Message> {
|
export async function oldReplyToMessage(message: Message, text: string, parseMode?: ParseMode): Promise<Message> {
|
||||||
return replyToMessage({
|
|
||||||
message: message,
|
|
||||||
text: text,
|
|
||||||
parse_mode: parseMode
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function replyToMessage(options: SendOptions): Promise<Message> {
|
|
||||||
if (!("message" in options) && !options.message_id) {
|
|
||||||
return Promise.reject("for reply there must be message or message_id");
|
|
||||||
}
|
|
||||||
|
|
||||||
const response = await bot.sendMessage({
|
const response = await bot.sendMessage({
|
||||||
chat_id: "message" in options ? options.message.chat.id : options.chat_id,
|
chat_id: message.chat.id,
|
||||||
text: options.text,
|
text: text,
|
||||||
parse_mode: options.parse_mode,
|
|
||||||
reply_parameters: {
|
reply_parameters: {
|
||||||
message_id: "message" in options ? options.message.message_id : options.message_id
|
message_id: message.message_id
|
||||||
},
|
},
|
||||||
link_preview_options: options.link_preview_options
|
parse_mode: parseMode,
|
||||||
});
|
});
|
||||||
|
|
||||||
await MessageStore.put(response);
|
|
||||||
|
|
||||||
return Promise.resolve(response);
|
return Promise.resolve(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -394,13 +373,11 @@ export function chatCommandToString(cmd: Command): string {
|
|||||||
return `${cmd.title ? `${cmd.title}: ` : ""}${cmd.description ? `${cmd.description}` : ""}`;
|
return `${cmd.title ? `${cmd.title}: ` : ""}${cmd.description ? `${cmd.description}` : ""}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function fullName(from: User | StoredUser): string {
|
export function fullName(from: User): string {
|
||||||
const isStored = "isBot" in from;
|
let fullName = from.first_name;
|
||||||
|
|
||||||
let fullName = isStored ? from.firstName : from.first_name;
|
if (from.last_name) {
|
||||||
|
fullName += " " + from.last_name;
|
||||||
if (isStored ? from.lastName : from.last_name) {
|
|
||||||
fullName += " " + (isStored ? from.lastName : from.last_name);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return fullName;
|
return fullName;
|
||||||
@@ -456,230 +433,14 @@ export const delay = (ms: number, signal?: AbortSignal): Promise<void> =>
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const MARKDOWN_V2_RESERVED_RE = /([\\_*\[\]()~`>#+\-=|{}.!])/g;
|
export function escapeMarkdownV2Text(s: string) {
|
||||||
|
s = s.replace(/^\*{3,}\s*$/gm, "— — —");
|
||||||
function escapePlainMarkdownV2(s: string): string {
|
s = s.replace(/^\*\s+(?=\S)/gm, "• ");
|
||||||
return s.replace(MARKDOWN_V2_RESERVED_RE, "\\$1");
|
s = s.replace(/\*\*(.+?)\*\*/g, "*$1*");
|
||||||
}
|
|
||||||
|
|
||||||
function escapeCodeMarkdownV2(s: string): string {
|
|
||||||
return s.replace(/[\\`]/g, "\\$&");
|
|
||||||
}
|
|
||||||
|
|
||||||
function escapeLinkUrlMarkdownV2(s: string): string {
|
|
||||||
return s.replace(/[\\)]/g, "\\$&");
|
|
||||||
}
|
|
||||||
|
|
||||||
function escapeMarkdownV2PreservingAllowedFormatting(s: string): string {
|
|
||||||
let result = "";
|
|
||||||
let i = 0;
|
|
||||||
|
|
||||||
while (i < s.length) {
|
|
||||||
// links: [text](url)
|
|
||||||
if (s[i] === "[") {
|
|
||||||
const linkMatch = s.slice(i).match(/^\[([^\]\n]+)]\(([^)\n]+)\)/);
|
|
||||||
|
|
||||||
if (linkMatch) {
|
|
||||||
const [, text, url] = linkMatch;
|
|
||||||
result += `[${escapePlainMarkdownV2(text)}](${escapeLinkUrlMarkdownV2(url)})`;
|
|
||||||
i += linkMatch[0].length;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// monospace: `text`
|
|
||||||
if (s[i] === "`") {
|
|
||||||
const end = s.indexOf("`", i + 1);
|
|
||||||
|
|
||||||
if (end !== -1) {
|
|
||||||
const content = s.slice(i + 1, end);
|
|
||||||
result += "`" + escapeCodeMarkdownV2(content) + "`";
|
|
||||||
i = end + 1;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// spoiler: ||text||
|
|
||||||
if (s.startsWith("||", i)) {
|
|
||||||
const end = s.indexOf("||", i + 2);
|
|
||||||
|
|
||||||
if (end !== -1) {
|
|
||||||
const content = s.slice(i + 2, end);
|
|
||||||
result += "||" + escapeMarkdownV2PreservingAllowedFormatting(content) + "||";
|
|
||||||
i = end + 2;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// underline: __text__
|
|
||||||
if (s.startsWith("__", i)) {
|
|
||||||
const end = s.indexOf("__", i + 2);
|
|
||||||
|
|
||||||
if (end !== -1) {
|
|
||||||
const content = s.slice(i + 2, end);
|
|
||||||
result += "__" + escapeMarkdownV2PreservingAllowedFormatting(content) + "__";
|
|
||||||
i = end + 2;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// bold: *text*
|
|
||||||
if (s[i] === "*") {
|
|
||||||
const end = s.indexOf("*", i + 1);
|
|
||||||
|
|
||||||
if (end !== -1) {
|
|
||||||
const content = s.slice(i + 1, end);
|
|
||||||
result += "*" + escapeMarkdownV2PreservingAllowedFormatting(content) + "*";
|
|
||||||
i = end + 1;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// italic: _text_
|
|
||||||
if (s[i] === "_") {
|
|
||||||
const end = s.indexOf("_", i + 1);
|
|
||||||
|
|
||||||
if (end !== -1) {
|
|
||||||
const content = s.slice(i + 1, end);
|
|
||||||
result += "_" + escapeMarkdownV2PreservingAllowedFormatting(content) + "_";
|
|
||||||
i = end + 1;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// strikethrough: ~text~
|
|
||||||
if (s[i] === "~") {
|
|
||||||
const end = s.indexOf("~", i + 1);
|
|
||||||
|
|
||||||
if (end !== -1) {
|
|
||||||
const content = s.slice(i + 1, end);
|
|
||||||
result += "~" + escapeMarkdownV2PreservingAllowedFormatting(content) + "~";
|
|
||||||
i = end + 1;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
result += escapePlainMarkdownV2(s[i]);
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
function unescapeAccidentalMarkdownV2(s: string): string {
|
|
||||||
let prev: string;
|
|
||||||
|
|
||||||
do {
|
|
||||||
prev = s;
|
|
||||||
s = s.replace(/\\([_*\[\]()~`>#+\-=|{}.!\\])/g, "$1");
|
|
||||||
} while (s !== prev);
|
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
function escapeTelegramQuoteLine(line: string): string {
|
|
||||||
const content = line.replace(/^>\s*/, "");
|
|
||||||
|
|
||||||
if (!content.trim()) {
|
|
||||||
return ">";
|
|
||||||
}
|
|
||||||
|
|
||||||
return ">" + escapeMarkdownV2PreservingAllowedFormatting(content);
|
|
||||||
}
|
|
||||||
|
|
||||||
function normalizeTelegramQuoteLines(s: string): string {
|
|
||||||
return s
|
|
||||||
.split("\n")
|
|
||||||
.map(line => {
|
|
||||||
if (!line.startsWith(">")) return line;
|
|
||||||
|
|
||||||
return line.replace(/^>\s+/, ">");
|
|
||||||
})
|
|
||||||
.join("\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
function looksLikeMarkdownTableRow(line: string): boolean {
|
|
||||||
const trimmed = line.trim();
|
|
||||||
|
|
||||||
if (trimmed.startsWith("||") && trimmed.endsWith("||")) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const pipeCount = (trimmed.match(/\|/g) ?? []).length;
|
|
||||||
|
|
||||||
if (pipeCount < 2) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return trimmed.startsWith("|") || trimmed.endsWith("|") || pipeCount >= 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
function isMarkdownTableSeparator(line: string): boolean {
|
|
||||||
return /^\s*\|?\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)+\|?\s*$/.test(line);
|
|
||||||
}
|
|
||||||
|
|
||||||
function normalizeMarkdownTables(s: string): string {
|
|
||||||
return s
|
|
||||||
.split("\n")
|
|
||||||
.filter(line => !isMarkdownTableSeparator(line))
|
|
||||||
.map(line => {
|
|
||||||
if (!looksLikeMarkdownTableRow(line)) {
|
|
||||||
return line;
|
|
||||||
}
|
|
||||||
|
|
||||||
return line
|
|
||||||
.replace(/^\s*\|/, "")
|
|
||||||
.replace(/\|\s*$/, "")
|
|
||||||
.split("|")
|
|
||||||
.map(cell => cell.trim())
|
|
||||||
.filter(Boolean)
|
|
||||||
.join(" — ");
|
|
||||||
})
|
|
||||||
.join("\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
export function escapeMarkdownV2Text(s: string): string {
|
|
||||||
s = unescapeAccidentalMarkdownV2(s);
|
|
||||||
s = normalizeTelegramQuoteLines(s);
|
|
||||||
|
|
||||||
s = s.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
||||||
|
|
||||||
s = s.replace(/^\s*[-*_]{3,}\s*$/gm, "— — —");
|
|
||||||
s = s.replace(/^\s*[-*+]\s+(?=\S)/gm, "• ");
|
|
||||||
s = s.replace(/\*\*(.+?)\*\*/gs, "*$1*");
|
|
||||||
s = s.replace(/~~(.+?)~~/gs, "~$1~");
|
|
||||||
s = s.replace(/^#{1,6}\s+/gm, "");
|
|
||||||
|
|
||||||
s = s.replace(/```[a-zA-Z0-9_-]*\n?([\s\S]*?)```/g, (_, code) => {
|
|
||||||
return code.trim();
|
|
||||||
});
|
|
||||||
|
|
||||||
s = s.replace(/!\[([^\]]*)]\(([^)]+)\)/g, (_, alt, url) => {
|
|
||||||
return alt ? `${alt}: ${url}` : url;
|
|
||||||
});
|
|
||||||
|
|
||||||
s = normalizeMarkdownTables(s);
|
|
||||||
|
|
||||||
s = s
|
|
||||||
.split("\n")
|
|
||||||
.map(line => {
|
|
||||||
if (line.startsWith(">")) {
|
|
||||||
return escapeTelegramQuoteLine(line);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (line === ">") {
|
|
||||||
return ">";
|
|
||||||
}
|
|
||||||
|
|
||||||
return escapeMarkdownV2PreservingAllowedFormatting(line);
|
|
||||||
})
|
|
||||||
.join("\n");
|
|
||||||
|
|
||||||
s = s.replace(/\n{3,}/g, "\n\n");
|
|
||||||
|
|
||||||
return s.trim();
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function getFileUrl(fileId: string): Promise<string> {
|
export async function getFileUrl(fileId: string): Promise<string> {
|
||||||
const file = await bot.getFile({file_id: fileId});
|
const file = await bot.getFile({file_id: fileId});
|
||||||
return `https://api.telegram.org/file/bot${bot.botToken}/${file.file_path}`;
|
return `https://api.telegram.org/file/bot${bot.botToken}/${file.file_path}`;
|
||||||
@@ -710,10 +471,7 @@ export async function getUserAvatar(userId: number): Promise<Buffer | null> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function extractTextMessage(msg: Message | StoredMessage | string): string | null {
|
export function extractTextMessage(msg: Message | StoredMessage | string): string | null {
|
||||||
if (!msg) return null;
|
const text = (typeof msg === "string" ? msg : isStoredMessage(msg) ? msg.text : msg?.text ?? msg?.caption ?? "").trim();
|
||||||
if (typeof msg === "string") return msg;
|
|
||||||
|
|
||||||
const text = (isStoredMessage(msg) ? msg.text : msg.text || msg.caption || "").trim();
|
|
||||||
if (text.length === 0) return null;
|
if (text.length === 0) return null;
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
@@ -737,8 +495,6 @@ export function cutPrefixes(msg: Message | StoredMessage | string): string {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const text = extractTextMessage(msg);
|
const text = extractTextMessage(msg);
|
||||||
if (!text || !text.length) return "";
|
|
||||||
|
|
||||||
let newText = text;
|
let newText = text;
|
||||||
|
|
||||||
for (const prefix of prefixes) {
|
for (const prefix of prefixes) {
|
||||||
@@ -773,7 +529,12 @@ export async function loadImagesIfExists(msg: Message | StoredMessage): Promise<
|
|||||||
|
|
||||||
const maxSize = await mapPhotoSizeToMax(getPhotoMaxSize(msg.photo));
|
const maxSize = await mapPhotoSizeToMax(getPhotoMaxSize(msg.photo));
|
||||||
if (maxSize) {
|
if (maxSize) {
|
||||||
let imageFilePath = path.join(photoDir, maxSize.unique_file_id + ".jpg");
|
const imagePath = path.join(Environment.DATA_PATH, "photo");
|
||||||
|
if (!fs.existsSync(imagePath)) {
|
||||||
|
fs.mkdirSync(imagePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
let imageFilePath = path.join(imagePath, maxSize.unique_file_id + ".jpg");
|
||||||
if (!fs.existsSync(imageFilePath)) {
|
if (!fs.existsSync(imageFilePath)) {
|
||||||
const res = await axios.get<ArrayBuffer>(maxSize.url, {responseType: "arraybuffer"});
|
const res = await axios.get<ArrayBuffer>(maxSize.url, {responseType: "arraybuffer"});
|
||||||
const src = Buffer.from(res.data);
|
const src = Buffer.from(res.data);
|
||||||
@@ -797,6 +558,11 @@ export async function loadImagesIfExists(msg: Message | StoredMessage): Promise<
|
|||||||
export async function loadImagesFromFileIds(sizes: PhotoSize[]): Promise<string[] | null> {
|
export async function loadImagesFromFileIds(sizes: PhotoSize[]): Promise<string[] | null> {
|
||||||
if (!sizes?.length) return null;
|
if (!sizes?.length) return null;
|
||||||
|
|
||||||
|
const dataPath = path.join(Environment.DATA_PATH, "photo");
|
||||||
|
if (!fs.existsSync(dataPath)) {
|
||||||
|
fs.mkdirSync(dataPath);
|
||||||
|
}
|
||||||
|
|
||||||
const existing =
|
const existing =
|
||||||
sizes.filter(s => fs.existsSync(photoPathByUniqueId(s.file_unique_id)))
|
sizes.filter(s => fs.existsSync(photoPathByUniqueId(s.file_unique_id)))
|
||||||
.map(s => s.file_unique_id);
|
.map(s => s.file_unique_id);
|
||||||
@@ -814,7 +580,7 @@ export async function loadImagesFromFileIds(sizes: PhotoSize[]): Promise<string[
|
|||||||
const paths = responses.map((res, index) => {
|
const paths = responses.map((res, index) => {
|
||||||
try {
|
try {
|
||||||
const uniqueFileId = maxSizes[index].unique_file_id;
|
const uniqueFileId = maxSizes[index].unique_file_id;
|
||||||
const imageFilePath = path.join(photoDir, uniqueFileId + ".jpg");
|
const imageFilePath = path.join(dataPath, uniqueFileId + ".jpg");
|
||||||
const src = Buffer.from(res.data);
|
const src = Buffer.from(res.data);
|
||||||
fs.writeFileSync(imageFilePath, src);
|
fs.writeFileSync(imageFilePath, src);
|
||||||
return uniqueFileId;
|
return uniqueFileId;
|
||||||
@@ -1288,66 +1054,7 @@ async function processAlbum(groupId: string): Promise<string[]> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function photoPathByUniqueId(uniqueId: string): string {
|
export function photoPathByUniqueId(uniqueId: string): string {
|
||||||
return path.join(photoDir, uniqueId + ".jpg");
|
return path.join(Environment.DATA_PATH, "photo", uniqueId + ".jpg");
|
||||||
}
|
|
||||||
|
|
||||||
export function getCurrentModel(): string {
|
|
||||||
switch (Environment.DEFAULT_AI_PROVIDER) {
|
|
||||||
case AiProvider.OLLAMA:
|
|
||||||
return Environment.OLLAMA_MODEL;
|
|
||||||
case AiProvider.GEMINI:
|
|
||||||
return Environment.GEMINI_MODEL;
|
|
||||||
case AiProvider.MISTRAL:
|
|
||||||
return Environment.MISTRAL_MODEL;
|
|
||||||
case AiProvider.OPENAI:
|
|
||||||
return Environment.OPENAI_MODEL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export async function getCurrentModelCapabilities(): Promise<AiModelCapabilities | null> {
|
|
||||||
let promise: Promise<AiModelCapabilities | null> = null;
|
|
||||||
switch (Environment.DEFAULT_AI_PROVIDER) {
|
|
||||||
case AiProvider.OLLAMA: {
|
|
||||||
const ollamaGetModel = commands.find(c => c instanceof OllamaGetModel);
|
|
||||||
|
|
||||||
// eslint-disable-next-line no-async-promise-executor
|
|
||||||
promise = new Promise(async (resolve, reject) => {
|
|
||||||
try {
|
|
||||||
const result = {
|
|
||||||
vision: (await ollamaGetModel.loadImageModelInfo()).vision,
|
|
||||||
ocr: null,
|
|
||||||
thinking: (await ollamaGetModel.loadThinkModelInfo()).thinking,
|
|
||||||
tools: (await ollamaGetModel.getModelCapabilities()).tools
|
|
||||||
};
|
|
||||||
resolve(result);
|
|
||||||
} catch (e) {
|
|
||||||
reject(e);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case AiProvider.GEMINI: {
|
|
||||||
promise = commands.find(c => c instanceof GeminiGetModel).getModelCapabilities();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case AiProvider.MISTRAL: {
|
|
||||||
promise = commands.find(c => c instanceof MistralGetModel).getModelCapabilities();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case AiProvider.OPENAI: {
|
|
||||||
promise = commands.find(c => c instanceof OpenAIGetModel).getModelCapabilities();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!promise) return null;
|
|
||||||
|
|
||||||
try {
|
|
||||||
return await promise;
|
|
||||||
} catch (e) {
|
|
||||||
logError(e);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function processMyChatMember(u: ChatMemberUpdated): Promise<void> {
|
export async function processMyChatMember(u: ChatMemberUpdated): Promise<void> {
|
||||||
@@ -1374,7 +1081,7 @@ export async function processNewMessage(msg: Message): Promise<void> {
|
|||||||
logError(e);
|
logError(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((msg.new_chat_members?.length)) {
|
if ((msg.new_chat_members?.length || 0 > 0)) {
|
||||||
await bot.sendMessage({chat_id: msg.chat.id, text: randomValue(Environment.ANSWERS.invite)}).catch(logError);
|
await bot.sendMessage({chat_id: msg.chat.id, text: randomValue(Environment.ANSWERS.invite)}).catch(logError);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1435,11 +1142,28 @@ export async function processNewMessage(msg: Message): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const textToCheck = startsWithPrefix ? messageWithoutPrefix : cmdText;
|
const textToCheck = startsWithPrefix ? messageWithoutPrefix : cmdText;
|
||||||
|
if (msg.entities) {
|
||||||
|
const urlEntities = msg.entities.filter(e => e.type === "url");
|
||||||
|
if (urlEntities.length) {
|
||||||
|
for (const e of urlEntities) {
|
||||||
|
const url = msg.text.substring(e.offset, e.offset + e.length);
|
||||||
|
// TODO: 31/01/2026, Danil Nikolaev: implement proper checking
|
||||||
|
try {
|
||||||
|
getYouTubeVideoId(url);
|
||||||
|
|
||||||
if (Environment.PROCESS_LINKS && await processYouTubeLink(msg, getFirstLink(msg))) return;
|
const yt = commands.find(e => e instanceof YouTubeDownload);
|
||||||
|
if (await checkRequirements(yt, msg)) {
|
||||||
if (msg.chat.type !== "private" && (!msg.reply_to_message || msg.reply_to_message.from.id !== botUser.id) && !startsWithPrefix) return;
|
await yt.downloadYouTubeVideo(msg, url);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
} catch (e) {
|
||||||
|
logError(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!startsWithPrefix && msg.chat.type !== "private") return;
|
||||||
if (msg.chat.type === "private" && !Environment.ADMIN_IDS.has(msg.chat.id)) return;
|
if (msg.chat.type === "private" && !Environment.ADMIN_IDS.has(msg.chat.id)) return;
|
||||||
|
|
||||||
switch (Environment.DEFAULT_AI_PROVIDER) {
|
switch (Environment.DEFAULT_AI_PROVIDER) {
|
||||||
@@ -1462,125 +1186,6 @@ export async function processNewMessage(msg: Message): Promise<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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<boolean> {
|
|
||||||
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<void> {
|
export async function processEditedMessage(msg: Message): Promise<void> {
|
||||||
console.log("Edited Message", msg);
|
console.log("Edited Message", msg);
|
||||||
|
|
||||||
|
|||||||
+31
-107
@@ -1,62 +1,16 @@
|
|||||||
import fs from "node:fs";
|
import Innertube, {Platform, Types, Utils} from "youtubei.js";
|
||||||
|
import fs, {createWriteStream} from "node:fs";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
import {videoDir, videoTempDir} from "../index";
|
import {Environment} from "../common/environment";
|
||||||
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<Innertube> {
|
|
||||||
if (innertube) {
|
|
||||||
return innertube;
|
|
||||||
} else {
|
|
||||||
innertube = await Innertube.create({
|
|
||||||
generate_session_locally: true,
|
|
||||||
retrieve_player: true
|
|
||||||
});
|
|
||||||
return innertube;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getYouTubeVideoId(url: string): string {
|
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 regex = /(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?|shorts)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/i;
|
||||||
const match = url.match(regex);
|
const match = url.match(regex);
|
||||||
if (!match || !match[1]) throw new Error("Invalid YouTube or Shorts URL");
|
if (!match || !match[1]) throw new Error("Invalid YouTube or Shorts URL");
|
||||||
return match[1];
|
return match[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getYouTubeVideoInfo(videoId: string): Promise<VideoInfo> {
|
export async function downloadVideoFromYouTube(url: string, targetQuality: string = "720p"): 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,
|
time: number,
|
||||||
exists?: boolean,
|
exists?: boolean,
|
||||||
buffer: Buffer | null
|
buffer: Buffer | null
|
||||||
@@ -65,8 +19,13 @@ export async function downloadVideoFromYouTube(options: DownloadOptions): Promis
|
|||||||
let buffer: Buffer | null = null;
|
let buffer: Buffer | null = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const videoId = "videoId" in options ? options.videoId : getYouTubeVideoId(options.url);
|
const videoId = getYouTubeVideoId(url);
|
||||||
const filePath = path.join(videoDir, `${videoId}.mp4`);
|
const videoFolder = path.join(Environment.DATA_PATH, "video");
|
||||||
|
if (!fs.existsSync(videoFolder)) {
|
||||||
|
fs.mkdirSync(videoFolder);
|
||||||
|
}
|
||||||
|
|
||||||
|
const filePath = path.join(videoFolder, `${videoId}.mp4`);
|
||||||
if (fs.existsSync(filePath)) {
|
if (fs.existsSync(filePath)) {
|
||||||
const buffer = Buffer.from(fs.readFileSync(filePath));
|
const buffer = Buffer.from(fs.readFileSync(filePath));
|
||||||
return {
|
return {
|
||||||
@@ -84,74 +43,39 @@ export async function downloadVideoFromYouTube(options: DownloadOptions): Promis
|
|||||||
const code = `${data.output}\nreturn { ${properties.join(", ")} }`;
|
const code = `${data.output}\nreturn { ${properties.join(", ")} }`;
|
||||||
return new Function(code)();
|
return new Function(code)();
|
||||||
};
|
};
|
||||||
|
const yt = await Innertube.create({
|
||||||
|
generate_session_locally: true,
|
||||||
|
retrieve_player: true
|
||||||
|
});
|
||||||
|
|
||||||
const yt = await getYT();
|
const info = await yt.getInfo(videoId);
|
||||||
|
|
||||||
const videoInfo = await yt.getInfo(videoId, {client: "ANDROID"});
|
|
||||||
console.log("Video info", videoInfo);
|
|
||||||
|
|
||||||
console.log(`Fetching metadata for: ${videoId}...`);
|
console.log(`Fetching metadata for: ${videoId}...`);
|
||||||
|
|
||||||
const targetQuality = "360p";
|
const format = info.streaming_data?.formats.find(f => f.quality_label === targetQuality)
|
||||||
|
|| info.streaming_data?.adaptive_formats.find(f => f.quality_label === targetQuality);
|
||||||
|
|
||||||
const videoFormat = videoInfo.streaming_data?.formats.find(f => f.quality_label.startsWith(targetQuality))
|
if (!format) {
|
||||||
|| 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.`);
|
console.log(`Quality ${targetQuality} not found. Falling back to best available.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const videoWebStream = await videoInfo.download({
|
const stream = await yt.download(videoId, {
|
||||||
itag: videoFormat.itag,
|
type: "video+audio",
|
||||||
client: "ANDROID"
|
quality: "best",
|
||||||
|
format: "mp4"
|
||||||
});
|
});
|
||||||
|
|
||||||
const audioWebStream = await videoInfo.download({
|
const file = createWriteStream(filePath);
|
||||||
itag: audioFormat.itag,
|
|
||||||
client: "ANDROID"
|
|
||||||
});
|
|
||||||
|
|
||||||
const videoStream = Readable.fromWeb(videoWebStream as any);
|
console.log("Downloading...");
|
||||||
const audioStream = Readable.fromWeb(audioWebStream as any);
|
|
||||||
|
|
||||||
const videoPath = path.join(videoTempDir, `temp_video_${videoId}.mp4`);
|
for await (const chunk of Utils.streamToIterable(stream)) {
|
||||||
const audioPath = path.join(videoTempDir, `temp_audio_${videoId}.mp4`);
|
file.write(chunk);
|
||||||
|
}
|
||||||
|
|
||||||
const writeStream = (stream: any, path: string) =>
|
file.end();
|
||||||
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);
|
buffer = fs.readFileSync(filePath);
|
||||||
|
|
||||||
console.log(`✅ Saved to ${videoId}.mp4`);
|
console.log(`✅ Saved to ${videoId}.mp4`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("❌ Download failed:", error instanceof Error ? error.message : error);
|
console.error("❌ Download failed:", error instanceof Error ? error.message : error);
|
||||||
@@ -160,7 +84,7 @@ export async function downloadVideoFromYouTube(options: DownloadOptions): Promis
|
|||||||
|
|
||||||
const end = Date.now();
|
const end = Date.now();
|
||||||
const diff = end - start;
|
const diff = end - start;
|
||||||
console.log(`Video downloaded.\ntook ${diff}ms`);
|
console.log(`Video downloaded. URL: ${url}\ntook ${diff}ms`);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
time: diff,
|
time: diff,
|
||||||
|
|||||||
Reference in New Issue
Block a user