From 8546a7057e00ee8c67c891b84ff304a02938442b Mon Sep 17 00:00:00 2001 From: Apple Date: Thu, 31 Mar 2022 14:54:56 +0530 Subject: [PATCH] console res --- dist/restore/index.js | 9 +++++---- dist/save/index.js | 9 +++++---- package-lock.json | 4 ++-- package.json | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/dist/restore/index.js b/dist/restore/index.js index 7221a2f..a4b967d 100644 --- a/dist/restore/index.js +++ b/dist/restore/index.js @@ -3278,10 +3278,9 @@ function reserveCache(key, paths, options) { version, cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; - const response = yield requestUtils_1.retryHttpClientResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () { - return httpClient.post(getCacheApiUrl('caches'), JSON.stringify(reserveCacheRequest)); + const response = yield requestUtils_1.retryTypedResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () { + return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest); })); - console.log("\n\nResponse\n\n"); console.log(response); return response; }); @@ -51566,7 +51565,9 @@ function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetry return { statusCode: error.statusCode, result: null, - headers: {} + headers: {}, + message: error.message, + typeKey: error.result }; } else { diff --git a/dist/save/index.js b/dist/save/index.js index 4e3d8f1..fe6ba16 100644 --- a/dist/save/index.js +++ b/dist/save/index.js @@ -3278,10 +3278,9 @@ function reserveCache(key, paths, options) { version, cacheSize: options === null || options === void 0 ? void 0 : options.cacheSize }; - const response = yield requestUtils_1.retryHttpClientResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () { - return httpClient.post(getCacheApiUrl('caches'), JSON.stringify(reserveCacheRequest)); + const response = yield requestUtils_1.retryTypedResponse('reserveCache', () => __awaiter(this, void 0, void 0, function* () { + return httpClient.postJson(getCacheApiUrl('caches'), reserveCacheRequest); })); - console.log("\n\nResponse\n\n"); console.log(response); return response; }); @@ -51569,7 +51568,9 @@ function retryTypedResponse(name, method, maxAttempts = constants_1.DefaultRetry return { statusCode: error.statusCode, result: null, - headers: {} + headers: {}, + message: error.message, + typeKey: error.result }; } else { diff --git a/package-lock.json b/package-lock.json index 82ee0d8..7a8d7ca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,8 +5,8 @@ "requires": true, "dependencies": { "@actions/cache": { - "version": "file:actions-cache-2.5.0.tgz", - "integrity": "sha512-Op00dHgPDvY4EJdde8NIAK4JZjzz3uao8ECVsgN1/KAp0SKtEXKPntS+hrNhTLMnZqBqI74+WZlRWqbpDlus/w==", + "version": "file:actions-cache-2.6.0.tgz", + "integrity": "sha512-B4nmafK6ta7svnwFPDTWK+I5M9Yx5ZQeVau0u4viwnmHrFjLg8zYOL1eNEKOGM/7GXkRAN2jiyaXu8jW419BYw==", "requires": { "@actions/core": "^1.2.6", "@actions/exec": "^1.0.1", diff --git a/package.json b/package.json index 0592fd7..3c6c8b4 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "author": "GitHub", "license": "MIT", "dependencies": { - "@actions/cache": "file:actions-cache-2.5.0.tgz", + "@actions/cache": "file:actions-cache-2.6.0.tgz", "@actions/core": "^1.2.6", "@actions/exec": "^1.1.1", "@actions/io": "^1.1.2"