versacall-core-library-react 2.0.81-dev → 2.0.83-dev

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.
@@ -166,6 +166,7 @@ function decodeVarInt(buf, offset) {
166
166
  * Leaves any trailing incomplete bytes in receiveBuffer.
167
167
  */
168
168
  function drainBuffer() {
169
+ console.log('[vc-worker] drainBuffer called, buffer length:', receiveBuffer.length);
169
170
  let offset = 0;
170
171
  while (offset < receiveBuffer.length) {
171
172
  const firstByte = receiveBuffer[offset];
@@ -186,14 +187,12 @@ function drainBuffer() {
186
187
 
187
188
  /** Route a decoded MQTT packet to the appropriate handler. */
188
189
  function dispatchMqttPacket(type, flags, body) {
190
+ console.log('[vc-worker] dispatchMqttPacket type:', type, 'body length:', body.length);
189
191
  switch (type) {
190
192
  case 2:
191
193
  return onConnack(body);
192
- // CONNACK
193
194
  case 3:
194
195
  return onPublish(flags, body);
195
- // PUBLISH
196
- // SUBACK(9), UNSUBACK(11), PINGRESP(13) — acknowledged, nothing to do
197
196
  }
198
197
  }
199
198
 
@@ -229,6 +228,7 @@ function onConnack(body) {
229
228
  * forward it unchanged — ChannelsConsumer handlers will match as before.
230
229
  */
231
230
  function onPublish(flags, body) {
231
+ console.log('[vc-worker] onPublish called, body length:', body.length);
232
232
  if (body.length < 2) return;
233
233
  const topicLen = body[0] << 8 | body[1];
234
234
  if (2 + topicLen > body.length) return;
@@ -305,6 +305,7 @@ function openWebSocket(config) {
305
305
  pingIntervalId = setInterval(() => wsSend(PINGREQ), 25000);
306
306
  };
307
307
  ws.onmessage = ev => {
308
+ console.log('[vc-worker] WebSocket data received, bytes:', ev.data.byteLength);
308
309
  receiveBuffer = concat(receiveBuffer, new Uint8Array(ev.data));
309
310
  drainBuffer();
310
311
  };
package/package.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "versacall": {
3
3
  "title": "Versacall Core Library React",
4
4
  "applicationType": "react-library",
5
- "build": 81
5
+ "build": 83
6
6
  },
7
7
  "name": "versacall-core-library-react",
8
- "version": "2.0.81-dev",
8
+ "version": "2.0.83-dev",
9
9
  "description": "Versacall Core Library",
10
10
  "main": "dist/index.js",
11
11
  "module": "dist/index.js",