@neelegirl/baileys 2.1.4 → 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 +114 -37
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ### CJS-compatible WhatsApp Web API foundation for the Neelegirl ecosystem
6
6
 
7
- [![Version](https://img.shields.io/badge/Version-2.1.4-ff69b4?style=for-the-badge)](https://www.npmjs.com/package/@neelegirl/baileys)
7
+ [![Version](https://img.shields.io/badge/Version-2.1.5-ff69b4?style=for-the-badge)](https://www.npmjs.com/package/@neelegirl/baileys)
8
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
9
  [![Node](https://img.shields.io/badge/Node-20%2B-2ea043?style=for-the-badge&logo=node.js)](https://nodejs.org)
10
10
  [![License](https://img.shields.io/badge/License-MIT-f97316?style=for-the-badge)](LICENSE)
@@ -13,37 +13,42 @@
13
13
  <img src="https://files.catbox.moe/phppor.JPG" width="760" alt="Neelegirl Baileys Header" />
14
14
  </p>
15
15
 
16
- | Package | Latest Version | Upstream Base |
16
+ | Paket | Version | Basis |
17
17
  |---|---:|---|
18
- | `@neelegirl/baileys` | `2.1.4` | `WhiskeySockets/Baileys v7.0.0-rc.9` |
18
+ | `@neelegirl/baileys` | `2.1.5` | `WhiskeySockets/Baileys v7.0.0-rc.9` |
19
19
 
20
- [Installation](#installation) · [Quickstart](#quickstart) · [Feature Overview](#feature-overview) · [Compatibility Notes](#compatibility-notes)
20
+ [Installation](#installation) · [Quickstart](#quickstart) · [Funktionslogik](#funktionslogik) · [Aenderungen](#aenderungen--hinweise)
21
21
 
22
22
  </div>
23
23
 
24
24
  ---
25
25
 
26
- ## Table of Contents
26
+ ## Inhaltsverzeichnis
27
27
 
28
- - [Why this fork](#why-this-fork)
28
+ - [Uebersicht](#uebersicht)
29
29
  - [Installation](#installation)
30
30
  - [Quickstart](#quickstart)
31
- - [Feature Overview](#feature-overview)
32
- - [Compatibility Notes](#compatibility-notes)
33
- - [Word2Web Notes](#word2web-notes)
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)
34
36
  - [Changelog](#changelog)
35
37
  - [Legal](#legal)
36
38
 
37
39
  ---
38
40
 
39
- ## Why this fork
41
+ ## Uebersicht
40
42
 
41
- `@neelegirl/baileys` keeps a CJS-first runtime for projects that depend on `require()` behavior while integrating relevant upstream updates.
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.
42
44
 
43
- This fork explicitly keeps two project-critical customizations unchanged:
45
+ Wichtige Punkte aus den bisherigen Projekt-READMEs, auf den echten Code gemappt:
44
46
 
45
- - QR-code handling logic stays unchanged.
46
- - Message-ID logic containing `NEELE` stays unchanged.
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]`.
47
52
 
48
53
  ---
49
54
 
@@ -53,6 +58,22 @@ This fork explicitly keeps two project-critical customizations unchanged:
53
58
  npm install @neelegirl/baileys
54
59
  ```
55
60
 
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
+
56
77
  ---
57
78
 
58
79
  ## Quickstart
@@ -66,8 +87,8 @@ const {
66
87
  Browsers,
67
88
  } = require('@neelegirl/baileys')
68
89
 
69
- async function start() {
70
- const { state, saveCreds } = await useMultiFileAuthState('./auth')
90
+ async function startBot() {
91
+ const { state, saveCreds } = await useMultiFileAuthState('./auth_info')
71
92
  const { version } = await fetchLatestBaileysVersion()
72
93
 
73
94
  const sock = makeWASocket({
@@ -82,57 +103,113 @@ async function start() {
82
103
  sock.ev.on('connection.update', ({ connection, lastDisconnect }) => {
83
104
  if (connection === 'close') {
84
105
  const code = lastDisconnect?.error?.output?.statusCode
85
- if (code !== DisconnectReason.loggedOut) start()
106
+ if (code !== DisconnectReason.loggedOut) {
107
+ startBot()
108
+ }
109
+ return
86
110
  }
87
111
 
88
112
  if (connection === 'open') {
89
- console.log('Connected')
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' })
90
123
  }
91
124
  })
92
125
  }
93
126
 
94
- start().catch(console.error)
127
+ startBot().catch(console.error)
95
128
  ```
96
129
 
97
130
  ---
98
131
 
99
- ## Feature Overview
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
100
161
 
101
- - Socket, event, auth, and message APIs from the current local CJS distribution
102
- - LID/JID handling in send and receive flows
103
- - Group, community, newsletter, media, and store utilities
104
- - Optional peers for QR rendering, preview extraction, and image/audio processing
105
- - Runtime update-check support kept from the current Neelegirl package line
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.
106
174
 
107
175
  ---
108
176
 
109
- ## Compatibility Notes
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.
110
180
 
111
- - Runtime target: Node.js `>=20`
112
- - Module shape: CJS-first (`main: lib/index.js`)
113
- - Upstream policy: selective backporting from WhiskeySockets/Baileys for compatibility
181
+ ---
182
+
183
+ ## Word2Web Hinweise
114
184
 
115
- If you need strict ESM parity with upstream source layout, migrate consumers to ESM first.
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.
116
186
 
117
187
  ---
118
188
 
119
- ## Word2Web Notes
189
+ ## Kompatibilitaet und Grenzen
120
190
 
121
- No dedicated Word2Web module is shipped in this package. Document or enable Word2Web behavior only in host projects where it is actually implemented.
191
+ - Node.js: `>=20`
192
+ - CJS-fokussiert, nicht als 1:1-ESM-Upstream-Ersatz dokumentiert
193
+ - Die API ist auf bestehende Neelegirl-Consumer ausgerichtet
122
194
 
123
195
  ---
124
196
 
125
197
  ## Changelog
126
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
205
+
127
206
  ### 2.1.4
128
207
 
129
- - README restyled to match the main project presentation style
130
- - Package metadata refined for publish consistency
131
- - Dependency alignment with `@neelegirl/libsignal@^1.0.8`
132
- - Existing QR and `NEELE` message-ID custom logic preserved
208
+ - Style-/Layout-Refresh fuer konsistente Projektdokumentation
209
+ - Publish-Metadaten und CJS-Kompatibilitaet nachgezogen
133
210
 
134
211
  ---
135
212
 
136
213
  ## Legal
137
214
 
138
- This project is not affiliated with WhatsApp. Use responsibly and comply with platform terms and local laws.
215
+ Dieses Projekt ist nicht mit WhatsApp verbunden. Nutzung nur in Uebereinstimmung mit geltendem Recht und Plattformregeln.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
- {
1
+ {
2
2
  "name": "@neelegirl/baileys",
3
- "version": "2.1.4",
3
+ "version": "2.1.5",
4
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",
@@ -42,7 +42,7 @@
42
42
  "@adiwajshing/keyed-db": "^0.2.4",
43
43
  "@cacheable/node-cache": "^1.5.4",
44
44
  "@hapi/boom": "^9.1.3",
45
- "@neelegirl/libsignal": "^1.0.8",
45
+ "@neelegirl/libsignal": "^1.0.9",
46
46
  "async-mutex": "^0.5.0",
47
47
  "audio-decode": "^2.1.3",
48
48
  "axios": "^1.3.3",
@@ -107,4 +107,4 @@
107
107
  "engines": {
108
108
  "node": ">=20.0.0"
109
109
  }
110
- }
110
+ }