backend v4 half

This commit is contained in:
2025-07-18 09:20:40 +02:00
parent aba7a506ad
commit 725516ad6c
4183 changed files with 217684 additions and 75056 deletions
@@ -83,11 +83,11 @@ var FetchHttpHandler = class _FetchHttpHandler {
}
destroy() {
}
async handle(request, { abortSignal } = {}) {
async handle(request, { abortSignal, requestTimeout: requestTimeout2 } = {}) {
if (!this.config) {
this.config = await this.configProvider;
}
const requestTimeoutInMs = this.config.requestTimeout;
const requestTimeoutInMs = requestTimeout2 ?? this.config.requestTimeout;
const keepAlive = this.config.keepAlive === true;
const credentials = this.config.credentials;
if (abortSignal?.aborted) {
@@ -1,7 +1,7 @@
import { HttpResponse } from "@smithy/protocol-http";
import { buildQueryString } from "@smithy/querystring-builder";
import { createRequest } from "./create-request";
import { requestTimeout } from "./request-timeout";
import { requestTimeout as requestTimeoutFn } from "./request-timeout";
export const keepAliveSupport = {
supported: undefined,
};
@@ -26,11 +26,11 @@ export class FetchHttpHandler {
}
destroy() {
}
async handle(request, { abortSignal } = {}) {
async handle(request, { abortSignal, requestTimeout } = {}) {
if (!this.config) {
this.config = await this.configProvider;
}
const requestTimeoutInMs = this.config.requestTimeout;
const requestTimeoutInMs = requestTimeout ?? this.config.requestTimeout;
const keepAlive = this.config.keepAlive === true;
const credentials = this.config.credentials;
if (abortSignal?.aborted) {
@@ -105,7 +105,7 @@ export class FetchHttpHandler {
}),
};
}),
requestTimeout(requestTimeoutInMs),
requestTimeoutFn(requestTimeoutInMs),
];
if (abortSignal) {
raceOfPromises.push(new Promise((resolve, reject) => {
@@ -33,7 +33,7 @@ export declare class FetchHttpHandler implements HttpHandler<FetchHttpHandlerOpt
static create(instanceOrOptions?: HttpHandler<any> | FetchHttpHandlerOptions | Provider<FetchHttpHandlerOptions | void>): FetchHttpHandler | HttpHandler<any>;
constructor(options?: FetchHttpHandlerOptions | Provider<FetchHttpHandlerOptions | void>);
destroy(): void;
handle(request: HttpRequest, { abortSignal }?: HttpHandlerOptions): Promise<{
handle(request: HttpRequest, { abortSignal, requestTimeout }?: HttpHandlerOptions): Promise<{
response: HttpResponse;
}>;
updateHttpClientConfig(key: keyof FetchHttpHandlerOptions, value: FetchHttpHandlerOptions[typeof key]): void;
@@ -33,7 +33,7 @@ export declare class FetchHttpHandler implements HttpHandler<FetchHttpHandlerOpt
static create(instanceOrOptions?: HttpHandler<any> | FetchHttpHandlerOptions | Provider<FetchHttpHandlerOptions | void>): FetchHttpHandler | HttpHandler<any>;
constructor(options?: FetchHttpHandlerOptions | Provider<FetchHttpHandlerOptions | void>);
destroy(): void;
handle(request: HttpRequest, { abortSignal }?: HttpHandlerOptions): Promise<{
handle(request: HttpRequest, { abortSignal, requestTimeout }?: HttpHandlerOptions): Promise<{
response: HttpResponse;
}>;
updateHttpClientConfig(key: keyof FetchHttpHandlerOptions, value: FetchHttpHandlerOptions[typeof key]): void;
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@smithy/fetch-http-handler",
"version": "5.0.4",
"version": "5.1.0",
"description": "Provides a way to make requests",
"scripts": {
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",