diff --git a/whatsapp_addon/.devcontainer/devcontainer.json b/whatsapp_addon/.devcontainer/devcontainer.json
index 6c4d5970..787a1f53 100644
--- a/whatsapp_addon/.devcontainer/devcontainer.json
+++ b/whatsapp_addon/.devcontainer/devcontainer.json
@@ -1,6 +1,6 @@
{
"name": "Example devcontainer for add-on repositories",
- "image": "ghcr.io/home-assistant/devcontainer:addons",
+ "image": "ghcr.io/home-assistant/devcontainer:2-addons",
"appPort": ["7123:8123", "7357:4357"],
"postStartCommand": "bash devcontainer_bootstrap",
"runArgs": ["-e", "GIT_EDITOR=code --wait", "--privileged"],
@@ -24,5 +24,8 @@
}
}
},
- "mounts": ["type=volume,target=/var/lib/docker"]
+ "mounts": [
+ "type=volume,target=/var/lib/docker",
+ "type=volume,target=/mnt/supervisor"
+ ]
}
diff --git a/whatsapp_addon/Baileys/.eslintignore b/whatsapp_addon/Baileys/.eslintignore
index d41f50d8..ffb396b6 100644
--- a/whatsapp_addon/Baileys/.eslintignore
+++ b/whatsapp_addon/Baileys/.eslintignore
@@ -6,5 +6,5 @@ coverage
src/WABinary/index.ts
WAProto
WASignalGroup
-Example/test.ts
+Example/Example.ts
docs
diff --git a/whatsapp_addon/Baileys/.eslintrc.json b/whatsapp_addon/Baileys/.eslintrc.json
index 6707cee8..94651b5f 100644
--- a/whatsapp_addon/Baileys/.eslintrc.json
+++ b/whatsapp_addon/Baileys/.eslintrc.json
@@ -1,5 +1,5 @@
{
- "extends": "@adiwajshing",
+ "extends": "@whiskeysockets",
"parserOptions": {
"sourceType": "module",
"project": "./tsconfig.json"
@@ -21,15 +21,9 @@
"@typescript-eslint/no-unnecessary-type-assertion": [
"warn"
],
- "no-restricted-syntax": [
- "warn",
- {
- "selector": "TSEnumDeclaration",
- "message": "Don't declare enums, use literals instead"
- }
- ],
+ "no-restricted-syntax": "off",
"keyword-spacing": [
"warn"
]
}
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/.gitignore b/whatsapp_addon/Baileys/.gitignore
index 542c9c79..e735d1e3 100644
--- a/whatsapp_addon/Baileys/.gitignore
+++ b/whatsapp_addon/Baileys/.gitignore
@@ -17,4 +17,4 @@ output.csv
Proxy
test.ts
TestData
-wa-logs.txt
+wa-logs.txt
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/.npmignore b/whatsapp_addon/Baileys/.npmignore
index 8b137891..e69de29b 100644
--- a/whatsapp_addon/Baileys/.npmignore
+++ b/whatsapp_addon/Baileys/.npmignore
@@ -1 +0,0 @@
-
diff --git a/whatsapp_addon/Baileys/.prettierignore b/whatsapp_addon/Baileys/.prettierignore
index 72e8ffc0..f59ec20a 100644
--- a/whatsapp_addon/Baileys/.prettierignore
+++ b/whatsapp_addon/Baileys/.prettierignore
@@ -1 +1 @@
-*
+*
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/CHANGELOG.md b/whatsapp_addon/Baileys/CHANGELOG.md
index 8da8cd22..8b0d9ca7 100644
--- a/whatsapp_addon/Baileys/CHANGELOG.md
+++ b/whatsapp_addon/Baileys/CHANGELOG.md
@@ -1,3 +1,4 @@
-## 6.7.7 (2024-08-22)
+## 6.7.12 (2025-01-31)
+
diff --git a/whatsapp_addon/Baileys/Example/boot_analytics_test.json b/whatsapp_addon/Baileys/Example/boot_analytics_test.json
index dc79b26a..98ff220a 100644
--- a/whatsapp_addon/Baileys/Example/boot_analytics_test.json
+++ b/whatsapp_addon/Baileys/Example/boot_analytics_test.json
@@ -921,4 +921,4 @@
}
}
]
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/Example/example.ts b/whatsapp_addon/Baileys/Example/example.ts
index e80cd552..63fae254 100644
--- a/whatsapp_addon/Baileys/Example/example.ts
+++ b/whatsapp_addon/Baileys/Example/example.ts
@@ -1,7 +1,7 @@
import { Boom } from '@hapi/boom'
import NodeCache from 'node-cache'
import readline from 'readline'
-import makeWASocket, { AnyMessageContent, BinaryInfo, delay, DisconnectReason, downloadAndProcessHistorySyncNotification, encodeWAM, fetchLatestBaileysVersion, getAggregateVotesInPollMessage, getHistoryMsg, isJidNewsletter, makeCacheableSignalKeyStore, makeInMemoryStore, PHONENUMBER_MCC, proto, useMultiFileAuthState, WAMessageContent, WAMessageKey } from '../src'
+import makeWASocket, { AnyMessageContent, BinaryInfo, delay, DisconnectReason, downloadAndProcessHistorySyncNotification, encodeWAM, fetchLatestBaileysVersion, getAggregateVotesInPollMessage, getHistoryMsg, isJidNewsletter, makeCacheableSignalKeyStore, makeInMemoryStore, proto, useMultiFileAuthState, WAMessageContent, WAMessageKey } from '../src'
//import MAIN_LOGGER from '../src/Utils/logger'
import open from 'open'
import fs from 'fs'
@@ -13,7 +13,6 @@ logger.level = 'trace'
const useStore = !process.argv.includes('--no-store')
const doReplies = process.argv.includes('--do-reply')
const usePairingCode = process.argv.includes('--use-pairing-code')
-const useMobile = process.argv.includes('--mobile')
// external map to store retry counts of messages when decryption/encryption fails
// keep this out of the socket itself, so as to prevent a message decryption/encryption loop across socket restarts
@@ -45,7 +44,6 @@ const startSock = async() => {
version,
logger,
printQRInTerminal: !usePairingCode,
- mobile: useMobile,
auth: {
creds: state.creds,
/** caching makes the store faster to send/recv messages */
@@ -63,93 +61,13 @@ const startSock = async() => {
store?.bind(sock.ev)
// Pairing code for Web clients
- if(usePairingCode && !sock.authState.creds.registered) {
- if(useMobile) {
- throw new Error('Cannot use pairing code with mobile api')
- }
-
- const phoneNumber = await question('Please enter your mobile phone number:\n')
+ if (usePairingCode && !sock.authState.creds.registered) {
+ // todo move to QR event
+ const phoneNumber = await question('Please enter your phone number:\n')
const code = await sock.requestPairingCode(phoneNumber)
console.log(`Pairing code: ${code}`)
}
- // If mobile was chosen, ask for the code
- if(useMobile && !sock.authState.creds.registered) {
- const { registration } = sock.authState.creds || { registration: {} }
-
- if(!registration.phoneNumber) {
- registration.phoneNumber = await question('Please enter your mobile phone number:\n')
- }
-
- const libPhonenumber = await import("libphonenumber-js")
- const phoneNumber = libPhonenumber.parsePhoneNumber(registration!.phoneNumber)
- if(!phoneNumber?.isValid()) {
- throw new Error('Invalid phone number: ' + registration!.phoneNumber)
- }
-
- registration.phoneNumber = phoneNumber.format('E.164')
- registration.phoneNumberCountryCode = phoneNumber.countryCallingCode
- registration.phoneNumberNationalNumber = phoneNumber.nationalNumber
- const mcc = PHONENUMBER_MCC[phoneNumber.countryCallingCode]
- if(!mcc) {
- throw new Error('Could not find MCC for phone number: ' + registration!.phoneNumber + '\nPlease specify the MCC manually.')
- }
-
- registration.phoneNumberMobileCountryCode = mcc
-
- async function enterCode() {
- try {
- const code = await question('Please enter the one time code:\n')
- const response = await sock.register(code.replace(/["']/g, '').trim().toLowerCase())
- console.log('Successfully registered your phone number.')
- console.log(response)
- rl.close()
- } catch(error) {
- console.error('Failed to register your phone number. Please try again.\n', error)
- await askForOTP()
- }
- }
-
- async function enterCaptcha() {
- const response = await sock.requestRegistrationCode({ ...registration, method: 'captcha' })
- const path = __dirname + '/captcha.png'
- fs.writeFileSync(path, Buffer.from(response.image_blob!, 'base64'))
-
- open(path)
- const code = await question('Please enter the captcha code:\n')
- fs.unlinkSync(path)
- registration.captcha = code.replace(/["']/g, '').trim().toLowerCase()
- }
-
- async function askForOTP() {
- if (!registration.method) {
- await delay(2000)
- let code = await question('How would you like to receive the one time code for registration? "sms" or "voice"\n')
- code = code.replace(/["']/g, '').trim().toLowerCase()
- if(code !== 'sms' && code !== 'voice') {
- return await askForOTP()
- }
-
- registration.method = code
- }
-
- try {
- await sock.requestRegistrationCode(registration)
- await enterCode()
- } catch(error) {
- console.error('Failed to request registration code. Please try again.\n', error)
-
- if(error?.reason === 'code_checkpoint') {
- await enterCaptcha()
- }
-
- await askForOTP()
- }
- }
-
- askForOTP()
- }
-
const sendMessageWTyping = async(msg: AnyMessageContent, jid: string) => {
await sock.presenceSubscribe(jid)
await delay(500)
@@ -384,4 +302,4 @@ const startSock = async() => {
}
}
-startSock()
+startSock()
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/Media/.gitignore b/whatsapp_addon/Baileys/Media/.gitignore
index 2c1a4fdf..77d2a2d5 100644
--- a/whatsapp_addon/Baileys/Media/.gitignore
+++ b/whatsapp_addon/Baileys/Media/.gitignore
@@ -1,2 +1,2 @@
received_*
-media_*
+media_*
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/Media/cat.jpeg b/whatsapp_addon/Baileys/Media/cat.jpeg
index 0c39684c..5063d099 100644
Binary files a/whatsapp_addon/Baileys/Media/cat.jpeg and b/whatsapp_addon/Baileys/Media/cat.jpeg differ
diff --git a/whatsapp_addon/Baileys/Media/icon.png b/whatsapp_addon/Baileys/Media/icon.png
index 4747407d..e54d8fb0 100644
Binary files a/whatsapp_addon/Baileys/Media/icon.png and b/whatsapp_addon/Baileys/Media/icon.png differ
diff --git a/whatsapp_addon/Baileys/Media/ma_gif.mp4 b/whatsapp_addon/Baileys/Media/ma_gif.mp4
index e4f47645..d48b0fe3 100644
Binary files a/whatsapp_addon/Baileys/Media/ma_gif.mp4 and b/whatsapp_addon/Baileys/Media/ma_gif.mp4 differ
diff --git a/whatsapp_addon/Baileys/Media/meme.jpeg b/whatsapp_addon/Baileys/Media/meme.jpeg
index affeaa01..e09535bc 100644
Binary files a/whatsapp_addon/Baileys/Media/meme.jpeg and b/whatsapp_addon/Baileys/Media/meme.jpeg differ
diff --git a/whatsapp_addon/Baileys/Media/octopus.webp b/whatsapp_addon/Baileys/Media/octopus.webp
index e6f7d9ba..ddb9ac0a 100644
Binary files a/whatsapp_addon/Baileys/Media/octopus.webp and b/whatsapp_addon/Baileys/Media/octopus.webp differ
diff --git a/whatsapp_addon/Baileys/Media/sonata.mp3 b/whatsapp_addon/Baileys/Media/sonata.mp3
index 121badc6..4bb36616 100644
Binary files a/whatsapp_addon/Baileys/Media/sonata.mp3 and b/whatsapp_addon/Baileys/Media/sonata.mp3 differ
diff --git a/whatsapp_addon/Baileys/README.md b/whatsapp_addon/Baileys/README.md
index 8fa7739f..4a7dc75f 100644
--- a/whatsapp_addon/Baileys/README.md
+++ b/whatsapp_addon/Baileys/README.md
@@ -1,4 +1,16 @@
-# Baileys - Typescript/Javascript WhatsApp Web API
+#
Baileys - Typescript/Javascript WhatsApp Web API
+
+
+
+
+
+
+
+
+
+
+
+
### Important Note
@@ -9,16 +21,15 @@ Baileys and its maintainers cannot be held liable for misuse of this application
The maintainers of Baileys do not in any way condone the use of this application in practices that violate the Terms of Service of WhatsApp. The maintainers of this application call upon the personal responsibility of its users to use this application in a fair way, as it is intended to be used.
##
-Baileys does not require Selenium or any other browser to be interface with WhatsApp Web, it does so directly using a **WebSocket**.
-Not running Selenium or Chromimum saves you like **half a gig** of ram :/
-Baileys supports interacting with the multi-device & web versions of WhatsApp.
-Thank you to [@pokearaujo](https://github.com/pokearaujo/multidevice) for writing his observations on the workings of WhatsApp Multi-Device. Also, thank you to [@Sigalor](https://github.com/sigalor/whatsapp-web-reveng) for writing his observations on the workings of WhatsApp Web and thanks to [@Rhymen](https://github.com/Rhymen/go-whatsapp/) for the __go__ implementation.
-
-## Please Read
+- Baileys does not require Selenium or any other browser to be interface with WhatsApp Web, it does so directly using a **WebSocket**.
+- Not running Selenium or Chromimum saves you like **half a gig** of ram :/
+- Baileys supports interacting with the multi-device & web versions of WhatsApp.
+- Thank you to [@pokearaujo](https://github.com/pokearaujo/multidevice) for writing his observations on the workings of WhatsApp Multi-Device. Also, thank you to [@Sigalor](https://github.com/sigalor/whatsapp-web-reveng) for writing his observations on the workings of WhatsApp Web and thanks to [@Rhymen](https://github.com/Rhymen/go-whatsapp/) for the __go__ implementation.
-The original repository had to be removed by the original author - we now continue development in this repository here.
+> [!IMPORTANT]
+> The original repository had to be removed by the original author - we now continue development in this repository here.
This is the only official repository and is maintained by the community.
- **Join the Discord [here](https://discord.gg/WeJM5FP9GG)**
+> **Join the Discord [here](https://discord.gg/WeJM5FP9GG)**
## Example
@@ -33,7 +44,7 @@ To run the example script, download or clone the repo and then type the followin
Use the stable version:
```
-yarn add @whiskeysockets/baileys
+yarn add baileys
```
Use the edge version (no guarantee of stability, but latest fixes + features)
@@ -41,274 +52,353 @@ Use the edge version (no guarantee of stability, but latest fixes + features)
yarn add github:WhiskeySockets/Baileys
```
-Then import your code using:
-``` ts
-import makeWASocket from '@whiskeysockets/baileys'
+Then import the default function in your code:
+```ts
+import makeWASocket from 'baileys'
```
-## Unit Tests
+# Links
+
+- [Discord](https://discord.gg/WeJM5FP9GG)
+- [Docs](https://guide.whiskeysockets.io/)
+
+# Index
+
+- [Connecting Account](#connecting-account)
+ - [Connect with QR-CODE](#starting-socket-with-qr-code)
+ - [Connect with Pairing Code](#starting-socket-with-pairing-code)
+ - [Receive Full History](#receive-full-history)
+- [Important Notes About Socket Config](#important-notes-about-socket-config)
+ - [Caching Group Metadata (Recommended)](#caching-group-metadata-recommended)
+ - [Improve Retry System & Decrypt Poll Votes](#improve-retry-system--decrypt-poll-votes)
+ - [Receive Notifications in Whatsapp App](#receive-notifications-in-whatsapp-app)
+
+- [Save Auth Info](#saving--restoring-sessions)
+- [Handling Events](#handling-events)
+ - [Example to Start](#example-to-start)
+ - [Decrypt Poll Votes](#decrypt-poll-votes)
+ - [Summary of Events on First Connection](#summary-of-events-on-first-connection)
+- [Implementing a Data Store](#implementing-a-data-store)
+- [Whatsapp IDs Explain](#whatsapp-ids-explain)
+- [Utility Functions](#utility-functions)
+- [Sending Messages](#sending-messages)
+ - [Non-Media Messages](#non-media-messages)
+ - [Text Message](#text-message)
+ - [Quote Message](#quote-message-works-with-all-types)
+ - [Mention User](#mention-user-works-with-most-types)
+ - [Forward Messages](#forward-messages)
+ - [Location Message](#location-message)
+ - [Contact Message](#contact-message)
+ - [Reaction Message](#reaction-message)
+ - [Pin Message](#pin-message)
+ - [Poll Message](#poll-message)
+ - [Sending with Link Preview](#sending-messages-with-link-previews)
+ - [Media Messages](#media-messages)
+ - [Gif Message](#gif-message)
+ - [Video Message](#video-message)
+ - [Audio Message](#audio-message)
+ - [Image Message](#image-message)
+ - [ViewOnce Message](#view-once-message)
+- [Modify Messages](#modify-messages)
+ - [Delete Messages (for everyone)](#deleting-messages-for-everyone)
+ - [Edit Messages](#editing-messages)
+- [Manipulating Media Messages](#manipulating-media-messages)
+ - [Thumbnail in Media Messages](#thumbnail-in-media-messages)
+ - [Downloading Media Messages](#downloading-media-messages)
+ - [Re-upload Media Message to Whatsapp](#re-upload-media-message-to-whatsapp)
+- [Reject Call](#reject-call)
+- [Send States in Chat](#send-states-in-chat)
+ - [Reading Messages](#reading-messages)
+ - [Update Presence](#update-presence)
+- [Modifying Chats](#modifying-chats)
+ - [Archive a Chat](#archive-a-chat)
+ - [Mute/Unmute a Chat](#muteunmute-a-chat)
+ - [Mark a Chat Read/Unread](#mark-a-chat-readunread)
+ - [Delete a Message for Me](#delete-a-message-for-me)
+ - [Delete a Chat](#delete-a-chat)
+ - [Star/Unstar a Message](#starunstar-a-message)
+ - [Disappearing Messages](#disappearing-messages)
+- [User Querys](#user-querys)
+ - [Check If ID Exists in Whatsapp](#check-if-id-exists-in-whatsapp)
+ - [Query Chat History (groups too)](#query-chat-history-groups-too)
+ - [Fetch Status](#fetch-status)
+ - [Fetch Profile Picture (groups too)](#fetch-profile-picture-groups-too)
+ - [Fetch Bussines Profile (such as description or category)](#fetch-bussines-profile-such-as-description-or-category)
+ - [Fetch Someone's Presence (if they're typing or online)](#fetch-someones-presence-if-theyre-typing-or-online)
+- [Change Profile](#change-profile)
+ - [Change Profile Status](#change-profile-status)
+ - [Change Profile Name](#change-profile-name)
+ - [Change Display Picture (groups too)](#change-display-picture-groups-too)
+ - [Remove display picture (groups too)](#remove-display-picture-groups-too)
+- [Groups](#groups)
+ - [Create a Group](#create-a-group)
+ - [Add/Remove or Demote/Promote](#addremove-or-demotepromote)
+ - [Change Subject (name)](#change-subject-name)
+ - [Change Description](#change-description)
+ - [Change Settings](#change-settings)
+ - [Leave a Group](#leave-a-group)
+ - [Get Invite Code](#get-invite-code)
+ - [Revoke Invite Code](#revoke-invite-code)
+ - [Join Using Invitation Code](#join-using-invitation-code)
+ - [Get Group Info by Invite Code](#get-group-info-by-invite-code)
+ - [Query Metadata (participants, name, description...)](#query-metadata-participants-name-description)
+ - [Join using groupInviteMessage](#join-using-groupinvitemessage)
+ - [Get Request Join List](#get-request-join-list)
+ - [Approve/Reject Request Join](#approvereject-request-join)
+ - [Get All Participating Groups Metadata](#get-all-participating-groups-metadata)
+ - [Toggle Ephemeral](#toggle-ephemeral)
+ - [Change Add Mode](#change-add-mode)
+- [Privacy](#privacy)
+ - [Block/Unblock User](#blockunblock-user)
+ - [Get Privacy Settings](#get-privacy-settings)
+ - [Get BlockList](#get-blocklist)
+ - [Update LastSeen Privacy](#update-lastseen-privacy)
+ - [Update Online Privacy](#update-online-privacy)
+ - [Update Profile Picture Privacy](#update-profile-picture-privacy)
+ - [Update Status Privacy](#update-status-privacy)
+ - [Update Read Receipts Privacy](#update-read-receipts-privacy)
+ - [Update Groups Add Privacy](#update-groups-add-privacy)
+ - [Update Default Disappearing Mode](#update-default-disappearing-mode)
+- [Broadcast Lists & Stories](#broadcast-lists--stories)
+ - [Send Broadcast & Stories](#send-broadcast--stories)
+ - [Query a Broadcast List's Recipients & Name](#query-a-broadcast-lists-recipients--name)
+- [Writing Custom Functionality](#writing-custom-functionality)
+ - [Enabling Debug Level in Baileys Logs](#enabling-debug-level-in-baileys-logs)
+ - [How Whatsapp Communicate With Us](#how-whatsapp-communicate-with-us)
+ - [Register a Callback for Websocket Events](#register-a-callback-for-websocket-events)
+
+## Connecting Account
+
+WhatsApp provides a multi-device API that allows Baileys to be authenticated as a second WhatsApp client by scanning a **QR code** or **Pairing Code** with WhatsApp on your phone.
+
+> [!NOTE]
+> **[Here](#example-to-start) is a simple example of event handling**
+
+> [!TIP]
+> **You can see all supported socket configs [here](https://baileys.whiskeysockets.io/types/SocketConfig.html) (Recommended)**
+
+### Starting socket with **QR-CODE**
+
+> [!TIP]
+> You can customize browser name if you connect with **QR-CODE**, with `Browser` constant, we have some browsers config, **see [here](https://baileys.whiskeysockets.io/types/BrowsersMap.html)**
-TODO
+```ts
+import makeWASocket from 'baileys'
-## Connecting multi device (recommended)
+const sock = makeWASocket({
+ // can provide additional config here
+ browser: Browsers.ubuntu('My App'),
+ printQRInTerminal: true
+})
+```
-WhatsApp provides a multi-device API that allows Baileys to be authenticated as a second WhatsApp client by scanning a QR code with WhatsApp on your phone.
+If the connection is successful, you will see a QR code printed on your terminal screen, scan it with WhatsApp on your phone and you'll be logged in!
-``` ts
-import makeWASocket, { DisconnectReason } from '@whiskeysockets/baileys'
-import { Boom } from '@hapi/boom'
+### Starting socket with **Pairing Code**
-async function connectToWhatsApp () {
- const sock = makeWASocket({
- // can provide additional config here
- printQRInTerminal: true
- })
- sock.ev.on('connection.update', (update) => {
- const { connection, lastDisconnect } = update
- if(connection === 'close') {
- const shouldReconnect = (lastDisconnect.error as Boom)?.output?.statusCode !== DisconnectReason.loggedOut
- console.log('connection closed due to ', lastDisconnect.error, ', reconnecting ', shouldReconnect)
- // reconnect if not logged out
- if(shouldReconnect) {
- connectToWhatsApp()
- }
- } else if(connection === 'open') {
- console.log('opened connection')
- }
- })
- sock.ev.on('messages.upsert', m => {
- console.log(JSON.stringify(m, undefined, 2))
- console.log('replying to', m.messages[0].key.remoteJid)
- await sock.sendMessage(m.messages[0].key.remoteJid!, { text: 'Hello there!' })
- })
-}
-// run in main file
-connectToWhatsApp()
-```
+> [!IMPORTANT]
+> Pairing Code isn't Mobile API, it's a method to connect Whatsapp Web without QR-CODE, you can connect only with one device, see [here](https://faq.whatsapp.com/1324084875126592/?cms_platform=web)
-If the connection is successful, you will see a QR code printed on your terminal screen, scan it with WhatsApp on your phone and you'll be logged in!
+The phone number can't have `+` or `()` or `-`, only numbers, you must provide country code
+
+```ts
+import makeWASocket from 'baileys'
-**Note:** install `qrcode-terminal` using `yarn add qrcode-terminal` to auto-print the QR to the terminal.
-
-**Note:** the code to support the legacy version of WA Web (pre multi-device) has been removed in v5. Only the standard multi-device connection is now supported. This is done as WA seems to have completely dropped support for the legacy version.
-
-## Connecting native mobile api
-
-Baileys also supports the native mobile API, which allows users to authenticate as a standalone WhatsApp client using their phone number.
-
-Run the [example](Example/example.ts) file with ``--mobile`` cli flag to use the native mobile API.
-
-## Configuring the Connection
-
-You can configure the connection by passing a `SocketConfig` object.
-
-The entire `SocketConfig` structure is mentioned here with default values:
-``` ts
-type SocketConfig = {
- /** the WS url to connect to WA */
- waWebSocketUrl: string | URL
- /** Fails the connection if the socket times out in this interval */
- connectTimeoutMs: number
- /** Default timeout for queries, undefined for no timeout */
- defaultQueryTimeoutMs: number | undefined
- /** ping-pong interval for WS connection */
- keepAliveIntervalMs: number
- /** proxy agent */
- agent?: Agent
- /** pino logger */
- logger: Logger
- /** version to connect with */
- version: WAVersion
- /** override browser config */
- browser: WABrowserDescription
- /** agent used for fetch requests -- uploading/downloading media */
- fetchAgent?: Agent
- /** should the QR be printed in the terminal */
- printQRInTerminal: boolean
- /** should events be emitted for actions done by this socket connection */
- emitOwnEvents: boolean
- /** provide a cache to store media, so does not have to be re-uploaded */
- mediaCache?: NodeCache
- /** custom upload hosts to upload media to */
- customUploadHosts: MediaConnInfo['hosts']
- /** time to wait between sending new retry requests */
- retryRequestDelayMs: number
- /** max msg retry count */
- maxMsgRetryCount: number
- /** time to wait for the generation of the next QR in ms */
- qrTimeout?: number;
- /** provide an auth state object to maintain the auth state */
- auth: AuthenticationState
- /** manage history processing with this control; by default will sync up everything */
- shouldSyncHistoryMessage: (msg: proto.Message.IHistorySyncNotification) => boolean
- /** transaction capability options for SignalKeyStore */
- transactionOpts: TransactionCapabilityOptions
- /** provide a cache to store a user's device list */
- userDevicesCache?: NodeCache
- /** marks the client as online whenever the socket successfully connects */
- markOnlineOnConnect: boolean
- /**
- * map to store the retry counts for failed messages;
- * used to determine whether to retry a message or not */
- msgRetryCounterMap?: MessageRetryMap
- /** width for link preview images */
- linkPreviewImageThumbnailWidth: number
- /** Should Baileys ask the phone for full history, will be received async */
- syncFullHistory: boolean
- /** Should baileys fire init queries automatically, default true */
- fireInitQueries: boolean
- /**
- * generate a high quality link preview,
- * entails uploading the jpegThumbnail to WA
- * */
- generateHighQualityLinkPreview: boolean
-
- /** options for axios */
- options: AxiosRequestConfig
- /**
- * fetch a message from your store
- * implement this so that messages failed to send (solves the "this message can take a while" issue) can be retried
- * */
- getMessage: (key: proto.IMessageKey) => Promise
+const sock = makeWASocket({
+ // can provide additional config here
+ printQRInTerminal: false //need to be false
+})
+// NOTE: WAIT TILL QR EVENT BEFORE REQUESTING THE PAIRING CODE
+if (!sock.authState.creds.registered) {
+ const number = 'XXXXXXXXXXX'
+ const code = await sock.requestPairingCode(number)
+ console.log(code)
}
```
-### Emulating the Desktop app instead of the web
+### Receive Full History
+
+1. Set `syncFullHistory` as `true`
+2. Baileys, by default, use chrome browser config
+ - If you'd like to emulate a desktop connection (and receive more message history), this browser setting to your Socket config:
+
+```ts
+const sock = makeWASocket({
+ ...otherOpts,
+ // can use Windows, Ubuntu here too
+ browser: Browsers.macOS('Desktop'),
+ syncFullHistory: true
+})
+```
+
+## Important Notes About Socket Config
+
+### Caching Group Metadata (Recommended)
+- If you use baileys for groups, we recommend you to set `cachedGroupMetadata` in socket config, you need to implement a cache like this:
+
+ ```ts
+ const groupCache = new NodeCache({stdTTL: 5 * 60, useClones: false})
+
+ const sock = makeWASocket({
+ cachedGroupMetadata: async (jid) => groupCache.get(jid)
+ })
+
+ sock.ev.on('groups.update', async ([event]) => {
+ const metadata = await sock.groupMetadata(event.id)
+ groupCache.set(event.id, metadata)
+ })
+
+ sock.ev.on('group-participants.update', async (event) => {
+ const metadata = await sock.groupMetadata(event.id)
+ groupCache.set(event.id, metadata)
+ })
+ ```
-1. Baileys, by default, emulates a chrome web session
-2. If you'd like to emulate a desktop connection (and receive more message history), add this to your Socket config:
- ``` ts
- const conn = makeWASocket({
- ...otherOpts,
- // can use Windows, Ubuntu here too
- browser: Browsers.macOS('Desktop'),
- syncFullHistory: true
+### Improve Retry System & Decrypt Poll Votes
+- If you want to improve sending message, retrying when error occurs and decrypt poll votes, you need to have a store and set `getMessage` config in socket like this:
+ ```ts
+ const sock = makeWASocket({
+ getMessage: async (key) => await getMessageFromStore(key)
})
```
+### Receive Notifications in Whatsapp App
+- If you want to receive notifications in whatsapp app, set `markOnlineOnConnect` to `false`
+ ```ts
+ const sock = makeWASocket({
+ markOnlineOnConnect: false
+ })
+ ```
## Saving & Restoring Sessions
You obviously don't want to keep scanning the QR code every time you want to connect.
So, you can load the credentials to log back in:
-``` ts
-import makeWASocket, { BufferJSON, useMultiFileAuthState } from '@whiskeysockets/baileys'
-import * as fs from 'fs'
+```ts
+import makeWASocket, { useMultiFileAuthState } from 'baileys'
-// utility function to help save the auth state in a single folder
-// this function serves as a good guide to help write auth & key states for SQL/no-SQL databases, which I would recommend in any production grade system
const { state, saveCreds } = await useMultiFileAuthState('auth_info_baileys')
+
// will use the given state to connect
// so if valid credentials are available -- it'll connect without QR
-const conn = makeWASocket({ auth: state })
+const sock = makeWASocket({ auth: state })
+
// this will be called as soon as the credentials are updated
-conn.ev.on ('creds.update', saveCreds)
-```
-
-**Note:** When a message is received/sent, due to signal sessions needing updating, the auth keys (`authState.keys`) will update. Whenever that happens, you must save the updated keys (`authState.keys.set()` is called). Not doing so will prevent your messages from reaching the recipient & cause other unexpected consequences. The `useMultiFileAuthState` function automatically takes care of that, but for any other serious implementation -- you will need to be very careful with the key state management.
-
-## Listening to Connection Updates
-
-Baileys now fires the `connection.update` event to let you know something has updated in the connection. This data has the following structure:
-``` ts
-type ConnectionState = {
- /** connection is now open, connecting or closed */
- connection: WAConnectionState
- /** the error that caused the connection to close */
- lastDisconnect?: {
- error: Error
- date: Date
- }
- /** is this a new login */
- isNewLogin?: boolean
- /** the current QR code */
- qr?: string
- /** has the device received all pending notifications while it was offline */
- receivedPendingNotifications?: boolean
-}
+sock.ev.on('creds.update', saveCreds)
```
-**Note:** this also offers any updates to the QR
+> [!IMPORTANT]
+> `useMultiFileAuthState` is a utility function to help save the auth state in a single folder, this function serves as a good guide to help write auth & key states for SQL/no-SQL databases, which I would recommend in any production grade system.
+
+> [!NOTE]
+> When a message is received/sent, due to signal sessions needing updating, the auth keys (`authState.keys`) will update. Whenever that happens, you must save the updated keys (`authState.keys.set()` is called). Not doing so will prevent your messages from reaching the recipient & cause other unexpected consequences. The `useMultiFileAuthState` function automatically takes care of that, but for any other serious implementation -- you will need to be very careful with the key state management.
## Handling Events
-Baileys uses the EventEmitter syntax for events.
+- Baileys uses the EventEmitter syntax for events.
They're all nicely typed up, so you shouldn't have any issues with an Intellisense editor like VS Code.
-The events are typed as mentioned here:
-
-``` ts
-
-export type BaileysEventMap = {
- /** connection state has been updated -- WS closed, opened, connecting etc. */
- 'connection.update': Partial
- /** credentials updated -- some metadata, keys or something */
- 'creds.update': Partial
- /** history sync, everything is reverse chronologically sorted */
- 'messaging-history.set': {
- chats: Chat[]
- contacts: Contact[]
- messages: WAMessage[]
- isLatest: boolean
- }
- /** upsert chats */
- 'chats.upsert': Chat[]
- /** update the given chats */
- 'chats.update': Partial[]
- /** delete chats with given ID */
- 'chats.delete': string[]
- 'labels.association': LabelAssociation
- 'labels.edit': Label
- /** presence of contact in a chat updated */
- 'presence.update': { id: string, presences: { [participant: string]: PresenceData } }
-
- 'contacts.upsert': Contact[]
- 'contacts.update': Partial[]
-
- 'messages.delete': { keys: WAMessageKey[] } | { jid: string, all: true }
- 'messages.update': WAMessageUpdate[]
- 'messages.media-update': { key: WAMessageKey, media?: { ciphertext: Uint8Array, iv: Uint8Array }, error?: Boom }[]
- /**
- * add/update the given messages. If they were received while the connection was online,
- * the update will have type: "notify"
- * */
- 'messages.upsert': { messages: WAMessage[], type: MessageUpsertType }
- /** message was reacted to. If reaction was removed -- then "reaction.text" will be falsey */
- 'messages.reaction': { key: WAMessageKey, reaction: proto.IReaction }[]
-
- 'message-receipt.update': MessageUserReceiptUpdate[]
-
- 'groups.upsert': GroupMetadata[]
- 'groups.update': Partial[]
- /** apply an action to participants in a group */
- 'group-participants.update': { id: string, participants: string[], action: ParticipantAction }
-
- 'blocklist.set': { blocklist: string[] }
- 'blocklist.update': { blocklist: string[], type: 'add' | 'remove' }
- /** Receive an update on a call, including when the call was received, rejected, accepted */
- 'call': WACallEvent[]
-}
-```
+> [!IMPORTANT]
+> **The events are [these](https://baileys.whiskeysockets.io/types/BaileysEventMap.html)**, it's important you see all events
You can listen to these events like this:
-``` ts
-
+```ts
const sock = makeWASocket()
sock.ev.on('messages.upsert', ({ messages }) => {
console.log('got messages', messages)
})
+```
+
+### Example to Start
+
+> [!NOTE]
+> This example includes basic auth storage too
+
+```ts
+import makeWASocket, { DisconnectReason, useMultiFileAuthState } from 'baileys'
+import { Boom } from '@hapi/boom'
+async function connectToWhatsApp () {
+ const { state, saveCreds } = await useMultiFileAuthState('auth_info_baileys')
+ const sock = makeWASocket({
+ // can provide additional config here
+ auth: state,
+ printQRInTerminal: true
+ })
+ sock.ev.on('connection.update', (update) => {
+ const { connection, lastDisconnect } = update
+ if(connection === 'close') {
+ const shouldReconnect = (lastDisconnect.error as Boom)?.output?.statusCode !== DisconnectReason.loggedOut
+ console.log('connection closed due to ', lastDisconnect.error, ', reconnecting ', shouldReconnect)
+ // reconnect if not logged out
+ if(shouldReconnect) {
+ connectToWhatsApp()
+ }
+ } else if(connection === 'open') {
+ console.log('opened connection')
+ }
+ })
+ sock.ev.on('messages.upsert', event => {
+ for (const m of event.messages) {
+ console.log(JSON.stringify(m, undefined, 2))
+
+ console.log('replying to', m.key.remoteJid)
+ await sock.sendMessage(m.key.remoteJid!, { text: 'Hello Word' })
+ }
+ })
+
+ // to storage creds (session info) when it updates
+ sock.ev.on('creds.update', saveCreds)
+}
+// run in main file
+connectToWhatsApp()
+```
+
+> [!IMPORTANT]
+> In `messages.upsert` it's recommended to use a loop like `for (const message of event.messages)` to handle all messages in array
+
+### Decrypt Poll Votes
+
+- By default poll votes are encrypted and handled in `messages.update`
+- That's a simple example
+```ts
+sock.ev.on('messages.update', event => {
+ for(const { key, update } of event) {
+ if(update.pollUpdates) {
+ const pollCreation = await getMessage(key)
+ if(pollCreation) {
+ console.log(
+ 'got poll update, aggregation: ',
+ getAggregateVotesInPollMessage({
+ message: pollCreation,
+ pollUpdates: update.pollUpdates,
+ })
+ )
+ }
+ }
+ }
+})
```
+- `getMessage` is a [store](#implementing-a-data-store) implementation (in your end)
+
+### Summary of Events on First Connection
+
+1. When you connect first time, `connection.update` will be fired requesting you to restart sock
+2. Then, history messages will be received in `messaging.history-set`
+
## Implementing a Data Store
-Baileys does not come with a defacto storage for chats, contacts, or messages. However, a simple in-memory implementation has been provided. The store listens for chat updates, new messages, message updates, etc., to always have an up-to-date version of the data.
+- Baileys does not come with a defacto storage for chats, contacts, or messages. However, a simple in-memory implementation has been provided. The store listens for chat updates, new messages, message updates, etc., to always have an up-to-date version of the data.
+
+> [!IMPORTANT]
+> I highly recommend building your own data store, as storing someone's entire chat history in memory is a terrible waste of RAM.
It can be used as follows:
-``` ts
-import makeWASocket, { makeInMemoryStore } from '@whiskeysockets/baileys'
+```ts
+import makeWASocket, { makeInMemoryStore } from 'baileys'
// the store maintains the data of the WA connection in memory
// can be written out to a file & read from it
const store = makeInMemoryStore({ })
@@ -325,8 +415,8 @@ const sock = makeWASocket({ })
store.bind(sock.ev)
sock.ev.on('chats.upsert', () => {
- // can use "store.chats" however you want, even after the socket dies out
- // "chats" => a KeyedDB instance
+ // can use 'store.chats' however you want, even after the socket dies out
+ // 'chats' => a KeyedDB instance
console.log('got chats', store.chats.all())
})
@@ -338,37 +428,89 @@ sock.ev.on('contacts.upsert', () => {
The store also provides some simple functions such as `loadMessages` that utilize the store to speed up data retrieval.
-**Note:** I highly recommend building your own data store especially for MD connections, as storing someone's entire chat history in memory is a terrible waste of RAM.
+## Whatsapp IDs Explain
+
+- `id` is the WhatsApp ID, called `jid` too, of the person or group you're sending the message to.
+ - It must be in the format ```[country code][phone number]@s.whatsapp.net```
+ - Example for people: ```+19999999999@s.whatsapp.net```.
+ - For groups, it must be in the format ``` 123456789-123345@g.us ```.
+ - For broadcast lists, it's `[timestamp of creation]@broadcast`.
+ - For stories, the ID is `status@broadcast`.
+
+## Utility Functions
+
+- `getContentType`, returns the content type for any message
+- `getDevice`, returns the device from message
+- `makeCacheableSignalKeyStore`, make auth store more fast
+- `downloadContentFromMessage`, download content from any message
## Sending Messages
-**Send all types of messages with a single function:**
+- Send all types of messages with a single function
+ - **[Here](https://baileys.whiskeysockets.io/types/AnyMessageContent.html) you can see all message contents supported, like text message**
+ - **[Here](https://baileys.whiskeysockets.io/types/MiscMessageGenerationOptions.html) you can see all options supported, like quote message**
+
+ ```ts
+ const jid: string
+ const content: AnyMessageContent
+ const options: MiscMessageGenerationOptions
+
+ sock.sendMessage(jid, content, options)
+ ```
### Non-Media Messages
-``` ts
-import { MessageType, MessageOptions, Mimetype } from '@whiskeysockets/baileys'
-
-const id = 'abcd@s.whatsapp.net' // the WhatsApp ID
-// send a simple text!
-const sentMsg = await sock.sendMessage(id, { text: 'oh hello there' })
-// send a reply messagge
-const sentMsg = await sock.sendMessage(id, { text: 'oh hello there' }, { quoted: message })
-// send a mentions message
-const sentMsg = await sock.sendMessage(id, { text: '@12345678901', mentions: ['12345678901@s.whatsapp.net'] })
-// send a location!
-const sentMsg = await sock.sendMessage(
- id,
- { location: { degreesLatitude: 24.121231, degreesLongitude: 55.1121221 } }
+#### Text Message
+```ts
+await sock.sendMessage(jid, { text: 'hello word' })
+```
+
+#### Quote Message (works with all types)
+```ts
+await sock.sendMessage(jid, { text: 'hello word' }, { quoted: message })
+```
+
+#### Mention User (works with most types)
+- @number is to mention in text, it's optional
+```ts
+await sock.sendMessage(
+ jid,
+ {
+ text: '@12345678901',
+ mentions: ['12345678901@s.whatsapp.net']
+ }
)
-// send a contact!
+```
+
+#### Forward Messages
+- You need to have message object, can be retrieved from [store](#implementing-a-data-store) or use a [message](https://baileys.whiskeysockets.io/types/WAMessage.html) object
+```ts
+const msg = getMessageFromStore() // implement this on your end
+await sock.sendMessage(jid, { forward: msg }) // WA forward the message!
+```
+
+#### Location Message
+```ts
+await sock.sendMessage(
+ jid,
+ {
+ location: {
+ degreesLatitude: 24.121231,
+ degreesLongitude: 55.1121221
+ }
+ }
+)
+```
+#### Contact Message
+```ts
const vcard = 'BEGIN:VCARD\n' // metadata of the contact card
+ 'VERSION:3.0\n'
+ 'FN:Jeff Singh\n' // full name
+ 'ORG:Ashoka Uni;\n' // the organization of the contact
+ 'TEL;type=CELL;type=VOICE;waid=911234567890:+91 12345 67890\n' // WhatsApp ID + phone number
+ 'END:VCARD'
-const sentMsg = await sock.sendMessage(
+
+await sock.sendMessage(
id,
{
contacts: {
@@ -377,157 +519,213 @@ const sentMsg = await sock.sendMessage(
}
}
)
+```
-const reactionMessage = {
- react: {
- text: "💖", // use an empty string to remove the reaction
- key: message.key
+#### Reaction Message
+- You need to pass the key of message, you can retrieve from [store](#implementing-a-data-store) or use a [key](https://baileys.whiskeysockets.io/types/WAMessageKey.html) object
+```ts
+await sock.sendMessage(
+ jid,
+ {
+ react: {
+ text: '💖', // use an empty string to remove the reaction
+ key: message.key
+ }
}
-}
+)
+```
+
+#### Pin Message
+- You need to pass the key of message, you can retrieve from [store](#implementing-a-data-store) or use a [key](https://baileys.whiskeysockets.io/types/WAMessageKey.html) object
+
+- Time can be:
+
+| Time | Seconds |
+|-------|----------------|
+| 24h | 86.400 |
+| 7d | 604.800 |
+| 30d | 2.592.000 |
+
+```ts
+await sock.sendMessage(
+ jid,
+ {
+ pin: {
+ type: 1, // 0 to remove
+ time: 86400
+ key: message.key
+ }
+ }
+)
+```
-const sendMsg = await sock.sendMessage(id, reactionMessage)
+#### Poll Message
+```ts
+await sock.sendMessage(
+ jid,
+ {
+ poll: {
+ name: 'My Poll',
+ values: ['Option 1', 'Option 2', ...],
+ selectableCount: 1,
+ toAnnouncementGroup: false // or true
+ }
+ }
+)
```
-### Sending messages with link previews
+### Sending Messages with Link Previews
-1. By default, WA MD does not have link generation when sent from the web
+1. By default, wa does not have link generation when sent from the web
2. Baileys has a function to generate the content for these link previews
3. To enable this function's usage, add `link-preview-js` as a dependency to your project with `yarn add link-preview-js`
4. Send a link:
-``` ts
-// send a link
-const sentMsg = await sock.sendMessage(id, { text: 'Hi, this was sent using https://github.com/adiwajshing/baileys' })
+```ts
+await sock.sendMessage(
+ jid,
+ {
+ text: 'Hi, this was sent using https://github.com/whiskeysockets/baileys'
+ }
+)
```
### Media Messages
-Sending media (video, stickers, images) is easier & more efficient than ever.
-- You can specify a buffer, a local url or even a remote url.
+Sending media (video, stickers, images) is easier & more efficient than ever.
+
+> [!NOTE]
+> In media messages, you can pass `{ stream: Stream }` or `{ url: Url }` or `Buffer` directly, you can see more [here](https://baileys.whiskeysockets.io/types/WAMediaUpload.html)
+
- When specifying a media url, Baileys never loads the entire buffer into memory; it even encrypts the media as a readable stream.
-``` ts
-import { MessageType, MessageOptions, Mimetype } from '@whiskeysockets/baileys'
-// Sending gifs
+> [!TIP]
+> It's recommended to use Stream or Url to save memory
+
+#### Gif Message
+- Whatsapp doesn't support `.gif` files, that's why we send gifs as common `.mp4` video with `gifPlayback` flag
+```ts
await sock.sendMessage(
- id,
+ jid,
{
- video: fs.readFileSync("Media/ma_gif.mp4"),
- caption: "hello!",
+ video: fs.readFileSync('Media/ma_gif.mp4'),
+ caption: 'hello word',
gifPlayback: true
}
)
+```
+#### Video Message
+```ts
await sock.sendMessage(
id,
{
- video: "./Media/ma_gif.mp4",
- caption: "hello!",
- gifPlayback: true,
- ptv: false // if set to true, will send as a `video note`
+ video: {
+ url: './Media/ma_gif.mp4'
+ },
+ caption: 'hello word',
+ ptv: false // if set to true, will send as a `video note`
}
)
+```
-// send an audio file
+#### Audio Message
+- To audio message work in all devices you need to convert with some tool like `ffmpeg` with this flags:
+ ```bash
+ codec: libopus //ogg file
+ ac: 1 //one channel
+ avoid_negative_ts
+ make_zero
+ ```
+ - Example:
+ ```bash
+ ffmpeg -i input.mp4 -avoid_negative_ts make_zero -ac 1 output.ogg
+ ```
+```ts
await sock.sendMessage(
- id,
- { audio: { url: "./Media/audio.mp3" }, mimetype: 'audio/mp4' }
- { url: "Media/audio.mp3" }, // can send mp3, mp4, & ogg
+ jid,
+ {
+ audio: {
+ url: './Media/audio.mp3'
+ },
+ mimetype: 'audio/mp4'
+ }
)
```
-### Notes
-
-- `id` is the WhatsApp ID of the person or group you're sending the message to.
- - It must be in the format ```[country code][phone number]@s.whatsapp.net```
- - Example for people: ```+19999999999@s.whatsapp.net```.
- - For groups, it must be in the format ``` 123456789-123345@g.us ```.
- - For broadcast lists, it's `[timestamp of creation]@broadcast`.
- - For stories, the ID is `status@broadcast`.
-- For media messages, the thumbnail can be generated automatically for images & stickers provided you add `jimp` or `sharp` as a dependency in your project using `yarn add jimp` or `yarn add sharp`. Thumbnails for videos can also be generated automatically, though, you need to have `ffmpeg` installed on your system.
-- **MiscGenerationOptions**: some extra info about the message. It can have the following __optional__ values:
- ``` ts
- const info: MessageOptions = {
- quoted: quotedMessage, // the message you want to quote
- contextInfo: { forwardingScore: 2, isForwarded: true }, // some random context info (can show a forwarded message with this too)
- timestamp: Date(), // optional, if you want to manually set the timestamp of the message
- caption: "hello there!", // (for media messages) the caption to send with the media (cannot be sent with stickers though)
- jpegThumbnail: "23GD#4/==", /* (for location & media messages) has to be a base 64 encoded JPEG if you want to send a custom thumb,
- or set to null if you don't want to send a thumbnail.
- Do not enter this field if you want to automatically generate a thumb
- */
- mimetype: Mimetype.pdf, /* (for media messages) specify the type of media (optional for all media types except documents),
- import {Mimetype} from '@whiskeysockets/baileys'
- */
- fileName: 'somefile.pdf', // (for media messages) file name for the media
- /* will send audio messages as voice notes, if set to true */
- ptt: true,
- /** Should it send as a disappearing messages.
- * By default 'chat' -- which follows the setting of the chat */
- ephemeralExpiration: WA_DEFAULT_EPHEMERAL
+#### Image Message
+```ts
+await sock.sendMessage(
+ id,
+ {
+ image: {
+ url: './Media/ma_img.png'
+ },
+ caption: 'hello word'
}
- ```
-## Forwarding Messages
-
-``` ts
-const msg = getMessageFromStore('455@s.whatsapp.net', 'HSJHJWH7323HSJSJ') // implement this on your end
-await sock.sendMessage('1234@s.whatsapp.net', { forward: msg }) // WA forward the message!
+)
```
-## Reading Messages
+#### View Once Message
-A set of message keys must be explicitly marked read now.
-In multi-device, you cannot mark an entire "chat" read as it were with Baileys Web.
-This means you have to keep track of unread messages.
+- You can send all messages above as `viewOnce`, you only need to pass `viewOnce: true` in content object
-``` ts
-const key = {
- remoteJid: '1234-123@g.us',
- id: 'AHASHH123123AHGA', // id of the message you want to read
- participant: '912121232@s.whatsapp.net' // the ID of the user that sent the message (undefined for individual chats)
-}
-// pass to readMessages function
-// can pass multiple keys to read multiple messages as well
-await sock.readMessages([key])
+```ts
+await sock.sendMessage(
+ id,
+ {
+ image: {
+ url: './Media/ma_img.png'
+ },
+ viewOnce: true, //works with video, audio too
+ caption: 'hello word'
+ }
+)
```
-The message ID is the unique identifier of the message that you are marking as read.
-On a `WAMessage`, the `messageID` can be accessed using ```messageID = message.key.id```.
-
-## Update Presence
+## Modify Messages
-``` ts
-await sock.sendPresenceUpdate('available', id)
+### Deleting Messages (for everyone)
+```ts
+const msg = await sock.sendMessage(jid, { text: 'hello word' })
+await sock.sendMessage(jid, { delete: msg.key })
```
-This lets the person/group with ``` id ``` know whether you're online, offline, typing etc.
-``` presence ``` can be one of the following:
-``` ts
-type WAPresence = 'unavailable' | 'available' | 'composing' | 'recording' | 'paused'
+**Note:** deleting for oneself is supported via `chatModify`, see in [this section](#modifying-chats)
+
+### Editing Messages
+
+- You can pass all editable contents here
+```ts
+await sock.sendMessage(jid, {
+ text: 'updated text goes here',
+ edit: response.key,
+ });
```
-The presence expires after about 10 seconds.
+## Manipulating Media Messages
-**Note:** In the multi-device version of WhatsApp -- if a desktop client is active, WA doesn't send push notifications to the device. If you would like to receive said notifications -- mark your Baileys client offline using `sock.sendPresenceUpdate('unavailable')`
+### Thumbnail in Media Messages
+- For media messages, the thumbnail can be generated automatically for images & stickers provided you add `jimp` or `sharp` as a dependency in your project using `yarn add jimp` or `yarn add sharp`.
+- Thumbnails for videos can also be generated automatically, though, you need to have `ffmpeg` installed on your system.
-## Downloading Media Messages
+### Downloading Media Messages
If you want to save the media you received
-``` ts
-import { writeFile } from 'fs/promises'
-import { downloadMediaMessage } from '@whiskeysockets/baileys'
-
-sock.ev.on('messages.upsert', async ({ messages }) => {
- const m = messages[0]
+```ts
+import { createWriteStream } from 'fs'
+import { downloadMediaMessage, getContentType } from 'baileys'
+sock.ev.on('messages.upsert', async ({ [m] }) => {
if (!m.message) return // if there is no text or media message
- const messageType = Object.keys (m.message)[0]// get what type of message it is -- text, image, video
+ const messageType = getContentType(m) // get what type of message it is (text, image, video...)
+
// if the message is an image
if (messageType === 'imageMessage') {
// download the message
- const buffer = await downloadMediaMessage(
+ const stream = await downloadMediaMessage(
m,
- 'buffer',
+ 'stream', // can be 'buffer' too
{ },
{
logger,
@@ -537,363 +735,542 @@ sock.ev.on('messages.upsert', async ({ messages }) => {
}
)
// save to file
- await writeFile('./my-download.jpeg', buffer)
+ const writeStream = createWriteStream('./my-download.jpeg')
+ stream.pipe(writeStream)
}
}
```
-**Note:** WhatsApp automatically removes old media from their servers. For the device to access said media -- a re-upload is required by another device that has it. This can be accomplished using:
-``` ts
-const updatedMediaMsg = await sock.updateMediaMessage(msg)
+### Re-upload Media Message to Whatsapp
+
+- WhatsApp automatically removes old media from their servers. For the device to access said media -- a re-upload is required by another device that has it. This can be accomplished using:
+```ts
+await sock.updateMediaMessage(msg)
```
-## Deleting Messages
+## Reject Call
+
+- You can obtain `callId` and `callFrom` from `call` event
-``` ts
-const jid = '1234@s.whatsapp.net' // can also be a group
-const response = await sock.sendMessage(jid, { text: 'hello!' }) // send a message
-// sends a message to delete the given message
-// this deletes the message for everyone
-await sock.sendMessage(jid, { delete: response.key })
+```ts
+await sock.rejectCall(callId, callFrom)
```
-**Note:** deleting for oneself is supported via `chatModify` (next section)
+## Send States in Chat
-## Updating Messages
+### Reading Messages
+- A set of message [keys](https://baileys.whiskeysockets.io/types/WAMessageKey.html) must be explicitly marked read now.
+- You cannot mark an entire 'chat' read as it were with Baileys Web.
+This means you have to keep track of unread messages.
-``` ts
-const jid = '1234@s.whatsapp.net'
+```ts
+const key: WAMessageKey
+// can pass multiple keys to read multiple messages as well
+await sock.readMessages([key])
+```
-await sock.sendMessage(jid, {
- text: 'updated text goes here',
- edit: response.key,
- });
+The message ID is the unique identifier of the message that you are marking as read.
+On a `WAMessage`, the `messageID` can be accessed using ```messageID = message.key.id```.
+
+### Update Presence
+
+- ``` presence ``` can be one of [these](https://baileys.whiskeysockets.io/types/WAPresence.html)
+- The presence expires after about 10 seconds.
+- This lets the person/group with `jid` know whether you're online, offline, typing etc.
+
+```ts
+await sock.sendPresenceUpdate('available', jid)
```
+> [!NOTE]
+> If a desktop client is active, WA doesn't send push notifications to the device. If you would like to receive said notifications -- mark your Baileys client offline using `sock.sendPresenceUpdate('unavailable')`
+
## Modifying Chats
WA uses an encrypted form of communication to send chat/app updates. This has been implemented mostly and you can send the following updates:
-- Archive a chat
- ``` ts
- const lastMsgInChat = await getLastMessageInChat('123456@s.whatsapp.net') // implement this on your end
- await sock.chatModify({ archive: true, lastMessages: [lastMsgInChat] }, '123456@s.whatsapp.net')
- ```
-- Mute/unmute a chat
- ``` ts
- // mute for 8 hours
- await sock.chatModify({ mute: 8*60*60*1000 }, '123456@s.whatsapp.net', [])
- // unmute
- await sock.chatModify({ mute: null }, '123456@s.whatsapp.net', [])
- ```
-- Mark a chat read/unread
- ``` ts
- const lastMsgInChat = await getLastMessageInChat('123456@s.whatsapp.net') // implement this on your end
- // mark it unread
- await sock.chatModify({ markRead: false, lastMessages: [lastMsgInChat] }, '123456@s.whatsapp.net')
- ```
-
-- Delete a message for me
- ``` ts
- await sock.chatModify(
- { clear: { messages: [{ id: 'ATWYHDNNWU81732J', fromMe: true, timestamp: "1654823909" }] } },
- '123456@s.whatsapp.net',
- []
- )
-
- ```
-
-- Delete a chat
- ``` ts
- const lastMsgInChat = await getLastMessageInChat('123456@s.whatsapp.net') // implement this on your end
- await sock.chatModify({
- delete: true,
- lastMessages: [{ key: lastMsgInChat.key, messageTimestamp: lastMsgInChat.messageTimestamp }]
- },
- '123456@s.whatsapp.net')
- ```
-
-- Pin/unpin a chat
- ``` ts
- await sock.chatModify({
- pin: true // or `false` to unpin
- },
- '123456@s.whatsapp.net')
- ```
-
-- Star/unstar a message
- ``` ts
- await sock.chatModify({
- star: {
- messages: [{ id: 'messageID', fromMe: true // or `false` }],
- star: true // - true: Star Message; false: Unstar Message
- }},'123456@s.whatsapp.net');
- ```
-
-**Note:** if you mess up one of your updates, WA can log you out of all your devices and you'll have to log in again.
-
-## Disappearing Messages
-
-``` ts
-const jid = '1234@s.whatsapp.net' // can also be a group
+> [!IMPORTANT]
+> If you mess up one of your updates, WA can log you out of all your devices and you'll have to log in again.
+
+### Archive a Chat
+```ts
+const lastMsgInChat = await getLastMessageInChat(jid) // implement this on your end
+await sock.chatModify({ archive: true, lastMessages: [lastMsgInChat] }, jid)
+```
+### Mute/Unmute a Chat
+
+- Supported times:
+
+| Time | Miliseconds |
+|-------|-----------------|
+| Remove | null |
+| 8h | 86.400.000 |
+| 7d | 604.800.000 |
+
+```ts
+// mute for 8 hours
+await sock.chatModify({ mute: 8 * 60 * 60 * 1000 }, jid)
+// unmute
+await sock.chatModify({ mute: null }, jid)
+```
+### Mark a Chat Read/Unread
+```ts
+const lastMsgInChat = await getLastMessageInChat(jid) // implement this on your end
+// mark it unread
+await sock.chatModify({ markRead: false, lastMessages: [lastMsgInChat] }, jid)
+```
+
+### Delete a Message for Me
+```ts
+await sock.chatModify(
+ {
+ clear: {
+ messages: [
+ {
+ id: 'ATWYHDNNWU81732J',
+ fromMe: true,
+ timestamp: '1654823909'
+ }
+ ]
+ }
+ },
+ jid
+)
+
+```
+### Delete a Chat
+```ts
+const lastMsgInChat = await getLastMessageInChat(jid) // implement this on your end
+await sock.chatModify({
+ delete: true,
+ lastMessages: [
+ {
+ key: lastMsgInChat.key,
+ messageTimestamp: lastMsgInChat.messageTimestamp
+ }
+ ]
+ },
+ jid
+)
+```
+### Pin/Unpin a Chat
+```ts
+await sock.chatModify({
+ pin: true // or `false` to unpin
+ },
+ jid
+)
+```
+### Star/Unstar a Message
+```ts
+await sock.chatModify({
+ star: {
+ messages: [
+ {
+ id: 'messageID',
+ fromMe: true // or `false`
+ }
+ ],
+ star: true // - true: Star Message; false: Unstar Message
+ }
+ },
+ jid
+)
+```
+
+### Disappearing Messages
+
+- Ephemeral can be:
+
+| Time | Seconds |
+|-------|----------------|
+| Remove | 0 |
+| 24h | 86.400 |
+| 7d | 604.800 |
+| 90d | 7.776.000 |
+
+- You need to pass in **Seconds**, default is 7 days
+
+```ts
// turn on disappearing messages
await sock.sendMessage(
jid,
// this is 1 week in seconds -- how long you want messages to appear for
{ disappearingMessagesInChat: WA_DEFAULT_EPHEMERAL }
)
+
// will send as a disappearing message
await sock.sendMessage(jid, { text: 'hello' }, { ephemeralExpiration: WA_DEFAULT_EPHEMERAL })
+
// turn off disappearing messages
await sock.sendMessage(
jid,
{ disappearingMessagesInChat: false }
)
+```
+
+## User Querys
+
+### Check If ID Exists in Whatsapp
+```ts
+const [result] = await sock.onWhatsApp(jid)
+if (result.exists) console.log (`${jid} exists on WhatsApp, as jid: ${result.jid}`)
+```
+### Query Chat History (groups too)
+
+- You need to have oldest message in chat
+```ts
+const msg = await getOldestMessageInChat(jid)
+await sock.fetchMessageHistory(
+ 50, //quantity (max: 50 per query)
+ msg.key,
+ msg.messageTimestamp
+)
```
+- Messages will be received in `messaging.history-set` event
-## Misc
+### Fetch Status
+```ts
+const status = await sock.fetchStatus(jid)
+console.log('status: ' + status)
+```
-- To check if a given ID is on WhatsApp
- ``` ts
- const id = '123456'
- const [result] = await sock.onWhatsApp(id)
- if (result.exists) console.log (`${id} exists on WhatsApp, as jid: ${result.jid}`)
- ```
-- To query chat history on a group or with someone
- TODO, if possible
-- To get the status of some person
- ``` ts
- const status = await sock.fetchStatus("xyz@s.whatsapp.net")
- console.log("status: " + status)
- ```
-- To change your profile status
- ``` ts
- const status = 'Hello World!'
- await sock.updateProfileStatus(status)
- ```
-- To change your profile name
- ``` ts
- const name = 'My name'
- await sock.updateProfileName(name)
- ```
+### Fetch Profile Picture (groups too)
- To get the display picture of some person/group
- ``` ts
- // for low res picture
- const ppUrl = await sock.profilePictureUrl("xyz@g.us")
- console.log("download profile picture from: " + ppUrl)
- // for high res picture
- const ppUrl = await sock.profilePictureUrl("xyz@g.us", 'image')
- ```
+```ts
+// for low res picture
+const ppUrl = await sock.profilePictureUrl(jid)
+console.log(ppUrl)
+
+// for high res picture
+const ppUrl = await sock.profilePictureUrl(jid, 'image')
+```
+
+### Fetch Bussines Profile (such as description or category)
+```ts
+const profile = await sock.getBusinessProfile(jid)
+console.log('business description: ' + profile.description + ', category: ' + profile.category)
+```
+
+### Fetch Someone's Presence (if they're typing or online)
+```ts
+// the presence update is fetched and called here
+sock.ev.on('presence.update', console.log)
+
+// request updates for a chat
+await sock.presenceSubscribe(jid)
+```
+
+## Change Profile
+
+### Change Profile Status
+```ts
+await sock.updateProfileStatus('Hello World!')
+```
+### Change Profile Name
+```ts
+await sock.updateProfileName('My name')
+```
+### Change Display Picture (groups too)
- To change your display picture or a group's
- ``` ts
- const jid = '111234567890-1594482450@g.us' // can be your own too
- await sock.updateProfilePicture(jid, { url: './new-profile-picture.jpeg' })
- ```
-- To remove your display picture or a group's
- ``` ts
- const jid = '111234567890-1594482450@g.us' // can be your own too
- await sock.removeProfilePicture(jid)
- ```
-- To get someone's presence (if they're typing or online)
- ``` ts
- // the presence update is fetched and called here
- sock.ev.on('presence.update', json => console.log(json))
- // request updates for a chat
- await sock.presenceSubscribe("xyz@s.whatsapp.net")
- ```
-- To block or unblock user
- ``` ts
- await sock.updateBlockStatus("xyz@s.whatsapp.net", "block") // Block user
- await sock.updateBlockStatus("xyz@s.whatsapp.net", "unblock") // Unblock user
- ```
-- To get a business profile, such as description or category
- ```ts
- const profile = await sock.getBusinessProfile("xyz@s.whatsapp.net")
- console.log("business description: " + profile.description + ", category: " + profile.category)
- ```
-Of course, replace ``` xyz ``` with an actual ID.
+
+> [!NOTE]
+> Like media messages, you can pass `{ stream: Stream }` or `{ url: Url }` or `Buffer` directly, you can see more [here](https://baileys.whiskeysockets.io/types/WAMediaUpload.html)
+
+```ts
+await sock.updateProfilePicture(jid, { url: './new-profile-picture.jpeg' })
+```
+### Remove display picture (groups too)
+```ts
+await sock.removeProfilePicture(jid)
+```
## Groups
-- To create a group
- ``` ts
- // title & participants
- const group = await sock.groupCreate("My Fab Group", ["1234@s.whatsapp.net", "4564@s.whatsapp.net"])
- console.log ("created group with id: " + group.gid)
- sock.sendMessage(group.id, { text: 'hello there' }) // say hello to everyone on the group
- ```
-- To add/remove people to a group or demote/promote people
- ``` ts
- // id & people to add to the group (will throw error if it fails)
- const response = await sock.groupParticipantsUpdate(
- "abcd-xyz@g.us",
- ["abcd@s.whatsapp.net", "efgh@s.whatsapp.net"],
- "add" // replace this parameter with "remove", "demote" or "promote"
- )
- ```
-- To change the group's subject
- ``` ts
- await sock.groupUpdateSubject("abcd-xyz@g.us", "New Subject!")
- ```
-- To change the group's description
- ``` ts
- await sock.groupUpdateDescription("abcd-xyz@g.us", "New Description!")
- ```
-- To change group settings
- ``` ts
- // only allow admins to send messages
- await sock.groupSettingUpdate("abcd-xyz@g.us", 'announcement')
- // allow everyone to send messages
- await sock.groupSettingUpdate("abcd-xyz@g.us", 'not_announcement')
- // allow everyone to modify the group's settings -- like display picture etc.
- await sock.groupSettingUpdate("abcd-xyz@g.us", 'unlocked')
- // only allow admins to modify the group's settings
- await sock.groupSettingUpdate("abcd-xyz@g.us", 'locked')
- ```
-- To leave a group
- ``` ts
- await sock.groupLeave("abcd-xyz@g.us") // (will throw error if it fails)
- ```
-- To get the invite code for a group
- ``` ts
- const code = await sock.groupInviteCode("abcd-xyz@g.us")
- console.log("group code: " + code)
- ```
-- To revoke the invite code in a group
- ```ts
- const code = await sock.groupRevokeInvite("abcd-xyz@g.us")
- console.log("New group code: " + code)
- ```
-- To query the metadata of a group
- ``` ts
- const metadata = await sock.groupMetadata("abcd-xyz@g.us")
- console.log(metadata.id + ", title: " + metadata.subject + ", description: " + metadata.desc)
- ```
-- To join the group using the invitation code
- ``` ts
- const response = await sock.groupAcceptInvite("xxx")
- console.log("joined to: " + response)
- ```
- Of course, replace ``` xxx ``` with invitation code.
-- To get group info by invite code
- ```ts
- const response = await sock.groupGetInviteInfo("xxx")
- console.log("group information: " + response)
- ```
-- To join the group using groupInviteMessage
- ``` ts
- const response = await sock.groupAcceptInviteV4("abcd@s.whatsapp.net", groupInviteMessage)
- console.log("joined to: " + response)
- ```
- Of course, replace ``` xxx ``` with invitation code.
-- To get list request join
- ``` ts
- const response = await sock.groupRequestParticipantsList("abcd-xyz@g.us")
- console.log(response)
- ```
-- To approve/reject request join
- ``` ts
- const response = await sock.groupRequestParticipantsUpdate(
- "abcd-xyz@g.us", // id group,
- ["abcd@s.whatsapp.net", "efgh@s.whatsapp.net"],
- "approve" // replace this parameter with "reject"
- )
- console.log(response)
- ```
+- To change group properties you need to be admin
+
+### Create a Group
+```ts
+// title & participants
+const group = await sock.groupCreate('My Fab Group', ['1234@s.whatsapp.net', '4564@s.whatsapp.net'])
+console.log('created group with id: ' + group.gid)
+await sock.sendMessage(group.id, { text: 'hello there' }) // say hello to everyone on the group
+```
+### Add/Remove or Demote/Promote
+```ts
+// id & people to add to the group (will throw error if it fails)
+await sock.groupParticipantsUpdate(
+ jid,
+ ['abcd@s.whatsapp.net', 'efgh@s.whatsapp.net'],
+ 'add' // replace this parameter with 'remove' or 'demote' or 'promote'
+)
+```
+### Change Subject (name)
+```ts
+await sock.groupUpdateSubject(jid, 'New Subject!')
+```
+### Change Description
+```ts
+await sock.groupUpdateDescription(jid, 'New Description!')
+```
+### Change Settings
+```ts
+// only allow admins to send messages
+await sock.groupSettingUpdate(jid, 'announcement')
+// allow everyone to send messages
+await sock.groupSettingUpdate(jid, 'not_announcement')
+// allow everyone to modify the group's settings -- like display picture etc.
+await sock.groupSettingUpdate(jid, 'unlocked')
+// only allow admins to modify the group's settings
+await sock.groupSettingUpdate(jid, 'locked')
+```
+### Leave a Group
+```ts
+// will throw error if it fails
+await sock.groupLeave(jid)
+```
+### Get Invite Code
+- To create link with code use `'https://chat.whatsapp.com/' + code`
+```ts
+const code = await sock.groupInviteCode(jid)
+console.log('group code: ' + code)
+```
+### Revoke Invite Code
+```ts
+const code = await sock.groupRevokeInvite(jid)
+console.log('New group code: ' + code)
+```
+### Join Using Invitation Code
+- Code can't have `https://chat.whatsapp.com/`, only code
+```ts
+const response = await sock.groupAcceptInvite(code)
+console.log('joined to: ' + response)
+```
+### Get Group Info by Invite Code
+```ts
+const response = await sock.groupGetInviteInfo(code)
+console.log('group information: ' + response)
+```
+### Query Metadata (participants, name, description...)
+```ts
+const metadata = await sock.groupMetadata(jid)
+console.log(metadata.id + ', title: ' + metadata.subject + ', description: ' + metadata.desc)
+```
+### Join using `groupInviteMessage`
+```ts
+const response = await sock.groupAcceptInviteV4(jid, groupInviteMessage)
+console.log('joined to: ' + response)
+```
+### Get Request Join List
+```ts
+const response = await sock.groupRequestParticipantsList(jid)
+console.log(response)
+```
+### Approve/Reject Request Join
+```ts
+const response = await sock.groupRequestParticipantsUpdate(
+ jid, // group id
+ ['abcd@s.whatsapp.net', 'efgh@s.whatsapp.net'],
+ 'approve' // or 'reject'
+)
+console.log(response)
+```
+### Get All Participating Groups Metadata
+```ts
+const response = await sock.groupFetchAllParticipating()
+console.log(response)
+```
+### Toggle Ephemeral
+
+- Ephemeral can be:
+
+| Time | Seconds |
+|-------|----------------|
+| Remove | 0 |
+| 24h | 86.400 |
+| 7d | 604.800 |
+| 90d | 7.776.000 |
+
+```ts
+await sock.groupToggleEphemeral(jid, 86400)
+```
+
+### Change Add Mode
+```ts
+await sock.groupMemberAddMode(
+ jid,
+ 'all_member_add' // or 'admin_add'
+)
+```
## Privacy
-- To get the privacy settings
- ``` ts
- const privacySettings = await sock.fetchPrivacySettings(true)
- console.log("privacy settings: " + privacySettings)
- ```
-- To update the LastSeen privacy
- ``` ts
- const value = 'all' // 'contacts' | 'contact_blacklist' | 'none'
- await sock.updateLastSeenPrivacy(value)
- ```
-- To update the Online privacy
- ``` ts
- const value = 'all' // 'match_last_seen'
- await sock.updateOnlinePrivacy(value)
- ```
-- To update the Profile Picture privacy
- ``` ts
- const value = 'all' // 'contacts' | 'contact_blacklist' | 'none'
- await sock.updateProfilePicturePrivacy(value)
- ```
-- To update the Status privacy
- ``` ts
- const value = 'all' // 'contacts' | 'contact_blacklist' | 'none'
- await sock.updateStatusPrivacy(value)
- ```
-- To update the Read Receipts privacy
- ``` ts
- const value = 'all' // 'none'
- await sock.updateReadReceiptsPrivacy(value)
- ```
-- To update the Groups Add privacy
- ``` ts
- const value = 'all' // 'contacts' | 'contact_blacklist'
- await sock.updateGroupsAddPrivacy(value)
- ```
-- To update the Default Disappearing Mode
- ``` ts
- const duration = 86400 // 604800 | 7776000 | 0
- await sock.updateDefaultDisappearingMode(duration)
- ```
+
+### Block/Unblock User
+```ts
+await sock.updateBlockStatus(jid, 'block') // Block user
+await sock.updateBlockStatus(jid, 'unblock') // Unblock user
+```
+### Get Privacy Settings
+```ts
+const privacySettings = await sock.fetchPrivacySettings(true)
+console.log('privacy settings: ' + privacySettings)
+```
+### Get BlockList
+```ts
+const response = await sock.fetchBlocklist()
+console.log(response)
+```
+### Update LastSeen Privacy
+```ts
+const value = 'all' // 'contacts' | 'contact_blacklist' | 'none'
+await sock.updateLastSeenPrivacy(value)
+```
+### Update Online Privacy
+```ts
+const value = 'all' // 'match_last_seen'
+await sock.updateOnlinePrivacy(value)
+```
+### Update Profile Picture Privacy
+```ts
+const value = 'all' // 'contacts' | 'contact_blacklist' | 'none'
+await sock.updateProfilePicturePrivacy(value)
+```
+### Update Status Privacy
+```ts
+const value = 'all' // 'contacts' | 'contact_blacklist' | 'none'
+await sock.updateStatusPrivacy(value)
+```
+### Update Read Receipts Privacy
+```ts
+const value = 'all' // 'none'
+await sock.updateReadReceiptsPrivacy(value)
+```
+### Update Groups Add Privacy
+```ts
+const value = 'all' // 'contacts' | 'contact_blacklist'
+await sock.updateGroupsAddPrivacy(value)
+```
+### Update Default Disappearing Mode
+
+- Like [this](#disappearing-messages), ephemeral can be:
+
+| Time | Seconds |
+|-------|----------------|
+| Remove | 0 |
+| 24h | 86.400 |
+| 7d | 604.800 |
+| 90d | 7.776.000 |
+
+```ts
+const ephemeral = 86400
+await sock.updateDefaultDisappearingMode(ephemeral)
+```
+
## Broadcast Lists & Stories
-Messages can be sent to broadcasts & stories.
-you need to add the following message options in sendMessage, like this:
+### Send Broadcast & Stories
+- Messages can be sent to broadcasts & stories. You need to add the following message options in sendMessage, like this:
```ts
-sock.sendMessage(jid, {image: {url: url}, caption: caption}, {backgroundColor : backgroundColor, font : font, statusJidList: statusJidList, broadcast : true})
+await sock.sendMessage(
+ jid,
+ {
+ image: {
+ url: url
+ },
+ caption: caption
+ },
+ {
+ backgroundColor: backgroundColor,
+ font: font,
+ statusJidList: statusJidList,
+ broadcast: true
+ }
+)
```
-- the message body can be a extendedTextMessage or imageMessage or videoMessage or voiceMessage
-- You can add backgroundColor and other options in the message options
-- broadcast: true enables broadcast mode
-- statusJidList: a list of people that you can get which you need to provide, which are the people who will get this status message.
+- Message body can be a `extendedTextMessage` or `imageMessage` or `videoMessage` or `voiceMessage`, see [here](https://baileys.whiskeysockets.io/types/AnyRegularMessageContent.html)
+- You can add `backgroundColor` and other options in the message options, see [here](https://baileys.whiskeysockets.io/types/MiscMessageGenerationOptions.html)
+- `broadcast: true` enables broadcast mode
+- `statusJidList`: a list of people that you can get which you need to provide, which are the people who will get this status message.
- You can send messages to broadcast lists the same way you send messages to groups & individual chats.
- Right now, WA Web does not support creating broadcast lists, but you can still delete them.
- Broadcast IDs are in the format `12345678@broadcast`
-- To query a broadcast list's recipients & name:
- ``` ts
- const bList = await sock.getBroadcastListInfo("1234@broadcast")
- console.log (`list name: ${bList.name}, recps: ${bList.recipients}`)
- ```
+### Query a Broadcast List's Recipients & Name
+```ts
+const bList = await sock.getBroadcastListInfo('1234@broadcast')
+console.log (`list name: ${bList.name}, recps: ${bList.recipients}`)
+```
## Writing Custom Functionality
Baileys is written with custom functionality in mind. Instead of forking the project & re-writing the internals, you can simply write your own extensions.
+### Enabling Debug Level in Baileys Logs
First, enable the logging of unhandled messages from WhatsApp by setting:
-``` ts
+```ts
const sock = makeWASocket({
logger: P({ level: 'debug' }),
})
```
This will enable you to see all sorts of messages WhatsApp sends in the console.
-Some examples:
-
-1. Functionality to track the battery percentage of your phone.
- You enable logging and you'll see a message about your battery pop up in the console:
- ```{"level":10,"fromMe":false,"frame":{"tag":"ib","attrs":{"from":"@s.whatsapp.net"},"content":[{"tag":"edge_routing","attrs":{},"content":[{"tag":"routing_info","attrs":{},"content":{"type":"Buffer","data":[8,2,8,5]}}]}]},"msg":"communication"} ```
-
- The "frame" is what the message received is, it has three components:
- - `tag` -- what this frame is about (eg. message will have "message")
- - `attrs` -- a string key-value pair with some metadata (contains ID of the message usually)
- - `content` -- the actual data (eg. a message node will have the actual message content in it)
- - read more about this format [here](/src/WABinary/readme.md)
-
- You can register a callback for an event using the following:
- ``` ts
- // for any message with tag 'edge_routing'
- sock.ws.on(`CB:edge_routing`, (node: BinaryNode) => { })
- // for any message with tag 'edge_routing' and id attribute = abcd
- sock.ws.on(`CB:edge_routing,id:abcd`, (node: BinaryNode) => { })
- // for any message with tag 'edge_routing', id attribute = abcd & first content node routing_info
- sock.ws.on(`CB:edge_routing,id:abcd,routing_info`, (node: BinaryNode) => { })
+### How Whatsapp Communicate With Us
+
+> [!TIP]
+> If you want to learn whatsapp protocol, we recommend to study about Libsignal Protocol and Noise Protocol
+
+- **Example:** Functionality to track the battery percentage of your phone. You enable logging and you'll see a message about your battery pop up in the console:
```
- Also, this repo is now licenced under GPL 3 since it uses [libsignal-node](https://git.questbook.io/backend/service-coderunner/-/merge_requests/1)
+ {
+ "level": 10,
+ "fromMe": false,
+ "frame": {
+ "tag": "ib",
+ "attrs": {
+ "from": "@s.whatsapp.net"
+ },
+ "content": [
+ {
+ "tag": "edge_routing",
+ "attrs": {},
+ "content": [
+ {
+ "tag": "routing_info",
+ "attrs": {},
+ "content": {
+ "type": "Buffer",
+ "data": [8,2,8,5]
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "msg":"communication"
+ }
+ ```
+
+The `'frame'` is what the message received is, it has three components:
+- `tag` -- what this frame is about (eg. message will have 'message')
+- `attrs` -- a string key-value pair with some metadata (contains ID of the message usually)
+- `content` -- the actual data (eg. a message node will have the actual message content in it)
+- read more about this format [here](/src/WABinary/readme.md)
+
+### Register a Callback for Websocket Events
+
+> [!TIP]
+> Recommended to see `onMessageReceived` function in `socket.ts` file to understand how websockets events are fired
+
+```ts
+// for any message with tag 'edge_routing'
+sock.ws.on('CB:edge_routing', (node: BinaryNode) => { })
+
+// for any message with tag 'edge_routing' and id attribute = abcd
+sock.ws.on('CB:edge_routing,id:abcd', (node: BinaryNode) => { })
+
+// for any message with tag 'edge_routing', id attribute = abcd & first content node routing_info
+sock.ws.on('CB:edge_routing,id:abcd,routing_info', (node: BinaryNode) => { })
+```
+
+> [!NOTE]
+> Also, this repo is now licenced under GPL 3 since it uses [libsignal-node](https://git.questbook.io/backend/service-coderunner/-/merge_requests/1)
diff --git a/whatsapp_addon/Baileys/WAProto/GenerateStatics.sh b/whatsapp_addon/Baileys/WAProto/GenerateStatics.sh
index 71de24f8..7d77a28c 100644
--- a/whatsapp_addon/Baileys/WAProto/GenerateStatics.sh
+++ b/whatsapp_addon/Baileys/WAProto/GenerateStatics.sh
@@ -1,4 +1,4 @@
yarn pbjs -t static-module -w commonjs -o ./WAProto/index.js ./WAProto/WAProto.proto;
yarn pbts -o ./WAProto/index.d.ts ./WAProto/index.js;
-#protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_opt=env=node,useOptionals=true,forceLong=long --ts_proto_out=. ./src/Binary/WAMessage.proto;
+#protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_opt=env=node,useOptionals=true,forceLong=long --ts_proto_out=. ./src/Binary/WAMessage.proto;
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/WASignalGroup/ciphertext_message.js b/whatsapp_addon/Baileys/WASignalGroup/ciphertext_message.js
index 97480604..f9bb771f 100644
--- a/whatsapp_addon/Baileys/WASignalGroup/ciphertext_message.js
+++ b/whatsapp_addon/Baileys/WASignalGroup/ciphertext_message.js
@@ -13,4 +13,4 @@ class CiphertextMessage {
ENCRYPTED_MESSAGE_OVERHEAD = 53;
}
-module.exports = CiphertextMessage;
+module.exports = CiphertextMessage;
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/WASignalGroup/generate-proto.sh b/whatsapp_addon/Baileys/WASignalGroup/generate-proto.sh
index 08f644cb..051876d2 100644
--- a/whatsapp_addon/Baileys/WASignalGroup/generate-proto.sh
+++ b/whatsapp_addon/Baileys/WASignalGroup/generate-proto.sh
@@ -1 +1 @@
-yarn pbjs -t static-module -w commonjs -o ./WASignalGroup/GroupProtocol.js ./WASignalGroup/group.proto
+yarn pbjs -t static-module -w commonjs -o ./WASignalGroup/GroupProtocol.js ./WASignalGroup/group.proto
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/WASignalGroup/group.proto b/whatsapp_addon/Baileys/WASignalGroup/group.proto
index 5ae6f372..e6f549b4 100644
--- a/whatsapp_addon/Baileys/WASignalGroup/group.proto
+++ b/whatsapp_addon/Baileys/WASignalGroup/group.proto
@@ -39,4 +39,4 @@ message SenderKeyStateStructure {
message SenderKeyRecordStructure {
repeated SenderKeyStateStructure senderKeyStates = 1;
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/WASignalGroup/group_cipher.js b/whatsapp_addon/Baileys/WASignalGroup/group_cipher.js
index 8417b4ce..2733fa86 100644
--- a/whatsapp_addon/Baileys/WASignalGroup/group_cipher.js
+++ b/whatsapp_addon/Baileys/WASignalGroup/group_cipher.js
@@ -117,4 +117,4 @@ class GroupCipher {
}
}
-module.exports = GroupCipher;
+module.exports = GroupCipher;
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/WASignalGroup/group_session_builder.js b/whatsapp_addon/Baileys/WASignalGroup/group_session_builder.js
index 8dfbd7d7..24c84a25 100644
--- a/whatsapp_addon/Baileys/WASignalGroup/group_session_builder.js
+++ b/whatsapp_addon/Baileys/WASignalGroup/group_session_builder.js
@@ -43,4 +43,4 @@ class GroupSessionBuilder {
);
}
}
-module.exports = GroupSessionBuilder;
+module.exports = GroupSessionBuilder;
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/WASignalGroup/index.js b/whatsapp_addon/Baileys/WASignalGroup/index.js
index 6a60c5e0..69b935d7 100644
--- a/whatsapp_addon/Baileys/WASignalGroup/index.js
+++ b/whatsapp_addon/Baileys/WASignalGroup/index.js
@@ -2,4 +2,4 @@ module.exports.GroupSessionBuilder = require('./group_session_builder')
module.exports.SenderKeyDistributionMessage = require('./sender_key_distribution_message')
module.exports.SenderKeyRecord = require('./sender_key_record')
module.exports.SenderKeyName = require('./sender_key_name')
-module.exports.GroupCipher = require('./group_cipher')
+module.exports.GroupCipher = require('./group_cipher')
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/WASignalGroup/protobufs.js b/whatsapp_addon/Baileys/WASignalGroup/protobufs.js
index b2cb82cc..76daa5cd 100644
--- a/whatsapp_addon/Baileys/WASignalGroup/protobufs.js
+++ b/whatsapp_addon/Baileys/WASignalGroup/protobufs.js
@@ -1,3 +1,3 @@
const { groupproto } = require('./GroupProtocol')
-module.exports = groupproto
+module.exports = groupproto
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/WASignalGroup/queue_job.js b/whatsapp_addon/Baileys/WASignalGroup/queue_job.js
index c01e2cc9..df0c3249 100644
--- a/whatsapp_addon/Baileys/WASignalGroup/queue_job.js
+++ b/whatsapp_addon/Baileys/WASignalGroup/queue_job.js
@@ -66,4 +66,4 @@ module.exports = function (bucket, awaitable) {
_asyncQueueExecutor(queue, () => _queueAsyncBuckets.delete(bucket));
}
return job;
-};
+};
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/WASignalGroup/readme.md b/whatsapp_addon/Baileys/WASignalGroup/readme.md
index 005e12c1..8290d9c1 100644
--- a/whatsapp_addon/Baileys/WASignalGroup/readme.md
+++ b/whatsapp_addon/Baileys/WASignalGroup/readme.md
@@ -3,4 +3,4 @@
This contains the code to decrypt/encrypt WA group messages.
Originally from [pokearaujo/libsignal-node](https://github.com/pokearaujo/libsignal-node)
-The code has been moved outside the signal package as I felt it didn't belong in ths signal package, as it isn't inherently a part of signal but of WA.
+The code has been moved outside the signal package as I felt it didn't belong in ths signal package, as it isn't inherently a part of signal but of WA.
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/WASignalGroup/sender_chain_key.js b/whatsapp_addon/Baileys/WASignalGroup/sender_chain_key.js
index 296c934d..9a3125b4 100644
--- a/whatsapp_addon/Baileys/WASignalGroup/sender_chain_key.js
+++ b/whatsapp_addon/Baileys/WASignalGroup/sender_chain_key.js
@@ -47,4 +47,4 @@ class SenderChainKey {
}
}
-module.exports = SenderChainKey;
+module.exports = SenderChainKey;
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/WASignalGroup/sender_key_distribution_message.js b/whatsapp_addon/Baileys/WASignalGroup/sender_key_distribution_message.js
index 851b842b..9c1400fa 100644
--- a/whatsapp_addon/Baileys/WASignalGroup/sender_key_distribution_message.js
+++ b/whatsapp_addon/Baileys/WASignalGroup/sender_key_distribution_message.js
@@ -75,4 +75,4 @@ class SenderKeyDistributionMessage extends CiphertextMessage {
}
}
-module.exports = SenderKeyDistributionMessage;
+module.exports = SenderKeyDistributionMessage;
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/WASignalGroup/sender_key_message.js b/whatsapp_addon/Baileys/WASignalGroup/sender_key_message.js
index fe8ee058..288aeba4 100644
--- a/whatsapp_addon/Baileys/WASignalGroup/sender_key_message.js
+++ b/whatsapp_addon/Baileys/WASignalGroup/sender_key_message.js
@@ -89,4 +89,4 @@ class SenderKeyMessage extends CiphertextMessage {
}
}
-module.exports = SenderKeyMessage;
+module.exports = SenderKeyMessage;
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/WASignalGroup/sender_key_name.js b/whatsapp_addon/Baileys/WASignalGroup/sender_key_name.js
index e2575811..e7f52904 100644
--- a/whatsapp_addon/Baileys/WASignalGroup/sender_key_name.js
+++ b/whatsapp_addon/Baileys/WASignalGroup/sender_key_name.js
@@ -67,4 +67,4 @@ class SenderKeyName {
}
}
-module.exports = SenderKeyName;
+module.exports = SenderKeyName;
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/WASignalGroup/sender_key_record.js b/whatsapp_addon/Baileys/WASignalGroup/sender_key_record.js
index 1c5da9e8..8112efaa 100644
--- a/whatsapp_addon/Baileys/WASignalGroup/sender_key_record.js
+++ b/whatsapp_addon/Baileys/WASignalGroup/sender_key_record.js
@@ -53,4 +53,4 @@ class SenderKeyRecord {
}
}
- module.exports = SenderKeyRecord;
+ module.exports = SenderKeyRecord;
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/WASignalGroup/sender_key_state.js b/whatsapp_addon/Baileys/WASignalGroup/sender_key_state.js
index d1343f03..c3e0fc99 100644
--- a/whatsapp_addon/Baileys/WASignalGroup/sender_key_state.js
+++ b/whatsapp_addon/Baileys/WASignalGroup/sender_key_state.js
@@ -126,4 +126,4 @@ class SenderKeyState {
}
}
-module.exports = SenderKeyState;
+module.exports = SenderKeyState;
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/WASignalGroup/sender_message_key.js b/whatsapp_addon/Baileys/WASignalGroup/sender_message_key.js
index 50d16b93..76397042 100644
--- a/whatsapp_addon/Baileys/WASignalGroup/sender_message_key.js
+++ b/whatsapp_addon/Baileys/WASignalGroup/sender_message_key.js
@@ -36,4 +36,4 @@ class SenderMessageKey {
return this.seed;
}
}
-module.exports = SenderMessageKey;
+module.exports = SenderMessageKey;
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/jest.config.js b/whatsapp_addon/Baileys/jest.config.js
index 6eb048fb..9d839272 100644
--- a/whatsapp_addon/Baileys/jest.config.js
+++ b/whatsapp_addon/Baileys/jest.config.js
@@ -11,4 +11,4 @@ module.exports = {
moduleNameMapper: {
'^axios$': require.resolve('axios'),
},
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/package.json b/whatsapp_addon/Baileys/package.json
index fb7d76c2..cc2d9c9c 100644
--- a/whatsapp_addon/Baileys/package.json
+++ b/whatsapp_addon/Baileys/package.json
@@ -1,6 +1,6 @@
{
"name": "baileys",
- "version": "6.7.7",
+ "version": "6.7.12",
"description": "WhatsApp API",
"keywords": [
"whatsapp",
@@ -33,10 +33,9 @@
"changelog:preview": "conventional-changelog -p angular -u",
"changelog:update": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
"example": "node --inspect -r ts-node/register Example/example.ts",
- "example:mobile": "node --inspect -r ts-node/register Example/example.ts --mobile",
"gen:protobuf": "sh WAProto/GenerateStatics.sh",
- "lint": "eslint src --ext .js,.ts,.jsx,.tsx",
- "lint:fix": "eslint src --fix --ext .js,.ts,.jsx,.tsx",
+ "lint": "eslint src --ext .js,.ts",
+ "lint:fix": "yarn lint --fix",
"prepack": "tsc",
"prepare": "tsc",
"release": "release-it",
@@ -45,10 +44,11 @@
"dependencies": {
"@adiwajshing/keyed-db": "^0.2.4",
"@hapi/boom": "^9.1.3",
+ "@whiskeysockets/eslint-config": "github:whiskeysockets/eslint-config",
"async-lock": "^1.4.1",
"audio-decode": "^2.1.3",
"axios": "^1.6.0",
- "cache-manager": "4.0.1",
+ "cache-manager": "^5.7.6",
"futoin-hkdf": "^1.5.1",
"libphonenumber-js": "^1.10.20",
"libsignal": "git+https://github.com/giuseppecastaldo/libsignal-node",
@@ -61,7 +61,6 @@
"ws": "^8.13.0"
},
"devDependencies": {
- "@adiwajshing/eslint-config": "github:adiwajshing/eslint-config",
"@types/got": "^9.6.11",
"@types/jest": "^27.5.1",
"@types/node": "^16.0.0",
diff --git a/whatsapp_addon/Baileys/proto-extract/.gitignore b/whatsapp_addon/Baileys/proto-extract/.gitignore
index fd4f2b06..28f1ba75 100644
--- a/whatsapp_addon/Baileys/proto-extract/.gitignore
+++ b/whatsapp_addon/Baileys/proto-extract/.gitignore
@@ -1,2 +1,2 @@
node_modules
-.DS_Store
+.DS_Store
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Defaults/baileys-version.json b/whatsapp_addon/Baileys/src/Defaults/baileys-version.json
index 0e742e87..0a90cdd8 100644
--- a/whatsapp_addon/Baileys/src/Defaults/baileys-version.json
+++ b/whatsapp_addon/Baileys/src/Defaults/baileys-version.json
@@ -1,3 +1,3 @@
{
- "version": [2, 3000, 1015901307]
+ "version": [2, 3000, 1019707846]
}
diff --git a/whatsapp_addon/Baileys/src/Defaults/index.ts b/whatsapp_addon/Baileys/src/Defaults/index.ts
index d9c4bdf0..62bcecba 100644
--- a/whatsapp_addon/Baileys/src/Defaults/index.ts
+++ b/whatsapp_addon/Baileys/src/Defaults/index.ts
@@ -1,43 +1,25 @@
-import { createHash } from 'crypto'
import { proto } from '../../WAProto'
import { makeLibSignalRepository } from '../Signal/libsignal'
import type { AuthenticationState, MediaType, SocketConfig, WAVersion } from '../Types'
import { Browsers } from '../Utils'
import logger from '../Utils/logger'
import { version } from './baileys-version.json'
-import phoneNumberMCC from './phonenumber-mcc.json'
export const UNAUTHORIZED_CODES = [401, 403, 419]
-export const PHONENUMBER_MCC = phoneNumberMCC
-
export const DEFAULT_ORIGIN = 'https://web.whatsapp.com'
-export const MOBILE_ENDPOINT = 'g.whatsapp.net'
-export const MOBILE_PORT = 443
export const DEF_CALLBACK_PREFIX = 'CB:'
export const DEF_TAG_PREFIX = 'TAG:'
export const PHONE_CONNECTION_CB = 'CB:Pong'
export const WA_DEFAULT_EPHEMERAL = 7 * 24 * 60 * 60
-const WA_VERSION = '2.24.6.77'
-
-const WA_VERSION_HASH = createHash('md5').update(WA_VERSION).digest('hex')
-export const MOBILE_TOKEN = Buffer.from('0a1mLfGUIBVrMKF1RdvLI5lkRBvof6vn0fD2QRSM' + WA_VERSION_HASH)
-export const MOBILE_REGISTRATION_ENDPOINT = 'https://v.whatsapp.net/v2'
-export const MOBILE_USERAGENT = `WhatsApp/${WA_VERSION} iOS/15.3.1 Device/Apple-iPhone_7`
-export const REGISTRATION_PUBLIC_KEY = Buffer.from([
- 5, 142, 140, 15, 116, 195, 235, 197, 215, 166, 134, 92, 108, 60, 132, 56, 86, 176, 97, 33, 204, 232, 234, 119, 77,
- 34, 251, 111, 18, 37, 18, 48, 45,
-])
export const NOISE_MODE = 'Noise_XX_25519_AESGCM_SHA256\0\0\0\0'
export const DICT_VERSION = 2
export const KEY_BUNDLE_TYPE = Buffer.from([5])
export const NOISE_WA_HEADER = Buffer.from(
[ 87, 65, 6, DICT_VERSION ]
) // last is "DICT_VERSION"
-export const PROTOCOL_VERSION = [5, 2]
-export const MOBILE_NOISE_HEADER = Buffer.concat([Buffer.from('WA'), Buffer.from(PROTOCOL_VERSION)])
/** from: https://stackoverflow.com/questions/3809401/what-is-a-good-regular-expression-to-match-a-url */
export const URL_REGEX = /(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/
@@ -81,6 +63,7 @@ export const DEFAULT_CONNECTION_CONFIG: SocketConfig = {
patch: false,
snapshot: false,
},
+ countryCode: 'US',
getMessage: async() => undefined,
cachedGroupMetadata: async() => undefined,
makeSignalRepository: makeLibSignalRepository
diff --git a/whatsapp_addon/Baileys/src/Signal/libsignal.ts b/whatsapp_addon/Baileys/src/Signal/libsignal.ts
index bb562e78..367cdb86 100644
--- a/whatsapp_addon/Baileys/src/Signal/libsignal.ts
+++ b/whatsapp_addon/Baileys/src/Signal/libsignal.ts
@@ -138,4 +138,4 @@ function signalStorage({ creds, keys }: SignalAuthState) {
}
}
}
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Socket/Client/index.ts b/whatsapp_addon/Baileys/src/Socket/Client/index.ts
index d773c265..d5e782c7 100644
--- a/whatsapp_addon/Baileys/src/Socket/Client/index.ts
+++ b/whatsapp_addon/Baileys/src/Socket/Client/index.ts
@@ -1,3 +1,2 @@
-export * from './abstract-socket-client'
-export * from './mobile-socket-client'
-export * from './web-socket-client'
+export * from './types'
+export * from './websocket'
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Socket/Client/mobile-socket-client.ts b/whatsapp_addon/Baileys/src/Socket/Client/mobile-socket-client.ts
deleted file mode 100644
index 90cc63ca..00000000
--- a/whatsapp_addon/Baileys/src/Socket/Client/mobile-socket-client.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-import { connect, Socket } from 'net'
-import { AbstractSocketClient } from './abstract-socket-client'
-
-export class MobileSocketClient extends AbstractSocketClient {
- protected socket: Socket | null = null
-
- get isOpen(): boolean {
- return this.socket?.readyState === 'open'
- }
- get isClosed(): boolean {
- return this.socket === null || this.socket?.readyState === 'closed'
- }
- get isClosing(): boolean {
- return this.socket === null || this.socket?.readyState === 'closed'
- }
- get isConnecting(): boolean {
- return this.socket?.readyState === 'opening'
- }
-
- async connect(): Promise {
- if(this.socket) {
- return
- }
-
- if(this.config.agent) {
-
- throw new Error('There are not support for proxy agent for mobile connection')
- } else {
- this.socket = connect({
- host: this.url.hostname,
- port: Number(this.url.port) || 443
- })
- }
-
- this.socket.setMaxListeners(0)
-
- const events = ['close', 'connect', 'data', 'drain', 'end', 'error', 'lookup', 'ready', 'timeout']
-
- for(const event of events) {
- this.socket?.on(event, (...args: any[]) => this.emit(event, ...args))
- }
-
- this.socket.on('data', (...args: any[]) => this.emit('message', ...args))
- this.socket.on('ready', (...args: any[]) => this.emit('open', ...args))
- }
-
- async close(): Promise {
- if(!this.socket) {
- return
- }
-
- return new Promise(resolve => {
- this.socket!.end(resolve)
- this.socket = null
- })
- }
-
- send(str: string | Uint8Array, cb?: (err?: Error) => void): boolean {
- if(this.socket === null) {
- return false
- }
-
- return this.socket.write(str, undefined, cb)
- }
-
-}
diff --git a/whatsapp_addon/Baileys/src/Socket/Client/abstract-socket-client.ts b/whatsapp_addon/Baileys/src/Socket/Client/types.ts
similarity index 99%
rename from whatsapp_addon/Baileys/src/Socket/Client/abstract-socket-client.ts
rename to whatsapp_addon/Baileys/src/Socket/Client/types.ts
index c355de4f..5d78298c 100644
--- a/whatsapp_addon/Baileys/src/Socket/Client/abstract-socket-client.ts
+++ b/whatsapp_addon/Baileys/src/Socket/Client/types.ts
@@ -16,4 +16,4 @@ export abstract class AbstractSocketClient extends EventEmitter {
abstract connect(): Promise
abstract close(): Promise
abstract send(str: Uint8Array | string, cb?: (err?: Error) => void): boolean;
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Socket/Client/web-socket-client.ts b/whatsapp_addon/Baileys/src/Socket/Client/websocket.ts
similarity index 95%
rename from whatsapp_addon/Baileys/src/Socket/Client/web-socket-client.ts
rename to whatsapp_addon/Baileys/src/Socket/Client/websocket.ts
index 987d0afb..ea8ddfd3 100644
--- a/whatsapp_addon/Baileys/src/Socket/Client/web-socket-client.ts
+++ b/whatsapp_addon/Baileys/src/Socket/Client/websocket.ts
@@ -1,6 +1,6 @@
import WebSocket from 'ws'
import { DEFAULT_ORIGIN } from '../../Defaults'
-import { AbstractSocketClient } from './abstract-socket-client'
+import { AbstractSocketClient } from './types'
export class WebSocketClient extends AbstractSocketClient {
diff --git a/whatsapp_addon/Baileys/src/Socket/chats.ts b/whatsapp_addon/Baileys/src/Socket/chats.ts
index 7385d097..81b572b5 100644
--- a/whatsapp_addon/Baileys/src/Socket/chats.ts
+++ b/whatsapp_addon/Baileys/src/Socket/chats.ts
@@ -3,11 +3,13 @@ import NodeCache from 'node-cache'
import { proto } from '../../WAProto'
import { DEFAULT_CACHE_TTLS, PROCESSABLE_HISTORY_TYPES } from '../Defaults'
import { ALL_WA_PATCH_NAMES, ChatModification, ChatMutation, LTHashState, MessageUpsertType, PresenceData, SocketConfig, WABusinessHoursConfig, WABusinessProfile, WAMediaUpload, WAMessage, WAPatchCreate, WAPatchName, WAPresence, WAPrivacyCallValue, WAPrivacyGroupAddValue, WAPrivacyOnlineValue, WAPrivacyValue, WAReadReceiptsValue } from '../Types'
+import { LabelActionBody } from '../Types/Label'
import { chatModificationToAppPatch, ChatMutationMap, decodePatches, decodeSyncdSnapshot, encodeSyncdPatch, extractSyncdPatches, generateProfilePicture, getHistoryMsg, newLTHashState, processSyncAction } from '../Utils'
import { makeMutex } from '../Utils/make-mutex'
import processMessage from '../Utils/process-message'
import { BinaryNode, getBinaryNodeChild, getBinaryNodeChildren, jidNormalizedUser, reduceBinaryNodeToDictionary, S_WHATSAPP_NET } from '../WABinary'
-import { makeSocket } from './socket'
+import { USyncQuery, USyncUser } from '../WAUSync'
+import { makeUSyncSocket } from './usync'
const MAX_SYNC_ATTEMPTS = 2
@@ -20,7 +22,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
shouldIgnoreJid,
shouldSyncHistoryMessage,
} = config
- const sock = makeSocket(config)
+ const sock = makeUSyncSocket(config)
const {
ev,
ws,
@@ -138,93 +140,67 @@ export const makeChatsSocket = (config: SocketConfig) => {
})
}
- /** helper function to run a generic IQ query */
- const interactiveQuery = async(userNodes: BinaryNode[], queryNode: BinaryNode) => {
- const result = await query({
- tag: 'iq',
- attrs: {
- to: S_WHATSAPP_NET,
- type: 'get',
- xmlns: 'usync',
- },
- content: [
- {
- tag: 'usync',
- attrs: {
- sid: generateMessageTag(),
- mode: 'query',
- last: 'true',
- index: '0',
- context: 'interactive',
- },
- content: [
- {
- tag: 'query',
- attrs: {},
- content: [queryNode]
- },
- {
- tag: 'list',
- attrs: {},
- content: userNodes
- }
- ]
- }
- ],
- })
+ const onWhatsApp = async(...jids: string[]) => {
+ const usyncQuery = new USyncQuery()
+ .withContactProtocol()
- const usyncNode = getBinaryNodeChild(result, 'usync')
- const listNode = getBinaryNodeChild(usyncNode, 'list')
- const users = getBinaryNodeChildren(listNode, 'user')
+ for(const jid of jids) {
+ const phone = `+${jid.replace('+', '').split('@')[0].split(':')[0]}`
+ usyncQuery.withUser(new USyncUser().withPhone(phone))
+ }
+
+ const results = await sock.executeUSyncQuery(usyncQuery)
- return users
+ if(results) {
+ return results.list.filter((a) => !!a.contact).map(({ contact, id }) => ({ jid: id, exists: contact }))
+ }
}
- const onWhatsApp = async(...jids: string[]) => {
- const query = { tag: 'contact', attrs: {} }
- const list = jids.map((jid) => {
- // insures only 1 + is there
- const content = `+${jid.replace('+', '')}`
+ const fetchStatus = async(...jids: string[]) => {
+ const usyncQuery = new USyncQuery()
+ .withStatusProtocol()
- return {
- tag: 'user',
- attrs: {},
- content: [{
- tag: 'contact',
- attrs: {},
- content,
- }],
- }
- })
- const results = await interactiveQuery(list, query)
+ for(const jid of jids) {
+ usyncQuery.withUser(new USyncUser().withId(jid))
+ }
- return results.map(user => {
- const contact = getBinaryNodeChild(user, 'contact')
- return { exists: contact?.attrs.type === 'in', jid: user.attrs.jid }
- }).filter(item => item.exists)
+ const result = await sock.executeUSyncQuery(usyncQuery)
+ if(result) {
+ return result.list
+ }
}
- const fetchStatus = async(jid: string) => {
- const [result] = await interactiveQuery(
- [{ tag: 'user', attrs: { jid } }],
- { tag: 'status', attrs: {} }
- )
+ const fetchDisappearingDuration = async(...jids: string[]) => {
+ const usyncQuery = new USyncQuery()
+ .withDisappearingModeProtocol()
+
+ for(const jid of jids) {
+ usyncQuery.withUser(new USyncUser().withId(jid))
+ }
+
+ const result = await sock.executeUSyncQuery(usyncQuery)
if(result) {
- const status = getBinaryNodeChild(result, 'status')
- return {
- status: status?.content!.toString(),
- setAt: new Date(+(status?.attrs.t || 0) * 1000)
- }
+ return result.list
}
}
/** update the profile picture for yourself or a group */
const updateProfilePicture = async(jid: string, content: WAMediaUpload) => {
+ let targetJid
+ if(!jid) {
+ throw new Boom('Illegal no-jid profile update. Please specify either your ID or the ID of the chat you wish to update')
+ }
+
+ if(jidNormalizedUser(jid) !== jidNormalizedUser(authState.creds.me!.id)) {
+ targetJid = jidNormalizedUser(jid) // in case it is someone other than us
+ }
+
const { img } = await generateProfilePicture(content)
await query({
tag: 'iq',
attrs: {
- to: jidNormalizedUser(jid),
+ target: targetJid,
+ to: S_WHATSAPP_NET,
type: 'set',
xmlns: 'w:profile:picture'
},
@@ -240,10 +216,20 @@ export const makeChatsSocket = (config: SocketConfig) => {
/** remove the profile picture for yourself or a group */
const removeProfilePicture = async(jid: string) => {
+ let targetJid
+ if(!jid) {
+ throw new Boom('Illegal no-jid profile update. Please specify either your ID or the ID of the chat you wish to update')
+ }
+
+ if(jidNormalizedUser(jid) !== jidNormalizedUser(authState.creds.me!.id)) {
+ targetJid = jidNormalizedUser(jid) // in case it is someone other than us
+ }
+
await query({
tag: 'iq',
attrs: {
- to: jidNormalizedUser(jid),
+ target: targetJid,
+ to: S_WHATSAPP_NET,
type: 'set',
xmlns: 'w:profile:picture'
}
@@ -752,8 +738,11 @@ export const makeChatsSocket = (config: SocketConfig) => {
let props: { [_: string]: string } = {}
if(propsNode) {
- authState.creds.lastPropHash = propsNode?.attrs?.hash
- ev.emit('creds.update', authState.creds)
+ if(propsNode.attrs?.hash) { // on some clients, the hash is returning as undefined
+ authState.creds.lastPropHash = propsNode?.attrs?.hash
+ ev.emit('creds.update', authState.creds)
+ }
+
props = reduceBinaryNodeToDictionary(propsNode, 'prop')
}
@@ -784,6 +773,17 @@ export const makeChatsSocket = (config: SocketConfig) => {
}, jid)
}
+ /**
+ * Adds label
+ */
+ const addLabel = (jid: string, labels: LabelActionBody) => {
+ return chatModify({
+ addLabel: {
+ ...labels
+ }
+ }, jid)
+ }
+
/**
* Adds label for the chats
*/
@@ -964,14 +964,13 @@ export const makeChatsSocket = (config: SocketConfig) => {
)
}
- if(receivedPendingNotifications) {
- // if we don't have the app state key
+ if(receivedPendingNotifications && // if we don't have the app state key
// we keep buffering events until we finally have
// the key and can sync the messages
- if(!authState.creds?.myAppStateKeyId && !config.mobile) {
- ev.buffer()
- needToFlushWithAppStateSync = true
- }
+ // todo scrutinize
+ !authState.creds?.myAppStateKeyId) {
+ ev.buffer()
+ needToFlushWithAppStateSync = true
}
})
@@ -987,6 +986,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
onWhatsApp,
fetchBlocklist,
fetchStatus,
+ fetchDisappearingDuration,
updateProfilePicture,
removeProfilePicture,
updateProfileStatus,
@@ -1004,6 +1004,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
resyncAppState,
chatModify,
cleanDirtyBits,
+ addLabel,
addChatLabel,
removeChatLabel,
addMessageLabel,
diff --git a/whatsapp_addon/Baileys/src/Socket/index.ts b/whatsapp_addon/Baileys/src/Socket/index.ts
index 0ef69a32..30d8871d 100644
--- a/whatsapp_addon/Baileys/src/Socket/index.ts
+++ b/whatsapp_addon/Baileys/src/Socket/index.ts
@@ -1,13 +1,13 @@
import { DEFAULT_CONNECTION_CONFIG } from '../Defaults'
import { UserFacingSocketConfig } from '../Types'
-import { makeRegistrationSocket as _makeSocket } from './registration'
+import { makeBusinessSocket } from './business'
// export the last socket layer
const makeWASocket = (config: UserFacingSocketConfig) => (
- _makeSocket({
+ makeBusinessSocket({
...DEFAULT_CONNECTION_CONFIG,
...config
})
)
-export default makeWASocket
+export default makeWASocket
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Socket/messages-recv.ts b/whatsapp_addon/Baileys/src/Socket/messages-recv.ts
index 79c2cdf2..85160d03 100644
--- a/whatsapp_addon/Baileys/src/Socket/messages-recv.ts
+++ b/whatsapp_addon/Baileys/src/Socket/messages-recv.ts
@@ -20,6 +20,8 @@ import {
getHistoryMsg,
getNextPreKeys,
getStatusFromReceiptType, hkdf,
+ MISSING_KEYS_ERROR_TEXT,
+ NACK_REASONS,
NO_MESSAGE_FOUND_ERROR_TEXT,
unixTimestampSeconds,
xmppPreKey,
@@ -89,16 +91,20 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
let sendActiveReceipts = false
- const sendMessageAck = async({ tag, attrs, content }: BinaryNode) => {
+ const sendMessageAck = async({ tag, attrs, content }: BinaryNode, errorCode?: number) => {
const stanza: BinaryNode = {
tag: 'ack',
attrs: {
id: attrs.id,
to: attrs.from,
- class: tag,
+ class: tag
}
}
+ if(!!errorCode) {
+ stanza.attrs.error = errorCode.toString()
+ }
+
if(!!attrs.participant) {
stanza.attrs.participant = attrs.participant
}
@@ -107,7 +113,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
stanza.attrs.recipient = attrs.recipient
}
- if(!!attrs.type && (tag !== 'message' || getBinaryNodeChild({ tag, attrs, content }, 'unavailable'))) {
+ if(!!attrs.type && (tag !== 'message' || getBinaryNodeChild({ tag, attrs, content }, 'unavailable') || errorCode !== 0)) {
stanza.attrs.type = attrs.type
}
@@ -342,7 +348,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
break
case 'membership_approval_mode':
- const approvalMode: any = getBinaryNodeChild(child, 'group_join')
+ const approvalMode = getBinaryNodeChild(child, 'group_join')
if(approvalMode) {
msg.messageStubType = WAMessageStubType.GROUP_MEMBERSHIP_JOIN_APPROVAL_MODE
msg.messageStubParameters = [ approvalMode.attrs.state ]
@@ -574,8 +580,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
logger.debug({ participant, sendToAll }, 'forced new session for retry recp')
- for(let i = 0; i < msgs.length;i++) {
- const msg = msgs[i]
+ for(const [i, msg] of msgs.entries()) {
if(msg) {
updateSendMessageAgainCount(ids[i], participant)
const msgRelayOpts: MessageRelayOptions = { messageId: ids[i] }
@@ -622,67 +627,70 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
ids.push(...items.map(i => i.attrs.id))
}
- await Promise.all([
- processingMutex.mutex(
- async() => {
- const status = getStatusFromReceiptType(attrs.type)
- if(
- typeof status !== 'undefined' &&
- (
- // basically, we only want to know when a message from us has been delivered to/read by the other person
- // or another device of ours has read some messages
- status > proto.WebMessageInfo.Status.DELIVERY_ACK ||
- !isNodeFromMe
- )
- ) {
- if(isJidGroup(remoteJid) || isJidStatusBroadcast(remoteJid)) {
- if(attrs.participant) {
- const updateKey: keyof MessageUserReceipt = status === proto.WebMessageInfo.Status.DELIVERY_ACK ? 'receiptTimestamp' : 'readTimestamp'
+ try {
+ await Promise.all([
+ processingMutex.mutex(
+ async() => {
+ const status = getStatusFromReceiptType(attrs.type)
+ if(
+ typeof status !== 'undefined' &&
+ (
+ // basically, we only want to know when a message from us has been delivered to/read by the other person
+ // or another device of ours has read some messages
+ status > proto.WebMessageInfo.Status.DELIVERY_ACK ||
+ !isNodeFromMe
+ )
+ ) {
+ if(isJidGroup(remoteJid) || isJidStatusBroadcast(remoteJid)) {
+ if(attrs.participant) {
+ const updateKey: keyof MessageUserReceipt = status === proto.WebMessageInfo.Status.DELIVERY_ACK ? 'receiptTimestamp' : 'readTimestamp'
+ ev.emit(
+ 'message-receipt.update',
+ ids.map(id => ({
+ key: { ...key, id },
+ receipt: {
+ userJid: jidNormalizedUser(attrs.participant),
+ [updateKey]: +attrs.t
+ }
+ }))
+ )
+ }
+ } else {
ev.emit(
- 'message-receipt.update',
+ 'messages.update',
ids.map(id => ({
key: { ...key, id },
- receipt: {
- userJid: jidNormalizedUser(attrs.participant),
- [updateKey]: +attrs.t
- }
+ update: { status }
}))
)
}
- } else {
- ev.emit(
- 'messages.update',
- ids.map(id => ({
- key: { ...key, id },
- update: { status }
- }))
- )
}
- }
- if(attrs.type === 'retry') {
- // correctly set who is asking for the retry
- key.participant = key.participant || attrs.from
- const retryNode = getBinaryNodeChild(node, 'retry')
- if(willSendMessageAgain(ids[0], key.participant)) {
- if(key.fromMe) {
- try {
- logger.debug({ attrs, key }, 'recv retry request')
- await sendMessagesAgain(key, ids, retryNode!)
- } catch(error) {
- logger.error({ key, ids, trace: error.stack }, 'error in sending message again')
+ if(attrs.type === 'retry') {
+ // correctly set who is asking for the retry
+ key.participant = key.participant || attrs.from
+ const retryNode = getBinaryNodeChild(node, 'retry')
+ if(willSendMessageAgain(ids[0], key.participant)) {
+ if(key.fromMe) {
+ try {
+ logger.debug({ attrs, key }, 'recv retry request')
+ await sendMessagesAgain(key, ids, retryNode!)
+ } catch(error) {
+ logger.error({ key, ids, trace: error.stack }, 'error in sending message again')
+ }
+ } else {
+ logger.info({ attrs, key }, 'recv retry for not fromMe message')
}
} else {
- logger.info({ attrs, key }, 'recv retry for not fromMe message')
+ logger.info({ attrs, key }, 'will not send message again, as sent too many times')
}
- } else {
- logger.info({ attrs, key }, 'will not send message again, as sent too many times')
}
}
- }
- ),
- sendMessageAck(node)
- ])
+ )
+ ])
+ } finally {
+ await sendMessageAck(node)
+ }
}
const handleNotification = async(node: BinaryNode) => {
@@ -693,29 +701,32 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
return
}
- await Promise.all([
- processingMutex.mutex(
- async() => {
- const msg = await processNotification(node)
- if(msg) {
- const fromMe = areJidsSameUser(node.attrs.participant || remoteJid, authState.creds.me!.id)
- msg.key = {
- remoteJid,
- fromMe,
- participant: node.attrs.participant,
- id: node.attrs.id,
- ...(msg.key || {})
- }
- msg.participant ??= node.attrs.participant
- msg.messageTimestamp = +node.attrs.t
+ try {
+ await Promise.all([
+ processingMutex.mutex(
+ async() => {
+ const msg = await processNotification(node)
+ if(msg) {
+ const fromMe = areJidsSameUser(node.attrs.participant || remoteJid, authState.creds.me!.id)
+ msg.key = {
+ remoteJid,
+ fromMe,
+ participant: node.attrs.participant,
+ id: node.attrs.id,
+ ...(msg.key || {})
+ }
+ msg.participant ??= node.attrs.participant
+ msg.messageTimestamp = +node.attrs.t
- const fullMsg = proto.WebMessageInfo.fromObject(msg)
- await upsertMessage(fullMsg, 'append')
+ const fullMsg = proto.WebMessageInfo.fromObject(msg)
+ await upsertMessage(fullMsg, 'append')
+ }
}
- }
- ),
- sendMessageAck(node)
- ])
+ )
+ ])
+ } finally {
+ await sendMessageAck(node)
+ }
}
const handleMessage = async(node: BinaryNode) => {
@@ -755,68 +766,75 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
msg.messageStubParameters = [NO_MESSAGE_FOUND_ERROR_TEXT, response]
}
- if(msg.message?.protocolMessage?.type === proto.Message.ProtocolMessage.Type.SHARE_PHONE_NUMBER) {
- if(node.attrs.sender_pn) {
- ev.emit('chats.phoneNumberShare', { lid: node.attrs.from, jid: node.attrs.sender_pn })
- }
+ if(msg.message?.protocolMessage?.type === proto.Message.ProtocolMessage.Type.SHARE_PHONE_NUMBER && node.attrs.sender_pn) {
+ ev.emit('chats.phoneNumberShare', { lid: node.attrs.from, jid: node.attrs.sender_pn })
}
- await Promise.all([
- processingMutex.mutex(
- async() => {
- await decrypt()
- // message failed to decrypt
- if(msg.messageStubType === proto.WebMessageInfo.StubType.CIPHERTEXT) {
- retryMutex.mutex(
- async() => {
- if(ws.isOpen) {
- if(getBinaryNodeChild(node, 'unavailable')) {
- return
- }
+ try {
+ await Promise.all([
+ processingMutex.mutex(
+ async() => {
+ await decrypt()
+ // message failed to decrypt
+ if(msg.messageStubType === proto.WebMessageInfo.StubType.CIPHERTEXT) {
+ if(msg?.messageStubParameters?.[0] === MISSING_KEYS_ERROR_TEXT) {
+ return sendMessageAck(node, NACK_REASONS.ParsingError)
+ }
+
+ retryMutex.mutex(
+ async() => {
+ if(ws.isOpen) {
+ if(getBinaryNodeChild(node, 'unavailable')) {
+ return
+ }
- const encNode = getBinaryNodeChild(node, 'enc')
- await sendRetryRequest(node, !encNode)
- if(retryRequestDelayMs) {
- await delay(retryRequestDelayMs)
+ const encNode = getBinaryNodeChild(node, 'enc')
+ await sendRetryRequest(node, !encNode)
+ if(retryRequestDelayMs) {
+ await delay(retryRequestDelayMs)
+ }
+ } else {
+ logger.debug({ node }, 'connection closed, ignoring retry req')
}
- } else {
- logger.debug({ node }, 'connection closed, ignoring retry req')
}
+ )
+ } else {
+ // no type in the receipt => message delivered
+ let type: MessageReceiptType = undefined
+ let participant = msg.key.participant
+ if(category === 'peer') { // special peer message
+ type = 'peer_msg'
+ } else if(msg.key.fromMe) { // message was sent by us from a different device
+ type = 'sender'
+ // need to specially handle this case
+ if(isJidUser(msg.key.remoteJid!)) {
+ participant = author
+ }
+ } else if(!sendActiveReceipts) {
+ type = 'inactive'
}
- )
- } else {
- // no type in the receipt => message delivered
- let type: MessageReceiptType = undefined
- let participant = msg.key.participant
- if(category === 'peer') { // special peer message
- type = 'peer_msg'
- } else if(msg.key.fromMe) { // message was sent by us from a different device
- type = 'sender'
- // need to specially handle this case
- if(isJidUser(msg.key.remoteJid!)) {
- participant = author
- }
- } else if(!sendActiveReceipts) {
- type = 'inactive'
- }
- await sendReceipt(msg.key.remoteJid!, participant!, [msg.key.id!], type)
+ await sendReceipt(msg.key.remoteJid!, participant!, [msg.key.id!], type)
- // send ack for history message
- const isAnyHistoryMsg = getHistoryMsg(msg.message!)
- if(isAnyHistoryMsg) {
- const jid = jidNormalizedUser(msg.key.remoteJid!)
- await sendReceipt(jid, undefined, [msg.key.id!], 'hist_sync')
+ // send ack for history message
+ const isAnyHistoryMsg = getHistoryMsg(msg.message!)
+ if(isAnyHistoryMsg) {
+ const jid = jidNormalizedUser(msg.key.remoteJid!)
+ await sendReceipt(jid, undefined, [msg.key.id!], 'hist_sync')
+ }
}
- }
- cleanMessage(msg, authState.creds.me!.id)
+ cleanMessage(msg, authState.creds.me!.id)
- await upsertMessage(msg, node.attrs.offline ? 'append' : 'notify')
- }
- ),
- sendMessageAck(node)
- ])
+ await sendMessageAck(node)
+
+ await upsertMessage(msg, node.attrs.offline ? 'append' : 'notify')
+ }
+ )
+ ])
+ } catch(error) {
+ logger.error({ error, node }, 'error in handling message')
+ }
}
const fetchMessageHistory = async(
@@ -842,7 +860,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
return sendPeerDataOperationMessage(pdoMessage)
}
- const requestPlaceholderResend = async(messageKey: WAMessageKey): Promise<'RESOLVED'| string | undefined> => {
+ const requestPlaceholderResend = async(messageKey: WAMessageKey): Promise => {
if(!authState.creds.me?.id) {
throw new Boom('Not authenticated')
}
@@ -909,7 +927,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
}
// delete data once call has ended
- if(status === 'reject' || status === 'accept' || status === 'timeout') {
+ if(status === 'reject' || status === 'accept' || status === 'timeout' || status === 'terminate') {
callOfferCache.del(call.id)
}
@@ -920,18 +938,20 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
const handleBadAck = async({ attrs }: BinaryNode) => {
const key: WAMessageKey = { remoteJid: attrs.from, fromMe: true, id: attrs.id }
- // current hypothesis is that if pash is sent in the ack
- // it means -- the message hasn't reached all devices yet
- // we'll retry sending the message here
- if(attrs.phash) {
- logger.info({ attrs }, 'received phash in ack, resending message...')
- const msg = await getMessage(key)
- if(msg) {
- await relayMessage(key.remoteJid!, msg, { messageId: key.id!, useUserDevicesCache: false })
- } else {
- logger.warn({ attrs }, 'could not send message again, as it was not found')
- }
- }
+
+ // WARNING: REFRAIN FROM ENABLING THIS FOR NOW. IT WILL CAUSE A LOOP
+ // // current hypothesis is that if pash is sent in the ack
+ // // it means -- the message hasn't reached all devices yet
+ // // we'll retry sending the message here
+ // if(attrs.phash) {
+ // logger.info({ attrs }, 'received phash in ack, resending message...')
+ // const msg = await getMessage(key)
+ // if(msg) {
+ // await relayMessage(key.remoteJid!, msg, { messageId: key.id!, useUserDevicesCache: false })
+ // } else {
+ // logger.warn({ attrs }, 'could not send message again, as it was not found')
+ // }
+ // }
// error in acknowledgement,
// device could not display the message
@@ -959,35 +979,98 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
const processNodeWithBuffer = async(
node: BinaryNode,
identifier: string,
- exec: (node: BinaryNode) => Promise
+ exec: (node: BinaryNode, offline: boolean) => Promise
) => {
ev.buffer()
await execTask()
ev.flush()
function execTask() {
- return exec(node)
+ return exec(node, false)
.catch(err => onUnexpectedError(err, identifier))
}
}
+ type MessageType = 'message' | 'call' | 'receipt' | 'notification'
+
+ type OfflineNode = {
+ type: MessageType
+ node: BinaryNode
+ }
+
+ const makeOfflineNodeProcessor = () => {
+ const nodeProcessorMap: Map Promise> = new Map([
+ ['message', handleMessage],
+ ['call', handleCall],
+ ['receipt', handleReceipt],
+ ['notification', handleNotification]
+ ])
+ const nodes: OfflineNode[] = []
+ let isProcessing = false
+
+ const enqueue = (type: MessageType, node: BinaryNode) => {
+ nodes.push({ type, node })
+
+ if(isProcessing) {
+ return
+ }
+
+ isProcessing = true
+
+ const promise = async() => {
+ while(nodes.length && ws.isOpen) {
+ const { type, node } = nodes.shift()!
+
+ const nodeProcessor = nodeProcessorMap.get(type)
+
+ if(!nodeProcessor) {
+ onUnexpectedError(
+ new Error(`unknown offline node type: ${type}`),
+ 'processing offline node'
+ )
+ continue
+ }
+
+ await nodeProcessor(node)
+ }
+
+ isProcessing = false
+ }
+
+ promise().catch(error => onUnexpectedError(error, 'processing offline nodes'))
+ }
+
+ return { enqueue }
+ }
+
+ const offlineNodeProcessor = makeOfflineNodeProcessor()
+
+ const processNode = (type: MessageType, node: BinaryNode, identifier: string, exec: (node: BinaryNode) => Promise) => {
+ const isOffline = !!node.attrs.offline
+
+ if(isOffline) {
+ offlineNodeProcessor.enqueue(type, node)
+ } else {
+ processNodeWithBuffer(node, identifier, exec)
+ }
+ }
+
// recv a message
ws.on('CB:message', (node: BinaryNode) => {
- processNodeWithBuffer(node, 'processing message', handleMessage)
+ processNode('message', node, 'processing message', handleMessage)
})
ws.on('CB:call', async(node: BinaryNode) => {
- processNodeWithBuffer(node, 'handling call', handleCall)
+ processNode('call', node, 'handling call', handleCall)
})
ws.on('CB:receipt', node => {
- processNodeWithBuffer(node, 'handling receipt', handleReceipt)
+ processNode('receipt', node, 'handling receipt', handleReceipt)
})
ws.on('CB:notification', async(node: BinaryNode) => {
- processNodeWithBuffer(node, 'handling notification', handleNotification)
+ processNode('notification', node, 'handling notification', handleNotification)
})
-
ws.on('CB:ack,class:message', (node: BinaryNode) => {
handleBadAck(node)
.catch(error => onUnexpectedError(error, 'handling bad ack'))
diff --git a/whatsapp_addon/Baileys/src/Socket/messages-send.ts b/whatsapp_addon/Baileys/src/Socket/messages-send.ts
index 32e88ddb..09c07a8a 100644
--- a/whatsapp_addon/Baileys/src/Socket/messages-send.ts
+++ b/whatsapp_addon/Baileys/src/Socket/messages-send.ts
@@ -7,6 +7,7 @@ import { AnyMessageContent, MediaConnInfo, MessageReceiptType, MessageRelayOptio
import { aggregateMessageKeysNotFromMe, assertMediaContent, bindWaitForEvent, decryptMediaRetryData, encodeSignedDeviceIdentity, encodeWAMessage, encryptMediaRetryRequest, extractDeviceJids, generateMessageIDV2, generateWAMessage, getStatusCodeForMediaRetry, getUrlFromDirectPath, getWAUploadToServer, normalizeMessageContent, parseAndInjectE2ESessions, unixTimestampSeconds } from '../Utils'
import { getUrlInfo } from '../Utils/link-preview'
import { areJidsSameUser, BinaryNode, BinaryNodeAttributes, getBinaryNodeChild, getBinaryNodeChildren, isJidGroup, isJidUser, jidDecode, jidEncode, jidNormalizedUser, JidWithDevice, S_WHATSAPP_NET } from '../WABinary'
+import { USyncQuery, USyncUser } from '../WAUSync'
import { makeGroupsSocket } from './groups'
export const makeMessagesSocket = (config: SocketConfig) => {
@@ -27,7 +28,6 @@ export const makeMessagesSocket = (config: SocketConfig) => {
upsertMessage,
query,
fetchPrivacySettings,
- generateMessageTag,
sendNode,
groupMetadata,
groupToggleEphemeral,
@@ -144,72 +144,54 @@ export const makeMessagesSocket = (config: SocketConfig) => {
logger.debug('not using cache for devices')
}
- const users: BinaryNode[] = []
+ const toFetch: string[] = []
jids = Array.from(new Set(jids))
+
for(let jid of jids) {
const user = jidDecode(jid)?.user
jid = jidNormalizedUser(jid)
+ if(useCache) {
+ const devices = userDevicesCache.get(user!)
+ if(devices) {
+ deviceResults.push(...devices)
- const devices = userDevicesCache.get(user!)
- if(devices && useCache) {
- deviceResults.push(...devices)
-
- logger.trace({ user }, 'using cache for devices')
+ logger.trace({ user }, 'using cache for devices')
+ } else {
+ toFetch.push(jid)
+ }
} else {
- users.push({ tag: 'user', attrs: { jid } })
+ toFetch.push(jid)
}
}
- if(!users.length) {
+ if(!toFetch.length) {
return deviceResults
}
- const iq: BinaryNode = {
- tag: 'iq',
- attrs: {
- to: S_WHATSAPP_NET,
- type: 'get',
- xmlns: 'usync',
- },
- content: [
- {
- tag: 'usync',
- attrs: {
- sid: generateMessageTag(),
- mode: 'query',
- last: 'true',
- index: '0',
- context: 'message',
- },
- content: [
- {
- tag: 'query',
- attrs: { },
- content: [
- {
- tag: 'devices',
- attrs: { version: '2' }
- }
- ]
- },
- { tag: 'list', attrs: { }, content: users }
- ]
- },
- ],
+ const query = new USyncQuery()
+ .withContext('message')
+ .withDeviceProtocol()
+
+ for(const jid of toFetch) {
+ query.withUser(new USyncUser().withId(jid))
}
- const result = await query(iq)
- const extracted = extractDeviceJids(result, authState.creds.me!.id, ignoreZeroDevices)
- const deviceMap: { [_: string]: JidWithDevice[] } = {}
- for(const item of extracted) {
- deviceMap[item.user] = deviceMap[item.user] || []
- deviceMap[item.user].push(item)
+ const result = await sock.executeUSyncQuery(query)
- deviceResults.push(item)
- }
+ if(result) {
+ const extracted = extractDeviceJids(result?.list, authState.creds.me!.id, ignoreZeroDevices)
+ const deviceMap: { [_: string]: JidWithDevice[] } = {}
+
+ for(const item of extracted) {
+ deviceMap[item.user] = deviceMap[item.user] || []
+ deviceMap[item.user].push(item)
- for(const key in deviceMap) {
- userDevicesCache.set(key, deviceMap[key])
+ deviceResults.push(item)
+ }
+
+ for(const key in deviceMap) {
+ userDevicesCache.set(key, deviceMap[key])
+ }
}
return deviceResults
@@ -280,7 +262,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
}
}
- const meJid = jidNormalizedUser(authState.creds.me.id)!
+ const meJid = jidNormalizedUser(authState.creds.me.id)
const msgId = await relayMessage(meJid, protocolMessage, {
additionalAttributes: {
@@ -469,17 +451,15 @@ export const makeMessagesSocket = (config: SocketConfig) => {
await authState.keys.set({ 'sender-key-memory': { [jid]: senderKeyMap } })
} else {
- const { user: meUser, device: meDevice } = jidDecode(meId)!
+ const { user: meUser } = jidDecode(meId)!
if(!participant) {
devices.push({ user })
- // do not send message to self if the device is 0 (mobile)
-
- if(!(additionalAttributes?.['category'] === 'peer' && user === meUser)) {
- if(meDevice !== undefined && meDevice !== 0) {
- devices.push({ user: meUser })
- }
+ if(user !== meUser) {
+ devices.push({ user: meUser })
+ }
+ if(additionalAttributes?.['category'] !== 'peer') {
const additionalDevices = await getUSyncDevices([ meId, jid ], !!useUserDevicesCache, true)
devices.push(...additionalDevices)
}
@@ -534,7 +514,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
tag: 'message',
attrs: {
id: msgId!,
- type: 'text',
+ type: getMessageType(message),
...(additionalAttributes || {})
},
content: binaryNodeContent
@@ -579,6 +559,15 @@ export const makeMessagesSocket = (config: SocketConfig) => {
return msgId
}
+
+ const getMessageType = (message: proto.IMessage) => {
+ if(message.pollCreationMessage || message.pollCreationMessageV2 || message.pollCreationMessageV3) {
+ return 'poll'
+ }
+
+ return 'text'
+ }
+
const getMediaType = (message: proto.IMessage) => {
if(message.imageMessage) {
return 'image'
@@ -762,7 +751,9 @@ export const makeMessagesSocket = (config: SocketConfig) => {
const isDeleteMsg = 'delete' in content && !!content.delete
const isEditMsg = 'edit' in content && !!content.edit
const isPinMsg = 'pin' in content && !!content.pin
+ const isPollMessage = 'poll' in content && !!content.poll
const additionalAttributes: BinaryNodeAttributes = { }
+ const additionalNodes: BinaryNode[] = []
// required for delete
if(isDeleteMsg) {
// if the chat is a group, and I am not the author, then delete the message as an admin
@@ -775,13 +766,20 @@ export const makeMessagesSocket = (config: SocketConfig) => {
additionalAttributes.edit = '1'
} else if(isPinMsg) {
additionalAttributes.edit = '2'
+ } else if(isPollMessage) {
+ additionalNodes.push({
+ tag: 'meta',
+ attrs: {
+ polltype: 'creation'
+ },
+ } as BinaryNode)
}
if('cachedGroupMetadata' in options) {
console.warn('cachedGroupMetadata in sendMessage are deprecated, now cachedGroupMetadata is part of the socket config.')
}
- await relayMessage(jid, fullMsg.message!, { messageId: fullMsg.key.id!, useCachedGroupMetadata: options.useCachedGroupMetadata, additionalAttributes, statusJidList: options.statusJidList })
+ await relayMessage(jid, fullMsg.message!, { messageId: fullMsg.key.id!, useCachedGroupMetadata: options.useCachedGroupMetadata, additionalAttributes, statusJidList: options.statusJidList, additionalNodes })
if(config.emitOwnEvents) {
process.nextTick(() => {
processingMutex.mutex(() => (
diff --git a/whatsapp_addon/Baileys/src/Socket/registration.ts b/whatsapp_addon/Baileys/src/Socket/registration.ts
deleted file mode 100644
index 6562855b..00000000
--- a/whatsapp_addon/Baileys/src/Socket/registration.ts
+++ /dev/null
@@ -1,250 +0,0 @@
-/* eslint-disable camelcase */
-import axios, { AxiosRequestConfig } from 'axios'
-import { MOBILE_REGISTRATION_ENDPOINT, MOBILE_TOKEN, MOBILE_USERAGENT, REGISTRATION_PUBLIC_KEY } from '../Defaults'
-import { KeyPair, SignedKeyPair, SocketConfig } from '../Types'
-import { aesEncryptGCM, Curve, md5 } from '../Utils/crypto'
-import { jidEncode } from '../WABinary'
-import { makeBusinessSocket } from './business'
-
-function urlencode(str: string) {
- return str.replace(/-/g, '%2d').replace(/_/g, '%5f').replace(/~/g, '%7e')
-}
-
-const validRegistrationOptions = (config: RegistrationOptions) => config?.phoneNumberCountryCode &&
- config.phoneNumberNationalNumber &&
- config.phoneNumberMobileCountryCode
-
-export const makeRegistrationSocket = (config: SocketConfig) => {
- const sock = makeBusinessSocket(config)
-
- const register = async(code: string) => {
- if(!validRegistrationOptions(config.auth.creds.registration)) {
- throw new Error('please specify the registration options')
- }
-
- const result = await mobileRegister({ ...sock.authState.creds, ...sock.authState.creds.registration as RegistrationOptions, code }, config.options)
-
- sock.authState.creds.me = {
- id: jidEncode(result.login!, 's.whatsapp.net'),
- name: '~'
- }
-
- sock.authState.creds.registered = true
- sock.ev.emit('creds.update', sock.authState.creds)
-
- return result
- }
-
- const requestRegistrationCode = async(registrationOptions?: RegistrationOptions) => {
- registrationOptions = registrationOptions || config.auth.creds.registration
- if(!validRegistrationOptions(registrationOptions)) {
- throw new Error('Invalid registration options')
- }
-
- sock.authState.creds.registration = registrationOptions
-
- sock.ev.emit('creds.update', sock.authState.creds)
-
- return mobileRegisterCode({ ...config.auth.creds, ...registrationOptions }, config.options)
- }
-
- return {
- ...sock,
- register,
- requestRegistrationCode,
- }
-}
-
-// Backup_token: Base64.getEncoder().encodeToString(Arrays.copyOfRange(Base64.getDecoder().decode(UUID.randomUUID().toString().replace('-','')),0,15))
-
-export interface RegistrationData {
- registrationId: number
- signedPreKey: SignedKeyPair
- noiseKey: KeyPair
- signedIdentityKey: KeyPair
- identityId: Buffer
- phoneId: string
- deviceId: string
- backupToken: Buffer
-}
-
-export interface RegistrationOptions {
- /** your phone number */
- phoneNumber?: string
- /** the country code of your phone number */
- phoneNumberCountryCode: string
- /** your phone number without country code */
- phoneNumberNationalNumber: string
- /** the country code of your mobile network
- * @see {@link https://de.wikipedia.org/wiki/Mobile_Country_Code}
- */
- phoneNumberMobileCountryCode: string
- /** the network code of your mobile network
- * @see {@link https://de.wikipedia.org/wiki/Mobile_Network_Code}
- */
- phoneNumberMobileNetworkCode: string
- /**
- * How to send the one time code
- */
- method?: 'sms' | 'voice' | 'captcha'
- /**
- * The captcha code if it was requested
- */
- captcha?: string
-}
-
-export type RegistrationParams = RegistrationData & RegistrationOptions
-
-function convertBufferToUrlHex(buffer: Buffer) {
- var id = ''
-
- buffer.forEach((x) => {
- // encode random identity_id buffer as percentage url encoding
- id += `%${x.toString(16).padStart(2, '0').toLowerCase()}`
- })
-
- return id
-}
-
-export function registrationParams(params: RegistrationParams) {
- const e_regid = Buffer.alloc(4)
- e_regid.writeInt32BE(params.registrationId)
-
- const e_skey_id = Buffer.alloc(3)
- e_skey_id.writeInt16BE(params.signedPreKey.keyId)
-
- params.phoneNumberCountryCode = params.phoneNumberCountryCode.replace('+', '').trim()
- params.phoneNumberNationalNumber = params.phoneNumberNationalNumber.replace(/[/-\s)(]/g, '').trim()
-
- return {
- cc: params.phoneNumberCountryCode,
- in: params.phoneNumberNationalNumber,
- Rc: '0',
- lg: 'en',
- lc: 'GB',
- mistyped: '6',
- authkey: Buffer.from(params.noiseKey.public).toString('base64url'),
- e_regid: e_regid.toString('base64url'),
- e_keytype: 'BQ',
- e_ident: Buffer.from(params.signedIdentityKey.public).toString('base64url'),
- // e_skey_id: e_skey_id.toString('base64url'),
- e_skey_id: 'AAAA',
- e_skey_val: Buffer.from(params.signedPreKey.keyPair.public).toString('base64url'),
- e_skey_sig: Buffer.from(params.signedPreKey.signature).toString('base64url'),
- fdid: params.phoneId,
- network_ratio_type: '1',
- expid: params.deviceId,
- simnum: '1',
- hasinrc: '1',
- pid: Math.floor(Math.random() * 1000).toString(),
- id: convertBufferToUrlHex(params.identityId),
- backup_token: convertBufferToUrlHex(params.backupToken),
- token: md5(Buffer.concat([MOBILE_TOKEN, Buffer.from(params.phoneNumberNationalNumber)])).toString('hex'),
- fraud_checkpoint_code: params.captcha,
- }
-}
-
-/**
- * Requests a registration code for the given phone number.
- */
-export function mobileRegisterCode(params: RegistrationParams, fetchOptions?: AxiosRequestConfig) {
- return mobileRegisterFetch('/code', {
- params: {
- ...registrationParams(params),
- mcc: `${params.phoneNumberMobileCountryCode}`.padStart(3, '0'),
- mnc: `${params.phoneNumberMobileNetworkCode || '001'}`.padStart(3, '0'),
- sim_mcc: '000',
- sim_mnc: '000',
- method: params?.method || 'sms',
- reason: '',
- hasav: '1'
- },
- ...fetchOptions,
- })
-}
-
-export function mobileRegisterExists(params: RegistrationParams, fetchOptions?: AxiosRequestConfig) {
- return mobileRegisterFetch('/exist', {
- params: registrationParams(params),
- ...fetchOptions
- })
-}
-
-/**
- * Registers the phone number on whatsapp with the received OTP code.
- */
-export async function mobileRegister(params: RegistrationParams & { code: string }, fetchOptions?: AxiosRequestConfig) {
- //const result = await mobileRegisterFetch(`/reg_onboard_abprop?cc=${params.phoneNumberCountryCode}&in=${params.phoneNumberNationalNumber}&rc=0`)
-
- return mobileRegisterFetch('/register', {
- params: { ...registrationParams(params), code: params.code.replace('-', '') },
- ...fetchOptions,
- })
-}
-
-/**
- * Encrypts the given string as AEAD aes-256-gcm with the public whatsapp key and a random keypair.
- */
-export function mobileRegisterEncrypt(data: string) {
- const keypair = Curve.generateKeyPair()
- const key = Curve.sharedKey(keypair.private, REGISTRATION_PUBLIC_KEY)
-
- const buffer = aesEncryptGCM(Buffer.from(data), new Uint8Array(key), Buffer.alloc(12), Buffer.alloc(0))
-
- return Buffer.concat([Buffer.from(keypair.public), buffer]).toString('base64url')
-}
-
-export async function mobileRegisterFetch(path: string, opts: AxiosRequestConfig = {}) {
- let url = `${MOBILE_REGISTRATION_ENDPOINT}${path}`
-
- if(opts.params) {
- const parameter = [] as string[]
-
- for(const param in opts.params) {
- if(opts.params[param] !== null && opts.params[param] !== undefined) {
- parameter.push(param + '=' + urlencode(opts.params[param]))
- }
- }
-
- url += `?${parameter.join('&')}`
- delete opts.params
- }
-
- if(!opts.headers) {
- opts.headers = {}
- }
-
- opts.headers['User-Agent'] = MOBILE_USERAGENT
-
- const response = await axios(url, opts)
-
- var json = response.data
-
- if(response.status > 300 || json.reason) {
- throw json
- }
-
- if(json.status && !['ok', 'sent'].includes(json.status)) {
- throw json
- }
-
- return json as ExistsResponse
-}
-
-
-export interface ExistsResponse {
- status: 'fail' | 'sent'
- voice_length?: number
- voice_wait?: number
- sms_length?: number
- sms_wait?: number
- reason?: 'incorrect' | 'missing_param' | 'code_checkpoint'
- login?: string
- flash_type?: number
- ab_hash?: string
- ab_key?: string
- exp_cfg?: string
- lid?: string
- image_blob?: string
- audio_blob?: string
-}
diff --git a/whatsapp_addon/Baileys/src/Socket/socket.ts b/whatsapp_addon/Baileys/src/Socket/socket.ts
index bca4e19f..64a4486b 100644
--- a/whatsapp_addon/Baileys/src/Socket/socket.ts
+++ b/whatsapp_addon/Baileys/src/Socket/socket.ts
@@ -8,9 +8,6 @@ import {
DEF_TAG_PREFIX,
INITIAL_PREKEY_COUNT,
MIN_PREKEY_COUNT,
- MOBILE_ENDPOINT,
- MOBILE_NOISE_HEADER,
- MOBILE_PORT,
NOISE_WA_HEADER
} from '../Defaults'
import { DisconnectReason, SocketConfig } from '../Types'
@@ -24,7 +21,6 @@ import {
derivePairingCodeKey,
generateLoginNode,
generateMdTagPrefix,
- generateMobileNode,
generateRegistrationNode,
getCodeFromWSError,
getErrorCodeFromStreamError,
@@ -45,7 +41,7 @@ import {
jidEncode,
S_WHATSAPP_NET
} from '../WABinary'
-import { MobileSocketClient, WebSocketClient } from './Client'
+import { WebSocketClient } from './Client'
/**
* Connects to WA servers and performs:
@@ -69,19 +65,18 @@ export const makeSocket = (config: SocketConfig) => {
makeSignalRepository,
} = config
- let url = typeof waWebSocketUrl === 'string' ? new URL(waWebSocketUrl) : waWebSocketUrl
+ const url = typeof waWebSocketUrl === 'string' ? new URL(waWebSocketUrl) : waWebSocketUrl
- config.mobile = config.mobile || url.protocol === 'tcp:'
- if(config.mobile && url.protocol !== 'tcp:') {
- url = new URL(`tcp://${MOBILE_ENDPOINT}:${MOBILE_PORT}`)
+ if(config.mobile || url.protocol === 'tcp:') {
+ throw new Boom('Mobile API is not supported anymore', { statusCode: DisconnectReason.loggedOut })
}
- if(!config.mobile && url.protocol === 'wss' && authState?.creds?.routingInfo) {
+ if(url.protocol === 'wss' && authState?.creds?.routingInfo) {
url.searchParams.append('ED', authState.creds.routingInfo.toString('base64url'))
}
- const ws = config.socket ? config.socket : config.mobile ? new MobileSocketClient(url, config) : new WebSocketClient(url, config)
+ const ws = new WebSocketClient(url, config)
ws.connect()
@@ -91,8 +86,7 @@ export const makeSocket = (config: SocketConfig) => {
/** WA noise protocol wrapper */
const noise = makeNoiseHandler({
keyPair: ephemeralKeyPair,
- NOISE_HEADER: config.mobile ? MOBILE_NOISE_HEADER : NOISE_WA_HEADER,
- mobile: config.mobile,
+ NOISE_HEADER: NOISE_WA_HEADER,
logger,
routingInfo: authState?.creds?.routingInfo
})
@@ -247,9 +241,7 @@ export const makeSocket = (config: SocketConfig) => {
const keyEnc = noise.processHandshake(handshake, creds.noiseKey)
let node: proto.IClientPayload
- if(config.mobile) {
- node = generateMobileNode(config)
- } else if(!creds.me) {
+ if(!creds.me) {
node = generateRegistrationNode(creds, config)
logger.info({ node }, 'not logged in, attempting registration...')
} else {
@@ -335,11 +327,12 @@ export const makeSocket = (config: SocketConfig) => {
const l1 = frame.attrs || {}
const l2 = Array.isArray(frame.content) ? frame.content[0]?.tag : ''
- Object.keys(l1).forEach(key => {
+ for(const key of Object.keys(l1)) {
anyTriggered = ws.emit(`${DEF_CALLBACK_PREFIX}${l0},${key}:${l1[key]},${l2}`, frame) || anyTriggered
anyTriggered = ws.emit(`${DEF_CALLBACK_PREFIX}${l0},${key}:${l1[key]}`, frame) || anyTriggered
anyTriggered = ws.emit(`${DEF_CALLBACK_PREFIX}${l0},${key}`, frame) || anyTriggered
- })
+ }
+
anyTriggered = ws.emit(`${DEF_CALLBACK_PREFIX}${l0},,${l2}`, frame) || anyTriggered
anyTriggered = ws.emit(`${DEF_CALLBACK_PREFIX}${l0}`, frame) || anyTriggered
@@ -677,6 +670,15 @@ export const makeSocket = (config: SocketConfig) => {
end(new Boom('Multi-device beta not joined', { statusCode: DisconnectReason.multideviceMismatch }))
})
+ ws.on('CB:ib,,offline_preview', (node: BinaryNode) => {
+ logger.info('offline preview received', node)
+ sendNode({
+ tag: 'ib',
+ attrs: {},
+ content: [{ tag: 'offline_batch', attrs: { count: '100' } }]
+ })
+ })
+
ws.on('CB:ib,,edge_routing', (node: BinaryNode) => {
const edgeRoutingNode = getBinaryNodeChild(node, 'edge_routing')
const routingInfo = getBinaryNodeChild(edgeRoutingNode, 'routing_info')
diff --git a/whatsapp_addon/Baileys/src/Socket/usync.ts b/whatsapp_addon/Baileys/src/Socket/usync.ts
new file mode 100644
index 00000000..efeb90d6
--- /dev/null
+++ b/whatsapp_addon/Baileys/src/Socket/usync.ts
@@ -0,0 +1,81 @@
+import { Boom } from '@hapi/boom'
+import { SocketConfig } from '../Types'
+import { BinaryNode, S_WHATSAPP_NET } from '../WABinary'
+import { USyncQuery } from '../WAUSync'
+import { makeSocket } from './socket'
+
+export const makeUSyncSocket = (config: SocketConfig) => {
+ const sock = makeSocket(config)
+
+ const {
+ generateMessageTag,
+ query,
+ } = sock
+
+ const executeUSyncQuery = async(usyncQuery: USyncQuery) => {
+ if(usyncQuery.protocols.length === 0) {
+ throw new Boom('USyncQuery must have at least one protocol')
+ }
+
+ // todo: validate users, throw WARNING on no valid users
+ // variable below has only validated users
+ const validUsers = usyncQuery.users
+
+ const userNodes = validUsers.map((user) => {
+ return {
+ tag: 'user',
+ attrs: {
+ jid: !user.phone ? user.id : undefined,
+ },
+ content: usyncQuery.protocols
+ .map((a) => a.getUserElement(user))
+ .filter(a => a !== null)
+ } as BinaryNode
+ })
+
+ const listNode: BinaryNode = {
+ tag: 'list',
+ attrs: {},
+ content: userNodes
+ }
+
+ const queryNode: BinaryNode = {
+ tag: 'query',
+ attrs: {},
+ content: usyncQuery.protocols.map((a) => a.getQueryElement())
+ }
+ const iq = {
+ tag: 'iq',
+ attrs: {
+ to: S_WHATSAPP_NET,
+ type: 'get',
+ xmlns: 'usync',
+ },
+ content: [
+ {
+ tag: 'usync',
+ attrs: {
+ context: usyncQuery.context,
+ mode: usyncQuery.mode,
+ sid: generateMessageTag(),
+ last: 'true',
+ index: '0',
+ },
+ content: [
+ queryNode,
+ listNode
+ ]
+ }
+ ],
+ }
+
+ const result = await query(iq)
+
+ return usyncQuery.parseUSyncQueryResult(result)
+ }
+
+ return {
+ ...sock,
+ executeUSyncQuery,
+ }
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Store/index.ts b/whatsapp_addon/Baileys/src/Store/index.ts
index 51d24041..74be5a35 100644
--- a/whatsapp_addon/Baileys/src/Store/index.ts
+++ b/whatsapp_addon/Baileys/src/Store/index.ts
@@ -1,3 +1,3 @@
import makeCacheManagerAuthState from './make-cache-manager-store'
import makeInMemoryStore from './make-in-memory-store'
-export { makeInMemoryStore, makeCacheManagerAuthState }
+export { makeInMemoryStore, makeCacheManagerAuthState }
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Store/make-cache-manager-store.ts b/whatsapp_addon/Baileys/src/Store/make-cache-manager-store.ts
index c93ccc02..d5e53b7e 100644
--- a/whatsapp_addon/Baileys/src/Store/make-cache-manager-store.ts
+++ b/whatsapp_addon/Baileys/src/Store/make-cache-manager-store.ts
@@ -1,10 +1,10 @@
-import { caching, Storage } from 'cache-manager'
+import { caching, Store } from 'cache-manager'
import { proto } from '../../WAProto'
import { AuthenticationCreds } from '../Types'
import { BufferJSON, initAuthCreds } from '../Utils'
import logger from '../Utils/logger'
-const makeCacheManagerAuthState = async(store: Storage, sessionKey: string) => {
+const makeCacheManagerAuthState = async(store: Store, sessionKey: string) => {
const defaultKey = (file: string): string => `${sessionKey}:${file}`
const databaseConn = await caching(store)
diff --git a/whatsapp_addon/Baileys/src/Store/make-in-memory-store.ts b/whatsapp_addon/Baileys/src/Store/make-in-memory-store.ts
index b96808c7..aeacc8cb 100644
--- a/whatsapp_addon/Baileys/src/Store/make-in-memory-store.ts
+++ b/whatsapp_addon/Baileys/src/Store/make-in-memory-store.ts
@@ -225,16 +225,14 @@ export default (config: BaileysInMemoryStoreConfig) => {
const list = assertMessageList(jid)
list.upsert(msg, 'append')
- if(type === 'notify') {
- if(!chats.get(jid)) {
- ev.emit('chats.upsert', [
- {
- id: jid,
- conversationTimestamp: toNumber(msg.messageTimestamp),
- unreadCount: 1
- }
- ])
- }
+ if(type === 'notify' && !chats.get(jid)) {
+ ev.emit('chats.upsert', [
+ {
+ id: jid,
+ conversationTimestamp: toNumber(msg.messageTimestamp),
+ unreadCount: 1
+ }
+ ])
}
}
diff --git a/whatsapp_addon/Baileys/src/Store/make-ordered-dictionary.ts b/whatsapp_addon/Baileys/src/Store/make-ordered-dictionary.ts
index 6dd74aea..c3c56d34 100644
--- a/whatsapp_addon/Baileys/src/Store/make-ordered-dictionary.ts
+++ b/whatsapp_addon/Baileys/src/Store/make-ordered-dictionary.ts
@@ -61,9 +61,9 @@ function makeOrderedDictionary(idGetter: (item: T) => string) {
},
clear: () => {
array.splice(0, array.length)
- Object.keys(dict).forEach(key => {
+ for(const key of Object.keys(dict)) {
delete dict[key]
- })
+ }
},
filter: (contain: (item: T) => boolean) => {
let i = 0
@@ -83,4 +83,4 @@ function makeOrderedDictionary(idGetter: (item: T) => string) {
}
}
-export default makeOrderedDictionary
+export default makeOrderedDictionary
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Store/object-repository.ts b/whatsapp_addon/Baileys/src/Store/object-repository.ts
index 117ec6f9..adf2924b 100644
--- a/whatsapp_addon/Baileys/src/Store/object-repository.ts
+++ b/whatsapp_addon/Baileys/src/Store/object-repository.ts
@@ -29,4 +29,4 @@ export class ObjectRepository {
return this.findAll()
}
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Tests/test.app-state-sync.ts b/whatsapp_addon/Baileys/src/Tests/test.app-state-sync.ts
index 676391f2..14f925e6 100644
--- a/whatsapp_addon/Baileys/src/Tests/test.app-state-sync.ts
+++ b/whatsapp_addon/Baileys/src/Tests/test.app-state-sync.ts
@@ -204,4 +204,4 @@ describe('App State Sync Tests', () => {
expect(event.archive).toEqual(true)
}
})
-})
+})
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Tests/test.event-buffer.ts b/whatsapp_addon/Baileys/src/Tests/test.event-buffer.ts
index 0841b31d..e2453e12 100644
--- a/whatsapp_addon/Baileys/src/Tests/test.event-buffer.ts
+++ b/whatsapp_addon/Baileys/src/Tests/test.event-buffer.ts
@@ -316,4 +316,4 @@ describe('Event Buffer Tests', () => {
expect(chats[0].unreadCount).toBeUndefined()
})
-})
+})
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Tests/test.key-store.ts b/whatsapp_addon/Baileys/src/Tests/test.key-store.ts
index 2d91c2b7..f6b86b24 100644
--- a/whatsapp_addon/Baileys/src/Tests/test.key-store.ts
+++ b/whatsapp_addon/Baileys/src/Tests/test.key-store.ts
@@ -89,4 +89,4 @@ describe('Key Store w Transaction Tests', () => {
const { ['1']: stored } = await store.get('session', ['1'])
expect(stored).toEqual(new Uint8Array(1))
})
-})
+})
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Tests/test.libsignal.ts b/whatsapp_addon/Baileys/src/Tests/test.libsignal.ts
index 78cac205..a71fd5c9 100644
--- a/whatsapp_addon/Baileys/src/Tests/test.libsignal.ts
+++ b/whatsapp_addon/Baileys/src/Tests/test.libsignal.ts
@@ -183,4 +183,4 @@ function makeTestAuthState(): SignalAuthState {
function getUniqueId(type: string, id: string) {
return `${type}.${id}`
}
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Tests/test.media-download.ts b/whatsapp_addon/Baileys/src/Tests/test.media-download.ts
index 0960117d..f00638cc 100644
--- a/whatsapp_addon/Baileys/src/Tests/test.media-download.ts
+++ b/whatsapp_addon/Baileys/src/Tests/test.media-download.ts
@@ -73,4 +73,4 @@ describe('Media Download Tests', () => {
}
}
})
-})
+})
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Tests/test.messages.ts b/whatsapp_addon/Baileys/src/Tests/test.messages.ts
index 59b5c0f2..7f51f39b 100644
--- a/whatsapp_addon/Baileys/src/Tests/test.messages.ts
+++ b/whatsapp_addon/Baileys/src/Tests/test.messages.ts
@@ -34,4 +34,4 @@ describe('Messages Tests', () => {
).toHaveProperty('imageMessage')
}
})
-})
+})
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Tests/utils.ts b/whatsapp_addon/Baileys/src/Tests/utils.ts
index 98b9e0b3..bcd1469b 100644
--- a/whatsapp_addon/Baileys/src/Tests/utils.ts
+++ b/whatsapp_addon/Baileys/src/Tests/utils.ts
@@ -33,4 +33,4 @@ export function makeMockSignalKeyStore(): SignalKeyStore {
function getUniqueId(type: string, id: string) {
return `${type}.${id}`
}
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Types/Auth.ts b/whatsapp_addon/Baileys/src/Types/Auth.ts
index ddb3acfb..c0c7ece6 100644
--- a/whatsapp_addon/Baileys/src/Types/Auth.ts
+++ b/whatsapp_addon/Baileys/src/Types/Auth.ts
@@ -1,5 +1,4 @@
import type { proto } from '../../WAProto'
-import { RegistrationOptions } from '../Socket/registration'
import type { Contact } from './Contact'
import type { MinimalMessage } from './Message'
@@ -60,13 +59,7 @@ export type AuthenticationCreds = SignalCreds & {
/** number of times history & app state has been synced */
accountSyncCounter: number
accountSettings: AccountSettings
- // mobile creds
- deviceId: string
- phoneId: string
- identityId: Buffer
- registered: boolean
- backupToken: Buffer
- registration: RegistrationOptions
+ registered: boolean
pairingCode: string | undefined
lastPropHash: string | undefined
routingInfo: Buffer | undefined
@@ -110,4 +103,4 @@ export type SignalAuthState = {
export type AuthenticationState = {
creds: AuthenticationCreds
keys: SignalKeyStore
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Types/Call.ts b/whatsapp_addon/Baileys/src/Types/Call.ts
index 06f3b1f2..a5dbe1a9 100644
--- a/whatsapp_addon/Baileys/src/Types/Call.ts
+++ b/whatsapp_addon/Baileys/src/Types/Call.ts
@@ -1,5 +1,5 @@
-export type WACallUpdateType = 'offer' | 'ringing' | 'timeout' | 'reject' | 'accept'
+export type WACallUpdateType = 'offer' | 'ringing' | 'timeout' | 'reject' | 'accept' | 'terminate'
export type WACallEvent = {
chatId: string
diff --git a/whatsapp_addon/Baileys/src/Types/Chat.ts b/whatsapp_addon/Baileys/src/Types/Chat.ts
index 09b2cc31..58018891 100644
--- a/whatsapp_addon/Baileys/src/Types/Chat.ts
+++ b/whatsapp_addon/Baileys/src/Types/Chat.ts
@@ -1,9 +1,10 @@
import type { proto } from '../../WAProto'
import type { AccountSettings } from './Auth'
import type { BufferedEventData } from './Events'
+import type { LabelActionBody } from './Label'
import type { ChatLabelAssociationActionBody } from './LabelAssociation'
import type { MessageLabelAssociationActionBody } from './LabelAssociation'
-import type { MinimalMessage } from './Message'
+import type { MinimalMessage, WAMessageKey } from './Message'
/** privacy settings in WhatsApp Web */
export type WAPrivacyValue = 'all' | 'contacts' | 'contact_blacklist' | 'none'
@@ -77,7 +78,9 @@ export type ChatModification =
mute: number | null
}
| {
- clear: 'all' | { messages: { id: string, fromMe?: boolean, timestamp: number }[] }
+ clear: boolean
+ } | {
+ deleteForMe: { deleteMedia: boolean, key: WAMessageKey, timestamp: number }
}
| {
star: {
@@ -90,6 +93,8 @@ export type ChatModification =
lastMessages: LastMessageList
}
| { delete: true, lastMessages: LastMessageList }
+ // Label
+ | { addLabel: LabelActionBody }
// Label assosiation
| { addChatLabel: ChatLabelAssociationActionBody }
| { removeChatLabel: ChatLabelAssociationActionBody }
diff --git a/whatsapp_addon/Baileys/src/Types/Contact.ts b/whatsapp_addon/Baileys/src/Types/Contact.ts
index 6d7c0e92..5c88587e 100644
--- a/whatsapp_addon/Baileys/src/Types/Contact.ts
+++ b/whatsapp_addon/Baileys/src/Types/Contact.ts
@@ -15,6 +15,6 @@ export interface Contact {
* null => if the profile picture has not been set (default profile picture)
* any other string => url of the profile picture
*/
- imgUrl?: string | null | 'changed'
+ imgUrl?: string | null
status?: string
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Types/Events.ts b/whatsapp_addon/Baileys/src/Types/Events.ts
index 26152daf..bb13e396 100644
--- a/whatsapp_addon/Baileys/src/Types/Events.ts
+++ b/whatsapp_addon/Baileys/src/Types/Events.ts
@@ -23,6 +23,7 @@ export type BaileysEventMap = {
isLatest?: boolean
progress?: number | null
syncType?: proto.HistorySync.HistorySyncType
+ peerDataRequestSessionId?: string | null
}
/** upsert chats */
'chats.upsert': Chat[]
@@ -73,6 +74,9 @@ export type BufferedEventData = {
messages: { [uqId: string]: WAMessage }
empty: boolean
isLatest: boolean
+ progress?: number | null
+ syncType?: proto.HistorySync.HistorySyncType
+ peerDataRequestSessionId?: string
}
chatUpserts: { [jid: string]: Chat }
chatUpdates: { [jid: string]: ChatUpdate }
@@ -94,4 +98,4 @@ export interface BaileysEventEmitter {
off(event: T, listener: (arg: BaileysEventMap[T]) => void): void
removeAllListeners(event: T): void
emit(event: T, arg: BaileysEventMap[T]): boolean
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Types/Label.ts b/whatsapp_addon/Baileys/src/Types/Label.ts
index 0e91abe2..d9349e60 100644
--- a/whatsapp_addon/Baileys/src/Types/Label.ts
+++ b/whatsapp_addon/Baileys/src/Types/Label.ts
@@ -11,6 +11,18 @@ export interface Label {
predefinedId?: string
}
+export interface LabelActionBody {
+ id: string
+ /** Label name */
+ name?: string
+ /** Label color ID */
+ color?: number
+ /** Is label has been deleted */
+ deleted?: boolean
+ /** WhatsApp has 5 predefined labels (New customer, New order & etc) */
+ predefinedId?: number
+}
+
/** WhatsApp has 20 predefined colors */
export enum LabelColor {
Color1 = 0,
@@ -33,4 +45,4 @@ export enum LabelColor {
Color18,
Color19,
Color20,
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Types/LabelAssociation.ts b/whatsapp_addon/Baileys/src/Types/LabelAssociation.ts
index c8afdd06..8c17cf50 100644
--- a/whatsapp_addon/Baileys/src/Types/LabelAssociation.ts
+++ b/whatsapp_addon/Baileys/src/Types/LabelAssociation.ts
@@ -32,4 +32,4 @@ export interface ChatLabelAssociationActionBody {
export interface MessageLabelAssociationActionBody {
labelId: string
messageId: string
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Types/Message.ts b/whatsapp_addon/Baileys/src/Types/Message.ts
index d0488cbb..5577c3ee 100644
--- a/whatsapp_addon/Baileys/src/Types/Message.ts
+++ b/whatsapp_addon/Baileys/src/Types/Message.ts
@@ -23,7 +23,9 @@ export type WAGenericMediaMessage = proto.Message.IVideoMessage | proto.Message.
export import WAMessageStubType = proto.WebMessageInfo.StubType
// eslint-disable-next-line no-unused-vars, @typescript-eslint/no-unused-vars
export import WAMessageStatus = proto.WebMessageInfo.Status
-export type WAMediaUpload = Buffer | { url: URL | string } | { stream: Readable }
+export type WAMediaPayloadURL = { url: URL | string }
+export type WAMediaPayloadStream = { stream: Readable }
+export type WAMediaUpload = Buffer | WAMediaPayloadStream | WAMediaPayloadURL
/** Set of message types that are supported by the library */
export type MessageType = keyof proto.Message
diff --git a/whatsapp_addon/Baileys/src/Types/Product.ts b/whatsapp_addon/Baileys/src/Types/Product.ts
index 9e2989e9..2f51b1ca 100644
--- a/whatsapp_addon/Baileys/src/Types/Product.ts
+++ b/whatsapp_addon/Baileys/src/Types/Product.ts
@@ -82,4 +82,4 @@ export type GetCatalogOptions = {
limit?: number
jid?: string
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Types/Signal.ts b/whatsapp_addon/Baileys/src/Types/Signal.ts
index be927ff1..12b8e5cc 100644
--- a/whatsapp_addon/Baileys/src/Types/Signal.ts
+++ b/whatsapp_addon/Baileys/src/Types/Signal.ts
@@ -65,4 +65,4 @@ export type SignalRepository = {
}>
injectE2ESession(opts: E2ESessionOpts): Promise
jidToSignalProtocolAddress(jid: string): string
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Types/Socket.ts b/whatsapp_addon/Baileys/src/Types/Socket.ts
index fa60cca2..0237f2bb 100644
--- a/whatsapp_addon/Baileys/src/Types/Socket.ts
+++ b/whatsapp_addon/Baileys/src/Types/Socket.ts
@@ -32,7 +32,9 @@ export type SocketConfig = {
defaultQueryTimeoutMs: number | undefined
/** ping-pong interval for WS connection */
keepAliveIntervalMs: number
- /** should baileys use the mobile api instead of the multi device api */
+ /** should baileys use the mobile api instead of the multi device api
+ * @deprecated This feature has been removed
+ */
mobile?: boolean
/** proxy agent */
agent?: Agent
@@ -64,7 +66,8 @@ export type SocketConfig = {
transactionOpts: TransactionCapabilityOptions
/** marks the client as online whenever the socket successfully connects */
markOnlineOnConnect: boolean
-
+ /** alphanumeric country code (USA -> US) for the number used */
+ countryCode: string
/** provide a cache to store media, so does not have to be re-uploaded */
mediaCache?: CacheStore
/**
@@ -123,7 +126,4 @@ export type SocketConfig = {
cachedGroupMetadata: (jid: string) => Promise
makeSignalRepository: (auth: SignalAuthState) => SignalRepository
-
- /** Socket passthrough */
- socket?: any
}
diff --git a/whatsapp_addon/Baileys/src/Types/State.ts b/whatsapp_addon/Baileys/src/Types/State.ts
index 4e685741..53c39b64 100644
--- a/whatsapp_addon/Baileys/src/Types/State.ts
+++ b/whatsapp_addon/Baileys/src/Types/State.ts
@@ -26,4 +26,4 @@ export type ConnectionState = {
* If this is false, the primary phone and other devices will receive notifs
* */
isOnline?: boolean
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Types/USync.ts b/whatsapp_addon/Baileys/src/Types/USync.ts
new file mode 100644
index 00000000..2e61df16
--- /dev/null
+++ b/whatsapp_addon/Baileys/src/Types/USync.ts
@@ -0,0 +1,27 @@
+import { BinaryNode } from '../WABinary'
+import { USyncUser } from '../WAUSync'
+
+/**
+ * Defines the interface for a USyncQuery protocol
+ */
+export interface USyncQueryProtocol {
+ /**
+ * The name of the protocol
+ */
+ name: string
+ /**
+ * Defines what goes inside the query part of a USyncQuery
+ */
+ getQueryElement: () => BinaryNode
+ /**
+ * Defines what goes inside the user part of a USyncQuery
+ */
+ getUserElement: (user: USyncUser) => BinaryNode | null
+
+ /**
+ * Parse the result of the query
+ * @param data Data from the result
+ * @returns Whatever the protocol is supposed to return
+ */
+ parser: (data: BinaryNode) => unknown
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Utils/auth-utils.ts b/whatsapp_addon/Baileys/src/Utils/auth-utils.ts
index b299e445..8b4d43f2 100644
--- a/whatsapp_addon/Baileys/src/Utils/auth-utils.ts
+++ b/whatsapp_addon/Baileys/src/Utils/auth-utils.ts
@@ -1,7 +1,6 @@
import { randomBytes } from 'crypto'
import NodeCache from 'node-cache'
import type { Logger } from 'pino'
-import { v4 as uuidv4 } from 'uuid'
import { DEFAULT_CACHE_TTLS } from '../Defaults'
import type { AuthenticationCreds, CacheStore, SignalDataSet, SignalDataTypeMap, SignalKeyStore, SignalKeyStoreWithTransaction, TransactionCapabilityOptions } from '../Types'
import { Curve, signedKeyPair } from './crypto'
@@ -161,6 +160,7 @@ export const addTransactionCapability = (
let tries = maxCommitRetries
while(tries) {
tries -= 1
+ //eslint-disable-next-line max-depth
try {
await state.set(mutations)
logger.trace({ dbQueriesInTransaction }, 'committed transaction')
@@ -208,13 +208,7 @@ export const initAuthCreds = (): AuthenticationCreds => {
accountSettings: {
unarchiveChats: false
},
- // mobile creds
- deviceId: Buffer.from(uuidv4().replace(/-/g, ''), 'hex').toString('base64url'),
- phoneId: uuidv4(),
- identityId: randomBytes(20),
registered: false,
- backupToken: randomBytes(20),
- registration: {} as never,
pairingCode: undefined,
lastPropHash: undefined,
routingInfo: undefined,
diff --git a/whatsapp_addon/Baileys/src/Utils/baileys-event-stream.ts b/whatsapp_addon/Baileys/src/Utils/baileys-event-stream.ts
index 444dcdb1..00e41210 100644
--- a/whatsapp_addon/Baileys/src/Utils/baileys-event-stream.ts
+++ b/whatsapp_addon/Baileys/src/Utils/baileys-event-stream.ts
@@ -35,7 +35,7 @@ export const captureEventStream = (ev: BaileysEventEmitter, filename: string) =>
* @param filename filename containing event data
* @param delayIntervalMs delay between each event emit
*/
-export const readAndEmitEventStream = (filename: string, delayIntervalMs: number = 0) => {
+export const readAndEmitEventStream = (filename: string, delayIntervalMs = 0) => {
const ev = new EventEmitter() as BaileysEventEmitter
const fireEvents = async() => {
@@ -63,4 +63,4 @@ export const readAndEmitEventStream = (filename: string, delayIntervalMs: number
ev,
task: fireEvents()
}
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Utils/business.ts b/whatsapp_addon/Baileys/src/Utils/business.ts
index 593ea099..57459a55 100644
--- a/whatsapp_addon/Baileys/src/Utils/business.ts
+++ b/whatsapp_addon/Baileys/src/Utils/business.ts
@@ -272,4 +272,4 @@ const parseStatusInfo = (mediaNode: BinaryNode): CatalogStatus => {
status: getBinaryNodeChildString(node, 'status')!,
canAppeal: getBinaryNodeChildString(node, 'can_appeal') === 'true',
}
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Utils/chat-utils.ts b/whatsapp_addon/Baileys/src/Utils/chat-utils.ts
index 22e42434..9b56f868 100644
--- a/whatsapp_addon/Baileys/src/Utils/chat-utils.ts
+++ b/whatsapp_addon/Baileys/src/Utils/chat-utils.ts
@@ -38,7 +38,7 @@ const generateMac = (operation: proto.SyncdMutation.SyncdOperation, data: Buffer
}
const buff = Buffer.from([r])
- return Buffer.concat([buff, Buffer.from(keyId as any, 'base64')])
+ return Buffer.concat([buff, Buffer.from(keyId as string, 'base64')])
}
const keyData = getKeyData()
@@ -144,7 +144,7 @@ export const encodeSyncdPatch = async(
})
const encoded = proto.SyncActionData.encode(dataProto).finish()
- const keyValue = mutationKeys(key!.keyData!)
+ const keyValue = mutationKeys(key.keyData!)
const encValue = aesEncrypt(encoded, keyValue.valueEncryptionKey)
const valueMac = generateMac(operation, encValue, encKeyId, keyValue.valueMacKey)
@@ -196,7 +196,7 @@ export const decodeSyncdMutations = async(
// indexKey used to HMAC sign record.index.blob
// valueEncryptionKey used to AES-256-CBC encrypt record.value.blob[0:-32]
// the remaining record.value.blob[0:-32] is the mac, it the HMAC sign of key.keyId + decoded proto data + length of bytes in keyId
- for(const msgMutation of msgMutations!) {
+ for(const msgMutation of msgMutations) {
// if it's a syncdmutation, get the operation property
// otherwise, if it's only a record -- it'll be a SET mutation
const operation = 'operation' in msgMutation ? msgMutation.operation : proto.SyncdMutation.SyncdOperation.SET
@@ -236,7 +236,7 @@ export const decodeSyncdMutations = async(
return ltGenerator.finish()
async function getKey(keyId: Uint8Array) {
- const base64Key = Buffer.from(keyId!).toString('base64')
+ const base64Key = Buffer.from(keyId).toString('base64')
const keyEnc = await getAppStateSyncKey(base64Key)
if(!keyEnc) {
throw new Boom(`failed to find key "${base64Key}" to decode mutation`, { statusCode: 404, data: { msgMutations } })
@@ -264,19 +264,19 @@ export const decodeSyncdPatch = async(
const mainKey = mutationKeys(mainKeyObj.keyData!)
const mutationmacs = msg.mutations!.map(mutation => mutation.record!.value!.blob!.slice(-32))
- const patchMac = generatePatchMac(msg.snapshotMac!, mutationmacs, toNumber(msg.version!.version!), name, mainKey.patchMacKey)
+ const patchMac = generatePatchMac(msg.snapshotMac!, mutationmacs, toNumber(msg.version!.version), name, mainKey.patchMacKey)
if(Buffer.compare(patchMac, msg.patchMac!) !== 0) {
throw new Boom('Invalid patch mac')
}
}
- const result = await decodeSyncdMutations(msg!.mutations!, initialState, getAppStateSyncKey, onMutation, validateMacs)
+ const result = await decodeSyncdMutations(msg.mutations!, initialState, getAppStateSyncKey, onMutation, validateMacs)
return result
}
export const extractSyncdPatches = async(
result: BinaryNode,
- options: AxiosRequestConfig
+ options: AxiosRequestConfig<{}>
) => {
const syncNode = getBinaryNodeChild(result, 'sync')
const collectionNodes = getBinaryNodeChildren(syncNode, 'collection')
@@ -302,7 +302,7 @@ export const extractSyncdPatches = async(
}
const blobRef = proto.ExternalBlobReference.decode(
- snapshotNode.content! as Buffer
+ snapshotNode.content as Buffer
)
const data = await downloadExternalBlob(blobRef, options)
snapshot = proto.SyncdSnapshot.decode(data)
@@ -314,7 +314,7 @@ export const extractSyncdPatches = async(
content = Buffer.from(Object.values(content))
}
- const syncd = proto.SyncdPatch.decode(content! as Uint8Array)
+ const syncd = proto.SyncdPatch.decode(content as Uint8Array)
if(!syncd.version) {
syncd.version = { version: +collectionNode.attrs.version + 1 }
}
@@ -334,7 +334,7 @@ export const extractSyncdPatches = async(
export const downloadExternalBlob = async(
blob: proto.IExternalBlobReference,
- options: AxiosRequestConfig
+ options: AxiosRequestConfig<{}>
) => {
const stream = await downloadContentFromMessage(blob, 'md-app-state', { options })
const bufferArray: Buffer[] = []
@@ -347,7 +347,7 @@ export const downloadExternalBlob = async(
export const downloadExternalPatch = async(
blob: proto.IExternalBlobReference,
- options: AxiosRequestConfig
+ options: AxiosRequestConfig<{}>
) => {
const buffer = await downloadExternalBlob(blob, options)
const syncData = proto.SyncdMutations.decode(buffer)
@@ -359,10 +359,10 @@ export const decodeSyncdSnapshot = async(
snapshot: proto.ISyncdSnapshot,
getAppStateSyncKey: FetchAppStateSyncKey,
minimumVersionNumber: number | undefined,
- validateMacs: boolean = true
+ validateMacs = true
) => {
const newState = newLTHashState()
- newState.version = toNumber(snapshot.version!.version!)
+ newState.version = toNumber(snapshot.version!.version)
const mutationMap: ChatMutationMap = {}
const areMutationsRequired = typeof minimumVersionNumber === 'undefined'
@@ -408,10 +408,10 @@ export const decodePatches = async(
syncds: proto.ISyncdPatch[],
initial: LTHashState,
getAppStateSyncKey: FetchAppStateSyncKey,
- options: AxiosRequestConfig,
+ options: AxiosRequestConfig<{}>,
minimumVersionNumber?: number,
logger?: Logger,
- validateMacs: boolean = true
+ validateMacs = true
) => {
const newState: LTHashState = {
...initial,
@@ -420,8 +420,7 @@ export const decodePatches = async(
const mutationMap: ChatMutationMap = {}
- for(let i = 0; i < syncds.length; i++) {
- const syncd = syncds[i]
+ for(const syncd of syncds) {
const { version, keyId, snapshotMac } = syncd
if(syncd.externalMutations) {
logger?.trace({ name, version }, 'downloading external patch')
@@ -430,7 +429,7 @@ export const decodePatches = async(
syncd.mutations?.push(...ref.mutations)
}
- const patchVersion = toNumber(version!.version!)
+ const patchVersion = toNumber(version!.version)
newState.version = patchVersion
const shouldMutate = typeof minimumVersionNumber === 'undefined' || patchVersion > minimumVersionNumber
@@ -553,23 +552,29 @@ export const chatModificationToAppPatch = (
apiVersion: 3,
operation: OP.SET
}
+ } else if('deleteForMe' in mod) {
+ const { timestamp, key, deleteMedia } = mod.deleteForMe
+ patch = {
+ syncAction: {
+ deleteMessageForMeAction: {
+ deleteMedia,
+ messageTimestamp: timestamp
+ }
+ },
+ index: ['deleteMessageForMe', jid, key.id!, key.fromMe ? '1' : '0', '0'],
+ type: 'regular_high',
+ apiVersion: 3,
+ operation: OP.SET
+ }
} else if('clear' in mod) {
- if(mod.clear === 'all') {
- throw new Boom('not supported')
- } else {
- const key = mod.clear.messages[0]
- patch = {
- syncAction: {
- deleteMessageForMeAction: {
- deleteMedia: false,
- messageTimestamp: key.timestamp
- }
- },
- index: ['deleteMessageForMe', jid, key.id, key.fromMe ? '1' : '0', '0'],
- type: 'regular_high',
- apiVersion: 3,
- operation: OP.SET
- }
+ patch = {
+ syncAction: {
+ clearChatAction: {} // add message range later
+ },
+ index: ['clearChat', jid, '1' /*the option here is 0 when keep starred messages is enabled*/, '0'],
+ type: 'regular_high',
+ apiVersion: 6,
+ operation: OP.SET
}
} else if('pin' in mod) {
patch = {
@@ -620,6 +625,21 @@ export const chatModificationToAppPatch = (
apiVersion: 1,
operation: OP.SET,
}
+ } else if('addLabel' in mod) {
+ patch = {
+ syncAction: {
+ labelEditAction: {
+ name: mod.addLabel.name,
+ color: mod.addLabel.color,
+ predefinedId : mod.addLabel.predefinedId,
+ deleted: mod.addLabel.deleted
+ }
+ },
+ index: ['label_edit', mod.addLabel.id],
+ type: 'regular',
+ apiVersion: 3,
+ operation: OP.SET,
+ }
} else if('addChatLabel' in mod) {
patch = {
syncAction: {
@@ -715,7 +735,7 @@ export const processSyncAction = (
{
id,
muteEndTime: action.muteAction?.muted
- ? toNumber(action.muteAction!.muteEndTimestamp!)
+ ? toNumber(action.muteAction.muteEndTimestamp)
: null,
conditional: getChatUpdateConditional(id, undefined)
}
@@ -773,7 +793,7 @@ export const processSyncAction = (
]
})
} else if(action?.contactAction) {
- ev.emit('contacts.upsert', [{ id, name: action.contactAction!.fullName! }])
+ ev.emit('contacts.upsert', [{ id, name: action.contactAction.fullName! }])
} else if(action?.pushNameSetting) {
const name = action?.pushNameSetting?.name
if(name && me?.name !== name) {
@@ -782,7 +802,7 @@ export const processSyncAction = (
} else if(action?.pinAction) {
ev.emit('chats.update', [{
id,
- pinned: action.pinAction?.pinned ? toNumber(action.timestamp!) : null,
+ pinned: action.pinAction?.pinned ? toNumber(action.timestamp) : null,
conditional: getChatUpdateConditional(id, undefined)
}])
} else if(action?.unarchiveChatsSetting) {
@@ -810,7 +830,7 @@ export const processSyncAction = (
ev.emit('chats.delete', [id])
}
} else if(action?.labelEditAction) {
- const { name, color, deleted, predefinedId } = action.labelEditAction!
+ const { name, color, deleted, predefinedId } = action.labelEditAction
ev.emit('labels.edit', {
id,
diff --git a/whatsapp_addon/Baileys/src/Utils/decode-wa-message.ts b/whatsapp_addon/Baileys/src/Utils/decode-wa-message.ts
index 4d7e9b6d..d8c0d868 100644
--- a/whatsapp_addon/Baileys/src/Utils/decode-wa-message.ts
+++ b/whatsapp_addon/Baileys/src/Utils/decode-wa-message.ts
@@ -6,6 +6,23 @@ import { areJidsSameUser, BinaryNode, isJidBroadcast, isJidGroup, isJidNewslette
import { unpadRandomMax16 } from './generics'
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 NACK_REASONS = {
+ ParsingError: 487,
+ UnrecognizedStanza: 488,
+ UnrecognizedStanzaClass: 489,
+ UnrecognizedStanzaType: 490,
+ InvalidProtobuf: 491,
+ InvalidHostedCompanionStanza: 493,
+ MissingMessageSecret: 495,
+ SignalErrorOldCounter: 496,
+ MessageDeletedOnPeer: 499,
+ UnhandledError: 500,
+ UnsupportedAdminRevoke: 550,
+ UnsupportedLIDGroup: 551,
+ DBOperationFailed: 552
+}
type MessageType = 'chat' | 'peer_broadcast' | 'other_broadcast' | 'group' | 'direct_peer_status' | 'other_status' | 'newsletter'
@@ -177,6 +194,7 @@ export const decryptMessageNode = (
let msg: proto.IMessage = proto.Message.decode(e2eType !== 'plaintext' ? unpadRandomMax16(msgBuffer) : msgBuffer)
msg = msg.deviceSentMessage?.message || msg
if(msg.senderKeyDistributionMessage) {
+ //eslint-disable-next-line max-depth
try {
await repository.processSenderKeyDistributionMessage({
authorJid: author,
diff --git a/whatsapp_addon/Baileys/src/Utils/event-buffer.ts b/whatsapp_addon/Baileys/src/Utils/event-buffer.ts
index d8d0efbe..879ae50e 100644
--- a/whatsapp_addon/Baileys/src/Utils/event-buffer.ts
+++ b/whatsapp_addon/Baileys/src/Utils/event-buffer.ts
@@ -42,6 +42,7 @@ type BaileysBufferableEventEmitter = BaileysEventEmitter & {
* */
buffer(): void
/** buffers all events till the promise completes */
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
createBufferedFunction(work: (...args: A) => Promise): ((...args: A) => Promise)
/**
* flushes all buffered events
@@ -132,7 +133,7 @@ export const makeEventBuffer = (logger: Logger): BaileysBufferableEventEmitter =
},
emit(event: BaileysEvent, evData: BaileysEventMap[T]) {
if(buffersInProgress && BUFFERABLE_EVENT_SET.has(event)) {
- append(data, historyCache, event as any, evData, logger)
+ append(data, historyCache, event as BufferableEvent, evData, logger)
return true
}
@@ -187,6 +188,7 @@ function append(
data: BufferedEventData,
historyCache: Set,
event: E,
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
eventData: any,
logger: Logger
) {
@@ -230,6 +232,9 @@ function append(
}
data.historySets.empty = false
+ data.historySets.syncType = eventData.syncType
+ data.historySets.progress = eventData.progress
+ data.historySets.peerDataRequestSessionId = eventData.peerDataRequestSessionId
data.historySets.isLatest = eventData.isLatest || data.historySets.isLatest
break
@@ -328,7 +333,7 @@ function append(
}
if(data.contactUpdates[contact.id]) {
- upsert = Object.assign(data.contactUpdates[contact.id], trimUndefined(contact))
+ upsert = Object.assign(data.contactUpdates[contact.id], trimUndefined(contact)) as Contact
delete data.contactUpdates[contact.id]
}
}
@@ -521,7 +526,10 @@ function consolidateEvents(data: BufferedEventData) {
chats: Object.values(data.historySets.chats),
messages: Object.values(data.historySets.messages),
contacts: Object.values(data.historySets.contacts),
- isLatest: data.historySets.isLatest
+ syncType: data.historySets.syncType,
+ progress: data.historySets.progress,
+ isLatest: data.historySets.isLatest,
+ peerDataRequestSessionId: data.historySets.peerDataRequestSessionId
}
}
@@ -592,12 +600,10 @@ function consolidateEvents(data: BufferedEventData) {
}
function concatChats>(a: C, b: Partial) {
- if(b.unreadCount === null) {
- // neutralize unread counter
- if(a.unreadCount! < 0) {
- a.unreadCount = undefined
- b.unreadCount = undefined
- }
+ if(b.unreadCount === null && // neutralize unread counter
+ a.unreadCount! < 0) {
+ a.unreadCount = undefined
+ b.unreadCount = undefined
}
if(typeof a.unreadCount === 'number' && typeof b.unreadCount === 'number') {
@@ -610,4 +616,4 @@ function concatChats>(a: C, b: Partial) {
return Object.assign(a, b)
}
-const stringifyMessageKey = (key: proto.IMessageKey) => `${key.remoteJid},${key.id},${key.fromMe ? '1' : '0'}`
+const stringifyMessageKey = (key: proto.IMessageKey) => `${key.remoteJid},${key.id},${key.fromMe ? '1' : '0'}`
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Utils/generics.ts b/whatsapp_addon/Baileys/src/Utils/generics.ts
index c99dbb43..bd094fdb 100644
--- a/whatsapp_addon/Baileys/src/Utils/generics.ts
+++ b/whatsapp_addon/Baileys/src/Utils/generics.ts
@@ -5,7 +5,7 @@ import { platform, release } from 'os'
import { Logger } from 'pino'
import { proto } from '../../WAProto'
import { version as baileysVersion } from '../Defaults/baileys-version.json'
-import { BaileysEventEmitter, BaileysEventMap, BrowsersMap, DisconnectReason, WACallUpdateType, WAVersion } from '../Types'
+import { BaileysEventEmitter, BaileysEventMap, BrowsersMap, ConnectionState, DisconnectReason, WACallUpdateType, WAVersion } from '../Types'
import { BinaryNode, getAllBinaryNodeChildren, jidDecode } from '../WABinary'
const PLATFORM_MAP = {
@@ -33,6 +33,7 @@ export const getPlatformId = (browser: string) => {
}
export const BufferJSON = {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
replacer: (k, value: any) => {
if(Buffer.isBuffer(value) || value instanceof Uint8Array || value?.type === 'Buffer') {
return { type: 'Buffer', data: Buffer.from(value?.data || value).toString('base64') }
@@ -40,6 +41,8 @@ export const BufferJSON = {
return value
},
+
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
reviver: (_, value: any) => {
if(typeof value === 'object' && !!value && (value.buffer === true || value.type === 'Buffer')) {
const val = value.data || value.value
@@ -52,7 +55,7 @@ export const BufferJSON = {
export const getKeyAuthor = (
key: proto.IMessageKey | undefined | null,
- meId: string = 'me'
+ meId = 'me'
) => (
(key?.fromMe ? meId : key?.participant || key?.remoteJid) || ''
)
@@ -102,14 +105,14 @@ export const encodeBigEndian = (e: number, t = 4) => {
return a
}
-export const toNumber = (t: Long | number | null | undefined): number => ((typeof t === 'object' && t) ? ('toNumber' in t ? t.toNumber() : (t as any).low) : t)
+export const toNumber = (t: Long | number | null | undefined): number => ((typeof t === 'object' && t) ? ('toNumber' in t ? t.toNumber() : (t as Long).low) : t || 0)
/** unix timestamp of a date in seconds */
export const unixTimestampSeconds = (date: Date = new Date()) => Math.floor(date.getTime() / 1000)
export type DebouncedTimeout = ReturnType
-export const debouncedTimeout = (intervalMs: number = 1000, task?: () => void) => {
+export const debouncedTimeout = (intervalMs = 1000, task?: () => void) => {
let timeout: NodeJS.Timeout | undefined
return {
start: (newIntervalMs?: number, newTask?: () => void) => {
@@ -184,9 +187,9 @@ export const generateMessageIDV2 = (userId?: string): string => {
const data = Buffer.alloc(8 + 20 + 16)
data.writeBigUInt64BE(BigInt(Math.floor(Date.now() / 1000)))
- if (userId) {
+ if(userId) {
const id = jidDecode(userId)
- if (id?.user) {
+ if(id?.user) {
data.write(id.user, 8)
data.write('@c.us', 8 + id.user.length)
}
@@ -205,7 +208,7 @@ export const generateMessageID = () => '3EB0' + randomBytes(18).toString('hex').
export function bindWaitForEvent(ev: BaileysEventEmitter, event: T) {
return async(check: (u: BaileysEventMap[T]) => boolean | undefined, timeoutMs?: number) => {
let listener: (item: BaileysEventMap[T]) => void
- let closeListener: any
+ let closeListener: (state: Partial) => void
await (
promiseTimeout(
timeoutMs,
@@ -256,7 +259,7 @@ export const printQRIfNecessaryListener = (ev: BaileysEventEmitter, logger: Logg
* utility that fetches latest baileys version from the master branch.
* Use to ensure your WA connection is always on the latest version
*/
-export const fetchLatestBaileysVersion = async(options: AxiosRequestConfig = { }) => {
+export const fetchLatestBaileysVersion = async(options: AxiosRequestConfig<{}> = { }) => {
const URL = 'https://raw.githubusercontent.com/WhiskeySockets/Baileys/master/src/Defaults/baileys-version.json'
try {
const result = await axios.get<{ version: WAVersion }>(
@@ -283,7 +286,7 @@ export const fetchLatestBaileysVersion = async(options: AxiosRequestConfig
* A utility that fetches the latest web version of whatsapp.
* Use to ensure your WA connection is always on the latest version
*/
-export const fetchLatestWaWebVersion = async(options: AxiosRequestConfig) => {
+export const fetchLatestWaWebVersion = async(options: AxiosRequestConfig<{}>) => {
try {
const result = await axios.get(
'https://web.whatsapp.com/check-update?version=1&platform=web',
@@ -364,7 +367,8 @@ export const getCallStatusFromNode = ({ tag, attrs }: BinaryNode) => {
if(attrs.reason === 'timeout') {
status = 'timeout'
} else {
- status = 'reject'
+ //fired when accepted/rejected/timeout/caller hangs up
+ status = 'terminate'
}
break
@@ -392,6 +396,7 @@ export const getCodeFromWSError = (error: Error) => {
statusCode = code
}
} else if(
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
(error as any)?.code?.startsWith('E')
|| error?.message?.includes('timed out')
) { // handle ETIMEOUT, ENOTFOUND etc
@@ -409,7 +414,8 @@ export const isWABusinessPlatform = (platform: string) => {
return platform === 'smbi' || platform === 'smba'
}
-export function trimUndefined(obj: any) {
+// eslint-disable-next-line @typescript-eslint/no-explicit-any
+export function trimUndefined(obj: {[_: string]: any}) {
for(const key in obj) {
if(typeof obj[key] === 'undefined') {
delete obj[key]
@@ -426,8 +432,8 @@ export function bytesToCrockford(buffer: Buffer): string {
let bitCount = 0
const crockford: string[] = []
- for(let i = 0; i < buffer.length; i++) {
- value = (value << 8) | (buffer[i] & 0xff)
+ for(const element of buffer) {
+ value = (value << 8) | (element & 0xff)
bitCount += 8
while(bitCount >= 5) {
diff --git a/whatsapp_addon/Baileys/src/Utils/history.ts b/whatsapp_addon/Baileys/src/Utils/history.ts
index 47200a9c..49a014b2 100644
--- a/whatsapp_addon/Baileys/src/Utils/history.ts
+++ b/whatsapp_addon/Baileys/src/Utils/history.ts
@@ -12,7 +12,7 @@ const inflatePromise = promisify(inflate)
export const downloadHistory = async(
msg: proto.Message.IHistorySyncNotification,
- options: AxiosRequestConfig
+ options: AxiosRequestConfig<{}>
) => {
const stream = await downloadContentFromMessage(msg, 'md-msg-hist', { options })
const bufferArray: Buffer[] = []
@@ -95,13 +95,13 @@ export const processHistoryMessage = (item: proto.IHistorySync) => {
contacts,
messages,
syncType: item.syncType,
- progress: item.progress,
+ progress: item.progress
}
}
export const downloadAndProcessHistorySyncNotification = async(
msg: proto.Message.IHistorySyncNotification,
- options: AxiosRequestConfig
+ options: AxiosRequestConfig<{}>
) => {
const historyMsg = await downloadHistory(msg, options)
return processHistoryMessage(historyMsg)
@@ -112,4 +112,4 @@ export const getHistoryMsg = (message: proto.IMessage) => {
const anyHistoryMsg = normalizedContent?.protocolMessage?.historySyncNotification
return anyHistoryMsg
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Utils/link-preview.ts b/whatsapp_addon/Baileys/src/Utils/link-preview.ts
index 71d0e4b0..702feb10 100644
--- a/whatsapp_addon/Baileys/src/Utils/link-preview.ts
+++ b/whatsapp_addon/Baileys/src/Utils/link-preview.ts
@@ -119,4 +119,4 @@ export const getUrlInfo = async(
throw error
}
}
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Utils/logger.ts b/whatsapp_addon/Baileys/src/Utils/logger.ts
index c2c04243..bb651e32 100644
--- a/whatsapp_addon/Baileys/src/Utils/logger.ts
+++ b/whatsapp_addon/Baileys/src/Utils/logger.ts
@@ -1,3 +1,3 @@
import P from 'pino'
-export default P({ timestamp: () => `,"time":"${new Date().toJSON()}"` })
+export default P({ timestamp: () => `,"time":"${new Date().toJSON()}"` })
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Utils/lt-hash.ts b/whatsapp_addon/Baileys/src/Utils/lt-hash.ts
index 1afeb088..fa384843 100644
--- a/whatsapp_addon/Baileys/src/Utils/lt-hash.ts
+++ b/whatsapp_addon/Baileys/src/Utils/lt-hash.ts
@@ -58,4 +58,4 @@ class d {
return a
}
}
-export const LT_HASH_ANTI_TAMPERING = new d('WhatsApp Patch Integrity')
+export const LT_HASH_ANTI_TAMPERING = new d('WhatsApp Patch Integrity')
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Utils/make-mutex.ts b/whatsapp_addon/Baileys/src/Utils/make-mutex.ts
index 278fe75e..1d6a6176 100644
--- a/whatsapp_addon/Baileys/src/Utils/make-mutex.ts
+++ b/whatsapp_addon/Baileys/src/Utils/make-mutex.ts
@@ -1,4 +1,5 @@
export const makeMutex = () => {
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
let task = Promise.resolve() as Promise
let taskTimeout: NodeJS.Timeout | undefined
@@ -41,4 +42,4 @@ export const makeKeyedMutex = () => {
return map[key].mutex(task)
}
}
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Utils/messages-media.ts b/whatsapp_addon/Baileys/src/Utils/messages-media.ts
index b15ee9dc..05bc6358 100644
--- a/whatsapp_addon/Baileys/src/Utils/messages-media.ts
+++ b/whatsapp_addon/Baileys/src/Utils/messages-media.ts
@@ -12,7 +12,7 @@ import { Readable, Transform } from 'stream'
import { URL } from 'url'
import { proto } from '../../WAProto'
import { DEFAULT_ORIGIN, MEDIA_HKDF_KEY_MAPPING, MEDIA_PATH_MAP } from '../Defaults'
-import { BaileysEventMap, DownloadableMessage, MediaConnInfo, MediaDecryptionKeyInfo, MediaType, MessageType, SocketConfig, WAGenericMediaMessage, WAMediaUpload, WAMediaUploadFunction, WAMessageContent } from '../Types'
+import { BaileysEventMap, DownloadableMessage, MediaConnInfo, MediaDecryptionKeyInfo, MediaType, MessageType, SocketConfig, WAGenericMediaMessage, WAMediaPayloadURL, WAMediaUpload, WAMediaUploadFunction, WAMessageContent } from '../Types'
import { BinaryNode, getBinaryNodeChild, getBinaryNodeChildBuffer, jidNormalizedUser } from '../WABinary'
import { aesDecryptGCM, aesEncryptGCM, hkdf } from './crypto'
import { generateMessageID } from './generics'
@@ -79,7 +79,7 @@ const extractVideoThumb = async(
destPath: string,
time: string,
size: { width: number, height: number },
-) => new Promise((resolve, reject) => {
+) => new Promise((resolve, reject) => {
const cmd = `ffmpeg -ss ${time} -i ${path} -y -vf scale=${size.width}:-1 -vframes 1 -f image2 ${destPath}`
exec(cmd, (err) => {
if(err) {
@@ -88,7 +88,7 @@ const extractVideoThumb = async(
resolve()
}
})
-}) as Promise
+})
export const extractImageThumb = async(bufferOrFilePath: Readable | Buffer | string, width = 32) => {
if(bufferOrFilePath instanceof Readable) {
@@ -97,7 +97,7 @@ export const extractImageThumb = async(bufferOrFilePath: Readable | Buffer | str
const lib = await getImageProcessingLibrary()
if('sharp' in lib && typeof lib.sharp?.default === 'function') {
- const img = lib.sharp!.default(bufferOrFilePath)
+ const img = lib.sharp.default(bufferOrFilePath)
const dimensions = await img.metadata()
const buffer = await img
@@ -114,7 +114,7 @@ export const extractImageThumb = async(bufferOrFilePath: Readable | Buffer | str
} else if('jimp' in lib && typeof lib.jimp?.read === 'function') {
const { read, MIME_JPEG, RESIZE_BILINEAR, AUTO } = lib.jimp
- const jimp = await read(bufferOrFilePath as any)
+ const jimp = await read(bufferOrFilePath as string)
const dimensions = {
width: jimp.getWidth(),
height: jimp.getHeight()
@@ -154,7 +154,7 @@ export const generateProfilePicture = async(mediaUpload: WAMediaUpload) => {
const lib = await getImageProcessingLibrary()
let img: Promise
if('sharp' in lib && typeof lib.sharp?.default === 'function') {
- img = lib.sharp!.default(bufferOrFilePath)
+ img = lib.sharp.default(bufferOrFilePath)
.resize(640, 640)
.jpeg({
quality: 50,
@@ -162,7 +162,7 @@ export const generateProfilePicture = async(mediaUpload: WAMediaUpload) => {
.toBuffer()
} else if('jimp' in lib && typeof lib.jimp?.read === 'function') {
const { read, MIME_JPEG, RESIZE_BILINEAR } = lib.jimp
- const jimp = await read(bufferOrFilePath as any)
+ const jimp = await read(bufferOrFilePath as string)
const min = Math.min(jimp.getWidth(), jimp.getHeight())
const cropped = jimp.crop(0, 0, min, min)
@@ -351,7 +351,7 @@ export const encryptedStream = async(
let writeStream: WriteStream | undefined
let didSaveToTmpPath = false
if(type === 'file') {
- bodyPath = (media as any).url
+ bodyPath = (media as WAMediaPayloadURL).url.toString()
} else if(saveOriginalFileIfRequired) {
bodyPath = join(getTmpFilesDirectory(), mediaType + generateMessageID())
writeStream = createWriteStream(bodyPath)
@@ -382,10 +382,8 @@ export const encryptedStream = async(
}
sha256Plain = sha256Plain.update(data)
- if(writeStream) {
- if(!writeStream.write(data)) {
- await once(writeStream, 'drain')
- }
+ if(writeStream && !writeStream.write(data)) {
+ await once(writeStream, 'drain')
}
onChunk(aes.update(data))
@@ -455,7 +453,7 @@ const toSmallestChunkSize = (num: number) => {
export type MediaDownloadOptions = {
startByte?: number
endByte?: number
- options?: AxiosRequestConfig
+ options?: AxiosRequestConfig<{}>
}
export const getUrlFromDirectPath = (directPath: string) => `https://${DEF_HOST}${directPath}`
@@ -501,9 +499,9 @@ export const downloadEncryptedContent = async(
Origin: DEFAULT_ORIGIN,
}
if(startChunk || endChunk) {
- headers!.Range = `bytes=${startChunk}-`
+ headers.Range = `bytes=${startChunk}-`
if(endChunk) {
- headers!.Range += endChunk
+ headers.Range += endChunk
}
}
@@ -614,6 +612,7 @@ export const getWAUploadToServer = (
const auth = encodeURIComponent(uploadInfo.auth) // the auth token
const url = `https://${hostname}${MEDIA_PATH_MAP[mediaType]}/${fileEncSha256B64}?auth=${auth}&token=${fileEncSha256B64}`
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
let result: any
try {
@@ -770,9 +769,4 @@ const MEDIA_RETRY_STATUS_MAP = {
[proto.MediaRetryNotification.ResultType.DECRYPTION_ERROR]: 412,
[proto.MediaRetryNotification.ResultType.NOT_FOUND]: 404,
[proto.MediaRetryNotification.ResultType.GENERAL_ERROR]: 418,
-} as const
-
-// eslint-disable-next-line @typescript-eslint/no-unused-vars
-function __importStar(arg0: any): any {
- throw new Error('Function not implemented.')
-}
+} as const
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Utils/messages.ts b/whatsapp_addon/Baileys/src/Utils/messages.ts
index 92939901..3e802159 100644
--- a/whatsapp_addon/Baileys/src/Utils/messages.ts
+++ b/whatsapp_addon/Baileys/src/Utils/messages.ts
@@ -211,11 +211,6 @@ export const prepareWAMessageMedia = async(
logger?.debug('processed waveform')
}
- if(requiresWaveformProcessing) {
- uploadData.waveform = await getAudioWaveform(bodyPath!, logger)
- logger?.debug('processed waveform')
- }
-
if(requiresAudioBackground) {
uploadData.backgroundArgb = await assertColor(options.backgroundColor)
logger?.debug('computed backgroundColor audio status')
@@ -230,8 +225,13 @@ export const prepareWAMessageMedia = async(
encWriteStream.destroy()
// remove tmp files
if(didSaveToTmpPath && bodyPath) {
- await fs.unlink(bodyPath)
- logger?.debug('removed tmp files')
+ try {
+ await fs.access(bodyPath)
+ await fs.unlink(bodyPath)
+ logger?.debug('removed tmp file')
+ } catch(error) {
+ logger?.warn('failed to remove tmp file')
+ }
}
}
)
@@ -488,7 +488,7 @@ export const generateWAMessageContent = async(
options: message.poll.values.map(optionName => ({ optionName })),
}
- if (message.poll.toAnnouncementGroup) {
+ if(message.poll.toAnnouncementGroup) {
// poll v2 is for community announcement groups (single select and multiple)
m.pollCreationMessageV2 = pollCreationMessage
} else {
@@ -859,17 +859,13 @@ export const downloadMediaMessage = async(
) => {
const result = await downloadMsg()
.catch(async(error) => {
- if(ctx) {
- if(axios.isAxiosError(error)) {
- // check if the message requires a reupload
- if(REUPLOAD_REQUIRED_STATUS.includes(error.response?.status!)) {
- ctx.logger.info({ key: message.key }, 'sending reupload media request...')
- // request reupload
- message = await ctx.reuploadRequest(message)
- const result = await downloadMsg()
- return result
- }
- }
+ if(ctx && axios.isAxiosError(error) && // check if the message requires a reupload
+ REUPLOAD_REQUIRED_STATUS.includes(error.response?.status!)) {
+ ctx.logger.info({ key: message.key }, 'sending reupload media request...')
+ // request reupload
+ message = await ctx.reuploadRequest(message)
+ const result = await downloadMsg()
+ return result
}
throw error
diff --git a/whatsapp_addon/Baileys/src/Utils/noise-handler.ts b/whatsapp_addon/Baileys/src/Utils/noise-handler.ts
index f88cdfd0..9ea89ec3 100644
--- a/whatsapp_addon/Baileys/src/Utils/noise-handler.ts
+++ b/whatsapp_addon/Baileys/src/Utils/noise-handler.ts
@@ -16,13 +16,11 @@ const generateIV = (counter: number) => {
export const makeNoiseHandler = ({
keyPair: { private: privateKey, public: publicKey },
NOISE_HEADER,
- mobile,
logger,
routingInfo
}: {
keyPair: KeyPair
NOISE_HEADER: Uint8Array
- mobile: boolean
logger: Logger
routingInfo?: Buffer | undefined
}) => {
@@ -113,16 +111,12 @@ export const makeNoiseHandler = ({
const certDecoded = decrypt(serverHello!.payload!)
- if(mobile) {
- proto.CertChain.NoiseCertificate.decode(certDecoded)
- } else {
- const { intermediate: certIntermediate } = proto.CertChain.decode(certDecoded)
+ const { intermediate: certIntermediate } = proto.CertChain.decode(certDecoded)
- const { issuerSerial } = proto.CertChain.NoiseCertificate.Details.decode(certIntermediate!.details!)
+ const { issuerSerial } = proto.CertChain.NoiseCertificate.Details.decode(certIntermediate!.details!)
- if(issuerSerial !== WA_CERT_DETAILS.SERIAL) {
- throw new Boom('certification match failed', { statusCode: 400 })
- }
+ if(issuerSerial !== WA_CERT_DETAILS.SERIAL) {
+ throw new Boom('certification match failed', { statusCode: 400 })
}
const keyEnc = encrypt(noiseKey.public)
@@ -183,15 +177,15 @@ export const makeNoiseHandler = ({
inBytes = inBytes.slice(size + 3)
if(isFinished) {
- const result = decrypt(frame as Uint8Array)
+ const result = decrypt(frame)
frame = await decodeBinaryNode(result)
}
- logger.trace({ msg: (frame as any)?.attrs?.id }, 'recv frame')
+ logger.trace({ msg: (frame as BinaryNode)?.attrs?.id }, 'recv frame')
onFrame(frame)
size = getBytesSize()
}
}
}
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/Utils/process-message.ts b/whatsapp_addon/Baileys/src/Utils/process-message.ts
index ee3f0216..133b0ff5 100644
--- a/whatsapp_addon/Baileys/src/Utils/process-message.ts
+++ b/whatsapp_addon/Baileys/src/Utils/process-message.ts
@@ -223,7 +223,8 @@ const processMessage = async(
isLatest:
histNotification.syncType !== proto.HistorySync.HistorySyncType.ON_DEMAND
? isLatest
- : undefined
+ : undefined,
+ peerDataRequestSessionId: histNotification.peerDataRequestSessionId
})
}
@@ -282,6 +283,7 @@ const processMessage = async(
const { peerDataOperationResult } = response
for(const result of peerDataOperationResult!) {
const { placeholderMessageResendResponse: retryResponse } = result
+ //eslint-disable-next-line max-depth
if(retryResponse) {
const webMessageInfo = proto.WebMessageInfo.decode(retryResponse.webMessageInfoBytes!)
// wait till another upsert event is available, don't want it to be part of the PDO response message
@@ -296,6 +298,25 @@ const processMessage = async(
}
}
+ case proto.Message.ProtocolMessage.Type.MESSAGE_EDIT:
+ ev.emit(
+ 'messages.update',
+ [
+ {
+ key: protocolMsg.key!,
+ update: {
+ message: {
+ editedMessage: {
+ message: protocolMsg.editedMessage
+ }
+ },
+ messageTimestamp: protocolMsg.timestampMs
+ ? Math.floor(toNumber(protocolMsg.timestampMs) / 1000)
+ : message.messageTimestamp
+ }
+ }
+ ]
+ )
break
}
} else if(content?.reactionMessage) {
diff --git a/whatsapp_addon/Baileys/src/Utils/signal.ts b/whatsapp_addon/Baileys/src/Utils/signal.ts
index 8135b6f1..87253992 100644
--- a/whatsapp_addon/Baileys/src/Utils/signal.ts
+++ b/whatsapp_addon/Baileys/src/Utils/signal.ts
@@ -3,6 +3,7 @@ import { KEY_BUNDLE_TYPE } from '../Defaults'
import { SignalRepository } from '../Types'
import { AuthenticationCreds, AuthenticationState, KeyPair, SignalIdentity, SignalKeyStore, SignedKeyPair } from '../Types/Auth'
import { assertNodeErrorFree, BinaryNode, getBinaryNodeChild, getBinaryNodeChildBuffer, getBinaryNodeChildren, getBinaryNodeChildUInt, jidDecode, JidWithDevice, S_WHATSAPP_NET } from '../WABinary'
+import { DeviceListData, ParsedDeviceInfo, USyncQueryResultList } from '../WAUSync'
import { Curve, generateSignalPubKey } from './crypto'
import { encodeBigEndian } from './generics'
@@ -73,7 +74,7 @@ export const parseAndInjectE2ESessions = async(
const extractKey = (key: BinaryNode) => (
key ? ({
keyId: getBinaryNodeChildUInt(key, 'id', 3)!,
- publicKey: generateSignalPubKey(getBinaryNodeChildBuffer(key, 'value')!)!,
+ publicKey: generateSignalPubKey(getBinaryNodeChildBuffer(key, 'value')!),
signature: getBinaryNodeChildBuffer(key, 'signature')!,
}) : undefined
)
@@ -114,28 +115,24 @@ export const parseAndInjectE2ESessions = async(
}
}
-export const extractDeviceJids = (result: BinaryNode, myJid: string, excludeZeroDevices: boolean) => {
+export const extractDeviceJids = (result: USyncQueryResultList[], myJid: string, excludeZeroDevices: boolean) => {
const { user: myUser, device: myDevice } = jidDecode(myJid)!
+
const extracted: JidWithDevice[] = []
- for(const node of result.content as BinaryNode[]) {
- const list = getBinaryNodeChild(node, 'list')?.content
- if(list && Array.isArray(list)) {
- for(const item of list) {
- const { user } = jidDecode(item.attrs.jid)!
- const devicesNode = getBinaryNodeChild(item, 'devices')
- const deviceListNode = getBinaryNodeChild(devicesNode, 'device-list')
- if(Array.isArray(deviceListNode?.content)) {
- for(const { tag, attrs } of deviceListNode!.content) {
- const device = +attrs.id
- if(
- tag === 'device' && // ensure the "device" tag
- (!excludeZeroDevices || device !== 0) && // if zero devices are not-excluded, or device is non zero
- (myUser !== user || myDevice !== device) && // either different user or if me user, not this device
- (device === 0 || !!attrs['key-index']) // ensure that "key-index" is specified for "non-zero" devices, produces a bad req otherwise
- ) {
- extracted.push({ user, device })
- }
- }
+
+
+ for(const userResult of result) {
+ const { devices, id } = userResult as { devices: ParsedDeviceInfo, id: string }
+ const { user } = jidDecode(id)!
+ const deviceList = devices?.deviceList as DeviceListData[]
+ if(Array.isArray(deviceList)) {
+ for(const { id: device, keyIndex } of deviceList) {
+ if(
+ (!excludeZeroDevices || device !== 0) && // if zero devices are not-excluded, or device is non zero
+ (myUser !== user || myDevice !== device) && // either different user or if me user, not this device
+ (device === 0 || !!keyIndex) // ensure that "key-index" is specified for "non-zero" devices, produces a bad req otherwise
+ ) {
+ extracted.push({ user, device })
}
}
}
diff --git a/whatsapp_addon/Baileys/src/Utils/use-multi-file-auth-state.ts b/whatsapp_addon/Baileys/src/Utils/use-multi-file-auth-state.ts
index 812d7928..c3f6cee5 100644
--- a/whatsapp_addon/Baileys/src/Utils/use-multi-file-auth-state.ts
+++ b/whatsapp_addon/Baileys/src/Utils/use-multi-file-auth-state.ts
@@ -21,7 +21,7 @@ const fileLock = new AsyncLock({ maxPending: Infinity })
* Would recommend writing an auth state for use with a proper SQL or No-SQL DB
* */
export const useMultiFileAuthState = async(folder: string): Promise<{ state: AuthenticationState, saveCreds: () => Promise }> => {
-
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
const writeData = (data: any, file: string) => {
const filePath = join(folder, fixFileName(file)!)
return fileLock.acquire(
diff --git a/whatsapp_addon/Baileys/src/Utils/validate-connection.ts b/whatsapp_addon/Baileys/src/Utils/validate-connection.ts
index 6057d5dc..a80791f5 100644
--- a/whatsapp_addon/Baileys/src/Utils/validate-connection.ts
+++ b/whatsapp_addon/Baileys/src/Utils/validate-connection.ts
@@ -9,30 +9,21 @@ import { encodeBigEndian } from './generics'
import { createSignalIdentity } from './signal'
const getUserAgent = (config: SocketConfig): proto.ClientPayload.IUserAgent => {
- const osVersion = config.mobile ? '15.3.1' : '0.1'
- const version = config.mobile ? [2, 24, 6] : config.version
- const device = config.mobile ? 'iPhone_7' : 'Desktop'
- const manufacturer = config.mobile ? 'Apple' : ''
- const platform = config.mobile ? proto.ClientPayload.UserAgent.Platform.IOS : proto.ClientPayload.UserAgent.Platform.WEB
- const phoneId = config.mobile ? { phoneId: config.auth.creds.phoneId } : {}
-
return {
appVersion: {
- primary: version[0],
- secondary: version[1],
- tertiary: version[2],
+ primary: config.version[0],
+ secondary: config.version[1],
+ tertiary: config.version[2],
},
- platform,
+ platform: proto.ClientPayload.UserAgent.Platform.WEB,
releaseChannel: proto.ClientPayload.UserAgent.ReleaseChannel.RELEASE,
- mcc: config.auth.creds.registration?.phoneNumberMobileCountryCode || '000',
- mnc: config.auth.creds.registration?.phoneNumberMobileNetworkCode || '000',
- osVersion: osVersion,
- manufacturer,
- device,
- osBuildNumber: osVersion,
+ osVersion: '0.1',
+ device: 'Desktop',
+ osBuildNumber: '0.1',
localeLanguageIso6391: 'en',
- localeCountryIso31661Alpha2: 'US',
- ...phoneId
+ mnc: '000',
+ mcc: '000',
+ localeCountryIso31661Alpha2: config.countryCode,
}
}
@@ -58,40 +49,18 @@ const getClientPayload = (config: SocketConfig) => {
userAgent: getUserAgent(config),
}
- if(!config.mobile) {
- payload.webInfo = getWebInfo(config)
- }
+ payload.webInfo = getWebInfo(config)
return payload
}
-export const generateMobileNode = (config: SocketConfig): proto.IClientPayload => {
- if(!config.auth.creds) {
- throw new Boom('No registration data found', { data: config })
- }
-
- const payload: proto.IClientPayload = {
- ...getClientPayload(config),
- sessionId: Math.floor(Math.random() * 999999999 + 1),
- shortConnect: true,
- connectAttemptCount: 0,
- device: 0,
- dnsSource: {
- appCached: false,
- dnsMethod: proto.ClientPayload.DNSSource.DNSResolutionMethod.SYSTEM,
- },
- passive: false, // XMPP heartbeat setting (false: server actively pings) (true: client actively pings)
- pushName: 'test',
- username: Number(`${config.auth.creds.registration.phoneNumberCountryCode}${config.auth.creds.registration.phoneNumberNationalNumber}`),
- }
- return proto.ClientPayload.fromObject(payload)
-}
export const generateLoginNode = (userJid: string, config: SocketConfig): proto.IClientPayload => {
const { user, device } = jidDecode(userJid)!
const payload: proto.IClientPayload = {
...getClientPayload(config),
- passive: true,
+ passive: false,
+ pull: true,
username: +user,
device: device,
}
@@ -124,6 +93,7 @@ export const generateRegistrationNode = (
const registerPayload: proto.IClientPayload = {
...getClientPayload(config),
passive: false,
+ pull: false,
devicePairingData: {
buildHash: appVersionBuf,
deviceProps: companionProto,
diff --git a/whatsapp_addon/Baileys/src/WABinary/constants.ts b/whatsapp_addon/Baileys/src/WABinary/constants.ts
index 46d3b8ee..e403b261 100644
--- a/whatsapp_addon/Baileys/src/WABinary/constants.ts
+++ b/whatsapp_addon/Baileys/src/WABinary/constants.ts
@@ -31,12 +31,12 @@ export const SINGLE_BYTE_TOKENS: (string | null)[] = [
export const TOKEN_MAP: { [token: string]: { dict?: number, index: number } } = { }
-for(let i = 0;i < SINGLE_BYTE_TOKENS.length;i++) {
- TOKEN_MAP[SINGLE_BYTE_TOKENS[i]!] = { index: i }
+for(const [i, SINGLE_BYTE_TOKEN] of SINGLE_BYTE_TOKENS.entries()) {
+ TOKEN_MAP[SINGLE_BYTE_TOKEN!] = { index: i }
}
-for(let i = 0;i < DOUBLE_BYTE_TOKENS.length;i++) {
- for(let j = 0;j < DOUBLE_BYTE_TOKENS[i].length;j++) {
- TOKEN_MAP[DOUBLE_BYTE_TOKENS[i][j]] = { dict: i, index: j }
+for(const [i, DOUBLE_BYTE_TOKEN] of DOUBLE_BYTE_TOKENS.entries()) {
+ for(const [j, element] of DOUBLE_BYTE_TOKEN.entries()) {
+ TOKEN_MAP[element] = { dict: i, index: j }
}
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/WABinary/encode.ts b/whatsapp_addon/Baileys/src/WABinary/encode.ts
index 8c91fbd9..f1168a60 100644
--- a/whatsapp_addon/Baileys/src/WABinary/encode.ts
+++ b/whatsapp_addon/Baileys/src/WABinary/encode.ts
@@ -28,9 +28,12 @@ const encodeBinaryNodeInner = (
}
}
- const pushBytes = (bytes: Uint8Array | Buffer | number[]) => (
- bytes.forEach (b => buffer.push(b))
- )
+ const pushBytes = (bytes: Uint8Array | Buffer | number[]) => {
+ for(const b of bytes) {
+ buffer.push(b)
+ }
+ }
+
const pushInt16 = (value: number) => {
pushBytes([(value >> 8) & 0xff, value & 0xff])
}
@@ -151,8 +154,7 @@ const encodeBinaryNodeInner = (
return false
}
- for(let i = 0;i < str.length;i++) {
- const char = str[i]
+ for(const char of str) {
const isInNibbleRange = char >= '0' && char <= '9'
if(!isInNibbleRange && char !== '-' && char !== '.') {
return false
@@ -167,10 +169,9 @@ const encodeBinaryNodeInner = (
return false
}
- for(let i = 0;i < str.length;i++) {
- const char = str[i]
+ for(const char of str) {
const isInNibbleRange = char >= '0' && char <= '9'
- if(!isInNibbleRange && !(char >= 'A' && char <= 'F') && !(char >= 'a' && char <= 'f')) {
+ if(!isInNibbleRange && !(char >= 'A' && char <= 'F')) {
return false
}
}
diff --git a/whatsapp_addon/Baileys/src/WABinary/generic-utils.ts b/whatsapp_addon/Baileys/src/WABinary/generic-utils.ts
index fcafc992..48b323c5 100644
--- a/whatsapp_addon/Baileys/src/WABinary/generic-utils.ts
+++ b/whatsapp_addon/Baileys/src/WABinary/generic-utils.ts
@@ -118,4 +118,4 @@ export function binaryNodeToString(node: BinaryNode | BinaryNode['content'], i =
const content: string = children ? `>\n${children}\n${tabs(i)}${node.tag}>` : '/>'
return tag + content
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/WABinary/index.ts b/whatsapp_addon/Baileys/src/WABinary/index.ts
index a7dc6ab8..ecf0c9fe 100644
--- a/whatsapp_addon/Baileys/src/WABinary/index.ts
+++ b/whatsapp_addon/Baileys/src/WABinary/index.ts
@@ -2,4 +2,4 @@ export * from './encode'
export * from './decode'
export * from './generic-utils'
export * from './jid-utils'
-export * from './types'
+export * from './types'
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/WABinary/jid-utils.ts b/whatsapp_addon/Baileys/src/WABinary/jid-utils.ts
index 984c1f6c..9808acb9 100644
--- a/whatsapp_addon/Baileys/src/WABinary/jid-utils.ts
+++ b/whatsapp_addon/Baileys/src/WABinary/jid-utils.ts
@@ -4,7 +4,7 @@ export const SERVER_JID = 'server@c.us'
export const PSA_WID = '0@c.us'
export const STORIES_JID = 'status@broadcast'
-export type JidServer = 'c.us' | 'g.us' | 'broadcast' | 's.whatsapp.net' | 'call' | 'lid'
+export type JidServer = 'c.us' | 'g.us' | 'broadcast' | 's.whatsapp.net' | 'call' | 'lid' | 'newsletter'
export type JidWithDevice = {
user: string
@@ -12,7 +12,7 @@ export type JidWithDevice = {
}
export type FullJid = JidWithDevice & {
- server: JidServer | string
+ server: JidServer
domainType?: number
}
@@ -33,7 +33,7 @@ export const jidDecode = (jid: string | undefined): FullJid | undefined => {
const user = userAgent.split('_')[0]
return {
- server,
+ server: server as JidServer,
user,
domainType: server === 'lid' ? 1 : 0,
device: device ? +device : undefined
diff --git a/whatsapp_addon/Baileys/src/WABinary/types.ts b/whatsapp_addon/Baileys/src/WABinary/types.ts
index 40438abd..dcc0ea23 100644
--- a/whatsapp_addon/Baileys/src/WABinary/types.ts
+++ b/whatsapp_addon/Baileys/src/WABinary/types.ts
@@ -14,4 +14,4 @@ export type BinaryNode = {
export type BinaryNodeAttributes = BinaryNode['attrs']
export type BinaryNodeData = BinaryNode['content']
-export type BinaryNodeCodingOptions = typeof constants
+export type BinaryNodeCodingOptions = typeof constants
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/WAM/constants.ts b/whatsapp_addon/Baileys/src/WAM/constants.ts
index 23fed800..c2a93e2d 100644
--- a/whatsapp_addon/Baileys/src/WAM/constants.ts
+++ b/whatsapp_addon/Baileys/src/WAM/constants.ts
@@ -15375,8 +15375,10 @@ export type EventInputType = {
[key in Event['name']]: {
props: {
// @ts-ignore
- [k in keyof EventByName['props']]: any
+ [k in keyof EventByName['props']]: Value
}
- globals: { [x: string]: any }
+ globals: { [x: string]: Value }
}
} & {}
+
+export type Value = number | null | string
diff --git a/whatsapp_addon/Baileys/src/WAM/encode.ts b/whatsapp_addon/Baileys/src/WAM/encode.ts
index 2c91edc8..53208b49 100644
--- a/whatsapp_addon/Baileys/src/WAM/encode.ts
+++ b/whatsapp_addon/Baileys/src/WAM/encode.ts
@@ -1,9 +1,7 @@
import { BinaryInfo } from './BinaryInfo'
-import { FLAG_BYTE, FLAG_EVENT, FLAG_EXTENDED, FLAG_FIELD, FLAG_GLOBAL, WEB_EVENTS, WEB_GLOBALS } from './constants'
+import { FLAG_BYTE, FLAG_EVENT, FLAG_EXTENDED, FLAG_FIELD, FLAG_GLOBAL, Value, WEB_EVENTS, WEB_GLOBALS } from './constants'
const getHeaderBitLength = (key: number) => (key < 256 ? 2 : 3)
-type Value = number | null | string
-
export const encodeWAM = (binaryInfo: BinaryInfo) => {
binaryInfo.buffer = []
@@ -17,10 +15,10 @@ export const encodeWAM = (binaryInfo: BinaryInfo) => {
.reduce((a, b) => a + b)
const buffer = Buffer.alloc(totalSize)
let offset = 0
- binaryInfo.buffer.forEach((buffer_) => {
+ for(const buffer_ of binaryInfo.buffer) {
buffer_.copy(buffer, offset)
offset += buffer_.length
- })
+ }
return buffer
}
@@ -77,7 +75,7 @@ function encodeEvents(binaryInfo: BinaryInfo) {
}
const fieldFlag = extended ? FLAG_EVENT : FLAG_FIELD | FLAG_EXTENDED
- binaryInfo.buffer.push(serializeData(id, value as Value, fieldFlag))
+ binaryInfo.buffer.push(serializeData(id, value, fieldFlag))
}
}
}
@@ -171,4 +169,4 @@ function serializeHeader(
}
return offset
-}
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/WAM/index.ts b/whatsapp_addon/Baileys/src/WAM/index.ts
index ae8a4d48..5ad5c3af 100644
--- a/whatsapp_addon/Baileys/src/WAM/index.ts
+++ b/whatsapp_addon/Baileys/src/WAM/index.ts
@@ -1,3 +1,3 @@
export * from './constants'
export * from './encode'
-export * from './BinaryInfo'
+export * from './BinaryInfo'
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/WAUSync/Protocols/USyncContactProtocol.ts b/whatsapp_addon/Baileys/src/WAUSync/Protocols/USyncContactProtocol.ts
new file mode 100644
index 00000000..f6448c31
--- /dev/null
+++ b/whatsapp_addon/Baileys/src/WAUSync/Protocols/USyncContactProtocol.ts
@@ -0,0 +1,32 @@
+import { USyncQueryProtocol } from '../../Types/USync'
+import { assertNodeErrorFree, BinaryNode } from '../../WABinary'
+import { USyncUser } from '../USyncUser'
+
+export class USyncContactProtocol implements USyncQueryProtocol {
+ name = 'contact'
+
+ getQueryElement(): BinaryNode {
+ return {
+ tag: 'contact',
+ attrs: {},
+ }
+ }
+
+ getUserElement(user: USyncUser): BinaryNode {
+ //TODO: Implement type / username fields (not yet supported)
+ return {
+ tag: 'contact',
+ attrs: {},
+ content: user.phone,
+ }
+ }
+
+ parser(node: BinaryNode): boolean {
+ if(node.tag === 'contact') {
+ assertNodeErrorFree(node)
+ return node?.attrs?.type === 'in'
+ }
+
+ return false
+ }
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/WAUSync/Protocols/USyncDeviceProtocol.ts b/whatsapp_addon/Baileys/src/WAUSync/Protocols/USyncDeviceProtocol.ts
new file mode 100644
index 00000000..f03a0c0e
--- /dev/null
+++ b/whatsapp_addon/Baileys/src/WAUSync/Protocols/USyncDeviceProtocol.ts
@@ -0,0 +1,78 @@
+import { USyncQueryProtocol } from '../../Types/USync'
+import { assertNodeErrorFree, BinaryNode, getBinaryNodeChild } from '../../WABinary'
+//import { USyncUser } from '../USyncUser'
+
+export type KeyIndexData = {
+ timestamp: number
+ signedKeyIndex?: Uint8Array
+ expectedTimestamp?: number
+}
+
+export type DeviceListData = {
+ id: number
+ keyIndex?: number
+ isHosted?: boolean
+}
+
+export type ParsedDeviceInfo = {
+ deviceList?: DeviceListData[]
+ keyIndex?: KeyIndexData
+}
+
+export class USyncDeviceProtocol implements USyncQueryProtocol {
+ name = 'devices'
+
+ getQueryElement(): BinaryNode {
+ return {
+ tag: 'devices',
+ attrs: {
+ version: '2',
+ },
+ }
+ }
+
+ getUserElement(/* user: USyncUser */): BinaryNode | null {
+ //TODO: Implement device phashing, ts and expectedTs
+ //TODO: if all are not present, return null <- current behavior
+ //TODO: otherwise return a node w tag 'devices' w those as attrs
+ return null
+ }
+
+ parser(node: BinaryNode): ParsedDeviceInfo {
+ const deviceList: DeviceListData[] = []
+ let keyIndex: KeyIndexData | undefined = undefined
+
+ if(node.tag === 'devices') {
+ assertNodeErrorFree(node)
+ const deviceListNode = getBinaryNodeChild(node, 'device-list')
+ const keyIndexNode = getBinaryNodeChild(node, 'key-index-list')
+
+ if(Array.isArray(deviceListNode?.content)) {
+ for(const { tag, attrs } of deviceListNode!.content) {
+ const id = +attrs.id
+ const keyIndex = +attrs['key-index']
+ if(tag === 'device') {
+ deviceList.push({
+ id,
+ keyIndex,
+ isHosted: !!(attrs['is_hosted'] && attrs['is_hosted'] === 'true')
+ })
+ }
+ }
+ }
+
+ if(keyIndexNode?.tag === 'key-index-list') {
+ keyIndex = {
+ timestamp: +keyIndexNode.attrs['ts'],
+ signedKeyIndex: keyIndexNode?.content as Uint8Array,
+ expectedTimestamp: keyIndexNode.attrs['expected_ts'] ? +keyIndexNode.attrs['expected_ts'] : undefined
+ }
+ }
+ }
+
+ return {
+ deviceList,
+ keyIndex
+ }
+ }
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/WAUSync/Protocols/USyncDisappearingModeProtocol.ts b/whatsapp_addon/Baileys/src/WAUSync/Protocols/USyncDisappearingModeProtocol.ts
new file mode 100644
index 00000000..512b3ba5
--- /dev/null
+++ b/whatsapp_addon/Baileys/src/WAUSync/Protocols/USyncDisappearingModeProtocol.ts
@@ -0,0 +1,35 @@
+import { USyncQueryProtocol } from '../../Types/USync'
+import { assertNodeErrorFree, BinaryNode } from '../../WABinary'
+
+export type DisappearingModeData = {
+ duration: number
+ setAt?: Date
+}
+
+export class USyncDisappearingModeProtocol implements USyncQueryProtocol {
+ name = 'disappearing_mode'
+
+ getQueryElement(): BinaryNode {
+ return {
+ tag: 'disappearing_mode',
+ attrs: {},
+ }
+ }
+
+ getUserElement(): null {
+ return null
+ }
+
+ parser(node: BinaryNode): DisappearingModeData | undefined {
+ if(node.tag === 'status') {
+ assertNodeErrorFree(node)
+ const duration: number = +node?.attrs.duration
+ const setAt = new Date(+(node?.attrs.t || 0) * 1000)
+
+ return {
+ duration,
+ setAt,
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/WAUSync/Protocols/USyncStatusProtocol.ts b/whatsapp_addon/Baileys/src/WAUSync/Protocols/USyncStatusProtocol.ts
new file mode 100644
index 00000000..02cd2b13
--- /dev/null
+++ b/whatsapp_addon/Baileys/src/WAUSync/Protocols/USyncStatusProtocol.ts
@@ -0,0 +1,44 @@
+import { USyncQueryProtocol } from '../../Types/USync'
+import { assertNodeErrorFree, BinaryNode } from '../../WABinary'
+
+export type StatusData = {
+ status?: string | null
+ setAt?: Date
+}
+
+export class USyncStatusProtocol implements USyncQueryProtocol {
+ name = 'status'
+
+ getQueryElement(): BinaryNode {
+ return {
+ tag: 'status',
+ attrs: {},
+ }
+ }
+
+ getUserElement(): null {
+ return null
+ }
+
+ parser(node: BinaryNode): StatusData | undefined {
+ if(node.tag === 'status') {
+ assertNodeErrorFree(node)
+ let status: string | null = node?.content!.toString()
+ const setAt = new Date(+(node?.attrs.t || 0) * 1000)
+ if(!status) {
+ if(+node.attrs?.code === 401) {
+ status = ''
+ } else {
+ status = null
+ }
+ } else if(typeof status === 'string' && status.length === 0) {
+ status = null
+ }
+
+ return {
+ status,
+ setAt,
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/WAUSync/Protocols/index.ts b/whatsapp_addon/Baileys/src/WAUSync/Protocols/index.ts
new file mode 100644
index 00000000..56f1daae
--- /dev/null
+++ b/whatsapp_addon/Baileys/src/WAUSync/Protocols/index.ts
@@ -0,0 +1,4 @@
+export * from './USyncDeviceProtocol'
+export * from './USyncContactProtocol'
+export * from './USyncStatusProtocol'
+export * from './USyncDisappearingModeProtocol'
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/WAUSync/USyncQuery.ts b/whatsapp_addon/Baileys/src/WAUSync/USyncQuery.ts
new file mode 100644
index 00000000..0d4b6764
--- /dev/null
+++ b/whatsapp_addon/Baileys/src/WAUSync/USyncQuery.ts
@@ -0,0 +1,103 @@
+import { USyncQueryProtocol } from '../Types/USync'
+import { BinaryNode, getBinaryNodeChild } from '../WABinary'
+import { USyncContactProtocol, USyncDeviceProtocol, USyncDisappearingModeProtocol, USyncStatusProtocol } from './Protocols'
+import { USyncUser } from './USyncUser'
+
+export type USyncQueryResultList = { [protocol: string]: unknown, id: string }
+
+export type USyncQueryResult = {
+ list: USyncQueryResultList[]
+ sideList: USyncQueryResultList[]
+}
+
+export class USyncQuery {
+ protocols: USyncQueryProtocol[]
+ users: USyncUser[]
+ context: string
+ mode: string
+
+ constructor() {
+ this.protocols = []
+ this.users = []
+ this.context = 'interactive'
+ this.mode = 'query'
+ }
+
+ withMode(mode: string) {
+ this.mode = mode
+ return this
+ }
+
+ withContext(context: string) {
+ this.context = context
+ return this
+ }
+
+ withUser(user: USyncUser) {
+ this.users.push(user)
+ return this
+ }
+
+ parseUSyncQueryResult(result: BinaryNode): USyncQueryResult | undefined {
+ if(result.attrs.type !== 'result') {
+ return
+ }
+
+ const protocolMap = Object.fromEntries(this.protocols.map((protocol) => {
+ return [protocol.name, protocol.parser]
+ }))
+
+ const queryResult: USyncQueryResult = {
+ // TODO: implement errors etc.
+ list: [],
+ sideList: [],
+ }
+
+ const usyncNode = getBinaryNodeChild(result, 'usync')
+
+ //TODO: implement error backoff, refresh etc.
+ //TODO: see if there are any errors in the result node
+ //const resultNode = getBinaryNodeChild(usyncNode, 'result')
+
+ const listNode = getBinaryNodeChild(usyncNode, 'list')
+ if(Array.isArray(listNode?.content) && typeof listNode !== 'undefined') {
+ queryResult.list = listNode.content.map((node) => {
+ const id = node?.attrs.jid
+ const data = Array.isArray(node?.content) ? Object.fromEntries(node.content.map((content) => {
+ const protocol = content.tag
+ const parser = protocolMap[protocol]
+ if(parser) {
+ return [protocol, parser(content)]
+ } else {
+ return [protocol, null]
+ }
+ }).filter(([, b]) => b !== null) as [string, unknown][]) : {}
+ return { ...data, id }
+ })
+ }
+
+ //TODO: implement side list
+ //const sideListNode = getBinaryNodeChild(usyncNode, 'side_list')
+ return queryResult
+ }
+
+ withDeviceProtocol() {
+ this.protocols.push(new USyncDeviceProtocol())
+ return this
+ }
+
+ withContactProtocol() {
+ this.protocols.push(new USyncContactProtocol())
+ return this
+ }
+
+ withStatusProtocol() {
+ this.protocols.push(new USyncStatusProtocol())
+ return this
+ }
+
+ withDisappearingModeProtocol() {
+ this.protocols.push(new USyncDisappearingModeProtocol())
+ return this
+ }
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/WAUSync/USyncUser.ts b/whatsapp_addon/Baileys/src/WAUSync/USyncUser.ts
new file mode 100644
index 00000000..0bd4b8a9
--- /dev/null
+++ b/whatsapp_addon/Baileys/src/WAUSync/USyncUser.ts
@@ -0,0 +1,27 @@
+export class USyncUser {
+ id: string
+ lid: string
+ phone: string
+ type: string
+
+ withId(id: string) {
+ this.id = id
+ return this
+ }
+
+ withLid(lid: string) {
+ this.lid = lid
+ return this
+ }
+
+ withPhone(phone: string) {
+ this.phone = phone
+ return this
+ }
+
+ withType(type: string) {
+ this.type = type
+ return this
+ }
+
+}
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/WAUSync/index.ts b/whatsapp_addon/Baileys/src/WAUSync/index.ts
new file mode 100644
index 00000000..e36c97ef
--- /dev/null
+++ b/whatsapp_addon/Baileys/src/WAUSync/index.ts
@@ -0,0 +1,3 @@
+export * from './Protocols'
+export * from './USyncQuery'
+export * from './USyncUser'
\ No newline at end of file
diff --git a/whatsapp_addon/Baileys/src/index.ts b/whatsapp_addon/Baileys/src/index.ts
index 71f04194..c510f4aa 100644
--- a/whatsapp_addon/Baileys/src/index.ts
+++ b/whatsapp_addon/Baileys/src/index.ts
@@ -7,6 +7,7 @@ export * from './Store'
export * from './Defaults'
export * from './WABinary'
export * from './WAM'
+export * from './WAUSync'
export type WASocket = ReturnType
export { makeWASocket }
diff --git a/whatsapp_addon/Baileys/tsconfig.json b/whatsapp_addon/Baileys/tsconfig.json
index 598e2f6f..2fe7ae33 100644
--- a/whatsapp_addon/Baileys/tsconfig.json
+++ b/whatsapp_addon/Baileys/tsconfig.json
@@ -2,7 +2,6 @@
"compilerOptions": {
"target": "es2018",
"module": "CommonJS",
- "moduleResolution": "NodeNext",
"experimentalDecorators": true,
"allowJs": false,
"checkJs": false,
diff --git a/whatsapp_addon/Baileys/yarn.lock b/whatsapp_addon/Baileys/yarn.lock
index ae5bf622..ca0189f1 100644
--- a/whatsapp_addon/Baileys/yarn.lock
+++ b/whatsapp_addon/Baileys/yarn.lock
@@ -2,15 +2,6 @@
# yarn lockfile v1
-"@adiwajshing/eslint-config@github:adiwajshing/eslint-config":
- version "1.0.0"
- resolved "https://codeload.github.com/adiwajshing/eslint-config/tar.gz/dd6fbbce8bee82f051cd802efc522e393e0b23d0"
- dependencies:
- "@typescript-eslint/eslint-plugin" "^5.33.1"
- "@typescript-eslint/parser" "^5.59.0"
- eslint-plugin-react "^7.32.2"
- eslint-plugin-simple-import-sort "^10.0.0"
-
"@adiwajshing/keyed-db@^0.2.4":
version "0.2.4"
resolved "https://registry.yarnpkg.com/@adiwajshing/keyed-db/-/keyed-db-0.2.4.tgz#2a09e88fce20b2672deb60a7750c5fe3ab0dfd99"
@@ -24,159 +15,131 @@
"@jridgewell/gen-mapping" "^0.3.5"
"@jridgewell/trace-mapping" "^0.3.24"
-"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.24.7":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465"
- integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==
+"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.25.7":
+ version "7.25.7"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.25.7.tgz#438f2c524071531d643c6f0188e1e28f130cebc7"
+ integrity sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==
dependencies:
- "@babel/highlight" "^7.24.7"
+ "@babel/highlight" "^7.25.7"
picocolors "^1.0.0"
-"@babel/compat-data@^7.24.7":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.7.tgz#d23bbea508c3883ba8251fb4164982c36ea577ed"
- integrity sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==
+"@babel/compat-data@^7.25.7":
+ version "7.25.8"
+ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.8.tgz#0376e83df5ab0eb0da18885c0140041f0747a402"
+ integrity sha512-ZsysZyXY4Tlx+Q53XdnOFmqwfB9QDTHYxaZYajWRoBLuLEAwI2UIbtxOjWh/cFaa9IKUlcB+DDuoskLuKu56JA==
"@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.24.7.tgz#b676450141e0b52a3d43bc91da86aa608f950ac4"
- integrity sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==
+ version "7.25.8"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.25.8.tgz#a57137d2a51bbcffcfaeba43cb4dd33ae3e0e1c6"
+ integrity sha512-Oixnb+DzmRT30qu9d3tJSQkxuygWm32DFykT4bRoORPa9hZ/L4KhVB/XiRm6KG+roIEM7DBQlmg27kw2HZkdZg==
dependencies:
"@ampproject/remapping" "^2.2.0"
- "@babel/code-frame" "^7.24.7"
- "@babel/generator" "^7.24.7"
- "@babel/helper-compilation-targets" "^7.24.7"
- "@babel/helper-module-transforms" "^7.24.7"
- "@babel/helpers" "^7.24.7"
- "@babel/parser" "^7.24.7"
- "@babel/template" "^7.24.7"
- "@babel/traverse" "^7.24.7"
- "@babel/types" "^7.24.7"
+ "@babel/code-frame" "^7.25.7"
+ "@babel/generator" "^7.25.7"
+ "@babel/helper-compilation-targets" "^7.25.7"
+ "@babel/helper-module-transforms" "^7.25.7"
+ "@babel/helpers" "^7.25.7"
+ "@babel/parser" "^7.25.8"
+ "@babel/template" "^7.25.7"
+ "@babel/traverse" "^7.25.7"
+ "@babel/types" "^7.25.8"
convert-source-map "^2.0.0"
debug "^4.1.0"
gensync "^1.0.0-beta.2"
json5 "^2.2.3"
semver "^6.3.1"
-"@babel/generator@^7.24.7", "@babel/generator@^7.7.2":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.7.tgz#1654d01de20ad66b4b4d99c135471bc654c55e6d"
- integrity sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==
+"@babel/generator@^7.25.7", "@babel/generator@^7.7.2":
+ version "7.25.7"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.7.tgz#de86acbeb975a3e11ee92dd52223e6b03b479c56"
+ integrity sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==
dependencies:
- "@babel/types" "^7.24.7"
+ "@babel/types" "^7.25.7"
"@jridgewell/gen-mapping" "^0.3.5"
"@jridgewell/trace-mapping" "^0.3.25"
- jsesc "^2.5.1"
+ jsesc "^3.0.2"
-"@babel/helper-compilation-targets@^7.24.7":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz#4eb6c4a80d6ffeac25ab8cd9a21b5dfa48d503a9"
- integrity sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==
+"@babel/helper-compilation-targets@^7.25.7":
+ version "7.25.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.7.tgz#11260ac3322dda0ef53edfae6e97b961449f5fa4"
+ integrity sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==
dependencies:
- "@babel/compat-data" "^7.24.7"
- "@babel/helper-validator-option" "^7.24.7"
- browserslist "^4.22.2"
+ "@babel/compat-data" "^7.25.7"
+ "@babel/helper-validator-option" "^7.25.7"
+ browserslist "^4.24.0"
lru-cache "^5.1.1"
semver "^6.3.1"
-"@babel/helper-environment-visitor@^7.24.7":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz#4b31ba9551d1f90781ba83491dd59cf9b269f7d9"
- integrity sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==
- dependencies:
- "@babel/types" "^7.24.7"
-
-"@babel/helper-function-name@^7.24.7":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz#75f1e1725742f39ac6584ee0b16d94513da38dd2"
- integrity sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==
- dependencies:
- "@babel/template" "^7.24.7"
- "@babel/types" "^7.24.7"
-
-"@babel/helper-hoist-variables@^7.24.7":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz#b4ede1cde2fd89436397f30dc9376ee06b0f25ee"
- integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==
- dependencies:
- "@babel/types" "^7.24.7"
-
-"@babel/helper-module-imports@^7.24.7":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz#f2f980392de5b84c3328fc71d38bd81bbb83042b"
- integrity sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==
- dependencies:
- "@babel/traverse" "^7.24.7"
- "@babel/types" "^7.24.7"
-
-"@babel/helper-module-transforms@^7.24.7":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz#31b6c9a2930679498db65b685b1698bfd6c7daf8"
- integrity sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==
- dependencies:
- "@babel/helper-environment-visitor" "^7.24.7"
- "@babel/helper-module-imports" "^7.24.7"
- "@babel/helper-simple-access" "^7.24.7"
- "@babel/helper-split-export-declaration" "^7.24.7"
- "@babel/helper-validator-identifier" "^7.24.7"
-
-"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.24.7", "@babel/helper-plugin-utils@^7.8.0":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz#98c84fe6fe3d0d3ae7bfc3a5e166a46844feb2a0"
- integrity sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==
-
-"@babel/helper-simple-access@^7.24.7":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz#bcade8da3aec8ed16b9c4953b74e506b51b5edb3"
- integrity sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==
- dependencies:
- "@babel/traverse" "^7.24.7"
- "@babel/types" "^7.24.7"
-
-"@babel/helper-split-export-declaration@^7.24.7":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz#83949436890e07fa3d6873c61a96e3bbf692d856"
- integrity sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==
- dependencies:
- "@babel/types" "^7.24.7"
-
-"@babel/helper-string-parser@^7.24.7":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz#4d2d0f14820ede3b9807ea5fc36dfc8cd7da07f2"
- integrity sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==
-
-"@babel/helper-validator-identifier@^7.24.7":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db"
- integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==
-
-"@babel/helper-validator-option@^7.24.7":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz#24c3bb77c7a425d1742eec8fb433b5a1b38e62f6"
- integrity sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==
-
-"@babel/helpers@^7.24.7":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.24.7.tgz#aa2ccda29f62185acb5d42fb4a3a1b1082107416"
- integrity sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==
- dependencies:
- "@babel/template" "^7.24.7"
- "@babel/types" "^7.24.7"
-
-"@babel/highlight@^7.24.7":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d"
- integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==
- dependencies:
- "@babel/helper-validator-identifier" "^7.24.7"
+"@babel/helper-module-imports@^7.25.7":
+ version "7.25.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.25.7.tgz#dba00d9523539152906ba49263e36d7261040472"
+ integrity sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==
+ dependencies:
+ "@babel/traverse" "^7.25.7"
+ "@babel/types" "^7.25.7"
+
+"@babel/helper-module-transforms@^7.25.7":
+ version "7.25.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.25.7.tgz#2ac9372c5e001b19bc62f1fe7d96a18cb0901d1a"
+ integrity sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==
+ dependencies:
+ "@babel/helper-module-imports" "^7.25.7"
+ "@babel/helper-simple-access" "^7.25.7"
+ "@babel/helper-validator-identifier" "^7.25.7"
+ "@babel/traverse" "^7.25.7"
+
+"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.25.7", "@babel/helper-plugin-utils@^7.8.0":
+ version "7.25.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.7.tgz#8ec5b21812d992e1ef88a9b068260537b6f0e36c"
+ integrity sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==
+
+"@babel/helper-simple-access@^7.25.7":
+ version "7.25.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.25.7.tgz#5eb9f6a60c5d6b2e0f76057004f8dacbddfae1c0"
+ integrity sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==
+ dependencies:
+ "@babel/traverse" "^7.25.7"
+ "@babel/types" "^7.25.7"
+
+"@babel/helper-string-parser@^7.25.7":
+ version "7.25.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz#d50e8d37b1176207b4fe9acedec386c565a44a54"
+ integrity sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==
+
+"@babel/helper-validator-identifier@^7.25.7":
+ version "7.25.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz#77b7f60c40b15c97df735b38a66ba1d7c3e93da5"
+ integrity sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==
+
+"@babel/helper-validator-option@^7.25.7":
+ version "7.25.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.25.7.tgz#97d1d684448228b30b506d90cace495d6f492729"
+ integrity sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==
+
+"@babel/helpers@^7.25.7":
+ version "7.25.7"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.7.tgz#091b52cb697a171fe0136ab62e54e407211f09c2"
+ integrity sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==
+ dependencies:
+ "@babel/template" "^7.25.7"
+ "@babel/types" "^7.25.7"
+
+"@babel/highlight@^7.25.7":
+ version "7.25.7"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.25.7.tgz#20383b5f442aa606e7b5e3043b0b1aafe9f37de5"
+ integrity sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==
+ dependencies:
+ "@babel/helper-validator-identifier" "^7.25.7"
chalk "^2.4.2"
js-tokens "^4.0.0"
picocolors "^1.0.0"
-"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.24.7":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85"
- integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==
+"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.25.7", "@babel/parser@^7.25.8":
+ version "7.25.8"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.8.tgz#f6aaf38e80c36129460c1657c0762db584c9d5e2"
+ integrity sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==
+ dependencies:
+ "@babel/types" "^7.25.8"
"@babel/plugin-syntax-async-generators@^7.8.4":
version "7.8.4"
@@ -192,14 +155,28 @@
dependencies:
"@babel/helper-plugin-utils" "^7.8.0"
-"@babel/plugin-syntax-class-properties@^7.8.3":
+"@babel/plugin-syntax-class-properties@^7.12.13":
version "7.12.13"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz#b5c987274c4a3a82b89714796931a6b53544ae10"
integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==
dependencies:
"@babel/helper-plugin-utils" "^7.12.13"
-"@babel/plugin-syntax-import-meta@^7.8.3":
+"@babel/plugin-syntax-class-static-block@^7.14.5":
+ version "7.14.5"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz#195df89b146b4b78b3bf897fd7a257c84659d406"
+ integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.14.5"
+
+"@babel/plugin-syntax-import-attributes@^7.24.7":
+ version "7.25.7"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.7.tgz#d78dd0499d30df19a598e63ab895e21b909bc43f"
+ integrity sha512-AqVo+dguCgmpi/3mYBdu9lkngOBlQ2w2vnNpa6gfiCxQZLzV4ZbhsXitJ2Yblkoe1VQwtHSaNmIaGll/26YWRw==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.25.7"
+
+"@babel/plugin-syntax-import-meta@^7.10.4":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51"
integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==
@@ -213,7 +190,7 @@
dependencies:
"@babel/helper-plugin-utils" "^7.8.0"
-"@babel/plugin-syntax-logical-assignment-operators@^7.8.3":
+"@babel/plugin-syntax-logical-assignment-operators@^7.10.4":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699"
integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==
@@ -227,7 +204,7 @@
dependencies:
"@babel/helper-plugin-utils" "^7.8.0"
-"@babel/plugin-syntax-numeric-separator@^7.8.3":
+"@babel/plugin-syntax-numeric-separator@^7.10.4":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz#b9b070b3e33570cd9fd07ba7fa91c0dd37b9af97"
integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==
@@ -255,7 +232,14 @@
dependencies:
"@babel/helper-plugin-utils" "^7.8.0"
-"@babel/plugin-syntax-top-level-await@^7.8.3":
+"@babel/plugin-syntax-private-property-in-object@^7.14.5":
+ version "7.14.5"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz#0dc6671ec0ea22b6e94a1114f857970cd39de1ad"
+ integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==
+ dependencies:
+ "@babel/helper-plugin-utils" "^7.14.5"
+
+"@babel/plugin-syntax-top-level-await@^7.14.5":
version "7.14.5"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz#c1cfdadc35a646240001f06138247b741c34d94c"
integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==
@@ -263,51 +247,48 @@
"@babel/helper-plugin-utils" "^7.14.5"
"@babel/plugin-syntax-typescript@^7.7.2":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz#58d458271b4d3b6bb27ee6ac9525acbb259bad1c"
- integrity sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==
+ version "7.25.7"
+ resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.7.tgz#bfc05b0cc31ebd8af09964650cee723bb228108b"
+ integrity sha512-rR+5FDjpCHqqZN2bzZm18bVYGaejGq5ZkpVCJLXor/+zlSrSoc4KWcHI0URVWjl/68Dyr1uwZUz/1njycEAv9g==
dependencies:
- "@babel/helper-plugin-utils" "^7.24.7"
+ "@babel/helper-plugin-utils" "^7.25.7"
"@babel/runtime@^7.7.2":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.7.tgz#f4f0d5530e8dbdf59b3451b9b3e594b6ba082e12"
- integrity sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==
+ version "7.25.7"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.7.tgz#7ffb53c37a8f247c8c4d335e89cdf16a2e0d0fb6"
+ integrity sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==
dependencies:
regenerator-runtime "^0.14.0"
-"@babel/template@^7.24.7", "@babel/template@^7.3.3":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.7.tgz#02efcee317d0609d2c07117cb70ef8fb17ab7315"
- integrity sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==
- dependencies:
- "@babel/code-frame" "^7.24.7"
- "@babel/parser" "^7.24.7"
- "@babel/types" "^7.24.7"
-
-"@babel/traverse@^7.24.7", "@babel/traverse@^7.7.2":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.7.tgz#de2b900163fa741721ba382163fe46a936c40cf5"
- integrity sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==
- dependencies:
- "@babel/code-frame" "^7.24.7"
- "@babel/generator" "^7.24.7"
- "@babel/helper-environment-visitor" "^7.24.7"
- "@babel/helper-function-name" "^7.24.7"
- "@babel/helper-hoist-variables" "^7.24.7"
- "@babel/helper-split-export-declaration" "^7.24.7"
- "@babel/parser" "^7.24.7"
- "@babel/types" "^7.24.7"
+"@babel/template@^7.25.7", "@babel/template@^7.3.3":
+ version "7.25.7"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.7.tgz#27f69ce382855d915b14ab0fe5fb4cbf88fa0769"
+ integrity sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==
+ dependencies:
+ "@babel/code-frame" "^7.25.7"
+ "@babel/parser" "^7.25.7"
+ "@babel/types" "^7.25.7"
+
+"@babel/traverse@^7.25.7", "@babel/traverse@^7.7.2":
+ version "7.25.7"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.7.tgz#83e367619be1cab8e4f2892ef30ba04c26a40fa8"
+ integrity sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==
+ dependencies:
+ "@babel/code-frame" "^7.25.7"
+ "@babel/generator" "^7.25.7"
+ "@babel/parser" "^7.25.7"
+ "@babel/template" "^7.25.7"
+ "@babel/types" "^7.25.7"
debug "^4.3.1"
globals "^11.1.0"
-"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.24.7", "@babel/types@^7.3.3":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2"
- integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==
+"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.25.7", "@babel/types@^7.25.8", "@babel/types@^7.3.3":
+ version "7.25.8"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.8.tgz#5cf6037258e8a9bcad533f4979025140cb9993e1"
+ integrity sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==
dependencies:
- "@babel/helper-string-parser" "^7.24.7"
- "@babel/helper-validator-identifier" "^7.24.7"
+ "@babel/helper-string-parser" "^7.25.7"
+ "@babel/helper-validator-identifier" "^7.25.7"
to-fast-properties "^2.0.0"
"@bcoe/v8-coverage@^0.2.3":
@@ -327,17 +308,17 @@
resolved "https://registry.yarnpkg.com/@eshaz/web-worker/-/web-worker-1.2.2.tgz#506ec07ab811c15a12799725a0d8b82289e3d937"
integrity sha512-WxXiHFmD9u/owrzempiDlBB1ZYqiLnm9s6aPc8AlFQalq2tKmqdmMr9GXOupDgzXtqnBipj8Un0gkIm7Sjf8mw==
-"@eslint-community/eslint-utils@^4.2.0":
+"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0":
version "4.4.0"
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
dependencies:
eslint-visitor-keys "^3.3.0"
-"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1":
- version "4.10.1"
- resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.1.tgz#361461e5cb3845d874e61731c11cfedd664d83a0"
- integrity sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==
+"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.6.1":
+ version "4.11.1"
+ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.11.1.tgz#a547badfc719eb3e5f4b556325e542fbe9d7a18f"
+ integrity sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==
"@eslint/eslintrc@^2.1.4":
version "2.1.4"
@@ -354,10 +335,10 @@
minimatch "^3.1.2"
strip-json-comments "^3.1.1"
-"@eslint/js@8.57.0":
- version "8.57.0"
- resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f"
- integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==
+"@eslint/js@8.57.1":
+ version "8.57.1"
+ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.1.tgz#de633db3ec2ef6a3c89e2f19038063e8a122e2c2"
+ integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==
"@hapi/boom@^9.1.3":
version "9.1.4"
@@ -371,12 +352,12 @@
resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb"
integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==
-"@humanwhocodes/config-array@^0.11.14":
- version "0.11.14"
- resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b"
- integrity sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==
+"@humanwhocodes/config-array@^0.13.0":
+ version "0.13.0"
+ resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.13.0.tgz#fb907624df3256d04b9aa2df50d7aa97ec648748"
+ integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==
dependencies:
- "@humanwhocodes/object-schema" "^2.0.2"
+ "@humanwhocodes/object-schema" "^2.0.3"
debug "^4.3.1"
minimatch "^3.0.5"
@@ -385,7 +366,7 @@
resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c"
integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==
-"@humanwhocodes/object-schema@^2.0.2":
+"@humanwhocodes/object-schema@^2.0.3":
version "2.0.3"
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz#4a2868d75d6d6963e423bcf90b7fd1be343409d3"
integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==
@@ -895,9 +876,9 @@
integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==
"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14":
- version "1.4.15"
- resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32"
- integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz#3188bcb273a414b0d215fd22a58540b989b9409a"
+ integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==
"@jridgewell/trace-mapping@0.3.9":
version "0.3.9"
@@ -1060,9 +1041,9 @@
graceful-fs "4.2.10"
"@pnpm/npm-conf@^2.1.0":
- version "2.2.2"
- resolved "https://registry.yarnpkg.com/@pnpm/npm-conf/-/npm-conf-2.2.2.tgz#0058baf1c26cbb63a828f0193795401684ac86f0"
- integrity sha512-UA91GwWPhFExt3IizW6bOeY/pQ0BkuNwKjk9iQW9KqxluGCrg4VenZ0/L+2Y0+ZOtme72EVvg6v0zo3AMQRCeA==
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/@pnpm/npm-conf/-/npm-conf-2.3.1.tgz#bb375a571a0bd63ab0a23bece33033c683e9b6b0"
+ integrity sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw==
dependencies:
"@pnpm/config.env-replace" "^1.1.0"
"@pnpm/network.ca-file" "^1.0.1"
@@ -1148,16 +1129,16 @@
defer-to-connect "^2.0.1"
"@thi.ng/bitstream@^2.2.12":
- version "2.2.60"
- resolved "https://registry.yarnpkg.com/@thi.ng/bitstream/-/bitstream-2.2.60.tgz#d44a635a1d831f5a20cde0bacd0ea44323a593f6"
- integrity sha512-wRtLQHj+MmyGuLk8wX6+s6JnCBOYb47k4CZ7EBjvY6ECkYajjV+ApYfMbM2jz8Fl28o3pBvJMHsm0K7R2KB2JQ==
+ version "2.4.3"
+ resolved "https://registry.yarnpkg.com/@thi.ng/bitstream/-/bitstream-2.4.3.tgz#8d1426a2ce10ace1da547878559e175f1c1b0a3f"
+ integrity sha512-XfqT0G1WUjF/cJtdbwncoR4Z2NUPgQQEztq8FheoO110u2FxVxINhdkqO96qW8Fw+TD9JqdUPvT8IQbt7YF2ZA==
dependencies:
- "@thi.ng/errors" "^2.5.7"
+ "@thi.ng/errors" "^2.5.17"
-"@thi.ng/errors@^2.5.7":
- version "2.5.7"
- resolved "https://registry.yarnpkg.com/@thi.ng/errors/-/errors-2.5.7.tgz#1f28dd373c14d00af995aa21d99fbc523f9333dc"
- integrity sha512-yha1STRQmkTWEFNMHpTlgXETjwyvZfyDZH6o2nfQ8rBMqco270h4BtOOXA+lFn0afXJAZ9iXmCKbPrlMlJvHuQ==
+"@thi.ng/errors@^2.5.17":
+ version "2.5.17"
+ resolved "https://registry.yarnpkg.com/@thi.ng/errors/-/errors-2.5.17.tgz#05c6fd956cdc721fadd9afb9cbdf9740f5bf2f2c"
+ integrity sha512-ohBAZcGNEIEOgJ9BPH4tjIsOjVgsnMGh4a2j63r6El68efr8RRN4G+GNkDaqV/jk9wbHKZZPt2t6suJMliPyxg==
"@tokenizer/token@^0.3.0":
version "0.3.0"
@@ -1270,11 +1251,6 @@
jest-matcher-utils "^27.0.0"
pretty-format "^27.0.0"
-"@types/json-schema@^7.0.9":
- version "7.0.15"
- resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841"
- integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==
-
"@types/long@^4.0.0":
version "4.0.2"
resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a"
@@ -1286,11 +1262,11 @@
integrity sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==
"@types/node@*", "@types/node@>=13.7.0":
- version "20.14.6"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.6.tgz#f3c19ffc98c2220e18de259bb172dd4d892a6075"
- integrity sha512-JbA0XIJPL1IiNnU7PFxDXyfAwcwVVrOoqyzzyQTyMeVhBzkJVMSkC1LlVsRQ2lpqiY4n6Bb9oCS6lzDKVQxbZw==
+ version "22.7.5"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.5.tgz#cfde981727a7ab3611a481510b473ae54442b92b"
+ integrity sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==
dependencies:
- undici-types "~5.26.4"
+ undici-types "~6.19.2"
"@types/node@16.9.1":
version "16.9.1"
@@ -1303,9 +1279,9 @@
integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==
"@types/node@^16.0.0":
- version "16.18.100"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.100.tgz#8f3ccd785b67a2007af410819fa324d9dfa4e7f9"
- integrity sha512-qN1YgJICdZwDDHInZs9Wzgygzz2QReTd6Q3S0EdGgdzBM9FnES/NqYRRkhJm5GzQfYtnkMPXd+Axg32edW/IEg==
+ version "16.18.113"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.113.tgz#fbe99013933c4997db5838d20497494a7e01f4ab"
+ integrity sha512-4jHxcEzSXpF1cBNxogs5FVbVSFSKo50sFCn7Xg7vmjJTbWFWgeuHW3QnoINlfmfG++MFR/q97RZE5RQXKeT+jg==
"@types/normalize-package-data@^2.4.0":
version "2.4.4"
@@ -1317,11 +1293,6 @@
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.7.3.tgz#3e51a17e291d01d17d3fc61422015a933af7a08f"
integrity sha512-+68kP9yzs4LMp7VNh8gdzMSPZFL44MLGqiHWvttYJe+6qnuVr4Ek9wSBQoveqY/r+LwjCcU29kNVkidwim+kYA==
-"@types/semver@^7.3.12":
- version "7.5.8"
- resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.8.tgz#8268a8c57a3e4abd25c165ecd36237db7948a55e"
- integrity sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==
-
"@types/sharp@^0.29.4":
version "0.29.5"
resolved "https://registry.yarnpkg.com/@types/sharp/-/sharp-0.29.5.tgz#9c7032d30d138ad16dde6326beaff2af757b91b3"
@@ -1340,9 +1311,9 @@
integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==
"@types/ws@^8.0.0":
- version "8.5.10"
- resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.10.tgz#4acfb517970853fa6574a3a6886791d04a396787"
- integrity sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==
+ version "8.5.12"
+ resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.12.tgz#619475fe98f35ccca2a2f6c137702d85ec247b7e"
+ integrity sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==
dependencies:
"@types/node" "*"
@@ -1358,102 +1329,92 @@
dependencies:
"@types/yargs-parser" "*"
-"@typescript-eslint/eslint-plugin@^5.33.1":
- version "5.62.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db"
- integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==
+"@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.4.0"
- "@typescript-eslint/scope-manager" "5.62.0"
- "@typescript-eslint/type-utils" "5.62.0"
- "@typescript-eslint/utils" "5.62.0"
- debug "^4.3.4"
+ "@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.2.0"
- natural-compare-lite "^1.4.0"
- semver "^7.3.7"
- tsutils "^3.21.0"
+ ignore "^5.3.1"
+ natural-compare "^1.4.0"
+ ts-api-utils "^1.3.0"
-"@typescript-eslint/parser@^5.59.0":
- version "5.62.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7"
- integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==
+"@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" "5.62.0"
- "@typescript-eslint/types" "5.62.0"
- "@typescript-eslint/typescript-estree" "5.62.0"
+ "@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/scope-manager@5.62.0":
- version "5.62.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c"
- integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==
+"@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" "5.62.0"
- "@typescript-eslint/visitor-keys" "5.62.0"
+ "@typescript-eslint/types" "7.18.0"
+ "@typescript-eslint/visitor-keys" "7.18.0"
-"@typescript-eslint/type-utils@5.62.0":
- version "5.62.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a"
- integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==
+"@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" "5.62.0"
- "@typescript-eslint/utils" "5.62.0"
+ "@typescript-eslint/typescript-estree" "7.18.0"
+ "@typescript-eslint/utils" "7.18.0"
debug "^4.3.4"
- tsutils "^3.21.0"
+ ts-api-utils "^1.3.0"
-"@typescript-eslint/types@5.62.0":
- version "5.62.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f"
- integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==
+"@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/typescript-estree@5.62.0":
- version "5.62.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b"
- integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==
+"@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" "5.62.0"
- "@typescript-eslint/visitor-keys" "5.62.0"
+ "@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"
- semver "^7.3.7"
- tsutils "^3.21.0"
-
-"@typescript-eslint/utils@5.62.0":
- version "5.62.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86"
- integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==
- dependencies:
- "@eslint-community/eslint-utils" "^4.2.0"
- "@types/json-schema" "^7.0.9"
- "@types/semver" "^7.3.12"
- "@typescript-eslint/scope-manager" "5.62.0"
- "@typescript-eslint/types" "5.62.0"
- "@typescript-eslint/typescript-estree" "5.62.0"
- eslint-scope "^5.1.1"
- semver "^7.3.7"
-
-"@typescript-eslint/visitor-keys@5.62.0":
- version "5.62.0"
- resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e"
- integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==
- dependencies:
- "@typescript-eslint/types" "5.62.0"
- eslint-visitor-keys "^3.3.0"
+ minimatch "^9.0.4"
+ semver "^7.6.0"
+ ts-api-utils "^1.3.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/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"
"@ungap/structured-clone@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406"
integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==
-"@wasm-audio-decoders/common@9.0.4":
- version "9.0.4"
- resolved "https://registry.yarnpkg.com/@wasm-audio-decoders/common/-/common-9.0.4.tgz#0c2a98c67ab048e3a917365685de87141f4533a8"
- integrity sha512-+XdSt6mMfvir5D+vcW8gLqledJIgzkBAGXOG7ySJtbKdOTHduG2YAHvUNH9/Mb2hkiM8U9EJrGA6HhbsqG/bbg==
- dependencies:
- "@eshaz/web-worker" "1.2.2"
-
"@wasm-audio-decoders/common@9.0.5":
version "9.0.5"
resolved "https://registry.yarnpkg.com/@wasm-audio-decoders/common/-/common-9.0.5.tgz#d94d628f3cc0eb5a6e3702870cb621f0e8f1447c"
@@ -1462,7 +1423,7 @@
"@eshaz/web-worker" "1.2.2"
simple-yenc "^1.0.4"
-"@wasm-audio-decoders/flac@^0.2.1":
+"@wasm-audio-decoders/flac@^0.2.4":
version "0.2.4"
resolved "https://registry.yarnpkg.com/@wasm-audio-decoders/flac/-/flac-0.2.4.tgz#2f6311cabef4850ed69643e256595cb1570e3365"
integrity sha512-bsUlwIjd5y+IAEyILCQdi8y0LocKEkZ0enA8ljDL+NVVwN+5Rv5Xkm/HcdUxnB7MtekxN2cNcTsv1zkb2aZyWg==
@@ -1470,7 +1431,7 @@
"@wasm-audio-decoders/common" "9.0.5"
codec-parser "2.4.3"
-"@wasm-audio-decoders/ogg-vorbis@^0.1.12":
+"@wasm-audio-decoders/ogg-vorbis@^0.1.15":
version "0.1.15"
resolved "https://registry.yarnpkg.com/@wasm-audio-decoders/ogg-vorbis/-/ogg-vorbis-0.1.15.tgz#47d71df2b401b008129d33295c9e95bed9d0bbe3"
integrity sha512-skAN3NIrRzMkVouyfyq3gYT/op/K9iutMZr7kr5/9fnIaCnpYdrdbv69X8PZ6y3K2J5zy5KuGno5kzH8yGLOOg==
@@ -1478,6 +1439,14 @@
"@wasm-audio-decoders/common" "9.0.5"
codec-parser "2.4.3"
+"@whiskeysockets/eslint-config@github:whiskeysockets/eslint-config":
+ version "1.0.0"
+ resolved "https://codeload.github.com/whiskeysockets/eslint-config/tar.gz/326b55f2842668f4e11f471451c4e39819a0e1bf"
+ dependencies:
+ "@typescript-eslint/eslint-plugin" "^7.15.0"
+ "@typescript-eslint/parser" "^7.15.0"
+ eslint-plugin-simple-import-sort "^12.1.1"
+
JSONStream@^1.0.4:
version "1.3.5"
resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0"
@@ -1517,9 +1486,9 @@ acorn-walk@^7.1.1:
integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==
acorn-walk@^8.1.1, acorn-walk@^8.2.0:
- version "8.3.3"
- resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.3.tgz#9caeac29eefaa0c41e3d4c65137de4d6f34df43e"
- integrity sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==
+ version "8.3.4"
+ resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.4.tgz#794dd169c3977edf4ba4ea47583587c5866236b7"
+ integrity sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==
dependencies:
acorn "^8.11.0"
@@ -1529,9 +1498,9 @@ acorn@^7.1.1:
integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==
acorn@^8.11.0, acorn@^8.2.4, acorn@^8.4.1, acorn@^8.7.0, acorn@^8.9.0:
- version "8.12.0"
- resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.0.tgz#1627bfa2e058148036133b8d9b51a700663c294c"
- integrity sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==
+ version "8.12.1"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.1.tgz#71616bdccbe25e27a54439e0046e89ca76df2248"
+ integrity sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==
add-stream@^1.0.0:
version "1.0.0"
@@ -1582,9 +1551,9 @@ ansi-regex@^5.0.1:
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
ansi-regex@^6.0.1:
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a"
- integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.1.0.tgz#95ec409c69619d6cb1b8b34f14b660ef28ebd654"
+ integrity sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==
ansi-sequence-parser@^1.1.0:
version "1.1.1"
@@ -1658,55 +1627,11 @@ array-ify@^1.0.0:
resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece"
integrity sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==
-array-includes@^3.1.6, array-includes@^3.1.8:
- version "3.1.8"
- resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.8.tgz#5e370cbe172fdd5dd6530c1d4aadda25281ba97d"
- integrity sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==
- dependencies:
- call-bind "^1.0.7"
- define-properties "^1.2.1"
- es-abstract "^1.23.2"
- es-object-atoms "^1.0.0"
- get-intrinsic "^1.2.4"
- is-string "^1.0.7"
-
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.findlast@^1.2.5:
- version "1.2.5"
- resolved "https://registry.yarnpkg.com/array.prototype.findlast/-/array.prototype.findlast-1.2.5.tgz#3e4fbcb30a15a7f5bf64cf2faae22d139c2e4904"
- integrity sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==
- dependencies:
- call-bind "^1.0.7"
- define-properties "^1.2.1"
- es-abstract "^1.23.2"
- es-errors "^1.3.0"
- es-object-atoms "^1.0.0"
- es-shim-unscopables "^1.0.2"
-
-array.prototype.flat@^1.3.1:
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18"
- integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==
- dependencies:
- call-bind "^1.0.2"
- define-properties "^1.2.0"
- es-abstract "^1.22.1"
- es-shim-unscopables "^1.0.0"
-
-array.prototype.flatmap@^1.3.2:
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527"
- integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==
- dependencies:
- call-bind "^1.0.2"
- define-properties "^1.2.0"
- es-abstract "^1.22.1"
- es-shim-unscopables "^1.0.0"
-
array.prototype.map@^1.0.5:
version "1.0.7"
resolved "https://registry.yarnpkg.com/array.prototype.map/-/array.prototype.map-1.0.7.tgz#82fa4d6027272d1fca28a63bbda424d0185d78a7"
@@ -1719,27 +1644,6 @@ array.prototype.map@^1.0.5:
es-object-atoms "^1.0.0"
is-string "^1.0.7"
-array.prototype.toreversed@^1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz#b989a6bf35c4c5051e1dc0325151bf8088954eba"
- integrity sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==
- dependencies:
- call-bind "^1.0.2"
- define-properties "^1.2.0"
- es-abstract "^1.22.1"
- es-shim-unscopables "^1.0.0"
-
-array.prototype.tosorted@^1.1.4:
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz#fe954678ff53034e717ea3352a03f0b0b86f7ffc"
- integrity sha512-p6Fx8B7b7ZhL/gmUsAy0D15WhvDccw3mnGNbZpi3pmeJdxtWsj2jEaI4Y6oo3XiHfzuSgPwKc04MYt6KgvC/wA==
- dependencies:
- call-bind "^1.0.7"
- define-properties "^1.2.1"
- es-abstract "^1.23.3"
- es-errors "^1.3.0"
- es-shim-unscopables "^1.0.2"
-
arraybuffer.prototype.slice@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz#097972f4255e41bc3425e37dc3f6421cf9aefde6"
@@ -1778,11 +1682,6 @@ async-retry@1.3.3:
dependencies:
retry "0.13.1"
-async@3.2.3:
- version "3.2.3"
- resolved "https://registry.yarnpkg.com/async/-/async-3.2.3.tgz#ac53dafd3f4720ee9e8a160628f18ea91df196c9"
- integrity sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==
-
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
@@ -1799,17 +1698,17 @@ audio-buffer@^5.0.0:
integrity sha512-gsDyj1wwUp8u7NBB+eW6yhLb9ICf+0eBmDX8NGaAS00w8/fLqFdxUlL5Ge/U8kB64DlQhdonxYC59dXy1J7H/w==
audio-decode@^2.1.3:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/audio-decode/-/audio-decode-2.2.0.tgz#ab5f45102bdcc1a5613ac38c78e4feeef273ec75"
- integrity sha512-3SLGQ4VL57+fuFHV5JBeTNx3frjdztOIm4LJBFqiFhMQGeerrcS3WQbfuPPOqcNmqFGmPeaAAFPCxF75cSK/pQ==
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/audio-decode/-/audio-decode-2.2.2.tgz#5ea56c93ac87a0481c315d67a4afe0b6a578378a"
+ integrity sha512-xyh7z6dpRT+5Ez4ggV2cEkSShkDvvIBBmVPR3kYY7uIBqRO1BGNjofip6JnjBnvezhrU3ypBGZjepyKFDZWnDw==
dependencies:
- "@wasm-audio-decoders/flac" "^0.2.1"
- "@wasm-audio-decoders/ogg-vorbis" "^0.1.12"
+ "@wasm-audio-decoders/flac" "^0.2.4"
+ "@wasm-audio-decoders/ogg-vorbis" "^0.1.15"
audio-buffer "^5.0.0"
audio-type "^2.2.1"
- mpg123-decoder "^0.4.10"
+ mpg123-decoder "^1.0.0"
node-wav "^0.0.2"
- ogg-opus-decoder "^1.6.8"
+ ogg-opus-decoder "^1.6.12"
qoa-format "^1.0.1"
audio-type@^2.2.1:
@@ -1825,18 +1724,18 @@ available-typed-arrays@^1.0.7:
possible-typed-array-names "^1.0.0"
axios@^1.6.0:
- version "1.7.2"
- resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.2.tgz#b625db8a7051fbea61c35a3cbb3a1daa7b9c7621"
- integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==
+ version "1.7.7"
+ resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.7.tgz#2f554296f9892a72ac8d8e4c5b79c14a91d0a47f"
+ integrity sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==
dependencies:
follow-redirects "^1.15.6"
form-data "^4.0.0"
proxy-from-env "^1.1.0"
-b4a@^1.6.4:
- version "1.6.6"
- resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.6.tgz#a4cc349a3851987c3c4ac2d7785c18744f6da9ba"
- integrity sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==
+b4a@^1.6.4, b4a@^1.6.6:
+ version "1.6.7"
+ resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.7.tgz#a99587d4ebbfbd5a6e3b21bdb5d5fa385767abe4"
+ integrity sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==
babel-jest@^27.5.1:
version "27.5.1"
@@ -1874,22 +1773,25 @@ babel-plugin-jest-hoist@^27.5.1:
"@types/babel__traverse" "^7.0.6"
babel-preset-current-node-syntax@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz#b4399239b89b2a011f9ddbe3e4f401fc40cff73b"
- integrity sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz#9a929eafece419612ef4ae4f60b1862ebad8ef30"
+ integrity sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==
dependencies:
"@babel/plugin-syntax-async-generators" "^7.8.4"
"@babel/plugin-syntax-bigint" "^7.8.3"
- "@babel/plugin-syntax-class-properties" "^7.8.3"
- "@babel/plugin-syntax-import-meta" "^7.8.3"
+ "@babel/plugin-syntax-class-properties" "^7.12.13"
+ "@babel/plugin-syntax-class-static-block" "^7.14.5"
+ "@babel/plugin-syntax-import-attributes" "^7.24.7"
+ "@babel/plugin-syntax-import-meta" "^7.10.4"
"@babel/plugin-syntax-json-strings" "^7.8.3"
- "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3"
+ "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4"
"@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3"
- "@babel/plugin-syntax-numeric-separator" "^7.8.3"
+ "@babel/plugin-syntax-numeric-separator" "^7.10.4"
"@babel/plugin-syntax-object-rest-spread" "^7.8.3"
"@babel/plugin-syntax-optional-catch-binding" "^7.8.3"
"@babel/plugin-syntax-optional-chaining" "^7.8.3"
- "@babel/plugin-syntax-top-level-await" "^7.8.3"
+ "@babel/plugin-syntax-private-property-in-object" "^7.14.5"
+ "@babel/plugin-syntax-top-level-await" "^7.14.5"
babel-preset-jest@^27.5.1:
version "27.5.1"
@@ -1905,23 +1807,23 @@ balanced-match@^1.0.0:
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
bare-events@^2.0.0, bare-events@^2.2.0:
- version "2.4.2"
- resolved "https://registry.yarnpkg.com/bare-events/-/bare-events-2.4.2.tgz#3140cca7a0e11d49b3edc5041ab560659fd8e1f8"
- integrity sha512-qMKFd2qG/36aA4GwvKq8MxnPgCQAmBWmSyLWsJcbn8v03wvIPQ/hG1Ms8bPzndZxMDoHpxez5VOS+gC9Yi24/Q==
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/bare-events/-/bare-events-2.5.0.tgz#305b511e262ffd8b9d5616b056464f8e1b3329cc"
+ integrity sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A==
bare-fs@^2.1.1:
- version "2.3.1"
- resolved "https://registry.yarnpkg.com/bare-fs/-/bare-fs-2.3.1.tgz#cdbd63dac7a552dfb2b87d18c822298d1efd213d"
- integrity sha512-W/Hfxc/6VehXlsgFtbB5B4xFcsCl+pAh30cYhoFyXErf6oGrwjh8SwiPAdHgpmWonKuYpZgGywN0SXt7dgsADA==
+ version "2.3.5"
+ resolved "https://registry.yarnpkg.com/bare-fs/-/bare-fs-2.3.5.tgz#05daa8e8206aeb46d13c2fe25a2cd3797b0d284a"
+ integrity sha512-SlE9eTxifPDJrT6YgemQ1WGFleevzwY+XAP1Xqgl56HtcrisC2CHCZ2tq6dBpcH2TnNxwUEUGhweo+lrQtYuiw==
dependencies:
bare-events "^2.0.0"
bare-path "^2.0.0"
bare-stream "^2.0.0"
bare-os@^2.1.0:
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/bare-os/-/bare-os-2.4.0.tgz#5de5e3ba7704f459c9656629edca7cc736e06608"
- integrity sha512-v8DTT08AS/G0F9xrhyLtepoo9EJBJ85FRSMbu1pQUlAf6A8T0tEEQGMVObWeqpjhSPXsE0VGlluFBJu2fdoTNg==
+ version "2.4.4"
+ resolved "https://registry.yarnpkg.com/bare-os/-/bare-os-2.4.4.tgz#01243392eb0a6e947177bb7c8a45123d45c9b1a9"
+ integrity sha512-z3UiI2yi1mK0sXeRdc4O1Kk8aOa/e+FNWZcTiPB/dfTWyLypuE99LibgRaQki914Jq//yAWylcAt+mknKdixRQ==
bare-path@^2.0.0, bare-path@^2.1.0:
version "2.1.3"
@@ -1931,11 +1833,12 @@ bare-path@^2.0.0, bare-path@^2.1.0:
bare-os "^2.1.0"
bare-stream@^2.0.0:
- version "2.1.3"
- resolved "https://registry.yarnpkg.com/bare-stream/-/bare-stream-2.1.3.tgz#070b69919963a437cc9e20554ede079ce0a129b2"
- integrity sha512-tiDAH9H/kP+tvNO5sczyn9ZAA7utrSMobyDchsnyyXBuUe2FSQWbxhtuHB8jwpHYYevVo2UJpcmvvjrbHboUUQ==
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/bare-stream/-/bare-stream-2.3.0.tgz#5bef1cab8222517315fca1385bd7f08dff57f435"
+ integrity sha512-pVRWciewGUeCyKEuRxwv06M079r+fRjAQjBEK2P6OYGrO43O+Z0LrPZZEjlc4mB6C2RpZ9AxJ1s7NLEtOHO6eA==
dependencies:
- streamx "^2.18.0"
+ b4a "^1.6.6"
+ streamx "^2.20.0"
base64-js@^1.3.1:
version "1.5.1"
@@ -2033,15 +1936,15 @@ browser-process-hrtime@^1.0.0:
resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626"
integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==
-browserslist@^4.22.2:
- version "4.23.1"
- resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.1.tgz#ce4af0534b3d37db5c1a4ca98b9080f985041e96"
- integrity sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==
+browserslist@^4.24.0:
+ version "4.24.0"
+ resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.24.0.tgz#a1325fe4bc80b64fda169629fc01b3d6cecd38d4"
+ integrity sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==
dependencies:
- caniuse-lite "^1.0.30001629"
- electron-to-chromium "^1.4.796"
- node-releases "^2.0.14"
- update-browserslist-db "^1.0.16"
+ caniuse-lite "^1.0.30001663"
+ electron-to-chromium "^1.5.28"
+ node-releases "^2.0.18"
+ update-browserslist-db "^1.1.0"
bs-logger@0.x:
version "0.2.6"
@@ -2090,14 +1993,15 @@ bundle-name@^3.0.0:
dependencies:
run-applescript "^5.0.0"
-cache-manager@4.0.1:
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/cache-manager/-/cache-manager-4.0.1.tgz#185b1d1aa1385fbb4fb0ec88fda7676f566a15b8"
- integrity sha512-JWdtjdX8e0e6eMehAZsdJvBMvHn/pVQGYUjgzc1ILFH0vtcffb9R7XIEAqfYgEeaVJVCOSP4+dxCius+ciW0RA==
+cache-manager@^5.7.6:
+ version "5.7.6"
+ resolved "https://registry.yarnpkg.com/cache-manager/-/cache-manager-5.7.6.tgz#bdd8a154c73e5233824aa09ceb359ed225d37b7e"
+ integrity sha512-wBxnBHjDxF1RXpHCBD6HGvKER003Ts7IIm0CHpggliHzN1RZditb7rXoduE1rplc2DEFYKxhLKgFuchXMJje9w==
dependencies:
- async "3.2.3"
+ eventemitter3 "^5.0.1"
lodash.clonedeep "^4.5.0"
- lru-cache "^7.10.1"
+ lru-cache "^10.2.2"
+ promise-coalesce "^1.1.2"
cacheable-lookup@^7.0.0:
version "7.0.0"
@@ -2157,10 +2061,17 @@ camelcase@^7.0.1:
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-7.0.1.tgz#f02e50af9fd7782bc8b88a3558c32fd3a388f048"
integrity sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==
-caniuse-lite@^1.0.30001629:
- version "1.0.30001636"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz#b15f52d2bdb95fad32c2f53c0b68032b85188a78"
- integrity sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==
+caniuse-lite@^1.0.30001663:
+ version "1.0.30001668"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001668.tgz#98e214455329f54bf7a4d70b49c9794f0fbedbed"
+ integrity sha512-nWLrdxqCdblixUO+27JtGJJE/txpJlyUy5YN1u53wLZkP0emYCo5zgS6QYft7VUYR42LGgi/S5hdLZTrnyIddw==
+
+centra@^2.7.0:
+ version "2.7.0"
+ resolved "https://registry.yarnpkg.com/centra/-/centra-2.7.0.tgz#4c8312a58436e8a718302011561db7e6a2b0ec18"
+ integrity sha512-PbFMgMSrmgx6uxCdm57RUos9Tc3fclMvhLSATYN39XsDV29B89zZ3KA89jmY0vwSGazyU+uerqwa6t+KaodPcg==
+ dependencies:
+ follow-redirects "^1.15.6"
chalk@5.2.0:
version "5.2.0"
@@ -2236,9 +2147,9 @@ ci-info@^3.2.0:
integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==
cjs-module-lexer@^1.0.0:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz#c485341ae8fd999ca4ee5af2d7a1c9ae01e0099c"
- integrity sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz#707413784dbb3a72aa11c2f2b042a0bef4004170"
+ integrity sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==
cli-boxes@^3.0.0:
version "3.0.0"
@@ -2690,11 +2601,11 @@ dateformat@^3.0.0:
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4:
- version "4.3.5"
- resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.5.tgz#e83444eceb9fedd4a1da56d671ae2446a01a6e1e"
- integrity sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==
+ version "4.3.7"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52"
+ integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==
dependencies:
- ms "2.1.2"
+ ms "^2.1.3"
decamelize-keys@^1.1.0:
version "1.1.1"
@@ -2846,13 +2757,6 @@ dir-glob@^3.0.1:
dependencies:
path-type "^4.0.0"
-doctrine@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d"
- integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==
- dependencies:
- esutils "^2.0.2"
-
doctrine@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961"
@@ -2931,10 +2835,10 @@ eastasianwidth@^0.2.0:
resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
-electron-to-chromium@^1.4.796:
- version "1.4.807"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.807.tgz#4d6c5ea1516f0164ac5bfd487ccd4ee9507c8f01"
- integrity sha512-kSmJl2ZwhNf/bcIuCH/imtNOKlpkLDn2jqT5FJ+/0CXjhnFaOa9cOe9gHKKy71eM49izwuQjZhKk+lWQ1JxB7A==
+electron-to-chromium@^1.5.28:
+ version "1.5.36"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.36.tgz#ec41047f0e1446ec5dce78ed5970116533139b88"
+ integrity sha512-HYTX8tKge/VNp6FGO+f/uVDmUkq+cEfcxYhKf15Akc4M5yxt5YmorwlAitKWjWhWQnKcDRBAQKXkhqqXMqcrjw==
emittery@^0.8.1:
version "0.8.1"
@@ -2958,7 +2862,7 @@ end-of-stream@^1.1.0, end-of-stream@^1.4.1:
dependencies:
once "^1.4.0"
-entities@^4.2.0, entities@^4.4.0:
+entities@^4.2.0, entities@^4.4.0, entities@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48"
integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==
@@ -2970,7 +2874,7 @@ error-ex@^1.3.1:
dependencies:
is-arrayish "^0.2.1"
-es-abstract@^1.20.4, es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.1, es-abstract@^1.23.2, es-abstract@^1.23.3:
+es-abstract@^1.20.4, es-abstract@^1.22.1, es-abstract@^1.22.3, es-abstract@^1.23.0, es-abstract@^1.23.2:
version "1.23.3"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.23.3.tgz#8f0c5a35cd215312573c5a27c87dfd6c881a0aa0"
integrity sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==
@@ -3054,26 +2958,6 @@ es-get-iterator@^1.0.2:
isarray "^2.0.5"
stop-iteration-iterator "^1.0.0"
-es-iterator-helpers@^1.0.19:
- version "1.0.19"
- resolved "https://registry.yarnpkg.com/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz#117003d0e5fec237b4b5c08aded722e0c6d50ca8"
- integrity sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==
- dependencies:
- call-bind "^1.0.7"
- define-properties "^1.2.1"
- es-abstract "^1.23.3"
- es-errors "^1.3.0"
- es-set-tostringtag "^2.0.3"
- function-bind "^1.1.2"
- get-intrinsic "^1.2.4"
- globalthis "^1.0.3"
- has-property-descriptors "^1.0.2"
- has-proto "^1.0.3"
- has-symbols "^1.0.3"
- internal-slot "^1.0.7"
- iterator.prototype "^1.1.2"
- safe-array-concat "^1.1.2"
-
es-object-atoms@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.0.0.tgz#ddb55cd47ac2e240701260bc2a8e31ecb643d941"
@@ -3090,13 +2974,6 @@ es-set-tostringtag@^2.0.3:
has-tostringtag "^1.0.2"
hasown "^2.0.1"
-es-shim-unscopables@^1.0.0, es-shim-unscopables@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz#1f6942e71ecc7835ed1c8a83006d8771a63a3763"
- integrity sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==
- dependencies:
- hasown "^2.0.0"
-
es-to-primitive@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a"
@@ -3106,10 +2983,10 @@ es-to-primitive@^1.2.1:
is-date-object "^1.0.1"
is-symbol "^1.0.2"
-escalade@^3.1.1, escalade@^3.1.2:
- version "3.1.2"
- resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.2.tgz#54076e9ab29ea5bf3d8f1ed62acffbb88272df27"
- integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==
+escalade@^3.1.1, escalade@^3.2.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5"
+ integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==
escape-goat@^4.0.0:
version "4.0.0"
@@ -3159,42 +3036,10 @@ escodegen@^2.0.0:
optionalDependencies:
source-map "~0.6.1"
-eslint-plugin-react@^7.32.2:
- version "7.34.3"
- resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.34.3.tgz#9965f27bd1250a787b5d4cfcc765e5a5d58dcb7b"
- integrity sha512-aoW4MV891jkUulwDApQbPYTVZmeuSyFrudpbTAQuj5Fv8VL+o6df2xIGpw8B0hPjAaih1/Fb0om9grCdyFYemA==
- dependencies:
- array-includes "^3.1.8"
- array.prototype.findlast "^1.2.5"
- array.prototype.flatmap "^1.3.2"
- array.prototype.toreversed "^1.1.2"
- array.prototype.tosorted "^1.1.4"
- doctrine "^2.1.0"
- es-iterator-helpers "^1.0.19"
- estraverse "^5.3.0"
- jsx-ast-utils "^2.4.1 || ^3.0.0"
- minimatch "^3.1.2"
- object.entries "^1.1.8"
- object.fromentries "^2.0.8"
- object.hasown "^1.1.4"
- object.values "^1.2.0"
- prop-types "^15.8.1"
- resolve "^2.0.0-next.5"
- semver "^6.3.1"
- string.prototype.matchall "^4.0.11"
-
-eslint-plugin-simple-import-sort@^10.0.0:
- version "10.0.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-10.0.0.tgz#cc4ceaa81ba73252427062705b64321946f61351"
- integrity sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==
-
-eslint-scope@^5.1.1:
- version "5.1.1"
- resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
- integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==
- dependencies:
- esrecurse "^4.3.0"
- estraverse "^4.1.1"
+eslint-plugin-simple-import-sort@^12.1.1:
+ version "12.1.1"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-12.1.1.tgz#e64bfdaf91c5b98a298619aa634a9f7aa43b709e"
+ integrity sha512-6nuzu4xwQtE3332Uz0to+TxDQYRLTKRESSc2hefVT48Zc8JthmN23Gx9lnYhu0FtkRSL1oxny3kJ2aveVhmOVA==
eslint-scope@^7.2.2:
version "7.2.2"
@@ -3210,15 +3055,15 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==
eslint@^8.0.0:
- version "8.57.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.0.tgz#c786a6fd0e0b68941aaf624596fb987089195668"
- integrity sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==
+ version "8.57.1"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.57.1.tgz#7df109654aba7e3bbe5c8eae533c5e461d3c6ca9"
+ integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==
dependencies:
"@eslint-community/eslint-utils" "^4.2.0"
"@eslint-community/regexpp" "^4.6.1"
"@eslint/eslintrc" "^2.1.4"
- "@eslint/js" "8.57.0"
- "@humanwhocodes/config-array" "^0.11.14"
+ "@eslint/js" "8.57.1"
+ "@humanwhocodes/config-array" "^0.13.0"
"@humanwhocodes/module-importer" "^1.0.1"
"@nodelib/fs.walk" "^1.2.8"
"@ungap/structured-clone" "^1.2.0"
@@ -3268,9 +3113,9 @@ esprima@^4.0.0, esprima@^4.0.1:
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
esquery@^1.4.2:
- version "1.5.0"
- resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b"
- integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7"
+ integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==
dependencies:
estraverse "^5.1.0"
@@ -3281,12 +3126,12 @@ esrecurse@^4.3.0:
dependencies:
estraverse "^5.2.0"
-estraverse@^4.1.1, estraverse@^4.2.0:
+estraverse@^4.2.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
-estraverse@^5.1.0, estraverse@^5.2.0, estraverse@^5.3.0:
+estraverse@^5.1.0, estraverse@^5.2.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123"
integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==
@@ -3301,6 +3146,11 @@ event-target-shim@^5.0.0:
resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789"
integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==
+eventemitter3@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4"
+ integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==
+
execa@7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/execa/-/execa-7.1.1.tgz#3eb3c83d239488e7b409d48e8813b76bb55c9c43"
@@ -3507,9 +3357,9 @@ flatted@^3.2.9:
integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==
follow-redirects@^1.15.6:
- version "1.15.6"
- resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.6.tgz#7f815c0cda4249c74ff09e95ef97c23b5fd0399b"
- integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==
+ version "1.15.9"
+ resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.9.tgz#a604fa10e443bf98ca94228d9eebcc2e8a2c8ee1"
+ integrity sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==
for-each@^0.3.3:
version "0.3.3"
@@ -3524,27 +3374,28 @@ form-data-encoder@^2.1.2:
integrity sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw==
form-data@^2.5.0:
- version "2.5.1"
- resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4"
- integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==
+ version "2.5.2"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.2.tgz#dc653743d1de2fcc340ceea38079daf6e9069fd2"
+ integrity sha512-GgwY0PS7DbXqajuGf4OYlsrIu3zgxD6Vvql43IBhm6MahqA5SK/7mwhtNj2AdH2z35YR34ujJ7BN+3fFC3jP5Q==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.6"
mime-types "^2.1.12"
+ safe-buffer "^5.2.1"
form-data@^3.0.0:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f"
- integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.2.tgz#83ad9ced7c03feaad97e293d6f6091011e1659c8"
+ integrity sha512-sJe+TQb2vIaIyO783qN6BlMYWMw3WBOHA1Ay2qxsnjuafEOQFJ2JakedOQirT6D5XPRxDvS7AHYyem9fTpb4LQ==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
mime-types "^2.1.12"
form-data@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452"
- integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.1.tgz#ba1076daaaa5bfd7e99c1a6cb02aa0a5cff90d48"
+ integrity sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.8"
@@ -3586,7 +3437,7 @@ function-bind@^1.1.2:
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c"
integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==
-function.prototype.name@^1.1.5, function.prototype.name@^1.1.6:
+function.prototype.name@^1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd"
integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==
@@ -3992,9 +3843,9 @@ https-proxy-agent@^5.0.0:
debug "4"
https-proxy-agent@^7.0.0:
- version "7.0.4"
- resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz#8e97b841a029ad8ddc8731f26595bad868cb4168"
- integrity sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==
+ version "7.0.5"
+ resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz#9e8b5013873299e11fab6fd548405da2d6c602b2"
+ integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==
dependencies:
agent-base "^7.0.2"
debug "4"
@@ -4021,10 +3872,10 @@ ieee754@^1.1.13, ieee754@^1.2.1:
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"
integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==
-ignore@^5.2.0:
- version "5.3.1"
- resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef"
- integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==
+ignore@^5.2.0, ignore@^5.3.1:
+ version "5.3.2"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"
+ integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==
image-q@^4.0.0:
version "4.0.0"
@@ -4047,9 +3898,9 @@ import-lazy@^4.0.0:
integrity sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==
import-local@^3.0.2:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4"
- integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.2.0.tgz#c3d5c745798c02a6f8b897726aba5100186ee260"
+ integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==
dependencies:
pkg-dir "^4.2.0"
resolve-cwd "^3.0.0"
@@ -4161,13 +4012,6 @@ is-arrayish@^0.3.1:
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03"
integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==
-is-async-function@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/is-async-function/-/is-async-function-2.0.0.tgz#8e4418efd3e5d3a6ebb0164c05ef5afb69aa9646"
- integrity sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==
- dependencies:
- has-tostringtag "^1.0.0"
-
is-bigint@^1.0.1:
version "1.0.4"
resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3"
@@ -4196,11 +4040,11 @@ is-ci@3.0.1, is-ci@^3.0.1:
ci-info "^3.2.0"
is-core-module@^2.13.0, is-core-module@^2.5.0:
- version "2.13.1"
- resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384"
- integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==
+ version "2.15.1"
+ resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.15.1.tgz#a7363a25bee942fefab0de13bf6aa372c82dcc37"
+ integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==
dependencies:
- hasown "^2.0.0"
+ hasown "^2.0.2"
is-data-view@^1.0.1:
version "1.0.1"
@@ -4209,7 +4053,7 @@ is-data-view@^1.0.1:
dependencies:
is-typed-array "^1.1.13"
-is-date-object@^1.0.1, is-date-object@^1.0.5:
+is-date-object@^1.0.1:
version "1.0.5"
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f"
integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==
@@ -4231,13 +4075,6 @@ is-extglob@^2.1.1:
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
-is-finalizationregistry@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/is-finalizationregistry/-/is-finalizationregistry-1.0.2.tgz#c8749b65f17c133313e661b1289b95ad3dbd62e6"
- integrity sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==
- dependencies:
- call-bind "^1.0.2"
-
is-fullwidth-code-point@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
@@ -4253,13 +4090,6 @@ is-generator-fn@^2.0.0:
resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118"
integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==
-is-generator-function@^1.0.10:
- version "1.0.10"
- resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72"
- integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==
- dependencies:
- has-tostringtag "^1.0.0"
-
is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
@@ -4292,7 +4122,7 @@ is-interactive@^2.0.0:
resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-2.0.0.tgz#40c57614593826da1100ade6059778d597f16e90"
integrity sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==
-is-map@^2.0.2, is-map@^2.0.3:
+is-map@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.3.tgz#ede96b7fe1e270b3c4465e3a465658764926d62e"
integrity sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==
@@ -4352,7 +4182,7 @@ is-regex@^1.1.4:
call-bind "^1.0.2"
has-tostringtag "^1.0.0"
-is-set@^2.0.2, is-set@^2.0.3:
+is-set@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.3.tgz#8ab209ea424608141372ded6e0cb200ef1d9d01d"
integrity sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==
@@ -4424,11 +4254,6 @@ is-unicode-supported@^1.1.0, is-unicode-supported@^1.2.0:
resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz#d824984b616c292a2e198207d4a609983842f714"
integrity sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==
-is-weakmap@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.2.tgz#bf72615d649dfe5f699079c54b83e47d1ae19cfd"
- integrity sha512-K5pXYOm9wqY1RgjpL3YTkF39tni1XajUIkawTLUo9EZEVUFga5gSQJF8nNS7ZwJQ02y+1YCNYcMh+HIf1ZqE+w==
-
is-weakref@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2"
@@ -4436,14 +4261,6 @@ is-weakref@^1.0.2:
dependencies:
call-bind "^1.0.2"
-is-weakset@^2.0.3:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.3.tgz#e801519df8c0c43e12ff2834eead84ec9e624007"
- integrity sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==
- dependencies:
- call-bind "^1.0.7"
- get-intrinsic "^1.2.4"
-
is-wsl@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271"
@@ -4537,17 +4354,6 @@ iterate-value@^1.0.2:
es-get-iterator "^1.0.2"
iterate-iterator "^1.0.1"
-iterator.prototype@^1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/iterator.prototype/-/iterator.prototype-1.1.2.tgz#5e29c8924f01916cb9335f1ff80619dcff22b0c0"
- integrity sha512-DR33HMMr8EzwuRL8Y9D3u2BMj8+RqSE850jfGu59kS7tbmPLzGkZmVSfyCFSDxuZiEY6Rzt3T2NA/qU+NwVj1w==
- dependencies:
- define-properties "^1.2.1"
- get-intrinsic "^1.2.1"
- has-symbols "^1.0.3"
- reflect.getprototypeof "^1.0.4"
- set-function-name "^2.0.1"
-
jest-changed-files@^27.5.1:
version "27.5.1"
resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.5.1.tgz#a348aed00ec9bf671cc58a66fcbe7c3dfd6a68f5"
@@ -4969,7 +4775,7 @@ jpeg-js@^0.4.2:
resolved "https://registry.yarnpkg.com/jpeg-js/-/jpeg-js-0.4.4.tgz#a9f1c6f1f9f0fa80cdb3484ed9635054d28936aa"
integrity sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==
-"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
+js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
@@ -5027,10 +4833,10 @@ jsdom@^16.6.0:
ws "^7.4.6"
xml-name-validator "^3.0.0"
-jsesc@^2.5.1:
- version "2.5.2"
- resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
- integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
+jsesc@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.0.2.tgz#bb8b09a6597ba426425f2e4a07245c3d00b9343e"
+ integrity sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==
json-buffer@3.0.1:
version "3.0.1"
@@ -5073,9 +4879,9 @@ json@^11.0.0:
integrity sha512-N/ITv3Yw9Za8cGxuQqSqrq6RHnlaHWZkAFavcfpH/R52522c26EbihMxnY7A1chxfXJ4d+cEFIsyTgfi9GihrA==
jsonc-parser@^3.2.0:
- version "3.2.1"
- resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.1.tgz#031904571ccf929d7670ee8c547545081cb37f1a"
- integrity sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.3.1.tgz#f2a524b4f7fd11e3d791e559977ad60b98b798b4"
+ integrity sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==
jsonfile@^6.0.1:
version "6.1.0"
@@ -5091,16 +4897,6 @@ jsonparse@^1.2.0:
resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280"
integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==
-"jsx-ast-utils@^2.4.1 || ^3.0.0":
- version "3.3.5"
- resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz#4766bd05a8e2a11af222becd19e15575e52a853a"
- integrity sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==
- dependencies:
- array-includes "^3.1.6"
- array.prototype.flat "^1.3.1"
- object.assign "^4.1.4"
- object.values "^1.1.6"
-
keyv@^4.5.3:
version "4.5.4"
resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93"
@@ -5147,9 +4943,9 @@ levn@~0.3.0:
type-check "~0.3.2"
libphonenumber-js@^1.10.20:
- version "1.11.4"
- resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.11.4.tgz#e63fe553f45661b30bb10bb8c82c9cf2b22ec32a"
- integrity sha512-F/R50HQuWWYcmU/esP5jrH5LiWYaN7DpN0a/99U8+mnGGtnx8kmRE+649dQh3v+CowXXZc8vpkf5AmYkO0AQ7Q==
+ version "1.11.11"
+ resolved "https://registry.yarnpkg.com/libphonenumber-js/-/libphonenumber-js-1.11.11.tgz#f4d521d7e2d1958916820e3725e609a2ea7575a8"
+ integrity sha512-mF3KaORjJQR6JBNcOkluDcJKhtoQT4VTLRMrX1v/wlBayL4M8ybwEDeryyPcrSEJmD0rVwHUbBarpZwN5NfPFQ==
"libsignal@github:WhiskeySockets/libsignal-node":
version "2.0.1"
@@ -5174,16 +4970,16 @@ link-preview-js@^3.0.0:
url "0.11.0"
load-bmfont@^1.3.1, load-bmfont@^1.4.0:
- version "1.4.1"
- resolved "https://registry.yarnpkg.com/load-bmfont/-/load-bmfont-1.4.1.tgz#c0f5f4711a1e2ccff725a7b6078087ccfcddd3e9"
- integrity sha512-8UyQoYmdRDy81Brz6aLAUhfZLwr5zV0L3taTQ4hju7m6biuwiWiJXjPhBJxbUQJA8PrkvJ/7Enqmwk2sM14soA==
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/load-bmfont/-/load-bmfont-1.4.2.tgz#e0f4516064fa5be8439f9c3696c01423a64e8717"
+ integrity sha512-qElWkmjW9Oq1F9EI5Gt7aD9zcdHb9spJCW1L/dmPf7KzCCEJxq8nhHz5eCgI9aMf7vrG/wyaCqdsI+Iy9ZTlog==
dependencies:
buffer-equal "0.0.1"
mime "^1.3.4"
parse-bmfont-ascii "^1.0.3"
parse-bmfont-binary "^1.0.5"
parse-bmfont-xml "^1.1.4"
- phin "^2.9.1"
+ phin "^3.7.1"
xhr "^2.0.1"
xtend "^4.0.0"
@@ -5295,18 +5091,16 @@ long@^5.0.0:
resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1"
integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==
-loose-envify@^1.4.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
- integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
- dependencies:
- js-tokens "^3.0.0 || ^4.0.0"
-
lowercase-keys@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-3.0.0.tgz#c5e7d442e37ead247ae9db117a9d0a467c89d4f2"
integrity sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==
+lru-cache@^10.2.2:
+ version "10.4.3"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-10.4.3.tgz#410fc8a17b70e598013df257c2446b7f3383f119"
+ integrity sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==
+
lru-cache@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
@@ -5321,7 +5115,7 @@ lru-cache@^6.0.0:
dependencies:
yallist "^4.0.0"
-lru-cache@^7.10.1, lru-cache@^7.14.1:
+lru-cache@^7.14.1:
version "7.18.3"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89"
integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==
@@ -5332,9 +5126,9 @@ lunr@^2.3.9:
integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==
macos-release@^3.1.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-3.2.0.tgz#dcee82b6a4932971b1538dbf6f3aabc4a903b613"
- integrity sha512-fSErXALFNsnowREYZ49XCdOHF8wOPWuFOGQrAhP7x5J/BqQv+B02cNsTykGpDgRVx43EKg++6ANmTaGTtW+hUA==
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-3.3.0.tgz#92cb67bc66d67c3fde4a9e14f5f909afa418b072"
+ integrity sha512-tPJQ1HeyiU2vRruNGhZ+VleWuMQRro8iFtJxYgnS4NQe+EukKF6aGiIT+7flZhISAt2iaXBCfFGvAyif7/f8nQ==
make-dir@^4.0.0:
version "4.0.0"
@@ -5403,9 +5197,9 @@ merge2@^1.3.0, merge2@^1.4.1:
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
micromatch@^4.0.4:
- version "4.0.7"
- resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.7.tgz#33e8190d9fe474a9895525f5618eee136d46c2e5"
- integrity sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==
+ version "4.0.8"
+ resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.8.tgz#d66fa18f3a47076789320b9b1af32bd86d9fa202"
+ integrity sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==
dependencies:
braces "^3.0.3"
picomatch "^2.3.1"
@@ -5466,10 +5260,10 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2:
dependencies:
brace-expansion "^1.1.7"
-minimatch@^9.0.0:
- version "9.0.4"
- resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51"
- integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==
+minimatch@^9.0.0, minimatch@^9.0.4:
+ version "9.0.5"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5"
+ integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==
dependencies:
brace-expansion "^2.0.1"
@@ -5504,17 +5298,17 @@ modify-values@^1.0.0:
resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022"
integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==
-mpg123-decoder@^0.4.10:
- version "0.4.12"
- resolved "https://registry.yarnpkg.com/mpg123-decoder/-/mpg123-decoder-0.4.12.tgz#37462cb9043107b66c180827961cf10ada855c01"
- integrity sha512-BjeE7+D7FttqNRFtF3IgSSnG2Hn96ID4JDsCCmxhaPy2R1yuJu2gaabhlS9r12JibaRTT2SYDMXTyjD6xqe0fg==
+mpg123-decoder@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/mpg123-decoder/-/mpg123-decoder-1.0.0.tgz#c888c165c402bb75b1aed1b3dae04b9a995a9669"
+ integrity sha512-WV+pyuMUhRqv7s8S6p/Ii4KQHdBD1pb3yaABxcKJRsNp+HQ/Y6z2iIBIaOZu0JMHPTOoICYt0REDZ7XfLu+n/g==
dependencies:
- "@wasm-audio-decoders/common" "9.0.4"
+ "@wasm-audio-decoders/common" "9.0.5"
-ms@2.1.2:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
- integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
+ms@^2.1.3:
+ version "2.1.3"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
+ integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
music-metadata@^7.12.3:
version "7.14.0"
@@ -5539,11 +5333,6 @@ napi-build-utils@^1.0.1:
resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806"
integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==
-natural-compare-lite@^1.4.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4"
- integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==
-
natural-compare@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
@@ -5567,9 +5356,9 @@ new-github-release-url@2.0.0:
type-fest "^2.5.1"
node-abi@^3.3.0:
- version "3.65.0"
- resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.65.0.tgz#ca92d559388e1e9cab1680a18c1a18757cdac9d3"
- integrity sha512-ThjYBfoDNr08AWx6hGaRbfPwxKV9kVzAzOzlLKbk2CuqXE2xnCh+cbAGnwM3t8Lq4v9rUB7VfondlkBckcJrVA==
+ version "3.68.0"
+ resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.68.0.tgz#8f37fb02ecf4f43ebe694090dcb52e0c4cc4ba25"
+ integrity sha512-7vbj10trelExNjFSBm5kTvZXXa7pZyKWx9RCKIyqe6I9Ev3IzGpQoqBP3a+cOdxY+pWj6VkP28n/2wWysBHD/A==
dependencies:
semver "^7.3.5"
@@ -5618,10 +5407,10 @@ node-int64@^0.4.0:
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==
-node-releases@^2.0.14:
- version "2.0.14"
- resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b"
- integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==
+node-releases@^2.0.18:
+ version "2.0.18"
+ resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f"
+ integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==
node-wav@^0.0.2:
version "0.0.2"
@@ -5680,26 +5469,21 @@ nth-check@^2.0.1:
boolbase "^1.0.0"
nwsapi@^2.2.0:
- version "2.2.10"
- resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.10.tgz#0b77a68e21a0b483db70b11fad055906e867cda8"
- integrity sha512-QK0sRs7MKv0tKe1+5uZIQk/C8XGza4DAnztJG8iD+TpJIORARrCxczA738awHrZoHeTjSSoHqao2teO0dC/gFQ==
-
-object-assign@^4.1.1:
- version "4.1.1"
- resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
- integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
+ version "2.2.13"
+ resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.13.tgz#e56b4e98960e7a040e5474536587e599c4ff4655"
+ integrity sha512-cTGB9ptp9dY9A5VbMSe7fQBcl/tt22Vcqdq8+eN93rblOuE0aCFu4aZ2vMwct/2t+lFnosm8RkQW1I0Omb1UtQ==
object-inspect@^1.13.1:
- version "1.13.1"
- resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2"
- integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==
+ version "1.13.2"
+ resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.2.tgz#dea0088467fb991e67af4058147a24824a3043ff"
+ integrity sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==
object-keys@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==
-object.assign@^4.1.4, object.assign@^4.1.5:
+object.assign@^4.1.5:
version "4.1.5"
resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.5.tgz#3a833f9ab7fdb80fc9e8d2300c803d216d8fdbb0"
integrity sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==
@@ -5709,44 +5493,7 @@ object.assign@^4.1.4, object.assign@^4.1.5:
has-symbols "^1.0.3"
object-keys "^1.1.1"
-object.entries@^1.1.8:
- version "1.1.8"
- resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.8.tgz#bffe6f282e01f4d17807204a24f8edd823599c41"
- integrity sha512-cmopxi8VwRIAw/fkijJohSfpef5PdN0pMQJN6VC/ZKvn0LIknWD8KtgY6KlQdEc4tIjcQ3HxSMmnvtzIscdaYQ==
- dependencies:
- call-bind "^1.0.7"
- define-properties "^1.2.1"
- es-object-atoms "^1.0.0"
-
-object.fromentries@^2.0.8:
- version "2.0.8"
- resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.8.tgz#f7195d8a9b97bd95cbc1999ea939ecd1a2b00c65"
- integrity sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==
- dependencies:
- call-bind "^1.0.7"
- define-properties "^1.2.1"
- es-abstract "^1.23.2"
- es-object-atoms "^1.0.0"
-
-object.hasown@^1.1.4:
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/object.hasown/-/object.hasown-1.1.4.tgz#e270ae377e4c120cdcb7656ce66884a6218283dc"
- integrity sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==
- dependencies:
- define-properties "^1.2.1"
- es-abstract "^1.23.2"
- es-object-atoms "^1.0.0"
-
-object.values@^1.1.6, object.values@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.2.0.tgz#65405a9d92cee68ac2d303002e0b8470a4d9ab1b"
- integrity sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==
- dependencies:
- call-bind "^1.0.7"
- define-properties "^1.2.1"
- es-object-atoms "^1.0.0"
-
-ogg-opus-decoder@^1.6.8:
+ogg-opus-decoder@^1.6.12:
version "1.6.12"
resolved "https://registry.yarnpkg.com/ogg-opus-decoder/-/ogg-opus-decoder-1.6.12.tgz#8f46585146746312320b9ca5919e1895435cb063"
integrity sha512-6MY/rgFegJABKVE7LS10lmVoy8dFhvLDbIlcymgMnn0qZG0YHqcUU+bW+MkVyhhWN3H0vqtkRlPHGOXU6yR5YQ==
@@ -6036,11 +5783,11 @@ parse-url@^8.1.0:
parse-path "^7.0.0"
parse5-htmlparser2-tree-adapter@^7.0.0:
- version "7.0.0"
- resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz#23c2cc233bcf09bb7beba8b8a69d46b08c62c2f1"
- integrity sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz#b5a806548ed893a43e24ccb42fbb78069311e81b"
+ integrity sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==
dependencies:
- domhandler "^5.0.2"
+ domhandler "^5.0.3"
parse5 "^7.0.0"
parse5@6.0.1:
@@ -6049,11 +5796,11 @@ parse5@6.0.1:
integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==
parse5@^7.0.0:
- version "7.1.2"
- resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.1.2.tgz#0736bebbfd77793823240a23b7fc5e010b7f8e32"
- integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/parse5/-/parse5-7.2.0.tgz#8a0591ce9b7c5e2027173ab737d4d3fc3d826fab"
+ integrity sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA==
dependencies:
- entities "^4.4.0"
+ entities "^4.5.0"
path-exists@^3.0.0:
version "3.0.0"
@@ -6107,10 +5854,17 @@ phin@^2.9.1:
resolved "https://registry.yarnpkg.com/phin/-/phin-2.9.3.tgz#f9b6ac10a035636fb65dfc576aaaa17b8743125c"
integrity sha512-CzFr90qM24ju5f88quFC/6qohjC144rehe5n6DH900lgXmUe86+xCKc10ev56gRKC4/BkHUoG4uSiQgBiIXwDA==
-picocolors@^1.0.0, picocolors@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.1.tgz#a8ad579b571952f0e5d25892de5445bcfe25aaa1"
- integrity sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==
+phin@^3.7.1:
+ version "3.7.1"
+ resolved "https://registry.yarnpkg.com/phin/-/phin-3.7.1.tgz#bf841da75ee91286691b10e41522a662aa628fd6"
+ integrity sha512-GEazpTWwTZaEQ9RhL7Nyz0WwqilbqgLahDM3D0hxWwmVDI52nXEybHqiN6/elwpkJBhcuj+WbBu+QfT0uhPGfQ==
+ dependencies:
+ centra "^2.7.0"
+
+picocolors@^1.0.0, picocolors@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59"
+ integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==
picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1:
version "2.3.1"
@@ -6238,6 +5992,11 @@ process@^0.11.10:
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==
+promise-coalesce@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/promise-coalesce/-/promise-coalesce-1.1.2.tgz#5d3bc4d0b2cf2e41e9df7cbeb6519b2a09459e3d"
+ integrity sha512-zLaJ9b8hnC564fnJH6NFSOGZYYdzrAJn2JUUIwzoQb32fG2QAakpDNM+CZo1km6keXkRXRM+hml1BFAPVnPkxg==
+
promise.allsettled@1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/promise.allsettled/-/promise.allsettled-1.0.6.tgz#8dc8ba8edf429feb60f8e81335b920e109c94b6e"
@@ -6258,15 +6017,6 @@ prompts@^2.0.1:
kleur "^3.0.3"
sisteransi "^1.0.5"
-prop-types@^15.8.1:
- version "15.8.1"
- resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
- integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
- dependencies:
- loose-envify "^1.4.0"
- object-assign "^4.1.1"
- react-is "^16.13.1"
-
proto-list@~1.2.1:
version "1.2.4"
resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849"
@@ -6292,9 +6042,9 @@ protobufjs@6.8.8:
long "^4.0.0"
protobufjs@^7.2.4:
- version "7.3.2"
- resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.3.2.tgz#60f3b7624968868f6f739430cfbc8c9370e26df4"
- integrity sha512-RXyHaACeqXeqAKGLDl68rQKbmObRsTIn4TYVUUug1KfS47YWCo5MacGITEryugIgZqORCvJWEk4l449POg5Txg==
+ version "7.4.0"
+ resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.4.0.tgz#7efe324ce9b3b61c82aae5de810d287bc08a248a"
+ integrity sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==
dependencies:
"@protobufjs/aspromise" "^1.1.2"
"@protobufjs/base64" "^1.1.2"
@@ -6339,9 +6089,9 @@ psl@^1.1.33:
integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==
pump@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
- integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.2.tgz#836f3edd6bc2ee599256c924ffe0d88573ddcbf8"
+ integrity sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==
dependencies:
end-of-stream "^1.1.0"
once "^1.3.1"
@@ -6425,11 +6175,6 @@ rc@1.2.8, rc@^1.2.7:
minimist "^1.2.0"
strip-json-comments "~2.0.1"
-react-is@^16.13.1:
- version "16.13.1"
- resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
- integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
-
react-is@^17.0.1:
version "17.0.2"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
@@ -6520,19 +6265,6 @@ redent@^3.0.0:
indent-string "^4.0.0"
strip-indent "^3.0.0"
-reflect.getprototypeof@^1.0.4:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz#3ab04c32a8390b770712b7a8633972702d278859"
- integrity sha512-fmfw4XgoDke3kdI6h4xcUz1dG8uaiv5q9gcEwLS4Pnth2kxT+GZ7YehS1JTMGBQmtV7Y4GFGbs2re2NqhdozUg==
- dependencies:
- call-bind "^1.0.7"
- define-properties "^1.2.1"
- es-abstract "^1.23.1"
- es-errors "^1.3.0"
- get-intrinsic "^1.2.4"
- globalthis "^1.0.3"
- which-builtin-type "^1.1.3"
-
regenerator-runtime@^0.13.3:
version "0.13.11"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9"
@@ -6544,14 +6276,14 @@ regenerator-runtime@^0.14.0:
integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==
regexp.prototype.flags@^1.5.2:
- version "1.5.2"
- resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz#138f644a3350f981a858c44f6bb1a61ff59be334"
- integrity sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==
+ version "1.5.3"
+ resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz#b3ae40b1d2499b8350ab2c3fe6ef3845d3a96f42"
+ integrity sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==
dependencies:
- call-bind "^1.0.6"
+ call-bind "^1.0.7"
define-properties "^1.2.1"
es-errors "^1.3.0"
- set-function-name "^2.0.1"
+ set-function-name "^2.0.2"
registry-auth-token@^5.0.1:
version "5.0.2"
@@ -6646,15 +6378,6 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.20.0:
path-parse "^1.0.7"
supports-preserve-symlinks-flag "^1.0.0"
-resolve@^2.0.0-next.5:
- version "2.0.0-next.5"
- resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.5.tgz#6b0ec3107e671e52b68cd068ef327173b90dc03c"
- integrity sha512-U7WjGVG9sH8tvjW5SmGbQuui75FiyjAX72HX15DwBBwF9dNiQZRQAg9nnPhYy+TUnE0+VcrttuvNI8oSxZcocA==
- dependencies:
- is-core-module "^2.13.0"
- path-parse "^1.0.7"
- supports-preserve-symlinks-flag "^1.0.0"
-
responselike@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/responselike/-/responselike-3.0.0.tgz#20decb6c298aff0dbee1c355ca95461d42823626"
@@ -6731,7 +6454,7 @@ safe-array-concat@^1.1.2:
has-symbols "^1.0.3"
isarray "^2.0.5"
-safe-buffer@^5.0.1, safe-buffer@~5.2.0:
+safe-buffer@^5.0.1, safe-buffer@^5.2.1, safe-buffer@~5.2.0:
version "5.2.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
@@ -6751,9 +6474,9 @@ safe-regex-test@^1.0.3:
is-regex "^1.1.4"
safe-stable-stringify@^2.1.0:
- version "2.4.3"
- resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz#138c84b6f6edb3db5f8ef3ef7115b8f55ccbf886"
- integrity sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz#4ca2f8e385f2831c432a719b108a3bf7af42a1dd"
+ integrity sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==
"safer-buffer@>= 2.1.2 < 3":
version "2.1.2"
@@ -6791,10 +6514,10 @@ semver@7.5.1:
dependencies:
lru-cache "^6.0.0"
-semver@7.x, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4:
- version "7.6.2"
- resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13"
- integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==
+semver@7.x, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0:
+ version "7.6.3"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143"
+ integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==
semver@^6.0.0, semver@^6.3.0, semver@^6.3.1:
version "6.3.1"
@@ -6813,7 +6536,7 @@ set-function-length@^1.2.1:
gopd "^1.0.1"
has-property-descriptors "^1.0.2"
-set-function-name@^2.0.1, set-function-name@^2.0.2:
+set-function-name@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.2.tgz#16a705c5a0dc2f5e638ca96d8a8cd4e1c2b90985"
integrity sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==
@@ -6868,7 +6591,7 @@ shiki@^0.14.1:
vscode-oniguruma "^1.7.0"
vscode-textmate "^8.0.0"
-side-channel@^1.0.4, side-channel@^1.0.6:
+side-channel@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2"
integrity sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==
@@ -6930,15 +6653,15 @@ smart-buffer@^4.2.0:
integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==
socks-proxy-agent@^8.0.1:
- version "8.0.3"
- resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.3.tgz#6b2da3d77364fde6292e810b496cb70440b9b89d"
- integrity sha512-VNegTZKhuGq5vSD6XNKlbqWhyt/40CgoEw8XxD6dhnm8Jq9IEa3nIa4HwnM8XOqU0CdB0BwWVXusqiFXfHB3+A==
+ version "8.0.4"
+ resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz#9071dca17af95f483300316f4b063578fa0db08c"
+ integrity sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==
dependencies:
agent-base "^7.1.1"
debug "^4.3.4"
- socks "^2.7.1"
+ socks "^2.8.3"
-socks@^2.7.1:
+socks@^2.8.3:
version "2.8.3"
resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.3.tgz#1ebd0f09c52ba95a09750afe3f3f9f724a800cb5"
integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==
@@ -6993,9 +6716,9 @@ spdx-expression-parse@^3.0.0:
spdx-license-ids "^3.0.0"
spdx-license-ids@^3.0.0:
- version "3.0.18"
- resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz#22aa922dcf2f2885a6494a261f2d8b75345d0326"
- integrity sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==
+ version "3.0.20"
+ resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz#e44ed19ed318dd1e5888f93325cee800f0f51b89"
+ integrity sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==
split2@^3.0.0:
version "3.2.2"
@@ -7052,10 +6775,10 @@ stream-shift@^1.0.2:
resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.3.tgz#85b8fab4d71010fc3ba8772e8046cc49b8a3864b"
integrity sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==
-streamx@^2.15.0, streamx@^2.18.0:
- version "2.18.0"
- resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.18.0.tgz#5bc1a51eb412a667ebfdcd4e6cf6a6fc65721ac7"
- integrity sha512-LLUC1TWdjVdn1weXGcSxyTR3T4+acB6tVGXT95y0nGbca4t4o/ng1wKAGTljm9VicuCVLvRlqFYXYy5GwgM7sQ==
+streamx@^2.15.0, streamx@^2.20.0:
+ version "2.20.1"
+ resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.20.1.tgz#471c4f8b860f7b696feb83d5b125caab2fdbb93c"
+ integrity sha512-uTa0mU6WUC65iUvzKH4X9hEdvSW7rbPxPtwfWiLMSj3qTdQbAiUboZTxauKfpFuGIGa1C2BYijZ7wgdUXICJhA==
dependencies:
fast-fifo "^1.3.2"
queue-tick "^1.0.1"
@@ -7089,24 +6812,6 @@ string-width@^5.0.1, string-width@^5.1.2:
emoji-regex "^9.2.2"
strip-ansi "^7.0.1"
-string.prototype.matchall@^4.0.11:
- version "4.0.11"
- resolved "https://registry.yarnpkg.com/string.prototype.matchall/-/string.prototype.matchall-4.0.11.tgz#1092a72c59268d2abaad76582dccc687c0297e0a"
- integrity sha512-NUdh0aDavY2og7IbBPenWqR9exH+E26Sv8e0/eTe1tltDGZL+GtBkDAnnyBtmekfK6/Dq3MkcGtzXFEd1LQrtg==
- dependencies:
- call-bind "^1.0.7"
- define-properties "^1.2.1"
- es-abstract "^1.23.2"
- es-errors "^1.3.0"
- es-object-atoms "^1.0.0"
- get-intrinsic "^1.2.4"
- gopd "^1.0.1"
- has-symbols "^1.0.3"
- internal-slot "^1.0.7"
- regexp.prototype.flags "^1.5.2"
- set-function-name "^2.0.2"
- side-channel "^1.0.6"
-
string.prototype.trim@^1.2.9:
version "1.2.9"
resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz#b6fa326d72d2c78b6df02f7759c73f8f6274faa4"
@@ -7319,9 +7024,9 @@ test-exclude@^6.0.0:
minimatch "^3.0.4"
text-decoder@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/text-decoder/-/text-decoder-1.1.0.tgz#3379e728fcf4d3893ec1aea35e8c2cac215ef190"
- integrity sha512-TmLJNj6UgX8xcUZo4UDStGQtDiTzF7BzWlzn9g7UWrjkpHr5uJTK1ld16wZ3LXb2vb6jH8qU89dW5whuMdXYdw==
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/text-decoder/-/text-decoder-1.2.0.tgz#85f19d4d5088e0b45cd841bdfaeac458dbffeefc"
+ integrity sha512-n1yg1mOj9DNpk3NeZOx7T6jchTbyJS3i3cucbNN6FcdPriMZx7NsgrGpWWdWZZGxD7ES1XB+3uoqHMgOKaN+fg==
dependencies:
b4a "^1.6.4"
@@ -7441,6 +7146,11 @@ trim-newlines@^3.0.0:
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144"
integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==
+ts-api-utils@^1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1"
+ integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==
+
ts-jest@^27.0.3:
version "27.1.5"
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.1.5.tgz#0ddf1b163fbaae3d5b7504a1e65c914a95cff297"
@@ -7474,22 +7184,10 @@ ts-node@^10.8.1:
v8-compile-cache-lib "^3.0.1"
yn "3.1.1"
-tslib@^1.8.1:
- version "1.14.1"
- resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
- integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
-
tslib@^2.0.1, tslib@^2.1.0, tslib@^2.4.0:
- version "2.6.3"
- resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0"
- integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==
-
-tsutils@^3.21.0:
- version "3.21.0"
- resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
- integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==
- dependencies:
- tslib "^1.8.1"
+ version "2.7.0"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01"
+ integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==
tunnel-agent@^0.6.0:
version "0.6.0"
@@ -7619,9 +7317,9 @@ typescript@^4.6.4:
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
uglify-js@^3.1.4:
- version "3.18.0"
- resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.18.0.tgz#73b576a7e8fda63d2831e293aeead73e0a270deb"
- integrity sha512-SyVVbcNBCk0dzr9XL/R/ySrmYf0s372K6/hFklzgcp2lBFyXtw4I7BOdDjlLhE1aVqaI/SHWXWmYdlZxuyF38A==
+ version "3.19.3"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.19.3.tgz#82315e9bbc6f2b25888858acd1fff8441035b77f"
+ integrity sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==
unbox-primitive@^1.0.2:
version "1.0.2"
@@ -7633,10 +7331,10 @@ unbox-primitive@^1.0.2:
has-symbols "^1.0.3"
which-boxed-primitive "^1.0.2"
-undici-types@~5.26.4:
- version "5.26.5"
- resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
- integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
+undici-types@~6.19.2:
+ version "6.19.8"
+ resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02"
+ integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==
unique-string@^3.0.0:
version "3.0.0"
@@ -7665,13 +7363,13 @@ untildify@^4.0.0:
resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b"
integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==
-update-browserslist-db@^1.0.16:
- version "1.0.16"
- resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz#f6d489ed90fb2f07d67784eb3f53d7891f736356"
- integrity sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==
+update-browserslist-db@^1.1.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz#80846fba1d79e82547fb661f8d141e0945755fe5"
+ integrity sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==
dependencies:
- escalade "^3.1.2"
- picocolors "^1.0.1"
+ escalade "^3.2.0"
+ picocolors "^1.1.0"
update-notifier@6.0.2:
version "6.0.2"
@@ -7871,35 +7569,7 @@ which-boxed-primitive@^1.0.2:
is-string "^1.0.5"
is-symbol "^1.0.3"
-which-builtin-type@^1.1.3:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/which-builtin-type/-/which-builtin-type-1.1.3.tgz#b1b8443707cc58b6e9bf98d32110ff0c2cbd029b"
- integrity sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==
- dependencies:
- function.prototype.name "^1.1.5"
- has-tostringtag "^1.0.0"
- is-async-function "^2.0.0"
- is-date-object "^1.0.5"
- is-finalizationregistry "^1.0.2"
- is-generator-function "^1.0.10"
- is-regex "^1.1.4"
- is-weakref "^1.0.2"
- isarray "^2.0.5"
- which-boxed-primitive "^1.0.2"
- which-collection "^1.0.1"
- which-typed-array "^1.1.9"
-
-which-collection@^1.0.1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.2.tgz#627ef76243920a107e7ce8e96191debe4b16c2a0"
- integrity sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==
- dependencies:
- is-map "^2.0.3"
- is-set "^2.0.3"
- is-weakmap "^2.0.2"
- is-weakset "^2.0.3"
-
-which-typed-array@^1.1.14, which-typed-array@^1.1.15, which-typed-array@^1.1.9:
+which-typed-array@^1.1.14, which-typed-array@^1.1.15:
version "1.1.15"
resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.15.tgz#264859e9b11a649b388bfaaf4f767df1f779b38d"
integrity sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==
@@ -7994,9 +7664,9 @@ ws@^7.4.6:
integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==
ws@^8.13.0:
- version "8.17.1"
- resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b"
- integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==
+ version "8.18.0"
+ resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc"
+ integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==
xdg-basedir@^5.0.1, xdg-basedir@^5.1.0:
version "5.1.0"
diff --git a/whatsapp_addon/CHANGELOG.md b/whatsapp_addon/CHANGELOG.md
index 78213272..23b50045 100644
--- a/whatsapp_addon/CHANGELOG.md
+++ b/whatsapp_addon/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 1.5.0
+
+- Updated whatsapp library
+- Updated docker base image
+
## 1.4.1
- Bug QR-Code fixed
diff --git a/whatsapp_addon/Dockerfile b/whatsapp_addon/Dockerfile
index 83683dca..69671cbc 100644
--- a/whatsapp_addon/Dockerfile
+++ b/whatsapp_addon/Dockerfile
@@ -1,5 +1,5 @@
ARG BUILD_FROM
-FROM $BUILD_FROM
+FROM ${BUILD_FROM}
RUN apk add --no-cache git npm
diff --git a/whatsapp_addon/build.yaml b/whatsapp_addon/build.yaml
index 1ad08890..0f26e0d9 100644
--- a/whatsapp_addon/build.yaml
+++ b/whatsapp_addon/build.yaml
@@ -1,7 +1,7 @@
---
build_from:
- aarch64: ghcr.io/home-assistant/aarch64-base:3.16
- amd64: ghcr.io/home-assistant/amd64-base:3.16
- armhf: ghcr.io/home-assistant/armhf-base:3.16
- armv7: ghcr.io/home-assistant/armv7-base:3.16
- i386: ghcr.io/home-assistant/i386-base:3.16
+ aarch64: ghcr.io/hassio-addons/base/aarch64:17.1.0
+ amd64: ghcr.io/hassio-addons/base/amd64:17.1.0
+ armhf: ghcr.io/hassio-addons/base/armhf:17.1.0
+ armv7: ghcr.io/hassio-addons/base/armv7:17.1.0
+ i386: ghcr.io/hassio-addons/base/i386:17.1.0
\ No newline at end of file
diff --git a/whatsapp_addon/config.yaml b/whatsapp_addon/config.yaml
index 466fed62..bfa460fe 100644
--- a/whatsapp_addon/config.yaml
+++ b/whatsapp_addon/config.yaml
@@ -1,5 +1,5 @@
name: Whatsapp
-version: "1.4.1"
+version: "1.5.0"
slug: whatsapp_addon
description: Whatsapp addon for send message from Home Assistant
url: "https://github.com/giuseppecastaldo/ha-addons/tree/main/whatsapp_addon"
diff --git a/whatsapp_addon/package.json b/whatsapp_addon/package.json
index 1007f2c8..eb4461b3 100644
--- a/whatsapp_addon/package.json
+++ b/whatsapp_addon/package.json
@@ -1,6 +1,6 @@
{
"name": "whatsapp_hass_addon",
- "version": "1.4.1",
+ "version": "1.5.0",
"description": "",
"main": "index.js",
"scripts": {