@openfeed/sdk-js 1.6.4 → 1.6.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.
@@ -1 +1 @@
1
- export declare const version = "1.6.4";
1
+ export declare const version = "1.6.5";
package/dist/index.js CHANGED
@@ -8675,10 +8675,12 @@ function send(socket, message) {
8675
8675
  const getShort = (a, b) => a << 8 | b << 0;
8676
8676
  function* decodeMessages(bytes) {
8677
8677
  let currentIndex = 0;
8678
- while (getShort(bytes[currentIndex], bytes[currentIndex + 1])) {
8679
- const shortVal = getShort(bytes[currentIndex], bytes[currentIndex + 1]) + 2;
8680
- const currentArray = bytes.subarray(currentIndex + 2, currentIndex + shortVal);
8681
- currentIndex += shortVal;
8678
+ while (currentIndex < bytes.length) {
8679
+ const len = getShort(bytes[currentIndex], bytes[currentIndex + 1]);
8680
+ if (len === 0) break;
8681
+ const total = len + 2;
8682
+ const currentArray = bytes.subarray(currentIndex + 2, currentIndex + total);
8683
+ currentIndex += total;
8682
8684
  yield OpenfeedGatewayMessageDecode.decode(currentArray);
8683
8685
  }
8684
8686
  }
@@ -9003,7 +9005,7 @@ class OpenFeedConnection {
9003
9005
  whenDisconnected = () => this.whenDisconnectedSource.whenCompleted;
9004
9006
  dispose = () => this.disconnect(new ConnectionDisposedError("Disposed"));
9005
9007
  }
9006
- const version = "1.6.4";
9008
+ const version = "1.6.5";
9007
9009
  const getClientVersion = async (clientId) => {
9008
9010
  let platformDescription;
9009
9011
  if (typeof window !== "undefined") {
package/dist/node.js CHANGED
@@ -12363,10 +12363,12 @@ function send(socket, message) {
12363
12363
  var getShort = (a, b) => a << 8 | b << 0;
12364
12364
  function* decodeMessages(bytes) {
12365
12365
  let currentIndex = 0;
12366
- while (getShort(bytes[currentIndex], bytes[currentIndex + 1])) {
12367
- const shortVal = getShort(bytes[currentIndex], bytes[currentIndex + 1]) + 2;
12368
- const currentArray = bytes.subarray(currentIndex + 2, currentIndex + shortVal);
12369
- currentIndex += shortVal;
12366
+ while (currentIndex < bytes.length) {
12367
+ const len = getShort(bytes[currentIndex], bytes[currentIndex + 1]);
12368
+ if (len === 0) break;
12369
+ const total = len + 2;
12370
+ const currentArray = bytes.subarray(currentIndex + 2, currentIndex + total);
12371
+ currentIndex += total;
12370
12372
  yield OpenfeedGatewayMessageDecode.decode(currentArray);
12371
12373
  }
12372
12374
  }
@@ -12706,7 +12708,7 @@ var OpenFeedConnection = class {
12706
12708
  };
12707
12709
 
12708
12710
  // generated/version.ts
12709
- var version = "1.6.4";
12711
+ var version = "1.6.5";
12710
12712
 
12711
12713
  // src/utilities/client_version.ts
12712
12714
  var getClientVersion = async (clientId) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfeed/sdk-js",
3
- "version": "1.6.4",
3
+ "version": "1.6.5",
4
4
  "description": "JavaScript SDK for Barchart OpenFeed",
5
5
  "main": "dist/node.js",
6
6
  "browser": "dist/index.js",