Skip to content

Commit

Permalink
bump: deps
Browse files Browse the repository at this point in the history
  • Loading branch information
clansty committed Oct 30, 2024
1 parent ad3fc28 commit 0fa6d30
Show file tree
Hide file tree
Showing 8 changed files with 1,243 additions and 1,100 deletions.
36 changes: 18 additions & 18 deletions main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,49 +13,49 @@
"assets"
],
"devDependencies": {
"@elysiajs/html": "^1.1.0",
"@kitajs/ts-html-plugin": "^4.0.2",
"@elysiajs/html": "^1.1.1",
"@kitajs/ts-html-plugin": "^4.1.0",
"@types/cli-progress": "^3.11.6",
"@types/dockerode": "^3.3.31",
"@types/ejs": "^3.1.5",
"@types/fluent-ffmpeg": "^2.1.26",
"@types/lodash": "^4.17.7",
"@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.5.1",
"@types/node": "^22.8.4",
"@types/probe-image-size": "^7.2.5",
"@types/prompts": "^2.4.9",
"@types/tmp": "^0.2.6",
"axios": "^1.7.5",
"axios": "^1.7.7",
"big-integer": "^1.6.52",
"cli-progress": "^3.12.0",
"date-fns": "^3.6.0",
"date-fns": "^4.1.0",
"dotenv": "^16.4.5",
"elysia": "^1.1.9",
"esbuild": "^0.23.1",
"elysia": "^1.1.23",
"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.2.6",
"node-napcat-ts": "^0.3.8",
"nodejs-base64": "^2.0.0",
"posthog-node": "^4.2.0",
"posthog-node": "^4.2.1",
"prompts": "^2.4.2",
"telegram": "^2.24.11",
"telegram": "^2.26.6",
"tmp-promise": "^3.0.3",
"tsx": "^4.19.0",
"undici": "^6.19.8",
"tsx": "^4.19.2",
"undici": "^6.20.1",
"zod": "^3.23.8"
},
"dependencies": {
"@bogeychan/elysia-polyfills": "^0.6.4",
"@icqqjs/icqq": "1.3.0",
"@prisma/client": "5.19.0",
"@icqqjs/icqq": "1.3.2",
"@prisma/client": "5.21.1",
"dockerode": "^4.0.2",
"prisma": "5.19.0",
"prisma": "5.21.1",
"quote-api": "https://github.com/Clansty/quote-api/archive/014b21138afbbe0e12c91b00561414b1e851fc0f.tar.gz",
"sharp": "^0.33.5",
"silk-sdk": "^0.2.2"
Expand Down
14 changes: 7 additions & 7 deletions main/src/api/richHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@ export default new Elysia()
const user = await member.client.pickFriend(member.uid) as NapCatFriend;
const info = await user.renew();
profile = {
birthday: [info.birthday_year, info.birthday_month, info.birthday_day],
email: info.eMail,
// birthday: [info.birthday_year, info.birthday_month, info.birthday_day],
// email: info.eMail,
nickname: info.nickname,
// @ts-ignore
city: info.city || info.detail?.commonExt?.city,
// city: info.city || info.detail?.commonExt?.city,
QID: info.qid,
// @ts-ignore
country: info.country || info.detail?.commonExt?.country,
// country: info.country || info.detail?.commonExt?.country,
// @ts-ignore
province: info.province || info.detail?.commonExt?.province,
// province: info.province || info.detail?.commonExt?.province,
signature: '',
// @ts-ignore
regTimestamp: info.regTime || info.detail?.commonExt?.regTime,
};
// regTimestamp: info.regTime || info.detail?.commonExt?.regTime,
} as any;
}
else {
return 'Unknown client type';
Expand Down
5 changes: 3 additions & 2 deletions main/src/client/NapCatClient/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,12 @@ export const napCatReceiveToMessageElem = (data: Receive[keyof Receive]): Messag
...data.data,
type: data.type,
} as any;
// @ts-ignore
case 'mface':
return {
type: 'image',
url: data.data.url,
file: data.data.url,
url: (data as any).data.url,
file: (data as any).data.url,
};
case 'at':
const qqNum = Number(data.data.qq);
Expand Down
5 changes: 3 additions & 2 deletions main/src/client/NapCatClient/entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { NapCatClient } from './client';
import { messageElemToNapCatSendable, napCatForwardMultiple, napCatReceiveToMessageElem } from './convert';
import { getLogger, Logger } from 'log4js';
import posthog from '../../models/posthog';
import { Send } from 'node-napcat-ts';
import type { Send, WSSendReturn } from 'node-napcat-ts';
import { FileResult } from 'tmp-promise';

