setup-qemu-action/dist/index.js

4 lines
515 KiB
JavaScript
Raw Normal View History

require('./sourcemap-register.js');(()=>{var A={7351: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 s=this&&this.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:true,value:e})}:function(A,e){A["default"]=e});var n=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);s(e,A);return e};Object.defineProperty(e,"__esModule",{value:true});e.issue=e.issueCommand=void 0;const o=n(t(2037));const i=t(5278);function issueCommand(A,e,t){const r=new Command(A,e,t);process.stdout.write(r.toString()+o.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 i.toCommandValue(A).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(A){return i.toCommandValue(A).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},2186: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 s=this&&this.__setModuleDefault||(Object.create?function(A,e){Object.defineProperty(A,"default",{enumerable:true,value:e})}:function(A,e){A["default"]=e});var n=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);s(e,A);return e};var o=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,s){function fulfilled(A){try{step(r.next(A))}catch(A){s(A)}}function rejected(A){try{step(r["throw"](A))}catch(A){s(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 i=t(7351);const a=t(717);const c=t(5278);const g=n(t(2037));const E=n(t(1017));const Q=t(8041);var C;(function(A){A[A["Success"]=0]="Success";A[A["Failure"]=1]="Failure"})(C=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))}i.issueCommand("set-env",{name:A},t)}e.exportVariable=exportVariable;function setSecret(A){i.issueCommand("add-mask",{},A)}e.setSecret=setSecret;function addPath(A){const e=process.env["GITHUB_PATH"]||"";if(e){a.issueFileCommand("PATH",A)}else{i.issueCommand("add-path",{},A)}process.env["PATH"]=`${A}${E.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.getM
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */;const escape=A=>A.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22");const normalizeLinefeeds=A=>A.replace(/\r?\n|\r/g,"\r\n");const r=[];const s=new Uint8Array([13,10]);E=0;let n=false;for(const[e,o]of A){if(typeof o==="string"){const A=b.encode(t+`; name="${escape(normalizeLinefeeds(e))}"`+`\r\n\r\n${normalizeLinefeeds(o)}\r\n`);r.push(A);E+=A.byteLength}else{const A=b.encode(`${t}; name="${escape(normalizeLinefeeds(e))}"`+(o.name?`; filename="${escape(o.name)}"`:"")+"\r\n"+`Content-Type: ${o.type||"application/octet-stream"}\r\n\r\n`);r.push(A,o,s);if(typeof o.size==="number"){E+=A.byteLength+o.size+s.byteLength}else{n=true}}}const o=b.encode(`--${e}--`);r.push(o);E+=o.byteLength;if(n){E=null}g=A;c=async function*(){for(const A of r){if(A.stream){yield*A.stream()}else{yield A}}};Q="multipart/form-data; boundary="+e}else if(o(A)){g=A;E=A.size;if(A.type){Q=A.type}}else if(typeof A[Symbol.asyncIterator]==="function"){if(e){throw new TypeError("keepalive")}if(s.isDisturbed(A)||A.locked){throw new TypeError("Response body object should not be disturbed or locked")}r=A instanceof m?A:n(A)}if(typeof g==="string"||s.isBuffer(g)){E=Buffer.byteLength(g)}if(c!=null){let e;r=new m({async start(){e=c(A)[Symbol.asyncIterator]()},async pull(A){const{value:t,done:s}=await e.next();if(s){queueMicrotask((()=>{A.close()}))}else{if(!f(r)){A.enqueue(new Uint8Array(t))}}return A.desiredSize>0},async cancel(A){await e.return()},type:undefined})}const C={stream:r,source:g,length:E};return[C,Q]}function safelyExtractBody(A,e=false){if(!m){m=t(5356).ReadableStream}if(A instanceof m){d(!s.isDisturbed(A),"The body has already been consumed.");d(!A.locked,"The stream is locked.")}return extractBody(A,e)}function cloneBody(A){const[e,t]=A.stream.tee();const r=B(t,{transfer:[t]});const[,s]=r.tee();A.stream=e;return{stream:s,length:A.length,source:A.source}}async function*consumeBody(A){if(A){if(p(A)){yield A}else{const e=A.stream;if(s.isDisturbed(e)){throw new TypeError("The body has already been consumed.")}if(e.locked){throw new TypeError("The stream is locked.")}e[u]=true;yield*e}}}function throwIfAborted(A){if(A.aborted){throw new l("The operation was aborted.","AbortError")}}function bodyMixinMethods(A){const e={blob(){return specConsumeBody(this,(A=>{let e=bodyMimeType(this);if(e==="failure"){e=""}else if(e){e=w(e)}return new I([A],{type:e})}),A)},arrayBuffer(){return specConsumeBody(this,(A=>new Uint8Array(A).buffer),A)},text(){return specConsumeBody(this,utf8DecodeBytes,A)},json(){return specConsumeBody(this,parseJSONFromBytes,A)},async formData(){C.brandCheck(this,A);throwIfAborted(this[Q]);const e=this.headers.get("Content-Type");if(/multipart\/form-data/.test(e)){const A={};for(const[e,t]of this.headers)A[e.toLowerCase()]=t;const e=new E;let t;try{t=new r({headers:A,preservePath:true})}catch(A){throw new l(`${A}`,"AbortError")}t.on("field",((A,t)=>{e.append(A,t)}));t.on("file",((A,t,r,s,n)=>{const o=[];if(s==="base64"||s.toLowerCase()==="base64"){let s="";t.on("data",(A=>{s+=A.toString().replace(/[\r\n]/gm,"");const e=s.length-s.length%4;o.push(Buffer.from(s.slice(0,e),"base64"));s=s.slice(e)}));t.on("end",(()=>{o.push(Buffer.from(s,"base64"));e.append(A,new k(o,r,{type:n}))}))}else{t.on("data",(A=>{o.push(A)}));t.on("end",(()=>{e.append(A,new k(o,r,{type:n}))}))}}));const s=new Promise(((A,e)=>{t.on("finish",A);t.on("error",(A=>e(new TypeError(A))))}));if(this.body!==null)for await(const A of consumeBody(this[Q].body))t.write(A);t.end();await s;return e}else if(/application\/x-www-form-urlencoded/.test(e)){let A;try{let e="";const t=new TextDecoder("utf-8",{ignoreBOM:true});for await(const A of consumeBody(this[Q].body)){if(!p(A)){throw new TypeError("Expected Uint8Array chunk")}e+=t.decode(A,{stream:true})}e+=t.decode();A=new URLSearchParams(e)}catch(A){throw Object.assign(new TypeError,{cause:A})}const e=new E;for(const[t,r]of A){e.append(t,r)}return e}else{await Promise.resolve();throwIfAborted(this[Q]);throw C.errors.exception({he
/*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> */n[s-4]=this.maskKey[0];n[s-3]=this.maskKey[1];n[s-2]=this.maskKey[2];n[s-1]=this.maskKey[3];n[1]=t;if(t===126){n.writeUInt16BE(e,2)}else if(t===127){n[2]=n[3]=0;n.writeUIntBE(e,4,6)}n[1]|=128;for(let A=0;A<e;A++){n[s+A]=this.frameData[A]^this.maskKey[A%4]}return n}}A.exports={WebsocketFrameSend:WebsocketFrameSend}},1688:(A,e,t)=>{"use strict";const{Writable:r}=t(2781);const s=t(7643);const{parserStates:n,opcodes:o,states:i,emptyBuffer:a}=t(9188);const{kReadyState:c,kSentClose:g,kResponse:E,kReceivedClose:Q}=t(7578);const{isValidStatusCode:C,failWebsocketConnection:l,websocketMessageReceived:B}=t(5515);const{WebsocketFrameSend:I}=t(5444);const h={};h.ping=s.channel("undici:websocket:ping");h.pong=s.channel("undici:websocket:pong");class ByteParser extends r{#o=[];#i=0;#a=n.INFO;#c={};#g=[];constructor(A){super();this.ws=A}_write(A,e,t){this.#o.push(A);this.#i+=A.length;this.run(t)}run(A){while(true){if(this.#a===n.INFO){if(this.#i<2){return A()}const e=this.consume(2);this.#c.fin=(e[0]&128)!==0;this.#c.opcode=e[0]&15;this.#c.originalOpcode??=this.#c.opcode;this.#c.fragmented=!this.#c.fin&&this.#c.opcode!==o.CONTINUATION;if(this.#c.fragmented&&this.#c.opcode!==o.BINARY&&this.#c.opcode!==o.TEXT){l(this.ws,"Invalid frame type was fragmented.");return}const t=e[1]&127;if(t<=125){this.#c.payloadLength=t;this.#a=n.READ_DATA}else if(t===126){this.#a=n.PAYLOADLENGTH_16}else if(t===127){this.#a=n.PAYLOADLENGTH_64}if(this.#c.fragmented&&t>125){l(this.ws,"Fragmented frame exceeded 125 bytes.");return}else if((this.#c.opcode===o.PING||this.#c.opcode===o.PONG||this.#c.opcode===o.CLOSE)&&t>125){l(this.ws,"Payload length for control frame exceeded 125 bytes.");return}else if(this.#c.opcode===o.CLOSE){if(t===1){l(this.ws,"Received close frame with a 1-byte body.");return}const A=this.consume(t);this.#c.closeInfo=this.parseCloseBody(false,A);if(!this.ws[g]){const A=Buffer.allocUnsafe(2);A.writeUInt16BE(this.#c.closeInfo.code,0);const e=new I(A);this.ws[E].socket.write(e.createFrame(o.CLOSE),(A=>{if(!A){this.ws[g]=true}}))}this.ws[c]=i.CLOSING;this.ws[Q]=true;this.end();return}else if(this.#c.opcode===o.PING){const e=this.consume(t);if(!this.ws[Q]){const A=new I(e);this.ws[E].socket.write(A.createFrame(o.PONG));if(h.ping.hasSubscribers){h.ping.publish({payload:e})}}this.#a=n.INFO;if(this.#i>0){continue}else{A();return}}else if(this.#c.opcode===o.PONG){const e=this.consume(t);if(h.pong.hasSubscribers){h.pong.publish({payload:e})}if(this.#i>0){continue}else{A();return}}}else if(this.#a===n.PAYLOADLENGTH_16){if(this.#i<2){return A()}const e=this.consume(2);this.#c.payloadLength=e.readUInt16BE(0);this.#a=n.READ_DATA}else if(this.#a===n.PAYLOADLENGTH_64){if(this.#i<8){return A()}const e=this.consume(8);const t=e.readUInt32BE(0);if(t>2**31-1){l(this.ws,"Received payload length > 2^31 bytes.");return}const r=e.readUInt32BE(4);this.#c.payloadLength=(t<<8)+r;this.#a=n.READ_DATA}else if(this.#a===n.READ_DATA){if(this.#i<this.#c.payloadLength){return A()}else if(this.#i>=this.#c.payloadLength){const A=this.consume(this.#c.payloadLength);this.#g.push(A);if(!this.#c.fragmented||this.#c.fin&&this.#c.opcode===o.CONTINUATION){const A=Buffer.concat(this.#g);B(this.ws,this.#c.originalOpcode,A);this.#c={};this.#g.length=0}this.#a=n.INFO}}if(this.#i>0){continue}else{A();break}}}consume(A){if(A>this.#i){return null}else if(A===0){return a}if(this.#o[0].length===A){this.#i-=this.#o[0].length;return this.#o.shift()}const e=Buffer.allocUnsafe(A);let t=0;while(t!==A){const r=this.#o[0];const{length:s}=r;if(s+t===A){e.set(this.#o.shift(),t);break}else if(s+t>A){e.set(r.subarray(0,A-t),t);this.#o[0]=r.subarray(A-t);break}else{e.set(this.#o.shift(),t);t+=r.length}}this.#i-=A;return e}parseCloseBody(A,e){let t;if(e.length>=2){t=e.readUInt16BE(0)}if(A){if(!C(t)){return null}return{code:t}}let r=e.subarray(2);if(r[0]===239&&r[1]===187&&r[2]===191){r=r.subarray(3)}if(t!==undefined&&!C(t)){return null}try{r=new TextDecoder("utf-8",{fatal:true}).decode(r)}catch{return null}return{code:t,reason:r}}get closingIn
//# sourceMappingURL=index.js.map