@japofc/baileys 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE.md +111 -0
- package/README.md +1254 -0
- package/WAProto/index.d.ts +9 -0
- package/WAProto/index.js +142276 -0
- package/engine-requirements.js +13 -0
- package/lib/Builders/A2UI.d.ts +242 -0
- package/lib/Builders/A2UI.js +308 -0
- package/lib/Builders/AIRich.d.ts +105 -0
- package/lib/Builders/AIRich.js +2286 -0
- package/lib/Builders/Button.d.ts +103 -0
- package/lib/Builders/Button.js +883 -0
- package/lib/Builders/ButtonV2.d.ts +28 -0
- package/lib/Builders/ButtonV2.js +144 -0
- package/lib/Builders/ButtonV3.d.ts +25 -0
- package/lib/Builders/ButtonV3.js +184 -0
- package/lib/Builders/Carousel.d.ts +22 -0
- package/lib/Builders/Carousel.js +111 -0
- package/lib/Builders/JapBaileys.d.ts +34 -0
- package/lib/Builders/JapBaileys.js +108 -0
- package/lib/Builders/Poll.d.ts +25 -0
- package/lib/Builders/Poll.js +128 -0
- package/lib/Builders/index.d.ts +17 -0
- package/lib/Builders/index.js +11 -0
- package/lib/Builders/shared.d.ts +67 -0
- package/lib/Builders/shared.js +652 -0
- package/lib/Defaults/index.d.ts +154 -0
- package/lib/Defaults/index.js +178 -0
- package/lib/Framework/Bot.d.ts +61 -0
- package/lib/Framework/Bot.js +248 -0
- package/lib/Framework/Context.d.ts +21 -0
- package/lib/Framework/Context.js +89 -0
- package/lib/Framework/MediaManager.d.ts +17 -0
- package/lib/Framework/MediaManager.js +151 -0
- package/lib/Framework/SessionManager.d.ts +13 -0
- package/lib/Framework/SessionManager.js +33 -0
- package/lib/Framework/StatsManager.d.ts +26 -0
- package/lib/Framework/StatsManager.js +119 -0
- package/lib/Framework/Store/SQLiteStore.d.ts +11 -0
- package/lib/Framework/Store/SQLiteStore.js +73 -0
- package/lib/Framework/index.d.ts +9 -0
- package/lib/Framework/index.js +10 -0
- package/lib/Signal/Group/ciphertext-message.d.ts +9 -0
- package/lib/Signal/Group/ciphertext-message.js +11 -0
- package/lib/Signal/Group/group-session-builder.d.ts +7 -0
- package/lib/Signal/Group/group-session-builder.js +29 -0
- package/lib/Signal/Group/group_cipher.d.ts +10 -0
- package/lib/Signal/Group/group_cipher.js +81 -0
- package/lib/Signal/Group/index.d.ts +11 -0
- package/lib/Signal/Group/index.js +11 -0
- package/lib/Signal/Group/keyhelper.d.ts +6 -0
- package/lib/Signal/Group/keyhelper.js +17 -0
- package/lib/Signal/Group/sender-chain-key.d.ts +13 -0
- package/lib/Signal/Group/sender-chain-key.js +25 -0
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -0
- package/lib/Signal/Group/sender-key-distribution-message.js +62 -0
- package/lib/Signal/Group/sender-key-message.d.ts +18 -0
- package/lib/Signal/Group/sender-key-message.js +65 -0
- package/lib/Signal/Group/sender-key-name.d.ts +11 -0
- package/lib/Signal/Group/sender-key-name.js +47 -0
- package/lib/Signal/Group/sender-key-record.d.ts +12 -0
- package/lib/Signal/Group/sender-key-record.js +40 -0
- package/lib/Signal/Group/sender-key-state.d.ts +16 -0
- package/lib/Signal/Group/sender-key-state.js +83 -0
- package/lib/Signal/Group/sender-message-key.d.ts +11 -0
- package/lib/Signal/Group/sender-message-key.js +25 -0
- package/lib/Signal/libsignal.d.ts +54 -0
- package/lib/Signal/libsignal.js +430 -0
- package/lib/Signal/lid-mapping.d.ts +20 -0
- package/lib/Signal/lid-mapping.js +276 -0
- package/lib/Socket/Client/index.d.ts +2 -0
- package/lib/Socket/Client/index.js +2 -0
- package/lib/Socket/Client/types.d.ts +5 -0
- package/lib/Socket/Client/types.js +10 -0
- package/lib/Socket/Client/websocket.d.ts +12 -0
- package/lib/Socket/Client/websocket.js +53 -0
- package/lib/Socket/business.d.ts +395 -0
- package/lib/Socket/business.js +379 -0
- package/lib/Socket/chats.d.ts +136 -0
- package/lib/Socket/chats.js +1327 -0
- package/lib/Socket/communities.d.ts +562 -0
- package/lib/Socket/communities.js +439 -0
- package/lib/Socket/dugong.d.ts +117 -0
- package/lib/Socket/dugong.js +798 -0
- package/lib/Socket/groups.d.ts +285 -0
- package/lib/Socket/groups.js +354 -0
- package/lib/Socket/index.d.ts +585 -0
- package/lib/Socket/index.js +52 -0
- package/lib/Socket/messages-recv.d.ts +333 -0
- package/lib/Socket/messages-recv.js +1781 -0
- package/lib/Socket/messages-send.d.ts +353 -0
- package/lib/Socket/messages-send.js +1524 -0
- package/lib/Socket/mex.d.ts +1 -0
- package/lib/Socket/mex.js +41 -0
- package/lib/Socket/newsletter.d.ts +286 -0
- package/lib/Socket/newsletter.js +364 -0
- package/lib/Socket/socket.d.ts +60 -0
- package/lib/Socket/socket.js +1012 -0
- package/lib/Socket/username.d.ts +82 -0
- package/lib/Socket/username.js +159 -0
- package/lib/Store/index.d.ts +3 -0
- package/lib/Store/index.js +3 -0
- package/lib/Store/make-in-memory-store.d.ts +62 -0
- package/lib/Store/make-in-memory-store.js +428 -0
- package/lib/Store/make-ordered-dictionary.d.ts +12 -0
- package/lib/Store/make-ordered-dictionary.js +78 -0
- package/lib/Store/object-repository.d.ts +10 -0
- package/lib/Store/object-repository.js +23 -0
- package/lib/Types/Auth.d.ts +117 -0
- package/lib/Types/Auth.js +1 -0
- package/lib/Types/Bussines.d.ts +25 -0
- package/lib/Types/Call.d.ts +15 -0
- package/lib/Types/Call.js +1 -0
- package/lib/Types/Chat.d.ts +124 -0
- package/lib/Types/Chat.js +7 -0
- package/lib/Types/Contact.d.ts +26 -0
- package/lib/Types/Contact.js +1 -0
- package/lib/Types/Events.d.ts +256 -0
- package/lib/Types/Events.js +1 -0
- package/lib/Types/GroupMetadata.d.ts +71 -0
- package/lib/Types/GroupMetadata.js +1 -0
- package/lib/Types/Label.d.ts +5 -0
- package/lib/Types/Label.js +24 -0
- package/lib/Types/LabelAssociation.d.ts +6 -0
- package/lib/Types/LabelAssociation.js +6 -0
- package/lib/Types/Message.d.ts +62 -0
- package/lib/Types/Message.js +17 -0
- package/lib/Types/Mex.d.ts +2 -0
- package/lib/Types/Mex.js +38 -0
- package/lib/Types/Product.d.ts +79 -0
- package/lib/Types/Product.js +1 -0
- package/lib/Types/RichType.d.ts +2 -0
- package/lib/Types/RichType.js +22 -0
- package/lib/Types/Signal.d.ts +87 -0
- package/lib/Types/Signal.js +1 -0
- package/lib/Types/Socket.d.ts +138 -0
- package/lib/Types/Socket.js +1 -0
- package/lib/Types/State.d.ts +8 -0
- package/lib/Types/State.js +55 -0
- package/lib/Types/USync.d.ts +26 -0
- package/lib/Types/index.d.ts +68 -0
- package/lib/Types/index.js +27 -0
- package/lib/Utils/MessageBuilder.d.ts +2 -0
- package/lib/Utils/MessageBuilder.js +2 -0
- package/lib/Utils/PersistentStore.d.ts +60 -0
- package/lib/Utils/PersistentStore.js +592 -0
- package/lib/Utils/anti-delete.d.ts +74 -0
- package/lib/Utils/anti-delete.js +221 -0
- package/lib/Utils/auth-secure.d.ts +86 -0
- package/lib/Utils/auth-secure.js +764 -0
- package/lib/Utils/auth-utils.d.ts +57 -0
- package/lib/Utils/auth-utils.js +306 -0
- package/lib/Utils/auto-reply.d.ts +47 -0
- package/lib/Utils/auto-reply.js +157 -0
- package/lib/Utils/baileys-event-stream.d.ts +8 -0
- package/lib/Utils/baileys-event-stream.js +62 -0
- package/lib/Utils/browser-utils.d.ts +8 -0
- package/lib/Utils/browser-utils.js +27 -0
- package/lib/Utils/business.d.ts +49 -0
- package/lib/Utils/business.js +239 -0
- package/lib/Utils/button-helper-utils.d.ts +53 -0
- package/lib/Utils/button-helper-utils.js +312 -0
- package/lib/Utils/button-sender.d.ts +54 -0
- package/lib/Utils/button-sender.js +822 -0
- package/lib/Utils/chat-control.d.ts +159 -0
- package/lib/Utils/chat-control.js +230 -0
- package/lib/Utils/chat-history-helpers.d.ts +21 -0
- package/lib/Utils/chat-history-helpers.js +70 -0
- package/lib/Utils/chat-utils.d.ts +407 -0
- package/lib/Utils/chat-utils.js +885 -0
- package/lib/Utils/companion-reg-client-utils.d.ts +4 -0
- package/lib/Utils/companion-reg-client-utils.js +39 -0
- package/lib/Utils/crypto.d.ts +41 -0
- package/lib/Utils/crypto.js +147 -0
- package/lib/Utils/decode-wa-message.d.ts +83 -0
- package/lib/Utils/decode-wa-message.js +316 -0
- package/lib/Utils/event-buffer.d.ts +12 -0
- package/lib/Utils/event-buffer.js +635 -0
- package/lib/Utils/generics.d.ts +69 -0
- package/lib/Utils/generics.js +438 -0
- package/lib/Utils/history-share.d.ts +11 -0
- package/lib/Utils/history-share.js +70 -0
- package/lib/Utils/history.d.ts +90 -0
- package/lib/Utils/history.js +146 -0
- package/lib/Utils/humanizer.d.ts +12 -0
- package/lib/Utils/humanizer.js +73 -0
- package/lib/Utils/identity-change-handler.d.ts +13 -0
- package/lib/Utils/identity-change-handler.js +49 -0
- package/lib/Utils/index.d.ts +57 -0
- package/lib/Utils/index.js +56 -0
- package/lib/Utils/jid-tools.d.ts +6 -0
- package/lib/Utils/jid-tools.js +77 -0
- package/lib/Utils/link-preview.d.ts +12 -0
- package/lib/Utils/link-preview.js +84 -0
- package/lib/Utils/logger.d.ts +4 -0
- package/lib/Utils/logger.js +2 -0
- package/lib/Utils/lt-hash.d.ts +12 -0
- package/lib/Utils/lt-hash.js +26 -0
- package/lib/Utils/make-mutex.d.ts +6 -0
- package/lib/Utils/make-mutex.js +32 -0
- package/lib/Utils/media-messages.d.ts +18 -0
- package/lib/Utils/media-messages.js +70 -0
- package/lib/Utils/media-set.d.ts +13 -0
- package/lib/Utils/media-set.js +171 -0
- package/lib/Utils/message-kind.d.ts +32 -0
- package/lib/Utils/message-kind.js +136 -0
- package/lib/Utils/message-retry-manager.d.ts +79 -0
- package/lib/Utils/message-retry-manager.js +264 -0
- package/lib/Utils/message-search.d.ts +44 -0
- package/lib/Utils/message-search.js +188 -0
- package/lib/Utils/messages-media.d.ts +135 -0
- package/lib/Utils/messages-media.js +868 -0
- package/lib/Utils/messages.d.ts +44 -0
- package/lib/Utils/messages.js +2326 -0
- package/lib/Utils/meta-ai.d.ts +13 -0
- package/lib/Utils/meta-ai.js +74 -0
- package/lib/Utils/mini-app.d.ts +35 -0
- package/lib/Utils/mini-app.js +213 -0
- package/lib/Utils/noise-handler.d.ts +20 -0
- package/lib/Utils/noise-handler.js +200 -0
- package/lib/Utils/offline-node-processor.d.ts +9 -0
- package/lib/Utils/offline-node-processor.js +39 -0
- package/lib/Utils/past-participants.d.ts +14 -0
- package/lib/Utils/past-participants.js +40 -0
- package/lib/Utils/pre-key-manager.d.ts +25 -0
- package/lib/Utils/pre-key-manager.js +105 -0
- package/lib/Utils/process-message.d.ts +82 -0
- package/lib/Utils/process-message.js +808 -0
- package/lib/Utils/qr-render.d.ts +59 -0
- package/lib/Utils/qr-render.js +179 -0
- package/lib/Utils/qrcodegen.d.ts +79 -0
- package/lib/Utils/qrcodegen.js +848 -0
- package/lib/Utils/reporting-utils.d.ts +12 -0
- package/lib/Utils/reporting-utils.js +257 -0
- package/lib/Utils/rich-message-utils.d.ts +48 -0
- package/lib/Utils/rich-message-utils.js +444 -0
- package/lib/Utils/router.d.ts +37 -0
- package/lib/Utils/router.js +165 -0
- package/lib/Utils/scheduled-posts.d.ts +30 -0
- package/lib/Utils/scheduled-posts.js +110 -0
- package/lib/Utils/scheduling.d.ts +42 -0
- package/lib/Utils/scheduling.js +139 -0
- package/lib/Utils/signal.d.ts +82 -0
- package/lib/Utils/signal.js +200 -0
- package/lib/Utils/stanza-ack.d.ts +16 -0
- package/lib/Utils/stanza-ack.js +37 -0
- package/lib/Utils/status.d.ts +50 -0
- package/lib/Utils/status.js +107 -0
- package/lib/Utils/stickerpack.d.ts +51 -0
- package/lib/Utils/stickerpack.js +274 -0
- package/lib/Utils/sync-action-utils.d.ts +2 -0
- package/lib/Utils/sync-action-utils.js +48 -0
- package/lib/Utils/tag.d.ts +12 -0
- package/lib/Utils/tag.js +44 -0
- package/lib/Utils/tc-token-utils.d.ts +29 -0
- package/lib/Utils/tc-token-utils.js +162 -0
- package/lib/Utils/templates.d.ts +76 -0
- package/lib/Utils/templates.js +150 -0
- package/lib/Utils/transcribe.d.ts +12 -0
- package/lib/Utils/transcribe.js +107 -0
- package/lib/Utils/use-cache-manager-auth-state.d.ts +13 -0
- package/lib/Utils/use-cache-manager-auth-state.js +81 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +10 -0
- package/lib/Utils/use-multi-file-auth-state.js +166 -0
- package/lib/Utils/use-single-file-auth-state.d.ts +10 -0
- package/lib/Utils/use-single-file-auth-state.js +113 -0
- package/lib/Utils/use-sqlite-auth-state.d.ts +11 -0
- package/lib/Utils/use-sqlite-auth-state.js +169 -0
- package/lib/Utils/validate-connection.d.ts +42 -0
- package/lib/Utils/validate-connection.js +198 -0
- package/lib/Utils/vcard.d.ts +58 -0
- package/lib/Utils/vcard.js +104 -0
- package/lib/Utils/voice-note.d.ts +15 -0
- package/lib/Utils/voice-note.js +63 -0
- package/lib/VoIP/audio-feeder.d.ts +18 -0
- package/lib/VoIP/audio-feeder.js +160 -0
- package/lib/VoIP/call-recorder.d.ts +13 -0
- package/lib/VoIP/call-recorder.js +73 -0
- package/lib/VoIP/index.d.ts +86 -0
- package/lib/VoIP/index.js +611 -0
- package/lib/VoIP/relay-transport.d.ts +43 -0
- package/lib/VoIP/relay-transport.js +563 -0
- package/lib/VoIP/signaling.d.ts +26 -0
- package/lib/VoIP/signaling.js +662 -0
- package/lib/VoIP/types.d.ts +69 -0
- package/lib/VoIP/types.js +17 -0
- package/lib/VoIP/wasm-engine.d.ts +120 -0
- package/lib/VoIP/wasm-engine.js +1358 -0
- package/lib/VoIP/worker-bootstrap.d.ts +4 -0
- package/lib/VoIP/worker-bootstrap.js +1046 -0
- package/lib/WABinary/constants.d.ts +61 -0
- package/lib/WABinary/constants.js +1466 -0
- package/lib/WABinary/decode.d.ts +9 -0
- package/lib/WABinary/decode.js +261 -0
- package/lib/WABinary/encode.d.ts +2 -0
- package/lib/WABinary/encode.js +219 -0
- package/lib/WABinary/generic-utils.d.ts +74 -0
- package/lib/WABinary/generic-utils.js +276 -0
- package/lib/WABinary/index.d.ts +5 -0
- package/lib/WABinary/index.js +5 -0
- package/lib/WABinary/jid-utils.d.ts +28 -0
- package/lib/WABinary/jid-utils.js +95 -0
- package/lib/WABinary/types.d.ts +19 -0
- package/lib/WABinary/types.js +1 -0
- package/lib/WAM/BinaryInfo.d.ts +7 -0
- package/lib/WAM/BinaryInfo.js +9 -0
- package/lib/WAM/constants.d.ts +34926 -0
- package/lib/WAM/constants.js +22852 -0
- package/lib/WAM/encode.d.ts +1 -0
- package/lib/WAM/encode.js +149 -0
- package/lib/WAM/index.d.ts +3 -0
- package/lib/WAM/index.js +3 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +36 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +51 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +29 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +62 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +26 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +37 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +9 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +24 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +38 -0
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +50 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +14 -0
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +28 -0
- package/lib/WAUSync/Protocols/index.d.ts +7 -0
- package/lib/WAUSync/Protocols/index.js +7 -0
- package/lib/WAUSync/USyncQuery.d.ts +20 -0
- package/lib/WAUSync/USyncQuery.js +121 -0
- package/lib/WAUSync/USyncUser.d.ts +16 -0
- package/lib/WAUSync/USyncUser.js +30 -0
- package/lib/WAUSync/index.d.ts +3 -0
- package/lib/WAUSync/index.js +3 -0
- package/lib/assets/wasm/loader.d.ts +5 -0
- package/lib/assets/wasm/loader.js +5 -0
- package/lib/assets/wasm/whatsapp.wasm +0 -0
- package/lib/assets/wasm/worker-modules.d.ts +5 -0
- package/lib/assets/wasm/worker-modules.js +273 -0
- package/lib/index.d.ts +18 -0
- package/lib/index.js +23 -0
- package/package.json +180 -0
- package/postinstall-banner.js +82 -0
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export * from "../WAProto/index.js";
|
|
2
|
+
export * from "./Utils/index.js";
|
|
3
|
+
export * from "./Types/index.js";
|
|
4
|
+
export * from "./Store/index.js";
|
|
5
|
+
export * from "./Defaults/index.js";
|
|
6
|
+
export * from "./WABinary/index.js";
|
|
7
|
+
export * from "./WAM/index.js";
|
|
8
|
+
export * from "./WAUSync/index.js";
|
|
9
|
+
export { Dugong } from "./Socket/dugong.js";
|
|
10
|
+
export { Bot, Context, MediaManager, SessionManager, StatsManager, SQLiteStore } from "./Framework/index.js";
|
|
11
|
+
export { VoipClient, ActiveCall, CallState, attachVoip, createWavRecorder } from "./VoIP/index.js";
|
|
12
|
+
export type { BotConfig, BotMiddleware, BotCommandHandler, StickerMetadata, StatRow, GhostEntry } from "./Framework/index.js";
|
|
13
|
+
export type { VoipClientConfig, AnswerCallOptions, JoinGroupCallOptions, StartGroupCallOptions, RecoverCallOptions, WavRecorder, WavRecorderOptions } from "./VoIP/index.js";
|
|
14
|
+
export type { UsernameSocketMethods, SetUsernameOptions, CheckUsernameResult, FoundUsernameUser } from "./Socket/username.js";
|
|
15
|
+
export * from "./Builders/index.js";
|
|
16
|
+
export { makeWASocket };
|
|
17
|
+
export default makeWASocket;
|
|
18
|
+
import makeWASocket from './Socket/index.js';
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import makeWASocket from './Socket/index.js';
|
|
2
|
+
export * from '../WAProto/index.js';
|
|
3
|
+
export * from './Utils/index.js';
|
|
4
|
+
export * from './Types/index.js';
|
|
5
|
+
export * from './Store/index.js';
|
|
6
|
+
export * from './Defaults/index.js';
|
|
7
|
+
export * from './WABinary/index.js';
|
|
8
|
+
export * from './WAM/index.js';
|
|
9
|
+
export * from './WAUSync/index.js';
|
|
10
|
+
export { Dugong } from './Socket/dugong.js';
|
|
11
|
+
// JAP@Port --- Enterprise Bot Framework (Bot/Context/SessionManager/
|
|
12
|
+
// StatsManager/MediaManager/SQLiteStore). See lib/Framework/index.js.
|
|
13
|
+
export { Bot, Context, MediaManager, SessionManager, StatsManager, SQLiteStore } from './Framework/index.js';
|
|
14
|
+
// JAP@Add --- Audio-only WhatsApp voice-call
|
|
15
|
+
// handling (WASM call stack + WebRTC relay via optional `@roamhq/wrtc`). See
|
|
16
|
+
// lib/VoIP/index.js for usage — instantiate VoipClient(sock) after connection.open.
|
|
17
|
+
export { VoipClient, ActiveCall, CallState, attachVoip, createWavRecorder } from './VoIP/index.js';
|
|
18
|
+
export { makeWASocket };
|
|
19
|
+
export default makeWASocket;
|
|
20
|
+
|
|
21
|
+
// Jap Builders
|
|
22
|
+
export * from './Builders/index.js';
|
|
23
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@japofc/baileys",
|
|
3
|
+
"version": "2.1.0",
|
|
4
|
+
"description": "Feature-rich WhatsApp Multi-Device library for Node.js — interactive messages, native flows, polls, newsletters, VoIP, mini-apps and everyday bot utilities.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./lib/index.js",
|
|
7
|
+
"module": "./lib/index.js",
|
|
8
|
+
"types": "./lib/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./lib/index.d.ts",
|
|
12
|
+
"import": "./lib/index.js",
|
|
13
|
+
"default": "./lib/index.js"
|
|
14
|
+
},
|
|
15
|
+
"./package.json": "./package.json"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"preinstall": "node ./engine-requirements.js",
|
|
19
|
+
"postinstall": "node ./postinstall-banner.js",
|
|
20
|
+
"voip:fetch-wasm": "node --experimental-websocket ./scripts/fetch-wasm-resources.mjs",
|
|
21
|
+
"test": "node --test",
|
|
22
|
+
"test:types": "tsc -p tests/tscheck/tsconfig.json"
|
|
23
|
+
},
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=20.0.0"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "git+https://github.com/JAPofc/baileys.git"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"lib/**/*",
|
|
33
|
+
"WAProto/**/*",
|
|
34
|
+
"engine-requirements.js",
|
|
35
|
+
"postinstall-banner.js",
|
|
36
|
+
"NOTICE.md"
|
|
37
|
+
],
|
|
38
|
+
"keywords": [
|
|
39
|
+
"japofc",
|
|
40
|
+
"jap",
|
|
41
|
+
"jap-baileys",
|
|
42
|
+
"japbaileys",
|
|
43
|
+
"jap-whatsapp",
|
|
44
|
+
"jap-baileys-md",
|
|
45
|
+
"baileys-fork-jap",
|
|
46
|
+
"baileys",
|
|
47
|
+
"baileys-md",
|
|
48
|
+
"baileys-multi-device",
|
|
49
|
+
"baileys-multidevice",
|
|
50
|
+
"baileys-whatsapp",
|
|
51
|
+
"baileys-whatsapp-api",
|
|
52
|
+
"baileys-whatsapp-bot",
|
|
53
|
+
"baileys-bot",
|
|
54
|
+
"baileys-api",
|
|
55
|
+
"baileys-library",
|
|
56
|
+
"baileys-node",
|
|
57
|
+
"baileys-nodejs",
|
|
58
|
+
"baileys-javascript",
|
|
59
|
+
"baileys-js",
|
|
60
|
+
"baileys-esm",
|
|
61
|
+
"baileys-fork",
|
|
62
|
+
"whatsapp-baileys",
|
|
63
|
+
"whatsapp-bot-baileys",
|
|
64
|
+
"whatsapp-api-baileys",
|
|
65
|
+
"whatsapp-web-baileys",
|
|
66
|
+
"whatsapp-multi-device",
|
|
67
|
+
"whatsapp-automation",
|
|
68
|
+
"whatsapp-bot",
|
|
69
|
+
"whatsapp-api",
|
|
70
|
+
"whatsapp-web",
|
|
71
|
+
"multi-device",
|
|
72
|
+
"interactive-messages"
|
|
73
|
+
],
|
|
74
|
+
"homepage": "https://github.com/JAPofc/baileys#readme",
|
|
75
|
+
"author": "JAPofc",
|
|
76
|
+
"license": "MIT",
|
|
77
|
+
"dependencies": {
|
|
78
|
+
"@adiwajshing/keyed-db": "^0.2.4",
|
|
79
|
+
"@cacheable/node-cache": "^1.4.0",
|
|
80
|
+
"@hapi/boom": "^9.1.3",
|
|
81
|
+
"async-mutex": "^0.5.0",
|
|
82
|
+
"fflate": "^0.8.2",
|
|
83
|
+
"jimp": "^1.6.1",
|
|
84
|
+
"libsignal": "^6.0.0",
|
|
85
|
+
"long": "^5.2.3",
|
|
86
|
+
"lru-cache": "^11.2.6",
|
|
87
|
+
"music-metadata": "^11.12.3",
|
|
88
|
+
"p-queue": "^9.1.0",
|
|
89
|
+
"pino": "^9.6.0",
|
|
90
|
+
"protobufjs": "^7.5.6",
|
|
91
|
+
"ws": "^8.19.0"
|
|
92
|
+
},
|
|
93
|
+
"peerDependencies": {
|
|
94
|
+
"@napi-rs/image": "~1.12.0",
|
|
95
|
+
"@roamhq/wrtc": "*",
|
|
96
|
+
"audio-decode": "^2.2.3",
|
|
97
|
+
"better-sqlite3": "^11.0.0",
|
|
98
|
+
"fluent-ffmpeg": "^2.1.3",
|
|
99
|
+
"ioredis": "^5.4.1",
|
|
100
|
+
"link-preview-js": "^3.0.0",
|
|
101
|
+
"mongodb": "^6.10.0",
|
|
102
|
+
"mysql2": "^3.11.0",
|
|
103
|
+
"node-webpmux": "^3.2.0",
|
|
104
|
+
"pg": "^8.13.0",
|
|
105
|
+
"sharp": "*"
|
|
106
|
+
},
|
|
107
|
+
"peerDependenciesMeta": {
|
|
108
|
+
"@napi-rs/image": {
|
|
109
|
+
"optional": true
|
|
110
|
+
},
|
|
111
|
+
"@roamhq/wrtc": {
|
|
112
|
+
"optional": true
|
|
113
|
+
},
|
|
114
|
+
"audio-decode": {
|
|
115
|
+
"optional": true
|
|
116
|
+
},
|
|
117
|
+
"better-sqlite3": {
|
|
118
|
+
"optional": true
|
|
119
|
+
},
|
|
120
|
+
"fluent-ffmpeg": {
|
|
121
|
+
"optional": true
|
|
122
|
+
},
|
|
123
|
+
"ioredis": {
|
|
124
|
+
"optional": true
|
|
125
|
+
},
|
|
126
|
+
"link-preview-js": {
|
|
127
|
+
"optional": true
|
|
128
|
+
},
|
|
129
|
+
"mongodb": {
|
|
130
|
+
"optional": true
|
|
131
|
+
},
|
|
132
|
+
"mysql2": {
|
|
133
|
+
"optional": true
|
|
134
|
+
},
|
|
135
|
+
"pg": {
|
|
136
|
+
"optional": true
|
|
137
|
+
},
|
|
138
|
+
"node-webpmux": {
|
|
139
|
+
"optional": true
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"resolutions": {
|
|
143
|
+
"ajv@npm:^6.12.4": "^6.14.0",
|
|
144
|
+
"basic-ftp": "^5.2.4",
|
|
145
|
+
"brace-expansion@npm:^1.1.7": "^1.1.13",
|
|
146
|
+
"brace-expansion@npm:^2.0.1": "^2.0.3",
|
|
147
|
+
"flatted": "^3.4.2",
|
|
148
|
+
"glob@npm:^10.2.2": "^10.5.0",
|
|
149
|
+
"glob@npm:^10.3.10": "^10.5.0",
|
|
150
|
+
"glob@npm:^10.5.0": "^10.5.0",
|
|
151
|
+
"handlebars": "^4.7.9",
|
|
152
|
+
"ip-address": "^10.1.1",
|
|
153
|
+
"js-yaml@npm:^3.13.1": "^3.14.2",
|
|
154
|
+
"js-yaml@npm:^4.1.0": "^4.1.1",
|
|
155
|
+
"markdown-it": "^14.1.1",
|
|
156
|
+
"minimatch@npm:^3.0.4": "^3.1.5",
|
|
157
|
+
"minimatch@npm:^3.1.2": "^3.1.5",
|
|
158
|
+
"minimatch@npm:^5.0.1": "^5.1.8",
|
|
159
|
+
"minimatch@npm:^9.0.4": "^9.0.9",
|
|
160
|
+
"minimatch@npm:^9.0.5": "^9.0.9",
|
|
161
|
+
"picomatch@npm:^2.0.4": "^2.3.2",
|
|
162
|
+
"picomatch@npm:^2.3.1": "^2.3.2",
|
|
163
|
+
"picomatch@npm:^4.0.0": "^4.0.4",
|
|
164
|
+
"picomatch@npm:^4.0.2": "^4.0.4",
|
|
165
|
+
"socks": "^2.8.8",
|
|
166
|
+
"tar": "^7.5.11",
|
|
167
|
+
"tmp": "^0.2.5",
|
|
168
|
+
"underscore": "^1.13.8",
|
|
169
|
+
"yaml@npm:^2.6.1": "^2.8.4"
|
|
170
|
+
},
|
|
171
|
+
"packageManager": "yarn@4.9.2",
|
|
172
|
+
"optionalDependencies": {
|
|
173
|
+
"whatsapp-rust-bridge": "0.5.5"
|
|
174
|
+
},
|
|
175
|
+
"devDependencies": {
|
|
176
|
+
"@types/node": "^22.20.2",
|
|
177
|
+
"jsqr": "^1.4.0",
|
|
178
|
+
"typescript": "^7.0.2"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// Shown once after `npm install` — not on every connect, so it doesn't spam bot logs.
|
|
2
|
+
import { readFileSync } from 'fs';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
|
|
5
|
+
const pkg = (() => {
|
|
6
|
+
try {
|
|
7
|
+
const pkgPath = fileURLToPath(new URL('./package.json', import.meta.url));
|
|
8
|
+
return JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
9
|
+
} catch {
|
|
10
|
+
return {};
|
|
11
|
+
}
|
|
12
|
+
})();
|
|
13
|
+
|
|
14
|
+
const version = pkg.version || '';
|
|
15
|
+
const nodeVersion = process.versions.node;
|
|
16
|
+
|
|
17
|
+
// Skip the fancy box in non-TTY environments (CI logs, piped output) — plain text is
|
|
18
|
+
// more useful there than a box that may render with broken/misaligned borders.
|
|
19
|
+
const supportsColor = Boolean(process.stdout.isTTY) && process.env.NO_COLOR === undefined;
|
|
20
|
+
|
|
21
|
+
const c = supportsColor
|
|
22
|
+
? {
|
|
23
|
+
reset: '\x1b[0m',
|
|
24
|
+
bold: '\x1b[1m',
|
|
25
|
+
dim: '\x1b[2m',
|
|
26
|
+
italic: '\x1b[3m',
|
|
27
|
+
green: '\x1b[38;5;42m',
|
|
28
|
+
mint: '\x1b[38;5;121m',
|
|
29
|
+
cyan: '\x1b[38;5;51m',
|
|
30
|
+
gray: '\x1b[38;5;240m',
|
|
31
|
+
white: '\x1b[97m',
|
|
32
|
+
}
|
|
33
|
+
: { reset: '', bold: '', dim: '', italic: '', green: '', mint: '', cyan: '', gray: '', white: '' };
|
|
34
|
+
|
|
35
|
+
const WIDTH = 60;
|
|
36
|
+
const strip = (s) => s.replace(/\x1b\[[0-9;]*m/g, '');
|
|
37
|
+
const center = (s) => {
|
|
38
|
+
const visible = strip(s).length;
|
|
39
|
+
const left = Math.floor((WIDTH - visible) / 2);
|
|
40
|
+
const right = WIDTH - visible - left;
|
|
41
|
+
return ' '.repeat(Math.max(left, 0)) + s + ' '.repeat(Math.max(right, 0));
|
|
42
|
+
};
|
|
43
|
+
const leftPad = (s, padStart = 3) => {
|
|
44
|
+
const visible = strip(s).length;
|
|
45
|
+
return ' '.repeat(padStart) + s + ' '.repeat(Math.max(WIDTH - visible - padStart, 0));
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const border = c.gray;
|
|
49
|
+
const top = `${border}╭${'─'.repeat(WIDTH)}╮${c.reset}`;
|
|
50
|
+
const divider = `${border}├${'─'.repeat(WIDTH)}┤${c.reset}`;
|
|
51
|
+
const bottom = `${border}╰${'─'.repeat(WIDTH)}╯${c.reset}`;
|
|
52
|
+
const row = (content = '') => `${border}│${c.reset}${content}${border}│${c.reset}`;
|
|
53
|
+
const blank = row(' '.repeat(WIDTH));
|
|
54
|
+
|
|
55
|
+
const title = `${c.bold}${c.green}⚡ @japofc/baileys${c.reset}${version ? ` ${c.dim}v${version}${c.reset}` : ''}`;
|
|
56
|
+
const tagline = `${c.mint}Next-gen Baileys fork by J.AP${c.reset}`;
|
|
57
|
+
const sub = `${c.dim}Interactive messages · native flow · status tools${c.reset}`;
|
|
58
|
+
|
|
59
|
+
const infoLines = [
|
|
60
|
+
[`${c.white}Node${c.reset}`, `${c.dim}${nodeVersion}${c.reset}`],
|
|
61
|
+
[`${c.white}Docs${c.reset}`, `${c.cyan}github.com/JAPofc/baileys${c.reset}`],
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
const lines = [
|
|
65
|
+
'',
|
|
66
|
+
top,
|
|
67
|
+
blank,
|
|
68
|
+
row(center(title)),
|
|
69
|
+
row(center(tagline)),
|
|
70
|
+
row(center(sub)),
|
|
71
|
+
blank,
|
|
72
|
+
divider,
|
|
73
|
+
blank,
|
|
74
|
+
...infoLines.map(([label, value]) => row(leftPad(`${label} ${value}`))),
|
|
75
|
+
blank,
|
|
76
|
+
row(center(`${c.italic}${c.dim}Made with ⚡ by J.AP — thanks for installing!${c.reset}`)),
|
|
77
|
+
blank,
|
|
78
|
+
bottom,
|
|
79
|
+
'',
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
console.log(lines.join('\n'));
|