@milaboratories/pl-client 2.4.15 → 2.4.17
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/ll_client.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +730 -716
- package/dist/index.mjs.map +1 -1
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/downloadapi/protocol.client.d.ts +4 -3
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts +4 -3
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/progressapi/protocol.client.d.ts +4 -3
- package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/streamingapi/protocol.client.d.ts +4 -3
- package/dist/proto/github.com/milaboratory/pl/plapi/plapiproto/api.client.d.ts +4 -3
- package/package.json +3 -2
- package/src/core/ll_client.ts +19 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { RpcTransport, ServiceInfo, UnaryCall, RpcOptions } from '@protobuf-ts/runtime-rpc';
|
|
1
|
+
import { RpcTransport, ServiceInfo, UnaryCall, RpcOptions, MethodInfo } from '@protobuf-ts/runtime-rpc';
|
|
2
2
|
import { DownloadAPI_GetDownloadURL_Response, DownloadAPI_GetDownloadURL_Request } from './protocol';
|
|
3
|
+
import { JsonValue } from '@protobuf-ts/runtime';
|
|
3
4
|
/**
|
|
4
5
|
*
|
|
5
6
|
* Download provides access to any data, that can be downloaded via network.
|
|
@@ -23,9 +24,9 @@ export interface IDownloadClient {
|
|
|
23
24
|
export declare class DownloadClient implements IDownloadClient, ServiceInfo {
|
|
24
25
|
private readonly _transport;
|
|
25
26
|
typeName: string;
|
|
26
|
-
methods:
|
|
27
|
+
methods: MethodInfo<any, any>[];
|
|
27
28
|
options: {
|
|
28
|
-
[extensionName: string]:
|
|
29
|
+
[extensionName: string]: JsonValue;
|
|
29
30
|
};
|
|
30
31
|
constructor(_transport: RpcTransport);
|
|
31
32
|
/**
|
package/dist/proto/github.com/milaboratory/pl/controllers/shared/grpc/lsapi/protocol.client.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { RpcTransport, ServiceInfo, UnaryCall, RpcOptions } from '@protobuf-ts/runtime-rpc';
|
|
1
|
+
import { RpcTransport, ServiceInfo, UnaryCall, RpcOptions, MethodInfo } from '@protobuf-ts/runtime-rpc';
|
|
2
2
|
import { LsAPI_List_Response, LsAPI_List_Request } from './protocol';
|
|
3
|
+
import { JsonValue } from '@protobuf-ts/runtime';
|
|
3
4
|
/**
|
|
4
5
|
*
|
|
5
6
|
* LS provides access to lists of blobs (files, S3 objects and so on) is some storage.
|
|
@@ -29,9 +30,9 @@ export interface ILSClient {
|
|
|
29
30
|
export declare class LSClient implements ILSClient, ServiceInfo {
|
|
30
31
|
private readonly _transport;
|
|
31
32
|
typeName: string;
|
|
32
|
-
methods:
|
|
33
|
+
methods: MethodInfo<any, any>[];
|
|
33
34
|
options: {
|
|
34
|
-
[extensionName: string]:
|
|
35
|
+
[extensionName: string]: JsonValue;
|
|
35
36
|
};
|
|
36
37
|
constructor(_transport: RpcTransport);
|
|
37
38
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { RpcTransport, ServiceInfo, ServerStreamingCall, UnaryCall, RpcOptions } from '@protobuf-ts/runtime-rpc';
|
|
1
|
+
import { RpcTransport, ServiceInfo, ServerStreamingCall, UnaryCall, RpcOptions, MethodInfo } from '@protobuf-ts/runtime-rpc';
|
|
2
2
|
import { ProgressAPI_RealtimeStatus_Response, ProgressAPI_RealtimeStatus_Request, ProgressAPI_GetStatus_Response, ProgressAPI_GetStatus_Request } from './protocol';
|
|
3
|
+
import { JsonValue } from '@protobuf-ts/runtime';
|
|
3
4
|
/**
|
|
4
5
|
*
|
|
5
6
|
* Progress provides access to progress of any long-running process associated with resource.
|
|
@@ -27,9 +28,9 @@ export interface IProgressClient {
|
|
|
27
28
|
export declare class ProgressClient implements IProgressClient, ServiceInfo {
|
|
28
29
|
private readonly _transport;
|
|
29
30
|
typeName: string;
|
|
30
|
-
methods:
|
|
31
|
+
methods: MethodInfo<any, any>[];
|
|
31
32
|
options: {
|
|
32
|
-
[extensionName: string]:
|
|
33
|
+
[extensionName: string]: JsonValue;
|
|
33
34
|
};
|
|
34
35
|
constructor(_transport: RpcTransport);
|
|
35
36
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { RpcTransport, ServiceInfo, UnaryCall, ServerStreamingCall, RpcOptions } from '@protobuf-ts/runtime-rpc';
|
|
1
|
+
import { RpcTransport, ServiceInfo, UnaryCall, ServerStreamingCall, RpcOptions, MethodInfo } from '@protobuf-ts/runtime-rpc';
|
|
2
2
|
import { StreamingAPI_LastLines, StreamingAPI_ReadText, StreamingAPI_StreamText, StreamingAPI_ReadBinary, StreamingAPI_Response, StreamingAPI_StreamBinary } from './protocol';
|
|
3
|
+
import { JsonValue } from '@protobuf-ts/runtime';
|
|
3
4
|
/**
|
|
4
5
|
*
|
|
5
6
|
* Streaming provides access to online data stream from item in storage. Whenever item is appended with data,
|
|
@@ -67,9 +68,9 @@ export interface IStreamingClient {
|
|
|
67
68
|
export declare class StreamingClient implements IStreamingClient, ServiceInfo {
|
|
68
69
|
private readonly _transport;
|
|
69
70
|
typeName: string;
|
|
70
|
-
methods:
|
|
71
|
+
methods: MethodInfo<any, any>[];
|
|
71
72
|
options: {
|
|
72
|
-
[extensionName: string]:
|
|
73
|
+
[extensionName: string]: JsonValue;
|
|
73
74
|
};
|
|
74
75
|
constructor(_transport: RpcTransport);
|
|
75
76
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { RpcTransport, ServiceInfo, UnaryCall, DuplexStreamingCall, RpcOptions } from '@protobuf-ts/runtime-rpc';
|
|
1
|
+
import { RpcTransport, ServiceInfo, UnaryCall, DuplexStreamingCall, RpcOptions, MethodInfo } from '@protobuf-ts/runtime-rpc';
|
|
2
2
|
import { MaintenanceAPI_Ping_Response, MaintenanceAPI_Ping_Request, MiscAPI_ListResourceTypes_Response, MiscAPI_ListResourceTypes_Request, AuthAPI_GetJWTToken_Response, AuthAPI_GetJWTToken_Request, AuthAPI_ListMethods_Response, AuthAPI_ListMethods_Request, LocksAPI_Lease_Release_Response, LocksAPI_Lease_Release_Request, LocksAPI_Lease_Update_Response, LocksAPI_Lease_Update_Request, LocksAPI_Lease_Create_Response, LocksAPI_Lease_Create_Request, ControllerAPI_ClearFeatures_Response, ControllerAPI_ClearFeatures_Request, ControllerAPI_SetFeatures_Response, ControllerAPI_SetFeatures_Request, ControllerAPI_GetUrl_Response, ControllerAPI_GetUrl_Request, ControllerAPI_RemoveAliasesAndUrls_Response, ControllerAPI_RemoveAliasesAndUrls_Request, ControllerAPI_WriteAliasesAndUrls_Response, ControllerAPI_WriteAliasesAndUrls_Request, ControllerAPI_GetNotifications_Response, ControllerAPI_GetNotifications_Request, ControllerAPI_AttachSubscription_Response, ControllerAPI_AttachSubscription_Request, ControllerAPI_Update_Response, ControllerAPI_Update_Request, ControllerAPI_Get_Response, ControllerAPI_Get_Request, ControllerAPI_Exists_Response, ControllerAPI_Exists_Request, ControllerAPI_Create_Response, ControllerAPI_Create_Request, ControllerAPI_Deregister_Response, ControllerAPI_Deregister_Request, ControllerAPI_Register_Response, ControllerAPI_Register_Request, NotificationAPI_Get_Response, NotificationAPI_Get_Request, SubscriptionAPI_DetachFilter_Response, SubscriptionAPI_DetachFilter_Request, SubscriptionAPI_AttachFilter_Response, SubscriptionAPI_AttachFilter_Request, TxAPI_Sync_Response, TxAPI_Sync_Request, TxAPI_ServerMessage, TxAPI_ClientMessage } from './api';
|
|
3
|
+
import { JsonValue } from '@protobuf-ts/runtime';
|
|
3
4
|
/**
|
|
4
5
|
* @generated from protobuf service MiLaboratories.PL.API.Platform
|
|
5
6
|
*/
|
|
@@ -139,9 +140,9 @@ export interface IPlatformClient {
|
|
|
139
140
|
export declare class PlatformClient implements IPlatformClient, ServiceInfo {
|
|
140
141
|
private readonly _transport;
|
|
141
142
|
typeName: string;
|
|
142
|
-
methods:
|
|
143
|
+
methods: MethodInfo<any, any>[];
|
|
143
144
|
options: {
|
|
144
|
-
[extensionName: string]:
|
|
145
|
+
[extensionName: string]: JsonValue;
|
|
145
146
|
};
|
|
146
147
|
constructor(_transport: RpcTransport);
|
|
147
148
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-client",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.17",
|
|
4
4
|
"description": "New TS/JS client for Platform API",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -24,11 +24,12 @@
|
|
|
24
24
|
"canonicalize": "^2.0.0",
|
|
25
25
|
"denque": "^2.1.0",
|
|
26
26
|
"https-proxy-agent": "^7.0.5",
|
|
27
|
+
"cacheable-lookup": "^6.1.0",
|
|
27
28
|
"long": "^5.2.3",
|
|
28
29
|
"undici": "^6.19.8",
|
|
29
30
|
"utility-types": "^3.11.0",
|
|
30
31
|
"yaml": "^2.5.1",
|
|
31
|
-
"@milaboratories/ts-helpers": "^1.0.
|
|
32
|
+
"@milaboratories/ts-helpers": "^1.0.28"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"typescript": "~5.5.4",
|
package/src/core/ll_client.ts
CHANGED
|
@@ -16,8 +16,10 @@ import {
|
|
|
16
16
|
import { GrpcOptions, GrpcTransport } from '@protobuf-ts/grpc-transport';
|
|
17
17
|
import { LLPlTransaction } from './ll_transaction';
|
|
18
18
|
import { parsePlJwt } from '../util/pl';
|
|
19
|
-
import { Agent, Dispatcher, ProxyAgent } from 'undici';
|
|
19
|
+
import { Agent, Client, Dispatcher, ProxyAgent } from 'undici';
|
|
20
20
|
import { inferAuthRefreshTime } from './auth';
|
|
21
|
+
import { Resolver } from 'node:dns/promises';
|
|
22
|
+
import CacheableLookup from 'cacheable-lookup';
|
|
21
23
|
|
|
22
24
|
export interface PlCallOps {
|
|
23
25
|
timeout?: number;
|
|
@@ -93,10 +95,24 @@ export class LLPlClient {
|
|
|
93
95
|
this.grpcTransport = new GrpcTransport(grpcOptions);
|
|
94
96
|
this.grpcPl = new PlatformClient(this.grpcTransport);
|
|
95
97
|
|
|
98
|
+
const cacheableLookup = new CacheableLookup({ resolver: new Resolver({ tries: 10 }) });
|
|
99
|
+
|
|
100
|
+
const httpOptions: Client.Options = {
|
|
101
|
+
// allowH2: true,
|
|
102
|
+
headersTimeout: 3e3,
|
|
103
|
+
keepAliveTimeout: 3e3,
|
|
104
|
+
keepAliveMaxTimeout: 60e3,
|
|
105
|
+
maxRedirections: 6,
|
|
106
|
+
connect: {
|
|
107
|
+
// bug in undici typings
|
|
108
|
+
lookup: cacheableLookup.lookup.bind(cacheableLookup) as any
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
|
|
96
112
|
// setting up http(s)
|
|
97
113
|
if (this.conf.httpProxy !== undefined)
|
|
98
|
-
this.httpDispatcher = new ProxyAgent(this.conf.httpProxy);
|
|
99
|
-
else this.httpDispatcher = new Agent();
|
|
114
|
+
this.httpDispatcher = new ProxyAgent({ uri: this.conf.httpProxy, ...httpOptions });
|
|
115
|
+
else this.httpDispatcher = new Agent(httpOptions);
|
|
100
116
|
|
|
101
117
|
if (statusListener !== undefined) {
|
|
102
118
|
this.statusListener = statusListener;
|