mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-03-12 18:07:10 -04:00
chore: Update dist
This commit is contained in:
36
dist/cleanup/index.js
generated
vendored
36
dist/cleanup/index.js
generated
vendored
@@ -19391,7 +19391,7 @@ const setConnectionTimeout = (request, reject, timeoutInMs = 0) => {
|
||||
const registerTimeout = (offset) => {
|
||||
const timeoutId = timing.setTimeout(() => {
|
||||
request.destroy();
|
||||
reject(Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), {
|
||||
reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), {
|
||||
name: "TimeoutError",
|
||||
}));
|
||||
}, timeoutInMs - offset);
|
||||
@@ -19419,6 +19419,27 @@ const setConnectionTimeout = (request, reject, timeoutInMs = 0) => {
|
||||
return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2);
|
||||
};
|
||||
|
||||
const setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => {
|
||||
if (timeoutInMs) {
|
||||
return timing.setTimeout(() => {
|
||||
let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`;
|
||||
if (throwOnRequestTimeout) {
|
||||
const error = Object.assign(new Error(msg), {
|
||||
name: "TimeoutError",
|
||||
code: "ETIMEDOUT",
|
||||
});
|
||||
req.destroy(error);
|
||||
reject(error);
|
||||
}
|
||||
else {
|
||||
msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`;
|
||||
logger?.warn?.(msg);
|
||||
}
|
||||
}, timeoutInMs);
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
|
||||
const DEFER_EVENT_LISTENER_TIME$1 = 3000;
|
||||
const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => {
|
||||
if (keepAlive !== true) {
|
||||
@@ -19442,12 +19463,12 @@ const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs
|
||||
};
|
||||
|
||||
const DEFER_EVENT_LISTENER_TIME = 3000;
|
||||
const setSocketTimeout = (request, reject, timeoutInMs = DEFAULT_REQUEST_TIMEOUT) => {
|
||||
const setSocketTimeout = (request, reject, timeoutInMs = 0) => {
|
||||
const registerTimeout = (offset) => {
|
||||
const timeout = timeoutInMs - offset;
|
||||
const onTimeout = () => {
|
||||
request.destroy();
|
||||
reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" }));
|
||||
reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" }));
|
||||
};
|
||||
if (request.socket) {
|
||||
request.socket.setTimeout(timeout, onTimeout);
|
||||
@@ -19569,13 +19590,15 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
||||
});
|
||||
}
|
||||
resolveDefaultConfig(options) {
|
||||
const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent } = options || {};
|
||||
const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, } = options || {};
|
||||
const keepAlive = true;
|
||||
const maxSockets = 50;
|
||||
return {
|
||||
connectionTimeout,
|
||||
requestTimeout: requestTimeout ?? socketTimeout,
|
||||
requestTimeout,
|
||||
socketTimeout,
|
||||
socketAcquisitionWarningTimeout,
|
||||
throwOnRequestTimeout,
|
||||
httpAgent: (() => {
|
||||
if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") {
|
||||
return httpAgent;
|
||||
@@ -19693,7 +19716,8 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
||||
}
|
||||
const effectiveRequestTimeout = requestTimeout ?? this.config.requestTimeout;
|
||||
timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout));
|
||||
timeouts.push(setSocketTimeout(req, reject, effectiveRequestTimeout));
|
||||
timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, this.config.throwOnRequestTimeout, this.config.logger ?? console));
|
||||
timeouts.push(setSocketTimeout(req, reject, this.config.socketTimeout));
|
||||
const httpAgent = nodeHttpsOptions.agent;
|
||||
if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
|
||||
timeouts.push(setSocketKeepAlive(req, {
|
||||
|
||||
Reference in New Issue
Block a user