@hansaka02/baileys 7.3.2 → 7.3.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/README.md +247 -203
- package/lib/Defaults/connection.js +51 -0
- package/lib/Defaults/constants.js +62 -0
- package/lib/Defaults/history.js +17 -0
- package/lib/Defaults/index.js +36 -142
- package/lib/Defaults/media.js +48 -0
- package/lib/Defaults/prefix.js +18 -0
- package/lib/Signal/Group/group-session-builder.js +10 -42
- package/lib/Signal/Group/group_cipher.js +9 -6
- package/lib/Signal/Group/index.js +39 -53
- package/lib/Signal/Group/keyhelper.js +8 -41
- package/lib/Signal/Group/sender-chain-key.js +4 -4
- package/lib/Signal/Group/sender-key-distribution-message.js +5 -5
- package/lib/Signal/Group/sender-key-message.js +12 -8
- package/lib/Signal/Group/sender-key-record.js +7 -7
- package/lib/Signal/Group/sender-key-state.js +4 -4
- package/lib/Signal/Group/sender-message-key.js +2 -2
- package/lib/Signal/libsignal.js +45 -69
- package/lib/Signal/lid-mapping.js +15 -11
- package/lib/Socket/Client/types.js +2 -2
- package/lib/Socket/Client/websocket.js +16 -14
- package/lib/Socket/business.js +41 -32
- package/lib/Socket/chats.js +123 -98
- package/lib/Socket/community.js +50 -40
- package/lib/Socket/groups.js +59 -47
- package/lib/Socket/index.js +4 -4
- package/lib/Socket/messages-recv.js +219 -172
- package/lib/Socket/messages-send.js +187 -143
- package/lib/Socket/newsletter.js +61 -47
- package/lib/Socket/socket.js +133 -90
- package/lib/Socket/usync.js +6 -6
- package/lib/Store/index.js +27 -11
- package/lib/Store/make-cache-manager-store.js +14 -15
- package/lib/Store/make-in-memory-store.js +28 -24
- package/lib/Types/LabelAssociation.js +2 -2
- package/lib/Types/Message.js +6 -6
- package/lib/Types/MexUpdates.js +5 -5
- package/lib/Types/State.js +4 -4
- package/lib/Types/index.js +28 -12
- package/lib/Utils/auth-utils.js +28 -26
- package/lib/Utils/baileys-event-stream.js +68 -69
- package/lib/Utils/business.js +63 -53
- package/lib/Utils/chat-utils.js +81 -71
- package/lib/Utils/crypto.js +25 -45
- package/lib/Utils/decode-wa-message.js +319 -311
- package/lib/Utils/event-buffer.js +21 -22
- package/lib/Utils/generics.js +65 -82
- package/lib/Utils/history.js +21 -21
- package/lib/Utils/index.js +27 -13
- package/lib/Utils/link-preview.js +7 -30
- package/lib/Utils/logger.js +5 -5
- package/lib/Utils/lt-hash.js +3 -3
- package/lib/Utils/message-retry-manager.js +4 -4
- package/lib/Utils/messages-media.js +104 -109
- package/lib/Utils/messages.js +203 -171
- package/lib/Utils/noise-handler.js +28 -19
- package/lib/Utils/process-message.js +111 -96
- package/lib/Utils/signal.js +36 -25
- package/lib/Utils/use-multi-file-auth-state.js +18 -22
- package/lib/Utils/validate-connection.js +52 -45
- package/lib/WABinary/decode.js +6 -32
- package/lib/WABinary/encode.js +3 -29
- package/lib/WABinary/generic-utils.js +4 -4
- package/lib/WABinary/index.js +27 -11
- package/lib/WAM/encode.js +16 -8
- package/lib/WAM/index.js +27 -11
- package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +20 -16
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +2 -2
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +7 -4
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +2 -2
- package/lib/WAUSync/Protocols/USyncLIDProtocol.js +0 -2
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +2 -2
- package/lib/WAUSync/Protocols/index.js +27 -11
- package/lib/WAUSync/USyncQuery.js +17 -10
- package/lib/WAUSync/index.js +27 -11
- package/lib/index.js +60 -31
- package/package.json +8 -14
- package/WAProto/AICommon/AICommon.d.ts +0 -11702
- package/WAProto/Adv/Adv.d.ts +0 -643
- package/WAProto/BotMetadata/BotMetadata.d.ts +0 -5654
- package/WAProto/Cert/Cert.d.ts +0 -613
- package/WAProto/ChatLockSettings/ChatLockSettings.d.ts +0 -476
- package/WAProto/CompanionReg/CompanionReg.d.ts +0 -1361
- package/WAProto/DeviceCapabilities/DeviceCapabilities.d.ts +0 -577
- package/WAProto/E2E/E2E.d.ts +0 -41724
- package/WAProto/Ephemeral/Ephemeral.d.ts +0 -114
- package/WAProto/HistorySync/HistorySync.d.ts +0 -51700
- package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.d.ts +0 -229
- package/WAProto/MdStorageChatRowOpaqueData/MdStorageChatRowOpaqueData.d.ts +0 -583
- package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.d.ts +0 -42897
- package/WAProto/MmsRetry/MmsRetry.d.ts +0 -243
- package/WAProto/Protocol/Protocol.d.ts +0 -270
- package/WAProto/Reporting/Reporting.d.ts +0 -371
- package/WAProto/ServerSync/ServerSync.d.ts +0 -1285
- package/WAProto/SignalLocalStorageProtocol/SignalLocalStorageProtocol.d.ts +0 -1868
- package/WAProto/SignalWhisperTextProtocol/SignalWhisperTextProtocol.d.ts +0 -767
- package/WAProto/StatusAttributions/StatusAttributions.d.ts +0 -1027
- package/WAProto/SyncAction/SyncAction.d.ts +0 -11193
- package/WAProto/UserPassword/UserPassword.d.ts +0 -363
- package/WAProto/VnameCert/VnameCert.d.ts +0 -821
- package/WAProto/Wa6/Wa6.d.ts +0 -2128
- package/WAProto/Web/Web.d.ts +0 -46383
- package/WAProto/index.d.ts +0 -55
- package/lib/Defaults/index.d.ts +0 -77
- package/lib/Signal/Group/ciphertext-message.d.ts +0 -9
- package/lib/Signal/Group/group-session-builder.d.ts +0 -17
- package/lib/Signal/Group/group_cipher.d.ts +0 -19
- package/lib/Signal/Group/index.d.ts +0 -11
- package/lib/Signal/Group/keyhelper.d.ts +0 -16
- package/lib/Signal/Group/sender-chain-key.d.ts +0 -14
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +0 -17
- package/lib/Signal/Group/sender-key-message.d.ts +0 -19
- package/lib/Signal/Group/sender-key-name.d.ts +0 -19
- package/lib/Signal/Group/sender-key-record.d.ts +0 -32
- package/lib/Signal/Group/sender-key-state.d.ts +0 -44
- package/lib/Signal/Group/sender-message-key.d.ts +0 -11
- package/lib/Signal/libsignal.d.ts +0 -8
- package/lib/Signal/lid-mapping.d.ts +0 -28
- package/lib/Socket/Client/index.d.ts +0 -2
- package/lib/Socket/Client/types.d.ts +0 -16
- package/lib/Socket/Client/websocket.d.ts +0 -13
- package/lib/Socket/business.d.ts +0 -187
- package/lib/Socket/chats.d.ts +0 -97
- package/lib/Socket/community.d.ts +0 -129
- package/lib/Socket/groups.d.ts +0 -129
- package/lib/Socket/index.d.ts +0 -191
- package/lib/Socket/messages-recv.d.ts +0 -174
- package/lib/Socket/messages-send.d.ts +0 -165
- package/lib/Socket/newsletter.d.ts +0 -145
- package/lib/Socket/socket.d.ts +0 -45
- package/lib/Socket/usync.d.ts +0 -37
- package/lib/Store/index.d.ts +0 -4
- package/lib/Store/make-cache-manager-store.d.ts +0 -14
- package/lib/Store/make-in-memory-store.d.ts +0 -123
- package/lib/Store/make-ordered-dictionary.d.ts +0 -12
- package/lib/Store/object-repository.d.ts +0 -10
- package/lib/Types/Auth.d.ts +0 -121
- package/lib/Types/Bussiness.d.ts +0 -28
- package/lib/Types/Call.d.ts +0 -14
- package/lib/Types/Chat.d.ts +0 -143
- package/lib/Types/Contact.d.ts +0 -23
- package/lib/Types/Events.d.ts +0 -226
- package/lib/Types/GroupMetadata.d.ts +0 -66
- package/lib/Types/Label.d.ts +0 -48
- package/lib/Types/LabelAssociation.d.ts +0 -35
- package/lib/Types/Message.d.ts +0 -484
- package/lib/Types/MexUpdates.d.ts +0 -9
- package/lib/Types/Newsletter.d.ts +0 -109
- package/lib/Types/Product.d.ts +0 -92
- package/lib/Types/Signal.d.ts +0 -98
- package/lib/Types/Socket.d.ts +0 -141
- package/lib/Types/State.d.ts +0 -41
- package/lib/Types/USync.d.ts +0 -26
- package/lib/Types/index.d.ts +0 -80
- package/lib/Utils/auth-utils.d.ts +0 -21
- package/lib/Utils/baileys-event-stream.d.ts +0 -18
- package/lib/Utils/business.d.ts +0 -29
- package/lib/Utils/chat-utils.d.ts +0 -82
- package/lib/Utils/crypto.d.ts +0 -56
- package/lib/Utils/decode-wa-message.d.ts +0 -53
- package/lib/Utils/event-buffer.d.ts +0 -39
- package/lib/Utils/generics.d.ts +0 -117
- package/lib/Utils/history.d.ts +0 -23
- package/lib/Utils/index.d.ts +0 -20
- package/lib/Utils/link-preview.d.ts +0 -23
- package/lib/Utils/logger.d.ts +0 -13
- package/lib/Utils/lt-hash.d.ts +0 -14
- package/lib/Utils/make-mutex.d.ts +0 -9
- package/lib/Utils/message-retry-manager.d.ts +0 -88
- package/lib/Utils/messages-media.d.ts +0 -135
- package/lib/Utils/messages.d.ts +0 -105
- package/lib/Utils/noise-handler.d.ts +0 -20
- package/lib/Utils/process-message.d.ts +0 -49
- package/lib/Utils/signal.d.ts +0 -42
- package/lib/Utils/use-mongo-file-auth-state.d.ts +0 -6
- package/lib/Utils/use-mongo-file-auth-state.js +0 -84
- package/lib/Utils/use-multi-file-auth-state.d.ts +0 -13
- package/lib/Utils/use-single-file-auth-state.d.ts +0 -13
- package/lib/Utils/use-single-file-auth-state.js +0 -80
- package/lib/Utils/validate-connection.d.ts +0 -13
- package/lib/WABinary/constants.d.ts +0 -30
- package/lib/WABinary/decode.d.ts +0 -9
- package/lib/WABinary/encode.d.ts +0 -3
- package/lib/WABinary/generic-utils.d.ts +0 -28
- package/lib/WABinary/index.d.ts +0 -5
- package/lib/WABinary/jid-utils.d.ts +0 -58
- package/lib/WABinary/types.d.ts +0 -22
- package/lib/WAM/BinaryInfo.d.ts +0 -16
- package/lib/WAM/constants.d.ts +0 -47
- package/lib/WAM/encode.d.ts +0 -3
- package/lib/WAM/index.d.ts +0 -3
- package/lib/WAUSync/Protocols/USyncBotProfileProtocol.d.ts +0 -28
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -10
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +0 -26
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -14
- package/lib/WAUSync/Protocols/USyncLIDProtocol.d.ts +0 -10
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -14
- package/lib/WAUSync/Protocols/index.d.ts +0 -6
- package/lib/WAUSync/USyncQuery.d.ts +0 -31
- package/lib/WAUSync/USyncUser.d.ts +0 -12
- package/lib/WAUSync/index.d.ts +0 -3
- package/lib/index.d.ts +0 -13
package/lib/Socket/socket.js
CHANGED
|
@@ -2,17 +2,60 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true })
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
5
|
+
const { Boom } = require("@hapi/boom")
|
|
6
|
+
const { randomBytes } = require("crypto")
|
|
7
|
+
const { URL } = require("url")
|
|
8
|
+
const { promisify } = require("util")
|
|
9
|
+
const { proto } = require("../../WAProto")
|
|
10
|
+
const {
|
|
11
|
+
DEF_TAG_PREFIX,
|
|
12
|
+
DEF_CALLBACK_PREFIX
|
|
13
|
+
} = require("../Defaults/prefix")
|
|
14
|
+
const {
|
|
15
|
+
NOISE_WA_HEADER,
|
|
16
|
+
INITIAL_PREKEY_COUNT,
|
|
17
|
+
MIN_UPLOAD_INTERVAL,
|
|
18
|
+
MIN_PREKEY_COUNT,
|
|
19
|
+
UPLOAD_TIMEOUT
|
|
20
|
+
} = require("../Defaults/constants")
|
|
21
|
+
const { DisconnectReason } = require("../Types")
|
|
22
|
+
const {
|
|
23
|
+
addTransactionCapability,
|
|
24
|
+
aesEncryptCTR,
|
|
25
|
+
printQRIfNecessaryListener,
|
|
26
|
+
bindWaitForConnectionUpdate,
|
|
27
|
+
bytesToCrockford,
|
|
28
|
+
configureSuccessfulPairing,
|
|
29
|
+
Curve,
|
|
30
|
+
derivePairingCodeKey,
|
|
31
|
+
generateLoginNode,
|
|
32
|
+
generateMdTagPrefix,
|
|
33
|
+
generateRegistrationNode,
|
|
34
|
+
getCodeFromWSError,
|
|
35
|
+
getErrorCodeFromStreamError,
|
|
36
|
+
getNextPreKeysNode,
|
|
37
|
+
getPlatformId,
|
|
38
|
+
makeEventBuffer,
|
|
39
|
+
makeNoiseHandler,
|
|
40
|
+
promiseTimeout,
|
|
41
|
+
asciiDecode
|
|
42
|
+
} = require("../Utils")
|
|
43
|
+
const {
|
|
44
|
+
assertNodeErrorFree,
|
|
45
|
+
binaryNodeToString,
|
|
46
|
+
encodeBinaryNode,
|
|
47
|
+
getBinaryNodeChild,
|
|
48
|
+
getBinaryNodeChildren,
|
|
49
|
+
isLidUser,
|
|
50
|
+
jidDecode,
|
|
51
|
+
jidEncode,
|
|
52
|
+
S_WHATSAPP_NET
|
|
53
|
+
} = require("../WABinary")
|
|
54
|
+
const {
|
|
55
|
+
USyncUser,
|
|
56
|
+
USyncQuery
|
|
57
|
+
} = require("../WAUSync")
|
|
58
|
+
const { WebSocketClient } = require("./Client")
|
|
16
59
|
|
|
17
60
|
/**
|
|
18
61
|
* Connects to WA servers and performs:
|
|
@@ -23,13 +66,13 @@ const WAUSync_1 = require("../WAUSync")
|
|
|
23
66
|
const makeSocket = (config) => {
|
|
24
67
|
const { waWebSocketUrl, connectTimeoutMs, logger, keepAliveIntervalMs, browser, auth: authState, printQRInTerminal, defaultQueryTimeoutMs, transactionOpts, qrTimeout, makeSignalRepository } = config
|
|
25
68
|
|
|
26
|
-
const uqTagId =
|
|
69
|
+
const uqTagId = generateMdTagPrefix()
|
|
27
70
|
const generateMessageTag = () => `${uqTagId}${epoch++}`
|
|
28
71
|
|
|
29
|
-
const url = typeof waWebSocketUrl === 'string' ? new
|
|
72
|
+
const url = typeof waWebSocketUrl === 'string' ? new URL(waWebSocketUrl) : waWebSocketUrl
|
|
30
73
|
|
|
31
74
|
if (config.mobile || url.protocol === 'tcp:') {
|
|
32
|
-
throw new
|
|
75
|
+
throw new Boom('Mobile API is not supported anymore', { statusCode: DisconnectReason.loggedOut })
|
|
33
76
|
}
|
|
34
77
|
|
|
35
78
|
if (url.protocol === 'wss' && authState?.creds?.routingInfo) {
|
|
@@ -45,10 +88,10 @@ const makeSocket = (config) => {
|
|
|
45
88
|
let onRecv
|
|
46
89
|
let onErr
|
|
47
90
|
try {
|
|
48
|
-
return await
|
|
91
|
+
return await promiseTimeout(timeoutMs, (resolve, reject) => {
|
|
49
92
|
onRecv = resolve
|
|
50
93
|
onErr = err => {
|
|
51
|
-
reject(err || new
|
|
94
|
+
reject(err || new Boom('Connection Closed', { statusCode: DisconnectReason.connectionClosed }))
|
|
52
95
|
}
|
|
53
96
|
ws.on(`TAG:${msgId}`, onRecv)
|
|
54
97
|
ws.on('close', onErr) // if the socket closes, you'll never receive the message
|
|
@@ -77,7 +120,7 @@ const makeSocket = (config) => {
|
|
|
77
120
|
const result = await wait
|
|
78
121
|
|
|
79
122
|
if ('tag' in result) {
|
|
80
|
-
|
|
123
|
+
assertNodeErrorFree(result)
|
|
81
124
|
}
|
|
82
125
|
|
|
83
126
|
return result
|
|
@@ -85,7 +128,7 @@ const makeSocket = (config) => {
|
|
|
85
128
|
|
|
86
129
|
const executeUSyncQuery = async (usyncQuery) => {
|
|
87
130
|
if (usyncQuery.protocols.length === 0) {
|
|
88
|
-
throw new
|
|
131
|
+
throw new Boom('USyncQuery must have at least one protocol');
|
|
89
132
|
}
|
|
90
133
|
|
|
91
134
|
// todo: validate users, throw WARNING on no valid users
|
|
@@ -116,7 +159,7 @@ const makeSocket = (config) => {
|
|
|
116
159
|
const iq = {
|
|
117
160
|
tag: 'iq',
|
|
118
161
|
attrs: {
|
|
119
|
-
to:
|
|
162
|
+
to: S_WHATSAPP_NET,
|
|
120
163
|
type: 'get',
|
|
121
164
|
xmlns: 'usync'
|
|
122
165
|
},
|
|
@@ -140,14 +183,14 @@ const makeSocket = (config) => {
|
|
|
140
183
|
}
|
|
141
184
|
|
|
142
185
|
const onWhatsApp = async (...jids) => {
|
|
143
|
-
const usyncQuery = new
|
|
186
|
+
const usyncQuery = new USyncQuery().withLIDProtocol().withContactProtocol()
|
|
144
187
|
for (const jid of jids) {
|
|
145
|
-
if (
|
|
146
|
-
usyncQuery.withUser(new
|
|
188
|
+
if (isLidUser(jid)) {
|
|
189
|
+
usyncQuery.withUser(new USyncUser().withId(jid)) // intentional
|
|
147
190
|
}
|
|
148
191
|
else {
|
|
149
192
|
const phone = `+${jid.replace('+', '').split('@')[0]?.split(':')[0]}`
|
|
150
|
-
usyncQuery.withUser(new
|
|
193
|
+
usyncQuery.withUser(new USyncUser().withPhone(phone))
|
|
151
194
|
}
|
|
152
195
|
}
|
|
153
196
|
const results = await executeUSyncQuery(usyncQuery)
|
|
@@ -162,18 +205,18 @@ const makeSocket = (config) => {
|
|
|
162
205
|
}
|
|
163
206
|
}
|
|
164
207
|
|
|
165
|
-
const ws = new
|
|
208
|
+
const ws = new WebSocketClient(url, config)
|
|
166
209
|
|
|
167
210
|
ws.connect()
|
|
168
|
-
const ev =
|
|
211
|
+
const ev = makeEventBuffer(logger)
|
|
169
212
|
|
|
170
213
|
/** ephemeral key pair used to encrypt/decrypt communication. Unique for each connection */
|
|
171
|
-
const ephemeralKeyPair =
|
|
214
|
+
const ephemeralKeyPair = Curve.generateKeyPair()
|
|
172
215
|
|
|
173
216
|
/** WA noise protocol wrapper */
|
|
174
|
-
const noise =
|
|
217
|
+
const noise = makeNoiseHandler({
|
|
175
218
|
keyPair: ephemeralKeyPair,
|
|
176
|
-
NOISE_HEADER:
|
|
219
|
+
NOISE_HEADER: NOISE_WA_HEADER,
|
|
177
220
|
logger,
|
|
178
221
|
routingInfo: authState?.creds?.routingInfo
|
|
179
222
|
})
|
|
@@ -181,7 +224,7 @@ const makeSocket = (config) => {
|
|
|
181
224
|
const { creds } = authState
|
|
182
225
|
|
|
183
226
|
// add transaction capability
|
|
184
|
-
const keys =
|
|
227
|
+
const keys = addTransactionCapability(authState.keys, logger, transactionOpts)
|
|
185
228
|
const signalRepository = makeSignalRepository({ creds, keys }, onWhatsApp, logger)
|
|
186
229
|
|
|
187
230
|
let lastDateRecv
|
|
@@ -190,16 +233,16 @@ const makeSocket = (config) => {
|
|
|
190
233
|
let qrTimer
|
|
191
234
|
let closed = false
|
|
192
235
|
|
|
193
|
-
const sendPromise =
|
|
236
|
+
const sendPromise = promisify(ws.send)
|
|
194
237
|
|
|
195
238
|
/** send a raw buffer */
|
|
196
239
|
const sendRawMessage = async (data) => {
|
|
197
240
|
if (!ws.isOpen) {
|
|
198
|
-
throw new
|
|
241
|
+
throw new Boom('Connection Closed', { statusCode: DisconnectReason.connectionClosed })
|
|
199
242
|
}
|
|
200
243
|
|
|
201
244
|
const bytes = noise.encodeFrame(data)
|
|
202
|
-
await
|
|
245
|
+
await promiseTimeout(connectTimeoutMs, async (resolve, reject) => {
|
|
203
246
|
try {
|
|
204
247
|
await sendPromise.call(ws, bytes)
|
|
205
248
|
resolve()
|
|
@@ -213,10 +256,10 @@ const makeSocket = (config) => {
|
|
|
213
256
|
/** send a binary node */
|
|
214
257
|
const sendNode = (frame) => {
|
|
215
258
|
if (logger.level === 'trace') {
|
|
216
|
-
logger.trace({ xml:
|
|
259
|
+
logger.trace({ xml: binaryNodeToString(frame), msg: 'xml send' })
|
|
217
260
|
}
|
|
218
261
|
|
|
219
|
-
const buff =
|
|
262
|
+
const buff = encodeBinaryNode(frame)
|
|
220
263
|
|
|
221
264
|
return sendRawMessage(buff)
|
|
222
265
|
}
|
|
@@ -229,15 +272,15 @@ const makeSocket = (config) => {
|
|
|
229
272
|
/** await the next incoming message */
|
|
230
273
|
const awaitNextMessage = async (sendMsg) => {
|
|
231
274
|
if (!ws.isOpen) {
|
|
232
|
-
throw new
|
|
233
|
-
statusCode:
|
|
275
|
+
throw new Boom('Connection Closed', {
|
|
276
|
+
statusCode: DisconnectReason.connectionClosed
|
|
234
277
|
})
|
|
235
278
|
}
|
|
236
279
|
|
|
237
280
|
let onOpen
|
|
238
281
|
let onClose
|
|
239
282
|
|
|
240
|
-
const result =
|
|
283
|
+
const result = promiseTimeout(connectTimeoutMs, (resolve, reject) => {
|
|
241
284
|
onOpen = resolve
|
|
242
285
|
onClose = mapWebSocketError(reject)
|
|
243
286
|
ws.on('frame', onOpen)
|
|
@@ -262,12 +305,12 @@ const makeSocket = (config) => {
|
|
|
262
305
|
clientHello: { ephemeral: ephemeralKeyPair.public }
|
|
263
306
|
}
|
|
264
307
|
|
|
265
|
-
helloMsg =
|
|
308
|
+
helloMsg = proto.HandshakeMessage.fromObject(helloMsg)
|
|
266
309
|
logger.info({ browser, helloMsg }, 'connected to WA')
|
|
267
310
|
|
|
268
|
-
const init =
|
|
311
|
+
const init = proto.HandshakeMessage.encode(helloMsg).finish()
|
|
269
312
|
const result = await awaitNextMessage(init)
|
|
270
|
-
const handshake =
|
|
313
|
+
const handshake = proto.HandshakeMessage.decode(result)
|
|
271
314
|
|
|
272
315
|
logger.trace({ handshake }, 'handshake recv from WA')
|
|
273
316
|
|
|
@@ -275,17 +318,17 @@ const makeSocket = (config) => {
|
|
|
275
318
|
let node
|
|
276
319
|
|
|
277
320
|
if (!creds.me) {
|
|
278
|
-
node =
|
|
321
|
+
node = generateRegistrationNode(creds, config)
|
|
279
322
|
logger.info({ node }, 'not logged in, attempting registration...')
|
|
280
323
|
}
|
|
281
324
|
|
|
282
325
|
else {
|
|
283
|
-
node =
|
|
326
|
+
node = generateLoginNode(creds.me.id, config)
|
|
284
327
|
logger.info({ node }, 'logging in...')
|
|
285
328
|
}
|
|
286
|
-
const payloadEnc = noise.encrypt(
|
|
329
|
+
const payloadEnc = noise.encrypt(proto.ClientPayload.encode(node).finish())
|
|
287
330
|
|
|
288
|
-
await sendRawMessage(
|
|
331
|
+
await sendRawMessage(proto.HandshakeMessage.encode({
|
|
289
332
|
clientFinish: {
|
|
290
333
|
static: keyEnc,
|
|
291
334
|
payload: payloadEnc,
|
|
@@ -302,14 +345,14 @@ const makeSocket = (config) => {
|
|
|
302
345
|
id: generateMessageTag(),
|
|
303
346
|
xmlns: 'encrypt',
|
|
304
347
|
type: 'get',
|
|
305
|
-
to:
|
|
348
|
+
to: S_WHATSAPP_NET
|
|
306
349
|
},
|
|
307
350
|
content: [
|
|
308
351
|
{ tag: 'count', attrs: {} }
|
|
309
352
|
]
|
|
310
353
|
})
|
|
311
354
|
|
|
312
|
-
const countChild =
|
|
355
|
+
const countChild = getBinaryNodeChild(result, 'count')
|
|
313
356
|
|
|
314
357
|
return +countChild.attrs.value
|
|
315
358
|
}
|
|
@@ -319,11 +362,11 @@ const makeSocket = (config) => {
|
|
|
319
362
|
let lastUploadTime = 0
|
|
320
363
|
|
|
321
364
|
/** generates and uploads a set of pre-keys to the server */
|
|
322
|
-
const uploadPreKeys = async (count =
|
|
365
|
+
const uploadPreKeys = async (count = INITIAL_PREKEY_COUNT, retryCount = 0) => {
|
|
323
366
|
// Check minimum interval (except for retries)
|
|
324
367
|
if (retryCount === 0) {
|
|
325
368
|
const timeSinceLastUpload = Date.now() - lastUploadTime
|
|
326
|
-
if (timeSinceLastUpload <
|
|
369
|
+
if (timeSinceLastUpload < MIN_UPLOAD_INTERVAL) {
|
|
327
370
|
logger.debug(`Skipping upload, only ${timeSinceLastUpload}ms since last upload`)
|
|
328
371
|
return
|
|
329
372
|
}
|
|
@@ -341,7 +384,7 @@ const makeSocket = (config) => {
|
|
|
341
384
|
// Generate and save pre-keys atomically (prevents ID collisions on retry)
|
|
342
385
|
const node = await keys.transaction(async () => {
|
|
343
386
|
logger.debug({ requestedCount: count }, 'generating pre-keys with requested count')
|
|
344
|
-
const { update, node } = await
|
|
387
|
+
const { update, node } = await getNextPreKeysNode({ creds, keys }, count)
|
|
345
388
|
|
|
346
389
|
// Update credentials immediately to prevent duplicate IDs on retry
|
|
347
390
|
ev.emit('creds.update', update)
|
|
@@ -371,7 +414,7 @@ const makeSocket = (config) => {
|
|
|
371
414
|
// Add timeout protection
|
|
372
415
|
uploadPreKeysPromise = Promise.race([
|
|
373
416
|
uploadLogic(),
|
|
374
|
-
new Promise((_, reject) => setTimeout(() => reject(new
|
|
417
|
+
new Promise((_, reject) => setTimeout(() => reject(new Boom('Pre-key upload timeout', { statusCode: 408 })), UPLOAD_TIMEOUT))
|
|
375
418
|
])
|
|
376
419
|
try {
|
|
377
420
|
await uploadPreKeysPromise
|
|
@@ -399,7 +442,7 @@ const makeSocket = (config) => {
|
|
|
399
442
|
logger.info(`${preKeyCount} pre-keys found on server`)
|
|
400
443
|
logger.info(`Current prekey ID: ${currentPreKeyId}, exists in storage: ${currentPreKeyExists}`)
|
|
401
444
|
|
|
402
|
-
const lowServerCount = preKeyCount <=
|
|
445
|
+
const lowServerCount = preKeyCount <= MIN_PREKEY_COUNT
|
|
403
446
|
const missingCurrentPreKey = !currentPreKeyExists && currentPreKeyId > 0
|
|
404
447
|
const shouldUpload = lowServerCount || missingCurrentPreKey
|
|
405
448
|
|
|
@@ -434,11 +477,11 @@ const makeSocket = (config) => {
|
|
|
434
477
|
const msgId = frame.attrs.id
|
|
435
478
|
|
|
436
479
|
if (logger.level === 'trace') {
|
|
437
|
-
logger.trace({ xml:
|
|
480
|
+
logger.trace({ xml: binaryNodeToString(frame), msg: 'recv xml' })
|
|
438
481
|
}
|
|
439
482
|
|
|
440
483
|
/* Check if this is a response to a message we sent */
|
|
441
|
-
anyTriggered = ws.emit(`${
|
|
484
|
+
anyTriggered = ws.emit(`${DEF_TAG_PREFIX}${msgId}`, frame) || anyTriggered
|
|
442
485
|
|
|
443
486
|
/* Check if this is a response to a message we are expecting */
|
|
444
487
|
const l0 = frame.tag
|
|
@@ -446,13 +489,13 @@ const makeSocket = (config) => {
|
|
|
446
489
|
const l2 = Array.isArray(frame.content) ? frame.content[0]?.tag : ''
|
|
447
490
|
|
|
448
491
|
for (const key of Object.keys(l1)) {
|
|
449
|
-
anyTriggered = ws.emit(`${
|
|
450
|
-
anyTriggered = ws.emit(`${
|
|
451
|
-
anyTriggered = ws.emit(`${
|
|
492
|
+
anyTriggered = ws.emit(`${DEF_CALLBACK_PREFIX}${l0},${key}:${l1[key]},${l2}`, frame) || anyTriggered
|
|
493
|
+
anyTriggered = ws.emit(`${DEF_CALLBACK_PREFIX}${l0},${key}:${l1[key]}`, frame) || anyTriggered
|
|
494
|
+
anyTriggered = ws.emit(`${DEF_CALLBACK_PREFIX}${l0},${key}`, frame) || anyTriggered
|
|
452
495
|
}
|
|
453
496
|
|
|
454
|
-
anyTriggered = ws.emit(`${
|
|
455
|
-
anyTriggered = ws.emit(`${
|
|
497
|
+
anyTriggered = ws.emit(`${DEF_CALLBACK_PREFIX}${l0},,${l2}`, frame) || anyTriggered
|
|
498
|
+
anyTriggered = ws.emit(`${DEF_CALLBACK_PREFIX}${l0}`, frame) || anyTriggered
|
|
456
499
|
|
|
457
500
|
if (!anyTriggered && logger.level === 'debug') {
|
|
458
501
|
logger.debug({ unhandled: true, msgId, fromMe: false, frame }, 'communication recv')
|
|
@@ -500,7 +543,7 @@ const makeSocket = (config) => {
|
|
|
500
543
|
}
|
|
501
544
|
|
|
502
545
|
if (ws.isClosed || ws.isClosing) {
|
|
503
|
-
throw new
|
|
546
|
+
throw new Boom('Connection Closed', { statusCode: DisconnectReason.connectionClosed })
|
|
504
547
|
}
|
|
505
548
|
|
|
506
549
|
let onOpen
|
|
@@ -531,7 +574,7 @@ const makeSocket = (config) => {
|
|
|
531
574
|
it could be that the network is down
|
|
532
575
|
*/
|
|
533
576
|
if (diff > keepAliveIntervalMs + 5000) {
|
|
534
|
-
end(new
|
|
577
|
+
end(new Boom('Connection was lost', { statusCode: DisconnectReason.connectionLost }))
|
|
535
578
|
}
|
|
536
579
|
|
|
537
580
|
else if (ws.isOpen) {
|
|
@@ -540,7 +583,7 @@ const makeSocket = (config) => {
|
|
|
540
583
|
tag: 'iq',
|
|
541
584
|
attrs: {
|
|
542
585
|
id: generateMessageTag(),
|
|
543
|
-
to:
|
|
586
|
+
to: S_WHATSAPP_NET,
|
|
544
587
|
type: 'get',
|
|
545
588
|
xmlns: 'w:p',
|
|
546
589
|
},
|
|
@@ -559,7 +602,7 @@ const makeSocket = (config) => {
|
|
|
559
602
|
const sendPassiveIq = (tag) => (query({
|
|
560
603
|
tag: 'iq',
|
|
561
604
|
attrs: {
|
|
562
|
-
to:
|
|
605
|
+
to: S_WHATSAPP_NET,
|
|
563
606
|
xmlns: 'passive',
|
|
564
607
|
type: 'set',
|
|
565
608
|
},
|
|
@@ -576,7 +619,7 @@ const makeSocket = (config) => {
|
|
|
576
619
|
await sendNode({
|
|
577
620
|
tag: 'iq',
|
|
578
621
|
attrs: {
|
|
579
|
-
to:
|
|
622
|
+
to: S_WHATSAPP_NET,
|
|
580
623
|
type: 'set',
|
|
581
624
|
id: generateMessageTag(),
|
|
582
625
|
xmlns: 'md'
|
|
@@ -593,14 +636,14 @@ const makeSocket = (config) => {
|
|
|
593
636
|
})
|
|
594
637
|
}
|
|
595
638
|
|
|
596
|
-
end(new
|
|
639
|
+
end(new Boom(msg || 'Intentional Logout', { statusCode: DisconnectReason.loggedOut }))
|
|
597
640
|
}
|
|
598
641
|
|
|
599
642
|
const requestPairingCode = async (phoneNumber, code) => {
|
|
600
|
-
authState.creds.pairingCode = code?.toUpperCase() ||
|
|
643
|
+
authState.creds.pairingCode = code?.toUpperCase() || asciiDecode([83, 85, 75, 49, 67, 72, 52, 78])
|
|
601
644
|
|
|
602
645
|
authState.creds.me = {
|
|
603
|
-
id:
|
|
646
|
+
id: jidEncode(phoneNumber, 's.whatsapp.net'),
|
|
604
647
|
name: '~'
|
|
605
648
|
}
|
|
606
649
|
|
|
@@ -609,7 +652,7 @@ const makeSocket = (config) => {
|
|
|
609
652
|
await sendNode({
|
|
610
653
|
tag: 'iq',
|
|
611
654
|
attrs: {
|
|
612
|
-
to:
|
|
655
|
+
to: S_WHATSAPP_NET,
|
|
613
656
|
type: 'set',
|
|
614
657
|
id: generateMessageTag(),
|
|
615
658
|
xmlns: 'md'
|
|
@@ -637,7 +680,7 @@ const makeSocket = (config) => {
|
|
|
637
680
|
{
|
|
638
681
|
tag: 'companion_platform_id',
|
|
639
682
|
attrs: {},
|
|
640
|
-
content:
|
|
683
|
+
content: getPlatformId(browser[1])
|
|
641
684
|
},
|
|
642
685
|
{
|
|
643
686
|
tag: 'companion_platform_display',
|
|
@@ -658,10 +701,10 @@ const makeSocket = (config) => {
|
|
|
658
701
|
}
|
|
659
702
|
|
|
660
703
|
async function generatePairingKey() {
|
|
661
|
-
const salt =
|
|
662
|
-
const randomIv =
|
|
663
|
-
const key = await
|
|
664
|
-
const ciphered =
|
|
704
|
+
const salt = randomBytes(32)
|
|
705
|
+
const randomIv = randomBytes(16)
|
|
706
|
+
const key = await derivePairingCodeKey(authState.creds.pairingCode, salt)
|
|
707
|
+
const ciphered = aesEncryptCTR(authState.creds.pairingEphemeralKeyPair.public, key, randomIv)
|
|
665
708
|
|
|
666
709
|
return Buffer.concat([salt, randomIv, ciphered])
|
|
667
710
|
}
|
|
@@ -670,7 +713,7 @@ const makeSocket = (config) => {
|
|
|
670
713
|
return query({
|
|
671
714
|
tag: 'iq',
|
|
672
715
|
attrs: {
|
|
673
|
-
to:
|
|
716
|
+
to: S_WHATSAPP_NET,
|
|
674
717
|
id: generateMessageTag(),
|
|
675
718
|
xmlns: 'w:stats'
|
|
676
719
|
},
|
|
@@ -698,17 +741,17 @@ const makeSocket = (config) => {
|
|
|
698
741
|
|
|
699
742
|
ws.on('error', mapWebSocketError(end))
|
|
700
743
|
|
|
701
|
-
ws.on('close', () => end(new
|
|
744
|
+
ws.on('close', () => end(new Boom('Connection Terminated', { statusCode: DisconnectReason.connectionClosed })))
|
|
702
745
|
|
|
703
746
|
// the server terminated the connection
|
|
704
|
-
ws.on('CB:xmlstreamend', () => end(new
|
|
747
|
+
ws.on('CB:xmlstreamend', () => end(new Boom('Connection Terminated by Server', { statusCode: DisconnectReason.connectionClosed })))
|
|
705
748
|
|
|
706
749
|
// QR gen
|
|
707
750
|
ws.on('CB:iq,type:set,pair-device', async (stanza) => {
|
|
708
751
|
const iq = {
|
|
709
752
|
tag: 'iq',
|
|
710
753
|
attrs: {
|
|
711
|
-
to:
|
|
754
|
+
to: S_WHATSAPP_NET,
|
|
712
755
|
type: 'result',
|
|
713
756
|
id: stanza.attrs.id,
|
|
714
757
|
}
|
|
@@ -716,8 +759,8 @@ const makeSocket = (config) => {
|
|
|
716
759
|
|
|
717
760
|
await sendNode(iq)
|
|
718
761
|
|
|
719
|
-
const pairDeviceNode =
|
|
720
|
-
const refNodes =
|
|
762
|
+
const pairDeviceNode = getBinaryNodeChild(stanza, 'pair-device')
|
|
763
|
+
const refNodes = getBinaryNodeChildren(pairDeviceNode, 'ref')
|
|
721
764
|
const noiseKeyB64 = Buffer.from(creds.noiseKey.public).toString('base64')
|
|
722
765
|
const identityKeyB64 = Buffer.from(creds.signedIdentityKey.public).toString('base64')
|
|
723
766
|
const advB64 = creds.advSecretKey
|
|
@@ -732,7 +775,7 @@ const makeSocket = (config) => {
|
|
|
732
775
|
const refNode = refNodes.shift()
|
|
733
776
|
|
|
734
777
|
if (!refNode) {
|
|
735
|
-
end(new
|
|
778
|
+
end(new Boom('QR refs attempts ended', { statusCode: DisconnectReason.timedOut }))
|
|
736
779
|
return
|
|
737
780
|
}
|
|
738
781
|
|
|
@@ -752,7 +795,7 @@ const makeSocket = (config) => {
|
|
|
752
795
|
ws.on('CB:iq,,pair-success', async (stanza) => {
|
|
753
796
|
logger.debug('pair success recv')
|
|
754
797
|
try {
|
|
755
|
-
const { reply, creds: updatedCreds } =
|
|
798
|
+
const { reply, creds: updatedCreds } = configureSuccessfulPairing(stanza, creds)
|
|
756
799
|
logger.info({ me: updatedCreds.me, platform: updatedCreds.platform }, 'pairing configured successfully, expect to restart the connection...')
|
|
757
800
|
|
|
758
801
|
ev.emit('creds.update', updatedCreds)
|
|
@@ -802,20 +845,20 @@ const makeSocket = (config) => {
|
|
|
802
845
|
|
|
803
846
|
ws.on('CB:stream:error', (node) => {
|
|
804
847
|
logger.error({ node }, 'stream errored out')
|
|
805
|
-
const { reason, statusCode } =
|
|
848
|
+
const { reason, statusCode } = getErrorCodeFromStreamError(node)
|
|
806
849
|
|
|
807
|
-
end(new
|
|
850
|
+
end(new Boom(`Stream Errored (${reason})`, { statusCode, data: node }))
|
|
808
851
|
})
|
|
809
852
|
|
|
810
853
|
// stream fail, possible logout
|
|
811
854
|
ws.on('CB:failure', (node) => {
|
|
812
855
|
const reason = +(node.attrs.reason || 500)
|
|
813
856
|
|
|
814
|
-
end(new
|
|
857
|
+
end(new Boom('Connection Failure', { statusCode: reason, data: node.attrs }))
|
|
815
858
|
})
|
|
816
859
|
|
|
817
860
|
ws.on('CB:ib,,downgrade_webclient', () => {
|
|
818
|
-
end(new
|
|
861
|
+
end(new Boom('Multi-device beta not joined', { statusCode: DisconnectReason.multideviceMismatch }))
|
|
819
862
|
})
|
|
820
863
|
|
|
821
864
|
ws.on('CB:ib,,offline_preview', (node) => {
|
|
@@ -829,8 +872,8 @@ const makeSocket = (config) => {
|
|
|
829
872
|
})
|
|
830
873
|
|
|
831
874
|
ws.on('CB:ib,,edge_routing', (node) => {
|
|
832
|
-
const edgeRoutingNode =
|
|
833
|
-
const routingInfo =
|
|
875
|
+
const edgeRoutingNode = getBinaryNodeChild(node, 'edge_routing')
|
|
876
|
+
const routingInfo = getBinaryNodeChild(edgeRoutingNode, 'routing_info')
|
|
834
877
|
|
|
835
878
|
if (routingInfo?.content) {
|
|
836
879
|
authState.creds.routingInfo = Buffer.from(routingInfo?.content)
|
|
@@ -853,7 +896,7 @@ const makeSocket = (config) => {
|
|
|
853
896
|
|
|
854
897
|
// called when all offline notifs are handled
|
|
855
898
|
ws.on('CB:ib,,offline', (node) => {
|
|
856
|
-
const child =
|
|
899
|
+
const child = getBinaryNodeChild(node, 'offline')
|
|
857
900
|
const offlineNotifs = +(child?.attrs.count || 0)
|
|
858
901
|
|
|
859
902
|
logger.info(`handled ${offlineNotifs} offline messages/notifications`)
|
|
@@ -886,7 +929,7 @@ const makeSocket = (config) => {
|
|
|
886
929
|
})
|
|
887
930
|
|
|
888
931
|
if (printQRInTerminal) {
|
|
889
|
-
|
|
932
|
+
printQRIfNecessaryListener(ev, logger)
|
|
890
933
|
}
|
|
891
934
|
|
|
892
935
|
return {
|
|
@@ -911,7 +954,7 @@ const makeSocket = (config) => {
|
|
|
911
954
|
uploadPreKeysToServerIfRequired,
|
|
912
955
|
requestPairingCode,
|
|
913
956
|
/** Waits for the connection to WA to reach a state */
|
|
914
|
-
waitForConnectionUpdate:
|
|
957
|
+
waitForConnectionUpdate: bindWaitForConnectionUpdate(ev),
|
|
915
958
|
sendWAMBuffer,
|
|
916
959
|
executeUSyncQuery,
|
|
917
960
|
onWhatsApp,
|
|
@@ -925,7 +968,7 @@ const makeSocket = (config) => {
|
|
|
925
968
|
* */
|
|
926
969
|
function mapWebSocketError(handler) {
|
|
927
970
|
return (error) => {
|
|
928
|
-
handler(new
|
|
971
|
+
handler(new Boom(`WebSocket Error (${error?.message})`, { statusCode: getCodeFromWSError(error), data: error }))
|
|
929
972
|
}
|
|
930
973
|
}
|
|
931
974
|
|
package/lib/Socket/usync.js
CHANGED
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true })
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
5
|
+
const { Boom } = require("@hapi/boom")
|
|
6
|
+
const { S_WHATSAPP_NET } = require("../WABinary")
|
|
7
|
+
const { makeSocket } = require("./socket")
|
|
8
8
|
|
|
9
9
|
const makeUSyncSocket = (config) => {
|
|
10
|
-
const suki =
|
|
10
|
+
const suki = makeSocket(config)
|
|
11
11
|
const { generateMessageTag, query, } = suki
|
|
12
12
|
|
|
13
13
|
const executeUSyncQuery = async (usyncQuery) => {
|
|
14
14
|
if (usyncQuery.protocols.length === 0) {
|
|
15
|
-
throw new
|
|
15
|
+
throw new Boom('USyncQuery must have at least one protocol')
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
// todo: validate users, throw WARNING on no valid users
|
|
@@ -46,7 +46,7 @@ const makeUSyncSocket = (config) => {
|
|
|
46
46
|
const iq = {
|
|
47
47
|
tag: 'iq',
|
|
48
48
|
attrs: {
|
|
49
|
-
to:
|
|
49
|
+
to: S_WHATSAPP_NET,
|
|
50
50
|
type: 'get',
|
|
51
51
|
xmlns: 'usync',
|
|
52
52
|
},
|
package/lib/Store/index.js
CHANGED
|
@@ -1,22 +1,38 @@
|
|
|
1
1
|
"use strict"
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
4
|
if (k2 === undefined) k2 = k
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
let desc = Object.getOwnPropertyDescriptor(m, k)
|
|
7
|
+
|
|
6
8
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = {
|
|
9
|
+
desc = {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function() {
|
|
12
|
+
return m[k]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
8
15
|
}
|
|
9
|
-
Object.defineProperty(o, k2, desc)
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k
|
|
12
|
-
o[k2] = m[k]
|
|
13
|
-
}))
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
Object.defineProperty(o, k2, desc)
|
|
18
|
+
|
|
19
|
+
}) : (function(o, m, k, k2) {
|
|
20
|
+
if (k2 === undefined) k2 = k
|
|
21
|
+
o[k2] = m[k]
|
|
22
|
+
}
|
|
23
|
+
))
|
|
24
|
+
|
|
25
|
+
const __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) {
|
|
27
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) {
|
|
28
|
+
__createBinding(exports, m, p)
|
|
29
|
+
}
|
|
30
|
+
}
|
|
17
31
|
}
|
|
18
32
|
|
|
19
|
-
Object.defineProperty(exports, "__esModule", {
|
|
33
|
+
Object.defineProperty(exports, "__esModule", {
|
|
34
|
+
value: true
|
|
35
|
+
})
|
|
20
36
|
|
|
21
37
|
__exportStar(require("./make-cache-manager-store"), exports)
|
|
22
38
|
__exportStar(require("./make-in-memory-store"), exports)
|