@neelegirl/baileys 2.1.3 → 2.1.5

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.
Files changed (2) hide show
  1. package/README.md +165 -33
  2. package/package.json +18 -12
package/README.md CHANGED
@@ -1,37 +1,82 @@
1
- # @neelegirl/baileys
1
+ <div align="center">
2
2
 
3
- ![Neelegirl Baileys](https://files.catbox.moe/phppor.JPG)
3
+ # @neelegirl/baileys
4
4
 
5
- CJS-compatible Baileys fork for projects that depend on `require()` runtime behavior, especially `@neelegirl/wa-api`.
5
+ ### CJS-compatible WhatsApp Web API foundation for the Neelegirl ecosystem
6
6
 
7
- ## Status
7
+ [![Version](https://img.shields.io/badge/Version-2.1.5-ff69b4?style=for-the-badge)](https://www.npmjs.com/package/@neelegirl/baileys)
8
+ [![Upstream](https://img.shields.io/badge/Upstream-WhiskeySockets%2FBaileys%207.0.0--rc.9-9b59b6?style=for-the-badge)](https://github.com/WhiskeySockets/Baileys)
9
+ [![Node](https://img.shields.io/badge/Node-20%2B-2ea043?style=for-the-badge&logo=node.js)](https://nodejs.org)
10
+ [![License](https://img.shields.io/badge/License-MIT-f97316?style=for-the-badge)](LICENSE)
8
11
 
9
- - Upstream base: `WhiskeySockets/Baileys` `v7.0.0-rc.9`
10
- - Upstream tracking: latest WhatsApp Web version update from upstream master integrated
11
- - Local package version: `2.1.0`
12
- - Node.js: `>=20`
12
+ <p align="center">
13
+ <img src="https://files.catbox.moe/phppor.JPG" width="760" alt="Neelegirl Baileys Header" />
14
+ </p>
15
+
16
+ | Paket | Version | Basis |
17
+ |---|---:|---|
18
+ | `@neelegirl/baileys` | `2.1.5` | `WhiskeySockets/Baileys v7.0.0-rc.9` |
19
+
20
+ [Installation](#installation) · [Quickstart](#quickstart) · [Funktionslogik](#funktionslogik) · [Aenderungen](#aenderungen--hinweise)
21
+
22
+ </div>
23
+
24
+ ---
25
+
26
+ ## Inhaltsverzeichnis
27
+
28
+ - [Uebersicht](#uebersicht)
29
+ - [Installation](#installation)
30
+ - [Quickstart](#quickstart)
31
+ - [Funktionslogik](#funktionslogik)
32
+ - [Aenderungen und Hinweise](#aenderungen--hinweise)
33
+ - [libsignal im Stack](#libsignal-im-stack)
34
+ - [Word2Web Hinweise](#word2web-hinweise)
35
+ - [Kompatibilitaet und Grenzen](#kompatibilitaet-und-grenzen)
36
+ - [Changelog](#changelog)
37
+ - [Legal](#legal)
38
+
39
+ ---
13
40
 
14
- ## What This Fork Keeps
41
+ ## Uebersicht
15
42
 
16
- - Existing QR handling logic (unchanged)
17
- - Existing message-id signature logic containing `NEELE` (unchanged)
18
- - CJS-first runtime shape used by current Neelegirl ecosystem
43
+ `@neelegirl/baileys` ist die CJS-orientierte Laufzeitbasis fuer das Neelegirl-Setup. Es uebernimmt die Socket-, Event-, Auth- und Message-Mechanik und bleibt dabei kompatibel zu bestehenden `require()`-Projekten.
19
44
 
20
- ## What Is Included
45
+ Wichtige Punkte aus den bisherigen Projekt-READMEs, auf den echten Code gemappt:
21
46
 
22
- - Full socket/event/auth API surface exported from `lib/`
23
- - LID and hosted JID handling in receive/send pipelines
24
- - Group, community, newsletter, and media helpers
25
- - Store helpers (`makeInMemoryStore`, cache-manager store)
26
- - Optional QR terminal rendering via `qrcode-terminal`
47
+ - QR-Flow bleibt wie im Projekt vorgesehen erhalten.
48
+ - Message-ID-Signatur mit `NEELE` bleibt erhalten.
49
+ - LID/JID-bezogene Verarbeitung ist in den Socket/Signal-Pfaden aktiv.
50
+ - npm-Update-Check ist enthalten (bei QR-Flow, nur einmal pro Prozess).
51
+ - Aktuelle lokale WA-Web-Version: `[2, 3000, 1035194821]`.
27
52
 
28
- ## Install
53
+ ---
54
+
55
+ ## Installation
29
56
 
30
57
  ```bash
31
58
  npm install @neelegirl/baileys
32
59
  ```
33
60
 
34
- ## Quick Start
61
+ Import:
62
+
63
+ ```js
64
+ // CommonJS
65
+ const {
66
+ default: makeWASocket,
67
+ useMultiFileAuthState,
68
+ fetchLatestBaileysVersion,
69
+ DisconnectReason,
70
+ Browsers,
71
+ } = require('@neelegirl/baileys')
72
+
73
+ // ESM (namespace import auf CJS-Export)
74
+ import * as baileys from '@neelegirl/baileys'
75
+ ```
76
+
77
+ ---
78
+
79
+ ## Quickstart
35
80
 
36
81
  ```js
37
82
  const {
@@ -42,42 +87,129 @@ const {
42
87
  Browsers,
43
88
  } = require('@neelegirl/baileys')
44
89
 
45
- async function boot() {
46
- const { state, saveCreds } = await useMultiFileAuthState('./wa_auth')
90
+ async function startBot() {
91
+ const { state, saveCreds } = await useMultiFileAuthState('./auth_info')
47
92
  const { version } = await fetchLatestBaileysVersion()
48
93
 
49
94
  const sock = makeWASocket({
50
- version,
51
95
  auth: state,
96
+ version,
52
97
  printQRInTerminal: true,
53
98
  browser: Browsers.ubuntu('Chrome'),
54
99
  })
55
100
 
56
101
  sock.ev.on('creds.update', saveCreds)
102
+
57
103
  sock.ev.on('connection.update', ({ connection, lastDisconnect }) => {
58
104
  if (connection === 'close') {
59
105
  const code = lastDisconnect?.error?.output?.statusCode
60
106
  if (code !== DisconnectReason.loggedOut) {
61
- boot()
107
+ startBot()
62
108
  }
109
+ return
110
+ }
111
+
112
+ if (connection === 'open') {
113
+ console.log('Connected to WhatsApp')
114
+ }
115
+ })
116
+
117
+ sock.ev.on('messages.upsert', async ({ messages }) => {
118
+ const msg = messages?.[0]
119
+ const text = msg?.message?.conversation || msg?.message?.extendedTextMessage?.text || ''
120
+ const jid = msg?.key?.remoteJid
121
+ if (jid && text.toLowerCase() === 'ping') {
122
+ await sock.sendMessage(jid, { text: 'pong' })
63
123
  }
64
124
  })
65
125
  }
66
126
 
67
- boot().catch(console.error)
127
+ startBot().catch(console.error)
68
128
  ```
69
129
 
70
- ## Compatibility Notes
130
+ ---
131
+
132
+ ## Funktionslogik
133
+
134
+ ### Runtime und API
135
+
136
+ - Exporte aus `lib/index.js`:
137
+ - `default` / `makeWASocket`
138
+ - `Utils`, `Types`, `Store`, `Defaults`, `WABinary`, `WAM`, `WAUSync`, `WAProto`
139
+ - CJS-first Struktur (`main: lib/index.js`, `types: lib/index.d.ts`)
140
+
141
+ ### Ereignisse und Verbindung
142
+
143
+ - `connection.update`, `messages.upsert`, `messages.update`, `creds.update`
144
+ - QR wird ueber den normalen Connection-Update-Flow ausgegeben
145
+ - Reconnect-Steuerung erfolgt ueber Disconnect-Grund (`DisconnectReason`)
146
+
147
+ ### Auth und Session
148
+
149
+ - `useMultiFileAuthState` fuer persistente Session-Dateien
150
+ - Signale/Keys laufen ueber die integrierten Signal-Utilities
151
+
152
+ ### Nachrichten und Hilfsfunktionen
153
+
154
+ - `sendMessage` fuer Text/Medien/reaktionen/polls usw.
155
+ - Gruppen-, Community-, Newsletter- und Store-Utilities sind enthalten
156
+ - LID/JID-Helfer (`jidDecode`, `jidEncode`, `isLidUser`) stehen ueber die Utility-Exports zur Verfuegung
157
+
158
+ ---
159
+
160
+ ## Aenderungen & Hinweise
161
+
162
+ Diese README uebernimmt die Dokumentationslogik aus den zwei Quell-READMEs und passt sie auf den realen Paketstand an:
163
+
164
+ - Funktionale Beschreibungen wurden beibehalten und auf echte Exporte reduziert.
165
+ - Historische Hinweise wurden bereinigt, wenn sie veraltete Versionen nannten.
166
+ - Keine nicht nachweisbaren Features aufgenommen.
167
+
168
+ Technisch relevante Punkte:
169
+
170
+ - QR-Logik unveraendert belassen.
171
+ - `NEELE`-Message-ID-Signatur unveraendert belassen.
172
+ - Update-Check auf npm-Registry aktiv.
173
+ - WA-Web-Version-Datei auf aktuellen lokalen Stand aktualisiert.
174
+
175
+ ---
176
+
177
+ ## libsignal im Stack
178
+
179
+ `@neelegirl/baileys` nutzt `@neelegirl/libsignal` fuer kryptografische Session-Bausteine (Identity, PreKeys, SessionState, Cipher-Operationen). Das ist die Grundlage fuer stabile Multi-Device-Kommunikation.
180
+
181
+ ---
182
+
183
+ ## Word2Web Hinweise
184
+
185
+ Es gibt in diesem Paket kein dediziertes Word2Web-Modul. Word2Web-spezifische Logik sollte nur dokumentiert/aktiviert werden, wenn sie in deiner Host-Anwendung wirklich implementiert ist.
186
+
187
+ ---
188
+
189
+ ## Kompatibilitaet und Grenzen
190
+
191
+ - Node.js: `>=20`
192
+ - CJS-fokussiert, nicht als 1:1-ESM-Upstream-Ersatz dokumentiert
193
+ - Die API ist auf bestehende Neelegirl-Consumer ausgerichtet
194
+
195
+ ---
196
+
197
+ ## Changelog
198
+
199
+ ### 2.1.5
200
+
201
+ - README inhaltlich mit den Desktop-Quellen zusammengefuehrt (ohne blindes Kopieren)
202
+ - Funktionsbeschreibungen, Nutzungslogik und technische Hinweise auf realen Paketstand gemappt
203
+ - Versions- und Abhaengigkeitsabgleich im Neelegirl-Stack aktualisiert
204
+ - QR-Flow und `NEELE`-Message-ID-Verhalten unveraendert beibehalten
71
205
 
72
- - This package intentionally stays CJS-oriented for compatibility with existing Neelegirl stacks.
73
- - Official upstream Baileys is ESM-first; direct drop-in replacement may break CJS consumers.
74
- - If you need strict upstream parity at source level, migrate consumers to ESM first.
206
+ ### 2.1.4
75
207
 
76
- ## Word2Web
208
+ - Style-/Layout-Refresh fuer konsistente Projektdokumentation
209
+ - Publish-Metadaten und CJS-Kompatibilitaet nachgezogen
77
210
 
78
- No dedicated Word2Web module is shipped in this package. Do not assume Word2Web-specific behavior unless implemented in your host application.
211
+ ---
79
212
 
80
213
  ## Legal
81
214
 
82
- This project is not affiliated with WhatsApp.
83
- Use responsibly and comply with applicable laws and platform terms.
215
+ Dieses Projekt ist nicht mit WhatsApp verbunden. Nutzung nur in Uebereinstimmung mit geltendem Recht und Plattformregeln.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@neelegirl/baileys",
3
- "version": "2.1.3",
4
- "description": "CJS-compatible Baileys fork for @neelegirl/wa-api, aligned with WhiskeySockets/Baileys 7.0.0-rc.9 + latest web version updates",
3
+ "version": "2.1.5",
4
+ "description": "CJS-compatible Baileys fork for Neelegirl projects, aligned with WhiskeySockets/Baileys 7.0.0-rc.9 and latest web version updates",
5
5
  "keywords": [
6
6
  "whatsapp",
7
7
  "js-whatsapp",
@@ -10,13 +10,18 @@
10
10
  "whatsapp-chat",
11
11
  "whatsapp-group",
12
12
  "automation",
13
- "multi-device"
13
+ "multi-device",
14
+ "neelegirl",
15
+ "baileys"
14
16
  ],
15
17
  "homepage": "https://github.com/neelegirl/baileys",
16
18
  "repository": {
17
19
  "type": "git",
18
20
  "url": "git+https://github.com/neelegirl/baileys.git"
19
21
  },
22
+ "bugs": {
23
+ "url": "https://github.com/neelegirl/baileys/issues"
24
+ },
20
25
  "license": "MIT",
21
26
  "author": "Neele",
22
27
  "main": "lib/index.js",
@@ -30,26 +35,27 @@
30
35
  "build:all": "tsc && typedoc",
31
36
  "build:docs": "typedoc",
32
37
  "build:tsc": "tsc",
33
- "preinstall": "node ./engine-requirements.js"
38
+ "preinstall": "node ./engine-requirements.js",
39
+ "test": "node -e \"console.log('No tests configured')\""
34
40
  },
35
41
  "dependencies": {
36
42
  "@adiwajshing/keyed-db": "^0.2.4",
37
43
  "@cacheable/node-cache": "^1.5.4",
38
44
  "@hapi/boom": "^9.1.3",
39
- "@neelegirl/libsignal": "^1.0.2",
45
+ "@neelegirl/libsignal": "^1.0.9",
40
46
  "async-mutex": "^0.5.0",
41
47
  "audio-decode": "^2.1.3",
42
48
  "axios": "^1.3.3",
43
49
  "cache-manager": "4.0.1",
44
50
  "futoin-hkdf": "^1.5.1",
45
51
  "libphonenumber-js": "^1.10.20",
52
+ "lru-cache": "^11.1.0",
46
53
  "music-metadata": "^7.12.3",
47
54
  "node-cache": "^5.1.2",
48
55
  "pino": "^7.0.0",
49
56
  "protobufjs": "^7.2.4",
50
57
  "uuid": "^9.0.0",
51
- "ws": "^8.13.0",
52
- "lru-cache": "^11.1.0"
58
+ "ws": "^8.13.0"
53
59
  },
54
60
  "devDependencies": {
55
61
  "@adiwajshing/eslint-config": "github:adiwajshing/eslint-config",
@@ -74,13 +80,16 @@
74
80
  "typescript": "^4.6.4"
75
81
  },
76
82
  "peerDependencies": {
83
+ "audio-decode": "^2.1.3",
77
84
  "jimp": "^0.22.12",
78
85
  "link-preview-js": "^3.0.0",
79
86
  "qrcode-terminal": "^0.12.0",
80
- "sharp": "^0.32.6",
81
- "audio-decode": "^2.1.3"
87
+ "sharp": "^0.32.6"
82
88
  },
83
89
  "peerDependenciesMeta": {
90
+ "audio-decode": {
91
+ "optional": true
92
+ },
84
93
  "jimp": {
85
94
  "optional": true
86
95
  },
@@ -92,9 +101,6 @@
92
101
  },
93
102
  "sharp": {
94
103
  "optional": true
95
- },
96
- "audio-decode": {
97
- "optional": true
98
104
  }
99
105
  },
100
106
  "packageManager": "yarn@1.22.19",