@@ -101,11 +101,9 @@ export function getArtifactsHandler({
101
101
const source = useParameter ? req . params . source : req . query . source ;
102
102
const bucket = useParameter ? req . params . bucket : req . query . bucket ;
103
103
const key = useParameter ? req . params [ 0 ] : req . query . key ;
104
- const {
105
- peek = 0 ,
106
- providerInfo = '' ,
107
- namespace : requestedNamespace ,
108
- } = req . query as Partial < ArtifactsQueryStrings > ;
104
+ const { peek = 0 , providerInfo = '' , namespace : requestedNamespace } = req . query as Partial <
105
+ ArtifactsQueryStrings
106
+ > ;
109
107
110
108
if ( ! source ) {
111
109
res . status ( 500 ) . send ( 'Storage source is missing from artifact request' ) ;
@@ -151,7 +149,9 @@ export function getArtifactsHandler({
151
149
}
152
150
153
151
namespace = requestedNamespace ;
154
- console . log ( `Getting storage artifact at: ${ source } : ${ bucket } /${ key } in namespace: ${ namespace } ` ) ;
152
+ console . log (
153
+ `Getting storage artifact at: ${ source } : ${ bucket } /${ key } in namespace: ${ namespace } ` ,
154
+ ) ;
155
155
156
156
let client : MinioClient ;
157
157
switch ( source ) {
@@ -245,7 +245,9 @@ function getHttpArtifactsHandler(
245
245
if ( auth . key . length > 0 ) {
246
246
// inject original request's value if exists, otherwise default to provided default value
247
247
const headerValue = req . headers [ auth . key ] || req . headers [ auth . key . toLowerCase ( ) ] ;
248
- headers [ auth . key ] = Array . isArray ( headerValue ) ? headerValue [ 0 ] : headerValue || auth . defaultValue ;
248
+ headers [ auth . key ] = Array . isArray ( headerValue )
249
+ ? headerValue [ 0 ]
250
+ : headerValue || auth . defaultValue ;
249
251
}
250
252
if ( ! isAllowedDomain ( url , allowedDomain ) ) {
251
253
res . status ( 500 ) . send ( `Domain not allowed.` ) ;
@@ -337,11 +339,11 @@ function getGCSArtifactHandler(
337
339
// escapes everything else.
338
340
const regex = new RegExp (
339
341
'^' +
340
- key
341
- . split ( / \* + / )
342
- . map ( escapeRegexChars )
343
- . join ( '.*' ) +
344
- '$' ,
342
+ key
343
+ . split ( / \* + / )
344
+ . map ( escapeRegexChars )
345
+ . join ( '.*' ) +
346
+ '$' ,
345
347
) ;
346
348
return regex . test ( f . name ) ;
347
349
} ) ;
0 commit comments