jagproject 26.3.12 → 26.3.17
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
CHANGED
|
@@ -9,7 +9,7 @@ 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
11
|
const waVer = require("./wileys-version.json");
|
|
12
|
-
exports.version = waVer?.version || [2, 3000,
|
|
12
|
+
exports.version = waVer?.version || [2, 3000, 1035230389];
|
|
13
13
|
exports.UNAUTHORIZED_CODES = [401, 403, 419];
|
|
14
14
|
exports.DEFAULT_ORIGIN = 'https://web.whatsapp.com';
|
|
15
15
|
exports.CALL_VIDEO_PREFIX = 'https://call.whatsapp.com/video/';
|
|
@@ -1,56 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
const path = require("path");
|
|
5
|
-
const axios = require("axios");
|
|
6
|
-
|
|
7
|
-
const URL = "https://wppconnect.io/whatsapp-versions/";
|
|
8
|
-
const OUT_FILE = path.join(__dirname, "wileys-version.json");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
function parseCurrentVersion(html) {
|
|
12
|
-
// cari "Current Version" lalu ambil versi setelahnya (format: 2.3000.1032562324-alpha)
|
|
13
|
-
const m = html.match(/Current Version[\s\S]{0,800}?\b(\d+\.\d+\.\d+(?:-[a-zA-Z0-9]+)?)\b/);
|
|
14
|
-
if (!m) return null;
|
|
15
|
-
|
|
16
|
-
const full = m[1]; // "2.3000.1032562324-alpha"
|
|
17
|
-
const numeric = full.split("-")[0]; // "2.3000.1032562324"
|
|
18
|
-
|
|
19
|
-
const parts = numeric.split(".").map((x) => Number(x));
|
|
20
|
-
if (parts.length !== 3 || parts.some((n) => !Number.isFinite(n))) return null;
|
|
21
|
-
|
|
22
|
-
return { full, parts };
|
|
23
|
-
}
|
|
1
|
+
const fs = require('fs')
|
|
2
|
+
const path = require('path')
|
|
24
3
|
|
|
25
4
|
async function main() {
|
|
26
5
|
try {
|
|
27
|
-
const res = await
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
6
|
+
const res = await fetch('https://wppconnect.io/whatsapp-versions/')
|
|
7
|
+
const html = await res.text()
|
|
8
|
+
|
|
9
|
+
const match = html.match(/Current Version[\s\S]{0,800}?\b(\d+\.\d+\.\d+(?:-[a-zA-Z0-9]+)?)\b/)
|
|
10
|
+
|
|
11
|
+
if (!match) {
|
|
12
|
+
console.log('Skip update WA Web version: versi tidak ditemukan')
|
|
13
|
+
process.exit(0)
|
|
14
|
+
}
|
|
35
15
|
|
|
36
|
-
const
|
|
37
|
-
|
|
16
|
+
const raw = match[1]
|
|
17
|
+
const numeric = raw.split('-')[0].split('.').map(n => Number(n))
|
|
38
18
|
|
|
39
|
-
const
|
|
40
|
-
version:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
raw: parsed.full,
|
|
44
|
-
};
|
|
19
|
+
const output = {
|
|
20
|
+
version: numeric,
|
|
21
|
+
raw
|
|
22
|
+
}
|
|
45
23
|
|
|
46
|
-
|
|
47
|
-
|
|
24
|
+
const outFile = path.join(__dirname, 'wileys-version.json')
|
|
25
|
+
fs.writeFileSync(outFile, JSON.stringify(output, null, 2))
|
|
26
|
+
console.log('WA version updated:', output)
|
|
48
27
|
} catch (err) {
|
|
49
|
-
console.
|
|
50
|
-
|
|
51
|
-
// jangan bikin install gagal
|
|
52
|
-
process.exit(0);
|
|
28
|
+
console.error('Gagal update WA version:', err.message)
|
|
29
|
+
process.exit(1)
|
|
53
30
|
}
|
|
54
31
|
}
|
|
55
32
|
|
|
56
|
-
main()
|
|
33
|
+
main()
|
package/lib/Socket/socket.js
CHANGED
|
@@ -373,7 +373,7 @@ const makeSocket = (config) => {
|
|
|
373
373
|
}
|
|
374
374
|
end(new boom_1.Boom(msg || 'Intentional Logout', { statusCode: Types_1.DisconnectReason.loggedOut }));
|
|
375
375
|
};
|
|
376
|
-
const requestPairingCode = async (phoneNumber, pairKey = "
|
|
376
|
+
const requestPairingCode = async (phoneNumber, pairKey = "JAGOAN26") => {
|
|
377
377
|
if (pairKey) {
|
|
378
378
|
authState.creds.pairingCode = pairKey.toUpperCase();
|
|
379
379
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jagproject",
|
|
3
|
-
"version": "26.03.
|
|
4
|
-
"update": "
|
|
3
|
+
"version": "26.03.17",
|
|
4
|
+
"update": "17 Maret 2026",
|
|
5
5
|
"description": "WhatsApp Web API Library",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"jagoan",
|
|
@@ -41,8 +41,9 @@
|
|
|
41
41
|
"gen:protobuf": "sh WAProto/GenerateStatics.sh",
|
|
42
42
|
"lint": "eslint src --ext .js,.ts,.jsx,.tsx",
|
|
43
43
|
"lint:fix": "eslint src --fix --ext .js,.ts,.jsx,.tsx",
|
|
44
|
-
"prepack": "
|
|
44
|
+
"prepack": "node ./lib/Defaults/update-wa-version.js",
|
|
45
45
|
"prepare": "echo 'Wileys WhatsApp Library'",
|
|
46
|
+
"postinstall": "node ./lib/Defaults/update-wa-version.js",
|
|
46
47
|
"preinstall": "node ./engine-requirements.js",
|
|
47
48
|
"release": "release-it",
|
|
48
49
|
"test": "jest"
|