|
|
|
@ -319,7 +319,8 @@ function createHttpClient() {
|
|
|
|
|
return new http_client_1.HttpClient('actions/cache', [bearerCredentialHandler], getRequestOptions());
|
|
|
|
|
}
|
|
|
|
|
function getCacheVersion(paths, compressionMethod, enableCrossOsArchive = false) {
|
|
|
|
|
const components = paths;
|
|
|
|
|
// don't pass changes upstream
|
|
|
|
|
const components = paths.slice();
|
|
|
|
|
// Add compression method to cache version to restore
|
|
|
|
|
// compressed cache as per compression method
|
|
|
|
|
if (compressionMethod) {
|
|
|
|
@ -608,10 +609,9 @@ function resolvePaths(patterns) {
|
|
|
|
|
implicitDescendants: false
|
|
|
|
|
});
|
|
|
|
|
try {
|
|
|
|
|
for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a;) {
|
|
|
|
|
for (var _e = true, _f = __asyncValues(globber.globGenerator()), _g; _g = yield _f.next(), _a = _g.done, !_a; _e = true) {
|
|
|
|
|
_c = _g.value;
|
|
|
|
|
_e = false;
|
|
|
|
|
try {
|
|
|
|
|
const file = _c;
|
|
|
|
|
const relativeFile = path
|
|
|
|
|
.relative(workspace, file)
|
|
|
|
@ -626,10 +626,6 @@ function resolvePaths(patterns) {
|
|
|
|
|
paths.push(`${relativeFile}`);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
finally {
|
|
|
|
|
_e = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
|
|
|
finally {
|
|
|
|
@ -711,7 +707,10 @@ function assertDefined(name, value) {
|
|
|
|
|
exports.assertDefined = assertDefined;
|
|
|
|
|
function isGhes() {
|
|
|
|
|
const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com');
|
|
|
|
|
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
|
|
|
|
|
const hostname = ghUrl.hostname.trimEnd().toUpperCase();
|
|
|
|
|
const isGitHubHost = hostname === 'GITHUB.COM';
|
|
|
|
|
const isGheHost = hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST');
|
|
|
|
|
return !isGitHubHost && !isGheHost;
|
|
|
|
|
}
|
|
|
|
|
exports.isGhes = isGhes;
|
|
|
|
|
//# sourceMappingURL=cacheUtils.js.map
|
|
|
|
@ -729,7 +728,7 @@ var CacheFilename;
|
|
|
|
|
(function (CacheFilename) {
|
|
|
|
|
CacheFilename["Gzip"] = "cache.tgz";
|
|
|
|
|
CacheFilename["Zstd"] = "cache.tzst";
|
|
|
|
|
})(CacheFilename = exports.CacheFilename || (exports.CacheFilename = {}));
|
|
|
|
|
})(CacheFilename || (exports.CacheFilename = CacheFilename = {}));
|
|
|
|
|
var CompressionMethod;
|
|
|
|
|
(function (CompressionMethod) {
|
|
|
|
|
CompressionMethod["Gzip"] = "gzip";
|
|
|
|
@ -737,12 +736,12 @@ var CompressionMethod;
|
|
|
|
|
// This enum is for earlier version of zstd that does not have --long support
|
|
|
|
|
CompressionMethod["ZstdWithoutLong"] = "zstd-without-long";
|
|
|
|
|
CompressionMethod["Zstd"] = "zstd";
|
|
|
|
|
})(CompressionMethod = exports.CompressionMethod || (exports.CompressionMethod = {}));
|
|
|
|
|
})(CompressionMethod || (exports.CompressionMethod = CompressionMethod = {}));
|
|
|
|
|
var ArchiveToolType;
|
|
|
|
|
(function (ArchiveToolType) {
|
|
|
|
|
ArchiveToolType["GNU"] = "gnu";
|
|
|
|
|
ArchiveToolType["BSD"] = "bsd";
|
|
|
|
|
})(ArchiveToolType = exports.ArchiveToolType || (exports.ArchiveToolType = {}));
|
|
|
|
|
})(ArchiveToolType || (exports.ArchiveToolType = ArchiveToolType = {}));
|
|
|
|
|
// The default number of retry attempts.
|
|
|
|
|
exports.DefaultRetryAttempts = 2;
|
|
|
|
|
// The default delay in milliseconds between retry attempts.
|
|
|
|
@ -8551,7 +8550,7 @@ class HttpClient {
|
|
|
|
|
if (this._keepAlive && useProxy) {
|
|
|
|
|
agent = this._proxyAgent;
|
|
|
|
|
}
|
|
|
|
|
if (this._keepAlive && !useProxy) {
|
|
|
|
|
if (!useProxy) {
|
|
|
|
|
agent = this._agent;
|
|
|
|
|
}
|
|
|
|
|
// if agent is already assigned use that agent.
|
|
|
|
@ -8583,16 +8582,12 @@ class HttpClient {
|
|
|
|
|
agent = tunnelAgent(agentOptions);
|
|
|
|
|
this._proxyAgent = agent;
|
|
|
|
|
}
|
|
|
|
|
// if reusing agent across request and tunneling agent isn't assigned create a new agent
|
|
|
|
|
if (this._keepAlive && !agent) {
|
|
|
|
|
// if tunneling agent isn't assigned create a new agent
|
|
|
|
|
if (!agent) {
|
|
|
|
|
const options = { keepAlive: this._keepAlive, maxSockets };
|
|
|
|
|
agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
|
|
|
|
|
this._agent = agent;
|
|
|
|
|
}
|
|
|
|
|
// if not using private agent and tunnel agent isn't setup then use global agent
|
|
|
|
|
if (!agent) {
|
|
|
|
|
agent = usingSsl ? https.globalAgent : http.globalAgent;
|
|
|
|
|
}
|
|
|
|
|
if (usingSsl && this._ignoreSslError) {
|
|
|
|
|
// we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
|
|
|
|
|
// http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
|
|
|
|
@ -55566,35 +55561,43 @@ const coerce = (version, options) => {
|
|
|
|
|
|
|
|
|
|
let match = null
|
|
|
|
|
if (!options.rtl) {
|
|
|
|
|
match = version.match(re[t.COERCE])
|
|
|
|
|
match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE])
|
|
|
|
|
} else {
|
|
|
|
|
// Find the right-most coercible string that does not share
|
|
|
|
|
// a terminus with a more left-ward coercible string.
|
|
|
|
|
// Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
|
|
|
|
|
// With includePrerelease option set, '1.2.3.4-rc' wants to coerce '2.3.4-rc', not '2.3.4'
|
|
|
|
|
//
|
|
|
|
|
// Walk through the string checking with a /g regexp
|
|
|
|
|
// Manually set the index so as to pick up overlapping matches.
|
|
|
|
|
// Stop when we get a match that ends at the string end, since no
|
|
|
|
|
// coercible string can be more right-ward without the same terminus.
|
|
|
|
|
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]
|
|
|
|
|
let next
|
|
|
|
|
while ((next = re[t.COERCERTL].exec(version)) &&
|
|
|
|
|
while ((next = coerceRtlRegex.exec(version)) &&
|
|
|
|
|
(!match || match.index + match[0].length !== version.length)
|
|
|
|
|
) {
|
|
|
|
|
if (!match ||
|
|
|
|
|
next.index + next[0].length !== match.index + match[0].length) {
|
|
|
|
|
match = next
|
|
|
|
|
}
|
|
|
|
|
re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length
|
|
|
|
|
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length
|
|
|
|
|
}
|
|
|
|
|
// leave it in a clean state
|
|
|
|
|
re[t.COERCERTL].lastIndex = -1
|
|
|
|
|
coerceRtlRegex.lastIndex = -1
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (match === null) {
|
|
|
|
|
return null
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)
|
|
|
|
|
const major = match[2]
|
|
|
|
|
const minor = match[3] || '0'
|
|
|
|
|
const patch = match[4] || '0'
|
|
|
|
|
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ''
|
|
|
|
|
const build = options.includePrerelease && match[6] ? `+${match[6]}` : ''
|
|
|
|
|
|
|
|
|
|
return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options)
|
|
|
|
|
}
|
|
|
|
|
module.exports = coerce
|
|
|
|
|
|
|
|
|
@ -56286,12 +56289,17 @@ createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
|
|
|
|
|
|
|
|
|
|
// Coercion.
|
|
|
|
|
// Extract anything that could conceivably be a part of a valid semver
|
|
|
|
|
createToken('COERCE', `${'(^|[^\\d])' +
|
|
|
|
|
createToken('COERCEPLAIN', `${'(^|[^\\d])' +
|
|
|
|
|
'(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
|
|
|
|
|
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
|
|
|
|
|
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
|
|
|
|
|
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)
|
|
|
|
|
createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`)
|
|
|
|
|
createToken('COERCEFULL', src[t.COERCEPLAIN] +
|
|
|
|
|
`(?:${src[t.PRERELEASE]})?` +
|
|
|
|
|
`(?:${src[t.BUILD]})?` +
|
|
|
|
|
`(?:$|[^\\d])`)
|
|
|
|
|
createToken('COERCERTL', src[t.COERCE], true)
|
|
|
|
|
createToken('COERCERTLFULL', src[t.COERCEFULL], true)
|
|
|
|
|
|
|
|
|
|
// Tilde ranges.
|
|
|
|
|
// Meaning is "reasonably at or greater than"
|
|
|
|
@ -70422,6 +70430,9 @@ function httpRedirectFetch (fetchParams, response) {
|
|
|
|
|
// https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
|
|
|
|
|
request.headersList.delete('authorization')
|
|
|
|
|
|
|
|
|
|
// https://fetch.spec.whatwg.org/#authentication-entries
|
|
|
|
|
request.headersList.delete('proxy-authorization', true)
|
|
|
|
|
|
|
|
|
|
// "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement.
|
|
|
|
|
request.headersList.delete('cookie')
|
|
|
|
|
request.headersList.delete('host')
|
|
|
|
@ -88028,9 +88039,9 @@ const sys = __importStar(__nccwpck_require__(5632));
|
|
|
|
|
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
|
|
|
|
const os_1 = __importDefault(__nccwpck_require__(2037));
|
|
|
|
|
const utils_1 = __nccwpck_require__(1314);
|
|
|
|
|
function getGo(versionSpec, checkLatest, auth, arch = os_1.default.arch()) {
|
|
|
|
|
function getGo(versionSpec_1, checkLatest_1, auth_1) {
|
|
|
|
|
return __awaiter(this, arguments, void 0, function* (versionSpec, checkLatest, auth, arch = os_1.default.arch()) {
|
|
|
|
|
var _a;
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
let manifest;
|
|
|
|
|
const osPlat = os_1.default.platform();
|
|
|
|
|
if (versionSpec === utils_1.StableReleaseAlias.Stable ||
|
|
|
|
@ -88206,8 +88217,8 @@ function getManifest(auth) {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
exports.getManifest = getManifest;
|
|
|
|
|
function getInfoFromManifest(versionSpec, stable, auth, arch = os_1.default.arch(), manifest) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
function getInfoFromManifest(versionSpec_1, stable_1, auth_1) {
|
|
|
|
|
return __awaiter(this, arguments, void 0, function* (versionSpec, stable, auth, arch = os_1.default.arch(), manifest) {
|
|
|
|
|
let info = null;
|
|
|
|
|
if (!manifest) {
|
|
|
|
|
core.debug('No manifest cached');
|
|
|
|
@ -88241,8 +88252,8 @@ function getInfoFromDist(versionSpec, arch) {
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function findMatch(versionSpec, arch = os_1.default.arch()) {
|
|
|
|
|
return __awaiter(this, void 0, void 0, function* () {
|
|
|
|
|
function findMatch(versionSpec_1) {
|
|
|
|
|
return __awaiter(this, arguments, void 0, function* (versionSpec, arch = os_1.default.arch()) {
|
|
|
|
|
const archFilter = sys.getArch(arch);
|
|
|
|
|
const platFilter = sys.getPlatform();
|
|
|
|
|
let result;
|
|
|
|
|