1
0
Fork 0
mirror of https://github.com/rharkor/caching-for-turbo.git synced 2025-06-09 09:35:17 +09:00
This commit is contained in:
rharkor 2024-06-13 14:07:44 +00:00
parent eb287d233e
commit dee28cf0df
3 changed files with 7 additions and 15 deletions

10
dist/index.js generated vendored
View file

@ -122839,11 +122839,6 @@ function getCacheClient() {
if (!env_1.env.valid) {
throw new Error('Cache API env vars are not set');
}
const baseURL = `${env_1.env.ACTIONS_CACHE_URL.replace(/\/$/, '')}/_apis/artifactcache`;
const headers = new Headers({
Authorization: `Bearer ${env_1.env.ACTIONS_RUNTIME_TOKEN}`,
Accept: 'application/json;api-version=6.0-preview.1'
});
const reserve = async (key, version) => {
try {
const reserveCacheResponse = await cacheHttpClient.reserveCache(key, [
@ -122890,7 +122885,6 @@ function getCacheClient() {
const query = async (keys, version) => {
try {
const queryCacheResponse = await cacheHttpClient.getCacheEntry([keys], [version]);
core.info(`Cache result ${queryCacheResponse}`);
if (queryCacheResponse?.archiveLocation) {
return {
success: true,
@ -122901,7 +122895,9 @@ function getCacheClient() {
};
}
else {
return handleFetchError('Unable to query cache')(queryCacheResponse);
return {
success: false
};
}
}
catch (error) {

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long