chore: Update dist

This commit is contained in:
GitHub Actions
2025-10-14 03:03:27 +00:00
parent 76b4475187
commit 776d30ea75
2 changed files with 60 additions and 12 deletions
Generated Vendored
+30 -6
View File
@@ -19391,7 +19391,7 @@ const setConnectionTimeout = (request, reject, timeoutInMs = 0) => {
const registerTimeout = (offset) => { const registerTimeout = (offset) => {
const timeoutId = timing.setTimeout(() => { const timeoutId = timing.setTimeout(() => {
request.destroy(); 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", name: "TimeoutError",
})); }));
}, timeoutInMs - offset); }, 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); 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 DEFER_EVENT_LISTENER_TIME$1 = 3000;
const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => { const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => {
if (keepAlive !== true) { if (keepAlive !== true) {
@@ -19442,12 +19463,12 @@ const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs
}; };
const DEFER_EVENT_LISTENER_TIME = 3000; const DEFER_EVENT_LISTENER_TIME = 3000;
const setSocketTimeout = (request, reject, timeoutInMs = DEFAULT_REQUEST_TIMEOUT) => { const setSocketTimeout = (request, reject, timeoutInMs = 0) => {
const registerTimeout = (offset) => { const registerTimeout = (offset) => {
const timeout = timeoutInMs - offset; const timeout = timeoutInMs - offset;
const onTimeout = () => { const onTimeout = () => {
request.destroy(); 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) { if (request.socket) {
request.socket.setTimeout(timeout, onTimeout); request.socket.setTimeout(timeout, onTimeout);
@@ -19569,13 +19590,15 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
}); });
} }
resolveDefaultConfig(options) { resolveDefaultConfig(options) {
const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent } = options || {}; const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, } = options || {};
const keepAlive = true; const keepAlive = true;
const maxSockets = 50; const maxSockets = 50;
return { return {
connectionTimeout, connectionTimeout,
requestTimeout: requestTimeout ?? socketTimeout, requestTimeout,
socketTimeout,
socketAcquisitionWarningTimeout, socketAcquisitionWarningTimeout,
throwOnRequestTimeout,
httpAgent: (() => { httpAgent: (() => {
if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") { if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") {
return httpAgent; return httpAgent;
@@ -19693,7 +19716,8 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
} }
const effectiveRequestTimeout = requestTimeout ?? this.config.requestTimeout; const effectiveRequestTimeout = requestTimeout ?? this.config.requestTimeout;
timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout)); 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; const httpAgent = nodeHttpsOptions.agent;
if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
timeouts.push(setSocketKeepAlive(req, { timeouts.push(setSocketKeepAlive(req, {
Generated Vendored
+30 -6
View File
@@ -20252,7 +20252,7 @@ const setConnectionTimeout = (request, reject, timeoutInMs = 0) => {
const registerTimeout = (offset) => { const registerTimeout = (offset) => {
const timeoutId = timing.setTimeout(() => { const timeoutId = timing.setTimeout(() => {
request.destroy(); 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", name: "TimeoutError",
})); }));
}, timeoutInMs - offset); }, timeoutInMs - offset);
@@ -20280,6 +20280,27 @@ const setConnectionTimeout = (request, reject, timeoutInMs = 0) => {
return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2); 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 DEFER_EVENT_LISTENER_TIME$1 = 3000;
const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => { const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => {
if (keepAlive !== true) { if (keepAlive !== true) {
@@ -20303,12 +20324,12 @@ const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs
}; };
const DEFER_EVENT_LISTENER_TIME = 3000; const DEFER_EVENT_LISTENER_TIME = 3000;
const setSocketTimeout = (request, reject, timeoutInMs = DEFAULT_REQUEST_TIMEOUT) => { const setSocketTimeout = (request, reject, timeoutInMs = 0) => {
const registerTimeout = (offset) => { const registerTimeout = (offset) => {
const timeout = timeoutInMs - offset; const timeout = timeoutInMs - offset;
const onTimeout = () => { const onTimeout = () => {
request.destroy(); 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) { if (request.socket) {
request.socket.setTimeout(timeout, onTimeout); request.socket.setTimeout(timeout, onTimeout);
@@ -20430,13 +20451,15 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
}); });
} }
resolveDefaultConfig(options) { resolveDefaultConfig(options) {
const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent } = options || {}; const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, } = options || {};
const keepAlive = true; const keepAlive = true;
const maxSockets = 50; const maxSockets = 50;
return { return {
connectionTimeout, connectionTimeout,
requestTimeout: requestTimeout ?? socketTimeout, requestTimeout,
socketTimeout,
socketAcquisitionWarningTimeout, socketAcquisitionWarningTimeout,
throwOnRequestTimeout,
httpAgent: (() => { httpAgent: (() => {
if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") { if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") {
return httpAgent; return httpAgent;
@@ -20554,7 +20577,8 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
} }
const effectiveRequestTimeout = requestTimeout ?? this.config.requestTimeout; const effectiveRequestTimeout = requestTimeout ?? this.config.requestTimeout;
timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout)); 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; const httpAgent = nodeHttpsOptions.agent;
if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
timeouts.push(setSocketKeepAlive(req, { timeouts.push(setSocketKeepAlive(req, {