diff --git a/dist/cache-save/index.js b/dist/cache-save/index.js index 7fcaa6673..6695bad4d 100644 --- a/dist/cache-save/index.js +++ b/dist/cache-save/index.js @@ -566,6 +566,7 @@ function getCacheEntryUsingCacheMgr(keys, paths, destinationPath, options) { } exports.getCacheEntryUsingCacheMgr = getCacheEntryUsingCacheMgr; function getCacheEntry(keys, paths, options) { + var _a; return __awaiter(this, void 0, void 0, function* () { const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const resource = `?keys=${encodeURIComponent(keys.join(','))}&version=${version}`; @@ -580,7 +581,7 @@ function getCacheEntry(keys, paths, options) { Accept: createAcceptHeader('application/json', '6.0-preview.1'), 'X-Github-Repo-Name': process.env['GITHUB_REPO_NAME'], Authorization: `Bearer ${process.env['BLACKSMITH_CACHE_TOKEN']}`, - 'X-Cache-Region': process.env['BLACKSMITH_REGION'] + 'X-Cache-Region': (_a = process.env['BLACKSMITH_REGION']) !== null && _a !== void 0 ? _a : 'eu-central' }, timeout: 3000 // 3 seconds timeout }); @@ -688,8 +689,9 @@ function reserveCache(key, paths, options) { cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; const response = yield (0, requestUtils_1.retryTypedResponse)('reserveCache', () => __awaiter(this, void 0, void 0, function* () { + var _a; return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest, { - 'X-Cache-Region': process.env['BLACKSMITH_REGION'] + 'X-Cache-Region': (_a = process.env['BLACKSMITH_REGION']) !== null && _a !== void 0 ? _a : 'eu-central' }); })); return response; diff --git a/dist/setup/index.js b/dist/setup/index.js index ecec39166..a18a9e176 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -566,6 +566,7 @@ function getCacheEntryUsingCacheMgr(keys, paths, destinationPath, options) { } exports.getCacheEntryUsingCacheMgr = getCacheEntryUsingCacheMgr; function getCacheEntry(keys, paths, options) { + var _a; return __awaiter(this, void 0, void 0, function* () { const version = getCacheVersion(paths, options === null || options === void 0 ? void 0 : options.compressionMethod, options === null || options === void 0 ? void 0 : options.enableCrossOsArchive); const resource = `?keys=${encodeURIComponent(keys.join(','))}&version=${version}`; @@ -580,7 +581,7 @@ function getCacheEntry(keys, paths, options) { Accept: createAcceptHeader('application/json', '6.0-preview.1'), 'X-Github-Repo-Name': process.env['GITHUB_REPO_NAME'], Authorization: `Bearer ${process.env['BLACKSMITH_CACHE_TOKEN']}`, - 'X-Cache-Region': process.env['BLACKSMITH_REGION'] + 'X-Cache-Region': (_a = process.env['BLACKSMITH_REGION']) !== null && _a !== void 0 ? _a : 'eu-central' }, timeout: 3000 // 3 seconds timeout }); @@ -688,8 +689,9 @@ function reserveCache(key, paths, options) { cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; const response = yield (0, requestUtils_1.retryTypedResponse)('reserveCache', () => __awaiter(this, void 0, void 0, function* () { + var _a; return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest, { - 'X-Cache-Region': process.env['BLACKSMITH_REGION'] + 'X-Cache-Region': (_a = process.env['BLACKSMITH_REGION']) !== null && _a !== void 0 ? _a : 'eu-central' }); })); return response; diff --git a/package-lock.json b/package-lock.json index d9d3fbdfb..79ba7d172 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "5.0.0", "license": "MIT", "dependencies": { - "@actions/cache": "npm:@useblacksmith/cache@3.2.212", + "@actions/cache": "npm:@useblacksmith/cache@3.2.213", "@actions/core": "^1.10.0", "@actions/exec": "^1.1.0", "@actions/glob": "^0.4.0", @@ -48,9 +48,9 @@ }, "node_modules/@actions/cache": { "name": "@useblacksmith/cache", - "version": "3.2.212", - "resolved": "https://registry.npmjs.org/@useblacksmith/cache/-/cache-3.2.212.tgz", - "integrity": "sha512-cb045KJI3GjWRonP0QAgK25W6ajGxkzOlPU/UC2Exvfwrsa0+KSPd3zf+ghtkElRlQPeZaE+Q7VEBnF0duRBnw==", + "version": "3.2.213", + "resolved": "https://registry.npmjs.org/@useblacksmith/cache/-/cache-3.2.213.tgz", + "integrity": "sha512-fC0rfbxHoBLI20dJpSHPl1Yj9sl3XzVhhv7WmZCuUar/j1+dizvbwreBfZ22jVlw63EEHpTym3/95amY4vSaYQ==", "dependencies": { "@actions/core": "^1.10.0", "@actions/exec": "^1.0.1", diff --git a/package.json b/package.json index 000900c32..b67ee203b 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "author": "GitHub", "license": "MIT", "dependencies": { - "@actions/cache": "npm:@useblacksmith/cache@3.2.212", + "@actions/cache": "npm:@useblacksmith/cache@3.2.213", "@actions/core": "^1.10.0", "@actions/exec": "^1.1.0", "@actions/glob": "^0.4.0",