Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@actions/cache

Package Overview
Dependencies
Maintainers
5
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@actions/cache - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

6

lib/internal/downloadUtils.js

@@ -29,2 +29,3 @@ "use strict";

const requestUtils_1 = require("./requestUtils");
const abort_controller_1 = require("@azure/abort-controller");
/**

@@ -213,2 +214,6 @@ * Pipes the body of a HTTP response to a stream

downloadProgress.startDisplayTimer();
const abortSignal = abort_controller_1.AbortController.timeout(options.segmentTimeoutInMs || 3600000);
abortSignal.addEventListener('abort', () => {
core.warning('Aborting cache download as it exceeded the timeout.');
});
while (!downloadProgress.isDone()) {

@@ -219,2 +224,3 @@ const segmentStart = downloadProgress.segmentOffset + downloadProgress.segmentSize;

const result = yield client.downloadToBuffer(segmentStart, segmentSize, {
abortSignal,
concurrency: options.downloadConcurrency,

@@ -221,0 +227,0 @@ onProgress: downloadProgress.onProgress()

@@ -44,2 +44,8 @@ /**

timeoutInMs?: number;
/**
* Time after which a segment download should be aborted if stuck
*
* @default 3600000
*/
segmentTimeoutInMs?: number;
}

@@ -46,0 +52,0 @@ /**

7

lib/options.js

@@ -43,3 +43,4 @@ "use strict";

downloadConcurrency: 8,
timeoutInMs: 30000
timeoutInMs: 30000,
segmentTimeoutInMs: 3600000
};

@@ -56,2 +57,5 @@ if (copy) {

}
if (typeof copy.segmentTimeoutInMs === 'number') {
result.segmentTimeoutInMs = copy.segmentTimeoutInMs;
}
}

@@ -61,2 +65,3 @@ core.debug(`Use Azure SDK: ${result.useAzureSdk}`);

core.debug(`Request timeout (ms): ${result.timeoutInMs}`);
core.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`);
return result;

@@ -63,0 +68,0 @@ }

2

package.json
{
"name": "@actions/cache",
"version": "3.0.1",
"version": "3.0.2",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc