Upgrade package to resolve security warning & upgrade to latest cache package

This commit is contained in:
Bassem Dghaidi 2024-11-14 04:06:04 -08:00 committed by GitHub
parent 3f69ac8572
commit 4f3aee898d
5 changed files with 38 additions and 48 deletions

View File

@ -12639,7 +12639,6 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
return __awaiter(this, void 0, void 0, function* () {
checkPaths(paths);
const cacheServiceVersion = config.getCacheServiceVersion();
console.debug(`Cache service version: ${cacheServiceVersion}`);
switch (cacheServiceVersion) {
case 'v2':
return yield restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive);
@ -12754,7 +12753,7 @@ function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
workflowRunBackendId: backendIds.workflowRunBackendId,
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
key: primaryKey,
restoreKeys: restoreKeys,
restoreKeys,
version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive)
};
core.debug(`GetCacheEntryDownloadURLRequest: ${JSON.stringify(twirpClient)}`);
@ -12793,7 +12792,6 @@ function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
core.debug(`Failed to delete archive: ${error}`);
}
}
return undefined;
});
}
/**
@ -12810,7 +12808,6 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
checkPaths(paths);
checkKey(key);
const cacheServiceVersion = config.getCacheServiceVersion();
console.debug(`Cache Service Version: ${cacheServiceVersion}`);
switch (cacheServiceVersion) {
case 'v2':
return yield saveCachev2(paths, key, options, enableCrossOsArchive);
@ -12939,8 +12936,8 @@ function saveCachev2(paths, key, options, enableCrossOsArchive = false) {
const request = {
workflowRunBackendId: backendIds.workflowRunBackendId,
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
key: key,
version: version
key,
version
};
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
@ -12951,8 +12948,8 @@ function saveCachev2(paths, key, options, enableCrossOsArchive = false) {
const finalizeRequest = {
workflowRunBackendId: backendIds.workflowRunBackendId,
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
key: key,
version: version,
key,
version,
sizeBytes: `${archiveFileSize}`
};
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);

13
dist/restore/index.js vendored
View File

@ -12639,7 +12639,6 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
return __awaiter(this, void 0, void 0, function* () {
checkPaths(paths);
const cacheServiceVersion = config.getCacheServiceVersion();
console.debug(`Cache service version: ${cacheServiceVersion}`);
switch (cacheServiceVersion) {
case 'v2':
return yield restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive);
@ -12754,7 +12753,7 @@ function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
workflowRunBackendId: backendIds.workflowRunBackendId,
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
key: primaryKey,
restoreKeys: restoreKeys,
restoreKeys,
version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive)
};
core.debug(`GetCacheEntryDownloadURLRequest: ${JSON.stringify(twirpClient)}`);
@ -12793,7 +12792,6 @@ function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
core.debug(`Failed to delete archive: ${error}`);
}
}
return undefined;
});
}
/**
@ -12810,7 +12808,6 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
checkPaths(paths);
checkKey(key);
const cacheServiceVersion = config.getCacheServiceVersion();
console.debug(`Cache Service Version: ${cacheServiceVersion}`);
switch (cacheServiceVersion) {
case 'v2':
return yield saveCachev2(paths, key, options, enableCrossOsArchive);
@ -12939,8 +12936,8 @@ function saveCachev2(paths, key, options, enableCrossOsArchive = false) {
const request = {
workflowRunBackendId: backendIds.workflowRunBackendId,
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
key: key,
version: version
key,
version
};
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
@ -12951,8 +12948,8 @@ function saveCachev2(paths, key, options, enableCrossOsArchive = false) {
const finalizeRequest = {
workflowRunBackendId: backendIds.workflowRunBackendId,
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
key: key,
version: version,
key,
version,
sizeBytes: `${archiveFileSize}`
};
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);

View File

@ -12639,7 +12639,6 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
return __awaiter(this, void 0, void 0, function* () {
checkPaths(paths);
const cacheServiceVersion = config.getCacheServiceVersion();
console.debug(`Cache service version: ${cacheServiceVersion}`);
switch (cacheServiceVersion) {
case 'v2':
return yield restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive);
@ -12754,7 +12753,7 @@ function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
workflowRunBackendId: backendIds.workflowRunBackendId,
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
key: primaryKey,
restoreKeys: restoreKeys,
restoreKeys,
version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive)
};
core.debug(`GetCacheEntryDownloadURLRequest: ${JSON.stringify(twirpClient)}`);
@ -12793,7 +12792,6 @@ function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
core.debug(`Failed to delete archive: ${error}`);
}
}
return undefined;
});
}
/**
@ -12810,7 +12808,6 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
checkPaths(paths);
checkKey(key);
const cacheServiceVersion = config.getCacheServiceVersion();
console.debug(`Cache Service Version: ${cacheServiceVersion}`);
switch (cacheServiceVersion) {
case 'v2':
return yield saveCachev2(paths, key, options, enableCrossOsArchive);
@ -12939,8 +12936,8 @@ function saveCachev2(paths, key, options, enableCrossOsArchive = false) {
const request = {
workflowRunBackendId: backendIds.workflowRunBackendId,
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
key: key,
version: version
key,
version
};
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
@ -12951,8 +12948,8 @@ function saveCachev2(paths, key, options, enableCrossOsArchive = false) {
const finalizeRequest = {
workflowRunBackendId: backendIds.workflowRunBackendId,
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
key: key,
version: version,
key,
version,
sizeBytes: `${archiveFileSize}`
};
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);

13
dist/save/index.js vendored
View File

@ -12639,7 +12639,6 @@ function restoreCache(paths, primaryKey, restoreKeys, options, enableCrossOsArch
return __awaiter(this, void 0, void 0, function* () {
checkPaths(paths);
const cacheServiceVersion = config.getCacheServiceVersion();
console.debug(`Cache service version: ${cacheServiceVersion}`);
switch (cacheServiceVersion) {
case 'v2':
return yield restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsArchive);
@ -12754,7 +12753,7 @@ function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
workflowRunBackendId: backendIds.workflowRunBackendId,
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
key: primaryKey,
restoreKeys: restoreKeys,
restoreKeys,
version: utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive)
};
core.debug(`GetCacheEntryDownloadURLRequest: ${JSON.stringify(twirpClient)}`);
@ -12793,7 +12792,6 @@ function restoreCachev2(paths, primaryKey, restoreKeys, options, enableCrossOsAr
core.debug(`Failed to delete archive: ${error}`);
}
}
return undefined;
});
}
/**
@ -12810,7 +12808,6 @@ function saveCache(paths, key, options, enableCrossOsArchive = false) {
checkPaths(paths);
checkKey(key);
const cacheServiceVersion = config.getCacheServiceVersion();
console.debug(`Cache Service Version: ${cacheServiceVersion}`);
switch (cacheServiceVersion) {
case 'v2':
return yield saveCachev2(paths, key, options, enableCrossOsArchive);
@ -12939,8 +12936,8 @@ function saveCachev2(paths, key, options, enableCrossOsArchive = false) {
const request = {
workflowRunBackendId: backendIds.workflowRunBackendId,
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
key: key,
version: version
key,
version
};
const response = yield twirpClient.CreateCacheEntry(request);
if (!response.ok) {
@ -12951,8 +12948,8 @@ function saveCachev2(paths, key, options, enableCrossOsArchive = false) {
const finalizeRequest = {
workflowRunBackendId: backendIds.workflowRunBackendId,
workflowJobRunBackendId: backendIds.workflowJobRunBackendId,
key: key,
version: version,
key,
version,
sizeBytes: `${archiveFileSize}`
};
const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest);

34
package-lock.json generated
View File

@ -7806,13 +7806,14 @@
}
},
"node_modules/micromatch": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
"integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==",
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dev": true,
"license": "MIT",
"dependencies": {
"braces": "^3.0.1",
"picomatch": "^2.2.3"
"braces": "^3.0.3",
"picomatch": "^2.3.1"
},
"engines": {
"node": ">=8.6"
@ -8111,10 +8112,11 @@
"dev": true
},
"node_modules/picomatch": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz",
"integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==",
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8.6"
},
@ -15165,13 +15167,13 @@
"dev": true
},
"micromatch": {
"version": "4.0.4",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
"integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==",
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dev": true,
"requires": {
"braces": "^3.0.1",
"picomatch": "^2.2.3"
"braces": "^3.0.3",
"picomatch": "^2.3.1"
}
},
"mimic-fn": {
@ -15395,9 +15397,9 @@
"dev": true
},
"picomatch": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz",
"integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==",
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true
},
"pirates": {