@nsshunt/stsconfig 1.25.159 → 1.25.160
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/stsconfig.mjs
CHANGED
|
@@ -13,7 +13,7 @@ var __privateWrapper = (obj, member, setter, getter) => ({
|
|
|
13
13
|
return __privateGet(obj, member, getter);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
var _options, _httpAgent, _httpsAgent, _agentResetInterval, _requestCount, _SetupResetInterval, _GetAgentOptions, _url, _method, _headers, _data, _agentManager;
|
|
16
|
+
var _options, _httpAgent, _httpsAgent, _agentResetInterval, _requestCount, _SetupResetInterval, _GetAgentOptions, _url, _method, _headers, _data, _agentManager, _timeout;
|
|
17
17
|
import * as fs from "node:fs";
|
|
18
18
|
import * as dotenv from "dotenv";
|
|
19
19
|
import http from "node:http";
|
|
@@ -1786,22 +1786,30 @@ _requestCount = new WeakMap();
|
|
|
1786
1786
|
_SetupResetInterval = new WeakMap();
|
|
1787
1787
|
_GetAgentOptions = new WeakMap();
|
|
1788
1788
|
class STSAxiosConfig {
|
|
1789
|
-
constructor(url, method, headers) {
|
|
1789
|
+
constructor(url, method, headers, timeout) {
|
|
1790
1790
|
__privateAdd(this, _url);
|
|
1791
1791
|
__privateAdd(this, _method);
|
|
1792
1792
|
__privateAdd(this, _headers);
|
|
1793
1793
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1794
1794
|
__privateAdd(this, _data);
|
|
1795
1795
|
__privateAdd(this, _agentManager);
|
|
1796
|
+
__privateAdd(this, _timeout);
|
|
1796
1797
|
__privateSet(this, _url, url);
|
|
1797
1798
|
__privateSet(this, _method, method);
|
|
1798
1799
|
__privateSet(this, _headers, headers);
|
|
1800
|
+
if (timeout !== void 0) {
|
|
1801
|
+
__privateSet(this, _timeout, timeout);
|
|
1802
|
+
}
|
|
1799
1803
|
}
|
|
1800
1804
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1801
1805
|
withData(data) {
|
|
1802
1806
|
__privateSet(this, _data, data);
|
|
1803
1807
|
return this;
|
|
1804
1808
|
}
|
|
1809
|
+
withTimeout(timeout) {
|
|
1810
|
+
__privateSet(this, _timeout, timeout);
|
|
1811
|
+
return this;
|
|
1812
|
+
}
|
|
1805
1813
|
withAgentManager(agentManager) {
|
|
1806
1814
|
__privateSet(this, _agentManager, agentManager);
|
|
1807
1815
|
return this;
|
|
@@ -1822,6 +1830,9 @@ class STSAxiosConfig {
|
|
|
1822
1830
|
if (__privateGet(this, _data) !== void 0) {
|
|
1823
1831
|
retVal.data = __privateGet(this, _data);
|
|
1824
1832
|
}
|
|
1833
|
+
if (__privateGet(this, _timeout) !== void 0) {
|
|
1834
|
+
retVal.timeout = __privateGet(this, _timeout);
|
|
1835
|
+
}
|
|
1825
1836
|
return retVal;
|
|
1826
1837
|
}
|
|
1827
1838
|
}
|
|
@@ -1830,6 +1841,7 @@ _method = new WeakMap();
|
|
|
1830
1841
|
_headers = new WeakMap();
|
|
1831
1842
|
_data = new WeakMap();
|
|
1832
1843
|
_agentManager = new WeakMap();
|
|
1844
|
+
_timeout = new WeakMap();
|
|
1833
1845
|
export {
|
|
1834
1846
|
$ResetOptions,
|
|
1835
1847
|
$ResetOptionsEx,
|