@@ -3581,7 +3581,11 @@ function copyFile(srcFile, destFile, force) {
3581
3581
3582
3582
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3583
3583
if (k2 === undefined) k2 = k;
3584
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
3584
+ var desc = Object.getOwnPropertyDescriptor(m, k);
3585
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
3586
+ desc = { enumerable: true, get: function() { return m[k]; } };
3587
+ }
3588
+ Object.defineProperty(o, k2, desc);
3585
3589
}) : (function(o, m, k, k2) {
3586
3590
if (k2 === undefined) k2 = k;
3587
3591
o[k2] = m[k];
@@ -3594,7 +3598,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
3594
3598
var __importStar = (this && this.__importStar) || function (mod) {
3595
3599
if (mod && mod.__esModule) return mod;
3596
3600
var result = {};
3597
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
3601
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype. hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
3598
3602
__setModuleDefault(result, mod);
3599
3603
return result;
3600
3604
};
@@ -3624,11 +3628,11 @@ function _findMatch(versionSpec, stable, candidates, archFilter) {
3624
3628
let file;
3625
3629
for (const candidate of candidates) {
3626
3630
const version = candidate.version;
3627
- core_1.debug(`check ${version} satisfies ${versionSpec}`);
3631
+ (0, core_1.debug) (`check ${version} satisfies ${versionSpec}`);
3628
3632
if (semver.satisfies(version, versionSpec) &&
3629
3633
(!stable || candidate.stable === stable)) {
3630
3634
file = candidate.files.find(item => {
3631
- core_1.debug(`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`);
3635
+ (0, core_1.debug) (`${item.arch}===${archFilter} && ${item.platform}===${platFilter}`);
3632
3636
let chk = item.arch === archFilter && item.platform === platFilter;
3633
3637
if (chk && item.platform_version) {
3634
3638
const osVersion = module.exports._getOsVersion();
@@ -3642,7 +3646,7 @@ function _findMatch(versionSpec, stable, candidates, archFilter) {
3642
3646
return chk;
3643
3647
});
3644
3648
if (file) {
3645
- core_1.debug(`matched ${candidate.version}`);
3649
+ (0, core_1.debug) (`matched ${candidate.version}`);
3646
3650
match = candidate;
3647
3651
break;
3648
3652
}
@@ -3680,10 +3684,7 @@ function _getOsVersion() {
3680
3684
if (parts.length === 2 &&
3681
3685
(parts[0].trim() === 'VERSION_ID' ||
3682
3686
parts[0].trim() === 'DISTRIB_RELEASE')) {
3683
- version = parts[1]
3684
- .trim()
3685
- .replace(/^"/, '')
3686
- .replace(/"$/, '');
3687
+ version = parts[1].trim().replace(/^"/, '').replace(/"$/, '');
3687
3688
break;
3688
3689
}
3689
3690
}
@@ -3716,7 +3717,11 @@ exports._readLinuxVersionFile = _readLinuxVersionFile;
3716
3717
3717
3718
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3718
3719
if (k2 === undefined) k2 = k;
3719
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
3720
+ var desc = Object.getOwnPropertyDescriptor(m, k);
3721
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
3722
+ desc = { enumerable: true, get: function() { return m[k]; } };
3723
+ }
3724
+ Object.defineProperty(o, k2, desc);
3720
3725
}) : (function(o, m, k, k2) {
3721
3726
if (k2 === undefined) k2 = k;
3722
3727
o[k2] = m[k];
@@ -3729,7 +3734,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
3729
3734
var __importStar = (this && this.__importStar) || function (mod) {
3730
3735
if (mod && mod.__esModule) return mod;
3731
3736
var result = {};
3732
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
3737
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype. hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
3733
3738
__setModuleDefault(result, mod);
3734
3739
return result;
3735
3740
};
@@ -3806,7 +3811,11 @@ exports.RetryHelper = RetryHelper;
3806
3811
3807
3812
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3808
3813
if (k2 === undefined) k2 = k;
3809
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
3814
+ var desc = Object.getOwnPropertyDescriptor(m, k);
3815
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
3816
+ desc = { enumerable: true, get: function() { return m[k]; } };
3817
+ }
3818
+ Object.defineProperty(o, k2, desc);
3810
3819
}) : (function(o, m, k, k2) {
3811
3820
if (k2 === undefined) k2 = k;
3812
3821
o[k2] = m[k];
@@ -3819,7 +3828,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
3819
3828
var __importStar = (this && this.__importStar) || function (mod) {
3820
3829
if (mod && mod.__esModule) return mod;
3821
3830
var result = {};
3822
- if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
3831
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype. hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
3823
3832
__setModuleDefault(result, mod);
3824
3833
return result;
3825
3834
};
@@ -3832,13 +3841,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
3832
3841
step((generator = generator.apply(thisArg, _arguments || [])).next());
3833
3842
});
3834
3843
};
3835
- var __importDefault = (this && this.__importDefault) || function (mod) {
3836
- return (mod && mod.__esModule) ? mod : { "default": mod };
3837
- };
3838
3844
Object.defineProperty(exports, "__esModule", ({ value: true }));
3839
3845
exports.evaluateVersions = exports.isExplicitVersion = exports.findFromManifest = exports.getManifestFromRepo = exports.findAllVersions = exports.find = exports.cacheFile = exports.cacheDir = exports.extractZip = exports.extractXar = exports.extractTar = exports.extract7z = exports.downloadTool = exports.HTTPError = void 0;
3840
3846
const core = __importStar(__nccwpck_require__(7484));
3841
3847
const io = __importStar(__nccwpck_require__(4994));
3848
+ const crypto = __importStar(__nccwpck_require__(6982));
3842
3849
const fs = __importStar(__nccwpck_require__(9896));
3843
3850
const mm = __importStar(__nccwpck_require__(8036));
3844
3851
const os = __importStar(__nccwpck_require__(857));
@@ -3848,7 +3855,6 @@ const semver = __importStar(__nccwpck_require__(6193));
3848
3855
const stream = __importStar(__nccwpck_require__(2203));
3849
3856
const util = __importStar(__nccwpck_require__(9023));
3850
3857
const assert_1 = __nccwpck_require__(2613);
3851
- const v4_1 = __importDefault(__nccwpck_require__(9021));
3852
3858
const exec_1 = __nccwpck_require__(5236);
3853
3859
const retry_helper_1 = __nccwpck_require__(7380);
3854
3860
class HTTPError extends Error {
@@ -3873,7 +3879,7 @@ const userAgent = 'actions/tool-cache';
3873
3879
*/
3874
3880
function downloadTool(url, dest, auth, headers) {
3875
3881
return __awaiter(this, void 0, void 0, function* () {
3876
- dest = dest || path.join(_getTempDirectory(), v4_1.default ());
3882
+ dest = dest || path.join(_getTempDirectory(), crypto.randomUUID ());
3877
3883
yield io.mkdirP(path.dirname(dest));
3878
3884
core.debug(`Downloading ${url}`);
3879
3885
core.debug(`Destination ${dest}`);
@@ -3962,8 +3968,8 @@ function downloadToolAttempt(url, dest, auth, headers) {
3962
3968
*/
3963
3969
function extract7z(file, dest, _7zPath) {
3964
3970
return __awaiter(this, void 0, void 0, function* () {
3965
- assert_1.ok(IS_WINDOWS, 'extract7z() not supported on current OS');
3966
- assert_1.ok(file, 'parameter "file" is required');
3971
+ (0, assert_1.ok) (IS_WINDOWS, 'extract7z() not supported on current OS');
3972
+ (0, assert_1.ok) (file, 'parameter "file" is required');
3967
3973
dest = yield _createExtractFolder(dest);
3968
3974
const originalCwd = process.cwd();
3969
3975
process.chdir(dest);
@@ -3980,7 +3986,7 @@ function extract7z(file, dest, _7zPath) {
3980
3986
const options = {
3981
3987
silent: true
3982
3988
};
3983
- yield exec_1.exec(`"${_7zPath}"`, args, options);
3989
+ yield (0, exec_1.exec) (`"${_7zPath}"`, args, options);
3984
3990
}
3985
3991
finally {
3986
3992
process.chdir(originalCwd);
@@ -4009,7 +4015,7 @@ function extract7z(file, dest, _7zPath) {
4009
4015
};
4010
4016
try {
4011
4017
const powershellPath = yield io.which('powershell', true);
4012
- yield exec_1.exec(`"${powershellPath}"`, args, options);
4018
+ yield (0, exec_1.exec) (`"${powershellPath}"`, args, options);
4013
4019
}
4014
4020
finally {
4015
4021
process.chdir(originalCwd);
@@ -4037,7 +4043,7 @@ function extractTar(file, dest, flags = 'xz') {
4037
4043
// Determine whether GNU tar
4038
4044
core.debug('Checking tar --version');
4039
4045
let versionOutput = '';
4040
- yield exec_1.exec('tar --version', [], {
4046
+ yield (0, exec_1.exec) ('tar --version', [], {
4041
4047
ignoreReturnCode: true,
4042
4048
silent: true,
4043
4049
listeners: {
@@ -4073,7 +4079,7 @@ function extractTar(file, dest, flags = 'xz') {
4073
4079
args.push('--overwrite');
4074
4080
}
4075
4081
args.push('-C', destArg, '-f', fileArg);
4076
- yield exec_1.exec(`tar`, args);
4082
+ yield (0, exec_1.exec) (`tar`, args);
4077
4083
return dest;
4078
4084
});
4079
4085
}
@@ -4088,8 +4094,8 @@ exports.extractTar = extractTar;
4088
4094
*/
4089
4095
function extractXar(file, dest, flags = []) {
4090
4096
return __awaiter(this, void 0, void 0, function* () {
4091
- assert_1.ok(IS_MAC, 'extractXar() not supported on current OS');
4092
- assert_1.ok(file, 'parameter "file" is required');
4097
+ (0, assert_1.ok) (IS_MAC, 'extractXar() not supported on current OS');
4098
+ (0, assert_1.ok) (file, 'parameter "file" is required');
4093
4099
dest = yield _createExtractFolder(dest);
4094
4100
let args;
4095
4101
if (flags instanceof Array) {
@@ -4103,7 +4109,7 @@ function extractXar(file, dest, flags = []) {
4103
4109
args.push('-v');
4104
4110
}
4105
4111
const xarPath = yield io.which('xar', true);
4106
- yield exec_1.exec(`"${xarPath}"`, _unique(args));
4112
+ yield (0, exec_1.exec) (`"${xarPath}"`, _unique(args));
4107
4113
return dest;
4108
4114
});
4109
4115
}
@@ -4157,7 +4163,7 @@ function extractZipWin(file, dest) {
4157
4163
pwshCommand
4158
4164
];
4159
4165
core.debug(`Using pwsh at path: ${pwshPath}`);
4160
- yield exec_1.exec(`"${pwshPath}"`, args);
4166
+ yield (0, exec_1.exec) (`"${pwshPath}"`, args);
4161
4167
}
4162
4168
else {
4163
4169
const powershellCommand = [
@@ -4178,7 +4184,7 @@ function extractZipWin(file, dest) {
4178
4184
];
4179
4185
const powershellPath = yield io.which('powershell', true);
4180
4186
core.debug(`Using powershell at path: ${powershellPath}`);
4181
- yield exec_1.exec(`"${powershellPath}"`, args);
4187
+ yield (0, exec_1.exec) (`"${powershellPath}"`, args);
4182
4188
}
4183
4189
});
4184
4190
}
@@ -4190,7 +4196,7 @@ function extractZipNix(file, dest) {
4190
4196
args.unshift('-q');
4191
4197
}
4192
4198
args.unshift('-o'); //overwrite with -o, otherwise a prompt is shown which freezes the run
4193
- yield exec_1.exec(`"${unzipPath}"`, args, { cwd: dest });
4199
+ yield (0, exec_1.exec) (`"${unzipPath}"`, args, { cwd: dest });
4194
4200
});
4195
4201
}
4196
4202
/**
@@ -4367,7 +4373,7 @@ function _createExtractFolder(dest) {
4367
4373
return __awaiter(this, void 0, void 0, function* () {
4368
4374
if (!dest) {
4369
4375
// create a temp dir
4370
- dest = path.join(_getTempDirectory(), v4_1.default ());
4376
+ dest = path.join(_getTempDirectory(), crypto.randomUUID ());
4371
4377
}
4372
4378
yield io.mkdirP(dest);
4373
4379
return dest;
@@ -4440,15 +4446,15 @@ exports.evaluateVersions = evaluateVersions;
4440
4446
*/
4441
4447
function _getCacheDirectory() {
4442
4448
const cacheDirectory = process.env['RUNNER_TOOL_CACHE'] || '';
4443
- assert_1.ok(cacheDirectory, 'Expected RUNNER_TOOL_CACHE to be defined');
4449
+ (0, assert_1.ok) (cacheDirectory, 'Expected RUNNER_TOOL_CACHE to be defined');
4444
4450
return cacheDirectory;
4445
4451
}
4446
4452
/**
4447
4453
* Gets RUNNER_TEMP
4448
4454
*/
4449
4455
function _getTempDirectory() {
4450
4456
const tempDirectory = process.env['RUNNER_TEMP'] || '';
4451
- assert_1.ok(tempDirectory, 'Expected RUNNER_TEMP to be defined');
4457
+ (0, assert_1.ok) (tempDirectory, 'Expected RUNNER_TEMP to be defined');
4452
4458
return tempDirectory;
4453
4459
}
4454
4460
/**
@@ -32483,90 +32489,6 @@ module.exports = {
32483
32489
}
32484
32490
32485
32491
32486
- /***/ }),
32487
-
32488
- /***/ 8682:
32489
- /***/ ((module) => {
32490
-
32491
- /**
32492
- * Convert array of 16 byte values to UUID string format of the form:
32493
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
32494
- */
32495
- var byteToHex = [];
32496
- for (var i = 0; i < 256; ++i) {
32497
- byteToHex[i] = (i + 0x100).toString(16).substr(1);
32498
- }
32499
-
32500
- function bytesToUuid(buf, offset) {
32501
- var i = offset || 0;
32502
- var bth = byteToHex;
32503
- // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
32504
- return ([
32505
- bth[buf[i++]], bth[buf[i++]],
32506
- bth[buf[i++]], bth[buf[i++]], '-',
32507
- bth[buf[i++]], bth[buf[i++]], '-',
32508
- bth[buf[i++]], bth[buf[i++]], '-',
32509
- bth[buf[i++]], bth[buf[i++]], '-',
32510
- bth[buf[i++]], bth[buf[i++]],
32511
- bth[buf[i++]], bth[buf[i++]],
32512
- bth[buf[i++]], bth[buf[i++]]
32513
- ]).join('');
32514
- }
32515
-
32516
- module.exports = bytesToUuid;
32517
-
32518
-
32519
- /***/ }),
32520
-
32521
- /***/ 1694:
32522
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
32523
-
32524
- // Unique ID creation requires a high quality random # generator. In node.js
32525
- // this is pretty straight-forward - we use the crypto API.
32526
-
32527
- var crypto = __nccwpck_require__(6982);
32528
-
32529
- module.exports = function nodeRNG() {
32530
- return crypto.randomBytes(16);
32531
- };
32532
-
32533
-
32534
- /***/ }),
32535
-
32536
- /***/ 9021:
32537
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
32538
-
32539
- var rng = __nccwpck_require__(1694);
32540
- var bytesToUuid = __nccwpck_require__(8682);
32541
-
32542
- function v4(options, buf, offset) {
32543
- var i = buf && offset || 0;
32544
-
32545
- if (typeof(options) == 'string') {
32546
- buf = options === 'binary' ? new Array(16) : null;
32547
- options = null;
32548
- }
32549
- options = options || {};
32550
-
32551
- var rnds = options.random || (options.rng || rng)();
32552
-
32553
- // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
32554
- rnds[6] = (rnds[6] & 0x0f) | 0x40;
32555
- rnds[8] = (rnds[8] & 0x3f) | 0x80;
32556
-
32557
- // Copy bytes to buffer, if provided
32558
- if (buf) {
32559
- for (var ii = 0; ii < 16; ++ii) {
32560
- buf[i + ii] = rnds[ii];
32561
- }
32562
- }
32563
-
32564
- return buf || bytesToUuid(rnds);
32565
- }
32566
-
32567
- module.exports = v4;
32568
-
32569
-
32570
32492
/***/ }),
32571
32493
32572
32494
/***/ 2613:
0 commit comments