versacall-core-library-react 2.0.82-dev → 2.0.84-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.
@@ -187,14 +187,12 @@ function drainBuffer() {
187
187
 
188
188
  /** Route a decoded MQTT packet to the appropriate handler. */
189
189
  function dispatchMqttPacket(type, flags, body) {
190
+ console.log('[vc-worker] dispatchMqttPacket type:', type, 'body length:', body.length);
190
191
  switch (type) {
191
192
  case 2:
192
193
  return onConnack(body);
193
- // CONNACK
194
194
  case 3:
195
195
  return onPublish(flags, body);
196
- // PUBLISH
197
- // SUBACK(9), UNSUBACK(11), PINGRESP(13) — acknowledged, nothing to do
198
196
  }
199
197
  }
200
198
 
@@ -230,13 +228,17 @@ function onConnack(body) {
230
228
  * forward it unchanged — ChannelsConsumer handlers will match as before.
231
229
  */
232
230
  function onPublish(flags, body) {
231
+ console.log('[vc-worker] onPublish called, body length:', body.length);
233
232
  if (body.length < 2) return;
234
233
  const topicLen = body[0] << 8 | body[1];
235
234
  if (2 + topicLen > body.length) return;
236
235
  const topic = textDecoder.decode(body.slice(2, 2 + topicLen));
236
+ console.log('[vc-worker] topic:', topic);
237
237
  const qos = flags >> 1 & 0x03;
238
+ console.log('[vc-worker] qos:', qos);
238
239
  const payloadStart = 2 + topicLen + (qos > 0 ? 2 : 0);
239
240
  const payloadStr = textDecoder.decode(body.slice(payloadStart));
241
+ console.log('[vc-worker] payload first 200 chars:', payloadStr.substring(0, 200));
240
242
 
241
243
  // TEMPORARY DEBUG - remove after diagnosis
242
244
  ports.forEach(port => {
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": 82
5
+ "build": 84
6
6
  },
7
7
  "name": "versacall-core-library-react",
8
- "version": "2.0.82-dev",
8
+ "version": "2.0.84-dev",
9
9
  "description": "Versacall Core Library",
10
10
  "main": "dist/index.js",
11
11
  "module": "dist/index.js",