deps: bump icqq

This commit is contained in:
Clansty 2024-03-24 00:24:57 +08:00
parent 0b2fa7814d
commit 48bca424ed
27 changed files with 61 additions and 56 deletions

1
.npmrc Normal file
View File

@ -0,0 +1 @@
@icqqjs:registry=https://npm.pkg.github.com

View File

@ -26,6 +26,7 @@
"dependencies": {
"@fastify/http-proxy": "^9.4.0",
"@fastify/static": "^7.0.1",
"@icqqjs/icqq": "^1.1.2",
"@prisma/client": "5.9.1",
"axios": "^1.6.8",
"baidu-aip-sdk": "^4.16.15",
@ -39,7 +40,6 @@
"fastify": "^4.26.2",
"file-type": "^19.0.0",
"fluent-ffmpeg": "^2.1.2",
"icqq": "^0.6.10",
"image-size": "^1.1.1",
"lodash": "^4.17.21",
"log4js": "^6.9.1",

View File

@ -2,7 +2,7 @@ import { FastifyPluginCallback } from 'fastify';
import { Pair } from '../models/Pair';
import ejs from 'ejs';
import fs from 'fs';
import { Group } from 'icqq';
import { Group } from '@icqqjs/icqq';
import { format } from 'date-and-time';
const template = ejs.compile(fs.readFileSync('./assets/richHeader.ejs', 'utf-8'));

View File

@ -7,17 +7,17 @@ import {
LogLevel,
Platform, PrivateMessage,
PrivateMessageEvent,
} from 'icqq';
} from '@icqqjs/icqq';
import random from '../utils/random';
import fs from 'fs';
import fsP from 'fs/promises';
import { Config } from 'icqq/lib/client';
import { Config } from '@icqqjs/icqq/lib/client';
import dataPath from '../helpers/dataPath';
import os from 'os';
import { Converter, Image, rand2uuid } from 'icqq/lib/message';
import { Converter, Image, rand2uuid } from '@icqqjs/icqq/lib/message';
import { randomBytes } from 'crypto';
import { gzip, timestamp } from 'icqq/lib/common';
import { pb } from 'icqq/lib/core';
import { gzip, timestamp } from '@icqqjs/icqq/lib/common';
import { pb } from '@icqqjs/icqq/lib/core';
import env from '../models/env';
const LOG_LEVEL: LogLevel = env.OICQ_LOG_LEVEL;

View File

@ -9,7 +9,7 @@ import {
MemberDecreaseEvent,
MemberIncreaseEvent,
PrivateMessageEvent,
} from 'icqq';
} from '@icqqjs/icqq';
import Instance from '../models/Instance';
import { getLogger, Logger } from 'log4js';
import { editFlags } from '../utils/flagControl';

View File

@ -2,7 +2,7 @@ import DeleteMessageService from '../services/DeleteMessageService';
import Telegram from '../client/Telegram';
import OicqClient from '../client/OicqClient';
import { Api } from 'telegram';
import { FriendRecallEvent, GroupRecallEvent } from 'icqq';
import { FriendRecallEvent, GroupRecallEvent } from '@icqqjs/icqq';
import { DeletedMessageEvent } from 'telegram/events/DeletedMessage';
import Instance from '../models/Instance';

View File

@ -8,7 +8,7 @@ import {
GroupPokeEvent,
MemberIncreaseEvent,
PrivateMessageEvent,
} from 'icqq';
} from '@icqqjs/icqq';
import db from '../models/db';
import { Api } from 'telegram';
import { getLogger, Logger } from 'log4js';

View File

@ -1,7 +1,7 @@
import Instance from '../models/Instance';
import Telegram from '../client/Telegram';
import OicqClient from '../client/OicqClient';
import { AtElem, Group, GroupMessageEvent, PrivateMessageEvent, Sendable } from 'icqq';
import { AtElem, Group, GroupMessageEvent, PrivateMessageEvent, Sendable } from '@icqqjs/icqq';
import { Pair } from '../models/Pair';
import { Api } from 'telegram';
import db from '../models/db';

