@aws-sdk/client-lambda-web 3.1145.0
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/LICENSE +201 -0
- package/README.md +321 -0
- package/dist-cjs/index.js +1555 -0
- package/dist-es/LambdaWeb.js +69 -0
- package/dist-es/LambdaWebClient.js +47 -0
- package/dist-es/auth/httpAuthExtensionConfiguration.js +38 -0
- package/dist-es/auth/httpAuthSchemeProvider.js +40 -0
- package/dist-es/commandBuilder.js +6 -0
- package/dist-es/commands/CreateWebFunctionCommand.js +4 -0
- package/dist-es/commands/CreateWebFunctionEndpointCommand.js +4 -0
- package/dist-es/commands/CreateWebFunctionRevisionCommand.js +4 -0
- package/dist-es/commands/DeleteResourcePolicyCommand.js +4 -0
- package/dist-es/commands/DeleteWebFunctionCommand.js +4 -0
- package/dist-es/commands/DeleteWebFunctionEndpointCommand.js +4 -0
- package/dist-es/commands/DeleteWebFunctionRevisionCommand.js +4 -0
- package/dist-es/commands/GetResourcePolicyCommand.js +4 -0
- package/dist-es/commands/GetWebAccountSettingsCommand.js +4 -0
- package/dist-es/commands/GetWebFunctionCommand.js +4 -0
- package/dist-es/commands/GetWebFunctionEndpointCommand.js +4 -0
- package/dist-es/commands/GetWebFunctionRevisionCommand.js +4 -0
- package/dist-es/commands/ListTagsCommand.js +4 -0
- package/dist-es/commands/ListWebFunctionEndpointsCommand.js +4 -0
- package/dist-es/commands/ListWebFunctionRevisionsCommand.js +4 -0
- package/dist-es/commands/ListWebFunctionsCommand.js +4 -0
- package/dist-es/commands/PutResourcePolicyCommand.js +4 -0
- package/dist-es/commands/TagResourceCommand.js +4 -0
- package/dist-es/commands/UntagResourceCommand.js +4 -0
- package/dist-es/commands/UpdateWebFunctionEndpointCommand.js +4 -0
- package/dist-es/commands/index.js +20 -0
- package/dist-es/endpoint/EndpointParameters.js +13 -0
- package/dist-es/endpoint/bdd.js +46 -0
- package/dist-es/endpoint/endpointResolver.js +14 -0
- package/dist-es/extensionConfiguration.js +1 -0
- package/dist-es/index.js +11 -0
- package/dist-es/models/LambdaWebServiceException.js +8 -0
- package/dist-es/models/enums.js +48 -0
- package/dist-es/models/errors.js +111 -0
- package/dist-es/models/models_0.js +1 -0
- package/dist-es/pagination/Interfaces.js +1 -0
- package/dist-es/pagination/ListWebFunctionEndpointsPaginator.js +4 -0
- package/dist-es/pagination/ListWebFunctionRevisionsPaginator.js +4 -0
- package/dist-es/pagination/ListWebFunctionsPaginator.js +4 -0
- package/dist-es/pagination/index.js +4 -0
- package/dist-es/runtimeConfig.browser.js +29 -0
- package/dist-es/runtimeConfig.js +43 -0
- package/dist-es/runtimeConfig.native.js +9 -0
- package/dist-es/runtimeConfig.shared.js +40 -0
- package/dist-es/runtimeExtensions.js +9 -0
- package/dist-es/schemas/schemas_0.js +593 -0
- package/dist-es/waiters/index.js +6 -0
- package/dist-es/waiters/waitForWebFunctionActive.js +58 -0
- package/dist-es/waiters/waitForWebFunctionDeleted.js +34 -0
- package/dist-es/waiters/waitForWebFunctionEndpointActive.js +58 -0
- package/dist-es/waiters/waitForWebFunctionEndpointDeleted.js +34 -0
- package/dist-es/waiters/waitForWebFunctionEndpointUpdated.js +49 -0
- package/dist-es/waiters/waitForWebFunctionRevisionActive.js +49 -0
- package/dist-types/LambdaWeb.d.ts +217 -0
- package/dist-types/LambdaWebClient.d.ts +206 -0
- package/dist-types/auth/httpAuthExtensionConfiguration.d.ts +29 -0
- package/dist-types/auth/httpAuthSchemeProvider.d.ts +75 -0
- package/dist-types/commandBuilder.d.ts +18 -0
- package/dist-types/commands/CreateWebFunctionCommand.d.ts +188 -0
- package/dist-types/commands/CreateWebFunctionEndpointCommand.d.ts +162 -0
- package/dist-types/commands/CreateWebFunctionRevisionCommand.d.ts +162 -0
- package/dist-types/commands/DeleteResourcePolicyCommand.d.ts +88 -0
- package/dist-types/commands/DeleteWebFunctionCommand.d.ts +87 -0
- package/dist-types/commands/DeleteWebFunctionEndpointCommand.d.ts +88 -0
- package/dist-types/commands/DeleteWebFunctionRevisionCommand.d.ts +88 -0
- package/dist-types/commands/GetResourcePolicyCommand.d.ts +87 -0
- package/dist-types/commands/GetWebAccountSettingsCommand.d.ts +86 -0
- package/dist-types/commands/GetWebFunctionCommand.d.ts +91 -0
- package/dist-types/commands/GetWebFunctionEndpointCommand.d.ts +137 -0
- package/dist-types/commands/GetWebFunctionRevisionCommand.d.ts +128 -0
- package/dist-types/commands/ListTagsCommand.d.ts +88 -0
- package/dist-types/commands/ListWebFunctionEndpointsCommand.d.ts +128 -0
- package/dist-types/commands/ListWebFunctionRevisionsCommand.d.ts +106 -0
- package/dist-types/commands/ListWebFunctionsCommand.d.ts +102 -0
- package/dist-types/commands/PutResourcePolicyCommand.d.ts +95 -0
- package/dist-types/commands/TagResourceCommand.d.ts +93 -0
- package/dist-types/commands/UntagResourceCommand.d.ts +90 -0
- package/dist-types/commands/UpdateWebFunctionEndpointCommand.d.ts +158 -0
- package/dist-types/commands/index.d.ts +20 -0
- package/dist-types/endpoint/EndpointParameters.d.ts +50 -0
- package/dist-types/endpoint/bdd.d.ts +2 -0
- package/dist-types/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/extensionConfiguration.d.ts +9 -0
- package/dist-types/index.d.ts +19 -0
- package/dist-types/models/LambdaWebServiceException.d.ts +14 -0
- package/dist-types/models/enums.d.ts +120 -0
- package/dist-types/models/errors.d.ts +145 -0
- package/dist-types/models/models_0.d.ts +1554 -0
- package/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist-types/pagination/ListWebFunctionEndpointsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListWebFunctionRevisionsPaginator.d.ts +7 -0
- package/dist-types/pagination/ListWebFunctionsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +4 -0
- package/dist-types/runtimeConfig.browser.d.ts +57 -0
- package/dist-types/runtimeConfig.d.ts +57 -0
- package/dist-types/runtimeConfig.native.d.ts +56 -0
- package/dist-types/runtimeConfig.shared.d.ts +28 -0
- package/dist-types/runtimeExtensions.d.ts +17 -0
- package/dist-types/schemas/schemas_0.d.ts +90 -0
- package/dist-types/ts3.4/LambdaWeb.d.ts +424 -0
- package/dist-types/ts3.4/LambdaWebClient.d.ts +215 -0
- package/dist-types/ts3.4/auth/httpAuthExtensionConfiguration.d.ts +25 -0
- package/dist-types/ts3.4/auth/httpAuthSchemeProvider.d.ts +43 -0
- package/dist-types/ts3.4/commandBuilder.d.ts +40 -0
- package/dist-types/ts3.4/commands/CreateWebFunctionCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/CreateWebFunctionEndpointCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/CreateWebFunctionRevisionCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/DeleteResourcePolicyCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/DeleteWebFunctionCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/DeleteWebFunctionEndpointCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/DeleteWebFunctionRevisionCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetResourcePolicyCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/GetWebAccountSettingsCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/GetWebFunctionCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/GetWebFunctionEndpointCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/GetWebFunctionRevisionCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/ListTagsCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/ListWebFunctionEndpointsCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListWebFunctionRevisionsCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/ListWebFunctionsCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/PutResourcePolicyCommand.d.ts +39 -0
- package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/UpdateWebFunctionEndpointCommand.d.ts +42 -0
- package/dist-types/ts3.4/commands/index.d.ts +20 -0
- package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +51 -0
- package/dist-types/ts3.4/endpoint/bdd.d.ts +2 -0
- package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist-types/ts3.4/extensionConfiguration.d.ts +10 -0
- package/dist-types/ts3.4/index.d.ts +14 -0
- package/dist-types/ts3.4/models/LambdaWebServiceException.d.ts +9 -0
- package/dist-types/ts3.4/models/enums.d.ts +57 -0
- package/dist-types/ts3.4/models/errors.d.ts +52 -0
- package/dist-types/ts3.4/models/models_0.d.ts +364 -0
- package/dist-types/ts3.4/pagination/Interfaces.d.ts +5 -0
- package/dist-types/ts3.4/pagination/ListWebFunctionEndpointsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListWebFunctionRevisionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/ListWebFunctionsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +93 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +95 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +97 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +31 -0
- package/dist-types/ts3.4/runtimeExtensions.d.ts +11 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +85 -0
- package/dist-types/ts3.4/waiters/index.d.ts +6 -0
- package/dist-types/ts3.4/waiters/waitForWebFunctionActive.d.ts +15 -0
- package/dist-types/ts3.4/waiters/waitForWebFunctionDeleted.d.ts +16 -0
- package/dist-types/ts3.4/waiters/waitForWebFunctionEndpointActive.d.ts +15 -0
- package/dist-types/ts3.4/waiters/waitForWebFunctionEndpointDeleted.d.ts +16 -0
- package/dist-types/ts3.4/waiters/waitForWebFunctionEndpointUpdated.d.ts +15 -0
- package/dist-types/ts3.4/waiters/waitForWebFunctionRevisionActive.d.ts +15 -0
- package/dist-types/waiters/index.d.ts +6 -0
- package/dist-types/waiters/waitForWebFunctionActive.d.ts +15 -0
- package/dist-types/waiters/waitForWebFunctionDeleted.d.ts +16 -0
- package/dist-types/waiters/waitForWebFunctionEndpointActive.d.ts +15 -0
- package/dist-types/waiters/waitForWebFunctionEndpointDeleted.d.ts +16 -0
- package/dist-types/waiters/waitForWebFunctionEndpointUpdated.d.ts +15 -0
- package/dist-types/waiters/waitForWebFunctionRevisionActive.d.ts +15 -0
- package/package.json +69 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { createDefaultUserAgentProvider } from "@aws-sdk/core/client";
|
|
3
|
+
import { invalidProvider, loadConfigsForDefaultMode } from "@smithy/core/client";
|
|
4
|
+
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig, } from "@smithy/core/config";
|
|
5
|
+
import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/core/retry";
|
|
6
|
+
import { calculateBodyLength } from "@smithy/core/serde";
|
|
7
|
+
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
|
|
8
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
9
|
+
export const getRuntimeConfig = (config) => {
|
|
10
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
11
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
12
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
13
|
+
return {
|
|
14
|
+
...clientSharedValues,
|
|
15
|
+
...config,
|
|
16
|
+
runtime: "browser",
|
|
17
|
+
defaultsMode,
|
|
18
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
19
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
20
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
21
|
+
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
22
|
+
region: config?.region ?? invalidProvider("Region is missing"),
|
|
23
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
24
|
+
retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
|
|
25
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
26
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
|
|
27
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import packageInfo from "../package.json";
|
|
2
|
+
import { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion as awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS, } from "@aws-sdk/core/client";
|
|
3
|
+
import { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from "@aws-sdk/core/httpAuthSchemes";
|
|
4
|
+
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
5
|
+
import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/core/client";
|
|
6
|
+
import { loadConfig as loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig, } from "@smithy/core/config";
|
|
7
|
+
import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/core/retry";
|
|
8
|
+
import { calculateBodyLength } from "@smithy/core/serde";
|
|
9
|
+
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
|
|
10
|
+
import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
|
|
11
|
+
export const getRuntimeConfig = (config) => {
|
|
12
|
+
emitWarningIfUnsupportedVersion(process.version);
|
|
13
|
+
const defaultsMode = resolveDefaultsModeConfig(config);
|
|
14
|
+
const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
|
|
15
|
+
const clientSharedValues = getSharedRuntimeConfig(config);
|
|
16
|
+
awsCheckVersion(process.version);
|
|
17
|
+
const loaderConfig = {
|
|
18
|
+
profile: config?.profile,
|
|
19
|
+
logger: clientSharedValues.logger,
|
|
20
|
+
};
|
|
21
|
+
return {
|
|
22
|
+
...clientSharedValues,
|
|
23
|
+
...config,
|
|
24
|
+
runtime: "node",
|
|
25
|
+
defaultsMode,
|
|
26
|
+
authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
27
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
28
|
+
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
29
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
30
|
+
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
31
|
+
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
32
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
33
|
+
retryMode: config?.retryMode ??
|
|
34
|
+
loadNodeConfig({
|
|
35
|
+
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
36
|
+
default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
|
|
37
|
+
}, config),
|
|
38
|
+
streamCollector: config?.streamCollector ?? streamCollector,
|
|
39
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
40
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
41
|
+
userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
|
|
42
|
+
};
|
|
43
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
2
|
+
export const getRuntimeConfig = (config) => {
|
|
3
|
+
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
4
|
+
return {
|
|
5
|
+
...browserDefaults,
|
|
6
|
+
...config,
|
|
7
|
+
runtime: "react-native",
|
|
8
|
+
};
|
|
9
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AwsSdkSigV4Signer } from "@aws-sdk/core/httpAuthSchemes";
|
|
2
|
+
import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
|
|
3
|
+
import { Sha256 } from "@smithy/core/checksum";
|
|
4
|
+
import { NoOpLogger } from "@smithy/core/client";
|
|
5
|
+
import { parseUrl } from "@smithy/core/protocols";
|
|
6
|
+
import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@smithy/core/serde";
|
|
7
|
+
import { defaultLambdaWebHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
|
|
8
|
+
import { defaultEndpointResolver } from "./endpoint/endpointResolver";
|
|
9
|
+
import { errorTypeRegistries } from "./schemas/schemas_0";
|
|
10
|
+
export const getRuntimeConfig = (config) => {
|
|
11
|
+
return {
|
|
12
|
+
apiVersion: "2025-03-07",
|
|
13
|
+
base64Decoder: config?.base64Decoder ?? fromBase64,
|
|
14
|
+
base64Encoder: config?.base64Encoder ?? toBase64,
|
|
15
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
16
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
17
|
+
extensions: config?.extensions ?? [],
|
|
18
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultLambdaWebHttpAuthSchemeProvider,
|
|
19
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [
|
|
20
|
+
{
|
|
21
|
+
schemeId: "aws.auth#sigv4",
|
|
22
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
23
|
+
signer: new AwsSdkSigV4Signer(),
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
logger: config?.logger ?? new NoOpLogger(),
|
|
27
|
+
protocol: config?.protocol ?? AwsRestJsonProtocol,
|
|
28
|
+
protocolSettings: config?.protocolSettings ?? {
|
|
29
|
+
defaultNamespace: "com.amazonaws.lambdaweb",
|
|
30
|
+
errorTypeRegistries,
|
|
31
|
+
version: "2025-03-07",
|
|
32
|
+
serviceTarget: "LambdaWeb",
|
|
33
|
+
},
|
|
34
|
+
serviceId: config?.serviceId ?? "Lambda Web",
|
|
35
|
+
sha256: config?.sha256 ?? Sha256,
|
|
36
|
+
urlParser: config?.urlParser ?? parseUrl,
|
|
37
|
+
utf8Decoder: config?.utf8Decoder ?? fromUtf8,
|
|
38
|
+
utf8Encoder: config?.utf8Encoder ?? toUtf8,
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration } from "@aws-sdk/core/client";
|
|
2
|
+
import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/core/client";
|
|
3
|
+
import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/core/protocols";
|
|
4
|
+
import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
|
|
5
|
+
export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
6
|
+
const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
7
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
8
|
+
return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
9
|
+
};
|