@milaboratories/pl-client 2.4.20 → 2.4.21
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/dist/core/config.d.ts +2 -2
- package/dist/core/ll_client.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/core/config.ts +2 -2
- package/src/core/ll_client.ts +9 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-client",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.21",
|
|
4
4
|
"description": "New TS/JS client for Platform API",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"jest": "^29.7.0",
|
|
42
42
|
"@jest/globals": "^29.7.0",
|
|
43
43
|
"ts-jest": "^29.2.5",
|
|
44
|
-
"@milaboratories/platforma-build-configs": "1.0.
|
|
44
|
+
"@milaboratories/platforma-build-configs": "1.0.2"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"type-check": "tsc --noEmit --composite false",
|
package/src/core/config.ts
CHANGED
|
@@ -66,8 +66,8 @@ export interface PlClientConfig {
|
|
|
66
66
|
retryJitter: number;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
export const DEFAULT_REQUEST_TIMEOUT =
|
|
70
|
-
export const DEFAULT_TX_TIMEOUT =
|
|
69
|
+
export const DEFAULT_REQUEST_TIMEOUT = 2000;
|
|
70
|
+
export const DEFAULT_TX_TIMEOUT = 30_000;
|
|
71
71
|
export const DEFAULT_TOKEN_TTL_SECONDS = 31 * 24 * 60 * 60;
|
|
72
72
|
export const DEFAULT_AUTH_MAX_REFRESH = 12 * 24 * 60 * 60;
|
|
73
73
|
|
package/src/core/ll_client.ts
CHANGED
|
@@ -76,7 +76,14 @@ export class LLPlClient {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
grpcInterceptors.push(this.createErrorInterceptor());
|
|
79
|
-
|
|
79
|
+
|
|
80
|
+
//
|
|
81
|
+
// Leaving it here for now
|
|
82
|
+
// https://github.com/grpc/grpc-node/issues/2788
|
|
83
|
+
//
|
|
84
|
+
// We should implement message pooling algorithm to overcome hardcoded NO_DELAY behaviour
|
|
85
|
+
// of HTTP/2 and allow our small messages to batch together.
|
|
86
|
+
//
|
|
80
87
|
const grpcOptions: GrpcOptions = {
|
|
81
88
|
host: this.conf.hostAndPort,
|
|
82
89
|
timeout: this.conf.defaultRequestTimeout,
|
|
@@ -84,7 +91,7 @@ export class LLPlClient {
|
|
|
84
91
|
? ChannelCredentials.createSsl()
|
|
85
92
|
: ChannelCredentials.createInsecure(),
|
|
86
93
|
clientOptions: {
|
|
87
|
-
'grpc.
|
|
94
|
+
'grpc.keepalive_time_ms': 3000,
|
|
88
95
|
interceptors: grpcInterceptors
|
|
89
96
|
}
|
|
90
97
|
};
|