@@ -45,35 +45,34 @@ export const getRuntimeConfig = (config: S3ClientConfig) => {
4545 const defaultConfigProvider = ( ) => defaultsMode ( ) . then ( loadConfigsForDefaultMode ) ;
4646 const clientSharedValues = getSharedRuntimeConfig ( config ) ;
4747 awsCheckVersion ( process . version ) ;
48- const profileConfig = { profile : config ?. profile } ;
48+ const loaderConfig = { profile : config ?. profile , logger : clientSharedValues . logger } ;
4949 return {
5050 ...clientSharedValues ,
5151 ...config ,
5252 runtime : "node" ,
5353 defaultsMode,
5454 authSchemePreference :
55- config ?. authSchemePreference ?? loadNodeConfig ( NODE_AUTH_SCHEME_PREFERENCE_OPTIONS , profileConfig ) ,
55+ config ?. authSchemePreference ?? loadNodeConfig ( NODE_AUTH_SCHEME_PREFERENCE_OPTIONS , loaderConfig ) ,
5656 bodyLengthChecker : config ?. bodyLengthChecker ?? calculateBodyLength ,
5757 credentialDefaultProvider : config ?. credentialDefaultProvider ?? credentialDefaultProvider ,
5858 defaultUserAgentProvider :
5959 config ?. defaultUserAgentProvider ??
6060 createDefaultUserAgentProvider ( { serviceId : clientSharedValues . serviceId , clientVersion : packageInfo . version } ) ,
6161 disableS3ExpressSessionAuth :
62- config ?. disableS3ExpressSessionAuth ??
63- loadNodeConfig ( NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS , profileConfig ) ,
62+ config ?. disableS3ExpressSessionAuth ?? loadNodeConfig ( NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS , loaderConfig ) ,
6463 eventStreamSerdeProvider : config ?. eventStreamSerdeProvider ?? eventStreamSerdeProvider ,
6564 maxAttempts : config ?. maxAttempts ?? loadNodeConfig ( NODE_MAX_ATTEMPT_CONFIG_OPTIONS , config ) ,
6665 md5 : config ?. md5 ?? Hash . bind ( null , "md5" ) ,
6766 region :
6867 config ?. region ??
69- loadNodeConfig ( NODE_REGION_CONFIG_OPTIONS , { ...NODE_REGION_CONFIG_FILE_OPTIONS , ...profileConfig } ) ,
68+ loadNodeConfig ( NODE_REGION_CONFIG_OPTIONS , { ...NODE_REGION_CONFIG_FILE_OPTIONS , ...loaderConfig } ) ,
7069 requestChecksumCalculation :
7170 config ?. requestChecksumCalculation ??
72- loadNodeConfig ( NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS , profileConfig ) ,
71+ loadNodeConfig ( NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS , loaderConfig ) ,
7372 requestHandler : RequestHandler . create ( config ?. requestHandler ?? defaultConfigProvider ) ,
7473 responseChecksumValidation :
7574 config ?. responseChecksumValidation ??
76- loadNodeConfig ( NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS , profileConfig ) ,
75+ loadNodeConfig ( NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS , loaderConfig ) ,
7776 retryMode :
7877 config ?. retryMode ??
7978 loadNodeConfig (
@@ -85,13 +84,13 @@ export const getRuntimeConfig = (config: S3ClientConfig) => {
8584 ) ,
8685 sha1 : config ?. sha1 ?? Hash . bind ( null , "sha1" ) ,
8786 sha256 : config ?. sha256 ?? Hash . bind ( null , "sha256" ) ,
88- sigv4aSigningRegionSet : config ?. sigv4aSigningRegionSet ?? loadNodeConfig ( NODE_SIGV4A_CONFIG_OPTIONS , profileConfig ) ,
87+ sigv4aSigningRegionSet : config ?. sigv4aSigningRegionSet ?? loadNodeConfig ( NODE_SIGV4A_CONFIG_OPTIONS , loaderConfig ) ,
8988 streamCollector : config ?. streamCollector ?? streamCollector ,
9089 streamHasher : config ?. streamHasher ?? streamHasher ,
91- useArnRegion : config ?. useArnRegion ?? loadNodeConfig ( NODE_USE_ARN_REGION_CONFIG_OPTIONS , profileConfig ) ,
90+ useArnRegion : config ?. useArnRegion ?? loadNodeConfig ( NODE_USE_ARN_REGION_CONFIG_OPTIONS , loaderConfig ) ,
9291 useDualstackEndpoint :
93- config ?. useDualstackEndpoint ?? loadNodeConfig ( NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS , profileConfig ) ,
94- useFipsEndpoint : config ?. useFipsEndpoint ?? loadNodeConfig ( NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS , profileConfig ) ,
95- userAgentAppId : config ?. userAgentAppId ?? loadNodeConfig ( NODE_APP_ID_CONFIG_OPTIONS , profileConfig ) ,
92+ config ?. useDualstackEndpoint ?? loadNodeConfig ( NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS , loaderConfig ) ,
93+ useFipsEndpoint : config ?. useFipsEndpoint ?? loadNodeConfig ( NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS , loaderConfig ) ,
94+ userAgentAppId : config ?. userAgentAppId ?? loadNodeConfig ( NODE_APP_ID_CONFIG_OPTIONS , loaderConfig ) ,
9695 } ;
9796} ;
0 commit comments