export abstract class NapCatEntity implements QQEntity {
Expand Down Expand Up @@ -225,7 +225,8 @@ export class NapCatGroup extends NapCatEntity implements Group {
};

async getAllMemberInfo() {
return await this.client.callApi('get_group_member_list', { group_id: this.gid });
// lib bug
return await this.client.callApi('get_group_member_list', { group_id: this.gid }) as unknown as WSSendReturn['get_group_member_info'][];
}
}

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"build": "pnpm run --stream --parallel build"
},
"devDependencies": {
"typescript": "^5.5.4"
"typescript": "^5.6.3"
},
"pnpm": {
"patchedDependencies": {
"telegram@2.24.11": "patches/telegram@2.24.11.patch",
"@icqqjs/[email protected].0": "patches/@icqqjs__icqq@1.2.6.patch"
"telegram@2.26.6": "patches/telegram@2.26.6.patch",
"@icqqjs/[email protected].2": "patches/@icqqjs__icqq@1.3.2.patch"
}
},
"packageManager": "[email protected]+sha512.38dc6fba8dba35b39340b9700112c2fe1e12f10b17134715a4aa98ccf7bb035e76fd981cf0bb384dfa98f8d6af5481c2bef2f4266a24bfa20c34eb7147ce0b5e"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ index c4bdd4cde3de14d515ea55364bf6c5ba315a8281..0e1ef5aa876d8e4913dc7d41756c6170
static deserialize(serialized: Buffer): ForwardMessage;
constructor(proto: pb.Proto);
diff --git a/lib/message/message.js b/lib/message/message.js
index dcf0238de649da2c866b354a32884d0e8389ddd4..fee8ffe09e34aa3a3d7870a0d65bc793feeb29f8 100644
index 71e477920b07fad9e7eb26c753e29e260800b189..118430564f3cdc3448977e7eb7e519973acf7458 100644
--- a/lib/message/message.js
+++ b/lib/message/message.js
@@ -367,12 +367,13 @@ class ForwardMessage {
Expand Down
10 changes: 5 additions & 5 deletions patches/[email protected] → patches/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ index ff7af2d3be9b32162b5e1630d4b16ab0c7547649..f4768c29ea555638a7ebce7405bed56d
interface FileToMediaInterface {
file: FileLike;
diff --git a/client/uploads.js b/client/uploads.js
index e66e6ab97392424046fbeac2c87a43103d69c4c5..8bf408bd5b4ae71833754cf8bd57a9bdccb2760a 100644
index 9392c42342a97ee253be8295c1a086b690673dca..3721a18b92568236faca12837b3fb074760525ec 100644
--- a/client/uploads.js
+++ b/client/uploads.js
@@ -309,7 +309,7 @@ async function _fileToMedia(client, { file, forceDocument, fileSize, progressCal
@@ -316,7 +316,7 @@ async function _fileToMedia(client, { file, forceDocument, fileSize, progressCal
}
exports._fileToMedia = _fileToMedia;
/** @hidden */
Expand All @@ -84,7 +84,7 @@ index e66e6ab97392424046fbeac2c87a43103d69c4c5..8bf408bd5b4ae71833754cf8bd57a9bd
entity = await client.getInputEntity(entity);
let files = [];
if (!Array.isArray(file)) {
@@ -401,13 +401,14 @@ async function _sendAlbum(client, entity, { file, caption, forceDocument = false
@@ -408,13 +408,14 @@ async function _sendAlbum(client, entity, { file, caption, forceDocument = false
scheduleDate: scheduleDate,
clearDraft: clearDraft,
noforwards: noforwards,
Expand All @@ -100,15 +100,15 @@ index e66e6ab97392424046fbeac2c87a43103d69c4c5..8bf408bd5b4ae71833754cf8bd57a9bd
if (!file) {
throw new Error("You need to specify a file");
}
@@ -437,6 +438,7 @@ async function sendFile(client, entity, { file, caption, forceDocument = false,
@@ -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)) {
@@ -484,6 +486,7 @@ async function sendFile(client, entity, { file, caption, forceDocument = false,
@@ -491,6 +493,7 @@ async function sendFile(client, entity, { file, caption, forceDocument = false,
scheduleDate: scheduleDate,
clearDraft: clearDraft,
noforwards: noforwards,
Expand Down
Loading

0 comments on commit 0fa6d30

Please sign in to comment.