@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
1515} ) : function ( o , v ) {
1616 o [ "default" ] = v ;
1717} ) ;
18- var __importStar = ( this && this . __importStar ) || function ( mod ) {
19- if ( mod && mod . __esModule ) return mod ;
20- var result = { } ;
21- if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . prototype . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
22- __setModuleDefault ( result , mod ) ;
23- return result ;
24- } ;
18+ var __importStar = ( this && this . __importStar ) || ( function ( ) {
19+ var ownKeys = function ( o ) {
20+ ownKeys = Object . getOwnPropertyNames || function ( o ) {
21+ var ar = [ ] ;
22+ for ( var k in o ) if ( Object . prototype . hasOwnProperty . call ( o , k ) ) ar [ ar . length ] = k ;
23+ return ar ;
24+ } ;
25+ return ownKeys ( o ) ;
26+ } ;
27+ return function ( mod ) {
28+ if ( mod && mod . __esModule ) return mod ;
29+ var result = { } ;
30+ if ( mod != null ) for ( var k = ownKeys ( mod ) , i = 0 ; i < k . length ; i ++ ) if ( k [ i ] !== "default" ) __createBinding ( result , mod , k [ i ] ) ;
31+ __setModuleDefault ( result , mod ) ;
32+ return result ;
33+ } ;
34+ } ) ( ) ;
2535var __awaiter = ( this && this . __awaiter ) || function ( thisArg , _arguments , P , generator ) {
2636 function adopt ( value ) { return value instanceof P ? value : new P ( function ( resolve ) { resolve ( value ) ; } ) ; }
2737 return new ( P || ( P = Promise ) ) ( function ( resolve , reject ) {
@@ -32,7 +42,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
3242 } ) ;
3343} ;
3444Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
35- exports . setupEnvironment = exports . scanModel = exports . scanImage = exports . scanDirectory = void 0 ;
45+ exports . scanDirectory = scanDirectory ;
46+ exports . scanImage = scanImage ;
47+ exports . scanModel = scanModel ;
48+ exports . setupEnvironment = setupEnvironment ;
3649const core = __importStar ( require ( "@actions/core" ) ) ;
3750const exec = __importStar ( require ( "@actions/exec" ) ) ;
3851const fs = __importStar ( require ( "fs" ) ) ;
@@ -44,19 +57,16 @@ function scanDirectory(directoryPath, policy, outputPath, successfulExitCodes, a
4457 yield scan ( 'fs' , directoryPath , policy , outputPath , successfulExitCodes , additionalArgs ) ;
4558 } ) ;
4659}
47- exports . scanDirectory = scanDirectory ;
4860function scanImage ( imageName , policy , outputPath , successfulExitCodes , additionalArgs ) {
4961 return __awaiter ( this , void 0 , void 0 , function * ( ) {
5062 yield scan ( 'image' , imageName , policy , outputPath , successfulExitCodes , additionalArgs ) ;
5163 } ) ;
5264}
53- exports . scanImage = scanImage ;
5465function scanModel ( modelPath , policy , outputPath , successfulExitCodes , additionalArgs ) {
5566 return __awaiter ( this , void 0 , void 0 , function * ( ) {
5667 yield scan ( 'model' , modelPath , policy , outputPath , successfulExitCodes , additionalArgs ) ;
5768 } ) ;
5869}
59- exports . scanModel = scanModel ;
6070function scan ( scanType , target , policy , outputPath , successfulExitCodes , additionalArgs ) {
6171 return __awaiter ( this , void 0 , void 0 , function * ( ) {
6272 const resolvedPolicy = policy || 'mdc' ;
@@ -114,7 +124,6 @@ function setupEnvironment() {
114124 }
115125 } ) ;
116126}
117- exports . setupEnvironment = setupEnvironment ;
118127function resolveCliVersion ( ) {
119128 let version = process . env [ 'DEFENDER_VERSION' ] || 'latest' ;
120129 if ( version . includes ( '*' ) ) {
0 commit comments