@actions/cache
Advanced tools
Comparing version 1.0.11 to 2.0.0
@@ -9,2 +9,8 @@ import { DownloadOptions, UploadOptions } from './options'; | ||
/** | ||
* isFeatureAvailable to check the presence of Actions cache service | ||
* | ||
* @returns boolean return true if Actions cache service feature is available, otherwise false | ||
*/ | ||
export declare function isFeatureAvailable(): boolean; | ||
/** | ||
* Restores cache from keys | ||
@@ -11,0 +17,0 @@ * |
@@ -55,2 +55,11 @@ "use strict"; | ||
/** | ||
* isFeatureAvailable to check the presence of Actions cache service | ||
* | ||
* @returns boolean return true if Actions cache service feature is available, otherwise false | ||
*/ | ||
function isFeatureAvailable() { | ||
return !!process.env['ACTIONS_CACHE_URL']; | ||
} | ||
exports.isFeatureAvailable = isFeatureAvailable; | ||
/** | ||
* Restores cache from keys | ||
@@ -57,0 +66,0 @@ * |
@@ -32,6 +32,3 @@ "use strict"; | ||
function getCacheApiUrl(resource) { | ||
// Ideally we just use ACTIONS_CACHE_URL | ||
const baseUrl = (process.env['ACTIONS_CACHE_URL'] || | ||
process.env['ACTIONS_RUNTIME_URL'] || | ||
'').replace('pipelines', 'artifactcache'); | ||
const baseUrl = process.env['ACTIONS_CACHE_URL'] || ''; | ||
if (!baseUrl) { | ||
@@ -38,0 +35,0 @@ throw new Error('Cache Service Url not found, unable to restore cache.'); |
{ | ||
"name": "@actions/cache", | ||
"version": "1.0.11", | ||
"version": "2.0.0", | ||
"preview": true, | ||
@@ -5,0 +5,0 @@ "description": "Actions cache lib", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
90977
1353