@@ -45,35 +45,34 @@ export const getRuntimeConfig = (config: S3ClientConfig) => {
45
45
const defaultConfigProvider = ( ) => defaultsMode ( ) . then ( loadConfigsForDefaultMode ) ;
46
46
const clientSharedValues = getSharedRuntimeConfig ( config ) ;
47
47
awsCheckVersion ( process . version ) ;
48
- const profileConfig = { profile : config ?. profile } ;
48
+ const loaderConfig = { profile : config ?. profile , logger : clientSharedValues . logger } ;
49
49
return {
50
50
...clientSharedValues ,
51
51
...config ,
52
52
runtime : "node" ,
53
53
defaultsMode,
54
54
authSchemePreference :
55
- config ?. authSchemePreference ?? loadNodeConfig ( NODE_AUTH_SCHEME_PREFERENCE_OPTIONS , profileConfig ) ,
55
+ config ?. authSchemePreference ?? loadNodeConfig ( NODE_AUTH_SCHEME_PREFERENCE_OPTIONS , loaderConfig ) ,
56
56
bodyLengthChecker : config ?. bodyLengthChecker ?? calculateBodyLength ,
57
57
credentialDefaultProvider : config ?. credentialDefaultProvider ?? credentialDefaultProvider ,
58
58
defaultUserAgentProvider :
59
59
config ?. defaultUserAgentProvider ??
60
60
createDefaultUserAgentProvider ( { serviceId : clientSharedValues . serviceId , clientVersion : packageInfo . version } ) ,
61
61
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 ) ,
64
63
eventStreamSerdeProvider : config ?. eventStreamSerdeProvider ?? eventStreamSerdeProvider ,
65
64
maxAttempts : config ?. maxAttempts ?? loadNodeConfig ( NODE_MAX_ATTEMPT_CONFIG_OPTIONS , config ) ,
66
65
md5 : config ?. md5 ?? Hash . bind ( null , "md5" ) ,
67
66
region :
68
67
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 } ) ,
70
69
requestChecksumCalculation :
71
70
config ?. requestChecksumCalculation ??
72
- loadNodeConfig ( NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS , profileConfig ) ,
71
+ loadNodeConfig ( NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS , loaderConfig ) ,
73
72
requestHandler : RequestHandler . create ( config ?. requestHandler ?? defaultConfigProvider ) ,
74
73
responseChecksumValidation :
75
74
config ?. responseChecksumValidation ??
76
- loadNodeConfig ( NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS , profileConfig ) ,
75
+ loadNodeConfig ( NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS , loaderConfig ) ,
77
76
retryMode :
78
77
config ?. retryMode ??
79
78
loadNodeConfig (
@@ -85,13 +84,13 @@ export const getRuntimeConfig = (config: S3ClientConfig) => {
85
84
) ,
86
85
sha1 : config ?. sha1 ?? Hash . bind ( null , "sha1" ) ,
87
86
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 ) ,
89
88
streamCollector : config ?. streamCollector ?? streamCollector ,
90
89
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 ) ,
92
91
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 ) ,
96
95
} ;
97
96
} ;
0 commit comments