@prototypevip/baileys 0.0.9 → 0.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.
@@ -48,18 +48,11 @@ async function loadAntiBan() {
48
48
  }
49
49
  }
50
50
 
51
- // Sync load attempt for ESM top-level (best-effort)
52
- try {
53
- const wrap = await import("../AntiBan/wrapper.js");
54
- _wrapSocket = wrap.wrapSocket;
55
- _wrapSocketWithFingerprint = wrap.wrapSocketWithFingerprint;
56
- try {
57
- const presets = await import("../AntiBan/presets.js");
58
- _PRESETS = presets.PRESETS || {};
59
- } catch {}
60
- } catch (e) {
61
- _antiBanLoadError = e;
62
- }
51
+ // Best-effort background load (fire-and-forget, NOT top-level await —
52
+ // awaiting here breaks require() on this ESM package with ERR_REQUIRE_ASYNC_MODULE).
53
+ // If antiBan is requested before this finishes, makeWASocket() below will just
54
+ // warn and skip protection instead of crashing.
55
+ loadAntiBan();
63
56
 
64
57
  /**
65
58
  * Create a WhatsApp socket.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prototypevip/baileys",
3
- "version": "0.0.9",
3
+ "version": "0.1.0",
4
4
  "description": "Baileys fork (@prototypevip/baileys) — clean, without anti-ban",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",