supunmd-bail 2.1.1 → 2.1.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.
- package/LICENSE +1 -1
- package/README.md +428 -0
- package/WAProto/index.js +130529 -45236
- package/engine-requirements.js +1 -1
- package/lib/Defaults/baileys-version.json +1 -1
- package/lib/Defaults/index.d.ts +9 -18
- package/lib/Defaults/index.js +136 -104
- package/lib/Defaults/phonenumber-mcc.json +223 -0
- package/lib/Signal/Group/ciphertext-message.d.ts +0 -1
- package/lib/Signal/Group/ciphertext-message.js +5 -2
- package/lib/Signal/Group/group-session-builder.d.ts +3 -4
- package/lib/Signal/Group/group-session-builder.js +41 -7
- package/lib/Signal/Group/group_cipher.d.ts +4 -4
- package/lib/Signal/Group/group_cipher.js +51 -37
- package/lib/Signal/Group/index.d.ts +11 -12
- package/lib/Signal/Group/index.js +57 -12
- package/lib/Signal/Group/keyhelper.d.ts +1 -2
- package/lib/Signal/Group/keyhelper.js +44 -7
- package/lib/Signal/Group/queue-job.d.ts +0 -1
- package/lib/Signal/Group/queue-job.js +5 -2
- package/lib/Signal/Group/sender-chain-key.d.ts +2 -3
- package/lib/Signal/Group/sender-chain-key.js +15 -7
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +1 -2
- package/lib/Signal/Group/sender-key-distribution-message.js +11 -8
- package/lib/Signal/Group/sender-key-message.d.ts +1 -2
- package/lib/Signal/Group/sender-key-message.js +12 -9
- package/lib/Signal/Group/sender-key-name.d.ts +0 -1
- package/lib/Signal/Group/sender-key-name.js +5 -2
- package/lib/Signal/Group/sender-key-record.d.ts +2 -3
- package/lib/Signal/Group/sender-key-record.js +21 -9
- package/lib/Signal/Group/sender-key-state.d.ts +6 -7
- package/lib/Signal/Group/sender-key-state.js +42 -27
- package/lib/Signal/Group/sender-message-key.d.ts +0 -1
- package/lib/Signal/Group/sender-message-key.js +7 -4
- package/lib/Signal/libsignal.d.ts +3 -5
- package/lib/Signal/libsignal.js +90 -258
- package/lib/Socket/Client/{types.d.ts → abstract-socket-client.d.ts} +3 -2
- package/lib/Socket/Client/abstract-socket-client.js +13 -0
- package/lib/Socket/Client/index.d.ts +3 -3
- package/lib/Socket/Client/index.js +19 -3
- package/lib/Socket/Client/mobile-socket-client.d.ts +13 -0
- package/lib/Socket/Client/mobile-socket-client.js +65 -0
- package/lib/Socket/Client/{websocket.d.ts → web-socket-client.d.ts} +1 -2
- package/lib/Socket/Client/web-socket-client.js +62 -0
- package/lib/Socket/business.d.ts +108 -125
- package/lib/Socket/business.js +43 -159
- package/lib/Socket/chats.d.ts +239 -70
- package/lib/Socket/chats.js +384 -363
- package/lib/Socket/dugong.d.ts +254 -0
- package/lib/Socket/dugong.js +484 -0
- package/lib/Socket/groups.d.ts +56 -78
- package/lib/Socket/groups.js +96 -106
- package/lib/Socket/index.d.ts +115 -173
- package/lib/Socket/index.js +10 -17
- package/lib/Socket/messages-recv.d.ts +79 -91
- package/lib/Socket/messages-recv.js +521 -639
- package/lib/Socket/messages-send.d.ts +91 -111
- package/lib/Socket/messages-send.js +438 -599
- package/lib/Socket/newsletter.d.ts +84 -97
- package/lib/Socket/newsletter.js +239 -145
- package/lib/Socket/registration.d.ts +267 -0
- package/lib/Socket/registration.js +166 -0
- package/lib/Socket/socket.d.ts +18 -26
- package/lib/Socket/socket.js +230 -448
- package/lib/Socket/usync.d.ts +16 -17
- package/lib/Socket/usync.js +26 -19
- package/lib/Store/index.d.ts +3 -0
- package/lib/Store/index.js +10 -0
- package/lib/Store/make-cache-manager-store.d.ts +13 -0
- package/lib/Store/make-cache-manager-store.js +83 -0
- package/lib/Store/make-in-memory-store.d.ts +118 -0
- package/lib/Store/make-in-memory-store.js +427 -0
- package/lib/Store/make-ordered-dictionary.d.ts +13 -0
- package/lib/Store/make-ordered-dictionary.js +81 -0
- package/lib/Store/object-repository.d.ts +10 -0
- package/lib/Store/object-repository.js +27 -0
- package/lib/Types/Auth.d.ts +12 -13
- package/lib/Types/Auth.js +2 -2
- package/lib/Types/Call.d.ts +1 -2
- package/lib/Types/Call.js +2 -2
- package/lib/Types/Chat.d.ts +13 -34
- package/lib/Types/Chat.js +4 -8
- package/lib/Types/Contact.d.ts +1 -6
- package/lib/Types/Contact.js +2 -2
- package/lib/Types/Events.d.ts +15 -60
- package/lib/Types/Events.js +2 -2
- package/lib/Types/GroupMetadata.d.ts +5 -17
- package/lib/Types/GroupMetadata.js +2 -2
- package/lib/Types/Label.d.ts +0 -12
- package/lib/Types/Label.js +5 -3
- package/lib/Types/LabelAssociation.d.ts +0 -1
- package/lib/Types/LabelAssociation.js +5 -3
- package/lib/Types/Message.d.ts +54 -84
- package/lib/Types/Message.js +9 -11
- package/lib/Types/Newsletter.d.ts +98 -130
- package/lib/Types/Newsletter.js +38 -31
- package/lib/Types/Product.d.ts +1 -2
- package/lib/Types/Product.js +2 -2
- package/lib/Types/Signal.d.ts +1 -20
- package/lib/Types/Signal.js +2 -2
- package/lib/Types/Socket.d.ts +25 -47
- package/lib/Types/Socket.js +2 -3
- package/lib/Types/State.d.ts +2 -14
- package/lib/Types/State.js +2 -13
- package/lib/Types/USync.d.ts +2 -3
- package/lib/Types/USync.js +2 -2
- package/lib/Types/index.d.ts +14 -22
- package/lib/Types/index.js +31 -15
- package/lib/Utils/auth-utils.d.ts +6 -7
- package/lib/Utils/auth-utils.js +148 -199
- package/lib/Utils/baileys-event-stream.d.ts +1 -2
- package/lib/Utils/baileys-event-stream.js +22 -15
- package/lib/Utils/business.d.ts +2 -3
- package/lib/Utils/business.js +69 -66
- package/lib/Utils/chat-utils.d.ts +22 -21
- package/lib/Utils/chat-utils.js +226 -260
- package/lib/Utils/crypto.d.ts +19 -19
- package/lib/Utils/crypto.js +86 -77
- package/lib/Utils/decode-wa-message.d.ts +8 -37
- package/lib/Utils/decode-wa-message.js +83 -164
- package/lib/Utils/event-buffer.d.ts +8 -7
- package/lib/Utils/event-buffer.js +76 -110
- package/lib/Utils/generics.d.ts +29 -27
- package/lib/Utils/generics.js +210 -168
- package/lib/Utils/history.d.ts +8 -12
- package/lib/Utils/history.js +46 -34
- package/lib/Utils/index.d.ts +17 -20
- package/lib/Utils/index.js +33 -20
- package/lib/Utils/link-preview.d.ts +5 -5
- package/lib/Utils/link-preview.js +22 -14
- package/lib/Utils/logger.d.ts +3 -11
- package/lib/Utils/logger.js +7 -3
- package/lib/Utils/lt-hash.d.ts +8 -9
- package/lib/Utils/lt-hash.js +28 -25
- package/lib/Utils/make-mutex.d.ts +2 -3
- package/lib/Utils/make-mutex.js +10 -7
- package/lib/Utils/messages-media.d.ts +44 -42
- package/lib/Utils/messages-media.js +475 -319
- package/lib/Utils/messages.d.ts +18 -17
- package/lib/Utils/messages.js +259 -383
- package/lib/Utils/noise-handler.d.ts +15 -14
- package/lib/Utils/noise-handler.js +38 -30
- package/lib/Utils/process-message.d.ts +13 -14
- package/lib/Utils/process-message.js +147 -239
- package/lib/Utils/signal.d.ts +5 -7
- package/lib/Utils/signal.js +72 -78
- package/lib/Utils/use-multi-file-auth-state.d.ts +2 -2
- package/lib/Utils/use-multi-file-auth-state.js +27 -29
- package/lib/Utils/validate-connection.d.ts +7 -7
- package/lib/Utils/validate-connection.js +106 -72
- package/lib/WABinary/constants.d.ts +27 -25
- package/lib/WABinary/constants.js +20 -1281
- package/lib/WABinary/decode.d.ts +5 -5
- package/lib/WABinary/decode.js +42 -28
- package/lib/WABinary/encode.d.ts +3 -3
- package/lib/WABinary/encode.js +154 -105
- package/lib/WABinary/generic-utils.d.ts +7 -5
- package/lib/WABinary/generic-utils.js +63 -56
- package/lib/WABinary/index.d.ts +5 -6
- package/lib/WABinary/index.js +21 -6
- package/lib/WABinary/jid-utils.d.ts +8 -25
- package/lib/WABinary/jid-utils.js +40 -74
- package/lib/WABinary/types.d.ts +1 -2
- package/lib/WABinary/types.js +2 -2
- package/lib/WAM/BinaryInfo.d.ts +11 -3
- package/lib/WAM/BinaryInfo.js +5 -2
- package/lib/WAM/constants.d.ts +3 -5
- package/lib/WAM/constants.js +11958 -19461
- package/lib/WAM/encode.d.ts +3 -3
- package/lib/WAM/encode.js +22 -17
- package/lib/WAM/index.d.ts +3 -4
- package/lib/WAM/index.js +19 -4
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +3 -4
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +11 -8
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +2 -3
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +14 -11
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +2 -3
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +12 -9
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +2 -3
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +13 -9
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +3 -4
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +22 -20
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +3 -5
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +8 -13
- package/lib/WAUSync/Protocols/index.d.ts +4 -5
- package/lib/WAUSync/Protocols/index.js +20 -5
- package/lib/WAUSync/USyncQuery.d.ts +4 -5
- package/lib/WAUSync/USyncQuery.js +35 -40
- package/lib/WAUSync/USyncUser.d.ts +5 -6
- package/lib/WAUSync/USyncUser.js +5 -2
- package/lib/WAUSync/index.d.ts +3 -4
- package/lib/WAUSync/index.js +19 -4
- package/lib/index.d.ts +9 -19
- package/lib/index.js +47 -24
- package/package.json +109 -99
- package/WAProto/GenerateStatics.sh +0 -3
- package/WAProto/WAProto.proto +0 -5519
- package/WAProto/fix-imports.js +0 -29
- package/WAProto/index.d.ts +0 -11969
- package/lib/Signal/lid-mapping.d.ts +0 -23
- package/lib/Signal/lid-mapping.js +0 -171
- package/lib/Socket/Client/types.js +0 -11
- package/lib/Socket/Client/websocket.js +0 -50
- package/lib/Socket/communities.d.ts +0 -244
- package/lib/Socket/communities.js +0 -431
- package/lib/Socket/mex.d.ts +0 -3
- package/lib/Socket/mex.js +0 -42
- package/lib/Types/Bussines.d.ts +0 -25
- package/lib/Types/Bussines.js +0 -2
- package/lib/Utils/browser-utils.d.ts +0 -4
- package/lib/Utils/browser-utils.js +0 -28
- package/lib/Utils/message-retry-manager.d.ts +0 -82
- package/lib/Utils/message-retry-manager.js +0 -149
- package/lib/Utils/pre-key-manager.d.ts +0 -28
- package/lib/Utils/pre-key-manager.js +0 -106
- /package/lib/{supun → supunmd} +0 -0
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.USyncQuery = void 0;
|
|
4
|
+
const WABinary_1 = require("../WABinary");
|
|
5
|
+
const UsyncBotProfileProtocol_1 = require("./Protocols/UsyncBotProfileProtocol");
|
|
6
|
+
const UsyncLIDProtocol_1 = require("./Protocols/UsyncLIDProtocol");
|
|
7
|
+
const Protocols_1 = require("./Protocols");
|
|
8
|
+
class USyncQuery {
|
|
7
9
|
constructor() {
|
|
8
10
|
this.protocols = [];
|
|
9
11
|
this.users = [];
|
|
@@ -23,72 +25,65 @@ export class USyncQuery {
|
|
|
23
25
|
return this;
|
|
24
26
|
}
|
|
25
27
|
parseUSyncQueryResult(result) {
|
|
26
|
-
if (
|
|
28
|
+
if (result.attrs.type !== 'result') {
|
|
27
29
|
return;
|
|
28
30
|
}
|
|
29
|
-
const protocolMap = Object.fromEntries(this.protocols.map(protocol => {
|
|
31
|
+
const protocolMap = Object.fromEntries(this.protocols.map((protocol) => {
|
|
30
32
|
return [protocol.name, protocol.parser];
|
|
31
33
|
}));
|
|
32
34
|
const queryResult = {
|
|
33
35
|
// TODO: implement errors etc.
|
|
34
36
|
list: [],
|
|
35
|
-
sideList: []
|
|
37
|
+
sideList: [],
|
|
36
38
|
};
|
|
37
|
-
const usyncNode = getBinaryNodeChild(result, 'usync');
|
|
39
|
+
const usyncNode = (0, WABinary_1.getBinaryNodeChild)(result, 'usync');
|
|
38
40
|
//TODO: implement error backoff, refresh etc.
|
|
39
41
|
//TODO: see if there are any errors in the result node
|
|
40
42
|
//const resultNode = getBinaryNodeChild(usyncNode, 'result')
|
|
41
|
-
const listNode =
|
|
42
|
-
if (
|
|
43
|
-
queryResult.list = listNode.content.
|
|
44
|
-
const id = node
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
})
|
|
58
|
-
.filter(([, b]) => b !== null))
|
|
59
|
-
: {};
|
|
60
|
-
acc.push({ ...data, id });
|
|
61
|
-
}
|
|
62
|
-
return acc;
|
|
63
|
-
}, []);
|
|
43
|
+
const listNode = (0, WABinary_1.getBinaryNodeChild)(usyncNode, 'list');
|
|
44
|
+
if (Array.isArray(listNode === null || listNode === void 0 ? void 0 : listNode.content) && typeof listNode !== 'undefined') {
|
|
45
|
+
queryResult.list = listNode.content.map((node) => {
|
|
46
|
+
const id = node === null || node === void 0 ? void 0 : node.attrs.jid;
|
|
47
|
+
const data = Array.isArray(node === null || node === void 0 ? void 0 : node.content) ? Object.fromEntries(node.content.map((content) => {
|
|
48
|
+
const protocol = content.tag;
|
|
49
|
+
const parser = protocolMap[protocol];
|
|
50
|
+
if (parser) {
|
|
51
|
+
return [protocol, parser(content)];
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
return [protocol, null];
|
|
55
|
+
}
|
|
56
|
+
}).filter(([, b]) => b !== null)) : {};
|
|
57
|
+
return { ...data, id };
|
|
58
|
+
});
|
|
64
59
|
}
|
|
65
60
|
//TODO: implement side list
|
|
66
61
|
//const sideListNode = getBinaryNodeChild(usyncNode, 'side_list')
|
|
67
62
|
return queryResult;
|
|
68
63
|
}
|
|
69
64
|
withDeviceProtocol() {
|
|
70
|
-
this.protocols.push(new USyncDeviceProtocol());
|
|
65
|
+
this.protocols.push(new Protocols_1.USyncDeviceProtocol());
|
|
71
66
|
return this;
|
|
72
67
|
}
|
|
73
68
|
withContactProtocol() {
|
|
74
|
-
this.protocols.push(new USyncContactProtocol());
|
|
69
|
+
this.protocols.push(new Protocols_1.USyncContactProtocol());
|
|
75
70
|
return this;
|
|
76
71
|
}
|
|
77
72
|
withStatusProtocol() {
|
|
78
|
-
this.protocols.push(new USyncStatusProtocol());
|
|
73
|
+
this.protocols.push(new Protocols_1.USyncStatusProtocol());
|
|
79
74
|
return this;
|
|
80
75
|
}
|
|
81
76
|
withDisappearingModeProtocol() {
|
|
82
|
-
this.protocols.push(new USyncDisappearingModeProtocol());
|
|
77
|
+
this.protocols.push(new Protocols_1.USyncDisappearingModeProtocol());
|
|
83
78
|
return this;
|
|
84
79
|
}
|
|
85
80
|
withBotProfileProtocol() {
|
|
86
|
-
this.protocols.push(new USyncBotProfileProtocol());
|
|
81
|
+
this.protocols.push(new UsyncBotProfileProtocol_1.USyncBotProfileProtocol());
|
|
87
82
|
return this;
|
|
88
83
|
}
|
|
89
84
|
withLIDProtocol() {
|
|
90
|
-
this.protocols.push(new USyncLIDProtocol());
|
|
85
|
+
this.protocols.push(new UsyncLIDProtocol_1.USyncLIDProtocol());
|
|
91
86
|
return this;
|
|
92
87
|
}
|
|
93
88
|
}
|
|
94
|
-
|
|
89
|
+
exports.USyncQuery = USyncQuery;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
export declare class USyncUser {
|
|
2
|
-
id
|
|
3
|
-
lid
|
|
4
|
-
phone
|
|
5
|
-
type
|
|
6
|
-
personaId
|
|
2
|
+
id: string;
|
|
3
|
+
lid: string;
|
|
4
|
+
phone: string;
|
|
5
|
+
type: string;
|
|
6
|
+
personaId: string;
|
|
7
7
|
withId(id: string): this;
|
|
8
8
|
withLid(lid: string): this;
|
|
9
9
|
withPhone(phone: string): this;
|
|
10
10
|
withType(type: string): this;
|
|
11
11
|
withPersonaId(personaId: string): this;
|
|
12
12
|
}
|
|
13
|
-
//# sourceMappingURL=USyncUser.d.ts.map
|
package/lib/WAUSync/USyncUser.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.USyncUser = void 0;
|
|
4
|
+
class USyncUser {
|
|
2
5
|
withId(id) {
|
|
3
6
|
this.id = id;
|
|
4
7
|
return this;
|
|
@@ -20,4 +23,4 @@ export class USyncUser {
|
|
|
20
23
|
return this;
|
|
21
24
|
}
|
|
22
25
|
}
|
|
23
|
-
|
|
26
|
+
exports.USyncUser = USyncUser;
|
package/lib/WAUSync/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from './Protocols
|
|
2
|
-
export * from './USyncQuery
|
|
3
|
-
export * from './USyncUser
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './Protocols';
|
|
2
|
+
export * from './USyncQuery';
|
|
3
|
+
export * from './USyncUser';
|
package/lib/WAUSync/index.js
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Protocols"), exports);
|
|
18
|
+
__exportStar(require("./USyncQuery"), exports);
|
|
19
|
+
__exportStar(require("./USyncUser"), exports);
|
package/lib/index.d.ts
CHANGED
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import makeWASocket from './Socket/index.js';
|
|
12
|
-
export * from '../WAProto/index.js';
|
|
13
|
-
export * from './Utils/index.js';
|
|
14
|
-
export * from './Types/index.js';
|
|
15
|
-
export * from './Defaults/index.js';
|
|
16
|
-
export * from './WABinary/index.js';
|
|
17
|
-
export * from './WAM/index.js';
|
|
18
|
-
export * from './WAUSync/index.js';
|
|
1
|
+
import makeWASocket from './Socket';
|
|
2
|
+
export * from '../WAProto';
|
|
3
|
+
export * from './Utils';
|
|
4
|
+
export * from './Types';
|
|
5
|
+
export * from './Store';
|
|
6
|
+
export * from './Defaults';
|
|
7
|
+
export * from './WABinary';
|
|
8
|
+
export * from './WAM';
|
|
9
|
+
export * from './WAUSync';
|
|
19
10
|
export type WASocket = ReturnType<typeof makeWASocket>;
|
|
20
11
|
export { makeWASocket };
|
|
21
12
|
export default makeWASocket;
|
|
22
|
-
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.js
CHANGED
|
@@ -1,36 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export * from './Types/index.js';
|
|
5
|
-
export * from './Defaults/index.js';
|
|
6
|
-
export * from './WABinary/index.js';
|
|
7
|
-
export * from './WAM/index.js';
|
|
8
|
-
export * from './WAUSync/index.js';
|
|
9
|
-
export { makeWASocket };
|
|
10
|
-
export default makeWASocket;
|
|
11
|
-
|
|
12
|
-
import chalk from "chalk"
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const chalk = require("chalk");
|
|
13
4
|
|
|
14
5
|
console.log(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
chalk.yellowBright(`
|
|
7
|
+
✨ Celon Modified Baileys 2026 ✨
|
|
8
|
+
|
|
9
|
+
Hi, thank you for using my modified Baileys ^-^
|
|
10
|
+
Developer: @SupunFernando
|
|
18
11
|
|
|
19
|
-
@Mr-Supun-Fernando
|
|
12
|
+
@Mr-Supun-Fernando || SUPUN-MD || Dark Shadow Del Zep
|
|
20
13
|
\n`)
|
|
21
14
|
);
|
|
22
15
|
|
|
23
|
-
const prefix = chalk.blueBright("[BAILEYS SUPUN
|
|
16
|
+
const prefix = chalk.blueBright("[BAILEYS SUPUN MD]");
|
|
24
17
|
const time = () => chalk.redBright(`[${new Date().toLocaleTimeString("id-ID")}]`);
|
|
25
18
|
const methods = ["log", "info", "warn", "error", "debug", "trace"];
|
|
26
19
|
|
|
27
20
|
for (const method of methods) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
21
|
+
if (typeof console[method] === "function") {
|
|
22
|
+
const original = console[method].bind(console);
|
|
23
|
+
console[method] = (...args) => {
|
|
24
|
+
original(`${prefix} ${time()}`, ...args);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
34
27
|
}
|
|
35
28
|
|
|
36
|
-
|
|
29
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
30
|
+
if (k2 === undefined) k2 = k;
|
|
31
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
32
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
33
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
34
|
+
}
|
|
35
|
+
Object.defineProperty(o, k2, desc);
|
|
36
|
+
}) : (function(o, m, k, k2) {
|
|
37
|
+
if (k2 === undefined) k2 = k;
|
|
38
|
+
o[k2] = m[k];
|
|
39
|
+
}));
|
|
40
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
41
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
42
|
+
};
|
|
43
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
44
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
45
|
+
};
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
exports.makeWASocket = void 0;
|
|
48
|
+
const Socket_1 = __importDefault(require("./Socket"));
|
|
49
|
+
exports.makeWASocket = Socket_1.default;
|
|
50
|
+
__exportStar(require("../WAProto"), exports);
|
|
51
|
+
__exportStar(require("./Utils"), exports);
|
|
52
|
+
__exportStar(require("./Types"), exports);
|
|
53
|
+
__exportStar(require("./Store"), exports);
|
|
54
|
+
__exportStar(require("./Defaults"), exports);
|
|
55
|
+
__exportStar(require("./WABinary"), exports);
|
|
56
|
+
__exportStar(require("./WAM"), exports);
|
|
57
|
+
__exportStar(require("./WAUSync"), exports);
|
|
58
|
+
|
|
59
|
+
exports.default = Socket_1.default;
|
package/package.json
CHANGED
|
@@ -1,104 +1,114 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
"scripts": {
|
|
24
|
-
"build:all": "tsc && typedoc",
|
|
25
|
-
"build:docs": "typedoc",
|
|
26
|
-
"build:tsc": "tsc",
|
|
27
|
-
"changelog:last": "conventional-changelog -p angular -r 2",
|
|
28
|
-
"changelog:preview": "conventional-changelog -p angular -u",
|
|
29
|
-
"gen:protobuf": "sh WAProto/GenerateStatics.sh",
|
|
30
|
-
"lint": "eslint src --ext .js,.ts,.jsx,.tsx",
|
|
31
|
-
"lint:fix": "eslint src --fix --ext .js,.ts,.jsx,.tsx",
|
|
32
|
-
"prepack": "",
|
|
33
|
-
"prepare": "",
|
|
34
|
-
"preinstall": "node ./engine-requirements.js",
|
|
35
|
-
"release": "release-it",
|
|
36
|
-
"test": "jest"
|
|
37
|
-
},
|
|
38
|
-
"dependencies": {
|
|
39
|
-
"@cacheable/node-cache": "^1.4.0",
|
|
40
|
-
"@hapi/boom": "^9.1.3",
|
|
41
|
-
"async-mutex": "^0.5.0",
|
|
42
|
-
"libsignal": "git+https://github.com/whiskeysockets/libsignal-node",
|
|
43
|
-
"lru-cache": "^11.1.0",
|
|
44
|
-
"music-metadata": "^11.7.0",
|
|
45
|
-
"p-queue": "^9.0.0",
|
|
46
|
-
"pino": "^9.6",
|
|
47
|
-
"protobufjs": "^7.2.4",
|
|
48
|
-
"ws": "^8.13.0"
|
|
49
|
-
},
|
|
50
|
-
"devDependencies": {
|
|
51
|
-
"@eslint/eslintrc": "^3.3.1",
|
|
52
|
-
"@eslint/js": "^9.31.0",
|
|
53
|
-
"@types/jest": "^30.0.0",
|
|
54
|
-
"@types/node": "^20.9.0",
|
|
55
|
-
"@types/ws": "^8.0.0",
|
|
56
|
-
"@typescript-eslint/eslint-plugin": "^8",
|
|
57
|
-
"@typescript-eslint/parser": "^8",
|
|
58
|
-
"@whiskeysockets/eslint-config": "^1.0.0",
|
|
59
|
-
"conventional-changelog": "^7.1.1",
|
|
60
|
-
"conventional-changelog-angular": "^8.0.0",
|
|
61
|
-
"esbuild-register": "^3.6.0",
|
|
62
|
-
"eslint": "^9",
|
|
63
|
-
"eslint-config-prettier": "^10.1.2",
|
|
64
|
-
"eslint-plugin-prettier": "^5.4.0",
|
|
65
|
-
"jest": "^30.0.5",
|
|
66
|
-
"jimp": "^1.6.0",
|
|
67
|
-
"jiti": "^2.4.2",
|
|
68
|
-
"json": "^11.0.0",
|
|
69
|
-
"link-preview-js": "^3.0.0",
|
|
70
|
-
"lru-cache": "^11.1.0",
|
|
71
|
-
"open": "^8.4.2",
|
|
72
|
-
"pino-pretty": "^13.1.1",
|
|
73
|
-
"prettier": "^3.5.3",
|
|
74
|
-
"protobufjs-cli": "^1.1.3",
|
|
75
|
-
"release-it": "^15.10.3",
|
|
76
|
-
"ts-jest": "^29.4.0",
|
|
77
|
-
"tsc-esm-fix": "^3.1.2",
|
|
78
|
-
"tsx": "^4.20.3",
|
|
79
|
-
"typedoc": "^0.27.9",
|
|
80
|
-
"typedoc-plugin-markdown": "4.4.2",
|
|
81
|
-
"typescript": "^5.8.2"
|
|
82
|
-
},
|
|
83
|
-
"peerDependencies": {
|
|
84
|
-
"audio-decode": "^2.1.3",
|
|
85
|
-
"jimp": "^1.6.0",
|
|
86
|
-
"link-preview-js": "^3.0.0",
|
|
87
|
-
"sharp": "*"
|
|
88
|
-
},
|
|
89
|
-
"peerDependenciesMeta": {
|
|
90
|
-
"audio-decode": {
|
|
91
|
-
"optional": true
|
|
2
|
+
"name": "supunmd-bail",
|
|
3
|
+
"version": "2.1.4",
|
|
4
|
+
"description": "WhatsApp Web API Library",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"whatsapp",
|
|
7
|
+
"baileys",
|
|
8
|
+
"whatsapp-web",
|
|
9
|
+
"whatsapp-chat",
|
|
10
|
+
"whatsapp-group",
|
|
11
|
+
"whatsapp-bot",
|
|
12
|
+
"automation",
|
|
13
|
+
"whatsapp-api",
|
|
14
|
+
"baileys-mod",
|
|
15
|
+
"supun-md",
|
|
16
|
+
"supun-fernando",
|
|
17
|
+
"dtz",
|
|
18
|
+
"sri-lanka"
|
|
19
|
+
],
|
|
20
|
+
"homepage": "https://www.npmjs.com/package/mr-supun-fernando",
|
|
21
|
+
"repository": {
|
|
22
|
+
"url": "https://www.npmjs.com/package/supunmd-bail"
|
|
92
23
|
},
|
|
93
|
-
"
|
|
94
|
-
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"author": "Supun Fernando",
|
|
26
|
+
"main": "lib/index.js",
|
|
27
|
+
"types": "lib/index.d.ts",
|
|
28
|
+
"files": [
|
|
29
|
+
"lib/*",
|
|
30
|
+
"WAProto/*.js",
|
|
31
|
+
"engine-requirements.js"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build:all": "tsc && typedoc",
|
|
35
|
+
"build:docs": "typedoc",
|
|
36
|
+
"build:tsc": "tsc",
|
|
37
|
+
"changelog:last": "conventional-changelog -p angular -r 2",
|
|
38
|
+
"changelog:preview": "conventional-changelog -p angular -u",
|
|
39
|
+
"gen:protobuf": "sh WAProto/GenerateStatics.sh",
|
|
40
|
+
"lint": "eslint src --ext .js,.ts,.jsx,.tsx",
|
|
41
|
+
"lint:fix": "eslint src --fix --ext .js,.ts,.jsx,.tsx",
|
|
42
|
+
"prepack": "",
|
|
43
|
+
"prepare": "",
|
|
44
|
+
"preinstall": "node ./engine-requirements.js",
|
|
45
|
+
"release": "release-it",
|
|
46
|
+
"test": "jest"
|
|
95
47
|
},
|
|
96
|
-
"
|
|
97
|
-
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@adiwajshing/keyed-db": "^0.2.4",
|
|
50
|
+
"@hapi/boom": "^9.1.3",
|
|
51
|
+
"@cacheable/node-cache": "^1.4.0",
|
|
52
|
+
"async-mutex": "^0.5.0",
|
|
53
|
+
"audio-decode": "^2.1.3",
|
|
54
|
+
"axios": "^1.3.3",
|
|
55
|
+
"cache-manager": "4.0.1",
|
|
56
|
+
"chalk": "^4.1.2",
|
|
57
|
+
"futoin-hkdf": "^1.5.1",
|
|
58
|
+
"libphonenumber-js": "^1.10.20",
|
|
59
|
+
"lodash": "^4.17.21",
|
|
60
|
+
"libsignal": "npm:@shennmine/libsignal-node",
|
|
61
|
+
"music-metadata": "^7.12.3",
|
|
62
|
+
"node-cache": "^5.1.2",
|
|
63
|
+
"node-fetch": "^2.6.1",
|
|
64
|
+
"pino": "^7.0.0",
|
|
65
|
+
"protobufjs": "^7.2.4",
|
|
66
|
+
"uuid": "^9.0.0",
|
|
67
|
+
"ws": "^8.13.0"
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@adiwajshing/eslint-config": "github:adiwajshing/eslint-config",
|
|
71
|
+
"@types/got": "^9.6.11",
|
|
72
|
+
"@types/jest": "^27.5.1",
|
|
73
|
+
"@types/node": "^16.0.0",
|
|
74
|
+
"@types/sharp": "^0.29.4",
|
|
75
|
+
"@types/ws": "^8.0.0",
|
|
76
|
+
"conventional-changelog-cli": "^2.2.2",
|
|
77
|
+
"jest": "^27.0.6",
|
|
78
|
+
"jimp": "^0.16.1",
|
|
79
|
+
"link-preview-js": "^3.0.0",
|
|
80
|
+
"open": "^8.4.2",
|
|
81
|
+
"qrcode-terminal": "^0.12.0",
|
|
82
|
+
"release-it": "^15.10.3",
|
|
83
|
+
"sharp": "^0.34.5",
|
|
84
|
+
"ts-jest": "^27.0.3",
|
|
85
|
+
"ts-node": "^10.8.1",
|
|
86
|
+
"typedoc": "^0.24.7",
|
|
87
|
+
"typescript": "^4.6.4",
|
|
88
|
+
"json": "^11.0.0"
|
|
89
|
+
},
|
|
90
|
+
"peerDependencies": {
|
|
91
|
+
"jimp": "^0.16.1",
|
|
92
|
+
"link-preview-js": "^3.0.0",
|
|
93
|
+
"qrcode-terminal": "^0.12.0",
|
|
94
|
+
"sharp": "^0.34.5"
|
|
95
|
+
},
|
|
96
|
+
"peerDependenciesMeta": {
|
|
97
|
+
"jimp": {
|
|
98
|
+
"optional": true
|
|
99
|
+
},
|
|
100
|
+
"link-preview-js": {
|
|
101
|
+
"optional": true
|
|
102
|
+
},
|
|
103
|
+
"qrcode-terminal": {
|
|
104
|
+
"optional": true
|
|
105
|
+
},
|
|
106
|
+
"sharp": {
|
|
107
|
+
"optional": true
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"packageManager": "yarn@1.22.19",
|
|
111
|
+
"engines": {
|
|
112
|
+
"node": ">=20.0.0"
|
|
98
113
|
}
|
|
99
|
-
},
|
|
100
|
-
"packageManager": "yarn@4.9.2",
|
|
101
|
-
"engines": {
|
|
102
|
-
"node": ">=20.0.0"
|
|
103
|
-
}
|
|
104
114
|
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
yarn pbjs -t static-module --no-beautify -w es6 --no-bundle --no-delimited --no-verify --no-comments -o ./index.js ./WAProto.proto;
|
|
2
|
-
yarn pbjs -t static-module --no-beautify -w es6 --no-bundle --no-delimited --no-verify ./WAProto.proto | yarn pbts --no-comments -o ./index.d.ts -;
|
|
3
|
-
node ./fix-imports.js
|