@synnaxlabs/client 0.16.3 → 0.16.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/.turbo/turbo-build.log +10 -10
- package/dist/client.cjs +1 -1
- package/dist/client.cjs.map +1 -1
- package/dist/client.js +7 -3
- package/dist/client.js.map +1 -1
- package/examples/node/basicReadWriter.js +37 -0
- package/examples/node/package-lock.json +4961 -0
- package/examples/{package.json → node/package.json} +5 -5
- package/package.json +5 -5
- package/src/connection/checker.ts +5 -1
- package/src/framer/client.ts +6 -2
- package/.pytest_cache/README.md +0 -8
- package/examples/index.js +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "examples",
|
|
3
|
-
"type":"module",
|
|
3
|
+
"type": "module",
|
|
4
4
|
"version": "1.0.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"main": "node index.js"
|
|
9
9
|
},
|
|
10
|
-
"dependencies": {
|
|
11
|
-
"@synnaxlabs/client": "workspace:*"
|
|
12
|
-
},
|
|
13
10
|
"keywords": [],
|
|
14
11
|
"author": "",
|
|
15
|
-
"license": "ISC"
|
|
12
|
+
"license": "ISC",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@synnaxlabs/client": "^0.16.3"
|
|
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.16.
|
|
4
|
+
"version": "0.16.4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "The Client Library for Synnax",
|
|
7
7
|
"repository": "https://github.com/synnaxlabs/synnax/tree/main/client/ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"async-mutex": "^0.4.0",
|
|
20
20
|
"zod": "3.22.4",
|
|
21
|
-
"@synnaxlabs/freighter": "0.
|
|
22
|
-
"@synnaxlabs/x": "0.
|
|
21
|
+
"@synnaxlabs/freighter": "0.8.1",
|
|
22
|
+
"@synnaxlabs/x": "0.13.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "^20.10.5",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"vite": "^5.1.2",
|
|
29
29
|
"vitest": "^1.2.2",
|
|
30
30
|
"@synnaxlabs/tsconfig": "0.0.2",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
31
|
+
"eslint-config-synnaxlabs": "0.0.1",
|
|
32
|
+
"@synnaxlabs/vite-plugin": "0.0.1"
|
|
33
33
|
},
|
|
34
34
|
"main": "dist/client.cjs",
|
|
35
35
|
"module": "dist/client.js",
|
|
@@ -52,7 +52,11 @@ export class Checker {
|
|
|
52
52
|
* @param pollFreq - The frequency at which to poll the cluster for
|
|
53
53
|
* connectivity information.
|
|
54
54
|
*/
|
|
55
|
-
constructor(
|
|
55
|
+
constructor(
|
|
56
|
+
client: UnaryClient,
|
|
57
|
+
pollFreq: TimeSpan = TimeSpan.seconds(30),
|
|
58
|
+
name?: string,
|
|
59
|
+
) {
|
|
56
60
|
this._state = { ...DEFAULT };
|
|
57
61
|
this.client = client;
|
|
58
62
|
this.pollFrequency = pollFreq;
|
package/src/framer/client.ts
CHANGED
|
@@ -97,7 +97,7 @@ export class Client {
|
|
|
97
97
|
try {
|
|
98
98
|
await w.write(to, data);
|
|
99
99
|
if (!(await w.commit())) throw (await w.error()) as Error;
|
|
100
|
-
}
|
|
100
|
+
} finally {
|
|
101
101
|
await w.close();
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -116,7 +116,11 @@ export class Client {
|
|
|
116
116
|
private async readFrame(tr: TimeRange, params: Params): Promise<Frame> {
|
|
117
117
|
const i = await this.newIterator(tr, params);
|
|
118
118
|
const frame = new Frame();
|
|
119
|
-
|
|
119
|
+
try {
|
|
120
|
+
for await (const f of i) frame.push(f);
|
|
121
|
+
} finally {
|
|
122
|
+
await i.close();
|
|
123
|
+
}
|
|
120
124
|
return frame;
|
|
121
125
|
}
|
|
122
126
|
}
|
package/.pytest_cache/README.md
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# pytest cache directory #
|
|
2
|
-
|
|
3
|
-
This directory contains data from the pytest's cache plugin,
|
|
4
|
-
which provides the `--lf` and `--ff` options, as well as the `cache` fixture.
|
|
5
|
-
|
|
6
|
-
**Do not** commit this to version control.
|
|
7
|
-
|
|
8
|
-
See [the docs](https://docs.pytest.org/en/stable/how-to/cache.html) for more information.
|
package/examples/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {Synnax} from "@synnaxlabs/client";
|