@@ -552,6 +552,7 @@ module.exports = function(dst, src) {
552552// We use any as a valid input type
553553/* eslint-disable @typescript-eslint/no-explicit-any */
554554Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
555+ exports . toCommandValue = void 0 ;
555556/**
556557 * Sanitizes an input into a string so it can be passed into issueCommand safely
557558 * @param input input to sanitize into a string
@@ -710,14 +711,27 @@ function serial(list, iterator, callback)
710711"use strict" ;
711712
712713// For internal use, subject to change.
714+ var __createBinding = ( this && this . __createBinding ) || ( Object . create ? ( function ( o , m , k , k2 ) {
715+ if ( k2 === undefined ) k2 = k ;
716+ Object . defineProperty ( o , k2 , { enumerable : true , get : function ( ) { return m [ k ] ; } } ) ;
717+ } ) : ( function ( o , m , k , k2 ) {
718+ if ( k2 === undefined ) k2 = k ;
719+ o [ k2 ] = m [ k ] ;
720+ } ) ) ;
721+ var __setModuleDefault = ( this && this . __setModuleDefault ) || ( Object . create ? ( function ( o , v ) {
722+ Object . defineProperty ( o , "default" , { enumerable : true , value : v } ) ;
723+ } ) : function ( o , v ) {
724+ o [ "default" ] = v ;
725+ } ) ;
713726var __importStar = ( this && this . __importStar ) || function ( mod ) {
714727 if ( mod && mod . __esModule ) return mod ;
715728 var result = { } ;
716- if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
717- result [ "default" ] = mod ;
729+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
730+ __setModuleDefault ( result , mod ) ;
718731 return result ;
719732} ;
720733Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
734+ exports . issueCommand = void 0 ;
721735// We use any as a valid input type
722736/* eslint-disable @typescript-eslint/no-explicit-any */
723737const fs = __importStar ( __webpack_require__ ( 747 ) ) ;
@@ -1629,14 +1643,27 @@ function parallel(list, iterator, callback)
16291643
16301644"use strict" ;
16311645
1646+ var __createBinding = ( this && this . __createBinding ) || ( Object . create ? ( function ( o , m , k , k2 ) {
1647+ if ( k2 === undefined ) k2 = k ;
1648+ Object . defineProperty ( o , k2 , { enumerable : true , get : function ( ) { return m [ k ] ; } } ) ;
1649+ } ) : ( function ( o , m , k , k2 ) {
1650+ if ( k2 === undefined ) k2 = k ;
1651+ o [ k2 ] = m [ k ] ;
1652+ } ) ) ;
1653+ var __setModuleDefault = ( this && this . __setModuleDefault ) || ( Object . create ? ( function ( o , v ) {
1654+ Object . defineProperty ( o , "default" , { enumerable : true , value : v } ) ;
1655+ } ) : function ( o , v ) {
1656+ o [ "default" ] = v ;
1657+ } ) ;
16321658var __importStar = ( this && this . __importStar ) || function ( mod ) {
16331659 if ( mod && mod . __esModule ) return mod ;
16341660 var result = { } ;
1635- if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
1636- result [ "default" ] = mod ;
1661+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
1662+ __setModuleDefault ( result , mod ) ;
16371663 return result ;
16381664} ;
16391665Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
1666+ exports . issue = exports . issueCommand = void 0 ;
16401667const os = __importStar ( __webpack_require__ ( 87 ) ) ;
16411668const utils_1 = __webpack_require__ ( 82 ) ;
16421669/**
@@ -3389,6 +3416,25 @@ exports.FetchError = FetchError;
33893416
33903417"use strict" ;
33913418
3419+ var __createBinding = ( this && this . __createBinding ) || ( Object . create ? ( function ( o , m , k , k2 ) {
3420+ if ( k2 === undefined ) k2 = k ;
3421+ Object . defineProperty ( o , k2 , { enumerable : true , get : function ( ) { return m [ k ] ; } } ) ;
3422+ } ) : ( function ( o , m , k , k2 ) {
3423+ if ( k2 === undefined ) k2 = k ;
3424+ o [ k2 ] = m [ k ] ;
3425+ } ) ) ;
3426+ var __setModuleDefault = ( this && this . __setModuleDefault ) || ( Object . create ? ( function ( o , v ) {
3427+ Object . defineProperty ( o , "default" , { enumerable : true , value : v } ) ;
3428+ } ) : function ( o , v ) {
3429+ o [ "default" ] = v ;
3430+ } ) ;
3431+ var __importStar = ( this && this . __importStar ) || function ( mod ) {
3432+ if ( mod && mod . __esModule ) return mod ;
3433+ var result = { } ;
3434+ if ( mod != null ) for ( var k in mod ) if ( k !== "default" && Object . hasOwnProperty . call ( mod , k ) ) __createBinding ( result , mod , k ) ;
3435+ __setModuleDefault ( result , mod ) ;
3436+ return result ;
3437+ } ;
33923438var __awaiter = ( this && this . __awaiter ) || function ( thisArg , _arguments , P , generator ) {
33933439 function adopt ( value ) { return value instanceof P ? value : new P ( function ( resolve ) { resolve ( value ) ; } ) ; }
33943440 return new ( P || ( P = Promise ) ) ( function ( resolve , reject ) {
@@ -3398,14 +3444,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
33983444 step ( ( generator = generator . apply ( thisArg , _arguments || [ ] ) ) . next ( ) ) ;
33993445 } ) ;
34003446} ;
3401- var __importStar = ( this && this . __importStar ) || function ( mod ) {
3402- if ( mod && mod . __esModule ) return mod ;
3403- var result = { } ;
3404- if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
3405- result [ "default" ] = mod ;
3406- return result ;
3407- } ;
34083447Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
3448+ exports . getState = exports . saveState = exports . group = exports . endGroup = exports . startGroup = exports . info = exports . warning = exports . error = exports . debug = exports . isDebug = exports . setFailed = exports . setCommandEcho = exports . setOutput = exports . getBooleanInput = exports . getMultilineInput = exports . getInput = exports . addPath = exports . setSecret = exports . exportVariable = exports . ExitCode = void 0 ;
34093449const command_1 = __webpack_require__ ( 431 ) ;
34103450const file_command_1 = __webpack_require__ ( 102 ) ;
34113451const utils_1 = __webpack_require__ ( 82 ) ;
@@ -3472,7 +3512,9 @@ function addPath(inputPath) {
34723512}
34733513exports . addPath = addPath ;
34743514/**
3475- * Gets the value of an input. The value is also trimmed.
3515+ * Gets the value of an input.
3516+ * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.
3517+ * Returns an empty string if the value is not defined.
34763518 *
34773519 * @param name name of the input to get
34783520 * @param options optional. See InputOptions.
@@ -3483,9 +3525,49 @@ function getInput(name, options) {
34833525 if ( options && options . required && ! val ) {
34843526 throw new Error ( `Input required and not supplied: ${ name } ` ) ;
34853527 }
3528+ if ( options && options . trimWhitespace === false ) {
3529+ return val ;
3530+ }
34863531 return val . trim ( ) ;
34873532}
34883533exports . getInput = getInput ;
3534+ /**
3535+ * Gets the values of an multiline input. Each value is also trimmed.
3536+ *
3537+ * @param name name of the input to get
3538+ * @param options optional. See InputOptions.
3539+ * @returns string[]
3540+ *
3541+ */
3542+ function getMultilineInput ( name , options ) {
3543+ const inputs = getInput ( name , options )
3544+ . split ( '\n' )
3545+ . filter ( x => x !== '' ) ;
3546+ return inputs ;
3547+ }
3548+ exports . getMultilineInput = getMultilineInput ;
3549+ /**
3550+ * Gets the input value of the boolean type in the YAML 1.2 "core schema" specification.
3551+ * Support boolean input list: `true | True | TRUE | false | False | FALSE` .
3552+ * The return value is also in boolean type.
3553+ * ref: https://yaml.org/spec/1.2/spec.html#id2804923
3554+ *
3555+ * @param name name of the input to get
3556+ * @param options optional. See InputOptions.
3557+ * @returns boolean
3558+ */
3559+ function getBooleanInput ( name , options ) {
3560+ const trueValue = [ 'true' , 'True' , 'TRUE' ] ;
3561+ const falseValue = [ 'false' , 'False' , 'FALSE' ] ;
3562+ const val = getInput ( name , options ) ;
3563+ if ( trueValue . includes ( val ) )
3564+ return true ;
3565+ if ( falseValue . includes ( val ) )
3566+ return false ;
3567+ throw new TypeError ( `Input does not meet YAML 1.2 "Core Schema" specification: ${ name } \n` +
3568+ `Support boolean input list: \`true | True | TRUE | false | False | FALSE\`` ) ;
3569+ }
3570+ exports . getBooleanInput = getBooleanInput ;
34893571/**
34903572 * Sets the value of an output.
34913573 *
0 commit comments