dibosockets 1.0.6 → 1.0.8

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('@adiwajshing/keyed-db').default;
31
+ const KeyedDB = require('@rexxhayanasi/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,37 +2,55 @@
2
2
 
3
3
  const chalk = require("chalk");
4
4
  const gradient = require("gradient-string");
5
- const path = require("path");
6
-
7
- const {
8
- version,
9
- name
10
- } = require(path.join(process.cwd(), "package.json"));
5
+ const os = require('os');
6
+ // Dummy data (sesuaikan dengan variabel global kamu)
7
+ const name = "Dibo-Baileys";
8
+ const version = "1.0.8";
11
9
 
12
10
  function fancyLog() {
13
11
  const title = name || "Dibo-Baileys";
14
- const message = "Thank you for using Dibo-Baileys 💙";
12
+ const tagline = "WhatsApp Bot Base";
15
13
 
16
- const width = 42;
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";
17
18
 
18
- const top = "╭" + "─".repeat(width) + "╮";
19
- const bottom = "╰" + "─".repeat(width) + "╯";
19
+ const width = 50;
20
20
 
21
+ // Fungsi Helper untuk memusatkan teks
21
22
  const center = (text) => {
22
- const padding = width - text.length;
23
+ const padding = width - 2 - text.length; // -2 untuk border kiri kanan
23
24
  const left = Math.floor(padding / 2);
24
25
  const right = padding - left;
25
- return "│" + " ".repeat(left) + text + " ".repeat(right) + "│";
26
+ return "║" + " ".repeat(left) + text + " ".repeat(right) + "║";
27
+ };
28
+
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) + "║";
26
34
  };
27
35
 
36
+ const borderTop = "╔" + "═".repeat(width - 2) + "╗";
37
+ const borderMid = "╠" + "═".repeat(width - 2) + "╣";
38
+ const borderBot = "╚" + "═".repeat(width - 2) + "╝";
39
+
28
40
  console.log(
29
- gradient.pastel.multiline(
41
+ gradient.passion.multiline( // Menggunakan gradient 'passion' (ungu/merah/oranye)
30
42
  [
31
- top,
43
+ borderTop,
32
44
  center(chalk.bold(title)),
33
- center(`Version : v${version}`),
34
- center(message),
35
- bottom
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
36
54
  ].join("\n")
37
55
  )
38
56
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dibosockets",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Custom Baileys WhatsApp API",
5
5
  "keywords": [
6
6
  "baileys",
File without changes
File without changes