@awangxcode/qiro-baileys 7.0.0-rc21 → 7.0.0-rc23

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/README.md CHANGED
@@ -1342,7 +1342,7 @@ await message.send('15551234567@s.whatsapp.net')
1342
1342
  `Button`, `ButtonV2`, `Carousel`, and `AIRich` are experimental helpers. Carousel cards require pre-prepared media metadata. The validator rejects malformed runtime inputs with descriptive errors, and carousel batch additions are atomic: an invalid card does not leave earlier cards from that batch attached. This improves local payload safety but does not confirm server acceptance or universal client rendering. Only use payload formats supported by the target WhatsApp clients.
1343
1343
 
1344
1344
 
1345
- ### Qiro extensions (RC21)
1345
+ ### Qiro extensions (RC23)
1346
1346
 
1347
1347
  The package ships the following optional extensions copied byte-for-byte from the Qiro project. Import only the extension you use:
1348
1348
 
@@ -1 +1 @@
1
- {"version":3,"file":"terminal-welcome.d.ts","sourceRoot":"","sources":["../../src/Utils/terminal-welcome.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAoKH,4FAA4F;AAC5F,wBAAgB,uBAAuB,IAAI,IAAI,CAiC9C"}
1
+ {"version":3,"file":"terminal-welcome.d.ts","sourceRoot":"","sources":["../../src/Utils/terminal-welcome.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAwMH,4FAA4F;AAC5F,wBAAgB,uBAAuB,IAAI,IAAI,CAiC9C"}
@@ -35,18 +35,19 @@ const ANSI = {
35
35
  blue: '\u001b[38;5;39m',
36
36
  purple: '\u001b[38;5;141m',
37
37
  pink: '\u001b[38;5;213m',
38
- white: '\u001b[1;97m',
38
+ white: '\u001b[97m',
39
+ boldWhite: '\u001b[1;97m',
39
40
  };
40
41
  const CONTACT_LINES = [
41
- '🫟 𝗕𝗮𝗶𝗹𝗲𝘆𝘀 𝗕𝘆 : AwangXcode iD',
42
- '🪀 𝗪𝗵𝗮𝘁𝘀𝗔𝗽𝗽 : https://wa.me//556184127506',
43
- '💬 𝗧𝗲𝗹𝗲𝗴𝗿𝗮𝗺 : https://t.me/awangoffc',
42
+ '🫟 Baileys By : AwangXcode iD',
43
+ '🪀 WhatsApp : https://wa.me//556184127506',
44
+ '💬 Telegram : https://t.me/awangoffc',
44
45
  ];
45
- const WELCOME_LINE = '💥 𝗪𝗘𝗟𝗖𝗢𝗠𝗘 𝗧𝗢 𝗕𝗔𝗜𝗟𝗘𝗬𝗦 𝗕𝗬 𝗔𝗫𝗖𝗢𝗗𝗘 𝗶𝗗 💫';
46
+ // Use normal characters and terminal SGR bold instead of custom Unicode bold glyphs.
47
+ // This keeps character-cell widths stable so right borders always meet.
48
+ const WELCOME_LINE = '💥 WELCOME TO BAILEYS BY AXCODE iD 💫';
46
49
  const THANKS_LINES = [
47
- 'Terimakasi Yang Sudah Menggunakan Baileys ini Dan',
48
- 'Juga Makasih Sudah Support Saya Sampai Ketitik Ini',
49
- 'Jika Ada Kendala Pada Baileys Ini Silahkan Laporkan',
50
+ 'Terimakasi Yang Sudah Menggunakan Baileys ini Dan Juga Makasih Sudah Support Saya Sampai Ketitik Ini Jika Ada Kendala Pada Baileys Ini Silahkan Laporkan',
50
51
  ];
51
52
  const ART_SEPARATOR = '▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬';
52
53
  const FOOTER = '▒▒░░░░░░░░░░░░░░░░░░░░░▒▒';
@@ -55,6 +56,11 @@ const FOOTER = '▒▒░░░░░░░░░░░░░░░░░░░
55
56
  const BANNER_WIDTH = 46;
56
57
  function characterWidth(character) {
57
58
  const codePoint = character.codePointAt(0) || 0;
59
+ // The Pterodactyl/mobile terminal shown in the supplied screenshot renders 🫟
60
+ // as one display cell. Override the generic emoji-block width estimate so
61
+ // this row's right border aligns with the WhatsApp and Telegram rows.
62
+ if (codePoint === 0x1fadf)
63
+ return 1;
58
64
  if (codePoint === 0x200d ||
59
65
  codePoint === 0xfe0e ||
60
66
  codePoint === 0xfe0f ||
@@ -123,16 +129,39 @@ function center(value, width) {
123
129
  const missing = Math.max(0, width - displayWidth(value));
124
130
  return `${' '.repeat(Math.floor(missing / 2))}${value}${' '.repeat(Math.ceil(missing / 2))}`;
125
131
  }
126
- function drawBox(lines, width, accent, enabled) {
132
+ function styleBodyLine(value, enabled, style) {
133
+ if (!enabled)
134
+ return value;
135
+ if (style === 'title')
136
+ return paint(value, ANSI.boldWhite, true);
137
+ if (style === 'contacts') {
138
+ for (const label of ['Baileys By', 'WhatsApp', 'Telegram']) {
139
+ const index = value.indexOf(label);
140
+ if (index >= 0) {
141
+ return (paint(value.slice(0, index), ANSI.white, true) +
142
+ paint(label, ANSI.boldWhite, true) +
143
+ paint(value.slice(index + label.length), ANSI.white, true));
144
+ }
145
+ }
146
+ }
147
+ return paint(value, ANSI.white, true);
148
+ }
149
+ function drawBox(lines, width, accent, enabled, bodyStyle = 'normal') {
127
150
  const innerWidth = Math.max(1, width - 4);
128
151
  const border = (left, right) => paint(`${left}${'━'.repeat(Math.max(0, width - 2))}${right}`, accent, enabled);
129
152
  const output = [border('╔', '╗')];
130
153
  for (const value of lines) {
131
154
  for (const line of wrapText(value, innerWidth)) {
132
- const padding = Math.max(0, innerWidth - displayWidth(line));
155
+ // Give the 🫟 icon a visibly separated label in the rendered console.
156
+ // wrapText intentionally normalizes repeated source spaces, so apply this
157
+ // display-only spacing after wrapping and include it in width calculation.
158
+ const displayLine = bodyStyle === 'contacts' && line.startsWith('🫟 ')
159
+ ? line.replace(/^🫟 /, '🫟 ')
160
+ : line;
161
+ const padding = Math.max(0, innerWidth - displayWidth(displayLine));
133
162
  output.push(paint('┃', accent, enabled) +
134
163
  ' ' +
135
- paint(line, ANSI.white, enabled) +
164
+ styleBodyLine(displayLine, enabled, bodyStyle) +
136
165
  ' '.repeat(padding) +
137
166
  ' ' +
138
167
  paint('┃', accent, enabled));
@@ -159,14 +188,14 @@ export function printQiroBaileysWelcome() {
159
188
  }
160
189
  output.push(paint(center(ART_SEPARATOR, BANNER_WIDTH), ANSI.cyan, colorEnabled));
161
190
  output.push('');
162
- output.push(...drawBox([WELCOME_LINE], BANNER_WIDTH, ANSI.cyan, colorEnabled));
191
+ output.push(...drawBox([WELCOME_LINE], BANNER_WIDTH, ANSI.cyan, colorEnabled, 'title'));
163
192
  output.push('');
164
193
  output.push(...drawBox(THANKS_LINES, BANNER_WIDTH, ANSI.purple, colorEnabled));
165
194
  output.push('');
166
- output.push(...drawBox(CONTACT_LINES, BANNER_WIDTH, ANSI.pink, colorEnabled));
195
+ output.push(...drawBox(CONTACT_LINES, BANNER_WIDTH, ANSI.pink, colorEnabled, 'contacts'));
167
196
  output.push('');
168
- // Keep the compact RC19 width, but close the decorative footer with the same aligned border.
169
- output.push(...drawBox([center(FOOTER, BANNER_WIDTH - 4)], BANNER_WIDTH, ANSI.cyan, colorEnabled));
197
+ // Keep the RC19 footer decoration but remove the extra cyan frame around it.
198
+ output.push(paint(center(FOOTER, BANNER_WIDTH), ANSI.cyan, colorEnabled));
170
199
  output.push('');
171
200
  process.stdout.write(`${output.join('\n')}\n`);
172
201
  }
@@ -1 +1 @@
1
- {"version":3,"file":"terminal-welcome.js","sourceRoot":"","sources":["../../src/Utils/terminal-welcome.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,QAAQ,GAAG;IACf,0BAA0B;IAC1B,qCAAqC;IACrC,qCAAqC;IACrC,qCAAqC;IACrC,qCAAqC;IACrC,qCAAqC;IACrC,qCAAqC;IACrC,qCAAqC;IACrC,qCAAqC;IACrC,qCAAqC;IACrC,qCAAqC;IACrC,qCAAqC;IACrC,qCAAqC;IACrC,qCAAqC;IACrC,qCAAqC;IACrC,qCAAqC;IACrC,qCAAqC;IACrC,qCAAqC;IACrC,qCAAqC;IACrC,qCAAqC;IACrC,0BAA0B;CAC3B,CAAA;AAED,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,WAAW;IAClB,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,iBAAiB;IACvB,MAAM,EAAE,kBAAkB;I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CAAC,CAAA;IACzE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAEf,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AAChD,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@awangxcode/qiro-baileys",
3
3
  "type": "module",
4
- "version": "7.0.0-rc21",
4
+ "version": "7.0.0-rc23",
5
5
  "description": "Unofficial package based on WhiskeySockets/Baileys v7.0.0-rc14. Not affiliated with the upstream maintainers.",
6
6
  "keywords": [
7
7
  "whatsapp",
@@ -17,13 +17,7 @@
17
17
  "WAProto/**/*",
18
18
  "engine-requirements.js",
19
19
  "README.md",
20
- "QIRO-BAILEYS-RC16.md",
21
- "QIRO-BAILEYS-RC17.md",
22
- "QIRO-BAILEYS-RC18.md",
23
- "QIRO-BAILEYS-RC19.md",
24
- "THIRD_PARTY_NOTICES.md",
25
- "QIRO-BAILEYS-RC20.md",
26
- "QIRO-BAILEYS-RC21.md"
20
+ "THIRD_PARTY_NOTICES.md"
27
21
  ],
28
22
  "scripts": {
29
23
  "build:all": "npm run build && npm run build:docs",
@@ -1,25 +0,0 @@
1
- # Qiro Baileys RC16 — MessageBuilder hardening (historical release notes)
2
-
3
- RC16 was published as `@awangxcode/qiro-baileys@7.0.0-rc16` under the `next` dist-tag. It builds on the RC15 source line based on WhiskeySockets/Baileys `7.0.0-rc14`.
4
-
5
- ## Scope of this candidate
6
-
7
- This candidate focuses on local payload construction and validation. The socket, session, pairing, reconnect, and message transport source files are not modified by the RC16 changes; no production session needs to be migrated to adopt these builder refinements.
8
-
9
- - Make `checkNativeFlowButtons` handle malformed JavaScript/untyped inputs without throwing while inspecting them. It reports invalid list, item, name, platform, or `params` shapes as validation errors.
10
- - Validate native-flow `params` as plain records and validate section titles, row shapes, and optional row text fields before serialization.
11
- - Convert circular/non-serializable button parameters into a clear `TypeError` rather than exposing a low-level `JSON.stringify` exception.
12
- - Reject malformed absolute URLs and URLs containing embedded credentials when `Button.addUrl` is called, before a payload is built.
13
- - Make carousel batch additions atomic: if any supplied card is invalid, none of the cards from that batch are added.
14
- - Make text guard helpers reject non-string runtime values with a consistent, descriptive error.
15
- - Add regression tests for malformed runtime inputs, unsafe URL credentials, serialization failures, and carousel batch atomicity.
16
-
17
- ## Compatibility and scope limits
18
-
19
- These changes harden local payload assembly. They do not change the core Socket/session/pairing implementation from RC15 and do not claim that WhatsApp will accept or render every native-flow, carousel, or AIRich variant. Server-side feature flags and device/client support remain outside this library's control.
20
-
21
- ## Verification status
22
-
23
- The user built RC16 with `BUILD_EXIT_CODE=0`, ran five focused MessageBuilder optimization checks with no failures, and published it using the `next` dist-tag. A prior full Jest run on the user's Termux environment hit `illegal hardware instruction`; that environment limitation is distinct from the passing focused checks.
24
-
25
- RC16 was published under `next`, preserving `latest` for existing consumers.
@@ -1,20 +0,0 @@
1
- # Qiro Baileys RC17 — Responsive terminal welcome
2
-
3
- RC17 builds on the published RC16 package and adds the requested AXCODE iD / Baileys welcome banner. Because RC16 is already published, this change uses the next immutable release version, `7.0.0-rc17`.
4
-
5
- ## Changes
6
-
7
- - Print a colorized welcome banner during package entrypoint evaluation, before a consuming ESM application's startup body prints its own Qiro banner.
8
- - Show the supplied full terminal art only when its measured display width fits; use a compact logo on narrower consoles.
9
- - Render the welcome title, thank-you message, and developer contact information inside responsive boxes with a maximum width of 72 columns and wrapped text.
10
- - Correct the WhatsApp contact link to `https://wa.me/556184127506`.
11
- - Add `QIRO_BAILEYS_WELCOME=0` as an opt-out for consumers who do not want library import to print a banner.
12
- - Keep Socket, pairing, reconnect, session/auth-state, and message-transport files unchanged for this feature.
13
-
14
- ## Output order
15
-
16
- The root package entrypoint calls `printQiroBaileysWelcome()` while the package is being evaluated. In applications with static ESM imports such as Qiro Ai, this completes before the application's top-level bootstrap function runs, so the Baileys welcome appears before `printBanner()` is called by Qiro's bootstrap.
17
-
18
- ## Verification
19
-
20
- The RC16 baseline had a successful build and five focused checks for the MessageBuilder hardening. RC17's primary code change is console rendering; rebuild the source tree to generate the RC17 `lib/` files before publishing. The banner is designed to avoid external runtime dependencies, and can be suppressed with `QIRO_BAILEYS_WELCOME=0`.
@@ -1,13 +0,0 @@
1
- # Qiro Baileys RC18 — ESM libsignal import fix
2
-
3
- RC18 fixes a runtime packaging issue discovered after installing RC17 from npm. The compiled ESM entrypoint could attempt to resolve deep dependency imports such as `libsignal/src/curve` without the file extension. Node.js ESM resolution requires the explicit `.js` suffix for these package subpath imports in this environment.
4
-
5
- ## Changes
6
-
7
- - Updated all source imports from `libsignal/src/curve`, `libsignal/src/crypto`, and `libsignal/src/protobufs` to their explicit `.js` paths.
8
- - Preserved the RC17 welcome banner and other previously released features.
9
- - Bumped the immutable package version to `7.0.0-rc18`; RC17 cannot be overwritten on npm.
10
-
11
- ## Build and publish
12
-
13
- Build with `corepack yarn build`, then publish the resulting package as `@awangxcode/qiro-baileys@7.0.0-rc18` using the repository owner's authenticated npm publishing setup. The recommended prerelease distribution tag is `next`.
@@ -1,12 +0,0 @@
1
- # Qiro Baileys RC19 — Fixed-width terminal welcome
2
-
3
- RC19 improves the terminal welcome added in RC17. The supplied Braille artwork is emitted without downsampling, so the face/logo keeps its original shape. The welcome cards use a fixed 46-column layout instead of trusting the terminal's reported width, which can be inaccurate in mobile Pterodactyl web consoles and cause borders or text to wrap incorrectly.
4
-
5
- ## Preserved fixes
6
-
7
- - Keeps RC18's explicit `.js` extensions for deep `libsignal/src/*` ESM imports.
8
- - Keeps the previous MessageBuilder validation improvements and original AXCODE iD wording/artwork.
9
-
10
- ## Runtime note
11
-
12
- If the consuming bot crashes with `NODE_MODULE_VERSION 120` while Node.js requires `127` inside `better-sqlite3`, that is a native addon ABI mismatch in the bot application's `better-sqlite3` installation, not an import in this Baileys package. Rebuild/reinstall `better-sqlite3` using the same Node.js runtime configured for the bot before starting it.
@@ -1,14 +0,0 @@
1
- # Qiro Baileys RC20 — Console spacing and custom pairing code
2
-
3
- RC20 makes the mobile Pterodactyl terminal welcome more readable without changing the user's artwork or wording. The cards use a 58-column layout, extra horizontal padding, blank spacing between content lines, consistent single-line borders, and a fully closed footer decoration. The logo artwork is emitted unchanged.
4
-
5
- ## Pairing-code behavior
6
-
7
- `requestPairingCode(phoneNumber)` uses `AXCODEID` by default in this distribution. The value is 8 uppercase alphanumeric characters, as required by the custom pairing-code implementation. Consumers can supply their own code via `requestPairingCode(phoneNumber, 'YOURCODE')`, or pass `null` as the second argument to use a randomly generated code.
8
-
9
- **Security note:** `AXCODEID` is public and predictable. Applications serving multiple users should prefer a unique pairing code per session by supplying their own code or passing `null` for random generation. The user must still actively complete the pairing from the WhatsApp app.
10
-
11
- ## Preserved fixes
12
-
13
- - Retains RC18's `.js` extensions for deep `libsignal/src/*` ESM imports.
14
- - Retains RC19's mobile console logo preservation and the previous MessageBuilder validation fixes.
@@ -1,19 +0,0 @@
1
- # Qiro Baileys 7.0.0-rc21
2
-
3
- ## Console welcome
4
- - Restore the compact 46-column console layout from RC19.
5
- - Preserve the original ASCII/Braille artwork and original welcome/contact wording.
6
- - Close the decorative footer using the same aligned border style as the cards.
7
- - Keep text wrapping and padding compact to avoid oversized panels on mobile Pterodactyl consoles.
8
-
9
- ## Bundled Qiro extensions
10
- The following user-provided JavaScript modules are included verbatim in the published package under `lib/extensions/`:
11
-
12
- - `lib/extensions/awang-MessageBuilder.js`
13
- - `lib/extensions/awang-ai-rich.js`
14
- - `lib/extensions/awang-carousel.js`
15
-
16
- The source files are copied byte-for-byte during `yarn build`. They are not imported by the package root; applications may load only the extension they need. The builder/carousel extensions use the public Baileys root API. The extensions require `axios`, `fluent-ffmpeg`, and `sharp` where imported.
17
-
18
- ## Pairing code
19
- The RC20 default pairing behavior is preserved: `requestPairingCode(phoneNumber)` uses `AXCODEID` by default; pass a different eight-character uppercase alphanumeric code to customize it, or pass `null` for a generated code.