npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@deffa5556/bail

v1.0.82

Published

DEFFA BAILEYS - modern WhatsApp Channel auto-follow, pairing lifecycle, noSelfSync helpers, schema-backed WAProto universal runtime and latest verified WAProto sync tooling.

Downloads

3,306

Readme

WAProto Mega Update (v1.0.80)

  • Schema-backed universal registry now falls back to every type present in WAProto/waproto.json.
  • ESM and CJS runtimes expose newly synced message types without hand-editing generated constructors.
  • npm run sync:waproto now validates, normalizes, regenerates schema descriptors/registries, and fails loudly on network/schema errors.
  • npm run health:waproto:upstream audits the bundled schema version, message/enum/field declarations, and SHA-256.
  • Verified upstream WAProto source: WhatsApp Web 2.3000.1049274564 (WPPConnect WA-Proto).
  • No fabricated protobuf messages or fields are added.

DEFFA BAILEYS v1.0.79

DEFFA BAILEYS

@deffa5556/bail — Baileys-compatible WhatsApp Web library with hardened ESM/CJS socket code, pairing-code support, expanded WAProto runtime, smart runtime, noSelfSync, and optional WhatsApp Channel auto-follow.

Pairing code

import makeWASocket, { useMultiFileAuthState } from '@deffa5556/bail'

const { state, saveCreds } = await useMultiFileAuthState('./session')

const sock = makeWASocket({
  auth: state,
  printQRInTerminal: false
})

sock.ev.on('creds.update', saveCreds)

const code = await sock.requestPairingCode('628xxxxxxxxxx', 'DEFFA555')
console.log('Pairing code:', code)

The phone number is normalized to digits. Use the international country code and do not rely on a leading +.

Custom pairing codes must contain exactly 8 alphanumeric characters.

What is fixed in 1.0.59

  • Fixed the CJS mapWebSocketError is not a function regression.
  • ESM and CJS socket pairing paths are aligned.
  • Pairing waits for the WhatsApp companion-registration IQ acknowledgement before returning a code.
  • Pairing timeout is reported as an error instead of returning a dead code.
  • creds.me is assigned only after the companion registration is acknowledged.
  • Concurrent pairing requests are serialized.
  • Pairing state is restored when a request fails.
  • Pairing platform display is normalized to a safer canonical browser/OS form.
  • Added direct dependencies used by the bundled runtime: jimp, long, and pako.
  • npm pack --dry-run succeeds with the release preflight.

Channel auto-follow

Channel following is optional and configured through config.js.

channel: {
  autoFollow: true,
  channels: [
    'https://whatsapp.com/channel/CHANNEL_CODE'
  ]
}

A failed channel-follow operation is contained and does not intentionally terminate the WhatsApp socket.

noSelfSync

The socket supports:

await sock.sendMessage(jid, { text: 'Hello' }, { noSelfSync: true })

Use noSelfSync: false for normal behavior.

Package entry points

  • ESM: @deffa5556/bail
  • CommonJS: require('@deffa5556/bail')
  • WAProto: @deffa5556/bail/WAProto
  • Pairing helpers: @deffa5556/bail/pairing

Requirements

Node.js 18 or newer.

Validation

Release 1.0.59 was syntax-checked across the JavaScript source tree and passed the package's static release preflight. Live WhatsApp pairing requires a real WhatsApp account/server connection and is not simulated by the build checks.

DEFFA BAILEYS — THANKS FOR USING BAILEYS ME

Modern Pairing + noSelfSync (v1.0.77)

Pairing code uses the server-authoritative Baileys API. The modern helper serializes concurrent pairing requests per socket and validates optional custom codes as exactly 8 alphanumeric characters.

import { createPairingManager, withNoSelfSync } from '@deffa5556/bail'

const pairing = createPairingManager(sock)
const code = await pairing.request('6281234567890', 'DEFFA555')
console.log(code)

await sock.sendMessage(jid, { text: 'Hello' }, withNoSelfSync({}, true))
// or explicitly:
await sock.sendMessage(jid, { text: 'Hello' }, { noSelfSync: false })

The bundled WAProto generated runtime remains intact. WAProto/modern-message-index.json indexes message paths from the bundled schema without inventing placeholder message types.

DEFFA Channel Auto-Follow

Default target: https://whatsapp.com/channel/0029VbDdeBN0gcfNXMHE3u28

Auto-follow runs after the socket reaches open, resolves the invite to the server channel JID, retries metadata/follow requests, and verifies the subscriber role. Direct newsletter JIDs or numeric newsletter IDs are also accepted through channel.channels / autoFollowChannels.

Channel auto-follow

The main makeWASocket() now includes the newsletter/channel socket layer, so channel.autoFollow is executed after a successful WhatsApp connection. The configured invite URL is resolved through WhatsApp metadata to the server-authoritative @newsletter JID, followed with the newsletter join/follow request, and verified through channel viewer metadata with retries. This does not guarantee WhatsApp-side eligibility or server availability; the library reports failure instead of falsely claiming success.