@@ -2036,7 +2036,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
2036
2036
var __importStar = (this && this.__importStar) || function (mod) {
2037
2037
if (mod && mod.__esModule) return mod;
2038
2038
var result = {};
2039
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
2039
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype. hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
2040
2040
__setModuleDefault(result, mod);
2041
2041
return result;
2042
2042
};
@@ -2248,7 +2248,31 @@ if (typeof Symbol === undefined || !Symbol.asyncIterator) {
2248
2248
/* 79 */,
2249
2249
/* 80 */,
2250
2250
/* 81 */,
2251
- /* 82 */,
2251
+ /* 82 */
2252
+ /***/ (function(__unusedmodule, exports) {
2253
+
2254
+ "use strict";
2255
+
2256
+ // We use any as a valid input type
2257
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2258
+ Object.defineProperty(exports, "__esModule", { value: true });
2259
+ /**
2260
+ * Sanitizes an input into a string so it can be passed into issueCommand safely
2261
+ * @param input input to sanitize into a string
2262
+ */
2263
+ function toCommandValue(input) {
2264
+ if (input === null || input === undefined) {
2265
+ return '';
2266
+ }
2267
+ else if (typeof input === 'string' || input instanceof String) {
2268
+ return input;
2269
+ }
2270
+ return JSON.stringify(input);
2271
+ }
2272
+ exports.toCommandValue = toCommandValue;
2273
+ //# sourceMappingURL=utils.js.map
2274
+
2275
+ /***/ }),
2252
2276
/* 83 */,
2253
2277
/* 84 */,
2254
2278
/* 85 */,
@@ -3457,7 +3481,41 @@ Object.defineProperty(exports, "__esModule", { value: true });
3457
3481
3458
3482
/***/ }),
3459
3483
/* 101 */,
3460
- /* 102 */,
3484
+ /* 102 */
3485
+ /***/ (function(__unusedmodule, exports, __webpack_require__) {
3486
+
3487
+ "use strict";
3488
+
3489
+ // For internal use, subject to change.
3490
+ var __importStar = (this && this.__importStar) || function (mod) {
3491
+ if (mod && mod.__esModule) return mod;
3492
+ var result = {};
3493
+ if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
3494
+ result["default"] = mod;
3495
+ return result;
3496
+ };
3497
+ Object.defineProperty(exports, "__esModule", { value: true });
3498
+ // We use any as a valid input type
3499
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3500
+ const fs = __importStar(__webpack_require__(747));
3501
+ const os = __importStar(__webpack_require__(87));
3502
+ const utils_1 = __webpack_require__(82);
3503
+ function issueCommand(command, message) {
3504
+ const filePath = process.env[`GITHUB_${command}`];
3505
+ if (!filePath) {
3506
+ throw new Error(`Unable to find environment variable for file command ${command}`);
3507
+ }
3508
+ if (!fs.existsSync(filePath)) {
3509
+ throw new Error(`Missing file at path: ${filePath}`);
3510
+ }
3511
+ fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {
3512
+ encoding: 'utf8'
3513
+ });
3514
+ }
3515
+ exports.issueCommand = issueCommand;
3516
+ //# sourceMappingURL=file-command.js.map
3517
+
3518
+ /***/ }),
3461
3519
/* 103 */,
3462
3520
/* 104 */
3463
3521
/***/ (function(__unusedmodule, exports, __webpack_require__) {
@@ -6609,7 +6667,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
6609
6667
var __importStar = (this && this.__importStar) || function (mod) {
6610
6668
if (mod && mod.__esModule) return mod;
6611
6669
var result = {};
6612
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
6670
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype. hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
6613
6671
__setModuleDefault(result, mod);
6614
6672
return result;
6615
6673
};
@@ -34891,6 +34949,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
34891
34949
};
34892
34950
Object.defineProperty(exports, "__esModule", { value: true });
34893
34951
const os = __importStar(__webpack_require__(87));
34952
+ const utils_1 = __webpack_require__(82);
34894
34953
/**
34895
34954
* Commands
34896
34955
*
@@ -34944,28 +35003,14 @@ class Command {
34944
35003
return cmdStr;
34945
35004
}
34946
35005
}
34947
- /**
34948
- * Sanitizes an input into a string so it can be passed into issueCommand safely
34949
- * @param input input to sanitize into a string
34950
- */
34951
- function toCommandValue(input) {
34952
- if (input === null || input === undefined) {
34953
- return '';
34954
- }
34955
- else if (typeof input === 'string' || input instanceof String) {
34956
- return input;
34957
- }
34958
- return JSON.stringify(input);
34959
- }
34960
- exports.toCommandValue = toCommandValue;
34961
35006
function escapeData(s) {
34962
- return toCommandValue(s)
35007
+ return utils_1. toCommandValue(s)
34963
35008
.replace(/%/g, '%25')
34964
35009
.replace(/\r/g, '%0D')
34965
35010
.replace(/\n/g, '%0A');
34966
35011
}
34967
35012
function escapeProperty(s) {
34968
- return toCommandValue(s)
35013
+ return utils_1. toCommandValue(s)
34969
35014
.replace(/%/g, '%25')
34970
35015
.replace(/\r/g, '%0D')
34971
35016
.replace(/\n/g, '%0A')
@@ -35229,7 +35274,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
35229
35274
var __importStar = (this && this.__importStar) || function (mod) {
35230
35275
if (mod && mod.__esModule) return mod;
35231
35276
var result = {};
35232
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
35277
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype. hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
35233
35278
__setModuleDefault(result, mod);
35234
35279
return result;
35235
35280
};
@@ -36055,6 +36100,12 @@ function convertBody(buffer, headers) {
36055
36100
// html4
36056
36101
if (!res && str) {
36057
36102
res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str);
36103
+ if (!res) {
36104
+ res = /<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(str);
36105
+ if (res) {
36106
+ res.pop(); // drop last quote
36107
+ }
36108
+ }
36058
36109
36059
36110
if (res) {
36060
36111
res = /charset=(.*)/i.exec(res.pop());
@@ -37062,7 +37113,7 @@ function fetch(url, opts) {
37062
37113
// HTTP fetch step 5.5
37063
37114
switch (request.redirect) {
37064
37115
case 'error':
37065
- reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect'));
37116
+ reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));
37066
37117
finalize();
37067
37118
return;
37068
37119
case 'manual':
@@ -37101,7 +37152,8 @@ function fetch(url, opts) {
37101
37152
method: request.method,
37102
37153
body: request.body,
37103
37154
signal: request.signal,
37104
- timeout: request.timeout
37155
+ timeout: request.timeout,
37156
+ size: request.size
37105
37157
};
37106
37158
37107
37159
// HTTP-redirect fetch step 9
@@ -37612,6 +37664,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
37612
37664
};
37613
37665
Object.defineProperty(exports, "__esModule", { value: true });
37614
37666
const command_1 = __webpack_require__(431);
37667
+ const file_command_1 = __webpack_require__(102);
37668
+ const utils_1 = __webpack_require__(82);
37615
37669
const os = __importStar(__webpack_require__(87));
37616
37670
const path = __importStar(__webpack_require__(622));
37617
37671
/**
@@ -37638,9 +37692,17 @@ var ExitCode;
37638
37692
*/
37639
37693
// eslint-disable-next-line @typescript-eslint/no-explicit-any
37640
37694
function exportVariable(name, val) {
37641
- const convertedVal = command_1 .toCommandValue(val);
37695
+ const convertedVal = utils_1 .toCommandValue(val);
37642
37696
process.env[name] = convertedVal;
37643
- command_1.issueCommand('set-env', { name }, convertedVal);
37697
+ const filePath = process.env['GITHUB_ENV'] || '';
37698
+ if (filePath) {
37699
+ const delimiter = '_GitHubActionsFileCommandDelimeter_';
37700
+ const commandValue = `${name}<<${delimiter}${os.EOL}${convertedVal}${os.EOL}${delimiter}`;
37701
+ file_command_1.issueCommand('ENV', commandValue);
37702
+ }
37703
+ else {
37704
+ command_1.issueCommand('set-env', { name }, convertedVal);
37705
+ }
37644
37706
}
37645
37707
exports.exportVariable = exportVariable;
37646
37708
/**
@@ -37656,7 +37718,13 @@ exports.setSecret = setSecret;
37656
37718
* @param inputPath
37657
37719
*/
37658
37720
function addPath(inputPath) {
37659
- command_1.issueCommand('add-path', {}, inputPath);
37721
+ const filePath = process.env['GITHUB_PATH'] || '';
37722
+ if (filePath) {
37723
+ file_command_1.issueCommand('PATH', inputPath);
37724
+ }
37725
+ else {
37726
+ command_1.issueCommand('add-path', {}, inputPath);
37727
+ }
37660
37728
process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;
37661
37729
}
37662
37730
exports.addPath = addPath;
@@ -41594,7 +41662,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
41594
41662
var __importStar = (this && this.__importStar) || function (mod) {
41595
41663
if (mod && mod.__esModule) return mod;
41596
41664
var result = {};
41597
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
41665
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype. hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
41598
41666
__setModuleDefault(result, mod);
41599
41667
return result;
41600
41668
};
@@ -43696,7 +43764,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
43696
43764
var __importStar = (this && this.__importStar) || function (mod) {
43697
43765
if (mod && mod.__esModule) return mod;
43698
43766
var result = {};
43699
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
43767
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype. hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
43700
43768
__setModuleDefault(result, mod);
43701
43769
return result;
43702
43770
};
@@ -43826,7 +43894,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
43826
43894
var __importStar = (this && this.__importStar) || function (mod) {
43827
43895
if (mod && mod.__esModule) return mod;
43828
43896
var result = {};
43829
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
43897
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype. hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
43830
43898
__setModuleDefault(result, mod);
43831
43899
return result;
43832
43900
};
@@ -45124,7 +45192,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
45124
45192
var __importStar = (this && this.__importStar) || function (mod) {
45125
45193
if (mod && mod.__esModule) return mod;
45126
45194
var result = {};
45127
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
45195
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype. hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
45128
45196
__setModuleDefault(result, mod);
45129
45197
return result;
45130
45198
};
0 commit comments