Merge pull request #307 from crazy-max/bump-toolkit

bump @docker/actions-toolkit from 0.19.0 to 0.20.0
This commit is contained in:
Tõnis Tiigi authored and GitHub committed 2024-04-04 09:52:13 -07:00
commit d70bba72b1
4 files changed
+7 -7

No files matched your search

Generated Vendored
+1 -1
View File
@@ -1,4 +1,4 @@
require('./sourcemap-register.js');(()=>{var __webpack_modules__={7799:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.saveCache=t.restoreCache=t.isFeatureAvailable=t.ReserveCacheError=t.ValidationError=void 0;const o=s(r(2186));const l=s(r(1017));const c=s(r(1518));const p=s(r(8245));const d=r(3434);class ValidationError extends Error{constructor(e){super(e);this.name="ValidationError";Object.setPrototypeOf(this,ValidationError.prototype)}}t.ValidationError=ValidationError;class ReserveCacheError extends Error{constructor(e){super(e);this.name="ReserveCacheError";Object.setPrototypeOf(this,ReserveCacheError.prototype)}}t.ReserveCacheError=ReserveCacheError;function checkPaths(e){if(!e||e.length===0){throw new ValidationError(`Path Validation Error: At least one directory or file path is required`)}}function checkKey(e){if(e.length>512){throw new ValidationError(`Key Validation Error: ${e} cannot be larger than 512 characters.`)}const t=/^[^,]*$/;if(!t.test(e)){throw new ValidationError(`Key Validation Error: ${e} cannot contain commas.`)}}function isFeatureAvailable(){return!!process.env["ACTIONS_CACHE_URL"]}t.isFeatureAvailable=isFeatureAvailable;function restoreCache(e,t,r,i,n=false){return a(this,void 0,void 0,(function*(){checkPaths(e);r=r||[];const s=[t,...r];o.debug("Resolved Keys:");o.debug(JSON.stringify(s));if(s.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const e of s){checkKey(e)}const a=yield c.getCompressionMethod();let A="";try{const t=yield p.getCacheEntry(s,e,{compressionMethod:a,enableCrossOsArchive:n});if(!(t===null||t===void 0?void 0:t.archiveLocation)){return undefined}if(i===null||i===void 0?void 0:i.lookupOnly){o.info("Lookup only - skipping download");return t.cacheKey}A=l.join(yield c.createTempDirectory(),c.getCacheFileName(a));o.debug(`Archive Path: ${A}`);yield p.downloadCache(t.archiveLocation,A,i);if(o.isDebug()){yield(0,d.listTar)(A,a)}const r=c.getArchiveFileSizeInBytes(A);o.info(`Cache Size: ~${Math.round(r/(1024*1024))} MB (${r} B)`);yield(0,d.extractTar)(A,a);o.info("Cache restored successfully");return t.cacheKey}catch(e){const t=e;if(t.name===ValidationError.name){throw e}else{o.warning(`Failed to restore: ${e.message}`)}}finally{try{yield c.unlinkFile(A)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return undefined}))}t.restoreCache=restoreCache;function saveCache(e,t,r,i=false){var n,s,A,u,m;return a(this,void 0,void 0,(function*(){checkPaths(e);checkKey(t);const a=yield c.getCompressionMethod();let g=-1;const h=yield c.resolvePaths(e);o.debug("Cache Paths:");o.debug(`${JSON.stringify(h)}`);if(h.length===0){throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`)}const E=yield c.createTempDirectory();const y=l.join(E,c.getCacheFileName(a));o.debug(`Archive Path: ${y}`);try{yield(0,d.createTar)(E,h,a);if(o.isDebug()){yield(0,d.listTar)(y,a)}const l=10*1024*1024*1024;const C=c.getArchiveFileSizeInBytes(y);o.debug(`File Size: ${C}`);if(C>l&&!c.isGhes()){throw new Error(`Cache size of ~${Math.round(C/(1024*1024))} MB (${C} B) is over the 10GB limit, not saving cache.`)}o.debug("Reserving Cache");const b=yield p.reserveCache(t,e,{compressionMethod:a,enableCrossOsArchive:i,cacheSize:C});if((n=b===null||b===void 0?void 0:b.result)===null||n===void 0?void 0:n.cacheId){g=(s=b===null||b===void 0?void 0:b.result)===null||s===void 0?void 0:s.cacheId}else if((b===null||b===void 0?void 0:b.statusCode)===400){throw new Error((u=(A=b===null||b===void 0?void 0:b.error)===null||A===void 0?void 0:A.message)!==null&&u!==void 0?u:`Cache size of ~${Math.round(C/(1024*1024))} MB (${C} B) is over the data cap limit, not saving cache.`)}else{throw new ReserveCacheError(`Unable to reserve cache with key ${t}, another job may be creating this cache. More details: ${(m=b===null||b===Line truncated
require('./sourcemap-register.js');(()=>{var __webpack_modules__={7799:function(e,t,r){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,r,i){if(i===undefined)i=r;var n=Object.getOwnPropertyDescriptor(t,r);if(!n||("get"in n?!t.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return t[r]}}}Object.defineProperty(e,i,n)}:function(e,t,r,i){if(i===undefined)i=r;e[i]=t[r]});var n=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.prototype.hasOwnProperty.call(e,r))i(t,e,r);n(t,e);return t};var a=this&&this.__awaiter||function(e,t,r,i){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,n){function fulfilled(e){try{step(i.next(e))}catch(e){n(e)}}function rejected(e){try{step(i["throw"](e))}catch(e){n(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.saveCache=t.restoreCache=t.isFeatureAvailable=t.ReserveCacheError=t.ValidationError=void 0;const o=s(r(2186));const l=s(r(1017));const c=s(r(1518));const p=s(r(8245));const d=r(6490);class ValidationError extends Error{constructor(e){super(e);this.name="ValidationError";Object.setPrototypeOf(this,ValidationError.prototype)}}t.ValidationError=ValidationError;class ReserveCacheError extends Error{constructor(e){super(e);this.name="ReserveCacheError";Object.setPrototypeOf(this,ReserveCacheError.prototype)}}t.ReserveCacheError=ReserveCacheError;function checkPaths(e){if(!e||e.length===0){throw new ValidationError(`Path Validation Error: At least one directory or file path is required`)}}function checkKey(e){if(e.length>512){throw new ValidationError(`Key Validation Error: ${e} cannot be larger than 512 characters.`)}const t=/^[^,]*$/;if(!t.test(e)){throw new ValidationError(`Key Validation Error: ${e} cannot contain commas.`)}}function isFeatureAvailable(){return!!process.env["ACTIONS_CACHE_URL"]}t.isFeatureAvailable=isFeatureAvailable;function restoreCache(e,t,r,i,n=false){return a(this,void 0,void 0,(function*(){checkPaths(e);r=r||[];const s=[t,...r];o.debug("Resolved Keys:");o.debug(JSON.stringify(s));if(s.length>10){throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`)}for(const e of s){checkKey(e)}const a=yield c.getCompressionMethod();let A="";try{const t=yield p.getCacheEntry(s,e,{compressionMethod:a,enableCrossOsArchive:n});if(!(t===null||t===void 0?void 0:t.archiveLocation)){return undefined}if(i===null||i===void 0?void 0:i.lookupOnly){o.info("Lookup only - skipping download");return t.cacheKey}A=l.join(yield c.createTempDirectory(),c.getCacheFileName(a));o.debug(`Archive Path: ${A}`);yield p.downloadCache(t.archiveLocation,A,i);if(o.isDebug()){yield(0,d.listTar)(A,a)}const r=c.getArchiveFileSizeInBytes(A);o.info(`Cache Size: ~${Math.round(r/(1024*1024))} MB (${r} B)`);yield(0,d.extractTar)(A,a);o.info("Cache restored successfully");return t.cacheKey}catch(e){const t=e;if(t.name===ValidationError.name){throw e}else{o.warning(`Failed to restore: ${e.message}`)}}finally{try{yield c.unlinkFile(A)}catch(e){o.debug(`Failed to delete archive: ${e}`)}}return undefined}))}t.restoreCache=restoreCache;function saveCache(e,t,r,i=false){var n,s,A,u,m;return a(this,void 0,void 0,(function*(){checkPaths(e);checkKey(t);const a=yield c.getCompressionMethod();let g=-1;const h=yield c.resolvePaths(e);o.debug("Cache Paths:");o.debug(`${JSON.stringify(h)}`);if(h.length===0){throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`)}const E=yield c.createTempDirectory();const y=l.join(E,c.getCacheFileName(a));o.debug(`Archive Path: ${y}`);try{yield(0,d.createTar)(E,h,a);if(o.isDebug()){yield(0,d.listTar)(y,a)}const l=10*1024*1024*1024;const C=c.getArchiveFileSizeInBytes(y);o.debug(`File Size: ${C}`);if(C>l&&!c.isGhes()){throw new Error(`Cache size of ~${Math.round(C/(1024*1024))} MB (${C} B) is over the 10GB limit, not saving cache.`)}o.debug("Reserving Cache");const b=yield p.reserveCache(t,e,{compressionMethod:a,enableCrossOsArchive:i,cacheSize:C});if((n=b===null||b===void 0?void 0:b.result)===null||n===void 0?void 0:n.cacheId){g=(s=b===null||b===void 0?void 0:b.result)===null||s===void 0?void 0:s.cacheId}else if((b===null||b===void 0?void 0:b.statusCode)===400){throw new Error((u=(A=b===null||b===void 0?void 0:b.error)===null||A===void 0?void 0:A.message)!==null&&u!==void 0?u:`Cache size of ~${Math.round(C/(1024*1024))} MB (${C} B) is over the data cap limit, not saving cache.`)}else{throw new ReserveCacheError(`Unable to reserve cache with key ${t}, another job may be creating this cache. More details: ${(m=b===null||b===Line truncated
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
Generated Vendored
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"index.js","names":["__createBinding","this","Object","create","o","m","k","k2","undefined","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__setModuleDefault","v","value","__importStar","mod","result","prototype","hasOwnProperty","call","__awaiter","thisArg","_arguments","P","generator","adopt","resolve","Promise","reject","fulfilled","step","next","e","rejected","done","then","apply","exports","saveCache","restoreCache","isFeatureAvailable","ReserveCacheError","ValidationError","core","__webpack_require__","path","utils","cacheHttpClient","tar_1","Error","constructor","message","super","name","setPrototypeOf","checkPaths","paths","length","checkKey","key","regex","test","process","env","primaryKey","restoreKeys","options","enableCrossOsArchive","keys","debug","JSON","stringify","compressionMethod","getCompressionMethod","archivePath","cacheEntry","getCacheEntry","archiveLocation","lookupOnly","info","cacheKey","join","createTempDirectory","getCacheFileName","downloadCache","isDebug","listTar","archiveFileSize","getArchiveFileSizeInBytes","Math","round","extractTar","error","typedError","warning","unlinkFile","_a","_b","_c","_d","_e","cacheId","cachePaths","resolvePaths","archiveFolder","createTar","fileSizeLimit","isGhes","reserveCacheResponse","reserveCache","cacheSize","statusCode","getCacheVersion","http_client_1","auth_1","crypto","fs","url_1","downloadUtils_1","options_1","requestUtils_1","versionSalt","getCacheApiUrl","resource","baseUrl","url","createAcceptHeader","type","apiVersion","getRequestOptions","requestOptions","headers","Accept","createHttpClient","token","bearerCredentialHandler","BearerCredentialHandler","HttpClient","components","slice","push","platform","createHash","update","digest","httpClient","version","encodeURIComponent","response","retryTypedResponse","getJson","printCachesListForDiagnostics","isSuccessStatusCode","cacheResult","cacheDownloadUrl","setSecret","cacheListResult","totalCount","artifactCaches","cacheVersion","scope","creationTime","archiveUrl","URL","downloadOptions","getDownloadOptions","hostname","endsWith","useAzureSdk","downloadCacheStorageSDK","concurrentBlobDownloads","downloadCacheHttpClientConcurrent","downloadCacheHttpClient","reserveCacheRequest","postJson","getContentRange","start","end","uploadChunk","resourceUrl","openStream","additionalHeaders","uploadChunkResponse","retryHttpClientResponse","sendStream","uploadFile","fileSize","toString","fd","openSync","uploadOptions","getUploadOptions","concurrency","assertDefined","uploadConcurrency","maxChunkSize","uploadChunkSize","parallelUploads","Array","offset","all","map","chunkSize","min","createReadStream","autoClose","on","closeSync","commitCache","filesize","commitCacheRequest","size","commitCacheResponse","__asyncValues","Symbol","asyncIterator","TypeError","i","__values","iterator","verb","n","settle","d","getGnuTarPathOnWindows","exec","glob","io","semver","util","uuid_1","constants_1","IS_WINDOWS","tempDirectory","baseLocation","dest","v4","mkdirP","filePath","statSync","patterns","e_1","workspace","cwd","globber","implicitDescendants","_f","globGenerator","_g","file","relativeFile","relative","replace","RegExp","sep","e_1_1","return","promisify","unlink","getVersion","app","additionalArgs","versionOutput","ignoreReturnCode","silent","listeners","stdout","data","stderr","err","trim","clean","CompressionMethod","Gzip","ZstdWithoutLong","CacheFilename","Zstd","existsSync","GnuTarPathOnWindows","toLowerCase","includes","which","ghUrl","trimEnd","toUpperCase","isGitHubHost","isGheHost","ManifestFilename","TarFilename","SystemTarPathOnWindows","SocketTimeout","DefaultRetryDelay","DefaultRetryAttempts","ArchiveToolType","DownloadProgress","storage_blob_1","buffer","stream","abort_controller_1","pipeResponseToStream","output","pipeline","contentLength","segmentIndex","segmentSize","segmentOffset","receivedBytes","displayedComplete","startTime","Date","now","nextSegment","setReceivedBytes","getTransferredBytes","isDone","display","transferredBytes","percentage","toFixed","elapsedTime","downloadSpeed","onProgress","progress","loadedBytes","startDisplayTimer","delayInMs","displayCallback","timeoutHandle","setTimeout","stopDisplayTimer","clearTimeout","writeStream","createWriteStream","downloadResponse","socket","destroy","contentLengthHeader","expectedLength","parseInt","actualLength","archiveDescriptor","promises","open","socketTimeout","timeoutInMs","keepAlive","res","request","lengthHeader","Number","isNaN","downloads","blockSize","count","promiseGetter","downloadSegmentRetry","reverse","actives","bytesDownloaded","progressFn","activeDownloads","nextDownload","waitAndWrite","segment","race","values","write","pop","downloadConcurrency","dispose","close","retries","failures","timeout","promiseWithTimeout","downloadSegment","partRes","Range","readBodyBuffer","client","BlockBlobClient","retryOptions","tryTimeoutInMs","properties"Line truncated
{"version":3,"file":"index.js","names":["__createBinding","this","Object","create","o","m","k","k2","undefined","desc","getOwnPropertyDescriptor","__esModule","writable","configurable","enumerable","get","defineProperty","__setModuleDefault","v","value","__importStar","mod","result","prototype","hasOwnProperty","call","__awaiter","thisArg","_arguments","P","generator","adopt","resolve","Promise","reject","fulfilled","step","next","e","rejected","done","then","apply","exports","saveCache","restoreCache","isFeatureAvailable","ReserveCacheError","ValidationError","core","__webpack_require__","path","utils","cacheHttpClient","tar_1","Error","constructor","message","super","name","setPrototypeOf","checkPaths","paths","length","checkKey","key","regex","test","process","env","primaryKey","restoreKeys","options","enableCrossOsArchive","keys","debug","JSON","stringify","compressionMethod","getCompressionMethod","archivePath","cacheEntry","getCacheEntry","archiveLocation","lookupOnly","info","cacheKey","join","createTempDirectory","getCacheFileName","downloadCache","isDebug","listTar","archiveFileSize","getArchiveFileSizeInBytes","Math","round","extractTar","error","typedError","warning","unlinkFile","_a","_b","_c","_d","_e","cacheId","cachePaths","resolvePaths","archiveFolder","createTar","fileSizeLimit","isGhes","reserveCacheResponse","reserveCache","cacheSize","statusCode","getCacheVersion","http_client_1","auth_1","crypto","fs","url_1","downloadUtils_1","options_1","requestUtils_1","versionSalt","getCacheApiUrl","resource","baseUrl","url","createAcceptHeader","type","apiVersion","getRequestOptions","requestOptions","headers","Accept","createHttpClient","token","bearerCredentialHandler","BearerCredentialHandler","HttpClient","components","slice","push","platform","createHash","update","digest","httpClient","version","encodeURIComponent","response","retryTypedResponse","getJson","printCachesListForDiagnostics","isSuccessStatusCode","cacheResult","cacheDownloadUrl","setSecret","cacheListResult","totalCount","artifactCaches","cacheVersion","scope","creationTime","archiveUrl","URL","downloadOptions","getDownloadOptions","hostname","endsWith","useAzureSdk","downloadCacheStorageSDK","concurrentBlobDownloads","downloadCacheHttpClientConcurrent","downloadCacheHttpClient","reserveCacheRequest","postJson","getContentRange","start","end","uploadChunk","resourceUrl","openStream","additionalHeaders","uploadChunkResponse","retryHttpClientResponse","sendStream","uploadFile","fileSize","toString","fd","openSync","uploadOptions","getUploadOptions","concurrency","assertDefined","uploadConcurrency","maxChunkSize","uploadChunkSize","parallelUploads","Array","offset","all","map","chunkSize","min","createReadStream","autoClose","on","closeSync","commitCache","filesize","commitCacheRequest","size","commitCacheResponse","__asyncValues","Symbol","asyncIterator","TypeError","i","__values","iterator","verb","n","settle","d","getGnuTarPathOnWindows","exec","glob","io","semver","util","uuid_1","constants_1","IS_WINDOWS","tempDirectory","baseLocation","dest","v4","mkdirP","filePath","statSync","patterns","e_1","workspace","cwd","globber","implicitDescendants","_f","globGenerator","_g","file","relativeFile","relative","replace","RegExp","sep","e_1_1","return","promisify","unlink","getVersion","app","additionalArgs","versionOutput","ignoreReturnCode","silent","listeners","stdout","data","stderr","err","trim","clean","CompressionMethod","Gzip","ZstdWithoutLong","CacheFilename","Zstd","existsSync","GnuTarPathOnWindows","toLowerCase","includes","which","ghUrl","trimEnd","toUpperCase","isGitHubHost","isGheHost","ManifestFilename","TarFilename","SystemTarPathOnWindows","SocketTimeout","DefaultRetryDelay","DefaultRetryAttempts","ArchiveToolType","DownloadProgress","storage_blob_1","buffer","stream","abort_controller_1","pipeResponseToStream","output","pipeline","contentLength","segmentIndex","segmentSize","segmentOffset","receivedBytes","displayedComplete","startTime","Date","now","nextSegment","setReceivedBytes","getTransferredBytes","isDone","display","transferredBytes","percentage","toFixed","elapsedTime","downloadSpeed","onProgress","progress","loadedBytes","startDisplayTimer","delayInMs","displayCallback","timeoutHandle","setTimeout","stopDisplayTimer","clearTimeout","writeStream","createWriteStream","downloadResponse","socket","destroy","contentLengthHeader","expectedLength","parseInt","actualLength","archiveDescriptor","promises","open","socketTimeout","timeoutInMs","keepAlive","res","request","lengthHeader","Number","isNaN","downloads","blockSize","count","promiseGetter","downloadSegmentRetry","reverse","actives","bytesDownloaded","progressFn","activeDownloads","nextDownload","waitAndWrite","segment","race","values","write","pop","downloadConcurrency","dispose","close","retries","failures","timeout","promiseWithTimeout","downloadSegment","partRes","Range","readBodyBuffer","client","BlockBlobClient","retryOptions","tryTimeoutInMs","properties"Line truncated
+1 -1
View File
@@ -27,7 +27,7 @@
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/exec": "^1.1.1",
"@docker/actions-toolkit": "^0.19.0",
"@docker/actions-toolkit": "^0.20.0",
"js-yaml": "^4.1.0",
"uuid": "^9.0.1"
},
+4 -4
View File
@@ -765,10 +765,10 @@
dependencies:
"@jridgewell/trace-mapping" "0.3.9"
"@docker/actions-toolkit@^0.19.0":
version "0.19.0"
resolved "https://registry.yarnpkg.com/@docker/actions-toolkit/-/actions-toolkit-0.19.0.tgz#3b17d06c46d60142423651ddb9d390f65f109a8c"
integrity sha512-Es08sgfIBOsEBQLfrJQtfgf5mM9Rl4nfZ7byYQ+umbI7VcUEF4AusyNfqsZob7ZRGu+YUw2jJivZysjVCz6LMg==
"@docker/actions-toolkit@^0.20.0":
version "0.20.0"
resolved "https://registry.yarnpkg.com/@docker/actions-toolkit/-/actions-toolkit-0.20.0.tgz#9619ff5da7f282e02e22509a5f2f1d707d4437fe"
integrity sha512-oAHSQnWjEyRGmGXePt5A/rZG76U/gddQWF/JmD8lZQOL5WZ7WgfUd2MucOaxq3cd66rMew+iwkfqDzFJQewQQw==
dependencies:
"@actions/cache" "^3.2.4"
"@actions/core" "^1.10.1"