project: Move to ESM Modules
This commit is contained in:
+1
-2
@@ -5,7 +5,6 @@ coverage
|
|||||||
.eslintrc.json
|
.eslintrc.json
|
||||||
src/WABinary/index.ts
|
src/WABinary/index.ts
|
||||||
WAProto
|
WAProto
|
||||||
WASignalGroup
|
|
||||||
Example/Example.ts
|
Example/Example.ts
|
||||||
docs
|
docs
|
||||||
proto-extract
|
proto-extract
|
||||||
|
|||||||
+31
-68
@@ -1,7 +1,7 @@
|
|||||||
import { Boom } from '@hapi/boom'
|
import { Boom } from '@hapi/boom'
|
||||||
import NodeCache from '@cacheable/node-cache'
|
import NodeCache from '@cacheable/node-cache'
|
||||||
import readline from 'readline'
|
import readline from 'readline'
|
||||||
import makeWASocket, { AnyMessageContent, BinaryInfo, delay, DisconnectReason, downloadAndProcessHistorySyncNotification, encodeWAM, fetchLatestBaileysVersion, getAggregateVotesInPollMessage, getHistoryMsg, isJidNewsletter, makeCacheableSignalKeyStore, proto, useMultiFileAuthState, WAMessageContent, WAMessageKey } from '../src'
|
import makeWASocket, { AnyMessageContent, BinaryInfo, delay, DisconnectReason, downloadAndProcessHistorySyncNotification, encodeWAM, fetchLatestBaileysVersion, getAggregateVotesInPollMessage, getHistoryMsg, isJidNewsletter, jidDecode, makeCacheableSignalKeyStore, normalizeMessageContent, PatchedMessageWithRecipientJID, proto, useMultiFileAuthState, WAMessageContent, WAMessageKey } from '../src'
|
||||||
//import MAIN_LOGGER from '../src/Utils/logger'
|
//import MAIN_LOGGER from '../src/Utils/logger'
|
||||||
import open from 'open'
|
import open from 'open'
|
||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
@@ -33,7 +33,6 @@ const startSock = async() => {
|
|||||||
const sock = makeWASocket({
|
const sock = makeWASocket({
|
||||||
version,
|
version,
|
||||||
logger,
|
logger,
|
||||||
printQRInTerminal: !usePairingCode,
|
|
||||||
auth: {
|
auth: {
|
||||||
creds: state.creds,
|
creds: state.creds,
|
||||||
/** caching makes the store faster to send/recv messages */
|
/** caching makes the store faster to send/recv messages */
|
||||||
@@ -45,7 +44,7 @@ const startSock = async() => {
|
|||||||
// comment the line below out
|
// comment the line below out
|
||||||
// shouldIgnoreJid: jid => isJidBroadcast(jid),
|
// shouldIgnoreJid: jid => isJidBroadcast(jid),
|
||||||
// implement to handle retries & poll updates
|
// implement to handle retries & poll updates
|
||||||
getMessage,
|
getMessage
|
||||||
})
|
})
|
||||||
|
|
||||||
// Pairing code for Web clients
|
// Pairing code for Web clients
|
||||||
@@ -148,77 +147,41 @@ const startSock = async() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// received a new message
|
// received a new message
|
||||||
if(events['messages.upsert']) {
|
if (events['messages.upsert']) {
|
||||||
const upsert = events['messages.upsert']
|
const upsert = events['messages.upsert']
|
||||||
console.log('recv messages ', JSON.stringify(upsert, undefined, 2))
|
console.log('recv messages ', JSON.stringify(upsert, undefined, 2))
|
||||||
|
|
||||||
if(upsert.type === 'notify') {
|
if (!!upsert.requestId) {
|
||||||
for (const msg of upsert.messages) {
|
console.log("placeholder message received for request of id=" + upsert.requestId, upsert)
|
||||||
//TODO: More built-in implementation of this
|
}
|
||||||
/* if (
|
|
||||||
msg.message?.protocolMessage?.type ===
|
|
||||||
proto.Message.ProtocolMessage.Type.HISTORY_SYNC_NOTIFICATION
|
|
||||||
) {
|
|
||||||
const historySyncNotification = getHistoryMsg(msg.message)
|
|
||||||
if (
|
|
||||||
historySyncNotification?.syncType ==
|
|
||||||
proto.HistorySync.HistorySyncType.ON_DEMAND
|
|
||||||
) {
|
|
||||||
const { messages } =
|
|
||||||
await downloadAndProcessHistorySyncNotification(
|
|
||||||
historySyncNotification,
|
|
||||||
{}
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
const chatId = onDemandMap.get(
|
|
||||||
historySyncNotification!.peerDataRequestSessionId!
|
|
||||||
)
|
|
||||||
|
|
||||||
console.log(messages)
|
if (upsert.type === 'notify') {
|
||||||
|
for (const msg of upsert.messages) {
|
||||||
|
if (msg.message?.conversation || msg.message?.extendedTextMessage?.text) {
|
||||||
|
const text = msg.message?.conversation || msg.message?.extendedTextMessage?.text
|
||||||
|
if (text == "requestPlaceholder" && !upsert.requestId) {
|
||||||
|
const messageId = await sock.requestPlaceholderResend(msg.key)
|
||||||
|
console.log('requested placeholder resync, id=', messageId)
|
||||||
|
}
|
||||||
|
|
||||||
onDemandMap.delete(
|
// go to an old chat and send this
|
||||||
historySyncNotification!.peerDataRequestSessionId!
|
if (text == "onDemandHistSync") {
|
||||||
)
|
const messageId = await sock.fetchMessageHistory(50, msg.key, msg.messageTimestamp!)
|
||||||
|
console.log('requested on-demand sync, id=', messageId)
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
if (!msg.key.fromMe && doReplies && !isJidNewsletter(msg.key?.remoteJid!)) {
|
||||||
// 50 messages is the limit imposed by whatsapp
|
|
||||||
//TODO: Add ratelimit of 7200 seconds
|
|
||||||
//TODO: Max retries 10
|
|
||||||
const messageId = await sock.fetchMessageHistory(
|
|
||||||
50,
|
|
||||||
oldestMessageKey,
|
|
||||||
oldestMessageTimestamp
|
|
||||||
)
|
|
||||||
onDemandMap.set(messageId, chatId)
|
|
||||||
}
|
|
||||||
} */
|
|
||||||
|
|
||||||
if (msg.message?.conversation || msg.message?.extendedTextMessage?.text) {
|
console.log('replying to', msg.key.remoteJid)
|
||||||
const text = msg.message?.conversation || msg.message?.extendedTextMessage?.text
|
await sock!.readMessages([msg.key])
|
||||||
if (text == "requestPlaceholder" && !upsert.requestId) {
|
await sendMessageWTyping({ text: 'Hello there!' }, msg.key.remoteJid!)
|
||||||
const messageId = await sock.requestPlaceholderResend(msg.key)
|
}
|
||||||
console.log('requested placeholder resync, id=', messageId)
|
}
|
||||||
} else if (upsert.requestId) {
|
}
|
||||||
console.log('Message received from phone, id=', upsert.requestId, msg)
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// go to an old chat and send this
|
|
||||||
if (text == "onDemandHistSync") {
|
|
||||||
const messageId = await sock.fetchMessageHistory(50, msg.key, msg.messageTimestamp!)
|
|
||||||
console.log('requested on-demand sync, id=', messageId)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!msg.key.fromMe && doReplies && !isJidNewsletter(msg.key?.remoteJid!)) {
|
|
||||||
|
|
||||||
console.log('replying to', msg.key.remoteJid)
|
|
||||||
await sock!.readMessages([msg.key])
|
|
||||||
await sendMessageWTyping({ text: 'Hello there!' }, msg.key.remoteJid!)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// messages updated like status delivered, message deleted etc.
|
// messages updated like status delivered, message deleted etc.
|
||||||
if(events['messages.update']) {
|
if(events['messages.update']) {
|
||||||
@@ -284,7 +247,7 @@ const startSock = async() => {
|
|||||||
// up to you
|
// up to you
|
||||||
|
|
||||||
// only if store is present
|
// only if store is present
|
||||||
return proto.Message.fromObject({})
|
return proto.Message.fromObject({ conversation: 'test' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
yarn pbjs -t static-module -w commonjs -o ./WAProto/index.js ./WAProto/WAProto.proto;
|
yarn pbjs -t static-module -w es6 --no-bundle -o ./WAProto/index.js ./WAProto/WAProto.proto;
|
||||||
yarn pbts -o ./WAProto/index.d.ts ./WAProto/index.js;
|
yarn pbts -o ./WAProto/index.d.ts ./WAProto/index.js;
|
||||||
|
node ./fix-imports.js
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import { readFileSync, writeFileSync } from 'fs';
|
||||||
|
import { argv, exit } from 'process';
|
||||||
|
|
||||||
|
const filePath = './index.js';
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Read the file
|
||||||
|
let content = readFileSync(filePath, 'utf8');
|
||||||
|
|
||||||
|
// Fix the import statement
|
||||||
|
content = content.replace(
|
||||||
|
/import \* as (\$protobuf) from/g,
|
||||||
|
'import $1 from'
|
||||||
|
);
|
||||||
|
|
||||||
|
// Write back
|
||||||
|
writeFileSync(filePath, content, 'utf8');
|
||||||
|
|
||||||
|
console.log(`✅ Fixed imports in ${filePath}`);
|
||||||
|
} catch (error) {
|
||||||
|
console.error(`❌ Error fixing imports: ${error.message}`);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
+4136
-4138
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "baileys",
|
"name": "baileys",
|
||||||
|
"type": "module",
|
||||||
"version": "6.7.18",
|
"version": "6.7.18",
|
||||||
"description": "A WebSockets library for interacting with WhatsApp Web",
|
"description": "A WebSockets library for interacting with WhatsApp Web",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
@@ -26,7 +27,7 @@
|
|||||||
"changelog:last": "conventional-changelog -p angular -r 2",
|
"changelog:last": "conventional-changelog -p angular -r 2",
|
||||||
"changelog:preview": "conventional-changelog -p angular -u",
|
"changelog:preview": "conventional-changelog -p angular -u",
|
||||||
"changelog:update": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
|
"changelog:update": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
|
||||||
"example": "node --inspect -r ts-node/register Example/example.ts",
|
"example": "tsx ./Example/example.ts",
|
||||||
"gen:protobuf": "sh WAProto/GenerateStatics.sh",
|
"gen:protobuf": "sh WAProto/GenerateStatics.sh",
|
||||||
"format": "prettier --write \"src/**/*.{ts,js,json,md}\"",
|
"format": "prettier --write \"src/**/*.{ts,js,json,md}\"",
|
||||||
"lint": "eslint src --ext .js,.ts",
|
"lint": "eslint src --ext .js,.ts",
|
||||||
@@ -43,14 +44,13 @@
|
|||||||
"async-mutex": "^0.5.0",
|
"async-mutex": "^0.5.0",
|
||||||
"axios": "^1.6.0",
|
"axios": "^1.6.0",
|
||||||
"libsignal": "github:WhiskeySockets/libsignal-node",
|
"libsignal": "github:WhiskeySockets/libsignal-node",
|
||||||
"lodash": "^4.17.21",
|
|
||||||
"music-metadata": "^7.12.3",
|
"music-metadata": "^7.12.3",
|
||||||
"pino": "^9.6",
|
"pino": "^9.6",
|
||||||
"protobufjs": "^7.2.4",
|
"protobufjs": "^7.2.4",
|
||||||
"ws": "^8.13.0"
|
"ws": "^8.13.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^27.5.1",
|
"@types/jest": "^30.0.0",
|
||||||
"@types/node": "^16.0.0",
|
"@types/node": "^16.0.0",
|
||||||
"@types/ws": "^8.0.0",
|
"@types/ws": "^8.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.32.0",
|
"@typescript-eslint/eslint-plugin": "^8.32.0",
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
"release-it": "^15.10.3",
|
"release-it": "^15.10.3",
|
||||||
"sharp": "^0.34.2",
|
"sharp": "^0.34.2",
|
||||||
"ts-jest": "^29.3.2",
|
"ts-jest": "^29.3.2",
|
||||||
"ts-node": "^10.8.1",
|
"tsx": "^4.20.3",
|
||||||
"typedoc": "^0.27.9",
|
"typedoc": "^0.27.9",
|
||||||
"typedoc-plugin-markdown": "4.4.2",
|
"typedoc-plugin-markdown": "4.4.2",
|
||||||
"typescript": "^5.8.2"
|
"typescript": "^5.8.2"
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* @ts-ignore */
|
||||||
import { decrypt, encrypt } from 'libsignal/src/crypto'
|
import { decrypt, encrypt } from 'libsignal/src/crypto'
|
||||||
import queueJob from './queue-job'
|
import queueJob from './queue-job'
|
||||||
import { SenderKeyMessage } from './sender-key-message'
|
import { SenderKeyMessage } from './sender-key-message'
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import * as nodeCrypto from 'crypto'
|
import * as nodeCrypto from 'crypto'
|
||||||
|
/* @ts-ignore */
|
||||||
import { generateKeyPair } from 'libsignal/src/curve'
|
import { generateKeyPair } from 'libsignal/src/curve'
|
||||||
|
|
||||||
type KeyPairType = ReturnType<typeof generateKeyPair>
|
type KeyPairType = ReturnType<typeof generateKeyPair>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ async function _asyncQueueExecutor(queue: Array<QueueJob<any>>, cleanup: () => v
|
|||||||
while (true) {
|
while (true) {
|
||||||
const limit = Math.min(queue.length, _gcLimit)
|
const limit = Math.min(queue.length, _gcLimit)
|
||||||
for (let i = offt; i < limit; i++) {
|
for (let i = offt; i < limit; i++) {
|
||||||
const job = queue[i]
|
const job = queue[i]!
|
||||||
try {
|
try {
|
||||||
job.resolve(await job.awaitable())
|
job.resolve(await job.awaitable())
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* @ts-ignore */
|
||||||
import { calculateMAC } from 'libsignal/src/crypto'
|
import { calculateMAC } from 'libsignal/src/crypto'
|
||||||
import { SenderMessageKey } from './sender-message-key'
|
import { SenderMessageKey } from './sender-message-key'
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* @ts-ignore */
|
||||||
import { calculateSignature, verifySignature } from 'libsignal/src/curve'
|
import { calculateSignature, verifySignature } from 'libsignal/src/curve'
|
||||||
import { proto } from '../../../WAProto'
|
import { proto } from '../../../WAProto'
|
||||||
import { CiphertextMessage } from './ciphertext-message'
|
import { CiphertextMessage } from './ciphertext-message'
|
||||||
@@ -27,7 +28,7 @@ export class SenderKeyMessage extends CiphertextMessage {
|
|||||||
super()
|
super()
|
||||||
|
|
||||||
if (serialized) {
|
if (serialized) {
|
||||||
const version = serialized[0]
|
const version = serialized[0]!
|
||||||
const message = serialized.slice(1, serialized.length - this.SIGNATURE_LENGTH)
|
const message = serialized.slice(1, serialized.length - this.SIGNATURE_LENGTH)
|
||||||
const signature = serialized.slice(-1 * this.SIGNATURE_LENGTH)
|
const signature = serialized.slice(-1 * this.SIGNATURE_LENGTH)
|
||||||
const senderKeyMessage = proto.SenderKeyMessage.decode(message).toJSON() as SenderKeyMessageStructure
|
const senderKeyMessage = proto.SenderKeyMessage.decode(message).toJSON() as SenderKeyMessageStructure
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ export class SenderKeyState {
|
|||||||
const index = this.senderKeyStateStructure.senderMessageKeys.findIndex(key => key.iteration === iteration)
|
const index = this.senderKeyStateStructure.senderMessageKeys.findIndex(key => key.iteration === iteration)
|
||||||
|
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
const messageKey = this.senderKeyStateStructure.senderMessageKeys[index]
|
const messageKey = this.senderKeyStateStructure.senderMessageKeys[index]!
|
||||||
this.senderKeyStateStructure.senderMessageKeys.splice(index, 1)
|
this.senderKeyStateStructure.senderMessageKeys.splice(index, 1)
|
||||||
return new SenderMessageKey(messageKey.iteration, messageKey.seed)
|
return new SenderMessageKey(messageKey.iteration, messageKey.seed)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* @ts-ignore */
|
||||||
import { deriveSecrets } from 'libsignal/src/crypto'
|
import { deriveSecrets } from 'libsignal/src/crypto'
|
||||||
|
|
||||||
export class SenderMessageKey {
|
export class SenderMessageKey {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
/* @ts-ignore */
|
||||||
import * as libsignal from 'libsignal'
|
import * as libsignal from 'libsignal'
|
||||||
import { SignalAuthState } from '../Types'
|
import type { SignalAuthState } from '../Types'
|
||||||
import { SignalRepository } from '../Types/Signal'
|
import type { SignalRepository } from '../Types/Signal'
|
||||||
import { generateSignalPubKey } from '../Utils'
|
import { generateSignalPubKey } from '../Utils'
|
||||||
import { jidDecode } from '../WABinary'
|
import { jidDecode } from '../WABinary'
|
||||||
import type { SenderKeyStore } from './Group/group_cipher'
|
import type { SenderKeyStore } from './Group/group_cipher'
|
||||||
@@ -111,7 +112,8 @@ function signalStorage({ creds, keys }: SignalAuthState): SenderKeyStore & Recor
|
|||||||
return libsignal.SessionRecord.deserialize(sess)
|
return libsignal.SessionRecord.deserialize(sess)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
storeSession: async (id: string, session: libsignal.SessionRecord) => {
|
// TODO: Replace with libsignal.SessionRecord when type exports are added to libsignal
|
||||||
|
storeSession: async (id: string, session: any) => {
|
||||||
await keys.set({ session: { [id]: session.serialize() } })
|
await keys.set({ session: { [id]: session.serialize() } })
|
||||||
},
|
},
|
||||||
isTrustedIdentity: () => {
|
isTrustedIdentity: () => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { EventEmitter } from 'events'
|
import { EventEmitter } from 'events'
|
||||||
import { URL } from 'url'
|
import { URL } from 'url'
|
||||||
import { SocketConfig } from '../../Types'
|
import type { SocketConfig } from '../../Types'
|
||||||
|
|
||||||
export abstract class AbstractSocketClient extends EventEmitter {
|
export abstract class AbstractSocketClient extends EventEmitter {
|
||||||
abstract get isOpen(): boolean
|
abstract get isOpen(): boolean
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { GetCatalogOptions, ProductCreate, ProductUpdate, SocketConfig } from '../Types'
|
import type { GetCatalogOptions, ProductCreate, ProductUpdate, SocketConfig } from '../Types'
|
||||||
import {
|
import {
|
||||||
parseCatalogNode,
|
parseCatalogNode,
|
||||||
parseCollectionsNode,
|
parseCollectionsNode,
|
||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
toProductNode,
|
toProductNode,
|
||||||
uploadingNecessaryImagesOfProduct
|
uploadingNecessaryImagesOfProduct
|
||||||
} from '../Utils/business'
|
} from '../Utils/business'
|
||||||
import { BinaryNode, jidNormalizedUser, S_WHATSAPP_NET } from '../WABinary'
|
import { type BinaryNode, jidNormalizedUser, S_WHATSAPP_NET } from '../WABinary'
|
||||||
import { getBinaryNodeChild } from '../WABinary/generic-utils'
|
import { getBinaryNodeChild } from '../WABinary/generic-utils'
|
||||||
import { makeMessagesRecvSocket } from './messages-recv'
|
import { makeMessagesRecvSocket } from './messages-recv'
|
||||||
|
|
||||||
|
|||||||
+24
-20
@@ -2,8 +2,7 @@ import NodeCache from '@cacheable/node-cache'
|
|||||||
import { Boom } from '@hapi/boom'
|
import { Boom } from '@hapi/boom'
|
||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import { DEFAULT_CACHE_TTLS, PROCESSABLE_HISTORY_TYPES } from '../Defaults'
|
import { DEFAULT_CACHE_TTLS, PROCESSABLE_HISTORY_TYPES } from '../Defaults'
|
||||||
import {
|
import type {
|
||||||
ALL_WA_PATCH_NAMES,
|
|
||||||
BotListInfo,
|
BotListInfo,
|
||||||
ChatModification,
|
ChatModification,
|
||||||
ChatMutation,
|
ChatMutation,
|
||||||
@@ -25,10 +24,11 @@ import {
|
|||||||
WAPrivacyValue,
|
WAPrivacyValue,
|
||||||
WAReadReceiptsValue
|
WAReadReceiptsValue
|
||||||
} from '../Types'
|
} from '../Types'
|
||||||
import { LabelActionBody } from '../Types/Label'
|
import { ALL_WA_PATCH_NAMES } from '../Types'
|
||||||
|
import type { LabelActionBody } from '../Types/Label'
|
||||||
import {
|
import {
|
||||||
chatModificationToAppPatch,
|
chatModificationToAppPatch,
|
||||||
ChatMutationMap,
|
type ChatMutationMap,
|
||||||
decodePatches,
|
decodePatches,
|
||||||
decodeSyncdSnapshot,
|
decodeSyncdSnapshot,
|
||||||
encodeSyncdPatch,
|
encodeSyncdPatch,
|
||||||
@@ -41,7 +41,7 @@ import {
|
|||||||
import { makeMutex } from '../Utils/make-mutex'
|
import { makeMutex } from '../Utils/make-mutex'
|
||||||
import processMessage from '../Utils/process-message'
|
import processMessage from '../Utils/process-message'
|
||||||
import {
|
import {
|
||||||
BinaryNode,
|
type BinaryNode,
|
||||||
getBinaryNodeChild,
|
getBinaryNodeChild,
|
||||||
getBinaryNodeChildren,
|
getBinaryNodeChildren,
|
||||||
jidDecode,
|
jidDecode,
|
||||||
@@ -205,8 +205,8 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
if (section.attrs.type === 'all') {
|
if (section.attrs.type === 'all') {
|
||||||
for (const bot of getBinaryNodeChildren(section, 'bot')) {
|
for (const bot of getBinaryNodeChildren(section, 'bot')) {
|
||||||
botList.push({
|
botList.push({
|
||||||
jid: bot.attrs.jid,
|
jid: bot.attrs.jid!,
|
||||||
personaId: bot.attrs['persona_id']
|
personaId: bot.attrs['persona_id']!
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -219,7 +219,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
const usyncQuery = new USyncQuery().withContactProtocol().withLIDProtocol()
|
const usyncQuery = new USyncQuery().withContactProtocol().withLIDProtocol()
|
||||||
|
|
||||||
for (const jid of jids) {
|
for (const jid of jids) {
|
||||||
const phone = `+${jid.replace('+', '').split('@')[0].split(':')[0]}`
|
const phone = `+${jid.replace('+', '').split('@')[0]?.split(':')[0]}`
|
||||||
usyncQuery.withUser(new USyncUser().withPhone(phone))
|
usyncQuery.withUser(new USyncUser().withPhone(phone))
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -271,16 +271,18 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
|
|
||||||
if (jidNormalizedUser(jid) !== jidNormalizedUser(authState.creds.me!.id)) {
|
if (jidNormalizedUser(jid) !== jidNormalizedUser(authState.creds.me!.id)) {
|
||||||
targetJid = jidNormalizedUser(jid) // in case it is someone other than us
|
targetJid = jidNormalizedUser(jid) // in case it is someone other than us
|
||||||
|
} else {
|
||||||
|
targetJid = undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
const { img } = await generateProfilePicture(content, dimensions)
|
const { img } = await generateProfilePicture(content, dimensions)
|
||||||
await query({
|
await query({
|
||||||
tag: 'iq',
|
tag: 'iq',
|
||||||
attrs: {
|
attrs: {
|
||||||
target: targetJid,
|
|
||||||
to: S_WHATSAPP_NET,
|
to: S_WHATSAPP_NET,
|
||||||
type: 'set',
|
type: 'set',
|
||||||
xmlns: 'w:profile:picture'
|
xmlns: 'w:profile:picture',
|
||||||
|
...(targetJid ? { target: targetJid } : {})
|
||||||
},
|
},
|
||||||
content: [
|
content: [
|
||||||
{
|
{
|
||||||
@@ -303,15 +305,17 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
|
|
||||||
if (jidNormalizedUser(jid) !== jidNormalizedUser(authState.creds.me!.id)) {
|
if (jidNormalizedUser(jid) !== jidNormalizedUser(authState.creds.me!.id)) {
|
||||||
targetJid = jidNormalizedUser(jid) // in case it is someone other than us
|
targetJid = jidNormalizedUser(jid) // in case it is someone other than us
|
||||||
|
} else {
|
||||||
|
targetJid = undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
await query({
|
await query({
|
||||||
tag: 'iq',
|
tag: 'iq',
|
||||||
attrs: {
|
attrs: {
|
||||||
target: targetJid,
|
|
||||||
to: S_WHATSAPP_NET,
|
to: S_WHATSAPP_NET,
|
||||||
type: 'set',
|
type: 'set',
|
||||||
xmlns: 'w:profile:picture'
|
xmlns: 'w:profile:picture',
|
||||||
|
...(targetJid ? { target: targetJid } : {})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -477,7 +481,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
const states = {} as { [T in WAPatchName]: LTHashState }
|
const states = {} as { [T in WAPatchName]: LTHashState }
|
||||||
const nodes: BinaryNode[] = []
|
const nodes: BinaryNode[] = []
|
||||||
|
|
||||||
for (const name of collectionsToHandle) {
|
for (const name of collectionsToHandle as Set<WAPatchName>) {
|
||||||
const result = await authState.keys.get('app-state-sync-version', [name])
|
const result = await authState.keys.get('app-state-sync-version', [name])
|
||||||
let state = result[name]
|
let state = result[name]
|
||||||
|
|
||||||
@@ -569,7 +573,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
// collection is done with sync
|
// collection is done with sync
|
||||||
collectionsToHandle.delete(name)
|
collectionsToHandle.delete(name)
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error: any) {
|
||||||
// if retry attempts overshoot
|
// if retry attempts overshoot
|
||||||
// or key not found
|
// or key not found
|
||||||
const isIrrecoverableError =
|
const isIrrecoverableError =
|
||||||
@@ -595,7 +599,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
|
|
||||||
const { onMutation } = newAppStateChunkHandler(isInitialSync)
|
const { onMutation } = newAppStateChunkHandler(isInitialSync)
|
||||||
for (const key in globalMutationMap) {
|
for (const key in globalMutationMap) {
|
||||||
onMutation(globalMutationMap[key])
|
onMutation(globalMutationMap[key]!)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -689,7 +693,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
const jid = attrs.from
|
const jid = attrs.from
|
||||||
const participant = attrs.participant || attrs.from
|
const participant = attrs.participant || attrs.from
|
||||||
|
|
||||||
if (shouldIgnoreJid(jid) && jid !== '@s.whatsapp.net') {
|
if (shouldIgnoreJid(jid!) && jid !== '@s.whatsapp.net') {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -700,12 +704,12 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
}
|
}
|
||||||
} else if (Array.isArray(content)) {
|
} else if (Array.isArray(content)) {
|
||||||
const [firstChild] = content
|
const [firstChild] = content
|
||||||
let type = firstChild.tag as WAPresence
|
let type = firstChild!.tag as WAPresence
|
||||||
if (type === 'paused') {
|
if (type === 'paused') {
|
||||||
type = 'available'
|
type = 'available'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (firstChild.attrs?.media === 'audio') {
|
if (firstChild!.attrs?.media === 'audio') {
|
||||||
type = 'recording'
|
type = 'recording'
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -715,7 +719,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (presence) {
|
if (presence) {
|
||||||
ev.emit('presence.update', { id: jid, presences: { [participant]: presence } })
|
ev.emit('presence.update', { id: jid!, presences: { [participant!]: presence } })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -790,7 +794,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
logger
|
logger
|
||||||
)
|
)
|
||||||
for (const key in mutationMap) {
|
for (const key in mutationMap) {
|
||||||
onMutation(mutationMap[key])
|
onMutation(mutationMap[key]!)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-16
@@ -1,15 +1,9 @@
|
|||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import {
|
import type { GroupMetadata, GroupParticipant, ParticipantAction, SocketConfig, WAMessageKey } from '../Types'
|
||||||
GroupMetadata,
|
import { WAMessageStubType } from '../Types'
|
||||||
GroupParticipant,
|
|
||||||
ParticipantAction,
|
|
||||||
SocketConfig,
|
|
||||||
WAMessageKey,
|
|
||||||
WAMessageStubType
|
|
||||||
} from '../Types'
|
|
||||||
import { generateMessageIDV2, unixTimestampSeconds } from '../Utils'
|
import { generateMessageIDV2, unixTimestampSeconds } from '../Utils'
|
||||||
import {
|
import {
|
||||||
BinaryNode,
|
type BinaryNode,
|
||||||
getBinaryNodeChild,
|
getBinaryNodeChild,
|
||||||
getBinaryNodeChildren,
|
getBinaryNodeChildren,
|
||||||
getBinaryNodeChildString,
|
getBinaryNodeChildString,
|
||||||
@@ -317,22 +311,22 @@ export const extractGroupMetadata = (result: BinaryNode) => {
|
|||||||
desc = getBinaryNodeChildString(descChild, 'body')
|
desc = getBinaryNodeChildString(descChild, 'body')
|
||||||
descOwner = descChild.attrs.participant ? jidNormalizedUser(descChild.attrs.participant) : undefined
|
descOwner = descChild.attrs.participant ? jidNormalizedUser(descChild.attrs.participant) : undefined
|
||||||
descOwnerJid = descChild.attrs.participant_pn ? jidNormalizedUser(descChild.attrs.participant_pn) : undefined
|
descOwnerJid = descChild.attrs.participant_pn ? jidNormalizedUser(descChild.attrs.participant_pn) : undefined
|
||||||
descTime = +descChild.attrs.t
|
descTime = +descChild.attrs.t!
|
||||||
descId = descChild.attrs.id
|
descId = descChild.attrs.id
|
||||||
}
|
}
|
||||||
|
|
||||||
const groupId = group.attrs.id.includes('@') ? group.attrs.id : jidEncode(group.attrs.id, 'g.us')
|
const groupId = group.attrs.id!.includes('@') ? group.attrs.id : jidEncode(group.attrs.id!, 'g.us')
|
||||||
const eph = getBinaryNodeChild(group, 'ephemeral')?.attrs.expiration
|
const eph = getBinaryNodeChild(group, 'ephemeral')?.attrs.expiration
|
||||||
const memberAddMode = getBinaryNodeChildString(group, 'member_add_mode') === 'all_member_add'
|
const memberAddMode = getBinaryNodeChildString(group, 'member_add_mode') === 'all_member_add'
|
||||||
const metadata: GroupMetadata = {
|
const metadata: GroupMetadata = {
|
||||||
id: groupId,
|
id: groupId!,
|
||||||
addressingMode: group.attrs.addressing_mode as 'pn' | 'lid',
|
addressingMode: group.attrs.addressing_mode as 'pn' | 'lid',
|
||||||
subject: group.attrs.subject,
|
subject: group.attrs.subject!,
|
||||||
subjectOwner: group.attrs.s_o,
|
subjectOwner: group.attrs.s_o,
|
||||||
subjectOwnerJid: group.attrs.s_o_pn,
|
subjectOwnerJid: group.attrs.s_o_pn,
|
||||||
subjectTime: +group.attrs.s_t,
|
subjectTime: +group.attrs.s_t!,
|
||||||
size: getBinaryNodeChildren(group, 'participant').length,
|
size: getBinaryNodeChildren(group, 'participant').length,
|
||||||
creation: +group.attrs.creation,
|
creation: +group.attrs.creation!,
|
||||||
owner: group.attrs.creator ? jidNormalizedUser(group.attrs.creator) : undefined,
|
owner: group.attrs.creator ? jidNormalizedUser(group.attrs.creator) : undefined,
|
||||||
ownerJid: group.attrs.creator_pn ? jidNormalizedUser(group.attrs.creator_pn) : undefined,
|
ownerJid: group.attrs.creator_pn ? jidNormalizedUser(group.attrs.creator_pn) : undefined,
|
||||||
owner_country_code: group.attrs.creator_country_code,
|
owner_country_code: group.attrs.creator_country_code,
|
||||||
@@ -350,7 +344,7 @@ export const extractGroupMetadata = (result: BinaryNode) => {
|
|||||||
memberAddMode,
|
memberAddMode,
|
||||||
participants: getBinaryNodeChildren(group, 'participant').map(({ attrs }) => {
|
participants: getBinaryNodeChildren(group, 'participant').map(({ attrs }) => {
|
||||||
return {
|
return {
|
||||||
id: attrs.jid,
|
id: attrs.jid!,
|
||||||
jid: isJidUser(attrs.jid) ? attrs.jid : jidNormalizedUser(attrs.phone_number),
|
jid: isJidUser(attrs.jid) ? attrs.jid : jidNormalizedUser(attrs.phone_number),
|
||||||
lid: isLidUser(attrs.jid) ? attrs.jid : attrs.lid,
|
lid: isLidUser(attrs.jid) ? attrs.jid : attrs.lid,
|
||||||
admin: (attrs.type || null) as GroupParticipant['admin']
|
admin: (attrs.type || null) as GroupParticipant['admin']
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
import { DEFAULT_CONNECTION_CONFIG } from '../Defaults'
|
import { DEFAULT_CONNECTION_CONFIG } from '../Defaults'
|
||||||
import { UserFacingSocketConfig } from '../Types'
|
import type { UserFacingSocketConfig } from '../Types'
|
||||||
import { makeBusinessSocket } from './business'
|
import { makeBusinessSocket } from './business'
|
||||||
|
|
||||||
// export the last socket layer
|
// export the last socket layer
|
||||||
|
|||||||
+55
-48
@@ -1,20 +1,19 @@
|
|||||||
import NodeCache from '@cacheable/node-cache'
|
import NodeCache from '@cacheable/node-cache'
|
||||||
import { Boom } from '@hapi/boom'
|
import { Boom } from '@hapi/boom'
|
||||||
import { randomBytes } from 'crypto'
|
import { randomBytes } from 'crypto'
|
||||||
import Long = require('long')
|
import Long from 'long'
|
||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import { DEFAULT_CACHE_TTLS, KEY_BUNDLE_TYPE, MIN_PREKEY_COUNT } from '../Defaults'
|
import { DEFAULT_CACHE_TTLS, KEY_BUNDLE_TYPE, MIN_PREKEY_COUNT } from '../Defaults'
|
||||||
import {
|
import type {
|
||||||
MessageReceiptType,
|
MessageReceiptType,
|
||||||
MessageRelayOptions,
|
MessageRelayOptions,
|
||||||
MessageUserReceipt,
|
MessageUserReceipt,
|
||||||
SocketConfig,
|
SocketConfig,
|
||||||
WACallEvent,
|
WACallEvent,
|
||||||
WAMessageKey,
|
WAMessageKey,
|
||||||
WAMessageStatus,
|
|
||||||
WAMessageStubType,
|
|
||||||
WAPatchName
|
WAPatchName
|
||||||
} from '../Types'
|
} from '../Types'
|
||||||
|
import { WAMessageStatus, WAMessageStubType } from '../Types'
|
||||||
import {
|
import {
|
||||||
aesDecryptCTR,
|
aesDecryptCTR,
|
||||||
aesEncryptGCM,
|
aesEncryptGCM,
|
||||||
@@ -42,7 +41,7 @@ import {
|
|||||||
import { makeMutex } from '../Utils/make-mutex'
|
import { makeMutex } from '../Utils/make-mutex'
|
||||||
import {
|
import {
|
||||||
areJidsSameUser,
|
areJidsSameUser,
|
||||||
BinaryNode,
|
type BinaryNode,
|
||||||
getAllBinaryNodeChildren,
|
getAllBinaryNodeChildren,
|
||||||
getBinaryNodeChild,
|
getBinaryNodeChild,
|
||||||
getBinaryNodeChildBuffer,
|
getBinaryNodeChildBuffer,
|
||||||
@@ -108,8 +107,8 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
const stanza: BinaryNode = {
|
const stanza: BinaryNode = {
|
||||||
tag: 'ack',
|
tag: 'ack',
|
||||||
attrs: {
|
attrs: {
|
||||||
id: attrs.id,
|
id: attrs.id!,
|
||||||
to: attrs.from,
|
to: attrs.from!,
|
||||||
class: tag
|
class: tag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -194,15 +193,15 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
attrs: {
|
attrs: {
|
||||||
id: msgId,
|
id: msgId,
|
||||||
type: 'retry',
|
type: 'retry',
|
||||||
to: node.attrs.from
|
to: node.attrs.from!
|
||||||
},
|
},
|
||||||
content: [
|
content: [
|
||||||
{
|
{
|
||||||
tag: 'retry',
|
tag: 'retry',
|
||||||
attrs: {
|
attrs: {
|
||||||
count: retryCount.toString(),
|
count: retryCount.toString(),
|
||||||
id: node.attrs.id,
|
id: node.attrs.id!,
|
||||||
t: node.attrs.t,
|
t: node.attrs.t!,
|
||||||
v: '1'
|
v: '1'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -226,7 +225,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
const { update, preKeys } = await getNextPreKeys(authState, 1)
|
const { update, preKeys } = await getNextPreKeys(authState, 1)
|
||||||
|
|
||||||
const [keyId] = Object.keys(preKeys)
|
const [keyId] = Object.keys(preKeys)
|
||||||
const key = preKeys[+keyId]
|
const key = preKeys[+keyId!]
|
||||||
|
|
||||||
const content = receipt.content! as BinaryNode[]
|
const content = receipt.content! as BinaryNode[]
|
||||||
content.push({
|
content.push({
|
||||||
@@ -235,7 +234,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
content: [
|
content: [
|
||||||
{ tag: 'type', attrs: {}, content: Buffer.from(KEY_BUNDLE_TYPE) },
|
{ tag: 'type', attrs: {}, content: Buffer.from(KEY_BUNDLE_TYPE) },
|
||||||
{ tag: 'identity', attrs: {}, content: identityKey.public },
|
{ tag: 'identity', attrs: {}, content: identityKey.public },
|
||||||
xmppPreKey(key, +keyId),
|
xmppPreKey(key!, +keyId!),
|
||||||
xmppSignedPreKey(signedPreKey),
|
xmppSignedPreKey(signedPreKey),
|
||||||
{ tag: 'device-identity', attrs: {}, content: deviceIdentity }
|
{ tag: 'device-identity', attrs: {}, content: deviceIdentity }
|
||||||
]
|
]
|
||||||
@@ -254,7 +253,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
const from = node.attrs.from
|
const from = node.attrs.from
|
||||||
if (from === S_WHATSAPP_NET) {
|
if (from === S_WHATSAPP_NET) {
|
||||||
const countChild = getBinaryNodeChild(node, 'count')
|
const countChild = getBinaryNodeChild(node, 'count')
|
||||||
const count = +countChild!.attrs.value
|
const count = +countChild!.attrs.value!
|
||||||
const shouldUploadMorePreKeys = count < MIN_PREKEY_COUNT
|
const shouldUploadMorePreKeys = count < MIN_PREKEY_COUNT
|
||||||
|
|
||||||
logger.debug({ count, shouldUploadMorePreKeys }, 'recv pre-key count')
|
logger.debug({ count, shouldUploadMorePreKeys }, 'recv pre-key count')
|
||||||
@@ -307,7 +306,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 'modify':
|
case 'modify':
|
||||||
const oldNumber = getBinaryNodeChildren(child, 'participant').map(p => p.attrs.jid)
|
const oldNumber = getBinaryNodeChildren(child, 'participant').map(p => p.attrs.jid!)
|
||||||
msg.messageStubParameters = oldNumber || []
|
msg.messageStubParameters = oldNumber || []
|
||||||
msg.messageStubType = WAMessageStubType.GROUP_PARTICIPANT_CHANGE_NUMBER
|
msg.messageStubType = WAMessageStubType.GROUP_PARTICIPANT_CHANGE_NUMBER
|
||||||
break
|
break
|
||||||
@@ -317,9 +316,9 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
case 'add':
|
case 'add':
|
||||||
case 'leave':
|
case 'leave':
|
||||||
const stubType = `GROUP_PARTICIPANT_${child.tag.toUpperCase()}`
|
const stubType = `GROUP_PARTICIPANT_${child.tag.toUpperCase()}`
|
||||||
msg.messageStubType = WAMessageStubType[stubType]
|
msg.messageStubType = WAMessageStubType[stubType as keyof typeof WAMessageStubType]
|
||||||
|
|
||||||
const participants = getBinaryNodeChildren(child, 'participant').map(p => p.attrs.jid)
|
const participants = getBinaryNodeChildren(child, 'participant').map(p => p.attrs.jid!)
|
||||||
if (
|
if (
|
||||||
participants.length === 1 &&
|
participants.length === 1 &&
|
||||||
// if recv. "remove" message and sender removed themselves
|
// if recv. "remove" message and sender removed themselves
|
||||||
@@ -334,7 +333,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
break
|
break
|
||||||
case 'subject':
|
case 'subject':
|
||||||
msg.messageStubType = WAMessageStubType.GROUP_CHANGE_SUBJECT
|
msg.messageStubType = WAMessageStubType.GROUP_CHANGE_SUBJECT
|
||||||
msg.messageStubParameters = [child.attrs.subject]
|
msg.messageStubParameters = [child.attrs.subject!]
|
||||||
break
|
break
|
||||||
case 'description':
|
case 'description':
|
||||||
const description = getBinaryNodeChild(child, 'body')?.content?.toString()
|
const description = getBinaryNodeChild(child, 'body')?.content?.toString()
|
||||||
@@ -353,7 +352,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
break
|
break
|
||||||
case 'invite':
|
case 'invite':
|
||||||
msg.messageStubType = WAMessageStubType.GROUP_CHANGE_INVITE_LINK
|
msg.messageStubType = WAMessageStubType.GROUP_CHANGE_INVITE_LINK
|
||||||
msg.messageStubParameters = [child.attrs.code]
|
msg.messageStubParameters = [child.attrs.code!]
|
||||||
break
|
break
|
||||||
case 'member_add_mode':
|
case 'member_add_mode':
|
||||||
const addMode = child.content
|
const addMode = child.content
|
||||||
@@ -367,13 +366,13 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
const approvalMode = getBinaryNodeChild(child, 'group_join')
|
const approvalMode = getBinaryNodeChild(child, 'group_join')
|
||||||
if (approvalMode) {
|
if (approvalMode) {
|
||||||
msg.messageStubType = WAMessageStubType.GROUP_MEMBERSHIP_JOIN_APPROVAL_MODE
|
msg.messageStubType = WAMessageStubType.GROUP_MEMBERSHIP_JOIN_APPROVAL_MODE
|
||||||
msg.messageStubParameters = [approvalMode.attrs.state]
|
msg.messageStubParameters = [approvalMode.attrs.state!]
|
||||||
}
|
}
|
||||||
|
|
||||||
break
|
break
|
||||||
case 'created_membership_requests':
|
case 'created_membership_requests':
|
||||||
msg.messageStubType = WAMessageStubType.GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST_NON_ADMIN_ADD
|
msg.messageStubType = WAMessageStubType.GROUP_MEMBERSHIP_JOIN_APPROVAL_REQUEST_NON_ADMIN_ADD
|
||||||
msg.messageStubParameters = [participantJid, 'created', child.attrs.request_method]
|
msg.messageStubParameters = [participantJid, 'created', child.attrs.request_method!]
|
||||||
break
|
break
|
||||||
case 'revoked_membership_requests':
|
case 'revoked_membership_requests':
|
||||||
const isDenied = areJidsSameUser(participantJid, participant)
|
const isDenied = areJidsSameUser(participantJid, participant)
|
||||||
@@ -412,7 +411,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
await handleMexNewsletterNotification(node)
|
await handleMexNewsletterNotification(node)
|
||||||
break
|
break
|
||||||
case 'w:gp2':
|
case 'w:gp2':
|
||||||
handleGroupNotification(node.attrs.participant, child, result)
|
handleGroupNotification(node.attrs.participant!, child!, result)
|
||||||
break
|
break
|
||||||
case 'mediaretry':
|
case 'mediaretry':
|
||||||
const event = decodeMediaRetryNode(node)
|
const event = decodeMediaRetryNode(node)
|
||||||
@@ -423,7 +422,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
break
|
break
|
||||||
case 'devices':
|
case 'devices':
|
||||||
const devices = getBinaryNodeChildren(child, 'device')
|
const devices = getBinaryNodeChildren(child, 'device')
|
||||||
if (areJidsSameUser(child.attrs.jid, authState.creds.me!.id)) {
|
if (areJidsSameUser(child!.attrs.jid, authState.creds.me!.id)) {
|
||||||
const deviceJids = devices.map(d => d.attrs.jid)
|
const deviceJids = devices.map(d => d.attrs.jid)
|
||||||
logger.info({ deviceJids }, 'got my own devices')
|
logger.info({ deviceJids }, 'got my own devices')
|
||||||
}
|
}
|
||||||
@@ -453,7 +452,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
result.messageStubType = WAMessageStubType.GROUP_CHANGE_ICON
|
result.messageStubType = WAMessageStubType.GROUP_CHANGE_ICON
|
||||||
|
|
||||||
if (setPicture) {
|
if (setPicture) {
|
||||||
result.messageStubParameters = [setPicture.attrs.id]
|
result.messageStubParameters = [setPicture.attrs.id!]
|
||||||
}
|
}
|
||||||
|
|
||||||
result.participant = node?.attrs.author
|
result.participant = node?.attrs.author
|
||||||
@@ -465,9 +464,9 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
|
|
||||||
break
|
break
|
||||||
case 'account_sync':
|
case 'account_sync':
|
||||||
if (child.tag === 'disappearing_mode') {
|
if (child!.tag === 'disappearing_mode') {
|
||||||
const newDuration = +child.attrs.duration
|
const newDuration = +child!.attrs.duration!
|
||||||
const timestamp = +child.attrs.t
|
const timestamp = +child!.attrs.t!
|
||||||
|
|
||||||
logger.info({ newDuration }, 'updated account disappearing mode')
|
logger.info({ newDuration }, 'updated account disappearing mode')
|
||||||
|
|
||||||
@@ -480,11 +479,11 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (child.tag === 'blocklist') {
|
} else if (child!.tag === 'blocklist') {
|
||||||
const blocklists = getBinaryNodeChildren(child, 'item')
|
const blocklists = getBinaryNodeChildren(child, 'item')
|
||||||
|
|
||||||
for (const { attrs } of blocklists) {
|
for (const { attrs } of blocklists) {
|
||||||
const blocklist = [attrs.jid]
|
const blocklist = [attrs.jid!]
|
||||||
const type = attrs.action === 'block' ? 'add' : 'remove'
|
const type = attrs.action === 'block' ? 'add' : 'remove'
|
||||||
ev.emit('blocklist.update', { blocklist, type })
|
ev.emit('blocklist.update', { blocklist, type })
|
||||||
}
|
}
|
||||||
@@ -614,7 +613,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
|
|
||||||
for (const [i, msg] of msgs.entries()) {
|
for (const [i, msg] of msgs.entries()) {
|
||||||
if (msg) {
|
if (msg) {
|
||||||
updateSendMessageAgainCount(ids[i], participant)
|
updateSendMessageAgainCount(ids[i]!, participant)
|
||||||
const msgRelayOpts: MessageRelayOptions = { messageId: ids[i] }
|
const msgRelayOpts: MessageRelayOptions = { messageId: ids[i] }
|
||||||
|
|
||||||
if (sendToAll) {
|
if (sendToAll) {
|
||||||
@@ -622,7 +621,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
} else {
|
} else {
|
||||||
msgRelayOpts.participant = {
|
msgRelayOpts.participant = {
|
||||||
jid: participant,
|
jid: participant,
|
||||||
count: +retryNode.attrs.count
|
count: +retryNode.attrs.count!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -635,7 +634,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
|
|
||||||
const handleReceipt = async (node: BinaryNode) => {
|
const handleReceipt = async (node: BinaryNode) => {
|
||||||
const { attrs, content } = node
|
const { attrs, content } = node
|
||||||
const isLid = attrs.from.includes('lid')
|
const isLid = attrs.from!.includes('lid')
|
||||||
const isNodeFromMe = areJidsSameUser(
|
const isNodeFromMe = areJidsSameUser(
|
||||||
attrs.participant || attrs.from,
|
attrs.participant || attrs.from,
|
||||||
isLid ? authState.creds.me?.lid : authState.creds.me?.id
|
isLid ? authState.creds.me?.lid : authState.creds.me?.id
|
||||||
@@ -650,16 +649,16 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
participant: attrs.participant
|
participant: attrs.participant
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shouldIgnoreJid(remoteJid) && remoteJid !== '@s.whatsapp.net') {
|
if (shouldIgnoreJid(remoteJid!) && remoteJid !== '@s.whatsapp.net') {
|
||||||
logger.debug({ remoteJid }, 'ignoring receipt from jid')
|
logger.debug({ remoteJid }, 'ignoring receipt from jid')
|
||||||
await sendMessageAck(node)
|
await sendMessageAck(node)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const ids = [attrs.id]
|
const ids = [attrs.id!]
|
||||||
if (Array.isArray(content)) {
|
if (Array.isArray(content)) {
|
||||||
const items = getBinaryNodeChildren(content[0], 'item')
|
const items = getBinaryNodeChildren(content[0], 'item')
|
||||||
ids.push(...items.map(i => i.attrs.id))
|
ids.push(...items.map(i => i.attrs.id!))
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -672,7 +671,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
// or another device of ours has read some messages
|
// or another device of ours has read some messages
|
||||||
(status >= proto.WebMessageInfo.Status.SERVER_ACK || !isNodeFromMe)
|
(status >= proto.WebMessageInfo.Status.SERVER_ACK || !isNodeFromMe)
|
||||||
) {
|
) {
|
||||||
if (isJidGroup(remoteJid) || isJidStatusBroadcast(remoteJid)) {
|
if (isJidGroup(remoteJid) || isJidStatusBroadcast(remoteJid!)) {
|
||||||
if (attrs.participant) {
|
if (attrs.participant) {
|
||||||
const updateKey: keyof MessageUserReceipt =
|
const updateKey: keyof MessageUserReceipt =
|
||||||
status === proto.WebMessageInfo.Status.DELIVERY_ACK ? 'receiptTimestamp' : 'readTimestamp'
|
status === proto.WebMessageInfo.Status.DELIVERY_ACK ? 'receiptTimestamp' : 'readTimestamp'
|
||||||
@@ -682,7 +681,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
key: { ...key, id },
|
key: { ...key, id },
|
||||||
receipt: {
|
receipt: {
|
||||||
userJid: jidNormalizedUser(attrs.participant),
|
userJid: jidNormalizedUser(attrs.participant),
|
||||||
[updateKey]: +attrs.t
|
[updateKey]: +attrs.t!
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
)
|
)
|
||||||
@@ -702,12 +701,12 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
// correctly set who is asking for the retry
|
// correctly set who is asking for the retry
|
||||||
key.participant = key.participant || attrs.from
|
key.participant = key.participant || attrs.from
|
||||||
const retryNode = getBinaryNodeChild(node, 'retry')
|
const retryNode = getBinaryNodeChild(node, 'retry')
|
||||||
if (willSendMessageAgain(ids[0], key.participant)) {
|
if (willSendMessageAgain(ids[0]!, key.participant!)) {
|
||||||
if (key.fromMe) {
|
if (key.fromMe) {
|
||||||
try {
|
try {
|
||||||
logger.debug({ attrs, key }, 'recv retry request')
|
logger.debug({ attrs, key }, 'recv retry request')
|
||||||
await sendMessagesAgain(key, ids, retryNode!)
|
await sendMessagesAgain(key, ids, retryNode!)
|
||||||
} catch (error) {
|
} catch (error: any) {
|
||||||
logger.error({ key, ids, trace: error.stack }, 'error in sending message again')
|
logger.error({ key, ids, trace: error.stack }, 'error in sending message again')
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -726,7 +725,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
|
|
||||||
const handleNotification = async (node: BinaryNode) => {
|
const handleNotification = async (node: BinaryNode) => {
|
||||||
const remoteJid = node.attrs.from
|
const remoteJid = node.attrs.from
|
||||||
if (shouldIgnoreJid(remoteJid) && remoteJid !== '@s.whatsapp.net') {
|
if (shouldIgnoreJid(remoteJid!) && remoteJid !== '@s.whatsapp.net') {
|
||||||
logger.debug({ remoteJid, id: node.attrs.id }, 'ignored notification')
|
logger.debug({ remoteJid, id: node.attrs.id }, 'ignored notification')
|
||||||
await sendMessageAck(node)
|
await sendMessageAck(node)
|
||||||
return
|
return
|
||||||
@@ -746,7 +745,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
...(msg.key || {})
|
...(msg.key || {})
|
||||||
}
|
}
|
||||||
msg.participant ??= node.attrs.participant
|
msg.participant ??= node.attrs.participant
|
||||||
msg.messageTimestamp = +node.attrs.t
|
msg.messageTimestamp = +node.attrs.t!
|
||||||
|
|
||||||
const fullMsg = proto.WebMessageInfo.fromObject(msg)
|
const fullMsg = proto.WebMessageInfo.fromObject(msg)
|
||||||
await upsertMessage(fullMsg, 'append')
|
await upsertMessage(fullMsg, 'append')
|
||||||
@@ -759,7 +758,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const handleMessage = async (node: BinaryNode) => {
|
const handleMessage = async (node: BinaryNode) => {
|
||||||
if (shouldIgnoreJid(node.attrs.from) && node.attrs.from !== '@s.whatsapp.net') {
|
if (shouldIgnoreJid(node.attrs.from!) && node.attrs.from !== '@s.whatsapp.net') {
|
||||||
logger.debug({ key: node.attrs.key }, 'ignored message')
|
logger.debug({ key: node.attrs.key }, 'ignored message')
|
||||||
await sendMessageAck(node)
|
await sendMessageAck(node)
|
||||||
return
|
return
|
||||||
@@ -786,8 +785,8 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
|
|
||||||
logger.debug('received unavailable message, acked and requested resend from phone')
|
logger.debug('received unavailable message, acked and requested resend from phone')
|
||||||
} else {
|
} else {
|
||||||
if (placeholderResendCache.get(node.attrs.id)) {
|
if (placeholderResendCache.get(node.attrs.id!)) {
|
||||||
placeholderResendCache.del(node.attrs.id)
|
placeholderResendCache.del(node.attrs.id!)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -806,7 +805,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
msg.message?.protocolMessage?.type === proto.Message.ProtocolMessage.Type.SHARE_PHONE_NUMBER &&
|
msg.message?.protocolMessage?.type === proto.Message.ProtocolMessage.Type.SHARE_PHONE_NUMBER &&
|
||||||
node.attrs.sender_pn
|
node.attrs.sender_pn
|
||||||
) {
|
) {
|
||||||
ev.emit('chats.phoneNumberShare', { lid: node.attrs.from, jid: node.attrs.sender_pn })
|
ev.emit('chats.phoneNumberShare', { lid: node.attrs.from!, jid: node.attrs.sender_pn })
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -938,14 +937,18 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
const handleCall = async (node: BinaryNode) => {
|
const handleCall = async (node: BinaryNode) => {
|
||||||
const { attrs } = node
|
const { attrs } = node
|
||||||
const [infoChild] = getAllBinaryNodeChildren(node)
|
const [infoChild] = getAllBinaryNodeChildren(node)
|
||||||
const callId = infoChild.attrs['call-id']
|
if (!infoChild) {
|
||||||
const from = infoChild.attrs.from || infoChild.attrs['call-creator']
|
throw new Boom('Missing call info in call node')
|
||||||
|
}
|
||||||
|
|
||||||
|
const callId = infoChild.attrs['call-id']!
|
||||||
|
const from = infoChild.attrs.from! || infoChild.attrs['call-creator']!
|
||||||
const status = getCallStatusFromNode(infoChild)
|
const status = getCallStatusFromNode(infoChild)
|
||||||
const call: WACallEvent = {
|
const call: WACallEvent = {
|
||||||
chatId: attrs.from,
|
chatId: attrs.from!,
|
||||||
from,
|
from,
|
||||||
id: callId,
|
id: callId,
|
||||||
date: new Date(+attrs.t * 1000),
|
date: new Date(+attrs.t! * 1000),
|
||||||
offline: !!attrs.offline,
|
offline: !!attrs.offline,
|
||||||
status
|
status
|
||||||
}
|
}
|
||||||
@@ -1263,6 +1266,10 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
ev.on('call', ([call]) => {
|
ev.on('call', ([call]) => {
|
||||||
|
if (!call) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// missed call + group call notification message generation
|
// missed call + group call notification message generation
|
||||||
if (call.status === 'timeout' || (call.status === 'offer' && call.isGroup)) {
|
if (call.status === 'timeout' || (call.status === 'offer' && call.isGroup)) {
|
||||||
const msg: proto.IWebMessageInfo = {
|
const msg: proto.IWebMessageInfo = {
|
||||||
|
|||||||
+17
-13
@@ -2,7 +2,7 @@ import NodeCache from '@cacheable/node-cache'
|
|||||||
import { Boom } from '@hapi/boom'
|
import { Boom } from '@hapi/boom'
|
||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import { DEFAULT_CACHE_TTLS, WA_DEFAULT_EPHEMERAL } from '../Defaults'
|
import { DEFAULT_CACHE_TTLS, WA_DEFAULT_EPHEMERAL } from '../Defaults'
|
||||||
import {
|
import type {
|
||||||
AnyMessageContent,
|
AnyMessageContent,
|
||||||
MediaConnInfo,
|
MediaConnInfo,
|
||||||
MessageReceiptType,
|
MessageReceiptType,
|
||||||
@@ -33,8 +33,8 @@ import {
|
|||||||
import { getUrlInfo } from '../Utils/link-preview'
|
import { getUrlInfo } from '../Utils/link-preview'
|
||||||
import {
|
import {
|
||||||
areJidsSameUser,
|
areJidsSameUser,
|
||||||
BinaryNode,
|
type BinaryNode,
|
||||||
BinaryNodeAttributes,
|
type BinaryNodeAttributes,
|
||||||
getBinaryNodeChild,
|
getBinaryNodeChild,
|
||||||
getBinaryNodeChildren,
|
getBinaryNodeChildren,
|
||||||
isJidGroup,
|
isJidGroup,
|
||||||
@@ -42,7 +42,7 @@ import {
|
|||||||
jidDecode,
|
jidDecode,
|
||||||
jidEncode,
|
jidEncode,
|
||||||
jidNormalizedUser,
|
jidNormalizedUser,
|
||||||
JidWithDevice,
|
type JidWithDevice,
|
||||||
S_WHATSAPP_NET
|
S_WHATSAPP_NET
|
||||||
} from '../WABinary'
|
} from '../WABinary'
|
||||||
import { USyncQuery, USyncUser } from '../WAUSync'
|
import { USyncQuery, USyncUser } from '../WAUSync'
|
||||||
@@ -93,14 +93,14 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
|||||||
},
|
},
|
||||||
content: [{ tag: 'media_conn', attrs: {} }]
|
content: [{ tag: 'media_conn', attrs: {} }]
|
||||||
})
|
})
|
||||||
const mediaConnNode = getBinaryNodeChild(result, 'media_conn')
|
const mediaConnNode = getBinaryNodeChild(result, 'media_conn')!
|
||||||
const node: MediaConnInfo = {
|
const node: MediaConnInfo = {
|
||||||
hosts: getBinaryNodeChildren(mediaConnNode, 'host').map(({ attrs }) => ({
|
hosts: getBinaryNodeChildren(mediaConnNode, 'host').map(({ attrs }) => ({
|
||||||
hostname: attrs.hostname,
|
hostname: attrs.hostname!,
|
||||||
maxContentLengthBytes: +attrs.maxContentLengthBytes
|
maxContentLengthBytes: +attrs.maxContentLengthBytes!
|
||||||
})),
|
})),
|
||||||
auth: mediaConnNode!.attrs.auth,
|
auth: mediaConnNode.attrs.auth!,
|
||||||
ttl: +mediaConnNode!.attrs.ttl,
|
ttl: +mediaConnNode.attrs.ttl!,
|
||||||
fetchDate: new Date()
|
fetchDate: new Date()
|
||||||
}
|
}
|
||||||
logger.debug('fetched media conn')
|
logger.debug('fetched media conn')
|
||||||
@@ -121,10 +121,14 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
|||||||
messageIds: string[],
|
messageIds: string[],
|
||||||
type: MessageReceiptType
|
type: MessageReceiptType
|
||||||
) => {
|
) => {
|
||||||
|
if (!messageIds || messageIds.length === 0) {
|
||||||
|
throw new Boom('missing ids in receipt')
|
||||||
|
}
|
||||||
|
|
||||||
const node: BinaryNode = {
|
const node: BinaryNode = {
|
||||||
tag: 'receipt',
|
tag: 'receipt',
|
||||||
attrs: {
|
attrs: {
|
||||||
id: messageIds[0]
|
id: messageIds[0]!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const isReadReceipt = type === 'read' || type === 'read-self'
|
const isReadReceipt = type === 'read' || type === 'read-self'
|
||||||
@@ -226,7 +230,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
|||||||
|
|
||||||
for (const item of extracted) {
|
for (const item of extracted) {
|
||||||
deviceMap[item.user] = deviceMap[item.user] || []
|
deviceMap[item.user] = deviceMap[item.user] || []
|
||||||
deviceMap[item.user].push(item)
|
deviceMap[item.user]?.push(item)
|
||||||
|
|
||||||
deviceResults.push(item)
|
deviceResults.push(item)
|
||||||
}
|
}
|
||||||
@@ -394,7 +398,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
|||||||
messageContextInfo: message.messageContextInfo
|
messageContextInfo: message.messageContextInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
const extraAttrs = {}
|
const extraAttrs: BinaryNodeAttributes = {}
|
||||||
|
|
||||||
if (participant) {
|
if (participant) {
|
||||||
// when the retry request is not for a group
|
// when the retry request is not for a group
|
||||||
@@ -762,7 +766,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
|||||||
content.url = getUrlFromDirectPath(content.directPath!)
|
content.url = getUrlFromDirectPath(content.directPath!)
|
||||||
|
|
||||||
logger.debug({ directPath: media.directPath, key: result.key }, 'media update successful')
|
logger.debug({ directPath: media.directPath, key: result.key }, 'media update successful')
|
||||||
} catch (err) {
|
} catch (err: any) {
|
||||||
error = err
|
error = err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-9
@@ -10,7 +10,8 @@ import {
|
|||||||
MIN_PREKEY_COUNT,
|
MIN_PREKEY_COUNT,
|
||||||
NOISE_WA_HEADER
|
NOISE_WA_HEADER
|
||||||
} from '../Defaults'
|
} from '../Defaults'
|
||||||
import { DisconnectReason, SocketConfig } from '../Types'
|
import type { SocketConfig } from '../Types'
|
||||||
|
import { DisconnectReason } from '../Types'
|
||||||
import {
|
import {
|
||||||
addTransactionCapability,
|
addTransactionCapability,
|
||||||
aesEncryptCTR,
|
aesEncryptCTR,
|
||||||
@@ -32,7 +33,7 @@ import {
|
|||||||
} from '../Utils'
|
} from '../Utils'
|
||||||
import {
|
import {
|
||||||
assertNodeErrorFree,
|
assertNodeErrorFree,
|
||||||
BinaryNode,
|
type BinaryNode,
|
||||||
binaryNodeToString,
|
binaryNodeToString,
|
||||||
encodeBinaryNode,
|
encodeBinaryNode,
|
||||||
getBinaryNodeChild,
|
getBinaryNodeChild,
|
||||||
@@ -178,8 +179,8 @@ export const makeSocket = (config: SocketConfig) => {
|
|||||||
* @param timeoutMs timeout after which the promise will reject
|
* @param timeoutMs timeout after which the promise will reject
|
||||||
*/
|
*/
|
||||||
const waitForMessage = async <T>(msgId: string, timeoutMs = defaultQueryTimeoutMs) => {
|
const waitForMessage = async <T>(msgId: string, timeoutMs = defaultQueryTimeoutMs) => {
|
||||||
let onRecv: (json) => void
|
let onRecv: (json: any) => void
|
||||||
let onErr: (err) => void
|
let onErr: (err: Boom | Error) => void
|
||||||
try {
|
try {
|
||||||
const result = await promiseTimeout<T>(timeoutMs, (resolve, reject) => {
|
const result = await promiseTimeout<T>(timeoutMs, (resolve, reject) => {
|
||||||
onRecv = resolve
|
onRecv = resolve
|
||||||
@@ -268,8 +269,8 @@ export const makeSocket = (config: SocketConfig) => {
|
|||||||
},
|
},
|
||||||
content: [{ tag: 'count', attrs: {} }]
|
content: [{ tag: 'count', attrs: {} }]
|
||||||
})
|
})
|
||||||
const countChild = getBinaryNodeChild(result, 'count')
|
const countChild = getBinaryNodeChild(result, 'count')!
|
||||||
return +countChild!.attrs.value
|
return +countChild.attrs.value!
|
||||||
}
|
}
|
||||||
|
|
||||||
/** generates and uploads a set of pre-keys to the server */
|
/** generates and uploads a set of pre-keys to the server */
|
||||||
@@ -553,7 +554,7 @@ export const makeSocket = (config: SocketConfig) => {
|
|||||||
ws.on('open', async () => {
|
ws.on('open', async () => {
|
||||||
try {
|
try {
|
||||||
await validateConnection()
|
await validateConnection()
|
||||||
} catch (err) {
|
} catch (err: any) {
|
||||||
logger.error({ err }, 'error in validating connection')
|
logger.error({ err }, 'error in validating connection')
|
||||||
end(err)
|
end(err)
|
||||||
}
|
}
|
||||||
@@ -571,7 +572,7 @@ export const makeSocket = (config: SocketConfig) => {
|
|||||||
attrs: {
|
attrs: {
|
||||||
to: S_WHATSAPP_NET,
|
to: S_WHATSAPP_NET,
|
||||||
type: 'result',
|
type: 'result',
|
||||||
id: stanza.attrs.id
|
id: stanza.attrs.id!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await sendNode(iq)
|
await sendNode(iq)
|
||||||
@@ -621,7 +622,7 @@ export const makeSocket = (config: SocketConfig) => {
|
|||||||
ev.emit('connection.update', { isNewLogin: true, qr: undefined })
|
ev.emit('connection.update', { isNewLogin: true, qr: undefined })
|
||||||
|
|
||||||
await sendNode(reply)
|
await sendNode(reply)
|
||||||
} catch (error) {
|
} catch (error: any) {
|
||||||
logger.info({ trace: error.stack }, 'error in pairing')
|
logger.info({ trace: error.stack }, 'error in pairing')
|
||||||
end(error)
|
end(error)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
import { Boom } from '@hapi/boom'
|
import { Boom } from '@hapi/boom'
|
||||||
import { SocketConfig } from '../Types'
|
import type { SocketConfig } from '../Types'
|
||||||
import { BinaryNode, S_WHATSAPP_NET } from '../WABinary'
|
import { type BinaryNode, S_WHATSAPP_NET } from '../WABinary'
|
||||||
import { USyncQuery } from '../WAUSync'
|
import { USyncQuery } from '../WAUSync'
|
||||||
import { makeSocket } from './socket'
|
import { makeSocket } from './socket'
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { makeLibSignalRepository } from '../Signal/libsignal'
|
|||||||
import { SignalAuthState, SignalDataTypeMap } from '../Types'
|
import { SignalAuthState, SignalDataTypeMap } from '../Types'
|
||||||
import { Curve, generateRegistrationId, generateSignalPubKey, signedKeyPair } from '../Utils'
|
import { Curve, generateRegistrationId, generateSignalPubKey, signedKeyPair } from '../Utils'
|
||||||
|
|
||||||
|
// TODO: should move to libsignal
|
||||||
|
|
||||||
describe('Signal Tests', () => {
|
describe('Signal Tests', () => {
|
||||||
it('should correctly encrypt/decrypt 1 message', async () => {
|
it('should correctly encrypt/decrypt 1 message', async () => {
|
||||||
const user1 = makeUser()
|
const user1 = makeUser()
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { SignalDataTypeMap, SignalKeyStore } from '../Types'
|
|
||||||
import { jidEncode } from '../WABinary'
|
import { jidEncode } from '../WABinary'
|
||||||
|
|
||||||
export function randomJid() {
|
export function randomJid() {
|
||||||
|
|||||||
+10
-9
@@ -1,15 +1,16 @@
|
|||||||
import type { Boom } from '@hapi/boom'
|
import type { Boom } from '@hapi/boom'
|
||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import { AuthenticationCreds } from './Auth'
|
import type { AuthenticationCreds } from './Auth'
|
||||||
import { WACallEvent } from './Call'
|
import type { WACallEvent } from './Call'
|
||||||
import { Chat, ChatUpdate, PresenceData } from './Chat'
|
import type { Chat, ChatUpdate, PresenceData } from './Chat'
|
||||||
import { Contact } from './Contact'
|
import type { Contact } from './Contact'
|
||||||
import { GroupMetadata, ParticipantAction, RequestJoinAction, RequestJoinMethod } from './GroupMetadata'
|
import type { GroupMetadata, ParticipantAction, RequestJoinAction, RequestJoinMethod } from './GroupMetadata'
|
||||||
import { Label } from './Label'
|
import type { Label } from './Label'
|
||||||
import { LabelAssociation } from './LabelAssociation'
|
import type { LabelAssociation } from './LabelAssociation'
|
||||||
import { MessageUpsertType, MessageUserReceiptUpdate, WAMessage, WAMessageKey, WAMessageUpdate } from './Message'
|
import type { MessageUpsertType, MessageUserReceiptUpdate, WAMessage, WAMessageKey, WAMessageUpdate } from './Message'
|
||||||
import { ConnectionState } from './State'
|
import type { ConnectionState } from './State'
|
||||||
|
|
||||||
|
// TODO: refactor this mess
|
||||||
export type BaileysEventMap = {
|
export type BaileysEventMap = {
|
||||||
/** connection state has been updated -- WS closed, opened, connecting etc. */
|
/** connection state has been updated -- WS closed, opened, connecting etc. */
|
||||||
'connection.update': Partial<ConnectionState>
|
'connection.update': Partial<ConnectionState>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Contact } from './Contact'
|
import type { Contact } from './Contact'
|
||||||
|
|
||||||
export type GroupParticipant = Contact & {
|
export type GroupParticipant = Contact & {
|
||||||
isAdmin?: boolean
|
isAdmin?: boolean
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { AxiosRequestConfig } from 'axios'
|
import type { AxiosRequestConfig } from 'axios'
|
||||||
import type { Readable } from 'stream'
|
import type { Readable } from 'stream'
|
||||||
import type { URL } from 'url'
|
import type { URL } from 'url'
|
||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import { MEDIA_HKDF_KEY_MAPPING } from '../Defaults'
|
import { MEDIA_HKDF_KEY_MAPPING } from '../Defaults'
|
||||||
import { BinaryNode } from '../WABinary'
|
import type { BinaryNode } from '../WABinary'
|
||||||
import type { GroupMetadata } from './GroupMetadata'
|
import type { GroupMetadata } from './GroupMetadata'
|
||||||
import { CacheStore } from './Socket'
|
import type { CacheStore } from './Socket'
|
||||||
|
|
||||||
// export the WAMessage Prototypes
|
// export the WAMessage Prototypes
|
||||||
export { proto as WAProto }
|
export { proto as WAProto }
|
||||||
@@ -32,7 +32,7 @@ export type WAGenericMediaMessage =
|
|||||||
| proto.Message.IStickerMessage
|
| proto.Message.IStickerMessage
|
||||||
export const WAMessageStubType = proto.WebMessageInfo.StubType
|
export const WAMessageStubType = proto.WebMessageInfo.StubType
|
||||||
export const WAMessageStatus = proto.WebMessageInfo.Status
|
export const WAMessageStatus = proto.WebMessageInfo.Status
|
||||||
import { ILogger } from '../Utils/logger'
|
import type { ILogger } from '../Utils/logger'
|
||||||
export type WAMediaPayloadURL = { url: URL | string }
|
export type WAMediaPayloadURL = { url: URL | string }
|
||||||
export type WAMediaPayloadStream = { stream: Readable }
|
export type WAMediaPayloadStream = { stream: Readable }
|
||||||
export type WAMediaUpload = Buffer | WAMediaPayloadStream | WAMediaPayloadURL
|
export type WAMediaUpload = Buffer | WAMediaPayloadStream | WAMediaPayloadURL
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { WAMediaUpload } from './Message'
|
import type { WAMediaUpload } from './Message'
|
||||||
|
|
||||||
export type CatalogResult = {
|
export type CatalogResult = {
|
||||||
data: {
|
data: {
|
||||||
|
|||||||
+6
-6
@@ -1,12 +1,12 @@
|
|||||||
import { AxiosRequestConfig } from 'axios'
|
import type { AxiosRequestConfig } from 'axios'
|
||||||
import type { Agent } from 'https'
|
import type { Agent } from 'https'
|
||||||
import type { URL } from 'url'
|
import type { URL } from 'url'
|
||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import { ILogger } from '../Utils/logger'
|
import type { ILogger } from '../Utils/logger'
|
||||||
import { AuthenticationState, SignalAuthState, TransactionCapabilityOptions } from './Auth'
|
import type { AuthenticationState, SignalAuthState, TransactionCapabilityOptions } from './Auth'
|
||||||
import { GroupMetadata } from './GroupMetadata'
|
import type { GroupMetadata } from './GroupMetadata'
|
||||||
import { MediaConnInfo } from './Message'
|
import { type MediaConnInfo } from './Message'
|
||||||
import { SignalRepository } from './Signal'
|
import type { SignalRepository } from './Signal'
|
||||||
|
|
||||||
export type WAVersion = [number, number, number]
|
export type WAVersion = [number, number, number]
|
||||||
export type WABrowserDescription = [string, string, string]
|
export type WABrowserDescription = [string, string, string]
|
||||||
|
|||||||
+5
-2
@@ -1,13 +1,16 @@
|
|||||||
import { Contact } from './Contact'
|
import { Boom } from '@hapi/boom'
|
||||||
|
import type { Contact } from './Contact'
|
||||||
|
|
||||||
export type WAConnectionState = 'open' | 'connecting' | 'close'
|
export type WAConnectionState = 'open' | 'connecting' | 'close'
|
||||||
|
|
||||||
export type ConnectionState = {
|
export type ConnectionState = {
|
||||||
/** connection is now open, connecting or closed */
|
/** connection is now open, connecting or closed */
|
||||||
connection: WAConnectionState
|
connection: WAConnectionState
|
||||||
|
|
||||||
/** the error that caused the connection to close */
|
/** the error that caused the connection to close */
|
||||||
lastDisconnect?: {
|
lastDisconnect?: {
|
||||||
error: Error | undefined
|
// TODO: refactor and gain independence from Boom
|
||||||
|
error: Boom | Error | undefined
|
||||||
date: Date
|
date: Date
|
||||||
}
|
}
|
||||||
/** is this a new login */
|
/** is this a new login */
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { BinaryNode } from '../WABinary'
|
import type { BinaryNode } from '../WABinary'
|
||||||
import { USyncUser } from '../WAUSync'
|
import { USyncUser } from '../WAUSync'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+2
-2
@@ -11,8 +11,8 @@ export * from './Call'
|
|||||||
export * from './Signal'
|
export * from './Signal'
|
||||||
export * from './Newsletter'
|
export * from './Newsletter'
|
||||||
|
|
||||||
import { AuthenticationState } from './Auth'
|
import type { AuthenticationState } from './Auth'
|
||||||
import { SocketConfig } from './Socket'
|
import type { SocketConfig } from './Socket'
|
||||||
|
|
||||||
export type UserFacingSocketConfig = Partial<SocketConfig> & { auth: AuthenticationState }
|
export type UserFacingSocketConfig = Partial<SocketConfig> & { auth: AuthenticationState }
|
||||||
|
|
||||||
|
|||||||
+10
-9
@@ -12,7 +12,7 @@ import type {
|
|||||||
} from '../Types'
|
} from '../Types'
|
||||||
import { Curve, signedKeyPair } from './crypto'
|
import { Curve, signedKeyPair } from './crypto'
|
||||||
import { delay, generateRegistrationId } from './generics'
|
import { delay, generateRegistrationId } from './generics'
|
||||||
import { ILogger } from './logger'
|
import type { ILogger } from './logger'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds caching capability to a SignalKeyStore
|
* Adds caching capability to a SignalKeyStore
|
||||||
@@ -67,8 +67,8 @@ export function makeCacheableSignalKeyStore(
|
|||||||
async set(data) {
|
async set(data) {
|
||||||
let keys = 0
|
let keys = 0
|
||||||
for (const type in data) {
|
for (const type in data) {
|
||||||
for (const id in data[type]) {
|
for (const id in data[type as keyof SignalDataTypeMap]) {
|
||||||
cache.set(getUniqueId(type, id), data[type][id])
|
cache.set(getUniqueId(type, id), data[type as keyof SignalDataTypeMap]![id])
|
||||||
keys += 1
|
keys += 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -118,7 +118,7 @@ export const addTransactionCapability = (
|
|||||||
Object.assign(transactionCache[type]!, result)
|
Object.assign(transactionCache[type]!, result)
|
||||||
}
|
}
|
||||||
|
|
||||||
return ids.reduce((dict, id) => {
|
return ids.reduce((dict: { [T in string]: any }, id) => {
|
||||||
const value = transactionCache[type]?.[id]
|
const value = transactionCache[type]?.[id]
|
||||||
if (value) {
|
if (value) {
|
||||||
dict[id] = value
|
dict[id] = value
|
||||||
@@ -133,12 +133,13 @@ export const addTransactionCapability = (
|
|||||||
set: data => {
|
set: data => {
|
||||||
if (isInTransaction()) {
|
if (isInTransaction()) {
|
||||||
logger.trace({ types: Object.keys(data) }, 'caching in transaction')
|
logger.trace({ types: Object.keys(data) }, 'caching in transaction')
|
||||||
for (const key in data) {
|
for (const key_ in data) {
|
||||||
transactionCache[key] = transactionCache[key] || {}
|
const key = key_ as keyof SignalDataTypeMap
|
||||||
Object.assign(transactionCache[key], data[key])
|
transactionCache[key] = transactionCache[key] || ({} as any)
|
||||||
|
Object.assign(transactionCache[key]!, data[key])
|
||||||
|
|
||||||
mutations[key] = mutations[key] || {}
|
mutations[key] = mutations[key] || ({} as any)
|
||||||
Object.assign(mutations[key], data[key])
|
Object.assign(mutations[key]!, data[key])
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return state.set(data)
|
return state.set(data)
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export const captureEventStream = (ev: BaileysEventEmitter, filename: string) =>
|
|||||||
// monkey patch eventemitter to capture all events
|
// monkey patch eventemitter to capture all events
|
||||||
ev.emit = function (...args: any[]) {
|
ev.emit = function (...args: any[]) {
|
||||||
const content = JSON.stringify({ timestamp: Date.now(), event: args[0], data: args[1] }) + '\n'
|
const content = JSON.stringify({ timestamp: Date.now(), event: args[0], data: args[1] }) + '\n'
|
||||||
const result = oldEmit.apply(ev, args)
|
const result = oldEmit.apply(ev, args as any)
|
||||||
|
|
||||||
writeMutex.mutex(async () => {
|
writeMutex.mutex(async () => {
|
||||||
await writeFile(filename, content, { flag: 'a' })
|
await writeFile(filename, content, { flag: 'a' })
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { createHash } from 'crypto'
|
|||||||
import { createWriteStream, promises as fs } from 'fs'
|
import { createWriteStream, promises as fs } from 'fs'
|
||||||
import { tmpdir } from 'os'
|
import { tmpdir } from 'os'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
import {
|
import type {
|
||||||
CatalogCollection,
|
CatalogCollection,
|
||||||
CatalogStatus,
|
CatalogStatus,
|
||||||
OrderDetails,
|
OrderDetails,
|
||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
WAMediaUpload,
|
WAMediaUpload,
|
||||||
WAMediaUploadFunction
|
WAMediaUploadFunction
|
||||||
} from '../Types'
|
} from '../Types'
|
||||||
import { BinaryNode, getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString } from '../WABinary'
|
import { type BinaryNode, getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString } from '../WABinary'
|
||||||
import { generateMessageIDV2 } from './generics'
|
import { generateMessageIDV2 } from './generics'
|
||||||
import { getStream, getUrlFromDirectPath } from './messages-media'
|
import { getStream, getUrlFromDirectPath } from './messages-media'
|
||||||
|
|
||||||
|
|||||||
+18
-14
@@ -1,7 +1,7 @@
|
|||||||
import { Boom } from '@hapi/boom'
|
import { Boom } from '@hapi/boom'
|
||||||
import { AxiosRequestConfig } from 'axios'
|
import type { AxiosRequestConfig } from 'axios'
|
||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import {
|
import type {
|
||||||
BaileysEventEmitter,
|
BaileysEventEmitter,
|
||||||
Chat,
|
Chat,
|
||||||
ChatModification,
|
ChatModification,
|
||||||
@@ -14,9 +14,13 @@ import {
|
|||||||
WAPatchCreate,
|
WAPatchCreate,
|
||||||
WAPatchName
|
WAPatchName
|
||||||
} from '../Types'
|
} from '../Types'
|
||||||
import { ChatLabelAssociation, LabelAssociationType, MessageLabelAssociation } from '../Types/LabelAssociation'
|
|
||||||
import {
|
import {
|
||||||
BinaryNode,
|
type ChatLabelAssociation,
|
||||||
|
LabelAssociationType,
|
||||||
|
type MessageLabelAssociation
|
||||||
|
} from '../Types/LabelAssociation'
|
||||||
|
import {
|
||||||
|
type BinaryNode,
|
||||||
getBinaryNodeChild,
|
getBinaryNodeChild,
|
||||||
getBinaryNodeChildren,
|
getBinaryNodeChildren,
|
||||||
isJidGroup,
|
isJidGroup,
|
||||||
@@ -25,7 +29,7 @@ import {
|
|||||||
} from '../WABinary'
|
} from '../WABinary'
|
||||||
import { aesDecrypt, aesEncrypt, hkdf, hmacSign } from './crypto'
|
import { aesDecrypt, aesEncrypt, hkdf, hmacSign } from './crypto'
|
||||||
import { toNumber } from './generics'
|
import { toNumber } from './generics'
|
||||||
import { ILogger } from './logger'
|
import type { ILogger } from './logger'
|
||||||
import { LT_HASH_ANTI_TAMPERING } from './lt-hash'
|
import { LT_HASH_ANTI_TAMPERING } from './lt-hash'
|
||||||
import { downloadContentFromMessage } from './messages-media'
|
import { downloadContentFromMessage } from './messages-media'
|
||||||
|
|
||||||
@@ -343,7 +347,7 @@ export const extractSyncdPatches = async (result: BinaryNode, options: AxiosRequ
|
|||||||
|
|
||||||
const syncd = proto.SyncdPatch.decode(content as Uint8Array)
|
const syncd = proto.SyncdPatch.decode(content as Uint8Array)
|
||||||
if (!syncd.version) {
|
if (!syncd.version) {
|
||||||
syncd.version = { version: +collectionNode.attrs.version + 1 }
|
syncd.version = { version: +collectionNode.attrs.version! + 1 }
|
||||||
}
|
}
|
||||||
|
|
||||||
syncds.push(syncd)
|
syncds.push(syncd)
|
||||||
@@ -616,7 +620,7 @@ export const chatModificationToAppPatch = (mod: ChatModification, jid: string) =
|
|||||||
operation: mod.contact ? OP.SET : OP.REMOVE
|
operation: mod.contact ? OP.SET : OP.REMOVE
|
||||||
}
|
}
|
||||||
} else if ('star' in mod) {
|
} else if ('star' in mod) {
|
||||||
const key = mod.star.messages[0]
|
const key = mod.star.messages[0]!
|
||||||
patch = {
|
patch = {
|
||||||
syncAction: {
|
syncAction: {
|
||||||
starAction: {
|
starAction: {
|
||||||
@@ -753,7 +757,7 @@ export const processSyncAction = (
|
|||||||
{
|
{
|
||||||
id,
|
id,
|
||||||
muteEndTime: action.muteAction?.muted ? toNumber(action.muteAction.muteEndTimestamp) : null,
|
muteEndTime: action.muteAction?.muted ? toNumber(action.muteAction.muteEndTimestamp) : null,
|
||||||
conditional: getChatUpdateConditional(id, undefined)
|
conditional: getChatUpdateConditional(id!, undefined)
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
} else if (action?.archiveChatAction || type === 'archive' || type === 'unarchive') {
|
} else if (action?.archiveChatAction || type === 'archive' || type === 'unarchive') {
|
||||||
@@ -782,7 +786,7 @@ export const processSyncAction = (
|
|||||||
{
|
{
|
||||||
id,
|
id,
|
||||||
archived: isArchived,
|
archived: isArchived,
|
||||||
conditional: getChatUpdateConditional(id, msgRange)
|
conditional: getChatUpdateConditional(id!, msgRange)
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
} else if (action?.markChatAsReadAction) {
|
} else if (action?.markChatAsReadAction) {
|
||||||
@@ -796,7 +800,7 @@ export const processSyncAction = (
|
|||||||
{
|
{
|
||||||
id,
|
id,
|
||||||
unreadCount: isNullUpdate ? null : !!markReadAction?.read ? 0 : -1,
|
unreadCount: isNullUpdate ? null : !!markReadAction?.read ? 0 : -1,
|
||||||
conditional: getChatUpdateConditional(id, markReadAction?.messageRange)
|
conditional: getChatUpdateConditional(id!, markReadAction?.messageRange)
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
} else if (action?.deleteMessageForMeAction || type === 'deleteMessageForMe') {
|
} else if (action?.deleteMessageForMeAction || type === 'deleteMessageForMe') {
|
||||||
@@ -812,7 +816,7 @@ export const processSyncAction = (
|
|||||||
} else if (action?.contactAction) {
|
} else if (action?.contactAction) {
|
||||||
ev.emit('contacts.upsert', [
|
ev.emit('contacts.upsert', [
|
||||||
{
|
{
|
||||||
id: id,
|
id: id!,
|
||||||
name: action.contactAction.fullName!,
|
name: action.contactAction.fullName!,
|
||||||
lid: action.contactAction.lidJid || undefined,
|
lid: action.contactAction.lidJid || undefined,
|
||||||
jid: isJidUser(id) ? id : undefined
|
jid: isJidUser(id) ? id : undefined
|
||||||
@@ -828,7 +832,7 @@ export const processSyncAction = (
|
|||||||
{
|
{
|
||||||
id,
|
id,
|
||||||
pinned: action.pinAction?.pinned ? toNumber(action.timestamp) : null,
|
pinned: action.pinAction?.pinned ? toNumber(action.timestamp) : null,
|
||||||
conditional: getChatUpdateConditional(id, undefined)
|
conditional: getChatUpdateConditional(id!, undefined)
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
} else if (action?.unarchiveChatsSetting) {
|
} else if (action?.unarchiveChatsSetting) {
|
||||||
@@ -853,13 +857,13 @@ export const processSyncAction = (
|
|||||||
])
|
])
|
||||||
} else if (action?.deleteChatAction || type === 'deleteChat') {
|
} else if (action?.deleteChatAction || type === 'deleteChat') {
|
||||||
if (!isInitialSync) {
|
if (!isInitialSync) {
|
||||||
ev.emit('chats.delete', [id])
|
ev.emit('chats.delete', [id!])
|
||||||
}
|
}
|
||||||
} else if (action?.labelEditAction) {
|
} else if (action?.labelEditAction) {
|
||||||
const { name, color, deleted, predefinedId } = action.labelEditAction
|
const { name, color, deleted, predefinedId } = action.labelEditAction
|
||||||
|
|
||||||
ev.emit('labels.edit', {
|
ev.emit('labels.edit', {
|
||||||
id,
|
id: id!,
|
||||||
name: name!,
|
name: name!,
|
||||||
color: color!,
|
color: color!,
|
||||||
deleted: deleted!,
|
deleted: deleted!,
|
||||||
|
|||||||
+2
-1
@@ -1,7 +1,8 @@
|
|||||||
import { createCipheriv, createDecipheriv, createHash, createHmac, randomBytes } from 'crypto'
|
import { createCipheriv, createDecipheriv, createHash, createHmac, randomBytes } from 'crypto'
|
||||||
|
/* @ts-ignore */
|
||||||
import * as libsignal from 'libsignal'
|
import * as libsignal from 'libsignal'
|
||||||
import { KEY_BUNDLE_TYPE } from '../Defaults'
|
import { KEY_BUNDLE_TYPE } from '../Defaults'
|
||||||
import { KeyPair } from '../Types'
|
import type { KeyPair } from '../Types'
|
||||||
|
|
||||||
// insure browser & node compatibility
|
// insure browser & node compatibility
|
||||||
const { subtle } = globalThis.crypto
|
const { subtle } = globalThis.crypto
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { Boom } from '@hapi/boom'
|
import { Boom } from '@hapi/boom'
|
||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import { SignalRepository, WAMessage, WAMessageKey } from '../Types'
|
import type { SignalRepository, WAMessage, WAMessageKey } from '../Types'
|
||||||
import {
|
import {
|
||||||
areJidsSameUser,
|
areJidsSameUser,
|
||||||
BinaryNode,
|
type BinaryNode,
|
||||||
isJidBroadcast,
|
isJidBroadcast,
|
||||||
isJidGroup,
|
isJidGroup,
|
||||||
isJidMetaIa,
|
isJidMetaIa,
|
||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
isLidUser
|
isLidUser
|
||||||
} from '../WABinary'
|
} from '../WABinary'
|
||||||
import { unpadRandomMax16 } from './generics'
|
import { unpadRandomMax16 } from './generics'
|
||||||
import { ILogger } from './logger'
|
import type { ILogger } from './logger'
|
||||||
|
|
||||||
export const NO_MESSAGE_FOUND_ERROR_TEXT = 'Message absent from node'
|
export const NO_MESSAGE_FOUND_ERROR_TEXT = 'Message absent from node'
|
||||||
export const MISSING_KEYS_ERROR_TEXT = 'Key used already or never filled'
|
export const MISSING_KEYS_ERROR_TEXT = 'Key used already or never filled'
|
||||||
@@ -62,17 +62,17 @@ export function decodeMessageNode(stanza: BinaryNode, meId: string, meLid: strin
|
|||||||
|
|
||||||
if (isJidUser(from) || isLidUser(from)) {
|
if (isJidUser(from) || isLidUser(from)) {
|
||||||
if (recipient && !isJidMetaIa(recipient)) {
|
if (recipient && !isJidMetaIa(recipient)) {
|
||||||
if (!isMe(from) && !isMeLid(from)) {
|
if (!isMe(from!) && !isMeLid(from!)) {
|
||||||
throw new Boom('receipient present, but msg not from me', { data: stanza })
|
throw new Boom('receipient present, but msg not from me', { data: stanza })
|
||||||
}
|
}
|
||||||
|
|
||||||
chatId = recipient
|
chatId = recipient
|
||||||
} else {
|
} else {
|
||||||
chatId = from
|
chatId = from!
|
||||||
}
|
}
|
||||||
|
|
||||||
msgType = 'chat'
|
msgType = 'chat'
|
||||||
author = from
|
author = from!
|
||||||
} else if (isJidGroup(from)) {
|
} else if (isJidGroup(from)) {
|
||||||
if (!participant) {
|
if (!participant) {
|
||||||
throw new Boom('No participant in group message')
|
throw new Boom('No participant in group message')
|
||||||
@@ -80,30 +80,30 @@ export function decodeMessageNode(stanza: BinaryNode, meId: string, meLid: strin
|
|||||||
|
|
||||||
msgType = 'group'
|
msgType = 'group'
|
||||||
author = participant
|
author = participant
|
||||||
chatId = from
|
chatId = from!
|
||||||
} else if (isJidBroadcast(from)) {
|
} else if (isJidBroadcast(from)) {
|
||||||
if (!participant) {
|
if (!participant) {
|
||||||
throw new Boom('No participant in group message')
|
throw new Boom('No participant in group message')
|
||||||
}
|
}
|
||||||
|
|
||||||
const isParticipantMe = isMe(participant)
|
const isParticipantMe = isMe(participant)
|
||||||
if (isJidStatusBroadcast(from)) {
|
if (isJidStatusBroadcast(from!)) {
|
||||||
msgType = isParticipantMe ? 'direct_peer_status' : 'other_status'
|
msgType = isParticipantMe ? 'direct_peer_status' : 'other_status'
|
||||||
} else {
|
} else {
|
||||||
msgType = isParticipantMe ? 'peer_broadcast' : 'other_broadcast'
|
msgType = isParticipantMe ? 'peer_broadcast' : 'other_broadcast'
|
||||||
}
|
}
|
||||||
|
|
||||||
chatId = from
|
chatId = from!
|
||||||
author = participant
|
author = participant
|
||||||
} else if (isJidNewsletter(from)) {
|
} else if (isJidNewsletter(from)) {
|
||||||
msgType = 'newsletter'
|
msgType = 'newsletter'
|
||||||
chatId = from
|
chatId = from!
|
||||||
author = from
|
author = from!
|
||||||
} else {
|
} else {
|
||||||
throw new Boom('Unknown message type', { data: stanza })
|
throw new Boom('Unknown message type', { data: stanza })
|
||||||
}
|
}
|
||||||
|
|
||||||
const fromMe = (isLidUser(from) ? isMeLid : isMe)(stanza.attrs.participant || stanza.attrs.from)
|
const fromMe = (isLidUser(from) ? isMeLid : isMe)((stanza.attrs.participant || stanza.attrs.from)!)
|
||||||
const pushname = stanza?.attrs?.notify
|
const pushname = stanza?.attrs?.notify
|
||||||
|
|
||||||
const key: WAMessageKey = {
|
const key: WAMessageKey = {
|
||||||
@@ -120,7 +120,7 @@ export function decodeMessageNode(stanza: BinaryNode, meId: string, meLid: strin
|
|||||||
|
|
||||||
const fullMessage: WAMessage = {
|
const fullMessage: WAMessage = {
|
||||||
key,
|
key,
|
||||||
messageTimestamp: +stanza.attrs.t,
|
messageTimestamp: +stanza.attrs.t!,
|
||||||
pushName: pushname,
|
pushName: pushname,
|
||||||
broadcast: isJidBroadcast(from)
|
broadcast: isJidBroadcast(from)
|
||||||
}
|
}
|
||||||
@@ -221,7 +221,7 @@ export const decryptMessageNode = (
|
|||||||
} else {
|
} else {
|
||||||
fullMessage.message = msg
|
fullMessage.message = msg
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err: any) {
|
||||||
logger.error({ key: fullMessage.key, err }, 'failed to decrypt message')
|
logger.error({ key: fullMessage.key, err }, 'failed to decrypt message')
|
||||||
fullMessage.messageStubType = proto.WebMessageInfo.StubType.CIPHERTEXT
|
fullMessage.messageStubType = proto.WebMessageInfo.StubType.CIPHERTEXT
|
||||||
fullMessage.messageStubParameters = [err.message]
|
fullMessage.messageStubParameters = [err.message]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import EventEmitter from 'events'
|
import EventEmitter from 'events'
|
||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import {
|
import type {
|
||||||
BaileysEvent,
|
BaileysEvent,
|
||||||
BaileysEventEmitter,
|
BaileysEventEmitter,
|
||||||
BaileysEventMap,
|
BaileysEventMap,
|
||||||
@@ -8,11 +8,11 @@ import {
|
|||||||
Chat,
|
Chat,
|
||||||
ChatUpdate,
|
ChatUpdate,
|
||||||
Contact,
|
Contact,
|
||||||
WAMessage,
|
WAMessage
|
||||||
WAMessageStatus
|
|
||||||
} from '../Types'
|
} from '../Types'
|
||||||
|
import { WAMessageStatus } from '../Types'
|
||||||
import { trimUndefined } from './generics'
|
import { trimUndefined } from './generics'
|
||||||
import { ILogger } from './logger'
|
import type { ILogger } from './logger'
|
||||||
import { updateMessageWithReaction, updateMessageWithReceipt } from './messages'
|
import { updateMessageWithReaction, updateMessageWithReceipt } from './messages'
|
||||||
import { isRealMessage, shouldIncrementChatUnread } from './process-message'
|
import { isRealMessage, shouldIncrementChatUnread } from './process-message'
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ export const makeEventBuffer = (logger: ILogger): BaileysBufferableEventEmitter
|
|||||||
// take the generic event and fire it as a baileys event
|
// take the generic event and fire it as a baileys event
|
||||||
ev.on('event', (map: BaileysEventData) => {
|
ev.on('event', (map: BaileysEventData) => {
|
||||||
for (const event in map) {
|
for (const event in map) {
|
||||||
ev.emit(event, map[event])
|
ev.emit(event, map[event as keyof BaileysEventMap])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@ function append<E extends BufferableEvent>(
|
|||||||
for (const chat of eventData as Chat[]) {
|
for (const chat of eventData as Chat[]) {
|
||||||
let upsert = data.chatUpserts[chat.id]
|
let upsert = data.chatUpserts[chat.id]
|
||||||
if (!upsert) {
|
if (!upsert) {
|
||||||
upsert = data.historySets[chat.id]
|
upsert = data.historySets.chats[chat.id]
|
||||||
if (upsert) {
|
if (upsert) {
|
||||||
logger.debug({ chatId: chat.id }, 'absorbed chat upsert in chat set')
|
logger.debug({ chatId: chat.id }, 'absorbed chat upsert in chat set')
|
||||||
}
|
}
|
||||||
@@ -339,7 +339,7 @@ function append<E extends BufferableEvent>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (data.contactUpdates[contact.id]) {
|
if (data.contactUpdates[contact.id]) {
|
||||||
upsert = Object.assign(data.contactUpdates[contact.id], trimUndefined(contact)) as Contact
|
upsert = Object.assign(data.contactUpdates[contact.id]!, trimUndefined(contact)) as Contact
|
||||||
delete data.contactUpdates[contact.id]
|
delete data.contactUpdates[contact.id]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -550,7 +550,7 @@ function consolidateEvents(data: BufferedEventData) {
|
|||||||
|
|
||||||
const messageUpsertList = Object.values(data.messageUpserts)
|
const messageUpsertList = Object.values(data.messageUpserts)
|
||||||
if (messageUpsertList.length) {
|
if (messageUpsertList.length) {
|
||||||
const type = messageUpsertList[0].type
|
const type = messageUpsertList[0]!.type
|
||||||
map['messages.upsert'] = {
|
map['messages.upsert'] = {
|
||||||
messages: messageUpsertList.map(m => m.message),
|
messages: messageUpsertList.map(m => m.message),
|
||||||
type
|
type
|
||||||
|
|||||||
+20
-14
@@ -1,19 +1,19 @@
|
|||||||
import { Boom } from '@hapi/boom'
|
import { Boom } from '@hapi/boom'
|
||||||
import axios, { AxiosRequestConfig } from 'axios'
|
import axios, { type AxiosRequestConfig } from 'axios'
|
||||||
import { createHash, randomBytes } from 'crypto'
|
import { createHash, randomBytes } from 'crypto'
|
||||||
import { platform, release } from 'os'
|
import { platform, release } from 'os'
|
||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import { version as baileysVersion } from '../Defaults/baileys-version.json'
|
import { version as baileysVersion } from '../Defaults/baileys-version.json'
|
||||||
import {
|
import type {
|
||||||
BaileysEventEmitter,
|
BaileysEventEmitter,
|
||||||
BaileysEventMap,
|
BaileysEventMap,
|
||||||
BrowsersMap,
|
BrowsersMap,
|
||||||
ConnectionState,
|
ConnectionState,
|
||||||
DisconnectReason,
|
|
||||||
WACallUpdateType,
|
WACallUpdateType,
|
||||||
WAVersion
|
WAVersion
|
||||||
} from '../Types'
|
} from '../Types'
|
||||||
import { BinaryNode, getAllBinaryNodeChildren, jidDecode } from '../WABinary'
|
import { DisconnectReason } from '../Types'
|
||||||
|
import { type BinaryNode, getAllBinaryNodeChildren, jidDecode } from '../WABinary'
|
||||||
|
|
||||||
const PLATFORM_MAP = {
|
const PLATFORM_MAP = {
|
||||||
aix: 'AIX',
|
aix: 'AIX',
|
||||||
@@ -22,7 +22,11 @@ const PLATFORM_MAP = {
|
|||||||
android: 'Android',
|
android: 'Android',
|
||||||
freebsd: 'FreeBSD',
|
freebsd: 'FreeBSD',
|
||||||
openbsd: 'OpenBSD',
|
openbsd: 'OpenBSD',
|
||||||
sunos: 'Solaris'
|
sunos: 'Solaris',
|
||||||
|
linux: undefined,
|
||||||
|
haiku: undefined,
|
||||||
|
cygwin: undefined,
|
||||||
|
netbsd: undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Browsers: BrowsersMap = {
|
export const Browsers: BrowsersMap = {
|
||||||
@@ -35,13 +39,13 @@ export const Browsers: BrowsersMap = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const getPlatformId = (browser: string) => {
|
export const getPlatformId = (browser: string) => {
|
||||||
const platformType = proto.DeviceProps.PlatformType[browser.toUpperCase()]
|
const platformType = proto.DeviceProps.PlatformType[browser.toUpperCase() as any]
|
||||||
return platformType ? platformType.toString() : '1' //chrome
|
return platformType ? platformType.toString() : '1' //chrome
|
||||||
}
|
}
|
||||||
|
|
||||||
export const BufferJSON = {
|
export const BufferJSON = {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
replacer: (k, value: any) => {
|
replacer: (k: any, value: any) => {
|
||||||
if (Buffer.isBuffer(value) || value instanceof Uint8Array || value?.type === 'Buffer') {
|
if (Buffer.isBuffer(value) || value instanceof Uint8Array || value?.type === 'Buffer') {
|
||||||
return { type: 'Buffer', data: Buffer.from(value?.data || value).toString('base64') }
|
return { type: 'Buffer', data: Buffer.from(value?.data || value).toString('base64') }
|
||||||
}
|
}
|
||||||
@@ -50,7 +54,7 @@ export const BufferJSON = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
reviver: (_, value: any) => {
|
reviver: (_: any, value: any) => {
|
||||||
if (typeof value === 'object' && !!value && (value.buffer === true || value.type === 'Buffer')) {
|
if (typeof value === 'object' && !!value && (value.buffer === true || value.type === 'Buffer')) {
|
||||||
const val = value.data || value.value
|
const val = value.data || value.value
|
||||||
return typeof val === 'string' ? Buffer.from(val, 'base64') : Buffer.from(val || [])
|
return typeof val === 'string' ? Buffer.from(val, 'base64') : Buffer.from(val || [])
|
||||||
@@ -65,8 +69,10 @@ export const getKeyAuthor = (key: proto.IMessageKey | undefined | null, meId = '
|
|||||||
|
|
||||||
export const writeRandomPadMax16 = (msg: Uint8Array) => {
|
export const writeRandomPadMax16 = (msg: Uint8Array) => {
|
||||||
const pad = randomBytes(1)
|
const pad = randomBytes(1)
|
||||||
pad[0] &= 0xf
|
|
||||||
if (!pad[0]) {
|
if (pad[0]) {
|
||||||
|
pad[0] &= 0xf
|
||||||
|
} else {
|
||||||
pad[0] = 0xf
|
pad[0] = 0xf
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,7 +85,7 @@ export const unpadRandomMax16 = (e: Uint8Array | Buffer) => {
|
|||||||
throw new Error('unpadPkcs7 given empty bytes')
|
throw new Error('unpadPkcs7 given empty bytes')
|
||||||
}
|
}
|
||||||
|
|
||||||
var r = t[t.length - 1]
|
var r = t[t.length - 1]!
|
||||||
if (r > t.length) {
|
if (r > t.length) {
|
||||||
throw new Error(`unpad given ${t.length} bytes, but pad is ${r}`)
|
throw new Error(`unpad given ${t.length} bytes, but pad is ${r}`)
|
||||||
}
|
}
|
||||||
@@ -90,7 +96,7 @@ export const unpadRandomMax16 = (e: Uint8Array | Buffer) => {
|
|||||||
export const encodeWAMessage = (message: proto.IMessage) => writeRandomPadMax16(proto.Message.encode(message).finish())
|
export const encodeWAMessage = (message: proto.IMessage) => writeRandomPadMax16(proto.Message.encode(message).finish())
|
||||||
|
|
||||||
export const generateRegistrationId = (): number => {
|
export const generateRegistrationId = (): number => {
|
||||||
return Uint16Array.from(randomBytes(2))[0] & 16383
|
return Uint16Array.from(randomBytes(2))[0]! & 16383
|
||||||
}
|
}
|
||||||
|
|
||||||
export const encodeBigEndian = (e: number, t = 4) => {
|
export const encodeBigEndian = (e: number, t = 4) => {
|
||||||
@@ -135,7 +141,7 @@ export const delay = (ms: number) => delayCancellable(ms).delay
|
|||||||
export const delayCancellable = (ms: number) => {
|
export const delayCancellable = (ms: number) => {
|
||||||
const stack = new Error().stack
|
const stack = new Error().stack
|
||||||
let timeout: NodeJS.Timeout
|
let timeout: NodeJS.Timeout
|
||||||
let reject: (error) => void
|
let reject: (error: any) => void
|
||||||
const delay: Promise<void> = new Promise((resolve, _reject) => {
|
const delay: Promise<void> = new Promise((resolve, _reject) => {
|
||||||
timeout = setTimeout(resolve, ms)
|
timeout = setTimeout(resolve, ms)
|
||||||
reject = _reject
|
reject = _reject
|
||||||
@@ -157,7 +163,7 @@ export const delayCancellable = (ms: number) => {
|
|||||||
|
|
||||||
export async function promiseTimeout<T>(
|
export async function promiseTimeout<T>(
|
||||||
ms: number | undefined,
|
ms: number | undefined,
|
||||||
promise: (resolve: (v: T) => void, reject: (error) => void) => void
|
promise: (resolve: (v: T) => void, reject: (error: any) => void) => void
|
||||||
) {
|
) {
|
||||||
if (!ms) {
|
if (!ms) {
|
||||||
return new Promise(promise)
|
return new Promise(promise)
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import { AxiosRequestConfig } from 'axios'
|
import type { AxiosRequestConfig } from 'axios'
|
||||||
import { promisify } from 'util'
|
import { promisify } from 'util'
|
||||||
import { inflate } from 'zlib'
|
import { inflate } from 'zlib'
|
||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import { Chat, Contact, WAMessageStubType } from '../Types'
|
import type { Chat, Contact } from '../Types'
|
||||||
|
import { WAMessageStubType } from '../Types'
|
||||||
import { isJidUser } from '../WABinary'
|
import { isJidUser } from '../WABinary'
|
||||||
import { toNumber } from './generics'
|
import { toNumber } from './generics'
|
||||||
import { normalizeMessageContent } from './messages'
|
import { normalizeMessageContent } from './messages'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { AxiosRequestConfig } from 'axios'
|
import type { AxiosRequestConfig } from 'axios'
|
||||||
import { WAMediaUploadFunction, WAUrlInfo } from '../Types'
|
import type { WAMediaUploadFunction, WAUrlInfo } from '../Types'
|
||||||
import { ILogger } from './logger'
|
import type { ILogger } from './logger'
|
||||||
import { prepareWAMessageMedia } from './messages'
|
import { prepareWAMessageMedia } from './messages'
|
||||||
import { extractImageThumb, getHttpStream } from './messages-media'
|
import { extractImageThumb, getHttpStream } from './messages-media'
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ export const getUrlInfo = async (
|
|||||||
|
|
||||||
if (opts.uploadImage) {
|
if (opts.uploadImage) {
|
||||||
const { imageMessage } = await prepareWAMessageMedia(
|
const { imageMessage } = await prepareWAMessageMedia(
|
||||||
{ image: { url: image } },
|
{ image: { url: image! } },
|
||||||
{
|
{
|
||||||
upload: opts.uploadImage,
|
upload: opts.uploadImage,
|
||||||
mediaTypeOverride: 'thumbnail-link',
|
mediaTypeOverride: 'thumbnail-link',
|
||||||
@@ -97,14 +97,14 @@ export const getUrlInfo = async (
|
|||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
urlInfo.jpegThumbnail = image ? (await getCompressedJpegThumbnail(image, opts)).buffer : undefined
|
urlInfo.jpegThumbnail = image ? (await getCompressedJpegThumbnail(image, opts)).buffer : undefined
|
||||||
} catch (error) {
|
} catch (error: any) {
|
||||||
opts.logger?.debug({ err: error.stack, url: previewLink }, 'error in generating thumbnail')
|
opts.logger?.debug({ err: error.stack, url: previewLink }, 'error in generating thumbnail')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return urlInfo
|
return urlInfo
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error: any) {
|
||||||
if (!error.message.includes('receive a valid')) {
|
if (!error.message.includes('receive a valid')) {
|
||||||
throw error
|
throw error
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -3,11 +3,11 @@ import P from 'pino'
|
|||||||
export interface ILogger {
|
export interface ILogger {
|
||||||
level: string
|
level: string
|
||||||
child(obj: Record<string, unknown>): ILogger
|
child(obj: Record<string, unknown>): ILogger
|
||||||
trace(obj: unknown, msg?: string)
|
trace(obj: unknown, msg?: string): void
|
||||||
debug(obj: unknown, msg?: string)
|
debug(obj: unknown, msg?: string): void
|
||||||
info(obj: unknown, msg?: string)
|
info(obj: unknown, msg?: string): void
|
||||||
warn(obj: unknown, msg?: string)
|
warn(obj: unknown, msg?: string): void
|
||||||
error(obj: unknown, msg?: string)
|
error(obj: unknown, msg?: string): void
|
||||||
}
|
}
|
||||||
|
|
||||||
export default P({ timestamp: () => `,"time":"${new Date().toJSON()}"` })
|
export default P({ timestamp: () => `,"time":"${new Date().toJSON()}"` })
|
||||||
|
|||||||
+35
-30
@@ -5,56 +5,61 @@ import { hkdf } from './crypto'
|
|||||||
* over a series of mutations. You can add/remove mutations and it'll return a hash equal to
|
* over a series of mutations. You can add/remove mutations and it'll return a hash equal to
|
||||||
* if the same series of mutations was made sequentially.
|
* if the same series of mutations was made sequentially.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const o = 128
|
const o = 128
|
||||||
|
|
||||||
class d {
|
class LTHash {
|
||||||
salt: string
|
salt: string
|
||||||
|
|
||||||
constructor(e: string) {
|
constructor(e: string) {
|
||||||
this.salt = e
|
this.salt = e
|
||||||
}
|
}
|
||||||
add(e, t) {
|
|
||||||
var r = this
|
async add(e: ArrayBuffer, t: ArrayBuffer[]): Promise<ArrayBuffer> {
|
||||||
for (const item of t) {
|
for (const item of t) {
|
||||||
e = r._addSingle(e, item)
|
e = await this._addSingle(e, item)
|
||||||
}
|
}
|
||||||
|
|
||||||
return e
|
return e
|
||||||
}
|
}
|
||||||
subtract(e, t) {
|
|
||||||
var r = this
|
async subtract(e: ArrayBuffer, t: ArrayBuffer[]): Promise<ArrayBuffer> {
|
||||||
for (const item of t) {
|
for (const item of t) {
|
||||||
e = r._subtractSingle(e, item)
|
e = await this._subtractSingle(e, item)
|
||||||
}
|
}
|
||||||
|
|
||||||
return e
|
return e
|
||||||
}
|
}
|
||||||
subtractThenAdd(e, t, r) {
|
|
||||||
var n = this
|
|
||||||
return n.add(n.subtract(e, r), t)
|
|
||||||
}
|
|
||||||
async _addSingle(e, t) {
|
|
||||||
var r = this
|
|
||||||
const n = new Uint8Array(await hkdf(Buffer.from(t), o, { info: r.salt })).buffer
|
|
||||||
return r.performPointwiseWithOverflow(await e, n, (e, t) => e + t)
|
|
||||||
}
|
|
||||||
async _subtractSingle(e, t) {
|
|
||||||
var r = this
|
|
||||||
|
|
||||||
const n = new Uint8Array(await hkdf(Buffer.from(t), o, { info: r.salt })).buffer
|
async subtractThenAdd(e: ArrayBuffer, addList: ArrayBuffer[], subtractList: ArrayBuffer[]): Promise<ArrayBuffer> {
|
||||||
return r.performPointwiseWithOverflow(await e, n, (e, t) => e - t)
|
const subtracted = await this.subtract(e, subtractList)
|
||||||
|
return this.add(subtracted, addList)
|
||||||
}
|
}
|
||||||
performPointwiseWithOverflow(e, t, r) {
|
|
||||||
const n = new DataView(e),
|
private async _addSingle(e: ArrayBuffer, t: ArrayBuffer): Promise<ArrayBuffer> {
|
||||||
i = new DataView(t),
|
const derived = new Uint8Array(await hkdf(Buffer.from(t), o, { info: this.salt })).buffer
|
||||||
a = new ArrayBuffer(n.byteLength),
|
return this.performPointwiseWithOverflow(e, derived, (a, b) => a + b)
|
||||||
s = new DataView(a)
|
}
|
||||||
for (let e = 0; e < n.byteLength; e += 2) {
|
|
||||||
s.setUint16(e, r(n.getUint16(e, !0), i.getUint16(e, !0)), !0)
|
private async _subtractSingle(e: ArrayBuffer, t: ArrayBuffer): Promise<ArrayBuffer> {
|
||||||
|
const derived = new Uint8Array(await hkdf(Buffer.from(t), o, { info: this.salt })).buffer
|
||||||
|
return this.performPointwiseWithOverflow(e, derived, (a, b) => a - b)
|
||||||
|
}
|
||||||
|
|
||||||
|
private performPointwiseWithOverflow(
|
||||||
|
e: ArrayBuffer,
|
||||||
|
t: ArrayBuffer,
|
||||||
|
op: (a: number, b: number) => number
|
||||||
|
): ArrayBuffer {
|
||||||
|
const n = new DataView(e)
|
||||||
|
const i = new DataView(t)
|
||||||
|
const out = new ArrayBuffer(n.byteLength)
|
||||||
|
const s = new DataView(out)
|
||||||
|
|
||||||
|
for (let offset = 0; offset < n.byteLength; offset += 2) {
|
||||||
|
s.setUint16(offset, op(n.getUint16(offset, true), i.getUint16(offset, true)), true)
|
||||||
}
|
}
|
||||||
|
|
||||||
return a
|
return out
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export const LT_HASH_ANTI_TAMPERING = new d('WhatsApp Patch Integrity')
|
export const LT_HASH_ANTI_TAMPERING = new LTHash('WhatsApp Patch Integrity')
|
||||||
|
|||||||
+15
-12
@@ -1,5 +1,5 @@
|
|||||||
import { Boom } from '@hapi/boom'
|
import { Boom } from '@hapi/boom'
|
||||||
import axios, { AxiosRequestConfig } from 'axios'
|
import axios, { type AxiosRequestConfig } from 'axios'
|
||||||
import { exec } from 'child_process'
|
import { exec } from 'child_process'
|
||||||
import * as Crypto from 'crypto'
|
import * as Crypto from 'crypto'
|
||||||
import { once } from 'events'
|
import { once } from 'events'
|
||||||
@@ -11,7 +11,7 @@ import { Readable, Transform } from 'stream'
|
|||||||
import { URL } from 'url'
|
import { URL } from 'url'
|
||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import { DEFAULT_ORIGIN, MEDIA_HKDF_KEY_MAPPING, MEDIA_PATH_MAP } from '../Defaults'
|
import { DEFAULT_ORIGIN, MEDIA_HKDF_KEY_MAPPING, MEDIA_PATH_MAP } from '../Defaults'
|
||||||
import {
|
import type {
|
||||||
BaileysEventMap,
|
BaileysEventMap,
|
||||||
DownloadableMessage,
|
DownloadableMessage,
|
||||||
MediaConnInfo,
|
MediaConnInfo,
|
||||||
@@ -24,10 +24,10 @@ import {
|
|||||||
WAMediaUploadFunction,
|
WAMediaUploadFunction,
|
||||||
WAMessageContent
|
WAMessageContent
|
||||||
} from '../Types'
|
} from '../Types'
|
||||||
import { BinaryNode, getBinaryNodeChild, getBinaryNodeChildBuffer, jidNormalizedUser } from '../WABinary'
|
import { type BinaryNode, getBinaryNodeChild, getBinaryNodeChildBuffer, jidNormalizedUser } from '../WABinary'
|
||||||
import { aesDecryptGCM, aesEncryptGCM, hkdf } from './crypto'
|
import { aesDecryptGCM, aesEncryptGCM, hkdf } from './crypto'
|
||||||
import { generateMessageIDV2 } from './generics'
|
import { generateMessageIDV2 } from './generics'
|
||||||
import { ILogger } from './logger'
|
import type { ILogger } from './logger'
|
||||||
|
|
||||||
const getTmpFilesDirectory = () => tmpdir()
|
const getTmpFilesDirectory = () => tmpdir()
|
||||||
|
|
||||||
@@ -132,6 +132,8 @@ const extractVideoThumb = async (
|
|||||||
})
|
})
|
||||||
|
|
||||||
export const extractImageThumb = async (bufferOrFilePath: Readable | Buffer | string, width = 32) => {
|
export const extractImageThumb = async (bufferOrFilePath: Readable | Buffer | string, width = 32) => {
|
||||||
|
// TODO: Move entirely to sharp, removing jimp as it supports readable streams
|
||||||
|
// This will have positive speed and performance impacts as well as minimizing RAM usage.
|
||||||
if (bufferOrFilePath instanceof Readable) {
|
if (bufferOrFilePath instanceof Readable) {
|
||||||
bufferOrFilePath = await toBuffer(bufferOrFilePath)
|
bufferOrFilePath = await toBuffer(bufferOrFilePath)
|
||||||
}
|
}
|
||||||
@@ -590,7 +592,7 @@ export const downloadEncryptedContent = async (
|
|||||||
try {
|
try {
|
||||||
pushBytes(aes.update(data), b => this.push(b))
|
pushBytes(aes.update(data), b => this.push(b))
|
||||||
callback()
|
callback()
|
||||||
} catch (error) {
|
} catch (error: any) {
|
||||||
callback(error)
|
callback(error)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -598,7 +600,7 @@ export const downloadEncryptedContent = async (
|
|||||||
try {
|
try {
|
||||||
pushBytes(aes.final(), b => this.push(b))
|
pushBytes(aes.final(), b => this.push(b))
|
||||||
callback()
|
callback()
|
||||||
} catch (error) {
|
} catch (error: any) {
|
||||||
callback(error)
|
callback(error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -607,14 +609,14 @@ export const downloadEncryptedContent = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function extensionForMediaMessage(message: WAMessageContent) {
|
export function extensionForMediaMessage(message: WAMessageContent) {
|
||||||
const getExtension = (mimetype: string) => mimetype.split(';')[0].split('/')[1]
|
const getExtension = (mimetype: string) => mimetype.split(';')[0]?.split('/')[1]
|
||||||
const type = Object.keys(message)[0] as MessageType
|
const type = Object.keys(message)[0] as Exclude<MessageType, 'toJSON'>
|
||||||
let extension: string
|
let extension: string
|
||||||
if (type === 'locationMessage' || type === 'liveLocationMessage' || type === 'productMessage') {
|
if (type === 'locationMessage' || type === 'liveLocationMessage' || type === 'productMessage') {
|
||||||
extension = '.jpeg'
|
extension = '.jpeg'
|
||||||
} else {
|
} else {
|
||||||
const messageContent = message[type] as WAGenericMediaMessage
|
const messageContent = message[type] as WAGenericMediaMessage
|
||||||
extension = getExtension(messageContent.mimetype!)
|
extension = getExtension(messageContent.mimetype!)!
|
||||||
}
|
}
|
||||||
|
|
||||||
return extension
|
return extension
|
||||||
@@ -667,7 +669,7 @@ export const getWAUploadToServer = (
|
|||||||
uploadInfo = await refreshMediaConn(true)
|
uploadInfo = await refreshMediaConn(true)
|
||||||
throw new Error(`upload failed, reason: ${JSON.stringify(result)}`)
|
throw new Error(`upload failed, reason: ${JSON.stringify(result)}`)
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error: any) {
|
||||||
if (axios.isAxiosError(error)) {
|
if (axios.isAxiosError(error)) {
|
||||||
result = error.response?.data
|
result = error.response?.data
|
||||||
}
|
}
|
||||||
@@ -751,7 +753,7 @@ export const decodeMediaRetryNode = (node: BinaryNode) => {
|
|||||||
|
|
||||||
const errorNode = getBinaryNodeChild(node, 'error')
|
const errorNode = getBinaryNodeChild(node, 'error')
|
||||||
if (errorNode) {
|
if (errorNode) {
|
||||||
const errorCode = +errorNode.attrs.code
|
const errorCode = +errorNode.attrs.code!
|
||||||
event.error = new Boom(`Failed to re-upload media (${errorCode})`, {
|
event.error = new Boom(`Failed to re-upload media (${errorCode})`, {
|
||||||
data: errorNode.attrs,
|
data: errorNode.attrs,
|
||||||
statusCode: getStatusCodeForMediaRetry(errorCode)
|
statusCode: getStatusCodeForMediaRetry(errorCode)
|
||||||
@@ -780,7 +782,8 @@ export const decryptMediaRetryData = async (
|
|||||||
return proto.MediaRetryNotification.decode(plaintext)
|
return proto.MediaRetryNotification.decode(plaintext)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getStatusCodeForMediaRetry = (code: number) => MEDIA_RETRY_STATUS_MAP[code]
|
export const getStatusCodeForMediaRetry = (code: number) =>
|
||||||
|
MEDIA_RETRY_STATUS_MAP[code as proto.MediaRetryNotification.ResultType]
|
||||||
|
|
||||||
const MEDIA_RETRY_STATUS_MAP = {
|
const MEDIA_RETRY_STATUS_MAP = {
|
||||||
[proto.MediaRetryNotification.ResultType.SUCCESS]: 200,
|
[proto.MediaRetryNotification.ResultType.SUCCESS]: 200,
|
||||||
|
|||||||
+41
-32
@@ -5,7 +5,7 @@ import { promises as fs } from 'fs'
|
|||||||
import { type Transform } from 'stream'
|
import { type Transform } from 'stream'
|
||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import { MEDIA_KEYS, URL_REGEX, WA_DEFAULT_EPHEMERAL } from '../Defaults'
|
import { MEDIA_KEYS, URL_REGEX, WA_DEFAULT_EPHEMERAL } from '../Defaults'
|
||||||
import {
|
import type {
|
||||||
AnyMediaMessageContent,
|
AnyMediaMessageContent,
|
||||||
AnyMessageContent,
|
AnyMessageContent,
|
||||||
DownloadableMessage,
|
DownloadableMessage,
|
||||||
@@ -13,27 +13,25 @@ import {
|
|||||||
MessageContentGenerationOptions,
|
MessageContentGenerationOptions,
|
||||||
MessageGenerationOptions,
|
MessageGenerationOptions,
|
||||||
MessageGenerationOptionsFromContent,
|
MessageGenerationOptionsFromContent,
|
||||||
MessageType,
|
|
||||||
MessageUserReceipt,
|
MessageUserReceipt,
|
||||||
WAMediaUpload,
|
WAMediaUpload,
|
||||||
WAMessage,
|
WAMessage,
|
||||||
WAMessageContent,
|
WAMessageContent,
|
||||||
WAMessageStatus,
|
|
||||||
WAProto,
|
|
||||||
WATextMessage
|
WATextMessage
|
||||||
} from '../Types'
|
} from '../Types'
|
||||||
|
import { WAMessageStatus, WAProto } from '../Types'
|
||||||
import { isJidGroup, isJidNewsletter, isJidStatusBroadcast, jidNormalizedUser } from '../WABinary'
|
import { isJidGroup, isJidNewsletter, isJidStatusBroadcast, jidNormalizedUser } from '../WABinary'
|
||||||
import { sha256 } from './crypto'
|
import { sha256 } from './crypto'
|
||||||
import { generateMessageIDV2, getKeyAuthor, unixTimestampSeconds } from './generics'
|
import { generateMessageIDV2, getKeyAuthor, unixTimestampSeconds } from './generics'
|
||||||
import { ILogger } from './logger'
|
import type { ILogger } from './logger'
|
||||||
import {
|
import {
|
||||||
downloadContentFromMessage,
|
downloadContentFromMessage,
|
||||||
encryptedStream,
|
encryptedStream,
|
||||||
generateThumbnail,
|
generateThumbnail,
|
||||||
getAudioDuration,
|
getAudioDuration,
|
||||||
getAudioWaveform,
|
getAudioWaveform,
|
||||||
getRawMediaUploadData,
|
getRawMediaUploadData,
|
||||||
MediaDownloadOptions
|
type MediaDownloadOptions
|
||||||
} from './messages-media'
|
} from './messages-media'
|
||||||
|
|
||||||
type MediaUploadData = {
|
type MediaUploadData = {
|
||||||
@@ -86,14 +84,14 @@ export const generateLinkPreviewIfRequired = async (
|
|||||||
try {
|
try {
|
||||||
const urlInfo = await getUrlInfo(url)
|
const urlInfo = await getUrlInfo(url)
|
||||||
return urlInfo
|
return urlInfo
|
||||||
} catch (error) {
|
} catch (error: any) {
|
||||||
// ignore if fails
|
// ignore if fails
|
||||||
logger?.warn({ trace: error.stack }, 'url generation failed')
|
logger?.warn({ trace: error.stack }, 'url generation failed')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const assertColor = async color => {
|
const assertColor = async (color: any) => {
|
||||||
let assertedColor
|
let assertedColor
|
||||||
if (typeof color === 'number') {
|
if (typeof color === 'number') {
|
||||||
assertedColor = color > 0 ? color : 0xffffffff + Number(color) + 1
|
assertedColor = color > 0 ? color : 0xffffffff + Number(color) + 1
|
||||||
@@ -127,10 +125,10 @@ export const prepareWAMessageMedia = async (
|
|||||||
|
|
||||||
const uploadData: MediaUploadData = {
|
const uploadData: MediaUploadData = {
|
||||||
...message,
|
...message,
|
||||||
media: message[mediaType]
|
media: (message as any)[mediaType]
|
||||||
}
|
}
|
||||||
delete uploadData[mediaType]
|
delete (uploadData as any)[mediaType]
|
||||||
|
// check if cacheable + generate cache key
|
||||||
const cacheableKey =
|
const cacheableKey =
|
||||||
typeof uploadData.media === 'object' &&
|
typeof uploadData.media === 'object' &&
|
||||||
'url' in uploadData.media &&
|
'url' in uploadData.media &&
|
||||||
@@ -154,7 +152,7 @@ export const prepareWAMessageMedia = async (
|
|||||||
const obj = WAProto.Message.decode(mediaBuff)
|
const obj = WAProto.Message.decode(mediaBuff)
|
||||||
const key = `${mediaType}Message`
|
const key = `${mediaType}Message`
|
||||||
|
|
||||||
Object.assign(obj[key], { ...uploadData, media: undefined })
|
Object.assign(obj[key as keyof proto.Message]!, { ...uploadData, media: undefined })
|
||||||
|
|
||||||
return obj
|
return obj
|
||||||
}
|
}
|
||||||
@@ -262,7 +260,7 @@ export const prepareWAMessageMedia = async (
|
|||||||
logger?.debug('computed backgroundColor audio status')
|
logger?.debug('computed backgroundColor audio status')
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger?.warn({ trace: error.stack }, 'failed to obtain extra info')
|
logger?.warn({ trace: (error as any).stack }, 'failed to obtain extra info')
|
||||||
}
|
}
|
||||||
})()
|
})()
|
||||||
]).finally(async () => {
|
]).finally(async () => {
|
||||||
@@ -279,7 +277,7 @@ export const prepareWAMessageMedia = async (
|
|||||||
})
|
})
|
||||||
|
|
||||||
const obj = WAProto.Message.fromObject({
|
const obj = WAProto.Message.fromObject({
|
||||||
[`${mediaType}Message`]: MessageTypeProto[mediaType].fromObject({
|
[`${mediaType}Message`]: MessageTypeProto[mediaType as keyof typeof MessageTypeProto].fromObject({
|
||||||
url: mediaUrl,
|
url: mediaUrl,
|
||||||
directPath,
|
directPath,
|
||||||
mediaKey,
|
mediaKey,
|
||||||
@@ -335,9 +333,9 @@ export const generateForwardMessageContent = (message: WAMessage, forceForward?:
|
|||||||
content = normalizeMessageContent(content)
|
content = normalizeMessageContent(content)
|
||||||
content = proto.Message.decode(proto.Message.encode(content!).finish())
|
content = proto.Message.decode(proto.Message.encode(content!).finish())
|
||||||
|
|
||||||
let key = Object.keys(content)[0] as MessageType
|
let key = Object.keys(content)[0] as keyof proto.IMessage
|
||||||
|
|
||||||
let score = content[key].contextInfo?.forwardingScore || 0
|
let score = (content?.[key] as { contextInfo: proto.IContextInfo })?.contextInfo?.forwardingScore || 0
|
||||||
score += message.key.fromMe && !forceForward ? 0 : 1
|
score += message.key.fromMe && !forceForward ? 0 : 1
|
||||||
if (key === 'conversation') {
|
if (key === 'conversation') {
|
||||||
content.extendedTextMessage = { text: content[key] }
|
content.extendedTextMessage = { text: content[key] }
|
||||||
@@ -346,10 +344,11 @@ export const generateForwardMessageContent = (message: WAMessage, forceForward?:
|
|||||||
key = 'extendedTextMessage'
|
key = 'extendedTextMessage'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const key_ = content?.[key] as { contextInfo: proto.IContextInfo }
|
||||||
if (score > 0) {
|
if (score > 0) {
|
||||||
content[key].contextInfo = { forwardingScore: score, isForwarded: true }
|
key_.contextInfo = { forwardingScore: score, isForwarded: true }
|
||||||
} else {
|
} else {
|
||||||
content[key].contextInfo = {}
|
key_.contextInfo = {}
|
||||||
}
|
}
|
||||||
|
|
||||||
return content
|
return content
|
||||||
@@ -403,7 +402,7 @@ export const generateWAMessageContent = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (contactLen === 1) {
|
if (contactLen === 1) {
|
||||||
m.contactMessage = WAProto.Message.ContactMessage.fromObject(message.contacts.contacts[0])
|
m.contactMessage = WAProto.Message.ContactMessage.fromObject(message.contacts.contacts[0]!)
|
||||||
} else {
|
} else {
|
||||||
m.contactsArrayMessage = WAProto.Message.ContactsArrayMessage.fromObject(message.contacts)
|
m.contactsArrayMessage = WAProto.Message.ContactsArrayMessage.fromObject(message.contacts)
|
||||||
}
|
}
|
||||||
@@ -541,9 +540,12 @@ export const generateWAMessageContent = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ('mentions' in message && message.mentions?.length) {
|
if ('mentions' in message && message.mentions?.length) {
|
||||||
const [messageType] = Object.keys(m)
|
const messageType = Object.keys(m)[0]! as Exclude<keyof proto.IMessage, 'conversation'>
|
||||||
m[messageType].contextInfo = m[messageType] || {}
|
const key = m[messageType]
|
||||||
m[messageType].contextInfo.mentionedJid = message.mentions
|
if ('contextInfo' in key!) {
|
||||||
|
key.contextInfo = key.contextInfo || {}
|
||||||
|
key.contextInfo.mentionedJid = message.mentions
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('edit' in message) {
|
if ('edit' in message) {
|
||||||
@@ -558,9 +560,11 @@ export const generateWAMessageContent = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ('contextInfo' in message && !!message.contextInfo) {
|
if ('contextInfo' in message && !!message.contextInfo) {
|
||||||
const [messageType] = Object.keys(m)
|
const messageType = Object.keys(m)[0]! as Exclude<keyof proto.IMessage, 'conversation'>
|
||||||
m[messageType] = m[messageType] || {}
|
const key = m[messageType]
|
||||||
m[messageType].contextInfo = message.contextInfo
|
if ('contextInfo' in key!) {
|
||||||
|
key.contextInfo = { ...key.contextInfo, ...message.contextInfo }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return WAProto.Message.fromObject(m)
|
return WAProto.Message.fromObject(m)
|
||||||
@@ -578,7 +582,7 @@ export const generateWAMessageFromContent = (
|
|||||||
}
|
}
|
||||||
|
|
||||||
const innerMessage = normalizeMessageContent(message)!
|
const innerMessage = normalizeMessageContent(message)!
|
||||||
const key: string = getContentType(innerMessage)!
|
const key = getContentType(innerMessage)! as Exclude<keyof proto.IMessage, 'conversation'>
|
||||||
const timestamp = unixTimestampSeconds(options.timestamp)
|
const timestamp = unixTimestampSeconds(options.timestamp)
|
||||||
const { quoted, userJid } = options
|
const { quoted, userJid } = options
|
||||||
|
|
||||||
@@ -597,7 +601,8 @@ export const generateWAMessageFromContent = (
|
|||||||
delete quotedContent.contextInfo
|
delete quotedContent.contextInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
const contextInfo: proto.IContextInfo = innerMessage[key].contextInfo || {}
|
const contextInfo: proto.IContextInfo =
|
||||||
|
('contextInfo' in innerMessage[key]! && innerMessage[key]?.contextInfo) || {}
|
||||||
contextInfo.participant = jidNormalizedUser(participant!)
|
contextInfo.participant = jidNormalizedUser(participant!)
|
||||||
contextInfo.stanzaId = quoted.key.id
|
contextInfo.stanzaId = quoted.key.id
|
||||||
contextInfo.quotedMessage = quotedMsg
|
contextInfo.quotedMessage = quotedMsg
|
||||||
@@ -608,7 +613,10 @@ export const generateWAMessageFromContent = (
|
|||||||
contextInfo.remoteJid = quoted.key.remoteJid
|
contextInfo.remoteJid = quoted.key.remoteJid
|
||||||
}
|
}
|
||||||
|
|
||||||
innerMessage[key].contextInfo = contextInfo
|
if (contextInfo && innerMessage[key]) {
|
||||||
|
/* @ts-ignore */
|
||||||
|
innerMessage[key].contextInfo = contextInfo
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@@ -621,8 +629,9 @@ export const generateWAMessageFromContent = (
|
|||||||
// newsletters don't support ephemeral messages
|
// newsletters don't support ephemeral messages
|
||||||
!isJidNewsletter(jid)
|
!isJidNewsletter(jid)
|
||||||
) {
|
) {
|
||||||
|
/* @ts-ignore */
|
||||||
innerMessage[key].contextInfo = {
|
innerMessage[key].contextInfo = {
|
||||||
...(innerMessage[key].contextInfo || {}),
|
...((innerMessage[key] as any).contextInfo || {}),
|
||||||
expiration: options.ephemeralExpiration || WA_DEFAULT_EPHEMERAL
|
expiration: options.ephemeralExpiration || WA_DEFAULT_EPHEMERAL
|
||||||
//ephemeralSettingTimestamp: options.ephemeralOptions.eph_setting_ts?.toString()
|
//ephemeralSettingTimestamp: options.ephemeralOptions.eph_setting_ts?.toString()
|
||||||
}
|
}
|
||||||
@@ -653,7 +662,7 @@ export const generateWAMessage = async (jid: string, content: AnyMessageContent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Get the key to access the true type of content */
|
/** Get the key to access the true type of content */
|
||||||
export const getContentType = (content: WAProto.IMessage | undefined) => {
|
export const getContentType = (content: proto.IMessage | undefined) => {
|
||||||
if (content) {
|
if (content) {
|
||||||
const keys = Object.keys(content)
|
const keys = Object.keys(content)
|
||||||
const key = keys.find(k => (k === 'conversation' || k.includes('Message')) && k !== 'senderKeyDistributionMessage')
|
const key = keys.find(k => (k === 'conversation' || k.includes('Message')) && k !== 'senderKeyDistributionMessage')
|
||||||
@@ -837,7 +846,7 @@ export function getAggregateVotesInPollMessage(
|
|||||||
data = voteHashMap[hash]
|
data = voteHashMap[hash]
|
||||||
}
|
}
|
||||||
|
|
||||||
voteHashMap[hash].voters.push(getKeyAuthor(update.pollUpdateMessageKey, meId))
|
voteHashMap[hash]!.voters.push(getKeyAuthor(update.pollUpdateMessageKey, meId))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import { Boom } from '@hapi/boom'
|
import { Boom } from '@hapi/boom'
|
||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import { NOISE_MODE, WA_CERT_DETAILS } from '../Defaults'
|
import { NOISE_MODE, WA_CERT_DETAILS } from '../Defaults'
|
||||||
import { KeyPair } from '../Types'
|
import type { KeyPair } from '../Types'
|
||||||
import { BinaryNode, decodeBinaryNode } from '../WABinary'
|
import type { BinaryNode } from '../WABinary'
|
||||||
|
import { decodeBinaryNode } from '../WABinary'
|
||||||
import { aesDecryptGCM, aesEncryptGCM, Curve, hkdf, sha256 } from './crypto'
|
import { aesDecryptGCM, aesEncryptGCM, Curve, hkdf, sha256 } from './crypto'
|
||||||
import { ILogger } from './logger'
|
import type { ILogger } from './logger'
|
||||||
|
|
||||||
const generateIV = (counter: number) => {
|
const generateIV = (counter: number) => {
|
||||||
const iv = new ArrayBuffer(12)
|
const iv = new ArrayBuffer(12)
|
||||||
@@ -64,17 +65,17 @@ export const makeNoiseHandler = ({
|
|||||||
|
|
||||||
const mixIntoKey = async (data: Uint8Array) => {
|
const mixIntoKey = async (data: Uint8Array) => {
|
||||||
const [write, read] = await localHKDF(data)
|
const [write, read] = await localHKDF(data)
|
||||||
salt = write
|
salt = write!
|
||||||
encKey = read
|
encKey = read!
|
||||||
decKey = read
|
decKey = read!
|
||||||
readCounter = 0
|
readCounter = 0
|
||||||
writeCounter = 0
|
writeCounter = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
const finishInit = async () => {
|
const finishInit = async () => {
|
||||||
const [write, read] = await localHKDF(new Uint8Array(0))
|
const [write, read] = await localHKDF(new Uint8Array(0))
|
||||||
encKey = write
|
encKey = write!
|
||||||
decKey = read
|
decKey = read!
|
||||||
hash = Buffer.from([])
|
hash = Buffer.from([])
|
||||||
readCounter = 0
|
readCounter = 0
|
||||||
writeCounter = 0
|
writeCounter = 0
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { AxiosRequestConfig } from 'axios'
|
import type { AxiosRequestConfig } from 'axios'
|
||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import {
|
import type {
|
||||||
AuthenticationCreds,
|
AuthenticationCreds,
|
||||||
BaileysEventEmitter,
|
BaileysEventEmitter,
|
||||||
CacheStore,
|
CacheStore,
|
||||||
@@ -9,15 +9,15 @@ import {
|
|||||||
ParticipantAction,
|
ParticipantAction,
|
||||||
RequestJoinAction,
|
RequestJoinAction,
|
||||||
RequestJoinMethod,
|
RequestJoinMethod,
|
||||||
SignalKeyStoreWithTransaction,
|
SignalKeyStoreWithTransaction
|
||||||
WAMessageStubType
|
|
||||||
} from '../Types'
|
} from '../Types'
|
||||||
|
import { WAMessageStubType } from '../Types'
|
||||||
import { getContentType, normalizeMessageContent } from '../Utils/messages'
|
import { getContentType, normalizeMessageContent } from '../Utils/messages'
|
||||||
import { areJidsSameUser, isJidBroadcast, isJidStatusBroadcast, jidNormalizedUser } from '../WABinary'
|
import { areJidsSameUser, isJidBroadcast, isJidStatusBroadcast, jidNormalizedUser } from '../WABinary'
|
||||||
import { aesDecryptGCM, hmacSign } from './crypto'
|
import { aesDecryptGCM, hmacSign } from './crypto'
|
||||||
import { toNumber } from './generics'
|
import { toNumber } from './generics'
|
||||||
import { downloadAndProcessHistorySyncNotification } from './history'
|
import { downloadAndProcessHistorySyncNotification } from './history'
|
||||||
import { ILogger } from './logger'
|
import type { ILogger } from './logger'
|
||||||
|
|
||||||
type ProcessMessageContext = {
|
type ProcessMessageContext = {
|
||||||
shouldProcessHistoryMsg: boolean
|
shouldProcessHistoryMsg: boolean
|
||||||
@@ -273,6 +273,7 @@ const processMessage = async (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break
|
||||||
case proto.Message.ProtocolMessage.Type.MESSAGE_EDIT:
|
case proto.Message.ProtocolMessage.Type.MESSAGE_EDIT:
|
||||||
ev.emit('messages.update', [
|
ev.emit('messages.update', [
|
||||||
{
|
{
|
||||||
|
|||||||
+17
-9
@@ -1,7 +1,6 @@
|
|||||||
import { chunk } from 'lodash'
|
|
||||||
import { KEY_BUNDLE_TYPE } from '../Defaults'
|
import { KEY_BUNDLE_TYPE } from '../Defaults'
|
||||||
import { SignalRepository } from '../Types'
|
import type { SignalRepository } from '../Types'
|
||||||
import {
|
import type {
|
||||||
AuthenticationCreds,
|
AuthenticationCreds,
|
||||||
AuthenticationState,
|
AuthenticationState,
|
||||||
KeyPair,
|
KeyPair,
|
||||||
@@ -11,19 +10,28 @@ import {
|
|||||||
} from '../Types/Auth'
|
} from '../Types/Auth'
|
||||||
import {
|
import {
|
||||||
assertNodeErrorFree,
|
assertNodeErrorFree,
|
||||||
BinaryNode,
|
type BinaryNode,
|
||||||
getBinaryNodeChild,
|
getBinaryNodeChild,
|
||||||
getBinaryNodeChildBuffer,
|
getBinaryNodeChildBuffer,
|
||||||
getBinaryNodeChildren,
|
getBinaryNodeChildren,
|
||||||
getBinaryNodeChildUInt,
|
getBinaryNodeChildUInt,
|
||||||
jidDecode,
|
jidDecode,
|
||||||
JidWithDevice,
|
type JidWithDevice,
|
||||||
S_WHATSAPP_NET
|
S_WHATSAPP_NET
|
||||||
} from '../WABinary'
|
} from '../WABinary'
|
||||||
import { DeviceListData, ParsedDeviceInfo, USyncQueryResultList } from '../WAUSync'
|
import type { DeviceListData, ParsedDeviceInfo, USyncQueryResultList } from '../WAUSync'
|
||||||
import { Curve, generateSignalPubKey } from './crypto'
|
import { Curve, generateSignalPubKey } from './crypto'
|
||||||
import { encodeBigEndian } from './generics'
|
import { encodeBigEndian } from './generics'
|
||||||
|
|
||||||
|
function chunk<T>(array: T[], size: number): T[][] {
|
||||||
|
const chunks: T[][] = []
|
||||||
|
for (let i = 0; i < array.length; i += size) {
|
||||||
|
chunks.push(array.slice(i, i + size))
|
||||||
|
}
|
||||||
|
|
||||||
|
return chunks
|
||||||
|
}
|
||||||
|
|
||||||
export const createSignalIdentity = (wid: string, accountSignatureKey: Uint8Array): SignalIdentity => {
|
export const createSignalIdentity = (wid: string, accountSignatureKey: Uint8Array): SignalIdentity => {
|
||||||
return {
|
return {
|
||||||
identifier: { name: wid, deviceId: 0 },
|
identifier: { name: wid, deviceId: 0 },
|
||||||
@@ -100,11 +108,11 @@ export const parseAndInjectE2ESessions = async (node: BinaryNode, repository: Si
|
|||||||
const chunks = chunk(nodes, chunkSize)
|
const chunks = chunk(nodes, chunkSize)
|
||||||
for (const nodesChunk of chunks) {
|
for (const nodesChunk of chunks) {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
nodesChunk.map(async node => {
|
nodesChunk.map(async (node: BinaryNode) => {
|
||||||
const signedKey = getBinaryNodeChild(node, 'skey')!
|
const signedKey = getBinaryNodeChild(node, 'skey')!
|
||||||
const key = getBinaryNodeChild(node, 'key')!
|
const key = getBinaryNodeChild(node, 'key')!
|
||||||
const identity = getBinaryNodeChildBuffer(node, 'identity')!
|
const identity = getBinaryNodeChildBuffer(node, 'identity')!
|
||||||
const jid = node.attrs.jid
|
const jid = node.attrs.jid!
|
||||||
const registrationId = getBinaryNodeChildUInt(node, 'registration', 4)
|
const registrationId = getBinaryNodeChildUInt(node, 'registration', 4)
|
||||||
|
|
||||||
await repository.injectE2ESession({
|
await repository.injectE2ESession({
|
||||||
@@ -180,7 +188,7 @@ export const getNextPreKeysNode = async (state: AuthenticationState, count: numb
|
|||||||
{ tag: 'registration', attrs: {}, content: encodeBigEndian(creds.registrationId) },
|
{ tag: 'registration', attrs: {}, content: encodeBigEndian(creds.registrationId) },
|
||||||
{ tag: 'type', attrs: {}, content: KEY_BUNDLE_TYPE },
|
{ tag: 'type', attrs: {}, content: KEY_BUNDLE_TYPE },
|
||||||
{ tag: 'identity', attrs: {}, content: creds.signedIdentityKey.public },
|
{ tag: 'identity', attrs: {}, content: creds.signedIdentityKey.public },
|
||||||
{ tag: 'list', attrs: {}, content: Object.keys(preKeys).map(k => xmppPreKey(preKeys[+k], +k)) },
|
{ tag: 'list', attrs: {}, content: Object.keys(preKeys).map(k => xmppPreKey(preKeys[+k]!, +k)) },
|
||||||
xmppSignedPreKey(creds.signedPreKey)
|
xmppSignedPreKey(creds.signedPreKey)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { Mutex } from 'async-mutex'
|
|||||||
import { mkdir, readFile, stat, unlink, writeFile } from 'fs/promises'
|
import { mkdir, readFile, stat, unlink, writeFile } from 'fs/promises'
|
||||||
import { join } from 'path'
|
import { join } from 'path'
|
||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import { AuthenticationCreds, AuthenticationState, SignalDataTypeMap } from '../Types'
|
import type { AuthenticationCreds, AuthenticationState, SignalDataTypeMap } from '../Types'
|
||||||
import { initAuthCreds } from './auth-utils'
|
import { initAuthCreds } from './auth-utils'
|
||||||
import { BufferJSON } from './generics'
|
import { BufferJSON } from './generics'
|
||||||
|
|
||||||
@@ -118,8 +118,8 @@ export const useMultiFileAuthState = async (
|
|||||||
set: async data => {
|
set: async data => {
|
||||||
const tasks: Promise<void>[] = []
|
const tasks: Promise<void>[] = []
|
||||||
for (const category in data) {
|
for (const category in data) {
|
||||||
for (const id in data[category]) {
|
for (const id in data[category as keyof SignalDataTypeMap]) {
|
||||||
const value = data[category][id]
|
const value = data[category as keyof SignalDataTypeMap]![id]
|
||||||
const file = `${category}-${id}.json`
|
const file = `${category}-${id}.json`
|
||||||
tasks.push(value ? writeData(value, file) : removeData(file))
|
tasks.push(value ? writeData(value, file) : removeData(file))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { createHash } from 'crypto'
|
|||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import { KEY_BUNDLE_TYPE } from '../Defaults'
|
import { KEY_BUNDLE_TYPE } from '../Defaults'
|
||||||
import type { AuthenticationCreds, SignalCreds, SocketConfig } from '../Types'
|
import type { AuthenticationCreds, SignalCreds, SocketConfig } from '../Types'
|
||||||
import { BinaryNode, getBinaryNodeChild, jidDecode, S_WHATSAPP_NET } from '../WABinary'
|
import { type BinaryNode, getBinaryNodeChild, jidDecode, S_WHATSAPP_NET } from '../WABinary'
|
||||||
import { Curve, hmacSign } from './crypto'
|
import { Curve, hmacSign } from './crypto'
|
||||||
import { encodeBigEndian } from './generics'
|
import { encodeBigEndian } from './generics'
|
||||||
import { createSignalIdentity } from './signal'
|
import { createSignalIdentity } from './signal'
|
||||||
@@ -34,8 +34,8 @@ const PLATFORM_MAP = {
|
|||||||
|
|
||||||
const getWebInfo = (config: SocketConfig): proto.ClientPayload.IWebInfo => {
|
const getWebInfo = (config: SocketConfig): proto.ClientPayload.IWebInfo => {
|
||||||
let webSubPlatform = proto.ClientPayload.WebInfo.WebSubPlatform.WEB_BROWSER
|
let webSubPlatform = proto.ClientPayload.WebInfo.WebSubPlatform.WEB_BROWSER
|
||||||
if (config.syncFullHistory && PLATFORM_MAP[config.browser[0]]) {
|
if (config.syncFullHistory && PLATFORM_MAP[config.browser[0] as keyof typeof PLATFORM_MAP]) {
|
||||||
webSubPlatform = PLATFORM_MAP[config.browser[0]]
|
webSubPlatform = PLATFORM_MAP[config.browser[0] as keyof typeof PLATFORM_MAP]
|
||||||
}
|
}
|
||||||
|
|
||||||
return { webSubPlatform }
|
return { webSubPlatform }
|
||||||
@@ -67,7 +67,10 @@ export const generateLoginNode = (userJid: string, config: SocketConfig): proto.
|
|||||||
|
|
||||||
const getPlatformType = (platform: string): proto.DeviceProps.PlatformType => {
|
const getPlatformType = (platform: string): proto.DeviceProps.PlatformType => {
|
||||||
const platformType = platform.toUpperCase()
|
const platformType = platform.toUpperCase()
|
||||||
return proto.DeviceProps.PlatformType[platformType] || proto.DeviceProps.PlatformType.DESKTOP
|
return (
|
||||||
|
proto.DeviceProps.PlatformType[platformType as keyof typeof proto.DeviceProps.PlatformType] ||
|
||||||
|
proto.DeviceProps.PlatformType.DESKTOP
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const generateRegistrationNode = (
|
export const generateRegistrationNode = (
|
||||||
@@ -151,7 +154,7 @@ export const configureSuccessfulPairing = (
|
|||||||
const deviceMsg = Buffer.concat([devicePrefix, deviceDetails!, signedIdentityKey.public, accountSignatureKey!])
|
const deviceMsg = Buffer.concat([devicePrefix, deviceDetails!, signedIdentityKey.public, accountSignatureKey!])
|
||||||
account.deviceSignature = Curve.sign(signedIdentityKey.private, deviceMsg)
|
account.deviceSignature = Curve.sign(signedIdentityKey.private, deviceMsg)
|
||||||
|
|
||||||
const identity = createSignalIdentity(jid, accountSignatureKey!)
|
const identity = createSignalIdentity(jid!, accountSignatureKey!)
|
||||||
const accountEnc = encodeSignedDeviceIdentity(account, false)
|
const accountEnc = encodeSignedDeviceIdentity(account, false)
|
||||||
|
|
||||||
const deviceIdentity = proto.ADVDeviceIdentity.decode(account.details!)
|
const deviceIdentity = proto.ADVDeviceIdentity.decode(account.details!)
|
||||||
@@ -161,7 +164,7 @@ export const configureSuccessfulPairing = (
|
|||||||
attrs: {
|
attrs: {
|
||||||
to: S_WHATSAPP_NET,
|
to: S_WHATSAPP_NET,
|
||||||
type: 'result',
|
type: 'result',
|
||||||
id: msgId
|
id: msgId!
|
||||||
},
|
},
|
||||||
content: [
|
content: [
|
||||||
{
|
{
|
||||||
@@ -180,7 +183,7 @@ export const configureSuccessfulPairing = (
|
|||||||
|
|
||||||
const authUpdate: Partial<AuthenticationCreds> = {
|
const authUpdate: Partial<AuthenticationCreds> = {
|
||||||
account,
|
account,
|
||||||
me: { id: jid, name: bizName },
|
me: { id: jid!, name: bizName },
|
||||||
signalIdentities: [...(signalIdentities || []), identity],
|
signalIdentities: [...(signalIdentities || []), identity],
|
||||||
platform: platformNode?.attrs.name
|
platform: platformNode?.attrs.name
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-16
@@ -57,7 +57,7 @@ export const decodeDecompressedBinaryNode = (
|
|||||||
let val = 0
|
let val = 0
|
||||||
for (let i = 0; i < n; i++) {
|
for (let i = 0; i < n; i++) {
|
||||||
const shift = littleEndian ? i : n - 1 - i
|
const shift = littleEndian ? i : n - 1 - i
|
||||||
val |= next() << (shift * 8)
|
val |= next()! << (shift * 8)
|
||||||
}
|
}
|
||||||
|
|
||||||
return val
|
return val
|
||||||
@@ -65,7 +65,7 @@ export const decodeDecompressedBinaryNode = (
|
|||||||
|
|
||||||
const readInt20 = () => {
|
const readInt20 = () => {
|
||||||
checkEOS(3)
|
checkEOS(3)
|
||||||
return ((next() & 15) << 16) + (next() << 8) + next()
|
return ((next()! & 15) << 16) + (next()! << 8) + next()!
|
||||||
}
|
}
|
||||||
|
|
||||||
const unpackHex = (value: number) => {
|
const unpackHex = (value: number) => {
|
||||||
@@ -104,11 +104,12 @@ export const decodeDecompressedBinaryNode = (
|
|||||||
}
|
}
|
||||||
|
|
||||||
const readPacked8 = (tag: number) => {
|
const readPacked8 = (tag: number) => {
|
||||||
const startByte = readByte()
|
const startByte = readByte()!
|
||||||
let value = ''
|
let value = ''
|
||||||
|
|
||||||
for (let i = 0; i < (startByte & 127); i++) {
|
for (let i = 0; i < (startByte & 127); i++) {
|
||||||
const curByte = readByte()
|
const curByte = readByte()!
|
||||||
|
|
||||||
value += String.fromCharCode(unpackByte(tag, (curByte & 0xf0) >> 4))
|
value += String.fromCharCode(unpackByte(tag, (curByte & 0xf0) >> 4))
|
||||||
value += String.fromCharCode(unpackByte(tag, curByte & 0x0f))
|
value += String.fromCharCode(unpackByte(tag, curByte & 0x0f))
|
||||||
}
|
}
|
||||||
@@ -138,8 +139,8 @@ export const decodeDecompressedBinaryNode = (
|
|||||||
}
|
}
|
||||||
|
|
||||||
const readJidPair = () => {
|
const readJidPair = () => {
|
||||||
const i = readString(readByte())
|
const i = readString(readByte()!)
|
||||||
const j = readString(readByte())
|
const j = readString(readByte()!)
|
||||||
if (j) {
|
if (j) {
|
||||||
return (i || '') + '@' + j
|
return (i || '') + '@' + j
|
||||||
}
|
}
|
||||||
@@ -152,7 +153,7 @@ export const decodeDecompressedBinaryNode = (
|
|||||||
const domainType = Number(rawDomainType)
|
const domainType = Number(rawDomainType)
|
||||||
|
|
||||||
const device = readByte()
|
const device = readByte()
|
||||||
const user = readString(readByte())
|
const user = readString(readByte()!)
|
||||||
|
|
||||||
return jidEncode(user, domainType === 0 || domainType === 128 ? 's.whatsapp.net' : 'lid', device)
|
return jidEncode(user, domainType === 0 || domainType === 128 ? 's.whatsapp.net' : 'lid', device)
|
||||||
}
|
}
|
||||||
@@ -167,11 +168,11 @@ export const decodeDecompressedBinaryNode = (
|
|||||||
case TAGS.DICTIONARY_1:
|
case TAGS.DICTIONARY_1:
|
||||||
case TAGS.DICTIONARY_2:
|
case TAGS.DICTIONARY_2:
|
||||||
case TAGS.DICTIONARY_3:
|
case TAGS.DICTIONARY_3:
|
||||||
return getTokenDouble(tag - TAGS.DICTIONARY_0, readByte())
|
return getTokenDouble(tag - TAGS.DICTIONARY_0, readByte()!)
|
||||||
case TAGS.LIST_EMPTY:
|
case TAGS.LIST_EMPTY:
|
||||||
return ''
|
return ''
|
||||||
case TAGS.BINARY_8:
|
case TAGS.BINARY_8:
|
||||||
return readStringFromChars(readByte())
|
return readStringFromChars(readByte()!)
|
||||||
case TAGS.BINARY_20:
|
case TAGS.BINARY_20:
|
||||||
return readStringFromChars(readInt20())
|
return readStringFromChars(readInt20())
|
||||||
case TAGS.BINARY_32:
|
case TAGS.BINARY_32:
|
||||||
@@ -190,7 +191,7 @@ export const decodeDecompressedBinaryNode = (
|
|||||||
|
|
||||||
const readList = (tag: number) => {
|
const readList = (tag: number) => {
|
||||||
const items: BinaryNode[] = []
|
const items: BinaryNode[] = []
|
||||||
const size = readListSize(tag)
|
const size = readListSize(tag)!
|
||||||
for (let i = 0; i < size; i++) {
|
for (let i = 0; i < size; i++) {
|
||||||
items.push(decodeDecompressedBinaryNode(buffer, opts, indexRef))
|
items.push(decodeDecompressedBinaryNode(buffer, opts, indexRef))
|
||||||
}
|
}
|
||||||
@@ -212,8 +213,8 @@ export const decodeDecompressedBinaryNode = (
|
|||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
const listSize = readListSize(readByte())
|
const listSize = readListSize(readByte()!)
|
||||||
const header = readString(readByte())
|
const header = readString(readByte()!)
|
||||||
if (!listSize || !header.length) {
|
if (!listSize || !header.length) {
|
||||||
throw new Error('invalid node')
|
throw new Error('invalid node')
|
||||||
}
|
}
|
||||||
@@ -227,21 +228,21 @@ export const decodeDecompressedBinaryNode = (
|
|||||||
// read the attributes in
|
// read the attributes in
|
||||||
const attributesLength = (listSize - 1) >> 1
|
const attributesLength = (listSize - 1) >> 1
|
||||||
for (let i = 0; i < attributesLength; i++) {
|
for (let i = 0; i < attributesLength; i++) {
|
||||||
const key = readString(readByte())
|
const key = readString(readByte()!)
|
||||||
const value = readString(readByte())
|
const value = readString(readByte()!)
|
||||||
|
|
||||||
attrs[key] = value
|
attrs[key] = value
|
||||||
}
|
}
|
||||||
|
|
||||||
if (listSize % 2 === 0) {
|
if (listSize % 2 === 0) {
|
||||||
const tag = readByte()
|
const tag = readByte()!
|
||||||
if (isListTag(tag)) {
|
if (isListTag(tag)) {
|
||||||
data = readList(tag)
|
data = readList(tag)
|
||||||
} else {
|
} else {
|
||||||
let decoded: Buffer | string
|
let decoded: Buffer | string
|
||||||
switch (tag) {
|
switch (tag) {
|
||||||
case TAGS.BINARY_8:
|
case TAGS.BINARY_8:
|
||||||
decoded = readBytes(readByte())
|
decoded = readBytes(readByte()!)
|
||||||
break
|
break
|
||||||
case TAGS.BINARY_20:
|
case TAGS.BINARY_20:
|
||||||
decoded = readBytes(readInt20())
|
decoded = readBytes(readInt20())
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as constants from './constants'
|
import * as constants from './constants'
|
||||||
import { FullJid, jidDecode } from './jid-utils'
|
import { type FullJid, jidDecode } from './jid-utils'
|
||||||
import type { BinaryNode, BinaryNodeCodingOptions } from './types'
|
import type { BinaryNode, BinaryNodeCodingOptions } from './types'
|
||||||
|
|
||||||
export const encodeBinaryNode = (
|
export const encodeBinaryNode = (
|
||||||
@@ -138,11 +138,11 @@ const encodeBinaryNodeInner = (
|
|||||||
|
|
||||||
const strLengthHalf = Math.floor(str.length / 2)
|
const strLengthHalf = Math.floor(str.length / 2)
|
||||||
for (let i = 0; i < strLengthHalf; i++) {
|
for (let i = 0; i < strLengthHalf; i++) {
|
||||||
pushByte(packBytePair(str[2 * i], str[2 * i + 1]))
|
pushByte(packBytePair(str[2 * i]!, str[2 * i + 1]!))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (str.length % 2 !== 0) {
|
if (str.length % 2 !== 0) {
|
||||||
pushByte(packBytePair(str[str.length - 1], '\x00'))
|
pushByte(packBytePair(str[str.length - 1]!, '\x00'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Boom } from '@hapi/boom'
|
import { Boom } from '@hapi/boom'
|
||||||
import { proto } from '../../WAProto'
|
import { proto } from '../../WAProto'
|
||||||
import { BinaryNode } from './types'
|
import { type BinaryNode } from './types'
|
||||||
|
|
||||||
// some extra useful utilities
|
// some extra useful utilities
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ export const getBinaryNodeChildUInt = (node: BinaryNode, childTag: string, lengt
|
|||||||
export const assertNodeErrorFree = (node: BinaryNode) => {
|
export const assertNodeErrorFree = (node: BinaryNode) => {
|
||||||
const errNode = getBinaryNodeChild(node, 'error')
|
const errNode = getBinaryNodeChild(node, 'error')
|
||||||
if (errNode) {
|
if (errNode) {
|
||||||
throw new Boom(errNode.attrs.text || 'Unknown error', { data: +errNode.attrs.code })
|
throw new Boom(errNode.attrs.text || 'Unknown error', { data: +errNode.attrs.code! })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,7 +60,12 @@ export const reduceBinaryNodeToDictionary = (node: BinaryNode, tag: string) => {
|
|||||||
const nodes = getBinaryNodeChildren(node, tag)
|
const nodes = getBinaryNodeChildren(node, tag)
|
||||||
const dict = nodes.reduce(
|
const dict = nodes.reduce(
|
||||||
(dict, { attrs }) => {
|
(dict, { attrs }) => {
|
||||||
dict[attrs.name || attrs.config_code] = attrs.value || attrs.config_value
|
if (typeof attrs.name === 'string') {
|
||||||
|
dict[attrs.name] = attrs.value! || attrs.config_value!
|
||||||
|
} else {
|
||||||
|
dict[attrs.config_code!] = attrs.value! || attrs.config_value!
|
||||||
|
}
|
||||||
|
|
||||||
return dict
|
return dict
|
||||||
},
|
},
|
||||||
{} as { [_: string]: string }
|
{} as { [_: string]: string }
|
||||||
@@ -84,7 +89,7 @@ export const getBinaryNodeMessages = ({ content }: BinaryNode) => {
|
|||||||
function bufferToUInt(e: Uint8Array | Buffer, t: number) {
|
function bufferToUInt(e: Uint8Array | Buffer, t: number) {
|
||||||
let a = 0
|
let a = 0
|
||||||
for (let i = 0; i < t; i++) {
|
for (let i = 0; i < t; i++) {
|
||||||
a = 256 * a + e[i]
|
a = 256 * a + e[i]!
|
||||||
}
|
}
|
||||||
|
|
||||||
return a
|
return a
|
||||||
@@ -92,9 +97,9 @@ function bufferToUInt(e: Uint8Array | Buffer, t: number) {
|
|||||||
|
|
||||||
const tabs = (n: number) => '\t'.repeat(n)
|
const tabs = (n: number) => '\t'.repeat(n)
|
||||||
|
|
||||||
export function binaryNodeToString(node: BinaryNode | BinaryNode['content'], i = 0) {
|
export function binaryNodeToString(node: BinaryNode | BinaryNode['content'], i = 0): string {
|
||||||
if (!node) {
|
if (!node) {
|
||||||
return node
|
return node!
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof node === 'string') {
|
if (typeof node === 'string') {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export const jidDecode = (jid: string | undefined): FullJid | undefined => {
|
|||||||
const userCombined = jid!.slice(0, sepIdx)
|
const userCombined = jid!.slice(0, sepIdx)
|
||||||
|
|
||||||
const [userAgent, device] = userCombined.split(':')
|
const [userAgent, device] = userCombined.split(':')
|
||||||
const user = userAgent.split('_')[0]
|
const user = userAgent!.split('_')[0]!
|
||||||
|
|
||||||
return {
|
return {
|
||||||
server: server as JidServer,
|
server: server as JidServer,
|
||||||
@@ -61,7 +61,7 @@ export const isJidNewsletter = (jid: string | undefined) => jid?.endsWith('@news
|
|||||||
|
|
||||||
const botRegexp = /^1313555\d{4}$|^131655500\d{2}$/
|
const botRegexp = /^1313555\d{4}$|^131655500\d{2}$/
|
||||||
|
|
||||||
export const isJidBot = (jid: string | undefined) => jid && botRegexp.test(jid.split('@')[0]) && jid.endsWith('@c.us')
|
export const isJidBot = (jid: string | undefined) => jid && botRegexp.test(jid.split('@')[0]!) && jid.endsWith('@c.us')
|
||||||
|
|
||||||
export const jidNormalizedUser = (jid: string | undefined) => {
|
export const jidNormalizedUser = (jid: string | undefined) => {
|
||||||
const result = jidDecode(jid)
|
const result = jidDecode(jid)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { EventInputType } from './constants'
|
import type { EventInputType } from './constants'
|
||||||
|
|
||||||
export class BinaryInfo {
|
export class BinaryInfo {
|
||||||
protocolVersion = 5
|
protocolVersion = 5
|
||||||
|
|||||||
+5
-5
@@ -5,7 +5,7 @@ import {
|
|||||||
FLAG_EXTENDED,
|
FLAG_EXTENDED,
|
||||||
FLAG_FIELD,
|
FLAG_FIELD,
|
||||||
FLAG_GLOBAL,
|
FLAG_GLOBAL,
|
||||||
Value,
|
type Value,
|
||||||
WEB_EVENTS,
|
WEB_EVENTS,
|
||||||
WEB_GLOBALS
|
WEB_GLOBALS
|
||||||
} from './constants'
|
} from './constants'
|
||||||
@@ -54,7 +54,7 @@ function encodeGlobalAttributes(binaryInfo: BinaryInfo, globals: { [key: string]
|
|||||||
}
|
}
|
||||||
|
|
||||||
function encodeEvents(binaryInfo: BinaryInfo) {
|
function encodeEvents(binaryInfo: BinaryInfo) {
|
||||||
for (const [name, { props, globals }] of binaryInfo.events.map(a => Object.entries(a)[0])) {
|
for (const [name, { props, globals }] of binaryInfo.events.map(a => Object.entries(a)[0]!)) {
|
||||||
encodeGlobalAttributes(binaryInfo, globals)
|
encodeGlobalAttributes(binaryInfo, globals)
|
||||||
const event = WEB_EVENTS.find(a => a.name === name)!
|
const event = WEB_EVENTS.find(a => a.name === name)!
|
||||||
|
|
||||||
@@ -70,8 +70,8 @@ function encodeEvents(binaryInfo: BinaryInfo) {
|
|||||||
binaryInfo.buffer.push(serializeData(event.id, -event.weight, eventFlag))
|
binaryInfo.buffer.push(serializeData(event.id, -event.weight, eventFlag))
|
||||||
|
|
||||||
for (let i = 0; i < props_.length; i++) {
|
for (let i = 0; i < props_.length; i++) {
|
||||||
const [key, _value] = props_[i]
|
const [key, _value] = props_[i]!
|
||||||
const id = event.props[key][0]
|
const id = event.props[key]?.[0]
|
||||||
extended = i < props_.length - 1
|
extended = i < props_.length - 1
|
||||||
let value = _value
|
let value = _value
|
||||||
if (typeof value === 'boolean') {
|
if (typeof value === 'boolean') {
|
||||||
@@ -79,7 +79,7 @@ function encodeEvents(binaryInfo: BinaryInfo) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const fieldFlag = extended ? FLAG_EVENT : FLAG_FIELD | FLAG_EXTENDED
|
const fieldFlag = extended ? FLAG_EVENT : FLAG_FIELD | FLAG_EXTENDED
|
||||||
binaryInfo.buffer.push(serializeData(id, value, fieldFlag))
|
binaryInfo.buffer.push(serializeData(id!, value, fieldFlag))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { USyncQueryProtocol } from '../../Types/USync'
|
import type { USyncQueryProtocol } from '../../Types/USync'
|
||||||
import { assertNodeErrorFree, BinaryNode } from '../../WABinary'
|
import { assertNodeErrorFree, type BinaryNode } from '../../WABinary'
|
||||||
import { USyncUser } from '../USyncUser'
|
import { USyncUser } from '../USyncUser'
|
||||||
|
|
||||||
export class USyncContactProtocol implements USyncQueryProtocol {
|
export class USyncContactProtocol implements USyncQueryProtocol {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { USyncQueryProtocol } from '../../Types/USync'
|
import type { USyncQueryProtocol } from '../../Types/USync'
|
||||||
import { assertNodeErrorFree, BinaryNode, getBinaryNodeChild } from '../../WABinary'
|
import { assertNodeErrorFree, type BinaryNode, getBinaryNodeChild } from '../../WABinary'
|
||||||
//import { USyncUser } from '../USyncUser'
|
//import { USyncUser } from '../USyncUser'
|
||||||
|
|
||||||
export type KeyIndexData = {
|
export type KeyIndexData = {
|
||||||
@@ -49,8 +49,8 @@ export class USyncDeviceProtocol implements USyncQueryProtocol {
|
|||||||
|
|
||||||
if (Array.isArray(deviceListNode?.content)) {
|
if (Array.isArray(deviceListNode?.content)) {
|
||||||
for (const { tag, attrs } of deviceListNode.content) {
|
for (const { tag, attrs } of deviceListNode.content) {
|
||||||
const id = +attrs.id
|
const id = +attrs.id!
|
||||||
const keyIndex = +attrs['key-index']
|
const keyIndex = +attrs['key-index']!
|
||||||
if (tag === 'device') {
|
if (tag === 'device') {
|
||||||
deviceList.push({
|
deviceList.push({
|
||||||
id,
|
id,
|
||||||
@@ -63,7 +63,7 @@ export class USyncDeviceProtocol implements USyncQueryProtocol {
|
|||||||
|
|
||||||
if (keyIndexNode?.tag === 'key-index-list') {
|
if (keyIndexNode?.tag === 'key-index-list') {
|
||||||
keyIndex = {
|
keyIndex = {
|
||||||
timestamp: +keyIndexNode.attrs['ts'],
|
timestamp: +keyIndexNode.attrs['ts']!,
|
||||||
signedKeyIndex: keyIndexNode?.content as Uint8Array,
|
signedKeyIndex: keyIndexNode?.content as Uint8Array,
|
||||||
expectedTimestamp: keyIndexNode.attrs['expected_ts'] ? +keyIndexNode.attrs['expected_ts'] : undefined
|
expectedTimestamp: keyIndexNode.attrs['expected_ts'] ? +keyIndexNode.attrs['expected_ts'] : undefined
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { USyncQueryProtocol } from '../../Types/USync'
|
import type { USyncQueryProtocol } from '../../Types/USync'
|
||||||
import { assertNodeErrorFree, BinaryNode } from '../../WABinary'
|
import { assertNodeErrorFree, type BinaryNode } from '../../WABinary'
|
||||||
|
|
||||||
export type DisappearingModeData = {
|
export type DisappearingModeData = {
|
||||||
duration: number
|
duration: number
|
||||||
@@ -23,7 +23,7 @@ export class USyncDisappearingModeProtocol implements USyncQueryProtocol {
|
|||||||
parser(node: BinaryNode): DisappearingModeData | undefined {
|
parser(node: BinaryNode): DisappearingModeData | undefined {
|
||||||
if (node.tag === 'disappearing_mode') {
|
if (node.tag === 'disappearing_mode') {
|
||||||
assertNodeErrorFree(node)
|
assertNodeErrorFree(node)
|
||||||
const duration: number = +node?.attrs.duration
|
const duration: number = +node?.attrs.duration!
|
||||||
const setAt = new Date(+(node?.attrs.t || 0) * 1000)
|
const setAt = new Date(+(node?.attrs.t || 0) * 1000)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { USyncQueryProtocol } from '../../Types/USync'
|
import type { USyncQueryProtocol } from '../../Types/USync'
|
||||||
import { assertNodeErrorFree, BinaryNode } from '../../WABinary'
|
import { assertNodeErrorFree, type BinaryNode } from '../../WABinary'
|
||||||
|
|
||||||
export type StatusData = {
|
export type StatusData = {
|
||||||
status?: string | null
|
status?: string | null
|
||||||
@@ -26,7 +26,7 @@ export class USyncStatusProtocol implements USyncQueryProtocol {
|
|||||||
let status: string | null = node?.content?.toString() ?? null
|
let status: string | null = node?.content?.toString() ?? null
|
||||||
const setAt = new Date(+(node?.attrs.t || 0) * 1000)
|
const setAt = new Date(+(node?.attrs.t || 0) * 1000)
|
||||||
if (!status) {
|
if (!status) {
|
||||||
if (+node.attrs?.code === 401) {
|
if (node.attrs?.code && +node.attrs.code === 401) {
|
||||||
status = ''
|
status = ''
|
||||||
} else {
|
} else {
|
||||||
status = null
|
status = null
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { USyncQueryProtocol } from '../../Types/USync'
|
import type { USyncQueryProtocol } from '../../Types/USync'
|
||||||
import { BinaryNode, getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString } from '../../WABinary'
|
import { type BinaryNode, getBinaryNodeChild, getBinaryNodeChildren, getBinaryNodeChildString } from '../../WABinary'
|
||||||
import { USyncUser } from '../USyncUser'
|
import { USyncUser } from '../USyncUser'
|
||||||
|
|
||||||
export type BotProfileCommand = {
|
export type BotProfileCommand = {
|
||||||
@@ -35,7 +35,7 @@ export class USyncBotProfileProtocol implements USyncQueryProtocol {
|
|||||||
return {
|
return {
|
||||||
tag: 'bot',
|
tag: 'bot',
|
||||||
attrs: {},
|
attrs: {},
|
||||||
content: [{ tag: 'profile', attrs: { persona_id: user.personaId } }]
|
content: [{ tag: 'profile', attrs: { persona_id: user.personaId! } }]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,12 +62,12 @@ export class USyncBotProfileProtocol implements USyncQueryProtocol {
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
isDefault: !!getBinaryNodeChild(profile, 'default'),
|
isDefault: !!getBinaryNodeChild(profile, 'default'),
|
||||||
jid: node.attrs.jid,
|
jid: node.attrs.jid!,
|
||||||
name: getBinaryNodeChildString(profile, 'name')!,
|
name: getBinaryNodeChildString(profile, 'name')!,
|
||||||
attributes: getBinaryNodeChildString(profile, 'attributes')!,
|
attributes: getBinaryNodeChildString(profile, 'attributes')!,
|
||||||
description: getBinaryNodeChildString(profile, 'description')!,
|
description: getBinaryNodeChildString(profile, 'description')!,
|
||||||
category: getBinaryNodeChildString(profile, 'category')!,
|
category: getBinaryNodeChildString(profile, 'category')!,
|
||||||
personaId: profile!.attrs['persona_id'],
|
personaId: profile!.attrs['persona_id']!,
|
||||||
commandsDescription: getBinaryNodeChildString(commandsNode, 'description')!,
|
commandsDescription: getBinaryNodeChildString(commandsNode, 'description')!,
|
||||||
commands,
|
commands,
|
||||||
prompts
|
prompts
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { USyncQueryProtocol } from '../../Types/USync'
|
import type { USyncQueryProtocol } from '../../Types/USync'
|
||||||
import { BinaryNode } from '../../WABinary'
|
import type { BinaryNode } from '../../WABinary'
|
||||||
|
|
||||||
export class USyncLIDProtocol implements USyncQueryProtocol {
|
export class USyncLIDProtocol implements USyncQueryProtocol {
|
||||||
name = 'lid'
|
name = 'lid'
|
||||||
@@ -17,7 +17,7 @@ export class USyncLIDProtocol implements USyncQueryProtocol {
|
|||||||
|
|
||||||
parser(node: BinaryNode): string | null {
|
parser(node: BinaryNode): string | null {
|
||||||
if (node.tag === 'lid') {
|
if (node.tag === 'lid') {
|
||||||
return node.attrs.val
|
return node.attrs.val!
|
||||||
}
|
}
|
||||||
|
|
||||||
return null
|
return null
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { USyncQueryProtocol } from '../Types/USync'
|
import type { USyncQueryProtocol } from '../Types/USync'
|
||||||
import { BinaryNode, getBinaryNodeChild } from '../WABinary'
|
import { type BinaryNode, getBinaryNodeChild } from '../WABinary'
|
||||||
import { USyncBotProfileProtocol } from './Protocols/UsyncBotProfileProtocol'
|
import { USyncBotProfileProtocol } from './Protocols/UsyncBotProfileProtocol'
|
||||||
import { USyncLIDProtocol } from './Protocols/UsyncLIDProtocol'
|
import { USyncLIDProtocol } from './Protocols/UsyncLIDProtocol'
|
||||||
import {
|
import {
|
||||||
@@ -71,7 +71,7 @@ export class USyncQuery {
|
|||||||
const listNode = getBinaryNodeChild(usyncNode, 'list')
|
const listNode = getBinaryNodeChild(usyncNode, 'list')
|
||||||
if (Array.isArray(listNode?.content) && typeof listNode !== 'undefined') {
|
if (Array.isArray(listNode?.content) && typeof listNode !== 'undefined') {
|
||||||
queryResult.list = listNode.content.map(node => {
|
queryResult.list = listNode.content.map(node => {
|
||||||
const id = node?.attrs.jid
|
const id = node?.attrs.jid!
|
||||||
const data = Array.isArray(node?.content)
|
const data = Array.isArray(node?.content)
|
||||||
? Object.fromEntries(
|
? Object.fromEntries(
|
||||||
node.content
|
node.content
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
export class USyncUser {
|
export class USyncUser {
|
||||||
id: string
|
id?: string
|
||||||
lid: string
|
lid?: string
|
||||||
phone: string
|
phone?: string
|
||||||
type: string
|
type?: string
|
||||||
personaId: string
|
personaId?: string
|
||||||
|
|
||||||
withId(id: string) {
|
withId(id: string) {
|
||||||
this.id = id
|
this.id = id
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"noEmit": false
|
||||||
|
}
|
||||||
|
}
|
||||||
+31
-13
@@ -1,21 +1,39 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es2018",
|
"target": "ES2020",
|
||||||
"module": "CommonJS",
|
"module": "ESNext",
|
||||||
"experimentalDecorators": true,
|
"moduleResolution": "bundler",
|
||||||
"allowJs": false,
|
"outDir": "dist",
|
||||||
"checkJs": false,
|
"declaration": true,
|
||||||
"outDir": "lib",
|
"sourceMap": true,
|
||||||
"strict": false,
|
"declarationMap": true,
|
||||||
|
"moduleDetection": "force",
|
||||||
|
|
||||||
|
"lib": ["ES2020", "ESNext.Array", "DOM"],
|
||||||
|
"rootDir": "./src",
|
||||||
|
|
||||||
|
// ESM Features
|
||||||
|
"verbatimModuleSyntax": true,
|
||||||
|
"allowImportingTsExtensions": true,
|
||||||
|
"noEmit": true,
|
||||||
|
|
||||||
|
// Type Safety
|
||||||
|
"strict": true,
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
"skipLibCheck": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
|
"noUncheckedIndexedAccess": true,
|
||||||
"noImplicitThis": true,
|
"noImplicitThis": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
|
||||||
|
// Interop
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
|
||||||
"declaration": true,
|
// DX Boosters
|
||||||
"lib": ["es2020", "esnext.array", "DOM"]
|
"allowJs": false,
|
||||||
|
"checkJs": false
|
||||||
},
|
},
|
||||||
"include": ["./src/**/*.ts"],
|
"include": ["src/**/*.ts"],
|
||||||
"exclude": ["node_modules", "src/Tests/*", "src/Binary/GenerateStatics.ts"]
|
"exclude": ["node_modules", "src/Tests/*"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -454,12 +454,130 @@
|
|||||||
eventemitter3 "^5.0.1"
|
eventemitter3 "^5.0.1"
|
||||||
keyv "^5.0.3"
|
keyv "^5.0.3"
|
||||||
|
|
||||||
"@cspotcode/source-map-support@^0.8.0":
|
"@esbuild/aix-ppc64@0.25.5":
|
||||||
version "0.8.1"
|
version "0.25.5"
|
||||||
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1"
|
resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz#4e0f91776c2b340e75558f60552195f6fad09f18"
|
||||||
integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==
|
integrity sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==
|
||||||
dependencies:
|
|
||||||
"@jridgewell/trace-mapping" "0.3.9"
|
"@esbuild/android-arm64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.25.5.tgz#bc766407f1718923f6b8079c8c61bf86ac3a6a4f"
|
||||||
|
integrity sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==
|
||||||
|
|
||||||
|
"@esbuild/android-arm@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.25.5.tgz#4290d6d3407bae3883ad2cded1081a234473ce26"
|
||||||
|
integrity sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==
|
||||||
|
|
||||||
|
"@esbuild/android-x64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.25.5.tgz#40c11d9cbca4f2406548c8a9895d321bc3b35eff"
|
||||||
|
integrity sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==
|
||||||
|
|
||||||
|
"@esbuild/darwin-arm64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz#49d8bf8b1df95f759ac81eb1d0736018006d7e34"
|
||||||
|
integrity sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==
|
||||||
|
|
||||||
|
"@esbuild/darwin-x64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.25.5.tgz#e27a5d92a14886ef1d492fd50fc61a2d4d87e418"
|
||||||
|
integrity sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==
|
||||||
|
|
||||||
|
"@esbuild/freebsd-arm64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.5.tgz#97cede59d638840ca104e605cdb9f1b118ba0b1c"
|
||||||
|
integrity sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==
|
||||||
|
|
||||||
|
"@esbuild/freebsd-x64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.25.5.tgz#71c77812042a1a8190c3d581e140d15b876b9c6f"
|
||||||
|
integrity sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==
|
||||||
|
|
||||||
|
"@esbuild/linux-arm64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.25.5.tgz#f7b7c8f97eff8ffd2e47f6c67eb5c9765f2181b8"
|
||||||
|
integrity sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==
|
||||||
|
|
||||||
|
"@esbuild/linux-arm@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.25.5.tgz#2a0be71b6cd8201fa559aea45598dffabc05d911"
|
||||||
|
integrity sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==
|
||||||
|
|
||||||
|
"@esbuild/linux-ia32@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.25.5.tgz#763414463cd9ea6fa1f96555d2762f9f84c61783"
|
||||||
|
integrity sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==
|
||||||
|
|
||||||
|
"@esbuild/linux-loong64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.25.5.tgz#428cf2213ff786a502a52c96cf29d1fcf1eb8506"
|
||||||
|
integrity sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==
|
||||||
|
|
||||||
|
"@esbuild/linux-mips64el@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.25.5.tgz#5cbcc7fd841b4cd53358afd33527cd394e325d96"
|
||||||
|
integrity sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==
|
||||||
|
|
||||||
|
"@esbuild/linux-ppc64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.25.5.tgz#0d954ab39ce4f5e50f00c4f8c4fd38f976c13ad9"
|
||||||
|
integrity sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==
|
||||||
|
|
||||||
|
"@esbuild/linux-riscv64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.25.5.tgz#0e7dd30730505abd8088321e8497e94b547bfb1e"
|
||||||
|
integrity sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==
|
||||||
|
|
||||||
|
"@esbuild/linux-s390x@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.25.5.tgz#5669af81327a398a336d7e40e320b5bbd6e6e72d"
|
||||||
|
integrity sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==
|
||||||
|
|
||||||
|
"@esbuild/linux-x64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz#b2357dd153aa49038967ddc1ffd90c68a9d2a0d4"
|
||||||
|
integrity sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==
|
||||||
|
|
||||||
|
"@esbuild/netbsd-arm64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.5.tgz#53b4dfb8fe1cee93777c9e366893bd3daa6ba63d"
|
||||||
|
integrity sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==
|
||||||
|
|
||||||
|
"@esbuild/netbsd-x64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.25.5.tgz#a0206f6314ce7dc8713b7732703d0f58de1d1e79"
|
||||||
|
integrity sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==
|
||||||
|
|
||||||
|
"@esbuild/openbsd-arm64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.5.tgz#2a796c87c44e8de78001d808c77d948a21ec22fd"
|
||||||
|
integrity sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==
|
||||||
|
|
||||||
|
"@esbuild/openbsd-x64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.25.5.tgz#28d0cd8909b7fa3953af998f2b2ed34f576728f0"
|
||||||
|
integrity sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==
|
||||||
|
|
||||||
|
"@esbuild/sunos-x64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.25.5.tgz#a28164f5b997e8247d407e36c90d3fd5ddbe0dc5"
|
||||||
|
integrity sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==
|
||||||
|
|
||||||
|
"@esbuild/win32-arm64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.25.5.tgz#6eadbead38e8bd12f633a5190e45eff80e24007e"
|
||||||
|
integrity sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==
|
||||||
|
|
||||||
|
"@esbuild/win32-ia32@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.25.5.tgz#bab6288005482f9ed2adb9ded7e88eba9a62cc0d"
|
||||||
|
integrity sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==
|
||||||
|
|
||||||
|
"@esbuild/win32-x64@0.25.5":
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz#7fc114af5f6563f19f73324b5d5ff36ece0803d1"
|
||||||
|
integrity sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==
|
||||||
|
|
||||||
"@emnapi/runtime@^1.4.3":
|
"@emnapi/runtime@^1.4.3":
|
||||||
version "1.4.3"
|
version "1.4.3"
|
||||||
@@ -475,7 +593,7 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
eslint-visitor-keys "^3.3.0"
|
eslint-visitor-keys "^3.3.0"
|
||||||
|
|
||||||
"@eslint-community/eslint-utils@^4.7.0":
|
"@eslint-community/eslint-utils@^4.4.0", "@eslint-community/eslint-utils@^4.7.0":
|
||||||
version "4.7.0"
|
version "4.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz#607084630c6c033992a082de6e6fbc1a8b52175a"
|
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz#607084630c6c033992a082de6e6fbc1a8b52175a"
|
||||||
integrity sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==
|
integrity sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==
|
||||||
@@ -742,6 +860,11 @@
|
|||||||
slash "^3.0.0"
|
slash "^3.0.0"
|
||||||
strip-ansi "^6.0.0"
|
strip-ansi "^6.0.0"
|
||||||
|
|
||||||
|
"@jest/diff-sequences@30.0.1":
|
||||||
|
version "30.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@jest/diff-sequences/-/diff-sequences-30.0.1.tgz#0ededeae4d071f5c8ffe3678d15f3a1be09156be"
|
||||||
|
integrity sha512-n5H8QLDJ47QqbCNn5SuFjCRDrOLEZ0h8vAHCK5RL9Ls7Xa8AQLa/YxAc9UjFqoEDM48muwtBGjtMY5cr0PLDCw==
|
||||||
|
|
||||||
"@jest/environment@^29.7.0":
|
"@jest/environment@^29.7.0":
|
||||||
version "29.7.0"
|
version "29.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7"
|
resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7"
|
||||||
@@ -752,6 +875,13 @@
|
|||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
jest-mock "^29.7.0"
|
jest-mock "^29.7.0"
|
||||||
|
|
||||||
|
"@jest/expect-utils@30.0.2":
|
||||||
|
version "30.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-30.0.2.tgz#d065f68c128cec526540193d88f2fc64c3d4f971"
|
||||||
|
integrity sha512-FHF2YdtFBUQOo0/qdgt+6UdBFcNPF/TkVzcc+4vvf8uaBzUlONytGBeeudufIHHW1khRfM1sBbRT1VCK7n/0dQ==
|
||||||
|
dependencies:
|
||||||
|
"@jest/get-type" "30.0.1"
|
||||||
|
|
||||||
"@jest/expect-utils@^29.7.0":
|
"@jest/expect-utils@^29.7.0":
|
||||||
version "29.7.0"
|
version "29.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6"
|
resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6"
|
||||||
@@ -779,6 +909,11 @@
|
|||||||
jest-mock "^29.7.0"
|
jest-mock "^29.7.0"
|
||||||
jest-util "^29.7.0"
|
jest-util "^29.7.0"
|
||||||
|
|
||||||
|
"@jest/get-type@30.0.1":
|
||||||
|
version "30.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@jest/get-type/-/get-type-30.0.1.tgz#0d32f1bbfba511948ad247ab01b9007724fc9f52"
|
||||||
|
integrity sha512-AyYdemXCptSRFirI5EPazNxyPwAL0jXt3zceFjaj8NFiKP9pOi0bfXonf6qkf82z2t3QWPeLCWWw4stPBzctLw==
|
||||||
|
|
||||||
"@jest/globals@^29.7.0":
|
"@jest/globals@^29.7.0":
|
||||||
version "29.7.0"
|
version "29.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d"
|
resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d"
|
||||||
@@ -789,6 +924,14 @@
|
|||||||
"@jest/types" "^29.6.3"
|
"@jest/types" "^29.6.3"
|
||||||
jest-mock "^29.7.0"
|
jest-mock "^29.7.0"
|
||||||
|
|
||||||
|
"@jest/pattern@30.0.1":
|
||||||
|
version "30.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@jest/pattern/-/pattern-30.0.1.tgz#d5304147f49a052900b4b853dedb111d080e199f"
|
||||||
|
integrity sha512-gWp7NfQW27LaBQz3TITS8L7ZCQ0TLvtmI//4OwlQRx4rnWxcPNIYjxZpDcN4+UlGxgm3jS5QPz8IPTCkb59wZA==
|
||||||
|
dependencies:
|
||||||
|
"@types/node" "*"
|
||||||
|
jest-regex-util "30.0.1"
|
||||||
|
|
||||||
"@jest/reporters@^29.7.0":
|
"@jest/reporters@^29.7.0":
|
||||||
version "29.7.0"
|
version "29.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7"
|
resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7"
|
||||||
@@ -819,6 +962,13 @@
|
|||||||
strip-ansi "^6.0.0"
|
strip-ansi "^6.0.0"
|
||||||
v8-to-istanbul "^9.0.1"
|
v8-to-istanbul "^9.0.1"
|
||||||
|
|
||||||
|
"@jest/schemas@30.0.1":
|
||||||
|
version "30.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-30.0.1.tgz#27c00d707d480ece0c19126af97081a1af3bc46e"
|
||||||
|
integrity sha512-+g/1TKjFuGrf1Hh0QPCv0gISwBxJ+MQSNXmG9zjHy7BmFhtoJ9fdNhWJp3qUKRi93AOZHXtdxZgJ1vAtz6z65w==
|
||||||
|
dependencies:
|
||||||
|
"@sinclair/typebox" "^0.34.0"
|
||||||
|
|
||||||
"@jest/schemas@^29.6.3":
|
"@jest/schemas@^29.6.3":
|
||||||
version "29.6.3"
|
version "29.6.3"
|
||||||
resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03"
|
resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03"
|
||||||
@@ -876,6 +1026,19 @@
|
|||||||
slash "^3.0.0"
|
slash "^3.0.0"
|
||||||
write-file-atomic "^4.0.2"
|
write-file-atomic "^4.0.2"
|
||||||
|
|
||||||
|
"@jest/types@30.0.1":
|
||||||
|
version "30.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@jest/types/-/types-30.0.1.tgz#a46df6a99a416fa685740ac4264b9f9cd7da1598"
|
||||||
|
integrity sha512-HGwoYRVF0QSKJu1ZQX0o5ZrUrrhj0aOOFA8hXrumD7SIzjouevhawbTjmXdwOmURdGluU9DM/XvGm3NyFoiQjw==
|
||||||
|
dependencies:
|
||||||
|
"@jest/pattern" "30.0.1"
|
||||||
|
"@jest/schemas" "30.0.1"
|
||||||
|
"@types/istanbul-lib-coverage" "^2.0.6"
|
||||||
|
"@types/istanbul-reports" "^3.0.4"
|
||||||
|
"@types/node" "*"
|
||||||
|
"@types/yargs" "^17.0.33"
|
||||||
|
chalk "^4.1.2"
|
||||||
|
|
||||||
"@jest/types@^29.6.3":
|
"@jest/types@^29.6.3":
|
||||||
version "29.6.3"
|
version "29.6.3"
|
||||||
resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59"
|
resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59"
|
||||||
@@ -1170,7 +1333,7 @@
|
|||||||
"@jridgewell/sourcemap-codec" "^1.4.10"
|
"@jridgewell/sourcemap-codec" "^1.4.10"
|
||||||
"@jridgewell/trace-mapping" "^0.3.24"
|
"@jridgewell/trace-mapping" "^0.3.24"
|
||||||
|
|
||||||
"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0":
|
"@jridgewell/resolve-uri@^3.1.0":
|
||||||
version "3.1.2"
|
version "3.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6"
|
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz#7a0ee601f60f99a20c7c7c5ff0c80388c1189bd6"
|
||||||
integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==
|
integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==
|
||||||
@@ -1185,14 +1348,6 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a"
|
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a"
|
||||||
integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==
|
integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==
|
||||||
|
|
||||||
"@jridgewell/trace-mapping@0.3.9":
|
|
||||||
version "0.3.9"
|
|
||||||
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9"
|
|
||||||
integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==
|
|
||||||
dependencies:
|
|
||||||
"@jridgewell/resolve-uri" "^3.0.3"
|
|
||||||
"@jridgewell/sourcemap-codec" "^1.4.10"
|
|
||||||
|
|
||||||
"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25":
|
"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25":
|
||||||
version "0.3.25"
|
version "0.3.25"
|
||||||
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0"
|
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0"
|
||||||
@@ -1452,6 +1607,11 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e"
|
resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e"
|
||||||
integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==
|
integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==
|
||||||
|
|
||||||
|
"@sinclair/typebox@^0.34.0":
|
||||||
|
version "0.34.35"
|
||||||
|
resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.34.35.tgz#185c57551d5edf9a2f6e9d012822b06f942cfbfc"
|
||||||
|
integrity sha512-C6ypdODf2VZkgRT6sFM8E1F8vR+HcffniX0Kp8MsU8PIfrlXbNCBz0jzj17GjdmjTx1OtZzdH8+iALL21UjF5A==
|
||||||
|
|
||||||
"@sindresorhus/is@^5.2.0":
|
"@sindresorhus/is@^5.2.0":
|
||||||
version "5.6.0"
|
version "5.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-5.6.0.tgz#41dd6093d34652cddb5d5bdeee04eafc33826668"
|
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-5.6.0.tgz#41dd6093d34652cddb5d5bdeee04eafc33826668"
|
||||||
@@ -1483,26 +1643,6 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@tokenizer/token/-/token-0.3.0.tgz#fe98a93fe789247e998c75e74e9c7c63217aa276"
|
resolved "https://registry.yarnpkg.com/@tokenizer/token/-/token-0.3.0.tgz#fe98a93fe789247e998c75e74e9c7c63217aa276"
|
||||||
integrity sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==
|
integrity sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==
|
||||||
|
|
||||||
"@tsconfig/node10@^1.0.7":
|
|
||||||
version "1.0.11"
|
|
||||||
resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2"
|
|
||||||
integrity sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==
|
|
||||||
|
|
||||||
"@tsconfig/node12@^1.0.7":
|
|
||||||
version "1.0.11"
|
|
||||||
resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.11.tgz#ee3def1f27d9ed66dac6e46a295cffb0152e058d"
|
|
||||||
integrity sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==
|
|
||||||
|
|
||||||
"@tsconfig/node14@^1.0.0":
|
|
||||||
version "1.0.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.3.tgz#e4386316284f00b98435bf40f72f75a09dabf6c1"
|
|
||||||
integrity sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==
|
|
||||||
|
|
||||||
"@tsconfig/node16@^1.0.2":
|
|
||||||
version "1.0.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9"
|
|
||||||
integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==
|
|
||||||
|
|
||||||
"@types/babel__core@^7.1.14":
|
"@types/babel__core@^7.1.14":
|
||||||
version "7.20.5"
|
version "7.20.5"
|
||||||
resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017"
|
resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017"
|
||||||
@@ -1555,7 +1695,7 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz#b979ebad3919799c979b17c72621c0bc0a31c6c4"
|
resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz#b979ebad3919799c979b17c72621c0bc0a31c6c4"
|
||||||
integrity sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==
|
integrity sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==
|
||||||
|
|
||||||
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1":
|
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1", "@types/istanbul-lib-coverage@^2.0.6":
|
||||||
version "2.0.6"
|
version "2.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7"
|
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7"
|
||||||
integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==
|
integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==
|
||||||
@@ -1567,20 +1707,20 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/istanbul-lib-coverage" "*"
|
"@types/istanbul-lib-coverage" "*"
|
||||||
|
|
||||||
"@types/istanbul-reports@^3.0.0":
|
"@types/istanbul-reports@^3.0.0", "@types/istanbul-reports@^3.0.4":
|
||||||
version "3.0.4"
|
version "3.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz#0f03e3d2f670fbdac586e34b433783070cc16f54"
|
resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz#0f03e3d2f670fbdac586e34b433783070cc16f54"
|
||||||
integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==
|
integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/istanbul-lib-report" "*"
|
"@types/istanbul-lib-report" "*"
|
||||||
|
|
||||||
"@types/jest@^27.5.1":
|
"@types/jest@^30.0.0":
|
||||||
version "27.5.2"
|
version "30.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.5.2.tgz#ec49d29d926500ffb9fd22b84262e862049c026c"
|
resolved "https://registry.yarnpkg.com/@types/jest/-/jest-30.0.0.tgz#5e85ae568006712e4ad66f25433e9bdac8801f1d"
|
||||||
integrity sha512-mpT8LJJ4CMeeahobofYWIjFo0xonRS/HfxnVEPMPFSQdGUt1uHCnoPT7Zhb+sjDU2wz0oKV0OLUR0WzrHNgfeA==
|
integrity sha512-XTYugzhuwqWjws0CVz8QpM36+T+Dz5mTEBKhNs/esGLnCIlGdRy+Dq78NRjd7ls7r8BC8ZRMOrKlkO1hU0JOwA==
|
||||||
dependencies:
|
dependencies:
|
||||||
jest-matcher-utils "^27.0.0"
|
expect "^30.0.0"
|
||||||
pretty-format "^27.0.0"
|
pretty-format "^30.0.0"
|
||||||
|
|
||||||
"@types/linkify-it@^5":
|
"@types/linkify-it@^5":
|
||||||
version "5.0.0"
|
version "5.0.0"
|
||||||
@@ -1637,7 +1777,7 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901"
|
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901"
|
||||||
integrity sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==
|
integrity sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==
|
||||||
|
|
||||||
"@types/stack-utils@^2.0.0":
|
"@types/stack-utils@^2.0.0", "@types/stack-utils@^2.0.3":
|
||||||
version "2.0.3"
|
version "2.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8"
|
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8"
|
||||||
integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==
|
integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==
|
||||||
@@ -1659,13 +1799,28 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15"
|
resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15"
|
||||||
integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==
|
integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==
|
||||||
|
|
||||||
"@types/yargs@^17.0.8":
|
"@types/yargs@^17.0.33", "@types/yargs@^17.0.8":
|
||||||
version "17.0.33"
|
version "17.0.33"
|
||||||
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d"
|
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.33.tgz#8c32303da83eec050a84b3c7ae7b9f922d13e32d"
|
||||||
integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==
|
integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/yargs-parser" "*"
|
"@types/yargs-parser" "*"
|
||||||
|
|
||||||
|
"@typescript-eslint/eslint-plugin@^7.15.0":
|
||||||
|
version "7.18.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.18.0.tgz#b16d3cf3ee76bf572fdf511e79c248bdec619ea3"
|
||||||
|
integrity sha512-94EQTWZ40mzBc42ATNIBimBEDltSJ9RQHCC8vc/PDbxi4k8dVwUAv4o98dk50M1zB+JGFxp43FP7f8+FP8R6Sw==
|
||||||
|
dependencies:
|
||||||
|
"@eslint-community/regexpp" "^4.10.0"
|
||||||
|
"@typescript-eslint/scope-manager" "7.18.0"
|
||||||
|
"@typescript-eslint/type-utils" "7.18.0"
|
||||||
|
"@typescript-eslint/utils" "7.18.0"
|
||||||
|
"@typescript-eslint/visitor-keys" "7.18.0"
|
||||||
|
graphemer "^1.4.0"
|
||||||
|
ignore "^5.3.1"
|
||||||
|
natural-compare "^1.4.0"
|
||||||
|
ts-api-utils "^1.3.0"
|
||||||
|
|
||||||
"@typescript-eslint/eslint-plugin@^8.32.0":
|
"@typescript-eslint/eslint-plugin@^8.32.0":
|
||||||
version "8.33.0"
|
version "8.33.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.33.0.tgz#51ed03649575ba51bcee7efdbfd85283249b5447"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.33.0.tgz#51ed03649575ba51bcee7efdbfd85283249b5447"
|
||||||
@@ -1681,6 +1836,17 @@
|
|||||||
natural-compare "^1.4.0"
|
natural-compare "^1.4.0"
|
||||||
ts-api-utils "^2.1.0"
|
ts-api-utils "^2.1.0"
|
||||||
|
|
||||||
|
"@typescript-eslint/parser@^7.15.0":
|
||||||
|
version "7.18.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-7.18.0.tgz#83928d0f1b7f4afa974098c64b5ce6f9051f96a0"
|
||||||
|
integrity sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==
|
||||||
|
dependencies:
|
||||||
|
"@typescript-eslint/scope-manager" "7.18.0"
|
||||||
|
"@typescript-eslint/types" "7.18.0"
|
||||||
|
"@typescript-eslint/typescript-estree" "7.18.0"
|
||||||
|
"@typescript-eslint/visitor-keys" "7.18.0"
|
||||||
|
debug "^4.3.4"
|
||||||
|
|
||||||
"@typescript-eslint/parser@^8.32.0":
|
"@typescript-eslint/parser@^8.32.0":
|
||||||
version "8.34.0"
|
version "8.34.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.34.0.tgz#703270426ac529304ae6988482f487c856d9c13f"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.34.0.tgz#703270426ac529304ae6988482f487c856d9c13f"
|
||||||
@@ -1710,6 +1876,14 @@
|
|||||||
"@typescript-eslint/types" "^8.34.0"
|
"@typescript-eslint/types" "^8.34.0"
|
||||||
debug "^4.3.4"
|
debug "^4.3.4"
|
||||||
|
|
||||||
|
"@typescript-eslint/scope-manager@7.18.0":
|
||||||
|
version "7.18.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz#c928e7a9fc2c0b3ed92ab3112c614d6bd9951c83"
|
||||||
|
integrity sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==
|
||||||
|
dependencies:
|
||||||
|
"@typescript-eslint/types" "7.18.0"
|
||||||
|
"@typescript-eslint/visitor-keys" "7.18.0"
|
||||||
|
|
||||||
"@typescript-eslint/scope-manager@8.33.0":
|
"@typescript-eslint/scope-manager@8.33.0":
|
||||||
version "8.33.0"
|
version "8.33.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.33.0.tgz#459cf0c49d410800b1a023b973c62d699b09bf4c"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.33.0.tgz#459cf0c49d410800b1a023b973c62d699b09bf4c"
|
||||||
@@ -1736,6 +1910,16 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.34.0.tgz#97d0a24e89a355e9308cebc8e23f255669bf0979"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.34.0.tgz#97d0a24e89a355e9308cebc8e23f255669bf0979"
|
||||||
integrity sha512-+W9VYHKFIzA5cBeooqQxqNriAP0QeQ7xTiDuIOr71hzgffm3EL2hxwWBIIj4GuofIbKxGNarpKqIq6Q6YrShOA==
|
integrity sha512-+W9VYHKFIzA5cBeooqQxqNriAP0QeQ7xTiDuIOr71hzgffm3EL2hxwWBIIj4GuofIbKxGNarpKqIq6Q6YrShOA==
|
||||||
|
|
||||||
|
"@typescript-eslint/type-utils@7.18.0":
|
||||||
|
version "7.18.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz#2165ffaee00b1fbbdd2d40aa85232dab6998f53b"
|
||||||
|
integrity sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==
|
||||||
|
dependencies:
|
||||||
|
"@typescript-eslint/typescript-estree" "7.18.0"
|
||||||
|
"@typescript-eslint/utils" "7.18.0"
|
||||||
|
debug "^4.3.4"
|
||||||
|
ts-api-utils "^1.3.0"
|
||||||
|
|
||||||
"@typescript-eslint/type-utils@8.33.0":
|
"@typescript-eslint/type-utils@8.33.0":
|
||||||
version "8.33.0"
|
version "8.33.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.33.0.tgz#f06124b2d6db8a51b24990cb123c9543af93fef5"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.33.0.tgz#f06124b2d6db8a51b24990cb123c9543af93fef5"
|
||||||
@@ -1746,6 +1930,11 @@
|
|||||||
debug "^4.3.4"
|
debug "^4.3.4"
|
||||||
ts-api-utils "^2.1.0"
|
ts-api-utils "^2.1.0"
|
||||||
|
|
||||||
|
"@typescript-eslint/types@7.18.0":
|
||||||
|
version "7.18.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.18.0.tgz#b90a57ccdea71797ffffa0321e744f379ec838c9"
|
||||||
|
integrity sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==
|
||||||
|
|
||||||
"@typescript-eslint/types@8.33.0", "@typescript-eslint/types@^8.33.0":
|
"@typescript-eslint/types@8.33.0", "@typescript-eslint/types@^8.33.0":
|
||||||
version "8.33.0"
|
version "8.33.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.33.0.tgz#02a7dbba611a8abf1ad2a9e00f72f7b94b5ab0ee"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.33.0.tgz#02a7dbba611a8abf1ad2a9e00f72f7b94b5ab0ee"
|
||||||
@@ -1756,6 +1945,20 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.34.0.tgz#18000f205c59c9aff7f371fc5426b764cf2890fb"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.34.0.tgz#18000f205c59c9aff7f371fc5426b764cf2890fb"
|
||||||
integrity sha512-9V24k/paICYPniajHfJ4cuAWETnt7Ssy+R0Rbcqo5sSFr3QEZ/8TSoUi9XeXVBGXCaLtwTOKSLGcInCAvyZeMA==
|
integrity sha512-9V24k/paICYPniajHfJ4cuAWETnt7Ssy+R0Rbcqo5sSFr3QEZ/8TSoUi9XeXVBGXCaLtwTOKSLGcInCAvyZeMA==
|
||||||
|
|
||||||
|
"@typescript-eslint/typescript-estree@7.18.0":
|
||||||
|
version "7.18.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz#b5868d486c51ce8f312309ba79bdb9f331b37931"
|
||||||
|
integrity sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==
|
||||||
|
dependencies:
|
||||||
|
"@typescript-eslint/types" "7.18.0"
|
||||||
|
"@typescript-eslint/visitor-keys" "7.18.0"
|
||||||
|
debug "^4.3.4"
|
||||||
|
globby "^11.1.0"
|
||||||
|
is-glob "^4.0.3"
|
||||||
|
minimatch "^9.0.4"
|
||||||
|
semver "^7.6.0"
|
||||||
|
ts-api-utils "^1.3.0"
|
||||||
|
|
||||||
"@typescript-eslint/typescript-estree@8.33.0":
|
"@typescript-eslint/typescript-estree@8.33.0":
|
||||||
version "8.33.0"
|
version "8.33.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.33.0.tgz#abcc1d3db75a8e9fd2e274ee8c4099fa2399abfd"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.33.0.tgz#abcc1d3db75a8e9fd2e274ee8c4099fa2399abfd"
|
||||||
@@ -1788,6 +1991,16 @@
|
|||||||
semver "^7.6.0"
|
semver "^7.6.0"
|
||||||
ts-api-utils "^2.1.0"
|
ts-api-utils "^2.1.0"
|
||||||
|
|
||||||
|
"@typescript-eslint/utils@7.18.0":
|
||||||
|
version "7.18.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.18.0.tgz#bca01cde77f95fc6a8d5b0dbcbfb3d6ca4be451f"
|
||||||
|
integrity sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==
|
||||||
|
dependencies:
|
||||||
|
"@eslint-community/eslint-utils" "^4.4.0"
|
||||||
|
"@typescript-eslint/scope-manager" "7.18.0"
|
||||||
|
"@typescript-eslint/types" "7.18.0"
|
||||||
|
"@typescript-eslint/typescript-estree" "7.18.0"
|
||||||
|
|
||||||
"@typescript-eslint/utils@8.33.0":
|
"@typescript-eslint/utils@8.33.0":
|
||||||
version "8.33.0"
|
version "8.33.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.33.0.tgz#574ad5edee371077b9e28ca6fb804f2440f447c1"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.33.0.tgz#574ad5edee371077b9e28ca6fb804f2440f447c1"
|
||||||
@@ -1798,6 +2011,14 @@
|
|||||||
"@typescript-eslint/types" "8.33.0"
|
"@typescript-eslint/types" "8.33.0"
|
||||||
"@typescript-eslint/typescript-estree" "8.33.0"
|
"@typescript-eslint/typescript-estree" "8.33.0"
|
||||||
|
|
||||||
|
"@typescript-eslint/visitor-keys@7.18.0":
|
||||||
|
version "7.18.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz#0564629b6124d67607378d0f0332a0495b25e7d7"
|
||||||
|
integrity sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==
|
||||||
|
dependencies:
|
||||||
|
"@typescript-eslint/types" "7.18.0"
|
||||||
|
eslint-visitor-keys "^3.4.3"
|
||||||
|
|
||||||
"@typescript-eslint/visitor-keys@8.33.0":
|
"@typescript-eslint/visitor-keys@8.33.0":
|
||||||
version "8.33.0"
|
version "8.33.0"
|
||||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.33.0.tgz#fbae16fd3594531f8cad95d421125d634e9974fe"
|
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.33.0.tgz#fbae16fd3594531f8cad95d421125d634e9974fe"
|
||||||
@@ -1823,8 +2044,8 @@
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://codeload.github.com/whiskeysockets/eslint-config/tar.gz/f264cd06d24a43f76e4ad2d81528f8485a1e7efe"
|
resolved "https://codeload.github.com/whiskeysockets/eslint-config/tar.gz/f264cd06d24a43f76e4ad2d81528f8485a1e7efe"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@typescript-eslint/eslint-plugin" "^8.32.0"
|
"@typescript-eslint/eslint-plugin" "^7.15.0"
|
||||||
"@typescript-eslint/parser" "^8.32.0"
|
"@typescript-eslint/parser" "^7.15.0"
|
||||||
eslint-plugin-simple-import-sort "^12.1.1"
|
eslint-plugin-simple-import-sort "^12.1.1"
|
||||||
|
|
||||||
JSONStream@^1.0.4:
|
JSONStream@^1.0.4:
|
||||||
@@ -1847,14 +2068,14 @@ acorn-jsx@^5.3.2:
|
|||||||
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"
|
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"
|
||||||
integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==
|
integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==
|
||||||
|
|
||||||
acorn-walk@^8.1.1, acorn-walk@^8.2.0:
|
acorn-walk@^8.2.0:
|
||||||
version "8.3.4"
|
version "8.3.4"
|
||||||
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7"
|
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7"
|
||||||
integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==
|
integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==
|
||||||
dependencies:
|
dependencies:
|
||||||
acorn "^8.11.0"
|
acorn "^8.11.0"
|
||||||
|
|
||||||
acorn@^8.11.0, acorn@^8.4.1, acorn@^8.7.0, acorn@^8.9.0:
|
acorn@^8.11.0, acorn@^8.7.0, acorn@^8.9.0:
|
||||||
version "8.12.1"
|
version "8.12.1"
|
||||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248"
|
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248"
|
||||||
integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==
|
integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==
|
||||||
@@ -1919,7 +2140,7 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
color-convert "^2.0.1"
|
color-convert "^2.0.1"
|
||||||
|
|
||||||
ansi-styles@^5.0.0:
|
ansi-styles@^5.0.0, ansi-styles@^5.2.0:
|
||||||
version "5.2.0"
|
version "5.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b"
|
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b"
|
||||||
integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==
|
integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==
|
||||||
@@ -1942,11 +2163,6 @@ anymatch@^3.0.3:
|
|||||||
normalize-path "^3.0.0"
|
normalize-path "^3.0.0"
|
||||||
picomatch "^2.0.4"
|
picomatch "^2.0.4"
|
||||||
|
|
||||||
arg@^4.1.0:
|
|
||||||
version "4.1.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
|
|
||||||
integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==
|
|
||||||
|
|
||||||
argparse@^1.0.7:
|
argparse@^1.0.7:
|
||||||
version "1.0.10"
|
version "1.0.10"
|
||||||
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
|
resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
|
||||||
@@ -1972,6 +2188,11 @@ array-ify@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece"
|
resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece"
|
||||||
integrity sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==
|
integrity sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==
|
||||||
|
|
||||||
|
array-union@^2.1.0:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
|
||||||
|
integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
|
||||||
|
|
||||||
array.prototype.map@^1.0.5:
|
array.prototype.map@^1.0.5:
|
||||||
version "1.0.7"
|
version "1.0.7"
|
||||||
resolved "https://registry.yarnpkg.com/array.prototype.map/-/array.prototype.map-1.0.7.tgz#82fa4d6027272d1fca28a63bbda424d0185d78a7"
|
resolved "https://registry.yarnpkg.com/array.prototype.map/-/array.prototype.map-1.0.7.tgz#82fa4d6027272d1fca28a63bbda424d0185d78a7"
|
||||||
@@ -2368,7 +2589,7 @@ chalk@^2.4.2:
|
|||||||
escape-string-regexp "^1.0.5"
|
escape-string-regexp "^1.0.5"
|
||||||
supports-color "^5.3.0"
|
supports-color "^5.3.0"
|
||||||
|
|
||||||
chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0:
|
chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.2:
|
||||||
version "4.1.2"
|
version "4.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
|
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
|
||||||
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
|
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
|
||||||
@@ -2422,6 +2643,11 @@ ci-info@^3.2.0:
|
|||||||
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4"
|
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4"
|
||||||
integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==
|
integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==
|
||||||
|
|
||||||
|
ci-info@^4.2.0:
|
||||||
|
version "4.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-4.2.0.tgz#cbd21386152ebfe1d56f280a3b5feccbd96764c7"
|
||||||
|
integrity sha512-cYY9mypksY8NRqgDB1XD1RiJL338v/551niynFTGkZOO2LHuB2OmOYxDIe/ttN9AHwrqdum1360G3ald0W9kCg==
|
||||||
|
|
||||||
cjs-module-lexer@^1.0.0:
|
cjs-module-lexer@^1.0.0:
|
||||||
version "1.4.1"
|
version "1.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz#707413784dbb3a72aa11c2f2b042a0bef4004170"
|
resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz#707413784dbb3a72aa11c2f2b042a0bef4004170"
|
||||||
@@ -2761,11 +2987,6 @@ create-jest@^29.7.0:
|
|||||||
jest-util "^29.7.0"
|
jest-util "^29.7.0"
|
||||||
prompts "^2.0.1"
|
prompts "^2.0.1"
|
||||||
|
|
||||||
create-require@^1.1.0:
|
|
||||||
version "1.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
|
|
||||||
integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==
|
|
||||||
|
|
||||||
cross-fetch@3.1.5:
|
cross-fetch@3.1.5:
|
||||||
version "3.1.5"
|
version "3.1.5"
|
||||||
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f"
|
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f"
|
||||||
@@ -2992,21 +3213,11 @@ detect-newline@^3.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
|
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
|
||||||
integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==
|
integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==
|
||||||
|
|
||||||
diff-sequences@^27.5.1:
|
|
||||||
version "27.5.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327"
|
|
||||||
integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==
|
|
||||||
|
|
||||||
diff-sequences@^29.6.3:
|
diff-sequences@^29.6.3:
|
||||||
version "29.6.3"
|
version "29.6.3"
|
||||||
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921"
|
resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921"
|
||||||
integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==
|
integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==
|
||||||
|
|
||||||
diff@^4.0.1:
|
|
||||||
version "4.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d"
|
|
||||||
integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==
|
|
||||||
|
|
||||||
dir-glob@^3.0.1:
|
dir-glob@^3.0.1:
|
||||||
version "3.0.1"
|
version "3.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
|
resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f"
|
||||||
@@ -3218,6 +3429,37 @@ es-to-primitive@^1.2.1:
|
|||||||
is-date-object "^1.0.1"
|
is-date-object "^1.0.1"
|
||||||
is-symbol "^1.0.2"
|
is-symbol "^1.0.2"
|
||||||
|
|
||||||
|
esbuild@~0.25.0:
|
||||||
|
version "0.25.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.25.5.tgz#71075054993fdfae76c66586f9b9c1f8d7edd430"
|
||||||
|
integrity sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ==
|
||||||
|
optionalDependencies:
|
||||||
|
"@esbuild/aix-ppc64" "0.25.5"
|
||||||
|
"@esbuild/android-arm" "0.25.5"
|
||||||
|
"@esbuild/android-arm64" "0.25.5"
|
||||||
|
"@esbuild/android-x64" "0.25.5"
|
||||||
|
"@esbuild/darwin-arm64" "0.25.5"
|
||||||
|
"@esbuild/darwin-x64" "0.25.5"
|
||||||
|
"@esbuild/freebsd-arm64" "0.25.5"
|
||||||
|
"@esbuild/freebsd-x64" "0.25.5"
|
||||||
|
"@esbuild/linux-arm" "0.25.5"
|
||||||
|
"@esbuild/linux-arm64" "0.25.5"
|
||||||
|
"@esbuild/linux-ia32" "0.25.5"
|
||||||
|
"@esbuild/linux-loong64" "0.25.5"
|
||||||
|
"@esbuild/linux-mips64el" "0.25.5"
|
||||||
|
"@esbuild/linux-ppc64" "0.25.5"
|
||||||
|
"@esbuild/linux-riscv64" "0.25.5"
|
||||||
|
"@esbuild/linux-s390x" "0.25.5"
|
||||||
|
"@esbuild/linux-x64" "0.25.5"
|
||||||
|
"@esbuild/netbsd-arm64" "0.25.5"
|
||||||
|
"@esbuild/netbsd-x64" "0.25.5"
|
||||||
|
"@esbuild/openbsd-arm64" "0.25.5"
|
||||||
|
"@esbuild/openbsd-x64" "0.25.5"
|
||||||
|
"@esbuild/sunos-x64" "0.25.5"
|
||||||
|
"@esbuild/win32-arm64" "0.25.5"
|
||||||
|
"@esbuild/win32-ia32" "0.25.5"
|
||||||
|
"@esbuild/win32-x64" "0.25.5"
|
||||||
|
|
||||||
escalade@^3.1.1, escalade@^3.2.0:
|
escalade@^3.1.1, escalade@^3.2.0:
|
||||||
version "3.2.0"
|
version "3.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5"
|
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5"
|
||||||
@@ -3459,6 +3701,18 @@ expect@^29.7.0:
|
|||||||
jest-message-util "^29.7.0"
|
jest-message-util "^29.7.0"
|
||||||
jest-util "^29.7.0"
|
jest-util "^29.7.0"
|
||||||
|
|
||||||
|
expect@^30.0.0:
|
||||||
|
version "30.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/expect/-/expect-30.0.2.tgz#d073942c19d54cb7bc42c9b2a434d850433a7def"
|
||||||
|
integrity sha512-YN9Mgv2mtTWXVmifQq3QT+ixCL/uLuLJw+fdp8MOjKqu8K3XQh3o5aulMM1tn+O2DdrWNxLZTeJsCY/VofUA0A==
|
||||||
|
dependencies:
|
||||||
|
"@jest/expect-utils" "30.0.2"
|
||||||
|
"@jest/get-type" "30.0.1"
|
||||||
|
jest-matcher-utils "30.0.2"
|
||||||
|
jest-message-util "30.0.2"
|
||||||
|
jest-mock "30.0.2"
|
||||||
|
jest-util "30.0.2"
|
||||||
|
|
||||||
external-editor@^3.0.3:
|
external-editor@^3.0.3:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495"
|
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495"
|
||||||
@@ -3489,7 +3743,7 @@ fast-glob@^3.2.11:
|
|||||||
merge2 "^1.3.0"
|
merge2 "^1.3.0"
|
||||||
micromatch "^4.0.4"
|
micromatch "^4.0.4"
|
||||||
|
|
||||||
fast-glob@^3.3.2:
|
fast-glob@^3.2.9, fast-glob@^3.3.2:
|
||||||
version "3.3.3"
|
version "3.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818"
|
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.3.tgz#d06d585ce8dba90a16b0505c543c3ccfb3aeb818"
|
||||||
integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==
|
integrity sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==
|
||||||
@@ -3659,7 +3913,7 @@ fs.realpath@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||||
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
|
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
|
||||||
|
|
||||||
fsevents@^2.3.2:
|
fsevents@^2.3.2, fsevents@~2.3.3:
|
||||||
version "2.3.3"
|
version "2.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
|
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
|
||||||
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
|
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
|
||||||
@@ -3734,6 +3988,13 @@ get-symbol-description@^1.0.2:
|
|||||||
es-errors "^1.3.0"
|
es-errors "^1.3.0"
|
||||||
get-intrinsic "^1.2.4"
|
get-intrinsic "^1.2.4"
|
||||||
|
|
||||||
|
get-tsconfig@^4.7.5:
|
||||||
|
version "4.10.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.10.1.tgz#d34c1c01f47d65a606c37aa7a177bc3e56ab4b2e"
|
||||||
|
integrity sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==
|
||||||
|
dependencies:
|
||||||
|
resolve-pkg-maps "^1.0.0"
|
||||||
|
|
||||||
get-uri@^6.0.1:
|
get-uri@^6.0.1:
|
||||||
version "6.0.3"
|
version "6.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-6.0.3.tgz#0d26697bc13cf91092e519aa63aa60ee5b6f385a"
|
resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-6.0.3.tgz#0d26697bc13cf91092e519aa63aa60ee5b6f385a"
|
||||||
@@ -3876,6 +4137,18 @@ globby@13.1.4:
|
|||||||
merge2 "^1.4.1"
|
merge2 "^1.4.1"
|
||||||
slash "^4.0.0"
|
slash "^4.0.0"
|
||||||
|
|
||||||
|
globby@^11.1.0:
|
||||||
|
version "11.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"
|
||||||
|
integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==
|
||||||
|
dependencies:
|
||||||
|
array-union "^2.1.0"
|
||||||
|
dir-glob "^3.0.1"
|
||||||
|
fast-glob "^3.2.9"
|
||||||
|
ignore "^5.2.0"
|
||||||
|
merge2 "^1.4.1"
|
||||||
|
slash "^3.0.0"
|
||||||
|
|
||||||
gopd@^1.0.1:
|
gopd@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c"
|
resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c"
|
||||||
@@ -3905,7 +4178,7 @@ graceful-fs@4.2.10:
|
|||||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c"
|
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c"
|
||||||
integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==
|
integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==
|
||||||
|
|
||||||
graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.6, graceful-fs@^4.2.9:
|
graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.6, graceful-fs@^4.2.9:
|
||||||
version "4.2.11"
|
version "4.2.11"
|
||||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
|
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
|
||||||
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
|
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
|
||||||
@@ -4066,7 +4339,7 @@ ieee754@^1.1.13, ieee754@^1.2.1:
|
|||||||
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
|
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
|
||||||
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
|
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
|
||||||
|
|
||||||
ignore@^5.2.0:
|
ignore@^5.2.0, ignore@^5.3.1:
|
||||||
version "5.3.2"
|
version "5.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"
|
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"
|
||||||
integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==
|
integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==
|
||||||
@@ -4644,15 +4917,15 @@ jest-config@^29.7.0:
|
|||||||
slash "^3.0.0"
|
slash "^3.0.0"
|
||||||
strip-json-comments "^3.1.1"
|
strip-json-comments "^3.1.1"
|
||||||
|
|
||||||
jest-diff@^27.5.1:
|
jest-diff@30.0.2:
|
||||||
version "27.5.1"
|
version "30.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.5.1.tgz#a07f5011ac9e6643cf8a95a462b7b1ecf6680def"
|
resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-30.0.2.tgz#db77e7ca48a964337c0a4259d5e389c0bb124d7e"
|
||||||
integrity sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==
|
integrity sha512-2UjrNvDJDn/oHFpPrUTVmvYYDNeNtw2DlY3er8bI6vJJb9Fb35ycp/jFLd5RdV59tJ8ekVXX3o/nwPcscgXZJQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
chalk "^4.0.0"
|
"@jest/diff-sequences" "30.0.1"
|
||||||
diff-sequences "^27.5.1"
|
"@jest/get-type" "30.0.1"
|
||||||
jest-get-type "^27.5.1"
|
chalk "^4.1.2"
|
||||||
pretty-format "^27.5.1"
|
pretty-format "30.0.2"
|
||||||
|
|
||||||
jest-diff@^29.7.0:
|
jest-diff@^29.7.0:
|
||||||
version "29.7.0"
|
version "29.7.0"
|
||||||
@@ -4694,11 +4967,6 @@ jest-environment-node@^29.7.0:
|
|||||||
jest-mock "^29.7.0"
|
jest-mock "^29.7.0"
|
||||||
jest-util "^29.7.0"
|
jest-util "^29.7.0"
|
||||||
|
|
||||||
jest-get-type@^27.5.1:
|
|
||||||
version "27.5.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1"
|
|
||||||
integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==
|
|
||||||
|
|
||||||
jest-get-type@^29.6.3:
|
jest-get-type@^29.6.3:
|
||||||
version "29.6.3"
|
version "29.6.3"
|
||||||
resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1"
|
resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1"
|
||||||
@@ -4731,15 +4999,15 @@ jest-leak-detector@^29.7.0:
|
|||||||
jest-get-type "^29.6.3"
|
jest-get-type "^29.6.3"
|
||||||
pretty-format "^29.7.0"
|
pretty-format "^29.7.0"
|
||||||
|
|
||||||
jest-matcher-utils@^27.0.0:
|
jest-matcher-utils@30.0.2:
|
||||||
version "27.5.1"
|
version "30.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab"
|
resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-30.0.2.tgz#2dbb5f9aacfdd9c013fa72ed6132ca4e1b41f8db"
|
||||||
integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==
|
integrity sha512-1FKwgJYECR8IT93KMKmjKHSLyru0DqguThov/aWpFccC0wbiXGOxYEu7SScderBD7ruDOpl7lc5NG6w3oxKfaA==
|
||||||
dependencies:
|
dependencies:
|
||||||
chalk "^4.0.0"
|
"@jest/get-type" "30.0.1"
|
||||||
jest-diff "^27.5.1"
|
chalk "^4.1.2"
|
||||||
jest-get-type "^27.5.1"
|
jest-diff "30.0.2"
|
||||||
pretty-format "^27.5.1"
|
pretty-format "30.0.2"
|
||||||
|
|
||||||
jest-matcher-utils@^29.7.0:
|
jest-matcher-utils@^29.7.0:
|
||||||
version "29.7.0"
|
version "29.7.0"
|
||||||
@@ -4751,6 +5019,21 @@ jest-matcher-utils@^29.7.0:
|
|||||||
jest-get-type "^29.6.3"
|
jest-get-type "^29.6.3"
|
||||||
pretty-format "^29.7.0"
|
pretty-format "^29.7.0"
|
||||||
|
|
||||||
|
jest-message-util@30.0.2:
|
||||||
|
version "30.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-30.0.2.tgz#9dfdc37570d172f0ffdc42a0318036ff4008837f"
|
||||||
|
integrity sha512-vXywcxmr0SsKXF/bAD7t7nMamRvPuJkras00gqYeB1V0WllxZrbZ0paRr3XqpFU2sYYjD0qAaG2fRyn/CGZ0aw==
|
||||||
|
dependencies:
|
||||||
|
"@babel/code-frame" "^7.27.1"
|
||||||
|
"@jest/types" "30.0.1"
|
||||||
|
"@types/stack-utils" "^2.0.3"
|
||||||
|
chalk "^4.1.2"
|
||||||
|
graceful-fs "^4.2.11"
|
||||||
|
micromatch "^4.0.8"
|
||||||
|
pretty-format "30.0.2"
|
||||||
|
slash "^3.0.0"
|
||||||
|
stack-utils "^2.0.6"
|
||||||
|
|
||||||
jest-message-util@^29.7.0:
|
jest-message-util@^29.7.0:
|
||||||
version "29.7.0"
|
version "29.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3"
|
resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3"
|
||||||
@@ -4766,6 +5049,15 @@ jest-message-util@^29.7.0:
|
|||||||
slash "^3.0.0"
|
slash "^3.0.0"
|
||||||
stack-utils "^2.0.3"
|
stack-utils "^2.0.3"
|
||||||
|
|
||||||
|
jest-mock@30.0.2:
|
||||||
|
version "30.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-30.0.2.tgz#5e4245f25f6f9532714906cab10a2b9e39eb2183"
|
||||||
|
integrity sha512-PnZOHmqup/9cT/y+pXIVbbi8ID6U1XHRmbvR7MvUy4SLqhCbwpkmXhLbsWbGewHrV5x/1bF7YDjs+x24/QSvFA==
|
||||||
|
dependencies:
|
||||||
|
"@jest/types" "30.0.1"
|
||||||
|
"@types/node" "*"
|
||||||
|
jest-util "30.0.2"
|
||||||
|
|
||||||
jest-mock@^29.7.0:
|
jest-mock@^29.7.0:
|
||||||
version "29.7.0"
|
version "29.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347"
|
resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347"
|
||||||
@@ -4780,6 +5072,11 @@ jest-pnp-resolver@^1.2.2:
|
|||||||
resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e"
|
resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e"
|
||||||
integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==
|
integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==
|
||||||
|
|
||||||
|
jest-regex-util@30.0.1:
|
||||||
|
version "30.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-30.0.1.tgz#f17c1de3958b67dfe485354f5a10093298f2a49b"
|
||||||
|
integrity sha512-jHEQgBXAgc+Gh4g0p3bCevgRCVRkB4VB70zhoAE48gxeSr1hfUOsM/C2WoJgVL7Eyg//hudYENbm3Ne+/dRVVA==
|
||||||
|
|
||||||
jest-regex-util@^29.6.3:
|
jest-regex-util@^29.6.3:
|
||||||
version "29.6.3"
|
version "29.6.3"
|
||||||
resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52"
|
resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52"
|
||||||
@@ -4889,6 +5186,18 @@ jest-snapshot@^29.7.0:
|
|||||||
pretty-format "^29.7.0"
|
pretty-format "^29.7.0"
|
||||||
semver "^7.5.3"
|
semver "^7.5.3"
|
||||||
|
|
||||||
|
jest-util@30.0.2:
|
||||||
|
version "30.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-30.0.2.tgz#1bd8411f81e6f5e2ca8b31bb2534ebcd7cbac065"
|
||||||
|
integrity sha512-8IyqfKS4MqprBuUpZNlFB5l+WFehc8bfCe1HSZFHzft2mOuND8Cvi9r1musli+u6F3TqanCZ/Ik4H4pXUolZIg==
|
||||||
|
dependencies:
|
||||||
|
"@jest/types" "30.0.1"
|
||||||
|
"@types/node" "*"
|
||||||
|
chalk "^4.1.2"
|
||||||
|
ci-info "^4.2.0"
|
||||||
|
graceful-fs "^4.2.11"
|
||||||
|
picomatch "^4.0.2"
|
||||||
|
|
||||||
jest-util@^29.0.0, jest-util@^29.7.0:
|
jest-util@^29.0.0, jest-util@^29.7.0:
|
||||||
version "29.7.0"
|
version "29.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc"
|
resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc"
|
||||||
@@ -5329,7 +5638,7 @@ make-dir@^4.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
semver "^7.5.3"
|
semver "^7.5.3"
|
||||||
|
|
||||||
make-error@^1.1.1, make-error@^1.3.6:
|
make-error@^1.3.6:
|
||||||
version "1.3.6"
|
version "1.3.6"
|
||||||
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
|
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
|
||||||
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
|
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
|
||||||
@@ -6004,6 +6313,11 @@ picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1:
|
|||||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
|
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
|
||||||
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
|
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
|
||||||
|
|
||||||
|
picomatch@^4.0.2:
|
||||||
|
version "4.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.2.tgz#77c742931e8f3b8820946c76cd0c1f13730d1dab"
|
||||||
|
integrity sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==
|
||||||
|
|
||||||
pify@^2.3.0:
|
pify@^2.3.0:
|
||||||
version "2.3.0"
|
version "2.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
|
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
|
||||||
@@ -6099,14 +6413,14 @@ prettier@^3.5.3:
|
|||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.5.3.tgz#4fc2ce0d657e7a02e602549f053b239cb7dfe1b5"
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.5.3.tgz#4fc2ce0d657e7a02e602549f053b239cb7dfe1b5"
|
||||||
integrity sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==
|
integrity sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==
|
||||||
|
|
||||||
pretty-format@^27.0.0, pretty-format@^27.5.1:
|
pretty-format@30.0.2, pretty-format@^30.0.0:
|
||||||
version "27.5.1"
|
version "30.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e"
|
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-30.0.2.tgz#54717b6aa2b4357a2e6d83868e10a2ea8dd647c7"
|
||||||
integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==
|
integrity sha512-yC5/EBSOrTtqhCKfLHqoUIAXVRZnukHPwWBJWR7h84Q3Be1DRQZLncwcfLoPA5RPQ65qfiCMqgYwdUuQ//eVpg==
|
||||||
dependencies:
|
dependencies:
|
||||||
ansi-regex "^5.0.1"
|
"@jest/schemas" "30.0.1"
|
||||||
ansi-styles "^5.0.0"
|
ansi-styles "^5.2.0"
|
||||||
react-is "^17.0.1"
|
react-is "^18.3.1"
|
||||||
|
|
||||||
pretty-format@^29.7.0:
|
pretty-format@^29.7.0:
|
||||||
version "29.7.0"
|
version "29.7.0"
|
||||||
@@ -6296,12 +6610,7 @@ rc@1.2.8:
|
|||||||
minimist "^1.2.0"
|
minimist "^1.2.0"
|
||||||
strip-json-comments "~2.0.1"
|
strip-json-comments "~2.0.1"
|
||||||
|
|
||||||
react-is@^17.0.1:
|
react-is@^18.0.0, react-is@^18.3.1:
|
||||||
version "17.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
|
|
||||||
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
|
|
||||||
|
|
||||||
react-is@^18.0.0:
|
|
||||||
version "18.3.1"
|
version "18.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e"
|
resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e"
|
||||||
integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==
|
integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==
|
||||||
@@ -6482,6 +6791,11 @@ resolve-from@^5.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
|
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
|
||||||
integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
|
integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
|
||||||
|
|
||||||
|
resolve-pkg-maps@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f"
|
||||||
|
integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==
|
||||||
|
|
||||||
resolve.exports@^2.0.0:
|
resolve.exports@^2.0.0:
|
||||||
version "2.0.3"
|
version "2.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.3.tgz#41955e6f1b4013b7586f873749a635dea07ebe3f"
|
resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.3.tgz#41955e6f1b4013b7586f873749a635dea07ebe3f"
|
||||||
@@ -6853,7 +7167,7 @@ sprintf-js@~1.0.2:
|
|||||||
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
||||||
integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==
|
integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==
|
||||||
|
|
||||||
stack-utils@^2.0.3:
|
stack-utils@^2.0.3, stack-utils@^2.0.6:
|
||||||
version "2.0.6"
|
version "2.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f"
|
resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f"
|
||||||
integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==
|
integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==
|
||||||
@@ -7150,6 +7464,11 @@ trim-newlines@^3.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144"
|
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144"
|
||||||
integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==
|
integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==
|
||||||
|
|
||||||
|
ts-api-utils@^1.3.0:
|
||||||
|
version "1.4.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.3.tgz#bfc2215fe6528fecab2b0fba570a2e8a4263b064"
|
||||||
|
integrity sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==
|
||||||
|
|
||||||
ts-api-utils@^2.1.0:
|
ts-api-utils@^2.1.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.1.0.tgz#595f7094e46eed364c13fd23e75f9513d29baf91"
|
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.1.0.tgz#595f7094e46eed364c13fd23e75f9513d29baf91"
|
||||||
@@ -7171,30 +7490,28 @@ ts-jest@^29.3.2:
|
|||||||
type-fest "^4.41.0"
|
type-fest "^4.41.0"
|
||||||
yargs-parser "^21.1.1"
|
yargs-parser "^21.1.1"
|
||||||
|
|
||||||
ts-node@^10.8.1:
|
|
||||||
version "10.9.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f"
|
|
||||||
integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==
|
|
||||||
dependencies:
|
|
||||||
"@cspotcode/source-map-support" "^0.8.0"
|
|
||||||
"@tsconfig/node10" "^1.0.7"
|
|
||||||
"@tsconfig/node12" "^1.0.7"
|
|
||||||
"@tsconfig/node14" "^1.0.0"
|
|
||||||
"@tsconfig/node16" "^1.0.2"
|
|
||||||
acorn "^8.4.1"
|
|
||||||
acorn-walk "^8.1.1"
|
|
||||||
arg "^4.1.0"
|
|
||||||
create-require "^1.1.0"
|
|
||||||
diff "^4.0.1"
|
|
||||||
make-error "^1.1.1"
|
|
||||||
v8-compile-cache-lib "^3.0.1"
|
|
||||||
yn "3.1.1"
|
|
||||||
|
|
||||||
tslib@^2.0.1, tslib@^2.1.0, tslib@^2.4.0:
|
tslib@^2.0.1, tslib@^2.1.0, tslib@^2.4.0:
|
||||||
version "2.7.0"
|
version "2.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01"
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01"
|
||||||
integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==
|
integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==
|
||||||
|
|
||||||
|
tsx@^4.20.3:
|
||||||
|
version "4.20.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/tsx/-/tsx-4.20.3.tgz#f913e4911d59ad177c1bcee19d1035ef8dd6e2fb"
|
||||||
|
integrity sha512-qjbnuR9Tr+FJOMBqJCW5ehvIo/buZq7vH7qD7JziU98h6l3qGy0a/yPFjwO+y0/T7GFpNgNAvEcPPVfyT8rrPQ==
|
||||||
|
dependencies:
|
||||||
|
esbuild "~0.25.0"
|
||||||
|
get-tsconfig "^4.7.5"
|
||||||
|
optionalDependencies:
|
||||||
|
fsevents "~2.3.3"
|
||||||
|
|
||||||
|
tunnel-agent@^0.6.0:
|
||||||
|
version "0.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
|
||||||
|
integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==
|
||||||
|
dependencies:
|
||||||
|
safe-buffer "^5.0.1"
|
||||||
|
|
||||||
type-check@^0.4.0, type-check@~0.4.0:
|
type-check@^0.4.0, type-check@~0.4.0:
|
||||||
version "0.4.0"
|
version "0.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"
|
resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"
|
||||||
@@ -7443,11 +7760,6 @@ uuid@^3.3.2:
|
|||||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
|
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
|
||||||
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
|
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
|
||||||
|
|
||||||
v8-compile-cache-lib@^3.0.1:
|
|
||||||
version "3.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf"
|
|
||||||
integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==
|
|
||||||
|
|
||||||
v8-to-istanbul@^9.0.1:
|
v8-to-istanbul@^9.0.1:
|
||||||
version "9.3.0"
|
version "9.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175"
|
resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz#b9572abfa62bd556c16d75fdebc1a411d5ff3175"
|
||||||
@@ -7707,11 +8019,6 @@ yargs@^17.3.1:
|
|||||||
y18n "^5.0.5"
|
y18n "^5.0.5"
|
||||||
yargs-parser "^21.1.1"
|
yargs-parser "^21.1.1"
|
||||||
|
|
||||||
yn@3.1.1:
|
|
||||||
version "3.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
|
|
||||||
integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==
|
|
||||||
|
|
||||||
yocto-queue@^0.1.0:
|
yocto-queue@^0.1.0:
|
||||||
version "0.1.0"
|
version "0.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
|
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
|
||||||
|
|||||||
Reference in New Issue
Block a user