File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6940,8 +6940,8 @@ const js_yaml_1 = __nccwpck_require__(1917);
69406940const core = __importStar ( __nccwpck_require__ ( 2186 ) ) ;
69416941const isString = ( value ) => typeof value === 'string' ;
69426942const isNotEmptyString = ( value ) => isString ( value ) && ! ! value ;
6943- const isJSON = ( value ) => isNotEmptyString ( value ) && / ^ { . * } $ / . test ( value ) ;
6944- const isYaml = ( value ) => isNotEmptyString ( value ) && ! isJSON ( value ) && / ^ [ a - z A - Z 0 - 9 - _ ] + ( \s + ) ? : / . test ( value ) ;
6943+ const isJSON = ( value ) => isNotEmptyString ( value ) && / ^ \{ ( ( . | \n ) * ) \ }$ / . test ( value ) ;
6944+ const isYaml = ( value ) => isNotEmptyString ( value ) && ! isJSON ( value ) && / ^ [ a - z A - Z 0 - 9 -_ \s \( \) ] + ( \s + ) ? : / . test ( value ) ;
69456945const parse = ( value ) => {
69466946 const str = value . trim ( ) ;
69476947 core . debug ( `Input map: ${ str } ` ) ;
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ import * as core from '@actions/core'
44const isString = ( value : any ) : value is string => typeof value === 'string'
55const isNotEmptyString = ( value : any ) : value is string => isString ( value ) && ! ! value
66
7- const isJSON = ( value : string ) : value is string => isNotEmptyString ( value ) && / ^ { . * } $ / . test ( value )
8- const isYaml = ( value : string ) : value is string => isNotEmptyString ( value ) && ! isJSON ( value ) && / ^ [ a - z A - Z 0 - 9 - _ ] + ( \s + ) ? : / . test ( value )
7+ const isJSON = ( value : string ) : value is string => isNotEmptyString ( value ) && / ^ \{ ( ( . | \n ) * ) \ }$ / . test ( value )
8+ const isYaml = ( value : string ) : value is string => isNotEmptyString ( value ) && ! isJSON ( value ) && / ^ [ a - z A - Z 0 - 9 -_ \s \( \) ] + ( \s + ) ? : / . test ( value )
99
1010export const parse = ( value : string ) : Record < string , any > => {
1111 const str = value . trim ( )
You can’t perform that action at this time.
0 commit comments