@nexustechpro/baileys 2.0.2 → 2.0.5
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 +924 -1299
- package/lib/Defaults/baileys-version.json +6 -2
- package/lib/Defaults/index.js +172 -172
- package/lib/Signal/libsignal.js +380 -292
- package/lib/Signal/lid-mapping.js +264 -171
- package/lib/Socket/Client/index.js +2 -2
- package/lib/Socket/Client/types.js +10 -10
- package/lib/Socket/Client/websocket.js +45 -310
- package/lib/Socket/business.js +375 -375
- package/lib/Socket/chats.js +909 -963
- package/lib/Socket/communities.js +430 -430
- package/lib/Socket/groups.js +342 -342
- package/lib/Socket/index.js +22 -22
- package/lib/Socket/messages-recv.js +777 -743
- package/lib/Socket/messages-send.js +295 -305
- package/lib/Socket/mex.js +50 -50
- package/lib/Socket/newsletter.js +148 -148
- package/lib/Socket/nexus-handler.js +75 -261
- package/lib/Socket/socket.js +709 -1201
- package/lib/Store/index.js +5 -5
- package/lib/Store/make-cache-manager-store.js +81 -81
- package/lib/Store/make-in-memory-store.js +416 -416
- package/lib/Store/make-ordered-dictionary.js +81 -81
- package/lib/Store/object-repository.js +30 -30
- package/lib/Types/Auth.js +1 -1
- package/lib/Types/Bussines.js +1 -1
- package/lib/Types/Call.js +1 -1
- package/lib/Types/Chat.js +7 -7
- package/lib/Types/Contact.js +1 -1
- package/lib/Types/Events.js +1 -1
- package/lib/Types/GroupMetadata.js +1 -1
- package/lib/Types/Label.js +24 -24
- package/lib/Types/LabelAssociation.js +6 -6
- package/lib/Types/Message.js +10 -10
- package/lib/Types/Newsletter.js +28 -28
- package/lib/Types/Product.js +1 -1
- package/lib/Types/Signal.js +1 -1
- package/lib/Types/Socket.js +2 -2
- package/lib/Types/State.js +12 -12
- package/lib/Types/USync.js +1 -1
- package/lib/Types/index.js +25 -25
- package/lib/Utils/auth-utils.js +264 -256
- package/lib/Utils/baileys-event-stream.js +55 -55
- package/lib/Utils/browser-utils.js +27 -27
- package/lib/Utils/business.js +228 -230
- package/lib/Utils/chat-utils.js +694 -764
- package/lib/Utils/crypto.js +109 -135
- package/lib/Utils/decode-wa-message.js +310 -314
- package/lib/Utils/event-buffer.js +547 -547
- package/lib/Utils/generics.js +297 -297
- package/lib/Utils/history.js +91 -83
- package/lib/Utils/index.js +21 -20
- package/lib/Utils/key-store.js +17 -0
- package/lib/Utils/link-preview.js +97 -98
- package/lib/Utils/logger.js +2 -2
- package/lib/Utils/lt-hash.js +47 -47
- package/lib/Utils/make-mutex.js +39 -39
- package/lib/Utils/message-retry-manager.js +148 -148
- package/lib/Utils/messages-media.js +534 -534
- package/lib/Utils/messages.js +705 -705
- package/lib/Utils/noise-handler.js +255 -255
- package/lib/Utils/pre-key-manager.js +105 -105
- package/lib/Utils/process-message.js +412 -412
- package/lib/Utils/signal.js +160 -158
- package/lib/Utils/use-multi-file-auth-state.js +120 -120
- package/lib/Utils/validate-connection.js +194 -194
- package/lib/WABinary/constants.js +1300 -1300
- package/lib/WABinary/decode.js +237 -237
- package/lib/WABinary/encode.js +232 -232
- package/lib/WABinary/generic-utils.js +252 -211
- package/lib/WABinary/index.js +5 -5
- package/lib/WABinary/jid-utils.js +279 -95
- package/lib/WABinary/types.js +1 -1
- package/lib/WAM/BinaryInfo.js +9 -9
- package/lib/WAM/constants.js +22852 -22852
- package/lib/WAM/encode.js +149 -149
- package/lib/WAM/index.js +3 -3
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +28 -28
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +53 -53
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +26 -26
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +37 -37
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +50 -50
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +28 -28
- package/lib/WAUSync/Protocols/index.js +4 -4
- package/lib/WAUSync/USyncQuery.js +93 -93
- package/lib/WAUSync/USyncUser.js +22 -22
- package/lib/WAUSync/index.js +3 -3
- package/lib/index.js +66 -66
- package/package.json +171 -144
- package/lib/Signal/Group/ciphertext-message.js +0 -12
- package/lib/Signal/Group/group-session-builder.js +0 -30
- package/lib/Signal/Group/group_cipher.js +0 -100
- package/lib/Signal/Group/index.js +0 -12
- package/lib/Signal/Group/keyhelper.js +0 -18
- package/lib/Signal/Group/sender-chain-key.js +0 -26
- package/lib/Signal/Group/sender-key-distribution-message.js +0 -63
- package/lib/Signal/Group/sender-key-message.js +0 -66
- package/lib/Signal/Group/sender-key-name.js +0 -48
- package/lib/Signal/Group/sender-key-record.js +0 -41
- package/lib/Signal/Group/sender-key-state.js +0 -84
- package/lib/Signal/Group/sender-message-key.js +0 -26
|
@@ -1,211 +1,252 @@
|
|
|
1
|
-
import { Boom } from '@hapi/boom';
|
|
2
|
-
import { proto } from '../../WAProto/index.js';
|
|
3
|
-
import {} from './types.js';
|
|
4
|
-
// some extra useful utilities
|
|
5
|
-
export const getBinaryNodeChildren = (node, childTag) => {
|
|
6
|
-
if (Array.isArray(node?.content)) {
|
|
7
|
-
return node.content.filter(item => item.tag === childTag);
|
|
8
|
-
}
|
|
9
|
-
return [];
|
|
10
|
-
};
|
|
11
|
-
export const getAllBinaryNodeChildren = ({ content }) => {
|
|
12
|
-
if (Array.isArray(content)) {
|
|
13
|
-
return content;
|
|
14
|
-
}
|
|
15
|
-
return [];
|
|
16
|
-
};
|
|
17
|
-
export const getBinaryNodeChild = (node, childTag) => {
|
|
18
|
-
if (Array.isArray(node?.content)) {
|
|
19
|
-
return node?.content.find(item => item.tag === childTag);
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
export const getBinaryNodeChildBuffer = (node, childTag) => {
|
|
23
|
-
const child = getBinaryNodeChild(node, childTag)?.content;
|
|
24
|
-
if (Buffer.isBuffer(child) || child instanceof Uint8Array) {
|
|
25
|
-
return child;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
//
|
|
29
|
-
export const getButtonArgs = (message) => {
|
|
30
|
-
const msgContent = message.viewOnceMessage?.message || message;
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
'
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
const
|
|
148
|
-
if (
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
1
|
+
import { Boom } from '@hapi/boom';
|
|
2
|
+
import { proto } from '../../WAProto/index.js';
|
|
3
|
+
import {} from './types.js';
|
|
4
|
+
// some extra useful utilities
|
|
5
|
+
export const getBinaryNodeChildren = (node, childTag) => {
|
|
6
|
+
if (Array.isArray(node?.content)) {
|
|
7
|
+
return node.content.filter(item => item.tag === childTag);
|
|
8
|
+
}
|
|
9
|
+
return [];
|
|
10
|
+
};
|
|
11
|
+
export const getAllBinaryNodeChildren = ({ content }) => {
|
|
12
|
+
if (Array.isArray(content)) {
|
|
13
|
+
return content;
|
|
14
|
+
}
|
|
15
|
+
return [];
|
|
16
|
+
};
|
|
17
|
+
export const getBinaryNodeChild = (node, childTag) => {
|
|
18
|
+
if (Array.isArray(node?.content)) {
|
|
19
|
+
return node?.content.find(item => item.tag === childTag);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
export const getBinaryNodeChildBuffer = (node, childTag) => {
|
|
23
|
+
const child = getBinaryNodeChild(node, childTag)?.content;
|
|
24
|
+
if (Buffer.isBuffer(child) || child instanceof Uint8Array) {
|
|
25
|
+
return child;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
// Returns the biz stanza nodes required for interactive/button messages
|
|
29
|
+
export const getButtonArgs = (message) => {
|
|
30
|
+
const msgContent = message.viewOnceMessage?.message || message;
|
|
31
|
+
const interactiveMsg = msgContent.interactiveMessage || msgContent.interactive;
|
|
32
|
+
const flowMsg = interactiveMsg?.nativeFlowMessage;
|
|
33
|
+
const btnFirst = flowMsg?.buttons?.[0]?.name;
|
|
34
|
+
|
|
35
|
+
const ts = Math.floor(Date.now() / 1000) - 77980457;
|
|
36
|
+
|
|
37
|
+
const order_response_name = {
|
|
38
|
+
review_and_pay: 'order_details',
|
|
39
|
+
review_order: 'order_status',
|
|
40
|
+
payment_info: 'payment_info',
|
|
41
|
+
payment_status: 'payment_status',
|
|
42
|
+
payment_method: 'payment_method'
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const flow_name = {
|
|
46
|
+
cta_catalog: 'cta_catalog',
|
|
47
|
+
mpm: 'mpm',
|
|
48
|
+
call_permission_request: 'call_permission_request',
|
|
49
|
+
call_request: 'call_permission_request',
|
|
50
|
+
view_catalog: 'automated_greeting_message_view_catalog',
|
|
51
|
+
automated_greeting_message_view_catalog: 'automated_greeting_message_view_catalog',
|
|
52
|
+
wa_pay_detail: 'wa_payment_transaction_details',
|
|
53
|
+
wa_payment_transaction_details: 'wa_payment_transaction_details',
|
|
54
|
+
send_location: 'send_location',
|
|
55
|
+
open_webview: 'open_webview',
|
|
56
|
+
galaxy_message: 'galaxy_message',
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// Order response buttons
|
|
60
|
+
if (btnFirst && order_response_name[btnFirst]) {
|
|
61
|
+
return [{
|
|
62
|
+
tag: 'biz',
|
|
63
|
+
attrs: {
|
|
64
|
+
native_flow_name: order_response_name[btnFirst]
|
|
65
|
+
},
|
|
66
|
+
content: []
|
|
67
|
+
}];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Interactive / native flow buttons
|
|
71
|
+
if (flowMsg || msgContent.buttonsMessage) {
|
|
72
|
+
const name = (btnFirst && flow_name[btnFirst]) ? flow_name[btnFirst] : 'mixed';
|
|
73
|
+
return [{
|
|
74
|
+
tag: 'biz',
|
|
75
|
+
attrs: {
|
|
76
|
+
actual_actors: '2',
|
|
77
|
+
host_storage: '2',
|
|
78
|
+
privacy_mode_ts: `${ts}`
|
|
79
|
+
},
|
|
80
|
+
content: [{
|
|
81
|
+
tag: 'engagement',
|
|
82
|
+
attrs: {
|
|
83
|
+
customer_service_state: 'open',
|
|
84
|
+
conversation_state: 'open'
|
|
85
|
+
}
|
|
86
|
+
}, {
|
|
87
|
+
tag: 'interactive',
|
|
88
|
+
attrs: {
|
|
89
|
+
type: 'native_flow',
|
|
90
|
+
v: '1'
|
|
91
|
+
},
|
|
92
|
+
content: [{
|
|
93
|
+
tag: 'native_flow',
|
|
94
|
+
attrs: {
|
|
95
|
+
v: '9',
|
|
96
|
+
name: name,
|
|
97
|
+
},
|
|
98
|
+
content: []
|
|
99
|
+
}]
|
|
100
|
+
}]
|
|
101
|
+
}];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// List messages
|
|
105
|
+
if (msgContent.listMessage) {
|
|
106
|
+
return [{
|
|
107
|
+
tag: 'biz',
|
|
108
|
+
attrs: {
|
|
109
|
+
actual_actors: '2',
|
|
110
|
+
host_storage: '2',
|
|
111
|
+
privacy_mode_ts: `${ts}`
|
|
112
|
+
},
|
|
113
|
+
content: [{
|
|
114
|
+
tag: 'engagement',
|
|
115
|
+
attrs: {
|
|
116
|
+
customer_service_state: 'open',
|
|
117
|
+
conversation_state: 'open'
|
|
118
|
+
}
|
|
119
|
+
}]
|
|
120
|
+
}];
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Fallback
|
|
124
|
+
return [{
|
|
125
|
+
tag: 'biz',
|
|
126
|
+
attrs: {
|
|
127
|
+
actual_actors: '2',
|
|
128
|
+
host_storage: '2',
|
|
129
|
+
privacy_mode_ts: `${ts}`
|
|
130
|
+
},
|
|
131
|
+
content: [{
|
|
132
|
+
tag: 'engagement',
|
|
133
|
+
attrs: {
|
|
134
|
+
customer_service_state: 'open',
|
|
135
|
+
conversation_state: 'open'
|
|
136
|
+
}
|
|
137
|
+
}]
|
|
138
|
+
}];
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
// Add button type detection helper
|
|
142
|
+
export const getButtonType = (message) => {
|
|
143
|
+
if (message.listMessage) return 'list';
|
|
144
|
+
if (message.buttonsMessage) return 'buttons';
|
|
145
|
+
|
|
146
|
+
// Check both interactiveMessage and interactive keys
|
|
147
|
+
const interactiveMsg = message.interactiveMessage || message.interactive;
|
|
148
|
+
if (!interactiveMsg?.nativeFlowMessage) return null;
|
|
149
|
+
|
|
150
|
+
const btn = interactiveMsg?.nativeFlowMessage?.buttons?.[0]?.name;
|
|
151
|
+
if (['review_and_pay', 'review_order', 'payment_info', 'payment_status', 'payment_method'].includes(btn)) {
|
|
152
|
+
return btn;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Return 'interactive' for ANY native flow message that has buttons or nativeFlowMessage
|
|
156
|
+
if (interactiveMsg?.nativeFlowMessage?.buttons?.length || interactiveMsg?.nativeFlowMessage) {
|
|
157
|
+
return 'interactive';
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return null;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
export const getBinaryNodeChildString = (node, childTag) => {
|
|
164
|
+
const child = getBinaryNodeChild(node, childTag)?.content;
|
|
165
|
+
if (Buffer.isBuffer(child) || child instanceof Uint8Array) {
|
|
166
|
+
return Buffer.from(child).toString('utf-8');
|
|
167
|
+
}
|
|
168
|
+
else if (typeof child === 'string') {
|
|
169
|
+
return child;
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
export const getBinaryFilteredButtons = (nodeContent) => {
|
|
173
|
+
if (!Array.isArray(nodeContent)) return false
|
|
174
|
+
|
|
175
|
+
return nodeContent.some(a =>
|
|
176
|
+
['native_flow'].includes(a?.content?.[0]?.content?.[0]?.tag) ||
|
|
177
|
+
['interactive', 'buttons', 'list'].includes(a?.content?.[0]?.tag) ||
|
|
178
|
+
['hsm', 'biz'].includes(a?.tag)
|
|
179
|
+
)
|
|
180
|
+
}
|
|
181
|
+
export const getBinaryNodeChildUInt = (node, childTag, length) => {
|
|
182
|
+
const buff = getBinaryNodeChildBuffer(node, childTag);
|
|
183
|
+
if (buff) {
|
|
184
|
+
return bufferToUInt(buff, length);
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
export const assertNodeErrorFree = (node) => {
|
|
188
|
+
const errNode = getBinaryNodeChild(node, 'error');
|
|
189
|
+
if (errNode) {
|
|
190
|
+
const errorCode = +errNode.attrs.code;
|
|
191
|
+
if (errorCode === 429) {
|
|
192
|
+
const error = new Boom('Rate limit', { data: 429 });
|
|
193
|
+
error.isRateLimit = true;
|
|
194
|
+
throw error;
|
|
195
|
+
}
|
|
196
|
+
throw new Boom(errNode.attrs.text || 'Unknown error', { data: errorCode });
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
export const reduceBinaryNodeToDictionary = (node, tag) => {
|
|
200
|
+
const nodes = getBinaryNodeChildren(node, tag);
|
|
201
|
+
const dict = nodes.reduce((dict, { attrs }) => {
|
|
202
|
+
if (typeof attrs.name === 'string') {
|
|
203
|
+
dict[attrs.name] = attrs.value || attrs.config_value;
|
|
204
|
+
}
|
|
205
|
+
else {
|
|
206
|
+
dict[attrs.config_code] = attrs.value || attrs.config_value;
|
|
207
|
+
}
|
|
208
|
+
return dict;
|
|
209
|
+
}, {});
|
|
210
|
+
return dict;
|
|
211
|
+
};
|
|
212
|
+
export const getBinaryNodeMessages = ({ content }) => {
|
|
213
|
+
const msgs = [];
|
|
214
|
+
if (Array.isArray(content)) {
|
|
215
|
+
for (const item of content) {
|
|
216
|
+
if (item.tag === 'message') {
|
|
217
|
+
msgs.push(proto.WebMessageInfo.decode(item.content).toJSON());
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
return msgs;
|
|
222
|
+
};
|
|
223
|
+
function bufferToUInt(e, t) {
|
|
224
|
+
let a = 0;
|
|
225
|
+
for (let i = 0; i < t; i++) {
|
|
226
|
+
a = 256 * a + e[i];
|
|
227
|
+
}
|
|
228
|
+
return a;
|
|
229
|
+
}
|
|
230
|
+
const tabs = (n) => '\t'.repeat(n);
|
|
231
|
+
export function binaryNodeToString(node, i = 0) {
|
|
232
|
+
if (!node) {
|
|
233
|
+
return node;
|
|
234
|
+
}
|
|
235
|
+
if (typeof node === 'string') {
|
|
236
|
+
return tabs(i) + node;
|
|
237
|
+
}
|
|
238
|
+
if (node instanceof Uint8Array) {
|
|
239
|
+
return tabs(i) + Buffer.from(node).toString('hex');
|
|
240
|
+
}
|
|
241
|
+
if (Array.isArray(node)) {
|
|
242
|
+
return node.map(x => tabs(i + 1) + binaryNodeToString(x, i + 1)).join('\n');
|
|
243
|
+
}
|
|
244
|
+
const children = binaryNodeToString(node.content, i + 1);
|
|
245
|
+
const tag = `<${node.tag} ${Object.entries(node.attrs || {})
|
|
246
|
+
.filter(([, v]) => v !== undefined)
|
|
247
|
+
.map(([k, v]) => `${k}='${v}'`)
|
|
248
|
+
.join(' ')}`;
|
|
249
|
+
const content = children ? `>\n${children}\n${tabs(i)}</${node.tag}>` : '/>';
|
|
250
|
+
return tag + content;
|
|
251
|
+
}
|
|
252
|
+
//# sourceMappingURL=generic-utils.js.map
|
package/lib/WABinary/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './encode.js';
|
|
2
|
-
export * from './decode.js';
|
|
3
|
-
export * from './generic-utils.js';
|
|
4
|
-
export * from './jid-utils.js';
|
|
5
|
-
export * from './types.js';
|
|
1
|
+
export * from './encode.js';
|
|
2
|
+
export * from './decode.js';
|
|
3
|
+
export * from './generic-utils.js';
|
|
4
|
+
export * from './jid-utils.js';
|
|
5
|
+
export * from './types.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|