mirror of
https://gitea.com/actions/cache.git
synced 2026-12-03 19:49:07 +08:00
Use tarballs instead of zip archives
This commit is contained in:
1 parent
d1f6bed957
commit
0968f23612
5 files changed
+622
-1562
No files matched your search
Vendored
+154
-387
@@ -27687,10 +27687,8 @@ const cacheHttpClient = __importStar(__nccwpck_require__(42370));
|
|||||||
const cacheTwirpClient = __importStar(__nccwpck_require__(95451));
|
const cacheTwirpClient = __importStar(__nccwpck_require__(95451));
|
||||||
const tar_1 = __nccwpck_require__(49099);
|
const tar_1 = __nccwpck_require__(49099);
|
||||||
const upload_cache_1 = __nccwpck_require__(47107);
|
const upload_cache_1 = __nccwpck_require__(47107);
|
||||||
const download_cache_1 = __nccwpck_require__(9049);
|
|
||||||
const upload_zip_specification_1 = __nccwpck_require__(77643);
|
|
||||||
const zip_1 = __nccwpck_require__(26699);
|
|
||||||
const util_1 = __nccwpck_require__(49196);
|
const util_1 = __nccwpck_require__(49196);
|
||||||
|
const constants_1 = __nccwpck_require__(74010);
|
||||||
class ValidationError extends Error {
|
class ValidationError extends Error {
|
||||||
constructor(message) {
|
constructor(message) {
|
||||||
super(message);
|
super(message);
|
||||||
@@ -27744,7 +27742,7 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
checkPaths(paths);
|
checkPaths(paths);
|
||||||
const cacheServiceVersion = config.getCacheServiceVersion();
|
const cacheServiceVersion = config.getCacheServiceVersion();
|
||||||
console.debug(`Cache Service Version: ${cacheServiceVersion}`);
|
console.debug(`Cache service version: ${cacheServiceVersion}`);
|
||||||
switch (cacheServiceVersion) {
|
switch (cacheServiceVersion) {
|
||||||
case "v2":
|
case "v2":
|
||||||
return yield restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive);
|
return yield restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive);
|
||||||
@@ -27755,6 +27753,16 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.restoreCache = restoreCache;
|
exports.restoreCache = restoreCache;
|
||||||
|
/**
|
||||||
|
* Restores cache using the legacy Cache Service
|
||||||
|
*
|
||||||
|
* @param paths
|
||||||
|
* @param primaryKey
|
||||||
|
* @param restoreKeys
|
||||||
|
* @param options
|
||||||
|
* @param enableCrossOsArchive
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
function restoreCachev1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
function restoreCachev1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
restoreKeys = restoreKeys || [];
|
restoreKeys = restoreKeys || [];
|
||||||
@@ -27818,6 +27826,16 @@ function restoreCachev1(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
|||||||
return undefined;
|
return undefined;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Restores cache using the new Cache Service
|
||||||
|
*
|
||||||
|
* @param paths a list of file paths to restore from the cache
|
||||||
|
* @param primaryKey an explicit key for restoring the cache
|
||||||
|
* @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for key
|
||||||
|
* @param downloadOptions cache download options
|
||||||
|
* @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform
|
||||||
|
* @returns string returns the key for the cache hit, otherwise returns undefined
|
||||||
|
*/
|
||||||
function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
restoreKeys = restoreKeys || [];
|
restoreKeys = restoreKeys || [];
|
||||||
@@ -27830,11 +27848,12 @@ function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
|||||||
for (const key of keys) {
|
for (const key of keys) {
|
||||||
checkKey(key);
|
checkKey(key);
|
||||||
}
|
}
|
||||||
|
let archivePath = '';
|
||||||
try {
|
try {
|
||||||
|
const twirpClient = cacheTwirpClient.internalCacheTwirpClient();
|
||||||
// BackendIds are retrieved form the signed JWT
|
// BackendIds are retrieved form the signed JWT
|
||||||
const backendIds = (0, util_1.getBackendIdsFromToken)();
|
const backendIds = (0, util_1.getBackendIdsFromToken)();
|
||||||
const compressionMethod = yield utils.getCompressionMethod();
|
const compressionMethod = yield utils.getCompressionMethod();
|
||||||
const twirpClient = cacheTwirpClient.internalCacheTwirpClient();
|
|
||||||
const request = {
|
const request = {
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
@@ -27842,22 +27861,44 @@ function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
|||||||
restoreKeys: restoreKeys,
|
restoreKeys: restoreKeys,
|
||||||
version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive),
|
version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive),
|
||||||
};
|
};
|
||||||
|
console.debug(`GetCacheEntryDownloadURLRequest: ${JSON.stringify(twirpClient)}`);
|
||||||
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
||||||
core.info(`GetCacheEntryDownloadURLResponse: ${JSON.stringify(response)}`);
|
core.debug(`GetCacheEntryDownloadURLResponse: ${JSON.stringify(response)}`);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
// Cache not found
|
// Cache not found
|
||||||
core.warning(`Cache not found for keys: ${keys.join(', ')}`);
|
core.warning(`Cache not found for keys: ${keys.join(', ')}`);
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
core.info(`Cache hit for: ${request.key}`);
|
core.info(`Cache hit for: ${request.key}`);
|
||||||
core.info(`Starting download of artifact to: ${paths[0]}`);
|
if (options === null || options === void 0 ? void 0 : options.lookupOnly) {
|
||||||
yield (0, download_cache_1.StreamExtract)(response.signedDownloadUrl, path.dirname(paths[0]));
|
core.info('Lookup only - skipping download');
|
||||||
core.info(`Artifact download completed successfully.`);
|
return request.key;
|
||||||
return keys[0];
|
}
|
||||||
|
archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod));
|
||||||
|
core.debug(`Archive path: ${archivePath}`);
|
||||||
|
if (core.isDebug()) {
|
||||||
|
yield (0, tar_1.listTar)(archivePath, compressionMethod);
|
||||||
|
}
|
||||||
|
core.debug(`Starting download of artifact to: ${archivePath}`);
|
||||||
|
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||||
|
core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`);
|
||||||
|
// Download the cache from the cache entry
|
||||||
|
yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options);
|
||||||
|
yield (0, tar_1.extractTar)(archivePath, compressionMethod);
|
||||||
|
core.info('Cache restored successfully');
|
||||||
|
return request.key;
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
throw new Error(`Unable to download and extract cache: ${error.message}`);
|
throw new Error(`Unable to download and extract cache: ${error.message}`);
|
||||||
}
|
}
|
||||||
|
finally {
|
||||||
|
try {
|
||||||
|
yield utils.unlinkFile(archivePath);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.debug(`Failed to delete archive: ${error}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -27885,6 +27926,15 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.saveCache = saveCache;
|
exports.saveCache = saveCache;
|
||||||
|
/**
|
||||||
|
* Save cache using the legacy Cache Service
|
||||||
|
*
|
||||||
|
* @param paths
|
||||||
|
* @param key
|
||||||
|
* @param options
|
||||||
|
* @param enableCrossOsArchive
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
function saveCachev1(paths, key, options, enableCrossOsArchive = false) {
|
function saveCachev1(paths, key, options, enableCrossOsArchive = false) {
|
||||||
var _a, _b, _c, _d, _e;
|
var _a, _b, _c, _d, _e;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
@@ -27953,51 +28003,88 @@ function saveCachev1(paths, key, options, enableCrossOsArchive = false) {
|
|||||||
return cacheId;
|
return cacheId;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Save cache using the new Cache Service
|
||||||
|
*
|
||||||
|
* @param paths
|
||||||
|
* @param key
|
||||||
|
* @param options
|
||||||
|
* @param enableCrossOsArchive
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
function saveCachev2(paths, key, options, enableCrossOsArchive = false) {
|
function saveCachev2(paths, key, options, enableCrossOsArchive = false) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
// BackendIds are retrieved form the signed JWT
|
// BackendIds are retrieved form the signed JWT
|
||||||
const backendIds = (0, util_1.getBackendIdsFromToken)();
|
const backendIds = (0, util_1.getBackendIdsFromToken)();
|
||||||
const compressionMethod = yield utils.getCompressionMethod();
|
const compressionMethod = yield utils.getCompressionMethod();
|
||||||
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
|
|
||||||
const twirpClient = cacheTwirpClient.internalCacheTwirpClient();
|
const twirpClient = cacheTwirpClient.internalCacheTwirpClient();
|
||||||
const request = {
|
let cacheId = -1;
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
const cachePaths = yield utils.resolvePaths(paths);
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
core.debug('Cache Paths:');
|
||||||
key: key,
|
core.debug(`${JSON.stringify(cachePaths)}`);
|
||||||
version: version
|
if (cachePaths.length === 0) {
|
||||||
};
|
throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`);
|
||||||
const response = yield twirpClient.CreateCacheEntry(request);
|
|
||||||
core.info(`CreateCacheEntryResponse: ${JSON.stringify(response)}`);
|
|
||||||
// Archive
|
|
||||||
// We're going to handle 1 path fow now. This needs to be fixed to handle all
|
|
||||||
// paths passed in.
|
|
||||||
const rootDir = path.dirname(paths[0]);
|
|
||||||
const zipSpecs = (0, upload_zip_specification_1.getUploadZipSpecification)(paths, rootDir);
|
|
||||||
if (zipSpecs.length === 0) {
|
|
||||||
throw new Error(`Error with zip specs: ${zipSpecs.flatMap(s => (s.sourcePath ? [s.sourcePath] : [])).join(', ')}`);
|
|
||||||
}
|
}
|
||||||
// 0: No compression
|
const archiveFolder = yield utils.createTempDirectory();
|
||||||
// 1: Best speed
|
const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod));
|
||||||
// 6: Default compression (same as GNU Gzip)
|
core.debug(`Archive Path: ${archivePath}`);
|
||||||
// 9: Best compression Higher levels will result in better compression, but will take longer to complete. For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads.
|
try {
|
||||||
const zipUploadStream = yield (0, zip_1.createZipUploadStream)(zipSpecs, 6);
|
yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod);
|
||||||
// Cache v2 upload
|
if (core.isDebug()) {
|
||||||
// inputs:
|
yield (0, tar_1.listTar)(archivePath, compressionMethod);
|
||||||
// - getSignedUploadURL
|
}
|
||||||
// - archivePath
|
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||||
core.info(`Saving Cache v2: ${paths[0]}`);
|
core.debug(`File Size: ${archiveFileSize}`);
|
||||||
yield (0, upload_cache_1.UploadCacheStream)(response.signedUploadUrl, zipUploadStream);
|
// For GHES, this check will take place in ReserveCache API with enterprise file size limit
|
||||||
// Finalize the cache entry
|
if (archiveFileSize > constants_1.CacheFileSizeLimit && !utils.isGhes()) {
|
||||||
const finalizeRequest = {
|
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
}
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
core.debug('Reserving Cache');
|
||||||
key: key,
|
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
|
||||||
version: version,
|
const request = {
|
||||||
sizeBytes: "1024",
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
};
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
|
key: key,
|
||||||
core.info(`FinalizeCacheEntryUploadResponse: ${JSON.stringify(finalizeResponse)}`);
|
version: version
|
||||||
return 0;
|
};
|
||||||
|
const response = yield twirpClient.CreateCacheEntry(request);
|
||||||
|
core.info(`CreateCacheEntryResponse: ${JSON.stringify(response)}`);
|
||||||
|
// TODO: handle the error cases here
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`);
|
||||||
|
}
|
||||||
|
// TODO: mask the signed upload URL
|
||||||
|
core.debug(`Saving Cache to: ${response.signedUploadUrl}`);
|
||||||
|
yield (0, upload_cache_1.UploadCacheFile)(response.signedUploadUrl, archivePath);
|
||||||
|
const finalizeRequest = {
|
||||||
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
|
key: key,
|
||||||
|
version: version,
|
||||||
|
sizeBytes: `${archiveFileSize}`,
|
||||||
|
};
|
||||||
|
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
|
||||||
|
core.debug(`FinalizeCacheEntryUploadResponse: ${JSON.stringify(finalizeResponse)}`);
|
||||||
|
if (!finalizeResponse.ok) {
|
||||||
|
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
|
||||||
|
}
|
||||||
|
// TODO: this is not great, we should handle the types without parsing
|
||||||
|
cacheId = parseInt(finalizeResponse.entryId);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
const typedError = error;
|
||||||
|
core.debug(typedError.message);
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
// Try to delete the archive to save space
|
||||||
|
try {
|
||||||
|
yield utils.unlinkFile(archivePath);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.debug(`Failed to delete archive: ${error}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cacheId;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//# sourceMappingURL=cache.js.map
|
//# sourceMappingURL=cache.js.map
|
||||||
@@ -29979,11 +30066,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.internalCacheTwirpClient = void 0;
|
exports.internalCacheTwirpClient = void 0;
|
||||||
const http_client_1 = __nccwpck_require__(41283);
|
|
||||||
const auth_1 = __nccwpck_require__(57231);
|
|
||||||
const core_1 = __nccwpck_require__(74850);
|
const core_1 = __nccwpck_require__(74850);
|
||||||
const cache_twirp_1 = __nccwpck_require__(10894);
|
|
||||||
const config_1 = __nccwpck_require__(46490);
|
const config_1 = __nccwpck_require__(46490);
|
||||||
|
const auth_1 = __nccwpck_require__(57231);
|
||||||
|
const http_client_1 = __nccwpck_require__(41283);
|
||||||
|
const cache_twirp_1 = __nccwpck_require__(10894);
|
||||||
|
/**
|
||||||
|
* This class is a wrapper around the CacheServiceClientJSON class generated by Twirp.
|
||||||
|
*
|
||||||
|
* It adds retry logic to the request method, which is not present in the generated client.
|
||||||
|
*
|
||||||
|
* This class is used to interact with cache service v2.
|
||||||
|
*/
|
||||||
class CacheServiceClient {
|
class CacheServiceClient {
|
||||||
constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) {
|
constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) {
|
||||||
this.maxAttempts = 5;
|
this.maxAttempts = 5;
|
||||||
@@ -30170,12 +30264,11 @@ const core = __importStar(__nccwpck_require__(74850));
|
|||||||
const exec = __importStar(__nccwpck_require__(40309));
|
const exec = __importStar(__nccwpck_require__(40309));
|
||||||
const glob = __importStar(__nccwpck_require__(79590));
|
const glob = __importStar(__nccwpck_require__(79590));
|
||||||
const io = __importStar(__nccwpck_require__(50074));
|
const io = __importStar(__nccwpck_require__(50074));
|
||||||
|
const crypto = __importStar(__nccwpck_require__(6113));
|
||||||
const fs = __importStar(__nccwpck_require__(57147));
|
const fs = __importStar(__nccwpck_require__(57147));
|
||||||
const path = __importStar(__nccwpck_require__(71017));
|
const path = __importStar(__nccwpck_require__(71017));
|
||||||
const semver = __importStar(__nccwpck_require__(33910));
|
const semver = __importStar(__nccwpck_require__(33910));
|
||||||
const util = __importStar(__nccwpck_require__(73837));
|
const util = __importStar(__nccwpck_require__(73837));
|
||||||
const uuid_1 = __nccwpck_require__(21966);
|
|
||||||
const crypto = __importStar(__nccwpck_require__(6113));
|
|
||||||
const constants_1 = __nccwpck_require__(74010);
|
const constants_1 = __nccwpck_require__(74010);
|
||||||
const versionSalt = '1.0';
|
const versionSalt = '1.0';
|
||||||
// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23
|
// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23
|
||||||
@@ -30199,7 +30292,7 @@ function createTempDirectory() {
|
|||||||
}
|
}
|
||||||
tempDirectory = path.join(baseLocation, 'actions', 'temp');
|
tempDirectory = path.join(baseLocation, 'actions', 'temp');
|
||||||
}
|
}
|
||||||
const dest = path.join(tempDirectory, (0, uuid_1.v4)());
|
const dest = path.join(tempDirectory, crypto.randomUUID());
|
||||||
yield io.mkdirP(dest);
|
yield io.mkdirP(dest);
|
||||||
return dest;
|
return dest;
|
||||||
});
|
});
|
||||||
@@ -30359,6 +30452,7 @@ function getRuntimeToken() {
|
|||||||
return token;
|
return token;
|
||||||
}
|
}
|
||||||
exports.getRuntimeToken = getRuntimeToken;
|
exports.getRuntimeToken = getRuntimeToken;
|
||||||
|
// TODO: Use the feature flag to determine the cache service version
|
||||||
function getCacheServiceVersion() {
|
function getCacheServiceVersion() {
|
||||||
return process.env['ACTIONS_CACHE_SERVICE_VERSION'] || 'v1';
|
return process.env['ACTIONS_CACHE_SERVICE_VERSION'] || 'v1';
|
||||||
}
|
}
|
||||||
@@ -30385,7 +30479,7 @@ exports.getCacheServiceURL = getCacheServiceURL;
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.ManifestFilename = exports.TarFilename = exports.SystemTarPathOnWindows = exports.GnuTarPathOnWindows = exports.SocketTimeout = exports.DefaultRetryDelay = exports.DefaultRetryAttempts = exports.ArchiveToolType = exports.CompressionMethod = exports.CacheFilename = void 0;
|
exports.CacheFileSizeLimit = exports.ManifestFilename = exports.TarFilename = exports.SystemTarPathOnWindows = exports.GnuTarPathOnWindows = exports.SocketTimeout = exports.DefaultRetryDelay = exports.DefaultRetryAttempts = exports.ArchiveToolType = exports.CompressionMethod = exports.CacheFilename = void 0;
|
||||||
var CacheFilename;
|
var CacheFilename;
|
||||||
(function (CacheFilename) {
|
(function (CacheFilename) {
|
||||||
CacheFilename["Gzip"] = "cache.tgz";
|
CacheFilename["Gzip"] = "cache.tgz";
|
||||||
@@ -30418,6 +30512,7 @@ exports.GnuTarPathOnWindows = `${process.env['PROGRAMFILES']}\\Git\\usr\\bin\\ta
|
|||||||
exports.SystemTarPathOnWindows = `${process.env['SYSTEMDRIVE']}\\Windows\\System32\\tar.exe`;
|
exports.SystemTarPathOnWindows = `${process.env['SYSTEMDRIVE']}\\Windows\\System32\\tar.exe`;
|
||||||
exports.TarFilename = 'cache.tar';
|
exports.TarFilename = 'cache.tar';
|
||||||
exports.ManifestFilename = 'manifest.txt';
|
exports.ManifestFilename = 'manifest.txt';
|
||||||
|
exports.CacheFileSizeLimit = 10 * Math.pow(1024, 3); // 10GiB per repository
|
||||||
//# sourceMappingURL=constants.js.map
|
//# sourceMappingURL=constants.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -31230,110 +31325,6 @@ exports.createTar = createTar;
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 9049:
|
|
||||||
/***/ (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 (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
||||||
__setModuleDefault(result, mod);
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
exports.streamExtractExternal = exports.StreamExtract = void 0;
|
|
||||||
const core = __importStar(__nccwpck_require__(74850));
|
|
||||||
const httpClient = __importStar(__nccwpck_require__(41283));
|
|
||||||
const unzip_stream_1 = __importDefault(__nccwpck_require__(44506));
|
|
||||||
const packageJson = __nccwpck_require__(3918);
|
|
||||||
function StreamExtract(url, directory) {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
let retryCount = 0;
|
|
||||||
while (retryCount < 5) {
|
|
||||||
try {
|
|
||||||
yield streamExtractExternal(url, directory);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
retryCount++;
|
|
||||||
core.info(`Failed to download cache after ${retryCount} retries due to ${error.message}. Retrying in 5 seconds...`);
|
|
||||||
// wait 5 seconds before retrying
|
|
||||||
yield new Promise(resolve => setTimeout(resolve, 5000));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
throw new Error(`Cache download failed after ${retryCount} retries.`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
exports.StreamExtract = StreamExtract;
|
|
||||||
function streamExtractExternal(url, directory) {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
const client = new httpClient.HttpClient(`@actions/cache-${packageJson.version}`);
|
|
||||||
const response = yield client.get(url);
|
|
||||||
if (response.message.statusCode !== 200) {
|
|
||||||
core.info(`Failed to download cache. HTTP status code: ${response.message.statusCode}`);
|
|
||||||
throw new Error(`Unexpected HTTP response from blob storage: ${response.message.statusCode} ${response.message.statusMessage}`);
|
|
||||||
}
|
|
||||||
const timeout = 30 * 1000; // 30 seconds
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
const timerFn = () => {
|
|
||||||
response.message.destroy(new Error(`Blob storage chunk did not respond in ${timeout}ms`));
|
|
||||||
};
|
|
||||||
const timer = setTimeout(timerFn, timeout);
|
|
||||||
response.message
|
|
||||||
.on('data', () => {
|
|
||||||
timer.refresh();
|
|
||||||
})
|
|
||||||
.on('error', (error) => {
|
|
||||||
core.info(`response.message: Cache download failed: ${error.message}`);
|
|
||||||
clearTimeout(timer);
|
|
||||||
reject(error);
|
|
||||||
})
|
|
||||||
.pipe(unzip_stream_1.default.Extract({ path: directory }))
|
|
||||||
.on('close', () => {
|
|
||||||
clearTimeout(timer);
|
|
||||||
resolve();
|
|
||||||
})
|
|
||||||
.on('error', (error) => {
|
|
||||||
reject(error);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
exports.streamExtractExternal = streamExtractExternal;
|
|
||||||
//# sourceMappingURL=download-cache.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 47107:
|
/***/ 47107:
|
||||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||||||
|
|
||||||
@@ -31452,19 +31443,18 @@ function UploadCacheStream(signedUploadURL, zipUploadStream) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.UploadCacheStream = UploadCacheStream;
|
exports.UploadCacheStream = UploadCacheStream;
|
||||||
function UploadCacheFile(uploadURL, archivePath) {
|
function UploadCacheFile(signedUploadURL, archivePath) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
core.info(`Uploading ${archivePath} to: ${JSON.stringify(uploadURL)}`);
|
|
||||||
// Specify data transfer options
|
// Specify data transfer options
|
||||||
const uploadOptions = {
|
const uploadOptions = {
|
||||||
blockSize: 4 * 1024 * 1024,
|
blockSize: 4 * 1024 * 1024,
|
||||||
concurrency: 2,
|
concurrency: 2,
|
||||||
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
||||||
};
|
};
|
||||||
const blobClient = new storage_blob_1.BlobClient(uploadURL.signedUploadUrl);
|
const blobClient = new storage_blob_1.BlobClient(signedUploadURL);
|
||||||
const blockBlobClient = blobClient.getBlockBlobClient();
|
const blockBlobClient = blobClient.getBlockBlobClient();
|
||||||
core.info(`BlobClient: ${JSON.stringify(blobClient)}`);
|
core.debug(`BlobClient: ${JSON.stringify(blobClient)}`);
|
||||||
core.info(`blockBlobClient: ${JSON.stringify(blockBlobClient)}`);
|
core.debug(`blockBlobClient: ${JSON.stringify(blockBlobClient)}`);
|
||||||
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -127899,221 +127889,6 @@ exports.Extract = __nccwpck_require__(32851);
|
|||||||
module.exports = __nccwpck_require__(73837).deprecate;
|
module.exports = __nccwpck_require__(73837).deprecate;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 21966:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
var v1 = __nccwpck_require__(87155);
|
|
||||||
var v4 = __nccwpck_require__(43515);
|
|
||||||
|
|
||||||
var uuid = v4;
|
|
||||||
uuid.v1 = v1;
|
|
||||||
uuid.v4 = v4;
|
|
||||||
|
|
||||||
module.exports = uuid;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 74328:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert array of 16 byte values to UUID string format of the form:
|
|
||||||
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
||||||
*/
|
|
||||||
var byteToHex = [];
|
|
||||||
for (var i = 0; i < 256; ++i) {
|
|
||||||
byteToHex[i] = (i + 0x100).toString(16).substr(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
function bytesToUuid(buf, offset) {
|
|
||||||
var i = offset || 0;
|
|
||||||
var bth = byteToHex;
|
|
||||||
// join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
|
|
||||||
return ([
|
|
||||||
bth[buf[i++]], bth[buf[i++]],
|
|
||||||
bth[buf[i++]], bth[buf[i++]], '-',
|
|
||||||
bth[buf[i++]], bth[buf[i++]], '-',
|
|
||||||
bth[buf[i++]], bth[buf[i++]], '-',
|
|
||||||
bth[buf[i++]], bth[buf[i++]], '-',
|
|
||||||
bth[buf[i++]], bth[buf[i++]],
|
|
||||||
bth[buf[i++]], bth[buf[i++]],
|
|
||||||
bth[buf[i++]], bth[buf[i++]]
|
|
||||||
]).join('');
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = bytesToUuid;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 59566:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
// Unique ID creation requires a high quality random # generator. In node.js
|
|
||||||
// this is pretty straight-forward - we use the crypto API.
|
|
||||||
|
|
||||||
var crypto = __nccwpck_require__(6113);
|
|
||||||
|
|
||||||
module.exports = function nodeRNG() {
|
|
||||||
return crypto.randomBytes(16);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 87155:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
var rng = __nccwpck_require__(59566);
|
|
||||||
var bytesToUuid = __nccwpck_require__(74328);
|
|
||||||
|
|
||||||
// **`v1()` - Generate time-based UUID**
|
|
||||||
//
|
|
||||||
// Inspired by https://github.com/LiosK/UUID.js
|
|
||||||
// and http://docs.python.org/library/uuid.html
|
|
||||||
|
|
||||||
var _nodeId;
|
|
||||||
var _clockseq;
|
|
||||||
|
|
||||||
// Previous uuid creation time
|
|
||||||
var _lastMSecs = 0;
|
|
||||||
var _lastNSecs = 0;
|
|
||||||
|
|
||||||
// See https://github.com/uuidjs/uuid for API details
|
|
||||||
function v1(options, buf, offset) {
|
|
||||||
var i = buf && offset || 0;
|
|
||||||
var b = buf || [];
|
|
||||||
|
|
||||||
options = options || {};
|
|
||||||
var node = options.node || _nodeId;
|
|
||||||
var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
|
|
||||||
|
|
||||||
// node and clockseq need to be initialized to random values if they're not
|
|
||||||
// specified. We do this lazily to minimize issues related to insufficient
|
|
||||||
// system entropy. See #189
|
|
||||||
if (node == null || clockseq == null) {
|
|
||||||
var seedBytes = rng();
|
|
||||||
if (node == null) {
|
|
||||||
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
|
|
||||||
node = _nodeId = [
|
|
||||||
seedBytes[0] | 0x01,
|
|
||||||
seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
|
|
||||||
];
|
|
||||||
}
|
|
||||||
if (clockseq == null) {
|
|
||||||
// Per 4.2.2, randomize (14 bit) clockseq
|
|
||||||
clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// UUID timestamps are 100 nano-second units since the Gregorian epoch,
|
|
||||||
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
|
|
||||||
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
|
|
||||||
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
|
|
||||||
var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
|
|
||||||
|
|
||||||
// Per 4.2.1.2, use count of uuid's generated during the current clock
|
|
||||||
// cycle to simulate higher resolution clock
|
|
||||||
var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
|
|
||||||
|
|
||||||
// Time since last uuid creation (in msecs)
|
|
||||||
var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
|
|
||||||
|
|
||||||
// Per 4.2.1.2, Bump clockseq on clock regression
|
|
||||||
if (dt < 0 && options.clockseq === undefined) {
|
|
||||||
clockseq = clockseq + 1 & 0x3fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
|
|
||||||
// time interval
|
|
||||||
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
|
|
||||||
nsecs = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Per 4.2.1.2 Throw error if too many uuids are requested
|
|
||||||
if (nsecs >= 10000) {
|
|
||||||
throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
|
|
||||||
}
|
|
||||||
|
|
||||||
_lastMSecs = msecs;
|
|
||||||
_lastNSecs = nsecs;
|
|
||||||
_clockseq = clockseq;
|
|
||||||
|
|
||||||
// Per 4.1.4 - Convert from unix epoch to Gregorian epoch
|
|
||||||
msecs += 12219292800000;
|
|
||||||
|
|
||||||
// `time_low`
|
|
||||||
var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
|
||||||
b[i++] = tl >>> 24 & 0xff;
|
|
||||||
b[i++] = tl >>> 16 & 0xff;
|
|
||||||
b[i++] = tl >>> 8 & 0xff;
|
|
||||||
b[i++] = tl & 0xff;
|
|
||||||
|
|
||||||
// `time_mid`
|
|
||||||
var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
|
|
||||||
b[i++] = tmh >>> 8 & 0xff;
|
|
||||||
b[i++] = tmh & 0xff;
|
|
||||||
|
|
||||||
// `time_high_and_version`
|
|
||||||
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
|
|
||||||
b[i++] = tmh >>> 16 & 0xff;
|
|
||||||
|
|
||||||
// `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
|
|
||||||
b[i++] = clockseq >>> 8 | 0x80;
|
|
||||||
|
|
||||||
// `clock_seq_low`
|
|
||||||
b[i++] = clockseq & 0xff;
|
|
||||||
|
|
||||||
// `node`
|
|
||||||
for (var n = 0; n < 6; ++n) {
|
|
||||||
b[i + n] = node[n];
|
|
||||||
}
|
|
||||||
|
|
||||||
return buf ? buf : bytesToUuid(b);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = v1;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 43515:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
var rng = __nccwpck_require__(59566);
|
|
||||||
var bytesToUuid = __nccwpck_require__(74328);
|
|
||||||
|
|
||||||
function v4(options, buf, offset) {
|
|
||||||
var i = buf && offset || 0;
|
|
||||||
|
|
||||||
if (typeof(options) == 'string') {
|
|
||||||
buf = options === 'binary' ? new Array(16) : null;
|
|
||||||
options = null;
|
|
||||||
}
|
|
||||||
options = options || {};
|
|
||||||
|
|
||||||
var rnds = options.random || (options.rng || rng)();
|
|
||||||
|
|
||||||
// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
||||||
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
|
||||||
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
||||||
|
|
||||||
// Copy bytes to buffer, if provided
|
|
||||||
if (buf) {
|
|
||||||
for (var ii = 0; ii < 16; ++ii) {
|
|
||||||
buf[i + ii] = rnds[ii];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return buf || bytesToUuid(rnds);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = v4;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 5336:
|
/***/ 5336:
|
||||||
@@ -146885,14 +146660,6 @@ module.exports = JSON.parse('{"application/1d-interleaved-parityfec":{"source":"
|
|||||||
"use strict";
|
"use strict";
|
||||||
module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"],[[47,47],"disallowed_STD3_valid"],[[48,57],"valid"],[[58,64],"disallowed_STD3_valid"],[[65,65],"mapped",[97]],[[66,66],"mapped",[98]],[[67,67],"mapped",[99]],[[68,68],"mapped",[100]],[[69,69],"mapped",[101]],[[70,70],"mapped",[102]],[[71,71],"mapped",[103]],[[72,72],"mapped",[104]],[[73,73],"mapped",[105]],[[74,74],"mapped",[106]],[[75,75],"mapped",[107]],[[76,76],"mapped",[108]],[[77,77],"mapped",[109]],[[78,78],"mapped",[110]],[[79,79],"mapped",[111]],[[80,80],"mapped",[112]],[[81,81],"mapped",[113]],[[82,82],"mapped",[114]],[[83,83],"mapped",[115]],[[84,84],"mapped",[116]],[[85,85],"mapped",[117]],[[86,86],"mapped",[118]],[[87,87],"mapped",[119]],[[88,88],"mapped",[120]],[[89,89],"mapped",[121]],[[90,90],"mapped",[122]],[[91,96],"disallowed_STD3_valid"],[[97,122],"valid"],[[123,127],"disallowed_STD3_valid"],[[128,159],"disallowed"],[[160,160],"disallowed_STD3_mapped",[32]],[[161,167],"valid",[],"NV8"],[[168,168],"disallowed_STD3_mapped",[32,776]],[[169,169],"valid",[],"NV8"],[[170,170],"mapped",[97]],[[171,172],"valid",[],"NV8"],[[173,173],"ignored"],[[174,174],"valid",[],"NV8"],[[175,175],"disallowed_STD3_mapped",[32,772]],[[176,177],"valid",[],"NV8"],[[178,178],"mapped",[50]],[[179,179],"mapped",[51]],[[180,180],"disallowed_STD3_mapped",[32,769]],[[181,181],"mapped",[956]],[[182,182],"valid",[],"NV8"],[[183,183],"valid"],[[184,184],"disallowed_STD3_mapped",[32,807]],[[185,185],"mapped",[49]],[[186,186],"mapped",[111]],[[187,187],"valid",[],"NV8"],[[188,188],"mapped",[49,8260,52]],[[189,189],"mapped",[49,8260,50]],[[190,190],"mapped",[51,8260,52]],[[191,191],"valid",[],"NV8"],[[192,192],"mapped",[224]],[[193,193],"mapped",[225]],[[194,194],"mapped",[226]],[[195,195],"mapped",[227]],[[196,196],"mapped",[228]],[[197,197],"mapped",[229]],[[198,198],"mapped",[230]],[[199,199],"mapped",[231]],[[200,200],"mapped",[232]],[[201,201],"mapped",[233]],[[202,202],"mapped",[234]],[[203,203],"mapped",[235]],[[204,204],"mapped",[236]],[[205,205],"mapped",[237]],[[206,206],"mapped",[238]],[[207,207],"mapped",[239]],[[208,208],"mapped",[240]],[[209,209],"mapped",[241]],[[210,210],"mapped",[242]],[[211,211],"mapped",[243]],[[212,212],"mapped",[244]],[[213,213],"mapped",[245]],[[214,214],"mapped",[246]],[[215,215],"valid",[],"NV8"],[[216,216],"mapped",[248]],[[217,217],"mapped",[249]],[[218,218],"mapped",[250]],[[219,219],"mapped",[251]],[[220,220],"mapped",[252]],[[221,221],"mapped",[253]],[[222,222],"mapped",[254]],[[223,223],"deviation",[115,115]],[[224,246],"valid"],[[247,247],"valid",[],"NV8"],[[248,255],"valid"],[[256,256],"mapped",[257]],[[257,257],"valid"],[[258,258],"mapped",[259]],[[259,259],"valid"],[[260,260],"mapped",[261]],[[261,261],"valid"],[[262,262],"mapped",[263]],[[263,263],"valid"],[[264,264],"mapped",[265]],[[265,265],"valid"],[[266,266],"mapped",[267]],[[267,267],"valid"],[[268,268],"mapped",[269]],[[269,269],"valid"],[[270,270],"mapped",[271]],[[271,271],"valid"],[[272,272],"mapped",[273]],[[273,273],"valid"],[[274,274],"mapped",[275]],[[275,275],"valid"],[[276,276],"mapped",[277]],[[277,277],"valid"],[[278,278],"mapped",[279]],[[279,279],"valid"],[[280,280],"mapped",[281]],[[281,281],"valid"],[[282,282],"mapped",[283]],[[283,283],"valid"],[[284,284],"mapped",[285]],[[285,285],"valid"],[[286,286],"mapped",[287]],[[287,287],"valid"],[[288,288],"mapped",[289]],[[289,289],"valid"],[[290,290],"mapped",[291]],[[291,291],"valid"],[[292,292],"mapped",[293]],[[293,293],"valid"],[[294,294],"mapped",[295]],[[295,295],"valid"],[[296,296],"mapped",[297]],[[297,297],"valid"],[[298,298],"mapped",[299]],[[299,299],"valid"],[[300,300],"mapped",[301]],[[301,301],"valid"],[[302,302],"mapped",[303]],[[303,303],"valid"],[[304,304],"mapped",[105,775]],[[305,305],"valid"],[[306,307],"mapped",[105,106]],[[308,308],"mapped",[309]],[[309,309],"valid"],[[310,310],"mapped",[311]],[[311,312],"valid"],[[313,313],"mapped",[314]],[[314,314],"valid"],[[315,315],"mapped",[316]],[[316,316],"valid"],[[317,317],"mapped",[318]],[[318,318],"valid"],[[319,320],"mapped",[108,183]],[[321,321],"mapped",[322]],[[322,322],"valid"],[[323,323],"mapped",[324]],[[324,324],"valid"],[[325,325],"mapped",[326]],[[326,326],"valid"],[[327,327],"mapped",[328]],[[328,328],"valid"],[[329,329],"mapped",[700,110]],[[330,330],"mapped",[331]],[[331,331],"valid"],[[332,332],"mapped",[333]],[[333,333],"valid"],[[334,334],"mapped",[335]],[[335,335],"valid"],[[336,336],"mapped",[337]],[[337,337],"valid"],[[338,338],"mapped",[339]],[[339,339],"valid"],[[340,340],"mapped",[341]],[[341,341],"valid"],[[342,342],"mapped",[343]],[[343,343],"valid"],[[344,344],"mapped",[345]],[[345,345],"valid"],[[346,346],"mapped",[347]],[[347,347],"valid"],[[348,348],"mapped",[349]],[[349,349],"valid"],[[350,350],"mapped",[351]],[[351,351],"valid"],[[352,352],"mapped",[353]],[[353,353],"valid"],[[354,354],"mapped",[355]],[[355,355],"valid"],[[356,356],"mapped",[357]],[[357,357],"valid"],[[358,358],"mappLine truncated
|
module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"],[[47,47],"disallowed_STD3_valid"],[[48,57],"valid"],[[58,64],"disallowed_STD3_valid"],[[65,65],"mapped",[97]],[[66,66],"mapped",[98]],[[67,67],"mapped",[99]],[[68,68],"mapped",[100]],[[69,69],"mapped",[101]],[[70,70],"mapped",[102]],[[71,71],"mapped",[103]],[[72,72],"mapped",[104]],[[73,73],"mapped",[105]],[[74,74],"mapped",[106]],[[75,75],"mapped",[107]],[[76,76],"mapped",[108]],[[77,77],"mapped",[109]],[[78,78],"mapped",[110]],[[79,79],"mapped",[111]],[[80,80],"mapped",[112]],[[81,81],"mapped",[113]],[[82,82],"mapped",[114]],[[83,83],"mapped",[115]],[[84,84],"mapped",[116]],[[85,85],"mapped",[117]],[[86,86],"mapped",[118]],[[87,87],"mapped",[119]],[[88,88],"mapped",[120]],[[89,89],"mapped",[121]],[[90,90],"mapped",[122]],[[91,96],"disallowed_STD3_valid"],[[97,122],"valid"],[[123,127],"disallowed_STD3_valid"],[[128,159],"disallowed"],[[160,160],"disallowed_STD3_mapped",[32]],[[161,167],"valid",[],"NV8"],[[168,168],"disallowed_STD3_mapped",[32,776]],[[169,169],"valid",[],"NV8"],[[170,170],"mapped",[97]],[[171,172],"valid",[],"NV8"],[[173,173],"ignored"],[[174,174],"valid",[],"NV8"],[[175,175],"disallowed_STD3_mapped",[32,772]],[[176,177],"valid",[],"NV8"],[[178,178],"mapped",[50]],[[179,179],"mapped",[51]],[[180,180],"disallowed_STD3_mapped",[32,769]],[[181,181],"mapped",[956]],[[182,182],"valid",[],"NV8"],[[183,183],"valid"],[[184,184],"disallowed_STD3_mapped",[32,807]],[[185,185],"mapped",[49]],[[186,186],"mapped",[111]],[[187,187],"valid",[],"NV8"],[[188,188],"mapped",[49,8260,52]],[[189,189],"mapped",[49,8260,50]],[[190,190],"mapped",[51,8260,52]],[[191,191],"valid",[],"NV8"],[[192,192],"mapped",[224]],[[193,193],"mapped",[225]],[[194,194],"mapped",[226]],[[195,195],"mapped",[227]],[[196,196],"mapped",[228]],[[197,197],"mapped",[229]],[[198,198],"mapped",[230]],[[199,199],"mapped",[231]],[[200,200],"mapped",[232]],[[201,201],"mapped",[233]],[[202,202],"mapped",[234]],[[203,203],"mapped",[235]],[[204,204],"mapped",[236]],[[205,205],"mapped",[237]],[[206,206],"mapped",[238]],[[207,207],"mapped",[239]],[[208,208],"mapped",[240]],[[209,209],"mapped",[241]],[[210,210],"mapped",[242]],[[211,211],"mapped",[243]],[[212,212],"mapped",[244]],[[213,213],"mapped",[245]],[[214,214],"mapped",[246]],[[215,215],"valid",[],"NV8"],[[216,216],"mapped",[248]],[[217,217],"mapped",[249]],[[218,218],"mapped",[250]],[[219,219],"mapped",[251]],[[220,220],"mapped",[252]],[[221,221],"mapped",[253]],[[222,222],"mapped",[254]],[[223,223],"deviation",[115,115]],[[224,246],"valid"],[[247,247],"valid",[],"NV8"],[[248,255],"valid"],[[256,256],"mapped",[257]],[[257,257],"valid"],[[258,258],"mapped",[259]],[[259,259],"valid"],[[260,260],"mapped",[261]],[[261,261],"valid"],[[262,262],"mapped",[263]],[[263,263],"valid"],[[264,264],"mapped",[265]],[[265,265],"valid"],[[266,266],"mapped",[267]],[[267,267],"valid"],[[268,268],"mapped",[269]],[[269,269],"valid"],[[270,270],"mapped",[271]],[[271,271],"valid"],[[272,272],"mapped",[273]],[[273,273],"valid"],[[274,274],"mapped",[275]],[[275,275],"valid"],[[276,276],"mapped",[277]],[[277,277],"valid"],[[278,278],"mapped",[279]],[[279,279],"valid"],[[280,280],"mapped",[281]],[[281,281],"valid"],[[282,282],"mapped",[283]],[[283,283],"valid"],[[284,284],"mapped",[285]],[[285,285],"valid"],[[286,286],"mapped",[287]],[[287,287],"valid"],[[288,288],"mapped",[289]],[[289,289],"valid"],[[290,290],"mapped",[291]],[[291,291],"valid"],[[292,292],"mapped",[293]],[[293,293],"valid"],[[294,294],"mapped",[295]],[[295,295],"valid"],[[296,296],"mapped",[297]],[[297,297],"valid"],[[298,298],"mapped",[299]],[[299,299],"valid"],[[300,300],"mapped",[301]],[[301,301],"valid"],[[302,302],"mapped",[303]],[[303,303],"valid"],[[304,304],"mapped",[105,775]],[[305,305],"valid"],[[306,307],"mapped",[105,106]],[[308,308],"mapped",[309]],[[309,309],"valid"],[[310,310],"mapped",[311]],[[311,312],"valid"],[[313,313],"mapped",[314]],[[314,314],"valid"],[[315,315],"mapped",[316]],[[316,316],"valid"],[[317,317],"mapped",[318]],[[318,318],"valid"],[[319,320],"mapped",[108,183]],[[321,321],"mapped",[322]],[[322,322],"valid"],[[323,323],"mapped",[324]],[[324,324],"valid"],[[325,325],"mapped",[326]],[[326,326],"valid"],[[327,327],"mapped",[328]],[[328,328],"valid"],[[329,329],"mapped",[700,110]],[[330,330],"mapped",[331]],[[331,331],"valid"],[[332,332],"mapped",[333]],[[333,333],"valid"],[[334,334],"mapped",[335]],[[335,335],"valid"],[[336,336],"mapped",[337]],[[337,337],"valid"],[[338,338],"mapped",[339]],[[339,339],"valid"],[[340,340],"mapped",[341]],[[341,341],"valid"],[[342,342],"mapped",[343]],[[343,343],"valid"],[[344,344],"mapped",[345]],[[345,345],"valid"],[[346,346],"mapped",[347]],[[347,347],"valid"],[[348,348],"mapped",[349]],[[349,349],"valid"],[[350,350],"mapped",[351]],[[351,351],"valid"],[[352,352],"mapped",[353]],[[353,353],"valid"],[[354,354],"mapped",[355]],[[355,355],"valid"],[[356,356],"mapped",[357]],[[357,357],"valid"],[[358,358],"mappLine truncated
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 3918:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
module.exports = JSON.parse('{"name":"@actions/cache","version":"3.2.4","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.10.0","@actions/artifact":"^2.1.7","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","semver":"^6.3.1"},"devDependencies":{"@types/semver":"^6.0.0","typescript":"^5.2.2"}}');
|
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
/******/ });
|
/******/ });
|
||||||
|
|||||||
Vendored
+154
-387
@@ -27687,10 +27687,8 @@ const cacheHttpClient = __importStar(__nccwpck_require__(42370));
|
|||||||
const cacheTwirpClient = __importStar(__nccwpck_require__(95451));
|
const cacheTwirpClient = __importStar(__nccwpck_require__(95451));
|
||||||
const tar_1 = __nccwpck_require__(49099);
|
const tar_1 = __nccwpck_require__(49099);
|
||||||
const upload_cache_1 = __nccwpck_require__(47107);
|
const upload_cache_1 = __nccwpck_require__(47107);
|
||||||
const download_cache_1 = __nccwpck_require__(9049);
|
|
||||||
const upload_zip_specification_1 = __nccwpck_require__(77643);
|
|
||||||
const zip_1 = __nccwpck_require__(26699);
|
|
||||||
const util_1 = __nccwpck_require__(49196);
|
const util_1 = __nccwpck_require__(49196);
|
||||||
|
const constants_1 = __nccwpck_require__(74010);
|
||||||
class ValidationError extends Error {
|
class ValidationError extends Error {
|
||||||
constructor(message) {
|
constructor(message) {
|
||||||
super(message);
|
super(message);
|
||||||
@@ -27744,7 +27742,7 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
checkPaths(paths);
|
checkPaths(paths);
|
||||||
const cacheServiceVersion = config.getCacheServiceVersion();
|
const cacheServiceVersion = config.getCacheServiceVersion();
|
||||||
console.debug(`Cache Service Version: ${cacheServiceVersion}`);
|
console.debug(`Cache service version: ${cacheServiceVersion}`);
|
||||||
switch (cacheServiceVersion) {
|
switch (cacheServiceVersion) {
|
||||||
case "v2":
|
case "v2":
|
||||||
return yield restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive);
|
return yield restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive);
|
||||||
@@ -27755,6 +27753,16 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.restoreCache = restoreCache;
|
exports.restoreCache = restoreCache;
|
||||||
|
/**
|
||||||
|
* Restores cache using the legacy Cache Service
|
||||||
|
*
|
||||||
|
* @param paths
|
||||||
|
* @param primaryKey
|
||||||
|
* @param restoreKeys
|
||||||
|
* @param options
|
||||||
|
* @param enableCrossOsArchive
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
function restoreCachev1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
function restoreCachev1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
restoreKeys = restoreKeys || [];
|
restoreKeys = restoreKeys || [];
|
||||||
@@ -27818,6 +27826,16 @@ function restoreCachev1(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
|||||||
return undefined;
|
return undefined;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Restores cache using the new Cache Service
|
||||||
|
*
|
||||||
|
* @param paths a list of file paths to restore from the cache
|
||||||
|
* @param primaryKey an explicit key for restoring the cache
|
||||||
|
* @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for key
|
||||||
|
* @param downloadOptions cache download options
|
||||||
|
* @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform
|
||||||
|
* @returns string returns the key for the cache hit, otherwise returns undefined
|
||||||
|
*/
|
||||||
function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
restoreKeys = restoreKeys || [];
|
restoreKeys = restoreKeys || [];
|
||||||
@@ -27830,11 +27848,12 @@ function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
|||||||
for (const key of keys) {
|
for (const key of keys) {
|
||||||
checkKey(key);
|
checkKey(key);
|
||||||
}
|
}
|
||||||
|
let archivePath = '';
|
||||||
try {
|
try {
|
||||||
|
const twirpClient = cacheTwirpClient.internalCacheTwirpClient();
|
||||||
// BackendIds are retrieved form the signed JWT
|
// BackendIds are retrieved form the signed JWT
|
||||||
const backendIds = (0, util_1.getBackendIdsFromToken)();
|
const backendIds = (0, util_1.getBackendIdsFromToken)();
|
||||||
const compressionMethod = yield utils.getCompressionMethod();
|
const compressionMethod = yield utils.getCompressionMethod();
|
||||||
const twirpClient = cacheTwirpClient.internalCacheTwirpClient();
|
|
||||||
const request = {
|
const request = {
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
@@ -27842,22 +27861,44 @@ function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
|||||||
restoreKeys: restoreKeys,
|
restoreKeys: restoreKeys,
|
||||||
version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive),
|
version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive),
|
||||||
};
|
};
|
||||||
|
console.debug(`GetCacheEntryDownloadURLRequest: ${JSON.stringify(twirpClient)}`);
|
||||||
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
||||||
core.info(`GetCacheEntryDownloadURLResponse: ${JSON.stringify(response)}`);
|
core.debug(`GetCacheEntryDownloadURLResponse: ${JSON.stringify(response)}`);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
// Cache not found
|
// Cache not found
|
||||||
core.warning(`Cache not found for keys: ${keys.join(', ')}`);
|
core.warning(`Cache not found for keys: ${keys.join(', ')}`);
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
core.info(`Cache hit for: ${request.key}`);
|
core.info(`Cache hit for: ${request.key}`);
|
||||||
core.info(`Starting download of artifact to: ${paths[0]}`);
|
if (options === null || options === void 0 ? void 0 : options.lookupOnly) {
|
||||||
yield (0, download_cache_1.StreamExtract)(response.signedDownloadUrl, path.dirname(paths[0]));
|
core.info('Lookup only - skipping download');
|
||||||
core.info(`Artifact download completed successfully.`);
|
return request.key;
|
||||||
return keys[0];
|
}
|
||||||
|
archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod));
|
||||||
|
core.debug(`Archive path: ${archivePath}`);
|
||||||
|
if (core.isDebug()) {
|
||||||
|
yield (0, tar_1.listTar)(archivePath, compressionMethod);
|
||||||
|
}
|
||||||
|
core.debug(`Starting download of artifact to: ${archivePath}`);
|
||||||
|
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||||
|
core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`);
|
||||||
|
// Download the cache from the cache entry
|
||||||
|
yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options);
|
||||||
|
yield (0, tar_1.extractTar)(archivePath, compressionMethod);
|
||||||
|
core.info('Cache restored successfully');
|
||||||
|
return request.key;
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
throw new Error(`Unable to download and extract cache: ${error.message}`);
|
throw new Error(`Unable to download and extract cache: ${error.message}`);
|
||||||
}
|
}
|
||||||
|
finally {
|
||||||
|
try {
|
||||||
|
yield utils.unlinkFile(archivePath);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.debug(`Failed to delete archive: ${error}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -27885,6 +27926,15 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.saveCache = saveCache;
|
exports.saveCache = saveCache;
|
||||||
|
/**
|
||||||
|
* Save cache using the legacy Cache Service
|
||||||
|
*
|
||||||
|
* @param paths
|
||||||
|
* @param key
|
||||||
|
* @param options
|
||||||
|
* @param enableCrossOsArchive
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
function saveCachev1(paths, key, options, enableCrossOsArchive = false) {
|
function saveCachev1(paths, key, options, enableCrossOsArchive = false) {
|
||||||
var _a, _b, _c, _d, _e;
|
var _a, _b, _c, _d, _e;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
@@ -27953,51 +28003,88 @@ function saveCachev1(paths, key, options, enableCrossOsArchive = false) {
|
|||||||
return cacheId;
|
return cacheId;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Save cache using the new Cache Service
|
||||||
|
*
|
||||||
|
* @param paths
|
||||||
|
* @param key
|
||||||
|
* @param options
|
||||||
|
* @param enableCrossOsArchive
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
function saveCachev2(paths, key, options, enableCrossOsArchive = false) {
|
function saveCachev2(paths, key, options, enableCrossOsArchive = false) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
// BackendIds are retrieved form the signed JWT
|
// BackendIds are retrieved form the signed JWT
|
||||||
const backendIds = (0, util_1.getBackendIdsFromToken)();
|
const backendIds = (0, util_1.getBackendIdsFromToken)();
|
||||||
const compressionMethod = yield utils.getCompressionMethod();
|
const compressionMethod = yield utils.getCompressionMethod();
|
||||||
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
|
|
||||||
const twirpClient = cacheTwirpClient.internalCacheTwirpClient();
|
const twirpClient = cacheTwirpClient.internalCacheTwirpClient();
|
||||||
const request = {
|
let cacheId = -1;
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
const cachePaths = yield utils.resolvePaths(paths);
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
core.debug('Cache Paths:');
|
||||||
key: key,
|
core.debug(`${JSON.stringify(cachePaths)}`);
|
||||||
version: version
|
if (cachePaths.length === 0) {
|
||||||
};
|
throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`);
|
||||||
const response = yield twirpClient.CreateCacheEntry(request);
|
|
||||||
core.info(`CreateCacheEntryResponse: ${JSON.stringify(response)}`);
|
|
||||||
// Archive
|
|
||||||
// We're going to handle 1 path fow now. This needs to be fixed to handle all
|
|
||||||
// paths passed in.
|
|
||||||
const rootDir = path.dirname(paths[0]);
|
|
||||||
const zipSpecs = (0, upload_zip_specification_1.getUploadZipSpecification)(paths, rootDir);
|
|
||||||
if (zipSpecs.length === 0) {
|
|
||||||
throw new Error(`Error with zip specs: ${zipSpecs.flatMap(s => (s.sourcePath ? [s.sourcePath] : [])).join(', ')}`);
|
|
||||||
}
|
}
|
||||||
// 0: No compression
|
const archiveFolder = yield utils.createTempDirectory();
|
||||||
// 1: Best speed
|
const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod));
|
||||||
// 6: Default compression (same as GNU Gzip)
|
core.debug(`Archive Path: ${archivePath}`);
|
||||||
// 9: Best compression Higher levels will result in better compression, but will take longer to complete. For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads.
|
try {
|
||||||
const zipUploadStream = yield (0, zip_1.createZipUploadStream)(zipSpecs, 6);
|
yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod);
|
||||||
// Cache v2 upload
|
if (core.isDebug()) {
|
||||||
// inputs:
|
yield (0, tar_1.listTar)(archivePath, compressionMethod);
|
||||||
// - getSignedUploadURL
|
}
|
||||||
// - archivePath
|
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||||
core.info(`Saving Cache v2: ${paths[0]}`);
|
core.debug(`File Size: ${archiveFileSize}`);
|
||||||
yield (0, upload_cache_1.UploadCacheStream)(response.signedUploadUrl, zipUploadStream);
|
// For GHES, this check will take place in ReserveCache API with enterprise file size limit
|
||||||
// Finalize the cache entry
|
if (archiveFileSize > constants_1.CacheFileSizeLimit && !utils.isGhes()) {
|
||||||
const finalizeRequest = {
|
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
}
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
core.debug('Reserving Cache');
|
||||||
key: key,
|
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
|
||||||
version: version,
|
const request = {
|
||||||
sizeBytes: "1024",
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
};
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
|
key: key,
|
||||||
core.info(`FinalizeCacheEntryUploadResponse: ${JSON.stringify(finalizeResponse)}`);
|
version: version
|
||||||
return 0;
|
};
|
||||||
|
const response = yield twirpClient.CreateCacheEntry(request);
|
||||||
|
core.info(`CreateCacheEntryResponse: ${JSON.stringify(response)}`);
|
||||||
|
// TODO: handle the error cases here
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`);
|
||||||
|
}
|
||||||
|
// TODO: mask the signed upload URL
|
||||||
|
core.debug(`Saving Cache to: ${response.signedUploadUrl}`);
|
||||||
|
yield (0, upload_cache_1.UploadCacheFile)(response.signedUploadUrl, archivePath);
|
||||||
|
const finalizeRequest = {
|
||||||
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
|
key: key,
|
||||||
|
version: version,
|
||||||
|
sizeBytes: `${archiveFileSize}`,
|
||||||
|
};
|
||||||
|
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
|
||||||
|
core.debug(`FinalizeCacheEntryUploadResponse: ${JSON.stringify(finalizeResponse)}`);
|
||||||
|
if (!finalizeResponse.ok) {
|
||||||
|
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
|
||||||
|
}
|
||||||
|
// TODO: this is not great, we should handle the types without parsing
|
||||||
|
cacheId = parseInt(finalizeResponse.entryId);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
const typedError = error;
|
||||||
|
core.debug(typedError.message);
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
// Try to delete the archive to save space
|
||||||
|
try {
|
||||||
|
yield utils.unlinkFile(archivePath);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.debug(`Failed to delete archive: ${error}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cacheId;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//# sourceMappingURL=cache.js.map
|
//# sourceMappingURL=cache.js.map
|
||||||
@@ -29979,11 +30066,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.internalCacheTwirpClient = void 0;
|
exports.internalCacheTwirpClient = void 0;
|
||||||
const http_client_1 = __nccwpck_require__(41283);
|
|
||||||
const auth_1 = __nccwpck_require__(57231);
|
|
||||||
const core_1 = __nccwpck_require__(74850);
|
const core_1 = __nccwpck_require__(74850);
|
||||||
const cache_twirp_1 = __nccwpck_require__(10894);
|
|
||||||
const config_1 = __nccwpck_require__(46490);
|
const config_1 = __nccwpck_require__(46490);
|
||||||
|
const auth_1 = __nccwpck_require__(57231);
|
||||||
|
const http_client_1 = __nccwpck_require__(41283);
|
||||||
|
const cache_twirp_1 = __nccwpck_require__(10894);
|
||||||
|
/**
|
||||||
|
* This class is a wrapper around the CacheServiceClientJSON class generated by Twirp.
|
||||||
|
*
|
||||||
|
* It adds retry logic to the request method, which is not present in the generated client.
|
||||||
|
*
|
||||||
|
* This class is used to interact with cache service v2.
|
||||||
|
*/
|
||||||
class CacheServiceClient {
|
class CacheServiceClient {
|
||||||
constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) {
|
constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) {
|
||||||
this.maxAttempts = 5;
|
this.maxAttempts = 5;
|
||||||
@@ -30170,12 +30264,11 @@ const core = __importStar(__nccwpck_require__(74850));
|
|||||||
const exec = __importStar(__nccwpck_require__(40309));
|
const exec = __importStar(__nccwpck_require__(40309));
|
||||||
const glob = __importStar(__nccwpck_require__(79590));
|
const glob = __importStar(__nccwpck_require__(79590));
|
||||||
const io = __importStar(__nccwpck_require__(50074));
|
const io = __importStar(__nccwpck_require__(50074));
|
||||||
|
const crypto = __importStar(__nccwpck_require__(6113));
|
||||||
const fs = __importStar(__nccwpck_require__(57147));
|
const fs = __importStar(__nccwpck_require__(57147));
|
||||||
const path = __importStar(__nccwpck_require__(71017));
|
const path = __importStar(__nccwpck_require__(71017));
|
||||||
const semver = __importStar(__nccwpck_require__(33910));
|
const semver = __importStar(__nccwpck_require__(33910));
|
||||||
const util = __importStar(__nccwpck_require__(73837));
|
const util = __importStar(__nccwpck_require__(73837));
|
||||||
const uuid_1 = __nccwpck_require__(21966);
|
|
||||||
const crypto = __importStar(__nccwpck_require__(6113));
|
|
||||||
const constants_1 = __nccwpck_require__(74010);
|
const constants_1 = __nccwpck_require__(74010);
|
||||||
const versionSalt = '1.0';
|
const versionSalt = '1.0';
|
||||||
// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23
|
// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23
|
||||||
@@ -30199,7 +30292,7 @@ function createTempDirectory() {
|
|||||||
}
|
}
|
||||||
tempDirectory = path.join(baseLocation, 'actions', 'temp');
|
tempDirectory = path.join(baseLocation, 'actions', 'temp');
|
||||||
}
|
}
|
||||||
const dest = path.join(tempDirectory, (0, uuid_1.v4)());
|
const dest = path.join(tempDirectory, crypto.randomUUID());
|
||||||
yield io.mkdirP(dest);
|
yield io.mkdirP(dest);
|
||||||
return dest;
|
return dest;
|
||||||
});
|
});
|
||||||
@@ -30359,6 +30452,7 @@ function getRuntimeToken() {
|
|||||||
return token;
|
return token;
|
||||||
}
|
}
|
||||||
exports.getRuntimeToken = getRuntimeToken;
|
exports.getRuntimeToken = getRuntimeToken;
|
||||||
|
// TODO: Use the feature flag to determine the cache service version
|
||||||
function getCacheServiceVersion() {
|
function getCacheServiceVersion() {
|
||||||
return process.env['ACTIONS_CACHE_SERVICE_VERSION'] || 'v1';
|
return process.env['ACTIONS_CACHE_SERVICE_VERSION'] || 'v1';
|
||||||
}
|
}
|
||||||
@@ -30385,7 +30479,7 @@ exports.getCacheServiceURL = getCacheServiceURL;
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.ManifestFilename = exports.TarFilename = exports.SystemTarPathOnWindows = exports.GnuTarPathOnWindows = exports.SocketTimeout = exports.DefaultRetryDelay = exports.DefaultRetryAttempts = exports.ArchiveToolType = exports.CompressionMethod = exports.CacheFilename = void 0;
|
exports.CacheFileSizeLimit = exports.ManifestFilename = exports.TarFilename = exports.SystemTarPathOnWindows = exports.GnuTarPathOnWindows = exports.SocketTimeout = exports.DefaultRetryDelay = exports.DefaultRetryAttempts = exports.ArchiveToolType = exports.CompressionMethod = exports.CacheFilename = void 0;
|
||||||
var CacheFilename;
|
var CacheFilename;
|
||||||
(function (CacheFilename) {
|
(function (CacheFilename) {
|
||||||
CacheFilename["Gzip"] = "cache.tgz";
|
CacheFilename["Gzip"] = "cache.tgz";
|
||||||
@@ -30418,6 +30512,7 @@ exports.GnuTarPathOnWindows = `${process.env['PROGRAMFILES']}\\Git\\usr\\bin\\ta
|
|||||||
exports.SystemTarPathOnWindows = `${process.env['SYSTEMDRIVE']}\\Windows\\System32\\tar.exe`;
|
exports.SystemTarPathOnWindows = `${process.env['SYSTEMDRIVE']}\\Windows\\System32\\tar.exe`;
|
||||||
exports.TarFilename = 'cache.tar';
|
exports.TarFilename = 'cache.tar';
|
||||||
exports.ManifestFilename = 'manifest.txt';
|
exports.ManifestFilename = 'manifest.txt';
|
||||||
|
exports.CacheFileSizeLimit = 10 * Math.pow(1024, 3); // 10GiB per repository
|
||||||
//# sourceMappingURL=constants.js.map
|
//# sourceMappingURL=constants.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -31230,110 +31325,6 @@ exports.createTar = createTar;
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 9049:
|
|
||||||
/***/ (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 (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
||||||
__setModuleDefault(result, mod);
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
exports.streamExtractExternal = exports.StreamExtract = void 0;
|
|
||||||
const core = __importStar(__nccwpck_require__(74850));
|
|
||||||
const httpClient = __importStar(__nccwpck_require__(41283));
|
|
||||||
const unzip_stream_1 = __importDefault(__nccwpck_require__(44506));
|
|
||||||
const packageJson = __nccwpck_require__(3918);
|
|
||||||
function StreamExtract(url, directory) {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
let retryCount = 0;
|
|
||||||
while (retryCount < 5) {
|
|
||||||
try {
|
|
||||||
yield streamExtractExternal(url, directory);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
retryCount++;
|
|
||||||
core.info(`Failed to download cache after ${retryCount} retries due to ${error.message}. Retrying in 5 seconds...`);
|
|
||||||
// wait 5 seconds before retrying
|
|
||||||
yield new Promise(resolve => setTimeout(resolve, 5000));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
throw new Error(`Cache download failed after ${retryCount} retries.`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
exports.StreamExtract = StreamExtract;
|
|
||||||
function streamExtractExternal(url, directory) {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
const client = new httpClient.HttpClient(`@actions/cache-${packageJson.version}`);
|
|
||||||
const response = yield client.get(url);
|
|
||||||
if (response.message.statusCode !== 200) {
|
|
||||||
core.info(`Failed to download cache. HTTP status code: ${response.message.statusCode}`);
|
|
||||||
throw new Error(`Unexpected HTTP response from blob storage: ${response.message.statusCode} ${response.message.statusMessage}`);
|
|
||||||
}
|
|
||||||
const timeout = 30 * 1000; // 30 seconds
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
const timerFn = () => {
|
|
||||||
response.message.destroy(new Error(`Blob storage chunk did not respond in ${timeout}ms`));
|
|
||||||
};
|
|
||||||
const timer = setTimeout(timerFn, timeout);
|
|
||||||
response.message
|
|
||||||
.on('data', () => {
|
|
||||||
timer.refresh();
|
|
||||||
})
|
|
||||||
.on('error', (error) => {
|
|
||||||
core.info(`response.message: Cache download failed: ${error.message}`);
|
|
||||||
clearTimeout(timer);
|
|
||||||
reject(error);
|
|
||||||
})
|
|
||||||
.pipe(unzip_stream_1.default.Extract({ path: directory }))
|
|
||||||
.on('close', () => {
|
|
||||||
clearTimeout(timer);
|
|
||||||
resolve();
|
|
||||||
})
|
|
||||||
.on('error', (error) => {
|
|
||||||
reject(error);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
exports.streamExtractExternal = streamExtractExternal;
|
|
||||||
//# sourceMappingURL=download-cache.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 47107:
|
/***/ 47107:
|
||||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||||||
|
|
||||||
@@ -31452,19 +31443,18 @@ function UploadCacheStream(signedUploadURL, zipUploadStream) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.UploadCacheStream = UploadCacheStream;
|
exports.UploadCacheStream = UploadCacheStream;
|
||||||
function UploadCacheFile(uploadURL, archivePath) {
|
function UploadCacheFile(signedUploadURL, archivePath) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
core.info(`Uploading ${archivePath} to: ${JSON.stringify(uploadURL)}`);
|
|
||||||
// Specify data transfer options
|
// Specify data transfer options
|
||||||
const uploadOptions = {
|
const uploadOptions = {
|
||||||
blockSize: 4 * 1024 * 1024,
|
blockSize: 4 * 1024 * 1024,
|
||||||
concurrency: 2,
|
concurrency: 2,
|
||||||
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
||||||
};
|
};
|
||||||
const blobClient = new storage_blob_1.BlobClient(uploadURL.signedUploadUrl);
|
const blobClient = new storage_blob_1.BlobClient(signedUploadURL);
|
||||||
const blockBlobClient = blobClient.getBlockBlobClient();
|
const blockBlobClient = blobClient.getBlockBlobClient();
|
||||||
core.info(`BlobClient: ${JSON.stringify(blobClient)}`);
|
core.debug(`BlobClient: ${JSON.stringify(blobClient)}`);
|
||||||
core.info(`blockBlobClient: ${JSON.stringify(blockBlobClient)}`);
|
core.debug(`blockBlobClient: ${JSON.stringify(blockBlobClient)}`);
|
||||||
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -127899,221 +127889,6 @@ exports.Extract = __nccwpck_require__(32851);
|
|||||||
module.exports = __nccwpck_require__(73837).deprecate;
|
module.exports = __nccwpck_require__(73837).deprecate;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 21966:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
var v1 = __nccwpck_require__(87155);
|
|
||||||
var v4 = __nccwpck_require__(43515);
|
|
||||||
|
|
||||||
var uuid = v4;
|
|
||||||
uuid.v1 = v1;
|
|
||||||
uuid.v4 = v4;
|
|
||||||
|
|
||||||
module.exports = uuid;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 74328:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert array of 16 byte values to UUID string format of the form:
|
|
||||||
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
||||||
*/
|
|
||||||
var byteToHex = [];
|
|
||||||
for (var i = 0; i < 256; ++i) {
|
|
||||||
byteToHex[i] = (i + 0x100).toString(16).substr(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
function bytesToUuid(buf, offset) {
|
|
||||||
var i = offset || 0;
|
|
||||||
var bth = byteToHex;
|
|
||||||
// join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
|
|
||||||
return ([
|
|
||||||
bth[buf[i++]], bth[buf[i++]],
|
|
||||||
bth[buf[i++]], bth[buf[i++]], '-',
|
|
||||||
bth[buf[i++]], bth[buf[i++]], '-',
|
|
||||||
bth[buf[i++]], bth[buf[i++]], '-',
|
|
||||||
bth[buf[i++]], bth[buf[i++]], '-',
|
|
||||||
bth[buf[i++]], bth[buf[i++]],
|
|
||||||
bth[buf[i++]], bth[buf[i++]],
|
|
||||||
bth[buf[i++]], bth[buf[i++]]
|
|
||||||
]).join('');
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = bytesToUuid;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 59566:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
// Unique ID creation requires a high quality random # generator. In node.js
|
|
||||||
// this is pretty straight-forward - we use the crypto API.
|
|
||||||
|
|
||||||
var crypto = __nccwpck_require__(6113);
|
|
||||||
|
|
||||||
module.exports = function nodeRNG() {
|
|
||||||
return crypto.randomBytes(16);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 87155:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
var rng = __nccwpck_require__(59566);
|
|
||||||
var bytesToUuid = __nccwpck_require__(74328);
|
|
||||||
|
|
||||||
// **`v1()` - Generate time-based UUID**
|
|
||||||
//
|
|
||||||
// Inspired by https://github.com/LiosK/UUID.js
|
|
||||||
// and http://docs.python.org/library/uuid.html
|
|
||||||
|
|
||||||
var _nodeId;
|
|
||||||
var _clockseq;
|
|
||||||
|
|
||||||
// Previous uuid creation time
|
|
||||||
var _lastMSecs = 0;
|
|
||||||
var _lastNSecs = 0;
|
|
||||||
|
|
||||||
// See https://github.com/uuidjs/uuid for API details
|
|
||||||
function v1(options, buf, offset) {
|
|
||||||
var i = buf && offset || 0;
|
|
||||||
var b = buf || [];
|
|
||||||
|
|
||||||
options = options || {};
|
|
||||||
var node = options.node || _nodeId;
|
|
||||||
var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
|
|
||||||
|
|
||||||
// node and clockseq need to be initialized to random values if they're not
|
|
||||||
// specified. We do this lazily to minimize issues related to insufficient
|
|
||||||
// system entropy. See #189
|
|
||||||
if (node == null || clockseq == null) {
|
|
||||||
var seedBytes = rng();
|
|
||||||
if (node == null) {
|
|
||||||
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
|
|
||||||
node = _nodeId = [
|
|
||||||
seedBytes[0] | 0x01,
|
|
||||||
seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
|
|
||||||
];
|
|
||||||
}
|
|
||||||
if (clockseq == null) {
|
|
||||||
// Per 4.2.2, randomize (14 bit) clockseq
|
|
||||||
clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// UUID timestamps are 100 nano-second units since the Gregorian epoch,
|
|
||||||
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
|
|
||||||
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
|
|
||||||
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
|
|
||||||
var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
|
|
||||||
|
|
||||||
// Per 4.2.1.2, use count of uuid's generated during the current clock
|
|
||||||
// cycle to simulate higher resolution clock
|
|
||||||
var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
|
|
||||||
|
|
||||||
// Time since last uuid creation (in msecs)
|
|
||||||
var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
|
|
||||||
|
|
||||||
// Per 4.2.1.2, Bump clockseq on clock regression
|
|
||||||
if (dt < 0 && options.clockseq === undefined) {
|
|
||||||
clockseq = clockseq + 1 & 0x3fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
|
|
||||||
// time interval
|
|
||||||
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
|
|
||||||
nsecs = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Per 4.2.1.2 Throw error if too many uuids are requested
|
|
||||||
if (nsecs >= 10000) {
|
|
||||||
throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
|
|
||||||
}
|
|
||||||
|
|
||||||
_lastMSecs = msecs;
|
|
||||||
_lastNSecs = nsecs;
|
|
||||||
_clockseq = clockseq;
|
|
||||||
|
|
||||||
// Per 4.1.4 - Convert from unix epoch to Gregorian epoch
|
|
||||||
msecs += 12219292800000;
|
|
||||||
|
|
||||||
// `time_low`
|
|
||||||
var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
|
||||||
b[i++] = tl >>> 24 & 0xff;
|
|
||||||
b[i++] = tl >>> 16 & 0xff;
|
|
||||||
b[i++] = tl >>> 8 & 0xff;
|
|
||||||
b[i++] = tl & 0xff;
|
|
||||||
|
|
||||||
// `time_mid`
|
|
||||||
var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
|
|
||||||
b[i++] = tmh >>> 8 & 0xff;
|
|
||||||
b[i++] = tmh & 0xff;
|
|
||||||
|
|
||||||
// `time_high_and_version`
|
|
||||||
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
|
|
||||||
b[i++] = tmh >>> 16 & 0xff;
|
|
||||||
|
|
||||||
// `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
|
|
||||||
b[i++] = clockseq >>> 8 | 0x80;
|
|
||||||
|
|
||||||
// `clock_seq_low`
|
|
||||||
b[i++] = clockseq & 0xff;
|
|
||||||
|
|
||||||
// `node`
|
|
||||||
for (var n = 0; n < 6; ++n) {
|
|
||||||
b[i + n] = node[n];
|
|
||||||
}
|
|
||||||
|
|
||||||
return buf ? buf : bytesToUuid(b);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = v1;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 43515:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
var rng = __nccwpck_require__(59566);
|
|
||||||
var bytesToUuid = __nccwpck_require__(74328);
|
|
||||||
|
|
||||||
function v4(options, buf, offset) {
|
|
||||||
var i = buf && offset || 0;
|
|
||||||
|
|
||||||
if (typeof(options) == 'string') {
|
|
||||||
buf = options === 'binary' ? new Array(16) : null;
|
|
||||||
options = null;
|
|
||||||
}
|
|
||||||
options = options || {};
|
|
||||||
|
|
||||||
var rnds = options.random || (options.rng || rng)();
|
|
||||||
|
|
||||||
// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
||||||
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
|
||||||
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
||||||
|
|
||||||
// Copy bytes to buffer, if provided
|
|
||||||
if (buf) {
|
|
||||||
for (var ii = 0; ii < 16; ++ii) {
|
|
||||||
buf[i + ii] = rnds[ii];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return buf || bytesToUuid(rnds);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = v4;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 5336:
|
/***/ 5336:
|
||||||
@@ -146885,14 +146660,6 @@ module.exports = JSON.parse('{"application/1d-interleaved-parityfec":{"source":"
|
|||||||
"use strict";
|
"use strict";
|
||||||
module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"],[[47,47],"disallowed_STD3_valid"],[[48,57],"valid"],[[58,64],"disallowed_STD3_valid"],[[65,65],"mapped",[97]],[[66,66],"mapped",[98]],[[67,67],"mapped",[99]],[[68,68],"mapped",[100]],[[69,69],"mapped",[101]],[[70,70],"mapped",[102]],[[71,71],"mapped",[103]],[[72,72],"mapped",[104]],[[73,73],"mapped",[105]],[[74,74],"mapped",[106]],[[75,75],"mapped",[107]],[[76,76],"mapped",[108]],[[77,77],"mapped",[109]],[[78,78],"mapped",[110]],[[79,79],"mapped",[111]],[[80,80],"mapped",[112]],[[81,81],"mapped",[113]],[[82,82],"mapped",[114]],[[83,83],"mapped",[115]],[[84,84],"mapped",[116]],[[85,85],"mapped",[117]],[[86,86],"mapped",[118]],[[87,87],"mapped",[119]],[[88,88],"mapped",[120]],[[89,89],"mapped",[121]],[[90,90],"mapped",[122]],[[91,96],"disallowed_STD3_valid"],[[97,122],"valid"],[[123,127],"disallowed_STD3_valid"],[[128,159],"disallowed"],[[160,160],"disallowed_STD3_mapped",[32]],[[161,167],"valid",[],"NV8"],[[168,168],"disallowed_STD3_mapped",[32,776]],[[169,169],"valid",[],"NV8"],[[170,170],"mapped",[97]],[[171,172],"valid",[],"NV8"],[[173,173],"ignored"],[[174,174],"valid",[],"NV8"],[[175,175],"disallowed_STD3_mapped",[32,772]],[[176,177],"valid",[],"NV8"],[[178,178],"mapped",[50]],[[179,179],"mapped",[51]],[[180,180],"disallowed_STD3_mapped",[32,769]],[[181,181],"mapped",[956]],[[182,182],"valid",[],"NV8"],[[183,183],"valid"],[[184,184],"disallowed_STD3_mapped",[32,807]],[[185,185],"mapped",[49]],[[186,186],"mapped",[111]],[[187,187],"valid",[],"NV8"],[[188,188],"mapped",[49,8260,52]],[[189,189],"mapped",[49,8260,50]],[[190,190],"mapped",[51,8260,52]],[[191,191],"valid",[],"NV8"],[[192,192],"mapped",[224]],[[193,193],"mapped",[225]],[[194,194],"mapped",[226]],[[195,195],"mapped",[227]],[[196,196],"mapped",[228]],[[197,197],"mapped",[229]],[[198,198],"mapped",[230]],[[199,199],"mapped",[231]],[[200,200],"mapped",[232]],[[201,201],"mapped",[233]],[[202,202],"mapped",[234]],[[203,203],"mapped",[235]],[[204,204],"mapped",[236]],[[205,205],"mapped",[237]],[[206,206],"mapped",[238]],[[207,207],"mapped",[239]],[[208,208],"mapped",[240]],[[209,209],"mapped",[241]],[[210,210],"mapped",[242]],[[211,211],"mapped",[243]],[[212,212],"mapped",[244]],[[213,213],"mapped",[245]],[[214,214],"mapped",[246]],[[215,215],"valid",[],"NV8"],[[216,216],"mapped",[248]],[[217,217],"mapped",[249]],[[218,218],"mapped",[250]],[[219,219],"mapped",[251]],[[220,220],"mapped",[252]],[[221,221],"mapped",[253]],[[222,222],"mapped",[254]],[[223,223],"deviation",[115,115]],[[224,246],"valid"],[[247,247],"valid",[],"NV8"],[[248,255],"valid"],[[256,256],"mapped",[257]],[[257,257],"valid"],[[258,258],"mapped",[259]],[[259,259],"valid"],[[260,260],"mapped",[261]],[[261,261],"valid"],[[262,262],"mapped",[263]],[[263,263],"valid"],[[264,264],"mapped",[265]],[[265,265],"valid"],[[266,266],"mapped",[267]],[[267,267],"valid"],[[268,268],"mapped",[269]],[[269,269],"valid"],[[270,270],"mapped",[271]],[[271,271],"valid"],[[272,272],"mapped",[273]],[[273,273],"valid"],[[274,274],"mapped",[275]],[[275,275],"valid"],[[276,276],"mapped",[277]],[[277,277],"valid"],[[278,278],"mapped",[279]],[[279,279],"valid"],[[280,280],"mapped",[281]],[[281,281],"valid"],[[282,282],"mapped",[283]],[[283,283],"valid"],[[284,284],"mapped",[285]],[[285,285],"valid"],[[286,286],"mapped",[287]],[[287,287],"valid"],[[288,288],"mapped",[289]],[[289,289],"valid"],[[290,290],"mapped",[291]],[[291,291],"valid"],[[292,292],"mapped",[293]],[[293,293],"valid"],[[294,294],"mapped",[295]],[[295,295],"valid"],[[296,296],"mapped",[297]],[[297,297],"valid"],[[298,298],"mapped",[299]],[[299,299],"valid"],[[300,300],"mapped",[301]],[[301,301],"valid"],[[302,302],"mapped",[303]],[[303,303],"valid"],[[304,304],"mapped",[105,775]],[[305,305],"valid"],[[306,307],"mapped",[105,106]],[[308,308],"mapped",[309]],[[309,309],"valid"],[[310,310],"mapped",[311]],[[311,312],"valid"],[[313,313],"mapped",[314]],[[314,314],"valid"],[[315,315],"mapped",[316]],[[316,316],"valid"],[[317,317],"mapped",[318]],[[318,318],"valid"],[[319,320],"mapped",[108,183]],[[321,321],"mapped",[322]],[[322,322],"valid"],[[323,323],"mapped",[324]],[[324,324],"valid"],[[325,325],"mapped",[326]],[[326,326],"valid"],[[327,327],"mapped",[328]],[[328,328],"valid"],[[329,329],"mapped",[700,110]],[[330,330],"mapped",[331]],[[331,331],"valid"],[[332,332],"mapped",[333]],[[333,333],"valid"],[[334,334],"mapped",[335]],[[335,335],"valid"],[[336,336],"mapped",[337]],[[337,337],"valid"],[[338,338],"mapped",[339]],[[339,339],"valid"],[[340,340],"mapped",[341]],[[341,341],"valid"],[[342,342],"mapped",[343]],[[343,343],"valid"],[[344,344],"mapped",[345]],[[345,345],"valid"],[[346,346],"mapped",[347]],[[347,347],"valid"],[[348,348],"mapped",[349]],[[349,349],"valid"],[[350,350],"mapped",[351]],[[351,351],"valid"],[[352,352],"mapped",[353]],[[353,353],"valid"],[[354,354],"mapped",[355]],[[355,355],"valid"],[[356,356],"mapped",[357]],[[357,357],"valid"],[[358,358],"mappLine truncated
|
module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"],[[47,47],"disallowed_STD3_valid"],[[48,57],"valid"],[[58,64],"disallowed_STD3_valid"],[[65,65],"mapped",[97]],[[66,66],"mapped",[98]],[[67,67],"mapped",[99]],[[68,68],"mapped",[100]],[[69,69],"mapped",[101]],[[70,70],"mapped",[102]],[[71,71],"mapped",[103]],[[72,72],"mapped",[104]],[[73,73],"mapped",[105]],[[74,74],"mapped",[106]],[[75,75],"mapped",[107]],[[76,76],"mapped",[108]],[[77,77],"mapped",[109]],[[78,78],"mapped",[110]],[[79,79],"mapped",[111]],[[80,80],"mapped",[112]],[[81,81],"mapped",[113]],[[82,82],"mapped",[114]],[[83,83],"mapped",[115]],[[84,84],"mapped",[116]],[[85,85],"mapped",[117]],[[86,86],"mapped",[118]],[[87,87],"mapped",[119]],[[88,88],"mapped",[120]],[[89,89],"mapped",[121]],[[90,90],"mapped",[122]],[[91,96],"disallowed_STD3_valid"],[[97,122],"valid"],[[123,127],"disallowed_STD3_valid"],[[128,159],"disallowed"],[[160,160],"disallowed_STD3_mapped",[32]],[[161,167],"valid",[],"NV8"],[[168,168],"disallowed_STD3_mapped",[32,776]],[[169,169],"valid",[],"NV8"],[[170,170],"mapped",[97]],[[171,172],"valid",[],"NV8"],[[173,173],"ignored"],[[174,174],"valid",[],"NV8"],[[175,175],"disallowed_STD3_mapped",[32,772]],[[176,177],"valid",[],"NV8"],[[178,178],"mapped",[50]],[[179,179],"mapped",[51]],[[180,180],"disallowed_STD3_mapped",[32,769]],[[181,181],"mapped",[956]],[[182,182],"valid",[],"NV8"],[[183,183],"valid"],[[184,184],"disallowed_STD3_mapped",[32,807]],[[185,185],"mapped",[49]],[[186,186],"mapped",[111]],[[187,187],"valid",[],"NV8"],[[188,188],"mapped",[49,8260,52]],[[189,189],"mapped",[49,8260,50]],[[190,190],"mapped",[51,8260,52]],[[191,191],"valid",[],"NV8"],[[192,192],"mapped",[224]],[[193,193],"mapped",[225]],[[194,194],"mapped",[226]],[[195,195],"mapped",[227]],[[196,196],"mapped",[228]],[[197,197],"mapped",[229]],[[198,198],"mapped",[230]],[[199,199],"mapped",[231]],[[200,200],"mapped",[232]],[[201,201],"mapped",[233]],[[202,202],"mapped",[234]],[[203,203],"mapped",[235]],[[204,204],"mapped",[236]],[[205,205],"mapped",[237]],[[206,206],"mapped",[238]],[[207,207],"mapped",[239]],[[208,208],"mapped",[240]],[[209,209],"mapped",[241]],[[210,210],"mapped",[242]],[[211,211],"mapped",[243]],[[212,212],"mapped",[244]],[[213,213],"mapped",[245]],[[214,214],"mapped",[246]],[[215,215],"valid",[],"NV8"],[[216,216],"mapped",[248]],[[217,217],"mapped",[249]],[[218,218],"mapped",[250]],[[219,219],"mapped",[251]],[[220,220],"mapped",[252]],[[221,221],"mapped",[253]],[[222,222],"mapped",[254]],[[223,223],"deviation",[115,115]],[[224,246],"valid"],[[247,247],"valid",[],"NV8"],[[248,255],"valid"],[[256,256],"mapped",[257]],[[257,257],"valid"],[[258,258],"mapped",[259]],[[259,259],"valid"],[[260,260],"mapped",[261]],[[261,261],"valid"],[[262,262],"mapped",[263]],[[263,263],"valid"],[[264,264],"mapped",[265]],[[265,265],"valid"],[[266,266],"mapped",[267]],[[267,267],"valid"],[[268,268],"mapped",[269]],[[269,269],"valid"],[[270,270],"mapped",[271]],[[271,271],"valid"],[[272,272],"mapped",[273]],[[273,273],"valid"],[[274,274],"mapped",[275]],[[275,275],"valid"],[[276,276],"mapped",[277]],[[277,277],"valid"],[[278,278],"mapped",[279]],[[279,279],"valid"],[[280,280],"mapped",[281]],[[281,281],"valid"],[[282,282],"mapped",[283]],[[283,283],"valid"],[[284,284],"mapped",[285]],[[285,285],"valid"],[[286,286],"mapped",[287]],[[287,287],"valid"],[[288,288],"mapped",[289]],[[289,289],"valid"],[[290,290],"mapped",[291]],[[291,291],"valid"],[[292,292],"mapped",[293]],[[293,293],"valid"],[[294,294],"mapped",[295]],[[295,295],"valid"],[[296,296],"mapped",[297]],[[297,297],"valid"],[[298,298],"mapped",[299]],[[299,299],"valid"],[[300,300],"mapped",[301]],[[301,301],"valid"],[[302,302],"mapped",[303]],[[303,303],"valid"],[[304,304],"mapped",[105,775]],[[305,305],"valid"],[[306,307],"mapped",[105,106]],[[308,308],"mapped",[309]],[[309,309],"valid"],[[310,310],"mapped",[311]],[[311,312],"valid"],[[313,313],"mapped",[314]],[[314,314],"valid"],[[315,315],"mapped",[316]],[[316,316],"valid"],[[317,317],"mapped",[318]],[[318,318],"valid"],[[319,320],"mapped",[108,183]],[[321,321],"mapped",[322]],[[322,322],"valid"],[[323,323],"mapped",[324]],[[324,324],"valid"],[[325,325],"mapped",[326]],[[326,326],"valid"],[[327,327],"mapped",[328]],[[328,328],"valid"],[[329,329],"mapped",[700,110]],[[330,330],"mapped",[331]],[[331,331],"valid"],[[332,332],"mapped",[333]],[[333,333],"valid"],[[334,334],"mapped",[335]],[[335,335],"valid"],[[336,336],"mapped",[337]],[[337,337],"valid"],[[338,338],"mapped",[339]],[[339,339],"valid"],[[340,340],"mapped",[341]],[[341,341],"valid"],[[342,342],"mapped",[343]],[[343,343],"valid"],[[344,344],"mapped",[345]],[[345,345],"valid"],[[346,346],"mapped",[347]],[[347,347],"valid"],[[348,348],"mapped",[349]],[[349,349],"valid"],[[350,350],"mapped",[351]],[[351,351],"valid"],[[352,352],"mapped",[353]],[[353,353],"valid"],[[354,354],"mapped",[355]],[[355,355],"valid"],[[356,356],"mapped",[357]],[[357,357],"valid"],[[358,358],"mappLine truncated
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 3918:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
module.exports = JSON.parse('{"name":"@actions/cache","version":"3.2.4","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.10.0","@actions/artifact":"^2.1.7","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","semver":"^6.3.1"},"devDependencies":{"@types/semver":"^6.0.0","typescript":"^5.2.2"}}');
|
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
/******/ });
|
/******/ });
|
||||||
|
|||||||
Vendored
+154
-387
@@ -27687,10 +27687,8 @@ const cacheHttpClient = __importStar(__nccwpck_require__(42370));
|
|||||||
const cacheTwirpClient = __importStar(__nccwpck_require__(95451));
|
const cacheTwirpClient = __importStar(__nccwpck_require__(95451));
|
||||||
const tar_1 = __nccwpck_require__(49099);
|
const tar_1 = __nccwpck_require__(49099);
|
||||||
const upload_cache_1 = __nccwpck_require__(47107);
|
const upload_cache_1 = __nccwpck_require__(47107);
|
||||||
const download_cache_1 = __nccwpck_require__(9049);
|
|
||||||
const upload_zip_specification_1 = __nccwpck_require__(77643);
|
|
||||||
const zip_1 = __nccwpck_require__(26699);
|
|
||||||
const util_1 = __nccwpck_require__(49196);
|
const util_1 = __nccwpck_require__(49196);
|
||||||
|
const constants_1 = __nccwpck_require__(74010);
|
||||||
class ValidationError extends Error {
|
class ValidationError extends Error {
|
||||||
constructor(message) {
|
constructor(message) {
|
||||||
super(message);
|
super(message);
|
||||||
@@ -27744,7 +27742,7 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
checkPaths(paths);
|
checkPaths(paths);
|
||||||
const cacheServiceVersion = config.getCacheServiceVersion();
|
const cacheServiceVersion = config.getCacheServiceVersion();
|
||||||
console.debug(`Cache Service Version: ${cacheServiceVersion}`);
|
console.debug(`Cache service version: ${cacheServiceVersion}`);
|
||||||
switch (cacheServiceVersion) {
|
switch (cacheServiceVersion) {
|
||||||
case "v2":
|
case "v2":
|
||||||
return yield restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive);
|
return yield restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive);
|
||||||
@@ -27755,6 +27753,16 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.restoreCache = restoreCache;
|
exports.restoreCache = restoreCache;
|
||||||
|
/**
|
||||||
|
* Restores cache using the legacy Cache Service
|
||||||
|
*
|
||||||
|
* @param paths
|
||||||
|
* @param primaryKey
|
||||||
|
* @param restoreKeys
|
||||||
|
* @param options
|
||||||
|
* @param enableCrossOsArchive
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
function restoreCachev1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
function restoreCachev1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
restoreKeys = restoreKeys || [];
|
restoreKeys = restoreKeys || [];
|
||||||
@@ -27818,6 +27826,16 @@ function restoreCachev1(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
|||||||
return undefined;
|
return undefined;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Restores cache using the new Cache Service
|
||||||
|
*
|
||||||
|
* @param paths a list of file paths to restore from the cache
|
||||||
|
* @param primaryKey an explicit key for restoring the cache
|
||||||
|
* @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for key
|
||||||
|
* @param downloadOptions cache download options
|
||||||
|
* @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform
|
||||||
|
* @returns string returns the key for the cache hit, otherwise returns undefined
|
||||||
|
*/
|
||||||
function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
restoreKeys = restoreKeys || [];
|
restoreKeys = restoreKeys || [];
|
||||||
@@ -27830,11 +27848,12 @@ function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
|||||||
for (const key of keys) {
|
for (const key of keys) {
|
||||||
checkKey(key);
|
checkKey(key);
|
||||||
}
|
}
|
||||||
|
let archivePath = '';
|
||||||
try {
|
try {
|
||||||
|
const twirpClient = cacheTwirpClient.internalCacheTwirpClient();
|
||||||
// BackendIds are retrieved form the signed JWT
|
// BackendIds are retrieved form the signed JWT
|
||||||
const backendIds = (0, util_1.getBackendIdsFromToken)();
|
const backendIds = (0, util_1.getBackendIdsFromToken)();
|
||||||
const compressionMethod = yield utils.getCompressionMethod();
|
const compressionMethod = yield utils.getCompressionMethod();
|
||||||
const twirpClient = cacheTwirpClient.internalCacheTwirpClient();
|
|
||||||
const request = {
|
const request = {
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
@@ -27842,22 +27861,44 @@ function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
|||||||
restoreKeys: restoreKeys,
|
restoreKeys: restoreKeys,
|
||||||
version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive),
|
version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive),
|
||||||
};
|
};
|
||||||
|
console.debug(`GetCacheEntryDownloadURLRequest: ${JSON.stringify(twirpClient)}`);
|
||||||
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
||||||
core.info(`GetCacheEntryDownloadURLResponse: ${JSON.stringify(response)}`);
|
core.debug(`GetCacheEntryDownloadURLResponse: ${JSON.stringify(response)}`);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
// Cache not found
|
// Cache not found
|
||||||
core.warning(`Cache not found for keys: ${keys.join(', ')}`);
|
core.warning(`Cache not found for keys: ${keys.join(', ')}`);
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
core.info(`Cache hit for: ${request.key}`);
|
core.info(`Cache hit for: ${request.key}`);
|
||||||
core.info(`Starting download of artifact to: ${paths[0]}`);
|
if (options === null || options === void 0 ? void 0 : options.lookupOnly) {
|
||||||
yield (0, download_cache_1.StreamExtract)(response.signedDownloadUrl, path.dirname(paths[0]));
|
core.info('Lookup only - skipping download');
|
||||||
core.info(`Artifact download completed successfully.`);
|
return request.key;
|
||||||
return keys[0];
|
}
|
||||||
|
archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod));
|
||||||
|
core.debug(`Archive path: ${archivePath}`);
|
||||||
|
if (core.isDebug()) {
|
||||||
|
yield (0, tar_1.listTar)(archivePath, compressionMethod);
|
||||||
|
}
|
||||||
|
core.debug(`Starting download of artifact to: ${archivePath}`);
|
||||||
|
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||||
|
core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`);
|
||||||
|
// Download the cache from the cache entry
|
||||||
|
yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options);
|
||||||
|
yield (0, tar_1.extractTar)(archivePath, compressionMethod);
|
||||||
|
core.info('Cache restored successfully');
|
||||||
|
return request.key;
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
throw new Error(`Unable to download and extract cache: ${error.message}`);
|
throw new Error(`Unable to download and extract cache: ${error.message}`);
|
||||||
}
|
}
|
||||||
|
finally {
|
||||||
|
try {
|
||||||
|
yield utils.unlinkFile(archivePath);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.debug(`Failed to delete archive: ${error}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -27885,6 +27926,15 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.saveCache = saveCache;
|
exports.saveCache = saveCache;
|
||||||
|
/**
|
||||||
|
* Save cache using the legacy Cache Service
|
||||||
|
*
|
||||||
|
* @param paths
|
||||||
|
* @param key
|
||||||
|
* @param options
|
||||||
|
* @param enableCrossOsArchive
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
function saveCachev1(paths, key, options, enableCrossOsArchive = false) {
|
function saveCachev1(paths, key, options, enableCrossOsArchive = false) {
|
||||||
var _a, _b, _c, _d, _e;
|
var _a, _b, _c, _d, _e;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
@@ -27953,51 +28003,88 @@ function saveCachev1(paths, key, options, enableCrossOsArchive = false) {
|
|||||||
return cacheId;
|
return cacheId;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Save cache using the new Cache Service
|
||||||
|
*
|
||||||
|
* @param paths
|
||||||
|
* @param key
|
||||||
|
* @param options
|
||||||
|
* @param enableCrossOsArchive
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
function saveCachev2(paths, key, options, enableCrossOsArchive = false) {
|
function saveCachev2(paths, key, options, enableCrossOsArchive = false) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
// BackendIds are retrieved form the signed JWT
|
// BackendIds are retrieved form the signed JWT
|
||||||
const backendIds = (0, util_1.getBackendIdsFromToken)();
|
const backendIds = (0, util_1.getBackendIdsFromToken)();
|
||||||
const compressionMethod = yield utils.getCompressionMethod();
|
const compressionMethod = yield utils.getCompressionMethod();
|
||||||
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
|
|
||||||
const twirpClient = cacheTwirpClient.internalCacheTwirpClient();
|
const twirpClient = cacheTwirpClient.internalCacheTwirpClient();
|
||||||
const request = {
|
let cacheId = -1;
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
const cachePaths = yield utils.resolvePaths(paths);
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
core.debug('Cache Paths:');
|
||||||
key: key,
|
core.debug(`${JSON.stringify(cachePaths)}`);
|
||||||
version: version
|
if (cachePaths.length === 0) {
|
||||||
};
|
throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`);
|
||||||
const response = yield twirpClient.CreateCacheEntry(request);
|
|
||||||
core.info(`CreateCacheEntryResponse: ${JSON.stringify(response)}`);
|
|
||||||
// Archive
|
|
||||||
// We're going to handle 1 path fow now. This needs to be fixed to handle all
|
|
||||||
// paths passed in.
|
|
||||||
const rootDir = path.dirname(paths[0]);
|
|
||||||
const zipSpecs = (0, upload_zip_specification_1.getUploadZipSpecification)(paths, rootDir);
|
|
||||||
if (zipSpecs.length === 0) {
|
|
||||||
throw new Error(`Error with zip specs: ${zipSpecs.flatMap(s => (s.sourcePath ? [s.sourcePath] : [])).join(', ')}`);
|
|
||||||
}
|
}
|
||||||
// 0: No compression
|
const archiveFolder = yield utils.createTempDirectory();
|
||||||
// 1: Best speed
|
const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod));
|
||||||
// 6: Default compression (same as GNU Gzip)
|
core.debug(`Archive Path: ${archivePath}`);
|
||||||
// 9: Best compression Higher levels will result in better compression, but will take longer to complete. For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads.
|
try {
|
||||||
const zipUploadStream = yield (0, zip_1.createZipUploadStream)(zipSpecs, 6);
|
yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod);
|
||||||
// Cache v2 upload
|
if (core.isDebug()) {
|
||||||
// inputs:
|
yield (0, tar_1.listTar)(archivePath, compressionMethod);
|
||||||
// - getSignedUploadURL
|
}
|
||||||
// - archivePath
|
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||||
core.info(`Saving Cache v2: ${paths[0]}`);
|
core.debug(`File Size: ${archiveFileSize}`);
|
||||||
yield (0, upload_cache_1.UploadCacheStream)(response.signedUploadUrl, zipUploadStream);
|
// For GHES, this check will take place in ReserveCache API with enterprise file size limit
|
||||||
// Finalize the cache entry
|
if (archiveFileSize > constants_1.CacheFileSizeLimit && !utils.isGhes()) {
|
||||||
const finalizeRequest = {
|
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
}
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
core.debug('Reserving Cache');
|
||||||
key: key,
|
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
|
||||||
version: version,
|
const request = {
|
||||||
sizeBytes: "1024",
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
};
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
|
key: key,
|
||||||
core.info(`FinalizeCacheEntryUploadResponse: ${JSON.stringify(finalizeResponse)}`);
|
version: version
|
||||||
return 0;
|
};
|
||||||
|
const response = yield twirpClient.CreateCacheEntry(request);
|
||||||
|
core.info(`CreateCacheEntryResponse: ${JSON.stringify(response)}`);
|
||||||
|
// TODO: handle the error cases here
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`);
|
||||||
|
}
|
||||||
|
// TODO: mask the signed upload URL
|
||||||
|
core.debug(`Saving Cache to: ${response.signedUploadUrl}`);
|
||||||
|
yield (0, upload_cache_1.UploadCacheFile)(response.signedUploadUrl, archivePath);
|
||||||
|
const finalizeRequest = {
|
||||||
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
|
key: key,
|
||||||
|
version: version,
|
||||||
|
sizeBytes: `${archiveFileSize}`,
|
||||||
|
};
|
||||||
|
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
|
||||||
|
core.debug(`FinalizeCacheEntryUploadResponse: ${JSON.stringify(finalizeResponse)}`);
|
||||||
|
if (!finalizeResponse.ok) {
|
||||||
|
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
|
||||||
|
}
|
||||||
|
// TODO: this is not great, we should handle the types without parsing
|
||||||
|
cacheId = parseInt(finalizeResponse.entryId);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
const typedError = error;
|
||||||
|
core.debug(typedError.message);
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
// Try to delete the archive to save space
|
||||||
|
try {
|
||||||
|
yield utils.unlinkFile(archivePath);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.debug(`Failed to delete archive: ${error}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cacheId;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//# sourceMappingURL=cache.js.map
|
//# sourceMappingURL=cache.js.map
|
||||||
@@ -29979,11 +30066,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.internalCacheTwirpClient = void 0;
|
exports.internalCacheTwirpClient = void 0;
|
||||||
const http_client_1 = __nccwpck_require__(41283);
|
|
||||||
const auth_1 = __nccwpck_require__(57231);
|
|
||||||
const core_1 = __nccwpck_require__(74850);
|
const core_1 = __nccwpck_require__(74850);
|
||||||
const cache_twirp_1 = __nccwpck_require__(10894);
|
|
||||||
const config_1 = __nccwpck_require__(46490);
|
const config_1 = __nccwpck_require__(46490);
|
||||||
|
const auth_1 = __nccwpck_require__(57231);
|
||||||
|
const http_client_1 = __nccwpck_require__(41283);
|
||||||
|
const cache_twirp_1 = __nccwpck_require__(10894);
|
||||||
|
/**
|
||||||
|
* This class is a wrapper around the CacheServiceClientJSON class generated by Twirp.
|
||||||
|
*
|
||||||
|
* It adds retry logic to the request method, which is not present in the generated client.
|
||||||
|
*
|
||||||
|
* This class is used to interact with cache service v2.
|
||||||
|
*/
|
||||||
class CacheServiceClient {
|
class CacheServiceClient {
|
||||||
constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) {
|
constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) {
|
||||||
this.maxAttempts = 5;
|
this.maxAttempts = 5;
|
||||||
@@ -30170,12 +30264,11 @@ const core = __importStar(__nccwpck_require__(74850));
|
|||||||
const exec = __importStar(__nccwpck_require__(40309));
|
const exec = __importStar(__nccwpck_require__(40309));
|
||||||
const glob = __importStar(__nccwpck_require__(79590));
|
const glob = __importStar(__nccwpck_require__(79590));
|
||||||
const io = __importStar(__nccwpck_require__(50074));
|
const io = __importStar(__nccwpck_require__(50074));
|
||||||
|
const crypto = __importStar(__nccwpck_require__(6113));
|
||||||
const fs = __importStar(__nccwpck_require__(57147));
|
const fs = __importStar(__nccwpck_require__(57147));
|
||||||
const path = __importStar(__nccwpck_require__(71017));
|
const path = __importStar(__nccwpck_require__(71017));
|
||||||
const semver = __importStar(__nccwpck_require__(33910));
|
const semver = __importStar(__nccwpck_require__(33910));
|
||||||
const util = __importStar(__nccwpck_require__(73837));
|
const util = __importStar(__nccwpck_require__(73837));
|
||||||
const uuid_1 = __nccwpck_require__(21966);
|
|
||||||
const crypto = __importStar(__nccwpck_require__(6113));
|
|
||||||
const constants_1 = __nccwpck_require__(74010);
|
const constants_1 = __nccwpck_require__(74010);
|
||||||
const versionSalt = '1.0';
|
const versionSalt = '1.0';
|
||||||
// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23
|
// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23
|
||||||
@@ -30199,7 +30292,7 @@ function createTempDirectory() {
|
|||||||
}
|
}
|
||||||
tempDirectory = path.join(baseLocation, 'actions', 'temp');
|
tempDirectory = path.join(baseLocation, 'actions', 'temp');
|
||||||
}
|
}
|
||||||
const dest = path.join(tempDirectory, (0, uuid_1.v4)());
|
const dest = path.join(tempDirectory, crypto.randomUUID());
|
||||||
yield io.mkdirP(dest);
|
yield io.mkdirP(dest);
|
||||||
return dest;
|
return dest;
|
||||||
});
|
});
|
||||||
@@ -30359,6 +30452,7 @@ function getRuntimeToken() {
|
|||||||
return token;
|
return token;
|
||||||
}
|
}
|
||||||
exports.getRuntimeToken = getRuntimeToken;
|
exports.getRuntimeToken = getRuntimeToken;
|
||||||
|
// TODO: Use the feature flag to determine the cache service version
|
||||||
function getCacheServiceVersion() {
|
function getCacheServiceVersion() {
|
||||||
return process.env['ACTIONS_CACHE_SERVICE_VERSION'] || 'v1';
|
return process.env['ACTIONS_CACHE_SERVICE_VERSION'] || 'v1';
|
||||||
}
|
}
|
||||||
@@ -30385,7 +30479,7 @@ exports.getCacheServiceURL = getCacheServiceURL;
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.ManifestFilename = exports.TarFilename = exports.SystemTarPathOnWindows = exports.GnuTarPathOnWindows = exports.SocketTimeout = exports.DefaultRetryDelay = exports.DefaultRetryAttempts = exports.ArchiveToolType = exports.CompressionMethod = exports.CacheFilename = void 0;
|
exports.CacheFileSizeLimit = exports.ManifestFilename = exports.TarFilename = exports.SystemTarPathOnWindows = exports.GnuTarPathOnWindows = exports.SocketTimeout = exports.DefaultRetryDelay = exports.DefaultRetryAttempts = exports.ArchiveToolType = exports.CompressionMethod = exports.CacheFilename = void 0;
|
||||||
var CacheFilename;
|
var CacheFilename;
|
||||||
(function (CacheFilename) {
|
(function (CacheFilename) {
|
||||||
CacheFilename["Gzip"] = "cache.tgz";
|
CacheFilename["Gzip"] = "cache.tgz";
|
||||||
@@ -30418,6 +30512,7 @@ exports.GnuTarPathOnWindows = `${process.env['PROGRAMFILES']}\\Git\\usr\\bin\\ta
|
|||||||
exports.SystemTarPathOnWindows = `${process.env['SYSTEMDRIVE']}\\Windows\\System32\\tar.exe`;
|
exports.SystemTarPathOnWindows = `${process.env['SYSTEMDRIVE']}\\Windows\\System32\\tar.exe`;
|
||||||
exports.TarFilename = 'cache.tar';
|
exports.TarFilename = 'cache.tar';
|
||||||
exports.ManifestFilename = 'manifest.txt';
|
exports.ManifestFilename = 'manifest.txt';
|
||||||
|
exports.CacheFileSizeLimit = 10 * Math.pow(1024, 3); // 10GiB per repository
|
||||||
//# sourceMappingURL=constants.js.map
|
//# sourceMappingURL=constants.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -31230,110 +31325,6 @@ exports.createTar = createTar;
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 9049:
|
|
||||||
/***/ (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 (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
||||||
__setModuleDefault(result, mod);
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
exports.streamExtractExternal = exports.StreamExtract = void 0;
|
|
||||||
const core = __importStar(__nccwpck_require__(74850));
|
|
||||||
const httpClient = __importStar(__nccwpck_require__(41283));
|
|
||||||
const unzip_stream_1 = __importDefault(__nccwpck_require__(44506));
|
|
||||||
const packageJson = __nccwpck_require__(3918);
|
|
||||||
function StreamExtract(url, directory) {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
let retryCount = 0;
|
|
||||||
while (retryCount < 5) {
|
|
||||||
try {
|
|
||||||
yield streamExtractExternal(url, directory);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
retryCount++;
|
|
||||||
core.info(`Failed to download cache after ${retryCount} retries due to ${error.message}. Retrying in 5 seconds...`);
|
|
||||||
// wait 5 seconds before retrying
|
|
||||||
yield new Promise(resolve => setTimeout(resolve, 5000));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
throw new Error(`Cache download failed after ${retryCount} retries.`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
exports.StreamExtract = StreamExtract;
|
|
||||||
function streamExtractExternal(url, directory) {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
const client = new httpClient.HttpClient(`@actions/cache-${packageJson.version}`);
|
|
||||||
const response = yield client.get(url);
|
|
||||||
if (response.message.statusCode !== 200) {
|
|
||||||
core.info(`Failed to download cache. HTTP status code: ${response.message.statusCode}`);
|
|
||||||
throw new Error(`Unexpected HTTP response from blob storage: ${response.message.statusCode} ${response.message.statusMessage}`);
|
|
||||||
}
|
|
||||||
const timeout = 30 * 1000; // 30 seconds
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
const timerFn = () => {
|
|
||||||
response.message.destroy(new Error(`Blob storage chunk did not respond in ${timeout}ms`));
|
|
||||||
};
|
|
||||||
const timer = setTimeout(timerFn, timeout);
|
|
||||||
response.message
|
|
||||||
.on('data', () => {
|
|
||||||
timer.refresh();
|
|
||||||
})
|
|
||||||
.on('error', (error) => {
|
|
||||||
core.info(`response.message: Cache download failed: ${error.message}`);
|
|
||||||
clearTimeout(timer);
|
|
||||||
reject(error);
|
|
||||||
})
|
|
||||||
.pipe(unzip_stream_1.default.Extract({ path: directory }))
|
|
||||||
.on('close', () => {
|
|
||||||
clearTimeout(timer);
|
|
||||||
resolve();
|
|
||||||
})
|
|
||||||
.on('error', (error) => {
|
|
||||||
reject(error);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
exports.streamExtractExternal = streamExtractExternal;
|
|
||||||
//# sourceMappingURL=download-cache.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 47107:
|
/***/ 47107:
|
||||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||||||
|
|
||||||
@@ -31452,19 +31443,18 @@ function UploadCacheStream(signedUploadURL, zipUploadStream) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.UploadCacheStream = UploadCacheStream;
|
exports.UploadCacheStream = UploadCacheStream;
|
||||||
function UploadCacheFile(uploadURL, archivePath) {
|
function UploadCacheFile(signedUploadURL, archivePath) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
core.info(`Uploading ${archivePath} to: ${JSON.stringify(uploadURL)}`);
|
|
||||||
// Specify data transfer options
|
// Specify data transfer options
|
||||||
const uploadOptions = {
|
const uploadOptions = {
|
||||||
blockSize: 4 * 1024 * 1024,
|
blockSize: 4 * 1024 * 1024,
|
||||||
concurrency: 2,
|
concurrency: 2,
|
||||||
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
||||||
};
|
};
|
||||||
const blobClient = new storage_blob_1.BlobClient(uploadURL.signedUploadUrl);
|
const blobClient = new storage_blob_1.BlobClient(signedUploadURL);
|
||||||
const blockBlobClient = blobClient.getBlockBlobClient();
|
const blockBlobClient = blobClient.getBlockBlobClient();
|
||||||
core.info(`BlobClient: ${JSON.stringify(blobClient)}`);
|
core.debug(`BlobClient: ${JSON.stringify(blobClient)}`);
|
||||||
core.info(`blockBlobClient: ${JSON.stringify(blockBlobClient)}`);
|
core.debug(`blockBlobClient: ${JSON.stringify(blockBlobClient)}`);
|
||||||
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -127899,221 +127889,6 @@ exports.Extract = __nccwpck_require__(32851);
|
|||||||
module.exports = __nccwpck_require__(73837).deprecate;
|
module.exports = __nccwpck_require__(73837).deprecate;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 21966:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
var v1 = __nccwpck_require__(87155);
|
|
||||||
var v4 = __nccwpck_require__(43515);
|
|
||||||
|
|
||||||
var uuid = v4;
|
|
||||||
uuid.v1 = v1;
|
|
||||||
uuid.v4 = v4;
|
|
||||||
|
|
||||||
module.exports = uuid;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 74328:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert array of 16 byte values to UUID string format of the form:
|
|
||||||
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
||||||
*/
|
|
||||||
var byteToHex = [];
|
|
||||||
for (var i = 0; i < 256; ++i) {
|
|
||||||
byteToHex[i] = (i + 0x100).toString(16).substr(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
function bytesToUuid(buf, offset) {
|
|
||||||
var i = offset || 0;
|
|
||||||
var bth = byteToHex;
|
|
||||||
// join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
|
|
||||||
return ([
|
|
||||||
bth[buf[i++]], bth[buf[i++]],
|
|
||||||
bth[buf[i++]], bth[buf[i++]], '-',
|
|
||||||
bth[buf[i++]], bth[buf[i++]], '-',
|
|
||||||
bth[buf[i++]], bth[buf[i++]], '-',
|
|
||||||
bth[buf[i++]], bth[buf[i++]], '-',
|
|
||||||
bth[buf[i++]], bth[buf[i++]],
|
|
||||||
bth[buf[i++]], bth[buf[i++]],
|
|
||||||
bth[buf[i++]], bth[buf[i++]]
|
|
||||||
]).join('');
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = bytesToUuid;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 59566:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
// Unique ID creation requires a high quality random # generator. In node.js
|
|
||||||
// this is pretty straight-forward - we use the crypto API.
|
|
||||||
|
|
||||||
var crypto = __nccwpck_require__(6113);
|
|
||||||
|
|
||||||
module.exports = function nodeRNG() {
|
|
||||||
return crypto.randomBytes(16);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 87155:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
var rng = __nccwpck_require__(59566);
|
|
||||||
var bytesToUuid = __nccwpck_require__(74328);
|
|
||||||
|
|
||||||
// **`v1()` - Generate time-based UUID**
|
|
||||||
//
|
|
||||||
// Inspired by https://github.com/LiosK/UUID.js
|
|
||||||
// and http://docs.python.org/library/uuid.html
|
|
||||||
|
|
||||||
var _nodeId;
|
|
||||||
var _clockseq;
|
|
||||||
|
|
||||||
// Previous uuid creation time
|
|
||||||
var _lastMSecs = 0;
|
|
||||||
var _lastNSecs = 0;
|
|
||||||
|
|
||||||
// See https://github.com/uuidjs/uuid for API details
|
|
||||||
function v1(options, buf, offset) {
|
|
||||||
var i = buf && offset || 0;
|
|
||||||
var b = buf || [];
|
|
||||||
|
|
||||||
options = options || {};
|
|
||||||
var node = options.node || _nodeId;
|
|
||||||
var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
|
|
||||||
|
|
||||||
// node and clockseq need to be initialized to random values if they're not
|
|
||||||
// specified. We do this lazily to minimize issues related to insufficient
|
|
||||||
// system entropy. See #189
|
|
||||||
if (node == null || clockseq == null) {
|
|
||||||
var seedBytes = rng();
|
|
||||||
if (node == null) {
|
|
||||||
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
|
|
||||||
node = _nodeId = [
|
|
||||||
seedBytes[0] | 0x01,
|
|
||||||
seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
|
|
||||||
];
|
|
||||||
}
|
|
||||||
if (clockseq == null) {
|
|
||||||
// Per 4.2.2, randomize (14 bit) clockseq
|
|
||||||
clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// UUID timestamps are 100 nano-second units since the Gregorian epoch,
|
|
||||||
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
|
|
||||||
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
|
|
||||||
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
|
|
||||||
var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
|
|
||||||
|
|
||||||
// Per 4.2.1.2, use count of uuid's generated during the current clock
|
|
||||||
// cycle to simulate higher resolution clock
|
|
||||||
var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
|
|
||||||
|
|
||||||
// Time since last uuid creation (in msecs)
|
|
||||||
var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
|
|
||||||
|
|
||||||
// Per 4.2.1.2, Bump clockseq on clock regression
|
|
||||||
if (dt < 0 && options.clockseq === undefined) {
|
|
||||||
clockseq = clockseq + 1 & 0x3fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
|
|
||||||
// time interval
|
|
||||||
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
|
|
||||||
nsecs = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Per 4.2.1.2 Throw error if too many uuids are requested
|
|
||||||
if (nsecs >= 10000) {
|
|
||||||
throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
|
|
||||||
}
|
|
||||||
|
|
||||||
_lastMSecs = msecs;
|
|
||||||
_lastNSecs = nsecs;
|
|
||||||
_clockseq = clockseq;
|
|
||||||
|
|
||||||
// Per 4.1.4 - Convert from unix epoch to Gregorian epoch
|
|
||||||
msecs += 12219292800000;
|
|
||||||
|
|
||||||
// `time_low`
|
|
||||||
var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
|
||||||
b[i++] = tl >>> 24 & 0xff;
|
|
||||||
b[i++] = tl >>> 16 & 0xff;
|
|
||||||
b[i++] = tl >>> 8 & 0xff;
|
|
||||||
b[i++] = tl & 0xff;
|
|
||||||
|
|
||||||
// `time_mid`
|
|
||||||
var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
|
|
||||||
b[i++] = tmh >>> 8 & 0xff;
|
|
||||||
b[i++] = tmh & 0xff;
|
|
||||||
|
|
||||||
// `time_high_and_version`
|
|
||||||
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
|
|
||||||
b[i++] = tmh >>> 16 & 0xff;
|
|
||||||
|
|
||||||
// `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
|
|
||||||
b[i++] = clockseq >>> 8 | 0x80;
|
|
||||||
|
|
||||||
// `clock_seq_low`
|
|
||||||
b[i++] = clockseq & 0xff;
|
|
||||||
|
|
||||||
// `node`
|
|
||||||
for (var n = 0; n < 6; ++n) {
|
|
||||||
b[i + n] = node[n];
|
|
||||||
}
|
|
||||||
|
|
||||||
return buf ? buf : bytesToUuid(b);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = v1;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 43515:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
var rng = __nccwpck_require__(59566);
|
|
||||||
var bytesToUuid = __nccwpck_require__(74328);
|
|
||||||
|
|
||||||
function v4(options, buf, offset) {
|
|
||||||
var i = buf && offset || 0;
|
|
||||||
|
|
||||||
if (typeof(options) == 'string') {
|
|
||||||
buf = options === 'binary' ? new Array(16) : null;
|
|
||||||
options = null;
|
|
||||||
}
|
|
||||||
options = options || {};
|
|
||||||
|
|
||||||
var rnds = options.random || (options.rng || rng)();
|
|
||||||
|
|
||||||
// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
||||||
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
|
||||||
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
||||||
|
|
||||||
// Copy bytes to buffer, if provided
|
|
||||||
if (buf) {
|
|
||||||
for (var ii = 0; ii < 16; ++ii) {
|
|
||||||
buf[i + ii] = rnds[ii];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return buf || bytesToUuid(rnds);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = v4;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 5336:
|
/***/ 5336:
|
||||||
@@ -146898,14 +146673,6 @@ module.exports = JSON.parse('{"application/1d-interleaved-parityfec":{"source":"
|
|||||||
"use strict";
|
"use strict";
|
||||||
module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"],[[47,47],"disallowed_STD3_valid"],[[48,57],"valid"],[[58,64],"disallowed_STD3_valid"],[[65,65],"mapped",[97]],[[66,66],"mapped",[98]],[[67,67],"mapped",[99]],[[68,68],"mapped",[100]],[[69,69],"mapped",[101]],[[70,70],"mapped",[102]],[[71,71],"mapped",[103]],[[72,72],"mapped",[104]],[[73,73],"mapped",[105]],[[74,74],"mapped",[106]],[[75,75],"mapped",[107]],[[76,76],"mapped",[108]],[[77,77],"mapped",[109]],[[78,78],"mapped",[110]],[[79,79],"mapped",[111]],[[80,80],"mapped",[112]],[[81,81],"mapped",[113]],[[82,82],"mapped",[114]],[[83,83],"mapped",[115]],[[84,84],"mapped",[116]],[[85,85],"mapped",[117]],[[86,86],"mapped",[118]],[[87,87],"mapped",[119]],[[88,88],"mapped",[120]],[[89,89],"mapped",[121]],[[90,90],"mapped",[122]],[[91,96],"disallowed_STD3_valid"],[[97,122],"valid"],[[123,127],"disallowed_STD3_valid"],[[128,159],"disallowed"],[[160,160],"disallowed_STD3_mapped",[32]],[[161,167],"valid",[],"NV8"],[[168,168],"disallowed_STD3_mapped",[32,776]],[[169,169],"valid",[],"NV8"],[[170,170],"mapped",[97]],[[171,172],"valid",[],"NV8"],[[173,173],"ignored"],[[174,174],"valid",[],"NV8"],[[175,175],"disallowed_STD3_mapped",[32,772]],[[176,177],"valid",[],"NV8"],[[178,178],"mapped",[50]],[[179,179],"mapped",[51]],[[180,180],"disallowed_STD3_mapped",[32,769]],[[181,181],"mapped",[956]],[[182,182],"valid",[],"NV8"],[[183,183],"valid"],[[184,184],"disallowed_STD3_mapped",[32,807]],[[185,185],"mapped",[49]],[[186,186],"mapped",[111]],[[187,187],"valid",[],"NV8"],[[188,188],"mapped",[49,8260,52]],[[189,189],"mapped",[49,8260,50]],[[190,190],"mapped",[51,8260,52]],[[191,191],"valid",[],"NV8"],[[192,192],"mapped",[224]],[[193,193],"mapped",[225]],[[194,194],"mapped",[226]],[[195,195],"mapped",[227]],[[196,196],"mapped",[228]],[[197,197],"mapped",[229]],[[198,198],"mapped",[230]],[[199,199],"mapped",[231]],[[200,200],"mapped",[232]],[[201,201],"mapped",[233]],[[202,202],"mapped",[234]],[[203,203],"mapped",[235]],[[204,204],"mapped",[236]],[[205,205],"mapped",[237]],[[206,206],"mapped",[238]],[[207,207],"mapped",[239]],[[208,208],"mapped",[240]],[[209,209],"mapped",[241]],[[210,210],"mapped",[242]],[[211,211],"mapped",[243]],[[212,212],"mapped",[244]],[[213,213],"mapped",[245]],[[214,214],"mapped",[246]],[[215,215],"valid",[],"NV8"],[[216,216],"mapped",[248]],[[217,217],"mapped",[249]],[[218,218],"mapped",[250]],[[219,219],"mapped",[251]],[[220,220],"mapped",[252]],[[221,221],"mapped",[253]],[[222,222],"mapped",[254]],[[223,223],"deviation",[115,115]],[[224,246],"valid"],[[247,247],"valid",[],"NV8"],[[248,255],"valid"],[[256,256],"mapped",[257]],[[257,257],"valid"],[[258,258],"mapped",[259]],[[259,259],"valid"],[[260,260],"mapped",[261]],[[261,261],"valid"],[[262,262],"mapped",[263]],[[263,263],"valid"],[[264,264],"mapped",[265]],[[265,265],"valid"],[[266,266],"mapped",[267]],[[267,267],"valid"],[[268,268],"mapped",[269]],[[269,269],"valid"],[[270,270],"mapped",[271]],[[271,271],"valid"],[[272,272],"mapped",[273]],[[273,273],"valid"],[[274,274],"mapped",[275]],[[275,275],"valid"],[[276,276],"mapped",[277]],[[277,277],"valid"],[[278,278],"mapped",[279]],[[279,279],"valid"],[[280,280],"mapped",[281]],[[281,281],"valid"],[[282,282],"mapped",[283]],[[283,283],"valid"],[[284,284],"mapped",[285]],[[285,285],"valid"],[[286,286],"mapped",[287]],[[287,287],"valid"],[[288,288],"mapped",[289]],[[289,289],"valid"],[[290,290],"mapped",[291]],[[291,291],"valid"],[[292,292],"mapped",[293]],[[293,293],"valid"],[[294,294],"mapped",[295]],[[295,295],"valid"],[[296,296],"mapped",[297]],[[297,297],"valid"],[[298,298],"mapped",[299]],[[299,299],"valid"],[[300,300],"mapped",[301]],[[301,301],"valid"],[[302,302],"mapped",[303]],[[303,303],"valid"],[[304,304],"mapped",[105,775]],[[305,305],"valid"],[[306,307],"mapped",[105,106]],[[308,308],"mapped",[309]],[[309,309],"valid"],[[310,310],"mapped",[311]],[[311,312],"valid"],[[313,313],"mapped",[314]],[[314,314],"valid"],[[315,315],"mapped",[316]],[[316,316],"valid"],[[317,317],"mapped",[318]],[[318,318],"valid"],[[319,320],"mapped",[108,183]],[[321,321],"mapped",[322]],[[322,322],"valid"],[[323,323],"mapped",[324]],[[324,324],"valid"],[[325,325],"mapped",[326]],[[326,326],"valid"],[[327,327],"mapped",[328]],[[328,328],"valid"],[[329,329],"mapped",[700,110]],[[330,330],"mapped",[331]],[[331,331],"valid"],[[332,332],"mapped",[333]],[[333,333],"valid"],[[334,334],"mapped",[335]],[[335,335],"valid"],[[336,336],"mapped",[337]],[[337,337],"valid"],[[338,338],"mapped",[339]],[[339,339],"valid"],[[340,340],"mapped",[341]],[[341,341],"valid"],[[342,342],"mapped",[343]],[[343,343],"valid"],[[344,344],"mapped",[345]],[[345,345],"valid"],[[346,346],"mapped",[347]],[[347,347],"valid"],[[348,348],"mapped",[349]],[[349,349],"valid"],[[350,350],"mapped",[351]],[[351,351],"valid"],[[352,352],"mapped",[353]],[[353,353],"valid"],[[354,354],"mapped",[355]],[[355,355],"valid"],[[356,356],"mapped",[357]],[[357,357],"valid"],[[358,358],"mappLine truncated
|
module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"],[[47,47],"disallowed_STD3_valid"],[[48,57],"valid"],[[58,64],"disallowed_STD3_valid"],[[65,65],"mapped",[97]],[[66,66],"mapped",[98]],[[67,67],"mapped",[99]],[[68,68],"mapped",[100]],[[69,69],"mapped",[101]],[[70,70],"mapped",[102]],[[71,71],"mapped",[103]],[[72,72],"mapped",[104]],[[73,73],"mapped",[105]],[[74,74],"mapped",[106]],[[75,75],"mapped",[107]],[[76,76],"mapped",[108]],[[77,77],"mapped",[109]],[[78,78],"mapped",[110]],[[79,79],"mapped",[111]],[[80,80],"mapped",[112]],[[81,81],"mapped",[113]],[[82,82],"mapped",[114]],[[83,83],"mapped",[115]],[[84,84],"mapped",[116]],[[85,85],"mapped",[117]],[[86,86],"mapped",[118]],[[87,87],"mapped",[119]],[[88,88],"mapped",[120]],[[89,89],"mapped",[121]],[[90,90],"mapped",[122]],[[91,96],"disallowed_STD3_valid"],[[97,122],"valid"],[[123,127],"disallowed_STD3_valid"],[[128,159],"disallowed"],[[160,160],"disallowed_STD3_mapped",[32]],[[161,167],"valid",[],"NV8"],[[168,168],"disallowed_STD3_mapped",[32,776]],[[169,169],"valid",[],"NV8"],[[170,170],"mapped",[97]],[[171,172],"valid",[],"NV8"],[[173,173],"ignored"],[[174,174],"valid",[],"NV8"],[[175,175],"disallowed_STD3_mapped",[32,772]],[[176,177],"valid",[],"NV8"],[[178,178],"mapped",[50]],[[179,179],"mapped",[51]],[[180,180],"disallowed_STD3_mapped",[32,769]],[[181,181],"mapped",[956]],[[182,182],"valid",[],"NV8"],[[183,183],"valid"],[[184,184],"disallowed_STD3_mapped",[32,807]],[[185,185],"mapped",[49]],[[186,186],"mapped",[111]],[[187,187],"valid",[],"NV8"],[[188,188],"mapped",[49,8260,52]],[[189,189],"mapped",[49,8260,50]],[[190,190],"mapped",[51,8260,52]],[[191,191],"valid",[],"NV8"],[[192,192],"mapped",[224]],[[193,193],"mapped",[225]],[[194,194],"mapped",[226]],[[195,195],"mapped",[227]],[[196,196],"mapped",[228]],[[197,197],"mapped",[229]],[[198,198],"mapped",[230]],[[199,199],"mapped",[231]],[[200,200],"mapped",[232]],[[201,201],"mapped",[233]],[[202,202],"mapped",[234]],[[203,203],"mapped",[235]],[[204,204],"mapped",[236]],[[205,205],"mapped",[237]],[[206,206],"mapped",[238]],[[207,207],"mapped",[239]],[[208,208],"mapped",[240]],[[209,209],"mapped",[241]],[[210,210],"mapped",[242]],[[211,211],"mapped",[243]],[[212,212],"mapped",[244]],[[213,213],"mapped",[245]],[[214,214],"mapped",[246]],[[215,215],"valid",[],"NV8"],[[216,216],"mapped",[248]],[[217,217],"mapped",[249]],[[218,218],"mapped",[250]],[[219,219],"mapped",[251]],[[220,220],"mapped",[252]],[[221,221],"mapped",[253]],[[222,222],"mapped",[254]],[[223,223],"deviation",[115,115]],[[224,246],"valid"],[[247,247],"valid",[],"NV8"],[[248,255],"valid"],[[256,256],"mapped",[257]],[[257,257],"valid"],[[258,258],"mapped",[259]],[[259,259],"valid"],[[260,260],"mapped",[261]],[[261,261],"valid"],[[262,262],"mapped",[263]],[[263,263],"valid"],[[264,264],"mapped",[265]],[[265,265],"valid"],[[266,266],"mapped",[267]],[[267,267],"valid"],[[268,268],"mapped",[269]],[[269,269],"valid"],[[270,270],"mapped",[271]],[[271,271],"valid"],[[272,272],"mapped",[273]],[[273,273],"valid"],[[274,274],"mapped",[275]],[[275,275],"valid"],[[276,276],"mapped",[277]],[[277,277],"valid"],[[278,278],"mapped",[279]],[[279,279],"valid"],[[280,280],"mapped",[281]],[[281,281],"valid"],[[282,282],"mapped",[283]],[[283,283],"valid"],[[284,284],"mapped",[285]],[[285,285],"valid"],[[286,286],"mapped",[287]],[[287,287],"valid"],[[288,288],"mapped",[289]],[[289,289],"valid"],[[290,290],"mapped",[291]],[[291,291],"valid"],[[292,292],"mapped",[293]],[[293,293],"valid"],[[294,294],"mapped",[295]],[[295,295],"valid"],[[296,296],"mapped",[297]],[[297,297],"valid"],[[298,298],"mapped",[299]],[[299,299],"valid"],[[300,300],"mapped",[301]],[[301,301],"valid"],[[302,302],"mapped",[303]],[[303,303],"valid"],[[304,304],"mapped",[105,775]],[[305,305],"valid"],[[306,307],"mapped",[105,106]],[[308,308],"mapped",[309]],[[309,309],"valid"],[[310,310],"mapped",[311]],[[311,312],"valid"],[[313,313],"mapped",[314]],[[314,314],"valid"],[[315,315],"mapped",[316]],[[316,316],"valid"],[[317,317],"mapped",[318]],[[318,318],"valid"],[[319,320],"mapped",[108,183]],[[321,321],"mapped",[322]],[[322,322],"valid"],[[323,323],"mapped",[324]],[[324,324],"valid"],[[325,325],"mapped",[326]],[[326,326],"valid"],[[327,327],"mapped",[328]],[[328,328],"valid"],[[329,329],"mapped",[700,110]],[[330,330],"mapped",[331]],[[331,331],"valid"],[[332,332],"mapped",[333]],[[333,333],"valid"],[[334,334],"mapped",[335]],[[335,335],"valid"],[[336,336],"mapped",[337]],[[337,337],"valid"],[[338,338],"mapped",[339]],[[339,339],"valid"],[[340,340],"mapped",[341]],[[341,341],"valid"],[[342,342],"mapped",[343]],[[343,343],"valid"],[[344,344],"mapped",[345]],[[345,345],"valid"],[[346,346],"mapped",[347]],[[347,347],"valid"],[[348,348],"mapped",[349]],[[349,349],"valid"],[[350,350],"mapped",[351]],[[351,351],"valid"],[[352,352],"mapped",[353]],[[353,353],"valid"],[[354,354],"mapped",[355]],[[355,355],"valid"],[[356,356],"mapped",[357]],[[357,357],"valid"],[[358,358],"mappLine truncated
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 3918:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
module.exports = JSON.parse('{"name":"@actions/cache","version":"3.2.4","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.10.0","@actions/artifact":"^2.1.7","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","semver":"^6.3.1"},"devDependencies":{"@types/semver":"^6.0.0","typescript":"^5.2.2"}}');
|
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
/******/ });
|
/******/ });
|
||||||
|
|||||||
Vendored
+154
-387
@@ -27687,10 +27687,8 @@ const cacheHttpClient = __importStar(__nccwpck_require__(42370));
|
|||||||
const cacheTwirpClient = __importStar(__nccwpck_require__(95451));
|
const cacheTwirpClient = __importStar(__nccwpck_require__(95451));
|
||||||
const tar_1 = __nccwpck_require__(49099);
|
const tar_1 = __nccwpck_require__(49099);
|
||||||
const upload_cache_1 = __nccwpck_require__(47107);
|
const upload_cache_1 = __nccwpck_require__(47107);
|
||||||
const download_cache_1 = __nccwpck_require__(9049);
|
|
||||||
const upload_zip_specification_1 = __nccwpck_require__(77643);
|
|
||||||
const zip_1 = __nccwpck_require__(26699);
|
|
||||||
const util_1 = __nccwpck_require__(49196);
|
const util_1 = __nccwpck_require__(49196);
|
||||||
|
const constants_1 = __nccwpck_require__(74010);
|
||||||
class ValidationError extends Error {
|
class ValidationError extends Error {
|
||||||
constructor(message) {
|
constructor(message) {
|
||||||
super(message);
|
super(message);
|
||||||
@@ -27744,7 +27742,7 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
checkPaths(paths);
|
checkPaths(paths);
|
||||||
const cacheServiceVersion = config.getCacheServiceVersion();
|
const cacheServiceVersion = config.getCacheServiceVersion();
|
||||||
console.debug(`Cache Service Version: ${cacheServiceVersion}`);
|
console.debug(`Cache service version: ${cacheServiceVersion}`);
|
||||||
switch (cacheServiceVersion) {
|
switch (cacheServiceVersion) {
|
||||||
case "v2":
|
case "v2":
|
||||||
return yield restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive);
|
return yield restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive);
|
||||||
@@ -27755,6 +27753,16 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.restoreCache = restoreCache;
|
exports.restoreCache = restoreCache;
|
||||||
|
/**
|
||||||
|
* Restores cache using the legacy Cache Service
|
||||||
|
*
|
||||||
|
* @param paths
|
||||||
|
* @param primaryKey
|
||||||
|
* @param restoreKeys
|
||||||
|
* @param options
|
||||||
|
* @param enableCrossOsArchive
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
function restoreCachev1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
function restoreCachev1(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
restoreKeys = restoreKeys || [];
|
restoreKeys = restoreKeys || [];
|
||||||
@@ -27818,6 +27826,16 @@ function restoreCachev1(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
|||||||
return undefined;
|
return undefined;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Restores cache using the new Cache Service
|
||||||
|
*
|
||||||
|
* @param paths a list of file paths to restore from the cache
|
||||||
|
* @param primaryKey an explicit key for restoring the cache
|
||||||
|
* @param restoreKeys an optional ordered list of keys to use for restoring the cache if no cache hit occurred for key
|
||||||
|
* @param downloadOptions cache download options
|
||||||
|
* @param enableCrossOsArchive an optional boolean enabled to restore on windows any cache created on any platform
|
||||||
|
* @returns string returns the key for the cache hit, otherwise returns undefined
|
||||||
|
*/
|
||||||
function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
restoreKeys = restoreKeys || [];
|
restoreKeys = restoreKeys || [];
|
||||||
@@ -27830,11 +27848,12 @@ function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
|||||||
for (const key of keys) {
|
for (const key of keys) {
|
||||||
checkKey(key);
|
checkKey(key);
|
||||||
}
|
}
|
||||||
|
let archivePath = '';
|
||||||
try {
|
try {
|
||||||
|
const twirpClient = cacheTwirpClient.internalCacheTwirpClient();
|
||||||
// BackendIds are retrieved form the signed JWT
|
// BackendIds are retrieved form the signed JWT
|
||||||
const backendIds = (0, util_1.getBackendIdsFromToken)();
|
const backendIds = (0, util_1.getBackendIdsFromToken)();
|
||||||
const compressionMethod = yield utils.getCompressionMethod();
|
const compressionMethod = yield utils.getCompressionMethod();
|
||||||
const twirpClient = cacheTwirpClient.internalCacheTwirpClient();
|
|
||||||
const request = {
|
const request = {
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
@@ -27842,22 +27861,44 @@ function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
|
|||||||
restoreKeys: restoreKeys,
|
restoreKeys: restoreKeys,
|
||||||
version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive),
|
version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive),
|
||||||
};
|
};
|
||||||
|
console.debug(`GetCacheEntryDownloadURLRequest: ${JSON.stringify(twirpClient)}`);
|
||||||
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
const response = yield twirpClient.GetCacheEntryDownloadURL(request);
|
||||||
core.info(`GetCacheEntryDownloadURLResponse: ${JSON.stringify(response)}`);
|
core.debug(`GetCacheEntryDownloadURLResponse: ${JSON.stringify(response)}`);
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
// Cache not found
|
// Cache not found
|
||||||
core.warning(`Cache not found for keys: ${keys.join(', ')}`);
|
core.warning(`Cache not found for keys: ${keys.join(', ')}`);
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
core.info(`Cache hit for: ${request.key}`);
|
core.info(`Cache hit for: ${request.key}`);
|
||||||
core.info(`Starting download of artifact to: ${paths[0]}`);
|
if (options === null || options === void 0 ? void 0 : options.lookupOnly) {
|
||||||
yield (0, download_cache_1.StreamExtract)(response.signedDownloadUrl, path.dirname(paths[0]));
|
core.info('Lookup only - skipping download');
|
||||||
core.info(`Artifact download completed successfully.`);
|
return request.key;
|
||||||
return keys[0];
|
}
|
||||||
|
archivePath = path.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod));
|
||||||
|
core.debug(`Archive path: ${archivePath}`);
|
||||||
|
if (core.isDebug()) {
|
||||||
|
yield (0, tar_1.listTar)(archivePath, compressionMethod);
|
||||||
|
}
|
||||||
|
core.debug(`Starting download of artifact to: ${archivePath}`);
|
||||||
|
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||||
|
core.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`);
|
||||||
|
// Download the cache from the cache entry
|
||||||
|
yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options);
|
||||||
|
yield (0, tar_1.extractTar)(archivePath, compressionMethod);
|
||||||
|
core.info('Cache restored successfully');
|
||||||
|
return request.key;
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
throw new Error(`Unable to download and extract cache: ${error.message}`);
|
throw new Error(`Unable to download and extract cache: ${error.message}`);
|
||||||
}
|
}
|
||||||
|
finally {
|
||||||
|
try {
|
||||||
|
yield utils.unlinkFile(archivePath);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.debug(`Failed to delete archive: ${error}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -27885,6 +27926,15 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.saveCache = saveCache;
|
exports.saveCache = saveCache;
|
||||||
|
/**
|
||||||
|
* Save cache using the legacy Cache Service
|
||||||
|
*
|
||||||
|
* @param paths
|
||||||
|
* @param key
|
||||||
|
* @param options
|
||||||
|
* @param enableCrossOsArchive
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
function saveCachev1(paths, key, options, enableCrossOsArchive = false) {
|
function saveCachev1(paths, key, options, enableCrossOsArchive = false) {
|
||||||
var _a, _b, _c, _d, _e;
|
var _a, _b, _c, _d, _e;
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
@@ -27953,51 +28003,88 @@ function saveCachev1(paths, key, options, enableCrossOsArchive = false) {
|
|||||||
return cacheId;
|
return cacheId;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Save cache using the new Cache Service
|
||||||
|
*
|
||||||
|
* @param paths
|
||||||
|
* @param key
|
||||||
|
* @param options
|
||||||
|
* @param enableCrossOsArchive
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
function saveCachev2(paths, key, options, enableCrossOsArchive = false) {
|
function saveCachev2(paths, key, options, enableCrossOsArchive = false) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
// BackendIds are retrieved form the signed JWT
|
// BackendIds are retrieved form the signed JWT
|
||||||
const backendIds = (0, util_1.getBackendIdsFromToken)();
|
const backendIds = (0, util_1.getBackendIdsFromToken)();
|
||||||
const compressionMethod = yield utils.getCompressionMethod();
|
const compressionMethod = yield utils.getCompressionMethod();
|
||||||
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
|
|
||||||
const twirpClient = cacheTwirpClient.internalCacheTwirpClient();
|
const twirpClient = cacheTwirpClient.internalCacheTwirpClient();
|
||||||
const request = {
|
let cacheId = -1;
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
const cachePaths = yield utils.resolvePaths(paths);
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
core.debug('Cache Paths:');
|
||||||
key: key,
|
core.debug(`${JSON.stringify(cachePaths)}`);
|
||||||
version: version
|
if (cachePaths.length === 0) {
|
||||||
};
|
throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`);
|
||||||
const response = yield twirpClient.CreateCacheEntry(request);
|
|
||||||
core.info(`CreateCacheEntryResponse: ${JSON.stringify(response)}`);
|
|
||||||
// Archive
|
|
||||||
// We're going to handle 1 path fow now. This needs to be fixed to handle all
|
|
||||||
// paths passed in.
|
|
||||||
const rootDir = path.dirname(paths[0]);
|
|
||||||
const zipSpecs = (0, upload_zip_specification_1.getUploadZipSpecification)(paths, rootDir);
|
|
||||||
if (zipSpecs.length === 0) {
|
|
||||||
throw new Error(`Error with zip specs: ${zipSpecs.flatMap(s => (s.sourcePath ? [s.sourcePath] : [])).join(', ')}`);
|
|
||||||
}
|
}
|
||||||
// 0: No compression
|
const archiveFolder = yield utils.createTempDirectory();
|
||||||
// 1: Best speed
|
const archivePath = path.join(archiveFolder, utils.getCacheFileName(compressionMethod));
|
||||||
// 6: Default compression (same as GNU Gzip)
|
core.debug(`Archive Path: ${archivePath}`);
|
||||||
// 9: Best compression Higher levels will result in better compression, but will take longer to complete. For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads.
|
try {
|
||||||
const zipUploadStream = yield (0, zip_1.createZipUploadStream)(zipSpecs, 6);
|
yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod);
|
||||||
// Cache v2 upload
|
if (core.isDebug()) {
|
||||||
// inputs:
|
yield (0, tar_1.listTar)(archivePath, compressionMethod);
|
||||||
// - getSignedUploadURL
|
}
|
||||||
// - archivePath
|
const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath);
|
||||||
core.info(`Saving Cache v2: ${paths[0]}`);
|
core.debug(`File Size: ${archiveFileSize}`);
|
||||||
yield (0, upload_cache_1.UploadCacheStream)(response.signedUploadUrl, zipUploadStream);
|
// For GHES, this check will take place in ReserveCache API with enterprise file size limit
|
||||||
// Finalize the cache entry
|
if (archiveFileSize > constants_1.CacheFileSizeLimit && !utils.isGhes()) {
|
||||||
const finalizeRequest = {
|
throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`);
|
||||||
workflowRunBackendId: backendIds.workflowRunBackendId,
|
}
|
||||||
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
core.debug('Reserving Cache');
|
||||||
key: key,
|
const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive);
|
||||||
version: version,
|
const request = {
|
||||||
sizeBytes: "1024",
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
};
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
|
key: key,
|
||||||
core.info(`FinalizeCacheEntryUploadResponse: ${JSON.stringify(finalizeResponse)}`);
|
version: version
|
||||||
return 0;
|
};
|
||||||
|
const response = yield twirpClient.CreateCacheEntry(request);
|
||||||
|
core.info(`CreateCacheEntryResponse: ${JSON.stringify(response)}`);
|
||||||
|
// TODO: handle the error cases here
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`);
|
||||||
|
}
|
||||||
|
// TODO: mask the signed upload URL
|
||||||
|
core.debug(`Saving Cache to: ${response.signedUploadUrl}`);
|
||||||
|
yield (0, upload_cache_1.UploadCacheFile)(response.signedUploadUrl, archivePath);
|
||||||
|
const finalizeRequest = {
|
||||||
|
workflowRunBackendId: backendIds.workflowRunBackendId,
|
||||||
|
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
|
||||||
|
key: key,
|
||||||
|
version: version,
|
||||||
|
sizeBytes: `${archiveFileSize}`,
|
||||||
|
};
|
||||||
|
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);
|
||||||
|
core.debug(`FinalizeCacheEntryUploadResponse: ${JSON.stringify(finalizeResponse)}`);
|
||||||
|
if (!finalizeResponse.ok) {
|
||||||
|
throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`);
|
||||||
|
}
|
||||||
|
// TODO: this is not great, we should handle the types without parsing
|
||||||
|
cacheId = parseInt(finalizeResponse.entryId);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
const typedError = error;
|
||||||
|
core.debug(typedError.message);
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
// Try to delete the archive to save space
|
||||||
|
try {
|
||||||
|
yield utils.unlinkFile(archivePath);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.debug(`Failed to delete archive: ${error}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cacheId;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//# sourceMappingURL=cache.js.map
|
//# sourceMappingURL=cache.js.map
|
||||||
@@ -29979,11 +30066,18 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.internalCacheTwirpClient = void 0;
|
exports.internalCacheTwirpClient = void 0;
|
||||||
const http_client_1 = __nccwpck_require__(41283);
|
|
||||||
const auth_1 = __nccwpck_require__(57231);
|
|
||||||
const core_1 = __nccwpck_require__(74850);
|
const core_1 = __nccwpck_require__(74850);
|
||||||
const cache_twirp_1 = __nccwpck_require__(10894);
|
|
||||||
const config_1 = __nccwpck_require__(46490);
|
const config_1 = __nccwpck_require__(46490);
|
||||||
|
const auth_1 = __nccwpck_require__(57231);
|
||||||
|
const http_client_1 = __nccwpck_require__(41283);
|
||||||
|
const cache_twirp_1 = __nccwpck_require__(10894);
|
||||||
|
/**
|
||||||
|
* This class is a wrapper around the CacheServiceClientJSON class generated by Twirp.
|
||||||
|
*
|
||||||
|
* It adds retry logic to the request method, which is not present in the generated client.
|
||||||
|
*
|
||||||
|
* This class is used to interact with cache service v2.
|
||||||
|
*/
|
||||||
class CacheServiceClient {
|
class CacheServiceClient {
|
||||||
constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) {
|
constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) {
|
||||||
this.maxAttempts = 5;
|
this.maxAttempts = 5;
|
||||||
@@ -30170,12 +30264,11 @@ const core = __importStar(__nccwpck_require__(74850));
|
|||||||
const exec = __importStar(__nccwpck_require__(40309));
|
const exec = __importStar(__nccwpck_require__(40309));
|
||||||
const glob = __importStar(__nccwpck_require__(79590));
|
const glob = __importStar(__nccwpck_require__(79590));
|
||||||
const io = __importStar(__nccwpck_require__(50074));
|
const io = __importStar(__nccwpck_require__(50074));
|
||||||
|
const crypto = __importStar(__nccwpck_require__(6113));
|
||||||
const fs = __importStar(__nccwpck_require__(57147));
|
const fs = __importStar(__nccwpck_require__(57147));
|
||||||
const path = __importStar(__nccwpck_require__(71017));
|
const path = __importStar(__nccwpck_require__(71017));
|
||||||
const semver = __importStar(__nccwpck_require__(33910));
|
const semver = __importStar(__nccwpck_require__(33910));
|
||||||
const util = __importStar(__nccwpck_require__(73837));
|
const util = __importStar(__nccwpck_require__(73837));
|
||||||
const uuid_1 = __nccwpck_require__(21966);
|
|
||||||
const crypto = __importStar(__nccwpck_require__(6113));
|
|
||||||
const constants_1 = __nccwpck_require__(74010);
|
const constants_1 = __nccwpck_require__(74010);
|
||||||
const versionSalt = '1.0';
|
const versionSalt = '1.0';
|
||||||
// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23
|
// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23
|
||||||
@@ -30199,7 +30292,7 @@ function createTempDirectory() {
|
|||||||
}
|
}
|
||||||
tempDirectory = path.join(baseLocation, 'actions', 'temp');
|
tempDirectory = path.join(baseLocation, 'actions', 'temp');
|
||||||
}
|
}
|
||||||
const dest = path.join(tempDirectory, (0, uuid_1.v4)());
|
const dest = path.join(tempDirectory, crypto.randomUUID());
|
||||||
yield io.mkdirP(dest);
|
yield io.mkdirP(dest);
|
||||||
return dest;
|
return dest;
|
||||||
});
|
});
|
||||||
@@ -30359,6 +30452,7 @@ function getRuntimeToken() {
|
|||||||
return token;
|
return token;
|
||||||
}
|
}
|
||||||
exports.getRuntimeToken = getRuntimeToken;
|
exports.getRuntimeToken = getRuntimeToken;
|
||||||
|
// TODO: Use the feature flag to determine the cache service version
|
||||||
function getCacheServiceVersion() {
|
function getCacheServiceVersion() {
|
||||||
return process.env['ACTIONS_CACHE_SERVICE_VERSION'] || 'v1';
|
return process.env['ACTIONS_CACHE_SERVICE_VERSION'] || 'v1';
|
||||||
}
|
}
|
||||||
@@ -30385,7 +30479,7 @@ exports.getCacheServiceURL = getCacheServiceURL;
|
|||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||||
exports.ManifestFilename = exports.TarFilename = exports.SystemTarPathOnWindows = exports.GnuTarPathOnWindows = exports.SocketTimeout = exports.DefaultRetryDelay = exports.DefaultRetryAttempts = exports.ArchiveToolType = exports.CompressionMethod = exports.CacheFilename = void 0;
|
exports.CacheFileSizeLimit = exports.ManifestFilename = exports.TarFilename = exports.SystemTarPathOnWindows = exports.GnuTarPathOnWindows = exports.SocketTimeout = exports.DefaultRetryDelay = exports.DefaultRetryAttempts = exports.ArchiveToolType = exports.CompressionMethod = exports.CacheFilename = void 0;
|
||||||
var CacheFilename;
|
var CacheFilename;
|
||||||
(function (CacheFilename) {
|
(function (CacheFilename) {
|
||||||
CacheFilename["Gzip"] = "cache.tgz";
|
CacheFilename["Gzip"] = "cache.tgz";
|
||||||
@@ -30418,6 +30512,7 @@ exports.GnuTarPathOnWindows = `${process.env['PROGRAMFILES']}\\Git\\usr\\bin\\ta
|
|||||||
exports.SystemTarPathOnWindows = `${process.env['SYSTEMDRIVE']}\\Windows\\System32\\tar.exe`;
|
exports.SystemTarPathOnWindows = `${process.env['SYSTEMDRIVE']}\\Windows\\System32\\tar.exe`;
|
||||||
exports.TarFilename = 'cache.tar';
|
exports.TarFilename = 'cache.tar';
|
||||||
exports.ManifestFilename = 'manifest.txt';
|
exports.ManifestFilename = 'manifest.txt';
|
||||||
|
exports.CacheFileSizeLimit = 10 * Math.pow(1024, 3); // 10GiB per repository
|
||||||
//# sourceMappingURL=constants.js.map
|
//# sourceMappingURL=constants.js.map
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
@@ -31230,110 +31325,6 @@ exports.createTar = createTar;
|
|||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 9049:
|
|
||||||
/***/ (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 (mod) {
|
|
||||||
if (mod && mod.__esModule) return mod;
|
|
||||||
var result = {};
|
|
||||||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
||||||
__setModuleDefault(result, mod);
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
||||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
||||||
exports.streamExtractExternal = exports.StreamExtract = void 0;
|
|
||||||
const core = __importStar(__nccwpck_require__(74850));
|
|
||||||
const httpClient = __importStar(__nccwpck_require__(41283));
|
|
||||||
const unzip_stream_1 = __importDefault(__nccwpck_require__(44506));
|
|
||||||
const packageJson = __nccwpck_require__(3918);
|
|
||||||
function StreamExtract(url, directory) {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
let retryCount = 0;
|
|
||||||
while (retryCount < 5) {
|
|
||||||
try {
|
|
||||||
yield streamExtractExternal(url, directory);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
catch (error) {
|
|
||||||
retryCount++;
|
|
||||||
core.info(`Failed to download cache after ${retryCount} retries due to ${error.message}. Retrying in 5 seconds...`);
|
|
||||||
// wait 5 seconds before retrying
|
|
||||||
yield new Promise(resolve => setTimeout(resolve, 5000));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
throw new Error(`Cache download failed after ${retryCount} retries.`);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
exports.StreamExtract = StreamExtract;
|
|
||||||
function streamExtractExternal(url, directory) {
|
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
|
||||||
const client = new httpClient.HttpClient(`@actions/cache-${packageJson.version}`);
|
|
||||||
const response = yield client.get(url);
|
|
||||||
if (response.message.statusCode !== 200) {
|
|
||||||
core.info(`Failed to download cache. HTTP status code: ${response.message.statusCode}`);
|
|
||||||
throw new Error(`Unexpected HTTP response from blob storage: ${response.message.statusCode} ${response.message.statusMessage}`);
|
|
||||||
}
|
|
||||||
const timeout = 30 * 1000; // 30 seconds
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
const timerFn = () => {
|
|
||||||
response.message.destroy(new Error(`Blob storage chunk did not respond in ${timeout}ms`));
|
|
||||||
};
|
|
||||||
const timer = setTimeout(timerFn, timeout);
|
|
||||||
response.message
|
|
||||||
.on('data', () => {
|
|
||||||
timer.refresh();
|
|
||||||
})
|
|
||||||
.on('error', (error) => {
|
|
||||||
core.info(`response.message: Cache download failed: ${error.message}`);
|
|
||||||
clearTimeout(timer);
|
|
||||||
reject(error);
|
|
||||||
})
|
|
||||||
.pipe(unzip_stream_1.default.Extract({ path: directory }))
|
|
||||||
.on('close', () => {
|
|
||||||
clearTimeout(timer);
|
|
||||||
resolve();
|
|
||||||
})
|
|
||||||
.on('error', (error) => {
|
|
||||||
reject(error);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
exports.streamExtractExternal = streamExtractExternal;
|
|
||||||
//# sourceMappingURL=download-cache.js.map
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 47107:
|
/***/ 47107:
|
||||||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
||||||
|
|
||||||
@@ -31452,19 +31443,18 @@ function UploadCacheStream(signedUploadURL, zipUploadStream) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
exports.UploadCacheStream = UploadCacheStream;
|
exports.UploadCacheStream = UploadCacheStream;
|
||||||
function UploadCacheFile(uploadURL, archivePath) {
|
function UploadCacheFile(signedUploadURL, archivePath) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
core.info(`Uploading ${archivePath} to: ${JSON.stringify(uploadURL)}`);
|
|
||||||
// Specify data transfer options
|
// Specify data transfer options
|
||||||
const uploadOptions = {
|
const uploadOptions = {
|
||||||
blockSize: 4 * 1024 * 1024,
|
blockSize: 4 * 1024 * 1024,
|
||||||
concurrency: 2,
|
concurrency: 2,
|
||||||
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
||||||
};
|
};
|
||||||
const blobClient = new storage_blob_1.BlobClient(uploadURL.signedUploadUrl);
|
const blobClient = new storage_blob_1.BlobClient(signedUploadURL);
|
||||||
const blockBlobClient = blobClient.getBlockBlobClient();
|
const blockBlobClient = blobClient.getBlockBlobClient();
|
||||||
core.info(`BlobClient: ${JSON.stringify(blobClient)}`);
|
core.debug(`BlobClient: ${JSON.stringify(blobClient)}`);
|
||||||
core.info(`blockBlobClient: ${JSON.stringify(blockBlobClient)}`);
|
core.debug(`blockBlobClient: ${JSON.stringify(blockBlobClient)}`);
|
||||||
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -127899,221 +127889,6 @@ exports.Extract = __nccwpck_require__(32851);
|
|||||||
module.exports = __nccwpck_require__(73837).deprecate;
|
module.exports = __nccwpck_require__(73837).deprecate;
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 21966:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
var v1 = __nccwpck_require__(87155);
|
|
||||||
var v4 = __nccwpck_require__(43515);
|
|
||||||
|
|
||||||
var uuid = v4;
|
|
||||||
uuid.v1 = v1;
|
|
||||||
uuid.v4 = v4;
|
|
||||||
|
|
||||||
module.exports = uuid;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 74328:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert array of 16 byte values to UUID string format of the form:
|
|
||||||
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
||||||
*/
|
|
||||||
var byteToHex = [];
|
|
||||||
for (var i = 0; i < 256; ++i) {
|
|
||||||
byteToHex[i] = (i + 0x100).toString(16).substr(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
function bytesToUuid(buf, offset) {
|
|
||||||
var i = offset || 0;
|
|
||||||
var bth = byteToHex;
|
|
||||||
// join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
|
|
||||||
return ([
|
|
||||||
bth[buf[i++]], bth[buf[i++]],
|
|
||||||
bth[buf[i++]], bth[buf[i++]], '-',
|
|
||||||
bth[buf[i++]], bth[buf[i++]], '-',
|
|
||||||
bth[buf[i++]], bth[buf[i++]], '-',
|
|
||||||
bth[buf[i++]], bth[buf[i++]], '-',
|
|
||||||
bth[buf[i++]], bth[buf[i++]],
|
|
||||||
bth[buf[i++]], bth[buf[i++]],
|
|
||||||
bth[buf[i++]], bth[buf[i++]]
|
|
||||||
]).join('');
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = bytesToUuid;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 59566:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
// Unique ID creation requires a high quality random # generator. In node.js
|
|
||||||
// this is pretty straight-forward - we use the crypto API.
|
|
||||||
|
|
||||||
var crypto = __nccwpck_require__(6113);
|
|
||||||
|
|
||||||
module.exports = function nodeRNG() {
|
|
||||||
return crypto.randomBytes(16);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 87155:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
var rng = __nccwpck_require__(59566);
|
|
||||||
var bytesToUuid = __nccwpck_require__(74328);
|
|
||||||
|
|
||||||
// **`v1()` - Generate time-based UUID**
|
|
||||||
//
|
|
||||||
// Inspired by https://github.com/LiosK/UUID.js
|
|
||||||
// and http://docs.python.org/library/uuid.html
|
|
||||||
|
|
||||||
var _nodeId;
|
|
||||||
var _clockseq;
|
|
||||||
|
|
||||||
// Previous uuid creation time
|
|
||||||
var _lastMSecs = 0;
|
|
||||||
var _lastNSecs = 0;
|
|
||||||
|
|
||||||
// See https://github.com/uuidjs/uuid for API details
|
|
||||||
function v1(options, buf, offset) {
|
|
||||||
var i = buf && offset || 0;
|
|
||||||
var b = buf || [];
|
|
||||||
|
|
||||||
options = options || {};
|
|
||||||
var node = options.node || _nodeId;
|
|
||||||
var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
|
|
||||||
|
|
||||||
// node and clockseq need to be initialized to random values if they're not
|
|
||||||
// specified. We do this lazily to minimize issues related to insufficient
|
|
||||||
// system entropy. See #189
|
|
||||||
if (node == null || clockseq == null) {
|
|
||||||
var seedBytes = rng();
|
|
||||||
if (node == null) {
|
|
||||||
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
|
|
||||||
node = _nodeId = [
|
|
||||||
seedBytes[0] | 0x01,
|
|
||||||
seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
|
|
||||||
];
|
|
||||||
}
|
|
||||||
if (clockseq == null) {
|
|
||||||
// Per 4.2.2, randomize (14 bit) clockseq
|
|
||||||
clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// UUID timestamps are 100 nano-second units since the Gregorian epoch,
|
|
||||||
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
|
|
||||||
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
|
|
||||||
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
|
|
||||||
var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
|
|
||||||
|
|
||||||
// Per 4.2.1.2, use count of uuid's generated during the current clock
|
|
||||||
// cycle to simulate higher resolution clock
|
|
||||||
var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
|
|
||||||
|
|
||||||
// Time since last uuid creation (in msecs)
|
|
||||||
var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
|
|
||||||
|
|
||||||
// Per 4.2.1.2, Bump clockseq on clock regression
|
|
||||||
if (dt < 0 && options.clockseq === undefined) {
|
|
||||||
clockseq = clockseq + 1 & 0x3fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
|
|
||||||
// time interval
|
|
||||||
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
|
|
||||||
nsecs = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Per 4.2.1.2 Throw error if too many uuids are requested
|
|
||||||
if (nsecs >= 10000) {
|
|
||||||
throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
|
|
||||||
}
|
|
||||||
|
|
||||||
_lastMSecs = msecs;
|
|
||||||
_lastNSecs = nsecs;
|
|
||||||
_clockseq = clockseq;
|
|
||||||
|
|
||||||
// Per 4.1.4 - Convert from unix epoch to Gregorian epoch
|
|
||||||
msecs += 12219292800000;
|
|
||||||
|
|
||||||
// `time_low`
|
|
||||||
var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
|
||||||
b[i++] = tl >>> 24 & 0xff;
|
|
||||||
b[i++] = tl >>> 16 & 0xff;
|
|
||||||
b[i++] = tl >>> 8 & 0xff;
|
|
||||||
b[i++] = tl & 0xff;
|
|
||||||
|
|
||||||
// `time_mid`
|
|
||||||
var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
|
|
||||||
b[i++] = tmh >>> 8 & 0xff;
|
|
||||||
b[i++] = tmh & 0xff;
|
|
||||||
|
|
||||||
// `time_high_and_version`
|
|
||||||
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
|
|
||||||
b[i++] = tmh >>> 16 & 0xff;
|
|
||||||
|
|
||||||
// `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
|
|
||||||
b[i++] = clockseq >>> 8 | 0x80;
|
|
||||||
|
|
||||||
// `clock_seq_low`
|
|
||||||
b[i++] = clockseq & 0xff;
|
|
||||||
|
|
||||||
// `node`
|
|
||||||
for (var n = 0; n < 6; ++n) {
|
|
||||||
b[i + n] = node[n];
|
|
||||||
}
|
|
||||||
|
|
||||||
return buf ? buf : bytesToUuid(b);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = v1;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 43515:
|
|
||||||
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
||||||
|
|
||||||
var rng = __nccwpck_require__(59566);
|
|
||||||
var bytesToUuid = __nccwpck_require__(74328);
|
|
||||||
|
|
||||||
function v4(options, buf, offset) {
|
|
||||||
var i = buf && offset || 0;
|
|
||||||
|
|
||||||
if (typeof(options) == 'string') {
|
|
||||||
buf = options === 'binary' ? new Array(16) : null;
|
|
||||||
options = null;
|
|
||||||
}
|
|
||||||
options = options || {};
|
|
||||||
|
|
||||||
var rnds = options.random || (options.rng || rng)();
|
|
||||||
|
|
||||||
// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
||||||
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
|
||||||
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
||||||
|
|
||||||
// Copy bytes to buffer, if provided
|
|
||||||
if (buf) {
|
|
||||||
for (var ii = 0; ii < 16; ++ii) {
|
|
||||||
buf[i + ii] = rnds[ii];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return buf || bytesToUuid(rnds);
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = v4;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 5336:
|
/***/ 5336:
|
||||||
@@ -146898,14 +146673,6 @@ module.exports = JSON.parse('{"application/1d-interleaved-parityfec":{"source":"
|
|||||||
"use strict";
|
"use strict";
|
||||||
module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"],[[47,47],"disallowed_STD3_valid"],[[48,57],"valid"],[[58,64],"disallowed_STD3_valid"],[[65,65],"mapped",[97]],[[66,66],"mapped",[98]],[[67,67],"mapped",[99]],[[68,68],"mapped",[100]],[[69,69],"mapped",[101]],[[70,70],"mapped",[102]],[[71,71],"mapped",[103]],[[72,72],"mapped",[104]],[[73,73],"mapped",[105]],[[74,74],"mapped",[106]],[[75,75],"mapped",[107]],[[76,76],"mapped",[108]],[[77,77],"mapped",[109]],[[78,78],"mapped",[110]],[[79,79],"mapped",[111]],[[80,80],"mapped",[112]],[[81,81],"mapped",[113]],[[82,82],"mapped",[114]],[[83,83],"mapped",[115]],[[84,84],"mapped",[116]],[[85,85],"mapped",[117]],[[86,86],"mapped",[118]],[[87,87],"mapped",[119]],[[88,88],"mapped",[120]],[[89,89],"mapped",[121]],[[90,90],"mapped",[122]],[[91,96],"disallowed_STD3_valid"],[[97,122],"valid"],[[123,127],"disallowed_STD3_valid"],[[128,159],"disallowed"],[[160,160],"disallowed_STD3_mapped",[32]],[[161,167],"valid",[],"NV8"],[[168,168],"disallowed_STD3_mapped",[32,776]],[[169,169],"valid",[],"NV8"],[[170,170],"mapped",[97]],[[171,172],"valid",[],"NV8"],[[173,173],"ignored"],[[174,174],"valid",[],"NV8"],[[175,175],"disallowed_STD3_mapped",[32,772]],[[176,177],"valid",[],"NV8"],[[178,178],"mapped",[50]],[[179,179],"mapped",[51]],[[180,180],"disallowed_STD3_mapped",[32,769]],[[181,181],"mapped",[956]],[[182,182],"valid",[],"NV8"],[[183,183],"valid"],[[184,184],"disallowed_STD3_mapped",[32,807]],[[185,185],"mapped",[49]],[[186,186],"mapped",[111]],[[187,187],"valid",[],"NV8"],[[188,188],"mapped",[49,8260,52]],[[189,189],"mapped",[49,8260,50]],[[190,190],"mapped",[51,8260,52]],[[191,191],"valid",[],"NV8"],[[192,192],"mapped",[224]],[[193,193],"mapped",[225]],[[194,194],"mapped",[226]],[[195,195],"mapped",[227]],[[196,196],"mapped",[228]],[[197,197],"mapped",[229]],[[198,198],"mapped",[230]],[[199,199],"mapped",[231]],[[200,200],"mapped",[232]],[[201,201],"mapped",[233]],[[202,202],"mapped",[234]],[[203,203],"mapped",[235]],[[204,204],"mapped",[236]],[[205,205],"mapped",[237]],[[206,206],"mapped",[238]],[[207,207],"mapped",[239]],[[208,208],"mapped",[240]],[[209,209],"mapped",[241]],[[210,210],"mapped",[242]],[[211,211],"mapped",[243]],[[212,212],"mapped",[244]],[[213,213],"mapped",[245]],[[214,214],"mapped",[246]],[[215,215],"valid",[],"NV8"],[[216,216],"mapped",[248]],[[217,217],"mapped",[249]],[[218,218],"mapped",[250]],[[219,219],"mapped",[251]],[[220,220],"mapped",[252]],[[221,221],"mapped",[253]],[[222,222],"mapped",[254]],[[223,223],"deviation",[115,115]],[[224,246],"valid"],[[247,247],"valid",[],"NV8"],[[248,255],"valid"],[[256,256],"mapped",[257]],[[257,257],"valid"],[[258,258],"mapped",[259]],[[259,259],"valid"],[[260,260],"mapped",[261]],[[261,261],"valid"],[[262,262],"mapped",[263]],[[263,263],"valid"],[[264,264],"mapped",[265]],[[265,265],"valid"],[[266,266],"mapped",[267]],[[267,267],"valid"],[[268,268],"mapped",[269]],[[269,269],"valid"],[[270,270],"mapped",[271]],[[271,271],"valid"],[[272,272],"mapped",[273]],[[273,273],"valid"],[[274,274],"mapped",[275]],[[275,275],"valid"],[[276,276],"mapped",[277]],[[277,277],"valid"],[[278,278],"mapped",[279]],[[279,279],"valid"],[[280,280],"mapped",[281]],[[281,281],"valid"],[[282,282],"mapped",[283]],[[283,283],"valid"],[[284,284],"mapped",[285]],[[285,285],"valid"],[[286,286],"mapped",[287]],[[287,287],"valid"],[[288,288],"mapped",[289]],[[289,289],"valid"],[[290,290],"mapped",[291]],[[291,291],"valid"],[[292,292],"mapped",[293]],[[293,293],"valid"],[[294,294],"mapped",[295]],[[295,295],"valid"],[[296,296],"mapped",[297]],[[297,297],"valid"],[[298,298],"mapped",[299]],[[299,299],"valid"],[[300,300],"mapped",[301]],[[301,301],"valid"],[[302,302],"mapped",[303]],[[303,303],"valid"],[[304,304],"mapped",[105,775]],[[305,305],"valid"],[[306,307],"mapped",[105,106]],[[308,308],"mapped",[309]],[[309,309],"valid"],[[310,310],"mapped",[311]],[[311,312],"valid"],[[313,313],"mapped",[314]],[[314,314],"valid"],[[315,315],"mapped",[316]],[[316,316],"valid"],[[317,317],"mapped",[318]],[[318,318],"valid"],[[319,320],"mapped",[108,183]],[[321,321],"mapped",[322]],[[322,322],"valid"],[[323,323],"mapped",[324]],[[324,324],"valid"],[[325,325],"mapped",[326]],[[326,326],"valid"],[[327,327],"mapped",[328]],[[328,328],"valid"],[[329,329],"mapped",[700,110]],[[330,330],"mapped",[331]],[[331,331],"valid"],[[332,332],"mapped",[333]],[[333,333],"valid"],[[334,334],"mapped",[335]],[[335,335],"valid"],[[336,336],"mapped",[337]],[[337,337],"valid"],[[338,338],"mapped",[339]],[[339,339],"valid"],[[340,340],"mapped",[341]],[[341,341],"valid"],[[342,342],"mapped",[343]],[[343,343],"valid"],[[344,344],"mapped",[345]],[[345,345],"valid"],[[346,346],"mapped",[347]],[[347,347],"valid"],[[348,348],"mapped",[349]],[[349,349],"valid"],[[350,350],"mapped",[351]],[[351,351],"valid"],[[352,352],"mapped",[353]],[[353,353],"valid"],[[354,354],"mapped",[355]],[[355,355],"valid"],[[356,356],"mapped",[357]],[[357,357],"valid"],[[358,358],"mappLine truncated
|
module.exports = JSON.parse('[[[0,44],"disallowed_STD3_valid"],[[45,46],"valid"],[[47,47],"disallowed_STD3_valid"],[[48,57],"valid"],[[58,64],"disallowed_STD3_valid"],[[65,65],"mapped",[97]],[[66,66],"mapped",[98]],[[67,67],"mapped",[99]],[[68,68],"mapped",[100]],[[69,69],"mapped",[101]],[[70,70],"mapped",[102]],[[71,71],"mapped",[103]],[[72,72],"mapped",[104]],[[73,73],"mapped",[105]],[[74,74],"mapped",[106]],[[75,75],"mapped",[107]],[[76,76],"mapped",[108]],[[77,77],"mapped",[109]],[[78,78],"mapped",[110]],[[79,79],"mapped",[111]],[[80,80],"mapped",[112]],[[81,81],"mapped",[113]],[[82,82],"mapped",[114]],[[83,83],"mapped",[115]],[[84,84],"mapped",[116]],[[85,85],"mapped",[117]],[[86,86],"mapped",[118]],[[87,87],"mapped",[119]],[[88,88],"mapped",[120]],[[89,89],"mapped",[121]],[[90,90],"mapped",[122]],[[91,96],"disallowed_STD3_valid"],[[97,122],"valid"],[[123,127],"disallowed_STD3_valid"],[[128,159],"disallowed"],[[160,160],"disallowed_STD3_mapped",[32]],[[161,167],"valid",[],"NV8"],[[168,168],"disallowed_STD3_mapped",[32,776]],[[169,169],"valid",[],"NV8"],[[170,170],"mapped",[97]],[[171,172],"valid",[],"NV8"],[[173,173],"ignored"],[[174,174],"valid",[],"NV8"],[[175,175],"disallowed_STD3_mapped",[32,772]],[[176,177],"valid",[],"NV8"],[[178,178],"mapped",[50]],[[179,179],"mapped",[51]],[[180,180],"disallowed_STD3_mapped",[32,769]],[[181,181],"mapped",[956]],[[182,182],"valid",[],"NV8"],[[183,183],"valid"],[[184,184],"disallowed_STD3_mapped",[32,807]],[[185,185],"mapped",[49]],[[186,186],"mapped",[111]],[[187,187],"valid",[],"NV8"],[[188,188],"mapped",[49,8260,52]],[[189,189],"mapped",[49,8260,50]],[[190,190],"mapped",[51,8260,52]],[[191,191],"valid",[],"NV8"],[[192,192],"mapped",[224]],[[193,193],"mapped",[225]],[[194,194],"mapped",[226]],[[195,195],"mapped",[227]],[[196,196],"mapped",[228]],[[197,197],"mapped",[229]],[[198,198],"mapped",[230]],[[199,199],"mapped",[231]],[[200,200],"mapped",[232]],[[201,201],"mapped",[233]],[[202,202],"mapped",[234]],[[203,203],"mapped",[235]],[[204,204],"mapped",[236]],[[205,205],"mapped",[237]],[[206,206],"mapped",[238]],[[207,207],"mapped",[239]],[[208,208],"mapped",[240]],[[209,209],"mapped",[241]],[[210,210],"mapped",[242]],[[211,211],"mapped",[243]],[[212,212],"mapped",[244]],[[213,213],"mapped",[245]],[[214,214],"mapped",[246]],[[215,215],"valid",[],"NV8"],[[216,216],"mapped",[248]],[[217,217],"mapped",[249]],[[218,218],"mapped",[250]],[[219,219],"mapped",[251]],[[220,220],"mapped",[252]],[[221,221],"mapped",[253]],[[222,222],"mapped",[254]],[[223,223],"deviation",[115,115]],[[224,246],"valid"],[[247,247],"valid",[],"NV8"],[[248,255],"valid"],[[256,256],"mapped",[257]],[[257,257],"valid"],[[258,258],"mapped",[259]],[[259,259],"valid"],[[260,260],"mapped",[261]],[[261,261],"valid"],[[262,262],"mapped",[263]],[[263,263],"valid"],[[264,264],"mapped",[265]],[[265,265],"valid"],[[266,266],"mapped",[267]],[[267,267],"valid"],[[268,268],"mapped",[269]],[[269,269],"valid"],[[270,270],"mapped",[271]],[[271,271],"valid"],[[272,272],"mapped",[273]],[[273,273],"valid"],[[274,274],"mapped",[275]],[[275,275],"valid"],[[276,276],"mapped",[277]],[[277,277],"valid"],[[278,278],"mapped",[279]],[[279,279],"valid"],[[280,280],"mapped",[281]],[[281,281],"valid"],[[282,282],"mapped",[283]],[[283,283],"valid"],[[284,284],"mapped",[285]],[[285,285],"valid"],[[286,286],"mapped",[287]],[[287,287],"valid"],[[288,288],"mapped",[289]],[[289,289],"valid"],[[290,290],"mapped",[291]],[[291,291],"valid"],[[292,292],"mapped",[293]],[[293,293],"valid"],[[294,294],"mapped",[295]],[[295,295],"valid"],[[296,296],"mapped",[297]],[[297,297],"valid"],[[298,298],"mapped",[299]],[[299,299],"valid"],[[300,300],"mapped",[301]],[[301,301],"valid"],[[302,302],"mapped",[303]],[[303,303],"valid"],[[304,304],"mapped",[105,775]],[[305,305],"valid"],[[306,307],"mapped",[105,106]],[[308,308],"mapped",[309]],[[309,309],"valid"],[[310,310],"mapped",[311]],[[311,312],"valid"],[[313,313],"mapped",[314]],[[314,314],"valid"],[[315,315],"mapped",[316]],[[316,316],"valid"],[[317,317],"mapped",[318]],[[318,318],"valid"],[[319,320],"mapped",[108,183]],[[321,321],"mapped",[322]],[[322,322],"valid"],[[323,323],"mapped",[324]],[[324,324],"valid"],[[325,325],"mapped",[326]],[[326,326],"valid"],[[327,327],"mapped",[328]],[[328,328],"valid"],[[329,329],"mapped",[700,110]],[[330,330],"mapped",[331]],[[331,331],"valid"],[[332,332],"mapped",[333]],[[333,333],"valid"],[[334,334],"mapped",[335]],[[335,335],"valid"],[[336,336],"mapped",[337]],[[337,337],"valid"],[[338,338],"mapped",[339]],[[339,339],"valid"],[[340,340],"mapped",[341]],[[341,341],"valid"],[[342,342],"mapped",[343]],[[343,343],"valid"],[[344,344],"mapped",[345]],[[345,345],"valid"],[[346,346],"mapped",[347]],[[347,347],"valid"],[[348,348],"mapped",[349]],[[349,349],"valid"],[[350,350],"mapped",[351]],[[351,351],"valid"],[[352,352],"mapped",[353]],[[353,353],"valid"],[[354,354],"mapped",[355]],[[355,355],"valid"],[[356,356],"mapped",[357]],[[357,357],"valid"],[[358,358],"mappLine truncated
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 3918:
|
|
||||||
/***/ ((module) => {
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
module.exports = JSON.parse('{"name":"@actions/cache","version":"3.2.4","preview":true,"description":"Actions cache lib","keywords":["github","actions","cache"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/cache","license":"MIT","main":"lib/cache.js","types":"lib/cache.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/cache"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"echo \\"Error: run tests from root\\" && exit 1","tsc":"tsc"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.10.0","@actions/artifact":"^2.1.7","@actions/exec":"^1.0.1","@actions/glob":"^0.1.0","@actions/http-client":"^2.1.1","@actions/io":"^1.0.1","@azure/abort-controller":"^1.1.0","@azure/ms-rest-js":"^2.6.0","@azure/storage-blob":"^12.13.0","semver":"^6.3.1"},"devDependencies":{"@types/semver":"^6.0.0","typescript":"^5.2.2"}}');
|
|
||||||
|
|
||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
/******/ });
|
/******/ });
|
||||||
|
|||||||
Generated
+6
-14
@@ -49,27 +49,23 @@
|
|||||||
"@azure/abort-controller": "^1.1.0",
|
"@azure/abort-controller": "^1.1.0",
|
||||||
"@azure/ms-rest-js": "^2.6.0",
|
"@azure/ms-rest-js": "^2.6.0",
|
||||||
"@azure/storage-blob": "^12.13.0",
|
"@azure/storage-blob": "^12.13.0",
|
||||||
"semver": "^6.3.1",
|
"semver": "^6.3.1"
|
||||||
"uuid": "^3.3.3"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/semver": "^6.0.0",
|
"@types/semver": "^6.0.0",
|
||||||
"@types/uuid": "^3.4.5",
|
|
||||||
"typescript": "^5.2.2"
|
"typescript": "^5.2.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"../toolkit/packages/core": {
|
"../toolkit/packages/core": {
|
||||||
"name": "@actions/core",
|
"name": "@actions/core",
|
||||||
"version": "1.10.1",
|
"version": "1.11.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/http-client": "^2.0.1",
|
"@actions/http-client": "^2.0.1"
|
||||||
"uuid": "^8.3.2"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^12.0.2",
|
"@types/node": "^16.18.112"
|
||||||
"@types/uuid": "^8.3.4"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"../toolkit/packages/exec": {
|
"../toolkit/packages/exec": {
|
||||||
@@ -9132,10 +9128,8 @@
|
|||||||
"@azure/ms-rest-js": "^2.6.0",
|
"@azure/ms-rest-js": "^2.6.0",
|
||||||
"@azure/storage-blob": "^12.13.0",
|
"@azure/storage-blob": "^12.13.0",
|
||||||
"@types/semver": "^6.0.0",
|
"@types/semver": "^6.0.0",
|
||||||
"@types/uuid": "^3.4.5",
|
|
||||||
"semver": "^6.3.1",
|
"semver": "^6.3.1",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.2.2"
|
||||||
"uuid": "^3.3.3"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@actions/core": {
|
"@actions/core": {
|
||||||
@@ -9143,9 +9137,7 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/http-client": "^2.0.1",
|
"@actions/http-client": "^2.0.1",
|
||||||
"@types/node": "^12.0.2",
|
"@types/node": "^16.18.112"
|
||||||
"@types/uuid": "^8.3.4",
|
|
||||||
"uuid": "^8.3.2"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@actions/exec": {
|
"@actions/exec": {
|
||||||
|
|||||||
Reference in new issue
Block a user