dibosockets 1.0.8 → 1.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.
@@ -28,7 +28,7 @@ exports.default = (config) => {
28
28
  const chatKey = config.chatKey || (0, exports.waChatKey)(true);
29
29
  const labelAssociationKey = config.labelAssociationKey || exports.waLabelAssociationKey;
30
30
  const logger = config.logger || Defaults_1.DEFAULT_CONNECTION_CONFIG.logger.child({ stream: 'in-mem-store' });
31
- const KeyedDB = require('@rexxhayanasi/keyed-db').default;
31
+ const KeyedDB = require('@adiwajshing/keyed-db').default;
32
32
  const chats = new KeyedDB(chatKey, c => c.id);
33
33
  const messages = {};
34
34
  const contacts = {};
package/lib/index.js CHANGED
@@ -2,55 +2,50 @@
2
2
 
3
3
  const chalk = require("chalk");
4
4
  const gradient = require("gradient-string");
5
- const os = require('os');
6
- // Dummy data (sesuaikan dengan variabel global kamu)
7
- const name = "Dibo-Baileys";
8
- const version = "1.0.8";
9
-
10
5
  function fancyLog() {
11
- const title = name || "Dibo-Baileys";
12
- const tagline = "WhatsApp Bot Base";
13
-
14
- // Info tambahan biar terlihat 'pro'
15
- const cpus = os.cpus()[0].model.split(' ')[0]; // Mengambil nama CPU singkat
16
- const platform = os.platform();
17
- const ram = (os.totalmem() / 1024 / 1024 / 1024).toFixed(1) + " GB";
6
+ const name = "Dibo-Baileys";
7
+ const version = "1.1.0"; // Ambil dari package.json jika ada
18
8
 
9
+ // Konfigurasi Tampilan
10
+ const title = name.toUpperCase().split("").join(" "); // D I B O - B A I L E Y S
19
11
  const width = 50;
20
-
21
- // Fungsi Helper untuk memusatkan teks
22
- const center = (text) => {
23
- const padding = width - 2 - text.length; // -2 untuk border kiri kanan
24
- const left = Math.floor(padding / 2);
25
- const right = padding - left;
26
- return "║" + " ".repeat(left) + text + " ".repeat(right) + "║";
12
+ const border = {
13
+ tl: "╭",
14
+ tr: "╮",
15
+ bl: "╰",
16
+ br: "╯",
17
+ h: "─",
18
+ v: "│",
19
+ div: "├",
20
+ divr: "┤"
27
21
  };
28
22
 
29
- // Fungsi Helper untuk teks rata kiri dengan label
30
- const line = (label, info) => {
31
- const content = ` ${label}: ${info}`;
32
- const padding = width - 2 - content.length;
33
- return "║" + content + " ".repeat(padding > 0 ? padding : 0) + "║";
34
- };
23
+ // Helper untuk padding
24
+ const pad = (text) => text + " ".repeat(width - text.length);
25
+
26
+ // Struktur Log
27
+ const top = border.tl + border.h.repeat(width) + border.tr;
28
+ const divider = border.div + border.h.repeat(width) + border.divr;
29
+ const bottom = border.bl + border.h.repeat(width) + border.br;
35
30
 
36
- const borderTop = "╔" + "═".repeat(width - 2) + "╗";
37
- const borderMid = "╠" + "═".repeat(width - 2) + "╣";
38
- const borderBot = "╚" + "═".repeat(width - 2) + "╝";
31
+ // Isi Konten
32
+ const header = border.v + " " + pad(chalk.bold(title)) + border.v; // Judul rata kiri
33
+ const content = [
34
+ border.v + " " + pad(`🚀 Version : ${version}`) + border.v,
35
+ border.v + " " + pad(`🕒 Time : ${new Date().toLocaleTimeString()}`) + border.v,
36
+ border.v + " " + pad(`💻 Status : Online & Ready`) + border.v,
37
+ border.v + " " + pad(`🔥 Message : Thank you for using Dibo-Baileys`) + border.v
38
+ ];
39
39
 
40
+ // Render dengan Gradient
40
41
  console.log(
41
- gradient.passion.multiline( // Menggunakan gradient 'passion' (ungu/merah/oranye)
42
+ gradient.pastel.multiline(
42
43
  [
43
- borderTop,
44
- center(chalk.bold(title)),
45
- center(tagline),
46
- borderMid,
47
- line("Version ", `v${version}`),
48
- line("Platform", platform.toUpperCase()),
49
- line("Memory ", ram),
50
- line("System ", cpus),
51
- borderMid,
52
- center(chalk.italic("Thank you for using Dibo-Baileys 💙")),
53
- borderBot
44
+ top,
45
+ header,
46
+ divider,
47
+ ...content,
48
+ bottom
54
49
  ].join("\n")
55
50
  )
56
51
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dibosockets",
3
- "version": "1.0.8",
3
+ "version": "1.1.0",
4
4
  "description": "Custom Baileys WhatsApp API",
5
5
  "keywords": [
6
6
  "baileys",