@@ -42,12 +42,12 @@ const optionsFromArguments = function optionsFromArguments(args) {
4242 } else if ( args . length === 2 ) {
4343 options . bucket = stringOrOptions ;
4444 if ( typeof args [ 1 ] !== 'object' ) {
45- throw new Error ( ' Failed to configure S3Adapter. Arguments don\ 't make sense' ) ;
45+ throw new Error ( " Failed to configure S3Adapter. Arguments don't make sense" ) ;
4646 }
4747 otherOptions = args [ 1 ] ;
4848 } else if ( args . length > 2 ) {
4949 if ( typeof args [ 1 ] !== 'string' || typeof args [ 2 ] !== 'string' ) {
50- throw new Error ( ' Failed to configure S3Adapter. Arguments don\ 't make sense' ) ;
50+ throw new Error ( " Failed to configure S3Adapter. Arguments don't make sense" ) ;
5151 }
5252 options . accessKey = args [ 0 ] ;
5353 options . secretKey = args [ 1 ] ;
@@ -81,7 +81,7 @@ const optionsFromArguments = function optionsFromArguments(args) {
8181 options . bucket = s3overrides . params . Bucket ;
8282 }
8383 } else if ( args . length > 2 ) {
84- throw new Error ( ' Failed to configure S3Adapter. Arguments don\ 't make sense' ) ;
84+ throw new Error ( " Failed to configure S3Adapter. Arguments don't make sense" ) ;
8585 }
8686
8787 options = fromOptionsDictionaryOrDefault ( options , 's3overrides' , s3overrides ) ;
@@ -95,9 +95,19 @@ const optionsFromArguments = function optionsFromArguments(args) {
9595 options = fromEnvironmentOrDefault ( options , 'baseUrl' , 'S3_BASE_URL' , null ) ;
9696 options = fromEnvironmentOrDefault ( options , 'baseUrlDirect' , 'S3_BASE_URL_DIRECT' , false ) ;
9797 options = fromEnvironmentOrDefault ( options , 'signatureVersion' , 'S3_SIGNATURE_VERSION' , 'v4' ) ;
98- options = fromEnvironmentOrDefault ( options , 'globalCacheControl' , 'S3_GLOBAL_CACHE_CONTROL' , null ) ;
98+ options = fromEnvironmentOrDefault (
99+ options ,
100+ 'globalCacheControl' ,
101+ 'S3_GLOBAL_CACHE_CONTROL' ,
102+ null
103+ ) ;
99104 options = fromEnvironmentOrDefault ( options , 'presignedUrl' , 'S3_PRESIGNED_URL' , false ) ;
100- options = fromEnvironmentOrDefault ( options , 'presignedUrlExpires' , 'S3_PRESIGNED_URL_EXPIRES' , null ) ;
105+ options = fromEnvironmentOrDefault (
106+ options ,
107+ 'presignedUrlExpires' ,
108+ 'S3_PRESIGNED_URL_EXPIRES' ,
109+ null
110+ ) ;
101111 options = fromOptionsDictionaryOrDefault ( options , 'generateKey' , null ) ;
102112 options = fromOptionsDictionaryOrDefault ( options , 'validateFilename' , null ) ;
103113
0 commit comments