jagproject 11.9.19 → 13.9.19
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/Defaults/index.js +1 -1
- package/lib/Defaults/wileys-version.json +1 -1
- package/lib/index.js +79 -15
- package/package.json +2 -1
package/lib/Defaults/index.js
CHANGED
|
@@ -8,7 +8,7 @@ const WAProto_1 = require("../../WAProto");
|
|
|
8
8
|
const libsignal_1 = require("../Signal/libsignal");
|
|
9
9
|
const browser_utils_1 = require("../Utils/browser-utils");
|
|
10
10
|
const logger_1 = __importDefault(require("../Utils/logger"));
|
|
11
|
-
exports.version = [2, 3000,
|
|
11
|
+
exports.version = [2, 3000, 1032562324];
|
|
12
12
|
exports.UNAUTHORIZED_CODES = [401, 403, 419];
|
|
13
13
|
exports.DEFAULT_ORIGIN = 'https://web.whatsapp.com';
|
|
14
14
|
exports.CALL_VIDEO_PREFIX = 'https://call.whatsapp.com/video/';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "version": [2, 3000,
|
|
1
|
+
{ "version": [2, 3000, 1032562324] }
|
package/lib/index.js
CHANGED
|
@@ -1,22 +1,86 @@
|
|
|
1
|
-
////
|
|
2
1
|
"use strict";
|
|
3
2
|
|
|
4
3
|
const chalk = require("chalk");
|
|
4
|
+
const gradient = require("gradient-string");
|
|
5
|
+
const pkg = require("../package.json"); // root -> wileyss/package.json
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
|
|
7
|
+
// Ambil info dari package.json
|
|
8
|
+
const version = pkg.version || "-";
|
|
9
|
+
const updateDate = pkg.update || "Belum ditentukan";
|
|
10
|
+
const name = (pkg.name || "Jagoan Project").toString();
|
|
11
|
+
|
|
12
|
+
// Konfigurasi tampilan (silakan ubah sesuai kebutuhan)
|
|
13
|
+
const CONTACT = "6282252509320";
|
|
14
|
+
const YOUTUBE = "@jagoanproject";
|
|
15
|
+
const STATUS = "Scrtipt Multi Device update setiap hari, Hubungi Admin sekrang.!!! 😱";
|
|
16
|
+
|
|
17
|
+
// Utils: lebar box otomatis mengikuti terminal, dengan batas aman
|
|
18
|
+
const termWidth = Math.max(60, Math.min(process.stdout.columns || 80, 100));
|
|
19
|
+
const boxInnerWidth = termWidth - 2;
|
|
20
|
+
|
|
21
|
+
function hr(char = "─") {
|
|
22
|
+
return char.repeat(termWidth);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function padLine(text = "") {
|
|
26
|
+
// Potong teks kalau kepanjangan
|
|
27
|
+
const clean = text.length > boxInnerWidth - 2 ? text.slice(0, boxInnerWidth - 5) + "..." : text;
|
|
28
|
+
const spaces = " ".repeat(Math.max(0, boxInnerWidth - 2 - clean.length));
|
|
29
|
+
return `│ ${clean}${spaces} │`;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function centerLine(text = "") {
|
|
33
|
+
const clean = text.length > boxInnerWidth - 2 ? text.slice(0, boxInnerWidth - 5) + "..." : text;
|
|
34
|
+
const totalSpace = Math.max(0, boxInnerWidth - 2 - clean.length);
|
|
35
|
+
const left = Math.floor(totalSpace / 2);
|
|
36
|
+
const right = totalSpace - left;
|
|
37
|
+
return `│ ${" ".repeat(left)}${clean}${" ".repeat(right)} │`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function box(lines, colorFn = (x) => x) {
|
|
41
|
+
const top = `┌${"─".repeat(boxInnerWidth)}┐`;
|
|
42
|
+
const bot = `└${"─".repeat(boxInnerWidth)}┘`;
|
|
43
|
+
console.log(colorFn(top));
|
|
44
|
+
for (const line of lines) console.log(colorFn(line));
|
|
45
|
+
console.log(colorFn(bot));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function printBanner() {
|
|
49
|
+
// Header gradient
|
|
50
|
+
const title = `⚡ ${name.toUpperCase()} — Baileys Jagoan Project ⚡`;
|
|
51
|
+
const subtitle = "WhatsApp Web API Library (Multi-Device)";
|
|
52
|
+
|
|
53
|
+
console.log();
|
|
54
|
+
console.log(gradient.pastel.multiline(hr("═")));
|
|
55
|
+
console.log(gradient.mind(title));
|
|
56
|
+
console.log(chalk.gray(subtitle));
|
|
57
|
+
console.log(gradient.pastel.multiline(hr("═")));
|
|
58
|
+
console.log();
|
|
59
|
+
|
|
60
|
+
// Box info
|
|
61
|
+
const infoLines = [
|
|
62
|
+
centerLine(chalk.bold("INFORMASI PROJECT")),
|
|
63
|
+
padLine(""),
|
|
64
|
+
padLine(`${chalk.greenBright("Version")} : ${chalk.whiteBright(version)}`),
|
|
65
|
+
padLine(`${chalk.cyanBright("Update")} : ${chalk.whiteBright(updateDate)}`),
|
|
66
|
+
padLine(""),
|
|
67
|
+
padLine(`${chalk.yellowBright("Status")} : ${chalk.whiteBright(STATUS)}`),
|
|
68
|
+
padLine(""),
|
|
69
|
+
padLine(`${chalk.magentaBright("Youtube")} : ${chalk.whiteBright(YOUTUBE)}`),
|
|
70
|
+
padLine(`${chalk.blueBright("Kontak")} : ${chalk.whiteBright(CONTACT)}`),
|
|
71
|
+
padLine(""),
|
|
72
|
+
padLine(chalk.gray("Tip: Pastikan Node >= 20 sesuai package.json.")),
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
box(infoLines, (s) => chalk.white(s));
|
|
76
|
+
console.log();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
printBanner();
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
PEMBATAS
|
|
83
|
+
*/
|
|
20
84
|
|
|
21
85
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
22
86
|
if (k2 === undefined) k2 = k;
|