File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
lib/metric/deprecated-images Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
- // @ts -expect-error it's a js library
2
1
import cfLogs from 'cf-logs' ;
3
2
4
3
// eslint-disable-next-line import/no-unresolved
5
4
import { DeprecatedImageDto } from './deprecated-image.dto' ;
6
5
7
6
const logger = cfLogs . Logger ( 'codefresh:containerLogger' ) ;
8
7
8
+ // eslint-disable-next-line no-control-regex
9
+ const DEPRECATED_IMAGE_REGEX = / ^ \u001b \[ 3 1 m \u001b \[ 1 m \[ D E P R E C A T I O N N O T I C E ] .+ ?S u g g e s t t h e a u t h o r o f (?< image > .+ ?) t o / ;
10
+
9
11
class DeprecatedImagesCollector {
10
12
11
13
private list : DeprecatedImageDto [ ] = [ ] ;
@@ -35,9 +37,7 @@ class DeprecatedImagesCollector {
35
37
}
36
38
37
39
private _parseImageName ( logText : string ) {
38
- // eslint-disable-next-line no-control-regex
39
- const regex = / ^ \u001b \[ 3 1 m \u001b \[ 1 m \[ D E P R E C A T I O N N O T I C E ] .+ ?S u g g e s t t h e a u t h o r o f (?< image > .+ ?) t o / ;
40
- const match = logText . match ( regex ) ;
40
+ const match = logText . match ( DEPRECATED_IMAGE_REGEX ) ;
41
41
return match ?. groups ?. image ?? null ;
42
42
}
43
43
}
You can’t perform that action at this time.
0 commit comments