aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPauline <git@ethanlibs.co>2023-12-26 21:45:13 +0100
committerPauline <git@ethanlibs.co>2023-12-26 21:45:13 +0100
commit4bf354c197e834f563046da9fe2140b23a9faf80 (patch)
treea4be46a66e16dd212d58c39845b9992c3fa9552b
parent1ec972a8aad20605d28616b4f88781d6b7985021 (diff)
downloadNexus-4bf354c197e834f563046da9fe2140b23a9faf80.tar.gz
Nexus-4bf354c197e834f563046da9fe2140b23a9faf80.tar.bz2
Nexus-4bf354c197e834f563046da9fe2140b23a9faf80.zip
feat(actions): bump deps and use new artifact api
-rw-r--r--.github/actions/publish-artifacts/dist/index.js93
-rw-r--r--.github/actions/publish-artifacts/index.ts8
2 files changed, 89 insertions, 12 deletions
diff --git a/.github/actions/publish-artifacts/dist/index.js b/.github/actions/publish-artifacts/dist/index.js
index b117d74..131ee41 100644
--- a/.github/actions/publish-artifacts/dist/index.js
+++ b/.github/actions/publish-artifacts/dist/index.js
@@ -1,11 +1,90 @@
-(()=>{var A={5426:(A,e,t)=>{"use strict";var r;r={value:true};e.U=void 0;const n=t(945);function create(){return n.DefaultArtifactClient.create()}e.U=create},945:function(A,e,t){"use strict";var r=this&&this.__createBinding||(Object.create?function(A,e,t,r){if(r===undefined)r=t;var n=Object.getOwnPropertyDescriptor(e,t);if(!n||("get"in n?!e.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return e[t]}}}Object.defineProperty(A,r,n)}:function(A,e,t,r){if(r===undefined)r=t;A[r]=e[t]});var n=this&&this.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:true,value:e})}:function(A,e){A["default"]=e});var s=this&&this.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)if(t!=="default"&&Object.prototype.hasOwnProperty.call(A,t))r(e,A,t);n(e,A);return e};var i=this&&this.__awaiter||function(A,e,t,r){function adopt(A){return A instanceof t?A:new t((function(e){e(A)}))}return new(t||(t=Promise))((function(t,n){function fulfilled(A){try{step(r.next(A))}catch(A){n(A)}}function rejected(A){try{step(r["throw"](A))}catch(A){n(A)}}function step(A){A.done?t(A.value):adopt(A.value).then(fulfilled,rejected)}step((r=r.apply(A,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.DefaultArtifactClient=void 0;const o=s(t(3949));const a=t(5554);const c=t(2858);const g=t(6893);const l=t(7489);const E=t(1333);const h=t(8539);const Q=t(9224);const u=t(1017);class DefaultArtifactClient{static create(){return new DefaultArtifactClient}uploadArtifact(A,e,t,r){return i(this,void 0,void 0,(function*(){o.info(`Starting artifact upload\nFor more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`);(0,l.checkArtifactName)(A);const n=(0,a.getUploadSpecification)(A,t,e);const s={artifactName:A,artifactItems:[],size:0,failedItems:[]};const i=new c.UploadHttpClient;if(n.length===0){o.warning(`No files found that can be uploaded`)}else{const e=yield i.createArtifactInFileContainer(A,r);if(!e.fileContainerResourceUrl){o.debug(e.toString());throw new Error("No URL provided by the Artifact Service to upload an artifact to")}o.debug(`Upload Resource URL: ${e.fileContainerResourceUrl}`);o.info(`Container for artifact "${A}" successfully created. Starting upload of file(s)`);const t=yield i.uploadArtifactToFileContainer(e.fileContainerResourceUrl,n,r);o.info(`File upload process has finished. Finalizing the artifact upload`);yield i.patchArtifactSize(t.totalSize,A);if(t.failedItems.length>0){o.info(`Upload finished. There were ${t.failedItems.length} items that failed to upload`)}else{o.info(`Artifact has been finalized. All files have been successfully uploaded!`)}o.info(`\nThe raw size of all the files that were specified for upload is ${t.totalSize} bytes\nThe size of all the files that were uploaded is ${t.uploadSize} bytes. This takes into account any gzip compression used to reduce the upload size, time and storage\n\nNote: The size of downloaded zips can differ significantly from the reported size. For more information see: https://github.com/actions/upload-artifact#zipped-artifact-downloads \r\n`);s.artifactItems=n.map((A=>A.absoluteFilePath));s.size=t.uploadSize;s.failedItems=t.failedItems}return s}))}downloadArtifact(A,e,t){return i(this,void 0,void 0,(function*(){const r=new E.DownloadHttpClient;const n=yield r.listArtifacts();if(n.count===0){throw new Error(`Unable to find any artifacts for the associated workflow`)}const s=n.value.find((e=>e.name===A));if(!s){throw new Error(`Unable to find an artifact with the name: ${A}`)}const i=yield r.getContainerItems(s.name,s.fileContainerResourceUrl);if(!e){e=(0,Q.getWorkSpaceDirectory)()}e=(0,u.normalize)(e);e=(0,u.resolve)(e);const a=(0,h.getDownloadSpecification)(A,i.value,e,(t===null||t===void 0?void 0:t.createArtifactFolder)||false);if(a.filesToDownload.length===0){o.info(`No downloadable files were found for the artifact: ${s.name}`)}else{yield(0,g.createDirectoriesForArtifact)(a.directoryStructure);o.info("Directory structure has been set up for the artifact");yield(0,g.createEmptyFilesForArtifact)(a.emptyFilesToCreate);yield r.downloadSingleArtifact(a.filesToDownload)}return{artifactName:A,downloadPath:a.rootDownloadLocation}}))}downloadAllArtifacts(A){return i(this,void 0,void 0,(function*(){const e=new E.DownloadHttpClient;const t=[];const r=yield e.listArtifacts();if(r.count===0){o.info("Unable to find any artifacts for the associated workflow");return t}if(!A){A=(0,Q.getWorkSpaceDirectory)()}A=(0,u.normalize)(A);A=(0,u.resolve)(A);let n=0;while(n<r.count){const s=r.value[n];n+=1;o.info(`starting download of artifact ${s.name} : ${n}/${r.count}`);const i=yield e.getContainerItems(s.name,s.fileContainerResourceUrl);const a=(0,h.getDownloadSpecification)(s.name,i.value,A,true);if(a.filesToDownload.length===0){o.info(`No downloadable files were found for any artifact ${s.name}`)}else{yield(0,g.createDirectoriesForArtifact)(a.directoryStructure);yield(0,g.createEmptyFilesForArtifact)(a.emptyFilesToCreate);yield e.downloadSingleArtifact(a.filesToDownload)}t.push({artifactName:s.name,downloadPath:a.rootDownloadLocation})}return t}))}}e.DefaultArtifactClient=DefaultArtifactClient},9224:(A,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.isGhes=e.getRetentionDays=e.getWorkSpaceDirectory=e.getWorkFlowRunId=e.getRuntimeUrl=e.getRuntimeToken=e.getDownloadFileConcurrency=e.getInitialRetryIntervalInMilliseconds=e.getRetryMultiplier=e.getRetryLimit=e.getUploadChunkSize=e.getUploadFileConcurrency=void 0;function getUploadFileConcurrency(){return 2}e.getUploadFileConcurrency=getUploadFileConcurrency;function getUploadChunkSize(){return 8*1024*1024}e.getUploadChunkSize=getUploadChunkSize;function getRetryLimit(){return 5}e.getRetryLimit=getRetryLimit;function getRetryMultiplier(){return 1.5}e.getRetryMultiplier=getRetryMultiplier;function getInitialRetryIntervalInMilliseconds(){return 3e3}e.getInitialRetryIntervalInMilliseconds=getInitialRetryIntervalInMilliseconds;function getDownloadFileConcurrency(){return 2}e.getDownloadFileConcurrency=getDownloadFileConcurrency;function getRuntimeToken(){const A=process.env["ACTIONS_RUNTIME_TOKEN"];if(!A){throw new Error("Unable to get ACTIONS_RUNTIME_TOKEN env variable")}return A}e.getRuntimeToken=getRuntimeToken;function getRuntimeUrl(){const A=process.env["ACTIONS_RUNTIME_URL"];if(!A){throw new Error("Unable to get ACTIONS_RUNTIME_URL env variable")}return A}e.getRuntimeUrl=getRuntimeUrl;function getWorkFlowRunId(){const A=process.env["GITHUB_RUN_ID"];if(!A){throw new Error("Unable to get GITHUB_RUN_ID env variable")}return A}e.getWorkFlowRunId=getWorkFlowRunId;function getWorkSpaceDirectory(){const A=process.env["GITHUB_WORKSPACE"];if(!A){throw new Error("Unable to get GITHUB_WORKSPACE env variable")}return A}e.getWorkSpaceDirectory=getWorkSpaceDirectory;function getRetentionDays(){return process.env["GITHUB_RETENTION_DAYS"]}e.getRetentionDays=getRetentionDays;function isGhes(){const A=new URL(process.env["GITHUB_SERVER_URL"]||"https://github.com");return A.hostname.toUpperCase()!=="GITHUB.COM"}e.isGhes=isGhes},8063:(A,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});const t=[BigInt("0x0000000000000000"),BigInt("0x7F6EF0C830358979"),BigInt("0xFEDDE190606B12F2"),BigInt("0x81B31158505E9B8B"),BigInt("0xC962E5739841B68F"),BigInt("0xB60C15BBA8743FF6"),BigInt("0x37BF04E3F82AA47D"),BigInt("0x48D1F42BC81F2D04"),BigInt("0xA61CECB46814FE75"),BigInt("0xD9721C7C5821770C"),BigInt("0x58C10D24087FEC87"),BigInt("0x27AFFDEC384A65FE"),BigInt("0x6F7E09C7F05548FA"),BigInt("0x1010F90FC060C183"),BigInt("0x91A3E857903E5A08"),BigInt("0xEECD189FA00BD371"),BigInt("0x78E0FF3B88BE6F81"),BigInt("0x078E0FF3B88BE6F8"),BigInt("0x863D1EABE8D57D73"),BigInt("0xF953EE63D8E0F40A"),BigInt("0xB1821A4810FFD90E"),BigInt("0xCEECEA8020CA5077"),BigInt("0x4F5FFBD87094CBFC"),BigInt("0x30310B1040A14285"),BigInt("0xDEFC138FE0AA91F4"),BigInt("0xA192E347D09F188D"),BigInt("0x2021F21F80C18306"),BigInt("0x5F4F02D7B0F40A7F"),BigInt("0x179EF6FC78EB277B"),BigInt("0x68F0063448DEAE02"),BigInt("0xE943176C18803589"),BigInt("0x962DE7A428B5BCF0"),BigInt("0xF1C1FE77117CDF02"),BigInt("0x8EAF0EBF2149567B"),BigInt("0x0F1C1FE77117CDF0"),BigInt("0x7072EF2F41224489"),BigInt("0x38A31B04893D698D"),BigInt("0x47CDEBCCB908E0F4"),BigInt("0xC67EFA94E9567B7F"),BigInt("0xB9100A5CD963F206"),BigInt("0x57DD12C379682177"),BigInt("0x28B3E20B495DA80E"),BigInt("0xA900F35319033385"),BigInt("0xD66E039B2936BAFC"),BigInt("0x9EBFF7B0E12997F8"),BigInt("0xE1D10778D11C1E81"),BigInt("0x606216208142850A"),BigInt("0x1F0CE6E8B1770C73"),BigInt("0x8921014C99C2B083"),BigInt("0xF64FF184A9F739FA"),BigInt("0x77FCE0DCF9A9A271"),BigInt("0x08921014C99C2B08"),BigInt("0x4043E43F0183060C"),BigInt("0x3F2D14F731B68F75"),BigInt("0xBE9E05AF61E814FE"),BigInt("0xC1F0F56751DD9D87"),BigInt("0x2F3DEDF8F1D64EF6"),BigInt("0x50531D30C1E3C78F"),BigInt("0xD1E00C6891BD5C04"),BigInt("0xAE8EFCA0A188D57D"),BigInt("0xE65F088B6997F879"),BigInt("0x9931F84359A27100"),BigInt("0x1882E91B09FCEA8B"),BigInt("0x67EC19D339C963F2"),BigInt("0xD75ADABD7A6E2D6F"),BigInt("0xA8342A754A5BA416"),BigInt("0x29873B2D1A053F9D"),BigInt("0x56E9CBE52A30B6E4"),BigInt("0x1E383FCEE22F9BE0"),BigInt("0x6156CF06D21A1299"),BigInt("0xE0E5DE5E82448912"),BigInt("0x9F8B2E96B271006B"),BigInt("0x71463609127AD31A"),BigInt("0x0E28C6C1224F5A63"),BigInt("0x8F9BD7997211C1E8"),BigInt("0xF0F5275142244891"),BigInt("0xB824D37A8A3B6595"),BigInt("0xC74A23B2BA0EECEC"),BigInt("0x46F932EAEA507767"),BigInt("0x3997C222DA65FE1E"),BigInt("0xAFBA2586F2D042EE"),BigInt("0xD0D4D54EC2E5CB97"),BigInt("0x5167C41692BB501C"),BigInt("0x2E0934DEA28ED965"),BigInt("0x66D8C0F56A91F461"),BigInt("0x19B6303D5AA47D18"),BigInt("0x980521650AFAE693"),BigInt("0xE76BD1AD3ACF6FEA"),BigInt("0x09A6C9329AC4BC9B"),BigInt("0x76C839FAAAF135E2"),BigInt("0xF77B28A2FAAFAE69"),BigInt("0x8815D86ACA9A2710"),BigInt("0xC0C42C4102850A14"),BigInt("0xBFAADC8932B0836D"),BigInt("0x3E19CDD162EE18E6"),BigInt("0x41773D1952DB919F"),BigInt("0x269B24CA6B12F26D"),BigInt("0x59F5D4025B277B14"),BigInt("0xD846C55A0B79E09F"),BigInt("0xA72835923B4C69E6"),BigInt("0xEFF9C1B9F35344E2"),BigInt("0x90973171C366CD9B"),BigInt("0x1124202993385610"),BigInt("0x6E4AD0E1A30DDF69"),BigInt("0x8087C87E03060C18"),BigInt("0xFFE938B633338561"),BigInt("0x7E5A29EE636D1EEA"),BigInt("0x0134D92653589793"),BigInt("0x49E52D0D9B47BA97"),BigInt("0x368BDDC5AB7233EE"),BigInt("0xB738CC9DFB2CA865"),BigInt("0xC8563C55CB19211C"),BigInt("0x5E7BDBF1E3AC9DEC"),BigInt("0x21152B39D3991495"),BigInt("0xA0A63A6183C78F1E"),BigInt("0xDFC8CAA9B3F20667"),BigInt("0x97193E827BED2B63"),BigInt("0xE877CE4A4BD8A21A"),BigInt("0x69C4DF121B863991"),BigInt("0x16AA2FDA2BB3B0E8"),BigInt("0xF86737458BB86399"),BigInt("0x8709C78DBB8DEAE0"),BigInt("0x06BAD6D5EBD3716B"),BigInt("0x79D4261DDBE6F812"),BigInt("0x3105D23613F9D516"),BigInt("0x4E6B22FE23CC5C6F"),BigInt("0xCFD833A67392C7E4"),BigInt("0xB0B6C36E43A74E9D"),BigInt("0x9A6C9329AC4BC9B5"),BigInt("0xE50263E19C7E40CC"),BigInt("0x64B172B9CC20DB47"),BigInt("0x1BDF8271FC15523E"),BigInt("0x530E765A340A7F3A"),BigInt("0x2C608692043FF643"),BigInt("0xADD397CA54616DC8"),BigInt("0xD2BD67026454E4B1"),BigInt("0x3C707F9DC45F37C0"),BigInt("0x431E8F55F46ABEB9"),BigInt("0xC2AD9E0DA4342532"),BigInt("0xBDC36EC59401AC4B"),BigInt("0xF5129AEE5C1E814F"),BigInt("0x8A7C6A266C2B0836"),BigInt("0x0BCF7B7E3C7593BD"),BigInt("0x74A18BB60C401AC4"),BigInt("0xE28C6C1224F5A634"),BigInt("0x9DE29CDA14C02F4D"),BigInt("0x1C518D82449EB4C6"),BigInt("0x633F7D4A74AB3DBF"),BigInt("0x2BEE8961BCB410BB"),BigInt("0x548079A98C8199C2"),BigInt("0xD53368F1DCDF0249"),BigInt("0xAA5D9839ECEA8B30"),BigInt("0x449080A64CE15841"),BigInt("0x3BFE706E7CD4D138"),BigInt("0xBA4D61362C8A4AB3"),BigInt("0xC52391FE1CBFC3CA"),BigInt("0x8DF265D5D4A0EECE"),BigInt("0xF29C951DE49567B7"),BigInt("0x732F8445B4CBFC3C"),BigInt("0x0C41748D84FE7545"),BigInt("0x6BAD6D5EBD3716B7"),BigInt("0x14C39D968D029FCE"),BigInt("0x95708CCEDD5C0445"),BigInt("0xEA1E7C06ED698D3C"),BigInt("0xA2CF882D2576A038"),BigInt("0xDDA178E515432941"),BigInt("0x5C1269BD451DB2CA"),BigInt("0x237C997575283BB3"),BigInt("0xCDB181EAD523E8C2"),BigInt("0xB2DF7122E51661BB"),BigInt("0x336C607AB548FA30"),BigInt("0x4C0290B2857D7349"),BigInt("0x04D364994D625E4D"),BigInt("0x7BBD94517D57D734"),BigInt("0xFA0E85092D094CBF"),BigInt("0x856075C11D3CC5C6"),BigInt("0x134D926535897936"),BigInt("0x6C2362AD05BCF04F"),BigInt("0xED9073F555E26BC4"),BigInt("0x92FE833D65D7E2BD"),BigInt("0xDA2F7716ADC8CFB9"),BigInt("0xA54187DE9DFD46C0"),BigInt("0x24F29686CDA3DD4B"),BigInt("0x5B9C664EFD965432"),BigInt("0xB5517ED15D9D8743"),BigInt("0xCA3F8E196DA80E3A"),BigInt("0x4B8C9F413DF695B1"),BigInt("0x34E26F890DC31CC8"),BigInt("0x7C339BA2C5DC31CC"),BigInt("0x035D6B6AF5E9B8B5"),BigInt("0x82EE7A32A5B7233E"),BigInt("0xFD808AFA9582AA47"),BigInt("0x4D364994D625E4DA"),BigInt("0x3258B95CE6106DA3"),BigInt("0xB3EBA804B64EF628"),BigInt("0xCC8558CC867B7F51"),BigInt("0x8454ACE74E645255"),BigInt("0xFB3A5C2F7E51DB2C"),BigInt("0x7A894D772E0F40A7"),BigInt("0x05E7BDBF1E3AC9DE"),BigInt("0xEB2AA520BE311AAF"),BigInt("0x944455E88E0493D6"),BigInt("0x15F744B0DE5A085D"),BigInt("0x6A99B478EE6F8124"),BigInt("0x224840532670AC20"),BigInt("0x5D26B09B16452559"),BigInt("0xDC95A1C3461BBED2"),BigInt("0xA3FB510B762E37AB"),BigInt("0x35D6B6AF5E9B8B5B"),BigInt("0x4AB846676EAE0222"),BigInt("0xCB0B573F3EF099A9"),BigInt("0xB465A7F70EC510D0"),BigInt("0xFCB453DCC6DA3DD4"),BigInt("0x83DAA314F6EFB4AD"),BigInt("0x0269B24CA6B12F26"),BigInt("0x7D0742849684A65F"),BigInt("0x93CA5A1B368F752E"),BigInt("0xECA4AAD306BAFC57"),BigInt("0x6D17BB8B56E467DC"),BigInt("0x12794B4366D1EEA5"),BigInt("0x5AA8BF68AECEC3A1"),BigInt("0x25C64FA09EFB4AD8"),BigInt("0xA4755EF8CEA5D153"),BigInt("0xDB1BAE30FE90582A"),BigInt("0xBCF7B7E3C7593BD8"),BigInt("0xC399472BF76CB2A1"),BigInt("0x422A5673A732292A"),BigInt("0x3D44A6BB9707A053"),BigInt("0x759552905F188D57"),BigInt("0x0AFBA2586F2D042E"),BigInt("0x8B48B3003F739FA5"),BigInt("0xF42643C80F4616DC"),BigInt("0x1AEB5B57AF4DC5AD"),BigInt("0x6585AB9F9F784CD4"),BigInt("0xE436BAC7CF26D75F"),BigInt("0x9B584A0FFF135E26"),BigInt("0xD389BE24370C7322"),BigInt("0xACE74EEC0739FA5B"),BigInt("0x2D545FB4576761D0"),BigInt("0x523AAF7C6752E8A9"),BigInt("0xC41748D84FE75459"),BigInt("0xBB79B8107FD2DD20"),BigInt("0x3ACAA9482F8C46AB"),BigInt("0x45A459801FB9CFD2"),BigInt("0x0D75ADABD7A6E2D6"),BigInt("0x721B5D63E7936BAF"),BigInt("0xF3A84C3BB7CDF024"),BigInt("0x8CC6BCF387F8795D"),BigInt("0x620BA46C27F3AA2C"),BigInt("0x1D6554A417C62355"),BigInt("0x9CD645FC4798B8DE"),BigInt("0xE3B8B53477AD31A7"),BigInt("0xAB69411FBFB21CA3"),BigInt("0xD407B1D78F8795DA"),BigInt("0x55B4A08FDFD90E51"),BigInt("0x2ADA5047EFEC8728")];class CRC64{constructor(){this._crc=BigInt(0)}update(A){const e=typeof A==="string"?Buffer.from(A):A;let r=CRC64.flip64Bits(this._crc);for(const A of e){const e=Number(r&BigInt(255));r=t[e^A]^r>>BigInt(8)}this._crc=CRC64.flip64Bits(r)}digest(A){switch(A){case"hex":return this._crc.toString(16).toUpperCase();case"base64":return this.toBuffer().toString("base64");default:return this.toBuffer()}}toBuffer(){return Buffer.from([0,8,16,24,32,40,48,56].map((A=>Number(this._crc>>BigInt(A)&BigInt(255)))))}static flip64Bits(A){return(BigInt(1)<<BigInt(64))-BigInt(1)-A}}e["default"]=CRC64},1333:function(A,e,t){"use strict";var r=this&&this.__createBinding||(Object.create?function(A,e,t,r){if(r===undefined)r=t;var n=Object.getOwnPropertyDescriptor(e,t);if(!n||("get"in n?!e.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return e[t]}}}Object.defineProperty(A,r,n)}:function(A,e,t,r){if(r===undefined)r=t;A[r]=e[t]});var n=this&&this.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:true,value:e})}:function(A,e){A["default"]=e});var s=this&&this.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)if(t!=="default"&&Object.prototype.hasOwnProperty.call(A,t))r(e,A,t);n(e,A);return e};var i=this&&this.__awaiter||function(A,e,t,r){function adopt(A){return A instanceof t?A:new t((function(e){e(A)}))}return new(t||(t=Promise))((function(t,n){function fulfilled(A){try{step(r.next(A))}catch(A){n(A)}}function rejected(A){try{step(r["throw"](A))}catch(A){n(A)}}function step(A){A.done?t(A.value):adopt(A.value).then(fulfilled,rejected)}step((r=r.apply(A,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.DownloadHttpClient=void 0;const o=s(t(7147));const a=s(t(3949));const c=s(t(9796));const g=t(6893);const l=t(7310);const E=t(9926);const h=t(4074);const Q=t(7672);const u=t(9224);const C=t(4747);class DownloadHttpClient{constructor(){this.downloadHttpManager=new Q.HttpManager((0,u.getDownloadFileConcurrency)(),"@actions/artifact-download");this.statusReporter=new E.StatusReporter(1e3)}listArtifacts(){return i(this,void 0,void 0,(function*(){const A=(0,g.getArtifactUrl)();const e=this.downloadHttpManager.getClient(0);const t=(0,g.getDownloadHeaders)("application/json");const r=yield(0,C.retryHttpClientRequest)("List Artifacts",(()=>i(this,void 0,void 0,(function*(){return e.get(A,t)}))));const n=yield r.readBody();return JSON.parse(n)}))}getContainerItems(A,e){return i(this,void 0,void 0,(function*(){const t=new l.URL(e);t.searchParams.append("itemPath",A);const r=this.downloadHttpManager.getClient(0);const n=(0,g.getDownloadHeaders)("application/json");const s=yield(0,C.retryHttpClientRequest)("Get Container Items",(()=>i(this,void 0,void 0,(function*(){return r.get(t.toString(),n)}))));const o=yield s.readBody();return JSON.parse(o)}))}downloadSingleArtifact(A){return i(this,void 0,void 0,(function*(){const e=(0,u.getDownloadFileConcurrency)();a.debug(`Download file concurrency is set to ${e}`);const t=[...new Array(e).keys()];let r=0;let n=0;a.info(`Total number of files that will be downloaded: ${A.length}`);this.statusReporter.setTotalNumberOfFilesToProcess(A.length);this.statusReporter.start();yield Promise.all(t.map((e=>i(this,void 0,void 0,(function*(){while(r<A.length){const t=A[r];r+=1;const s=h.performance.now();yield this.downloadIndividualFile(e,t.sourceLocation,t.targetPath);if(a.isDebug()){a.debug(`File: ${++n}/${A.length}. ${t.targetPath} took ${(h.performance.now()-s).toFixed(3)} milliseconds to finish downloading`)}this.statusReporter.incrementProcessedCount()}}))))).catch((A=>{throw new Error(`Unable to download the artifact: ${A}`)})).finally((()=>{this.statusReporter.stop();this.downloadHttpManager.disposeAndReplaceAllClients()}))}))}downloadIndividualFile(A,e,t){return i(this,void 0,void 0,(function*(){let r=0;const n=(0,u.getRetryLimit)();let s=o.createWriteStream(t);const c=(0,g.getDownloadHeaders)("application/json",true,true);const makeDownloadRequest=()=>i(this,void 0,void 0,(function*(){const t=this.downloadHttpManager.getClient(A);return yield t.get(e,c)}));const isGzip=A=>"content-encoding"in A&&A["content-encoding"]==="gzip";const backOff=t=>i(this,void 0,void 0,(function*(){r++;if(r>n){return Promise.reject(new Error(`Retry limit has been reached. Unable to download ${e}`))}else{this.downloadHttpManager.disposeAndReplaceClient(A);if(t){a.info(`Backoff due to too many requests, retry #${r}. Waiting for ${t} milliseconds before continuing the download`);yield(0,g.sleep)(t)}else{const A=(0,g.getExponentialRetryTimeInMilliseconds)(r);a.info(`Exponential backoff for retry #${r}. Waiting for ${A} milliseconds before continuing the download`);yield(0,g.sleep)(A)}a.info(`Finished backoff for retry #${r}, continuing with download`)}}));const isAllBytesReceived=(A,e)=>{if(!A||!e||process.env["ACTIONS_ARTIFACT_SKIP_DOWNLOAD_VALIDATION"]){a.info("Skipping download validation.");return true}return parseInt(A)===e};const resetDestinationStream=A=>i(this,void 0,void 0,(function*(){s.close();yield new Promise((A=>{s.on("close",A);if(s.writableFinished){A()}}));yield(0,g.rmFile)(A);s=o.createWriteStream(A)}));while(r<=n){let A;try{A=yield makeDownloadRequest()}catch(A){a.info("An error occurred while attempting to download a file");console.log(A);yield backOff();continue}let r=false;if((0,g.isSuccessStatusCode)(A.message.statusCode)){try{const e=isGzip(A.message.headers);yield this.pipeResponseToFile(A,s,e);if(e||isAllBytesReceived(A.message.headers["content-length"],yield(0,g.getFileSize)(t))){return}else{r=true}}catch(A){r=true}}if(r||(0,g.isRetryableStatusCode)(A.message.statusCode)){a.info(`A ${A.message.statusCode} response code has been received while attempting to download an artifact`);resetDestinationStream(t);(0,g.isThrottledStatusCode)(A.message.statusCode)?yield backOff((0,g.tryGetRetryAfterValueTimeInMilliseconds)(A.message.headers)):yield backOff()}else{(0,g.displayHttpDiagnostics)(A);return Promise.reject(new Error(`Unexpected http ${A.message.statusCode} during download for ${e}`))}}}))}pipeResponseToFile(A,e,t){return i(this,void 0,void 0,(function*(){yield new Promise(((r,n)=>{if(t){const t=c.createGunzip();A.message.on("error",(A=>{a.info(`An error occurred while attempting to read the response stream`);t.close();e.close();n(A)})).pipe(t).on("error",(A=>{a.info(`An error occurred while attempting to decompress the response stream`);e.close();n(A)})).pipe(e).on("close",(()=>{r()})).on("error",(A=>{a.info(`An error occurred while writing a downloaded file to ${e.path}`);n(A)}))}else{A.message.on("error",(A=>{a.info(`An error occurred while attempting to read the response stream`);e.close();n(A)})).pipe(e).on("close",(()=>{r()})).on("error",(A=>{a.info(`An error occurred while writing a downloaded file to ${e.path}`);n(A)}))}}));return}))}}e.DownloadHttpClient=DownloadHttpClient},8539:function(A,e,t){"use strict";var r=this&&this.__createBinding||(Object.create?function(A,e,t,r){if(r===undefined)r=t;var n=Object.getOwnPropertyDescriptor(e,t);if(!n||("get"in n?!e.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return e[t]}}}Object.defineProperty(A,r,n)}:function(A,e,t,r){if(r===undefined)r=t;A[r]=e[t]});var n=this&&this.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:true,value:e})}:function(A,e){A["default"]=e});var s=this&&this.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)if(t!=="default"&&Object.prototype.hasOwnProperty.call(A,t))r(e,A,t);n(e,A);return e};Object.defineProperty(e,"__esModule",{value:true});e.getDownloadSpecification=void 0;const i=s(t(1017));function getDownloadSpecification(A,e,t,r){const n=new Set;const s={rootDownloadLocation:r?i.join(t,A):t,directoryStructure:[],emptyFilesToCreate:[],filesToDownload:[]};for(const o of e){if(o.path.startsWith(`${A}/`)||o.path.startsWith(`${A}\\`)){const e=i.normalize(o.path);const a=i.join(t,r?e:e.replace(A,""));if(o.itemType==="file"){n.add(i.dirname(a));if(o.fileLength===0){s.emptyFilesToCreate.push(a)}else{s.filesToDownload.push({sourceLocation:o.contentLocation,targetPath:a})}}}}s.directoryStructure=Array.from(n);return s}e.getDownloadSpecification=getDownloadSpecification},7672:(A,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.HttpManager=void 0;const r=t(6893);class HttpManager{constructor(A,e){if(A<1){throw new Error("There must be at least one client")}this.userAgent=e;this.clients=new Array(A).fill((0,r.createHttpClient)(e))}getClient(A){return this.clients[A]}disposeAndReplaceClient(A){this.clients[A].dispose();this.clients[A]=(0,r.createHttpClient)(this.userAgent)}disposeAndReplaceAllClients(){for(const[A]of this.clients.entries()){this.disposeAndReplaceClient(A)}}}e.HttpManager=HttpManager},7489:(A,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.checkArtifactFilePath=e.checkArtifactName=void 0;const r=t(3949);const n=new Map([['"',' Double quote "'],[":"," Colon :"],["<"," Less than <"],[">"," Greater than >"],["|"," Vertical bar |"],["*"," Asterisk *"],["?"," Question mark ?"],["\r"," Carriage return \\r"],["\n"," Line feed \\n"]]);const s=new Map([...n,["\\"," Backslash \\"],["/"," Forward slash /"]]);function checkArtifactName(A){if(!A){throw new Error(`Artifact name: ${A}, is incorrectly provided`)}for(const[e,t]of s){if(A.includes(e)){throw new Error(`Artifact name is not valid: ${A}. Contains the following character: ${t}\n \nInvalid characters include: ${Array.from(s.values()).toString()}\n \nThese characters are not allowed in the artifact name due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.`)}}(0,r.info)(`Artifact name is valid!`)}e.checkArtifactName=checkArtifactName;function checkArtifactFilePath(A){if(!A){throw new Error(`Artifact path: ${A}, is incorrectly provided`)}for(const[e,t]of n){if(A.includes(e)){throw new Error(`Artifact path is not valid: ${A}. Contains the following character: ${t}\n \nInvalid characters include: ${Array.from(n.values()).toString()}\n \nThe following characters are not allowed in files that are uploaded due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.\n `)}}}e.checkArtifactFilePath=checkArtifactFilePath},4747:function(A,e,t){"use strict";var r=this&&this.__createBinding||(Object.create?function(A,e,t,r){if(r===undefined)r=t;var n=Object.getOwnPropertyDescriptor(e,t);if(!n||("get"in n?!e.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return e[t]}}}Object.defineProperty(A,r,n)}:function(A,e,t,r){if(r===undefined)r=t;A[r]=e[t]});var n=this&&this.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:true,value:e})}:function(A,e){A["default"]=e});var s=this&&this.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)if(t!=="default"&&Object.prototype.hasOwnProperty.call(A,t))r(e,A,t);n(e,A);return e};var i=this&&this.__awaiter||function(A,e,t,r){function adopt(A){return A instanceof t?A:new t((function(e){e(A)}))}return new(t||(t=Promise))((function(t,n){function fulfilled(A){try{step(r.next(A))}catch(A){n(A)}}function rejected(A){try{step(r["throw"](A))}catch(A){n(A)}}function step(A){A.done?t(A.value):adopt(A.value).then(fulfilled,rejected)}step((r=r.apply(A,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.retryHttpClientRequest=e.retry=void 0;const o=t(6893);const a=s(t(3949));const c=t(9224);function retry(A,e,t,r){return i(this,void 0,void 0,(function*(){let n=undefined;let s=undefined;let i=false;let c="";let g=undefined;let l=1;while(l<=r){try{n=yield e();s=n.message.statusCode;if((0,o.isSuccessStatusCode)(s)){return n}if(s){g=t.get(s)}i=(0,o.isRetryableStatusCode)(s);c=`Artifact service responded with ${s}`}catch(A){i=true;c=A.message}if(!i){a.info(`${A} - Error is not retryable`);if(n){(0,o.displayHttpDiagnostics)(n)}break}a.info(`${A} - Attempt ${l} of ${r} failed with error: ${c}`);yield(0,o.sleep)((0,o.getExponentialRetryTimeInMilliseconds)(l));l++}if(n){(0,o.displayHttpDiagnostics)(n)}if(g){throw Error(`${A} failed: ${g}`)}throw Error(`${A} failed: ${c}`)}))}e.retry=retry;function retryHttpClientRequest(A,e,t=new Map,r=(0,c.getRetryLimit)()){return i(this,void 0,void 0,(function*(){return yield retry(A,e,t,r)}))}e.retryHttpClientRequest=retryHttpClientRequest},9926:(A,e,t)=>{"use strict";Object.defineProperty(e,"__esModule",{value:true});e.StatusReporter=void 0;const r=t(3949);class StatusReporter{constructor(A){this.totalNumberOfFilesToProcess=0;this.processedCount=0;this.largeFiles=new Map;this.totalFileStatus=undefined;this.displayFrequencyInMilliseconds=A}setTotalNumberOfFilesToProcess(A){this.totalNumberOfFilesToProcess=A;this.processedCount=0}start(){this.totalFileStatus=setInterval((()=>{const A=this.formatPercentage(this.processedCount,this.totalNumberOfFilesToProcess);(0,r.info)(`Total file count: ${this.totalNumberOfFilesToProcess} ---- Processed file #${this.processedCount} (${A.slice(0,A.indexOf(".")+2)}%)`)}),this.displayFrequencyInMilliseconds)}updateLargeFileStatus(A,e,t,n){const s=this.formatPercentage(t,n);(0,r.info)(`Uploaded ${A} (${s.slice(0,s.indexOf(".")+2)}%) bytes ${e}:${t}`)}stop(){if(this.totalFileStatus){clearInterval(this.totalFileStatus)}}incrementProcessedCount(){this.processedCount++}formatPercentage(A,e){return(A/e*100).toFixed(4).toString()}}e.StatusReporter=StatusReporter},2552:function(A,e,t){"use strict";var r=this&&this.__createBinding||(Object.create?function(A,e,t,r){if(r===undefined)r=t;var n=Object.getOwnPropertyDescriptor(e,t);if(!n||("get"in n?!e.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return e[t]}}}Object.defineProperty(A,r,n)}:function(A,e,t,r){if(r===undefined)r=t;A[r]=e[t]});var n=this&&this.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:true,value:e})}:function(A,e){A["default"]=e});var s=this&&this.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)if(t!=="default"&&Object.prototype.hasOwnProperty.call(A,t))r(e,A,t);n(e,A);return e};var i=this&&this.__awaiter||function(A,e,t,r){function adopt(A){return A instanceof t?A:new t((function(e){e(A)}))}return new(t||(t=Promise))((function(t,n){function fulfilled(A){try{step(r.next(A))}catch(A){n(A)}}function rejected(A){try{step(r["throw"](A))}catch(A){n(A)}}function step(A){A.done?t(A.value):adopt(A.value).then(fulfilled,rejected)}step((r=r.apply(A,e||[])).next())}))};var o=this&&this.__asyncValues||function(A){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=A[Symbol.asyncIterator],t;return e?e.call(A):(A=typeof __values==="function"?__values(A):A[Symbol.iterator](),t={},verb("next"),verb("throw"),verb("return"),t[Symbol.asyncIterator]=function(){return this},t);function verb(e){t[e]=A[e]&&function(t){return new Promise((function(r,n){t=A[e](t),settle(r,n,t.done,t.value)}))}}function settle(A,e,t,r){Promise.resolve(r).then((function(e){A({value:e,done:t})}),e)}};Object.defineProperty(e,"__esModule",{value:true});e.createGZipFileInBuffer=e.createGZipFileOnDisk=void 0;const a=s(t(7147));const c=s(t(9796));const g=t(3837);const l=(0,g.promisify)(a.stat);const E=[".gz",".gzip",".tgz",".taz",".Z",".taZ",".bz2",".tbz",".tbz2",".tz2",".lz",".lzma",".tlz",".lzo",".xz",".txz",".zst",".zstd",".tzst",".zip",".7z"];function createGZipFileOnDisk(A,e){return i(this,void 0,void 0,(function*(){for(const e of E){if(A.endsWith(e)){return Number.MAX_SAFE_INTEGER}}return new Promise(((t,r)=>{const n=a.createReadStream(A);const s=c.createGzip();const o=a.createWriteStream(e);n.pipe(s).pipe(o);o.on("finish",(()=>i(this,void 0,void 0,(function*(){const A=(yield l(e)).size;t(A)}))));o.on("error",(A=>{console.log(A);r(A)}))}))}))}e.createGZipFileOnDisk=createGZipFileOnDisk;function createGZipFileInBuffer(A){return i(this,void 0,void 0,(function*(){return new Promise((e=>i(this,void 0,void 0,(function*(){var t,r,n,s;const i=a.createReadStream(A);const g=c.createGzip();i.pipe(g);const l=[];try{for(var E=true,h=o(g),Q;Q=yield h.next(),t=Q.done,!t;){s=Q.value;E=false;try{const A=s;l.push(A)}finally{E=true}}}catch(A){r={error:A}}finally{try{if(!E&&!t&&(n=h.return))yield n.call(h)}finally{if(r)throw r.error}}e(Buffer.concat(l))}))))}))}e.createGZipFileInBuffer=createGZipFileInBuffer},2858:function(A,e,t){"use strict";var r=this&&this.__createBinding||(Object.create?function(A,e,t,r){if(r===undefined)r=t;var n=Object.getOwnPropertyDescriptor(e,t);if(!n||("get"in n?!e.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return e[t]}}}Object.defineProperty(A,r,n)}:function(A,e,t,r){if(r===undefined)r=t;A[r]=e[t]});var n=this&&this.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:true,value:e})}:function(A,e){A["default"]=e});var s=this&&this.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)if(t!=="default"&&Object.prototype.hasOwnProperty.call(A,t))r(e,A,t);n(e,A);return e};var i=this&&this.__awaiter||function(A,e,t,r){function adopt(A){return A instanceof t?A:new t((function(e){e(A)}))}return new(t||(t=Promise))((function(t,n){function fulfilled(A){try{step(r.next(A))}catch(A){n(A)}}function rejected(A){try{step(r["throw"](A))}catch(A){n(A)}}function step(A){A.done?t(A.value):adopt(A.value).then(fulfilled,rejected)}step((r=r.apply(A,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.UploadHttpClient=void 0;const o=s(t(7147));const a=s(t(3949));const c=s(t(2751));const g=s(t(2781));const l=t(6893);const E=t(9224);const h=t(3837);const Q=t(7310);const u=t(4074);const C=t(9926);const B=t(5753);const I=t(7672);const d=t(2552);const p=t(4747);const y=(0,h.promisify)(o.stat);class UploadHttpClient{constructor(){this.uploadHttpManager=new I.HttpManager((0,E.getUploadFileConcurrency)(),"@actions/artifact-upload");this.statusReporter=new C.StatusReporter(1e4)}createArtifactInFileContainer(A,e){return i(this,void 0,void 0,(function*(){const t={Type:"actions_storage",Name:A};if(e&&e.retentionDays){const A=(0,E.getRetentionDays)();t.RetentionDays=(0,l.getProperRetention)(e.retentionDays,A)}const r=JSON.stringify(t,null,2);const n=(0,l.getArtifactUrl)();const s=this.uploadHttpManager.getClient(0);const o=(0,l.getUploadHeaders)("application/json",false);const a=new Map([[B.HttpCodes.Forbidden,(0,E.isGhes)()?"Please reference [Enabling GitHub Actions for GitHub Enterprise Server](https://docs.github.com/en/enterprise-server@3.8/admin/github-actions/enabling-github-actions-for-github-enterprise-server) to ensure Actions storage is configured correctly.":"Artifact storage quota has been hit. Unable to upload any new artifacts"],[B.HttpCodes.BadRequest,`The artifact name ${A} is not valid. Request URL ${n}`]]);const c=yield(0,p.retryHttpClientRequest)("Create Artifact Container",(()=>i(this,void 0,void 0,(function*(){return s.post(n,r,o)}))),a);const g=yield c.readBody();return JSON.parse(g)}))}uploadArtifactToFileContainer(A,e,t){return i(this,void 0,void 0,(function*(){const r=(0,E.getUploadFileConcurrency)();const n=(0,E.getUploadChunkSize)();a.debug(`File Concurrency: ${r}, and Chunk Size: ${n}`);const s=[];let o=true;if(t){if(t.continueOnError===false){o=false}}for(const t of e){const e=new Q.URL(A);e.searchParams.append("itemPath",t.uploadFilePath);s.push({file:t.absoluteFilePath,resourceUrl:e.toString(),maxChunkSize:n,continueOnError:o})}const c=[...new Array(r).keys()];const g=[];let l=0;let h=0;let C=0;let B=0;let I=false;this.statusReporter.setTotalNumberOfFilesToProcess(e.length);this.statusReporter.start();yield Promise.all(c.map((A=>i(this,void 0,void 0,(function*(){while(l<e.length){const t=s[l];l+=1;if(I){g.push(t.file);continue}const r=u.performance.now();const n=yield this.uploadFileAsync(A,t);if(a.isDebug()){a.debug(`File: ${++h}/${e.length}. ${t.file} took ${(u.performance.now()-r).toFixed(3)} milliseconds to finish upload`)}C+=n.successfulUploadSize;B+=n.totalSize;if(n.isSuccess===false){g.push(t.file);if(!o){a.error(`aborting artifact upload`);I=true}}this.statusReporter.incrementProcessedCount()}})))));this.statusReporter.stop();this.uploadHttpManager.disposeAndReplaceAllClients();a.info(`Total size of all the files uploaded is ${C} bytes`);return{uploadSize:C,totalSize:B,failedItems:g}}))}uploadFileAsync(A,e){return i(this,void 0,void 0,(function*(){const t=yield y(e.file);const r=t.size;const n=t.isFIFO();let s=0;let i=true;let l=0;let E=0;let h=true;if(!n&&r<65536){a.debug(`${e.file} is less than 64k in size. Creating a gzip file in-memory to potentially reduce the upload size`);const t=yield(0,d.createGZipFileInBuffer)(e.file);let n;if(r<t.byteLength){a.debug(`The gzip file created for ${e.file} did not help with reducing the size of the file. The original file will be uploaded as-is`);n=()=>o.createReadStream(e.file);h=false;E=r}else{a.debug(`A gzip file created for ${e.file} helped with reducing the size of the original file. The file will be uploaded using gzip.`);n=()=>{const A=new g.PassThrough;A.end(t);return A};E=t.byteLength}const s=yield this.uploadChunk(A,e.resourceUrl,n,0,E-1,E,h,r);if(!s){i=false;l+=E;a.warning(`Aborting upload for ${e.file} due to failure`)}return{isSuccess:i,successfulUploadSize:E-l,totalSize:r}}else{const t=yield c.file();a.debug(`${e.file} is greater than 64k in size. Creating a gzip file on-disk ${t.path} to potentially reduce the upload size`);E=yield(0,d.createGZipFileOnDisk)(e.file,t.path);let g=t.path;if(!n&&r<E){a.debug(`The gzip file created for ${e.file} did not help with reducing the size of the file. The original file will be uploaded as-is`);E=r;g=e.file;h=false}else{a.debug(`The gzip file created for ${e.file} is smaller than the original file. The file will be uploaded using gzip.`)}let Q=false;while(s<E){const t=Math.min(E-s,e.maxChunkSize);const n=s;const c=s+t-1;s+=e.maxChunkSize;if(Q){l+=t;continue}const u=yield this.uploadChunk(A,e.resourceUrl,(()=>o.createReadStream(g,{start:n,end:c,autoClose:false})),n,c,E,h,r);if(!u){i=false;l+=t;a.warning(`Aborting upload for ${e.file} due to failure`);Q=true}else{if(E>8388608){this.statusReporter.updateLargeFileStatus(e.file,n,c,E)}}}a.debug(`deleting temporary gzip file ${t.path}`);yield t.cleanup();return{isSuccess:i,successfulUploadSize:E-l,totalSize:r}}}))}uploadChunk(A,e,t,r,n,s,o,c){return i(this,void 0,void 0,(function*(){const g=yield(0,l.digestForStream)(t());const h=(0,l.getUploadHeaders)("application/octet-stream",true,o,c,n-r+1,(0,l.getContentRange)(r,n,s),g);const uploadChunkRequest=()=>i(this,void 0,void 0,(function*(){const r=this.uploadHttpManager.getClient(A);return yield r.sendStream("PUT",e,t(),h)}));let Q=0;const u=(0,E.getRetryLimit)();const incrementAndCheckRetryLimit=A=>{Q++;if(Q>u){if(A){(0,l.displayHttpDiagnostics)(A)}a.info(`Retry limit has been reached for chunk at offset ${r} to ${e}`);return true}return false};const backOff=e=>i(this,void 0,void 0,(function*(){this.uploadHttpManager.disposeAndReplaceClient(A);if(e){a.info(`Backoff due to too many requests, retry #${Q}. Waiting for ${e} milliseconds before continuing the upload`);yield(0,l.sleep)(e)}else{const A=(0,l.getExponentialRetryTimeInMilliseconds)(Q);a.info(`Exponential backoff for retry #${Q}. Waiting for ${A} milliseconds before continuing the upload at offset ${r}`);yield(0,l.sleep)(A)}a.info(`Finished backoff for retry #${Q}, continuing with upload`);return}));while(Q<=u){let t;try{t=yield uploadChunkRequest()}catch(e){a.info(`An error has been caught http-client index ${A}, retrying the upload`);console.log(e);if(incrementAndCheckRetryLimit()){return false}yield backOff();continue}yield t.readBody();if((0,l.isSuccessStatusCode)(t.message.statusCode)){return true}else if((0,l.isRetryableStatusCode)(t.message.statusCode)){a.info(`A ${t.message.statusCode} status code has been received, will attempt to retry the upload`);if(incrementAndCheckRetryLimit(t)){return false}(0,l.isThrottledStatusCode)(t.message.statusCode)?yield backOff((0,l.tryGetRetryAfterValueTimeInMilliseconds)(t.message.headers)):yield backOff()}else{a.error(`Unexpected response. Unable to upload chunk to ${e}`);(0,l.displayHttpDiagnostics)(t);return false}}return false}))}patchArtifactSize(A,e){return i(this,void 0,void 0,(function*(){const t=new Q.URL((0,l.getArtifactUrl)());t.searchParams.append("artifactName",e);const r={Size:A};const n=JSON.stringify(r,null,2);a.debug(`URL is ${t.toString()}`);const s=this.uploadHttpManager.getClient(0);const o=(0,l.getUploadHeaders)("application/json",false);const c=new Map([[B.HttpCodes.NotFound,`An Artifact with the name ${e} was not found`]]);const g=yield(0,p.retryHttpClientRequest)("Finalize artifact upload",(()=>i(this,void 0,void 0,(function*(){return s.patch(t.toString(),n,o)}))),c);yield g.readBody();a.debug(`Artifact ${e} has been successfully uploaded, total size in bytes: ${A}`)}))}}e.UploadHttpClient=UploadHttpClient},5554:function(A,e,t){"use strict";var r=this&&this.__createBinding||(Object.create?function(A,e,t,r){if(r===undefined)r=t;var n=Object.getOwnPropertyDescriptor(e,t);if(!n||("get"in n?!e.__esModule:n.writable||n.configurable)){n={enumerable:true,get:function(){return e[t]}}}Object.defineProperty(A,r,n)}:function(A,e,t,r){if(r===undefined)r=t;A[r]=e[t]});var n=this&&this.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:true,value:e})}:function(A,e){A["default"]=e});var s=this&&this.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)if(t!=="default"&&Object.prototype.hasOwnProperty.call(A,t))r(e,A,t);n(e,A);return e};Object.defineProperty(e,"__esModule",{value:true});e.getUploadSpecification=void 0;const i=s(t(7147));const o=t(3949);const a=t(1017);const c=t(7489);function getUploadSpecification(A,e,t){const r=[];if(!i.existsSync(e)){throw new Error(`Provided rootDirectory ${e} does not exist`)}if(!i.statSync(e).isDirectory()){throw new Error(`Provided rootDirectory ${e} is not a valid directory`)}e=(0,a.normalize)(e);e=(0,a.resolve)(e);for(let n of t){if(!i.existsSync(n)){throw new Error(`File ${n} does not exist`)}if(!i.statSync(n).isDirectory()){n=(0,a.normalize)(n);n=(0,a.resolve)(n);if(!n.startsWith(e)){throw new Error(`The rootDirectory: ${e} is not a parent directory of the file: ${n}`)}const t=n.replace(e,"");(0,c.checkArtifactFilePath)(t);r.push({absoluteFilePath:n,uploadFilePath:(0,a.join)(A,t)})}else{(0,o.debug)(`Removing ${n} from rawSearchResults because it is a directory`)}}return r}e.getUploadSpecification=getUploadSpecification},6893:function(A,e,t){"use strict";var r=this&&this.__awaiter||function(A,e,t,r){function adopt(A){return A instanceof t?A:new t((function(e){e(A)}))}return new(t||(t=Promise))((function(t,n){function fulfilled(A){try{step(r.next(A))}catch(A){n(A)}}function rejected(A){try{step(r["throw"](A))}catch(A){n(A)}}function step(A){A.done?t(A.value):adopt(A.value).then(fulfilled,rejected)}step((r=r.apply(A,e||[])).next())}))};var n=this&&this.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(e,"__esModule",{value:true});e.digestForStream=e.sleep=e.getProperRetention=e.rmFile=e.getFileSize=e.createEmptyFilesForArtifact=e.createDirectoriesForArtifact=e.displayHttpDiagnostics=e.getArtifactUrl=e.createHttpClient=e.getUploadHeaders=e.getDownloadHeaders=e.getContentRange=e.tryGetRetryAfterValueTimeInMilliseconds=e.isThrottledStatusCode=e.isRetryableStatusCode=e.isForbiddenStatusCode=e.isSuccessStatusCode=e.getApiVersion=e.parseEnvNumber=e.getExponentialRetryTimeInMilliseconds=void 0;const s=n(t(6113));const i=t(7147);const o=t(3949);const a=t(5753);const c=t(7910);const g=t(9224);const l=n(t(8063));function getExponentialRetryTimeInMilliseconds(A){if(A<0){throw new Error("RetryCount should not be negative")}else if(A===0){return(0,g.getInitialRetryIntervalInMilliseconds)()}const e=(0,g.getInitialRetryIntervalInMilliseconds)()*(0,g.getRetryMultiplier)()*A;const t=e*(0,g.getRetryMultiplier)();return Math.trunc(Math.random()*(t-e)+e)}e.getExponentialRetryTimeInMilliseconds=getExponentialRetryTimeInMilliseconds;function parseEnvNumber(A){const e=Number(process.env[A]);if(Number.isNaN(e)||e<0){return undefined}return e}e.parseEnvNumber=parseEnvNumber;function getApiVersion(){return"6.0-preview"}e.getApiVersion=getApiVersion;function isSuccessStatusCode(A){if(!A){return false}return A>=200&&A<300}e.isSuccessStatusCode=isSuccessStatusCode;function isForbiddenStatusCode(A){if(!A){return false}return A===a.HttpCodes.Forbidden}e.isForbiddenStatusCode=isForbiddenStatusCode;function isRetryableStatusCode(A){if(!A){return false}const e=[a.HttpCodes.BadGateway,a.HttpCodes.GatewayTimeout,a.HttpCodes.InternalServerError,a.HttpCodes.ServiceUnavailable,a.HttpCodes.TooManyRequests,413];return e.includes(A)}e.isRetryableStatusCode=isRetryableStatusCode;function isThrottledStatusCode(A){if(!A){return false}return A===a.HttpCodes.TooManyRequests}e.isThrottledStatusCode=isThrottledStatusCode;function tryGetRetryAfterValueTimeInMilliseconds(A){if(A["retry-after"]){const e=Number(A["retry-after"]);if(!isNaN(e)){(0,o.info)(`Retry-After header is present with a value of ${e}`);return e*1e3}(0,o.info)(`Returned retry-after header value: ${e} is non-numeric and cannot be used`);return undefined}(0,o.info)(`No retry-after header was found. Dumping all headers for diagnostic purposes`);console.log(A);return undefined}e.tryGetRetryAfterValueTimeInMilliseconds=tryGetRetryAfterValueTimeInMilliseconds;function getContentRange(A,e,t){return`bytes ${A}-${e}/${t}`}e.getContentRange=getContentRange;function getDownloadHeaders(A,e,t){const r={};if(A){r["Content-Type"]=A}if(e){r["Connection"]="Keep-Alive";r["Keep-Alive"]="10"}if(t){r["Accept-Encoding"]="gzip";r["Accept"]=`application/octet-stream;api-version=${getApiVersion()}`}else{r["Accept"]=`application/json;api-version=${getApiVersion()}`}return r}e.getDownloadHeaders=getDownloadHeaders;function getUploadHeaders(A,e,t,r,n,s,i){const o={};o["Accept"]=`application/json;api-version=${getApiVersion()}`;if(A){o["Content-Type"]=A}if(e){o["Connection"]="Keep-Alive";o["Keep-Alive"]="10"}if(t){o["Content-Encoding"]="gzip";o["x-tfs-filelength"]=r}if(n){o["Content-Length"]=n}if(s){o["Content-Range"]=s}if(i){o["x-actions-results-crc64"]=i.crc64;o["x-actions-results-md5"]=i.md5}return o}e.getUploadHeaders=getUploadHeaders;function createHttpClient(A){return new a.HttpClient(A,[new c.BearerCredentialHandler((0,g.getRuntimeToken)())])}e.createHttpClient=createHttpClient;function getArtifactUrl(){const A=`${(0,g.getRuntimeUrl)()}_apis/pipelines/workflows/${(0,g.getWorkFlowRunId)()}/artifacts?api-version=${getApiVersion()}`;(0,o.debug)(`Artifact Url: ${A}`);return A}e.getArtifactUrl=getArtifactUrl;function displayHttpDiagnostics(A){(0,o.info)(`##### Begin Diagnostic HTTP information #####\nStatus Code: ${A.message.statusCode}\nStatus Message: ${A.message.statusMessage}\nHeader Information: ${JSON.stringify(A.message.headers,undefined,2)}\n###### End Diagnostic HTTP information ######`)}e.displayHttpDiagnostics=displayHttpDiagnostics;function createDirectoriesForArtifact(A){return r(this,void 0,void 0,(function*(){for(const e of A){yield i.promises.mkdir(e,{recursive:true})}}))}e.createDirectoriesForArtifact=createDirectoriesForArtifact;function createEmptyFilesForArtifact(A){return r(this,void 0,void 0,(function*(){for(const e of A){yield(yield i.promises.open(e,"w")).close()}}))}e.createEmptyFilesForArtifact=createEmptyFilesForArtifact;function getFileSize(A){return r(this,void 0,void 0,(function*(){const e=yield i.promises.stat(A);(0,o.debug)(`${A} size:(${e.size}) blksize:(${e.blksize}) blocks:(${e.blocks})`);return e.size}))}e.getFileSize=getFileSize;function rmFile(A){return r(this,void 0,void 0,(function*(){yield i.promises.unlink(A)}))}e.rmFile=rmFile;function getProperRetention(A,e){if(A<0){throw new Error("Invalid retention, minimum value is 1.")}let t=A;if(e){const A=parseInt(e);if(!isNaN(A)&&A<t){(0,o.warning)(`Retention days is greater than the max value allowed by the repository setting, reduce retention to ${A} days`);t=A}}return t}e.getProperRetention=getProperRetention;function sleep(A){return r(this,void 0,void 0,(function*(){return new Promise((e=>setTimeout(e,A)))}))}e.sleep=sleep;function digestForStream(A){return r(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{const r=new l.default;const n=s.default.createHash("md5");A.on("data",(A=>{r.update(A);n.update(A)})).on("end",(()=>e({crc64:r.digest("base64"),md5:n.digest("base64")}))).on("error",t)}))}))}e.digestForStream=digestForStream},8911:function(A,e,t){"use strict";var r=this&&this.__createBinding||(Object.create?function(A,e,t,r){if(r===undefined)r=t;Object.defineProperty(A,r,{enumerable:true,get:function(){return e[t]}})}:function(A,e,t,r){if(r===undefined)r=t;A[r]=e[t]});var n=this&&this.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:true,value:e})}:function(A,e){A["default"]=e});var s=this&&this.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)if(t!=="default"&&Object.hasOwnProperty.call(A,t))r(e,A,t);n(e,A);return e};Object.defineProperty(e,"__esModule",{value:true});e.issue=e.issueCommand=void 0;const i=s(t(2037));const o=t(6657);function issueCommand(A,e,t){const r=new Command(A,e,t);process.stdout.write(r.toString()+i.EOL)}e.issueCommand=issueCommand;function issue(A,e=""){issueCommand(A,{},e)}e.issue=issue;const a="::";class Command{constructor(A,e,t){if(!A){A="missing.command"}this.command=A;this.properties=e;this.message=t}toString(){let A=a+this.command;if(this.properties&&Object.keys(this.properties).length>0){A+=" ";let e=true;for(const t in this.properties){if(this.properties.hasOwnProperty(t)){const r=this.properties[t];if(r){if(e){e=false}else{A+=","}A+=`${t}=${escapeProperty(r)}`}}}}A+=`${a}${escapeData(this.message)}`;return A}}function escapeData(A){return o.toCommandValue(A).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(A){return o.toCommandValue(A).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},3949:function(A,e,t){"use strict";var r=this&&this.__createBinding||(Object.create?function(A,e,t,r){if(r===undefined)r=t;Object.defineProperty(A,r,{enumerable:true,get:function(){return e[t]}})}:function(A,e,t,r){if(r===undefined)r=t;A[r]=e[t]});var n=this&&this.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:true,value:e})}:function(A,e){A["default"]=e});var s=this&&this.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)if(t!=="default"&&Object.hasOwnProperty.call(A,t))r(e,A,t);n(e,A);return e};var i=this&&this.__awaiter||function(A,e,t,r){function adopt(A){return A instanceof t?A:new t((function(e){e(A)}))}return new(t||(t=Promise))((function(t,n){function fulfilled(A){try{step(r.next(A))}catch(A){n(A)}}function rejected(A){try{step(r["throw"](A))}catch(A){n(A)}}function step(A){A.done?t(A.value):adopt(A.value).then(fulfilled,rejected)}step((r=r.apply(A,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.getIDToken=e.getState=e.saveState=e.group=e.endGroup=e.startGroup=e.info=e.notice=e.warning=e.error=e.debug=e.isDebug=e.setFailed=e.setCommandEcho=e.setOutput=e.getBooleanInput=e.getMultilineInput=e.getInput=e.addPath=e.setSecret=e.exportVariable=e.ExitCode=void 0;const o=t(8911);const a=t(807);const c=t(6657);const g=s(t(2037));const l=s(t(1017));const E=t(7101);var h;(function(A){A[A["Success"]=0]="Success";A[A["Failure"]=1]="Failure"})(h=e.ExitCode||(e.ExitCode={}));function exportVariable(A,e){const t=c.toCommandValue(e);process.env[A]=t;const r=process.env["GITHUB_ENV"]||"";if(r){return a.issueFileCommand("ENV",a.prepareKeyValueMessage(A,e))}o.issueCommand("set-env",{name:A},t)}e.exportVariable=exportVariable;function setSecret(A){o.issueCommand("add-mask",{},A)}e.setSecret=setSecret;function addPath(A){const e=process.env["GITHUB_PATH"]||"";if(e){a.issueFileCommand("PATH",A)}else{o.issueCommand("add-path",{},A)}process.env["PATH"]=`${A}${l.delimiter}${process.env["PATH"]}`}e.addPath=addPath;function getInput(A,e){const t=process.env[`INPUT_${A.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!t){throw new Error(`Input required and not supplied: ${A}`)}if(e&&e.trimWhitespace===false){return t}return t.trim()}e.getInput=getInput;function getMultilineInput(A,e){const t=getInput(A,e).split("\n").filter((A=>A!==""));if(e&&e.trimWhitespace===false){return t}return t.map((A=>A.trim()))}e.getMultilineInput=getMultilineInput;function getBooleanInput(A,e){const t=["true","True","TRUE"];const r=["false","False","FALSE"];const n=getInput(A,e);if(t.includes(n))return true;if(r.includes(n))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${A}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}e.getBooleanInput=getBooleanInput;function setOutput(A,e){const t=process.env["GITHUB_OUTPUT"]||"";if(t){return a.issueFileCommand("OUTPUT",a.prepareKeyValueMessage(A,e))}process.stdout.write(g.EOL);o.issueCommand("set-output",{name:A},c.toCommandValue(e))}e.setOutput=setOutput;function setCommandEcho(A){o.issue("echo",A?"on":"off")}e.setCommandEcho=setCommandEcho;function setFailed(A){process.exitCode=h.Failure;error(A)}e.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}e.isDebug=isDebug;function debug(A){o.issueCommand("debug",{},A)}e.debug=debug;function error(A,e={}){o.issueCommand("error",c.toCommandProperties(e),A instanceof Error?A.toString():A)}e.error=error;function warning(A,e={}){o.issueCommand("warning",c.toCommandProperties(e),A instanceof Error?A.toString():A)}e.warning=warning;function notice(A,e={}){o.issueCommand("notice",c.toCommandProperties(e),A instanceof Error?A.toString():A)}e.notice=notice;function info(A){process.stdout.write(A+g.EOL)}e.info=info;function startGroup(A){o.issue("group",A)}e.startGroup=startGroup;function endGroup(){o.issue("endgroup")}e.endGroup=endGroup;function group(A,e){return i(this,void 0,void 0,(function*(){startGroup(A);let t;try{t=yield e()}finally{endGroup()}return t}))}e.group=group;function saveState(A,e){const t=process.env["GITHUB_STATE"]||"";if(t){return a.issueFileCommand("STATE",a.prepareKeyValueMessage(A,e))}o.issueCommand("save-state",{name:A},c.toCommandValue(e))}e.saveState=saveState;function getState(A){return process.env[`STATE_${A}`]||""}e.getState=getState;function getIDToken(A){return i(this,void 0,void 0,(function*(){return yield E.OidcClient.getIDToken(A)}))}e.getIDToken=getIDToken;var Q=t(3801);Object.defineProperty(e,"summary",{enumerable:true,get:function(){return Q.summary}});var u=t(3801);Object.defineProperty(e,"markdownSummary",{enumerable:true,get:function(){return u.markdownSummary}});var C=t(8169);Object.defineProperty(e,"toPosixPath",{enumerable:true,get:function(){return C.toPosixPath}});Object.defineProperty(e,"toWin32Path",{enumerable:true,get:function(){return C.toWin32Path}});Object.defineProperty(e,"toPlatformPath",{enumerable:true,get:function(){return C.toPlatformPath}})},807:function(A,e,t){"use strict";var r=this&&this.__createBinding||(Object.create?function(A,e,t,r){if(r===undefined)r=t;Object.defineProperty(A,r,{enumerable:true,get:function(){return e[t]}})}:function(A,e,t,r){if(r===undefined)r=t;A[r]=e[t]});var n=this&&this.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:true,value:e})}:function(A,e){A["default"]=e});var s=this&&this.__importStar||function(A){if(A&&A.__esModule)return A;var e={};if(A!=null)for(var t in A)if(t!=="default"&&Object.hasOwnProperty.call(A,t))r(e,A,t);n(e,A);return e};Object.defineProperty(e,"__esModule",{value:true});e.prepareKeyValueMessage=e.issueFileCommand=void 0;const i=s(t(7147));const o=s(t(2037));const a=t(6328);const c=t(6657);function issueFileCommand(A,e){const t=process.env[`GITHUB_${A}`];if(!t){throw new Error(`Unable to find environment variable for file command ${A}`)}if(!i.existsSync(t)){throw new Error(`Missing file at path: ${t}`)}i.appendFileSync(t,`${c.toCommandValue(e)}${o.EOL}`,{encoding:"utf8"})}e.issueFileCommand=issueFileCommand;function prepareKeyValueMessage(A,e){const t=`ghadelimiter_${a.v4()}`;const r=c.toCommandValue(e);if(A.includes(t)){throw new Error(`Unexpected input: name should not contain the delimiter "${t}"`)}if(r.includes(t)){throw new Error(`Unexpected input: value should not contain the delimiter "${t}"`)}return`${A}<<${t}${o.EOL}${r}${o.EOL}${t}`}e.prepareKeyValueMessage=prepareKeyValueMessage},7101:function(A,e,t){"use strict";var r=this&&this.__awaiter||function(A,e,t,r){function adopt(A){return A instanceof t?A:new t((function(e){e(A)}))}return new(t||(t=Promise))((function(t,n){function fulfilled(A){try{step(r.next(A))}catch(A){n(A)}}function rejected(A){try{step(r["throw"](A))}catch(A){n(A)}}function step(A){A.done?t(A.value):adopt(A.value).then(fulfilled,rejected)}step((r=r.apply(A,e||[])).next())}))};Object.defineProperty(e,"__esModule",{value:true});e.OidcClient=void 0;const n=t(5753);const s=t(7910);const i=t(3949);class OidcClient{static createHttpClient(A=true,e=10){const t={allowRetries:A,maxRetries:e};return new n.HttpClient("actions/oidc-client",[new s.BearerCredentialHandler(OidcClient.getRequestToken())],t)}static getRequestToken(){const A=process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"];if(!A){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable")}return A}static getIDTokenUrl(){const A=process.env["ACTIONS_ID_TOKEN_REQUEST_URL"];if(!A){throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable")}return A}static getCall(A){var e;return r(this,void 0,void 0,(function*(){const t=OidcClient.createHttpClient();const r=yield t.getJson(A).catch((A=>{throw new Error(`Failed to get ID Token. \n \n Error Code : ${A.statusCode}\n \n Error Message: ${