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.
- package/lib/Store/make-in-memory-store.js +1 -1
- package/lib/index.js +35 -40
- package/package.json +1 -1
|
@@ -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('@
|
|
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
|
|
12
|
-
const
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
12
|
+
const border = {
|
|
13
|
+
tl: "╭",
|
|
14
|
+
tr: "╮",
|
|
15
|
+
bl: "╰",
|
|
16
|
+
br: "╯",
|
|
17
|
+
h: "─",
|
|
18
|
+
v: "│",
|
|
19
|
+
div: "├",
|
|
20
|
+
divr: "┤"
|
|
27
21
|
};
|
|
28
22
|
|
|
29
|
-
//
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
37
|
-
const
|
|
38
|
-
const
|
|
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.
|
|
42
|
+
gradient.pastel.multiline(
|
|
42
43
|
[
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
);
|