@milaboratories/pl-client 2.4.18 → 2.4.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/pl-client",
3
- "version": "2.4.18",
3
+ "version": "2.4.20",
4
4
  "description": "New TS/JS client for Platform API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
@@ -17,7 +17,7 @@
17
17
  "./src/**/*"
18
18
  ],
19
19
  "dependencies": {
20
- "@grpc/grpc-js": "^1.11.3",
20
+ "@grpc/grpc-js": "^1.12.0",
21
21
  "@protobuf-ts/grpc-transport": "^2.9.4",
22
22
  "@protobuf-ts/runtime": "^2.9.4",
23
23
  "@protobuf-ts/runtime-rpc": "^2.9.4",
@@ -29,12 +29,12 @@
29
29
  "undici": "^6.19.8",
30
30
  "utility-types": "^3.11.0",
31
31
  "yaml": "^2.5.1",
32
- "@milaboratories/ts-helpers": "^1.0.29"
32
+ "@milaboratories/ts-helpers": "^1.0.30"
33
33
  },
34
34
  "devDependencies": {
35
35
  "typescript": "~5.5.4",
36
36
  "vite": "^5.4.8",
37
- "@types/node": "~20.16.5",
37
+ "@types/node": "~20.16.10",
38
38
  "@protobuf-ts/plugin": "^2.9.4",
39
39
  "@types/http-proxy": "^1.17.15",
40
40
  "@types/jest": "^29.5.13",
@@ -284,8 +284,8 @@ export class PlClient {
284
284
  }
285
285
 
286
286
  /** Closes underlying transport */
287
- public close() {
288
- this.ll.close();
287
+ public async close() {
288
+ await this.ll.close();
289
289
  }
290
290
 
291
291
  public static async init(
@@ -1,4 +1,4 @@
1
- import { plAddressToConfig } from './config';
1
+ import { DEFAULT_TX_TIMEOUT, plAddressToConfig } from './config';
2
2
 
3
3
  test('config form url no auth', () => {
4
4
  const conf = plAddressToConfig('http://127.0.0.1:6345');
@@ -16,4 +16,12 @@ test('config form url with auth and special symbols', () => {
16
16
  const conf = plAddressToConfig('http://user1:password232$@127.0.0.1:6345');
17
17
  expect(conf.user).toEqual('user1');
18
18
  expect(conf.password).toEqual('password232$');
19
+ expect(conf.defaultTransactionTimeout).toEqual(DEFAULT_TX_TIMEOUT);
20
+ });
21
+
22
+ test('config form url with auth and special symbols and request timeout', () => {
23
+ const conf = plAddressToConfig('http://user1:password232$@127.0.0.1:6345/?tx-timeout=11341');
24
+ expect(conf.user).toEqual('user1');
25
+ expect(conf.password).toEqual('password232$');
26
+ expect(conf.defaultTransactionTimeout).toEqual(11341);
19
27
  });
@@ -238,7 +238,8 @@ export class LLPlClient {
238
238
  }
239
239
 
240
240
  /** Closes underlying transport */
241
- public close() {
241
+ public async close() {
242
242
  this.grpcTransport.close();
243
+ await this.httpDispatcher.destroy();
243
244
  }
244
245
  }