dibosockets 1.0.7 → 1.0.9

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.
@@ -7,7 +7,7 @@ exports.makeMessagesSocket = void 0;
7
7
  const boom_1 = require("@hapi/boom");
8
8
  const node_cache_1 = __importDefault(require("@cacheable/node-cache"));
9
9
  const crypto_1 = require("crypto");
10
- const RexxHayanasi = require('./RHandler');
10
+ const RexxHayanasi = require('./Rhandler');
11
11
  const WAProto_1 = require("../../WAProto");
12
12
  const Defaults_1 = require("../Defaults");
13
13
  const Utils_1 = require("../Utils");
@@ -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,36 +2,49 @@
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"));
11
-
12
5
  function fancyLog() {
13
- const title = name || "Dibo-Baileys";
14
- const message = "Thank you for using Dibo-Baileys 💙";
6
+ const name = "Dibo-Baileys";
7
+ const version = require('./package.json').version || "1.0.9"; // Ambil dari package.json jika ada
15
8
 
16
- const width = 42;
9
+ // Konfigurasi Tampilan
10
+ const title = name.toUpperCase().split("").join(" "); // D I B O - B A I L E Y S
11
+ const width = 50;
12
+ const border = {
13
+ tl: "╭",
14
+ tr: "╮",
15
+ bl: "╰",
16
+ br: "╯",
17
+ h: "─",
18
+ v: "│",
19
+ div: "├",
20
+ divr: "┤"
21
+ };
17
22
 
18
- const top = "╭" + "─".repeat(width) + "╮";
19
- const bottom = "╰" + "─".repeat(width) + "╯";
23
+ // Helper untuk padding
24
+ const pad = (text) => text + " ".repeat(width - text.length);
20
25
 
21
- const center = (text) => {
22
- const padding = width - text.length;
23
- const left = Math.floor(padding / 2);
24
- const right = padding - left;
25
- return "│" + " ".repeat(left) + text + " ".repeat(right) + "│";
26
- };
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;
30
+
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
+ ];
27
39
 
40
+ // Render dengan Gradient
28
41
  console.log(
29
42
  gradient.pastel.multiline(
30
43
  [
31
44
  top,
32
- center(chalk.bold(title)),
33
- center(`Version : v${version}`),
34
- center(message),
45
+ header,
46
+ divider,
47
+ ...content,
35
48
  bottom
36
49
  ].join("\n")
37
50
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dibosockets",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "Custom Baileys WhatsApp API",
5
5
  "keywords": [
6
6
  "baileys",
File without changes
File without changes