@blckrose/baileys 2.0.2 → 2.0.3
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/LICENSE +1 -1
- package/index.cjs +8 -8
- package/lib/index.js +14 -14
- package/package.json +7 -17
package/LICENSE
CHANGED
package/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @
|
|
4
|
+
* @blckrose/baileys — CJS wrapper
|
|
5
5
|
*
|
|
6
6
|
* Destructure dan langsung pakai tanpa await ready:
|
|
7
7
|
*
|
|
8
|
-
* const { makeWASocket, useMultiFileAuthState, Browsers } = require('@
|
|
8
|
+
* const { makeWASocket, useMultiFileAuthState, Browsers } = require('@blckrose/baileys');
|
|
9
9
|
*
|
|
10
10
|
* async function start() {
|
|
11
11
|
* const { state, saveCreds } = await useMultiFileAuthState('./auth');
|
|
@@ -69,10 +69,10 @@ module.exports.load = _load;
|
|
|
69
69
|
|
|
70
70
|
function _wrapFn(name) {
|
|
71
71
|
return async function(...args) {
|
|
72
|
-
if (_loadError) throw new Error('[
|
|
72
|
+
if (_loadError) throw new Error('[blckrose-baileys] Load failed: ' + _loadError.message);
|
|
73
73
|
if (!_mod) await _load();
|
|
74
74
|
const fn = name === 'makeWASocket' ? _mod.default : _mod[name];
|
|
75
|
-
if (typeof fn !== 'function') throw new Error('[
|
|
75
|
+
if (typeof fn !== 'function') throw new Error('[blckrose-baileys] "' + name + '" bukan fungsi');
|
|
76
76
|
return fn(...args);
|
|
77
77
|
};
|
|
78
78
|
}
|
|
@@ -83,9 +83,9 @@ function _wrapMakeWASocket() {
|
|
|
83
83
|
return function makeWASocket(...args) {
|
|
84
84
|
if (_mod) return _mod.default(...args);
|
|
85
85
|
// Kalau belum load, throw — karena makeWASocket tidak async
|
|
86
|
-
if (_loadError) throw new Error('[
|
|
86
|
+
if (_loadError) throw new Error('[blckrose-baileys] Load failed: ' + _loadError.message);
|
|
87
87
|
throw new Error(
|
|
88
|
-
'[
|
|
88
|
+
'[blckrose-baileys] makeWASocket dipanggil sebelum Baileys selesai load.\n' +
|
|
89
89
|
'Pastikan await useMultiFileAuthState() dulu (itu sudah cukup untuk menunggu load).'
|
|
90
90
|
);
|
|
91
91
|
};
|
|
@@ -94,10 +94,10 @@ function _wrapMakeWASocket() {
|
|
|
94
94
|
// ── Lazy getter untuk nilai non-fungsi ────────────────────────────────────────
|
|
95
95
|
function _makeLazyGetter(name) {
|
|
96
96
|
return function() {
|
|
97
|
-
if (_loadError) throw new Error('[
|
|
97
|
+
if (_loadError) throw new Error('[blckrose-baileys] Load failed: ' + _loadError.message);
|
|
98
98
|
if (_mod) return _mod[name];
|
|
99
99
|
throw new Error(
|
|
100
|
-
'[
|
|
100
|
+
'[blckrose-baileys] "' + name + '" belum siap. ' +
|
|
101
101
|
'Gunakan await useMultiFileAuthState() sebelum akses konstanta ini.'
|
|
102
102
|
);
|
|
103
103
|
};
|
package/lib/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
|
|
3
|
-
// ──
|
|
4
|
-
const
|
|
5
|
-
line : chalk.hex('#
|
|
6
|
-
title: chalk.bold.hex('#
|
|
7
|
-
pair : chalk.hex('#
|
|
8
|
-
repo : chalk.hex('#
|
|
9
|
-
note : chalk.dim.hex('#
|
|
3
|
+
// ── Blckrose Baileys Banner ───────────────────────────────────────────────────
|
|
4
|
+
const _blck = {
|
|
5
|
+
line : chalk.hex('#8B5CF6')('━'.repeat(60)),
|
|
6
|
+
title: chalk.bold.hex('#A78BFA')('⬡ Blckrose Baileys ') + chalk.hex('#6D28D9')('| Modified Edition'),
|
|
7
|
+
pair : chalk.hex('#7C3AED')('⌘ Pairing Code : ') + chalk.bold.white('BLCKRO53'),
|
|
8
|
+
repo : chalk.hex('#7C3AED')('❖ Report Error : ') + chalk.bold.cyan('@Blckrose0'),
|
|
9
|
+
note : chalk.dim.hex('#A78BFA')(' Laporkan error baileys ke kontak di atas'),
|
|
10
10
|
};
|
|
11
|
-
console.log(
|
|
12
|
-
console.log(
|
|
13
|
-
console.log(
|
|
14
|
-
console.log(
|
|
15
|
-
console.log(
|
|
16
|
-
console.log(
|
|
11
|
+
console.log(_blck.line);
|
|
12
|
+
console.log(_blck.title);
|
|
13
|
+
console.log(_blck.pair);
|
|
14
|
+
console.log(_blck.repo);
|
|
15
|
+
console.log(_blck.note);
|
|
16
|
+
console.log(_blck.line);
|
|
17
17
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
18
18
|
|
|
19
19
|
import makeWASocket from './Socket/index.js';
|
|
@@ -28,4 +28,4 @@ export * from './WAUSync/index.js';
|
|
|
28
28
|
export * from './Store/index.js';
|
|
29
29
|
export { makeWASocket };
|
|
30
30
|
export default makeWASocket;
|
|
31
|
-
//# sourceMappingURL=index.js.map
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,26 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blckrose/baileys",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
5
|
-
"description": "
|
|
4
|
+
"version": "2.0.3",
|
|
5
|
+
"description": "A WebSockets library for interacting with WhatsApp Web",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"whatsapp",
|
|
8
8
|
"automation",
|
|
9
|
-
"baileys"
|
|
10
|
-
"rimuru",
|
|
11
|
-
"blckrose",
|
|
12
|
-
"blck-baileys",
|
|
13
|
-
"whatsapp-api",
|
|
14
|
-
"multi-device",
|
|
15
|
-
"lid-mapping",
|
|
16
|
-
"jid-resolution"
|
|
9
|
+
"blck-baileys"
|
|
17
10
|
],
|
|
18
|
-
"homepage": "https://github.com/
|
|
11
|
+
"homepage": "https://github.com/blckrose/Baileys/",
|
|
19
12
|
"repository": {
|
|
20
|
-
"url": "https://github.com/
|
|
13
|
+
"url": "git+https://github.com/blckrose/Baileys.git"
|
|
21
14
|
},
|
|
22
15
|
"license": "MIT",
|
|
23
|
-
"author": "
|
|
16
|
+
"author": "Black Rose",
|
|
24
17
|
"main": "./index.cjs",
|
|
25
18
|
"module": "./lib/index.js",
|
|
26
19
|
"types": "./index.d.ts",
|
|
@@ -51,10 +44,7 @@
|
|
|
51
44
|
"index.cjs",
|
|
52
45
|
"index.d.ts"
|
|
53
46
|
],
|
|
54
|
-
"scripts": {
|
|
55
|
-
"lint": "eslint lib --ext .js,.ts",
|
|
56
|
-
"lint:fix": "eslint lib --fix --ext .js,.ts"
|
|
57
|
-
},
|
|
47
|
+
"scripts": {},
|
|
58
48
|
"dependencies": {
|
|
59
49
|
"@cacheable/node-cache": "^1.4.0",
|
|
60
50
|
"@hapi/boom": "^9.1.3",
|