File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/credential-provider-node/src Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export const ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED";
42
42
* @see fromContainerMetadata The function used to source credentials from the
43
43
* ECS Container Metadata Service
44
44
*/
45
- export function defaultProvider ( init : FromIniInit & RemoteProviderInit & FromProcessInit = { } ) : CredentialProvider {
45
+ export const defaultProvider = ( init : FromIniInit & RemoteProviderInit & FromProcessInit = { } ) : CredentialProvider => {
46
46
const options = { profile : process . env [ ENV_PROFILE ] , ...init } ;
47
47
if ( ! options . loadedConfig ) options . loadedConfig = loadSharedConfigFiles ( init ) ;
48
48
const providers = [ fromIni ( options ) , fromProcess ( options ) , remoteProvider ( options ) ] ;
@@ -54,9 +54,9 @@ export function defaultProvider(init: FromIniInit & RemoteProviderInit & FromPro
54
54
( credentials ) => credentials . expiration !== undefined && credentials . expiration . getTime ( ) - Date . now ( ) < 300000 ,
55
55
( credentials ) => credentials . expiration !== undefined
56
56
) ;
57
- }
57
+ } ;
58
58
59
- function remoteProvider ( init : RemoteProviderInit ) : CredentialProvider {
59
+ const remoteProvider = ( init : RemoteProviderInit ) : CredentialProvider => {
60
60
if ( process . env [ ENV_CMDS_RELATIVE_URI ] || process . env [ ENV_CMDS_FULL_URI ] ) {
61
61
return fromContainerMetadata ( init ) ;
62
62
}
@@ -66,4 +66,4 @@ function remoteProvider(init: RemoteProviderInit): CredentialProvider {
66
66
}
67
67
68
68
return fromInstanceMetadata ( init ) ;
69
- }
69
+ } ;
You can’t perform that action at this time.
0 commit comments