@synnaxlabs/client 0.17.5 → 0.17.6

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,5 +1,5 @@
1
1
 
2
- > @synnaxlabs/client@0.17.5 build /home/runner/work/synnax/synnax/client/ts
2
+ > @synnaxlabs/client@0.17.6 build /home/runner/work/synnax/synnax/client/ts
3
3
  > tsc --noEmit && vite build
4
4
 
5
5
  vite v5.1.2 building for production...
@@ -10,7 +10,7 @@ rendering chunks...
10
10
  [vite:dts] Start generate declaration files...
11
11
  computing gzip size...
12
12
  dist/client.js 536.96 kB │ gzip: 118.20 kB │ map: 1,206.15 kB
13
- [vite:dts] Declaration files built in 3761ms.
13
+ [vite:dts] Declaration files built in 3722ms.
14
14
  
15
15
  dist/client.cjs 354.67 kB │ gzip: 93.49 kB │ map: 1,151.00 kB
16
- ✓ built in 5.36s
16
+ ✓ built in 5.25s
@@ -32,12 +32,7 @@ const streamer = await client.telem.newStreamer(read_from);
32
32
  try {
33
33
  // Loop through the frames in the streamer. Each iteration will block until a new
34
34
  // frame is available, and then we'll just print it out.
35
- for await (const frame of streamer)
36
- console.log({
37
- time: new TimeStamp(frame.get("stream_write_example_time")[0].at(0)).toString(),
38
- data1: frame.get("stream_write_example_data_1")[0].at(0),
39
- data2: frame.get("stream_write_example_data_2")[0].at(0)
40
- })
35
+ for await (const frame of streamer) console.log(frame.latest());
41
36
  } finally {
42
37
  streamer.close();
43
38
  // Close the client when we're done with it.
@@ -9,7 +9,7 @@
9
9
  "version": "1.0.0",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
- "@synnaxlabs/client": "^0.17.4"
12
+ "@synnaxlabs/client": "^0.17.5"
13
13
  }
14
14
  },
15
15
  "node_modules/@grpc/grpc-js": {
@@ -3653,9 +3653,9 @@
3653
3653
  }
3654
3654
  },
3655
3655
  "node_modules/@synnaxlabs/client": {
3656
- "version": "0.17.4",
3657
- "resolved": "https://registry.npmjs.org/@synnaxlabs/client/-/client-0.17.4.tgz",
3658
- "integrity": "sha512-fQ2VvuHMI43BO3x2E7Nl51ZhBOyMbSWeGrid/+TkGNVYyyhVh8oDQE0O5n5mRr6h+kLeKwAv3fH84zDQXTow6w==",
3656
+ "version": "0.17.5",
3657
+ "resolved": "https://registry.npmjs.org/@synnaxlabs/client/-/client-0.17.5.tgz",
3658
+ "integrity": "sha512-HyQ/lzX4lekh5pg84A59tNjMHAYact3uvV+DUUJma+C3w4fgl4hT0U1DZ3IABiI02pNJEaiahMszg+2E9g358A==",
3659
3659
  "dependencies": {
3660
3660
  "@synnaxlabs/freighter": "0.9.2",
3661
3661
  "@synnaxlabs/x": "0.14.2",
@@ -11,6 +11,6 @@
11
11
  "author": "",
12
12
  "license": "ISC",
13
13
  "dependencies": {
14
- "@synnaxlabs/client": "^0.17.4"
14
+ "@synnaxlabs/client": "^0.17.5"
15
15
  }
16
16
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@synnaxlabs/client",
3
3
  "private": false,
4
- "version": "0.17.5",
4
+ "version": "0.17.6",
5
5
  "type": "module",
6
6
  "description": "The Client Library for Synnax",
7
7
  "repository": "https://github.com/synnaxlabs/synnax/tree/main/client/ts",
@@ -372,5 +372,32 @@ describe("framer.Frame", () => {
372
372
  );
373
373
  expect(f.latest()).toEqual({ 12: 6, 13: 7 });
374
374
  });
375
+
376
+ it("should not add a key if no samples exist for the channel", () => {
377
+ const f = new framer.Frame(
378
+ new Map([
379
+ [
380
+ 12,
381
+ [
382
+ new Series({
383
+ data: new Float32Array([1, 2, 3]),
384
+ timeRange: new TimeRange(40, 50000),
385
+ }),
386
+ ],
387
+ ],
388
+ [
389
+ 13,
390
+ [
391
+ new Series({
392
+ data: new Float32Array([1, 2, 3]),
393
+ timeRange: new TimeRange(500, 50001),
394
+ }),
395
+ ],
396
+ ],
397
+ [14, []],
398
+ ]),
399
+ );
400
+ expect(f.latest()).toEqual({ 12: 3, 13: 3 });
401
+ });
375
402
  });
376
403
  });