@@ -1336,6 +1336,32 @@ function parseJson (txt, reviver, context) {
1336
1336
}
1337
1337
1338
1338
1339
+ /***/ } ) ,
1340
+
1341
+ /***/ 82 :
1342
+ /***/ ( function ( __unusedmodule , exports ) {
1343
+
1344
+ "use strict" ;
1345
+
1346
+ // We use any as a valid input type
1347
+ /* eslint-disable @typescript-eslint/no-explicit-any */
1348
+ Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
1349
+ /**
1350
+ * Sanitizes an input into a string so it can be passed into issueCommand safely
1351
+ * @param input input to sanitize into a string
1352
+ */
1353
+ function toCommandValue ( input ) {
1354
+ if ( input === null || input === undefined ) {
1355
+ return '' ;
1356
+ }
1357
+ else if ( typeof input === 'string' || input instanceof String ) {
1358
+ return input ;
1359
+ }
1360
+ return JSON . stringify ( input ) ;
1361
+ }
1362
+ exports . toCommandValue = toCommandValue ;
1363
+ //# sourceMappingURL=utils.js.map
1364
+
1339
1365
/***/ } ) ,
1340
1366
1341
1367
/***/ 87 :
@@ -1468,6 +1494,42 @@ function legacy (fs) {
1468
1494
}
1469
1495
1470
1496
1497
+ /***/ } ) ,
1498
+
1499
+ /***/ 102 :
1500
+ /***/ ( function ( __unusedmodule , exports , __webpack_require__ ) {
1501
+
1502
+ "use strict" ;
1503
+
1504
+ // For internal use, subject to change.
1505
+ var __importStar = ( this && this . __importStar ) || function ( mod ) {
1506
+ if ( mod && mod . __esModule ) return mod ;
1507
+ var result = { } ;
1508
+ if ( mod != null ) for ( var k in mod ) if ( Object . hasOwnProperty . call ( mod , k ) ) result [ k ] = mod [ k ] ;
1509
+ result [ "default" ] = mod ;
1510
+ return result ;
1511
+ } ;
1512
+ Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
1513
+ // We use any as a valid input type
1514
+ /* eslint-disable @typescript-eslint/no-explicit-any */
1515
+ const fs = __importStar ( __webpack_require__ ( 747 ) ) ;
1516
+ const os = __importStar ( __webpack_require__ ( 87 ) ) ;
1517
+ const utils_1 = __webpack_require__ ( 82 ) ;
1518
+ function issueCommand ( command , message ) {
1519
+ const filePath = process . env [ `GITHUB_${ command } ` ] ;
1520
+ if ( ! filePath ) {
1521
+ throw new Error ( `Unable to find environment variable for file command ${ command } ` ) ;
1522
+ }
1523
+ if ( ! fs . existsSync ( filePath ) ) {
1524
+ throw new Error ( `Missing file at path: ${ filePath } ` ) ;
1525
+ }
1526
+ fs . appendFileSync ( filePath , `${ utils_1 . toCommandValue ( message ) } ${ os . EOL } ` , {
1527
+ encoding : 'utf8'
1528
+ } ) ;
1529
+ }
1530
+ exports . issueCommand = issueCommand ;
1531
+ //# sourceMappingURL=file-command.js.map
1532
+
1471
1533
/***/ } ) ,
1472
1534
1473
1535
/***/ 104 :
@@ -1573,6 +1635,13 @@ const serializers = {
1573
1635
: `${ emoji } ${ capitalize ( item . payload . action ) } ` ;
1574
1636
return `${ line } PR ${ toUrlFormat ( item ) } in ${ toUrlFormat ( item . repo . name ) } ` ;
1575
1637
} ,
1638
+ ReleaseEvent : ( item ) => {
1639
+ return `🚀 ${ capitalize ( item . payload . action ) } release ${ toUrlFormat (
1640
+ item . payload . release . name
1641
+ ? item . payload . release . name
1642
+ : item . payload . release . tag_name
1643
+ ) } in ${ toUrlFormat ( item . repo . name ) } `;
1644
+ } ,
1576
1645
} ;
1577
1646
1578
1647
Toolkit . run (
@@ -1615,7 +1684,9 @@ Toolkit.run(
1615
1684
) ;
1616
1685
1617
1686
if ( ! content . length ) {
1618
- tools . exit . failure ( "No PullRequest/Issue/IssueComment events found" ) ;
1687
+ tools . exit . failure (
1688
+ "No PullRequest/Issue/IssueComment/Release events found"
1689
+ ) ;
1619
1690
}
1620
1691
1621
1692
if ( content . length < 5 ) {
@@ -5345,6 +5416,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
5345
5416
} ;
5346
5417
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
5347
5418
const os = __importStar ( __webpack_require__ ( 87 ) ) ;
5419
+ const utils_1 = __webpack_require__ ( 82 ) ;
5348
5420
/**
5349
5421
* Commands
5350
5422
*
@@ -5398,28 +5470,14 @@ class Command {
5398
5470
return cmdStr ;
5399
5471
}
5400
5472
}
5401
- /**
5402
- * Sanitizes an input into a string so it can be passed into issueCommand safely
5403
- * @param input input to sanitize into a string
5404
- */
5405
- function toCommandValue ( input ) {
5406
- if ( input === null || input === undefined ) {
5407
- return '' ;
5408
- }
5409
- else if ( typeof input === 'string' || input instanceof String ) {
5410
- return input ;
5411
- }
5412
- return JSON . stringify ( input ) ;
5413
- }
5414
- exports . toCommandValue = toCommandValue ;
5415
5473
function escapeData ( s ) {
5416
- return toCommandValue ( s )
5474
+ return utils_1 . toCommandValue ( s )
5417
5475
. replace ( / % / g, '%25' )
5418
5476
. replace ( / \r / g, '%0D' )
5419
5477
. replace ( / \n / g, '%0A' ) ;
5420
5478
}
5421
5479
function escapeProperty ( s ) {
5422
- return toCommandValue ( s )
5480
+ return utils_1 . toCommandValue ( s )
5423
5481
. replace ( / % / g, '%25' )
5424
5482
. replace ( / \r / g, '%0D' )
5425
5483
. replace ( / \n / g, '%0A' )
@@ -6173,6 +6231,12 @@ function convertBody(buffer, headers) {
6173
6231
// html4
6174
6232
if ( ! res && str ) {
6175
6233
res = / < m e t a [ \s ] + ?h t t p - e q u i v = ( [ ' " ] ) c o n t e n t - t y p e \1[ \s ] + ?c o n t e n t = ( [ ' " ] ) ( .+ ?) \2/ i. exec ( str ) ;
6234
+ if ( ! res ) {
6235
+ res = / < m e t a [ \s ] + ?c o n t e n t = ( [ ' " ] ) ( .+ ?) \1[ \s ] + ?h t t p - e q u i v = ( [ ' " ] ) c o n t e n t - t y p e \3/ i. exec ( str ) ;
6236
+ if ( res ) {
6237
+ res . pop ( ) ; // drop last quote
6238
+ }
6239
+ }
6176
6240
6177
6241
if ( res ) {
6178
6242
res = / c h a r s e t = ( .* ) / i. exec ( res . pop ( ) ) ;
@@ -7180,7 +7244,7 @@ function fetch(url, opts) {
7180
7244
// HTTP fetch step 5.5
7181
7245
switch ( request . redirect ) {
7182
7246
case 'error' :
7183
- reject ( new FetchError ( `redirect mode is set to error: ${ request . url } ` , 'no-redirect' ) ) ;
7247
+ reject ( new FetchError ( `uri requested responds with a redirect, redirect mode is set to error: ${ request . url } ` , 'no-redirect' ) ) ;
7184
7248
finalize ( ) ;
7185
7249
return ;
7186
7250
case 'manual' :
@@ -7219,7 +7283,8 @@ function fetch(url, opts) {
7219
7283
method : request . method ,
7220
7284
body : request . body ,
7221
7285
signal : request . signal ,
7222
- timeout : request . timeout
7286
+ timeout : request . timeout ,
7287
+ size : request . size
7223
7288
} ;
7224
7289
7225
7290
// HTTP-redirect fetch step 9
@@ -7835,6 +7900,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
7835
7900
} ;
7836
7901
Object . defineProperty ( exports , "__esModule" , { value : true } ) ;
7837
7902
const command_1 = __webpack_require__ ( 431 ) ;
7903
+ const file_command_1 = __webpack_require__ ( 102 ) ;
7904
+ const utils_1 = __webpack_require__ ( 82 ) ;
7838
7905
const os = __importStar ( __webpack_require__ ( 87 ) ) ;
7839
7906
const path = __importStar ( __webpack_require__ ( 622 ) ) ;
7840
7907
/**
@@ -7861,9 +7928,17 @@ var ExitCode;
7861
7928
*/
7862
7929
// eslint-disable-next-line @typescript-eslint/no-explicit-any
7863
7930
function exportVariable ( name , val ) {
7864
- const convertedVal = command_1 . toCommandValue ( val ) ;
7931
+ const convertedVal = utils_1 . toCommandValue ( val ) ;
7865
7932
process . env [ name ] = convertedVal ;
7866
- command_1 . issueCommand ( 'set-env' , { name } , convertedVal ) ;
7933
+ const filePath = process . env [ 'GITHUB_ENV' ] || '' ;
7934
+ if ( filePath ) {
7935
+ const delimiter = '_GitHubActionsFileCommandDelimeter_' ;
7936
+ const commandValue = `${ name } <<${ delimiter } ${ os . EOL } ${ convertedVal } ${ os . EOL } ${ delimiter } ` ;
7937
+ file_command_1 . issueCommand ( 'ENV' , commandValue ) ;
7938
+ }
7939
+ else {
7940
+ command_1 . issueCommand ( 'set-env' , { name } , convertedVal ) ;
7941
+ }
7867
7942
}
7868
7943
exports . exportVariable = exportVariable ;
7869
7944
/**
@@ -7879,7 +7954,13 @@ exports.setSecret = setSecret;
7879
7954
* @param inputPath
7880
7955
*/
7881
7956
function addPath ( inputPath ) {
7882
- command_1 . issueCommand ( 'add-path' , { } , inputPath ) ;
7957
+ const filePath = process . env [ 'GITHUB_PATH' ] || '' ;
7958
+ if ( filePath ) {
7959
+ file_command_1 . issueCommand ( 'PATH' , inputPath ) ;
7960
+ }
7961
+ else {
7962
+ command_1 . issueCommand ( 'add-path' , { } , inputPath ) ;
7963
+ }
7883
7964
process . env [ 'PATH' ] = `${ inputPath } ${ path . delimiter } ${ process . env [ 'PATH' ] } ` ;
7884
7965
}
7885
7966
exports . addPath = addPath ;
@@ -15325,7 +15406,7 @@ module.exports = options => {
15325
15406
/***/ 969 :
15326
15407
/***/ ( function ( module ) {
15327
15408
15328
- module . exports = { "_from" :
"signale@^1.4.0" , "_id" :
"[email protected] " , "_inBundle" :
false , "_integrity" :
"sha512-iuh+gPf28RkltuJC7W5MRi6XAjTDCAPC/prJUpQoG4vIP3MJZ+GTydVnodXA7pwvTKb2cA0m9OFZW/cdWy/I/w==" , "_location" :
"/signale" , "_phantomChildren" :
{ } , "_requested" :
{ "type" :
"range" , "registry" :
true , "raw" :
"signale@^1.4.0" , "name" :
"signale" , "escapedName" :
"signale" , "rawSpec" :
"^1.4.0" , "saveSpec" :
null , "fetchSpec" :
"^1.4.0" } , "_requiredBy" :
[ "/actions-toolkit" ] , "_resolved" :
"https://registry.npmjs.org/signale/-/signale-1.4.0.tgz" , "_shasum" :
"c4be58302fb0262ac00fc3d886a7c113759042f1" , "_spec" :
"signale@^1.4.0" , "_where" :
"/Users/jamesgeorge007/CodeSpace/scripting/JavaScript/GitHub-Actions/github-activity-readme/node_modules/actions-toolkit" , "author" :
{ "name" :
"Klaus Sinani" , "email" :
"[email protected] " , "url" :
"https://klaussinani.github.io" } , "bugs" :
{ "url" :
"https://github.com/klaussinani/signale/issues" } , "bundleDependencies" :
false , "dependencies" :
{ "chalk" :
"^2.3.2" , "figures" :
"^2.0.0" , "pkg-conf" :
"^2.1.0" } , "deprecated" :
false , "description" :
"👋 Hackable console logger" , "devDependencies" :
{ "xo" :
"*" } , "engines" :
{ "node" :
">=6" } , "files" :
[ "index.js" , "signale.js" , "types.js" ] , "homepage" :
"https://github.com/klaussinani/signale#readme" , "keywords" :
[ "hackable" , "colorful" , "console" , "logger" ] , "license" :
"MIT" , "maintainers" :
[ { "name" :
"Mario Sinani" , "email" :
"[email protected] " , "url" :
"https://mariocfhq.github.io" } ] , "name" :
"signale" , "options" :
{ "default" :
{ "displayScope" :
true , "displayBadge" :
true , "displayDate" :
false , "displayFilename" :
false , "displayLabel" :
true , "displayTimestamp" :
false , "underlineLabel" :
true , "underlineMessage" :
false , "underlinePrefix" :
false , "underlineSuffix" :
false , "uppercaseLabel" :
false } } , "repository" :
{ "type" :
"git" , "url" :
"git+https://github.com/klaussinani/signale.git" } , "scripts" :
{ "test" :
"xo" } , "version" :
"1.4.0" , "xo" :
{ "space" :
2 } } ;
15409
+ module . exports = { "name" :
"signale" , "version" :
"1.4.0" , "description" :
"👋 Hackable console logger" , "license" :
"MIT" , "repository" :
"klaussinani/signale" , "author" :
{ "name" :
"Klaus Sinani" , "email" :
"[email protected] " , "url" :
"https://klaussinani.github.io" } , "maintainers" :
[ { "name" :
"Mario Sinani" , "email" :
"[email protected] " , "url" :
"https://mariocfhq.github.io" } ] , "engines" :
{ "node" :
">=6" } , "files" :
[ "index.js" , "signale.js" , "types.js" ] , "keywords" :
[ "hackable" , "colorful" , "console" , "logger" ] , "scripts" :
{ "test" :
"xo" } , "dependencies" :
{ "chalk" :
"^2.3.2" , "figures" :
"^2.0.0" , "pkg-conf" :
"^2.1.0" } , "devDependencies" :
{ "xo" :
"*" } , "options" :
{ "default" :
{ "displayScope" :
true , "displayBadge" :
true , "displayDate" :
false , "displayFilename" :
false , "displayLabel" :
true , "displayTimestamp" :
false , "underlineLabel" :
true , "underlineMessage" :
false , "underlinePrefix" :
false , "underlineSuffix" :
false , "uppercaseLabel" :
false } } , "xo" :
{ "space" :
2 } } ;
15329
15410
15330
15411
/***/ } ) ,
15331
15412
0 commit comments