feat: add AVX2 support detection for x64 Linux systems (#167)
This commit is contained in:
1 parent
0ff83bfc51
commit
4c32875876
3 files changed
+49
-37
No files matched your search
+2
-2
@@ -23,8 +23,8 @@ Char: `+x.c),v=new Error(v),x.error=v,C(x,"onerror",v),x}o(oe,"error");function
|
||||
Actual: `+x.attribValue);else if(P==="xmlns"&&x.attribValue!==f)Q(x,"xmlns: prefix must be bound to "+f+`
|
||||
Actual: `+x.attribValue);else{var Te=x.tag,pt=x.tags[x.tags.length-1]||x;Te.ns===pt.ns&&(Te.ns=Object.create(pt.ns)),Te.ns[P]=x.attribValue}x.attribList.push([x.attribName,x.attribValue])}else x.tag.attributes[x.attribName]=x.attribValue,R(x,"onattribute",{name:x.attribName,value:x.attribValue});x.attribName=x.attribValue=""}o(Ra,"attrib");function Ft(x,v){if(x.opt.xmlns){var M=x.tag,P=fe(x.tagName);M.prefix=P.prefix,M.local=P.local,M.uri=M.ns[P.prefix]||"",M.prefix&&!M.uri&&(Q(x,"Unbound namespace prefix: "+JSON.stringify(x.tagName)),M.uri=P.prefix);var Te=x.tags[x.tags.length-1]||x;M.ns&&Te.ns!==M.ns&&Object.keys(M.ns).forEach(function(Xh){R(x,"onopennamespace",{prefix:Xh,uri:M.ns[Xh]})});for(var pt=0,ht=x.attribList.length;pt<ht;pt++){var Ht=x.attribList[pt],Va=Ht[0],tn=Ht[1],Pt=fe(Va,!0),li=Pt.prefix,D_=Pt.local,Gh=li===""?"":M.ns[li]||"",bm={name:Va,value:tn,prefix:li,local:D_,uri:Gh};li&&li!=="xmlns"&&!Gh&&(Q(x,"Unbound namespace prefix: "+JSON.stringify(li)),bm.uri=li),x.tag.attributes[Va]=bm,R(x,"onattribute",bm)}x.attribList.length=0}x.tag.isSelfClosing=!!v,x.sawRoot=!0,x.tags.push(x.tag),R(x,"onopentag",x.tag),v||(!x.noscript&&x.tagName.toLowerCase()==="script"?x.state=N.SCRIPT:x.state=N.TEXT,x.tag=null,x.tagName=""),x.attribName=x.attribValue="",x.attribList.length=0}o(Ft,"openTag");function en(x){if(!x.tagName){Q(x,"Weird empty close tag."),x.textNode+="</>",x.state=N.TEXT;return}if(x.script){if(x.tagName!=="script"){x.script+="</"+x.tagName+">",x.tagName="",x.state=N.SCRIPT;return}R(x,"onscript",x.script),x.script=""}var v=x.tags.length,M=x.tagName;x.strict||(M=M[x.looseCase]());for(var P=M;v--;){var Te=x.tags[v];if(Te.name!==P)Q(x,"Unexpected close tag");else break}if(v<0){Q(x,"Unmatched closing tag: "+x.tagName),x.textNode+="</"+x.tagName+">",x.state=N.TEXT;return}x.tagName=M;for(var pt=x.tags.length;pt-- >v;){var ht=x.tag=x.tags.pop();x.tagName=x.tag.name,R(x,"onclosetag",x.tagName);var Ht={};for(var Va in ht.ns)Ht[Va]=ht.ns[Va];var tn=x.tags[x.tags.length-1]||x;x.opt.xmlns&&ht.ns!==tn.ns&&Object.keys(ht.ns).forEach(function(Pt){var li=ht.ns[Pt];R(x,"onclosenamespace",{prefix:Pt,uri:li})})}v===0&&(x.closedRoot=!0),x.tagName=x.attribValue=x.attribName="",x.attribList.length=0,x.state=N.TEXT}o(en,"closeTag");function ks(x){var v=x.entity,M=v.toLowerCase(),P,Te="";return x.ENTITIES[v]?x.ENTITIES[v]:x.ENTITIES[M]?x.ENTITIES[M]:(v=M,v.charAt(0)==="#"&&(v.charAt(1)==="x"?(v=v.slice(2),P=parseInt(v,16),Te=P.toString(16)):(v=v.slice(1),P=parseInt(v,10),Te=P.toString(10))),v=v.replace(/^0+/,""),isNaN(P)||Te.toLowerCase()!==v?(Q(x,"Invalid character entity"),"&"+x.entity+";"):String.fromCodePoint(P))}o(ks,"parseEntity");function Vh(x,v){v==="<"?(x.state=N.OPEN_WAKA,x.startTagPosition=x.position):w(v)||(Q(x,"Non-whitespace before first tag."),x.textNode=v,x.state=N.TEXT)}o(Vh,"beginWhiteSpace");function $h(x,v){var M="";return v<x.length&&(M=x.charAt(v)),M}o($h,"charAt");function I_(x){var v=this;if(this.error)throw this.error;if(v.closed)return oe(v,"Cannot write after close. Assign an onready handler.");if(x===null)return ye(v);typeof x=="object"&&(x=x.toString());for(var M=0,P="";P=$h(x,M++),v.c=P,!!P;)switch(v.trackPosition&&(v.position++,P===`
|
||||
`?(v.line++,v.column=0):v.column++),v.state){case N.BEGIN:if(v.state=N.BEGIN_WHITESPACE,P==="\uFEFF")continue;Vh(v,P);continue;case N.BEGIN_WHITESPACE:Vh(v,P);continue;case N.TEXT:if(v.sawRoot&&!v.closedRoot){for(var Te=M-1;P&&P!=="<"&&P!=="&";)P=$h(x,M++),P&&v.trackPosition&&(v.position++,P===`
|
||||
`?(v.line++,v.column=0):v.column++);v.textNode+=x.substring(Te,M-1)}P==="<"&&!(v.sawRoot&&v.closedRoot&&!v.strict)?(v.state=N.OPEN_WAKA,v.startTagPosition=v.position):(!w(P)&&(!v.sawRoot||v.closedRoot)&&Q(v,"Text data outside of root node."),P==="&"?v.state=N.TEXT_ENTITY:v.textNode+=P);continue;case N.SCRIPT:P==="<"?v.state=N.SCRIPT_ENDING:v.script+=P;continue;case N.SCRIPT_ENDING:P==="/"?v.state=N.CLOSE_TAG:(v.script+="<"+P,v.state=N.SCRIPT);continue;case N.OPEN_WAKA:if(P==="!")v.state=N.SGML_DECL,v.sgmlDecl="";else if(!w(P))if(_(b,P))v.state=N.OPEN_TAG,v.tagName=P;else if(P==="/")v.state=N.CLOSE_TAG,v.tagName="";else if(P==="?")v.state=N.PROC_INST,v.procInstName=v.procInstBody="";else{if(Q(v,"Unencoded <"),v.startTagPosition+1<v.position){var pt=v.position-v.startTagPosition;P=new Array(pt).join(" ")+P}v.textNode+="<"+P,v.state=N.TEXT}continue;case N.SGML_DECL:(v.sgmlDecl+P).toUpperCase()===c?(R(v,"onopencdata"),v.state=N.CDATA,v.sgmlDecl="",v.cdata=""):v.sgmlDecl+P==="--"?(v.state=N.COMMENT,v.comment="",v.sgmlDecl=""):(v.sgmlDecl+P).toUpperCase()===m?(v.state=N.DOCTYPE,(v.doctype||v.sawRoot)&&Q(v,"Inappropriately located doctype declaration"),v.doctype="",v.sgmlDecl=""):P===">"?(R(v,"onsgmldeclaration",v.sgmlDecl),v.sgmlDecl="",v.state=N.TEXT):(y(P)&&(v.state=N.SGML_DECL_QUOTED),v.sgmlDecl+=P);continue;case N.SGML_DECL_QUOTED:P===v.q&&(v.state=N.SGML_DECL,v.q=""),v.sgmlDecl+=P;continue;case N.DOCTYPE:P===">"?(v.state=N.TEXT,R(v,"ondoctype",v.doctype),v.doctype=!0):(v.doctype+=P,P==="["?v.state=N.DOCTYPE_DTD:y(P)&&(v.state=N.DOCTYPE_QUOTED,v.q=P));continue;case N.DOCTYPE_QUOTED:v.doctype+=P,P===v.q&&(v.q="",v.state=N.DOCTYPE);continue;case N.DOCTYPE_DTD:v.doctype+=P,P==="]"?v.state=N.DOCTYPE:y(P)&&(v.state=N.DOCTYPE_DTD_QUOTED,v.q=P);continue;case N.DOCTYPE_DTD_QUOTED:v.doctype+=P,P===v.q&&(v.state=N.DOCTYPE_DTD,v.q="");continue;case N.COMMENT:P==="-"?v.state=N.COMMENT_ENDING:v.comment+=P;continue;case N.COMMENT_ENDING:P==="-"?(v.state=N.COMMENT_ENDED,v.comment=j(v.opt,v.comment),v.comment&&R(v,"oncomment",v.comment),v.comment=""):(v.comment+="-"+P,v.state=N.COMMENT);continue;case N.COMMENT_ENDED:P!==">"?(Q(v,"Malformed comment"),v.comment+="--"+P,v.state=N.COMMENT):v.state=N.TEXT;continue;case N.CDATA:P==="]"?v.state=N.CDATA_ENDING:v.cdata+=P;continue;case N.CDATA_ENDING:P==="]"?v.state=N.CDATA_ENDING_2:(v.cdata+="]"+P,v.state=N.CDATA);continue;case N.CDATA_ENDING_2:P===">"?(v.cdata&&R(v,"oncdata",v.cdata),R(v,"onclosecdata"),v.cdata="",v.state=N.TEXT):P==="]"?v.cdata+="]":(v.cdata+="]]"+P,v.state=N.CDATA);continue;case N.PROC_INST:P==="?"?v.state=N.PROC_INST_ENDING:w(P)?v.state=N.PROC_INST_BODY:v.procInstName+=P;continue;case N.PROC_INST_BODY:if(!v.procInstBody&&w(P))continue;P==="?"?v.state=N.PROC_INST_ENDING:v.procInstBody+=P;continue;case N.PROC_INST_ENDING:P===">"?(R(v,"onprocessinginstruction",{name:v.procInstName,body:v.procInstBody}),v.procInstName=v.procInstBody="",v.state=N.TEXT):(v.procInstBody+="?"+P,v.state=N.PROC_INST_BODY);continue;case N.OPEN_TAG:_(T,P)?v.tagName+=P:(tt(v),P===">"?Ft(v):P==="/"?v.state=N.OPEN_TAG_SLASH:(w(P)||Q(v,"Invalid character in tag name"),v.state=N.ATTRIB));continue;case N.OPEN_TAG_SLASH:P===">"?(Ft(v,!0),en(v)):(Q(v,"Forward-slash in opening tag not followed by >"),v.state=N.ATTRIB);continue;case N.ATTRIB:if(w(P))continue;P===">"?Ft(v):P==="/"?v.state=N.OPEN_TAG_SLASH:_(b,P)?(v.attribName=P,v.attribValue="",v.state=N.ATTRIB_NAME):Q(v,"Invalid attribute name");continue;case N.ATTRIB_NAME:P==="="?v.state=N.ATTRIB_VALUE:P===">"?(Q(v,"Attribute without value"),v.attribValue=v.attribName,Ra(v),Ft(v)):w(P)?v.state=N.ATTRIB_NAME_SAW_WHITE:_(T,P)?v.attribName+=P:Q(v,"Invalid attribute name");continue;case N.ATTRIB_NAME_SAW_WHITE:if(P==="=")v.state=N.ATTRIB_VALUE;else{if(w(P))continue;Q(v,"Attribute without value"),v.tag.attributes[v.attribName]="",v.attribValue="",R(v,"onattribute",{name:v.attribName,value:""}),v.attribName="",P===">"?Ft(v):_(b,P)?(v.attribName=P,v.state=N.ATTRIB_NAME):(Q(v,"Invalid attribute name"),v.state=N.ATTRIB)}continue;case N.ATTRIB_VALUE:if(w(P))continue;y(P)?(v.q=P,v.state=N.ATTRIB_VALUE_QUOTED):(Q(v,"Unquoted attribute value"),v.state=N.ATTRIB_VALUE_UNQUOTED,v.attribValue=P);continue;case N.ATTRIB_VALUE_QUOTED:if(P!==v.q){P==="&"?v.state=N.ATTRIB_VALUE_ENTITY_Q:v.attribValue+=P;continue}Ra(v),v.q="",v.state=N.ATTRIB_VALUE_CLOSED;continue;case N.ATTRIB_VALUE_CLOSED:w(P)?v.state=N.ATTRIB:P===">"?Ft(v):P==="/"?v.state=N.OPEN_TAG_SLASH:_(b,P)?(Q(v,"No whitespace between attributes"),v.attribName=P,v.attribValue="",v.state=N.ATTRIB_NAME):Q(v,"Invalid attribute name");continue;case N.ATTRIB_VALUE_UNQUOTED:if(!g(P)){P==="&"?v.state=N.ATTRIB_VALUE_ENTITY_U:v.attribValue+=P;continue}Ra(v),P===">"?Ft(v):v.state=N.ATTRIB;continue;case N.CLOSE_TAG:if(v.tagName)P===">"?en(v):_(T,P)?v.tagName+=P:v.script?(v.script+="</"+v.tagName,v.tagName="",v.state=N.SCRIPT):(w(P)||Q(v,"Invalid tagname in closing tag"),v.state=N.CLOSE_TAG_SAW_WHITE);else{if(w(P))continue;O
Line truncated
|
||||
`;ge.DEFAULT_CONTENT_TYPE="application/octet-stream";ge.prototype.append=function(t,e,a){a=a||{},typeof a=="string"&&(a={filename:a});var i=g1.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(t,e,a),n=this._multiPartFooter();i(r),i(e),i(n),this._trackLength(r,e,a)};ge.prototype._trackLength=function(t,e,a){var i=0;a.knownLength!=null?i+=Number(a.knownLength):Buffer.isBuffer(e)?i=e.length:typeof e=="string"&&(i=Buffer.byteLength(e)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(t)+ge.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&Xi(e,"httpVersion"))&&!(e instanceof bR))&&(a.knownLength||this._valuesToMeasure.push(e))};ge.prototype._lengthRetriever=function(t,e){Xi(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):vR.stat(t.path,function(a,i){if(a){e(a);return}var r=i.size-(t.start?t.start:0);e(null,r)}):Xi(t,"httpVersion")?e(null,Number(t.headers["content-length"])):Xi(t,"httpModule")?(t.on("response",function(a){t.pause(),e(null,Number(a.headers["content-length"]))}),t.resume()):e("Unknown stream")};ge.prototype._multiPartHeader=function(t,e,a){if(typeof a.header=="string")return a.header;var i=this._getContentDisposition(e,a),r=this._getContentType(e,a),n="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(i||[]),"Content-Type":[].concat(r||[])};typeof a.header=="object"&&h1(s,a.header);var p;for(var d in s)if(Xi(s,d)){if(p=s[d],p==null)continue;Array.isArray(p)||(p=[p]),p.length&&(n+=d+": "+p.join("; ")+ge.LINE_BREAK)}return"--"+this.getBoundary()+ge.LINE_BREAK+n+ge.LINE_BREAK};ge.prototype._getContentDisposition=function(t,e){var a;if(typeof e.filepath=="string"?a=u1.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?a=u1.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&Xi(t,"httpVersion")&&(a=u1.basename(t.client._httpMessage.path||"")),a)return'filename="'+a+'"'};ge.prototype._getContentType=function(t,e){var a=e.contentType;return!a&&t&&t.name&&(a=f1.lookup(t.name)),!a&&t&&t.path&&(a=f1.lookup(t.path)),!a&&t&&t.readable&&Xi(t,"httpVersion")&&(a=t.headers["content-type"]),!a&&(e.filepath||e.filename)&&(a=f1.lookup(e.filepath||e.filename)),!a&&t&&typeof t=="object"&&(a=ge.DEFAULT_CONTENT_TYPE),a};ge.prototype._multiPartFooter=function(){return function(t){var e=ge.LINE_BREAK,a=this._streams.length===0;a&&(e+=this._lastBoundary()),t(e)}.bind(this)};ge.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+ge.LINE_BREAK};ge.prototype.getHeaders=function(t){var e,a={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)Xi(t,e)&&(a[e.toLowerCase()]=t[e]);return a};ge.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};ge.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};ge.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),a=0,i=this._streams.length;a<i;a++)typeof this._streams[a]!="function"&&(Buffer.isBuffer(this._streams[a])?t=Buffer.concat([t,this._streams[a]]):t=Buffer.concat([t,Buffer.from(this._streams[a])]),(typeof this._streams[a]!="string"||this._streams[a].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(ge.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};ge.prototype._generateBoundary=function(){this._boundary="--------------------------"+xR.randomBytes(12).toString("hex")};ge.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};ge.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};ge.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}wR.parallel(this._valuesToMeasure,this._lengthRetriever,function(a,i){if(a){t(a);return}i.forEach(function(r){e+=r}),t(null,e)})};ge.prototype.submit=function(t,e){var a,i,r={method:"post"};return typeof t=="string"?(t=yR(t),i=h1({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},r)):(i=h1(t,r),i.port||(i.port=i.protocol==="https:"?443:80)),i.headers=this.getHeaders(t.headers),i.protocol==="https:"?a=gR.request(i):a=hR.request(i),this.getLength(function(n,s){if(n&&n!=="Unknown stream"){this._error(n);return}if(s&&a.setHeader("Content-Length",s),this.pipe(a),e){var p,d=o(function(l,c){return a.removeListener("error",d),a.removeListener("response",p),e.call(this,l,c)},"callback");p=d.bind(this,null),a.on("error",d),a.on("response",p)}}.bind(this)),a};ge.prototype._error=function(t){this.error||(this.error=t,this.
Line truncated
|
||||
`?(v.line++,v.column=0):v.column++);v.textNode+=x.substring(Te,M-1)}P==="<"&&!(v.sawRoot&&v.closedRoot&&!v.strict)?(v.state=N.OPEN_WAKA,v.startTagPosition=v.position):(!w(P)&&(!v.sawRoot||v.closedRoot)&&Q(v,"Text data outside of root node."),P==="&"?v.state=N.TEXT_ENTITY:v.textNode+=P);continue;case N.SCRIPT:P==="<"?v.state=N.SCRIPT_ENDING:v.script+=P;continue;case N.SCRIPT_ENDING:P==="/"?v.state=N.CLOSE_TAG:(v.script+="<"+P,v.state=N.SCRIPT);continue;case N.OPEN_WAKA:if(P==="!")v.state=N.SGML_DECL,v.sgmlDecl="";else if(!w(P))if(_(b,P))v.state=N.OPEN_TAG,v.tagName=P;else if(P==="/")v.state=N.CLOSE_TAG,v.tagName="";else if(P==="?")v.state=N.PROC_INST,v.procInstName=v.procInstBody="";else{if(Q(v,"Unencoded <"),v.startTagPosition+1<v.position){var pt=v.position-v.startTagPosition;P=new Array(pt).join(" ")+P}v.textNode+="<"+P,v.state=N.TEXT}continue;case N.SGML_DECL:(v.sgmlDecl+P).toUpperCase()===c?(R(v,"onopencdata"),v.state=N.CDATA,v.sgmlDecl="",v.cdata=""):v.sgmlDecl+P==="--"?(v.state=N.COMMENT,v.comment="",v.sgmlDecl=""):(v.sgmlDecl+P).toUpperCase()===m?(v.state=N.DOCTYPE,(v.doctype||v.sawRoot)&&Q(v,"Inappropriately located doctype declaration"),v.doctype="",v.sgmlDecl=""):P===">"?(R(v,"onsgmldeclaration",v.sgmlDecl),v.sgmlDecl="",v.state=N.TEXT):(y(P)&&(v.state=N.SGML_DECL_QUOTED),v.sgmlDecl+=P);continue;case N.SGML_DECL_QUOTED:P===v.q&&(v.state=N.SGML_DECL,v.q=""),v.sgmlDecl+=P;continue;case N.DOCTYPE:P===">"?(v.state=N.TEXT,R(v,"ondoctype",v.doctype),v.doctype=!0):(v.doctype+=P,P==="["?v.state=N.DOCTYPE_DTD:y(P)&&(v.state=N.DOCTYPE_QUOTED,v.q=P));continue;case N.DOCTYPE_QUOTED:v.doctype+=P,P===v.q&&(v.q="",v.state=N.DOCTYPE);continue;case N.DOCTYPE_DTD:v.doctype+=P,P==="]"?v.state=N.DOCTYPE:y(P)&&(v.state=N.DOCTYPE_DTD_QUOTED,v.q=P);continue;case N.DOCTYPE_DTD_QUOTED:v.doctype+=P,P===v.q&&(v.state=N.DOCTYPE_DTD,v.q="");continue;case N.COMMENT:P==="-"?v.state=N.COMMENT_ENDING:v.comment+=P;continue;case N.COMMENT_ENDING:P==="-"?(v.state=N.COMMENT_ENDED,v.comment=j(v.opt,v.comment),v.comment&&R(v,"oncomment",v.comment),v.comment=""):(v.comment+="-"+P,v.state=N.COMMENT);continue;case N.COMMENT_ENDED:P!==">"?(Q(v,"Malformed comment"),v.comment+="--"+P,v.state=N.COMMENT):v.state=N.TEXT;continue;case N.CDATA:P==="]"?v.state=N.CDATA_ENDING:v.cdata+=P;continue;case N.CDATA_ENDING:P==="]"?v.state=N.CDATA_ENDING_2:(v.cdata+="]"+P,v.state=N.CDATA);continue;case N.CDATA_ENDING_2:P===">"?(v.cdata&&R(v,"oncdata",v.cdata),R(v,"onclosecdata"),v.cdata="",v.state=N.TEXT):P==="]"?v.cdata+="]":(v.cdata+="]]"+P,v.state=N.CDATA);continue;case N.PROC_INST:P==="?"?v.state=N.PROC_INST_ENDING:w(P)?v.state=N.PROC_INST_BODY:v.procInstName+=P;continue;case N.PROC_INST_BODY:if(!v.procInstBody&&w(P))continue;P==="?"?v.state=N.PROC_INST_ENDING:v.procInstBody+=P;continue;case N.PROC_INST_ENDING:P===">"?(R(v,"onprocessinginstruction",{name:v.procInstName,body:v.procInstBody}),v.procInstName=v.procInstBody="",v.state=N.TEXT):(v.procInstBody+="?"+P,v.state=N.PROC_INST_BODY);continue;case N.OPEN_TAG:_(T,P)?v.tagName+=P:(tt(v),P===">"?Ft(v):P==="/"?v.state=N.OPEN_TAG_SLASH:(w(P)||Q(v,"Invalid character in tag name"),v.state=N.ATTRIB));continue;case N.OPEN_TAG_SLASH:P===">"?(Ft(v,!0),en(v)):(Q(v,"Forward-slash in opening tag not followed by >"),v.state=N.ATTRIB);continue;case N.ATTRIB:if(w(P))continue;P===">"?Ft(v):P==="/"?v.state=N.OPEN_TAG_SLASH:_(b,P)?(v.attribName=P,v.attribValue="",v.state=N.ATTRIB_NAME):Q(v,"Invalid attribute name");continue;case N.ATTRIB_NAME:P==="="?v.state=N.ATTRIB_VALUE:P===">"?(Q(v,"Attribute without value"),v.attribValue=v.attribName,Ra(v),Ft(v)):w(P)?v.state=N.ATTRIB_NAME_SAW_WHITE:_(T,P)?v.attribName+=P:Q(v,"Invalid attribute name");continue;case N.ATTRIB_NAME_SAW_WHITE:if(P==="=")v.state=N.ATTRIB_VALUE;else{if(w(P))continue;Q(v,"Attribute without value"),v.tag.attributes[v.attribName]="",v.attribValue="",R(v,"onattribute",{name:v.attribName,value:""}),v.attribName="",P===">"?Ft(v):_(b,P)?(v.attribName=P,v.state=N.ATTRIB_NAME):(Q(v,"Invalid attribute name"),v.state=N.ATTRIB)}continue;case N.ATTRIB_VALUE:if(w(P))continue;y(P)?(v.q=P,v.state=N.ATTRIB_VALUE_QUOTED):(Q(v,"Unquoted attribute value"),v.state=N.ATTRIB_VALUE_UNQUOTED,v.attribValue=P);continue;case N.ATTRIB_VALUE_QUOTED:if(P!==v.q){P==="&"?v.state=N.ATTRIB_VALUE_ENTITY_Q:v.attribValue+=P;continue}Ra(v),v.q="",v.state=N.ATTRIB_VALUE_CLOSED;continue;case N.ATTRIB_VALUE_CLOSED:w(P)?v.state=N.ATTRIB:P===">"?Ft(v):P==="/"?v.state=N.OPEN_TAG_SLASH:_(b,P)?(Q(v,"No whitespace between attributes"),v.attribName=P,v.attribValue="",v.state=N.ATTRIB_NAME):Q(v,"Invalid attribute name");continue;case N.ATTRIB_VALUE_UNQUOTED:if(!g(P)){P==="&"?v.state=N.ATTRIB_VALUE_ENTITY_U:v.attribValue+=P;continue}Ra(v),P===">"?Ft(v):v.state=N.ATTRIB;continue;case N.CLOSE_TAG:if(v.tagName)P===">"?en(v):_(T,P)?v.tagName+=P:v.script?(v.script+="</"+v.tagName,v.tagName="",v.state=N.SCRIPT):(w(P)||Q(v,"Invalid tagname in closing tag"),v.state=N.CLOSE_TAG_SAW_WHITE);else{if(w(P))continue;O
Line truncated
|
||||
`;ge.DEFAULT_CONTENT_TYPE="application/octet-stream";ge.prototype.append=function(t,e,a){a=a||{},typeof a=="string"&&(a={filename:a});var i=g1.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(t,e,a),n=this._multiPartFooter();i(r),i(e),i(n),this._trackLength(r,e,a)};ge.prototype._trackLength=function(t,e,a){var i=0;a.knownLength!=null?i+=Number(a.knownLength):Buffer.isBuffer(e)?i=e.length:typeof e=="string"&&(i=Buffer.byteLength(e)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(t)+ge.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&Xi(e,"httpVersion"))&&!(e instanceof bR))&&(a.knownLength||this._valuesToMeasure.push(e))};ge.prototype._lengthRetriever=function(t,e){Xi(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):vR.stat(t.path,function(a,i){if(a){e(a);return}var r=i.size-(t.start?t.start:0);e(null,r)}):Xi(t,"httpVersion")?e(null,Number(t.headers["content-length"])):Xi(t,"httpModule")?(t.on("response",function(a){t.pause(),e(null,Number(a.headers["content-length"]))}),t.resume()):e("Unknown stream")};ge.prototype._multiPartHeader=function(t,e,a){if(typeof a.header=="string")return a.header;var i=this._getContentDisposition(e,a),r=this._getContentType(e,a),n="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(i||[]),"Content-Type":[].concat(r||[])};typeof a.header=="object"&&h1(s,a.header);var p;for(var d in s)if(Xi(s,d)){if(p=s[d],p==null)continue;Array.isArray(p)||(p=[p]),p.length&&(n+=d+": "+p.join("; ")+ge.LINE_BREAK)}return"--"+this.getBoundary()+ge.LINE_BREAK+n+ge.LINE_BREAK};ge.prototype._getContentDisposition=function(t,e){var a;if(typeof e.filepath=="string"?a=u1.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?a=u1.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&Xi(t,"httpVersion")&&(a=u1.basename(t.client._httpMessage.path||"")),a)return'filename="'+a+'"'};ge.prototype._getContentType=function(t,e){var a=e.contentType;return!a&&t&&t.name&&(a=f1.lookup(t.name)),!a&&t&&t.path&&(a=f1.lookup(t.path)),!a&&t&&t.readable&&Xi(t,"httpVersion")&&(a=t.headers["content-type"]),!a&&(e.filepath||e.filename)&&(a=f1.lookup(e.filepath||e.filename)),!a&&t&&typeof t=="object"&&(a=ge.DEFAULT_CONTENT_TYPE),a};ge.prototype._multiPartFooter=function(){return function(t){var e=ge.LINE_BREAK,a=this._streams.length===0;a&&(e+=this._lastBoundary()),t(e)}.bind(this)};ge.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+ge.LINE_BREAK};ge.prototype.getHeaders=function(t){var e,a={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)Xi(t,e)&&(a[e.toLowerCase()]=t[e]);return a};ge.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};ge.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};ge.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),a=0,i=this._streams.length;a<i;a++)typeof this._streams[a]!="function"&&(Buffer.isBuffer(this._streams[a])?t=Buffer.concat([t,this._streams[a]]):t=Buffer.concat([t,Buffer.from(this._streams[a])]),(typeof this._streams[a]!="string"||this._streams[a].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(ge.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};ge.prototype._generateBoundary=function(){this._boundary="--------------------------"+xR.randomBytes(12).toString("hex")};ge.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};ge.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};ge.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}wR.parallel(this._valuesToMeasure,this._lengthRetriever,function(a,i){if(a){t(a);return}i.forEach(function(r){e+=r}),t(null,e)})};ge.prototype.submit=function(t,e){var a,i,r={method:"post"};return typeof t=="string"?(t=yR(t),i=h1({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},r)):(i=h1(t,r),i.port||(i.port=i.protocol==="https:"?443:80)),i.headers=this.getHeaders(t.headers),i.protocol==="https:"?a=gR.request(i):a=hR.request(i),this.getLength(function(n,s){if(n&&n!=="Unknown stream"){this._error(n);return}if(s&&a.setHeader("Content-Length",s),this.pipe(a),e){var p,d=o(function(l,c){return a.removeListener("error",d),a.removeListener("response",p),e.call(this,l,c)},"callback");p=d.bind(this,null),a.on("error",d),a.on("response",p)}}.bind(this)),a};ge.prototype._error=function(t){this.error||(this.error=t,this.
Line truncated
|
||||
${hA.sanitize(this)}`}};oa.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";oa.PARSE_ERROR="PARSE_ERROR";var za=uB.createClientLogger("core-http");function m7(t,e){return t?e.httpsAgent:e.httpAgent}o(m7,"getCachedAgent");var kl=class extends vB.Transform{static{o(this,"ReportTransform")}constructor(e){super(),this.progressCallback=e,this.loadedBytes=0}_transform(e,a,i){this.push(e),this.loadedBytes+=e.length,this.progressCallback({loadedBytes:this.loadedBytes}),i(void 0)}};function Dl(t){return t&&typeof t.pipe=="function"}o(Dl,"isReadableStream");function u7(t,e){return new Promise(a=>{t.once("close",()=>{e?.abort(),a()}),t.once("end",a),t.once("error",a)})}o(u7,"isStreamComplete");function gA(t){let e=new er;return t.forEach((a,i)=>{e.set(i,a)}),e}o(gA,"parseHeaders");var jl=class{static{o(this,"NodeFetchHttpClient")}constructor(){this.proxyAgentMap=new Map,this.keepAliveAgents={}}async sendRequest(e){var a;if(!e&&typeof e!="object")throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.");let i=new Bl.AbortController,r;if(e.abortSignal){if(e.abortSignal.aborted)throw new Bl.AbortError("The operation was aborted.");r=o(l=>{l.type==="abort"&&i.abort()},"abortListener"),e.abortSignal.addEventListener("abort",r)}if(e.timeout&&setTimeout(()=>{i.abort()},e.timeout),e.formData){let l=e.formData,c=new wB.default,m=o((f,h)=>{typeof h=="function"&&(h=h()),h&&Object.prototype.hasOwnProperty.call(h,"value")&&Object.prototype.hasOwnProperty.call(h,"options")?c.append(f,h.value,h.options):c.append(f,h)},"appendFormValue");for(let f of Object.keys(l)){let h=l[f];if(Array.isArray(h))for(let b=0;b<h.length;b++)m(f,h[b]);else m(f,h)}e.body=c,e.formData=void 0;let u=e.headers.get("Content-Type");u&&u.indexOf("multipart/form-data")!==-1&&(typeof c.getBoundary=="function"?e.headers.set("Content-Type",`multipart/form-data; boundary=${c.getBoundary()}`):e.headers.remove("Content-Type"))}let n=e.body?typeof e.body=="function"?e.body():e.body:void 0;if(e.onUploadProgress&&e.body){let l=e.onUploadProgress,c=new kl(l);Dl(n)?n.pipe(c):c.end(n),n=c}let s=await this.prepareRequest(e),p=Object.assign({body:n,headers:e.headers.rawHeaders(),method:e.method,signal:i.signal,redirect:"manual"},s),d;try{let l=await this.fetch(e.url,p),c=gA(l.headers),m=((a=e.streamResponseStatusCodes)===null||a===void 0?void 0:a.has(l.status))||e.streamResponseBody;d={headers:c,request:e,status:l.status,readableStreamBody:m?l.body:void 0,bodyAsText:m?void 0:await l.text()};let u=e.onDownloadProgress;if(u){let f=l.body||void 0;if(Dl(f)){let h=new kl(u);f.pipe(h),d.readableStreamBody=h}else{let h=parseInt(c.get("Content-Length"))||void 0;h&&u({loadedBytes:h})}}return await this.processRequest(d),d}catch(l){let c=l;throw c.code==="ENOTFOUND"?new oa(c.message,oa.REQUEST_SEND_ERROR,void 0,e):c.type==="aborted"?new Bl.AbortError("The operation was aborted."):c}finally{if(e.abortSignal&&r){let l=Promise.resolve();Dl(n)&&(l=u7(n));let c=Promise.resolve();Dl(d?.readableStreamBody)&&(c=u7(d.readableStreamBody,i)),Promise.all([l,c]).then(()=>{var m;(m=e.abortSignal)===null||m===void 0||m.removeEventListener("abort",r)}).catch(m=>{za.warning("Error when cleaning up abortListener on httpRequest",m)})}}}getOrCreateAgent(e){var a;let i=Cf(e.url);if(e.proxySettings){let{host:r,port:n,username:s,password:p}=e.proxySettings,d=`${r}:${n}:${s}:${p}`,l=(a=this.proxyAgentMap.get(d))!==null&&a!==void 0?a:{},c=m7(i,l);if(c)return c;let m=cA(e.url,e.proxySettings,e.headers);return c=m.agent,m.isHttps?l.httpsAgent=m.agent:l.httpAgent=m.agent,this.proxyAgentMap.set(d,l),c}else if(e.keepAlive){let r=m7(i,this.keepAliveAgents);if(r)return r;let n={keepAlive:e.keepAlive};return i?r=this.keepAliveAgents.httpsAgent=new o7.Agent(n):r=this.keepAliveAgents.httpAgent=new s7.Agent(n),r}else return i?o7.globalAgent:s7.globalAgent}async fetch(e,a){return NB.default(e,a)}async prepareRequest(e){let a={};return a.agent=this.getOrCreateAgent(e),a.compress=e.decompressResponse,a}async processRequest(e){}};H.HttpPipelineLogLevel=void 0;(function(t){t[t.OFF=0]="OFF",t[t.ERROR=1]="ERROR",t[t.WARNING=2]="WARNING",t[t.INFO=3]="INFO"})(H.HttpPipelineLogLevel||(H.HttpPipelineLogLevel={}));function yA(t){let{requestOptions:e,tracingOptions:a}=t,r=cB.__rest(t,["requestOptions","tracingOptions"]);return e&&(r=Object.assign(Object.assign({},r),e)),a&&(r.tracingContext=a.tracingContext,r.spanOptions=a?.spanOptions),r}o(yA,"operationOptionsToRequestOptionsBase");var ct=class{static{o(this,"BaseRequestPolicy")}constructor(e,a){this._nextPolicy=e,this._options=a}shouldLog(e){return this._options.shouldLog(e)}log(e,a){this._options.log(e,a)}},Ul=class{static{o(this,"RequestPolicyOptions")}constructor(e){this._logger=e}shouldLog(e){return!!this._logger&&e!==H.HttpPipelineLogLevel.OFF&&e<=this._logger.minimumLogLevel}log(e,a){this._logger&&this.shouldLog(e)&&this._logger.log(e,a)}},B7={explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:lt,explicitArray:!0,ignore
Line truncated
|
||||
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1},ql=Object.assign({},B7);ql.explicitArray=!1;var Bo=Object.assign({},B7);Bo.explicitArray=!1;Bo.renderOpts={pretty:!1};function Tf(t,e={}){var a;return Bo.rootName=e.rootName,Bo.charkey=(a=e.xmlCharKey)!==null&&a!==void 0?a:_i,new N7.Builder(Bo).buildObject(t)}o(Tf,"stringifyXML");function A7(t,e={}){var a;ql.explicitRoot=!!e.includeRoot,ql.charkey=(a=e.xmlCharKey)!==null&&a!==void 0?a:_i;let i=new N7.Parser(ql);return new Promise((r,n)=>{t?i.parseString(t,(s,p)=>{s?n(s):r(p)}):n(new Error("Document is empty"))})}o(A7,"parseXML");function Qf(t,e){return{create:(a,i)=>new Of(a,i,t,e)}}o(Qf,"deserializationPolicy");var q7=["application/json","text/json"],M7=["application/xml","application/atom+xml"],vA={expectedContentTypes:{json:q7,xml:M7}},Of=class extends ct{static{o(this,"DeserializationPolicy")}constructor(e,a,i,r={}){var n;super(e,a),this.jsonContentTypes=i&&i.json||q7,this.xmlContentTypes=i&&i.xml||M7,this.xmlCharKey=(n=r.xmlCharKey)!==null&&n!==void 0?n:_i}async sendRequest(e){return this._nextPolicy.sendRequest(e).then(a=>z7(this.jsonContentTypes,this.xmlContentTypes,a,{xmlCharKey:this.xmlCharKey}))}};function bA(t){let e,a=t.request,i=a.operationSpec;if(i){let r=a.operationResponseGetter;r?e=r(i,t):e=i.responses[t.status]}return e}o(bA,"getOperationResponse");function xA(t){let e=t.request.shouldDeserialize,a;return e===void 0?a=!0:typeof e=="boolean"?a=e:a=e(t),a}o(xA,"shouldDeserializeResponse");function z7(t,e,a,i={}){var r,n,s;let p={rootName:(r=i.rootName)!==null&&r!==void 0?r:"",includeRoot:(n=i.includeRoot)!==null&&n!==void 0?n:!1,xmlCharKey:(s=i.xmlCharKey)!==null&&s!==void 0?s:_i};return _A(t,e,a,p).then(d=>{if(!xA(d))return d;let l=d.request.operationSpec;if(!l||!l.responses)return d;let c=bA(d),{error:m,shouldReturnResponse:u}=NA(d,l,c);if(m)throw m;if(u)return d;if(c){if(c.bodyMapper){let f=d.parsedBody;l.isXML&&c.bodyMapper.type.name===qr.Sequence&&(f=typeof f=="object"?f[c.bodyMapper.xmlElementName]:[]);try{d.parsedBody=l.serializer.deserialize(c.bodyMapper,f,"operationRes.parsedBody",i)}catch(h){throw new oa(`Error ${h} occurred in deserializing the responseBody - ${d.bodyAsText}`,void 0,d.status,d.request,d)}}else l.httpMethod==="HEAD"&&(d.parsedBody=a.status>=200&&a.status<300);c.headersMapper&&(d.parsedHeaders=l.serializer.deserialize(c.headersMapper,d.headers.toJson(),"operationRes.parsedHeaders",i))}return d})}o(z7,"deserializeResponseBody");function wA(t){let e=Object.keys(t.responses);return e.length===0||e.length===1&&e[0]==="default"}o(wA,"isOperationSpecEmpty");function NA(t,e,a){var i;let r=200<=t.status&&t.status<300;if(wA(e)?r:!!a)if(a){if(!a.isError)return{error:null,shouldReturnResponse:!1}}else return{error:null,shouldReturnResponse:!1};let s=a??e.responses.default,d=((i=t.request.streamResponseStatusCodes)===null||i===void 0?void 0:i.has(t.status))||t.request.streamResponseBody?`Unexpected status code: ${t.status}`:t.bodyAsText,l=new oa(d,void 0,t.status,t.request,t);if(!s)throw l;let c=s.bodyMapper,m=s.headersMapper;try{if(t.parsedBody){let u=t.parsedBody,f;if(c){let b=u;e.isXML&&c.type.name===qr.Sequence&&(b=typeof u=="object"?u[c.xmlElementName]:[]),f=e.serializer.deserialize(c,b,"error.response.parsedBody")}let h=u.error||f||u;l.code=h.code,h.message&&(l.message=h.message),c&&(l.response.parsedBody=f)}t.headers&&m&&(l.response.parsedHeaders=e.serializer.deserialize(m,t.headers.toJson(),"operationRes.parsedHeaders"))}catch(u){l.message=`Error "${u.message}" occurred in deserializing the responseBody - "${t.bodyAsText}" for the default response.`}return{error:l,shouldReturnResponse:!1}}o(NA,"handleErrorResponse");function _A(t,e,a,i){var r;let n=o(p=>{let d=`Error "${p}" occurred while parsing the response body - ${a.bodyAsText}.`,l=p.code||oa.PARSE_ERROR,c=new oa(d,l,a.status,a.request,a);return Promise.reject(c)},"errorHandler");if(!(((r=a.request.streamResponseStatusCodes)===null||r===void 0?void 0:r.has(a.status))||a.request.streamResponseBody)&&a.bodyAsText){let p=a.bodyAsText,d=a.headers.get("Content-Type")||"",l=d?d.split(";").map(c=>c.toLowerCase()):[];if(l.length===0||l.some(c=>t.indexOf(c)!==-1))return new Promise(c=>{a.parsedBody=JSON.parse(p),c(a)}).catch(n);if(l.some(c=>e.indexOf(c)!==-1))return A7(p,i).then(c=>(a.parsedBody=c,a)).catch(n)}return Promise.resolve(a)}o(_A,"parse");var L7={enable:!0};function k7(t){return{create:(e,a)=>new Pf(e,a,t||L7)}}o(k7,"keepAlivePolicy");var Pf=class extends ct{static{o(this,"KeepAlivePolicy")}constructor(e,a,i){super(e,a),this.keepAliveOptions=i}async sendRequest(e){return e.keepAlive=this.keepAliveOptions.enable,this._nextPolicy.sendRequest(e)}},f7=["GET","HEAD"],SA={handleRedirects:!0,maxRetries:20};function Jf(t=20){return{create:(e,a)=>new Rf(e,a,t)}}o(Jf,"redirectPolicy");var Rf=class extends ct{static{o(this,"RedirectPolicy")}constructor(e,a,i=20){super(e,a),this.maxRetries=i}sendRequest(e){return this._nextPolicy.sendRequest(e).then(a=>j7(this,a,0))}};functi
Line truncated
|
||||
`).join(""))}return this._nextPolicy.sendRequest(e)}},G7=[],X7=!1,zA=new Map;function LA(){if(!process)return;let t=Al(wa.HTTPS_PROXY),e=Al(wa.ALL_PROXY),a=Al(wa.HTTP_PROXY);return t||e||a}o(LA,"loadEnvironmentProxyValue");function kA(t,e,a){if(e.length===0)return!1;let i=ai.parse(t).getHost();if(a?.has(i))return a.get(i);let r=!1;for(let n of e)n[0]==="."?(i.endsWith(n)||i.length===n.length-1&&i===n.slice(1))&&(r=!0):i===n&&(r=!0);return a?.set(i,r),r}o(kA,"isBypassed");function jA(){let t=Al(wa.NO_PROXY);return X7=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}o(jA,"loadNoProxy");function W7(t){if(!t&&(t=LA(),!t))return;let{username:e,password:a,urlWithoutAuth:i}=UA(t),r=ai.parse(i);return{host:(r.getScheme()?r.getScheme()+"://":"")+r.getHost(),port:Number.parseInt(r.getPort()||"80"),username:e,password:a}}o(W7,"getDefaultProxySettings");function s0(t,e){return t||(t=W7()),X7||G7.push(...jA()),{create:(a,i)=>new Lf(a,i,t,e?.customNoProxyList)}}o(s0,"proxyPolicy");function UA(t){let e=t.indexOf("@");if(e===-1)return{urlWithoutAuth:t};let a=t.indexOf("://"),i=a!==-1?a+3:0,r=t.substring(i,e),n=r.indexOf(":"),s=n!==-1,p=s?r.substring(0,n):r,d=s?r.substring(n+1):void 0,l=t.substring(0,i)+t.substring(e+1);return{username:p,password:d,urlWithoutAuth:l}}o(UA,"extractAuthFromUrl");var Lf=class extends ct{static{o(this,"ProxyPolicy")}constructor(e,a,i,r){super(e,a),this.proxySettings=i,this.customNoProxyList=r}sendRequest(e){var a;return!e.proxySettings&&!kA(e.url,(a=this.customNoProxyList)!==null&&a!==void 0?a:G7,this.customNoProxyList?void 0:zA)&&(e.proxySettings=this.proxySettings),this._nextPolicy.sendRequest(e)}};function FA(t=30){return{create:(e,a)=>new kf(e,a,t)}}o(FA,"rpRegistrationPolicy");var kf=class extends ct{static{o(this,"RPRegistrationPolicy")}constructor(e,a,i=30){super(e,a),this._retryTimeout=i}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then(a=>HA(this,e,a))}};function HA(t,e,a){if(a.status===409){let i=VA(a.bodyAsText);if(i){let r=$A(e.url);return GA(t,r,i,e).catch(()=>!1).then(n=>n?(e.headers.set("x-ms-client-request-id",Vl()),t._nextPolicy.sendRequest(e.clone())):a)}}return Promise.resolve(a)}o(HA,"registerIfNeeded");function K7(t,e=!1){let a=t.clone();return e&&(a.url=t.url),a.headers.set("x-ms-client-request-id",Vl()),a.headers.set("Content-Type","application/json; charset=utf-8"),a}o(K7,"getRequestEssentials");function VA(t){let e,a;if(t){try{a=JSON.parse(t)}catch{}if(a&&a.error&&a.error.message&&a.error.code&&a.error.code==="MissingSubscriptionRegistration"){let i=a.error.message.match(/.*'(.*)'/i);i&&(e=i.pop())}}return e}o(VA,"checkRPNotRegisteredError");function $A(t){let e,a=t.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(a&&a[0])e=a[0];else throw new Error(`Unable to extract subscriptionId from the given url - ${t}.`);return e}o($A,"extractSubscriptionUrl");async function GA(t,e,a,i){let r=`${e}providers/${a}/register?api-version=2016-02-01`,n=`${e}providers/${a}?api-version=2016-02-01`,s=K7(i);if(s.method="POST",s.url=r,(await t._nextPolicy.sendRequest(s)).status!==200)throw new Error(`Autoregistration of ${a} failed. Please try registering manually.`);return Y7(t,n,i)}o(GA,"registerRP");async function Y7(t,e,a){let i=K7(a);i.url=e,i.method="GET";let r=await t._nextPolicy.sendRequest(i),n=r.parsedBody;return r.parsedBody&&n.registrationState&&n.registrationState==="Registered"?!0:(await ti.delay(t._retryTimeout*1e3),Y7(t,e,a))}o(Y7,"getRegistrationStatus");function Q7(t){return{create:(e,a)=>new jf(e,a,t)}}o(Q7,"signingPolicy");var jf=class extends ct{static{o(this,"SigningPolicy")}constructor(e,a,i){super(e,a),this.authenticationProvider=i}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then(a=>this._nextPolicy.sendRequest(a))}};function o0(t,e,a,i){return{create:(r,n)=>new Uf(r,n,t,e,a,i)}}o(o0,"systemErrorRetryPolicy");var Uf=class extends ct{static{o(this,"SystemErrorRetryPolicy")}constructor(e,a,i,r,n,s){super(e,a),this.retryCount=Ar(i)?i:Zf,this.retryInterval=Ar(r)?r:e0,this.minRetryInterval=Ar(n)?n:EA,this.maxRetryInterval=Ar(s)?s:t0}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch(a=>J7(this,e,a.response,a))}};async function J7(t,e,a,i,r){r=F7(t,r,i);function n(s,p){return!!(p&&p.code&&(p.code==="ETIMEDOUT"||p.code==="ESOCKETTIMEDOUT"||p.code==="ECONNREFUSED"||p.code==="ECONNRESET"||p.code==="ENOENT"))}if(o(n,"shouldPolicyRetry"),U7(t.retryCount,n,r,a,i))try{return await ti.delay(r.retryInterval),t._nextPolicy.sendRequest(e.clone())}catch(s){return J7(t,e,a,s,r)}else return i?Promise.reject(r.error):a}o(J7,"retry");var XA=3,h7=wa.HttpConstants.StatusCodes;function p0(){return{create:(t,e)=>new Ff(t,e)}}o(p0,"throttlingRetryPolicy");var g7="The operation was aborted.",Ff=class t extends ct{static{o(this,"ThrottlingRetryPolicy")}constructor(e,a,i){super(e,a),this.numberOfRetries=0,this._handleResponse=i||this._defaultResponseHandler}async sendRequest(e){let a=await this.
Line truncated
|
||||
|
||||
+35
-35
@@ -1,19 +1,19 @@
|
||||
var lC=Object.create;var go=Object.defineProperty;var dC=Object.getOwnPropertyDescriptor;var cC=Object.getOwnPropertyNames;var uC=Object.getPrototypeOf,mC=Object.prototype.hasOwnProperty;var o=(t,e)=>go(t,"name",{value:e,configurable:!0});var jt=(t,e)=>()=>(t&&(e=t(t=0)),e);var N=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),p4=(t,e)=>{for(var a in e)go(t,a,{get:e[a],enumerable:!0})},l4=(t,e,a,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of cC(e))!mC.call(t,r)&&r!==a&&go(t,r,{get:()=>e[r],enumerable:!(i=dC(e,r))||i.enumerable});return t};var ba=(t,e,a)=>(a=t!=null?lC(uC(t)):{},l4(e||!t||!t.__esModule?go(a,"default",{value:t,enumerable:!0}):a,t)),nl=t=>l4(go({},"__esModule",{value:!0}),t);var sl=N(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.toCommandProperties=En.toCommandValue=void 0;function fC(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}o(fC,"toCommandValue");En.toCommandValue=fC;function hC(t){return Object.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}o(hC,"toCommandProperties");En.toCommandProperties=hC});var m4=N(xa=>{"use strict";var gC=xa&&xa.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),yC=xa&&xa.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vC=xa&&xa.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&gC(e,t,a);return yC(e,t),e};Object.defineProperty(xa,"__esModule",{value:!0});xa.issue=xa.issueCommand=void 0;var bC=vC(require("os")),c4=sl();function u4(t,e,a){let i=new fm(t,e,a);process.stdout.write(i.toString()+bC.EOL)}o(u4,"issueCommand");xa.issueCommand=u4;function xC(t,e=""){u4(t,{},e)}o(xC,"issue");xa.issue=xC;var d4="::",fm=class{static{o(this,"Command")}constructor(e,a,i){e||(e="missing.command"),this.command=e,this.properties=a,this.message=i}toString(){let e=d4+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let a=!0;for(let i in this.properties)if(this.properties.hasOwnProperty(i)){let r=this.properties[i];r&&(a?a=!1:e+=",",e+=`${i}=${NC(r)}`)}}return e+=`${d4}${wC(this.message)}`,e}};function wC(t){return(0,c4.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}o(wC,"escapeData");function NC(t){return(0,c4.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}o(NC,"escapeProperty")});var g4=N(wa=>{"use strict";var _C=wa&&wa.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),SC=wa&&wa.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),gm=wa&&wa.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&_C(e,t,a);return SC(e,t),e};Object.defineProperty(wa,"__esModule",{value:!0});wa.prepareKeyValueMessage=wa.issueFileCommand=void 0;var EC=gm(require("crypto")),f4=gm(require("fs")),hm=gm(require("os")),h4=sl();function CC(t,e){let a=process.env[`GITHUB_${t}`];if(!a)throw new Error(`Unable to find environment variable for file command ${t}`);if(!f4.existsSync(a))throw new Error(`Missing file at path: ${a}`);f4.appendFileSync(a,`${(0,h4.toCommandValue)(e)}${hm.EOL}`,{encoding:"utf8"})}o(CC,"issueFileCommand");wa.issueFileCommand=CC;function TC(t,e){let a=`ghadelimiter_${EC.randomUUID()}`,i=(0,h4.toCommandValue)(e);if(t.includes(a))throw new Error(`Unexpected input: name should not contain the delimiter "${a}"`);if(i.includes(a))throw new Error(`Unexpected input: value should not contain the delimiter "${a}"`);return`${t}<<${a}${hm.EOL}${i}${hm.EOL}${a}`}o(TC,"prepareKeyValueMessage");wa.prepareKeyValueMessage=TC});var v4=N(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.checkBypass=Cn.getProxyUrl=void 0;function OC(t){let e=t.protocol==="https:";if(y4(t))return;let a=(()=>e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY)();if(a)try{return new URL(a)}catch{if(!a.startsWith("http://")&&!a.startsWith("https://"))return new URL(`http://${a}`)}else return}o(OC,"getProxyUrl");Cn.getProxyUrl=OC;function y4(t){if(!t.hostname)return!1;let e=t.hostname;if(RC(e))return!0;let a=process.env.no_proxy||proLine truncated
|
||||
`,u.message,u.stack);var m=new Error("tunneling socket could not be established, cause="+u.message);m.code="ECONNRESET",e.request.emit("error",m),i.removeSocket(r)}o(c,"onError")},"createSocket");Si.prototype.removeSocket=o(function(e){var a=this.sockets.indexOf(e);if(a!==-1){this.sockets.splice(a,1);var i=this.requests.shift();i&&this.createSocket(i,function(r){i.request.onSocket(r)})}},"removeSocket");function x4(t,e){var a=this;Si.prototype.createSocket.call(a,t,function(i){var r=t.request.getHeader("host"),n=vm({},a.options,{socket:i,servername:r?r.replace(/:.*$/,""):t.host}),s=PC.connect(0,n);a.sockets[a.sockets.indexOf(i)]=s,e(s)})}o(x4,"createSecureSocket");function w4(t,e,a){return typeof t=="string"?{host:t,port:e,localAddress:a}:t}o(w4,"toOptions");function vm(t){for(var e=1,a=arguments.length;e<a;++e){var i=arguments[e];if(typeof i=="object")for(var r=Object.keys(i),n=0,s=r.length;n<s;++n){var p=r[n];i[p]!==void 0&&(t[p]=i[p])}}return t}o(vm,"mergeOptions");var Ki;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Ki=o(function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)},"debug"):Ki=o(function(){},"debug");Tn.debug=Ki});var bm=N((cW,_4)=>{_4.exports=N4()});var Lr=N(Pe=>{"use strict";var qC=Pe&&Pe.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),zC=Pe&&Pe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ul=Pe&&Pe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&qC(e,t,a);return zC(e,t),e},rt=Pe&&Pe.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.HttpClient=Pe.isHttps=Pe.HttpClientResponse=Pe.HttpClientError=Pe.getProxyUrl=Pe.MediaTypes=Pe.Headers=Pe.HttpCodes=void 0;var ol=ul(require("http")),xm=ul(require("https")),S4=ul(v4()),pl=ul(bm()),Ha;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(Ha=Pe.HttpCodes||(Pe.HttpCodes={}));var Ft;(function(t){t.Accept="accept",t.ContentType="content-type"})(Ft=Pe.Headers||(Pe.Headers={}));var Yi;(function(t){t.ApplicationJson="application/json"})(Yi=Pe.MediaTypes||(Pe.MediaTypes={}));function jC(t){let e=S4.getProxyUrl(new URL(t));return e?e.href:""}o(jC,"getProxyUrl");Pe.getProxyUrl=jC;var kC=[Ha.MovedPermanently,Ha.ResourceMoved,Ha.SeeOther,Ha.TemporaryRedirect,Ha.PermanentRedirect],UC=[Ha.BadGateway,Ha.ServiceUnavailable,Ha.GatewayTimeout],HC=["OPTIONS","GET","DELETE","HEAD"],FC=10,VC=5,dl=class t extends Error{static{o(this,"HttpClientError")}constructor(e,a){super(e),this.name="HttpClientError",this.statusCode=a,Object.setPrototypeOf(this,t.prototype)}};Pe.HttpClientError=dl;var cl=class{static{o(this,"HttpClientResponse")}constructor(e){this.message=e}readBody(){return rt(this,void 0,void 0,function*(){return new Promise(e=>rt(this,void 0,void 0,function*(){let a=Buffer.alloc(0);this.message.on("data",i=>{a=Buffer.concat([a,i])}),this.message.on("end",()=>{e(a.toString())})}))})}readBodyBuffer(){return rt(this,void 0,void 0,function*(){return new Promise(e=>rt(this,void 0,void 0,function*(){let a=[];this.message.on("data",i=>{a.push(i)}),this.message.on("end",()=>{e(Buffer.concat(a))})}))})}};Pe.HttpClientResponse=cl;function $C(t){return new URL(t).protocol==="https:"}o($C,"isHttps");Pe.isHttps=$C;var wm=class{static{o(this,"HttpClient")}constructor(e,a,i){this._ignoreSslError=!1
Line truncated
|
||||
var lC=Object.create;var go=Object.defineProperty;var dC=Object.getOwnPropertyDescriptor;var cC=Object.getOwnPropertyNames;var uC=Object.getPrototypeOf,mC=Object.prototype.hasOwnProperty;var o=(t,e)=>go(t,"name",{value:e,configurable:!0});var jt=(t,e)=>()=>(t&&(e=t(t=0)),e);var N=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),p4=(t,e)=>{for(var a in e)go(t,a,{get:e[a],enumerable:!0})},l4=(t,e,a,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of cC(e))!mC.call(t,r)&&r!==a&&go(t,r,{get:()=>e[r],enumerable:!(i=dC(e,r))||i.enumerable});return t};var ba=(t,e,a)=>(a=t!=null?lC(uC(t)):{},l4(e||!t||!t.__esModule?go(a,"default",{value:t,enumerable:!0}):a,t)),nl=t=>l4(go({},"__esModule",{value:!0}),t);var sl=N(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.toCommandProperties=Cn.toCommandValue=void 0;function fC(t){return t==null?"":typeof t=="string"||t instanceof String?t:JSON.stringify(t)}o(fC,"toCommandValue");Cn.toCommandValue=fC;function hC(t){return Object.keys(t).length?{title:t.title,file:t.file,line:t.startLine,endLine:t.endLine,col:t.startColumn,endColumn:t.endColumn}:{}}o(hC,"toCommandProperties");Cn.toCommandProperties=hC});var m4=N(xa=>{"use strict";var gC=xa&&xa.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),yC=xa&&xa.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),vC=xa&&xa.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&gC(e,t,a);return yC(e,t),e};Object.defineProperty(xa,"__esModule",{value:!0});xa.issue=xa.issueCommand=void 0;var bC=vC(require("os")),c4=sl();function u4(t,e,a){let i=new fm(t,e,a);process.stdout.write(i.toString()+bC.EOL)}o(u4,"issueCommand");xa.issueCommand=u4;function xC(t,e=""){u4(t,{},e)}o(xC,"issue");xa.issue=xC;var d4="::",fm=class{static{o(this,"Command")}constructor(e,a,i){e||(e="missing.command"),this.command=e,this.properties=a,this.message=i}toString(){let e=d4+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let a=!0;for(let i in this.properties)if(this.properties.hasOwnProperty(i)){let r=this.properties[i];r&&(a?a=!1:e+=",",e+=`${i}=${NC(r)}`)}}return e+=`${d4}${wC(this.message)}`,e}};function wC(t){return(0,c4.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}o(wC,"escapeData");function NC(t){return(0,c4.toCommandValue)(t).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}o(NC,"escapeProperty")});var g4=N(wa=>{"use strict";var _C=wa&&wa.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),SC=wa&&wa.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),gm=wa&&wa.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&_C(e,t,a);return SC(e,t),e};Object.defineProperty(wa,"__esModule",{value:!0});wa.prepareKeyValueMessage=wa.issueFileCommand=void 0;var EC=gm(require("crypto")),f4=gm(require("fs")),hm=gm(require("os")),h4=sl();function CC(t,e){let a=process.env[`GITHUB_${t}`];if(!a)throw new Error(`Unable to find environment variable for file command ${t}`);if(!f4.existsSync(a))throw new Error(`Missing file at path: ${a}`);f4.appendFileSync(a,`${(0,h4.toCommandValue)(e)}${hm.EOL}`,{encoding:"utf8"})}o(CC,"issueFileCommand");wa.issueFileCommand=CC;function TC(t,e){let a=`ghadelimiter_${EC.randomUUID()}`,i=(0,h4.toCommandValue)(e);if(t.includes(a))throw new Error(`Unexpected input: name should not contain the delimiter "${a}"`);if(i.includes(a))throw new Error(`Unexpected input: value should not contain the delimiter "${a}"`);return`${t}<<${a}${hm.EOL}${i}${hm.EOL}${a}`}o(TC,"prepareKeyValueMessage");wa.prepareKeyValueMessage=TC});var v4=N(Tn=>{"use strict";Object.defineProperty(Tn,"__esModule",{value:!0});Tn.checkBypass=Tn.getProxyUrl=void 0;function OC(t){let e=t.protocol==="https:";if(y4(t))return;let a=(()=>e?process.env.https_proxy||process.env.HTTPS_PROXY:process.env.http_proxy||process.env.HTTP_PROXY)();if(a)try{return new URL(a)}catch{if(!a.startsWith("http://")&&!a.startsWith("https://"))return new URL(`http://${a}`)}else return}o(OC,"getProxyUrl");Tn.getProxyUrl=OC;function y4(t){if(!t.hostname)return!1;let e=t.hostname;if(RC(e))return!0;let a=process.env.no_proxy||proLine truncated
|
||||
`,u.message,u.stack);var m=new Error("tunneling socket could not be established, cause="+u.message);m.code="ECONNRESET",e.request.emit("error",m),i.removeSocket(r)}o(c,"onError")},"createSocket");Si.prototype.removeSocket=o(function(e){var a=this.sockets.indexOf(e);if(a!==-1){this.sockets.splice(a,1);var i=this.requests.shift();i&&this.createSocket(i,function(r){i.request.onSocket(r)})}},"removeSocket");function x4(t,e){var a=this;Si.prototype.createSocket.call(a,t,function(i){var r=t.request.getHeader("host"),n=vm({},a.options,{socket:i,servername:r?r.replace(/:.*$/,""):t.host}),s=PC.connect(0,n);a.sockets[a.sockets.indexOf(i)]=s,e(s)})}o(x4,"createSecureSocket");function w4(t,e,a){return typeof t=="string"?{host:t,port:e,localAddress:a}:t}o(w4,"toOptions");function vm(t){for(var e=1,a=arguments.length;e<a;++e){var i=arguments[e];if(typeof i=="object")for(var r=Object.keys(i),n=0,s=r.length;n<s;++n){var p=r[n];i[p]!==void 0&&(t[p]=i[p])}}return t}o(vm,"mergeOptions");var Ki;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Ki=o(function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)},"debug"):Ki=o(function(){},"debug");On.debug=Ki});var bm=N((cW,_4)=>{_4.exports=N4()});var qr=N(Pe=>{"use strict";var qC=Pe&&Pe.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),zC=Pe&&Pe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ul=Pe&&Pe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&qC(e,t,a);return zC(e,t),e},rt=Pe&&Pe.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.HttpClient=Pe.isHttps=Pe.HttpClientResponse=Pe.HttpClientError=Pe.getProxyUrl=Pe.MediaTypes=Pe.Headers=Pe.HttpCodes=void 0;var ol=ul(require("http")),xm=ul(require("https")),S4=ul(v4()),pl=ul(bm()),Ha;(function(t){t[t.OK=200]="OK",t[t.MultipleChoices=300]="MultipleChoices",t[t.MovedPermanently=301]="MovedPermanently",t[t.ResourceMoved=302]="ResourceMoved",t[t.SeeOther=303]="SeeOther",t[t.NotModified=304]="NotModified",t[t.UseProxy=305]="UseProxy",t[t.SwitchProxy=306]="SwitchProxy",t[t.TemporaryRedirect=307]="TemporaryRedirect",t[t.PermanentRedirect=308]="PermanentRedirect",t[t.BadRequest=400]="BadRequest",t[t.Unauthorized=401]="Unauthorized",t[t.PaymentRequired=402]="PaymentRequired",t[t.Forbidden=403]="Forbidden",t[t.NotFound=404]="NotFound",t[t.MethodNotAllowed=405]="MethodNotAllowed",t[t.NotAcceptable=406]="NotAcceptable",t[t.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",t[t.RequestTimeout=408]="RequestTimeout",t[t.Conflict=409]="Conflict",t[t.Gone=410]="Gone",t[t.TooManyRequests=429]="TooManyRequests",t[t.InternalServerError=500]="InternalServerError",t[t.NotImplemented=501]="NotImplemented",t[t.BadGateway=502]="BadGateway",t[t.ServiceUnavailable=503]="ServiceUnavailable",t[t.GatewayTimeout=504]="GatewayTimeout"})(Ha=Pe.HttpCodes||(Pe.HttpCodes={}));var Ft;(function(t){t.Accept="accept",t.ContentType="content-type"})(Ft=Pe.Headers||(Pe.Headers={}));var Yi;(function(t){t.ApplicationJson="application/json"})(Yi=Pe.MediaTypes||(Pe.MediaTypes={}));function jC(t){let e=S4.getProxyUrl(new URL(t));return e?e.href:""}o(jC,"getProxyUrl");Pe.getProxyUrl=jC;var kC=[Ha.MovedPermanently,Ha.ResourceMoved,Ha.SeeOther,Ha.TemporaryRedirect,Ha.PermanentRedirect],UC=[Ha.BadGateway,Ha.ServiceUnavailable,Ha.GatewayTimeout],HC=["OPTIONS","GET","DELETE","HEAD"],FC=10,VC=5,dl=class t extends Error{static{o(this,"HttpClientError")}constructor(e,a){super(e),this.name="HttpClientError",this.statusCode=a,Object.setPrototypeOf(this,t.prototype)}};Pe.HttpClientError=dl;var cl=class{static{o(this,"HttpClientResponse")}constructor(e){this.message=e}readBody(){return rt(this,void 0,void 0,function*(){return new Promise(e=>rt(this,void 0,void 0,function*(){let a=Buffer.alloc(0);this.message.on("data",i=>{a=Buffer.concat([a,i])}),this.message.on("end",()=>{e(a.toString())})}))})}readBodyBuffer(){return rt(this,void 0,void 0,function*(){return new Promise(e=>rt(this,void 0,void 0,function*(){let a=[];this.message.on("data",i=>{a.push(i)}),this.message.on("end",()=>{e(Buffer.concat(a))})}))})}};Pe.HttpClientResponse=cl;function $C(t){return new URL(t).protocol==="https:"}o($C,"isHttps");Pe.isHttps=$C;var wm=class{static{o(this,"HttpClient")}constructor(e,a,i){this._ignoreSslError=!1
Line truncated
|
||||
|
||||
Error Code : ${s.statusCode}
|
||||
|
||||
Error Message: ${s.message}`)})).result)===null||a===void 0?void 0:a.value;if(!n)throw new Error("Response json body do not have ID Token field");return n})}static getIDToken(e){return E4(this,void 0,void 0,function*(){try{let a=t.getIDTokenUrl();if(e){let r=encodeURIComponent(e);a=`${a}&audience=${r}`}(0,C4.debug)(`ID token url is ${a}`);let i=yield t.getCall(a);return(0,C4.setSecret)(i),i}catch(a){throw new Error(`Error message: ${a.message}`)}})}};On.OidcClient=Cm});var Pm=N(Kt=>{"use strict";var Tm=Kt&&Kt.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(Kt,"__esModule",{value:!0});Kt.summary=Kt.markdownSummary=Kt.SUMMARY_DOCS_URL=Kt.SUMMARY_ENV_VAR=void 0;var XC=require("os"),Om=require("fs"),{access:KC,appendFile:YC,writeFile:QC}=Om.promises;Kt.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";Kt.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var Rm=class{static{o(this,"Summary")}constructor(){this._buffer=""}filePath(){return Tm(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[Kt.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${Kt.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield KC(e,Om.constants.R_OK|Om.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,a,i={}){let r=Object.entries(i).map(([n,s])=>` ${n}="${s}"`).join("");return a?`<${e}${r}>${a}</${e}>`:`<${e}${r}>`}write(e){return Tm(this,void 0,void 0,function*(){let a=!!e?.overwrite,i=yield this.filePath();return yield(a?QC:YC)(i,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return Tm(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,a=!1){return this._buffer+=e,a?this.addEOL():this}addEOL(){return this.addRaw(XC.EOL)}addCodeBlock(e,a){let i=Object.assign({},a&&{lang:a}),r=this.wrap("pre",this.wrap("code",e),i);return this.addRaw(r).addEOL()}addList(e,a=!1){let i=a?"ol":"ul",r=e.map(s=>this.wrap("li",s)).join(""),n=this.wrap(i,r);return this.addRaw(n).addEOL()}addTable(e){let a=e.map(r=>{let n=r.map(s=>{if(typeof s=="string")return this.wrap("td",s);let{header:p,data:l,colspan:d,rowspan:c}=s,u=p?"th":"td",m=Object.assign(Object.assign({},d&&{colspan:d}),c&&{rowspan:c});return this.wrap(u,l,m)}).join("");return this.wrap("tr",n)}).join(""),i=this.wrap("table",a);return this.addRaw(i).addEOL()}addDetails(e,a){let i=this.wrap("details",this.wrap("summary",e)+a);return this.addRaw(i).addEOL()}addImage(e,a,i){let{width:r,height:n}=i||{},s=Object.assign(Object.assign({},r&&{width:r}),n&&{height:n}),p=this.wrap("img",null,Object.assign({src:e,alt:a},s));return this.addRaw(p).addEOL()}addHeading(e,a){let i=`h${a}`,r=["h1","h2","h3","h4","h5","h6"].includes(i)?i:"h1",n=this.wrap(r,e);return this.addRaw(n).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,a){let i=Object.assign({},a&&{cite:a}),r=this.wrap("blockquote",e,i);return this.addRaw(r).addEOL()}addLink(e,a){let i=this.wrap("a",e,{href:a});return this.addRaw(i).addEOL()}},O4=new Rm;Kt.markdownSummary=O4;Kt.summary=O4});var R4=N(Yt=>{"use strict";var JC=Yt&&Yt.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),ZC=Yt&&Yt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),eT=Yt&&Yt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&JC(e,t,a);return ZC(e,t),e};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.toPlatformPath=Yt.toWin32Path=Yt.toPosixPath=void 0;var tT=eT(require("path"));function aT(t){return t.replace(/[\\]/g,"/")}o(aT,"toPosixPath");Yt.toPosixPath=aT;function iT(t){return t.replace(/[/]/g,"\\")}o(iT,"toWin32Path");Yt.toWin32Path=iT;function rT(t){return t.replace(/[/\\]/g,tT.sep)}o(rT,"toPlatformPath");Yt.toPlatformPath=rT});var Dm=N(J=>{"use strict";var nT=J&&J.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Line truncated
|
||||
`);return{name:e,version:a}}),"getLinuxInfo");ge.platform=W4.default.platform();ge.arch=W4.default.arch();ge.isWindows=ge.platform==="win32";ge.isMacOS=ge.platform==="darwin";ge.isLinux=ge.platform==="linux";function qT(){return vl(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield ge.isWindows?BT():ge.isMacOS?MT():LT()),{platform:ge.platform,arch:ge.arch,isWindows:ge.isWindows,isMacOS:ge.isMacOS,isLinux:ge.isLinux})})}o(qT,"getDetails");ge.getDetails=qT});var nt=N(W=>{"use strict";var zT=W&&W.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),jT=W&&W.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),qm=W&&W.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&zT(e,t,a);return jT(e,t),e},K4=W&&W.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(W,"__esModule",{value:!0});W.platform=W.toPlatformPath=W.toWin32Path=W.toPosixPath=W.markdownSummary=W.summary=W.getIDToken=W.getState=W.saveState=W.group=W.endGroup=W.startGroup=W.info=W.notice=W.warning=W.error=W.debug=W.isDebug=W.setFailed=W.setCommandEcho=W.setOutput=W.getBooleanInput=W.getMultilineInput=W.getInput=W.addPath=W.setSecret=W.exportVariable=W.ExitCode=void 0;var Na=m4(),qr=g4(),In=sl(),Y4=qm(require("os")),kT=qm(require("path")),UT=T4(),Lm;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(Lm||(W.ExitCode=Lm={}));function HT(t,e){let a=(0,In.toCommandValue)(e);if(process.env[t]=a,process.env.GITHUB_ENV||"")return(0,qr.issueFileCommand)("ENV",(0,qr.prepareKeyValueMessage)(t,e));(0,Na.issueCommand)("set-env",{name:t},a)}o(HT,"exportVariable");W.exportVariable=HT;function FT(t){(0,Na.issueCommand)("add-mask",{},t)}o(FT,"setSecret");W.setSecret=FT;function VT(t){process.env.GITHUB_PATH||""?(0,qr.issueFileCommand)("PATH",t):(0,Na.issueCommand)("add-path",{},t),process.env.PATH=`${t}${kT.delimiter}${process.env.PATH}`}o(VT,"addPath");W.addPath=VT;function zm(t,e){let a=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!a)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?a:a.trim()}o(zm,"getInput");W.getInput=zm;function $T(t,e){let a=zm(t,e).split(`
|
||||
Error Message: ${s.message}`)})).result)===null||a===void 0?void 0:a.value;if(!n)throw new Error("Response json body do not have ID Token field");return n})}static getIDToken(e){return E4(this,void 0,void 0,function*(){try{let a=t.getIDTokenUrl();if(e){let r=encodeURIComponent(e);a=`${a}&audience=${r}`}(0,C4.debug)(`ID token url is ${a}`);let i=yield t.getCall(a);return(0,C4.setSecret)(i),i}catch(a){throw new Error(`Error message: ${a.message}`)}})}};Rn.OidcClient=Cm});var Pm=N(Kt=>{"use strict";var Tm=Kt&&Kt.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(Kt,"__esModule",{value:!0});Kt.summary=Kt.markdownSummary=Kt.SUMMARY_DOCS_URL=Kt.SUMMARY_ENV_VAR=void 0;var XC=require("os"),Om=require("fs"),{access:KC,appendFile:YC,writeFile:QC}=Om.promises;Kt.SUMMARY_ENV_VAR="GITHUB_STEP_SUMMARY";Kt.SUMMARY_DOCS_URL="https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary";var Rm=class{static{o(this,"Summary")}constructor(){this._buffer=""}filePath(){return Tm(this,void 0,void 0,function*(){if(this._filePath)return this._filePath;let e=process.env[Kt.SUMMARY_ENV_VAR];if(!e)throw new Error(`Unable to find environment variable for $${Kt.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);try{yield KC(e,Om.constants.R_OK|Om.constants.W_OK)}catch{throw new Error(`Unable to access summary file: '${e}'. Check if the file has correct read/write permissions.`)}return this._filePath=e,this._filePath})}wrap(e,a,i={}){let r=Object.entries(i).map(([n,s])=>` ${n}="${s}"`).join("");return a?`<${e}${r}>${a}</${e}>`:`<${e}${r}>`}write(e){return Tm(this,void 0,void 0,function*(){let a=!!e?.overwrite,i=yield this.filePath();return yield(a?QC:YC)(i,this._buffer,{encoding:"utf8"}),this.emptyBuffer()})}clear(){return Tm(this,void 0,void 0,function*(){return this.emptyBuffer().write({overwrite:!0})})}stringify(){return this._buffer}isEmptyBuffer(){return this._buffer.length===0}emptyBuffer(){return this._buffer="",this}addRaw(e,a=!1){return this._buffer+=e,a?this.addEOL():this}addEOL(){return this.addRaw(XC.EOL)}addCodeBlock(e,a){let i=Object.assign({},a&&{lang:a}),r=this.wrap("pre",this.wrap("code",e),i);return this.addRaw(r).addEOL()}addList(e,a=!1){let i=a?"ol":"ul",r=e.map(s=>this.wrap("li",s)).join(""),n=this.wrap(i,r);return this.addRaw(n).addEOL()}addTable(e){let a=e.map(r=>{let n=r.map(s=>{if(typeof s=="string")return this.wrap("td",s);let{header:p,data:l,colspan:d,rowspan:c}=s,u=p?"th":"td",m=Object.assign(Object.assign({},d&&{colspan:d}),c&&{rowspan:c});return this.wrap(u,l,m)}).join("");return this.wrap("tr",n)}).join(""),i=this.wrap("table",a);return this.addRaw(i).addEOL()}addDetails(e,a){let i=this.wrap("details",this.wrap("summary",e)+a);return this.addRaw(i).addEOL()}addImage(e,a,i){let{width:r,height:n}=i||{},s=Object.assign(Object.assign({},r&&{width:r}),n&&{height:n}),p=this.wrap("img",null,Object.assign({src:e,alt:a},s));return this.addRaw(p).addEOL()}addHeading(e,a){let i=`h${a}`,r=["h1","h2","h3","h4","h5","h6"].includes(i)?i:"h1",n=this.wrap(r,e);return this.addRaw(n).addEOL()}addSeparator(){let e=this.wrap("hr",null);return this.addRaw(e).addEOL()}addBreak(){let e=this.wrap("br",null);return this.addRaw(e).addEOL()}addQuote(e,a){let i=Object.assign({},a&&{cite:a}),r=this.wrap("blockquote",e,i);return this.addRaw(r).addEOL()}addLink(e,a){let i=this.wrap("a",e,{href:a});return this.addRaw(i).addEOL()}},O4=new Rm;Kt.markdownSummary=O4;Kt.summary=O4});var R4=N(Yt=>{"use strict";var JC=Yt&&Yt.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),ZC=Yt&&Yt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),eT=Yt&&Yt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&JC(e,t,a);return ZC(e,t),e};Object.defineProperty(Yt,"__esModule",{value:!0});Yt.toPlatformPath=Yt.toWin32Path=Yt.toPosixPath=void 0;var tT=eT(require("path"));function aT(t){return t.replace(/[\\]/g,"/")}o(aT,"toPosixPath");Yt.toPosixPath=aT;function iT(t){return t.replace(/[/]/g,"\\")}o(iT,"toWin32Path");Yt.toWin32Path=iT;function rT(t){return t.replace(/[/\\]/g,tT.sep)}o(rT,"toPlatformPath");Yt.toPlatformPath=rT});var Dm=N(J=>{"use strict";var nT=J&&J.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Line truncated
|
||||
`);return{name:e,version:a}}),"getLinuxInfo");ge.platform=W4.default.platform();ge.arch=W4.default.arch();ge.isWindows=ge.platform==="win32";ge.isMacOS=ge.platform==="darwin";ge.isLinux=ge.platform==="linux";function qT(){return vl(this,void 0,void 0,function*(){return Object.assign(Object.assign({},yield ge.isWindows?BT():ge.isMacOS?MT():LT()),{platform:ge.platform,arch:ge.arch,isWindows:ge.isWindows,isMacOS:ge.isMacOS,isLinux:ge.isLinux})})}o(qT,"getDetails");ge.getDetails=qT});var nt=N(W=>{"use strict";var zT=W&&W.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),jT=W&&W.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),qm=W&&W.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&zT(e,t,a);return jT(e,t),e},K4=W&&W.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(W,"__esModule",{value:!0});W.platform=W.toPlatformPath=W.toWin32Path=W.toPosixPath=W.markdownSummary=W.summary=W.getIDToken=W.getState=W.saveState=W.group=W.endGroup=W.startGroup=W.info=W.notice=W.warning=W.error=W.debug=W.isDebug=W.setFailed=W.setCommandEcho=W.setOutput=W.getBooleanInput=W.getMultilineInput=W.getInput=W.addPath=W.setSecret=W.exportVariable=W.ExitCode=void 0;var Na=m4(),zr=g4(),Dn=sl(),Y4=qm(require("os")),kT=qm(require("path")),UT=T4(),Lm;(function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure"})(Lm||(W.ExitCode=Lm={}));function HT(t,e){let a=(0,Dn.toCommandValue)(e);if(process.env[t]=a,process.env.GITHUB_ENV||"")return(0,zr.issueFileCommand)("ENV",(0,zr.prepareKeyValueMessage)(t,e));(0,Na.issueCommand)("set-env",{name:t},a)}o(HT,"exportVariable");W.exportVariable=HT;function FT(t){(0,Na.issueCommand)("add-mask",{},t)}o(FT,"setSecret");W.setSecret=FT;function VT(t){process.env.GITHUB_PATH||""?(0,zr.issueFileCommand)("PATH",t):(0,Na.issueCommand)("add-path",{},t),process.env.PATH=`${t}${kT.delimiter}${process.env.PATH}`}o(VT,"addPath");W.addPath=VT;function zm(t,e){let a=process.env[`INPUT_${t.replace(/ /g,"_").toUpperCase()}`]||"";if(e&&e.required&&!a)throw new Error(`Input required and not supplied: ${t}`);return e&&e.trimWhitespace===!1?a:a.trim()}o(zm,"getInput");W.getInput=zm;function $T(t,e){let a=zm(t,e).split(`
|
||||
`).filter(i=>i!=="");return e&&e.trimWhitespace===!1?a:a.map(i=>i.trim())}o($T,"getMultilineInput");W.getMultilineInput=$T;function GT(t,e){let a=["true","True","TRUE"],i=["false","False","FALSE"],r=zm(t,e);if(a.includes(r))return!0;if(i.includes(r))return!1;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${t}
|
||||
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}o(GT,"getBooleanInput");W.getBooleanInput=GT;function WT(t,e){if(process.env.GITHUB_OUTPUT||"")return(0,qr.issueFileCommand)("OUTPUT",(0,qr.prepareKeyValueMessage)(t,e));process.stdout.write(Y4.EOL),(0,Na.issueCommand)("set-output",{name:t},(0,In.toCommandValue)(e))}o(WT,"setOutput");W.setOutput=WT;function XT(t){(0,Na.issue)("echo",t?"on":"off")}o(XT,"setCommandEcho");W.setCommandEcho=XT;function KT(t){process.exitCode=Lm.Failure,Q4(t)}o(KT,"setFailed");W.setFailed=KT;function YT(){return process.env.RUNNER_DEBUG==="1"}o(YT,"isDebug");W.isDebug=YT;function QT(t){(0,Na.issueCommand)("debug",{},t)}o(QT,"debug");W.debug=QT;function Q4(t,e={}){(0,Na.issueCommand)("error",(0,In.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(Q4,"error");W.error=Q4;function JT(t,e={}){(0,Na.issueCommand)("warning",(0,In.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(JT,"warning");W.warning=JT;function ZT(t,e={}){(0,Na.issueCommand)("notice",(0,In.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(ZT,"notice");W.notice=ZT;function eO(t){process.stdout.write(t+Y4.EOL)}o(eO,"info");W.info=eO;function J4(t){(0,Na.issue)("group",t)}o(J4,"startGroup");W.startGroup=J4;function Z4(){(0,Na.issue)("endgroup")}o(Z4,"endGroup");W.endGroup=Z4;function tO(t,e){return K4(this,void 0,void 0,function*(){J4(t);let a;try{a=yield e()}finally{Z4()}return a})}o(tO,"group");W.group=tO;function aO(t,e){if(process.env.GITHUB_STATE||"")return(0,qr.issueFileCommand)("STATE",(0,qr.prepareKeyValueMessage)(t,e));(0,Na.issueCommand)("save-state",{name:t},(0,In.toCommandValue)(e))}o(aO,"saveState");W.saveState=aO;function iO(t){return process.env[`STATE_${t}`]||""}o(iO,"getState");W.getState=iO;function rO(t){return K4(this,void 0,void 0,function*(){return yield UT.OidcClient.getIDToken(t)})}o(rO,"getIDToken");W.getIDToken=rO;var nO=Pm();Object.defineProperty(W,"summary",{enumerable:!0,get:function(){return nO.summary}});var sO=Pm();Object.defineProperty(W,"markdownSummary",{enumerable:!0,get:function(){return sO.markdownSummary}});var jm=R4();Object.defineProperty(W,"toPosixPath",{enumerable:!0,get:function(){return jm.toPosixPath}});Object.defineProperty(W,"toWin32Path",{enumerable:!0,get:function(){return jm.toWin32Path}});Object.defineProperty(W,"toPlatformPath",{enumerable:!0,get:function(){return jm.toPlatformPath}});W.platform=qm(X4())});var e3=N(ni=>{"use strict";var oO=ni&&ni.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),pO=ni&&ni.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lO=ni&&ni.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&oO(e,t,a);return pO(e,t),e};Object.defineProperty(ni,"__esModule",{value:!0});ni.getOptions=void 0;var km=lO(nt());function dO(t){let e={followSymbolicLinks:!0,implicitDescendants:!0,omitBrokenSymbolicLinks:!0};return t&&(typeof t.followSymbolicLinks=="boolean"&&(e.followSymbolicLinks=t.followSymbolicLinks,km.debug(`followSymbolicLinks '${e.followSymbolicLinks}'`)),typeof t.implicitDescendants=="boolean"&&(e.implicitDescendants=t.implicitDescendants,km.debug(`implicitDescendants '${e.implicitDescendants}'`)),typeof t.omitBrokenSymbolicLinks=="boolean"&&(e.omitBrokenSymbolicLinks=t.omitBrokenSymbolicLinks,km.debug(`omitBrokenSymbolicLinks '${e.omitBrokenSymbolicLinks}'`))),e}o(dO,"getOptions");ni.getOptions=dO});var xl=N($e=>{"use strict";var cO=$e&&$e.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),uO=$e&&$e.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),mO=$e&&$e.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&cO(e,t,a);return uO(e,t),e},fO=$e&&$e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($e,"__esModule",{value:!0});$e.safeTrimTrailingSeparator=$e.normalizeSeparators=$e.hasRoot=$e.hasAbsoluteRoot=$e.ensureAbsoluteRoot=$e.dirname=void 0;var bl=mO(require("path")),zr=fO(require("assert")),Ji=process.platform==="win32";function hO(t){if(t=Hm(t),Ji&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(t))return t;let e=bl.dirname(t);return Ji&&/^\\\\[^\\]+\\[^\\]+\\$/.test(e)&&(e=Hm(e)),e}o(hO,"dirname");$e.dirname=hO;function gO(t,e){if(zr.default(t,"ensureAbsoluteRoot parameter 'root' must not be empty"),zr.default(e,"ensureAbsoluteRoot parameter 'itemPath' must not be empty"),Um(e))return e;if(Ji){if(e.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let a=process.cwd();rLine truncated
|
||||
Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}o(GT,"getBooleanInput");W.getBooleanInput=GT;function WT(t,e){if(process.env.GITHUB_OUTPUT||"")return(0,zr.issueFileCommand)("OUTPUT",(0,zr.prepareKeyValueMessage)(t,e));process.stdout.write(Y4.EOL),(0,Na.issueCommand)("set-output",{name:t},(0,Dn.toCommandValue)(e))}o(WT,"setOutput");W.setOutput=WT;function XT(t){(0,Na.issue)("echo",t?"on":"off")}o(XT,"setCommandEcho");W.setCommandEcho=XT;function KT(t){process.exitCode=Lm.Failure,Q4(t)}o(KT,"setFailed");W.setFailed=KT;function YT(){return process.env.RUNNER_DEBUG==="1"}o(YT,"isDebug");W.isDebug=YT;function QT(t){(0,Na.issueCommand)("debug",{},t)}o(QT,"debug");W.debug=QT;function Q4(t,e={}){(0,Na.issueCommand)("error",(0,Dn.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(Q4,"error");W.error=Q4;function JT(t,e={}){(0,Na.issueCommand)("warning",(0,Dn.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(JT,"warning");W.warning=JT;function ZT(t,e={}){(0,Na.issueCommand)("notice",(0,Dn.toCommandProperties)(e),t instanceof Error?t.toString():t)}o(ZT,"notice");W.notice=ZT;function eO(t){process.stdout.write(t+Y4.EOL)}o(eO,"info");W.info=eO;function J4(t){(0,Na.issue)("group",t)}o(J4,"startGroup");W.startGroup=J4;function Z4(){(0,Na.issue)("endgroup")}o(Z4,"endGroup");W.endGroup=Z4;function tO(t,e){return K4(this,void 0,void 0,function*(){J4(t);let a;try{a=yield e()}finally{Z4()}return a})}o(tO,"group");W.group=tO;function aO(t,e){if(process.env.GITHUB_STATE||"")return(0,zr.issueFileCommand)("STATE",(0,zr.prepareKeyValueMessage)(t,e));(0,Na.issueCommand)("save-state",{name:t},(0,Dn.toCommandValue)(e))}o(aO,"saveState");W.saveState=aO;function iO(t){return process.env[`STATE_${t}`]||""}o(iO,"getState");W.getState=iO;function rO(t){return K4(this,void 0,void 0,function*(){return yield UT.OidcClient.getIDToken(t)})}o(rO,"getIDToken");W.getIDToken=rO;var nO=Pm();Object.defineProperty(W,"summary",{enumerable:!0,get:function(){return nO.summary}});var sO=Pm();Object.defineProperty(W,"markdownSummary",{enumerable:!0,get:function(){return sO.markdownSummary}});var jm=R4();Object.defineProperty(W,"toPosixPath",{enumerable:!0,get:function(){return jm.toPosixPath}});Object.defineProperty(W,"toWin32Path",{enumerable:!0,get:function(){return jm.toWin32Path}});Object.defineProperty(W,"toPlatformPath",{enumerable:!0,get:function(){return jm.toPlatformPath}});W.platform=qm(X4())});var e3=N(ni=>{"use strict";var oO=ni&&ni.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),pO=ni&&ni.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),lO=ni&&ni.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&oO(e,t,a);return pO(e,t),e};Object.defineProperty(ni,"__esModule",{value:!0});ni.getOptions=void 0;var km=lO(nt());function dO(t){let e={followSymbolicLinks:!0,implicitDescendants:!0,omitBrokenSymbolicLinks:!0};return t&&(typeof t.followSymbolicLinks=="boolean"&&(e.followSymbolicLinks=t.followSymbolicLinks,km.debug(`followSymbolicLinks '${e.followSymbolicLinks}'`)),typeof t.implicitDescendants=="boolean"&&(e.implicitDescendants=t.implicitDescendants,km.debug(`implicitDescendants '${e.implicitDescendants}'`)),typeof t.omitBrokenSymbolicLinks=="boolean"&&(e.omitBrokenSymbolicLinks=t.omitBrokenSymbolicLinks,km.debug(`omitBrokenSymbolicLinks '${e.omitBrokenSymbolicLinks}'`))),e}o(dO,"getOptions");ni.getOptions=dO});var xl=N($e=>{"use strict";var cO=$e&&$e.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),uO=$e&&$e.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),mO=$e&&$e.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&cO(e,t,a);return uO(e,t),e},fO=$e&&$e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($e,"__esModule",{value:!0});$e.safeTrimTrailingSeparator=$e.normalizeSeparators=$e.hasRoot=$e.hasAbsoluteRoot=$e.ensureAbsoluteRoot=$e.dirname=void 0;var bl=mO(require("path")),jr=fO(require("assert")),Ji=process.platform==="win32";function hO(t){if(t=Hm(t),Ji&&/^\\\\[^\\]+(\\[^\\]+)?$/.test(t))return t;let e=bl.dirname(t);return Ji&&/^\\\\[^\\]+\\[^\\]+\\$/.test(e)&&(e=Hm(e)),e}o(hO,"dirname");$e.dirname=hO;function gO(t,e){if(jr.default(t,"ensureAbsoluteRoot parameter 'root' must not be empty"),jr.default(e,"ensureAbsoluteRoot parameter 'itemPath' must not be empty"),Um(e))return e;if(Ji){if(e.match(/^[A-Z]:[^\\/]|^[A-Z]:$/i)){let a=process.cwd();rLine truncated
|
||||
%s`,g,g,I,i);var S=I.type==="*"?Gm:I.type==="?"?$m:"\\"+I.type;r=!0,i=i.slice(0,I.reStart)+S+"\\("+g}h(),n&&(i+="\\\\");var O=!1;switch(i.charAt(0)){case"[":case".":case"(":O=!0}for(var _=p.length-1;_>-1;_--){var D=p[_],T=i.slice(0,D.reStart),P=i.slice(D.reStart,D.reEnd-8),B=i.slice(D.reEnd-8,D.reEnd),k=i.slice(D.reEnd);B+=k;var pe=T.split("(").length-1,ve=k;for(b=0;b<pe;b++)ve=ve.replace(/\)[+*?]?/,"");k=ve;var Q="";k===""&&e!==Nl&&(Q="$");var it=T+P+k+Q+B;i=it}if(i!==""&&r&&(i="(?=.)"+i),O&&(i=m+i),e===Nl)return[i,r];if(!r)return $O(t);var he=a.nocase?"i":"";try{var Ua=new RegExp("^"+i+"$",he)}catch{return new RegExp("$.")}return Ua._glob=t,Ua._src=i,Ua}o(FO,"parse");da.makeRe=function(t,e){return new Bt(t,e||{}).makeRe()};Bt.prototype.makeRe=VO;function VO(){if(this.regexp||this.regexp===!1)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,a=e.noglobstar?Gm:e.dot?LO:qO,i=e.nocase?"i":"",r=t.map(function(n){return n.map(function(s){return s===Wm?a:typeof s=="string"?GO(s):s._src}).join("\\/")}).join("|");r="^(?:"+r+")$",this.negate&&(r="^(?!"+r+").*$");try{this.regexp=new RegExp(r,i)}catch{this.regexp=!1}return this.regexp}o(VO,"makeRe");da.match=function(t,e,a){a=a||{};var i=new Bt(e,a);return t=t.filter(function(r){return i.match(r)}),i.options.nonull&&!t.length&&t.push(e),t};Bt.prototype.match=o(function(e,a){if(typeof a>"u"&&(a=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&a)return!0;var i=this.options;xo.sep!=="/"&&(e=e.split(xo.sep).join("/")),e=e.split(w3),this.debug(this.pattern,"split",e);var r=this.set;this.debug(this.pattern,"set",r);var n,s;for(s=e.length-1;s>=0&&(n=e[s],!n);s--);for(s=0;s<r.length;s++){var p=r[s],l=e;i.matchBase&&p.length===1&&(l=[n]);var d=this.matchOne(l,p,a);if(d)return i.flipNegate?!0:!this.negate}return i.flipNegate?!1:this.negate},"match");Bt.prototype.matchOne=function(t,e,a){var i=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var r=0,n=0,s=t.length,p=e.length;r<s&&n<p;r++,n++){this.debug("matchOne loop");var l=e[n],d=t[r];if(this.debug(e,l,d),l===!1)return!1;if(l===Wm){this.debug("GLOBSTAR",[e,l,d]);var c=r,u=n+1;if(u===p){for(this.debug("** at the end");r<s;r++)if(t[r]==="."||t[r]===".."||!i.dot&&t[r].charAt(0)===".")return!1;return!0}for(;c<s;){var m=t[c];if(this.debug(`
|
||||
globstar while`,t,c,e,u,m),this.matchOne(t.slice(c),e.slice(u),a))return this.debug("globstar found match!",c,s,m),!0;if(m==="."||m===".."||!i.dot&&m.charAt(0)==="."){this.debug("dot detected!",t,c,e,u);break}this.debug("globstar swallow a segment, and continue"),c++}return!!(a&&(this.debug(`
|
||||
>>> no match, partial?`,t,c,e,u),c===s))}var f;if(typeof l=="string"?(f=d===l,this.debug("string match",l,d,f)):(f=d.match(l),this.debug("pattern match",l,d,f)),!f)return!1}if(r===s&&n===p)return!0;if(r===s)return a;if(n===p)return r===s-1&&t[r]==="";throw new Error("wtf?")};function $O(t){return t.replace(/\\(.)/g,"$1")}o($O,"globUnescape");function GO(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}o(GO,"regExpEscape")});var C3=N(_a=>{"use strict";var WO=_a&&_a.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),XO=_a&&_a.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),E3=_a&&_a.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&WO(e,t,a);return XO(e,t),e},KO=_a&&_a.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_a,"__esModule",{value:!0});_a.Path=void 0;var wo=E3(require("path")),er=E3(xl()),No=KO(require("assert")),YO=process.platform==="win32",Xm=class{static{o(this,"Path")}constructor(e){if(this.segments=[],typeof e=="string")if(No.default(e,"Parameter 'itemPath' must not be empty"),e=er.safeTrimTrailingSeparator(e),!er.hasRoot(e))this.segments=e.split(wo.sep);else{let a=e,i=er.dirname(a);for(;i!==a;){let r=wo.basename(a);this.segments.unshift(r),a=i,i=er.dirname(a)}this.segments.unshift(a)}else{No.default(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let a=0;a<e.length;a++){let i=e[a];No.default(i,"Parameter 'itemPath' must not contain any empty segments"),i=er.normalizeSeparators(e[a]),a===0&&er.hasRoot(i)?(i=er.safeTrimTrailingSeparator(i),No.default(i===er.dirname(i),"Parameter 'itemPath' root segment contains information for multiple segments"),this.segments.push(i)):(No.default(!i.includes(wo.sep),"Parameter 'itemPath' contains unexpected path separators"),this.segments.push(i))}}}toString(){let e=this.segments[0],a=e.endsWith(wo.sep)||YO&&/^[A-Z]:$/i.test(e);for(let i=1;i<this.segments.length;i++)a?a=!1:e+=wo.sep,e+=this.segments[i];return e}};_a.Path=Xm});var T3=N(Sa=>{"use strict";var QO=Sa&&Sa.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),JO=Sa&&Sa.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Qm=Sa&&Sa.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&QO(e,t,a);return JO(e,t),e},ZO=Sa&&Sa.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Sa,"__esModule",{value:!0});Sa.Pattern=void 0;var eR=Qm(require("os")),_o=Qm(require("path")),ta=Qm(xl()),jr=ZO(require("assert")),tR=S3(),Km=wl(),Sl=C3(),Ei=process.platform==="win32",Ym=class t{static{o(this,"Pattern")}constructor(e,a=!1,i,r){this.negate=!1;let n;if(typeof e=="string")n=e.trim();else{i=i||[],jr.default(i.length,"Parameter 'segments' must not empty");let d=t.getLiteral(i[0]);jr.default(d&&ta.hasAbsoluteRoot(d),"Parameter 'segments' first element must be a root path"),n=new Sl.Path(i).toString().trim(),e&&(n=`!${n}`)}for(;n.startsWith("!");)this.negate=!this.negate,n=n.substr(1).trim();n=t.fixupPattern(n,r),this.segments=new Sl.Path(n).segments,this.trailingSeparator=ta.normalizeSeparators(n).endsWith(_o.sep),n=ta.safeTrimTrailingSeparator(n);let s=!1,p=this.segments.map(d=>t.getLiteral(d)).filter(d=>!s&&!(s=d===""));this.searchPath=new Sl.Path(p).toString(),this.rootRegExp=new RegExp(t.regExpEscape(p[0]),Ei?"i":""),this.isImplicitPattern=a;let l={dot:!0,nobrace:!0,nocase:Ei,nocomment:!0,noext:!0,nonegate:!0};n=Ei?n.replace(/\\/g,"/"):n,this.minimatch=new tR.Minimatch(n,l)}match(e){return this.segments[this.segments.length-1]==="**"?(e=ta.normalizeSeparators(e),!e.endsWith(_o.sep)&&this.isImplicitPattern===!1&&(e=`${e}${_o.sep}`)):e=ta.safeTrimTrailingSeparator(e),this.minimatch.match(e)?this.trailingSeparator?Km.MatchKind.Directory:Km.MatchKind.All:Km.MatchKind.None}partialMatch(e){return e=ta.safeTrimTrailingSeparator(e),ta.dirname(e)===e?this.rootRegExp.test(e):this.minimatch.matchOne(e.split(Ei?/\\+/:/\/+/),this.minimatch.set[0],!0)}static globEscape(e){return(Ei?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,a){jr.default(e,"pattern cannot be empty");let i=new Sl.Path(e).segments.map(r=>t.getLiteral(r));if(jr.default(i.every((r,n)=>(r!=="."||n===0)&&r!==".."),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`),jr.default(!ta.hasRoot(e)||i[0],`Invalid pattern '${e}'. Root segment must not contain globs.`),e=ta.nor
Line truncated
|
||||
>>> no match, partial?`,t,c,e,u),c===s))}var f;if(typeof l=="string"?(f=d===l,this.debug("string match",l,d,f)):(f=d.match(l),this.debug("pattern match",l,d,f)),!f)return!1}if(r===s&&n===p)return!0;if(r===s)return a;if(n===p)return r===s-1&&t[r]==="";throw new Error("wtf?")};function $O(t){return t.replace(/\\(.)/g,"$1")}o($O,"globUnescape");function GO(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}o(GO,"regExpEscape")});var C3=N(_a=>{"use strict";var WO=_a&&_a.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),XO=_a&&_a.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),E3=_a&&_a.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&WO(e,t,a);return XO(e,t),e},KO=_a&&_a.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(_a,"__esModule",{value:!0});_a.Path=void 0;var wo=E3(require("path")),er=E3(xl()),No=KO(require("assert")),YO=process.platform==="win32",Xm=class{static{o(this,"Path")}constructor(e){if(this.segments=[],typeof e=="string")if(No.default(e,"Parameter 'itemPath' must not be empty"),e=er.safeTrimTrailingSeparator(e),!er.hasRoot(e))this.segments=e.split(wo.sep);else{let a=e,i=er.dirname(a);for(;i!==a;){let r=wo.basename(a);this.segments.unshift(r),a=i,i=er.dirname(a)}this.segments.unshift(a)}else{No.default(e.length>0,"Parameter 'itemPath' must not be an empty array");for(let a=0;a<e.length;a++){let i=e[a];No.default(i,"Parameter 'itemPath' must not contain any empty segments"),i=er.normalizeSeparators(e[a]),a===0&&er.hasRoot(i)?(i=er.safeTrimTrailingSeparator(i),No.default(i===er.dirname(i),"Parameter 'itemPath' root segment contains information for multiple segments"),this.segments.push(i)):(No.default(!i.includes(wo.sep),"Parameter 'itemPath' contains unexpected path separators"),this.segments.push(i))}}}toString(){let e=this.segments[0],a=e.endsWith(wo.sep)||YO&&/^[A-Z]:$/i.test(e);for(let i=1;i<this.segments.length;i++)a?a=!1:e+=wo.sep,e+=this.segments[i];return e}};_a.Path=Xm});var T3=N(Sa=>{"use strict";var QO=Sa&&Sa.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),JO=Sa&&Sa.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Qm=Sa&&Sa.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&QO(e,t,a);return JO(e,t),e},ZO=Sa&&Sa.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Sa,"__esModule",{value:!0});Sa.Pattern=void 0;var eR=Qm(require("os")),_o=Qm(require("path")),ta=Qm(xl()),kr=ZO(require("assert")),tR=S3(),Km=wl(),Sl=C3(),Ei=process.platform==="win32",Ym=class t{static{o(this,"Pattern")}constructor(e,a=!1,i,r){this.negate=!1;let n;if(typeof e=="string")n=e.trim();else{i=i||[],kr.default(i.length,"Parameter 'segments' must not empty");let d=t.getLiteral(i[0]);kr.default(d&&ta.hasAbsoluteRoot(d),"Parameter 'segments' first element must be a root path"),n=new Sl.Path(i).toString().trim(),e&&(n=`!${n}`)}for(;n.startsWith("!");)this.negate=!this.negate,n=n.substr(1).trim();n=t.fixupPattern(n,r),this.segments=new Sl.Path(n).segments,this.trailingSeparator=ta.normalizeSeparators(n).endsWith(_o.sep),n=ta.safeTrimTrailingSeparator(n);let s=!1,p=this.segments.map(d=>t.getLiteral(d)).filter(d=>!s&&!(s=d===""));this.searchPath=new Sl.Path(p).toString(),this.rootRegExp=new RegExp(t.regExpEscape(p[0]),Ei?"i":""),this.isImplicitPattern=a;let l={dot:!0,nobrace:!0,nocase:Ei,nocomment:!0,noext:!0,nonegate:!0};n=Ei?n.replace(/\\/g,"/"):n,this.minimatch=new tR.Minimatch(n,l)}match(e){return this.segments[this.segments.length-1]==="**"?(e=ta.normalizeSeparators(e),!e.endsWith(_o.sep)&&this.isImplicitPattern===!1&&(e=`${e}${_o.sep}`)):e=ta.safeTrimTrailingSeparator(e),this.minimatch.match(e)?this.trailingSeparator?Km.MatchKind.Directory:Km.MatchKind.All:Km.MatchKind.None}partialMatch(e){return e=ta.safeTrimTrailingSeparator(e),ta.dirname(e)===e?this.rootRegExp.test(e):this.minimatch.matchOne(e.split(Ei?/\\+/:/\/+/),this.minimatch.set[0],!0)}static globEscape(e){return(Ei?e:e.replace(/\\/g,"\\\\")).replace(/(\[)(?=[^/]+\])/g,"[[]").replace(/\?/g,"[?]").replace(/\*/g,"[*]")}static fixupPattern(e,a){kr.default(e,"pattern cannot be empty");let i=new Sl.Path(e).segments.map(r=>t.getLiteral(r));if(kr.default(i.every((r,n)=>(r!=="."||n===0)&&r!==".."),`Invalid pattern '${e}'. Relative pathing '.' and '..' is not allowed.`),kr.default(!ta.hasRoot(e)||i[0],`Invalid pattern '${e}'. Root segment must not contain globs.`),e=ta.nor
Line truncated
|
||||
`),e=e.replace(/\r/g,`
|
||||
`));let r=e.split(`
|
||||
`).map(n=>n.trim());for(let n of r)!n||n.startsWith("#")||i.patterns.push(new I3.Pattern(n));return i.searchPaths.push(...Cl.getSearchPaths(i.patterns)),i})}static stat(e,a,i){return Zm(this,void 0,void 0,function*(){let r;if(a.followSymbolicLinks)try{r=yield So.promises.stat(e.path)}catch(n){if(n.code==="ENOENT"){if(a.omitBrokenSymbolicLinks){e1.debug(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw n}else r=yield So.promises.lstat(e.path);if(r.isDirectory()&&a.followSymbolicLinks){let n=yield So.promises.realpath(e.path);for(;i.length>=e.level;)i.pop();if(i.some(s=>s===n)){e1.debug(`Symlink cycle detected for path '${e.path}' and realpath '${n}'`);return}i.push(n)}return r})}};bt.DefaultGlobber=t1});var B3=N(An=>{"use strict";var pR=An&&An.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(An,"__esModule",{value:!0});An.create=void 0;var lR=A3();function dR(t,e){return pR(this,void 0,void 0,function*(){return yield lR.DefaultGlobber.create(t,e)})}o(dR,"create");An.create=dR});var Il=N((ie,j3)=>{ie=j3.exports=se;var Ee;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?Ee=o(function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)},"debug"):Ee=o(function(){},"debug");ie.SEMVER_SPEC_VERSION="2.0.0";var Co=256,Tl=Number.MAX_SAFE_INTEGER||9007199254740991,a1=16,cR=Co-6,Bn=ie.re=[],Se=ie.safeRe=[],M=ie.src=[],A=ie.tokens={},q3=0;function le(t){A[t]=q3++}o(le,"tok");var r1="[a-zA-Z0-9-]",i1=[["\\s",1],["\\d",Co],[r1,cR]];function Oo(t){for(var e=0;e<i1.length;e++){var a=i1[e][0],i=i1[e][1];t=t.split(a+"*").join(a+"{0,"+i+"}").split(a+"+").join(a+"{1,"+i+"}")}return t}o(Oo,"makeSafeRe");le("NUMERICIDENTIFIER");M[A.NUMERICIDENTIFIER]="0|[1-9]\\d*";le("NUMERICIDENTIFIERLOOSE");M[A.NUMERICIDENTIFIERLOOSE]="\\d+";le("NONNUMERICIDENTIFIER");M[A.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+r1+"*";le("MAINVERSION");M[A.MAINVERSION]="("+M[A.NUMERICIDENTIFIER]+")\\.("+M[A.NUMERICIDENTIFIER]+")\\.("+M[A.NUMERICIDENTIFIER]+")";le("MAINVERSIONLOOSE");M[A.MAINVERSIONLOOSE]="("+M[A.NUMERICIDENTIFIERLOOSE]+")\\.("+M[A.NUMERICIDENTIFIERLOOSE]+")\\.("+M[A.NUMERICIDENTIFIERLOOSE]+")";le("PRERELEASEIDENTIFIER");M[A.PRERELEASEIDENTIFIER]="(?:"+M[A.NUMERICIDENTIFIER]+"|"+M[A.NONNUMERICIDENTIFIER]+")";le("PRERELEASEIDENTIFIERLOOSE");M[A.PRERELEASEIDENTIFIERLOOSE]="(?:"+M[A.NUMERICIDENTIFIERLOOSE]+"|"+M[A.NONNUMERICIDENTIFIER]+")";le("PRERELEASE");M[A.PRERELEASE]="(?:-("+M[A.PRERELEASEIDENTIFIER]+"(?:\\."+M[A.PRERELEASEIDENTIFIER]+")*))";le("PRERELEASELOOSE");M[A.PRERELEASELOOSE]="(?:-?("+M[A.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+M[A.PRERELEASEIDENTIFIERLOOSE]+")*))";le("BUILDIDENTIFIER");M[A.BUILDIDENTIFIER]=r1+"+";le("BUILD");M[A.BUILD]="(?:\\+("+M[A.BUILDIDENTIFIER]+"(?:\\."+M[A.BUILDIDENTIFIER]+")*))";le("FULL");le("FULLPLAIN");M[A.FULLPLAIN]="v?"+M[A.MAINVERSION]+M[A.PRERELEASE]+"?"+M[A.BUILD]+"?";M[A.FULL]="^"+M[A.FULLPLAIN]+"$";le("LOOSEPLAIN");M[A.LOOSEPLAIN]="[v=\\s]*"+M[A.MAINVERSIONLOOSE]+M[A.PRERELEASELOOSE]+"?"+M[A.BUILD]+"?";le("LOOSE");M[A.LOOSE]="^"+M[A.LOOSEPLAIN]+"$";le("GTLT");M[A.GTLT]="((?:<|>)?=?)";le("XRANGEIDENTIFIERLOOSE");M[A.XRANGEIDENTIFIERLOOSE]=M[A.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";le("XRANGEIDENTIFIER");M[A.XRANGEIDENTIFIER]=M[A.NUMERICIDENTIFIER]+"|x|X|\\*";le("XRANGEPLAIN");M[A.XRANGEPLAIN]="[v=\\s]*("+M[A.XRANGEIDENTIFIER]+")(?:\\.("+M[A.XRANGEIDENTIFIER]+")(?:\\.("+M[A.XRANGEIDENTIFIER]+")(?:"+M[A.PRERELEASE]+")?"+M[A.BUILD]+"?)?)?";le("XRANGEPLAINLOOSE");M[A.XRANGEPLAINLOOSE]="[v=\\s]*("+M[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+M[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+M[A.XRANGEIDENTIFIERLOOSE]+")(?:"+M[A.PRERELEASELOOSE]+")?"+M[A.BUILD]+"?)?)?";le("XRANGE");M[A.XRANGE]="^"+M[A.GTLT]+"\\s*"+M[A.XRANGEPLAIN]+"$";le("XRANGELOOSE");M[A.XRANGELOOSE]="^"+M[A.GTLT]+"\\s*"+M[A.XRANGEPLAINLOOSE]+"$";le("COERCE");M[A.COERCE]="(^|[^\\d])(\\d{1,"+a1+"})(?:\\.(\\d{1,"+a1+"}))?(?:\\.(\\d{1,"+a1+"}))?(?:$|[^\\d])";le("COERCERTL");Bn[A.COERCERTL]=new RegExp(M[A.COERCE],"g");Se[A.COERCERTL]=new RegExp(Oo(M[A.COERCE]),"g");le("LONETILDE");M[A.LONETILDE]="(?:~>?)";le("TILDETRIM");M[A.TILDETRIM]="(\\s*)"+M[A.LONETILDE]+"\\s+";Bn[A.TILDETRIM]=new RegExp(M[A.TILDETRIM],"g");Se[A.TILDETRIM]=new RegExp(Oo(M[A.TILDETRIM]),"g");var uR="$1~";le("TILDE");M[A.TILDE]="^"+M[A.LONETILDE]+M[A.XRANGEPLAIN]+"$";le("TILDELOOSE");M[A.TILDELOOSE]="^"+M[A.LONETILDE]+M[A.XRANGEPLAINLOOSE]+"$";le("LONECARET");M[A.LONECARET]="(?:\\^)";le("CARETTRIM");M[A.CARETTRIM]="(\\s*)"+M[A.LONECARET]+"\\s+";Bn[A.CARETTRIM]=new
Line truncated
|
||||
`),{implicitDescendants:!1});try{for(var d=!0,c=YR(l.globGenerator()),u;u=yield c.next(),e=u.done,!e;d=!0){r=u.value,d=!1;let m=r,f=Dl.relative(p,m).replace(new RegExp(`\\${Dl.sep}`,"g"),"/");Ro.debug(`Matched: ${f}`),f===""?s.push("."):s.push(`${f}`)}}catch(m){a={error:m}}finally{try{!d&&!e&&(i=c.return)&&(yield i.call(c))}finally{if(a)throw a.error}}return s})}o(rP,"resolvePaths");xe.resolvePaths=rP;function nP(t){return qn(this,void 0,void 0,function*(){return eP.promisify(l1.unlink)(t)})}o(nP,"unlinkFile");xe.unlinkFile=nP;function $3(t,e=[]){return qn(this,void 0,void 0,function*(){let a="";e.push("--version"),Ro.debug(`Checking ${t} ${e.join(" ")}`);try{yield QR.exec(`${t}`,e,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:i=>a+=i.toString(),stderr:i=>a+=i.toString()}})}catch(i){Ro.debug(i.message)}return a=a.trim(),Ro.debug(a),a})}o($3,"getVersion");function sP(){return qn(this,void 0,void 0,function*(){let t=yield $3("zstd",["--quiet"]),e=ZR.clean(t);return Ro.debug(`zstd version: ${e}`),t===""?Hr.CompressionMethod.Gzip:Hr.CompressionMethod.ZstdWithoutLong})}o(sP,"getCompressionMethod");xe.getCompressionMethod=sP;function oP(t){return t===Hr.CompressionMethod.Gzip?Hr.CacheFilename.Gzip:Hr.CacheFilename.Zstd}o(oP,"getCacheFileName");xe.getCacheFileName=oP;function pP(){return qn(this,void 0,void 0,function*(){return l1.existsSync(Hr.GnuTarPathOnWindows)?Hr.GnuTarPathOnWindows:(yield $3("tar")).toLowerCase().includes("gnu tar")?F3.which("tar"):""})}o(pP,"getGnuTarPathOnWindows");xe.getGnuTarPathOnWindows=pP;function lP(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}o(lP,"assertDefined");xe.assertDefined=lP;function dP(t,e,a=!1){let i=t.slice();return e&&i.push(e),process.platform==="win32"&&!a&&i.push("windows-only"),i.push(tP),V3.createHash("sha256").update(i.join("|")).digest("hex")}o(dP,"getCacheVersion");xe.getCacheVersion=dP;function cP(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}o(cP,"getRuntimeToken");xe.getRuntimeToken=cP});function Po(){return Al>Bl.length-16&&(G3.default.randomFillSync(Bl),Al=0),Bl.slice(Al,Al+=16)}var G3,Bl,Al,d1=jt(()=>{G3=ba(require("crypto")),Bl=new Uint8Array(256),Al=Bl.length;o(Po,"rng")});var W3,X3=jt(()=>{W3=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function uP(t){return typeof t=="string"&&W3.test(t)}var ar,Io=jt(()=>{X3();o(uP,"validate");ar=uP});function mP(t,e=0){let a=(Mt[t[e+0]]+Mt[t[e+1]]+Mt[t[e+2]]+Mt[t[e+3]]+"-"+Mt[t[e+4]]+Mt[t[e+5]]+"-"+Mt[t[e+6]]+Mt[t[e+7]]+"-"+Mt[t[e+8]]+Mt[t[e+9]]+"-"+Mt[t[e+10]]+Mt[t[e+11]]+Mt[t[e+12]]+Mt[t[e+13]]+Mt[t[e+14]]+Mt[t[e+15]]).toLowerCase();if(!ar(a))throw TypeError("Stringified UUID is invalid");return a}var Mt,ir,Do=jt(()=>{Io();Mt=[];for(let t=0;t<256;++t)Mt.push((t+256).toString(16).substr(1));o(mP,"stringify");ir=mP});function fP(t,e,a){let i=e&&a||0,r=e||new Array(16);t=t||{};let n=t.node||K3,s=t.clockseq!==void 0?t.clockseq:c1;if(n==null||s==null){let m=t.random||(t.rng||Po)();n==null&&(n=K3=[m[0]|1,m[1],m[2],m[3],m[4],m[5]]),s==null&&(s=c1=(m[6]<<8|m[7])&16383)}let p=t.msecs!==void 0?t.msecs:Date.now(),l=t.nsecs!==void 0?t.nsecs:m1+1,d=p-u1+(l-m1)/1e4;if(d<0&&t.clockseq===void 0&&(s=s+1&16383),(d<0||p>u1)&&t.nsecs===void 0&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u1=p,m1=l,c1=s,p+=122192928e5;let c=((p&268435455)*1e4+l)%4294967296;r[i++]=c>>>24&255,r[i++]=c>>>16&255,r[i++]=c>>>8&255,r[i++]=c&255;let u=p/4294967296*1e4&268435455;r[i++]=u>>>8&255,r[i++]=u&255,r[i++]=u>>>24&15|16,r[i++]=u>>>16&255,r[i++]=s>>>8|128,r[i++]=s&255;for(let m=0;m<6;++m)r[i+m]=n[m];return e||ir(r)}var K3,c1,u1,m1,Y3,Q3=jt(()=>{d1();Do();u1=0,m1=0;o(fP,"v1");Y3=fP});function hP(t){if(!ar(t))throw TypeError("Invalid UUID");let e,a=new Uint8Array(16);return a[0]=(e=parseInt(t.slice(0,8),16))>>>24,a[1]=e>>>16&255,a[2]=e>>>8&255,a[3]=e&255,a[4]=(e=parseInt(t.slice(9,13),16))>>>8,a[5]=e&255,a[6]=(e=parseInt(t.slice(14,18),16))>>>8,a[7]=e&255,a[8]=(e=parseInt(t.slice(19,23),16))>>>8,a[9]=e&255,a[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,a[11]=e/4294967296&255,a[12]=e>>>24&255,a[13]=e>>>16&255,a[14]=e>>>8&255,a[15]=e&255,a}var Ml,f1=jt(()=>{Io();o(hP,"parse");Ml=hP});function gP(t){t=unescape(encodeURIComponent(t));let e=[];for(let a=0;a<t.length;++a)e.push(t.charCodeAt(a));return e}function Ao(t,e,a){function i(r,n,s,p){if(typeof r=="string"&&(r=gP(r)),typeof n=="string"&&(n=Ml(n)),n.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+r.length);if(l.set(n),l.set(r,n.length),l=a(l),l[6]=l[6]&15|e,l[8]=l[8]&63|128,s){p=p||0;for(let d=0;d<16;++d)s[p+d]=l[d];return s}return ir(l)}o(i,"generateUUID");try{i.name=t}catch{}return i.DNS=yP,i.URL=vP,i}var yP,vP,h1=jt(()=>{Do();f1();o(gP,"stringToBytes");yP="6ba7b810-9dad-11d1-80b4-00c04fd430c8",vP
Line truncated
|
||||
`).map(n=>n.trim());for(let n of r)!n||n.startsWith("#")||i.patterns.push(new I3.Pattern(n));return i.searchPaths.push(...Cl.getSearchPaths(i.patterns)),i})}static stat(e,a,i){return Zm(this,void 0,void 0,function*(){let r;if(a.followSymbolicLinks)try{r=yield So.promises.stat(e.path)}catch(n){if(n.code==="ENOENT"){if(a.omitBrokenSymbolicLinks){e1.debug(`Broken symlink '${e.path}'`);return}throw new Error(`No information found for the path '${e.path}'. This may indicate a broken symbolic link.`)}throw n}else r=yield So.promises.lstat(e.path);if(r.isDirectory()&&a.followSymbolicLinks){let n=yield So.promises.realpath(e.path);for(;i.length>=e.level;)i.pop();if(i.some(s=>s===n)){e1.debug(`Symlink cycle detected for path '${e.path}' and realpath '${n}'`);return}i.push(n)}return r})}};bt.DefaultGlobber=t1});var B3=N(Bn=>{"use strict";var pR=Bn&&Bn.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(Bn,"__esModule",{value:!0});Bn.create=void 0;var lR=A3();function dR(t,e){return pR(this,void 0,void 0,function*(){return yield lR.DefaultGlobber.create(t,e)})}o(dR,"create");Bn.create=dR});var Il=N((ie,j3)=>{ie=j3.exports=se;var Ee;typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?Ee=o(function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("SEMVER"),console.log.apply(console,t)},"debug"):Ee=o(function(){},"debug");ie.SEMVER_SPEC_VERSION="2.0.0";var Co=256,Tl=Number.MAX_SAFE_INTEGER||9007199254740991,a1=16,cR=Co-6,Mn=ie.re=[],Se=ie.safeRe=[],M=ie.src=[],A=ie.tokens={},q3=0;function le(t){A[t]=q3++}o(le,"tok");var r1="[a-zA-Z0-9-]",i1=[["\\s",1],["\\d",Co],[r1,cR]];function Oo(t){for(var e=0;e<i1.length;e++){var a=i1[e][0],i=i1[e][1];t=t.split(a+"*").join(a+"{0,"+i+"}").split(a+"+").join(a+"{1,"+i+"}")}return t}o(Oo,"makeSafeRe");le("NUMERICIDENTIFIER");M[A.NUMERICIDENTIFIER]="0|[1-9]\\d*";le("NUMERICIDENTIFIERLOOSE");M[A.NUMERICIDENTIFIERLOOSE]="\\d+";le("NONNUMERICIDENTIFIER");M[A.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-]"+r1+"*";le("MAINVERSION");M[A.MAINVERSION]="("+M[A.NUMERICIDENTIFIER]+")\\.("+M[A.NUMERICIDENTIFIER]+")\\.("+M[A.NUMERICIDENTIFIER]+")";le("MAINVERSIONLOOSE");M[A.MAINVERSIONLOOSE]="("+M[A.NUMERICIDENTIFIERLOOSE]+")\\.("+M[A.NUMERICIDENTIFIERLOOSE]+")\\.("+M[A.NUMERICIDENTIFIERLOOSE]+")";le("PRERELEASEIDENTIFIER");M[A.PRERELEASEIDENTIFIER]="(?:"+M[A.NUMERICIDENTIFIER]+"|"+M[A.NONNUMERICIDENTIFIER]+")";le("PRERELEASEIDENTIFIERLOOSE");M[A.PRERELEASEIDENTIFIERLOOSE]="(?:"+M[A.NUMERICIDENTIFIERLOOSE]+"|"+M[A.NONNUMERICIDENTIFIER]+")";le("PRERELEASE");M[A.PRERELEASE]="(?:-("+M[A.PRERELEASEIDENTIFIER]+"(?:\\."+M[A.PRERELEASEIDENTIFIER]+")*))";le("PRERELEASELOOSE");M[A.PRERELEASELOOSE]="(?:-?("+M[A.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+M[A.PRERELEASEIDENTIFIERLOOSE]+")*))";le("BUILDIDENTIFIER");M[A.BUILDIDENTIFIER]=r1+"+";le("BUILD");M[A.BUILD]="(?:\\+("+M[A.BUILDIDENTIFIER]+"(?:\\."+M[A.BUILDIDENTIFIER]+")*))";le("FULL");le("FULLPLAIN");M[A.FULLPLAIN]="v?"+M[A.MAINVERSION]+M[A.PRERELEASE]+"?"+M[A.BUILD]+"?";M[A.FULL]="^"+M[A.FULLPLAIN]+"$";le("LOOSEPLAIN");M[A.LOOSEPLAIN]="[v=\\s]*"+M[A.MAINVERSIONLOOSE]+M[A.PRERELEASELOOSE]+"?"+M[A.BUILD]+"?";le("LOOSE");M[A.LOOSE]="^"+M[A.LOOSEPLAIN]+"$";le("GTLT");M[A.GTLT]="((?:<|>)?=?)";le("XRANGEIDENTIFIERLOOSE");M[A.XRANGEIDENTIFIERLOOSE]=M[A.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*";le("XRANGEIDENTIFIER");M[A.XRANGEIDENTIFIER]=M[A.NUMERICIDENTIFIER]+"|x|X|\\*";le("XRANGEPLAIN");M[A.XRANGEPLAIN]="[v=\\s]*("+M[A.XRANGEIDENTIFIER]+")(?:\\.("+M[A.XRANGEIDENTIFIER]+")(?:\\.("+M[A.XRANGEIDENTIFIER]+")(?:"+M[A.PRERELEASE]+")?"+M[A.BUILD]+"?)?)?";le("XRANGEPLAINLOOSE");M[A.XRANGEPLAINLOOSE]="[v=\\s]*("+M[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+M[A.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+M[A.XRANGEIDENTIFIERLOOSE]+")(?:"+M[A.PRERELEASELOOSE]+")?"+M[A.BUILD]+"?)?)?";le("XRANGE");M[A.XRANGE]="^"+M[A.GTLT]+"\\s*"+M[A.XRANGEPLAIN]+"$";le("XRANGELOOSE");M[A.XRANGELOOSE]="^"+M[A.GTLT]+"\\s*"+M[A.XRANGEPLAINLOOSE]+"$";le("COERCE");M[A.COERCE]="(^|[^\\d])(\\d{1,"+a1+"})(?:\\.(\\d{1,"+a1+"}))?(?:\\.(\\d{1,"+a1+"}))?(?:$|[^\\d])";le("COERCERTL");Mn[A.COERCERTL]=new RegExp(M[A.COERCE],"g");Se[A.COERCERTL]=new RegExp(Oo(M[A.COERCE]),"g");le("LONETILDE");M[A.LONETILDE]="(?:~>?)";le("TILDETRIM");M[A.TILDETRIM]="(\\s*)"+M[A.LONETILDE]+"\\s+";Mn[A.TILDETRIM]=new RegExp(M[A.TILDETRIM],"g");Se[A.TILDETRIM]=new RegExp(Oo(M[A.TILDETRIM]),"g");var uR="$1~";le("TILDE");M[A.TILDE]="^"+M[A.LONETILDE]+M[A.XRANGEPLAIN]+"$";le("TILDELOOSE");M[A.TILDELOOSE]="^"+M[A.LONETILDE]+M[A.XRANGEPLAINLOOSE]+"$";le("LONECARET");M[A.LONECARET]="(?:\\^)";le("CARETTRIM");M[A.CARETTRIM]="(\\s*)"+M[A.LONECARET]+"\\s+";Mn[A.CARETTRIM]=new
Line truncated
|
||||
`),{implicitDescendants:!1});try{for(var d=!0,c=YR(l.globGenerator()),u;u=yield c.next(),e=u.done,!e;d=!0){r=u.value,d=!1;let m=r,f=Dl.relative(p,m).replace(new RegExp(`\\${Dl.sep}`,"g"),"/");Ro.debug(`Matched: ${f}`),f===""?s.push("."):s.push(`${f}`)}}catch(m){a={error:m}}finally{try{!d&&!e&&(i=c.return)&&(yield i.call(c))}finally{if(a)throw a.error}}return s})}o(rP,"resolvePaths");xe.resolvePaths=rP;function nP(t){return zn(this,void 0,void 0,function*(){return eP.promisify(l1.unlink)(t)})}o(nP,"unlinkFile");xe.unlinkFile=nP;function $3(t,e=[]){return zn(this,void 0,void 0,function*(){let a="";e.push("--version"),Ro.debug(`Checking ${t} ${e.join(" ")}`);try{yield QR.exec(`${t}`,e,{ignoreReturnCode:!0,silent:!0,listeners:{stdout:i=>a+=i.toString(),stderr:i=>a+=i.toString()}})}catch(i){Ro.debug(i.message)}return a=a.trim(),Ro.debug(a),a})}o($3,"getVersion");function sP(){return zn(this,void 0,void 0,function*(){let t=yield $3("zstd",["--quiet"]),e=ZR.clean(t);return Ro.debug(`zstd version: ${e}`),t===""?Fr.CompressionMethod.Gzip:Fr.CompressionMethod.ZstdWithoutLong})}o(sP,"getCompressionMethod");xe.getCompressionMethod=sP;function oP(t){return t===Fr.CompressionMethod.Gzip?Fr.CacheFilename.Gzip:Fr.CacheFilename.Zstd}o(oP,"getCacheFileName");xe.getCacheFileName=oP;function pP(){return zn(this,void 0,void 0,function*(){return l1.existsSync(Fr.GnuTarPathOnWindows)?Fr.GnuTarPathOnWindows:(yield $3("tar")).toLowerCase().includes("gnu tar")?F3.which("tar"):""})}o(pP,"getGnuTarPathOnWindows");xe.getGnuTarPathOnWindows=pP;function lP(t,e){if(e===void 0)throw Error(`Expected ${t} but value was undefiend`);return e}o(lP,"assertDefined");xe.assertDefined=lP;function dP(t,e,a=!1){let i=t.slice();return e&&i.push(e),process.platform==="win32"&&!a&&i.push("windows-only"),i.push(tP),V3.createHash("sha256").update(i.join("|")).digest("hex")}o(dP,"getCacheVersion");xe.getCacheVersion=dP;function cP(){let t=process.env.ACTIONS_RUNTIME_TOKEN;if(!t)throw new Error("Unable to get the ACTIONS_RUNTIME_TOKEN env variable");return t}o(cP,"getRuntimeToken");xe.getRuntimeToken=cP});function Po(){return Al>Bl.length-16&&(G3.default.randomFillSync(Bl),Al=0),Bl.slice(Al,Al+=16)}var G3,Bl,Al,d1=jt(()=>{G3=ba(require("crypto")),Bl=new Uint8Array(256),Al=Bl.length;o(Po,"rng")});var W3,X3=jt(()=>{W3=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function uP(t){return typeof t=="string"&&W3.test(t)}var ar,Io=jt(()=>{X3();o(uP,"validate");ar=uP});function mP(t,e=0){let a=(Mt[t[e+0]]+Mt[t[e+1]]+Mt[t[e+2]]+Mt[t[e+3]]+"-"+Mt[t[e+4]]+Mt[t[e+5]]+"-"+Mt[t[e+6]]+Mt[t[e+7]]+"-"+Mt[t[e+8]]+Mt[t[e+9]]+"-"+Mt[t[e+10]]+Mt[t[e+11]]+Mt[t[e+12]]+Mt[t[e+13]]+Mt[t[e+14]]+Mt[t[e+15]]).toLowerCase();if(!ar(a))throw TypeError("Stringified UUID is invalid");return a}var Mt,ir,Do=jt(()=>{Io();Mt=[];for(let t=0;t<256;++t)Mt.push((t+256).toString(16).substr(1));o(mP,"stringify");ir=mP});function fP(t,e,a){let i=e&&a||0,r=e||new Array(16);t=t||{};let n=t.node||K3,s=t.clockseq!==void 0?t.clockseq:c1;if(n==null||s==null){let m=t.random||(t.rng||Po)();n==null&&(n=K3=[m[0]|1,m[1],m[2],m[3],m[4],m[5]]),s==null&&(s=c1=(m[6]<<8|m[7])&16383)}let p=t.msecs!==void 0?t.msecs:Date.now(),l=t.nsecs!==void 0?t.nsecs:m1+1,d=p-u1+(l-m1)/1e4;if(d<0&&t.clockseq===void 0&&(s=s+1&16383),(d<0||p>u1)&&t.nsecs===void 0&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u1=p,m1=l,c1=s,p+=122192928e5;let c=((p&268435455)*1e4+l)%4294967296;r[i++]=c>>>24&255,r[i++]=c>>>16&255,r[i++]=c>>>8&255,r[i++]=c&255;let u=p/4294967296*1e4&268435455;r[i++]=u>>>8&255,r[i++]=u&255,r[i++]=u>>>24&15|16,r[i++]=u>>>16&255,r[i++]=s>>>8|128,r[i++]=s&255;for(let m=0;m<6;++m)r[i+m]=n[m];return e||ir(r)}var K3,c1,u1,m1,Y3,Q3=jt(()=>{d1();Do();u1=0,m1=0;o(fP,"v1");Y3=fP});function hP(t){if(!ar(t))throw TypeError("Invalid UUID");let e,a=new Uint8Array(16);return a[0]=(e=parseInt(t.slice(0,8),16))>>>24,a[1]=e>>>16&255,a[2]=e>>>8&255,a[3]=e&255,a[4]=(e=parseInt(t.slice(9,13),16))>>>8,a[5]=e&255,a[6]=(e=parseInt(t.slice(14,18),16))>>>8,a[7]=e&255,a[8]=(e=parseInt(t.slice(19,23),16))>>>8,a[9]=e&255,a[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,a[11]=e/4294967296&255,a[12]=e>>>24&255,a[13]=e>>>16&255,a[14]=e>>>8&255,a[15]=e&255,a}var Ml,f1=jt(()=>{Io();o(hP,"parse");Ml=hP});function gP(t){t=unescape(encodeURIComponent(t));let e=[];for(let a=0;a<t.length;++a)e.push(t.charCodeAt(a));return e}function Ao(t,e,a){function i(r,n,s,p){if(typeof r=="string"&&(r=gP(r)),typeof n=="string"&&(n=Ml(n)),n.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+r.length);if(l.set(n),l.set(r,n.length),l=a(l),l[6]=l[6]&15|e,l[8]=l[8]&63|128,s){p=p||0;for(let d=0;d<16;++d)s[p+d]=l[d];return s}return ir(l)}o(i,"generateUUID");try{i.name=t}catch{}return i.DNS=yP,i.URL=vP,i}var yP,vP,h1=jt(()=>{Do();f1();o(gP,"stringToBytes");yP="6ba7b810-9dad-11d1-80b4-00c04fd430c8",vP
Line truncated
|
||||
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(v1)});var oi=N((zg,rr)=>{(function(){var t,e,a,i,r,n,s,p=[].slice,l={}.hasOwnProperty;t=o(function(){var d,c,u,m,f,h;if(h=arguments[0],f=2<=arguments.length?p.call(arguments,1):[],r(Object.assign))Object.assign.apply(null,arguments);else for(d=0,u=f.length;d<u;d++)if(m=f[d],m!=null)for(c in m)l.call(m,c)&&(h[c]=m[c]);return h},"assign"),r=o(function(d){return!!d&&Object.prototype.toString.call(d)==="[object Function]"},"isFunction"),n=o(function(d){var c;return!!d&&((c=typeof d)=="function"||c==="object")},"isObject"),a=o(function(d){return r(Array.isArray)?Array.isArray(d):Object.prototype.toString.call(d)==="[object Array]"},"isArray"),i=o(function(d){var c;if(a(d))return!d.length;for(c in d)if(l.call(d,c))return!1;return!0},"isEmpty"),s=o(function(d){var c,u;return n(d)&&(u=Object.getPrototypeOf(d))&&(c=u.constructor)&&typeof c=="function"&&c instanceof c&&Function.prototype.toString.call(c)===Function.prototype.toString.call(Object)},"isPlainObject"),e=o(function(d){return r(d.valueOf)?d.valueOf():d},"getValue"),rr.exports.assign=t,rr.exports.isFunction=r,rr.exports.isObject=n,rr.exports.isArray=a,rr.exports.isEmpty=i,rr.exports.isPlainObject=s,rr.exports.getValue=e}).call(zg)});var b1=N((jg,kg)=>{(function(){var t;kg.exports=t=function(){function e(){}return o(e,"XMLDOMImplementation"),e.prototype.hasFeature=function(a,i){return!0},e.prototype.createDocumentType=function(a,i,r){throw new Error("This DOM method is not implemented.")},e.prototype.createDocument=function(a,i,r){throw new Error("This DOM method is not implemented.")},e.prototype.createHTMLDocument=function(a){throw new Error("This DOM method is not implemented.")},e.prototype.getFeature=function(a,i){throw new Error("This DOM method is not implemented.")},e}()}).call(jg)});var Fg=N((Ug,Hg)=>{(function(){var t;Hg.exports=t=function(){function e(){}return o(e,"XMLDOMErrorHandler"),e.prototype.handleError=function(a){throw new Error(a)},e}()}).call(Ug)});var Gg=N((Vg,$g)=>{(function(){var t;$g.exports=t=function(){function e(a){this.arr=a||[]}return o(e,"XMLDOMStringList"),Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e.prototype.item=function(a){return this.arr[a]||null},e.prototype.contains=function(a){return this.arr.indexOf(a)!==-1},e}()}).call(Vg)});var Kg=N((Wg,Xg)=>{(function(){var t,e,a;e=Fg(),a=Gg(),Xg.exports=t=function(){function i(){var r;this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=r=Object.create(this.defaultParams)}return o(i,"XMLDOMConfiguration"),Object.defineProperty(i.prototype,"parameterNames",{get:function(){return new a(Object.keys(this.defaultParams))}}),i.prototype.getParameter=function(r){return this.params.hasOwnProperty(r)?this.params[r]:null},i.prototype.canSetParameter=function(r,n){return!0},i.prototype.setParameter=function(r,n){return n!=null?this.params[r]=n:delete this.params[r]},i}()}).call(Wg)});var st=N((Yg,Qg)=>{(function(){Qg.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(Yg)});var x1=N((Jg,Zg)=>{(function(){var t,e,a;t=st(),a=ca(),Zg.exports=e=function(){function i(r,n,s){if(this.parent=r,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),n==null)throw new Error("Missing attribute name. "+this.debugInfo(n));this.name=this.stringify.name(n),this.value=this.stringify.attValue(s),this.type=t.Attribute,this.isId=!1,this.schemaTypeInfo=null}return o(i,"XMLAttribute"),Object.defineProperty(i.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(i.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(i.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}}),Object.defineProperty(i.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(i.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(i.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(i.prototype,"specified",{get:function(){return!0}}),i.prototype.clone=function(){return Object.create(this)},i.prototype.toString=function(r){return this.options.writer.attribute(this,this.options.writer.filterOptions(r))},i.prototype.debugInfo=function(r){return r=r||this.name,r==null?"parent: <"+this.parent.name+">":"attribute: {"+r+"}, parent: <"+this.parent.name+">"},i.prototype.isEqualNode=function(r){return!(r.namespaceURI!==thi
Line truncated
|
||||
`,y.offset=(O=w.offset)!=null?O:0,y.dontPrettyTextNodes=(_=(D=w.dontPrettyTextNodes)!=null?D:w.dontprettytextnodes)!=null?_:0,y.spaceBeforeSlash=(T=(P=w.spaceBeforeSlash)!=null?P:w.spacebeforeslash)!=null?T:"",y.spaceBeforeSlash===!0&&(y.spaceBeforeSlash=" "),y.suppressPrettyCount=0,y.user={},y.state=e.None,y},I.prototype.indent=function(w,y,g){var S;return!y.pretty||y.suppressPrettyCount?"":y.pretty&&(S=(g||0)+y.offset+1,S>0)?new Array(S).join(y.indent):""},I.prototype.endline=function(w,y,g){return!y.pretty||y.suppressPrettyCount?"":y.newline},I.prototype.attribute=function(w,y,g){var S;return this.openAttribute(w,y,g),S=" "+w.name+'="'+w.value+'"',this.closeAttribute(w,y,g),S},I.prototype.cdata=function(w,y,g){var S;return this.openNode(w,y,g),y.state=e.OpenTag,S=this.indent(w,y,g)+"<![CDATA[",y.state=e.InsideTag,S+=w.value,y.state=e.CloseTag,S+="]]>"+this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),S},I.prototype.comment=function(w,y,g){var S;return this.openNode(w,y,g),y.state=e.OpenTag,S=this.indent(w,y,g)+"<!-- ",y.state=e.InsideTag,S+=w.value,y.state=e.CloseTag,S+=" -->"+this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),S},I.prototype.declaration=function(w,y,g){var S;return this.openNode(w,y,g),y.state=e.OpenTag,S=this.indent(w,y,g)+"<?xml",y.state=e.InsideTag,S+=' version="'+w.version+'"',w.encoding!=null&&(S+=' encoding="'+w.encoding+'"'),w.standalone!=null&&(S+=' standalone="'+w.standalone+'"'),y.state=e.CloseTag,S+=y.spaceBeforeSlash+"?>",S+=this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),S},I.prototype.docType=function(w,y,g){var S,O,_,D,T;if(g||(g=0),this.openNode(w,y,g),y.state=e.OpenTag,D=this.indent(w,y,g),D+="<!DOCTYPE "+w.root().name,w.pubID&&w.sysID?D+=' PUBLIC "'+w.pubID+'" "'+w.sysID+'"':w.sysID&&(D+=' SYSTEM "'+w.sysID+'"'),w.children.length>0){for(D+=" [",D+=this.endline(w,y,g),y.state=e.InsideTag,T=w.children,O=0,_=T.length;O<_;O++)S=T[O],D+=this.writeChildNode(S,y,g+1);y.state=e.CloseTag,D+="]"}return y.state=e.CloseTag,D+=y.spaceBeforeSlash+">",D+=this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),D},I.prototype.element=function(w,y,g){var S,O,_,D,T,P,B,k,pe,ve,Q,it,he,Ua;g||(g=0),ve=!1,Q="",this.openNode(w,y,g),y.state=e.OpenTag,Q+=this.indent(w,y,g)+"<"+w.name,it=w.attribs;for(pe in it)C.call(it,pe)&&(S=it[pe],Q+=this.attribute(S,y,g));if(_=w.children.length,D=_===0?null:w.children[0],_===0||w.children.every(function(Wt){return(Wt.type===t.Text||Wt.type===t.Raw)&&Wt.value===""}))y.allowEmpty?(Q+=">",y.state=e.CloseTag,Q+="</"+w.name+">"+this.endline(w,y,g)):(y.state=e.CloseTag,Q+=y.spaceBeforeSlash+"/>"+this.endline(w,y,g));else if(y.pretty&&_===1&&(D.type===t.Text||D.type===t.Raw)&&D.value!=null)Q+=">",y.state=e.InsideTag,y.suppressPrettyCount++,ve=!0,Q+=this.writeChildNode(D,y,g+1),y.suppressPrettyCount--,ve=!1,y.state=e.CloseTag,Q+="</"+w.name+">"+this.endline(w,y,g);else{if(y.dontPrettyTextNodes){for(he=w.children,T=0,B=he.length;T<B;T++)if(O=he[T],(O.type===t.Text||O.type===t.Raw)&&O.value!=null){y.suppressPrettyCount++,ve=!0;break}}for(Q+=">"+this.endline(w,y,g),y.state=e.InsideTag,Ua=w.children,P=0,k=Ua.length;P<k;P++)O=Ua[P],Q+=this.writeChildNode(O,y,g+1);y.state=e.CloseTag,Q+=this.indent(w,y,g)+"</"+w.name+">",ve&&y.suppressPrettyCount--,Q+=this.endline(w,y,g),y.state=e.None}return this.closeNode(w,y,g),Q},I.prototype.writeChildNode=function(w,y,g){switch(w.type){case t.CData:return this.cdata(w,y,g);case t.Comment:return this.comment(w,y,g);case t.Element:return this.element(w,y,g);case t.Raw:return this.raw(w,y,g);case t.Text:return this.text(w,y,g);case t.ProcessingInstruction:return this.processingInstruction(w,y,g);case t.Dummy:return"";case t.Declaration:return this.declaration(w,y,g);case t.DocType:return this.docType(w,y,g);case t.AttributeDeclaration:return this.dtdAttList(w,y,g);case t.ElementDeclaration:return this.dtdElement(w,y,g);case t.EntityDeclaration:return this.dtdEntity(w,y,g);case t.NotationDeclaration:return this.dtdNotation(w,y,g);default:throw new Error("Unknown XML node type: "+w.constructor.name)}},I.prototype.processingInstruction=function(w,y,g){var S;return this.openNode(w,y,g),y.state=e.OpenTag,S=this.indent(w,y,g)+"<?",y.state=e.InsideTag,S+=w.target,w.value&&(S+=" "+w.value),y.state=e.CloseTag,S+=y.spaceBeforeSlash+"?>",S+=this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),S},I.prototype.raw=function(w,y,g){var S;return this.openNode(w,y,g),y.state=e.OpenTag,S=this.indent(w,y,g),y.state=e.InsideTag,S+=w.value,y.state=e.CloseTag,S+=this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),S},I.prototype.text=function(w,y,g){var S;return this.openNode(w,y,g),y.state=e.OpenTag,S=this.indent(w,y,g),y.state=e.InsideTag,S+=w.value,y.state=e.CloseTag,S+=this.endline(w,y,g),y.state=e.None,this.closeNode(w,y,g),S},I.prototype.dtdAttList=function(w,y,g){var S;return this.openNode(w,y,g),y.state=e.OpenTag,S=this.indent(w,y,g)+"<!ATTLIST",y.state=e.InsideTag,S+=" "+w.elementName+" "+w.attributeName+" "+w.attribut
Line truncated
|
||||
`||x==="\r"||x===" "}o(w,"isWhitespace");function y(x){return x==='"'||x==="'"}o(y,"isQuote");function g(x){return x===">"||w(x)}o(g,"isAttribEnd");function S(x,v){return x.test(v)}o(S,"isMatch");function O(x,v){return!S(x,v)}o(O,"notMatch");var _=0;t.STATE={BEGIN:_++,BEGIN_WHITESPACE:_++,TEXT:_++,TEXT_ENTITY:_++,OPEN_WAKA:_++,SGML_DECL:_++,SGML_DECL_QUOTED:_++,DOCTYPE:_++,DOCTYPE_QUOTED:_++,DOCTYPE_DTD:_++,DOCTYPE_DTD_QUOTED:_++,COMMENT_STARTING:_++,COMMENT:_++,COMMENT_ENDING:_++,COMMENT_ENDED:_++,CDATA:_++,CDATA_ENDING:_++,CDATA_ENDING_2:_++,PROC_INST:_++,PROC_INST_BODY:_++,PROC_INST_ENDING:_++,OPEN_TAG:_++,OPEN_TAG_SLASH:_++,ATTRIB:_++,ATTRIB_NAME:_++,ATTRIB_NAME_SAW_WHITE:_++,ATTRIB_VALUE:_++,ATTRIB_VALUE_QUOTED:_++,ATTRIB_VALUE_CLOSED:_++,ATTRIB_VALUE_UNQUOTED:_++,ATTRIB_VALUE_ENTITY_Q:_++,ATTRIB_VALUE_ENTITY_U:_++,CLOSE_TAG:_++,CLOSE_TAG_SAW_WHITE:_++,SCRIPT:_++,SCRIPT_ENDING:_++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(x){var v=t.ENTITIES[x],L=typeof v=="number"?String.fromCharCode(v):v;t.ENTITIES[x]=L});for(var D in t.STATE)t.STATE[t.STATE[D]]=D;_=t.STATE;function T(x,v,L){x[v]&&x[v](L)}o(T,"emit");function P(x,v,L){x.textNode&&B(x),T(x,v,L)}o(P,"emitNode");function B(x){x.textNode=k(x.opt,x.textNode),x.textNode&&T(x,"ontext",x.textNode),x.textNode=""}o(B,"closeText");function k(x,v){return x.trim&&(v=v.trim()),x.normalize&&(v=v.replace(/\s+/g," ")),v}o(k,"textopts");function pe(x,v){return B(x),x.trackPosition&&(v+=`
|
||||
@@ -21,54 +21,54 @@ Line: `+x.line+`
|
||||
Column: `+x.column+`
|
||||
Char: `+x.c),v=new Error(v),x.error=v,T(x,"onerror",v),x}o(pe,"error");function ve(x){return x.sawRoot&&!x.closedRoot&&Q(x,"Unclosed root tag"),x.state!==_.BEGIN&&x.state!==_.BEGIN_WHITESPACE&&x.state!==_.TEXT&&pe(x,"Unexpected end"),B(x),x.c="",x.closed=!0,T(x,"onend"),a.call(x,x.strict,x.opt),x}o(ve,"end");function Q(x,v){if(typeof x!="object"||!(x instanceof a))throw new Error("bad call to strictFail");x.strict&&pe(x,v)}o(Q,"strictFail");function it(x){x.strict||(x.tagName=x.tagName[x.looseCase]());var v=x.tags[x.tags.length-1]||x,L=x.tag={name:x.tagName,attributes:{}};x.opt.xmlns&&(L.ns=v.ns),x.attribList.length=0,P(x,"onopentagstart",L)}o(it,"newTag");function he(x,v){var L=x.indexOf(":"),R=L<0?["",x]:x.split(":"),Re=R[0],ct=R[1];return v&&x==="xmlns"&&(Re="xmlns",ct=""),{prefix:Re,local:ct}}o(he,"qname");function Ua(x){if(x.strict||(x.attribName=x.attribName[x.looseCase]()),x.attribList.indexOf(x.attribName)!==-1||x.tag.attributes.hasOwnProperty(x.attribName)){x.attribName=x.attribValue="";return}if(x.opt.xmlns){var v=he(x.attribName,!0),L=v.prefix,R=v.local;if(L==="xmlns")if(R==="xml"&&x.attribValue!==m)Q(x,"xml: prefix must be bound to "+m+`
|
||||
Actual: `+x.attribValue);else if(R==="xmlns"&&x.attribValue!==f)Q(x,"xmlns: prefix must be bound to "+f+`
|
||||
Actual: `+x.attribValue);else{var Re=x.tag,ct=x.tags[x.tags.length-1]||x;Re.ns===ct.ns&&(Re.ns=Object.create(ct.ns)),Re.ns[R]=x.attribValue}x.attribList.push([x.attribName,x.attribValue])}else x.tag.attributes[x.attribName]=x.attribValue,P(x,"onattribute",{name:x.attribName,value:x.attribValue});x.attribName=x.attribValue=""}o(Ua,"attrib");function Wt(x,v){if(x.opt.xmlns){var L=x.tag,R=he(x.tagName);L.prefix=R.prefix,L.local=R.local,L.uri=L.ns[R.prefix]||"",L.prefix&&!L.uri&&(Q(x,"Unbound namespace prefix: "+JSON.stringify(x.tagName)),L.uri=R.prefix);var Re=x.tags[x.tags.length-1]||x;L.ns&&Re.ns!==L.ns&&Object.keys(L.ns).forEach(function(o4){P(x,"onopennamespace",{prefix:o4,uri:L.ns[o4]})});for(var ct=0,vt=x.attribList.length;ct<vt;ct++){var Xt=x.attribList[ct],ai=Xt[0],Sn=Xt[1],At=he(ai,!0),_i=At.prefix,pC=At.local,s4=_i===""?"":L.ns[_i]||"",mm={name:ai,value:Sn,prefix:_i,local:pC,uri:s4};_i&&_i!=="xmlns"&&!s4&&(Q(x,"Unbound namespace prefix: "+JSON.stringify(_i)),mm.uri=_i),x.tag.attributes[ai]=mm,P(x,"onattribute",mm)}x.attribList.length=0}x.tag.isSelfClosing=!!v,x.sawRoot=!0,x.tags.push(x.tag),P(x,"onopentag",x.tag),v||(!x.noscript&&x.tagName.toLowerCase()==="script"?x.state=_.SCRIPT:x.state=_.TEXT,x.tag=null,x.tagName=""),x.attribName=x.attribValue="",x.attribList.length=0}o(Wt,"openTag");function _n(x){if(!x.tagName){Q(x,"Weird empty close tag."),x.textNode+="</>",x.state=_.TEXT;return}if(x.script){if(x.tagName!=="script"){x.script+="</"+x.tagName+">",x.tagName="",x.state=_.SCRIPT;return}P(x,"onscript",x.script),x.script=""}var v=x.tags.length,L=x.tagName;x.strict||(L=L[x.looseCase]());for(var R=L;v--;){var Re=x.tags[v];if(Re.name!==R)Q(x,"Unexpected close tag");else break}if(v<0){Q(x,"Unmatched closing tag: "+x.tagName),x.textNode+="</"+x.tagName+">",x.state=_.TEXT;return}x.tagName=L;for(var ct=x.tags.length;ct-- >v;){var vt=x.tag=x.tags.pop();x.tagName=x.tag.name,P(x,"onclosetag",x.tagName);var Xt={};for(var ai in vt.ns)Xt[ai]=vt.ns[ai];var Sn=x.tags[x.tags.length-1]||x;x.opt.xmlns&&vt.ns!==Sn.ns&&Object.keys(vt.ns).forEach(function(At){var _i=vt.ns[At];P(x,"onclosenamespace",{prefix:At,uri:_i})})}v===0&&(x.closedRoot=!0),x.tagName=x.attribValue=x.attribName="",x.attribList.length=0,x.state=_.TEXT}o(_n,"closeTag");function ho(x){var v=x.entity,L=v.toLowerCase(),R,Re="";return x.ENTITIES[v]?x.ENTITIES[v]:x.ENTITIES[L]?x.ENTITIES[L]:(v=L,v.charAt(0)==="#"&&(v.charAt(1)==="x"?(v=v.slice(2),R=parseInt(v,16),Re=R.toString(16)):(v=v.slice(1),R=parseInt(v,10),Re=R.toString(10))),v=v.replace(/^0+/,""),isNaN(R)||Re.toLowerCase()!==v?(Q(x,"Invalid character entity"),"&"+x.entity+";"):String.fromCodePoint(R))}o(ho,"parseEntity");function r4(x,v){v==="<"?(x.state=_.OPEN_WAKA,x.startTagPosition=x.position):w(v)||(Q(x,"Non-whitespace before first tag."),x.textNode=v,x.state=_.TEXT)}o(r4,"beginWhiteSpace");function n4(x,v){var L="";return v<x.length&&(L=x.charAt(v)),L}o(n4,"charAt");function oC(x){var v=this;if(this.error)throw this.error;if(v.closed)return pe(v,"Cannot write after close. Assign an onready handler.");if(x===null)return ve(v);typeof x=="object"&&(x=x.toString());for(var L=0,R="";R=n4(x,L++),v.c=R,!!R;)switch(v.trackPosition&&(v.position++,R===`
|
||||
Actual: `+x.attribValue);else{var Re=x.tag,ct=x.tags[x.tags.length-1]||x;Re.ns===ct.ns&&(Re.ns=Object.create(ct.ns)),Re.ns[R]=x.attribValue}x.attribList.push([x.attribName,x.attribValue])}else x.tag.attributes[x.attribName]=x.attribValue,P(x,"onattribute",{name:x.attribName,value:x.attribValue});x.attribName=x.attribValue=""}o(Ua,"attrib");function Wt(x,v){if(x.opt.xmlns){var L=x.tag,R=he(x.tagName);L.prefix=R.prefix,L.local=R.local,L.uri=L.ns[R.prefix]||"",L.prefix&&!L.uri&&(Q(x,"Unbound namespace prefix: "+JSON.stringify(x.tagName)),L.uri=R.prefix);var Re=x.tags[x.tags.length-1]||x;L.ns&&Re.ns!==L.ns&&Object.keys(L.ns).forEach(function(o4){P(x,"onopennamespace",{prefix:o4,uri:L.ns[o4]})});for(var ct=0,vt=x.attribList.length;ct<vt;ct++){var Xt=x.attribList[ct],ai=Xt[0],En=Xt[1],At=he(ai,!0),_i=At.prefix,pC=At.local,s4=_i===""?"":L.ns[_i]||"",mm={name:ai,value:En,prefix:_i,local:pC,uri:s4};_i&&_i!=="xmlns"&&!s4&&(Q(x,"Unbound namespace prefix: "+JSON.stringify(_i)),mm.uri=_i),x.tag.attributes[ai]=mm,P(x,"onattribute",mm)}x.attribList.length=0}x.tag.isSelfClosing=!!v,x.sawRoot=!0,x.tags.push(x.tag),P(x,"onopentag",x.tag),v||(!x.noscript&&x.tagName.toLowerCase()==="script"?x.state=_.SCRIPT:x.state=_.TEXT,x.tag=null,x.tagName=""),x.attribName=x.attribValue="",x.attribList.length=0}o(Wt,"openTag");function Sn(x){if(!x.tagName){Q(x,"Weird empty close tag."),x.textNode+="</>",x.state=_.TEXT;return}if(x.script){if(x.tagName!=="script"){x.script+="</"+x.tagName+">",x.tagName="",x.state=_.SCRIPT;return}P(x,"onscript",x.script),x.script=""}var v=x.tags.length,L=x.tagName;x.strict||(L=L[x.looseCase]());for(var R=L;v--;){var Re=x.tags[v];if(Re.name!==R)Q(x,"Unexpected close tag");else break}if(v<0){Q(x,"Unmatched closing tag: "+x.tagName),x.textNode+="</"+x.tagName+">",x.state=_.TEXT;return}x.tagName=L;for(var ct=x.tags.length;ct-- >v;){var vt=x.tag=x.tags.pop();x.tagName=x.tag.name,P(x,"onclosetag",x.tagName);var Xt={};for(var ai in vt.ns)Xt[ai]=vt.ns[ai];var En=x.tags[x.tags.length-1]||x;x.opt.xmlns&&vt.ns!==En.ns&&Object.keys(vt.ns).forEach(function(At){var _i=vt.ns[At];P(x,"onclosenamespace",{prefix:At,uri:_i})})}v===0&&(x.closedRoot=!0),x.tagName=x.attribValue=x.attribName="",x.attribList.length=0,x.state=_.TEXT}o(Sn,"closeTag");function ho(x){var v=x.entity,L=v.toLowerCase(),R,Re="";return x.ENTITIES[v]?x.ENTITIES[v]:x.ENTITIES[L]?x.ENTITIES[L]:(v=L,v.charAt(0)==="#"&&(v.charAt(1)==="x"?(v=v.slice(2),R=parseInt(v,16),Re=R.toString(16)):(v=v.slice(1),R=parseInt(v,10),Re=R.toString(10))),v=v.replace(/^0+/,""),isNaN(R)||Re.toLowerCase()!==v?(Q(x,"Invalid character entity"),"&"+x.entity+";"):String.fromCodePoint(R))}o(ho,"parseEntity");function r4(x,v){v==="<"?(x.state=_.OPEN_WAKA,x.startTagPosition=x.position):w(v)||(Q(x,"Non-whitespace before first tag."),x.textNode=v,x.state=_.TEXT)}o(r4,"beginWhiteSpace");function n4(x,v){var L="";return v<x.length&&(L=x.charAt(v)),L}o(n4,"charAt");function oC(x){var v=this;if(this.error)throw this.error;if(v.closed)return pe(v,"Cannot write after close. Assign an onready handler.");if(x===null)return ve(v);typeof x=="object"&&(x=x.toString());for(var L=0,R="";R=n4(x,L++),v.c=R,!!R;)switch(v.trackPosition&&(v.position++,R===`
|
||||
`?(v.line++,v.column=0):v.column++),v.state){case _.BEGIN:if(v.state=_.BEGIN_WHITESPACE,R==="\uFEFF")continue;r4(v,R);continue;case _.BEGIN_WHITESPACE:r4(v,R);continue;case _.TEXT:if(v.sawRoot&&!v.closedRoot){for(var Re=L-1;R&&R!=="<"&&R!=="&";)R=n4(x,L++),R&&v.trackPosition&&(v.position++,R===`
|
||||
`?(v.line++,v.column=0):v.column++);v.textNode+=x.substring(Re,L-1)}R==="<"&&!(v.sawRoot&&v.closedRoot&&!v.strict)?(v.state=_.OPEN_WAKA,v.startTagPosition=v.position):(!w(R)&&(!v.sawRoot||v.closedRoot)&&Q(v,"Text data outside of root node."),R==="&"?v.state=_.TEXT_ENTITY:v.textNode+=R);continue;case _.SCRIPT:R==="<"?v.state=_.SCRIPT_ENDING:v.script+=R;continue;case _.SCRIPT_ENDING:R==="/"?v.state=_.CLOSE_TAG:(v.script+="<"+R,v.state=_.SCRIPT);continue;case _.OPEN_WAKA:if(R==="!")v.state=_.SGML_DECL,v.sgmlDecl="";else if(!w(R))if(S(b,R))v.state=_.OPEN_TAG,v.tagName=R;else if(R==="/")v.state=_.CLOSE_TAG,v.tagName="";else if(R==="?")v.state=_.PROC_INST,v.procInstName=v.procInstBody="";else{if(Q(v,"Unencoded <"),v.startTagPosition+1<v.position){var ct=v.position-v.startTagPosition;R=new Array(ct).join(" ")+R}v.textNode+="<"+R,v.state=_.TEXT}continue;case _.SGML_DECL:(v.sgmlDecl+R).toUpperCase()===c?(P(v,"onopencdata"),v.state=_.CDATA,v.sgmlDecl="",v.cdata=""):v.sgmlDecl+R==="--"?(v.state=_.COMMENT,v.comment="",v.sgmlDecl=""):(v.sgmlDecl+R).toUpperCase()===u?(v.state=_.DOCTYPE,(v.doctype||v.sawRoot)&&Q(v,"Inappropriately located doctype declaration"),v.doctype="",v.sgmlDecl=""):R===">"?(P(v,"onsgmldeclaration",v.sgmlDecl),v.sgmlDecl="",v.state=_.TEXT):(y(R)&&(v.state=_.SGML_DECL_QUOTED),v.sgmlDecl+=R);continue;case _.SGML_DECL_QUOTED:R===v.q&&(v.state=_.SGML_DECL,v.q=""),v.sgmlDecl+=R;continue;case _.DOCTYPE:R===">"?(v.state=_.TEXT,P(v,"ondoctype",v.doctype),v.doctype=!0):(v.doctype+=R,R==="["?v.state=_.DOCTYPE_DTD:y(R)&&(v.state=_.DOCTYPE_QUOTED,v.q=R));continue;case _.DOCTYPE_QUOTED:v.doctype+=R,R===v.q&&(v.q="",v.state=_.DOCTYPE);continue;case _.DOCTYPE_DTD:v.doctype+=R,R==="]"?v.state=_.DOCTYPE:y(R)&&(v.state=_.DOCTYPE_DTD_QUOTED,v.q=R);continue;case _.DOCTYPE_DTD_QUOTED:v.doctype+=R,R===v.q&&(v.state=_.DOCTYPE_DTD,v.q="");continue;case _.COMMENT:R==="-"?v.state=_.COMMENT_ENDING:v.comment+=R;continue;case _.COMMENT_ENDING:R==="-"?(v.state=_.COMMENT_ENDED,v.comment=k(v.opt,v.comment),v.comment&&P(v,"oncomment",v.comment),v.comment=""):(v.comment+="-"+R,v.state=_.COMMENT);continue;case _.COMMENT_ENDED:R!==">"?(Q(v,"Malformed comment"),v.comment+="--"+R,v.state=_.COMMENT):v.state=_.TEXT;continue;case _.CDATA:R==="]"?v.state=_.CDATA_ENDING:v.cdata+=R;continue;case _.CDATA_ENDING:R==="]"?v.state=_.CDATA_ENDING_2:(v.cdata+="]"+R,v.state=_.CDATA);continue;case _.CDATA_ENDING_2:R===">"?(v.cdata&&P(v,"oncdata",v.cdata),P(v,"onclosecdata"),v.cdata="",v.state=_.TEXT):R==="]"?v.cdata+="]":(v.cdata+="]]"+R,v.state=_.CDATA);continue;case _.PROC_INST:R==="?"?v.state=_.PROC_INST_ENDING:w(R)?v.state=_.PROC_INST_BODY:v.procInstName+=R;continue;case _.PROC_INST_BODY:if(!v.procInstBody&&w(R))continue;R==="?"?v.state=_.PROC_INST_ENDING:v.procInstBody+=R;continue;case _.PROC_INST_ENDING:R===">"?(P(v,"onprocessinginstruction",{name:v.procInstName,body:v.procInstBody}),v.procInstName=v.procInstBody="",v.state=_.TEXT):(v.procInstBody+="?"+R,v.state=_.PROC_INST_BODY);continue;case _.OPEN_TAG:S(E,R)?v.tagName+=R:(it(v),R===">"?Wt(v):R==="/"?v.state=_.OPEN_TAG_SLASH:(w(R)||Q(v,"Invalid character in tag name"),v.state=_.ATTRIB));continue;case _.OPEN_TAG_SLASH:R===">"?(Wt(v,!0),_n(v)):(Q(v,"Forward-slash in opening tag not followed by >"),v.state=_.ATTRIB);continue;case _.ATTRIB:if(w(R))continue;R===">"?Wt(v):R==="/"?v.state=_.OPEN_TAG_SLASH:S(b,R)?(v.attribName=R,v.attribValue="",v.state=_.ATTRIB_NAME):Q(v,"Invalid attribute name");continue;case _.ATTRIB_NAME:R==="="?v.state=_.ATTRIB_VALUE:R===">"?(Q(v,"Attribute without value"),v.attribValue=v.attribName,Ua(v),Wt(v)):w(R)?v.state=_.ATTRIB_NAME_SAW_WHITE:S(E,R)?v.attribName+=R:Q(v,"Invalid attribute name");continue;case _.ATTRIB_NAME_SAW_WHITE:if(R==="=")v.state=_.ATTRIB_VALUE;else{if(w(R))continue;Q(v,"Attribute without value"),v.tag.attributes[v.attribName]="",v.attribValue="",P(v,"onattribute",{name:v.attribName,value:""}),v.attribName="",R===">"?Wt(v):S(b,R)?(v.attribName=R,v.state=_.ATTRIB_NAME):(Q(v,"Invalid attribute name"),v.state=_.ATTRIB)}continue;case _.ATTRIB_VALUE:if(w(R))continue;y(R)?(v.q=R,v.state=_.ATTRIB_VALUE_QUOTED):(Q(v,"Unquoted attribute value"),v.state=_.ATTRIB_VALUE_UNQUOTED,v.attribValue=R);continue;case _.ATTRIB_VALUE_QUOTED:if(R!==v.q){R==="&"?v.state=_.ATTRIB_VALUE_ENTITY_Q:v.attribValue+=R;continue}Ua(v),v.q="",v.state=_.ATTRIB_VALUE_CLOSED;continue;case _.ATTRIB_VALUE_CLOSED:w(R)?v.state=_.ATTRIB:R===">"?Wt(v):R==="/"?v.state=_.OPEN_TAG_SLASH:S(b,R)?(Q(v,"No whitespace between attributes"),v.attribName=R,v.attribValue="",v.state=_.ATTRIB_NAME):Q(v,"Invalid attribute name");continue;case _.ATTRIB_VALUE_UNQUOTED:if(!g(R)){R==="&"?v.state=_.ATTRIB_VALUE_ENTITY_U:v.attribValue+=R;continue}Ua(v),R===">"?Wt(v):v.state=_.ATTRIB;continue;case _.CLOSE_TAG:if(v.tagName)R===">"?_n(v):S(E,R)?v.tagName+=R:v.script?(v.script+="</"+v.tagName,v.tagName="",v.state=_.SCRIPT):(w(R)||Q(v,"Invalid tagname in closing tag"),v.state=_.CLOSE_TAG_SAW_WHITE);else{if(w(R))continue;O
Line truncated
|
||||
`;ye.DEFAULT_CONTENT_TYPE="application/octet-stream";ye.prototype.append=function(t,e,a){a=a||{},typeof a=="string"&&(a={filename:a});var i=cf.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(t,e,a),n=this._multiPartFooter();i(r),i(e),i(n),this._trackLength(r,e,a)};ye.prototype._trackLength=function(t,e,a){var i=0;a.knownLength!=null?i+=Number(a.knownLength):Buffer.isBuffer(e)?i=e.length:typeof e=="string"&&(i=Buffer.byteLength(e)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(t)+ye.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&or(e,"httpVersion"))&&!(e instanceof KD))&&(a.knownLength||this._valuesToMeasure.push(e))};ye.prototype._lengthRetriever=function(t,e){or(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):XD.stat(t.path,function(a,i){if(a){e(a);return}var r=i.size-(t.start?t.start:0);e(null,r)}):or(t,"httpVersion")?e(null,Number(t.headers["content-length"])):or(t,"httpModule")?(t.on("response",function(a){t.pause(),e(null,Number(a.headers["content-length"]))}),t.resume()):e("Unknown stream")};ye.prototype._multiPartHeader=function(t,e,a){if(typeof a.header=="string")return a.header;var i=this._getContentDisposition(e,a),r=this._getContentType(e,a),n="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(i||[]),"Content-Type":[].concat(r||[])};typeof a.header=="object"&&df(s,a.header);var p;for(var l in s)if(or(s,l)){if(p=s[l],p==null)continue;Array.isArray(p)||(p=[p]),p.length&&(n+=l+": "+p.join("; ")+ye.LINE_BREAK)}return"--"+this.getBoundary()+ye.LINE_BREAK+n+ye.LINE_BREAK};ye.prototype._getContentDisposition=function(t,e){var a;if(typeof e.filepath=="string"?a=pf.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?a=pf.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&or(t,"httpVersion")&&(a=pf.basename(t.client._httpMessage.path||"")),a)return'filename="'+a+'"'};ye.prototype._getContentType=function(t,e){var a=e.contentType;return!a&&t&&t.name&&(a=lf.lookup(t.name)),!a&&t&&t.path&&(a=lf.lookup(t.path)),!a&&t&&t.readable&&or(t,"httpVersion")&&(a=t.headers["content-type"]),!a&&(e.filepath||e.filename)&&(a=lf.lookup(e.filepath||e.filename)),!a&&t&&typeof t=="object"&&(a=ye.DEFAULT_CONTENT_TYPE),a};ye.prototype._multiPartFooter=function(){return function(t){var e=ye.LINE_BREAK,a=this._streams.length===0;a&&(e+=this._lastBoundary()),t(e)}.bind(this)};ye.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+ye.LINE_BREAK};ye.prototype.getHeaders=function(t){var e,a={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)or(t,e)&&(a[e.toLowerCase()]=t[e]);return a};ye.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};ye.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};ye.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),a=0,i=this._streams.length;a<i;a++)typeof this._streams[a]!="function"&&(Buffer.isBuffer(this._streams[a])?t=Buffer.concat([t,this._streams[a]]):t=Buffer.concat([t,Buffer.from(this._streams[a])]),(typeof this._streams[a]!="string"||this._streams[a].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(ye.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};ye.prototype._generateBoundary=function(){this._boundary="--------------------------"+YD.randomBytes(12).toString("hex")};ye.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};ye.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};ye.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}QD.parallel(this._valuesToMeasure,this._lengthRetriever,function(a,i){if(a){t(a);return}i.forEach(function(r){e+=r}),t(null,e)})};ye.prototype.submit=function(t,e){var a,i,r={method:"post"};return typeof t=="string"?(t=WD(t),i=df({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},r)):(i=df(t,r),i.port||(i.port=i.protocol==="https:"?443:80)),i.headers=this.getHeaders(t.headers),i.protocol==="https:"?a=GD.request(i):a=$D.request(i),this.getLength(function(n,s){if(n&&n!=="Unknown stream"){this._error(n);return}if(s&&a.setHeader("Content-Length",s),this.pipe(a),e){var p,l=o(function(d,c){return a.removeListener("error",l),a.removeListener("response",p),e.call(this,d,c)},"callback");p=l.bind(this,null),a.on("error",l),a.on("response",p)}}.bind(this)),a};ye.prototype._error=function(t){this.error||(this.error=t,this.
Line truncated
|
||||
`?(v.line++,v.column=0):v.column++);v.textNode+=x.substring(Re,L-1)}R==="<"&&!(v.sawRoot&&v.closedRoot&&!v.strict)?(v.state=_.OPEN_WAKA,v.startTagPosition=v.position):(!w(R)&&(!v.sawRoot||v.closedRoot)&&Q(v,"Text data outside of root node."),R==="&"?v.state=_.TEXT_ENTITY:v.textNode+=R);continue;case _.SCRIPT:R==="<"?v.state=_.SCRIPT_ENDING:v.script+=R;continue;case _.SCRIPT_ENDING:R==="/"?v.state=_.CLOSE_TAG:(v.script+="<"+R,v.state=_.SCRIPT);continue;case _.OPEN_WAKA:if(R==="!")v.state=_.SGML_DECL,v.sgmlDecl="";else if(!w(R))if(S(b,R))v.state=_.OPEN_TAG,v.tagName=R;else if(R==="/")v.state=_.CLOSE_TAG,v.tagName="";else if(R==="?")v.state=_.PROC_INST,v.procInstName=v.procInstBody="";else{if(Q(v,"Unencoded <"),v.startTagPosition+1<v.position){var ct=v.position-v.startTagPosition;R=new Array(ct).join(" ")+R}v.textNode+="<"+R,v.state=_.TEXT}continue;case _.SGML_DECL:(v.sgmlDecl+R).toUpperCase()===c?(P(v,"onopencdata"),v.state=_.CDATA,v.sgmlDecl="",v.cdata=""):v.sgmlDecl+R==="--"?(v.state=_.COMMENT,v.comment="",v.sgmlDecl=""):(v.sgmlDecl+R).toUpperCase()===u?(v.state=_.DOCTYPE,(v.doctype||v.sawRoot)&&Q(v,"Inappropriately located doctype declaration"),v.doctype="",v.sgmlDecl=""):R===">"?(P(v,"onsgmldeclaration",v.sgmlDecl),v.sgmlDecl="",v.state=_.TEXT):(y(R)&&(v.state=_.SGML_DECL_QUOTED),v.sgmlDecl+=R);continue;case _.SGML_DECL_QUOTED:R===v.q&&(v.state=_.SGML_DECL,v.q=""),v.sgmlDecl+=R;continue;case _.DOCTYPE:R===">"?(v.state=_.TEXT,P(v,"ondoctype",v.doctype),v.doctype=!0):(v.doctype+=R,R==="["?v.state=_.DOCTYPE_DTD:y(R)&&(v.state=_.DOCTYPE_QUOTED,v.q=R));continue;case _.DOCTYPE_QUOTED:v.doctype+=R,R===v.q&&(v.q="",v.state=_.DOCTYPE);continue;case _.DOCTYPE_DTD:v.doctype+=R,R==="]"?v.state=_.DOCTYPE:y(R)&&(v.state=_.DOCTYPE_DTD_QUOTED,v.q=R);continue;case _.DOCTYPE_DTD_QUOTED:v.doctype+=R,R===v.q&&(v.state=_.DOCTYPE_DTD,v.q="");continue;case _.COMMENT:R==="-"?v.state=_.COMMENT_ENDING:v.comment+=R;continue;case _.COMMENT_ENDING:R==="-"?(v.state=_.COMMENT_ENDED,v.comment=k(v.opt,v.comment),v.comment&&P(v,"oncomment",v.comment),v.comment=""):(v.comment+="-"+R,v.state=_.COMMENT);continue;case _.COMMENT_ENDED:R!==">"?(Q(v,"Malformed comment"),v.comment+="--"+R,v.state=_.COMMENT):v.state=_.TEXT;continue;case _.CDATA:R==="]"?v.state=_.CDATA_ENDING:v.cdata+=R;continue;case _.CDATA_ENDING:R==="]"?v.state=_.CDATA_ENDING_2:(v.cdata+="]"+R,v.state=_.CDATA);continue;case _.CDATA_ENDING_2:R===">"?(v.cdata&&P(v,"oncdata",v.cdata),P(v,"onclosecdata"),v.cdata="",v.state=_.TEXT):R==="]"?v.cdata+="]":(v.cdata+="]]"+R,v.state=_.CDATA);continue;case _.PROC_INST:R==="?"?v.state=_.PROC_INST_ENDING:w(R)?v.state=_.PROC_INST_BODY:v.procInstName+=R;continue;case _.PROC_INST_BODY:if(!v.procInstBody&&w(R))continue;R==="?"?v.state=_.PROC_INST_ENDING:v.procInstBody+=R;continue;case _.PROC_INST_ENDING:R===">"?(P(v,"onprocessinginstruction",{name:v.procInstName,body:v.procInstBody}),v.procInstName=v.procInstBody="",v.state=_.TEXT):(v.procInstBody+="?"+R,v.state=_.PROC_INST_BODY);continue;case _.OPEN_TAG:S(E,R)?v.tagName+=R:(it(v),R===">"?Wt(v):R==="/"?v.state=_.OPEN_TAG_SLASH:(w(R)||Q(v,"Invalid character in tag name"),v.state=_.ATTRIB));continue;case _.OPEN_TAG_SLASH:R===">"?(Wt(v,!0),Sn(v)):(Q(v,"Forward-slash in opening tag not followed by >"),v.state=_.ATTRIB);continue;case _.ATTRIB:if(w(R))continue;R===">"?Wt(v):R==="/"?v.state=_.OPEN_TAG_SLASH:S(b,R)?(v.attribName=R,v.attribValue="",v.state=_.ATTRIB_NAME):Q(v,"Invalid attribute name");continue;case _.ATTRIB_NAME:R==="="?v.state=_.ATTRIB_VALUE:R===">"?(Q(v,"Attribute without value"),v.attribValue=v.attribName,Ua(v),Wt(v)):w(R)?v.state=_.ATTRIB_NAME_SAW_WHITE:S(E,R)?v.attribName+=R:Q(v,"Invalid attribute name");continue;case _.ATTRIB_NAME_SAW_WHITE:if(R==="=")v.state=_.ATTRIB_VALUE;else{if(w(R))continue;Q(v,"Attribute without value"),v.tag.attributes[v.attribName]="",v.attribValue="",P(v,"onattribute",{name:v.attribName,value:""}),v.attribName="",R===">"?Wt(v):S(b,R)?(v.attribName=R,v.state=_.ATTRIB_NAME):(Q(v,"Invalid attribute name"),v.state=_.ATTRIB)}continue;case _.ATTRIB_VALUE:if(w(R))continue;y(R)?(v.q=R,v.state=_.ATTRIB_VALUE_QUOTED):(Q(v,"Unquoted attribute value"),v.state=_.ATTRIB_VALUE_UNQUOTED,v.attribValue=R);continue;case _.ATTRIB_VALUE_QUOTED:if(R!==v.q){R==="&"?v.state=_.ATTRIB_VALUE_ENTITY_Q:v.attribValue+=R;continue}Ua(v),v.q="",v.state=_.ATTRIB_VALUE_CLOSED;continue;case _.ATTRIB_VALUE_CLOSED:w(R)?v.state=_.ATTRIB:R===">"?Wt(v):R==="/"?v.state=_.OPEN_TAG_SLASH:S(b,R)?(Q(v,"No whitespace between attributes"),v.attribName=R,v.attribValue="",v.state=_.ATTRIB_NAME):Q(v,"Invalid attribute name");continue;case _.ATTRIB_VALUE_UNQUOTED:if(!g(R)){R==="&"?v.state=_.ATTRIB_VALUE_ENTITY_U:v.attribValue+=R;continue}Ua(v),R===">"?Wt(v):v.state=_.ATTRIB;continue;case _.CLOSE_TAG:if(v.tagName)R===">"?Sn(v):S(E,R)?v.tagName+=R:v.script?(v.script+="</"+v.tagName,v.tagName="",v.state=_.SCRIPT):(w(R)||Q(v,"Invalid tagname in closing tag"),v.state=_.CLOSE_TAG_SAW_WHITE);else{if(w(R))continue;O
Line truncated
|
||||
`;ye.DEFAULT_CONTENT_TYPE="application/octet-stream";ye.prototype.append=function(t,e,a){a=a||{},typeof a=="string"&&(a={filename:a});var i=cf.prototype.append.bind(this);if((typeof e=="number"||e==null)&&(e=String(e)),Array.isArray(e)){this._error(new Error("Arrays are not supported."));return}var r=this._multiPartHeader(t,e,a),n=this._multiPartFooter();i(r),i(e),i(n),this._trackLength(r,e,a)};ye.prototype._trackLength=function(t,e,a){var i=0;a.knownLength!=null?i+=Number(a.knownLength):Buffer.isBuffer(e)?i=e.length:typeof e=="string"&&(i=Buffer.byteLength(e)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(t)+ye.LINE_BREAK.length,!(!e||!e.path&&!(e.readable&&or(e,"httpVersion"))&&!(e instanceof KD))&&(a.knownLength||this._valuesToMeasure.push(e))};ye.prototype._lengthRetriever=function(t,e){or(t,"fd")?t.end!=null&&t.end!=1/0&&t.start!=null?e(null,t.end+1-(t.start?t.start:0)):XD.stat(t.path,function(a,i){if(a){e(a);return}var r=i.size-(t.start?t.start:0);e(null,r)}):or(t,"httpVersion")?e(null,Number(t.headers["content-length"])):or(t,"httpModule")?(t.on("response",function(a){t.pause(),e(null,Number(a.headers["content-length"]))}),t.resume()):e("Unknown stream")};ye.prototype._multiPartHeader=function(t,e,a){if(typeof a.header=="string")return a.header;var i=this._getContentDisposition(e,a),r=this._getContentType(e,a),n="",s={"Content-Disposition":["form-data",'name="'+t+'"'].concat(i||[]),"Content-Type":[].concat(r||[])};typeof a.header=="object"&&df(s,a.header);var p;for(var l in s)if(or(s,l)){if(p=s[l],p==null)continue;Array.isArray(p)||(p=[p]),p.length&&(n+=l+": "+p.join("; ")+ye.LINE_BREAK)}return"--"+this.getBoundary()+ye.LINE_BREAK+n+ye.LINE_BREAK};ye.prototype._getContentDisposition=function(t,e){var a;if(typeof e.filepath=="string"?a=pf.normalize(e.filepath).replace(/\\/g,"/"):e.filename||t&&(t.name||t.path)?a=pf.basename(e.filename||t&&(t.name||t.path)):t&&t.readable&&or(t,"httpVersion")&&(a=pf.basename(t.client._httpMessage.path||"")),a)return'filename="'+a+'"'};ye.prototype._getContentType=function(t,e){var a=e.contentType;return!a&&t&&t.name&&(a=lf.lookup(t.name)),!a&&t&&t.path&&(a=lf.lookup(t.path)),!a&&t&&t.readable&&or(t,"httpVersion")&&(a=t.headers["content-type"]),!a&&(e.filepath||e.filename)&&(a=lf.lookup(e.filepath||e.filename)),!a&&t&&typeof t=="object"&&(a=ye.DEFAULT_CONTENT_TYPE),a};ye.prototype._multiPartFooter=function(){return function(t){var e=ye.LINE_BREAK,a=this._streams.length===0;a&&(e+=this._lastBoundary()),t(e)}.bind(this)};ye.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+ye.LINE_BREAK};ye.prototype.getHeaders=function(t){var e,a={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(e in t)or(t,e)&&(a[e.toLowerCase()]=t[e]);return a};ye.prototype.setBoundary=function(t){if(typeof t!="string")throw new TypeError("FormData boundary must be a string");this._boundary=t};ye.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};ye.prototype.getBuffer=function(){for(var t=new Buffer.alloc(0),e=this.getBoundary(),a=0,i=this._streams.length;a<i;a++)typeof this._streams[a]!="function"&&(Buffer.isBuffer(this._streams[a])?t=Buffer.concat([t,this._streams[a]]):t=Buffer.concat([t,Buffer.from(this._streams[a])]),(typeof this._streams[a]!="string"||this._streams[a].substring(2,e.length+2)!==e)&&(t=Buffer.concat([t,Buffer.from(ye.LINE_BREAK)])));return Buffer.concat([t,Buffer.from(this._lastBoundary())])};ye.prototype._generateBoundary=function(){this._boundary="--------------------------"+YD.randomBytes(12).toString("hex")};ye.prototype.getLengthSync=function(){var t=this._overheadLength+this._valueLength;return this._streams.length&&(t+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),t};ye.prototype.hasKnownLength=function(){var t=!0;return this._valuesToMeasure.length&&(t=!1),t};ye.prototype.getLength=function(t){var e=this._overheadLength+this._valueLength;if(this._streams.length&&(e+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(t.bind(this,null,e));return}QD.parallel(this._valuesToMeasure,this._lengthRetriever,function(a,i){if(a){t(a);return}i.forEach(function(r){e+=r}),t(null,e)})};ye.prototype.submit=function(t,e){var a,i,r={method:"post"};return typeof t=="string"?(t=WD(t),i=df({port:t.port,path:t.pathname,host:t.hostname,protocol:t.protocol},r)):(i=df(t,r),i.port||(i.port=i.protocol==="https:"?443:80)),i.headers=this.getHeaders(t.headers),i.protocol==="https:"?a=GD.request(i):a=$D.request(i),this.getLength(function(n,s){if(n&&n!=="Unknown stream"){this._error(n);return}if(s&&a.setHeader("Content-Length",s),this.pipe(a),e){var p,l=o(function(d,c){return a.removeListener("error",l),a.removeListener("response",p),e.call(this,d,c)},"callback");p=l.bind(this,null),a.on("error",l),a.on("response",p)}}.bind(this)),a};ye.prototype._error=function(t){this.error||(this.error=t,this.
Line truncated
|
||||
${$L.sanitize(this)}`}};ma.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";ma.PARSE_ERROR="PARSE_ERROR";var Xa=FM.createClientLogger("core-http");function Ev(t,e){return t?e.httpsAgent:e.httpAgent}o(Ev,"getCachedAgent");var xc=class extends XM.Transform{static{o(this,"ReportTransform")}constructor(e){super(),this.progressCallback=e,this.loadedBytes=0}_transform(e,a,i){this.push(e),this.loadedBytes+=e.length,this.progressCallback({loadedBytes:this.loadedBytes}),i(void 0)}};function mc(t){return t&&typeof t.pipe=="function"}o(mc,"isReadableStream");function Cv(t,e){return new Promise(a=>{t.once("close",()=>{e?.abort(),a()}),t.once("end",a),t.once("error",a)})}o(Cv,"isStreamComplete");function GL(t){let e=new fr;return t.forEach((a,i)=>{e.set(i,a)}),e}o(GL,"parseHeaders");var wc=class{static{o(this,"NodeFetchHttpClient")}constructor(){this.proxyAgentMap=new Map,this.keepAliveAgents={}}async sendRequest(e){var a;if(!e&&typeof e!="object")throw new Error("'httpRequest' (WebResourceLike) cannot be null or undefined and must be of type object.");let i=new fc.AbortController,r;if(e.abortSignal){if(e.abortSignal.aborted)throw new fc.AbortError("The operation was aborted.");r=o(d=>{d.type==="abort"&&i.abort()},"abortListener"),e.abortSignal.addEventListener("abort",r)}if(e.timeout&&setTimeout(()=>{i.abort()},e.timeout),e.formData){let d=e.formData,c=new QM.default,u=o((f,h)=>{typeof h=="function"&&(h=h()),h&&Object.prototype.hasOwnProperty.call(h,"value")&&Object.prototype.hasOwnProperty.call(h,"options")?c.append(f,h.value,h.options):c.append(f,h)},"appendFormValue");for(let f of Object.keys(d)){let h=d[f];if(Array.isArray(h))for(let b=0;b<h.length;b++)u(f,h[b]);else u(f,h)}e.body=c,e.formData=void 0;let m=e.headers.get("Content-Type");m&&m.indexOf("multipart/form-data")!==-1&&(typeof c.getBoundary=="function"?e.headers.set("Content-Type",`multipart/form-data; boundary=${c.getBoundary()}`):e.headers.remove("Content-Type"))}let n=e.body?typeof e.body=="function"?e.body():e.body:void 0;if(e.onUploadProgress&&e.body){let d=e.onUploadProgress,c=new xc(d);mc(n)?n.pipe(c):c.end(n),n=c}let s=await this.prepareRequest(e),p=Object.assign({body:n,headers:e.headers.rawHeaders(),method:e.method,signal:i.signal,redirect:"manual"},s),l;try{let d=await this.fetch(e.url,p),c=GL(d.headers),u=((a=e.streamResponseStatusCodes)===null||a===void 0?void 0:a.has(d.status))||e.streamResponseBody;l={headers:c,request:e,status:d.status,readableStreamBody:u?d.body:void 0,bodyAsText:u?void 0:await d.text()};let m=e.onDownloadProgress;if(m){let f=d.body||void 0;if(mc(f)){let h=new xc(m);f.pipe(h),l.readableStreamBody=h}else{let h=parseInt(c.get("Content-Length"))||void 0;h&&m({loadedBytes:h})}}return await this.processRequest(l),l}catch(d){let c=d;throw c.code==="ENOTFOUND"?new ma(c.message,ma.REQUEST_SEND_ERROR,void 0,e):c.type==="aborted"?new fc.AbortError("The operation was aborted."):c}finally{if(e.abortSignal&&r){let d=Promise.resolve();mc(n)&&(d=Cv(n));let c=Promise.resolve();mc(l?.readableStreamBody)&&(c=Cv(l.readableStreamBody,i)),Promise.all([d,c]).then(()=>{var u;(u=e.abortSignal)===null||u===void 0||u.removeEventListener("abort",r)}).catch(u=>{Xa.warning("Error when cleaning up abortListener on httpRequest",u)})}}}getOrCreateAgent(e){var a;let i=xh(e.url);if(e.proxySettings){let{host:r,port:n,username:s,password:p}=e.proxySettings,l=`${r}:${n}:${s}:${p}`,d=(a=this.proxyAgentMap.get(l))!==null&&a!==void 0?a:{},c=Ev(i,d);if(c)return c;let u=UL(e.url,e.proxySettings,e.headers);return c=u.agent,u.isHttps?d.httpsAgent=u.agent:d.httpAgent=u.agent,this.proxyAgentMap.set(l,d),c}else if(e.keepAlive){let r=Ev(i,this.keepAliveAgents);if(r)return r;let n={keepAlive:e.keepAlive};return i?r=this.keepAliveAgents.httpsAgent=new xv.Agent(n):r=this.keepAliveAgents.httpAgent=new bv.Agent(n),r}else return i?xv.globalAgent:bv.globalAgent}async fetch(e,a){return JM.default(e,a)}async prepareRequest(e){let a={};return a.agent=this.getOrCreateAgent(e),a.compress=e.decompressResponse,a}async processRequest(e){}};F.HttpPipelineLogLevel=void 0;(function(t){t[t.OFF=0]="OFF",t[t.ERROR=1]="ERROR",t[t.WARNING=2]="WARNING",t[t.INFO=3]="INFO"})(F.HttpPipelineLogLevel||(F.HttpPipelineLogLevel={}));function WL(t){let{requestOptions:e,tracingOptions:a}=t,r=UM.__rest(t,["requestOptions","tracingOptions"]);return e&&(r=Object.assign(Object.assign({},r),e)),a&&(r.tracingContext=a.tracingContext,r.spanOptions=a?.spanOptions),r}o(WL,"operationOptionsToRequestOptionsBase");var ft=class{static{o(this,"BaseRequestPolicy")}constructor(e,a){this._nextPolicy=e,this._options=a}shouldLog(e){return this._options.shouldLog(e)}log(e,a){this._options.log(e,a)}},Nc=class{static{o(this,"RequestPolicyOptions")}constructor(e){this._logger=e}shouldLog(e){return!!this._logger&&e!==F.HttpPipelineLogLevel.OFF&&e<=this._logger.minimumLogLevel}log(e,a){this._logger&&this.shouldLog(e)&&this._logger.log(e,a)}},Gv={explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:mt,explicitArray:!0,ignore
Line truncated
|
||||
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1},gc=Object.assign({},Gv);gc.explicitArray=!1;var lp=Object.assign({},Gv);lp.explicitArray=!1;lp.renderOpts={pretty:!1};function wh(t,e={}){var a;return lp.rootName=e.rootName,lp.charkey=(a=e.xmlCharKey)!==null&&a!==void 0?a:Li,new Mv.Builder(lp).buildObject(t)}o(wh,"stringifyXML");function Wv(t,e={}){var a;gc.explicitRoot=!!e.includeRoot,gc.charkey=(a=e.xmlCharKey)!==null&&a!==void 0?a:Li;let i=new Mv.Parser(gc);return new Promise((r,n)=>{t?i.parseString(t,(s,p)=>{s?n(s):r(p)}):n(new Error("Document is empty"))})}o(Wv,"parseXML");function $h(t,e){return{create:(a,i)=>new Nh(a,i,t,e)}}o($h,"deserializationPolicy");var Xv=["application/json","text/json"],Kv=["application/xml","application/atom+xml"],XL={expectedContentTypes:{json:Xv,xml:Kv}},Nh=class extends ft{static{o(this,"DeserializationPolicy")}constructor(e,a,i,r={}){var n;super(e,a),this.jsonContentTypes=i&&i.json||Xv,this.xmlContentTypes=i&&i.xml||Kv,this.xmlCharKey=(n=r.xmlCharKey)!==null&&n!==void 0?n:Li}async sendRequest(e){return this._nextPolicy.sendRequest(e).then(a=>Yv(this.jsonContentTypes,this.xmlContentTypes,a,{xmlCharKey:this.xmlCharKey}))}};function KL(t){let e,a=t.request,i=a.operationSpec;if(i){let r=a.operationResponseGetter;r?e=r(i,t):e=i.responses[t.status]}return e}o(KL,"getOperationResponse");function YL(t){let e=t.request.shouldDeserialize,a;return e===void 0?a=!0:typeof e=="boolean"?a=e:a=e(t),a}o(YL,"shouldDeserializeResponse");function Yv(t,e,a,i={}){var r,n,s;let p={rootName:(r=i.rootName)!==null&&r!==void 0?r:"",includeRoot:(n=i.includeRoot)!==null&&n!==void 0?n:!1,xmlCharKey:(s=i.xmlCharKey)!==null&&s!==void 0?s:Li};return ZL(t,e,a,p).then(l=>{if(!YL(l))return l;let d=l.request.operationSpec;if(!d||!d.responses)return l;let c=KL(l),{error:u,shouldReturnResponse:m}=JL(l,d,c);if(u)throw u;if(m)return l;if(c){if(c.bodyMapper){let f=l.parsedBody;d.isXML&&c.bodyMapper.type.name===Zr.Sequence&&(f=typeof f=="object"?f[c.bodyMapper.xmlElementName]:[]);try{l.parsedBody=d.serializer.deserialize(c.bodyMapper,f,"operationRes.parsedBody",i)}catch(h){throw new ma(`Error ${h} occurred in deserializing the responseBody - ${l.bodyAsText}`,void 0,l.status,l.request,l)}}else d.httpMethod==="HEAD"&&(l.parsedBody=a.status>=200&&a.status<300);c.headersMapper&&(l.parsedHeaders=d.serializer.deserialize(c.headersMapper,l.headers.toJson(),"operationRes.parsedHeaders",i))}return l})}o(Yv,"deserializeResponseBody");function QL(t){let e=Object.keys(t.responses);return e.length===0||e.length===1&&e[0]==="default"}o(QL,"isOperationSpecEmpty");function JL(t,e,a){var i;let r=200<=t.status&&t.status<300;if(QL(e)?r:!!a)if(a){if(!a.isError)return{error:null,shouldReturnResponse:!1}}else return{error:null,shouldReturnResponse:!1};let s=a??e.responses.default,l=((i=t.request.streamResponseStatusCodes)===null||i===void 0?void 0:i.has(t.status))||t.request.streamResponseBody?`Unexpected status code: ${t.status}`:t.bodyAsText,d=new ma(l,void 0,t.status,t.request,t);if(!s)throw d;let c=s.bodyMapper,u=s.headersMapper;try{if(t.parsedBody){let m=t.parsedBody,f;if(c){let b=m;e.isXML&&c.type.name===Zr.Sequence&&(b=typeof m=="object"?m[c.xmlElementName]:[]),f=e.serializer.deserialize(c,b,"error.response.parsedBody")}let h=m.error||f||m;d.code=h.code,h.message&&(d.message=h.message),c&&(d.response.parsedBody=f)}t.headers&&u&&(d.response.parsedHeaders=e.serializer.deserialize(u,t.headers.toJson(),"operationRes.parsedHeaders"))}catch(m){d.message=`Error "${m.message}" occurred in deserializing the responseBody - "${t.bodyAsText}" for the default response.`}return{error:d,shouldReturnResponse:!1}}o(JL,"handleErrorResponse");function ZL(t,e,a,i){var r;let n=o(p=>{let l=`Error "${p}" occurred while parsing the response body - ${a.bodyAsText}.`,d=p.code||ma.PARSE_ERROR,c=new ma(l,d,a.status,a.request,a);return Promise.reject(c)},"errorHandler");if(!(((r=a.request.streamResponseStatusCodes)===null||r===void 0?void 0:r.has(a.status))||a.request.streamResponseBody)&&a.bodyAsText){let p=a.bodyAsText,l=a.headers.get("Content-Type")||"",d=l?l.split(";").map(c=>c.toLowerCase()):[];if(d.length===0||d.some(c=>t.indexOf(c)!==-1))return new Promise(c=>{a.parsedBody=JSON.parse(p),c(a)}).catch(n);if(d.some(c=>e.indexOf(c)!==-1))return Wv(p,i).then(c=>(a.parsedBody=c,a)).catch(n)}return Promise.resolve(a)}o(ZL,"parse");var Qv={enable:!0};function Jv(t){return{create:(e,a)=>new _h(e,a,t||Qv)}}o(Jv,"keepAlivePolicy");var _h=class extends ft{static{o(this,"KeepAlivePolicy")}constructor(e,a,i){super(e,a),this.keepAliveOptions=i}async sendRequest(e){return e.keepAlive=this.keepAliveOptions.enable,this._nextPolicy.sendRequest(e)}},Tv=["GET","HEAD"],eq={handleRedirects:!0,maxRetries:20};function Gh(t=20){return{create:(e,a)=>new Sh(e,a,t)}}o(Gh,"redirectPolicy");var Sh=class extends ft{static{o(this,"RedirectPolicy")}constructor(e,a,i=20){super(e,a),this.maxRetries=i}sendRequest(e){return this._nextPolicy.sendRequest(e).then(a=>Zv(this,a,0))}};functi
Line truncated
|
||||
`).join(""))}return this._nextPolicy.sendRequest(e)}},nb=[],sb=!1,mq=new Map;function fq(){if(!process)return;let t=hc(Ra.HTTPS_PROXY),e=hc(Ra.ALL_PROXY),a=hc(Ra.HTTP_PROXY);return t||e||a}o(fq,"loadEnvironmentProxyValue");function hq(t,e,a){if(e.length===0)return!1;let i=fi.parse(t).getHost();if(a?.has(i))return a.get(i);let r=!1;for(let n of e)n[0]==="."?(i.endsWith(n)||i.length===n.length-1&&i===n.slice(1))&&(r=!0):i===n&&(r=!0);return a?.set(i,r),r}o(hq,"isBypassed");function gq(){let t=hc(Ra.NO_PROXY);return sb=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}o(gq,"loadNoProxy");function ob(t){if(!t&&(t=fq(),!t))return;let{username:e,password:a,urlWithoutAuth:i}=yq(t),r=fi.parse(i);return{host:(r.getScheme()?r.getScheme()+"://":"")+r.getHost(),port:Number.parseInt(r.getPort()||"80"),username:e,password:a}}o(ob,"getDefaultProxySettings");function e0(t,e){return t||(t=ob()),sb||nb.push(...gq()),{create:(a,i)=>new Dh(a,i,t,e?.customNoProxyList)}}o(e0,"proxyPolicy");function yq(t){let e=t.indexOf("@");if(e===-1)return{urlWithoutAuth:t};let a=t.indexOf("://"),i=a!==-1?a+3:0,r=t.substring(i,e),n=r.indexOf(":"),s=n!==-1,p=s?r.substring(0,n):r,l=s?r.substring(n+1):void 0,d=t.substring(0,i)+t.substring(e+1);return{username:p,password:l,urlWithoutAuth:d}}o(yq,"extractAuthFromUrl");var Dh=class extends ft{static{o(this,"ProxyPolicy")}constructor(e,a,i,r){super(e,a),this.proxySettings=i,this.customNoProxyList=r}sendRequest(e){var a;return!e.proxySettings&&!hq(e.url,(a=this.customNoProxyList)!==null&&a!==void 0?a:nb,this.customNoProxyList?void 0:mq)&&(e.proxySettings=this.proxySettings),this._nextPolicy.sendRequest(e)}};function vq(t=30){return{create:(e,a)=>new Ah(e,a,t)}}o(vq,"rpRegistrationPolicy");var Ah=class extends ft{static{o(this,"RPRegistrationPolicy")}constructor(e,a,i=30){super(e,a),this._retryTimeout=i}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then(a=>bq(this,e,a))}};function bq(t,e,a){if(a.status===409){let i=xq(a.bodyAsText);if(i){let r=wq(e.url);return Nq(t,r,i,e).catch(()=>!1).then(n=>n?(e.headers.set("x-ms-client-request-id",Ec()),t._nextPolicy.sendRequest(e.clone())):a)}}return Promise.resolve(a)}o(bq,"registerIfNeeded");function pb(t,e=!1){let a=t.clone();return e&&(a.url=t.url),a.headers.set("x-ms-client-request-id",Ec()),a.headers.set("Content-Type","application/json; charset=utf-8"),a}o(pb,"getRequestEssentials");function xq(t){let e,a;if(t){try{a=JSON.parse(t)}catch{}if(a&&a.error&&a.error.message&&a.error.code&&a.error.code==="MissingSubscriptionRegistration"){let i=a.error.message.match(/.*'(.*)'/i);i&&(e=i.pop())}}return e}o(xq,"checkRPNotRegisteredError");function wq(t){let e,a=t.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(a&&a[0])e=a[0];else throw new Error(`Unable to extract subscriptionId from the given url - ${t}.`);return e}o(wq,"extractSubscriptionUrl");async function Nq(t,e,a,i){let r=`${e}providers/${a}/register?api-version=2016-02-01`,n=`${e}providers/${a}?api-version=2016-02-01`,s=pb(i);if(s.method="POST",s.url=r,(await t._nextPolicy.sendRequest(s)).status!==200)throw new Error(`Autoregistration of ${a} failed. Please try registering manually.`);return lb(t,n,i)}o(Nq,"registerRP");async function lb(t,e,a){let i=pb(a);i.url=e,i.method="GET";let r=await t._nextPolicy.sendRequest(i),n=r.parsedBody;return r.parsedBody&&n.registrationState&&n.registrationState==="Registered"?!0:(await mi.delay(t._retryTimeout*1e3),lb(t,e,a))}o(lb,"getRegistrationStatus");function db(t){return{create:(e,a)=>new Bh(e,a,t)}}o(db,"signingPolicy");var Bh=class extends ft{static{o(this,"SigningPolicy")}constructor(e,a,i){super(e,a),this.authenticationProvider=i}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then(a=>this._nextPolicy.sendRequest(a))}};function t0(t,e,a,i){return{create:(r,n)=>new Mh(r,n,t,e,a,i)}}o(t0,"systemErrorRetryPolicy");var Mh=class extends ft{static{o(this,"SystemErrorRetryPolicy")}constructor(e,a,i,r,n,s){super(e,a),this.retryCount=Jr(i)?i:Wh,this.retryInterval=Jr(r)?r:Xh,this.minRetryInterval=Jr(n)?n:tq,this.maxRetryInterval=Jr(s)?s:Kh}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch(a=>cb(this,e,a.response,a))}};async function cb(t,e,a,i,r){r=tb(t,r,i);function n(s,p){return!!(p&&p.code&&(p.code==="ETIMEDOUT"||p.code==="ESOCKETTIMEDOUT"||p.code==="ECONNREFUSED"||p.code==="ECONNRESET"||p.code==="ENOENT"))}if(o(n,"shouldPolicyRetry"),eb(t.retryCount,n,r,a,i))try{return await mi.delay(r.retryInterval),t._nextPolicy.sendRequest(e.clone())}catch(s){return cb(t,e,a,s,r)}else return i?Promise.reject(r.error):a}o(cb,"retry");var _q=3,Ov=Ra.HttpConstants.StatusCodes;function a0(){return{create:(t,e)=>new Lh(t,e)}}o(a0,"throttlingRetryPolicy");var Rv="The operation was aborted.",Lh=class t extends ft{static{o(this,"ThrottlingRetryPolicy")}constructor(e,a,i){super(e,a),this.numberOfRetries=0,this._handleResponse=i||this._defaultResponseHandler}async sendRequest(e){let a=await this.
Line truncated
|
||||
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1},gc=Object.assign({},Gv);gc.explicitArray=!1;var lp=Object.assign({},Gv);lp.explicitArray=!1;lp.renderOpts={pretty:!1};function wh(t,e={}){var a;return lp.rootName=e.rootName,lp.charkey=(a=e.xmlCharKey)!==null&&a!==void 0?a:Li,new Mv.Builder(lp).buildObject(t)}o(wh,"stringifyXML");function Wv(t,e={}){var a;gc.explicitRoot=!!e.includeRoot,gc.charkey=(a=e.xmlCharKey)!==null&&a!==void 0?a:Li;let i=new Mv.Parser(gc);return new Promise((r,n)=>{t?i.parseString(t,(s,p)=>{s?n(s):r(p)}):n(new Error("Document is empty"))})}o(Wv,"parseXML");function $h(t,e){return{create:(a,i)=>new Nh(a,i,t,e)}}o($h,"deserializationPolicy");var Xv=["application/json","text/json"],Kv=["application/xml","application/atom+xml"],XL={expectedContentTypes:{json:Xv,xml:Kv}},Nh=class extends ft{static{o(this,"DeserializationPolicy")}constructor(e,a,i,r={}){var n;super(e,a),this.jsonContentTypes=i&&i.json||Xv,this.xmlContentTypes=i&&i.xml||Kv,this.xmlCharKey=(n=r.xmlCharKey)!==null&&n!==void 0?n:Li}async sendRequest(e){return this._nextPolicy.sendRequest(e).then(a=>Yv(this.jsonContentTypes,this.xmlContentTypes,a,{xmlCharKey:this.xmlCharKey}))}};function KL(t){let e,a=t.request,i=a.operationSpec;if(i){let r=a.operationResponseGetter;r?e=r(i,t):e=i.responses[t.status]}return e}o(KL,"getOperationResponse");function YL(t){let e=t.request.shouldDeserialize,a;return e===void 0?a=!0:typeof e=="boolean"?a=e:a=e(t),a}o(YL,"shouldDeserializeResponse");function Yv(t,e,a,i={}){var r,n,s;let p={rootName:(r=i.rootName)!==null&&r!==void 0?r:"",includeRoot:(n=i.includeRoot)!==null&&n!==void 0?n:!1,xmlCharKey:(s=i.xmlCharKey)!==null&&s!==void 0?s:Li};return ZL(t,e,a,p).then(l=>{if(!YL(l))return l;let d=l.request.operationSpec;if(!d||!d.responses)return l;let c=KL(l),{error:u,shouldReturnResponse:m}=JL(l,d,c);if(u)throw u;if(m)return l;if(c){if(c.bodyMapper){let f=l.parsedBody;d.isXML&&c.bodyMapper.type.name===en.Sequence&&(f=typeof f=="object"?f[c.bodyMapper.xmlElementName]:[]);try{l.parsedBody=d.serializer.deserialize(c.bodyMapper,f,"operationRes.parsedBody",i)}catch(h){throw new ma(`Error ${h} occurred in deserializing the responseBody - ${l.bodyAsText}`,void 0,l.status,l.request,l)}}else d.httpMethod==="HEAD"&&(l.parsedBody=a.status>=200&&a.status<300);c.headersMapper&&(l.parsedHeaders=d.serializer.deserialize(c.headersMapper,l.headers.toJson(),"operationRes.parsedHeaders",i))}return l})}o(Yv,"deserializeResponseBody");function QL(t){let e=Object.keys(t.responses);return e.length===0||e.length===1&&e[0]==="default"}o(QL,"isOperationSpecEmpty");function JL(t,e,a){var i;let r=200<=t.status&&t.status<300;if(QL(e)?r:!!a)if(a){if(!a.isError)return{error:null,shouldReturnResponse:!1}}else return{error:null,shouldReturnResponse:!1};let s=a??e.responses.default,l=((i=t.request.streamResponseStatusCodes)===null||i===void 0?void 0:i.has(t.status))||t.request.streamResponseBody?`Unexpected status code: ${t.status}`:t.bodyAsText,d=new ma(l,void 0,t.status,t.request,t);if(!s)throw d;let c=s.bodyMapper,u=s.headersMapper;try{if(t.parsedBody){let m=t.parsedBody,f;if(c){let b=m;e.isXML&&c.type.name===en.Sequence&&(b=typeof m=="object"?m[c.xmlElementName]:[]),f=e.serializer.deserialize(c,b,"error.response.parsedBody")}let h=m.error||f||m;d.code=h.code,h.message&&(d.message=h.message),c&&(d.response.parsedBody=f)}t.headers&&u&&(d.response.parsedHeaders=e.serializer.deserialize(u,t.headers.toJson(),"operationRes.parsedHeaders"))}catch(m){d.message=`Error "${m.message}" occurred in deserializing the responseBody - "${t.bodyAsText}" for the default response.`}return{error:d,shouldReturnResponse:!1}}o(JL,"handleErrorResponse");function ZL(t,e,a,i){var r;let n=o(p=>{let l=`Error "${p}" occurred while parsing the response body - ${a.bodyAsText}.`,d=p.code||ma.PARSE_ERROR,c=new ma(l,d,a.status,a.request,a);return Promise.reject(c)},"errorHandler");if(!(((r=a.request.streamResponseStatusCodes)===null||r===void 0?void 0:r.has(a.status))||a.request.streamResponseBody)&&a.bodyAsText){let p=a.bodyAsText,l=a.headers.get("Content-Type")||"",d=l?l.split(";").map(c=>c.toLowerCase()):[];if(d.length===0||d.some(c=>t.indexOf(c)!==-1))return new Promise(c=>{a.parsedBody=JSON.parse(p),c(a)}).catch(n);if(d.some(c=>e.indexOf(c)!==-1))return Wv(p,i).then(c=>(a.parsedBody=c,a)).catch(n)}return Promise.resolve(a)}o(ZL,"parse");var Qv={enable:!0};function Jv(t){return{create:(e,a)=>new _h(e,a,t||Qv)}}o(Jv,"keepAlivePolicy");var _h=class extends ft{static{o(this,"KeepAlivePolicy")}constructor(e,a,i){super(e,a),this.keepAliveOptions=i}async sendRequest(e){return e.keepAlive=this.keepAliveOptions.enable,this._nextPolicy.sendRequest(e)}},Tv=["GET","HEAD"],eq={handleRedirects:!0,maxRetries:20};function Gh(t=20){return{create:(e,a)=>new Sh(e,a,t)}}o(Gh,"redirectPolicy");var Sh=class extends ft{static{o(this,"RedirectPolicy")}constructor(e,a,i=20){super(e,a),this.maxRetries=i}sendRequest(e){return this._nextPolicy.sendRequest(e).then(a=>Zv(this,a,0))}};functi
Line truncated
|
||||
`).join(""))}return this._nextPolicy.sendRequest(e)}},nb=[],sb=!1,mq=new Map;function fq(){if(!process)return;let t=hc(Ra.HTTPS_PROXY),e=hc(Ra.ALL_PROXY),a=hc(Ra.HTTP_PROXY);return t||e||a}o(fq,"loadEnvironmentProxyValue");function hq(t,e,a){if(e.length===0)return!1;let i=fi.parse(t).getHost();if(a?.has(i))return a.get(i);let r=!1;for(let n of e)n[0]==="."?(i.endsWith(n)||i.length===n.length-1&&i===n.slice(1))&&(r=!0):i===n&&(r=!0);return a?.set(i,r),r}o(hq,"isBypassed");function gq(){let t=hc(Ra.NO_PROXY);return sb=!0,t?t.split(",").map(e=>e.trim()).filter(e=>e.length):[]}o(gq,"loadNoProxy");function ob(t){if(!t&&(t=fq(),!t))return;let{username:e,password:a,urlWithoutAuth:i}=yq(t),r=fi.parse(i);return{host:(r.getScheme()?r.getScheme()+"://":"")+r.getHost(),port:Number.parseInt(r.getPort()||"80"),username:e,password:a}}o(ob,"getDefaultProxySettings");function e0(t,e){return t||(t=ob()),sb||nb.push(...gq()),{create:(a,i)=>new Dh(a,i,t,e?.customNoProxyList)}}o(e0,"proxyPolicy");function yq(t){let e=t.indexOf("@");if(e===-1)return{urlWithoutAuth:t};let a=t.indexOf("://"),i=a!==-1?a+3:0,r=t.substring(i,e),n=r.indexOf(":"),s=n!==-1,p=s?r.substring(0,n):r,l=s?r.substring(n+1):void 0,d=t.substring(0,i)+t.substring(e+1);return{username:p,password:l,urlWithoutAuth:d}}o(yq,"extractAuthFromUrl");var Dh=class extends ft{static{o(this,"ProxyPolicy")}constructor(e,a,i,r){super(e,a),this.proxySettings=i,this.customNoProxyList=r}sendRequest(e){var a;return!e.proxySettings&&!hq(e.url,(a=this.customNoProxyList)!==null&&a!==void 0?a:nb,this.customNoProxyList?void 0:mq)&&(e.proxySettings=this.proxySettings),this._nextPolicy.sendRequest(e)}};function vq(t=30){return{create:(e,a)=>new Ah(e,a,t)}}o(vq,"rpRegistrationPolicy");var Ah=class extends ft{static{o(this,"RPRegistrationPolicy")}constructor(e,a,i=30){super(e,a),this._retryTimeout=i}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).then(a=>bq(this,e,a))}};function bq(t,e,a){if(a.status===409){let i=xq(a.bodyAsText);if(i){let r=wq(e.url);return Nq(t,r,i,e).catch(()=>!1).then(n=>n?(e.headers.set("x-ms-client-request-id",Ec()),t._nextPolicy.sendRequest(e.clone())):a)}}return Promise.resolve(a)}o(bq,"registerIfNeeded");function pb(t,e=!1){let a=t.clone();return e&&(a.url=t.url),a.headers.set("x-ms-client-request-id",Ec()),a.headers.set("Content-Type","application/json; charset=utf-8"),a}o(pb,"getRequestEssentials");function xq(t){let e,a;if(t){try{a=JSON.parse(t)}catch{}if(a&&a.error&&a.error.message&&a.error.code&&a.error.code==="MissingSubscriptionRegistration"){let i=a.error.message.match(/.*'(.*)'/i);i&&(e=i.pop())}}return e}o(xq,"checkRPNotRegisteredError");function wq(t){let e,a=t.match(/.*\/subscriptions\/[a-f0-9-]+\//gi);if(a&&a[0])e=a[0];else throw new Error(`Unable to extract subscriptionId from the given url - ${t}.`);return e}o(wq,"extractSubscriptionUrl");async function Nq(t,e,a,i){let r=`${e}providers/${a}/register?api-version=2016-02-01`,n=`${e}providers/${a}?api-version=2016-02-01`,s=pb(i);if(s.method="POST",s.url=r,(await t._nextPolicy.sendRequest(s)).status!==200)throw new Error(`Autoregistration of ${a} failed. Please try registering manually.`);return lb(t,n,i)}o(Nq,"registerRP");async function lb(t,e,a){let i=pb(a);i.url=e,i.method="GET";let r=await t._nextPolicy.sendRequest(i),n=r.parsedBody;return r.parsedBody&&n.registrationState&&n.registrationState==="Registered"?!0:(await mi.delay(t._retryTimeout*1e3),lb(t,e,a))}o(lb,"getRegistrationStatus");function db(t){return{create:(e,a)=>new Bh(e,a,t)}}o(db,"signingPolicy");var Bh=class extends ft{static{o(this,"SigningPolicy")}constructor(e,a,i){super(e,a),this.authenticationProvider=i}signRequest(e){return this.authenticationProvider.signRequest(e)}sendRequest(e){return this.signRequest(e).then(a=>this._nextPolicy.sendRequest(a))}};function t0(t,e,a,i){return{create:(r,n)=>new Mh(r,n,t,e,a,i)}}o(t0,"systemErrorRetryPolicy");var Mh=class extends ft{static{o(this,"SystemErrorRetryPolicy")}constructor(e,a,i,r,n,s){super(e,a),this.retryCount=Zr(i)?i:Wh,this.retryInterval=Zr(r)?r:Xh,this.minRetryInterval=Zr(n)?n:tq,this.maxRetryInterval=Zr(s)?s:Kh}sendRequest(e){return this._nextPolicy.sendRequest(e.clone()).catch(a=>cb(this,e,a.response,a))}};async function cb(t,e,a,i,r){r=tb(t,r,i);function n(s,p){return!!(p&&p.code&&(p.code==="ETIMEDOUT"||p.code==="ESOCKETTIMEDOUT"||p.code==="ECONNREFUSED"||p.code==="ECONNRESET"||p.code==="ENOENT"))}if(o(n,"shouldPolicyRetry"),eb(t.retryCount,n,r,a,i))try{return await mi.delay(r.retryInterval),t._nextPolicy.sendRequest(e.clone())}catch(s){return cb(t,e,a,s,r)}else return i?Promise.reject(r.error):a}o(cb,"retry");var _q=3,Ov=Ra.HttpConstants.StatusCodes;function a0(){return{create:(t,e)=>new Lh(t,e)}}o(a0,"throttlingRetryPolicy");var Rv="The operation was aborted.",Lh=class t extends ft{static{o(this,"ThrottlingRetryPolicy")}constructor(e,a,i){super(e,a),this.numberOfRetries=0,this._handleResponse=i||this._defaultResponseHandler}async sendRequest(e){let a=await this.
Line truncated
|
||||
Polling from: ${a.config.operationLocation}
|
||||
Operation status: ${c}
|
||||
Polling status: ${xb.includes(c)?"Stopped":"Running"}`),c==="succeeded"){let u=s(d,a);if(u!==void 0)return{response:await e(u).catch(vb({state:a,stateProxy:i,isOperationError:p})),status:c}}return{response:d,status:c}}o(kq,"pollOperationHelper");async function Sb(t){let{poll:e,state:a,stateProxy:i,options:r,getOperationStatus:n,getResourceLocation:s,getOperationLocation:p,isOperationError:l,withOperationLocation:d,getPollingInterval:c,processResult:u,getError:m,updateState:f,setDelay:h,isDone:b,setErrorAsResult:E}=t,{operationLocation:C}=a.config;if(C!==void 0){let{response:I,status:w}=await kq({poll:e,getOperationStatus:n,state:a,stateProxy:i,operationLocation:C,getResourceLocation:s,isOperationError:l,options:r});if(Nb({status:w,response:I,state:a,stateProxy:i,isDone:b,processResult:u,getError:m,setErrorAsResult:E}),!xb.includes(w)){let y=c?.(I);y&&h(y);let g=p?.(I,a);if(g!==void 0){let S=C!==g;a.config.operationLocation=g,d?.(g,S)}else d?.(C,!1)}f?.(a,I)}}o(Sb,"pollOperation");function Eb(t){let{azureAsyncOperation:e,operationLocation:a}=t;return a??e}o(Eb,"getOperationLocationPollingUrl");function Cb(t){return t.headers.location}o(Cb,"getLocationHeader");function Tb(t){return t.headers["operation-location"]}o(Tb,"getOperationLocationHeader");function Ob(t){return t.headers["azure-asyncoperation"]}o(Ob,"getAzureAsyncOperationHeader");function Uq(t){var e;let{location:a,requestMethod:i,requestPath:r,resourceLocationConfig:n}=t;switch(i){case"PUT":return r;case"DELETE":return;case"PATCH":return(e=s())!==null&&e!==void 0?e:r;default:return s()}function s(){switch(n){case"azure-async-operation":return;case"original-uri":return r;case"location":default:return a}}o(s,"getDefault")}o(Uq,"findResourceLocation");function Rb(t){let{rawResponse:e,requestMethod:a,requestPath:i,resourceLocationConfig:r}=t,n=Tb(e),s=Ob(e),p=Eb({operationLocation:n,azureAsyncOperation:s}),l=Cb(e),d=a?.toLocaleUpperCase();return p!==void 0?{mode:"OperationLocation",operationLocation:p,resourceLocation:Uq({requestMethod:d,location:l,requestPath:i,resourceLocationConfig:r})}:l!==void 0?{mode:"ResourceLocation",operationLocation:l}:d==="PUT"&&i?{mode:"Body",operationLocation:i}:void 0}o(Rb,"inferLroMode");function Pb(t){let{status:e,statusCode:a}=t;if(typeof e!="string"&&e!==void 0)throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${e}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);switch(e?.toLocaleLowerCase()){case void 0:return s0(a);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:return tn.verbose(`LRO: unrecognized operation status: ${e}`),e}}o(Pb,"transformStatus");function Hq(t){var e;let{status:a}=(e=t.body)!==null&&e!==void 0?e:{};return Pb({status:a,statusCode:t.statusCode})}o(Hq,"getStatus");function Fq(t){var e,a;let{properties:i,provisioningState:r}=(e=t.body)!==null&&e!==void 0?e:{},n=(a=i?.provisioningState)!==null&&a!==void 0?a:r;return Pb({status:n,statusCode:t.statusCode})}o(Fq,"getProvisioningState");function s0(t){return t===202?"running":t<300?"succeeded":"failed"}o(s0,"toOperationStatus");function Ib({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let a=parseInt(e);return isNaN(a)?Vq(new Date(e)):a*1e3}}o(Ib,"parseRetryAfter");function Db(t){let e=t.flatResponse.error;if(!e){tn.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){tn.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}o(Db,"getErrorFromResponse");function Vq(t){let e=Math.floor(new Date().getTime()),a=t.getTime();if(e<a)return a-e}o(Vq,"calculatePollingIntervalFromDate");function Ab(t){let{response:e,state:a,operationLocation:i}=t;function r(){var s;switch((s=a.config.metadata)===null||s===void 0?void 0:s.mode){case void 0:return s0(e.rawResponse.statusCode);case"Body":return o0(e,a);default:return"running"}}o(r,"helper");let n=r();return n==="running"&&i===void 0?"succeeded":n}o(Ab,"getStatusFromInitialResponse");async function $q(t){let{stateProxy:e,resourceLocationConfig:a,processResult:i,lro:r,setErrorAsResult:n}=t;return _b({init:async()=>{let s=await r.sendInitialRequest(),p=Rb({rawResponse:s.rawResponse,requestPath:r.requestPath,requestMethod:r.requestMethod,resourceLocationConfig:a});return Object.assign({response:s,operationLocation:p?.operationLocation,resourceLocation:p?.resourceLocation},p?.mode?{metadata:{mode:p.mode}}:{})},stateProxy:e,processResult:i?({flatResponse:s},p)=>i(s,p):({flatResponse:s})=>s,getOperationStatus:Ab,setErrorAsResult:n})}o($q,"initHttpOperation");function Bb({rawResponse:t},e){var a;switch((a=e.config.metadata)===null||a===void 0?vLine truncated
|
||||
`,v_="HTTP/1.1",Wk="AES256",Xk="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",Kk=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-if-tags","x-ms-source-if-tags"],Yk=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"],Qk="BlobUsesCustomerSpecifiedEncryption",Jk="BlobDoesNotUseCustomerSpecifiedEncryption",Zk=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function eU(t){let e=q.URLBuilder.parse(t),a=e.getPath();return a=a||"/",a=aU(a),e.setPath(a),e.toString()}o(eU,"escapeURLPath");function tU(t){let e="";if(t.search("DevelopmentStorageProxyUri=")!==-1){let a=t.split(";");for(let i of a)i.trim().startsWith("DevelopmentStorageProxyUri=")&&(e=i.trim().match("DevelopmentStorageProxyUri=(.*)")[1])}return e}o(tU,"getProxyUriFromDevConnString");function ls(t,e){let a=t.split(";");for(let i of a)if(i.trim().startsWith(e))return i.trim().match(e+"=(.*)")[1];return""}o(ls,"getValueInConnString");function Rs(t){let e="";t.startsWith("UseDevelopmentStorage=true")&&(e=tU(t),t=Xk);let a=ls(t,"BlobEndpoint");if(a=a.endsWith("/")?a.slice(0,-1):a,t.search("DefaultEndpointsProtocol=")!==-1&&t.search("AccountKey=")!==-1){let i="",r="",n=Buffer.from("accountKey","base64"),s="";if(r=ls(t,"AccountName"),n=Buffer.from(ls(t,"AccountKey"),"base64"),!a){i=ls(t,"DefaultEndpointsProtocol");let p=i.toLowerCase();if(p!=="https"&&p!=="http")throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'");if(s=ls(t,"EndpointSuffix"),!s)throw new Error("Invalid EndpointSuffix in the provided Connection String");a=`${i}://${r}.blob.${s}`}if(r){if(n.length===0)throw new Error("Invalid AccountKey in the provided Connection String")}else throw new Error("Invalid AccountName in the provided Connection String");return{kind:"AccountConnString",url:a,accountName:r,accountKey:n,proxyUri:e}}else{let i=ls(t,"SharedAccessSignature"),r=x_(a);if(a){if(!i)throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String")}else throw new Error("Invalid BlobEndpoint in the provided SAS Connection String");return{kind:"SASConnString",url:a,accountName:r,accountSas:i}}}o(Rs,"extractConnectionStringParts");function aU(t){return encodeURIComponent(t).replace(/%2F/g,"/").replace(/'/g,"%27").replace(/\+/g,"%20").replace(/%25/g,"%")}o(aU,"escape");function Fe(t,e){let a=q.URLBuilder.parse(t),i=a.getPath();return i=i?i.endsWith("/")?`${i}${e}`:`${i}/${e}`:e,a.setPath(i),new URL(a.toString()).toString()}o(Fe,"appendToURLPath");function pn(t,e
Line truncated
|
||||
Polling status: ${xb.includes(c)?"Stopped":"Running"}`),c==="succeeded"){let u=s(d,a);if(u!==void 0)return{response:await e(u).catch(vb({state:a,stateProxy:i,isOperationError:p})),status:c}}return{response:d,status:c}}o(kq,"pollOperationHelper");async function Sb(t){let{poll:e,state:a,stateProxy:i,options:r,getOperationStatus:n,getResourceLocation:s,getOperationLocation:p,isOperationError:l,withOperationLocation:d,getPollingInterval:c,processResult:u,getError:m,updateState:f,setDelay:h,isDone:b,setErrorAsResult:E}=t,{operationLocation:C}=a.config;if(C!==void 0){let{response:I,status:w}=await kq({poll:e,getOperationStatus:n,state:a,stateProxy:i,operationLocation:C,getResourceLocation:s,isOperationError:l,options:r});if(Nb({status:w,response:I,state:a,stateProxy:i,isDone:b,processResult:u,getError:m,setErrorAsResult:E}),!xb.includes(w)){let y=c?.(I);y&&h(y);let g=p?.(I,a);if(g!==void 0){let S=C!==g;a.config.operationLocation=g,d?.(g,S)}else d?.(C,!1)}f?.(a,I)}}o(Sb,"pollOperation");function Eb(t){let{azureAsyncOperation:e,operationLocation:a}=t;return a??e}o(Eb,"getOperationLocationPollingUrl");function Cb(t){return t.headers.location}o(Cb,"getLocationHeader");function Tb(t){return t.headers["operation-location"]}o(Tb,"getOperationLocationHeader");function Ob(t){return t.headers["azure-asyncoperation"]}o(Ob,"getAzureAsyncOperationHeader");function Uq(t){var e;let{location:a,requestMethod:i,requestPath:r,resourceLocationConfig:n}=t;switch(i){case"PUT":return r;case"DELETE":return;case"PATCH":return(e=s())!==null&&e!==void 0?e:r;default:return s()}function s(){switch(n){case"azure-async-operation":return;case"original-uri":return r;case"location":default:return a}}o(s,"getDefault")}o(Uq,"findResourceLocation");function Rb(t){let{rawResponse:e,requestMethod:a,requestPath:i,resourceLocationConfig:r}=t,n=Tb(e),s=Ob(e),p=Eb({operationLocation:n,azureAsyncOperation:s}),l=Cb(e),d=a?.toLocaleUpperCase();return p!==void 0?{mode:"OperationLocation",operationLocation:p,resourceLocation:Uq({requestMethod:d,location:l,requestPath:i,resourceLocationConfig:r})}:l!==void 0?{mode:"ResourceLocation",operationLocation:l}:d==="PUT"&&i?{mode:"Body",operationLocation:i}:void 0}o(Rb,"inferLroMode");function Pb(t){let{status:e,statusCode:a}=t;if(typeof e!="string"&&e!==void 0)throw new Error(`Polling was unsuccessful. Expected status to have a string value or no value but it has instead: ${e}. This doesn't necessarily indicate the operation has failed. Check your Azure subscription or resource status for more information.`);switch(e?.toLocaleLowerCase()){case void 0:return s0(a);case"succeeded":return"succeeded";case"failed":return"failed";case"running":case"accepted":case"started":case"canceling":case"cancelling":return"running";case"canceled":case"cancelled":return"canceled";default:return an.verbose(`LRO: unrecognized operation status: ${e}`),e}}o(Pb,"transformStatus");function Hq(t){var e;let{status:a}=(e=t.body)!==null&&e!==void 0?e:{};return Pb({status:a,statusCode:t.statusCode})}o(Hq,"getStatus");function Fq(t){var e,a;let{properties:i,provisioningState:r}=(e=t.body)!==null&&e!==void 0?e:{},n=(a=i?.provisioningState)!==null&&a!==void 0?a:r;return Pb({status:n,statusCode:t.statusCode})}o(Fq,"getProvisioningState");function s0(t){return t===202?"running":t<300?"succeeded":"failed"}o(s0,"toOperationStatus");function Ib({rawResponse:t}){let e=t.headers["retry-after"];if(e!==void 0){let a=parseInt(e);return isNaN(a)?Vq(new Date(e)):a*1e3}}o(Ib,"parseRetryAfter");function Db(t){let e=t.flatResponse.error;if(!e){an.warning("The long-running operation failed but there is no error property in the response's body");return}if(!e.code||!e.message){an.warning("The long-running operation failed but the error property in the response's body doesn't contain code or message");return}return e}o(Db,"getErrorFromResponse");function Vq(t){let e=Math.floor(new Date().getTime()),a=t.getTime();if(e<a)return a-e}o(Vq,"calculatePollingIntervalFromDate");function Ab(t){let{response:e,state:a,operationLocation:i}=t;function r(){var s;switch((s=a.config.metadata)===null||s===void 0?void 0:s.mode){case void 0:return s0(e.rawResponse.statusCode);case"Body":return o0(e,a);default:return"running"}}o(r,"helper");let n=r();return n==="running"&&i===void 0?"succeeded":n}o(Ab,"getStatusFromInitialResponse");async function $q(t){let{stateProxy:e,resourceLocationConfig:a,processResult:i,lro:r,setErrorAsResult:n}=t;return _b({init:async()=>{let s=await r.sendInitialRequest(),p=Rb({rawResponse:s.rawResponse,requestPath:r.requestPath,requestMethod:r.requestMethod,resourceLocationConfig:a});return Object.assign({response:s,operationLocation:p?.operationLocation,resourceLocation:p?.resourceLocation},p?.mode?{metadata:{mode:p.mode}}:{})},stateProxy:e,processResult:i?({flatResponse:s},p)=>i(s,p):({flatResponse:s})=>s,getOperationStatus:Ab,setErrorAsResult:n})}o($q,"initHttpOperation");function Bb({rawResponse:t},e){var a;switch((a=e.config.metadata)===null||a===void 0?vLine truncated
|
||||
`,v_="HTTP/1.1",Wk="AES256",Xk="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",Kk=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-if-tags","x-ms-source-if-tags"],Yk=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"],Qk="BlobUsesCustomerSpecifiedEncryption",Jk="BlobDoesNotUseCustomerSpecifiedEncryption",Zk=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"];function eU(t){let e=q.URLBuilder.parse(t),a=e.getPath();return a=a||"/",a=aU(a),e.setPath(a),e.toString()}o(eU,"escapeURLPath");function tU(t){let e="";if(t.search("DevelopmentStorageProxyUri=")!==-1){let a=t.split(";");for(let i of a)i.trim().startsWith("DevelopmentStorageProxyUri=")&&(e=i.trim().match("DevelopmentStorageProxyUri=(.*)")[1])}return e}o(tU,"getProxyUriFromDevConnString");function ds(t,e){let a=t.split(";");for(let i of a)if(i.trim().startsWith(e))return i.trim().match(e+"=(.*)")[1];return""}o(ds,"getValueInConnString");function Ps(t){let e="";t.startsWith("UseDevelopmentStorage=true")&&(e=tU(t),t=Xk);let a=ds(t,"BlobEndpoint");if(a=a.endsWith("/")?a.slice(0,-1):a,t.search("DefaultEndpointsProtocol=")!==-1&&t.search("AccountKey=")!==-1){let i="",r="",n=Buffer.from("accountKey","base64"),s="";if(r=ds(t,"AccountName"),n=Buffer.from(ds(t,"AccountKey"),"base64"),!a){i=ds(t,"DefaultEndpointsProtocol");let p=i.toLowerCase();if(p!=="https"&&p!=="http")throw new Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'");if(s=ds(t,"EndpointSuffix"),!s)throw new Error("Invalid EndpointSuffix in the provided Connection String");a=`${i}://${r}.blob.${s}`}if(r){if(n.length===0)throw new Error("Invalid AccountKey in the provided Connection String")}else throw new Error("Invalid AccountName in the provided Connection String");return{kind:"AccountConnString",url:a,accountName:r,accountKey:n,proxyUri:e}}else{let i=ds(t,"SharedAccessSignature"),r=x_(a);if(a){if(!i)throw new Error("Invalid SharedAccessSignature in the provided SAS Connection String")}else throw new Error("Invalid BlobEndpoint in the provided SAS Connection String");return{kind:"SASConnString",url:a,accountName:r,accountSas:i}}}o(Ps,"extractConnectionStringParts");function aU(t){return encodeURIComponent(t).replace(/%2F/g,"/").replace(/'/g,"%27").replace(/\+/g,"%20").replace(/%25/g,"%")}o(aU,"escape");function Fe(t,e){let a=q.URLBuilder.parse(t),i=a.getPath();return i=i?i.endsWith("/")?`${i}${e}`:`${i}/${e}`:e,a.setPath(i),new URL(a.toString()).toString()}o(Fe,"appendToURLPath");function ln(t,e
Line truncated
|
||||
`)+`
|
||||
`+this.getCanonicalizedHeadersString(e)+this.getCanonicalizedResourceString(e),i=this.factory.computeHMACSHA256(a);return e.headers.set(Me.AUTHORIZATION,`SharedKey ${this.factory.accountName}:${i}`),e}getHeaderValueToSign(e,a){let i=e.headers.get(a);return!i||a===Me.CONTENT_LENGTH&&i==="0"?"":i}getCanonicalizedHeadersString(e){let a=e.headers.headersArray().filter(r=>r.name.toLowerCase().startsWith(Me.PREFIX_FOR_STORAGE));a.sort((r,n)=>r.name.toLowerCase().localeCompare(n.name.toLowerCase())),a=a.filter((r,n,s)=>!(n>0&&r.name.toLowerCase()===s[n-1].name.toLowerCase()));let i="";return a.forEach(r=>{i+=`${r.name.toLowerCase().trimRight()}:${r.value.trimLeft()}
|
||||
`}),i}getCanonicalizedResourceString(e){let a=c2(e.url)||"/",i="";i+=`/${this.factory.accountName}${a}`;let r=sU(e.url),n={};if(r){let s=[];for(let p in r)if(Object.prototype.hasOwnProperty.call(r,p)){let l=p.toLowerCase();n[l]=r[p],s.push(l)}s.sort();for(let p of s)i+=`
|
||||
${p}:${decodeURIComponent(n[p])}`}return i}},Je=class extends bp{static{o(this,"StorageSharedKeyCredential")}constructor(e,a){super(),this.accountName=e,this.accountKey=Buffer.from(a,"base64")}create(e,a){return new Fc(e,a,this)}computeHMACSHA256(e){return Qb.createHmac("sha256",this.accountKey).update(e,"utf8").digest("base64")}},wU="azure-storage-blob",NU="12.15.0",wp=class extends H.ServiceClient{static{o(this,"StorageClientContext")}constructor(e,a){if(e===void 0)throw new Error("'url' cannot be null");if(a||(a={}),!a.userAgent){let i=H.getDefaultUserAgentValue();a.userAgent=`${wU}/${NU} ${i}`}super(void 0,a),this.requestContentType="application/json; charset=utf-8",this.baseUri=a.endpoint||"{url}",this.url=e,this.version=a.version||"2023-01-03"}},Np=class{static{o(this,"StorageClient")}constructor(e,a){this.url=eU(e),this.accountName=x_(e),this.pipeline=a,this.storageClientContext=new wp(this.url,a.toServiceClientOptions()),this.isHttps=b_(rU(this.url)||"","https"),this.credential=new Ie;for(let r of this.pipeline.factories)q.isNode&&r instanceof Je||r instanceof Ie?this.credential=r:q.isTokenCredential(r.credential)&&(this.credential=r.credential);let i=this.storageClientContext;i.requestContentType=void 0}},j=z.createSpanFunction({packagePrefix:"Azure.Storage.Blob",namespace:"Microsoft.Storage"});function X(t){var e,a;return{spanOptions:(e=t?.tracingOptions)===null||e===void 0?void 0:e.spanOptions,tracingContext:(a=t?.tracingOptions)===null||a===void 0?void 0:a.tracingContext}}o(X,"convertTracingToRequestOptionsBase");var ji=class t{static{o(this,"BlobSASPermissions")}constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1}static parse(e){let a=new t;for(let i of e)switch(i){case"r":a.read=!0;break;case"a":a.add=!0;break;case"c":a.create=!0;break;case"w":a.write=!0;break;case"d":a.delete=!0;break;case"x":a.deleteVersion=!0;break;case"t":a.tag=!0;break;case"m":a.move=!0;break;case"e":a.execute=!0;break;case"i":a.setImmutabilityPolicy=!0;break;case"y":a.permanentDelete=!0;break;default:throw new RangeError(`Invalid permission: ${i}`)}return a}static from(e){let a=new t;return e.read&&(a.read=!0),e.add&&(a.add=!0),e.create&&(a.create=!0),e.write&&(a.write=!0),e.delete&&(a.delete=!0),e.deleteVersion&&(a.deleteVersion=!0),e.tag&&(a.tag=!0),e.move&&(a.move=!0),e.execute&&(a.execute=!0),e.setImmutabilityPolicy&&(a.setImmutabilityPolicy=!0),e.permanentDelete&&(a.permanentDelete=!0),a}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),e.join("")}},ki=class t{static{o(this,"ContainerSASPermissions")}constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.list=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1,this.filterByTags=!1}static parse(e){let a=new t;for(let i of e)switch(i){case"r":a.read=!0;break;case"a":a.add=!0;break;case"c":a.create=!0;break;case"w":a.write=!0;break;case"d":a.delete=!0;break;case"l":a.list=!0;break;case"t":a.tag=!0;break;case"x":a.deleteVersion=!0;break;case"m":a.move=!0;break;case"e":a.execute=!0;break;case"i":a.setImmutabilityPolicy=!0;break;case"y":a.permanentDelete=!0;break;case"f":a.filterByTags=!0;break;default:throw new RangeError(`Invalid permission ${i}`)}return a}static from(e){let a=new t;return e.read&&(a.read=!0),e.add&&(a.add=!0),e.create&&(a.create=!0),e.write&&(a.write=!0),e.delete&&(a.delete=!0),e.list&&(a.list=!0),e.deleteVersion&&(a.deleteVersion=!0),e.tag&&(a.tag=!0),e.move&&(a.move=!0),e.execute&&(a.execute=!0),e.setImmutabilityPolicy&&(a.setImmutabilityPolicy=!0),e.permanentDelete&&(a.permanentDelete=!0),e.filterByTags&&(a.filterByTags=!0),a}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.list&&e.push("l"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),this.filterByTags&&e.push("f"),e.join("")}},N0=class{static{o(this,"UserDelegationKeyCredential")}constructor(e,a){this.accountName=e,this.userDelegationKey=a,this.key=Buffer.from(a.value,"base64")}computeHMACSHA256(e){return Qb.createHmac("sha256",this.key).update(e,"utf8").digest("base64")}};function Ui(t){return t.end?`${t.start}-${t.end}`:t.start}o(Ui,"ipRangeToString");Z.SASProtocol=void 0;(function(t){t.Https="https",t.HttpsAndHttp="https,http"})(Z.SASProtocol||(Z.SASProtocol={}));var gi=class{static{o(this,"SASQueryParameters")}constructor(e,a,i,r,n,s,p,l,d,c,u,m,f,h,b
Line truncated
|
||||
`),n=e.computeHMACSHA256(r);return new gi(t.version,n,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType)}o(_U,"generateBlobSASQueryParameters20150405");function SU(t,e){if(t=Is(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=ji.parse(t.permissions.toString()).toString():r=ki.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ce(t.startsOn,!1):"",t.expiresOn?Ce(t.expiresOn,!1):"",Ps(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ui(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new gi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType)}o(SU,"generateBlobSASQueryParameters20181109");function EU(t,e){if(t=Is(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=ji.parse(t.permissions.toString()).toString():r=ki.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ce(t.startsOn,!1):"",t.expiresOn?Ce(t.expiresOn,!1):"",Ps(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ui(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new gi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope)}o(EU,"generateBlobSASQueryParameters20201206");function CU(t,e){if(t=Is(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=ji.parse(t.permissions.toString()).toString():r=ki.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ce(t.startsOn,!1):"",t.expiresOn?Ce(t.expiresOn,!1):"",Ps(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ce(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ce(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Ui(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new gi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey)}o(CU,"generateBlobSASQueryParametersUDK20181109");function TU(t,e){if(t=Is(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=ji.parse(t.permissions.toString()).toString():r=ki.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ce(t.startsOn,!1):"",t.expiresOn?Ce(t.expiresOn,!1):"",Ps(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ce(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ce(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ui(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new gi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId)}o(TU,"generateBlobSASQueryParametersUDK20200210");function OU(t,e){if(t=Is(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=ji.parse(t.permissions.toString()).toString():r=ki.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ce(t.startsOn,!1):"",t.expiresOn?Ce(t.expiresOn,!1):"",Ps(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ce(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ce(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ui(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new gi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope)}o(OU,"generateBlobSASQueryParametersUDK20201206");function Ps(t,e,a){let i=[`/blob/${t}/${e}`];return a&&i.push(`/${a}`),i.join("")}o(Ps,"getCanonicalName");function Is(t){let e=t.version?t.version:l2;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}o(Is,"SASSignatureValuesSanityCheckAndAutofill");var _p=class{static{o(this,"BlobLeaseClient")}constructor(e,a){let i=new wp(e.url,e.pipeline.toServiceClientOptions());this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=new on(i)):(this._isContainer=!1,this._containerOrBlobOperation=new gp(i)),a||(a=q.generateUuid()),this._leaseId=a}get leaseId(){return this._leaseId}get url(){return this._url}async acquireLease(e,a={}){var i,r,n,s,p,l;let{span:d,updatedOptions:c}=j("BlobLeaseClient-acquireLease",a);if(this._isContainer&&(!((i=a.conditions)===null||i===void 0)&&i.ifMatch&&((r=a.conditions)===null||r===void 0?void 0:r.ifMatch)!==hi||!((n=a.conditions)===null||n===void 0)&&n.ifNoneMatch&&((s=a.conditions)===null||s===void 0?void 0:s.ifNoneMatch)!==hi||!((p=a.conditions)===null||p===void 0)&&p.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");try{return await this._containerOrBlobOperation.acquireLease(Object.assign({abortSignal:a.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},a.conditions),{ifTags:(l=a.conditions)===null||l===void 0?void 0:l.tagConditions}),proposedLeaseId:this._leaseId},X(c)))}catch(u){throw d.setStatus({code:z.SpanStatusCode.ERROR,message:u.message}),u}finally{d.end()}}async changeLease(e,a={}){var i,r,n,s,p,l;let{span:d,updatedOptions:c}=j("BlobLeaseClient-changeLease",a);if(this._isContainer&&(!((i=a.conditions)===null||i===void 0)&&i.ifMatch&&((r=a.conditions)===null||r===void 0?void 0:r.ifMatch)!==hi||!((n=a.conditions)===null||n===void 0)&&n.ifNoneMatch&&((s=a.conditions)===null||s===void 0?void 0:s.ifNoneMatch)!==hi||!((p=a.conditions)===null||p===void 0)&&p.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");try{let u=await this._containerOrBlobOperation.changeLease(this._leaseId,e,Object.assign({abortSignal:a.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},a.conditions),{ifTags:(l=a.conditions)===null||l===void 0?void 0:l.tagConditions})},X(c)));return this._leaseId=e,u}catch(u){throw d.setStatus({code:z.SpanStatusCode.ERROR,message:u.message}),u}finally{d.end()}}async releaseLease(e={}){var a,i,r,n,s,p;let{span:l,updatedOptions:d}=j("BlobLeaseClient-releaseLease",e);if(this._isContainer&&(!((a=e.conditions)===null||a===void 0)&&a.ifMatch&&((i=e.conditions)===null||i===void 0?void 0:i.ifMatch)!==hi||!((r=e.conditions)===null||r===void 0)&&r.ifNoneMatch&&((n=e.conditions)===null||n===void 0?void 0:n.ifNoneMatch)!==hi||!((s=e.conditions)===null||s===void 0)&&s.tagCon
Line truncated
|
||||
${p}:${decodeURIComponent(n[p])}`}return i}},Je=class extends bp{static{o(this,"StorageSharedKeyCredential")}constructor(e,a){super(),this.accountName=e,this.accountKey=Buffer.from(a,"base64")}create(e,a){return new Fc(e,a,this)}computeHMACSHA256(e){return Qb.createHmac("sha256",this.accountKey).update(e,"utf8").digest("base64")}},wU="azure-storage-blob",NU="12.15.0",wp=class extends H.ServiceClient{static{o(this,"StorageClientContext")}constructor(e,a){if(e===void 0)throw new Error("'url' cannot be null");if(a||(a={}),!a.userAgent){let i=H.getDefaultUserAgentValue();a.userAgent=`${wU}/${NU} ${i}`}super(void 0,a),this.requestContentType="application/json; charset=utf-8",this.baseUri=a.endpoint||"{url}",this.url=e,this.version=a.version||"2023-01-03"}},Np=class{static{o(this,"StorageClient")}constructor(e,a){this.url=eU(e),this.accountName=x_(e),this.pipeline=a,this.storageClientContext=new wp(this.url,a.toServiceClientOptions()),this.isHttps=b_(rU(this.url)||"","https"),this.credential=new Ie;for(let r of this.pipeline.factories)q.isNode&&r instanceof Je||r instanceof Ie?this.credential=r:q.isTokenCredential(r.credential)&&(this.credential=r.credential);let i=this.storageClientContext;i.requestContentType=void 0}},j=z.createSpanFunction({packagePrefix:"Azure.Storage.Blob",namespace:"Microsoft.Storage"});function X(t){var e,a;return{spanOptions:(e=t?.tracingOptions)===null||e===void 0?void 0:e.spanOptions,tracingContext:(a=t?.tracingOptions)===null||a===void 0?void 0:a.tracingContext}}o(X,"convertTracingToRequestOptionsBase");var ji=class t{static{o(this,"BlobSASPermissions")}constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1}static parse(e){let a=new t;for(let i of e)switch(i){case"r":a.read=!0;break;case"a":a.add=!0;break;case"c":a.create=!0;break;case"w":a.write=!0;break;case"d":a.delete=!0;break;case"x":a.deleteVersion=!0;break;case"t":a.tag=!0;break;case"m":a.move=!0;break;case"e":a.execute=!0;break;case"i":a.setImmutabilityPolicy=!0;break;case"y":a.permanentDelete=!0;break;default:throw new RangeError(`Invalid permission: ${i}`)}return a}static from(e){let a=new t;return e.read&&(a.read=!0),e.add&&(a.add=!0),e.create&&(a.create=!0),e.write&&(a.write=!0),e.delete&&(a.delete=!0),e.deleteVersion&&(a.deleteVersion=!0),e.tag&&(a.tag=!0),e.move&&(a.move=!0),e.execute&&(a.execute=!0),e.setImmutabilityPolicy&&(a.setImmutabilityPolicy=!0),e.permanentDelete&&(a.permanentDelete=!0),a}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),e.join("")}},ki=class t{static{o(this,"ContainerSASPermissions")}constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.list=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1,this.filterByTags=!1}static parse(e){let a=new t;for(let i of e)switch(i){case"r":a.read=!0;break;case"a":a.add=!0;break;case"c":a.create=!0;break;case"w":a.write=!0;break;case"d":a.delete=!0;break;case"l":a.list=!0;break;case"t":a.tag=!0;break;case"x":a.deleteVersion=!0;break;case"m":a.move=!0;break;case"e":a.execute=!0;break;case"i":a.setImmutabilityPolicy=!0;break;case"y":a.permanentDelete=!0;break;case"f":a.filterByTags=!0;break;default:throw new RangeError(`Invalid permission ${i}`)}return a}static from(e){let a=new t;return e.read&&(a.read=!0),e.add&&(a.add=!0),e.create&&(a.create=!0),e.write&&(a.write=!0),e.delete&&(a.delete=!0),e.list&&(a.list=!0),e.deleteVersion&&(a.deleteVersion=!0),e.tag&&(a.tag=!0),e.move&&(a.move=!0),e.execute&&(a.execute=!0),e.setImmutabilityPolicy&&(a.setImmutabilityPolicy=!0),e.permanentDelete&&(a.permanentDelete=!0),e.filterByTags&&(a.filterByTags=!0),a}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.list&&e.push("l"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),this.filterByTags&&e.push("f"),e.join("")}},N0=class{static{o(this,"UserDelegationKeyCredential")}constructor(e,a){this.accountName=e,this.userDelegationKey=a,this.key=Buffer.from(a.value,"base64")}computeHMACSHA256(e){return Qb.createHmac("sha256",this.key).update(e,"utf8").digest("base64")}};function Ui(t){return t.end?`${t.start}-${t.end}`:t.start}o(Ui,"ipRangeToString");Z.SASProtocol=void 0;(function(t){t.Https="https",t.HttpsAndHttp="https,http"})(Z.SASProtocol||(Z.SASProtocol={}));var gi=class{static{o(this,"SASQueryParameters")}constructor(e,a,i,r,n,s,p,l,d,c,u,m,f,h,b
Line truncated
|
||||
`),n=e.computeHMACSHA256(r);return new gi(t.version,n,i,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType)}o(_U,"generateBlobSASQueryParameters20150405");function SU(t,e){if(t=Ds(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=ji.parse(t.permissions.toString()).toString():r=ki.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ce(t.startsOn,!1):"",t.expiresOn?Ce(t.expiresOn,!1):"",Is(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ui(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new gi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType)}o(SU,"generateBlobSASQueryParameters20181109");function EU(t,e){if(t=Ds(t),!t.identifier&&!(t.permissions&&t.expiresOn))throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=ji.parse(t.permissions.toString()).toString():r=ki.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ce(t.startsOn,!1):"",t.expiresOn?Ce(t.expiresOn,!1):"",Is(e.accountName,t.containerName,t.blobName),t.identifier,t.ipRange?Ui(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.encryptionScope,t.cacheControl?t.cacheControl:"",t.contentDisposition?t.contentDisposition:"",t.contentEncoding?t.contentEncoding:"",t.contentLanguage?t.contentLanguage:"",t.contentType?t.contentType:""].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new gi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,void 0,void 0,void 0,t.encryptionScope)}o(EU,"generateBlobSASQueryParameters20201206");function CU(t,e){if(t=Ds(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=ji.parse(t.permissions.toString()).toString():r=ki.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ce(t.startsOn,!1):"",t.expiresOn?Ce(t.expiresOn,!1):"",Is(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ce(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ce(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.ipRange?Ui(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new gi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey)}o(CU,"generateBlobSASQueryParametersUDK20181109");function TU(t,e){if(t=Ds(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=ji.parse(t.permissions.toString()).toString():r=ki.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ce(t.startsOn,!1):"",t.expiresOn?Ce(t.expiresOn,!1):"",Is(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ce(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ce(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ui(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new gi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId)}o(TU,"generateBlobSASQueryParametersUDK20200210");function OU(t,e){if(t=Ds(t),!t.permissions||!t.expiresOn)throw new RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let a="c",i=t.snapshotTime;t.blobName&&(a="b",t.snapshotTime?a="bs":t.versionId&&(a="bv",i=t.versionId));let r;t.permissions&&(t.blobName?r=ji.parse(t.permissions.toString()).toString():r=ki.parse(t.permissions.toString()).toString());let n=[r||"",t.startsOn?Ce(t.startsOn,!1):"",t.expiresOn?Ce(t.expiresOn,!1):"",Is(e.accountName,t.containerName,t.blobName),e.userDelegationKey.signedObjectId,e.userDelegationKey.signedTenantId,e.userDelegationKey.signedStartsOn?Ce(e.userDelegationKey.signedStartsOn,!1):"",e.userDelegationKey.signedExpiresOn?Ce(e.userDelegationKey.signedExpiresOn,!1):"",e.userDelegationKey.signedService,e.userDelegationKey.signedVersion,t.preauthorizedAgentObjectId,void 0,t.correlationId,t.ipRange?Ui(t.ipRange):"",t.protocol?t.protocol:"",t.version,a,i,t.encryptionScope,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType].join(`
|
||||
`),s=e.computeHMACSHA256(n);return new gi(t.version,s,r,void 0,void 0,t.protocol,t.startsOn,t.expiresOn,t.ipRange,t.identifier,a,t.cacheControl,t.contentDisposition,t.contentEncoding,t.contentLanguage,t.contentType,e.userDelegationKey,t.preauthorizedAgentObjectId,t.correlationId,t.encryptionScope)}o(OU,"generateBlobSASQueryParametersUDK20201206");function Is(t,e,a){let i=[`/blob/${t}/${e}`];return a&&i.push(`/${a}`),i.join("")}o(Is,"getCanonicalName");function Ds(t){let e=t.version?t.version:l2;if(t.snapshotTime&&e<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(t.blobName===void 0&&t.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(t.versionId&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(t.blobName===void 0&&t.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(t.permissions&&t.permissions.setImmutabilityPolicy&&e<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(t.permissions&&t.permissions.deleteVersion&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(t.permissions&&t.permissions.permanentDelete&&e<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(t.permissions&&t.permissions.tag&&e<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(e<"2020-02-10"&&t.permissions&&(t.permissions.move||t.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(e<"2021-04-10"&&t.permissions&&t.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(e<"2020-02-10"&&(t.preauthorizedAgentObjectId||t.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(t.encryptionScope&&e<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return t.version=e,t}o(Ds,"SASSignatureValuesSanityCheckAndAutofill");var _p=class{static{o(this,"BlobLeaseClient")}constructor(e,a){let i=new wp(e.url,e.pipeline.toServiceClientOptions());this._url=e.url,e.name===void 0?(this._isContainer=!0,this._containerOrBlobOperation=new pn(i)):(this._isContainer=!1,this._containerOrBlobOperation=new gp(i)),a||(a=q.generateUuid()),this._leaseId=a}get leaseId(){return this._leaseId}get url(){return this._url}async acquireLease(e,a={}){var i,r,n,s,p,l;let{span:d,updatedOptions:c}=j("BlobLeaseClient-acquireLease",a);if(this._isContainer&&(!((i=a.conditions)===null||i===void 0)&&i.ifMatch&&((r=a.conditions)===null||r===void 0?void 0:r.ifMatch)!==hi||!((n=a.conditions)===null||n===void 0)&&n.ifNoneMatch&&((s=a.conditions)===null||s===void 0?void 0:s.ifNoneMatch)!==hi||!((p=a.conditions)===null||p===void 0)&&p.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");try{return await this._containerOrBlobOperation.acquireLease(Object.assign({abortSignal:a.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},a.conditions),{ifTags:(l=a.conditions)===null||l===void 0?void 0:l.tagConditions}),proposedLeaseId:this._leaseId},X(c)))}catch(u){throw d.setStatus({code:z.SpanStatusCode.ERROR,message:u.message}),u}finally{d.end()}}async changeLease(e,a={}){var i,r,n,s,p,l;let{span:d,updatedOptions:c}=j("BlobLeaseClient-changeLease",a);if(this._isContainer&&(!((i=a.conditions)===null||i===void 0)&&i.ifMatch&&((r=a.conditions)===null||r===void 0?void 0:r.ifMatch)!==hi||!((n=a.conditions)===null||n===void 0)&&n.ifNoneMatch&&((s=a.conditions)===null||s===void 0?void 0:s.ifNoneMatch)!==hi||!((p=a.conditions)===null||p===void 0)&&p.tagConditions))throw new RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");try{let u=await this._containerOrBlobOperation.changeLease(this._leaseId,e,Object.assign({abortSignal:a.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},a.conditions),{ifTags:(l=a.conditions)===null||l===void 0?void 0:l.tagConditions})},X(c)));return this._leaseId=e,u}catch(u){throw d.setStatus({code:z.SpanStatusCode.ERROR,message:u.message}),u}finally{d.end()}}async releaseLease(e={}){var a,i,r,n,s,p;let{span:l,updatedOptions:d}=j("BlobLeaseClient-releaseLease",e);if(this._isContainer&&(!((a=e.conditions)===null||a===void 0)&&a.ifMatch&&((i=e.conditions)===null||i===void 0?void 0:i.ifMatch)!==hi||!((r=e.conditions)===null||r===void 0)&&r.ifNoneMatch&&((n=e.conditions)===null||n===void 0?void 0:n.ifNoneMatch)!==hi||!((s=e.conditions)===null||s===void 0)&&s.tagCon
Line truncated
|
||||
`):s=[e.accountName,i,r,n,t.startsOn?Ce(t.startsOn,!1):"",Ce(t.expiresOn,!1),t.ipRange?Ui(t.ipRange):"",t.protocol?t.protocol:"",a,""].join(`
|
||||
`);let p=e.computeHMACSHA256(s);return new gi(a,p,i.toString(),r,n,t.protocol,t.startsOn,t.expiresOn,t.ipRange,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,t.encryptionScope)}o(N_,"generateAccountSASQueryParameters");var $0=class t extends Np{static{o(this,"BlobServiceClient")}constructor(e,a,i){let r;Er(a)?r=a:q.isNode&&a instanceof Je||a instanceof Ie||q.isTokenCredential(a)?r=Ae(a,i):r=Ae(new Ie,i),super(e,r),this.serviceContext=new Lc(this.storageClientContext)}static fromConnectionString(e,a){a=a||{};let i=Rs(e);if(i.kind==="AccountConnString")if(q.isNode){let r=new Je(i.accountName,i.accountKey);a.proxyOptions||(a.proxyOptions=q.getDefaultProxySettings(i.proxyUri));let n=Ae(r,a);return new t(i.url,n)}else throw new Error("Account connection string is only supported in Node.js environment");else if(i.kind==="SASConnString"){let r=Ae(new Ie,a);return new t(i.url+"?"+i.accountSas,r)}else throw new Error("Connection string must be either an Account connection string or a SAS connection string")}getContainerClient(e){return new $c(Fe(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,a={}){let{span:i,updatedOptions:r}=j("BlobServiceClient-createContainer",a);try{let n=this.getContainerClient(e),s=await n.create(r);return{containerClient:n,containerCreateResponse:s}}catch(n){throw i.setStatus({code:z.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async deleteContainer(e,a={}){let{span:i,updatedOptions:r}=j("BlobServiceClient-deleteContainer",a);try{return await this.getContainerClient(e).delete(r)}catch(n){throw i.setStatus({code:z.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async undeleteContainer(e,a,i={}){let{span:r,updatedOptions:n}=j("BlobServiceClient-undeleteContainer",i);try{let s=this.getContainerClient(i.destinationContainerName||e),l=await new on(s.storageClientContext).restore(Object.assign({deletedContainerName:e,deletedContainerVersion:a},n));return{containerClient:s,containerUndeleteResponse:l}}catch(s){throw r.setStatus({code:z.SpanStatusCode.ERROR,message:s.message}),s}finally{r.end()}}async renameContainer(e,a,i={}){var r;let{span:n,updatedOptions:s}=j("BlobServiceClient-renameContainer",i);try{let p=this.getContainerClient(a),d=await new on(p.storageClientContext).rename(e,Object.assign(Object.assign({},s),{sourceLeaseId:(r=i.sourceCondition)===null||r===void 0?void 0:r.leaseId}));return{containerClient:p,containerRenameResponse:d}}catch(p){throw n.setStatus({code:z.SpanStatusCode.ERROR,message:p.message}),p}finally{n.end()}}async getProperties(e={}){let{span:a,updatedOptions:i}=j("BlobServiceClient-getProperties",e);try{return await this.serviceContext.getProperties(Object.assign({abortSignal:e.abortSignal},X(i)))}catch(r){throw a.setStatus({code:z.SpanStatusCode.ERROR,message:r.message}),r}finally{a.end()}}async setProperties(e,a={}){let{span:i,updatedOptions:r}=j("BlobServiceClient-setProperties",a);try{return await this.serviceContext.setProperties(e,Object.assign({abortSignal:a.abortSignal},X(r)))}catch(n){throw i.setStatus({code:z.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async getStatistics(e={}){let{span:a,updatedOptions:i}=j("BlobServiceClient-getStatistics",e);try{return await this.serviceContext.getStatistics(Object.assign({abortSignal:e.abortSignal},X(i)))}catch(r){throw a.setStatus({code:z.SpanStatusCode.ERROR,message:r.message}),r}finally{a.end()}}async getAccountInfo(e={}){let{span:a,updatedOptions:i}=j("BlobServiceClient-getAccountInfo",e);try{return await this.serviceContext.getAccountInfo(Object.assign({abortSignal:e.abortSignal},X(i)))}catch(r){throw a.setStatus({code:z.SpanStatusCode.ERROR,message:r.message}),r}finally{a.end()}}async listContainersSegment(e,a={}){let{span:i,updatedOptions:r}=j("BlobServiceClient-listContainersSegment",a);try{return await this.serviceContext.listContainersSegment(Object.assign(Object.assign(Object.assign({abortSignal:a.abortSignal,marker:e},a),{include:typeof a.include=="string"?[a.include]:a.include}),X(r)))}catch(n){throw i.setStatus({code:z.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async findBlobsByTagsSegment(e,a,i={}){let{span:r,updatedOptions:n}=j("BlobServiceClient-findBlobsByTagsSegment",i);try{let s=await this.serviceContext.filterBlobs(Object.assign({abortSignal:i.abortSignal,where:e,marker:a,maxPageSize:i.maxPageSize},X(n)));return Object.assign(Object.assign({},s),{_response:s._response,blobs:s.blobs.map(l=>{var d;let c="";return((d=l.tags)===null||d===void 0?void 0:d.blobTagSet.length)===1&&(c=l.tags.blobTagSet[0].value),Object.assign(Object.assign({},l),{tags:mp(l.tags),tagValue:c})})})}catch(s){throw r.setStatus({code:z.SpanStatusCode.ERROR,message:s.message}),s}finally{r.end()}}findBlobsByTagsSegments(e,a,i={}){return U.__asyncGenerator(this,arguments,o(function*(){let n;if(a||a===void 0)do n=yield U.__await(this.findBlobsByTagsSegment(e,a,i)),n.blobs=n.blobs||[],a=n.continuationToken,yield yield U.__await(n);wh
Line truncated
|
||||
`);let p=e.computeHMACSHA256(s);return new gi(a,p,i.toString(),r,n,t.protocol,t.startsOn,t.expiresOn,t.ipRange,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,t.encryptionScope)}o(N_,"generateAccountSASQueryParameters");var $0=class t extends Np{static{o(this,"BlobServiceClient")}constructor(e,a,i){let r;Er(a)?r=a:q.isNode&&a instanceof Je||a instanceof Ie||q.isTokenCredential(a)?r=Ae(a,i):r=Ae(new Ie,i),super(e,r),this.serviceContext=new Lc(this.storageClientContext)}static fromConnectionString(e,a){a=a||{};let i=Ps(e);if(i.kind==="AccountConnString")if(q.isNode){let r=new Je(i.accountName,i.accountKey);a.proxyOptions||(a.proxyOptions=q.getDefaultProxySettings(i.proxyUri));let n=Ae(r,a);return new t(i.url,n)}else throw new Error("Account connection string is only supported in Node.js environment");else if(i.kind==="SASConnString"){let r=Ae(new Ie,a);return new t(i.url+"?"+i.accountSas,r)}else throw new Error("Connection string must be either an Account connection string or a SAS connection string")}getContainerClient(e){return new $c(Fe(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,a={}){let{span:i,updatedOptions:r}=j("BlobServiceClient-createContainer",a);try{let n=this.getContainerClient(e),s=await n.create(r);return{containerClient:n,containerCreateResponse:s}}catch(n){throw i.setStatus({code:z.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async deleteContainer(e,a={}){let{span:i,updatedOptions:r}=j("BlobServiceClient-deleteContainer",a);try{return await this.getContainerClient(e).delete(r)}catch(n){throw i.setStatus({code:z.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async undeleteContainer(e,a,i={}){let{span:r,updatedOptions:n}=j("BlobServiceClient-undeleteContainer",i);try{let s=this.getContainerClient(i.destinationContainerName||e),l=await new pn(s.storageClientContext).restore(Object.assign({deletedContainerName:e,deletedContainerVersion:a},n));return{containerClient:s,containerUndeleteResponse:l}}catch(s){throw r.setStatus({code:z.SpanStatusCode.ERROR,message:s.message}),s}finally{r.end()}}async renameContainer(e,a,i={}){var r;let{span:n,updatedOptions:s}=j("BlobServiceClient-renameContainer",i);try{let p=this.getContainerClient(a),d=await new pn(p.storageClientContext).rename(e,Object.assign(Object.assign({},s),{sourceLeaseId:(r=i.sourceCondition)===null||r===void 0?void 0:r.leaseId}));return{containerClient:p,containerRenameResponse:d}}catch(p){throw n.setStatus({code:z.SpanStatusCode.ERROR,message:p.message}),p}finally{n.end()}}async getProperties(e={}){let{span:a,updatedOptions:i}=j("BlobServiceClient-getProperties",e);try{return await this.serviceContext.getProperties(Object.assign({abortSignal:e.abortSignal},X(i)))}catch(r){throw a.setStatus({code:z.SpanStatusCode.ERROR,message:r.message}),r}finally{a.end()}}async setProperties(e,a={}){let{span:i,updatedOptions:r}=j("BlobServiceClient-setProperties",a);try{return await this.serviceContext.setProperties(e,Object.assign({abortSignal:a.abortSignal},X(r)))}catch(n){throw i.setStatus({code:z.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async getStatistics(e={}){let{span:a,updatedOptions:i}=j("BlobServiceClient-getStatistics",e);try{return await this.serviceContext.getStatistics(Object.assign({abortSignal:e.abortSignal},X(i)))}catch(r){throw a.setStatus({code:z.SpanStatusCode.ERROR,message:r.message}),r}finally{a.end()}}async getAccountInfo(e={}){let{span:a,updatedOptions:i}=j("BlobServiceClient-getAccountInfo",e);try{return await this.serviceContext.getAccountInfo(Object.assign({abortSignal:e.abortSignal},X(i)))}catch(r){throw a.setStatus({code:z.SpanStatusCode.ERROR,message:r.message}),r}finally{a.end()}}async listContainersSegment(e,a={}){let{span:i,updatedOptions:r}=j("BlobServiceClient-listContainersSegment",a);try{return await this.serviceContext.listContainersSegment(Object.assign(Object.assign(Object.assign({abortSignal:a.abortSignal,marker:e},a),{include:typeof a.include=="string"?[a.include]:a.include}),X(r)))}catch(n){throw i.setStatus({code:z.SpanStatusCode.ERROR,message:n.message}),n}finally{i.end()}}async findBlobsByTagsSegment(e,a,i={}){let{span:r,updatedOptions:n}=j("BlobServiceClient-findBlobsByTagsSegment",i);try{let s=await this.serviceContext.filterBlobs(Object.assign({abortSignal:i.abortSignal,where:e,marker:a,maxPageSize:i.maxPageSize},X(n)));return Object.assign(Object.assign({},s),{_response:s._response,blobs:s.blobs.map(l=>{var d;let c="";return((d=l.tags)===null||d===void 0?void 0:d.blobTagSet.length)===1&&(c=l.tags.blobTagSet[0].value),Object.assign(Object.assign({},l),{tags:mp(l.tags),tagValue:c})})})}catch(s){throw r.setStatus({code:z.SpanStatusCode.ERROR,message:s.message}),s}finally{r.end()}}findBlobsByTagsSegments(e,a,i={}){return U.__asyncGenerator(this,arguments,o(function*(){let n;if(a||a===void 0)do n=yield U.__await(this.findBlobsByTagsSegment(e,a,i)),n.blobs=n.blobs||[],a=n.continuationToken,yield yield U.__await(n);wh
Line truncated
|
||||
If you are using self-hosted runners, please make sure your runner has access to all GitHub endpoints: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#communication-between-self-hosted-runners-and-github`;super(a),this.code=e,this.name="NetworkError"}};ra.NetworkError=eu;eu.isNetworkErrorCode=t=>t?["ECONNRESET","ENOTFOUND","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH"].includes(t):!1;var tu=class extends Error{static{o(this,"UsageError")}constructor(){let e=`Cache storage quota has been hit. Unable to upload any new cache entries. Usage is recalculated every 6-12 hours.
|
||||
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`;super(e),this.name="UsageError"}};ra.UsageError=tu;tu.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1});var __=N(na=>{"use strict";var UU=na&&na.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),HU=na&&na.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),FU=na&&na.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&UU(e,t,a);return HU(e,t),e},VU=na&&na.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(na,"__esModule",{value:!0});na.uploadCacheArchiveSDK=na.UploadProgress=void 0;var w2=FU(nt()),$U=h2(),GU=x2(),au=class{static{o(this,"UploadProgress")}constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,a=(100*(e/this.contentLength)).toFixed(1),i=Date.now()-this.startTime,r=(e/(1024*1024)/(i/1e3)).toFixed(1);w2.info(`Sent ${e} of ${this.contentLength} (${a}%), ${r} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let a=o(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(a,e))},"displayCallback");this.timeoutHandle=setTimeout(a,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};na.UploadProgress=au;function WU(t,e,a){var i;return VU(this,void 0,void 0,function*(){let r=new $U.BlobClient(t),n=r.getBlockBlobClient(),s=new au((i=a?.archiveSizeBytes)!==null&&i!==void 0?i:0),p={blockSize:a?.uploadChunkSize,concurrency:a?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:s.onProgress()};try{s.startDisplayTimer(),w2.debug(`BlobClient: ${r.name}:${r.accountName}:${r.containerName}`);let l=yield n.uploadFile(e,p);if(l._response.status>=400)throw new GU.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${l._response.status}`);return l}catch(l){throw w2.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${l.message}`),l}finally{s.stopDisplayTimer()}})}o(WU,"uploadCacheArchiveSDK");na.uploadCacheArchiveSDK=WU});var _2=N(Ze=>{"use strict";var XU=Ze&&Ze.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),KU=Ze&&Ze.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),YU=Ze&&Ze.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&XU(e,t,a);return KU(e,t),e},ru=Ze&&Ze.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.retryHttpClientResponse=Ze.retryTypedResponse=Ze.retry=Ze.isRetryableStatusCode=Ze.isServerErrorStatusCode=Ze.isSuccessStatusCode=void 0;var S_=YU(nt()),iu=Lr(),Ds=Ln();function QU(t){return t?t>=200&&t<300:!1}o(QU,"isSuccessStatusCode");Ze.isSuccessStatusCode=QU;function E_(t){return t?t>=500:!0}o(E_,"isServerErrorStatusCode");Ze.isServerErrorStatusCode=E_;function C_(t){return t?[iu.HttpCodes.BadGateway,iu.HttpCodes.ServiceUnavailable,iu.HttpCodes.GatewayTimeout].includes(t):!1}o(C_,"isRetryableStatusCode");Ze.isRetryableStatusCode=C_;function JU(t){return ru(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}o(JU,"sleep");function N2(t,e,a,i=Ds.DefaultRetryAttempts,r=Ds.DefaultRetryDelay,n=
Line truncated
|
||||
Other caches with similar key:`);for(let p of n?.artifactCaches||[])ga.debug(`Cache Key: ${p?.cacheKey}, Cache Version: ${p?.cacheVersion}, Cache Scope: ${p?.scope}, Cache Created: ${p?.creationTime}`)}}})}o(BH,"printCachesListForDiagnostics");function MH(t,e,a){return sa(this,void 0,void 0,function*(){let i=new TH.URL(t),r=(0,O2.getDownloadOptions)(a);i.hostname.endsWith(".blob.core.windows.net")?r.useAzureSdk?yield(0,ou.downloadCacheStorageSDK)(t,e,r):r.concurrentBlobDownloads?yield(0,ou.downloadCacheHttpClientConcurrent)(t,e,r):yield(0,ou.downloadCacheHttpClient)(t,e):yield(0,ou.downloadCacheHttpClient)(t,e)})}o(MH,"downloadCache");Rt.downloadCache=MH;function LH(t,e,a){return sa(this,void 0,void 0,function*(){let i=R2(),r=Bs.getCacheVersion(e,a?.compressionMethod,a?.enableCrossOsArchive),n={key:t,version:r,cacheSize:a?.cacheSize};return yield(0,Tr.retryTypedResponse)("reserveCache",()=>sa(this,void 0,void 0,function*(){return i.postJson(Lp("caches"),n)}))})}o(LH,"reserveCache");Rt.reserveCache=LH;function L_(t,e){return`bytes ${t}-${e}/*`}o(L_,"getContentRange");function qH(t,e,a,i,r){return sa(this,void 0,void 0,function*(){ga.debug(`Uploading chunk of size ${r-i+1} bytes at offset ${i} with content range: ${L_(i,r)}`);let n={"Content-Type":"application/octet-stream","Content-Range":L_(i,r)},s=yield(0,Tr.retryHttpClientResponse)(`uploadChunk (start: ${i}, end: ${r})`,()=>sa(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,a(),n)}));if(!(0,Tr.isSuccessStatusCode)(s.message.statusCode))throw new Error(`Cache service responded with ${s.message.statusCode} during upload chunk.`)})}o(qH,"uploadChunk");function zH(t,e,a,i){return sa(this,void 0,void 0,function*(){let r=Bs.getArchiveFileSizeInBytes(a),n=Lp(`caches/${e.toString()}`),s=C2.openSync(a,"r"),p=(0,O2.getUploadOptions)(i),l=Bs.assertDefined("uploadConcurrency",p.uploadConcurrency),d=Bs.assertDefined("uploadChunkSize",p.uploadChunkSize),c=[...new Array(l).keys()];ga.debug("Awaiting all uploads");let u=0;try{yield Promise.all(c.map(()=>sa(this,void 0,void 0,function*(){for(;u<r;){let m=Math.min(r-u,d),f=u,h=u+m-1;u+=d,yield qH(t,n,()=>C2.createReadStream(a,{fd:s,start:f,end:h,autoClose:!1}).on("error",b=>{throw new Error(`Cache upload failed because file read failed with ${b.message}`)}),f,h)}})))}finally{C2.closeSync(s)}})}o(zH,"uploadFile");function jH(t,e,a){return sa(this,void 0,void 0,function*(){let i={size:a};return yield(0,Tr.retryTypedResponse)("commitCache",()=>sa(this,void 0,void 0,function*(){return t.postJson(Lp(`caches/${e.toString()}`),i)}))})}o(jH,"commitCache");function kH(t,e,a,i){return sa(this,void 0,void 0,function*(){if((0,O2.getUploadOptions)(i).useAzureSdk){if(!a)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield(0,OH.uploadCacheArchiveSDK)(a,e,i)}else{let n=R2();ga.debug("Upload cache"),yield zH(n,t,e,i),ga.debug("Commiting cache");let s=Bs.getArchiveFileSizeInBytes(e);ga.info(`Cache Size: ~${Math.round(s/(1024*1024))} MB (${s} B)`);let p=yield jH(n,t,s);if(!(0,Tr.isSuccessStatusCode)(p.statusCode))throw new Error(`Cache service responded with ${p.statusCode} during commit cache.`);ga.info("Cache saved successfully")}})}o(kH,"saveCache");Rt.saveCache=kH});var pu=N(Ms=>{"use strict";Object.defineProperty(Ms,"__esModule",{value:!0});Ms.isJsonObject=Ms.typeofJsonValue=void 0;function UH(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}o(UH,"typeofJsonValue");Ms.typeofJsonValue=UH;function HH(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}o(HH,"isJsonObject");Ms.isJsonObject=HH});var du=N(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});Ls.base64encode=Ls.base64decode=void 0;var $i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),lu=[];for(let t=0;t<$i.length;t++)lu[$i[t].charCodeAt(0)]=t;lu["-".charCodeAt(0)]=$i.indexOf("+");lu["_".charCodeAt(0)]=$i.indexOf("/");function FH(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let a=new Uint8Array(e),i=0,r=0,n,s=0;for(let p=0;p<t.length;p++){if(n=lu[t.charCodeAt(p)],n===void 0)switch(t[p]){case"=":r=0;case`
|
||||
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(r){case 0:s=n,r=1;break;case 1:a[i++]=s<<2|(n&48)>>4,s=n,r=2;break;case 2:a[i++]=(s&15)<<4|(n&60)>>2,s=n,r=3;break;case 3:a[i++]=(s&3)<<6|n,r=0;break}}if(r==1)throw Error("invalid base64 string.");return a.subarray(0,i)}o(FH,"base64decode");Ls.base64decode=FH;function VH(t){let e="",a=0,i,r=0;for(let n=0;n<t.length;n++)switch(i=t[n],a){case 0:e+=$i[i>>2],r=(i&3)<<4,a=1;break;case 1:e+=$i[r|i>>4],r=(i&15)<<2,a=2;break;case 2:e+=$i[r|i>>6],e+=$i[i&63],a=0;break}return a&&(e+=$i[r],e+="=",a==1&&(e+="=")),e}o(VH,"base64encode");Ls.base64encode=VH});var z_=N(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.utf8read=void 0;var P2=o(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function $H(t){if(t.length<1)return"";let e=0,a=[],i=[],r=0,n,s=t.length;for(;e<s;)n=t[e++],n<128?i[r++]=n:n>191&&n<224?i[r++]=(n&31)<<6|t[e++]&63:n>239&&n<365?(n=((n&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,i[r++]=55296+(n>>10),i[r++]=56320+(n&1023)):i[r++]=(n&15)<<12|(t[e++]&63)<<6|t[e++]&63,r>8191&&(a.push(P2(i)),r=0);return a.length?(r&&a.push(P2(i.slice(0,r))),a.join("")):P2(i.slice(0,r))}o($H,"utf8read");cu.utf8read=$H});var qp=N(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.WireType=vi.mergeBinaryOptions=vi.UnknownFieldHandler=void 0;var GH;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(a,i,r,n,s)=>{(e(i)?i[t.symbol]:i[t.symbol]=[]).push({no:r,wireType:n,data:s})},t.onWrite=(a,i,r)=>{for(let{no:n,wireType:s,data:p}of t.list(i))r.tag(n,s).raw(p)},t.list=(a,i)=>{if(e(a)){let r=a[t.symbol];return i?r.filter(n=>n.no==i):r}return[]},t.last=(a,i)=>t.list(a,i).slice(-1)[0];let e=o(a=>a&&Array.isArray(a[t.symbol]),"is")})(GH=vi.UnknownFieldHandler||(vi.UnknownFieldHandler={}));function WH(t,e){return Object.assign(Object.assign({},t),e)}o(WH,"mergeBinaryOptions");vi.mergeBinaryOptions=WH;var XH;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(XH=vi.WireType||(vi.WireType={}))});var mu=N(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.varint32read=oa.varint32write=oa.int64toString=oa.int64fromString=oa.varint64write=oa.varint64read=void 0;function KH(){let t=0,e=0;for(let i=0;i<28;i+=7){let r=this.buf[this.pos++];if(t|=(r&127)<<i,!(r&128))return this.assertBounds(),[t,e]}let a=this.buf[this.pos++];if(t|=(a&15)<<28,e=(a&112)>>4,!(a&128))return this.assertBounds(),[t,e];for(let i=3;i<=31;i+=7){let r=this.buf[this.pos++];if(e|=(r&127)<<i,!(r&128))return this.assertBounds(),[t,e]}throw new Error("invalid varint")}o(KH,"varint64read");oa.varint64read=KH;function YH(t,e,a){for(let n=0;n<28;n=n+7){let s=t>>>n,p=!(!(s>>>7)&&e==0),l=(p?s|128:s)&255;if(a.push(l),!p)return}let i=t>>>28&15|(e&7)<<4,r=!!(e>>3);if(a.push((r?i|128:i)&255),!!r){for(let n=3;n<31;n=n+7){let s=e>>>n,p=!!(s>>>7),l=(p?s|128:s)&255;if(a.push(l),!p)return}a.push(e>>>31&1)}}o(YH,"varint64write");oa.varint64write=YH;var uu=65536*65536;function QH(t){let e=t[0]=="-";e&&(t=t.slice(1));let a=1e6,i=0,r=0;function n(s,p){let l=Number(t.slice(s,p));r*=a,i=i*a+l,i>=uu&&(r=r+(i/uu|0),i=i%uu)}return o(n,"add1e6digit"),n(-24,-18),n(-18,-12),n(-12,-6),n(-6),[e,i,r]}o(QH,"int64fromString");oa.int64fromString=QH;function JH(t,e){if(e>>>0<=2097151)return""+(uu*e+(t>>>0));let a=t&16777215,i=(t>>>24|e<<8)>>>0&16777215,r=e>>16&65535,n=a+i*6777216+r*6710656,s=i+r*8147497,p=r*2,l=1e7;n>=l&&(s+=Math.floor(n/l),n%=l),s>=l&&(p+=Math.floor(s/l),s%=l);function d(c,u){let m=c?String(c):"";return u?"0000000".slice(m.length)+m:m}return o(d,"decimalFrom1e7"),d(p,0)+d(s,p)+d(n,1)}o(JH,"int64toString");oa.int64toString=JH;function ZH(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let a=0;a<9;a++)e.push(t&127|128),t=t>>7;e.push(1)}}o(ZH,"varint32write");oa.varint32write=ZH;function eF(){let t=this.buf[this.pos++],e=t&127;if(!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,!(t&128))return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let a=5;t&128&&a<10;a++)t=this.buf[this.pos++];if(t&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}o(eF,"varint32read");oa.varint32read=eF});var Rr=N(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.PbLong=Or.PbULong=Or.detectBi=void 0;var zp=mu(),Be;function j_(){let t=new DataView(new ArrayBuffer(8));Be=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:
Line truncated
|
||||
`)}};ku.RpcError=i6});var n6=N(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});Hu.mergeRpcOptions=void 0;var gS=lt();function NV(t,e){if(!e)return t;let a={};Uu(t,a),Uu(e,a);for(let i of Object.keys(e)){let r=e[i];switch(i){case"jsonOptions":a.jsonOptions=gS.mergeJsonOptions(t.jsonOptions,a.jsonOptions);break;case"binaryOptions":a.binaryOptions=gS.mergeBinaryOptions(t.binaryOptions,a.binaryOptions);break;case"meta":a.meta={},Uu(t.meta,a.meta),Uu(e.meta,a.meta);break;case"interceptors":a.interceptors=t.interceptors?t.interceptors.concat(r):r.concat();break}}return a}o(NV,"mergeRpcOptions");Hu.mergeRpcOptions=NV;function Uu(t,e){if(!t)return;let a=e;for(let[i,r]of Object.entries(t))r instanceof Date?a[i]=new Date(r.getTime()):Array.isArray(r)?a[i]=r.concat():a[i]=r}o(Uu,"copy")});var o6=N(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.Deferred=gn.DeferredState=void 0;var wi;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(wi=gn.DeferredState||(gn.DeferredState={}));var s6=class{static{o(this,"Deferred")}constructor(e=!0){this._state=wi.PENDING,this._promise=new Promise((a,i)=>{this._resolve=a,this._reject=i}),e&&this._promise.catch(a=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==wi.PENDING)throw new Error(`cannot resolve ${wi[this.state].toLowerCase()}`);this._resolve(e),this._state=wi.RESOLVED}reject(e){if(this.state!==wi.PENDING)throw new Error(`cannot reject ${wi[this.state].toLowerCase()}`);this._reject(e),this._state=wi.REJECTED}resolvePending(e){this._state===wi.PENDING&&this.resolve(e)}rejectPending(e){this._state===wi.PENDING&&this.reject(e)}};gn.Deferred=s6});var l6=N(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});Fu.RpcOutputStreamController=void 0;var yS=o6(),yn=lt(),p6=class{static{o(this,"RpcOutputStreamController")}constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,a){return a.push(e),()=>{let i=a.indexOf(e);i>=0&&a.splice(i,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,a,i){yn.assert((e?1:0)+(a?1:0)+(i?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),a&&this.notifyError(a),i&&this.notifyComplete()}notifyMessage(e){yn.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(a=>a(e)),this._lis.nxt.forEach(a=>a(e,void 0,!1))}notifyError(e){yn.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(a=>a(e)),this._lis.nxt.forEach(a=>a(void 0,e,!1)),this.clearLis()}notifyComplete(){yn.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._itState||(this._itState={q:[]}),this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:()=>{let e=this._itState;yn.assert(e,"bad state"),yn.assert(!e.p,"iterator contract broken");let a=e.q.shift();return a?"value"in a?Promise.resolve(a):Promise.reject(a):(e.p=new yS.Deferred,e.p.promise)}}}pushIt(e){let a=this._itState;if(a)if(a.p){let i=a.p;yn.assert(i.state==yS.DeferredState.PENDING,"iterator contract broken"),"value"in e?i.resolve(e):i.reject(e),delete a.p}else a.q.push(e)}};Fu.RpcOutputStreamController=p6});var c6=N(Fs=>{"use strict";var _V=Fs&&Fs.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(Fs,"__esModule",{value:!0});Fs.UnaryCall=void 0;var d6=class{static{o(this,"UnaryCall")}constructor(e,a,i,r,n,s,p){this.method=e,this.requestHeaders=a,this.request=i,this.headers=r,this.response=n,this.status=s,this.trailers=p}then(e,a){return this.promiseFinished().then(i=>e?Promise.resolve(e(i)):i,i=>a?Promise.resolve(a(i)):Promise.reject(i))}promiseFinished(){return _V(this,void 0,void 0,function*(){let[e,a,i,r]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:a,status:i,trailers:r}})}};Fs.UnaryCall=d6});var m6=N(Vs=>{"use strict";var SV=Vs&&Vs.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function
Line truncated
|
||||
`));let i=yield M6(a,"create");yield L6(i,t)})}o(v$,"createTar");Ut.createTar=v$});var jS=N(dt=>{"use strict";var b$=dt&&dt.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),x$=dt&&dt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Jp=dt&&dt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&b$(e,t,a);return x$(e,t),e},no=dt&&dt.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(dt,"__esModule",{value:!0});dt.saveCache=dt.restoreCache=dt.isFeatureAvailable=dt.ReserveCacheError=dt.ValidationError=void 0;var re=Jp(nt()),Qu=Jp(require("path")),Ue=Jp(zn()),ro=Jp(q_()),qS=Jp(AS()),Ju=nu(),Dr=LS(),w$=Ln(),qa=class t extends Error{static{o(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}};dt.ValidationError=qa;var vn=class t extends Error{static{o(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}};dt.ReserveCacheError=vn;function zS(t){if(!t||t.length===0)throw new qa("Path Validation Error: At least one directory or file path is required")}o(zS,"checkPaths");function q6(t){if(t.length>512)throw new qa(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new qa(`Key Validation Error: ${t} cannot contain commas.`)}o(q6,"checkKey");function N$(){return!!process.env.ACTIONS_CACHE_URL}o(N$,"isFeatureAvailable");dt.isFeatureAvailable=N$;function _$(t,e,a,i,r=!1){return no(this,void 0,void 0,function*(){let n=(0,Ju.getCacheServiceVersion)();switch(re.debug(`Cache service version: ${n}`),zS(t),n){case"v2":return yield E$(t,e,a,i,r);case"v1":default:return yield S$(t,e,a,i,r)}})}o(_$,"restoreCache");dt.restoreCache=_$;function S$(t,e,a,i,r=!1){return no(this,void 0,void 0,function*(){a=a||[];let n=[e,...a];if(re.debug("Resolved Keys:"),re.debug(JSON.stringify(n)),n.length>10)throw new qa("Key Validation Error: Keys are limited to a maximum of 10.");for(let l of n)q6(l);let s=yield Ue.getCompressionMethod(),p="";try{let l=yield ro.getCacheEntry(n,t,{compressionMethod:s,enableCrossOsArchive:r});if(!l?.archiveLocation)return;if(i?.lookupOnly)return re.info("Lookup only - skipping download"),l.cacheKey;p=Qu.join(yield Ue.createTempDirectory(),Ue.getCacheFileName(s)),re.debug(`Archive Path: ${p}`),yield ro.downloadCache(l.archiveLocation,p,i),re.isDebug()&&(yield(0,Dr.listTar)(p,s));let d=Ue.getArchiveFileSizeInBytes(p);return re.info(`Cache Size: ~${Math.round(d/(1024*1024))} MB (${d} B)`),yield(0,Dr.extractTar)(p,s),re.info("Cache restored successfully"),l.cacheKey}catch(l){if(l.name===qa.name)throw l;re.warning(`Failed to restore: ${l.message}`)}finally{try{yield Ue.unlinkFile(p)}catch(l){re.debug(`Failed to delete archive: ${l}`)}}})}o(S$,"restoreCacheV1");function E$(t,e,a,i,r=!1){return no(this,void 0,void 0,function*(){i=Object.assign(Object.assign({},i),{useAzureSdk:!0}),a=a||[];let n=[e,...a];if(re.debug("Resolved Keys:"),re.debug(JSON.stringify(n)),n.length>10)throw new qa("Key Validation Error: Keys are limited to a maximum of 10.");for(let p of n)q6(p);let s="";try{let p=qS.internalCacheTwirpClient(),l=yield Ue.getCompressionMethod(),d={key:e,restoreKeys:a,version:Ue.getCacheVersion(t,l,r)},c=yield p.GetCacheEntryDownloadURL(d);if(!c.ok){re.debug(`Cache not found for version ${d.version} of keys: ${n.join(", ")}`);return}if(re.info(`Cache hit for: ${d.key}`),i?.lookupOnly)return re.info("Lookup only - skipping download"),c.matchedKey;s=Qu.join(yield Ue.createTempDirectory(),Ue.getCacheFileName(l)),re.debug(`Archive path: ${s}`),re.debug(`Starting download of archive to: ${s}`),yield ro.downloadCache(c.signedDownloadUrl,s,i);let u=Ue.getArchiveFileSizeInBytes(s);return re.info(`Cache Size: ~${Math.round(u/(1024*1024))} MB (${u} B)`),re.isDebug()&&(yield(0,Dr.listTar)(s,l)),yield(0,Dr.extractTar)(s,l),re.info("Cache restored successfully"),c.matchedKey}catch(p){if(p.name===qa.name)throw p;re.warning(`Failed to restore: ${p.message}`)}finally{try{s&&(yield Ue.unlinkFile(s))}catch(p){re.debug(`Failed to delete archive: ${p}`)}}})}o(E$,"restoreCacheV2");function C$(t,e,a,i=!1){return no(this,void 0,void 0,function*(){let r=(0,Ju.getCacheServiceVersion)();switch(re.debug(`Cache servLine truncated
|
||||
`);for(let r of i){let n=r.split("=");if(n.length===2&&(n[0].trim()==="VERSION_ID"||n[0].trim()==="DISTRIB_RELEASE")){e=n[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return e}o(M$,"_getOsVersion");Ht._getOsVersion=M$;function L$(){let t="/etc/lsb-release",e="/etc/os-release",a="";return Zu.existsSync(t)?a=Zu.readFileSync(t).toString():Zu.existsSync(e)&&(a=Zu.readFileSync(e).toString()),a}o(L$,"_readLinuxVersionFile");Ht._readLinuxVersionFile=L$});var VS=N((bte,FS)=>{var q$=require("crypto");FS.exports=o(function(){return q$.randomBytes(16)},"nodeRNG")});var WS=N((wte,GS)=>{var $S=[];for(Zp=0;Zp<256;++Zp)$S[Zp]=(Zp+256).toString(16).substr(1);var Zp;function z$(t,e){var a=e||0,i=$S;return[i[t[a++]],i[t[a++]],i[t[a++]],i[t[a++]],"-",i[t[a++]],i[t[a++]],"-",i[t[a++]],i[t[a++]],"-",i[t[a++]],i[t[a++]],"-",i[t[a++]],i[t[a++]],i[t[a++]],i[t[a++]],i[t[a++]],i[t[a++]]].join("")}o(z$,"bytesToUuid");GS.exports=z$});var KS=N((_te,XS)=>{var j$=VS(),k$=WS();function U$(t,e,a){var i=e&&a||0;typeof t=="string"&&(e=t==="binary"?new Array(16):null,t=null),t=t||{};var r=t.random||(t.rng||j$)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e)for(var n=0;n<16;++n)e[i+n]=r[n];return e||k$(r)}o(U$,"v4");XS.exports=U$});var JS=N(za=>{"use strict";var H$=za&&za.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),F$=za&&za.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),V$=za&&za.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&H$(e,t,a);return F$(e,t),e},YS=za&&za.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(za,"__esModule",{value:!0});za.RetryHelper=void 0;var QS=V$(nt()),k6=class{static{o(this,"RetryHelper")}constructor(e,a,i){if(e<1)throw new Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(a),this.maxSeconds=Math.floor(i),this.minSeconds>this.maxSeconds)throw new Error("min seconds should be less than or equal to max seconds")}execute(e,a){return YS(this,void 0,void 0,function*(){let i=1;for(;i<this.maxAttempts;){try{return yield e()}catch(n){if(a&&!a(n))throw n;QS.info(n.message)}let r=this.getSleepAmount();QS.info(`Waiting ${r} seconds before trying again`),yield this.sleep(r),i++}return yield e()})}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return YS(this,void 0,void 0,function*(){return new Promise(a=>setTimeout(a,e*1e3))})}};za.RetryHelper=k6});var sE=N(oe=>{"use strict";var $$=oe&&oe.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),G$=oe&&oe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ni=oe&&oe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&$$(e,t,a);return G$(e,t),e},Gt=oe&&oe.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})},W$=oe&&oe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(oe,"__esModule",{value:!0});oe.evaluateVersions=oe.isExplicitVersion=oe.findFromManifest=oe.getManifestFromRepo=oe.findAllVersions=oe.find=oe.cacheFile=oe.cacheDir=oe.extractZip=oe.extractXar=oe.extractTar=oe.extract7z=oe.downloadTool=oe.HTTPError=void 0;var we=Ni(nt()),va=Ni(yo()),ja=Ni(require("fs")),X$=Ni(HS()),tl=Ni(require("os")),ti=Ni(require("path")),ZS=Ni(Lr()),Xi=Ni(Il()),K$=Ni(require("stream")),Y$=Ni(require("util")),so=require("assert"),eE=W$(KS()),Ar=Pn(),Q$=JS(),el=class extends Error{static{o(this,"HTTPError")}constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}};oe.HTTPError=el;var H6=process.platform==="win32",J$=process.platform==="darwin",Z$="actions/tool-cache";function eG(t,e,a,i){return Gt(this,void 0,void 0,function*(){e=e||ti.join(nE(),eE.default()),yield va.mkdirP(ti.dirname(e)),we.debug(`Downloading
Line truncated
|
||||
More info on storage limits: https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions#calculating-minute-and-storage-spending`;super(e),this.name="UsageError"}};ra.UsageError=tu;tu.isUsageErrorMessage=t=>t?t.includes("insufficient usage"):!1});var __=N(na=>{"use strict";var UU=na&&na.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),HU=na&&na.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),FU=na&&na.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&UU(e,t,a);return HU(e,t),e},VU=na&&na.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(na,"__esModule",{value:!0});na.uploadCacheArchiveSDK=na.UploadProgress=void 0;var w2=FU(nt()),$U=h2(),GU=x2(),au=class{static{o(this,"UploadProgress")}constructor(e){this.contentLength=e,this.sentBytes=0,this.displayedComplete=!1,this.startTime=Date.now()}setSentBytes(e){this.sentBytes=e}getTransferredBytes(){return this.sentBytes}isDone(){return this.getTransferredBytes()===this.contentLength}display(){if(this.displayedComplete)return;let e=this.sentBytes,a=(100*(e/this.contentLength)).toFixed(1),i=Date.now()-this.startTime,r=(e/(1024*1024)/(i/1e3)).toFixed(1);w2.info(`Sent ${e} of ${this.contentLength} (${a}%), ${r} MBs/sec`),this.isDone()&&(this.displayedComplete=!0)}onProgress(){return e=>{this.setSentBytes(e.loadedBytes)}}startDisplayTimer(e=1e3){let a=o(()=>{this.display(),this.isDone()||(this.timeoutHandle=setTimeout(a,e))},"displayCallback");this.timeoutHandle=setTimeout(a,e)}stopDisplayTimer(){this.timeoutHandle&&(clearTimeout(this.timeoutHandle),this.timeoutHandle=void 0),this.display()}};na.UploadProgress=au;function WU(t,e,a){var i;return VU(this,void 0,void 0,function*(){let r=new $U.BlobClient(t),n=r.getBlockBlobClient(),s=new au((i=a?.archiveSizeBytes)!==null&&i!==void 0?i:0),p={blockSize:a?.uploadChunkSize,concurrency:a?.uploadConcurrency,maxSingleShotSize:128*1024*1024,onProgress:s.onProgress()};try{s.startDisplayTimer(),w2.debug(`BlobClient: ${r.name}:${r.accountName}:${r.containerName}`);let l=yield n.uploadFile(e,p);if(l._response.status>=400)throw new GU.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${l._response.status}`);return l}catch(l){throw w2.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${l.message}`),l}finally{s.stopDisplayTimer()}})}o(WU,"uploadCacheArchiveSDK");na.uploadCacheArchiveSDK=WU});var _2=N(Ze=>{"use strict";var XU=Ze&&Ze.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),KU=Ze&&Ze.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),YU=Ze&&Ze.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&XU(e,t,a);return KU(e,t),e},ru=Ze&&Ze.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.retryHttpClientResponse=Ze.retryTypedResponse=Ze.retry=Ze.isRetryableStatusCode=Ze.isServerErrorStatusCode=Ze.isSuccessStatusCode=void 0;var S_=YU(nt()),iu=qr(),As=qn();function QU(t){return t?t>=200&&t<300:!1}o(QU,"isSuccessStatusCode");Ze.isSuccessStatusCode=QU;function E_(t){return t?t>=500:!0}o(E_,"isServerErrorStatusCode");Ze.isServerErrorStatusCode=E_;function C_(t){return t?[iu.HttpCodes.BadGateway,iu.HttpCodes.ServiceUnavailable,iu.HttpCodes.GatewayTimeout].includes(t):!1}o(C_,"isRetryableStatusCode");Ze.isRetryableStatusCode=C_;function JU(t){return ru(this,void 0,void 0,function*(){return new Promise(e=>setTimeout(e,t))})}o(JU,"sleep");function N2(t,e,a,i=As.DefaultRetryAttempts,r=As.DefaultRetryDelay,n=
Line truncated
|
||||
Other caches with similar key:`);for(let p of n?.artifactCaches||[])ga.debug(`Cache Key: ${p?.cacheKey}, Cache Version: ${p?.cacheVersion}, Cache Scope: ${p?.scope}, Cache Created: ${p?.creationTime}`)}}})}o(BH,"printCachesListForDiagnostics");function MH(t,e,a){return sa(this,void 0,void 0,function*(){let i=new TH.URL(t),r=(0,O2.getDownloadOptions)(a);i.hostname.endsWith(".blob.core.windows.net")?r.useAzureSdk?yield(0,ou.downloadCacheStorageSDK)(t,e,r):r.concurrentBlobDownloads?yield(0,ou.downloadCacheHttpClientConcurrent)(t,e,r):yield(0,ou.downloadCacheHttpClient)(t,e):yield(0,ou.downloadCacheHttpClient)(t,e)})}o(MH,"downloadCache");Rt.downloadCache=MH;function LH(t,e,a){return sa(this,void 0,void 0,function*(){let i=R2(),r=Ms.getCacheVersion(e,a?.compressionMethod,a?.enableCrossOsArchive),n={key:t,version:r,cacheSize:a?.cacheSize};return yield(0,Tr.retryTypedResponse)("reserveCache",()=>sa(this,void 0,void 0,function*(){return i.postJson(Lp("caches"),n)}))})}o(LH,"reserveCache");Rt.reserveCache=LH;function L_(t,e){return`bytes ${t}-${e}/*`}o(L_,"getContentRange");function qH(t,e,a,i,r){return sa(this,void 0,void 0,function*(){ga.debug(`Uploading chunk of size ${r-i+1} bytes at offset ${i} with content range: ${L_(i,r)}`);let n={"Content-Type":"application/octet-stream","Content-Range":L_(i,r)},s=yield(0,Tr.retryHttpClientResponse)(`uploadChunk (start: ${i}, end: ${r})`,()=>sa(this,void 0,void 0,function*(){return t.sendStream("PATCH",e,a(),n)}));if(!(0,Tr.isSuccessStatusCode)(s.message.statusCode))throw new Error(`Cache service responded with ${s.message.statusCode} during upload chunk.`)})}o(qH,"uploadChunk");function zH(t,e,a,i){return sa(this,void 0,void 0,function*(){let r=Ms.getArchiveFileSizeInBytes(a),n=Lp(`caches/${e.toString()}`),s=C2.openSync(a,"r"),p=(0,O2.getUploadOptions)(i),l=Ms.assertDefined("uploadConcurrency",p.uploadConcurrency),d=Ms.assertDefined("uploadChunkSize",p.uploadChunkSize),c=[...new Array(l).keys()];ga.debug("Awaiting all uploads");let u=0;try{yield Promise.all(c.map(()=>sa(this,void 0,void 0,function*(){for(;u<r;){let m=Math.min(r-u,d),f=u,h=u+m-1;u+=d,yield qH(t,n,()=>C2.createReadStream(a,{fd:s,start:f,end:h,autoClose:!1}).on("error",b=>{throw new Error(`Cache upload failed because file read failed with ${b.message}`)}),f,h)}})))}finally{C2.closeSync(s)}})}o(zH,"uploadFile");function jH(t,e,a){return sa(this,void 0,void 0,function*(){let i={size:a};return yield(0,Tr.retryTypedResponse)("commitCache",()=>sa(this,void 0,void 0,function*(){return t.postJson(Lp(`caches/${e.toString()}`),i)}))})}o(jH,"commitCache");function kH(t,e,a,i){return sa(this,void 0,void 0,function*(){if((0,O2.getUploadOptions)(i).useAzureSdk){if(!a)throw new Error("Azure Storage SDK can only be used when a signed URL is provided.");yield(0,OH.uploadCacheArchiveSDK)(a,e,i)}else{let n=R2();ga.debug("Upload cache"),yield zH(n,t,e,i),ga.debug("Commiting cache");let s=Ms.getArchiveFileSizeInBytes(e);ga.info(`Cache Size: ~${Math.round(s/(1024*1024))} MB (${s} B)`);let p=yield jH(n,t,s);if(!(0,Tr.isSuccessStatusCode)(p.statusCode))throw new Error(`Cache service responded with ${p.statusCode} during commit cache.`);ga.info("Cache saved successfully")}})}o(kH,"saveCache");Rt.saveCache=kH});var pu=N(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});Ls.isJsonObject=Ls.typeofJsonValue=void 0;function UH(t){let e=typeof t;if(e=="object"){if(Array.isArray(t))return"array";if(t===null)return"null"}return e}o(UH,"typeofJsonValue");Ls.typeofJsonValue=UH;function HH(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}o(HH,"isJsonObject");Ls.isJsonObject=HH});var du=N(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.base64encode=qs.base64decode=void 0;var $i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),lu=[];for(let t=0;t<$i.length;t++)lu[$i[t].charCodeAt(0)]=t;lu["-".charCodeAt(0)]=$i.indexOf("+");lu["_".charCodeAt(0)]=$i.indexOf("/");function FH(t){let e=t.length*3/4;t[t.length-2]=="="?e-=2:t[t.length-1]=="="&&(e-=1);let a=new Uint8Array(e),i=0,r=0,n,s=0;for(let p=0;p<t.length;p++){if(n=lu[t.charCodeAt(p)],n===void 0)switch(t[p]){case"=":r=0;case`
|
||||
`:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(r){case 0:s=n,r=1;break;case 1:a[i++]=s<<2|(n&48)>>4,s=n,r=2;break;case 2:a[i++]=(s&15)<<4|(n&60)>>2,s=n,r=3;break;case 3:a[i++]=(s&3)<<6|n,r=0;break}}if(r==1)throw Error("invalid base64 string.");return a.subarray(0,i)}o(FH,"base64decode");qs.base64decode=FH;function VH(t){let e="",a=0,i,r=0;for(let n=0;n<t.length;n++)switch(i=t[n],a){case 0:e+=$i[i>>2],r=(i&3)<<4,a=1;break;case 1:e+=$i[r|i>>4],r=(i&15)<<2,a=2;break;case 2:e+=$i[r|i>>6],e+=$i[i&63],a=0;break}return a&&(e+=$i[r],e+="=",a==1&&(e+="=")),e}o(VH,"base64encode");qs.base64encode=VH});var z_=N(cu=>{"use strict";Object.defineProperty(cu,"__esModule",{value:!0});cu.utf8read=void 0;var P2=o(t=>String.fromCharCode.apply(String,t),"fromCharCodes");function $H(t){if(t.length<1)return"";let e=0,a=[],i=[],r=0,n,s=t.length;for(;e<s;)n=t[e++],n<128?i[r++]=n:n>191&&n<224?i[r++]=(n&31)<<6|t[e++]&63:n>239&&n<365?(n=((n&7)<<18|(t[e++]&63)<<12|(t[e++]&63)<<6|t[e++]&63)-65536,i[r++]=55296+(n>>10),i[r++]=56320+(n&1023)):i[r++]=(n&15)<<12|(t[e++]&63)<<6|t[e++]&63,r>8191&&(a.push(P2(i)),r=0);return a.length?(r&&a.push(P2(i.slice(0,r))),a.join("")):P2(i.slice(0,r))}o($H,"utf8read");cu.utf8read=$H});var qp=N(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.WireType=vi.mergeBinaryOptions=vi.UnknownFieldHandler=void 0;var GH;(function(t){t.symbol=Symbol.for("protobuf-ts/unknown"),t.onRead=(a,i,r,n,s)=>{(e(i)?i[t.symbol]:i[t.symbol]=[]).push({no:r,wireType:n,data:s})},t.onWrite=(a,i,r)=>{for(let{no:n,wireType:s,data:p}of t.list(i))r.tag(n,s).raw(p)},t.list=(a,i)=>{if(e(a)){let r=a[t.symbol];return i?r.filter(n=>n.no==i):r}return[]},t.last=(a,i)=>t.list(a,i).slice(-1)[0];let e=o(a=>a&&Array.isArray(a[t.symbol]),"is")})(GH=vi.UnknownFieldHandler||(vi.UnknownFieldHandler={}));function WH(t,e){return Object.assign(Object.assign({},t),e)}o(WH,"mergeBinaryOptions");vi.mergeBinaryOptions=WH;var XH;(function(t){t[t.Varint=0]="Varint",t[t.Bit64=1]="Bit64",t[t.LengthDelimited=2]="LengthDelimited",t[t.StartGroup=3]="StartGroup",t[t.EndGroup=4]="EndGroup",t[t.Bit32=5]="Bit32"})(XH=vi.WireType||(vi.WireType={}))});var mu=N(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.varint32read=oa.varint32write=oa.int64toString=oa.int64fromString=oa.varint64write=oa.varint64read=void 0;function KH(){let t=0,e=0;for(let i=0;i<28;i+=7){let r=this.buf[this.pos++];if(t|=(r&127)<<i,!(r&128))return this.assertBounds(),[t,e]}let a=this.buf[this.pos++];if(t|=(a&15)<<28,e=(a&112)>>4,!(a&128))return this.assertBounds(),[t,e];for(let i=3;i<=31;i+=7){let r=this.buf[this.pos++];if(e|=(r&127)<<i,!(r&128))return this.assertBounds(),[t,e]}throw new Error("invalid varint")}o(KH,"varint64read");oa.varint64read=KH;function YH(t,e,a){for(let n=0;n<28;n=n+7){let s=t>>>n,p=!(!(s>>>7)&&e==0),l=(p?s|128:s)&255;if(a.push(l),!p)return}let i=t>>>28&15|(e&7)<<4,r=!!(e>>3);if(a.push((r?i|128:i)&255),!!r){for(let n=3;n<31;n=n+7){let s=e>>>n,p=!!(s>>>7),l=(p?s|128:s)&255;if(a.push(l),!p)return}a.push(e>>>31&1)}}o(YH,"varint64write");oa.varint64write=YH;var uu=65536*65536;function QH(t){let e=t[0]=="-";e&&(t=t.slice(1));let a=1e6,i=0,r=0;function n(s,p){let l=Number(t.slice(s,p));r*=a,i=i*a+l,i>=uu&&(r=r+(i/uu|0),i=i%uu)}return o(n,"add1e6digit"),n(-24,-18),n(-18,-12),n(-12,-6),n(-6),[e,i,r]}o(QH,"int64fromString");oa.int64fromString=QH;function JH(t,e){if(e>>>0<=2097151)return""+(uu*e+(t>>>0));let a=t&16777215,i=(t>>>24|e<<8)>>>0&16777215,r=e>>16&65535,n=a+i*6777216+r*6710656,s=i+r*8147497,p=r*2,l=1e7;n>=l&&(s+=Math.floor(n/l),n%=l),s>=l&&(p+=Math.floor(s/l),s%=l);function d(c,u){let m=c?String(c):"";return u?"0000000".slice(m.length)+m:m}return o(d,"decimalFrom1e7"),d(p,0)+d(s,p)+d(n,1)}o(JH,"int64toString");oa.int64toString=JH;function ZH(t,e){if(t>=0){for(;t>127;)e.push(t&127|128),t=t>>>7;e.push(t)}else{for(let a=0;a<9;a++)e.push(t&127|128),t=t>>7;e.push(1)}}o(ZH,"varint32write");oa.varint32write=ZH;function eF(){let t=this.buf[this.pos++],e=t&127;if(!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<7,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<14,!(t&128))return this.assertBounds(),e;if(t=this.buf[this.pos++],e|=(t&127)<<21,!(t&128))return this.assertBounds(),e;t=this.buf[this.pos++],e|=(t&15)<<28;for(let a=5;t&128&&a<10;a++)t=this.buf[this.pos++];if(t&128)throw new Error("invalid varint");return this.assertBounds(),e>>>0}o(eF,"varint32read");oa.varint32read=eF});var Rr=N(Or=>{"use strict";Object.defineProperty(Or,"__esModule",{value:!0});Or.PbLong=Or.PbULong=Or.detectBi=void 0;var zp=mu(),Be;function j_(){let t=new DataView(new ArrayBuffer(8));Be=globalThis.BigInt!==void 0&&typeof t.getBigInt64=="function"&&typeof t.getBigUint64=="function"&&typeof t.setBigInt64=="function"&&typeof t.setBigUint64=="function"?{MIN:BigInt("-9223372036854775808"),MAX:BigInt("9223372036854775807"),UMIN:BigInt("0"),UMAX:BigInt("18446744073709551615"),C:
Line truncated
|
||||
`)}};ku.RpcError=i6});var n6=N(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});Hu.mergeRpcOptions=void 0;var gS=lt();function NV(t,e){if(!e)return t;let a={};Uu(t,a),Uu(e,a);for(let i of Object.keys(e)){let r=e[i];switch(i){case"jsonOptions":a.jsonOptions=gS.mergeJsonOptions(t.jsonOptions,a.jsonOptions);break;case"binaryOptions":a.binaryOptions=gS.mergeBinaryOptions(t.binaryOptions,a.binaryOptions);break;case"meta":a.meta={},Uu(t.meta,a.meta),Uu(e.meta,a.meta);break;case"interceptors":a.interceptors=t.interceptors?t.interceptors.concat(r):r.concat();break}}return a}o(NV,"mergeRpcOptions");Hu.mergeRpcOptions=NV;function Uu(t,e){if(!t)return;let a=e;for(let[i,r]of Object.entries(t))r instanceof Date?a[i]=new Date(r.getTime()):Array.isArray(r)?a[i]=r.concat():a[i]=r}o(Uu,"copy")});var o6=N(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.Deferred=yn.DeferredState=void 0;var wi;(function(t){t[t.PENDING=0]="PENDING",t[t.REJECTED=1]="REJECTED",t[t.RESOLVED=2]="RESOLVED"})(wi=yn.DeferredState||(yn.DeferredState={}));var s6=class{static{o(this,"Deferred")}constructor(e=!0){this._state=wi.PENDING,this._promise=new Promise((a,i)=>{this._resolve=a,this._reject=i}),e&&this._promise.catch(a=>{})}get state(){return this._state}get promise(){return this._promise}resolve(e){if(this.state!==wi.PENDING)throw new Error(`cannot resolve ${wi[this.state].toLowerCase()}`);this._resolve(e),this._state=wi.RESOLVED}reject(e){if(this.state!==wi.PENDING)throw new Error(`cannot reject ${wi[this.state].toLowerCase()}`);this._reject(e),this._state=wi.REJECTED}resolvePending(e){this._state===wi.PENDING&&this.resolve(e)}rejectPending(e){this._state===wi.PENDING&&this.reject(e)}};yn.Deferred=s6});var l6=N(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});Fu.RpcOutputStreamController=void 0;var yS=o6(),vn=lt(),p6=class{static{o(this,"RpcOutputStreamController")}constructor(){this._lis={nxt:[],msg:[],err:[],cmp:[]},this._closed=!1}onNext(e){return this.addLis(e,this._lis.nxt)}onMessage(e){return this.addLis(e,this._lis.msg)}onError(e){return this.addLis(e,this._lis.err)}onComplete(e){return this.addLis(e,this._lis.cmp)}addLis(e,a){return a.push(e),()=>{let i=a.indexOf(e);i>=0&&a.splice(i,1)}}clearLis(){for(let e of Object.values(this._lis))e.splice(0,e.length)}get closed(){return this._closed!==!1}notifyNext(e,a,i){vn.assert((e?1:0)+(a?1:0)+(i?1:0)<=1,"only one emission at a time"),e&&this.notifyMessage(e),a&&this.notifyError(a),i&&this.notifyComplete()}notifyMessage(e){vn.assert(!this.closed,"stream is closed"),this.pushIt({value:e,done:!1}),this._lis.msg.forEach(a=>a(e)),this._lis.nxt.forEach(a=>a(e,void 0,!1))}notifyError(e){vn.assert(!this.closed,"stream is closed"),this._closed=e,this.pushIt(e),this._lis.err.forEach(a=>a(e)),this._lis.nxt.forEach(a=>a(void 0,e,!1)),this.clearLis()}notifyComplete(){vn.assert(!this.closed,"stream is closed"),this._closed=!0,this.pushIt({value:null,done:!0}),this._lis.cmp.forEach(e=>e()),this._lis.nxt.forEach(e=>e(void 0,void 0,!0)),this.clearLis()}[Symbol.asyncIterator](){return this._itState||(this._itState={q:[]}),this._closed===!0?this.pushIt({value:null,done:!0}):this._closed!==!1&&this.pushIt(this._closed),{next:()=>{let e=this._itState;vn.assert(e,"bad state"),vn.assert(!e.p,"iterator contract broken");let a=e.q.shift();return a?"value"in a?Promise.resolve(a):Promise.reject(a):(e.p=new yS.Deferred,e.p.promise)}}}pushIt(e){let a=this._itState;if(a)if(a.p){let i=a.p;vn.assert(i.state==yS.DeferredState.PENDING,"iterator contract broken"),"value"in e?i.resolve(e):i.reject(e),delete a.p}else a.q.push(e)}};Fu.RpcOutputStreamController=p6});var c6=N(Vs=>{"use strict";var _V=Vs&&Vs.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(Vs,"__esModule",{value:!0});Vs.UnaryCall=void 0;var d6=class{static{o(this,"UnaryCall")}constructor(e,a,i,r,n,s,p){this.method=e,this.requestHeaders=a,this.request=i,this.headers=r,this.response=n,this.status=s,this.trailers=p}then(e,a){return this.promiseFinished().then(i=>e?Promise.resolve(e(i)):i,i=>a?Promise.resolve(a(i)):Promise.reject(i))}promiseFinished(){return _V(this,void 0,void 0,function*(){let[e,a,i,r]=yield Promise.all([this.headers,this.response,this.status,this.trailers]);return{method:this.method,requestHeaders:this.requestHeaders,request:this.request,headers:e,response:a,status:i,trailers:r}})}};Vs.UnaryCall=d6});var m6=N($s=>{"use strict";var SV=$s&&$s.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function
Line truncated
|
||||
`));let i=yield M6(a,"create");yield L6(i,t)})}o(v$,"createTar");Ut.createTar=v$});var jS=N(dt=>{"use strict";var b$=dt&&dt.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a);var r=Object.getOwnPropertyDescriptor(e,a);(!r||("get"in r?!e.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return e[a]}}),Object.defineProperty(t,i,r)}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),x$=dt&&dt.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Jp=dt&&dt.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.prototype.hasOwnProperty.call(t,a)&&b$(e,t,a);return x$(e,t),e},so=dt&&dt.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(dt,"__esModule",{value:!0});dt.saveCache=dt.restoreCache=dt.isFeatureAvailable=dt.ReserveCacheError=dt.ValidationError=void 0;var re=Jp(nt()),Qu=Jp(require("path")),Ue=Jp(jn()),no=Jp(q_()),qS=Jp(AS()),Ju=nu(),Dr=LS(),w$=qn(),qa=class t extends Error{static{o(this,"ValidationError")}constructor(e){super(e),this.name="ValidationError",Object.setPrototypeOf(this,t.prototype)}};dt.ValidationError=qa;var bn=class t extends Error{static{o(this,"ReserveCacheError")}constructor(e){super(e),this.name="ReserveCacheError",Object.setPrototypeOf(this,t.prototype)}};dt.ReserveCacheError=bn;function zS(t){if(!t||t.length===0)throw new qa("Path Validation Error: At least one directory or file path is required")}o(zS,"checkPaths");function q6(t){if(t.length>512)throw new qa(`Key Validation Error: ${t} cannot be larger than 512 characters.`);if(!/^[^,]*$/.test(t))throw new qa(`Key Validation Error: ${t} cannot contain commas.`)}o(q6,"checkKey");function N$(){return!!process.env.ACTIONS_CACHE_URL}o(N$,"isFeatureAvailable");dt.isFeatureAvailable=N$;function _$(t,e,a,i,r=!1){return so(this,void 0,void 0,function*(){let n=(0,Ju.getCacheServiceVersion)();switch(re.debug(`Cache service version: ${n}`),zS(t),n){case"v2":return yield E$(t,e,a,i,r);case"v1":default:return yield S$(t,e,a,i,r)}})}o(_$,"restoreCache");dt.restoreCache=_$;function S$(t,e,a,i,r=!1){return so(this,void 0,void 0,function*(){a=a||[];let n=[e,...a];if(re.debug("Resolved Keys:"),re.debug(JSON.stringify(n)),n.length>10)throw new qa("Key Validation Error: Keys are limited to a maximum of 10.");for(let l of n)q6(l);let s=yield Ue.getCompressionMethod(),p="";try{let l=yield no.getCacheEntry(n,t,{compressionMethod:s,enableCrossOsArchive:r});if(!l?.archiveLocation)return;if(i?.lookupOnly)return re.info("Lookup only - skipping download"),l.cacheKey;p=Qu.join(yield Ue.createTempDirectory(),Ue.getCacheFileName(s)),re.debug(`Archive Path: ${p}`),yield no.downloadCache(l.archiveLocation,p,i),re.isDebug()&&(yield(0,Dr.listTar)(p,s));let d=Ue.getArchiveFileSizeInBytes(p);return re.info(`Cache Size: ~${Math.round(d/(1024*1024))} MB (${d} B)`),yield(0,Dr.extractTar)(p,s),re.info("Cache restored successfully"),l.cacheKey}catch(l){if(l.name===qa.name)throw l;re.warning(`Failed to restore: ${l.message}`)}finally{try{yield Ue.unlinkFile(p)}catch(l){re.debug(`Failed to delete archive: ${l}`)}}})}o(S$,"restoreCacheV1");function E$(t,e,a,i,r=!1){return so(this,void 0,void 0,function*(){i=Object.assign(Object.assign({},i),{useAzureSdk:!0}),a=a||[];let n=[e,...a];if(re.debug("Resolved Keys:"),re.debug(JSON.stringify(n)),n.length>10)throw new qa("Key Validation Error: Keys are limited to a maximum of 10.");for(let p of n)q6(p);let s="";try{let p=qS.internalCacheTwirpClient(),l=yield Ue.getCompressionMethod(),d={key:e,restoreKeys:a,version:Ue.getCacheVersion(t,l,r)},c=yield p.GetCacheEntryDownloadURL(d);if(!c.ok){re.debug(`Cache not found for version ${d.version} of keys: ${n.join(", ")}`);return}if(re.info(`Cache hit for: ${d.key}`),i?.lookupOnly)return re.info("Lookup only - skipping download"),c.matchedKey;s=Qu.join(yield Ue.createTempDirectory(),Ue.getCacheFileName(l)),re.debug(`Archive path: ${s}`),re.debug(`Starting download of archive to: ${s}`),yield no.downloadCache(c.signedDownloadUrl,s,i);let u=Ue.getArchiveFileSizeInBytes(s);return re.info(`Cache Size: ~${Math.round(u/(1024*1024))} MB (${u} B)`),re.isDebug()&&(yield(0,Dr.listTar)(s,l)),yield(0,Dr.extractTar)(s,l),re.info("Cache restored successfully"),c.matchedKey}catch(p){if(p.name===qa.name)throw p;re.warning(`Failed to restore: ${p.message}`)}finally{try{s&&(yield Ue.unlinkFile(s))}catch(p){re.debug(`Failed to delete archive: ${p}`)}}})}o(E$,"restoreCacheV2");function C$(t,e,a,i=!1){return so(this,void 0,void 0,function*(){let r=(0,Ju.getCacheServiceVersion)();switch(re.debug(`Cache servLine truncated
|
||||
`);for(let r of i){let n=r.split("=");if(n.length===2&&(n[0].trim()==="VERSION_ID"||n[0].trim()==="DISTRIB_RELEASE")){e=n[1].trim().replace(/^"/,"").replace(/"$/,"");break}}}}return e}o(M$,"_getOsVersion");Ht._getOsVersion=M$;function L$(){let t="/etc/lsb-release",e="/etc/os-release",a="";return Zu.existsSync(t)?a=Zu.readFileSync(t).toString():Zu.existsSync(e)&&(a=Zu.readFileSync(e).toString()),a}o(L$,"_readLinuxVersionFile");Ht._readLinuxVersionFile=L$});var VS=N((bte,FS)=>{var q$=require("crypto");FS.exports=o(function(){return q$.randomBytes(16)},"nodeRNG")});var WS=N((wte,GS)=>{var $S=[];for(Zp=0;Zp<256;++Zp)$S[Zp]=(Zp+256).toString(16).substr(1);var Zp;function z$(t,e){var a=e||0,i=$S;return[i[t[a++]],i[t[a++]],i[t[a++]],i[t[a++]],"-",i[t[a++]],i[t[a++]],"-",i[t[a++]],i[t[a++]],"-",i[t[a++]],i[t[a++]],"-",i[t[a++]],i[t[a++]],i[t[a++]],i[t[a++]],i[t[a++]],i[t[a++]]].join("")}o(z$,"bytesToUuid");GS.exports=z$});var KS=N((_te,XS)=>{var j$=VS(),k$=WS();function U$(t,e,a){var i=e&&a||0;typeof t=="string"&&(e=t==="binary"?new Array(16):null,t=null),t=t||{};var r=t.random||(t.rng||j$)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e)for(var n=0;n<16;++n)e[i+n]=r[n];return e||k$(r)}o(U$,"v4");XS.exports=U$});var JS=N(za=>{"use strict";var H$=za&&za.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),F$=za&&za.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),V$=za&&za.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&H$(e,t,a);return F$(e,t),e},YS=za&&za.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})};Object.defineProperty(za,"__esModule",{value:!0});za.RetryHelper=void 0;var QS=V$(nt()),k6=class{static{o(this,"RetryHelper")}constructor(e,a,i){if(e<1)throw new Error("max attempts should be greater than or equal to 1");if(this.maxAttempts=e,this.minSeconds=Math.floor(a),this.maxSeconds=Math.floor(i),this.minSeconds>this.maxSeconds)throw new Error("min seconds should be less than or equal to max seconds")}execute(e,a){return YS(this,void 0,void 0,function*(){let i=1;for(;i<this.maxAttempts;){try{return yield e()}catch(n){if(a&&!a(n))throw n;QS.info(n.message)}let r=this.getSleepAmount();QS.info(`Waiting ${r} seconds before trying again`),yield this.sleep(r),i++}return yield e()})}getSleepAmount(){return Math.floor(Math.random()*(this.maxSeconds-this.minSeconds+1))+this.minSeconds}sleep(e){return YS(this,void 0,void 0,function*(){return new Promise(a=>setTimeout(a,e*1e3))})}};za.RetryHelper=k6});var sE=N(oe=>{"use strict";var $$=oe&&oe.__createBinding||(Object.create?function(t,e,a,i){i===void 0&&(i=a),Object.defineProperty(t,i,{enumerable:!0,get:function(){return e[a]}})}:function(t,e,a,i){i===void 0&&(i=a),t[i]=e[a]}),G$=oe&&oe.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Ni=oe&&oe.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var a in t)a!=="default"&&Object.hasOwnProperty.call(t,a)&&$$(e,t,a);return G$(e,t),e},Gt=oe&&oe.__awaiter||function(t,e,a,i){function r(n){return n instanceof a?n:new a(function(s){s(n)})}return o(r,"adopt"),new(a||(a=Promise))(function(n,s){function p(c){try{d(i.next(c))}catch(u){s(u)}}o(p,"fulfilled");function l(c){try{d(i.throw(c))}catch(u){s(u)}}o(l,"rejected");function d(c){c.done?n(c.value):r(c.value).then(p,l)}o(d,"step"),d((i=i.apply(t,e||[])).next())})},W$=oe&&oe.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(oe,"__esModule",{value:!0});oe.evaluateVersions=oe.isExplicitVersion=oe.findFromManifest=oe.getManifestFromRepo=oe.findAllVersions=oe.find=oe.cacheFile=oe.cacheDir=oe.extractZip=oe.extractXar=oe.extractTar=oe.extract7z=oe.downloadTool=oe.HTTPError=void 0;var we=Ni(nt()),va=Ni(yo()),ja=Ni(require("fs")),X$=Ni(HS()),tl=Ni(require("os")),ti=Ni(require("path")),ZS=Ni(qr()),Xi=Ni(Il()),K$=Ni(require("stream")),Y$=Ni(require("util")),oo=require("assert"),eE=W$(KS()),Ar=In(),Q$=JS(),el=class extends Error{static{o(this,"HTTPError")}constructor(e){super(`Unexpected HTTP response: ${e}`),this.httpStatusCode=e,Object.setPrototypeOf(this,new.target.prototype)}};oe.HTTPError=el;var H6=process.platform==="win32",J$=process.platform==="darwin",Z$="actions/tool-cache";function eG(t,e,a,i){return Gt(this,void 0,void 0,function*(){e=e||ti.join(nE(),eE.default()),yield va.mkdirP(ti.dirname(e)),we.debug(`Downloading
Line truncated
|
||||
`,[CHAR_f]:"\f",[CHAR_r]:"\r",[CHAR_QUOT]:'"',[CHAR_BSOL]:"\\"};function isDigit(t){return t>=CHAR_0&&t<=CHAR_9}o(isDigit,"isDigit");function isHexit(t){return t>=CHAR_A&&t<=CHAR_F||t>=CHAR_a&&t<=CHAR_f||t>=CHAR_0&&t<=CHAR_9}o(isHexit,"isHexit");function isBit(t){return t===CHAR_1||t===CHAR_0}o(isBit,"isBit");function isOctit(t){return t>=CHAR_0&&t<=CHAR_7}o(isOctit,"isOctit");function isAlphaNumQuoteHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_APOS||t===CHAR_QUOT||t===CHAR_LOWBAR||t===CHAR_HYPHEN}o(isAlphaNumQuoteHyphen,"isAlphaNumQuoteHyphen");function isAlphaNumHyphen(t){return t>=CHAR_A&&t<=CHAR_Z||t>=CHAR_a&&t<=CHAR_z||t>=CHAR_0&&t<=CHAR_9||t===CHAR_LOWBAR||t===CHAR_HYPHEN}o(isAlphaNumHyphen,"isAlphaNumHyphen");var _type=Symbol("type"),_declared=Symbol("declared"),hasOwnProperty=Object.prototype.hasOwnProperty,defineProperty=Object.defineProperty,descriptor={configurable:!0,enumerable:!0,writable:!0,value:void 0};function hasKey(t,e){return hasOwnProperty.call(t,e)?!0:(e==="__proto__"&&defineProperty(t,"__proto__",descriptor),!1)}o(hasKey,"hasKey");var INLINE_TABLE=Symbol("inline-table");function InlineTable(){return Object.defineProperties({},{[_type]:{value:INLINE_TABLE}})}o(InlineTable,"InlineTable");function isInlineTable(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_TABLE}o(isInlineTable,"isInlineTable");var TABLE=Symbol("table");function Table(){return Object.defineProperties({},{[_type]:{value:TABLE},[_declared]:{value:!1,writable:!0}})}o(Table,"Table");function isTable(t){return t===null||typeof t!="object"?!1:t[_type]===TABLE}o(isTable,"isTable");var _contentType=Symbol("content-type"),INLINE_LIST=Symbol("inline-list");function InlineList(t){return Object.defineProperties([],{[_type]:{value:INLINE_LIST},[_contentType]:{value:t}})}o(InlineList,"InlineList");function isInlineList(t){return t===null||typeof t!="object"?!1:t[_type]===INLINE_LIST}o(isInlineList,"isInlineList");var LIST=Symbol("list");function List(){return Object.defineProperties([],{[_type]:{value:LIST}})}o(List,"List");function isList(t){return t===null||typeof t!="object"?!1:t[_type]===LIST}o(isList,"isList");var _custom;try{let utilInspect=eval("require('util').inspect");_custom=utilInspect.custom}catch(t){}var _inspect=_custom||"inspect",BoxedBigInt=class{static{o(this,"BoxedBigInt")}constructor(e){try{this.value=global.BigInt.asIntN(64,e)}catch{this.value=null}Object.defineProperty(this,_type,{value:INTEGER})}isNaN(){return this.value===null}toString(){return String(this.value)}[_inspect](){return`[BigInt: ${this.toString()}]}`}valueOf(){return this.value}},INTEGER=Symbol("integer");function Integer(t){let e=Number(t);return Object.is(e,-0)&&(e=0),global.BigInt&&!Number.isSafeInteger(e)?new BoxedBigInt(t):Object.defineProperties(new Number(e),{isNaN:{value:function(){return isNaN(this)}},[_type]:{value:INTEGER},[_inspect]:{value:()=>`[Integer: ${t}]`}})}o(Integer,"Integer");function isInteger(t){return t===null||typeof t!="object"?!1:t[_type]===INTEGER}o(isInteger,"isInteger");var FLOAT=Symbol("float");function Float(t){return Object.defineProperties(new Number(t),{[_type]:{value:FLOAT},[_inspect]:{value:()=>`[Float: ${t}]`}})}o(Float,"Float");function isFloat(t){return t===null||typeof t!="object"?!1:t[_type]===FLOAT}o(isFloat,"isFloat");function tomlType(t){let e=typeof t;if(e==="object"){if(t===null)return"null";if(t instanceof Date)return"datetime";if(_type in t)switch(t[_type]){case INLINE_TABLE:return"inline-table";case INLINE_LIST:return"inline-list";case TABLE:return"table";case LIST:return"list";case FLOAT:return"float";case INTEGER:return"integer"}}return e}o(tomlType,"tomlType");function makeParserClass(t){class e extends t{static{o(this,"TOMLParser")}constructor(){super(),this.ctx=this.obj=Table()}atEndOfWord(){return this.char===CHAR_NUM||this.char===CTRL_I||this.char===CHAR_SP||this.atEndOfLine()}atEndOfLine(){return this.char===t.END||this.char===CTRL_J||this.char===CTRL_M}parseStart(){if(this.char===t.END)return null;if(this.char===CHAR_LSQB)return this.call(this.parseTableOrList);if(this.char===CHAR_NUM)return this.call(this.parseComment);if(this.char===CTRL_J||this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(isAlphaNumQuoteHyphen(this.char))return this.callNow(this.parseAssignStatement);throw this.error(new TomlError(`Unknown character "${this.char}"`))}parseWhitespaceToEOL(){if(this.char===CHAR_SP||this.char===CTRL_I||this.char===CTRL_M)return null;if(this.char===CHAR_NUM)return this.goto(this.parseComment);if(this.char===t.END||this.char===CTRL_J)return this.return();throw this.error(new TomlError("Unexpected character, expected only whitespace or comments till end of line"))}parseAssignStatement(){return this.callNow(this.parseAssign,this.recordAssignStatement)}recordAssignStatement(i){let r=this.ctx,n=i.key.pop();for(let s of i.key){if(hasKey(r,s)&&(!isTable(r[s])||r[s][_declared]))throw this.error(new TomlError("Can'
Line truncated
|
||||
`,e&&e.split){let i=e.split(/\n/),r=String(Math.min(i.length,t.line+3)).length,n=" ";for(;n.length<r;)n+=" ";for(let s=Math.max(0,t.line-1);s<Math.min(i.length,t.line+2);++s){let p=String(s+1);if(p.length<r&&(p=" "+p),t.line===s){a+=p+"> "+i[s]+`
|
||||
`,a+=n+" ";for(let l=0;l<t.col;++l)a+=" ";a+=`^
|
||||
`}else a+=p+": "+i[s]+`
|
||||
`}}return t.message=a+`
|
||||
`,t}o(hG,"prettyError")});var wE=N((Hte,xE)=>{"use strict";xE.exports=vG;var gG=nm(),yG=sm();function vG(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new gG;try{return e.parse(t),e.finish()}catch(a){throw yG(a,t)}}o(vG,"parseString")});var SE=N((Vte,_E)=>{"use strict";_E.exports=xG;var bG=nm(),NE=sm();function xG(t,e){e||(e={});let a=0,i=e.blocksize||40960,r=new bG;return new Promise((s,p)=>{setImmediate(n,a,i,s,p)});function n(s,p,l,d){if(s>=t.length)try{return l(r.finish())}catch(c){return d(NE(c,t))}try{r.parse(t.slice(s,s+p)),setImmediate(n,s+p,p,l,d)}catch(c){d(NE(c,t))}}}o(xG,"parseAsync")});var TE=N((Gte,CE)=>{"use strict";CE.exports=NG;var wG=require("stream"),EE=nm();function NG(t){return t?_G(t):SG(t)}o(NG,"parseStream");function _G(t){let e=new EE;return t.setEncoding("utf8"),new Promise((a,i)=>{let r,n=!1,s=!1;function p(){if(n=!0,!r)try{a(e.finish())}catch(c){i(c)}}o(p,"finish");function l(c){s=!0,i(c)}o(l,"error"),t.once("end",p),t.once("error",l),d();function d(){r=!0;let c;for(;(c=t.read())!==null;)try{e.parse(c)}catch(u){return l(u)}if(r=!1,n)return p();s||t.once("readable",d)}o(d,"readNext")})}o(_G,"parseReadable");function SG(){let t=new EE;return new wG.Transform({objectMode:!0,transform(e,a,i){try{t.parse(e.toString(a))}catch(r){this.emit("error",r)}i()},flush(e){try{this.push(t.finish())}catch(a){this.emit("error",a)}e()}})}o(SG,"parseTransform")});var OE=N((Xte,il)=>{"use strict";il.exports=wE();il.exports.async=SE();il.exports.stream=TE();il.exports.prettyError=sm()});var LE=N((Kte,K6)=>{"use strict";K6.exports=EG;K6.exports.value=X6;function EG(t){if(t===null)throw xn("null");if(t===void 0)throw xn("undefined");if(typeof t!="object")throw xn(typeof t);if(typeof t.toJSON=="function"&&(t=t.toJSON()),t==null)return null;let e=la(t);if(e!=="table")throw xn(e);return W6("","",t)}o(EG,"stringify");function xn(t){return new Error("Can only stringify objects, not "+t)}o(xn,"typeError");function CG(){return new Error("Array values can't have mixed types")}o(CG,"arrayOneTypeError");function RE(t){return Object.keys(t).filter(e=>PE(t[e]))}o(RE,"getInlineKeys");function TG(t){return Object.keys(t).filter(e=>!PE(t[e]))}o(TG,"getComplexKeys");function om(t){let e=Array.isArray(t)?[]:Object.prototype.hasOwnProperty.call(t,"__proto__")?{["__proto__"]:void 0}:{};for(let a of Object.keys(t))t[a]&&typeof t[a].toJSON=="function"&&!("toISOString"in t[a])?e[a]=t[a].toJSON():e[a]=t[a];return e}o(om,"toJSON");function W6(t,e,a){a=om(a);var i,r;i=RE(a),r=TG(a);var n=[],s=e||"";i.forEach(l=>{var d=la(a[l]);d!=="undefined"&&d!=="null"&&n.push(s+pm(l)+" = "+AE(a[l],!0))}),n.length>0&&n.push("");var p=t&&i.length>0?e+" ":"";return r.forEach(l=>{n.push(zG(t,p,l,a[l]))}),n.join(`
|
||||
`,t}o(hG,"prettyError")});var wE=N((Hte,xE)=>{"use strict";xE.exports=vG;var gG=nm(),yG=sm();function vG(t){global.Buffer&&global.Buffer.isBuffer(t)&&(t=t.toString("utf8"));let e=new gG;try{return e.parse(t),e.finish()}catch(a){throw yG(a,t)}}o(vG,"parseString")});var SE=N((Vte,_E)=>{"use strict";_E.exports=xG;var bG=nm(),NE=sm();function xG(t,e){e||(e={});let a=0,i=e.blocksize||40960,r=new bG;return new Promise((s,p)=>{setImmediate(n,a,i,s,p)});function n(s,p,l,d){if(s>=t.length)try{return l(r.finish())}catch(c){return d(NE(c,t))}try{r.parse(t.slice(s,s+p)),setImmediate(n,s+p,p,l,d)}catch(c){d(NE(c,t))}}}o(xG,"parseAsync")});var TE=N((Gte,CE)=>{"use strict";CE.exports=NG;var wG=require("stream"),EE=nm();function NG(t){return t?_G(t):SG(t)}o(NG,"parseStream");function _G(t){let e=new EE;return t.setEncoding("utf8"),new Promise((a,i)=>{let r,n=!1,s=!1;function p(){if(n=!0,!r)try{a(e.finish())}catch(c){i(c)}}o(p,"finish");function l(c){s=!0,i(c)}o(l,"error"),t.once("end",p),t.once("error",l),d();function d(){r=!0;let c;for(;(c=t.read())!==null;)try{e.parse(c)}catch(u){return l(u)}if(r=!1,n)return p();s||t.once("readable",d)}o(d,"readNext")})}o(_G,"parseReadable");function SG(){let t=new EE;return new wG.Transform({objectMode:!0,transform(e,a,i){try{t.parse(e.toString(a))}catch(r){this.emit("error",r)}i()},flush(e){try{this.push(t.finish())}catch(a){this.emit("error",a)}e()}})}o(SG,"parseTransform")});var OE=N((Xte,il)=>{"use strict";il.exports=wE();il.exports.async=SE();il.exports.stream=TE();il.exports.prettyError=sm()});var LE=N((Kte,K6)=>{"use strict";K6.exports=EG;K6.exports.value=X6;function EG(t){if(t===null)throw wn("null");if(t===void 0)throw wn("undefined");if(typeof t!="object")throw wn(typeof t);if(typeof t.toJSON=="function"&&(t=t.toJSON()),t==null)return null;let e=la(t);if(e!=="table")throw wn(e);return W6("","",t)}o(EG,"stringify");function wn(t){return new Error("Can only stringify objects, not "+t)}o(wn,"typeError");function CG(){return new Error("Array values can't have mixed types")}o(CG,"arrayOneTypeError");function RE(t){return Object.keys(t).filter(e=>PE(t[e]))}o(RE,"getInlineKeys");function TG(t){return Object.keys(t).filter(e=>!PE(t[e]))}o(TG,"getComplexKeys");function om(t){let e=Array.isArray(t)?[]:Object.prototype.hasOwnProperty.call(t,"__proto__")?{["__proto__"]:void 0}:{};for(let a of Object.keys(t))t[a]&&typeof t[a].toJSON=="function"&&!("toISOString"in t[a])?e[a]=t[a].toJSON():e[a]=t[a];return e}o(om,"toJSON");function W6(t,e,a){a=om(a);var i,r;i=RE(a),r=TG(a);var n=[],s=e||"";i.forEach(l=>{var d=la(a[l]);d!=="undefined"&&d!=="null"&&n.push(s+pm(l)+" = "+AE(a[l],!0))}),n.length>0&&n.push("");var p=t&&i.length>0?e+" ":"";return r.forEach(l=>{n.push(zG(t,p,l,a[l]))}),n.join(`
|
||||
`)}o(W6,"stringifyObject");function PE(t){switch(la(t)){case"undefined":case"null":case"integer":case"nan":case"float":case"boolean":case"string":case"datetime":return!0;case"array":return t.length===0||la(t[0])!=="table";case"table":return Object.keys(t).length===0;default:return!1}}o(PE,"isInline");function la(t){return t===void 0?"undefined":t===null?"null":typeof t=="bigint"||Number.isInteger(t)&&!Object.is(t,-0)?"integer":typeof t=="number"?"float":typeof t=="boolean"?"boolean":typeof t=="string"?"string":"toISOString"in t?isNaN(t)?"undefined":"datetime":Array.isArray(t)?"array":"table"}o(la,"tomlType");function pm(t){var e=String(t);return/^[-A-Za-z0-9_]+$/.test(e)?e:IE(e)}o(pm,"stringifyKey");function IE(t){return'"'+DE(t).replace(/"/g,'\\"')+'"'}o(IE,"stringifyBasicString");function OG(t){return"'"+t+"'"}o(OG,"stringifyLiteralString");function RG(t,e){for(;e.length<t;)e="0"+e;return e}o(RG,"numpad");function DE(t){return t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/([\u0000-\u001f\u007f])/,e=>"\\u"+RG(4,e.codePointAt(0).toString(16)))}o(DE,"escapeString");function PG(t){let e=t.split(/\n/).map(a=>DE(a).replace(/"(?="")/g,'\\"')).join(`
|
||||
`);return e.slice(-1)==='"'&&(e+=`\\
|
||||
`),`"""
|
||||
`+e+'"""'}o(PG,"stringifyMultilineString");function AE(t,e){let a=la(t);return a==="string"&&(e&&/\n/.test(t)?a="string-multiline":!/[\b\t\n\f\r']/.test(t)&&/"/.test(t)&&(a="string-literal")),X6(t,a)}o(AE,"stringifyAnyInline");function X6(t,e){switch(e||(e=la(t)),e){case"string-multiline":return PG(t);case"string":return IE(t);case"string-literal":return OG(t);case"integer":return BE(t);case"float":return IG(t);case"boolean":return DG(t);case"datetime":return AG(t);case"array":return LG(t.filter(a=>la(a)!=="null"&&la(a)!=="undefined"&&la(a)!=="nan"));case"table":return qG(t);default:throw xn(e)}}o(X6,"stringifyInline");function BE(t){return String(t).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}o(BE,"stringifyInteger");function IG(t){if(t===1/0)return"inf";if(t===-1/0)return"-inf";if(Object.is(t,NaN))return"nan";if(Object.is(t,-0))return"-0.0";var e=String(t).split("."),a=e[0],i=e[1]||0;return BE(a)+"."+i}o(IG,"stringifyFloat");function DG(t){return String(t)}o(DG,"stringifyBoolean");function AG(t){return t.toISOString()}o(AG,"stringifyDatetime");function BG(t){return t==="float"||t==="integer"}o(BG,"isNumber");function MG(t){var e=la(t[0]);return t.every(a=>la(a)===e)?e:t.every(a=>BG(la(a)))?"float":"mixed"}o(MG,"arrayType");function ME(t){let e=MG(t);if(e==="mixed")throw CG();return e}o(ME,"validateArray");function LG(t){t=om(t);let e=ME(t);var a="[",i=t.map(r=>X6(r,e));return i.join(", ").length>60||/\n/.test(i)?a+=`
|
||||
`+e+'"""'}o(PG,"stringifyMultilineString");function AE(t,e){let a=la(t);return a==="string"&&(e&&/\n/.test(t)?a="string-multiline":!/[\b\t\n\f\r']/.test(t)&&/"/.test(t)&&(a="string-literal")),X6(t,a)}o(AE,"stringifyAnyInline");function X6(t,e){switch(e||(e=la(t)),e){case"string-multiline":return PG(t);case"string":return IE(t);case"string-literal":return OG(t);case"integer":return BE(t);case"float":return IG(t);case"boolean":return DG(t);case"datetime":return AG(t);case"array":return LG(t.filter(a=>la(a)!=="null"&&la(a)!=="undefined"&&la(a)!=="nan"));case"table":return qG(t);default:throw wn(e)}}o(X6,"stringifyInline");function BE(t){return String(t).replace(/\B(?=(\d{3})+(?!\d))/g,"_")}o(BE,"stringifyInteger");function IG(t){if(t===1/0)return"inf";if(t===-1/0)return"-inf";if(Object.is(t,NaN))return"nan";if(Object.is(t,-0))return"-0.0";var e=String(t).split("."),a=e[0],i=e[1]||0;return BE(a)+"."+i}o(IG,"stringifyFloat");function DG(t){return String(t)}o(DG,"stringifyBoolean");function AG(t){return t.toISOString()}o(AG,"stringifyDatetime");function BG(t){return t==="float"||t==="integer"}o(BG,"isNumber");function MG(t){var e=la(t[0]);return t.every(a=>la(a)===e)?e:t.every(a=>BG(la(a)))?"float":"mixed"}o(MG,"arrayType");function ME(t){let e=MG(t);if(e==="mixed")throw CG();return e}o(ME,"validateArray");function LG(t){t=om(t);let e=ME(t);var a="[",i=t.map(r=>X6(r,e));return i.join(", ").length>60||/\n/.test(i)?a+=`
|
||||
`+i.join(`,
|
||||
`)+`
|
||||
`:a+=" "+i.join(", ")+(i.length>0?" ":""),a+"]"}o(LG,"stringifyInlineArray");function qG(t){t=om(t);var e=[];return Object.keys(t).forEach(a=>{e.push(pm(a)+" = "+AE(t[a],!1))}),"{ "+e.join(", ")+(e.length>0?" ":"")+"}"}o(qG,"stringifyInlineTable");function zG(t,e,a,i){var r=la(i);if(r==="array")return jG(t,e,a,i);if(r==="table")return kG(t,e,a,i);throw xn(r)}o(zG,"stringifyComplex");function jG(t,e,a,i){i=om(i),ME(i);var r=la(i[0]);if(r!=="table")throw xn(r);var n=t+pm(a),s="";return i.forEach(p=>{s.length>0&&(s+=`
|
||||
`:a+=" "+i.join(", ")+(i.length>0?" ":""),a+"]"}o(LG,"stringifyInlineArray");function qG(t){t=om(t);var e=[];return Object.keys(t).forEach(a=>{e.push(pm(a)+" = "+AE(t[a],!1))}),"{ "+e.join(", ")+(e.length>0?" ":"")+"}"}o(qG,"stringifyInlineTable");function zG(t,e,a,i){var r=la(i);if(r==="array")return jG(t,e,a,i);if(r==="table")return kG(t,e,a,i);throw wn(r)}o(zG,"stringifyComplex");function jG(t,e,a,i){i=om(i),ME(i);var r=la(i[0]);if(r!=="table")throw wn(r);var n=t+pm(a),s="";return i.forEach(p=>{s.length>0&&(s+=`
|
||||
`),s+=e+"[["+n+`]]
|
||||
`,s+=W6(n+".",e,p)}),s}o(jG,"stringifyArrayOfTables");function kG(t,e,a,i){var r=t+pm(a),n="";return RE(i).length>0&&(n+=e+"["+r+`]
|
||||
`),n+W6(r+".",e,i)}o(kG,"stringifyComplexTable")});var qE=N(Y6=>{"use strict";Y6.parse=OE();Y6.stringify=LE()});var nC=require("node:os"),Dt=ba(nt());var ZE=require("node:os"),fo=require("node:path"),ka=require("node:fs"),Mr=ba(nt()),um=ba(jS()),rl=ba(sE()),t4=ba(Pn());var po=require("node:fs"),Q6=ba(nt()),lm=ba(qE());function zE(t,e){if(!e.length)return;let a=0;if(e.forEach(n=>{try{new URL(n.url)}catch{throw new Error(`Invalid registry URL: ${n.url}`)}n.scope||a++}),a>1)throw new Error("You can't have more than one global registry.");(0,Q6.info)(`Writing bunfig.toml to '${t}'.`);let i={};if((0,po.existsSync)(t))try{let n=(0,po.readFileSync)(t,{encoding:"utf-8"});i=(0,lm.parse)(n)}catch(n){(0,Q6.info)(`Error reading existing bunfig: ${n.message}`),i={}}i.install=i?.install||{},i.install.scopes=i?.install.scopes||{};let r=e.find(n=>!n.scope);r&&(i.install.registry={url:r.url,...r.token?{token:r.token}:{}});for(let n of e)if(n.scope){let s=n.scope.startsWith("@")?n.scope.toLowerCase():`@${n.scope.toLowerCase()}`;i.install.scopes[s]={url:n.url,...n.token?{token:n.token}:{}}}Object.keys(i.install.scopes).length===0&&delete i.install.scopes,(0,po.writeFileSync)(t,(0,lm.stringify)(i),{encoding:"utf8"})}o(zE,"writeBunfig");var eC=ba(nt());var Nn=ba(nt()),VE=require("node:console"),$E=require("node:crypto"),mo=require("node:fs"),dm=require("node:path");var J6=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,lo=o(t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");let e=t.match(J6);if(!e)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return e.shift(),e},"validateAndParse"),jE=o(t=>t==="*"||t==="x"||t==="X","isWildcard"),kE=o(t=>{let e=parseInt(t,10);return isNaN(e)?t:e},"tryParse"),UG=o((t,e)=>typeof t!=typeof e?[String(t),String(e)]:[t,e],"forceType"),HG=o((t,e)=>{if(jE(t)||jE(e))return 0;let[a,i]=UG(kE(t),kE(e));return a>i?1:a<i?-1:0},"compareStrings"),Br=o((t,e)=>{for(let a=0;a<Math.max(t.length,e.length);a++){let i=HG(t[a]||"x",e[a]||"x");if(i!==0)return i}return 0},"compareSegments");var wn=o((t,e)=>{let a=lo(t),i=lo(e),r=a.pop(),n=i.pop(),s=Br(a,i);return s!==0?s:r&&n?Br(r.split("."),n.split(".")):r||n?r?-1:1:0},"compareVersions");var HE=o((t,e,a)=>{FG(a);let i=wn(t,e);return FE[a].includes(i)},"compare"),FE={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},UE=Object.keys(FE),FG=o(t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(UE.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${UE.join("|")}`)},"assertValidOperator");var co=o((t,e)=>{if(e=e.replace(/([><=]+)\s+/g,"$1"),e.includes("||"))return e.split("||").some(E=>co(t,E));if(e.includes(" - ")){let[E,C]=e.split(" - ",2);return co(t,`>=${E} <=${C}`)}else if(e.includes(" "))return e.trim().replace(/\s{2,}/g," ").split(" ").every(E=>co(t,E));let a=e.match(/^([<>=~^]+)/),i=a?a[1]:"=";if(i!=="^"&&i!=="~")return HE(t,e,i);let[r,n,s,,p]=lo(t),[l,d,c,,u]=lo(e),m=[r,n??"x",s??"x"],f=[l,d??"x",c??"x"];if(u&&(!p||Br(m,f)!==0||Br(p.split("."),u.split("."))===-1))return!1;let h=f.findIndex(E=>E!=="0")+1,b=i==="~"?2:h>1?h:1;return!(Br(m.slice(0,b),f.slice(0,b))!==0||Br(m.slice(b),f.slice(b))===-1)},"satisfies");var uo=o(t=>typeof t=="string"&&/^[v\d]/.test(t)&&J6.test(t),"validate"),Z6=o(t=>typeof t=="string"&&/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/.test(t),"validateStrict");var VG="1.3.10";function GE(t){return`bun-${(0,$E.createHash)("sha1").update(t).digest("base64")}`}o(GE,"getCacheKey");async function WE(t,e){let a=new Headers(e?.headers);a.has("User-Agent")||a.set("User-Agent","@oven-sh/setup-bun");let i=await fetch(t,{...e,headers:a});if(!i.ok){let r=await i.text().catch(()=>"");throw new Error(`Failed to fetch url ${t}. (status code: ${i.status}, status text: ${i.statusText})${r?`
|
||||
${r}`:""}`)}return i}o(WE,"request");function XE(t,e){return t.endsWith(e)?t:((0,mo.renameSync)(t,t+e),t+e)}o(XE,"addExtension");function cm(){let t=process.platform;return t==="win32"?"windows":t}o(cm,"getPlatform");function KE(t){if(!t)return!1;let e=t.replace(/^bun-v/,"");return uo(e)?wn(e,VG)>=0:!0}o(KE,"hasNativeWindowsArm64");function YE(t,e,a){return t==="windows"&&(e==="aarch64"||e==="arm64")&&!KE(a)?((0,Nn.warning)(["\u26A0\uFE0F This version of Bun does not provide native arm64 builds for Windows.","Using x64 baseline build which will run through Microsoft's x64 emulation layer.","This may result in reduced performance and potential compatibility issues.","\u{1F4A1} For best performance, consider using Bun >= 1.3.10, x64 Windows runners, or other platforms with native support."].join(`
|
||||
`)),"x64"):e==="arm64"?"aarch64":e}o(YE,"getArchitecture");function QE(t,e,a,i){return t==="windows"&&(e==="aarch64"||e==="arm64")?!!KE(i):a??!0}o(QE,"getAvx2");var $G={"package.json":t=>{let e=JSON.parse(t);return e.packageManager?.split("bun@")?.[1]??e.engines?.bun},".tool-versions":t=>t.match(/^bun\s*(?<version>.*?)$/m)?.groups?.version,".bumrc":t=>t,".bun-version":t=>t};function e4(t,e=!1){let a=process.env.GITHUB_WORKSPACE;if(!a||!t)return;(0,Nn.debug)(`Reading version from ${t}`);let i=(0,dm.resolve)(a,t),r=(0,dm.basename)(t);if(!(0,mo.existsSync)(i)){e||(0,Nn.warning)(`File ${i} not found`);return}let n=$G[r]??(()=>{}),s;try{if(s=n((0,mo.readFileSync)(i,"utf8"))?.trim(),!s){e||(0,Nn.warning)(`Failed to read version from ${t}`);return}}catch(p){let{message:l}=p;e||(0,Nn.warning)(`Failed to read ${t}: ${l}`)}finally{if(s)return(0,VE.info)(`Obtained version ${s} from ${t}`),s}}o(e4,"readVersionFromFile");async function JE(t){let{customUrl:e}=t;return e||await GG(t)}o(JE,"getDownloadUrl");async function GG(t){let{version:e,os:a,arch:i,avx2:r,profile:n}=t,s;if(Z6(e)&&(s=`bun-v${e}`),!s){let b=(await(await WE("https://api.github.com/repos/oven-sh/bun/git/refs/tags",{headers:t.token?{Authorization:`Bearer ${t.token}`}:{}})).json()).filter(E=>E.ref.startsWith("refs/tags/bun-v")||E.ref==="refs/tags/canary").map(E=>E.ref.replace(/refs\/tags\/(bun-v)?/g,"")).filter(Boolean);if(s=b.find(E=>E===e),s)uo(s)&&(s=`bun-v${s}`);else{b=b.filter(C=>uo(C)).sort(wn);let E=e==="latest"||!e?b.at(-1):b.filter(C=>co(C,e)).at(-1);if(!E)throw new Error(`No Bun release found matching version '${e}'`);s=`bun-v${E}`}}let p=s??e,l=encodeURIComponent(p),d=encodeURIComponent(a??cm()),c=encodeURIComponent(YE(a??cm(),i??process.arch,p)),u=encodeURIComponent(QE(a??cm(),i??process.arch,r,p)===!1?"-baseline":""),m=encodeURIComponent(n===!0?"-profile":""),{href:f}=new URL(`${l}/bun-${d}-${c}${u}${m}.zip`,"https://github.com/oven-sh/bun/releases/download/");return f}o(GG,"getSemverDownloadUrl");var tC=require("node:process");var aC=o(async t=>{let e=(0,fo.join)((0,tC.cwd)(),"bunfig.toml");zE(e,t.registries);let a=await JE(t),i=KG(t),r=(0,fo.join)((0,ZE.homedir)(),".bun","bin");try{(0,ka.mkdirSync)(r,{recursive:!0})}catch(u){if(u.code!=="EEXIST")throw u}(0,Mr.addPath)(r);let n=o(u=>process.platform==="win32"?`${u}.exe`:u,"exe"),s=(0,fo.join)(r,n("bun"));try{(0,ka.symlinkSync)(s,(0,fo.join)(r,n("bunx")))}catch(u){if(u.code!=="EEXIST")throw u}let p,l=!1;if(!t.customUrl&&(0,ka.existsSync)(s)){let u=await i4(s);u&&WG(u,t.version)&&(p=u,l=!0,(0,Mr.info)(`Using existing Bun installation: ${p}`))}if(!p){if(i){let u=GE(a);await(0,um.restoreCache)([s],u)&&(p=await i4(s),p?(l=!0,(0,Mr.info)(`Using a cached version of Bun: ${p}`)):(0,Mr.warning)(`Found a cached version of Bun: ${p} (but it appears to be corrupted?)`))}l||((0,Mr.info)(`Downloading a new version of Bun: ${a}`),p=await XG(a,s))}if(!p)throw new Error("Downloaded a new version of Bun, but failed to check its version? Try again.");let[d]=p.split("+");return(0,eC.saveState)("cache",JSON.stringify({cacheEnabled:i,cacheHit:l,bunPath:s,url:a})),{version:d,revision:p,bunPath:s,url:a,cacheHit:l}},"default");function WG(t,e){if(!e||/^(latest|canary|action)$/i.test(e))return!1;let[a]=t.split("+"),i=o(r=>r.replace(/^v/i,""),"normalizeVersion");return i(a)===i(e)}o(WG,"isVersionMatch");async function XG(t,e){let a=XE(await(0,rl.downloadTool)(t),".zip"),i=await(0,rl.extractZip)(a),r=await a4(i);try{(0,ka.renameSync)(r,e)}catch{(0,ka.copyFileSync)(r,e)}return await i4(e)}o(XG,"downloadBun");function KG(t){let{customUrl:e,version:a,noCache:i}=t;return i||e||!a||/latest|canary|action/i.test(a)?!1:(0,um.isFeatureAvailable)()}o(KG,"isCacheEnabled");async function a4(t){for(let e of(0,ka.readdirSync)(t,{withFileTypes:!0})){let{name:a}=e,i=(0,fo.join)(t,a);if(e.isFile()){if(a==="bun"||a==="bun.exe")return i;if(/^bun.*\.zip/.test(a)){let r=await(0,rl.extractZip)(i);return a4(r)}}if(/^bun/.test(a)&&e.isDirectory())return a4(i)}throw new Error("Could not find executable: bun")}o(a4,"extractBun");async function i4(t){let e=await(0,t4.getExecOutput)(t,["--revision"],{ignoreReturnCode:!0});if(e.exitCode===0&&/^\d+\.\d+\.\d+/.test(e.stdout))return e.stdout.trim();let a=await(0,t4.getExecOutput)(t,["--version"],{ignoreReturnCode:!0});if(a.exitCode===0&&/^\d+\.\d+\.\d+/.test(a.stdout))return a.stdout.trim()}o(i4,"getRevision");function iC(t){return t?.trim()?t.split(`
|
||||
`),n+W6(r+".",e,i)}o(kG,"stringifyComplexTable")});var qE=N(Y6=>{"use strict";Y6.parse=OE();Y6.stringify=LE()});var nC=require("node:os"),Dt=ba(nt());var ZE=require("node:os"),fo=require("node:path"),ka=require("node:fs"),Lr=ba(nt()),um=ba(jS()),rl=ba(sE()),t4=ba(In());var lo=require("node:fs"),Q6=ba(nt()),lm=ba(qE());function zE(t,e){if(!e.length)return;let a=0;if(e.forEach(n=>{try{new URL(n.url)}catch{throw new Error(`Invalid registry URL: ${n.url}`)}n.scope||a++}),a>1)throw new Error("You can't have more than one global registry.");(0,Q6.info)(`Writing bunfig.toml to '${t}'.`);let i={};if((0,lo.existsSync)(t))try{let n=(0,lo.readFileSync)(t,{encoding:"utf-8"});i=(0,lm.parse)(n)}catch(n){(0,Q6.info)(`Error reading existing bunfig: ${n.message}`),i={}}i.install=i?.install||{},i.install.scopes=i?.install.scopes||{};let r=e.find(n=>!n.scope);r&&(i.install.registry={url:r.url,...r.token?{token:r.token}:{}});for(let n of e)if(n.scope){let s=n.scope.startsWith("@")?n.scope.toLowerCase():`@${n.scope.toLowerCase()}`;i.install.scopes[s]={url:n.url,...n.token?{token:n.token}:{}}}Object.keys(i.install.scopes).length===0&&delete i.install.scopes,(0,lo.writeFileSync)(t,(0,lm.stringify)(i),{encoding:"utf8"})}o(zE,"writeBunfig");var eC=ba(nt());var Mr=ba(nt()),VE=require("node:console"),$E=require("node:crypto"),_n=require("node:fs"),dm=require("node:path");var J6=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,co=o(t=>{if(typeof t!="string")throw new TypeError("Invalid argument expected string");let e=t.match(J6);if(!e)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return e.shift(),e},"validateAndParse"),jE=o(t=>t==="*"||t==="x"||t==="X","isWildcard"),kE=o(t=>{let e=parseInt(t,10);return isNaN(e)?t:e},"tryParse"),UG=o((t,e)=>typeof t!=typeof e?[String(t),String(e)]:[t,e],"forceType"),HG=o((t,e)=>{if(jE(t)||jE(e))return 0;let[a,i]=UG(kE(t),kE(e));return a>i?1:a<i?-1:0},"compareStrings"),Br=o((t,e)=>{for(let a=0;a<Math.max(t.length,e.length);a++){let i=HG(t[a]||"x",e[a]||"x");if(i!==0)return i}return 0},"compareSegments");var Nn=o((t,e)=>{let a=co(t),i=co(e),r=a.pop(),n=i.pop(),s=Br(a,i);return s!==0?s:r&&n?Br(r.split("."),n.split(".")):r||n?r?-1:1:0},"compareVersions");var HE=o((t,e,a)=>{FG(a);let i=Nn(t,e);return FE[a].includes(i)},"compare"),FE={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},UE=Object.keys(FE),FG=o(t=>{if(typeof t!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof t}`);if(UE.indexOf(t)===-1)throw new Error(`Invalid operator, expected one of ${UE.join("|")}`)},"assertValidOperator");var uo=o((t,e)=>{if(e=e.replace(/([><=]+)\s+/g,"$1"),e.includes("||"))return e.split("||").some(E=>uo(t,E));if(e.includes(" - ")){let[E,C]=e.split(" - ",2);return uo(t,`>=${E} <=${C}`)}else if(e.includes(" "))return e.trim().replace(/\s{2,}/g," ").split(" ").every(E=>uo(t,E));let a=e.match(/^([<>=~^]+)/),i=a?a[1]:"=";if(i!=="^"&&i!=="~")return HE(t,e,i);let[r,n,s,,p]=co(t),[l,d,c,,u]=co(e),m=[r,n??"x",s??"x"],f=[l,d??"x",c??"x"];if(u&&(!p||Br(m,f)!==0||Br(p.split("."),u.split("."))===-1))return!1;let h=f.findIndex(E=>E!=="0")+1,b=i==="~"?2:h>1?h:1;return!(Br(m.slice(0,b),f.slice(0,b))!==0||Br(m.slice(b),f.slice(b))===-1)},"satisfies");var mo=o(t=>typeof t=="string"&&/^[v\d]/.test(t)&&J6.test(t),"validate"),Z6=o(t=>typeof t=="string"&&/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/.test(t),"validateStrict");var VG="1.3.10";function GE(t){return`bun-${(0,$E.createHash)("sha1").update(t).digest("base64")}`}o(GE,"getCacheKey");async function WE(t,e){let a=new Headers(e?.headers);a.has("User-Agent")||a.set("User-Agent","@oven-sh/setup-bun");let i=await fetch(t,{...e,headers:a});if(!i.ok){let r=await i.text().catch(()=>"");throw new Error(`Failed to fetch url ${t}. (status code: ${i.status}, status text: ${i.statusText})${r?`
|
||||
${r}`:""}`)}return i}o(WE,"request");function XE(t,e){return t.endsWith(e)?t:((0,_n.renameSync)(t,t+e),t+e)}o(XE,"addExtension");function cm(){let t=process.platform;return t==="win32"?"windows":t}o(cm,"getPlatform");function KE(t){if(!t)return!1;let e=t.replace(/^bun-v/,"");return mo(e)?Nn(e,VG)>=0:!0}o(KE,"hasNativeWindowsArm64");function YE(t,e,a){return t==="windows"&&(e==="aarch64"||e==="arm64")&&!KE(a)?((0,Mr.warning)(["\u26A0\uFE0F This version of Bun does not provide native arm64 builds for Windows.","Using x64 baseline build which will run through Microsoft's x64 emulation layer.","This may result in reduced performance and potential compatibility issues.","\u{1F4A1} For best performance, consider using Bun >= 1.3.10, x64 Windows runners, or other platforms with native support."].join(`
|
||||
`)),"x64"):e==="arm64"?"aarch64":e}o(YE,"getArchitecture");function QE(t,e,a,i){if(t==="windows"&&(e==="aarch64"||e==="arm64"))return!!KE(i);if(t==="linux"&&e==="x64"&&a===void 0)try{return(0,_n.readFileSync)("/proc/cpuinfo","utf8").includes("avx2")}catch{return(0,Mr.warning)("Failed to detect AVX2 support."),!1}return a??!0}o(QE,"getAvx2");var $G={"package.json":t=>{let e=JSON.parse(t);return e.packageManager?.split("bun@")?.[1]??e.engines?.bun},".tool-versions":t=>t.match(/^bun\s*(?<version>.*?)$/m)?.groups?.version,".bumrc":t=>t,".bun-version":t=>t};function e4(t,e=!1){let a=process.env.GITHUB_WORKSPACE;if(!a||!t)return;(0,Mr.debug)(`Reading version from ${t}`);let i=(0,dm.resolve)(a,t),r=(0,dm.basename)(t);if(!(0,_n.existsSync)(i)){e||(0,Mr.warning)(`File ${i} not found`);return}let n=$G[r]??(()=>{}),s;try{if(s=n((0,_n.readFileSync)(i,"utf8"))?.trim(),!s){e||(0,Mr.warning)(`Failed to read version from ${t}`);return}}catch(p){let{message:l}=p;e||(0,Mr.warning)(`Failed to read ${t}: ${l}`)}finally{if(s)return(0,VE.info)(`Obtained version ${s} from ${t}`),s}}o(e4,"readVersionFromFile");async function JE(t){let{customUrl:e}=t;return e||await GG(t)}o(JE,"getDownloadUrl");async function GG(t){let{version:e,os:a,arch:i,avx2:r,profile:n}=t,s;if(Z6(e)&&(s=`bun-v${e}`),!s){let b=(await(await WE("https://api.github.com/repos/oven-sh/bun/git/refs/tags",{headers:t.token?{Authorization:`Bearer ${t.token}`}:{}})).json()).filter(E=>E.ref.startsWith("refs/tags/bun-v")||E.ref==="refs/tags/canary").map(E=>E.ref.replace(/refs\/tags\/(bun-v)?/g,"")).filter(Boolean);if(s=b.find(E=>E===e),s)mo(s)&&(s=`bun-v${s}`);else{b=b.filter(C=>mo(C)).sort(Nn);let E=e==="latest"||!e?b.at(-1):b.filter(C=>uo(C,e)).at(-1);if(!E)throw new Error(`No Bun release found matching version '${e}'`);s=`bun-v${E}`}}let p=s??e,l=encodeURIComponent(p),d=encodeURIComponent(a??cm()),c=encodeURIComponent(YE(a??cm(),i??process.arch,p)),u=encodeURIComponent(QE(a??cm(),i??process.arch,r,p)===!1?"-baseline":""),m=encodeURIComponent(n===!0?"-profile":""),{href:f}=new URL(`${l}/bun-${d}-${c}${u}${m}.zip`,"https://github.com/oven-sh/bun/releases/download/");return f}o(GG,"getSemverDownloadUrl");var tC=require("node:process");var aC=o(async t=>{let e=(0,fo.join)((0,tC.cwd)(),"bunfig.toml");zE(e,t.registries);let a=await JE(t),i=KG(t),r=(0,fo.join)((0,ZE.homedir)(),".bun","bin");try{(0,ka.mkdirSync)(r,{recursive:!0})}catch(u){if(u.code!=="EEXIST")throw u}(0,Lr.addPath)(r);let n=o(u=>process.platform==="win32"?`${u}.exe`:u,"exe"),s=(0,fo.join)(r,n("bun"));try{(0,ka.symlinkSync)(s,(0,fo.join)(r,n("bunx")))}catch(u){if(u.code!=="EEXIST")throw u}let p,l=!1;if(!t.customUrl&&(0,ka.existsSync)(s)){let u=await i4(s);u&&WG(u,t.version)&&(p=u,l=!0,(0,Lr.info)(`Using existing Bun installation: ${p}`))}if(!p){if(i){let u=GE(a);await(0,um.restoreCache)([s],u)&&(p=await i4(s),p?(l=!0,(0,Lr.info)(`Using a cached version of Bun: ${p}`)):(0,Lr.warning)(`Found a cached version of Bun: ${p} (but it appears to be corrupted?)`))}l||((0,Lr.info)(`Downloading a new version of Bun: ${a}`),p=await XG(a,s))}if(!p)throw new Error("Downloaded a new version of Bun, but failed to check its version? Try again.");let[d]=p.split("+");return(0,eC.saveState)("cache",JSON.stringify({cacheEnabled:i,cacheHit:l,bunPath:s,url:a})),{version:d,revision:p,bunPath:s,url:a,cacheHit:l}},"default");function WG(t,e){if(!e||/^(latest|canary|action)$/i.test(e))return!1;let[a]=t.split("+"),i=o(r=>r.replace(/^v/i,""),"normalizeVersion");return i(a)===i(e)}o(WG,"isVersionMatch");async function XG(t,e){let a=XE(await(0,rl.downloadTool)(t),".zip"),i=await(0,rl.extractZip)(a),r=await a4(i);try{(0,ka.renameSync)(r,e)}catch{(0,ka.copyFileSync)(r,e)}return await i4(e)}o(XG,"downloadBun");function KG(t){let{customUrl:e,version:a,noCache:i}=t;return i||e||!a||/latest|canary|action/i.test(a)?!1:(0,um.isFeatureAvailable)()}o(KG,"isCacheEnabled");async function a4(t){for(let e of(0,ka.readdirSync)(t,{withFileTypes:!0})){let{name:a}=e,i=(0,fo.join)(t,a);if(e.isFile()){if(a==="bun"||a==="bun.exe")return i;if(/^bun.*\.zip/.test(a)){let r=await(0,rl.extractZip)(i);return a4(r)}}if(/^bun/.test(a)&&e.isDirectory())return a4(i)}throw new Error("Could not find executable: bun")}o(a4,"extractBun");async function i4(t){let e=await(0,t4.getExecOutput)(t,["--revision"],{ignoreReturnCode:!0});if(e.exitCode===0&&/^\d+\.\d+\.\d+/.test(e.stdout))return e.stdout.trim();let a=await(0,t4.getExecOutput)(t,["--version"],{ignoreReturnCode:!0});if(a.exitCode===0&&/^\d+\.\d+\.\d+/.test(a.stdout))return a.stdout.trim()}o(i4,"getRevision");function iC(t){return t?.trim()?t.split(`
|
||||
`).map(e=>e.trim()).filter(Boolean).map(YG).filter(Boolean):[]}o(iC,"parseRegistries");function YG(t){let e=t.match(/^(@[a-z0-9-_.]+|[a-z0-9-_.]+(?=:[a-z]+:\/\/)):(.+)$/i);if(e){let a=e[1],i=e[2].trim(),[r,n]=i.split("|",2).map(s=>s?.trim());try{return new URL(r),{url:r,scope:a,...n&&{token:n}}}catch{throw new Error(`Invalid URL in registry configuration: ${r}`)}}else{let[a,i]=t.split("|",2).map(r=>r?.trim());try{return new URL(a),{url:a,scope:"",...i&&{token:i}}}catch{throw new Error(`Invalid URL in registry configuration: ${a}`)}}}o(YG,"parseLine");process.env.RUNNER_TEMP||(process.env.RUNNER_TEMP=(0,nC.tmpdir)());var sC=iC((0,Dt.getInput)("registries")),rC=(0,Dt.getInput)("registry-url"),QG=(0,Dt.getInput)("scope");rC&&sC.push({url:rC,scope:QG,token:"$BUN_AUTH_TOKEN"});aC({version:(0,Dt.getInput)("bun-version")||e4((0,Dt.getInput)("bun-version-file"))||e4("package.json",!0)||void 0,customUrl:(0,Dt.getInput)("bun-download-url")||void 0,registries:sC,noCache:(0,Dt.getBooleanInput)("no-cache")||!1,token:(0,Dt.getInput)("token")}).then(({version:t,revision:e,bunPath:a,url:i,cacheHit:r})=>{(0,Dt.setOutput)("bun-version",t),(0,Dt.setOutput)("bun-revision",e),(0,Dt.setOutput)("bun-path",a),(0,Dt.setOutput)("bun-download-url",i),(0,Dt.setOutput)("cache-hit",r),process.exit(0)}).catch(t=>{(0,Dt.setFailed)(t),process.exit(1)});
|
||||
/*! Bundled license information:
|
||||
|
||||
|
||||
@@ -98,6 +98,18 @@ export function getAvx2(
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check AVX2 support on x64 Linux
|
||||
if (os === "linux" && arch === "x64" && avx2 === undefined) {
|
||||
try {
|
||||
const cpuInfo = readFileSync("/proc/cpuinfo", "utf8");
|
||||
const hasAvx2 = cpuInfo.includes("avx2");
|
||||
return hasAvx2;
|
||||
} catch (error) {
|
||||
warning(`Failed to detect AVX2 support.`);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return avx2 ?? true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user