@@ -2979,6 +2979,25 @@ module.exports = require("child_process");
2979
2979
* For the full license information, please read the LICENSE file that
2980
2980
* was distributed with this source code.
2981
2981
*/
2982
+ var __createBinding = ( this && this . __createBinding ) || ( Object . create ? ( function ( o , m , k , k2 ) {
2983
+ if ( k2 === undefined ) k2 = k ;
2984
+ Object . defineProperty ( o , k2 , { enumerable : true , get : function ( ) { return m [ k ] ; } } ) ;
2985
+ } ) : ( function ( o , m , k , k2 ) {
2986
+ if ( k2 === undefined ) k2 = k ;
2987
+ o [ k2 ] = m [ k ] ;
2988
+ } ) ) ;
2989
+ var __setModuleDefault = ( this && this . __setModuleDefault ) || ( Object . create ? ( function ( o , v ) {
2990
+ Object . defineProperty ( o , "default" , { enumerable : true , value : v } ) ;
2991
+ } ) : function ( o , v ) {
2992
+ o [ "default" ] = v ;
2993
+ } ) ;
2994
+ var __importStar = ( this && this . __importStar ) || function ( mod ) {
2995
+ if ( mod && mod . __esModule ) return mod ;
2996
+ var result = { } ;
2997
+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
2998
+ __setModuleDefault ( result , mod ) ;
2999
+ return result ;
3000
+ } ;
2982
3001
var __awaiter = ( this && this . __awaiter ) || function ( thisArg , _arguments , P , generator ) {
2983
3002
function adopt ( value ) { return value instanceof P ? value : new P ( function ( resolve ) { resolve ( value ) ; } ) ; }
2984
3003
return new ( P || ( P = Promise ) ) ( function ( resolve , reject ) {
@@ -2988,14 +3007,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
2988
3007
step ( ( generator = generator . apply ( thisArg , _arguments || [ ] ) ) . next ( ) ) ;
2989
3008
} ) ;
2990
3009
} ;
2991
- var __importStar = ( this && this . __importStar ) || function ( mod ) {
2992
- if ( mod && mod . __esModule ) return mod ;
2993
- var result = { } ;
2994
- if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
2995
- result [ "default" ] = mod ;
2996
- return result ;
2997
- } ;
2998
3010
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
3011
+ exports . checkCommitMessages = void 0 ;
2999
3012
/**
3000
3013
* Imports
3001
3014
*/
@@ -3311,6 +3324,25 @@ function checkMode (stat, options) {
3311
3324
* For the full license information, please read the LICENSE file that
3312
3325
* was distributed with this source code.
3313
3326
*/
3327
+ var __createBinding = ( this && this . __createBinding ) || ( Object . create ? ( function ( o , m , k , k2 ) {
3328
+ if ( k2 === undefined ) k2 = k ;
3329
+ Object . defineProperty ( o , k2 , { enumerable : true , get : function ( ) { return m [ k ] ; } } ) ;
3330
+ } ) : ( function ( o , m , k , k2 ) {
3331
+ if ( k2 === undefined ) k2 = k ;
3332
+ o [ k2 ] = m [ k ] ;
3333
+ } ) ) ;
3334
+ var __setModuleDefault = ( this && this . __setModuleDefault ) || ( Object . create ? ( function ( o , v ) {
3335
+ Object . defineProperty ( o , "default" , { enumerable : true , value : v } ) ;
3336
+ } ) : function ( o , v ) {
3337
+ o [ "default" ] = v ;
3338
+ } ) ;
3339
+ var __importStar = ( this && this . __importStar ) || function ( mod ) {
3340
+ if ( mod && mod . __esModule ) return mod ;
3341
+ var result = { } ;
3342
+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
3343
+ __setModuleDefault ( result , mod ) ;
3344
+ return result ;
3345
+ } ;
3314
3346
var __awaiter = ( this && this . __awaiter ) || function ( thisArg , _arguments , P , generator ) {
3315
3347
function adopt ( value ) { return value instanceof P ? value : new P ( function ( resolve ) { resolve ( value ) ; } ) ; }
3316
3348
return new ( P || ( P = Promise ) ) ( function ( resolve , reject ) {
@@ -3320,13 +3352,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
3320
3352
step ( ( generator = generator . apply ( thisArg , _arguments || [ ] ) ) . next ( ) ) ;
3321
3353
} ) ;
3322
3354
} ;
3323
- var __importStar = ( this && this . __importStar ) || function ( mod ) {
3324
- if ( mod && mod . __esModule ) return mod ;
3325
- var result = { } ;
3326
- if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
3327
- result [ "default" ] = mod ;
3328
- return result ;
3329
- } ;
3330
3355
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
3331
3356
/**
3332
3357
* Imports
@@ -6543,17 +6568,24 @@ function octokitValidate(octokit) {
6543
6568
6544
6569
"use strict" ;
6545
6570
6571
+ var __importStar = ( this && this . __importStar ) || function ( mod ) {
6572
+ if ( mod && mod . __esModule ) return mod ;
6573
+ var result = { } ;
6574
+ if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
6575
+ result [ "default" ] = mod ;
6576
+ return result ;
6577
+ } ;
6546
6578
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
6547
- const os = __webpack_require__ ( 87 ) ;
6579
+ const os = __importStar ( __webpack_require__ ( 87 ) ) ;
6548
6580
/**
6549
6581
* Commands
6550
6582
*
6551
6583
* Command Format:
6552
- * ##[ name key=value; key=value] message
6584
+ * :: name key=value, key=value:: message
6553
6585
*
6554
6586
* Examples:
6555
- * ##[ warning] This is the user warning message
6556
- * ##[ set-secret name=mypassword]definitelyNotAPassword!
6587
+ * :: warning:: This is the message
6588
+ * :: set-env name=MY_VAR::some value
6557
6589
*/
6558
6590
function issueCommand ( command , properties , message ) {
6559
6591
const cmd = new Command ( command , properties , message ) ;
@@ -6578,34 +6610,53 @@ class Command {
6578
6610
let cmdStr = CMD_STRING + this . command ;
6579
6611
if ( this . properties && Object . keys ( this . properties ) . length > 0 ) {
6580
6612
cmdStr += ' ' ;
6613
+ let first = true ;
6581
6614
for ( const key in this . properties ) {
6582
6615
if ( this . properties . hasOwnProperty ( key ) ) {
6583
6616
const val = this . properties [ key ] ;
6584
6617
if ( val ) {
6585
- // safely append the val - avoid blowing up when attempting to
6586
- // call .replace() if message is not a string for some reason
6587
- cmdStr += `${ key } =${ escape ( `${ val || '' } ` ) } ,` ;
6618
+ if ( first ) {
6619
+ first = false ;
6620
+ }
6621
+ else {
6622
+ cmdStr += ',' ;
6623
+ }
6624
+ cmdStr += `${ key } =${ escapeProperty ( val ) } ` ;
6588
6625
}
6589
6626
}
6590
6627
}
6591
6628
}
6592
- cmdStr += CMD_STRING ;
6593
- // safely append the message - avoid blowing up when attempting to
6594
- // call .replace() if message is not a string for some reason
6595
- const message = `${ this . message || '' } ` ;
6596
- cmdStr += escapeData ( message ) ;
6629
+ cmdStr += `${ CMD_STRING } ${ escapeData ( this . message ) } ` ;
6597
6630
return cmdStr ;
6598
6631
}
6599
6632
}
6633
+ /**
6634
+ * Sanitizes an input into a string so it can be passed into issueCommand safely
6635
+ * @param input input to sanitize into a string
6636
+ */
6637
+ function toCommandValue ( input ) {
6638
+ if ( input === null || input === undefined ) {
6639
+ return '' ;
6640
+ }
6641
+ else if ( typeof input === 'string' || input instanceof String ) {
6642
+ return input ;
6643
+ }
6644
+ return JSON . stringify ( input ) ;
6645
+ }
6646
+ exports . toCommandValue = toCommandValue ;
6600
6647
function escapeData ( s ) {
6601
- return s . replace ( / \r / g, '%0D' ) . replace ( / \n / g, '%0A' ) ;
6648
+ return toCommandValue ( s )
6649
+ . replace ( / % / g, '%25' )
6650
+ . replace ( / \r / g, '%0D' )
6651
+ . replace ( / \n / g, '%0A' ) ;
6602
6652
}
6603
- function escape ( s ) {
6604
- return s
6653
+ function escapeProperty ( s ) {
6654
+ return toCommandValue ( s )
6655
+ . replace ( / % / g, '%25' )
6605
6656
. replace ( / \r / g, '%0D' )
6606
6657
. replace ( / \n / g, '%0A' )
6607
- . replace ( / ] / g, '%5D ' )
6608
- . replace ( / ; / g, '%3B ' ) ;
6658
+ . replace ( / : / g, '%3A ' )
6659
+ . replace ( / , / g, '%2C ' ) ;
6609
6660
}
6610
6661
//# sourceMappingURL=command.js.map
6611
6662
@@ -6866,10 +6917,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
6866
6917
step ( ( generator = generator . apply ( thisArg , _arguments || [ ] ) ) . next ( ) ) ;
6867
6918
} ) ;
6868
6919
} ;
6920
+ var __importStar = ( this && this . __importStar ) || function ( mod ) {
6921
+ if ( mod && mod . __esModule ) return mod ;
6922
+ var result = { } ;
6923
+ if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
6924
+ result [ "default" ] = mod ;
6925
+ return result ;
6926
+ } ;
6869
6927
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
6870
6928
const command_1 = __webpack_require__ ( 431 ) ;
6871
- const os = __webpack_require__ ( 87 ) ;
6872
- const path = __webpack_require__ ( 622 ) ;
6929
+ const os = __importStar ( __webpack_require__ ( 87 ) ) ;
6930
+ const path = __importStar ( __webpack_require__ ( 622 ) ) ;
6873
6931
/**
6874
6932
* The code to exit an action
6875
6933
*/
@@ -6890,11 +6948,13 @@ var ExitCode;
6890
6948
/**
6891
6949
* Sets env variable for this action and future actions in the job
6892
6950
* @param name the name of the variable to set
6893
- * @param val the value of the variable
6951
+ * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify
6894
6952
*/
6953
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6895
6954
function exportVariable ( name , val ) {
6896
- process . env [ name ] = val ;
6897
- command_1 . issueCommand ( 'set-env' , { name } , val ) ;
6955
+ const convertedVal = command_1 . toCommandValue ( val ) ;
6956
+ process . env [ name ] = convertedVal ;
6957
+ command_1 . issueCommand ( 'set-env' , { name } , convertedVal ) ;
6898
6958
}
6899
6959
exports . exportVariable = exportVariable ;
6900
6960
/**
@@ -6933,12 +6993,22 @@ exports.getInput = getInput;
6933
6993
* Sets the value of an output.
6934
6994
*
6935
6995
* @param name name of the output to set
6936
- * @param value value to store
6996
+ * @param value value to store. Non-string values will be converted to a string via JSON.stringify
6937
6997
*/
6998
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
6938
6999
function setOutput ( name , value ) {
6939
7000
command_1 . issueCommand ( 'set-output' , { name } , value ) ;
6940
7001
}
6941
7002
exports . setOutput = setOutput ;
7003
+ /**
7004
+ * Enables or disables the echoing of commands into stdout for the rest of the step.
7005
+ * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.
7006
+ *
7007
+ */
7008
+ function setCommandEcho ( enabled ) {
7009
+ command_1 . issue ( 'echo' , enabled ? 'on' : 'off' ) ;
7010
+ }
7011
+ exports . setCommandEcho = setCommandEcho ;
6942
7012
//-----------------------------------------------------------------------
6943
7013
// Results
6944
7014
//-----------------------------------------------------------------------
@@ -6955,6 +7025,13 @@ exports.setFailed = setFailed;
6955
7025
//-----------------------------------------------------------------------
6956
7026
// Logging Commands
6957
7027
//-----------------------------------------------------------------------
7028
+ /**
7029
+ * Gets whether Actions Step Debug is on or not
7030
+ */
7031
+ function isDebug ( ) {
7032
+ return process . env [ 'RUNNER_DEBUG' ] === '1' ;
7033
+ }
7034
+ exports . isDebug = isDebug ;
6958
7035
/**
6959
7036
* Writes debug message to user log
6960
7037
* @param message debug message
@@ -6965,18 +7042,18 @@ function debug(message) {
6965
7042
exports . debug = debug ;
6966
7043
/**
6967
7044
* Adds an error issue
6968
- * @param message error issue message
7045
+ * @param message error issue message. Errors will be converted to string via toString()
6969
7046
*/
6970
7047
function error ( message ) {
6971
- command_1 . issue ( 'error' , message ) ;
7048
+ command_1 . issue ( 'error' , message instanceof Error ? message . toString ( ) : message ) ;
6972
7049
}
6973
7050
exports . error = error ;
6974
7051
/**
6975
7052
* Adds an warning issue
6976
- * @param message warning issue message
7053
+ * @param message warning issue message. Errors will be converted to string via toString()
6977
7054
*/
6978
7055
function warning ( message ) {
6979
- command_1 . issue ( 'warning' , message ) ;
7056
+ command_1 . issue ( 'warning' , message instanceof Error ? message . toString ( ) : message ) ;
6980
7057
}
6981
7058
exports . warning = warning ;
6982
7059
/**
@@ -7034,8 +7111,9 @@ exports.group = group;
7034
7111
* Saves state for current action, the state can only be retrieved by this action's post job execution.
7035
7112
*
7036
7113
* @param name name of the state to store
7037
- * @param value value to store
7114
+ * @param value value to store. Non-string values will be converted to a string via JSON.stringify
7038
7115
*/
7116
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7039
7117
function saveState ( name , value ) {
7040
7118
command_1 . issueCommand ( 'save-state' , { name } , value ) ;
7041
7119
}
@@ -8620,14 +8698,27 @@ function sync (path, options) {
8620
8698
* For the full license information, please read the LICENSE file that
8621
8699
* was distributed with this source code.
8622
8700
*/
8701
+ var __createBinding = ( this && this . __createBinding ) || ( Object . create ? ( function ( o , m , k , k2 ) {
8702
+ if ( k2 === undefined ) k2 = k ;
8703
+ Object . defineProperty ( o , k2 , { enumerable : true , get : function ( ) { return m [ k ] ; } } ) ;
8704
+ } ) : ( function ( o , m , k , k2 ) {
8705
+ if ( k2 === undefined ) k2 = k ;
8706
+ o [ k2 ] = m [ k ] ;
8707
+ } ) ) ;
8708
+ var __setModuleDefault = ( this && this . __setModuleDefault ) || ( Object . create ? ( function ( o , v ) {
8709
+ Object . defineProperty ( o , "default" , { enumerable : true , value : v } ) ;
8710
+ } ) : function ( o , v ) {
8711
+ o [ "default" ] = v ;
8712
+ } ) ;
8623
8713
var __importStar = ( this && this . __importStar ) || function ( mod ) {
8624
8714
if ( mod && mod . __esModule ) return mod ;
8625
8715
var result = { } ;
8626
- if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
8627
- result [ "default" ] = mod ;
8716
+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
8717
+ __setModuleDefault ( result , mod ) ;
8628
8718
return result ;
8629
8719
} ;
8630
8720
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
8721
+ exports . getInputs = void 0 ;
8631
8722
/**
8632
8723
* Imports
8633
8724
*/
0 commit comments