From d96c7c302b54eec7e60b5441ef405afcc31583b4 Mon Sep 17 00:00:00 2001 From: Clansty Date: Wed, 11 Dec 2024 13:06:28 +0800 Subject: [PATCH] bump deps --- main/package.json | 28 ++++---- patches/telegram@2.26.6.patch | 118 ---------------------------------- 2 files changed, 14 insertions(+), 132 deletions(-) delete mode 100644 patches/telegram@2.26.6.patch diff --git a/main/package.json b/main/package.json index 342165b..934a386 100644 --- a/main/package.json +++ b/main/package.json @@ -14,48 +14,48 @@ ], "devDependencies": { "@elysiajs/html": "^1.1.1", - "@kitajs/ts-html-plugin": "^4.1.0", + "@kitajs/ts-html-plugin": "^4.1.1", "@types/cli-progress": "^3.11.6", - "@types/dockerode": "^3.3.31", + "@types/dockerode": "^3.3.32", "@types/ejs": "^3.1.5", "@types/fluent-ffmpeg": "^2.1.27", "@types/lodash": "^4.17.13", "@types/markdown-escape": "^1.1.3", "@types/mime-types": "^2.1.4", - "@types/node": "^22.8.4", + "@types/node": "^22.10.1", "@types/probe-image-size": "^7.2.5", "@types/prompts": "^2.4.9", "@types/tmp": "^0.2.6", - "axios": "^1.7.7", + "axios": "^1.7.9", "big-integer": "^1.6.52", "cli-progress": "^3.12.0", "date-fns": "^4.1.0", - "dotenv": "^16.4.5", - "elysia": "^1.1.23", + "dotenv": "^16.4.7", + "elysia": "^1.1.26", "esbuild": "^0.24.0", "eviltransform": "^0.2.2", - "file-type": "19.3.0", + "file-type": "19.6.0", "fluent-ffmpeg": "^2.1.3", "image-size": "^1.1.1", "lodash": "^4.17.21", "log4js": "^6.9.1", "mime-types": "^2.1.35", - "node-napcat-ts": "^0.3.8", + "node-napcat-ts": "^0.4.1", "nodejs-base64": "^2.0.0", - "posthog-node": "^4.2.1", + "posthog-node": "^4.3.1", "prompts": "^2.4.2", - "telegram": "^2.26.6", + "telegram": "^2.26.8", "tmp-promise": "^3.0.3", "tsx": "^4.19.2", - "undici": "^6.20.1", - "zod": "^3.23.8" + "undici": "^7.1.0", + "zod": "^3.24.1" }, "dependencies": { "@bogeychan/elysia-polyfills": "^0.6.4", "@icqqjs/icqq": "1.3.2", - "@prisma/client": "5.21.1", + "@prisma/client": "6.0.1", "dockerode": "^4.0.2", - "prisma": "5.21.1", + "prisma": "6.0.1", "quote-api": "https://github.com/Clansty/quote-api/archive/014b21138afbbe0e12c91b00561414b1e851fc0f.tar.gz", "sharp": "^0.33.5", "silk-sdk": "^0.2.2" diff --git a/patches/telegram@2.26.6.patch b/patches/telegram@2.26.6.patch deleted file mode 100644 index 7965955..0000000 --- a/patches/telegram@2.26.6.patch +++ /dev/null @@ -1,118 +0,0 @@ -diff --git a/client/messages.d.ts b/client/messages.d.ts -index 14f3730e5b406fcfeffe22e6735a1e109f496202..1efefbbfe996f098f45f346ac094426931acf078 100644 ---- a/client/messages.d.ts -+++ b/client/messages.d.ts -@@ -113,7 +113,7 @@ export interface SendMessageParams { - /** A list of message formatting entities. When provided, the parseMode is ignored. */ - formattingEntities?: Api.TypeMessageEntity[]; - /** Should the link preview be shown? */ -- linkPreview?: boolean; -+ linkPreview?: boolean | { showAboveText: boolean}; - /** Sends a message with a file attached (e.g. a photo, video, audio or document). The message may be empty. */ - file?: FileLike | FileLike[]; - /** Optional JPEG thumbnail (for documents). Telegram will ignore this parameter unless you pass a .jpg file!
-@@ -181,7 +181,7 @@ export interface EditMessageParams { - /** A list of message formatting entities. When provided, the parseMode is ignored. */ - formattingEntities?: Api.TypeMessageEntity[]; - /** Should the link preview be shown? */ -- linkPreview?: boolean; -+ linkPreview?: boolean | { showAboveText: boolean}; - /** The file object that should replace the existing media in the message. Does nothing if entity was a Message */ - file?: FileLike; - /** Whether to send the given file as a document or not. */ -diff --git a/client/messages.js b/client/messages.js -index 78899794ddf8f71d7769bfd19227ed8670ea8548..b0f40c0ee6d0350e36a2814d576704ba1eb76953 100644 ---- a/client/messages.js -+++ b/client/messages.js -@@ -461,6 +461,7 @@ entity, - noforwards: noforwards, - commentTo: commentTo, - topMsgId: topMsgId, -+ invertMedia: typeof linkPreview === 'object' ? linkPreview.showAboveText : false, - }); - } - entity = await client.getInputEntity(entity); -@@ -508,6 +509,7 @@ entity, - entities: message.entities, - clearDraft: clearDraft, - noWebpage: !(message.media instanceof tl_1.Api.MessageMediaWebPage), -+ invertMedia: typeof linkPreview === 'object' ? linkPreview.showAboveText : false, - scheduleDate: schedule, - noforwards: noforwards, - }); -@@ -525,6 +527,7 @@ entity, - message: message.toString(), - entities: formattingEntities, - noWebpage: !linkPreview, -+ invertMedia: typeof linkPreview === 'object' ? linkPreview.showAboveText : false, - replyTo: replyObject, - clearDraft: clearDraft, - silent: silent, -@@ -658,6 +661,7 @@ async function editMessage(client, entity, { message, text, parseMode, formattin - id, - message: text, - noWebpage: !linkPreview, -+ invertMedia: typeof linkPreview === 'object' ? linkPreview.showAboveText : false, - entities, - media: inputMedia, - replyMarkup: markup, -diff --git a/client/uploads.d.ts b/client/uploads.d.ts -index ff7af2d3be9b32162b5e1630d4b16ab0c7547649..f4768c29ea555638a7ebce7405bed56dba5c43e7 100644 ---- a/client/uploads.d.ts -+++ b/client/uploads.d.ts -@@ -109,6 +109,10 @@ export interface SendFileInterface { - * Used for threads to reply to a specific thread - */ - topMsgId?: number | Api.Message; -+ /** -+ * Show media (usually link preview) on the top of message text -+ */ -+ invertMedia?: boolean; - } - interface FileToMediaInterface { - file: FileLike; -diff --git a/client/uploads.js b/client/uploads.js -index 9392c42342a97ee253be8295c1a086b690673dca..3721a18b92568236faca12837b3fb074760525ec 100644 ---- a/client/uploads.js -+++ b/client/uploads.js -@@ -316,7 +316,7 @@ async function _fileToMedia(client, { file, forceDocument, fileSize, progressCal - } - exports._fileToMedia = _fileToMedia; - /** @hidden */ --async function _sendAlbum(client, entity, { file, caption, forceDocument = false, fileSize, clearDraft = false, progressCallback, replyTo, attributes, thumb, parseMode, voiceNote = false, videoNote = false, silent, supportsStreaming = false, scheduleDate, workers = 1, noforwards, commentTo, topMsgId, }) { -+async function _sendAlbum(client, entity, { file, caption, forceDocument = false, fileSize, clearDraft = false, progressCallback, replyTo, attributes, thumb, parseMode, voiceNote = false, videoNote = false, silent, supportsStreaming = false, scheduleDate, workers = 1, noforwards, commentTo, topMsgId, invertMedia = false, }) { - entity = await client.getInputEntity(entity); - let files = []; - if (!Array.isArray(file)) { -@@ -408,13 +408,14 @@ async function _sendAlbum(client, entity, { file, caption, forceDocument = false - scheduleDate: scheduleDate, - clearDraft: clearDraft, - noforwards: noforwards, -+ invertMedia: invertMedia, - })); - const randomIds = albumFiles.map((m) => m.randomId); - return client._getResponseMessage(randomIds, result, entity); - } - exports._sendAlbum = _sendAlbum; - /** @hidden */ --async function sendFile(client, entity, { file, caption, forceDocument = false, fileSize, clearDraft = false, progressCallback, replyTo, attributes, thumb, parseMode, formattingEntities, voiceNote = false, videoNote = false, buttons, silent, supportsStreaming = false, scheduleDate, workers = 1, noforwards, commentTo, topMsgId, }) { -+async function sendFile(client, entity, { file, caption, forceDocument = false, fileSize, clearDraft = false, progressCallback, replyTo, attributes, thumb, parseMode, formattingEntities, voiceNote = false, videoNote = false, buttons, silent, supportsStreaming = false, scheduleDate, workers = 1, noforwards, commentTo, topMsgId, invertMedia = false, }) { - if (!file) { - throw new Error("You need to specify a file"); - } -@@ -444,6 +445,7 @@ async function sendFile(client, entity, { file, caption, forceDocument = false, - forceDocument: forceDocument, - noforwards: noforwards, - topMsgId: topMsgId, -+ invertMedia: invertMedia, - }); - } - if (Array.isArray(caption)) { -@@ -491,6 +493,7 @@ async function sendFile(client, entity, { file, caption, forceDocument = false, - scheduleDate: scheduleDate, - clearDraft: clearDraft, - noforwards: noforwards, -+ invertMedia: invertMedia, - }); - const result = await client.invoke(request); - return client._getResponseMessage(request, result, entity);