@than-xs/baileys 2.0.3 → 2.0.4

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.
Files changed (2) hide show
  1. package/lib/index.js +7 -7
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -17,6 +17,7 @@ const maxLength = Math.max(...lines.map(l => l.length));
17
17
  const horizontal = "━".repeat(maxLength + 6);
18
18
 
19
19
  let hueOffset = 0;
20
+ let bannerHeight = lines.length + 3;
20
21
 
21
22
  function gradient(text, offset = 0) {
22
23
  return text
@@ -29,25 +30,24 @@ function gradient(text, offset = 0) {
29
30
  }
30
31
 
31
32
  function render() {
32
- console.clear();
33
+ process.stdout.write(`\x1b[${bannerHeight}A`);
33
34
 
34
- console.log();
35
- console.log(gradient("┏" + horizontal + "", 0));
35
+ process.stdout.write("\n");
36
+ process.stdout.write(gradient("┏" + horizontal) + "\n");
36
37
 
37
38
  lines.forEach((line, index) => {
38
39
  const padding = " ".repeat(maxLength - line.length);
39
40
  const content = " " + line + padding + " ";
40
- console.log(gradient("┃ " + content + " ┃", index * 30));
41
+ process.stdout.write(gradient("┃ " + content, index * 30) + "\n");
41
42
  });
42
43
 
43
- console.log(gradient("┗" + horizontal + "", 120));
44
- console.log();
44
+ process.stdout.write(gradient("┗" + horizontal, 120) + "\n\n");
45
45
  }
46
46
 
47
47
  render();
48
48
 
49
49
  setInterval(() => {
50
- hueOffset += 25;
50
+ hueOffset += 20;
51
51
  render();
52
52
  }, 1000);
53
53
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@than-xs/baileys",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Customized WhatsApp WebSocket API for Node.js",
5
5
  "keywords": [
6
6
  "whatsapp",