@litert/televoke 0.4.6 → 0.4.8
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/CHANGES.md +8 -0
- package/lib/Client/BuiltInRIDGenerator.d.ts +1 -1
- package/lib/Client/BuiltInRIDGenerator.d.ts.map +1 -1
- package/lib/Client/BuiltInRIDGenerator.js +3 -3
- package/lib/Client/BuiltInRIDGenerator.js.map +1 -1
- package/lib/Client/Common.d.ts +1 -1
- package/lib/Client/Common.js +1 -1
- package/lib/Client/Errors.d.ts +1 -1
- package/lib/Client/Errors.js +1 -1
- package/lib/Client/HttpClient.d.ts +7 -1
- package/lib/Client/HttpClient.d.ts.map +1 -1
- package/lib/Client/HttpClient.js +29 -8
- package/lib/Client/HttpClient.js.map +1 -1
- package/lib/Client/HttpsClient.d.ts +7 -1
- package/lib/Client/HttpsClient.d.ts.map +1 -1
- package/lib/Client/HttpsClient.js +29 -8
- package/lib/Client/HttpsClient.js.map +1 -1
- package/lib/Client/TCPClient.d.ts +1 -1
- package/lib/Client/TCPClient.js +1 -1
- package/lib/Client/TLSClient.d.ts +1 -1
- package/lib/Client/TLSClient.js +1 -1
- package/lib/Client/index.d.ts +1 -1
- package/lib/Client/index.js +1 -1
- package/lib/Common/API.d.ts +1 -1
- package/lib/Common/API.js +1 -1
- package/lib/Common/Encoding.d.ts +1 -1
- package/lib/Common/Encoding.js +1 -1
- package/lib/Common/Request.d.ts +1 -1
- package/lib/Common/Request.js +1 -1
- package/lib/Common/Response.d.ts +1 -1
- package/lib/Common/Response.js +1 -1
- package/lib/Common/index.d.ts +1 -1
- package/lib/Common/index.js +1 -1
- package/lib/Encoder/Decoder.d.ts +1 -1
- package/lib/Encoder/Decoder.js +1 -1
- package/lib/Encoder/Encoder.d.ts +1 -1
- package/lib/Encoder/Encoder.js +1 -1
- package/lib/Encoder/Errors.d.ts +1 -1
- package/lib/Encoder/Errors.js +1 -1
- package/lib/Errors.d.ts +1 -1
- package/lib/Errors.js +1 -1
- package/lib/Server/Common/Gateway.d.ts +1 -1
- package/lib/Server/Common/Gateway.js +1 -1
- package/lib/Server/Common/Request.d.ts +1 -1
- package/lib/Server/Common/Request.js +1 -1
- package/lib/Server/Common/Router.d.ts +1 -1
- package/lib/Server/Common/Router.js +1 -1
- package/lib/Server/Common/Server.d.ts +1 -1
- package/lib/Server/Common/Server.js +1 -1
- package/lib/Server/Common/index.d.ts +1 -1
- package/lib/Server/Common/index.js +1 -1
- package/lib/Server/Errors.d.ts +1 -1
- package/lib/Server/Errors.js +1 -1
- package/lib/Server/Gateways/Http.d.ts +1 -1
- package/lib/Server/Gateways/Http.d.ts.map +1 -1
- package/lib/Server/Gateways/Http.js +5 -1
- package/lib/Server/Gateways/Http.js.map +1 -1
- package/lib/Server/Gateways/TCP.d.ts +1 -1
- package/lib/Server/Gateways/TCP.js +1 -1
- package/lib/Server/Server.d.ts +1 -1
- package/lib/Server/Server.js +1 -1
- package/lib/Server/SimpleRouter.d.ts +1 -1
- package/lib/Server/SimpleRouter.js +1 -1
- package/lib/Server/index.d.ts +1 -1
- package/lib/Server/index.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/src/lib/Client/BuiltInRIDGenerator.ts +1 -1
- package/src/lib/Client/Common.ts +1 -1
- package/src/lib/Client/Errors.ts +1 -1
- package/src/lib/Client/HttpClient.ts +45 -8
- package/src/lib/Client/HttpsClient.ts +45 -8
- package/src/lib/Client/TCPClient.ts +1 -1
- package/src/lib/Client/TLSClient.ts +1 -1
- package/src/lib/Client/index.ts +1 -1
- package/src/lib/Common/API.ts +1 -1
- package/src/lib/Common/Encoding.ts +1 -1
- package/src/lib/Common/Request.ts +1 -1
- package/src/lib/Common/Response.ts +1 -1
- package/src/lib/Common/index.ts +1 -1
- package/src/lib/Encoder/Decoder.ts +1 -1
- package/src/lib/Encoder/Encoder.ts +1 -1
- package/src/lib/Encoder/Errors.ts +1 -1
- package/src/lib/Errors.ts +1 -1
- package/src/lib/Server/Common/Gateway.ts +1 -1
- package/src/lib/Server/Common/Request.ts +1 -1
- package/src/lib/Server/Common/Router.ts +1 -1
- package/src/lib/Server/Common/Server.ts +1 -1
- package/src/lib/Server/Common/index.ts +1 -1
- package/src/lib/Server/Errors.ts +1 -1
- package/src/lib/Server/Gateways/Http.ts +7 -1
- package/src/lib/Server/Gateways/TCP.ts +1 -1
- package/src/lib/Server/Server.ts +1 -1
- package/src/lib/Server/SimpleRouter.ts +1 -1
- package/src/lib/Server/index.ts +1 -1
- package/src/lib/index.ts +1 -1
package/CHANGES.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as C from './Common';
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function createIncrementRIDGenerator(base: number): C.IRIDGenerator;
|
|
3
3
|
export declare function createRandStringRIDGenerator(length: number, seed: string): C.IRIDGenerator;
|
|
4
4
|
//# sourceMappingURL=BuiltInRIDGenerator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuiltInRIDGenerator.d.ts","sourceRoot":"","sources":["../../src/lib/Client/BuiltInRIDGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,wBAAgB,
|
|
1
|
+
{"version":3,"file":"BuiltInRIDGenerator.d.ts","sourceRoot":"","sources":["../../src/lib/Client/BuiltInRIDGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,aAAa,CAGzE;AAED,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC,aAAa,CAa1F"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createRandStringRIDGenerator = exports.
|
|
4
|
-
function
|
|
3
|
+
exports.createRandStringRIDGenerator = exports.createIncrementRIDGenerator = void 0;
|
|
4
|
+
function createIncrementRIDGenerator(base) {
|
|
5
5
|
return () => base++;
|
|
6
6
|
}
|
|
7
|
-
exports.
|
|
7
|
+
exports.createIncrementRIDGenerator = createIncrementRIDGenerator;
|
|
8
8
|
function createRandStringRIDGenerator(length, seed) {
|
|
9
9
|
return function () {
|
|
10
10
|
let ret = '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuiltInRIDGenerator.js","sourceRoot":"","sources":["../../src/lib/Client/BuiltInRIDGenerator.ts"],"names":[],"mappings":";;;AAEA,SAAgB,
|
|
1
|
+
{"version":3,"file":"BuiltInRIDGenerator.js","sourceRoot":"","sources":["../../src/lib/Client/BuiltInRIDGenerator.ts"],"names":[],"mappings":";;;AAEA,SAAgB,2BAA2B,CAAC,IAAY;IAEpD,OAAO,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;AACxB,CAAC;AAHD,kEAGC;AAED,SAAgB,4BAA4B,CAAC,MAAc,EAAE,IAAY;IAErE,OAAO;QAEH,IAAI,GAAG,GAAW,EAAE,CAAC;QAErB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;YAE7B,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;SACxD;QAED,OAAO,GAAG,CAAC;IACf,CAAC,CAAC;AACN,CAAC;AAbD,oEAaC"}
|
package/lib/Client/Common.d.ts
CHANGED
package/lib/Client/Common.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
package/lib/Client/Errors.d.ts
CHANGED
package/lib/Client/Errors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -32,6 +32,12 @@ export interface IHttpClientOptions {
|
|
|
32
32
|
ridGenerator: C.IRIDGenerator;
|
|
33
33
|
timeout?: number;
|
|
34
34
|
apiNameWrapper?: (name: string) => string;
|
|
35
|
+
/**
|
|
36
|
+
* Whether to retry when the connection is reset.
|
|
37
|
+
*
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
retryConnReset?: boolean;
|
|
35
41
|
}
|
|
36
42
|
export declare function createHttpClient<TAPIs extends G.IServiceAPIs>(opts: IHttpClientOptions): C.IClient<TAPIs>;
|
|
37
43
|
//# sourceMappingURL=HttpClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../src/lib/Client/HttpClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,OAAO,KAAK,CAAC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../src/lib/Client/HttpClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,OAAO,KAAK,CAAC,MAAM,WAAW,CAAC;AA8M/B,MAAM,WAAW,kBAAkB;IAE/B,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,YAAY,EAAE,CAAC,CAAC,aAAa,CAAC;IAE9B,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAE1C;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,SAAS,CAAC,CAAC,YAAY,EAAE,IAAI,EAAE,kBAAkB,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAWzG"}
|
package/lib/Client/HttpClient.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -22,7 +22,7 @@ const G = require("../Common");
|
|
|
22
22
|
const E = require("./Errors");
|
|
23
23
|
const observable_1 = require("@litert/observable");
|
|
24
24
|
class HttpClient extends observable_1.Events.EventEmitter {
|
|
25
|
-
constructor(_host, _port, _ridGenerator, _path = '/', _timeout = 30000, _apiNameWrapper) {
|
|
25
|
+
constructor(_host, _port, _ridGenerator, _path = '/', _timeout = 30000, _apiNameWrapper, _retryConnReset) {
|
|
26
26
|
super();
|
|
27
27
|
this._host = _host;
|
|
28
28
|
this._port = _port;
|
|
@@ -30,17 +30,38 @@ class HttpClient extends observable_1.Events.EventEmitter {
|
|
|
30
30
|
this._path = _path;
|
|
31
31
|
this._timeout = _timeout;
|
|
32
32
|
this._apiNameWrapper = _apiNameWrapper;
|
|
33
|
+
this._retryConnReset = _retryConnReset;
|
|
33
34
|
this._agent = new $Http.Agent({
|
|
34
35
|
maxSockets: 0,
|
|
35
36
|
keepAlive: true,
|
|
36
|
-
keepAliveMsecs:
|
|
37
|
+
keepAliveMsecs: this._timeout
|
|
37
38
|
});
|
|
38
39
|
}
|
|
39
|
-
invoke(api, ...args) {
|
|
40
|
-
|
|
40
|
+
async invoke(api, ...args) {
|
|
41
|
+
try {
|
|
42
|
+
return await this._call(api, false, args);
|
|
43
|
+
}
|
|
44
|
+
catch (e) {
|
|
45
|
+
if (this._retryConnReset && (e === null || e === void 0 ? void 0 : e.code) === 'ECONNRESET') {
|
|
46
|
+
return this._call(api, false, args);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
throw e;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
41
52
|
}
|
|
42
|
-
call(api, ...args) {
|
|
43
|
-
|
|
53
|
+
async call(api, ...args) {
|
|
54
|
+
try {
|
|
55
|
+
return await this._call(api, true, args);
|
|
56
|
+
}
|
|
57
|
+
catch (e) {
|
|
58
|
+
if (this._retryConnReset && (e === null || e === void 0 ? void 0 : e.code) === 'ECONNRESET') {
|
|
59
|
+
return this._call(api, true, args);
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
throw e;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
44
65
|
}
|
|
45
66
|
_call(api, returnRaw, args) {
|
|
46
67
|
const rid = this._ridGenerator();
|
|
@@ -142,7 +163,7 @@ class HttpClient extends observable_1.Events.EventEmitter {
|
|
|
142
163
|
}
|
|
143
164
|
function createHttpClient(opts) {
|
|
144
165
|
var _a;
|
|
145
|
-
return new HttpClient(opts.host, (_a = opts.port) !== null && _a !== void 0 ? _a : 80, opts.ridGenerator, opts.path, opts.timeout, opts.apiNameWrapper);
|
|
166
|
+
return new HttpClient(opts.host, (_a = opts.port) !== null && _a !== void 0 ? _a : 80, opts.ridGenerator, opts.path, opts.timeout, opts.apiNameWrapper, opts.retryConnReset);
|
|
146
167
|
}
|
|
147
168
|
exports.createHttpClient = createHttpClient;
|
|
148
169
|
//# sourceMappingURL=HttpClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClient.js","sourceRoot":"","sources":["../../src/lib/Client/HttpClient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,8BAA8B;AAE9B,gCAAgC;AAChC,+BAA+B;AAC/B,8BAA8B;AAC9B,mDAA4C;AAE5C,MAAM,UAAW,SAAQ,mBAAM,CAAC,YAAyC;IAMrE,YACqB,KAAa,EACb,KAAa,EACb,aAA8B,EAC9B,QAAgB,GAAG,EACnB,WAAmB,KAAK,EACxB,eAA0C;
|
|
1
|
+
{"version":3,"file":"HttpClient.js","sourceRoot":"","sources":["../../src/lib/Client/HttpClient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,8BAA8B;AAE9B,gCAAgC;AAChC,+BAA+B;AAC/B,8BAA8B;AAC9B,mDAA4C;AAE5C,MAAM,UAAW,SAAQ,mBAAM,CAAC,YAAyC;IAMrE,YACqB,KAAa,EACb,KAAa,EACb,aAA8B,EAC9B,QAAgB,GAAG,EACnB,WAAmB,KAAK,EACxB,eAA0C,EAC1C,eAAyB;QAG1C,KAAK,EAAE,CAAC;QATS,UAAK,GAAL,KAAK,CAAQ;QACb,UAAK,GAAL,KAAK,CAAQ;QACb,kBAAa,GAAb,aAAa,CAAiB;QAC9B,UAAK,GAAL,KAAK,CAAc;QACnB,aAAQ,GAAR,QAAQ,CAAgB;QACxB,oBAAe,GAAf,eAAe,CAA2B;QAC1C,oBAAe,GAAf,eAAe,CAAU;QAK1C,IAAI,CAAC,MAAM,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC;YAC1B,UAAU,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AAI,UAAU,CACjB,IAAI,CAAC,IAAI,EACT,MAAA,IAAI,CAAC,IAAI,mCAAI,EAAE,EACf,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,cAAc,CACtB,CAAC;AACN,CAAC;AAXD,4CAWC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -35,6 +35,12 @@ export interface IHttpsClientOptions {
|
|
|
35
35
|
timeout?: number;
|
|
36
36
|
apiNameWrapper?: (name: string) => string;
|
|
37
37
|
tlsAgentOptions?: $Https.AgentOptions;
|
|
38
|
+
/**
|
|
39
|
+
* Whether to retry when the connection is reset.
|
|
40
|
+
*
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
retryConnReset?: boolean;
|
|
38
44
|
}
|
|
39
45
|
export declare function createHttpsClient<TAPIs extends G.IServiceAPIs>(opts: IHttpsClientOptions): C.IClient<TAPIs>;
|
|
40
46
|
//# sourceMappingURL=HttpsClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpsClient.d.ts","sourceRoot":"","sources":["../../src/lib/Client/HttpsClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAEH,OAAO,KAAK,MAAM,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,OAAO,KAAK,CAAC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"HttpsClient.d.ts","sourceRoot":"","sources":["../../src/lib/Client/HttpsClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAEH,OAAO,KAAK,MAAM,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,OAAO,KAAK,CAAC,MAAM,WAAW,CAAC;AAiN/B,MAAM,WAAW,mBAAmB;IAEhC,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,YAAY,EAAE,CAAC,CAAC,aAAa,CAAC;IAE9B,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAE1C,eAAe,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC;IAEtC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAgB,iBAAiB,CAAC,KAAK,SAAS,CAAC,CAAC,YAAY,EAAE,IAAI,EAAE,mBAAmB,GAAG,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAY3G"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -22,7 +22,7 @@ const G = require("../Common");
|
|
|
22
22
|
const E = require("./Errors");
|
|
23
23
|
const observable_1 = require("@litert/observable");
|
|
24
24
|
class HttpsClient extends observable_1.Events.EventEmitter {
|
|
25
|
-
constructor(_host, _port, _ridGenerator, _path = '', _timeout = 30000, _apiNameWrapper, tlsAgentOptions) {
|
|
25
|
+
constructor(_host, _port, _ridGenerator, _path = '', _timeout = 30000, _apiNameWrapper, tlsAgentOptions, _retryConnReset) {
|
|
26
26
|
super();
|
|
27
27
|
this._host = _host;
|
|
28
28
|
this._port = _port;
|
|
@@ -30,13 +30,34 @@ class HttpsClient extends observable_1.Events.EventEmitter {
|
|
|
30
30
|
this._path = _path;
|
|
31
31
|
this._timeout = _timeout;
|
|
32
32
|
this._apiNameWrapper = _apiNameWrapper;
|
|
33
|
-
this.
|
|
33
|
+
this._retryConnReset = _retryConnReset;
|
|
34
|
+
this._agent = new $Https.Agent(Object.assign({ maxSockets: 0, keepAlive: true, keepAliveMsecs: this._timeout }, tlsAgentOptions));
|
|
34
35
|
}
|
|
35
|
-
invoke(api, ...args) {
|
|
36
|
-
|
|
36
|
+
async invoke(api, ...args) {
|
|
37
|
+
try {
|
|
38
|
+
return await this._call(api, false, args);
|
|
39
|
+
}
|
|
40
|
+
catch (e) {
|
|
41
|
+
if (this._retryConnReset && (e === null || e === void 0 ? void 0 : e.code) === 'ECONNRESET') {
|
|
42
|
+
return this._call(api, false, args);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
throw e;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
37
48
|
}
|
|
38
|
-
call(api, ...args) {
|
|
39
|
-
|
|
49
|
+
async call(api, ...args) {
|
|
50
|
+
try {
|
|
51
|
+
return await this._call(api, true, args);
|
|
52
|
+
}
|
|
53
|
+
catch (e) {
|
|
54
|
+
if (this._retryConnReset && (e === null || e === void 0 ? void 0 : e.code) === 'ECONNRESET') {
|
|
55
|
+
return this._call(api, true, args);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
throw e;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
40
61
|
}
|
|
41
62
|
_call(api, returnRaw, args) {
|
|
42
63
|
const rid = this._ridGenerator();
|
|
@@ -138,7 +159,7 @@ class HttpsClient extends observable_1.Events.EventEmitter {
|
|
|
138
159
|
}
|
|
139
160
|
function createHttpsClient(opts) {
|
|
140
161
|
var _a;
|
|
141
|
-
return new HttpsClient(opts.host, (_a = opts.port) !== null && _a !== void 0 ? _a : 443, opts.ridGenerator, opts.path, opts.timeout, opts.apiNameWrapper, opts.tlsAgentOptions);
|
|
162
|
+
return new HttpsClient(opts.host, (_a = opts.port) !== null && _a !== void 0 ? _a : 443, opts.ridGenerator, opts.path, opts.timeout, opts.apiNameWrapper, opts.tlsAgentOptions, opts.retryConnReset);
|
|
142
163
|
}
|
|
143
164
|
exports.createHttpsClient = createHttpsClient;
|
|
144
165
|
//# sourceMappingURL=HttpsClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpsClient.js","sourceRoot":"","sources":["../../src/lib/Client/HttpsClient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,gCAAgC;AAEhC,gCAAgC;AAChC,+BAA+B;AAC/B,8BAA8B;AAC9B,mDAA4C;AAE5C,MAAM,WAAY,SAAQ,mBAAM,CAAC,YAAyC;IAMtE,YACqB,KAAa,EACb,KAAa,EACb,aAA8B,EAC9B,QAAgB,EAAE,EAClB,WAAmB,KAAK,EACxB,eAA0C,EAC3D,eAAqC;
|
|
1
|
+
{"version":3,"file":"HttpsClient.js","sourceRoot":"","sources":["../../src/lib/Client/HttpsClient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,gCAAgC;AAEhC,gCAAgC;AAChC,+BAA+B;AAC/B,8BAA8B;AAC9B,mDAA4C;AAE5C,MAAM,WAAY,SAAQ,mBAAM,CAAC,YAAyC;IAMtE,YACqB,KAAa,EACb,KAAa,EACb,aAA8B,EAC9B,QAAgB,EAAE,EAClB,WAAmB,KAAK,EACxB,eAA0C,EAC3D,eAAqC,EACpB,eAAyB;QAG1C,KAAK,EAAE,CAAC;QAVS,UAAK,GAAL,KAAK,CAAQ;QACb,UAAK,GAAL,KAAK,CAAQ;QACb,kBAAa,GAAb,aAAa,CAAiB;QAC9B,UAAK,GAAL,KAAK,CAAa;QAClB,aAAQ,GAAR,QAAQ,CAAgB;QACxB,oBAAe,GAAf,eAAe,CAA2B;QAE1C,oBAAe,GAA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,OAAO,EAAE,CAAC;IAC7B,CAAC;CACJ;AAoCD,SAAgB,iBAAiB,CAA+B,IAAyB;;IAErF,OAAO,IAAI,WAAW,CAClB,IAAI,CAAC,IAAI,EACT,MAAA,IAAI,CAAC,IAAI,mCAAI,GAAG,EAChB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,cAAc,EACnB,IAAI,CAAC,eAAe,EACpB,IAAI,CAAC,cAAc,CACtB,CAAC;AACN,CAAC;AAZD,8CAYC"}
|
package/lib/Client/TCPClient.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
package/lib/Client/TLSClient.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
package/lib/Client/index.d.ts
CHANGED
package/lib/Client/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
package/lib/Common/API.d.ts
CHANGED
package/lib/Common/API.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
package/lib/Common/Encoding.d.ts
CHANGED
package/lib/Common/Encoding.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
package/lib/Common/Request.d.ts
CHANGED
package/lib/Common/Request.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
package/lib/Common/Response.d.ts
CHANGED
package/lib/Common/Response.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
package/lib/Common/index.d.ts
CHANGED
package/lib/Common/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
package/lib/Encoder/Decoder.d.ts
CHANGED
package/lib/Encoder/Decoder.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
package/lib/Encoder/Encoder.d.ts
CHANGED
package/lib/Encoder/Encoder.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
package/lib/Encoder/Errors.d.ts
CHANGED
package/lib/Encoder/Errors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
package/lib/Errors.d.ts
CHANGED
package/lib/Errors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Copyright
|
|
3
|
+
* Copyright 2023 Angus.Fenying <fenying@litert.org>
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
* you may not use this file except in compliance with the License.
|