docker-buildx-setup/dist/index.js

10 lines
206 KiB
JavaScript
Raw Normal View History

require('./sourcemap-register.js');(()=>{var e={7351:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=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.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const o=s(r(2037));const a=r(5278);function issueCommand(e,t,r){const n=new Command(e,t,r);process.stdout.write(n.toString()+o.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const l="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=l+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const n=this.properties[r];if(n){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(n)}`}}}}e+=`${l}${escapeData(this.message)}`;return e}}function escapeData(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){if(n===undefined)n=r;Object.defineProperty(e,n,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,n){if(n===undefined)n=r;e[n]=t[r]});var i=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.hasOwnProperty.call(e,r))n(t,e,r);i(t,e);return t};var o=this&&this.__awaiter||function(e,t,r,n){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n["throw"](e))}catch(e){i(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getIDToken=t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.notice=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const a=r(7351);const l=r(717);const c=r(5278);const u=s(r(2037));const p=s(r(1017));const h=r(8041);var d;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(d=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=c.toCommandValue(t);process.env[e]=r;const n=process.env["GITHUB_ENV"]||"";if(n){const t="_GitHubActionsFileCommandDelimeter_";const n=`${e}<<${t}${u.EOL}${r}${u.EOL}${t}`;l.issueCommand("ENV",n)}else{a.issueCommand("set-env",{name:e},r)}}t.exportVariable=exportVariable;function setSecret(e){a.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){l.issueCommand("PATH",e)}else{a.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${p.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}t.getInput=getInput;function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));return r}t.getMultili
/*!
* Tmp
*
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
*
* MIT Licensed
*/
const n=r(7147);const i=r(2037);const s=r(1017);const o=r(6113);const a={fs:n.constants,os:i.constants};const l=r(4959);const c="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",u=/XXXXXX/,p=3,h=(a.O_CREAT||a.fs.O_CREAT)|(a.O_EXCL||a.fs.O_EXCL)|(a.O_RDWR||a.fs.O_RDWR),d=i.platform()==="win32",m=a.EBADF||a.os.errno.EBADF,v=a.ENOENT||a.os.errno.ENOENT,g=448,y=384,E="exit",b=[],w=n.rmdirSync.bind(n),_=l.sync;let O=false;function tmpName(e,t){const r=_parseArguments(e,t),i=r[0],s=r[1];try{_assertAndSanitizeOptions(i)}catch(e){return s(e)}let o=i.tries;(function _getUniqueName(){try{const e=_generateTmpName(i);n.stat(e,(function(t){if(!t){if(o-- >0)return _getUniqueName();return s(new Error("Could not get a unique tmp filename, max tries reached "+e))}s(null,e)}))}catch(e){s(e)}})()}function tmpNameSync(e){const t=_parseArguments(e),r=t[0];_assertAndSanitizeOptions(r);let i=r.tries;do{const e=_generateTmpName(r);try{n.statSync(e)}catch(t){return e}}while(i-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function file(e,t){const r=_parseArguments(e,t),i=r[0],s=r[1];tmpName(i,(function _tmpNameCreated(e,t){if(e)return s(e);n.open(t,h,i.mode||y,(function _fileCreated(e,r){if(e)return s(e);if(i.discardDescriptor){return n.close(r,(function _discardCallback(e){return s(e,t,undefined,_prepareTmpFileRemoveCallback(t,-1,i,false))}))}else{const e=i.discardDescriptor||i.detachDescriptor;s(null,t,r,_prepareTmpFileRemoveCallback(t,e?-1:r,i,false))}}))}))}function fileSync(e){const t=_parseArguments(e),r=t[0];const i=r.discardDescriptor||r.detachDescriptor;const s=tmpNameSync(r);var o=n.openSync(s,h,r.mode||y);if(r.discardDescriptor){n.closeSync(o);o=undefined}return{name:s,fd:o,removeCallback:_prepareTmpFileRemoveCallback(s,i?-1:o,r,true)}}function dir(e,t){const r=_parseArguments(e,t),i=r[0],s=r[1];tmpName(i,(function _tmpNameCreated(e,t){if(e)return s(e);n.mkdir(t,i.mode||g,(function _dirCreated(e){if(e)return s(e);s(null,t,_prepareTmpDirRemoveCallback(t,i,false))}))}))}function dirSync(e){const t=_parseArguments(e),r=t[0];const i=tmpNameSync(r);n.mkdirSync(i,r.mode||g);return{name:i,removeCallback:_prepareTmpDirRemoveCallback(i,r,true)}}function _removeFileAsync(e,t){const _handler=function(e){if(e&&!_isENOENT(e)){return t(e)}t()};if(0<=e[0])n.close(e[0],(function(){n.unlink(e[1],_handler)}));else n.unlink(e[1],_handler)}function _removeFileSync(e){let t=null;try{if(0<=e[0])n.closeSync(e[0])}catch(e){if(!_isEBADF(e)&&!_isENOENT(e))throw e}finally{try{n.unlinkSync(e[1])}catch(e){if(!_isENOENT(e))t=e}}if(t!==null){throw t}}function _prepareTmpFileRemoveCallback(e,t,r,n){const i=_prepareRemoveCallback(_removeFileSync,[t,e],n);const s=_prepareRemoveCallback(_removeFileAsync,[t,e],n,i);if(!r.keep)b.unshift(i);return n?i:s}function _prepareTmpDirRemoveCallback(e,t,r){const i=t.unsafeCleanup?l:n.rmdir.bind(n);const s=t.unsafeCleanup?_:w;const o=_prepareRemoveCallback(s,e,r);const a=_prepareRemoveCallback(i,e,r,o);if(!t.keep)b.unshift(o);return r?o:a}function _prepareRemoveCallback(e,t,r,n){let i=false;return function _cleanupCallback(s){if(!i){const o=n||_cleanupCallback;const a=b.indexOf(o);if(a>=0)b.splice(a,1);i=true;if(r||e===w||e===_){return e(t)}else{return e(t,s||function(){})}}}}function _garbageCollector(){if(!O)return;while(b.length){try{b[0]()}catch(e){}}}function _randomChars(e){let t=[],r=null;try{r=o.randomBytes(e)}catch(t){r=o.pseudoRandomBytes(e)}for(var n=0;n<e;n++){t.push(c[r[n]%c.length])}return t.join("")}function _isBlank(e){return e===null||_isUndefined(e)||!e.trim()}function _isUndefined(e){return typeof e==="undefined"}function _parseArguments(e,t){if(typeof e==="function"){return[{},e]}if(_isUndefined(e)){return[{},t]}const r={};for(const t of Object.getOwnPropertyNames(e)){r[t]=e[t]}return[r,t]}function _generateTmpName(e){const t=e.tmpdir;if(!_isUndefined(e.name))return s.join(t,e.dir,e.name);if(!_isUndefined(e.template))return s.join(t,e.dir,e.template).replace(u,_randomChars(6));const r=[e.prefix?e.prefix:"tmp","-",process.pid,"-",_randomChars(12),e.postfix?"-"+e.po
//# sourceMappingURL=index.js.map