@xbibzlibrary/whatsbibz 1.3.0 → 1.3.1
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/CHANGELOG.md +6 -0
- package/lib/BibzWhats/client.js +12 -4
- package/lib/BibzWhats/version.js +1 -1
- package/lib/Utils/browser-utils.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog — @xbibzlibrary/whatsbibz
|
|
2
2
|
|
|
3
|
+
## 1.3.1 — patch pasca-rilis (2026-09-03)
|
|
4
|
+
|
|
5
|
+
- `creds.update` → `saveCreds` kini menangani kegagalan tulis (folder sesi hilang/ENOENT saat wipe atau `close()` di tengah jalan):
|
|
6
|
+
sebelumnya menjadi *unhandled rejection* yang bisa mematikan proses; `pairing.start()`/`printQR` juga dibungkus penanganan error.
|
|
7
|
+
- Test: +1 `lifecycle.test.js` (folder sesi dihapus saat client hidup → tidak ada unhandled rejection).
|
|
8
|
+
|
|
3
9
|
## 1.3.0 — identitas perangkat tertaut: kustom atau otomatis; rilis npm `@xbibzlibrary/whatsbibz` (2026-09-03)
|
|
4
10
|
|
|
5
11
|
- **Dipublish ke npm sebagai `@xbibzlibrary/whatsbibz`** (nama tampilan *WhatsBibz*; API `createBibzWhats`/`BIBZWHATS_*`
|
package/lib/BibzWhats/client.js
CHANGED
|
@@ -302,7 +302,15 @@ export async function createBibzWhats(options = {}) {
|
|
|
302
302
|
stopPairingRef = stopPairing;
|
|
303
303
|
|
|
304
304
|
sock.ev.on('creds.update', (update) => {
|
|
305
|
-
|
|
305
|
+
// Folder sesi bisa sudah hilang (dihapus pemakai / wipe / close di tengah tulis):
|
|
306
|
+
// jangan biarkan jadi unhandled rejection yang mematikan proses.
|
|
307
|
+
saveCreds(update).catch((e) => {
|
|
308
|
+
if (closedByUser || e?.code === 'ENOENT') {
|
|
309
|
+
if (!closedByUser) log.warn(`BibzWhats: gagal menyimpan kredensial (${e.code}) — folder sesi ${opts.authDir} hilang; akan dibuat ulang saat sambung berikutnya.`);
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
log.error(`BibzWhats: gagal menyimpan kredensial: ${e?.message || e}`);
|
|
313
|
+
});
|
|
306
314
|
if (sock.authState.creds.registered) stopPairing();
|
|
307
315
|
});
|
|
308
316
|
|
|
@@ -316,12 +324,12 @@ export async function createBibzWhats(options = {}) {
|
|
|
316
324
|
if (opts.phone && !pairingStarted) {
|
|
317
325
|
pairingStarted = true;
|
|
318
326
|
log.info('BibzWhats: perangkat belum terdaftar — meminta pairing code...');
|
|
319
|
-
|
|
327
|
+
pairing.start().catch((e) => log.error(`BibzWhats: pairing gagal: ${e?.message || e}`));
|
|
320
328
|
}
|
|
321
329
|
const showQr = !opts.phone || Date.now() - pairingStartedAt > opts.qrFallbackAfterMs;
|
|
322
330
|
if (showQr) {
|
|
323
331
|
emitter.emit('qr', qr);
|
|
324
|
-
if (opts.printQR)
|
|
332
|
+
if (opts.printQR) Promise.resolve(printQrToTerminal(qr, log)).catch(() => {});
|
|
325
333
|
}
|
|
326
334
|
}
|
|
327
335
|
if (sock.authState.creds.registered) stopPairing();
|
|
@@ -331,7 +339,7 @@ export async function createBibzWhats(options = {}) {
|
|
|
331
339
|
if (!sock.authState.creds.registered && !pairingStarted) {
|
|
332
340
|
pairingStarted = true;
|
|
333
341
|
log.info('BibzWhats: QR tidak diterima — minta pairing code langsung...');
|
|
334
|
-
|
|
342
|
+
pairing.start().catch((e) => log.error(`BibzWhats: pairing gagal: ${e?.message || e}`));
|
|
335
343
|
}
|
|
336
344
|
}, opts.pairingRequestDelayMs);
|
|
337
345
|
}
|
package/lib/BibzWhats/version.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const BIBZWHATS_NAME = 'WhatsBibz';
|
|
2
2
|
/** nama paket di npm */
|
|
3
3
|
export const BIBZWHATS_PACKAGE = '@xbibzlibrary/whatsbibz';
|
|
4
|
-
export const BIBZWHATS_VERSION = '1.3.
|
|
4
|
+
export const BIBZWHATS_VERSION = '1.3.1';
|
|
5
5
|
export const BIBZWHATS_UPSTREAM = 'ourin-baileys@9.0.21 (fork WhiskeySockets/Baileys v7) + patch upstream s/d rc14/master 2026-08 & PR #2769/#2776/#2778/#2789; identitas platform diukur ke server 2026-09-03';
|
|
6
6
|
/** versi WA Web bawaan (fallback) — diperbarui 2026-09-03 dari web.whatsapp.com */
|
|
7
7
|
export const BIBZWHATS_WA_WEB_VERSION = [2, 3000, 1046721733];
|
|
@@ -28,9 +28,9 @@ export const Browsers = {
|
|
|
28
28
|
linux: browser => ['Linux', browser, '6.12.44'],
|
|
29
29
|
baileys: browser => ['Baileys', browser, '6.5.0'],
|
|
30
30
|
/** identitas companion BibzWhats (tampil di daftar perangkat tertaut) */
|
|
31
|
-
whatsbibz: browser => ['WhatsBibz', browser, '1.3.
|
|
31
|
+
whatsbibz: browser => ['WhatsBibz', browser, '1.3.1'],
|
|
32
32
|
/** alias lama */
|
|
33
|
-
bibzwhats: browser => ['WhatsBibz', browser, '1.3.
|
|
33
|
+
bibzwhats: browser => ['WhatsBibz', browser, '1.3.1'],
|
|
34
34
|
windows: browser => ['Windows', browser, '10.0.22631'],
|
|
35
35
|
/** eksperimental (upstream #2201): companion Android — bisa menerima view-once */
|
|
36
36
|
android: browser => [browser, 'Android', ''],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xbibzlibrary/whatsbibz",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "WhatsBibz — library WhatsApp Web multi-device (fork Baileys v7 / ourin-baileys) untuk ekosistem Xbibz: pairing code custom, identitas perangkat kustom/otomatis, auto-reconnect, self-healing session, handler companion_reg_refresh bawaan, interactive message, album, newsletter, VoIP.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|