chore(deps): update baileys package to version 7.0.0-rc.5
Some checks failed
Check Code Quality / check-lint-and-build (push) Has been cancelled
Build Docker image / Build and Deploy (push) Has been cancelled
Security Scan / CodeQL Analysis (javascript) (push) Has been cancelled
Security Scan / Dependency Review (push) Has been cancelled

- Bumped baileys dependency version in package.json and package-lock.json to 7.0.0-rc.5 for improved functionality and bug fixes.
- Added p-queue and p-timeout packages for enhanced performance and timeout management.
This commit is contained in:
Davidson Gomes 2025-10-06 14:28:24 -03:00
parent ad8df44236
commit 53cd7d5d13
3 changed files with 41 additions and 13 deletions

38
package-lock.json generated
View File

@ -21,7 +21,7 @@
"amqplib": "^0.10.5", "amqplib": "^0.10.5",
"audio-decode": "^2.2.3", "audio-decode": "^2.2.3",
"axios": "^1.7.9", "axios": "^1.7.9",
"baileys": "^7.0.0-rc.4", "baileys": "^7.0.0-rc.5",
"class-validator": "^0.14.1", "class-validator": "^0.14.1",
"compression": "^1.7.5", "compression": "^1.7.5",
"cors": "^2.8.5", "cors": "^2.8.5",
@ -5993,19 +5993,19 @@
} }
}, },
"node_modules/baileys": { "node_modules/baileys": {
"version": "7.0.0-rc.4", "version": "7.0.0-rc.5",
"resolved": "https://registry.npmjs.org/baileys/-/baileys-7.0.0-rc.4.tgz", "resolved": "https://registry.npmjs.org/baileys/-/baileys-7.0.0-rc.5.tgz",
"integrity": "sha512-mmXWTRYg3lcs20s/qHYZ5PQP6/qwID8Kgft7m2nMaHdAF13GbRSq59IcZolcbQSJ9UIrw26HPCFA2xYdBHUcqA==", "integrity": "sha512-y95gW7UtKbD4dQb46G75rnr0U0LtnBItA002ARggDiCgm92Z8wnM+wxqC8OI/sDFanz3TgzqE4t7MPwNusUqUQ==",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@cacheable/node-cache": "^1.4.0", "@cacheable/node-cache": "^1.4.0",
"@hapi/boom": "^9.1.3", "@hapi/boom": "^9.1.3",
"async-mutex": "^0.5.0", "async-mutex": "^0.5.0",
"axios": "^1.6.0",
"libsignal": "git+https://github.com/whiskeysockets/libsignal-node.git", "libsignal": "git+https://github.com/whiskeysockets/libsignal-node.git",
"lru-cache": "^11.1.0", "lru-cache": "^11.1.0",
"music-metadata": "^11.7.0", "music-metadata": "^11.7.0",
"p-queue": "^9.0.0",
"pino": "^9.6", "pino": "^9.6",
"protobufjs": "^7.2.4", "protobufjs": "^7.2.4",
"ws": "^8.13.0" "ws": "^8.13.0"
@ -12169,6 +12169,34 @@
"url": "https://github.com/sponsors/sindresorhus" "url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/p-queue": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/p-queue/-/p-queue-9.0.0.tgz",
"integrity": "sha512-KO1RyxstL9g1mK76530TExamZC/S2Glm080Nx8PE5sTd7nlduDQsAfEl4uXX+qZjLiwvDauvzXavufy3+rJ9zQ==",
"license": "MIT",
"dependencies": {
"eventemitter3": "^5.0.1",
"p-timeout": "^7.0.0"
},
"engines": {
"node": ">=20"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/p-timeout": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-7.0.0.tgz",
"integrity": "sha512-DhZ7ydOE3JXtXzDf2wz/KEamkKAD7Il5So09I2tOz4i+9pLcdghDKKmODkkoHKJ0TyczmhcHNxyTeTrsENT81A==",
"license": "MIT",
"engines": {
"node": ">=20"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/p-try": { "node_modules/p-try": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",

View File

@ -77,7 +77,7 @@
"amqplib": "^0.10.5", "amqplib": "^0.10.5",
"audio-decode": "^2.2.3", "audio-decode": "^2.2.3",
"axios": "^1.7.9", "axios": "^1.7.9",
"baileys": "^7.0.0-rc.4", "baileys": "^7.0.0-rc.5",
"class-validator": "^0.14.1", "class-validator": "^0.14.1",
"compression": "^1.7.5", "compression": "^1.7.5",
"cors": "^2.8.5", "cors": "^2.8.5",

View File

@ -3371,18 +3371,18 @@ export class BaileysStartupService extends ChannelStartupService {
} }
const numberJid = numberVerified?.jid || user.jid; const numberJid = numberVerified?.jid || user.jid;
const lid = // const lid =
typeof numberVerified?.lid === 'string' // typeof numberVerified?.lid === 'string'
? numberVerified.lid // ? numberVerified.lid
: numberJid.includes('@lid') // : numberJid.includes('@lid')
? numberJid.split('@')[1] // ? numberJid.split('@')[1]
: undefined; // : undefined;
return new OnWhatsAppDto( return new OnWhatsAppDto(
numberJid, numberJid,
!!numberVerified?.exists, !!numberVerified?.exists,
user.number, user.number,
contacts.find((c) => c.remoteJid === numberJid)?.pushName, contacts.find((c) => c.remoteJid === numberJid)?.pushName,
lid, // lid,
); );
}), }),
); );