[bot] Update dist directory

This commit is contained in:
bigdaz 2025-02-01 23:22:26 +00:00 committed by github-actions[bot]
parent b6b9962a4f
commit 99c1afeffb
10 changed files with 458 additions and 154 deletions

View file

@ -183248,7 +183248,8 @@ var __importStar = (this && this.__importStar) || (function () {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CacheEntryListener = exports.CacheListener = exports.CLEANUP_DISABLED_DUE_TO_CONFIG_CACHE_HIT = exports.CLEANUP_DISABLED_DUE_TO_FAILURE = exports.DEFAULT_CLEANUP_DISABLED_REASON = exports.DEFAULT_CLEANUP_ENABLED_REASON = exports.CLEANUP_DISABLED_READONLY = exports.EXISTING_GRADLE_HOME = exports.DEFAULT_WRITEONLY_REASON = exports.DEFAULT_DISABLED_REASON = exports.DEFAULT_READONLY_REASON = exports.DEFAULT_CACHE_ENABLED_REASON = void 0;
exports.generateCachingReport = generateCachingReport;
const cache = __importStar(__nccwpck_require__(5116));
const core = __importStar(__nccwpck_require__(37484));
const github_actions_cache_1 = __nccwpck_require__(94423);
exports.DEFAULT_CACHE_ENABLED_REASON = `[Cache was enabled](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#caching-build-state-between-jobs). Action attempted to both restore and save the Gradle User Home.`;
exports.DEFAULT_READONLY_REASON = `[Cache was read-only](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#using-the-cache-read-only). By default, the action will only write to the cache for Jobs running on the default branch.`;
exports.DEFAULT_DISABLED_REASON = `[Cache was disabled](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#disabling-caching) via action configuration. Gradle User Home was not restored from or saved to the cache.`;
@ -183262,6 +183263,7 @@ exports.CLEANUP_DISABLED_DUE_TO_CONFIG_CACHE_HIT = '[Cache cleanup was disabled
class CacheListener {
constructor() {
this.cacheEntries = [];
this.cacheAvailable = new github_actions_cache_1.GitHubActionsCache().isAvailable();
this.cacheReadOnly = false;
this.cacheWriteOnly = false;
this.cacheDisabled = false;
@ -183272,7 +183274,7 @@ class CacheListener {
return this.cacheEntries.every(x => !x.wasRequestedButNotRestored());
}
get cacheStatus() {
if (!cache.isFeatureAvailable())
if (!this.cacheAvailable)
return 'not available';
if (this.cacheDisabled)
return 'disabled';
@ -183342,6 +183344,7 @@ class CacheEntryListener {
return this;
}
markRestored(key, size, time) {
core.info(`Restored cache entry with key ${key} in ${time}ms`);
this.restoredKey = key;
this.restoredSize = size;
this.restoredTime = time;
@ -183352,6 +183355,7 @@ class CacheEntryListener {
return this;
}
markSaved(key, size, time) {
core.info(`Saved cache entry with key ${key} in ${time}ms`);
this.savedKey = key;
this.savedSize = size;
this.savedTime = time;
@ -183528,13 +183532,11 @@ exports.cacheDebug = cacheDebug;
exports.handleCacheFailure = handleCacheFailure;
exports.tryDelete = tryDelete;
const core = __importStar(__nccwpck_require__(37484));
const cache = __importStar(__nccwpck_require__(5116));
const exec = __importStar(__nccwpck_require__(95236));
const crypto = __importStar(__nccwpck_require__(76982));
const path = __importStar(__nccwpck_require__(16928));
const fs = __importStar(__nccwpck_require__(79896));
const SEGMENT_DOWNLOAD_TIMEOUT_VAR = 'SEGMENT_DOWNLOAD_TIMEOUT_MINS';
const SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT = 10 * 60 * 1000;
const github_actions_cache_1 = __nccwpck_require__(94423);
function isCacheDebuggingEnabled() {
if (core.isDebug()) {
return true;
@ -183551,18 +183553,17 @@ function hashStrings(values) {
}
return hash.digest('hex');
}
async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
function getCache() {
return new github_actions_cache_1.GitHubActionsCache();
}
async function restoreCache(cachePaths, cacheKey, cacheRestoreKeys, listener) {
listener.markRequested(cacheKey, cacheRestoreKeys);
try {
const startTime = Date.now();
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
? {}
: { segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT };
const restoredEntry = await cache.restoreCache(cachePath, cacheKey, cacheRestoreKeys, cacheRestoreOptions);
const restoredEntry = await getCache().restore(cachePaths, cacheKey, cacheRestoreKeys);
if (restoredEntry !== undefined) {
const restoreTime = Date.now() - startTime;
listener.markRestored(restoredEntry.key, restoredEntry.size, restoreTime);
core.info(`Restored cache entry with key ${cacheKey} to ${cachePath.join()} in ${restoreTime}ms`);
}
return restoredEntry;
}
@ -183572,22 +183573,21 @@ async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
return undefined;
}
}
async function saveCache(cachePath, cacheKey, listener) {
async function saveCache(cachePaths, cacheKey, listener) {
try {
const startTime = Date.now();
const savedEntry = await cache.saveCache(cachePath, cacheKey);
const saveResult = await getCache().save(cachePaths, cacheKey);
const saveTime = Date.now() - startTime;
listener.markSaved(savedEntry.key, savedEntry.size, saveTime);
core.info(`Saved cache entry with key ${cacheKey} from ${cachePath.join()} in ${saveTime}ms`);
}
catch (error) {
if (error instanceof cache.ReserveCacheError) {
if (saveResult.size === 0) {
listener.markAlreadyExists(cacheKey);
}
else {
listener.markNotSaved(error.message);
listener.markSaved(saveResult.key, saveResult.size, saveTime);
}
handleCacheFailure(error, `Failed to save cache entry with path '${cachePath}' and key: ${cacheKey}`);
}
catch (error) {
listener.markNotSaved(error.message);
handleCacheFailure(error, `Failed to save cache entry with path '${cachePaths}' and key: ${cacheKey}`);
}
}
function cacheDebug(message) {
@ -183599,17 +183599,9 @@ function cacheDebug(message) {
}
}
function handleCacheFailure(error, message) {
if (error instanceof cache.ValidationError) {
throw error;
}
if (error instanceof cache.ReserveCacheError) {
core.info(`${message}: ${error}`);
}
else {
core.warning(`${message}: ${error}`);
if (error instanceof Error && error.stack) {
cacheDebug(error.stack);
}
core.warning(`${message}: ${error}`);
if (error instanceof Error && error.stack) {
cacheDebug(error.stack);
}
}
async function tryDelete(file) {
@ -183783,6 +183775,89 @@ async function performCacheCleanup(gradleUserHome, buildResults) {
}
/***/ }),
/***/ 94423:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GitHubActionsCache = void 0;
const gitHubCache = __importStar(__nccwpck_require__(5116));
const core = __importStar(__nccwpck_require__(37484));
const SEGMENT_DOWNLOAD_TIMEOUT_VAR = 'SEGMENT_DOWNLOAD_TIMEOUT_MINS';
const SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT = 10 * 60 * 1000;
class GitHubActionsCache {
isAvailable() {
return gitHubCache.isFeatureAvailable();
}
async restore(paths, primaryKey, restoreKeys) {
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
? {}
: { segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT };
const restored = await gitHubCache.restoreCache(paths, primaryKey, restoreKeys, cacheRestoreOptions);
return restored ? this.cacheResult(restored.key, restored.size) : undefined;
}
async save(paths, key) {
try {
const cacheEntry = await gitHubCache.saveCache(paths, key);
return this.cacheResult(cacheEntry.key, cacheEntry.size);
}
catch (error) {
if (error instanceof gitHubCache.ReserveCacheError) {
core.info(`Cache entry ${key} already exists: ${error}`);
return this.cacheResult(key, 0);
}
throw error;
}
}
cacheResult(key, size) {
return new CacheResult(key, size);
}
}
exports.GitHubActionsCache = GitHubActionsCache;
class CacheResult {
constructor(key, size) {
this.key = key;
this.size = size;
}
}
/***/ }),
/***/ 99914:
@ -185458,7 +185533,7 @@ async function getToken(accessKey, expiry) {
}
class ShortLivedTokenClient {
constructor() {
this.httpc = new httpm.HttpClient('gradle/actions/setup-gradle');
this.httpc = new httpm.HttpClient('gradle/actions');
this.maxRetries = 3;
this.retryInterval = 1000;
}
@ -185885,14 +185960,14 @@ exports.provisionGradleWithVersionAtLeast = provisionGradleWithVersionAtLeast;
const fs = __importStar(__nccwpck_require__(79896));
const os = __importStar(__nccwpck_require__(70857));
const path = __importStar(__nccwpck_require__(16928));
const httpm = __importStar(__nccwpck_require__(54844));
const httpm = __importStar(__nccwpck_require__(96184));
const core = __importStar(__nccwpck_require__(37484));
const cache = __importStar(__nccwpck_require__(5116));
const toolCache = __importStar(__nccwpck_require__(33472));
const gradle_1 = __nccwpck_require__(93439);
const gradlew = __importStar(__nccwpck_require__(46186));
const cache_utils_1 = __nccwpck_require__(68835);
const configuration_1 = __nccwpck_require__(66081);
const cache_reporting_1 = __nccwpck_require__(38528);
const gradleVersionsBaseUrl = 'https://services.gradle.org/versions';
async function provisionGradle(gradleVersion) {
if (gradleVersion !== '' && gradleVersion !== 'wrapper') {
@ -186009,8 +186084,9 @@ async function downloadAndCacheGradleDistribution(versionInfo) {
return downloadPath;
}
const cacheKey = `gradle-${versionInfo.version}`;
const listener = new cache_reporting_1.CacheEntryListener(cacheKey);
try {
const restoreKey = await cache.restoreCache([downloadPath], cacheKey);
const restoreKey = await (0, cache_utils_1.restoreCache)([downloadPath], cacheKey, [], listener);
if (restoreKey) {
core.info(`Restored Gradle distribution ${cacheKey} from cache to ${downloadPath}`);
return downloadPath;
@ -186023,7 +186099,7 @@ async function downloadAndCacheGradleDistribution(versionInfo) {
await downloadGradleDistribution(versionInfo, downloadPath);
if (!cacheConfig.isCacheReadOnly()) {
try {
await cache.saveCache([downloadPath], cacheKey);
await (0, cache_utils_1.saveCache)([downloadPath], cacheKey, listener);
}
catch (error) {
(0, cache_utils_1.handleCacheFailure)(error, `Save Gradle distribution ${versionInfo.version} failed`);
@ -186485,7 +186561,7 @@ const httpm = __importStar(__nccwpck_require__(96184));
const cheerio = __importStar(__nccwpck_require__(36962));
const core = __importStar(__nccwpck_require__(37484));
const wrapper_checksums_json_1 = __importDefault(__nccwpck_require__(46629));
const httpc = new httpm.HttpClient('gradle/wrapper-validation-action', undefined, { allowRetries: true, maxRetries: 3 });
const httpc = new httpm.HttpClient('gradle/actions', undefined, { allowRetries: true, maxRetries: 3 });
class WrapperChecksums {
constructor() {
this.checksums = new Map();

File diff suppressed because one or more lines are too long

View file

@ -143494,7 +143494,8 @@ var __importStar = (this && this.__importStar) || (function () {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CacheEntryListener = exports.CacheListener = exports.CLEANUP_DISABLED_DUE_TO_CONFIG_CACHE_HIT = exports.CLEANUP_DISABLED_DUE_TO_FAILURE = exports.DEFAULT_CLEANUP_DISABLED_REASON = exports.DEFAULT_CLEANUP_ENABLED_REASON = exports.CLEANUP_DISABLED_READONLY = exports.EXISTING_GRADLE_HOME = exports.DEFAULT_WRITEONLY_REASON = exports.DEFAULT_DISABLED_REASON = exports.DEFAULT_READONLY_REASON = exports.DEFAULT_CACHE_ENABLED_REASON = void 0;
exports.generateCachingReport = generateCachingReport;
const cache = __importStar(__nccwpck_require__(5116));
const core = __importStar(__nccwpck_require__(37484));
const github_actions_cache_1 = __nccwpck_require__(94423);
exports.DEFAULT_CACHE_ENABLED_REASON = `[Cache was enabled](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#caching-build-state-between-jobs). Action attempted to both restore and save the Gradle User Home.`;
exports.DEFAULT_READONLY_REASON = `[Cache was read-only](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#using-the-cache-read-only). By default, the action will only write to the cache for Jobs running on the default branch.`;
exports.DEFAULT_DISABLED_REASON = `[Cache was disabled](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#disabling-caching) via action configuration. Gradle User Home was not restored from or saved to the cache.`;
@ -143508,6 +143509,7 @@ exports.CLEANUP_DISABLED_DUE_TO_CONFIG_CACHE_HIT = '[Cache cleanup was disabled
class CacheListener {
constructor() {
this.cacheEntries = [];
this.cacheAvailable = new github_actions_cache_1.GitHubActionsCache().isAvailable();
this.cacheReadOnly = false;
this.cacheWriteOnly = false;
this.cacheDisabled = false;
@ -143518,7 +143520,7 @@ class CacheListener {
return this.cacheEntries.every(x => !x.wasRequestedButNotRestored());
}
get cacheStatus() {
if (!cache.isFeatureAvailable())
if (!this.cacheAvailable)
return 'not available';
if (this.cacheDisabled)
return 'disabled';
@ -143588,6 +143590,7 @@ class CacheEntryListener {
return this;
}
markRestored(key, size, time) {
core.info(`Restored cache entry with key ${key} in ${time}ms`);
this.restoredKey = key;
this.restoredSize = size;
this.restoredTime = time;
@ -143598,6 +143601,7 @@ class CacheEntryListener {
return this;
}
markSaved(key, size, time) {
core.info(`Saved cache entry with key ${key} in ${time}ms`);
this.savedKey = key;
this.savedSize = size;
this.savedTime = time;
@ -143774,13 +143778,11 @@ exports.cacheDebug = cacheDebug;
exports.handleCacheFailure = handleCacheFailure;
exports.tryDelete = tryDelete;
const core = __importStar(__nccwpck_require__(37484));
const cache = __importStar(__nccwpck_require__(5116));
const exec = __importStar(__nccwpck_require__(95236));
const crypto = __importStar(__nccwpck_require__(76982));
const path = __importStar(__nccwpck_require__(16928));
const fs = __importStar(__nccwpck_require__(79896));
const SEGMENT_DOWNLOAD_TIMEOUT_VAR = 'SEGMENT_DOWNLOAD_TIMEOUT_MINS';
const SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT = 10 * 60 * 1000;
const github_actions_cache_1 = __nccwpck_require__(94423);
function isCacheDebuggingEnabled() {
if (core.isDebug()) {
return true;
@ -143797,18 +143799,17 @@ function hashStrings(values) {
}
return hash.digest('hex');
}
async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
function getCache() {
return new github_actions_cache_1.GitHubActionsCache();
}
async function restoreCache(cachePaths, cacheKey, cacheRestoreKeys, listener) {
listener.markRequested(cacheKey, cacheRestoreKeys);
try {
const startTime = Date.now();
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
? {}
: { segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT };
const restoredEntry = await cache.restoreCache(cachePath, cacheKey, cacheRestoreKeys, cacheRestoreOptions);
const restoredEntry = await getCache().restore(cachePaths, cacheKey, cacheRestoreKeys);
if (restoredEntry !== undefined) {
const restoreTime = Date.now() - startTime;
listener.markRestored(restoredEntry.key, restoredEntry.size, restoreTime);
core.info(`Restored cache entry with key ${cacheKey} to ${cachePath.join()} in ${restoreTime}ms`);
}
return restoredEntry;
}
@ -143818,22 +143819,21 @@ async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
return undefined;
}
}
async function saveCache(cachePath, cacheKey, listener) {
async function saveCache(cachePaths, cacheKey, listener) {
try {
const startTime = Date.now();
const savedEntry = await cache.saveCache(cachePath, cacheKey);
const saveResult = await getCache().save(cachePaths, cacheKey);
const saveTime = Date.now() - startTime;
listener.markSaved(savedEntry.key, savedEntry.size, saveTime);
core.info(`Saved cache entry with key ${cacheKey} from ${cachePath.join()} in ${saveTime}ms`);
}
catch (error) {
if (error instanceof cache.ReserveCacheError) {
if (saveResult.size === 0) {
listener.markAlreadyExists(cacheKey);
}
else {
listener.markNotSaved(error.message);
listener.markSaved(saveResult.key, saveResult.size, saveTime);
}
handleCacheFailure(error, `Failed to save cache entry with path '${cachePath}' and key: ${cacheKey}`);
}
catch (error) {
listener.markNotSaved(error.message);
handleCacheFailure(error, `Failed to save cache entry with path '${cachePaths}' and key: ${cacheKey}`);
}
}
function cacheDebug(message) {
@ -143845,17 +143845,9 @@ function cacheDebug(message) {
}
}
function handleCacheFailure(error, message) {
if (error instanceof cache.ValidationError) {
throw error;
}
if (error instanceof cache.ReserveCacheError) {
core.info(`${message}: ${error}`);
}
else {
core.warning(`${message}: ${error}`);
if (error instanceof Error && error.stack) {
cacheDebug(error.stack);
}
core.warning(`${message}: ${error}`);
if (error instanceof Error && error.stack) {
cacheDebug(error.stack);
}
}
async function tryDelete(file) {
@ -144029,6 +144021,89 @@ async function performCacheCleanup(gradleUserHome, buildResults) {
}
/***/ }),
/***/ 94423:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GitHubActionsCache = void 0;
const gitHubCache = __importStar(__nccwpck_require__(5116));
const core = __importStar(__nccwpck_require__(37484));
const SEGMENT_DOWNLOAD_TIMEOUT_VAR = 'SEGMENT_DOWNLOAD_TIMEOUT_MINS';
const SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT = 10 * 60 * 1000;
class GitHubActionsCache {
isAvailable() {
return gitHubCache.isFeatureAvailable();
}
async restore(paths, primaryKey, restoreKeys) {
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
? {}
: { segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT };
const restored = await gitHubCache.restoreCache(paths, primaryKey, restoreKeys, cacheRestoreOptions);
return restored ? this.cacheResult(restored.key, restored.size) : undefined;
}
async save(paths, key) {
try {
const cacheEntry = await gitHubCache.saveCache(paths, key);
return this.cacheResult(cacheEntry.key, cacheEntry.size);
}
catch (error) {
if (error instanceof gitHubCache.ReserveCacheError) {
core.info(`Cache entry ${key} already exists: ${error}`);
return this.cacheResult(key, 0);
}
throw error;
}
}
cacheResult(key, size) {
return new CacheResult(key, size);
}
}
exports.GitHubActionsCache = GitHubActionsCache;
class CacheResult {
constructor(key, size) {
this.key = key;
this.size = size;
}
}
/***/ }),
/***/ 99914:
@ -145419,7 +145494,7 @@ async function getToken(accessKey, expiry) {
}
class ShortLivedTokenClient {
constructor() {
this.httpc = new httpm.HttpClient('gradle/actions/setup-gradle');
this.httpc = new httpm.HttpClient('gradle/actions');
this.maxRetries = 3;
this.retryInterval = 1000;
}
@ -145846,14 +145921,14 @@ exports.provisionGradleWithVersionAtLeast = provisionGradleWithVersionAtLeast;
const fs = __importStar(__nccwpck_require__(79896));
const os = __importStar(__nccwpck_require__(70857));
const path = __importStar(__nccwpck_require__(16928));
const httpm = __importStar(__nccwpck_require__(54844));
const httpm = __importStar(__nccwpck_require__(96184));
const core = __importStar(__nccwpck_require__(37484));
const cache = __importStar(__nccwpck_require__(5116));
const toolCache = __importStar(__nccwpck_require__(33472));
const gradle_1 = __nccwpck_require__(93439);
const gradlew = __importStar(__nccwpck_require__(46186));
const cache_utils_1 = __nccwpck_require__(68835);
const configuration_1 = __nccwpck_require__(66081);
const cache_reporting_1 = __nccwpck_require__(38528);
const gradleVersionsBaseUrl = 'https://services.gradle.org/versions';
async function provisionGradle(gradleVersion) {
if (gradleVersion !== '' && gradleVersion !== 'wrapper') {
@ -145970,8 +146045,9 @@ async function downloadAndCacheGradleDistribution(versionInfo) {
return downloadPath;
}
const cacheKey = `gradle-${versionInfo.version}`;
const listener = new cache_reporting_1.CacheEntryListener(cacheKey);
try {
const restoreKey = await cache.restoreCache([downloadPath], cacheKey);
const restoreKey = await (0, cache_utils_1.restoreCache)([downloadPath], cacheKey, [], listener);
if (restoreKey) {
core.info(`Restored Gradle distribution ${cacheKey} from cache to ${downloadPath}`);
return downloadPath;
@ -145984,7 +146060,7 @@ async function downloadAndCacheGradleDistribution(versionInfo) {
await downloadGradleDistribution(versionInfo, downloadPath);
if (!cacheConfig.isCacheReadOnly()) {
try {
await cache.saveCache([downloadPath], cacheKey);
await (0, cache_utils_1.saveCache)([downloadPath], cacheKey, listener);
}
catch (error) {
(0, cache_utils_1.handleCacheFailure)(error, `Save Gradle distribution ${versionInfo.version} failed`);
@ -146446,7 +146522,7 @@ const httpm = __importStar(__nccwpck_require__(96184));
const cheerio = __importStar(__nccwpck_require__(36962));
const core = __importStar(__nccwpck_require__(37484));
const wrapper_checksums_json_1 = __importDefault(__nccwpck_require__(46629));
const httpc = new httpm.HttpClient('gradle/wrapper-validation-action', undefined, { allowRetries: true, maxRetries: 3 });
const httpc = new httpm.HttpClient('gradle/actions', undefined, { allowRetries: true, maxRetries: 3 });
class WrapperChecksums {
constructor() {
this.checksums = new Map();

File diff suppressed because one or more lines are too long

View file

@ -183233,7 +183233,8 @@ var __importStar = (this && this.__importStar) || (function () {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CacheEntryListener = exports.CacheListener = exports.CLEANUP_DISABLED_DUE_TO_CONFIG_CACHE_HIT = exports.CLEANUP_DISABLED_DUE_TO_FAILURE = exports.DEFAULT_CLEANUP_DISABLED_REASON = exports.DEFAULT_CLEANUP_ENABLED_REASON = exports.CLEANUP_DISABLED_READONLY = exports.EXISTING_GRADLE_HOME = exports.DEFAULT_WRITEONLY_REASON = exports.DEFAULT_DISABLED_REASON = exports.DEFAULT_READONLY_REASON = exports.DEFAULT_CACHE_ENABLED_REASON = void 0;
exports.generateCachingReport = generateCachingReport;
const cache = __importStar(__nccwpck_require__(5116));
const core = __importStar(__nccwpck_require__(37484));
const github_actions_cache_1 = __nccwpck_require__(94423);
exports.DEFAULT_CACHE_ENABLED_REASON = `[Cache was enabled](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#caching-build-state-between-jobs). Action attempted to both restore and save the Gradle User Home.`;
exports.DEFAULT_READONLY_REASON = `[Cache was read-only](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#using-the-cache-read-only). By default, the action will only write to the cache for Jobs running on the default branch.`;
exports.DEFAULT_DISABLED_REASON = `[Cache was disabled](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#disabling-caching) via action configuration. Gradle User Home was not restored from or saved to the cache.`;
@ -183247,6 +183248,7 @@ exports.CLEANUP_DISABLED_DUE_TO_CONFIG_CACHE_HIT = '[Cache cleanup was disabled
class CacheListener {
constructor() {
this.cacheEntries = [];
this.cacheAvailable = new github_actions_cache_1.GitHubActionsCache().isAvailable();
this.cacheReadOnly = false;
this.cacheWriteOnly = false;
this.cacheDisabled = false;
@ -183257,7 +183259,7 @@ class CacheListener {
return this.cacheEntries.every(x => !x.wasRequestedButNotRestored());
}
get cacheStatus() {
if (!cache.isFeatureAvailable())
if (!this.cacheAvailable)
return 'not available';
if (this.cacheDisabled)
return 'disabled';
@ -183327,6 +183329,7 @@ class CacheEntryListener {
return this;
}
markRestored(key, size, time) {
core.info(`Restored cache entry with key ${key} in ${time}ms`);
this.restoredKey = key;
this.restoredSize = size;
this.restoredTime = time;
@ -183337,6 +183340,7 @@ class CacheEntryListener {
return this;
}
markSaved(key, size, time) {
core.info(`Saved cache entry with key ${key} in ${time}ms`);
this.savedKey = key;
this.savedSize = size;
this.savedTime = time;
@ -183513,13 +183517,11 @@ exports.cacheDebug = cacheDebug;
exports.handleCacheFailure = handleCacheFailure;
exports.tryDelete = tryDelete;
const core = __importStar(__nccwpck_require__(37484));
const cache = __importStar(__nccwpck_require__(5116));
const exec = __importStar(__nccwpck_require__(95236));
const crypto = __importStar(__nccwpck_require__(76982));
const path = __importStar(__nccwpck_require__(16928));
const fs = __importStar(__nccwpck_require__(79896));
const SEGMENT_DOWNLOAD_TIMEOUT_VAR = 'SEGMENT_DOWNLOAD_TIMEOUT_MINS';
const SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT = 10 * 60 * 1000;
const github_actions_cache_1 = __nccwpck_require__(94423);
function isCacheDebuggingEnabled() {
if (core.isDebug()) {
return true;
@ -183536,18 +183538,17 @@ function hashStrings(values) {
}
return hash.digest('hex');
}
async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
function getCache() {
return new github_actions_cache_1.GitHubActionsCache();
}
async function restoreCache(cachePaths, cacheKey, cacheRestoreKeys, listener) {
listener.markRequested(cacheKey, cacheRestoreKeys);
try {
const startTime = Date.now();
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
? {}
: { segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT };
const restoredEntry = await cache.restoreCache(cachePath, cacheKey, cacheRestoreKeys, cacheRestoreOptions);
const restoredEntry = await getCache().restore(cachePaths, cacheKey, cacheRestoreKeys);
if (restoredEntry !== undefined) {
const restoreTime = Date.now() - startTime;
listener.markRestored(restoredEntry.key, restoredEntry.size, restoreTime);
core.info(`Restored cache entry with key ${cacheKey} to ${cachePath.join()} in ${restoreTime}ms`);
}
return restoredEntry;
}
@ -183557,22 +183558,21 @@ async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
return undefined;
}
}
async function saveCache(cachePath, cacheKey, listener) {
async function saveCache(cachePaths, cacheKey, listener) {
try {
const startTime = Date.now();
const savedEntry = await cache.saveCache(cachePath, cacheKey);
const saveResult = await getCache().save(cachePaths, cacheKey);
const saveTime = Date.now() - startTime;
listener.markSaved(savedEntry.key, savedEntry.size, saveTime);
core.info(`Saved cache entry with key ${cacheKey} from ${cachePath.join()} in ${saveTime}ms`);
}
catch (error) {
if (error instanceof cache.ReserveCacheError) {
if (saveResult.size === 0) {
listener.markAlreadyExists(cacheKey);
}
else {
listener.markNotSaved(error.message);
listener.markSaved(saveResult.key, saveResult.size, saveTime);
}
handleCacheFailure(error, `Failed to save cache entry with path '${cachePath}' and key: ${cacheKey}`);
}
catch (error) {
listener.markNotSaved(error.message);
handleCacheFailure(error, `Failed to save cache entry with path '${cachePaths}' and key: ${cacheKey}`);
}
}
function cacheDebug(message) {
@ -183584,17 +183584,9 @@ function cacheDebug(message) {
}
}
function handleCacheFailure(error, message) {
if (error instanceof cache.ValidationError) {
throw error;
}
if (error instanceof cache.ReserveCacheError) {
core.info(`${message}: ${error}`);
}
else {
core.warning(`${message}: ${error}`);
if (error instanceof Error && error.stack) {
cacheDebug(error.stack);
}
core.warning(`${message}: ${error}`);
if (error instanceof Error && error.stack) {
cacheDebug(error.stack);
}
}
async function tryDelete(file) {
@ -183768,6 +183760,89 @@ async function performCacheCleanup(gradleUserHome, buildResults) {
}
/***/ }),
/***/ 94423:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GitHubActionsCache = void 0;
const gitHubCache = __importStar(__nccwpck_require__(5116));
const core = __importStar(__nccwpck_require__(37484));
const SEGMENT_DOWNLOAD_TIMEOUT_VAR = 'SEGMENT_DOWNLOAD_TIMEOUT_MINS';
const SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT = 10 * 60 * 1000;
class GitHubActionsCache {
isAvailable() {
return gitHubCache.isFeatureAvailable();
}
async restore(paths, primaryKey, restoreKeys) {
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
? {}
: { segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT };
const restored = await gitHubCache.restoreCache(paths, primaryKey, restoreKeys, cacheRestoreOptions);
return restored ? this.cacheResult(restored.key, restored.size) : undefined;
}
async save(paths, key) {
try {
const cacheEntry = await gitHubCache.saveCache(paths, key);
return this.cacheResult(cacheEntry.key, cacheEntry.size);
}
catch (error) {
if (error instanceof gitHubCache.ReserveCacheError) {
core.info(`Cache entry ${key} already exists: ${error}`);
return this.cacheResult(key, 0);
}
throw error;
}
}
cacheResult(key, size) {
return new CacheResult(key, size);
}
}
exports.GitHubActionsCache = GitHubActionsCache;
class CacheResult {
constructor(key, size) {
this.key = key;
this.size = size;
}
}
/***/ }),
/***/ 99914:
@ -185443,7 +185518,7 @@ async function getToken(accessKey, expiry) {
}
class ShortLivedTokenClient {
constructor() {
this.httpc = new httpm.HttpClient('gradle/actions/setup-gradle');
this.httpc = new httpm.HttpClient('gradle/actions');
this.maxRetries = 3;
this.retryInterval = 1000;
}
@ -185870,14 +185945,14 @@ exports.provisionGradleWithVersionAtLeast = provisionGradleWithVersionAtLeast;
const fs = __importStar(__nccwpck_require__(79896));
const os = __importStar(__nccwpck_require__(70857));
const path = __importStar(__nccwpck_require__(16928));
const httpm = __importStar(__nccwpck_require__(54844));
const httpm = __importStar(__nccwpck_require__(96184));
const core = __importStar(__nccwpck_require__(37484));
const cache = __importStar(__nccwpck_require__(5116));
const toolCache = __importStar(__nccwpck_require__(33472));
const gradle_1 = __nccwpck_require__(93439);
const gradlew = __importStar(__nccwpck_require__(46186));
const cache_utils_1 = __nccwpck_require__(68835);
const configuration_1 = __nccwpck_require__(66081);
const cache_reporting_1 = __nccwpck_require__(38528);
const gradleVersionsBaseUrl = 'https://services.gradle.org/versions';
async function provisionGradle(gradleVersion) {
if (gradleVersion !== '' && gradleVersion !== 'wrapper') {
@ -185994,8 +186069,9 @@ async function downloadAndCacheGradleDistribution(versionInfo) {
return downloadPath;
}
const cacheKey = `gradle-${versionInfo.version}`;
const listener = new cache_reporting_1.CacheEntryListener(cacheKey);
try {
const restoreKey = await cache.restoreCache([downloadPath], cacheKey);
const restoreKey = await (0, cache_utils_1.restoreCache)([downloadPath], cacheKey, [], listener);
if (restoreKey) {
core.info(`Restored Gradle distribution ${cacheKey} from cache to ${downloadPath}`);
return downloadPath;
@ -186008,7 +186084,7 @@ async function downloadAndCacheGradleDistribution(versionInfo) {
await downloadGradleDistribution(versionInfo, downloadPath);
if (!cacheConfig.isCacheReadOnly()) {
try {
await cache.saveCache([downloadPath], cacheKey);
await (0, cache_utils_1.saveCache)([downloadPath], cacheKey, listener);
}
catch (error) {
(0, cache_utils_1.handleCacheFailure)(error, `Save Gradle distribution ${versionInfo.version} failed`);
@ -186470,7 +186546,7 @@ const httpm = __importStar(__nccwpck_require__(96184));
const cheerio = __importStar(__nccwpck_require__(36962));
const core = __importStar(__nccwpck_require__(37484));
const wrapper_checksums_json_1 = __importDefault(__nccwpck_require__(46629));
const httpc = new httpm.HttpClient('gradle/wrapper-validation-action', undefined, { allowRetries: true, maxRetries: 3 });
const httpc = new httpm.HttpClient('gradle/actions', undefined, { allowRetries: true, maxRetries: 3 });
class WrapperChecksums {
constructor() {
this.checksums = new Map();

File diff suppressed because one or more lines are too long

View file

@ -183228,7 +183228,8 @@ var __importStar = (this && this.__importStar) || (function () {
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.CacheEntryListener = exports.CacheListener = exports.CLEANUP_DISABLED_DUE_TO_CONFIG_CACHE_HIT = exports.CLEANUP_DISABLED_DUE_TO_FAILURE = exports.DEFAULT_CLEANUP_DISABLED_REASON = exports.DEFAULT_CLEANUP_ENABLED_REASON = exports.CLEANUP_DISABLED_READONLY = exports.EXISTING_GRADLE_HOME = exports.DEFAULT_WRITEONLY_REASON = exports.DEFAULT_DISABLED_REASON = exports.DEFAULT_READONLY_REASON = exports.DEFAULT_CACHE_ENABLED_REASON = void 0;
exports.generateCachingReport = generateCachingReport;
const cache = __importStar(__nccwpck_require__(5116));
const core = __importStar(__nccwpck_require__(37484));
const github_actions_cache_1 = __nccwpck_require__(94423);
exports.DEFAULT_CACHE_ENABLED_REASON = `[Cache was enabled](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#caching-build-state-between-jobs). Action attempted to both restore and save the Gradle User Home.`;
exports.DEFAULT_READONLY_REASON = `[Cache was read-only](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#using-the-cache-read-only). By default, the action will only write to the cache for Jobs running on the default branch.`;
exports.DEFAULT_DISABLED_REASON = `[Cache was disabled](https://github.com/gradle/actions/blob/main/docs/setup-gradle.md#disabling-caching) via action configuration. Gradle User Home was not restored from or saved to the cache.`;
@ -183242,6 +183243,7 @@ exports.CLEANUP_DISABLED_DUE_TO_CONFIG_CACHE_HIT = '[Cache cleanup was disabled
class CacheListener {
constructor() {
this.cacheEntries = [];
this.cacheAvailable = new github_actions_cache_1.GitHubActionsCache().isAvailable();
this.cacheReadOnly = false;
this.cacheWriteOnly = false;
this.cacheDisabled = false;
@ -183252,7 +183254,7 @@ class CacheListener {
return this.cacheEntries.every(x => !x.wasRequestedButNotRestored());
}
get cacheStatus() {
if (!cache.isFeatureAvailable())
if (!this.cacheAvailable)
return 'not available';
if (this.cacheDisabled)
return 'disabled';
@ -183322,6 +183324,7 @@ class CacheEntryListener {
return this;
}
markRestored(key, size, time) {
core.info(`Restored cache entry with key ${key} in ${time}ms`);
this.restoredKey = key;
this.restoredSize = size;
this.restoredTime = time;
@ -183332,6 +183335,7 @@ class CacheEntryListener {
return this;
}
markSaved(key, size, time) {
core.info(`Saved cache entry with key ${key} in ${time}ms`);
this.savedKey = key;
this.savedSize = size;
this.savedTime = time;
@ -183508,13 +183512,11 @@ exports.cacheDebug = cacheDebug;
exports.handleCacheFailure = handleCacheFailure;
exports.tryDelete = tryDelete;
const core = __importStar(__nccwpck_require__(37484));
const cache = __importStar(__nccwpck_require__(5116));
const exec = __importStar(__nccwpck_require__(95236));
const crypto = __importStar(__nccwpck_require__(76982));
const path = __importStar(__nccwpck_require__(16928));
const fs = __importStar(__nccwpck_require__(79896));
const SEGMENT_DOWNLOAD_TIMEOUT_VAR = 'SEGMENT_DOWNLOAD_TIMEOUT_MINS';
const SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT = 10 * 60 * 1000;
const github_actions_cache_1 = __nccwpck_require__(94423);
function isCacheDebuggingEnabled() {
if (core.isDebug()) {
return true;
@ -183531,18 +183533,17 @@ function hashStrings(values) {
}
return hash.digest('hex');
}
async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
function getCache() {
return new github_actions_cache_1.GitHubActionsCache();
}
async function restoreCache(cachePaths, cacheKey, cacheRestoreKeys, listener) {
listener.markRequested(cacheKey, cacheRestoreKeys);
try {
const startTime = Date.now();
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
? {}
: { segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT };
const restoredEntry = await cache.restoreCache(cachePath, cacheKey, cacheRestoreKeys, cacheRestoreOptions);
const restoredEntry = await getCache().restore(cachePaths, cacheKey, cacheRestoreKeys);
if (restoredEntry !== undefined) {
const restoreTime = Date.now() - startTime;
listener.markRestored(restoredEntry.key, restoredEntry.size, restoreTime);
core.info(`Restored cache entry with key ${cacheKey} to ${cachePath.join()} in ${restoreTime}ms`);
}
return restoredEntry;
}
@ -183552,22 +183553,21 @@ async function restoreCache(cachePath, cacheKey, cacheRestoreKeys, listener) {
return undefined;
}
}
async function saveCache(cachePath, cacheKey, listener) {
async function saveCache(cachePaths, cacheKey, listener) {
try {
const startTime = Date.now();
const savedEntry = await cache.saveCache(cachePath, cacheKey);
const saveResult = await getCache().save(cachePaths, cacheKey);
const saveTime = Date.now() - startTime;
listener.markSaved(savedEntry.key, savedEntry.size, saveTime);
core.info(`Saved cache entry with key ${cacheKey} from ${cachePath.join()} in ${saveTime}ms`);
}
catch (error) {
if (error instanceof cache.ReserveCacheError) {
if (saveResult.size === 0) {
listener.markAlreadyExists(cacheKey);
}
else {
listener.markNotSaved(error.message);
listener.markSaved(saveResult.key, saveResult.size, saveTime);
}
handleCacheFailure(error, `Failed to save cache entry with path '${cachePath}' and key: ${cacheKey}`);
}
catch (error) {
listener.markNotSaved(error.message);
handleCacheFailure(error, `Failed to save cache entry with path '${cachePaths}' and key: ${cacheKey}`);
}
}
function cacheDebug(message) {
@ -183579,17 +183579,9 @@ function cacheDebug(message) {
}
}
function handleCacheFailure(error, message) {
if (error instanceof cache.ValidationError) {
throw error;
}
if (error instanceof cache.ReserveCacheError) {
core.info(`${message}: ${error}`);
}
else {
core.warning(`${message}: ${error}`);
if (error instanceof Error && error.stack) {
cacheDebug(error.stack);
}
core.warning(`${message}: ${error}`);
if (error instanceof Error && error.stack) {
cacheDebug(error.stack);
}
}
async function tryDelete(file) {
@ -183763,6 +183755,89 @@ async function performCacheCleanup(gradleUserHome, buildResults) {
}
/***/ }),
/***/ 94423:
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.GitHubActionsCache = void 0;
const gitHubCache = __importStar(__nccwpck_require__(5116));
const core = __importStar(__nccwpck_require__(37484));
const SEGMENT_DOWNLOAD_TIMEOUT_VAR = 'SEGMENT_DOWNLOAD_TIMEOUT_MINS';
const SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT = 10 * 60 * 1000;
class GitHubActionsCache {
isAvailable() {
return gitHubCache.isFeatureAvailable();
}
async restore(paths, primaryKey, restoreKeys) {
const cacheRestoreOptions = process.env[SEGMENT_DOWNLOAD_TIMEOUT_VAR]
? {}
: { segmentTimeoutInMs: SEGMENT_DOWNLOAD_TIMEOUT_DEFAULT };
const restored = await gitHubCache.restoreCache(paths, primaryKey, restoreKeys, cacheRestoreOptions);
return restored ? this.cacheResult(restored.key, restored.size) : undefined;
}
async save(paths, key) {
try {
const cacheEntry = await gitHubCache.saveCache(paths, key);
return this.cacheResult(cacheEntry.key, cacheEntry.size);
}
catch (error) {
if (error instanceof gitHubCache.ReserveCacheError) {
core.info(`Cache entry ${key} already exists: ${error}`);
return this.cacheResult(key, 0);
}
throw error;
}
}
cacheResult(key, size) {
return new CacheResult(key, size);
}
}
exports.GitHubActionsCache = GitHubActionsCache;
class CacheResult {
constructor(key, size) {
this.key = key;
this.size = size;
}
}
/***/ }),
/***/ 99914:
@ -185438,7 +185513,7 @@ async function getToken(accessKey, expiry) {
}
class ShortLivedTokenClient {
constructor() {
this.httpc = new httpm.HttpClient('gradle/actions/setup-gradle');
this.httpc = new httpm.HttpClient('gradle/actions');
this.maxRetries = 3;
this.retryInterval = 1000;
}
@ -185865,14 +185940,14 @@ exports.provisionGradleWithVersionAtLeast = provisionGradleWithVersionAtLeast;
const fs = __importStar(__nccwpck_require__(79896));
const os = __importStar(__nccwpck_require__(70857));
const path = __importStar(__nccwpck_require__(16928));
const httpm = __importStar(__nccwpck_require__(54844));
const httpm = __importStar(__nccwpck_require__(96184));
const core = __importStar(__nccwpck_require__(37484));
const cache = __importStar(__nccwpck_require__(5116));
const toolCache = __importStar(__nccwpck_require__(33472));
const gradle_1 = __nccwpck_require__(93439);
const gradlew = __importStar(__nccwpck_require__(46186));
const cache_utils_1 = __nccwpck_require__(68835);
const configuration_1 = __nccwpck_require__(66081);
const cache_reporting_1 = __nccwpck_require__(38528);
const gradleVersionsBaseUrl = 'https://services.gradle.org/versions';
async function provisionGradle(gradleVersion) {
if (gradleVersion !== '' && gradleVersion !== 'wrapper') {
@ -185989,8 +186064,9 @@ async function downloadAndCacheGradleDistribution(versionInfo) {
return downloadPath;
}
const cacheKey = `gradle-${versionInfo.version}`;
const listener = new cache_reporting_1.CacheEntryListener(cacheKey);
try {
const restoreKey = await cache.restoreCache([downloadPath], cacheKey);
const restoreKey = await (0, cache_utils_1.restoreCache)([downloadPath], cacheKey, [], listener);
if (restoreKey) {
core.info(`Restored Gradle distribution ${cacheKey} from cache to ${downloadPath}`);
return downloadPath;
@ -186003,7 +186079,7 @@ async function downloadAndCacheGradleDistribution(versionInfo) {
await downloadGradleDistribution(versionInfo, downloadPath);
if (!cacheConfig.isCacheReadOnly()) {
try {
await cache.saveCache([downloadPath], cacheKey);
await (0, cache_utils_1.saveCache)([downloadPath], cacheKey, listener);
}
catch (error) {
(0, cache_utils_1.handleCacheFailure)(error, `Save Gradle distribution ${versionInfo.version} failed`);
@ -186465,7 +186541,7 @@ const httpm = __importStar(__nccwpck_require__(96184));
const cheerio = __importStar(__nccwpck_require__(36962));
const core = __importStar(__nccwpck_require__(37484));
const wrapper_checksums_json_1 = __importDefault(__nccwpck_require__(46629));
const httpc = new httpm.HttpClient('gradle/wrapper-validation-action', undefined, { allowRetries: true, maxRetries: 3 });
const httpc = new httpm.HttpClient('gradle/actions', undefined, { allowRetries: true, maxRetries: 3 });
class WrapperChecksums {
constructor() {
this.checksums = new Map();

File diff suppressed because one or more lines are too long

View file

@ -137320,7 +137320,7 @@ const httpm = __importStar(__nccwpck_require__(96184));
const cheerio = __importStar(__nccwpck_require__(36962));
const core = __importStar(__nccwpck_require__(37484));
const wrapper_checksums_json_1 = __importDefault(__nccwpck_require__(46629));
const httpc = new httpm.HttpClient('gradle/wrapper-validation-action', undefined, { allowRetries: true, maxRetries: 3 });
const httpc = new httpm.HttpClient('gradle/actions', undefined, { allowRetries: true, maxRetries: 3 });
class WrapperChecksums {
constructor() {
this.checksums = new Map();

File diff suppressed because one or more lines are too long