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

34
package-lock.json generated
View file

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