@aws-sdk/core
Advanced tools
+45
-50
@@ -1,50 +0,45 @@ | ||
| 'use strict'; | ||
| var client = require('@aws-sdk/core/client'); | ||
| var httpAuthSchemes = require('@aws-sdk/core/httpAuthSchemes'); | ||
| var protocols = require('@aws-sdk/core/protocols'); | ||
| exports.emitWarningIfUnsupportedVersion = client.emitWarningIfUnsupportedVersion; | ||
| exports.getLongPollPlugin = client.getLongPollPlugin; | ||
| exports.setCredentialFeature = client.setCredentialFeature; | ||
| exports.setFeature = client.setFeature; | ||
| exports.setTokenFeature = client.setTokenFeature; | ||
| exports.state = client.state; | ||
| exports.AWSSDKSigV4Signer = httpAuthSchemes.AwsSdkSigV4Signer; | ||
| exports.AwsSdkSigV4ASigner = httpAuthSchemes.AwsSdkSigV4ASigner; | ||
| exports.AwsSdkSigV4Signer = httpAuthSchemes.AwsSdkSigV4Signer; | ||
| exports.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS; | ||
| exports.NODE_SIGV4A_CONFIG_OPTIONS = httpAuthSchemes.NODE_SIGV4A_CONFIG_OPTIONS; | ||
| exports.getBearerTokenEnvKey = httpAuthSchemes.getBearerTokenEnvKey; | ||
| exports.resolveAWSSDKSigV4Config = httpAuthSchemes.resolveAwsSdkSigV4Config; | ||
| exports.resolveAwsSdkSigV4AConfig = httpAuthSchemes.resolveAwsSdkSigV4AConfig; | ||
| exports.resolveAwsSdkSigV4Config = httpAuthSchemes.resolveAwsSdkSigV4Config; | ||
| exports.validateSigningProperties = httpAuthSchemes.validateSigningProperties; | ||
| exports.AwsEc2QueryProtocol = protocols.AwsEc2QueryProtocol; | ||
| exports.AwsJson1_0Protocol = protocols.AwsJson1_0Protocol; | ||
| exports.AwsJson1_1Protocol = protocols.AwsJson1_1Protocol; | ||
| exports.AwsJsonRpcProtocol = protocols.AwsJsonRpcProtocol; | ||
| exports.AwsQueryProtocol = protocols.AwsQueryProtocol; | ||
| exports.AwsRestJsonProtocol = protocols.AwsRestJsonProtocol; | ||
| exports.AwsRestXmlProtocol = protocols.AwsRestXmlProtocol; | ||
| exports.AwsSmithyRpcV2CborProtocol = protocols.AwsSmithyRpcV2CborProtocol; | ||
| exports.JsonCodec = protocols.JsonCodec; | ||
| exports.JsonShapeDeserializer = protocols.JsonShapeDeserializer; | ||
| exports.JsonShapeSerializer = protocols.JsonShapeSerializer; | ||
| exports.QueryShapeSerializer = protocols.QueryShapeSerializer; | ||
| exports.XmlCodec = protocols.XmlCodec; | ||
| exports.XmlShapeDeserializer = protocols.XmlShapeDeserializer; | ||
| exports.XmlShapeSerializer = protocols.XmlShapeSerializer; | ||
| exports._toBool = protocols._toBool; | ||
| exports._toNum = protocols._toNum; | ||
| exports._toStr = protocols._toStr; | ||
| exports.awsExpectUnion = protocols.awsExpectUnion; | ||
| exports.loadJsonRpcErrorCode = protocols.loadJsonRpcErrorCode; | ||
| exports.loadRestJsonErrorCode = protocols.loadRestJsonErrorCode; | ||
| exports.loadRestXmlErrorCode = protocols.loadRestXmlErrorCode; | ||
| exports.parseJsonBody = protocols.parseJsonBody; | ||
| exports.parseJsonErrorBody = protocols.parseJsonErrorBody; | ||
| exports.parseXmlBody = protocols.parseXmlBody; | ||
| exports.parseXmlErrorBody = protocols.parseXmlErrorBody; | ||
| const { emitWarningIfUnsupportedVersion, getLongPollPlugin, setCredentialFeature, setFeature, setTokenFeature, state } = require("@aws-sdk/core/client"); | ||
| exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion; | ||
| exports.getLongPollPlugin = getLongPollPlugin; | ||
| exports.setCredentialFeature = setCredentialFeature; | ||
| exports.setFeature = setFeature; | ||
| exports.setTokenFeature = setTokenFeature; | ||
| exports.state = state; | ||
| const { AwsSdkSigV4Signer: AWSSDKSigV4Signer, AwsSdkSigV4ASigner, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, NODE_SIGV4A_CONFIG_OPTIONS, getBearerTokenEnvKey, resolveAwsSdkSigV4Config: resolveAWSSDKSigV4Config, resolveAwsSdkSigV4AConfig, resolveAwsSdkSigV4Config, validateSigningProperties } = require("@aws-sdk/core/httpAuthSchemes"); | ||
| exports.AWSSDKSigV4Signer = AWSSDKSigV4Signer; | ||
| exports.AwsSdkSigV4ASigner = AwsSdkSigV4ASigner; | ||
| exports.AwsSdkSigV4Signer = AwsSdkSigV4Signer; | ||
| exports.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = NODE_AUTH_SCHEME_PREFERENCE_OPTIONS; | ||
| exports.NODE_SIGV4A_CONFIG_OPTIONS = NODE_SIGV4A_CONFIG_OPTIONS; | ||
| exports.getBearerTokenEnvKey = getBearerTokenEnvKey; | ||
| exports.resolveAWSSDKSigV4Config = resolveAWSSDKSigV4Config; | ||
| exports.resolveAwsSdkSigV4AConfig = resolveAwsSdkSigV4AConfig; | ||
| exports.resolveAwsSdkSigV4Config = resolveAwsSdkSigV4Config; | ||
| exports.validateSigningProperties = validateSigningProperties; | ||
| const { AwsEc2QueryProtocol, AwsJson1_0Protocol, AwsJson1_1Protocol, AwsJsonRpcProtocol, AwsQueryProtocol, AwsRestJsonProtocol, AwsRestXmlProtocol, AwsSmithyRpcV2CborProtocol, JsonCodec, JsonShapeDeserializer, JsonShapeSerializer, QueryShapeSerializer, XmlCodec, XmlShapeDeserializer, XmlShapeSerializer, _toBool, _toNum, _toStr, awsExpectUnion, loadJsonRpcErrorCode, loadRestJsonErrorCode, loadRestXmlErrorCode, parseJsonBody, parseJsonErrorBody, parseXmlBody, parseXmlErrorBody } = require("@aws-sdk/core/protocols"); | ||
| exports.AwsEc2QueryProtocol = AwsEc2QueryProtocol; | ||
| exports.AwsJson1_0Protocol = AwsJson1_0Protocol; | ||
| exports.AwsJson1_1Protocol = AwsJson1_1Protocol; | ||
| exports.AwsJsonRpcProtocol = AwsJsonRpcProtocol; | ||
| exports.AwsQueryProtocol = AwsQueryProtocol; | ||
| exports.AwsRestJsonProtocol = AwsRestJsonProtocol; | ||
| exports.AwsRestXmlProtocol = AwsRestXmlProtocol; | ||
| exports.AwsSmithyRpcV2CborProtocol = AwsSmithyRpcV2CborProtocol; | ||
| exports.JsonCodec = JsonCodec; | ||
| exports.JsonShapeDeserializer = JsonShapeDeserializer; | ||
| exports.JsonShapeSerializer = JsonShapeSerializer; | ||
| exports.QueryShapeSerializer = QueryShapeSerializer; | ||
| exports.XmlCodec = XmlCodec; | ||
| exports.XmlShapeDeserializer = XmlShapeDeserializer; | ||
| exports.XmlShapeSerializer = XmlShapeSerializer; | ||
| exports._toBool = _toBool; | ||
| exports._toNum = _toNum; | ||
| exports._toStr = _toStr; | ||
| exports.awsExpectUnion = awsExpectUnion; | ||
| exports.loadJsonRpcErrorCode = loadJsonRpcErrorCode; | ||
| exports.loadRestJsonErrorCode = loadRestJsonErrorCode; | ||
| exports.loadRestXmlErrorCode = loadRestXmlErrorCode; | ||
| exports.parseJsonBody = parseJsonBody; | ||
| exports.parseJsonErrorBody = parseJsonErrorBody; | ||
| exports.parseXmlBody = parseXmlBody; | ||
| exports.parseXmlErrorBody = parseXmlErrorBody; |
@@ -1,5 +0,3 @@ | ||
| 'use strict'; | ||
| const { normalizeProvider } = require("@smithy/core/client"); | ||
| var client = require('@smithy/core/client'); | ||
| const DEFAULT_ACCOUNT_ID_ENDPOINT_MODE = "preferred"; | ||
@@ -13,3 +11,3 @@ const ACCOUNT_ID_ENDPOINT_MODE_VALUES = ["disabled", "preferred", "required"]; | ||
| const { accountIdEndpointMode } = input; | ||
| const accountIdEndpointModeProvider = client.normalizeProvider(accountIdEndpointMode ?? DEFAULT_ACCOUNT_ID_ENDPOINT_MODE); | ||
| const accountIdEndpointModeProvider = normalizeProvider(accountIdEndpointMode ?? DEFAULT_ACCOUNT_ID_ENDPOINT_MODE); | ||
| return Object.assign(input, { | ||
@@ -16,0 +14,0 @@ accountIdEndpointMode: async () => { |
@@ -1,9 +0,12 @@ | ||
| 'use strict'; | ||
| const { Retry, RETRY_MODES } = require("@smithy/core/retry"); | ||
| const { HttpRequest, parseUrl } = require("@smithy/core/protocols"); | ||
| const { normalizeProvider } = require("@smithy/core"); | ||
| const { isValidHostLabel, isIpAddress, customEndpointFunctions } = require("@smithy/core/endpoints"); | ||
| const { EndpointError, resolveEndpoint } = require("@smithy/core/endpoints"); | ||
| exports.EndpointError = EndpointError; | ||
| exports.isIpAddress = isIpAddress; | ||
| exports.resolveEndpoint = resolveEndpoint; | ||
| const { resolveRegionConfig } = require("@smithy/core/config"); | ||
| exports.resolveRegionConfig = resolveRegionConfig; | ||
| var retry = require('@smithy/core/retry'); | ||
| var protocols = require('@smithy/core/protocols'); | ||
| var core = require('@smithy/core'); | ||
| var endpoints = require('@smithy/core/endpoints'); | ||
| var config = require('@smithy/core/config'); | ||
| const longPollMiddleware = () => (next, context) => async (args) => { | ||
@@ -33,3 +36,3 @@ context.__retryLongPoll = true; | ||
| retry.Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true"; | ||
| Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true"; | ||
| function setFeature(context, feature, value) { | ||
@@ -59,3 +62,3 @@ if (!context.__aws_sdk_context) { | ||
| const hostHeaderMiddleware = (options) => (next) => async (args) => { | ||
| if (!protocols.HttpRequest.isInstance(args.request)) | ||
| if (!HttpRequest.isInstance(args.request)) | ||
| return next(args); | ||
@@ -154,3 +157,3 @@ const { request } = args; | ||
| function resolveUserAgentConfig(input) { | ||
| const normalizedAppIdProvider = core.normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID); | ||
| const normalizedAppIdProvider = normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID); | ||
| const { customUserAgent } = input; | ||
@@ -228,6 +231,6 @@ return Object.assign(input, { | ||
| switch (retryStrategy.mode) { | ||
| case retry.RETRY_MODES.ADAPTIVE: | ||
| case RETRY_MODES.ADAPTIVE: | ||
| setFeature(context, "RETRY_MODE_ADAPTIVE", "F"); | ||
| break; | ||
| case retry.RETRY_MODES.STANDARD: | ||
| case RETRY_MODES.STANDARD: | ||
| setFeature(context, "RETRY_MODE_STANDARD", "E"); | ||
@@ -296,3 +299,3 @@ break; | ||
| const { request } = args; | ||
| if (!protocols.HttpRequest.isInstance(request)) { | ||
| if (!HttpRequest.isInstance(request)) { | ||
| return next(args); | ||
@@ -374,3 +377,3 @@ } | ||
| const createUserAgentStringParsingProvider = ({ serviceId, clientVersion }) => async (config) => { | ||
| const module = await import('bowser'); | ||
| const module = require('bowser'); | ||
| const parse = module.parse ?? module.default.parse ?? (() => ""); | ||
@@ -457,3 +460,3 @@ const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent ? parse(window.navigator.userAgent) : undefined; | ||
| } | ||
| if (!endpoints.isValidHostLabel(value)) { | ||
| if (!isValidHostLabel(value)) { | ||
| return false; | ||
@@ -467,3 +470,3 @@ } | ||
| } | ||
| if (endpoints.isIpAddress(value)) { | ||
| if (isIpAddress(value)) { | ||
| return false; | ||
@@ -498,3 +501,3 @@ } | ||
| }; | ||
| endpoints.customEndpointFunctions.aws = awsEndpointFunctions; | ||
| customEndpointFunctions.aws = awsEndpointFunctions; | ||
@@ -520,3 +523,3 @@ const resolveDefaultAwsRegionalEndpointsConfig = (input) => { | ||
| }; | ||
| const toEndpointV1 = (endpoint) => protocols.parseUrl(endpoint.url); | ||
| const toEndpointV1 = (endpoint) => parseUrl(endpoint.url); | ||
@@ -556,6 +559,2 @@ function stsRegionDefaultResolver() { | ||
| exports.EndpointError = endpoints.EndpointError; | ||
| exports.isIpAddress = endpoints.isIpAddress; | ||
| exports.resolveEndpoint = endpoints.resolveEndpoint; | ||
| exports.resolveRegionConfig = config.resolveRegionConfig; | ||
| exports.DEFAULT_UA_APP_ID = DEFAULT_UA_APP_ID; | ||
@@ -562,0 +561,0 @@ exports.NODE_APP_ID_CONFIG_OPTIONS = NODE_APP_ID_CONFIG_OPTIONS; |
@@ -1,14 +0,22 @@ | ||
| 'use strict'; | ||
| const { Retry, RETRY_MODES } = require("@smithy/core/retry"); | ||
| const { HttpRequest, parseUrl } = require("@smithy/core/protocols"); | ||
| const { InvokeStore } = require("@aws/lambda-invoke-store"); | ||
| const { normalizeProvider } = require("@smithy/core"); | ||
| const { platform, release } = require("node:os"); | ||
| const { versions, env } = require("node:process"); | ||
| const { booleanSelector, SelectorType, loadConfig, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS } = require("@smithy/core/config"); | ||
| const { REGION_ENV_NAME, REGION_INI_NAME, resolveRegionConfig } = require("@smithy/core/config"); | ||
| exports.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS; | ||
| exports.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS; | ||
| exports.REGION_ENV_NAME = REGION_ENV_NAME; | ||
| exports.REGION_INI_NAME = REGION_INI_NAME; | ||
| exports.resolveRegionConfig = resolveRegionConfig; | ||
| const { readFile } = require("node:fs/promises"); | ||
| const { normalize, sep, join } = require("node:path"); | ||
| const { isValidHostLabel, isIpAddress, customEndpointFunctions } = require("@smithy/core/endpoints"); | ||
| const { EndpointError, resolveEndpoint } = require("@smithy/core/endpoints"); | ||
| exports.EndpointError = EndpointError; | ||
| exports.isIpAddress = isIpAddress; | ||
| exports.resolveEndpoint = resolveEndpoint; | ||
| var retry = require('@smithy/core/retry'); | ||
| var protocols = require('@smithy/core/protocols'); | ||
| var lambdaInvokeStore = require('@aws/lambda-invoke-store'); | ||
| var core = require('@smithy/core'); | ||
| var node_os = require('node:os'); | ||
| var node_process = require('node:process'); | ||
| var config = require('@smithy/core/config'); | ||
| var promises = require('node:fs/promises'); | ||
| var node_path = require('node:path'); | ||
| var endpoints = require('@smithy/core/endpoints'); | ||
| const state = { | ||
@@ -63,3 +71,3 @@ warningEmitted: false, | ||
| retry.Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true"; | ||
| Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true"; | ||
| function setFeature(context, feature, value) { | ||
@@ -89,3 +97,3 @@ if (!context.__aws_sdk_context) { | ||
| const hostHeaderMiddleware = (options) => (next) => async (args) => { | ||
| if (!protocols.HttpRequest.isInstance(args.request)) | ||
| if (!HttpRequest.isInstance(args.request)) | ||
| return next(args); | ||
@@ -175,3 +183,3 @@ const { request } = args; | ||
| const { request } = args; | ||
| if (!protocols.HttpRequest.isInstance(request)) { | ||
| if (!HttpRequest.isInstance(request)) { | ||
| return next(args); | ||
@@ -186,3 +194,3 @@ } | ||
| const traceIdFromEnv = process.env[ENV_TRACE_ID]; | ||
| const invokeStore = await lambdaInvokeStore.InvokeStore.getInstanceAsync(); | ||
| const invokeStore = await InvokeStore.getInstanceAsync(); | ||
| const traceIdFromInvokeStore = invokeStore?.getXRayTraceId(); | ||
@@ -214,3 +222,3 @@ const traceId = traceIdFromInvokeStore ?? traceIdFromEnv; | ||
| function resolveUserAgentConfig(input) { | ||
| const normalizedAppIdProvider = core.normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID); | ||
| const normalizedAppIdProvider = normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID); | ||
| const { customUserAgent } = input; | ||
@@ -288,6 +296,6 @@ return Object.assign(input, { | ||
| switch (retryStrategy.mode) { | ||
| case retry.RETRY_MODES.ADAPTIVE: | ||
| case RETRY_MODES.ADAPTIVE: | ||
| setFeature(context, "RETRY_MODE_ADAPTIVE", "F"); | ||
| break; | ||
| case retry.RETRY_MODES.STANDARD: | ||
| case RETRY_MODES.STANDARD: | ||
| setFeature(context, "RETRY_MODE_STANDARD", "E"); | ||
@@ -356,3 +364,3 @@ break; | ||
| const { request } = args; | ||
| if (!protocols.HttpRequest.isInstance(request)) { | ||
| if (!HttpRequest.isInstance(request)) { | ||
| return next(args); | ||
@@ -436,7 +444,7 @@ } | ||
| for (const runtime of runtimesToCheck) { | ||
| if (node_process.versions[runtime]) { | ||
| return [`md/${runtime}`, node_process.versions[runtime]]; | ||
| if (versions[runtime]) { | ||
| return [`md/${runtime}`, versions[runtime]]; | ||
| } | ||
| } | ||
| return ["md/nodejs", node_process.versions.node]; | ||
| return ["md/nodejs", versions.node]; | ||
| }; | ||
@@ -449,6 +457,6 @@ | ||
| } | ||
| const normalizedPath = node_path.normalize(dirname); | ||
| const parts = normalizedPath.split(node_path.sep); | ||
| const normalizedPath = normalize(dirname); | ||
| const parts = normalizedPath.split(sep); | ||
| const nodeModulesIndex = parts.indexOf("node_modules"); | ||
| const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(node_path.sep) : normalizedPath; | ||
| const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(sep) : normalizedPath; | ||
| if (cwd === parentDir) { | ||
@@ -485,3 +493,3 @@ return [cwd]; | ||
| let tscVersion; | ||
| const TS_PACKAGE_JSON = node_path.join("node_modules", "typescript", "package.json"); | ||
| const TS_PACKAGE_JSON = join("node_modules", "typescript", "package.json"); | ||
| const getTypeScriptUserAgentPair = async () => { | ||
@@ -497,3 +505,3 @@ if (tscVersion === null) { | ||
| isTypeScriptDetectionDisabled = | ||
| config.booleanSelector(process.env, "AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED", config.SelectorType.ENV) || false; | ||
| booleanSelector(process.env, "AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED", SelectorType.ENV) || false; | ||
| } | ||
@@ -510,4 +518,4 @@ catch { } | ||
| try { | ||
| const appPackageJsonPath = node_path.join(nodeModulesParentDir, "package.json"); | ||
| const packageJson = await promises.readFile(appPackageJsonPath, "utf-8"); | ||
| const appPackageJsonPath = join(nodeModulesParentDir, "package.json"); | ||
| const packageJson = await readFile(appPackageJsonPath, "utf-8"); | ||
| const { dependencies, devDependencies } = JSON.parse(packageJson); | ||
@@ -531,4 +539,4 @@ const version = devDependencies?.typescript ?? dependencies?.typescript; | ||
| try { | ||
| const tsPackageJsonPath = node_path.join(nodeModulesParentDir, TS_PACKAGE_JSON); | ||
| const packageJson = await promises.readFile(tsPackageJsonPath, "utf-8"); | ||
| const tsPackageJsonPath = join(nodeModulesParentDir, TS_PACKAGE_JSON); | ||
| const packageJson = await readFile(tsPackageJsonPath, "utf-8"); | ||
| const { version } = JSON.parse(packageJson); | ||
@@ -575,3 +583,3 @@ const sanitizedVersion = getSanitizedTypeScriptVersion(version); | ||
| ["ua", "2.1"], | ||
| [`os/${node_os.platform()}`, node_os.release()], | ||
| [`os/${platform()}`, release()], | ||
| ["lang/js"], | ||
@@ -591,4 +599,4 @@ runtimeUserAgentPair, | ||
| } | ||
| if (node_process.env.AWS_EXECUTION_ENV) { | ||
| sections.push([`exec-env/${node_process.env.AWS_EXECUTION_ENV}`]); | ||
| if (env.AWS_EXECUTION_ENV) { | ||
| sections.push([`exec-env/${env.AWS_EXECUTION_ENV}`]); | ||
| } | ||
@@ -612,3 +620,3 @@ const appId = await config?.userAgentAppId?.(); | ||
| const createUserAgentStringParsingProvider = ({ serviceId, clientVersion }) => async (config) => { | ||
| const module = await import('bowser'); | ||
| const module = require('bowser'); | ||
| const parse = module.parse ?? module.default.parse ?? (() => ""); | ||
@@ -669,3 +677,3 @@ const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent ? parse(window.navigator.userAgent) : undefined; | ||
| } | ||
| if (!endpoints.isValidHostLabel(value)) { | ||
| if (!isValidHostLabel(value)) { | ||
| return false; | ||
@@ -679,3 +687,3 @@ } | ||
| } | ||
| if (endpoints.isIpAddress(value)) { | ||
| if (isIpAddress(value)) { | ||
| return false; | ||
@@ -710,3 +718,3 @@ } | ||
| }; | ||
| endpoints.customEndpointFunctions.aws = awsEndpointFunctions; | ||
| customEndpointFunctions.aws = awsEndpointFunctions; | ||
@@ -732,7 +740,7 @@ const resolveDefaultAwsRegionalEndpointsConfig = (input) => { | ||
| }; | ||
| const toEndpointV1 = (endpoint) => protocols.parseUrl(endpoint.url); | ||
| const toEndpointV1 = (endpoint) => parseUrl(endpoint.url); | ||
| function stsRegionDefaultResolver(loaderConfig = {}) { | ||
| return config.loadConfig({ | ||
| ...config.NODE_REGION_CONFIG_OPTIONS, | ||
| return loadConfig({ | ||
| ...NODE_REGION_CONFIG_OPTIONS, | ||
| async default() { | ||
@@ -744,3 +752,3 @@ if (!warning.silence) { | ||
| }, | ||
| }, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }); | ||
| }, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }); | ||
| } | ||
@@ -767,10 +775,2 @@ const warning = { | ||
| exports.NODE_REGION_CONFIG_FILE_OPTIONS = config.NODE_REGION_CONFIG_FILE_OPTIONS; | ||
| exports.NODE_REGION_CONFIG_OPTIONS = config.NODE_REGION_CONFIG_OPTIONS; | ||
| exports.REGION_ENV_NAME = config.REGION_ENV_NAME; | ||
| exports.REGION_INI_NAME = config.REGION_INI_NAME; | ||
| exports.resolveRegionConfig = config.resolveRegionConfig; | ||
| exports.EndpointError = endpoints.EndpointError; | ||
| exports.isIpAddress = endpoints.isIpAddress; | ||
| exports.resolveEndpoint = endpoints.resolveEndpoint; | ||
| exports.DEFAULT_UA_APP_ID = DEFAULT_UA_APP_ID; | ||
@@ -777,0 +777,0 @@ exports.NODE_APP_ID_CONFIG_OPTIONS = NODE_APP_ID_CONFIG_OPTIONS; |
@@ -1,9 +0,12 @@ | ||
| 'use strict'; | ||
| const { Retry, RETRY_MODES } = require("@smithy/core/retry"); | ||
| const { HttpRequest, parseUrl } = require("@smithy/core/protocols"); | ||
| const { normalizeProvider } = require("@smithy/core"); | ||
| const { isValidHostLabel, isIpAddress, customEndpointFunctions } = require("@smithy/core/endpoints"); | ||
| const { EndpointError, resolveEndpoint } = require("@smithy/core/endpoints"); | ||
| exports.EndpointError = EndpointError; | ||
| exports.isIpAddress = isIpAddress; | ||
| exports.resolveEndpoint = resolveEndpoint; | ||
| const { resolveRegionConfig } = require("@smithy/core/config"); | ||
| exports.resolveRegionConfig = resolveRegionConfig; | ||
| var retry = require('@smithy/core/retry'); | ||
| var protocols = require('@smithy/core/protocols'); | ||
| var core = require('@smithy/core'); | ||
| var endpoints = require('@smithy/core/endpoints'); | ||
| var config = require('@smithy/core/config'); | ||
| const longPollMiddleware = () => (next, context) => async (args) => { | ||
@@ -33,3 +36,3 @@ context.__retryLongPoll = true; | ||
| retry.Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true"; | ||
| Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true"; | ||
| function setFeature(context, feature, value) { | ||
@@ -59,3 +62,3 @@ if (!context.__aws_sdk_context) { | ||
| const hostHeaderMiddleware = (options) => (next) => async (args) => { | ||
| if (!protocols.HttpRequest.isInstance(args.request)) | ||
| if (!HttpRequest.isInstance(args.request)) | ||
| return next(args); | ||
@@ -154,3 +157,3 @@ const { request } = args; | ||
| function resolveUserAgentConfig(input) { | ||
| const normalizedAppIdProvider = core.normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID); | ||
| const normalizedAppIdProvider = normalizeProvider(input.userAgentAppId ?? DEFAULT_UA_APP_ID); | ||
| const { customUserAgent } = input; | ||
@@ -228,6 +231,6 @@ return Object.assign(input, { | ||
| switch (retryStrategy.mode) { | ||
| case retry.RETRY_MODES.ADAPTIVE: | ||
| case RETRY_MODES.ADAPTIVE: | ||
| setFeature(context, "RETRY_MODE_ADAPTIVE", "F"); | ||
| break; | ||
| case retry.RETRY_MODES.STANDARD: | ||
| case RETRY_MODES.STANDARD: | ||
| setFeature(context, "RETRY_MODE_STANDARD", "E"); | ||
@@ -296,3 +299,3 @@ break; | ||
| const { request } = args; | ||
| if (!protocols.HttpRequest.isInstance(request)) { | ||
| if (!HttpRequest.isInstance(request)) { | ||
| return next(args); | ||
@@ -393,3 +396,3 @@ } | ||
| const createUserAgentStringParsingProvider = ({ serviceId, clientVersion }) => async (config) => { | ||
| const module = await import('bowser'); | ||
| const module = require('bowser'); | ||
| const parse = module.parse ?? module.default.parse ?? (() => ""); | ||
@@ -450,3 +453,3 @@ const parsedUA = typeof window !== "undefined" && window?.navigator?.userAgent ? parse(window.navigator.userAgent) : undefined; | ||
| } | ||
| if (!endpoints.isValidHostLabel(value)) { | ||
| if (!isValidHostLabel(value)) { | ||
| return false; | ||
@@ -460,3 +463,3 @@ } | ||
| } | ||
| if (endpoints.isIpAddress(value)) { | ||
| if (isIpAddress(value)) { | ||
| return false; | ||
@@ -491,3 +494,3 @@ } | ||
| }; | ||
| endpoints.customEndpointFunctions.aws = awsEndpointFunctions; | ||
| customEndpointFunctions.aws = awsEndpointFunctions; | ||
@@ -513,3 +516,3 @@ const resolveDefaultAwsRegionalEndpointsConfig = (input) => { | ||
| }; | ||
| const toEndpointV1 = (endpoint) => protocols.parseUrl(endpoint.url); | ||
| const toEndpointV1 = (endpoint) => parseUrl(endpoint.url); | ||
@@ -549,6 +552,2 @@ function stsRegionDefaultResolver() { | ||
| exports.EndpointError = endpoints.EndpointError; | ||
| exports.isIpAddress = endpoints.isIpAddress; | ||
| exports.resolveEndpoint = endpoints.resolveEndpoint; | ||
| exports.resolveRegionConfig = config.resolveRegionConfig; | ||
| exports.DEFAULT_UA_APP_ID = DEFAULT_UA_APP_ID; | ||
@@ -555,0 +554,0 @@ exports.NODE_APP_ID_CONFIG_OPTIONS = NODE_APP_ID_CONFIG_OPTIONS; |
@@ -1,11 +0,9 @@ | ||
| 'use strict'; | ||
| const { HttpResponse, HttpRequest } = require("@smithy/core/protocols"); | ||
| const { normalizeProvider, memoizeIdentityProvider, isIdentityExpired, doesIdentityRequireRefresh } = require("@smithy/core"); | ||
| const { ProviderError } = require("@smithy/core/config"); | ||
| const { setCredentialFeature } = require("@aws-sdk/core/client"); | ||
| const { SignatureV4 } = require("@smithy/signature-v4"); | ||
| var protocols = require('@smithy/core/protocols'); | ||
| var core = require('@smithy/core'); | ||
| var config = require('@smithy/core/config'); | ||
| var client = require('@aws-sdk/core/client'); | ||
| var signatureV4 = require('@smithy/signature-v4'); | ||
| const getDateHeader = (response) => HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined; | ||
| const getDateHeader = (response) => protocols.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : undefined; | ||
| const getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset); | ||
@@ -48,3 +46,3 @@ | ||
| async sign(httpRequest, identity, signingProperties) { | ||
| if (!protocols.HttpRequest.isInstance(httpRequest)) { | ||
| if (!HttpRequest.isInstance(httpRequest)) { | ||
| throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); | ||
@@ -102,3 +100,3 @@ } | ||
| async sign(httpRequest, identity, signingProperties) { | ||
| if (!protocols.HttpRequest.isInstance(httpRequest)) { | ||
| if (!HttpRequest.isInstance(httpRequest)) { | ||
| throw new Error("The request is not an instance of `HttpRequest` and cannot be signed"); | ||
@@ -146,3 +144,3 @@ } | ||
| const resolveAwsSdkSigV4AConfig = (config) => { | ||
| config.sigv4aSigningRegionSet = core.normalizeProvider(config.sigv4aSigningRegionSet); | ||
| config.sigv4aSigningRegionSet = normalizeProvider(config.sigv4aSigningRegionSet); | ||
| return config; | ||
@@ -155,3 +153,3 @@ }; | ||
| } | ||
| throw new config.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", { | ||
| throw new ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", { | ||
| tryNextLink: true, | ||
@@ -164,3 +162,3 @@ }); | ||
| } | ||
| throw new config.ProviderError("sigv4a_signing_region_set not set in profile.", { | ||
| throw new ProviderError("sigv4a_signing_region_set not set in profile.", { | ||
| tryNextLink: true, | ||
@@ -193,3 +191,3 @@ }); | ||
| if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) { | ||
| return client.setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e"); | ||
| return setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e"); | ||
| } | ||
@@ -216,6 +214,6 @@ return attributedCreds; | ||
| if (config.signer) { | ||
| signer = core.normalizeProvider(config.signer); | ||
| signer = normalizeProvider(config.signer); | ||
| } | ||
| else if (config.regionInfoProvider) { | ||
| signer = () => core.normalizeProvider(config.region)() | ||
| signer = () => normalizeProvider(config.region)() | ||
| .then(async (region) => [ | ||
@@ -240,3 +238,3 @@ (await config.regionInfoProvider(region, { | ||
| }; | ||
| const SignerCtor = config.signerConstructor || signatureV4.SignatureV4; | ||
| const SignerCtor = config.signerConstructor || SignatureV4; | ||
| return new SignerCtor(params); | ||
@@ -250,3 +248,3 @@ }); | ||
| signingName: config.signingName || config.defaultSigningName, | ||
| signingRegion: await core.normalizeProvider(config.region)(), | ||
| signingRegion: await normalizeProvider(config.region)(), | ||
| properties: {}, | ||
@@ -266,3 +264,3 @@ }, authScheme); | ||
| }; | ||
| const SignerCtor = config.signerConstructor || signatureV4.SignatureV4; | ||
| const SignerCtor = config.signerConstructor || SignatureV4; | ||
| return new SignerCtor(params); | ||
@@ -283,3 +281,3 @@ }; | ||
| if (!credentials?.memoized) { | ||
| credentialsProvider = core.memoizeIdentityProvider(credentials, core.isIdentityExpired, core.doesIdentityRequireRefresh); | ||
| credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh); | ||
| } | ||
@@ -292,3 +290,3 @@ else { | ||
| if (credentialDefaultProvider) { | ||
| credentialsProvider = core.normalizeProvider(credentialDefaultProvider(Object.assign({}, config, { | ||
| credentialsProvider = normalizeProvider(credentialDefaultProvider(Object.assign({}, config, { | ||
| parentClientConfig: config, | ||
@@ -295,0 +293,0 @@ }))); |
@@ -1,5 +0,3 @@ | ||
| 'use strict'; | ||
| const { buildQueryString } = require("@smithy/core/protocols"); | ||
| var protocols = require('@smithy/core/protocols'); | ||
| const validate = (str) => typeof str === "string" && str.indexOf("arn:") === 0 && str.split(":").length >= 6; | ||
@@ -39,3 +37,3 @@ const parse = (arn) => { | ||
| } | ||
| let queryString = query ? protocols.buildQueryString(query) : ""; | ||
| let queryString = query ? buildQueryString(query) : ""; | ||
| if (queryString && queryString[0] !== "?") { | ||
@@ -42,0 +40,0 @@ queryString = `?${queryString}`; |
+8
-8
| { | ||
| "name": "@aws-sdk/core", | ||
| "version": "3.974.20", | ||
| "version": "3.974.21", | ||
| "description": "Core functions & classes shared by multiple AWS SDK clients.", | ||
| "scripts": { | ||
| "build": "yarn prebuild && yarn lint && concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs", | ||
| "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs", | ||
| "build:cjs": "node ../../scripts/compilation/inline && premove ./dist-cjs/api-extractor-type-index.js", | ||
| "build:es": "tsc -p tsconfig.es.json && premove ./dist-es/api-extractor-type-index.js", | ||
| "build:es": "premove dist-es && tsc -p tsconfig.es.json && premove ./dist-es/api-extractor-type-index.js", | ||
| "build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"", | ||
| "build:types": "premove dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json", | ||
| "build:types": "premove dist-types && premove dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json", | ||
| "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4", | ||
| "clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo", | ||
| "clean": "premove dist-cjs dist-es dist-types", | ||
| "extract:docs": "api-extractor run --local", | ||
| "lint": "node ../../scripts/validation/submodules-linter.js", | ||
| "prebuild": "node scripts/copy-partitions.js", | ||
| "prebuild": "node scripts/copy-partitions.js && yarn lint", | ||
| "test": "yarn g:vitest run", | ||
@@ -113,4 +113,4 @@ "test:watch": "yarn g:vitest watch", | ||
| "dependencies": { | ||
| "@aws-sdk/types": "^3.973.12", | ||
| "@aws-sdk/xml-builder": "^3.972.29", | ||
| "@aws-sdk/types": "^3.973.13", | ||
| "@aws-sdk/xml-builder": "^3.972.30", | ||
| "@aws/lambda-invoke-store": "^0.2.2", | ||
@@ -117,0 +117,0 @@ "@smithy/core": "^3.24.6", |
Sorry, the diff of this file is too big to display
527506
0.05%12433
-0.02%Updated