View File

@ -4,7 +4,7 @@ import Instance from '../models/Instance';
import Telegram from '../client/Telegram';
import OicqClient from '../client/OicqClient';
import { Api } from 'telegram';
import { Group } from 'icqq';
import { Group } from '@icqqjs/icqq';
import RecoverMessageHelper from '../helpers/RecoverMessageHelper';
import flags from '../constants/flags';
import { editFlags } from '../utils/flagControl';

View File

@ -1,7 +1,7 @@
import Instance from '../models/Instance';
import Telegram from '../client/Telegram';
import OicqClient from '../client/OicqClient';
import { GroupMessageEvent, MiraiElem, PrivateMessageEvent } from 'icqq';
import { GroupMessageEvent, MiraiElem, PrivateMessageEvent } from '@icqqjs/icqq';
export default class {
constructor(private readonly instance: Instance,

View File

@ -2,7 +2,7 @@ import Instance from '../models/Instance';
import Telegram from '../client/Telegram';
import OicqClient from '../client/OicqClient';
import { getLogger, Logger } from 'log4js';
import { Group, GroupMessageEvent, PrivateMessageEvent } from 'icqq';
import { Group, GroupMessageEvent, PrivateMessageEvent } from '@icqqjs/icqq';
import { Api } from 'telegram';
import quotly from 'quote-api/methods/generate.js';
import { CustomFile } from 'telegram/client/uploads';

View File

@ -2,7 +2,7 @@ import { getLogger, Logger } from 'log4js';
import Instance from '../models/Instance';
import Telegram from '../client/Telegram';
import OicqClient from '../client/OicqClient';
import { FriendRequestEvent, GroupInviteEvent } from 'icqq';
import { FriendRequestEvent, GroupInviteEvent } from '@icqqjs/icqq';
import { getAvatar } from '../utils/urls';
import { CustomFile } from 'telegram/client/uploads';
import { Button } from 'telegram/tl/custom/button';

View File

@ -3,7 +3,7 @@ import Telegram from '../client/Telegram';
import OicqClient from '../client/OicqClient';
import { Pair } from '../models/Pair';
import { Api } from 'telegram';
import { GroupMessage, PrivateMessage } from 'icqq';
import { GroupMessage, PrivateMessage } from '@icqqjs/icqq';
import db from '../models/db';
import { format } from 'date-and-time';
import lottie from '../constants/lottie';

View File

@ -3,7 +3,7 @@ import { CustomFile } from 'telegram/client/uploads';
import { base64decode } from 'nodejs-base64';
import { getLogger } from 'log4js';
import { Entity } from 'telegram/define';
import { ForwardMessage } from 'icqq';
import { ForwardMessage } from '@icqqjs/icqq';
import { Api } from 'telegram';
import { imageSize } from 'image-size';
import env from '../models/env';

View File

@ -1,4 +1,4 @@
import { Platform } from 'icqq';
import { Platform } from '@icqqjs/icqq';
export default {
convertTextToPlatform(text: string): Platform {

View File

@ -1,4 +1,4 @@
import { Friend, Group } from 'icqq';
import { Friend, Group } from '@icqqjs/icqq';
import TelegramChat from '../client/TelegramChat';
import OicqClient from '../client/OicqClient';
import Telegram from '../client/Telegram';

View File

@ -1,5 +1,5 @@
import { getLogger } from 'log4js';
import { Friend, Group } from 'icqq';
import { Friend, Group } from '@icqqjs/icqq';
import TelegramChat from '../client/TelegramChat';
import getAboutText from '../utils/getAboutText';
import { md5 } from '../utils/hashing';

View File

@ -1,5 +1,5 @@
import Telegram from '../client/Telegram';
import { Friend, FriendInfo, Group, GroupInfo } from 'icqq';
import { Friend, FriendInfo, Group, GroupInfo } from '@icqqjs/icqq';
import { Button } from 'telegram/tl/custom/button';
import { getLogger, Logger } from 'log4js';
import { getAvatar } from '../utils/urls';

View File

@ -2,7 +2,7 @@ import Telegram from '../client/Telegram';
import { getLogger, Logger } from 'log4js';
import { Api } from 'telegram';
import db from '../models/db';
import { Friend, FriendRecallEvent, Group, GroupRecallEvent } from 'icqq';
import { Friend, FriendRecallEvent, Group, GroupRecallEvent } from '@icqqjs/icqq';
import Instance from '../models/Instance';
import { Pair } from '../models/Pair';
import { consumer } from '../utils/highLevelFunces';

View File

@ -10,7 +10,7 @@ import {
Quotable,
segment,
Sendable,
} from 'icqq';
} from '@icqqjs/icqq';
import { fetchFile, getBigFaceUrl, getImageUrlByMd5 } from '../utils/urls';
import { ButtonLike, FileLike } from 'telegram/define';
import { getLogger, Logger } from 'log4js';
@ -38,7 +38,7 @@ import { QQMessageSent } from '../types/definitions';
import ZincSearch from 'zincsearch-node';
import { speech as AipSpeechClient } from 'baidu-aip-sdk';
import random from '../utils/random';
import { escapeXml } from 'icqq/lib/common';
import { escapeXml } from '@icqqjs/icqq/lib/common';
import Docker from 'dockerode';
import ReplyKeyboardHide = Api.ReplyKeyboardHide;
import env from '../models/env';

View File

@ -8,7 +8,7 @@ import { Pair } from '../models/Pair';
import { CustomFile } from 'telegram/client/uploads';
import { getAvatar } from '../utils/urls';
import db from '../models/db';
import { Friend, Group } from 'icqq';
import { Friend, Group } from '@icqqjs/icqq';
import { format } from 'date-and-time';
import ZincSearch from 'zincsearch-node';
import env from '../models/env';

View File

@ -1,7 +1,7 @@
import Telegram from '../client/Telegram';
import { getLogger, Logger } from 'log4js';
import { BigInteger } from 'big-integer';
import { Platform } from 'icqq';
import { Platform } from '@icqqjs/icqq';
import { MarkupLike } from 'telegram/define';
import OicqClient from '../client/OicqClient';
import { Button } from 'telegram/tl/custom/button';

View File

@ -1,4 +1,4 @@
import { MessageRet } from 'icqq';
import { MessageRet } from '@icqqjs/icqq';
export type WorkMode = 'group' | 'personal';
export type QQMessageSent = MessageRet & { senderId: number, brief: string };

View File

@ -1,4 +1,4 @@
import { Friend, Group } from 'icqq';
import { Friend, Group } from '@icqqjs/icqq';
export default async function getAboutText(entity: Friend | Group, html: boolean) {
let text: string;

View File

@ -1,5 +1,5 @@
import axios from 'axios';
import { Friend, Group } from 'icqq';
import { Friend, Group } from '@icqqjs/icqq';
export function getAvatarUrl(room: number | bigint | Friend | Group): string {
if (!room) return '';

View File

@ -9,7 +9,7 @@
},
"pnpm": {
"patchedDependencies": {
"icqq@0.6.10": "patches/icqq@0.6.10.patch"
"@icqqjs/icqq@1.1.2": "patches/icqq@0.6.10.patch"
}
}
}

View File

@ -5,7 +5,7 @@ settings:
excludeLinksFromLockfile: false
patchedDependencies:
icqq@0.6.10:
'@icqqjs/icqq@1.1.2':
hash: lvxibeykgrherv3ldsrdfzrnaq
path: patches/icqq@0.6.10.patch
@ -25,6 +25,9 @@ importers:
'@fastify/static':
specifier: ^7.0.1
version: 7.0.1
'@icqqjs/icqq':
specifier: ^1.1.2
version: 1.1.2(patch_hash=lvxibeykgrherv3ldsrdfzrnaq)
'@prisma/client':
specifier: 5.9.1
version: 5.9.1(prisma@5.9.1)
@ -64,9 +67,6 @@ importers:
fluent-ffmpeg:
specifier: ^2.1.2
version: 2.1.2
icqq:
specifier: ^0.6.10
version: 0.6.10(patch_hash=lvxibeykgrherv3ldsrdfzrnaq)
image-size:
specifier: ^1.1.1
version: 1.1.1
@ -96,7 +96,7 @@ importers:
version: 0.2.2
telegram:
specifier: https://github.com/clansty/gramjs/releases/download/2.19.10%2Brevert_media/telegram-2.19.10.tgz
version: '@github.com/clansty/gramjs/releases/download/2.19.10%2525252Brevert_media/telegram-2.19.10.tgz'
version: '@github.com/clansty/gramjs/releases/download/2.19.10%2525252525252Brevert_media/telegram-2.19.10.tgz'
tmp-promise:
specifier: ^3.0.3
version: 3.0.3
@ -786,6 +786,23 @@ packages:
glob: 10.3.10
dev: false
/@icqqjs/icqq@1.1.2(patch_hash=lvxibeykgrherv3ldsrdfzrnaq):
resolution: {integrity: sha512-5hvFVYlV6qp7leC60c+HGfgjhK5udSIN92mEUfzbWKK+Xx8Z2ruMEAzIzfOcFkBugyzmjX5vxhymDH3diQm0pA==, tarball: https://npm.pkg.github.com/download/@icqqjs/icqq/1.1.2/aa71ad688f4e2ca32f883cef340f2387968d12c6}
engines: {node: '>= v14'}
dependencies:
axios: 1.6.8
log4js: 6.9.1
long: 5.2.3
pngjs: 7.0.0
probe-image-size: 7.2.3
silk-wasm: 3.2.3
triptrap: 0.0.17
transitivePeerDependencies:
- debug
- supports-color
dev: false
patched: true
/@img/sharp-darwin-arm64@0.33.2:
resolution: {integrity: sha512-itHBs1rPmsmGF9p4qRe++CzCgd+kFYktnsoR1sbIAfsRMrJZau0Tt1AH9KVnufc2/tU02Gf6Ibujx+15qRE03w==}
engines: {glibc: '>=2.26', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'}
@ -3352,24 +3369,6 @@ packages:
safer-buffer: 2.1.2
dev: false
/icqq@0.6.10(patch_hash=lvxibeykgrherv3ldsrdfzrnaq):
resolution: {integrity: sha512-3LfK9r7WUnuVFyrVDH92DgFhsqNK/Itp91XJAD+DZHKEQK6UlR7F+xoEcpUIEfi9dy8GWqOgr5ZTunjd5GhMdA==}
engines: {node: '>= v14'}
deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
dependencies:
axios: 1.6.8
log4js: 6.9.1
long: 4.0.0
pngjs: 6.0.0
probe-image-size: 7.2.3
silk-wasm: 3.2.3
triptrap: 0.0.17
transitivePeerDependencies:
- debug
- supports-color
dev: false
patched: true
/ieee754@1.2.1:
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
dev: false
@ -3798,8 +3797,8 @@ packages:
- supports-color
dev: false
/long@4.0.0:
resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==}
/long@5.2.3:
resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==}
dev: false
/lottie-node@2.0.0(canvas@2.11.2)(jsdom@16.7.0)(lottie-web@5.12.2):
@ -4307,6 +4306,11 @@ packages:
engines: {node: '>=12.13.0'}
dev: false
/pngjs@7.0.0:
resolution: {integrity: sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==}
engines: {node: '>=14.19.0'}
dev: false
/postcss@8.4.35:
resolution: {integrity: sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==}
engines: {node: ^10 || ^12 || >=14}
@ -5669,7 +5673,7 @@ packages:
- utf-8-validate
dev: false
'@github.com/clansty/gramjs/releases/download/2.19.10%2525252Brevert_media/telegram-2.19.10.tgz':
'@github.com/clansty/gramjs/releases/download/2.19.10%2525252525252Brevert_media/telegram-2.19.10.tgz':
resolution: {tarball: https://github.com/clansty/gramjs/releases/download/2.19.10%2Brevert_media/telegram-2.19.10.tgz}
name: telegram
version: 2.19.10