633 lines
1.9 MiB
JavaScript
633 lines
1.9 MiB
JavaScript
|
#!/usr/bin/env node
|
|||
|
/* eslint-disable */
|
|||
|
//prettier-ignore
|
|||
|
(()=>{var xae=Object.create,mg=Object.defineProperty,Sae=Object.defineProperties,kae=Object.getOwnPropertyDescriptor,vae=Object.getOwnPropertyDescriptors,Pae=Object.getOwnPropertyNames,bC=Object.getOwnPropertySymbols,Fae=Object.getPrototypeOf,xw=Object.prototype.hasOwnProperty,WN=Object.prototype.propertyIsEnumerable;var zN=(t,e,r)=>e in t?mg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,v=(t,e)=>{for(var r in e||(e={}))xw.call(e,r)&&zN(t,r,e[r]);if(bC)for(var r of bC(e))WN.call(e,r)&&zN(t,r,e[r]);return t},z=(t,e)=>Sae(t,vae(e)),Rae=t=>mg(t,"__esModule",{value:!0});var Tr=(t,e)=>{var r={};for(var i in t)xw.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(t!=null&&bC)for(var i of bC(t))e.indexOf(i)<0&&WN.call(t,i)&&(r[i]=t[i]);return r},Nae=(t,e)=>()=>(t&&(e=t(t=0)),e),C=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),rt=(t,e)=>{for(var r in e)mg(t,r,{get:e[r],enumerable:!0})},Lae=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Pae(e))!xw.call(t,i)&&i!=="default"&&mg(t,i,{get:()=>e[i],enumerable:!(r=kae(e,i))||r.enumerable});return t},re=t=>Lae(Rae(mg(t!=null?xae(Fae(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var DL=C((Hze,BL)=>{BL.exports=wL;wL.sync=zae;var QL=require("fs");function Vae(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var i=0;i<r.length;i++){var n=r[i].toLowerCase();if(n&&t.substr(-n.length).toLowerCase()===n)return!0}return!1}function bL(t,e,r){return!t.isSymbolicLink()&&!t.isFile()?!1:Vae(e,r)}function wL(t,e,r){QL.stat(t,function(i,n){r(i,i?!1:bL(n,t,e))})}function zae(t,e){return bL(QL.statSync(t),t,e)}});var PL=C((Yze,xL)=>{xL.exports=SL;SL.sync=Xae;var kL=require("fs");function SL(t,e,r){kL.stat(t,function(i,n){r(i,i?!1:vL(n,e))})}function Xae(t,e){return vL(kL.statSync(t),e)}function vL(t,e){return t.isFile()&&Zae(t,e)}function Zae(t,e){var r=t.mode,i=t.uid,n=t.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=r&c||r&l&&n===o||r&a&&i===s||r&u&&s===0;return g}});var RL=C((qze,FL)=>{var jze=require("fs"),KC;process.platform==="win32"||global.TESTING_WINDOWS?KC=DL():KC=PL();FL.exports=Yw;Yw.sync=_ae;function Yw(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){Yw(t,e||{},function(s,o){s?n(s):i(o)})})}KC(t,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),r(i,n)})}function _ae(t,e){try{return KC.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var UL=C((Gze,NL)=>{var Rl=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",LL=require("path"),$ae=Rl?";":":",ML=RL(),TL=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),KL=(t,e)=>{let r=e.colon||$ae,i=t.match(/\//)||Rl&&t.match(/\\/)?[""]:[...Rl?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],n=Rl?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=Rl?n.split(r):[""];return Rl&&t.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},OL=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=KL(t,e),o=[],a=c=>new Promise((u,g)=>{if(c===i.length)return e.all&&o.length?u(o):g(TL(t));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=LL.join(h,t),m=!h&&/^\.[\\\/]/.test(t)?t.slice(0,2)+p:p;u(l(m,c,0))}),l=(c,u,g)=>new Promise((f,h)=>{if(g===n.length)return f(a(u+1));let p=n[g];ML(c+p,{pathExt:s},(m,I)=>{if(!m&&I)if(e.all)o.push(c+p);else return f(c+p);return f(l(c,u,g+1))})});return r?a(0).then(c=>r(null,c),r):a(0)},eAe=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:i,pathExtExe:n}=KL(t,e),s=[];for(let o=0;o<r.length;o++){let a=r[o],l=/^".*"$/.test(a)?a.slice(1,-1):a,c=LL.join(l,t),u=!l&&/^\.[\\\/]/.test(t)?t.slice(0,2)+c:c;for(let g=0;g<i.length;g++){let f=u+i[g];try{if(ML.s
|
|||
|
`:`
|
|||
|
`)+r,n=i+1,i=t.indexOf(`
|
|||
|
`,n)}while(i!==-1);return s+=t.substr(n),s};SM.exports={stringReplaceAll:NAe,stringEncaseCRLFWithFirstIndex:LAe}});var NM=C((f4e,vM)=>{"use strict";var MAe=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,PM=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,TAe=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,KAe=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,OAe=new Map([["n",`
|
|||
|
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e",""],["a","\x07"]]);function FM(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):OAe.get(t)||t}function UAe(t,e){let r=[],i=e.trim().split(/\s*,\s*/g),n;for(let s of i){let o=Number(s);if(!Number.isNaN(o))r.push(o);else if(n=s.match(TAe))r.push(n[2].replace(KAe,(a,l,c)=>l?FM(l):c));else throw new Error(`Invalid Chalk template style argument: ${s} (in style '${t}')`)}return r}function HAe(t){PM.lastIndex=0;let e=[],r;for(;(r=PM.exec(t))!==null;){let i=r[1];if(r[2]){let n=UAe(i,r[2]);e.push([i].concat(n))}else e.push([i])}return e}function RM(t,e){let r={};for(let n of e)for(let s of n.styles)r[s[0]]=n.inverse?null:s.slice(1);let i=t;for(let[n,s]of Object.entries(r))if(!!Array.isArray(s)){if(!(n in i))throw new Error(`Unknown Chalk style: ${n}`);i=s.length>0?i[n](...s):i[n]}return i}vM.exports=(t,e)=>{let r=[],i=[],n=[];if(e.replace(MAe,(s,o,a,l,c,u)=>{if(o)n.push(FM(o));else if(l){let g=n.join("");n=[],i.push(r.length===0?g:RM(t,r)(g)),r.push({inverse:a,styles:HAe(l)})}else if(c){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");i.push(RM(t,r)(n.join(""))),n=[],r.pop()}else n.push(u)}),i.push(n.join("")),r.length>0){let s=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(s)}return i.join("")}});var pQ=C((h4e,LM)=>{"use strict";var Mg=BM(),{stdout:uQ,stderr:gQ}=xM(),{stringReplaceAll:YAe,stringEncaseCRLFWithFirstIndex:jAe}=kM(),MM=["ansi","ansi","ansi256","ansi16m"],Kl=Object.create(null),qAe=(t,e={})=>{if(e.level>3||e.level<0)throw new Error("The `level` option should be an integer from 0 to 3");let r=uQ?uQ.level:0;t.level=e.level===void 0?r:e.level},TM=class{constructor(e){return KM(e)}},KM=t=>{let e={};return qAe(e,t),e.template=(...r)=>GAe(e.template,...r),Object.setPrototypeOf(e,HC.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=TM,e.template};function HC(t){return KM(t)}for(let[t,e]of Object.entries(Mg))Kl[t]={get(){let r=YC(this,fQ(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Kl.visible={get(){let t=YC(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var OM=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of OM)Kl[t]={get(){let{level:e}=this;return function(...r){let i=fQ(Mg.color[MM[e]][t](...r),Mg.color.close,this._styler);return YC(this,i,this._isEmpty)}}};for(let t of OM){let e="bg"+t[0].toUpperCase()+t.slice(1);Kl[e]={get(){let{level:r}=this;return function(...i){let n=fQ(Mg.bgColor[MM[r]][t](...i),Mg.bgColor.close,this._styler);return YC(this,n,this._isEmpty)}}}}var JAe=Object.defineProperties(()=>{},z(v({},Kl),{level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}})),fQ=(t,e,r)=>{let i,n;return r===void 0?(i=t,n=e):(i=r.openAll+t,n=e+r.closeAll),{open:t,close:e,openAll:i,closeAll:n,parent:r}},YC=(t,e,r)=>{let i=(...n)=>WAe(i,n.length===1?""+n[0]:n.join(" "));return i.__proto__=JAe,i._generator=t,i._styler=e,i._isEmpty=r,i},WAe=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:i,closeAll:n}=r;if(e.indexOf("")!==-1)for(;r!==void 0;)e=YAe(e,r.close,r.open),r=r.parent;let s=e.indexOf(`
|
|||
|
`);return s!==-1&&(e=jAe(e,n,i,s)),i+e+n},hQ,GAe=(t,...e)=>{let[r]=e;if(!Array.isArray(r))return e.join(" ");let i=e.slice(1),n=[r.raw[0]];for(let s=1;s<r.length;s++)n.push(String(i[s-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[s]));return hQ===void 0&&(hQ=NM()),hQ(t,n.join(""))};Object.defineProperties(HC.prototype,Kl);var Tg=HC();Tg.supportsColor=uQ;Tg.stderr=HC({level:gQ?gQ.level:0});Tg.stderr.supportsColor=gQ;Tg.Level={None:0,Basic:1,Ansi256:2,TrueColor:3,0:"None",1:"Basic",2:"Ansi256",3:"TrueColor"};LM.exports=Tg});var HM=C((p4e,UM)=>{UM.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var Kg=C(Hi=>{"use strict";var YM=HM(),ts=process.env;Object.defineProperty(Hi,"_vendors",{value:YM.map(function(t){return t.constant})});Hi.name=null;Hi.isPR=null;YM.forEach(function(t){var e=Array.isArray(t.env)?t.env:[t.env],r=e.every(function(i){return jM(i)});if(Hi[t.constant]=r,r)switch(Hi.name=t.name,typeof t.pr){case"string":Hi.isPR=!!ts[t.pr];break;case"object":"env"in t.pr?Hi.isPR=t.pr.env in ts&&ts[t.pr.env]!==t.pr.ne:"any"in t.pr?Hi.isPR=t.pr.any.some(function(i){return!!ts[i]}):Hi.isPR=jM(t.pr);break;default:Hi.isPR=null}});Hi.isCI=!!(ts.CI||ts.CONTINUOUS_INTEGRATION||ts.BUILD_NUMBER||ts.RUN_ID||Hi.name);function jM(t){return typeof t=="string"?!!ts[t]:Object.keys(t).every(function(e){return ts[e]===t[e]})}});var jC=C(An=>{"use strict";An.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;An.find=(t,e)=>t.nodes.find(r=>r.type===e);An.exceedsLimit=(t,e,r=1,i)=>i===!1||!An.isInteger(t)||!An.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=i;An.escapeNode=(t,e=0,r)=>{let i=t.nodes[e];!i||(r&&i.type===r||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)};An.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0==0?(t.invalid=!0,!0):!1;An.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0==0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;An.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!
|
|||
|
`,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var wT=C((b4e,IT)=>{"use strict";var fle=qC(),{MAX_LENGTH:ET,CHAR_BACKSLASH:EQ,CHAR_BACKTICK:hle,CHAR_COMMA:ple,CHAR_DOT:dle,CHAR_LEFT_PARENTHESES:Cle,CHAR_RIGHT_PARENTHESES:mle,CHAR_LEFT_CURLY_BRACE:Ile,CHAR_RIGHT_CURLY_BRACE:Ele,CHAR_LEFT_SQUARE_BRACKET:yT,CHAR_RIGHT_SQUARE_BRACKET:BT,CHAR_DOUBLE_QUOTE:yle,CHAR_SINGLE_QUOTE:Ble,CHAR_NO_BREAK_SPACE:wle,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Qle}=mT(),ble=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},i=typeof r.maxLength=="number"?Math.min(ET,r.maxLength):ET;if(t.length>i)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${i})`);let n={type:"root",input:t,nodes:[]},s=[n],o=n,a=n,l=0,c=t.length,u=0,g=0,f,h={},p=()=>t[u++],m=I=>{if(I.type==="text"&&a.type==="dot"&&(a.type="text"),a&&a.type==="text"&&I.type==="text"){a.value+=I.value;return}return o.nodes.push(I),I.parent=o,I.prev=a,a=I,I};for(m({type:"bos"});u<c;)if(o=s[s.length-1],f=p(),!(f===Qle||f===wle)){if(f===EQ){m({type:"text",value:(e.keepEscaping?f:"")+p()});continue}if(f===BT){m({type:"text",value:"\\"+f});continue}if(f===yT){l++;let I=!0,w;for(;u<c&&(w=p());){if(f+=w,w===yT){l++;continue}if(w===EQ){f+=p();continue}if(w===BT&&(l--,l===0))break}m({type:"text",value:f});continue}if(f===Cle){o=m({type:"paren",nodes:[]}),s.push(o),m({type:"text",value:f});continue}if(f===mle){if(o.type!=="paren"){m({type:"text",value:f});continue}o=s.pop(),m({type:"text",value:f}),o=s[s.length-1];continue}if(f===yle||f===Ble||f===hle){let I=f,w;for(e.keepQuotes!==!0&&(f="");u<c&&(w=p());){if(w===EQ){f+=w+p();continue}if(w===I){e.keepQuotes===!0&&(f+=w);break}f+=w}m({type:"text",value:f});continue}if(f===Ile){g++;let I=a.value&&a.value.slice(-1)==="$"||o.dollar===!0;o=m({type:"brace",open:!0,close:!1,dollar:I,depth:g,commas:0,ranges:0,nodes:[]}),s.push(o),m({type:"open",value:f});continue}if(f===Ele){if(o.type!=="brace"){m({type:"text",value:f});continue}let I="close";o=s.pop(),o.close=!0,m({type:I,value:f}),g--,o=s[s.length-1];continue}if(f===ple&&g>0){if(o.ranges>0){o.ranges=0;let I=o.nodes.shift();o.nodes=[I,{type:"text",value:fle(o)}]}m({type:"comma",value:f}),o.commas++;continue}if(f===dle&&g>0&&o.commas===0){let I=o.nodes;if(g===0||I.length===0){m({type:"text",value:f});continue}if(a.type==="dot"){if(o.range=[],a.value+=f,a.type="range",o.nodes.length!==3&&o.nodes.length!==5){o.invalid=!0,o.ranges=0,a.type="text";continue}o.ranges++,o.args=[];continue}if(a.type==="range"){I.pop();let w=I[I.length-1];w.value+=a.value+f,a=w,o.ranges--;continue}m({type:"dot",value:f});continue}m({type:"text",value:f})}do if(o=s.pop(),o.type!=="root"){o.nodes.forEach(Q=>{Q.nodes||(Q.type==="open"&&(Q.isOpen=!0),Q.type==="close"&&(Q.isClose=!0),Q.nodes||(Q.type="text"),Q.invalid=!0)});let I=s[s.length-1],w=I.nodes.indexOf(o);I.nodes.splice(w,1,...o.nodes)}while(s.length>0);return m({type:"eos"}),n};IT.exports=ble});var DT=C((D4e,QT)=>{"use strict";var bT=qC(),Dle=fT(),xle=dT(),Sle=wT(),Yi=(t,e={})=>{let r=[];if(Array.isArray(t))for(let i of t){let n=Yi.create(i,e);Array.isArray(n)?r.push(...n):r.push(n)}else r=[].concat(Yi.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};Yi.parse=(t,e={})=>Sle(t,e);Yi.stringify=(t,e={})=>typeof t=="string"?bT(Yi.parse(t,e),e):bT(t,e);Yi.compile=(t,e={})=>(typeof t=="string"&&(t=Yi.parse(t,e)),Dle(t,e));Yi.expand=(t,e={})=>{typeof t=="string"&&(t=Yi.parse(t,e));let r=xle(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};Yi.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?Yi.compile(t,e):Yi.expand(t,e);QT.exports=Yi});var Ug=C((x4e,xT)=>{"use strict";var kle=require("path"),rs="\\\\/",ST=`[^${rs}]`,js="\\.",vle="\\+",Ple="\\?",JC="\\/",Fle="(?=.)",kT="[^/]",yQ=`(?:${JC}|$)`,v
|
|||
|
Please report this to https://github.com/szmarczak/http2-wrapper/`);p(m)}return}i[0].resolve(h);return}}if(o in this.queue){if(a in this.queue[o]){this.queue[o][a].listeners.push(...i),this._tryToCreateNewSession(o,a);return}}else this.queue[o]={};let l=()=>{o in this.queue&&this.queue[o][a]===c&&(delete this.queue[o][a],Object.keys(this.queue[o]).length===0&&delete this.queue[o])},c=()=>{let u=`${a}:${o}`,g=!1;try{let f=sme.connect(e,v({createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(u)},r));f[gi]=0,f[uc]=!1;let h=()=>f[gi]<f.remoteSettings.maxConcurrentStreams,p=!0;f.socket.once("session",I=>{this.tlsSessionCache.set(u,I)}),f.once("error",I=>{for(let{reject:w}of i)w(I);this.tlsSessionCache.delete(u)}),f.setTimeout(this.timeout,()=>{f.destroy()}),f.once("close",()=>{if(g){p&&this._freeSessionsCount--,this._sessionsCount--;let I=this.sessions[o];I.splice(I.indexOf(f),1),I.length===0&&delete this.sessions[o]}else{let I=new Error("Session closed without receiving a SETTINGS frame");I.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:w}of i)w(I);l()}this._tryToCreateNewSession(o,a)});let m=()=>{if(!(!(o in this.queue)||!h())){for(let I of f[hn])if(I in this.queue[o]){let{listeners:w}=this.queue[o][I];for(;w.length!==0&&h();)w.shift().resolve(f);let Q=this.queue[o];if(Q[I].listeners.length===0&&(delete Q[I],Object.keys(Q).length===0)){delete this.queue[o];break}if(!h())break}}};f.on("origin",()=>{f[hn]=f.originSet,!!h()&&(m(),eD(this.sessions[o],f))}),f.once("remoteSettings",()=>{if(f.ref(),f.unref(),this._sessionsCount++,c.destroyed){let I=new Error("Agent has been destroyed");for(let w of i)w.reject(I);f.destroy();return}f[hn]=f.originSet;{let I=this.sessions;if(o in I){let w=I[o];w.splice(Ame(w,f,lme),0,f)}else I[o]=[f]}this._freeSessionsCount+=1,g=!0,this.emit("session",f),m(),l(),f[gi]===0&&this._freeSessionsCount>this.maxFreeSessions&&f.close(),i.length!==0&&(this.getSession(a,r,i),i.length=0),f.on("remoteSettings",()=>{m(),eD(this.sessions[o],f)})}),f[IY]=f.request,f.request=(I,w)=>{if(f[uc])throw new Error("The session is gracefully closing. No new streams are allowed.");let Q=f[IY](I,w);return f.ref(),++f[gi],f[gi]===f.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,Q.once("close",()=>{if(p=h(),--f[gi],!f.destroyed&&!f.closed&&(cme(this.sessions[o],f),h()&&!f.closed)){p||(this._freeSessionsCount++,p=!0);let S=f[gi]===0;S&&f.unref(),S&&(this._freeSessionsCount>this.maxFreeSessions||f[uc])?f.close():(eD(this.sessions[o],f),m())}}),Q}}catch(f){for(let h of i)h.reject(f);l()}};c.listeners=i,c.completed=!1,c.destroyed=!1,this.queue[o][a]=c,this._tryToCreateNewSession(o,a)})}request(e,r,i,n){return new Promise((s,o)=>{this.getSession(e,r,[{reject:o,resolve:a=>{try{s(a.request(i,n))}catch(l){o(l)}}}])})}createConnection(e,r){return to.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let i=e.port||443,n=e.hostname||e.host;return typeof r.servername=="undefined"&&(r.servername=n),nme.connect(i,n,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[gi]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let i of r)i.destroy(e);for(let r of Object.values(this.queue))for(let i of Object.values(r))i.destroyed=!0;this.queue={}}get freeSessions(){return yY({agent:this,isFree:!0})}get busySessions(){return yY({agent:this,isFree:!1})}};to.kCurrentStreamsCount=gi;to.kGracefullyClosing=uc;mY.exports={Agent:to,globalAgent:new to}});var rD=C((xVe,BY)=>{"use strict";var{Readable:ume}=require("stream"),wY=class extends ume{constructor(e,r){super({highWaterMark:r,autoDestroy:!1});this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners
|
|||
|
`).reverse(),a=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
|
|||
|
`).reverse();for(;a.length!==0&&a[0]===o[0];)o.shift();this.stack=`${this.stack.slice(0,s)}${o.reverse().join(`
|
|||
|
`)}${a.reverse().join(`
|
|||
|
`)}`}}};Qt.RequestError=yr;var vD=class extends yr{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e);this.name="MaxRedirectsError"}};Qt.MaxRedirectsError=vD;var PD=class extends yr{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request);this.name="HTTPError"}};Qt.HTTPError=PD;var FD=class extends yr{constructor(e,r){super(e.message,e,r);this.name="CacheError"}};Qt.CacheError=FD;var RD=class extends yr{constructor(e,r){super(e.message,e,r);this.name="UploadError"}};Qt.UploadError=RD;var ND=class extends yr{constructor(e,r,i){super(e.message,e,i);this.name="TimeoutError",this.event=e.event,this.timings=r}};Qt.TimeoutError=ND;var fI=class extends yr{constructor(e,r){super(e.message,e,r);this.name="ReadError"}};Qt.ReadError=fI;var LD=class extends yr{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e);this.name="UnsupportedProtocolError"}};Qt.UnsupportedProtocolError=LD;var IIe=["socket","connect","continue","information","upgrade","timeout"],kD=class extends hj.Duplex{constructor(e,r={},i){super({autoDestroy:!1,highWaterMark:0});this[hc]=0,this[dc]=0,this.requestInitialized=!1,this[uI]=new Set,this.redirects=[],this[Cc]=!1,this[gI]=!1,this[Nf]=[],this.retryCount=0,this._progressCallbacks=[];let n=()=>this._unlockWrite(),s=()=>this._lockWrite();this.on("pipe",c=>{c.prependListener("data",n),c.on("data",s),c.prependListener("end",n),c.on("end",s)}),this.on("unpipe",c=>{c.off("data",n),c.off("data",s),c.off("end",n),c.off("end",s)}),this.on("pipe",c=>{c instanceof DD.IncomingMessage&&(this.options.headers=v(v({},c.headers),this.options.headers))});let{json:o,body:a,form:l}=r;if((o||a||l)&&this._lockWrite(),Qt.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,i)}catch(c){oe.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(c);return}(async()=>{var c;try{this.options.body instanceof Zme.ReadStream&&await dIe(this.options.body);let{url:u}=this.options;if(!u)throw new TypeError("Missing `url` property");if(this.requestUrl=u.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(c=this[Pr])===null||c===void 0||c.destroy();return}for(let g of this[Nf])g();this[Nf].length=0,this.requestInitialized=!0}catch(u){if(u instanceof yr){this._beforeError(u);return}this.destroyed||this.destroy(u)}})()}static normalizeArguments(e,r,i){var n,s,o,a,l;let c=r;if(oe.default.object(e)&&!oe.default.urlInstance(e))r=v(v(v({},i),e),r);else{if(e&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r=v(v({},i),r),e!==void 0&&(r.url=e),oe.default.urlInstance(r.url)&&(r.url=new _o.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),oe.assert.any([oe.default.string,oe.default.undefined],r.method),oe.assert.any([oe.default.object,oe.default.undefined],r.headers),oe.assert.any([oe.default.string,oe.default.urlInstance,oe.default.undefined],r.prefixUrl),oe.assert.any([oe.default.object,oe.default.undefined],r.cookieJar),oe.assert.any([oe.default.object,oe.default.string,oe.default.undefined],r.searchParams),oe.assert.any([oe.default.object,oe.default.string,oe.default.undefined],r.cache),oe.assert.any([oe.default.object,oe.default.number,oe.default.undefined],r.timeout),oe.assert.any([oe.default.object,oe.default.undefined],r.context),oe.assert.any([oe.default.object,oe.default.undefined],r.hooks),oe.assert.any([oe.default.boolean,oe.default.undefined],r.decompress),oe.assert.any([oe.default.boolean,oe.default.undefined],r.ignoreInvalidCookies),oe.assert.any([oe.default.boolean,oe.default.undefined],r.followRedirect),oe.assert.any([oe.default.number,oe.default.undefined],r.maxRedirects),oe.assert.any([oe.default.boolean,oe.default.undefined],r.throwHttpErrors),oe.assert.any([oe.default.boolean,oe.default.undefined],r.http2),oe.assert.any([oe.default.boolean,oe.default.undefined],r.allowGetBody),oe.assert.any([oe.default.string,oe.default.undefined],r.localAddress),oe.ass
|
|||
|
`,g.message,g.stack);var f=new Error("tunneling socket could not be established, cause="+g.message);f.code="ECONNRESET",e.request.emit("error",f),i.removeSocket(n)}};io.prototype.removeSocket=function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var i=this.requests.shift();i&&this.createSocket(i,function(n){i.request.onSocket(n)})}};function zj(t,e){var r=this;io.prototype.createSocket.call(r,t,function(i){var n=t.request.getHeader("host"),s=jD({},r.options,{socket:i,servername:n?n.replace(/:.*$/,""):t.host}),o=GIe.connect(0,s);r.sockets[r.sockets.indexOf(i)]=o,e(o)})}function Vj(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function jD(t){for(var e=1,r=arguments.length;e<r;++e){var i=arguments[e];if(typeof i=="object")for(var n=Object.keys(i),s=0,o=n.length;s<o;++s){var a=n[s];i[a]!==void 0&&(t[a]=i[a])}}return t}var ra;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?ra=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)}:ra=function(){};mc.debug=ra});var _j=C((l7e,Zj)=>{Zj.exports=Xj()});var Lq=C((yXe,zD)=>{var cq=Object.assign({},require("fs")),ie=typeof ie!="undefined"?ie:{},Kf={},na;for(na in ie)ie.hasOwnProperty(na)&&(Kf[na]=ie[na]);var VD=[],uq="./this.program",gq=function(t,e){throw e},fq=!1,SA=!0,Of="";function oEe(t){return ie.locateFile?ie.locateFile(t,Of):Of+t}var yI,XD,BI,ZD;SA&&(fq?Of=require("path").dirname(Of)+"/":Of=__dirname+"/",yI=function(e,r){var i=pq(e);return i?r?i:i.toString():(BI||(BI=cq),ZD||(ZD=require("path")),e=ZD.normalize(e),BI.readFileSync(e,r?null:"utf8"))},XD=function(e){var r=yI(e,!0);return r.buffer||(r=new Uint8Array(r)),hq(r.buffer),r},process.argv.length>1&&(uq=process.argv[1].replace(/\\/g,"/")),VD=process.argv.slice(2),typeof zD!="undefined"&&(zD.exports=ie),gq=function(t){process.exit(t)},ie.inspect=function(){return"[Emscripten Module object]"});var wI=ie.print||console.log.bind(console),Xr=ie.printErr||console.warn.bind(console);for(na in Kf)Kf.hasOwnProperty(na)&&(ie[na]=Kf[na]);Kf=null;ie.arguments&&(VD=ie.arguments);ie.thisProgram&&(uq=ie.thisProgram);ie.quit&&(gq=ie.quit);var aEe=16;function AEe(t,e){return e||(e=aEe),Math.ceil(t/e)*e}var lEe=0,cEe=function(t){lEe=t},_D;ie.wasmBinary&&(_D=ie.wasmBinary);var w7e=ie.noExitRuntime||!0;typeof WebAssembly!="object"&&dr("no native wasm support detected");function uEe(t,e,r){switch(e=e||"i8",e.charAt(e.length-1)==="*"&&(e="i32"),e){case"i1":return hi[t>>0];case"i8":return hi[t>>0];case"i16":return $D[t>>1];case"i32":return Ge[t>>2];case"i64":return Ge[t>>2];case"float":return dq[t>>2];case"double":return Cq[t>>3];default:dr("invalid type for getValue: "+e)}return null}var QI,mq=!1,gEe;function hq(t,e){t||dr("Assertion failed: "+e)}function Iq(t){var e=ie["_"+t];return hq(e,"Cannot call unknown function "+t+", make sure it is exported"),e}function dEe(t,e,r,i,n){var s={string:function(h){var p=0;if(h!=null&&h!==0){var m=(h.length<<2)+1;p=Bq(m),yq(h,p,m)}return p},array:function(h){var p=Bq(h.length);return fEe(h,p),p}};function o(h){return e==="string"?Eq(h):e==="boolean"?Boolean(h):h}var a=Iq(t),l=[],c=0;if(i)for(var u=0;u<i.length;u++){var g=s[r[u]];g?(c===0&&(c=hEe()),l[u]=g(i[u])):l[u]=i[u]}var f=a.apply(null,l);return f=o(f),c!==0&&pEe(c),f}function CEe(t,e,r,i){r=r||[];var n=r.every(function(o){return o==="number"}),s=e!=="string";return s&&n&&!i?Iq(t):function(){return dEe(t,e,r,arguments,i)}}var wq=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function Ic(t,e,r){for(var i=e+r,n=e;t[n]&&!(n>=i);)++n;if(n-e>16&&t.subarray&&wq)return wq.decode(t.subarray(e,n));for(var s="";e<n;){var o=t[e++];if(!(o&128)){s+=String.fromCharCode(o);continue}var a=t[e++]&63;if((o&224)==192){s+=String.fromCharCode((o&31)<<6|a);continue}var l=t[e++]&63;if((o&240)==224?o=(o&15)<<12|a<<6|l:o=(o&7)<<18|a<<12|l<<6|t[e++]&63,o<65536)s+=String.fromCharCode(o);else{var c=o-65536;s+=String.fromCharCode(55296|c>>10,56320|c&1023)}}return s}function Eq(t,e){return t?Ic(Ec,t,e):""}func
|
|||
|
`)):typeof readline=="function"&&(e=readline(),e!==null&&(e+=`
|
|||
|
`));if(!e)return null;t.input=ox(e,!0)}return t.input.shift()},put_char:function(t,e){e===null||e===10?(wI(Ic(t.output,0)),t.output=[]):e!=0&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(wI(Ic(t.output,0)),t.output=[])}},default_tty1_ops:{put_char:function(t,e){e===null||e===10?(Xr(Ic(t.output,0)),t.output=[]):e!=0&&t.output.push(e)},flush:function(t){t.output&&t.output.length>0&&(Xr(Ic(t.output,0)),t.output=[])}}};function ax(t){for(var e=AEe(t,65536),r=Qq(e);t<e;)hi[r+t++]=0;return r}var ut={ops_table:null,mount:function(t){return ut.createNode(null,"/",16384|511,0)},createNode:function(t,e,r,i){if(E.isBlkdev(r)||E.isFIFO(r))throw new E.ErrnoError(63);ut.ops_table||(ut.ops_table={dir:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr,lookup:ut.node_ops.lookup,mknod:ut.node_ops.mknod,rename:ut.node_ops.rename,unlink:ut.node_ops.unlink,rmdir:ut.node_ops.rmdir,readdir:ut.node_ops.readdir,symlink:ut.node_ops.symlink},stream:{llseek:ut.stream_ops.llseek}},file:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr},stream:{llseek:ut.stream_ops.llseek,read:ut.stream_ops.read,write:ut.stream_ops.write,allocate:ut.stream_ops.allocate,mmap:ut.stream_ops.mmap,msync:ut.stream_ops.msync}},link:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr,readlink:ut.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ut.node_ops.getattr,setattr:ut.node_ops.setattr},stream:E.chrdev_stream_ops}});var n=E.createNode(t,e,r,i);return E.isDir(n.mode)?(n.node_ops=ut.ops_table.dir.node,n.stream_ops=ut.ops_table.dir.stream,n.contents={}):E.isFile(n.mode)?(n.node_ops=ut.ops_table.file.node,n.stream_ops=ut.ops_table.file.stream,n.usedBytes=0,n.contents=null):E.isLink(n.mode)?(n.node_ops=ut.ops_table.link.node,n.stream_ops=ut.ops_table.link.stream):E.isChrdev(n.mode)&&(n.node_ops=ut.ops_table.chrdev.node,n.stream_ops=ut.ops_table.chrdev.stream),n.timestamp=Date.now(),t&&(t.contents[e]=n,t.timestamp=n.timestamp),n},getFileDataAsTypedArray:function(t){return t.contents?t.contents.subarray?t.contents.subarray(0,t.usedBytes):new Uint8Array(t.contents):new Uint8Array(0)},expandFileStorage:function(t,e){var r=t.contents?t.contents.length:0;if(!(r>=e)){var i=1024*1024;e=Math.max(e,r*(r<i?2:1.125)>>>0),r!=0&&(e=Math.max(e,256));var n=t.contents;t.contents=new Uint8Array(e),t.usedBytes>0&&t.contents.set(n.subarray(0,t.usedBytes),0)}},resizeFileStorage:function(t,e){if(t.usedBytes!=e)if(e==0)t.contents=null,t.usedBytes=0;else{var r=t.contents;t.contents=new Uint8Array(e),r&&t.contents.set(r.subarray(0,Math.min(e,t.usedBytes))),t.usedBytes=e}},node_ops:{getattr:function(t){var e={};return e.dev=E.isChrdev(t.mode)?t.id:1,e.ino=t.id,e.mode=t.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=t.rdev,E.isDir(t.mode)?e.size=4096:E.isFile(t.mode)?e.size=t.usedBytes:E.isLink(t.mode)?e.size=t.link.length:e.size=0,e.atime=new Date(t.timestamp),e.mtime=new Date(t.timestamp),e.ctime=new Date(t.timestamp),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr:function(t,e){e.mode!==void 0&&(t.mode=e.mode),e.timestamp!==void 0&&(t.timestamp=e.timestamp),e.size!==void 0&&ut.resizeFileStorage(t,e.size)},lookup:function(t,e){throw E.genericErrors[44]},mknod:function(t,e,r,i){return ut.createNode(t,e,r,i)},rename:function(t,e,r){if(E.isDir(t.mode)){var i;try{i=E.lookupNode(e,r)}catch(s){}if(i)for(var n in i.contents)throw new E.ErrnoError(55)}delete t.parent.contents[t.name],t.parent.timestamp=Date.now(),t.name=r,e.contents[r]=t,e.timestamp=t.parent.timestamp,t.parent=e},unlink:function(t,e){delete t.contents[e],t.timestamp=Date.now()},rmdir:function(t,e){var r=E.lookupNode(t,e);for(var i in r.contents)throw new E.ErrnoError(55);delete t.contents[e],t.timestamp=Date.now()},readdir:function(t){var e=[".",".."];for(var r in t.contents)!t.contents.hasOwnProperty(r)||e.push(r);return e},symlink:function(t,e,r){var i=ut.createNode(t,e,511|40960,0);return i.link=r,i},readlink:function(t){if(!E.isLink(t.mode))throw new E.ErrnoError(28);return t.link}},stream_ops:{read:function(t,e,r,i,n){var s=t.node.contents;if(n>=t.node.usedBytes)return
|
|||
|
`},Ui="\\r",cg=st("\\r",!1),Ue=function(){return"\r"},ja="\\t",AC=st("\\t",!1),yN=function(){return" "},pw="\\v",BN=st("\\v",!1),zt=function(){return"\v"},vn="\\x",dw=st("\\x",!1),lC=function(d){return String.fromCharCode(parseInt(d,16))},Ls="\\u",cC=st("\\u",!1),Ro="\\U",Xe=st("\\U",!1),Cw=function(d){return String.fromCodePoint(parseInt(d,16))},uC=/^[0-9a-fA-f]/,gC=Pn([["0","9"],["a","f"],["A","f"]],!1,!1),No=aae(),qa="-",Ga=st("-",!1),Ja="+",Ms=st("+",!1),Wa=".",mw=st(".",!1),fC=function(d,B,k){return{type:"number",value:(d==="-"?-1:1)*parseFloat(B.join("")+"."+k.join(""))}},hC=function(d,B){return{type:"number",value:(d==="-"?-1:1)*parseInt(B.join(""))}},Iw=function(d){return v({type:"variable"},d)},za=function(d){return{type:"variable",name:d}},Ew=function(d){return d},pC="*",ug=st("*",!1),Sl="/",gg=st("/",!1),dC=function(d,B,k){return{type:B==="*"?"multiplication":"division",right:k}},Va=function(d,B){return B.reduce((k,F)=>v({left:k},F),d)},CC=function(d,B,k){return{type:B==="+"?"addition":"subtraction",right:k}},fg="$((",kl=st("$((",!1),nr="))",wN=st("))",!1),Ts=function(d){return d},_n="$(",mC=st("$(",!1),vl=function(d){return d},x="${",O=st("${",!1),se=":-",be=st(":-",!1),ye=function(d,B){return{name:d,defaultValue:B}},Oe=":-}",ot=st(":-}",!1),Ut=function(d){return{name:d,defaultValue:[]}},Ks=function(d){return{name:d}},_oe="$",$oe=st("$",!1),eae=function(d){return e.isGlobPattern(d)},tae=function(d){return d},QN=/^[a-zA-Z0-9_]/,bN=Pn([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),DN=function(){return oae()},xN=/^[$@*?#a-zA-Z0-9_\-]/,SN=Pn(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),rae=/^[(){}<>$|&; \t"']/,iae=Pn(["(",")","{","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),nae=/^[<>&; \t"']/,sae=Pn(["<",">","&",";"," "," ",'"',"'"],!1,!1),kN=/^[ \t]/,vN=Pn([" "," "],!1,!1),y=0,Pe=0,IC=[{line:1,column:1}],$n=0,yw=[],me=0,EC;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function oae(){return t.substring(Pe,y)}function hWe(){return hg(Pe,y)}function pWe(d,B){throw B=B!==void 0?B:hg(Pe,y),FN([lae(d)],t.substring(Pe,y),B)}function dWe(d,B){throw B=B!==void 0?B:hg(Pe,y),cae(d,B)}function st(d,B){return{type:"literal",text:d,ignoreCase:B}}function Pn(d,B,k){return{type:"class",parts:d,inverted:B,ignoreCase:k}}function aae(){return{type:"any"}}function Aae(){return{type:"end"}}function lae(d){return{type:"other",description:d}}function PN(d){var B=IC[d],k;if(B)return B;for(k=d-1;!IC[k];)k--;for(B=IC[k],B={line:B.line,column:B.column};k<d;)t.charCodeAt(k)===10?(B.line++,B.column=1):B.column++,k++;return IC[d]=B,B}function hg(d,B){var k=PN(d),F=PN(B);return{start:{offset:d,line:k.line,column:k.column},end:{offset:B,line:F.line,column:F.column}}}function we(d){y<$n||(y>$n&&($n=y,yw=[]),yw.push(d))}function cae(d,B){return new PA(d,null,null,B)}function FN(d,B,k){return new PA(PA.buildMessage(d,B),d,B,k)}function RN(){var d,B;return d=y,B=pg(),B===r&&(B=null),B!==r&&(Pe=d,B=s(B)),d=B,d}function pg(){var d,B,k,F,X;if(d=y,B=Bw(),B!==r){for(k=[],F=Se();F!==r;)k.push(F),F=Se();k!==r?(F=NN(),F!==r?(X=uae(),X===r&&(X=null),X!==r?(Pe=d,B=o(B,F,X),d=B):(y=d,d=r)):(y=d,d=r)):(y=d,d=r)}else y=d,d=r;if(d===r)if(d=y,B=Bw(),B!==r){for(k=[],F=Se();F!==r;)k.push(F),F=Se();k!==r?(F=NN(),F===r&&(F=null),F!==r?(Pe=d,B=a(B,F),d=B):(y=d,d=r)):(y=d,d=r)}else y=d,d=r;return d}function uae(){var d,B,k,F,X;for(d=y,B=[],k=Se();k!==r;)B.push(k),k=Se();if(B!==r)if(k=pg(),k!==r){for(F=[],X=Se();X!==r;)F.push(X),X=Se();F!==r?(Pe=d,B=l(k),d=B):(y=d,d=r)}else y=d,d=r;else y=d,d=r;return d}function NN(){var d;return t.charCodeAt(y)===59?(d=c,y++):(d=r,me===0&&we(u)),d===r&&(t.charCodeAt(y)===38?(d=g,y++):(d=r,me===0&&we(f))),d}function Bw(){var d,B,k;return d=y,B=LN(),B!==r?(k=gae(),k===r&&(k=null),k!==r?(Pe=d,B=h(B,k),d=B):(y=d,d=r)):(y=d,d=r),d}function gae(){var d,B,k,F,X,de,tt;for(d=y,B=[],k=Se();k!==r;)B.push(k),k=Se();if(B!==r)if(k=fae(),k!==r){for(F=[],X=Se();X!==r;)F.push(X),X=Se();if(F!==r)if(X=Bw(),X!==r){for(de=[],tt=Se();tt!==r;)de.push(
|
|||
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(n-1))===-1;)if(n-=1,this.position-n>r/2-1){i=" ... ",n+=5;break}for(s="",o=this.position;o<this.buffer.length&&`\0\r
|
|||
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(o))===-1;)if(o+=1,o-this.position>r/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(n,o),Jq.repeat(" ",e)+i+a+s+`
|
|||
|
`+Jq.repeat(" ",e+this.position-n+i.length)+"^"};mx.prototype.toString=function(e){var r,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),e||(r=this.getSnippet(),r&&(i+=`:
|
|||
|
`+r)),i};Gq.exports=mx});var Br=C((jXe,zq)=>{"use strict";var Vq=bc(),dye=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],Cye=["scalar","sequence","mapping"];function mye(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}function Iye(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(dye.indexOf(r)===-1)throw new Vq('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=mye(e.styleAliases||null),Cye.indexOf(this.kind)===-1)throw new Vq('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}zq.exports=Iye});var LA=C((qXe,Xq)=>{"use strict";var Zq=NA(),KI=bc(),Eye=Br();function Ix(t,e,r){var i=[];return t.include.forEach(function(n){r=Ix(n,e,r)}),t[e].forEach(function(n){r.forEach(function(s,o){s.tag===n.tag&&s.kind===n.kind&&i.push(o)}),r.push(n)}),r.filter(function(n,s){return i.indexOf(s)===-1})}function yye(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function i(n){t[n.kind][n.tag]=t.fallback[n.tag]=n}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(i);return t}function Dc(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&e.loadKind!=="scalar")throw new KI("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=Ix(this,"implicit",[]),this.compiledExplicit=Ix(this,"explicit",[]),this.compiledTypeMap=yye(this.compiledImplicit,this.compiledExplicit)}Dc.DEFAULT=null;Dc.create=function(){var e,r;switch(arguments.length){case 1:e=Dc.DEFAULT,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:throw new KI("Wrong number of arguments for Schema.create function")}if(e=Zq.toArray(e),r=Zq.toArray(r),!e.every(function(i){return i instanceof Dc}))throw new KI("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(i){return i instanceof Eye}))throw new KI("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Dc({include:e,explicit:r})};Xq.exports=Dc});var $q=C((GXe,_q)=>{"use strict";var Bye=Br();_q.exports=new Bye("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var tG=C((JXe,eG)=>{"use strict";var wye=Br();eG.exports=new wye("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var iG=C((WXe,rG)=>{"use strict";var Qye=Br();rG.exports=new Qye("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var OI=C((zXe,nG)=>{"use strict";var bye=LA();nG.exports=new bye({explicit:[$q(),tG(),iG()]})});var oG=C((VXe,sG)=>{"use strict";var Dye=Br();function xye(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function Sye(){return null}function kye(t){return t===null}sG.exports=new Dye("tag:yaml.org,2002:null",{kind:"scalar",resolve:xye,construct:Sye,predicate:kye,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var AG=C((XXe,aG)=>{"use strict";var vye=Br();function Pye(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function Fye(t){return t==="true"||t==="True"||t==="TRUE"}function Rye(t){return Object.prototype.toString.call(t)==="[object Boolean]"}aG.exports=new vye("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Pye,construct:Fye,predicate:Rye,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE"
|
|||
|
\r`;function nBe(t){if(t===null)return!1;var e,r,i=0,n=t.length,s=Bx;for(r=0;r<n;r++)if(e=s.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;i+=6}return i%8==0}function sBe(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,s=Bx,o=0,a=[];for(e=0;e<n;e++)e%4==0&&e&&(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(i.charAt(e));return r=n%4*6,r===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):r===18?(a.push(o>>10&255),a.push(o>>2&255)):r===12&&a.push(o>>4&255),MA?MA.from?MA.from(a):new MA(a):a}function oBe(t){var e="",r=0,i,n,s=t.length,o=Bx;for(i=0;i<s;i++)i%3==0&&i&&(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]),r=(r<<8)+t[i];return n=s%3,n===0?(e+=o[r>>18&63],e+=o[r>>12&63],e+=o[r>>6&63],e+=o[r&63]):n===2?(e+=o[r>>10&63],e+=o[r>>4&63],e+=o[r<<2&63],e+=o[64]):n===1&&(e+=o[r>>2&63],e+=o[r<<4&63],e+=o[64],e+=o[64]),e}function aBe(t){return MA&&MA.isBuffer(t)}BG.exports=new iBe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:nBe,construct:sBe,predicate:aBe,represent:oBe})});var DG=C((nZe,bG)=>{"use strict";var ABe=Br(),lBe=Object.prototype.hasOwnProperty,cBe=Object.prototype.toString;function uBe(t){if(t===null)return!0;var e=[],r,i,n,s,o,a=t;for(r=0,i=a.length;r<i;r+=1){if(n=a[r],o=!1,cBe.call(n)!=="[object Object]")return!1;for(s in n)if(lBe.call(n,s))if(!o)o=!0;else return!1;if(!o)return!1;if(e.indexOf(s)===-1)e.push(s);else return!1}return!0}function gBe(t){return t!==null?t:[]}bG.exports=new ABe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:uBe,construct:gBe})});var SG=C((sZe,xG)=>{"use strict";var fBe=Br(),hBe=Object.prototype.toString;function pBe(t){if(t===null)return!0;var e,r,i,n,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1){if(i=o[e],hBe.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;s[e]=[n[0],i[n[0]]]}return!0}function dBe(t){if(t===null)return[];var e,r,i,n,s,o=t;for(s=new Array(o.length),e=0,r=o.length;e<r;e+=1)i=o[e],n=Object.keys(i),s[e]=[n[0],i[n[0]]];return s}xG.exports=new fBe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:pBe,construct:dBe})});var vG=C((oZe,kG)=>{"use strict";var CBe=Br(),mBe=Object.prototype.hasOwnProperty;function IBe(t){if(t===null)return!0;var e,r=t;for(e in r)if(mBe.call(r,e)&&r[e]!==null)return!1;return!0}function EBe(t){return t!==null?t:{}}kG.exports=new CBe("tag:yaml.org,2002:set",{kind:"mapping",resolve:IBe,construct:EBe})});var xc=C((aZe,PG)=>{"use strict";var yBe=LA();PG.exports=new yBe({include:[yx()],implicit:[IG(),yG()],explicit:[QG(),DG(),SG(),vG()]})});var RG=C((AZe,FG)=>{"use strict";var BBe=Br();function wBe(){return!0}function QBe(){}function bBe(){return""}function DBe(t){return typeof t=="undefined"}FG.exports=new BBe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:wBe,construct:QBe,predicate:DBe,represent:bBe})});var LG=C((lZe,NG)=>{"use strict";var xBe=Br();function SBe(t){if(t===null||t.length===0)return!1;var e=t,r=/\/([gim]*)$/.exec(t),i="";return!(e[0]==="/"&&(r&&(i=r[1]),i.length>3||e[e.length-i.length-1]!=="/"))}function kBe(t){var e=t,r=/\/([gim]*)$/.exec(t),i="";return e[0]==="/"&&(r&&(i=r[1]),e=e.slice(1,e.length-i.length-1)),new RegExp(e,i)}function vBe(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function PBe(t){return Object.prototype.toString.call(t)==="[object RegExp]"}NG.exports=new xBe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:SBe,construct:kBe,predicate:PBe,represent:vBe})});var KG=C((cZe,MG)=>{"use strict";var UI;try{TG=require,UI=TG("esprima")}catch(t){typeof window!="undefined"&&(UI=window.esprima)}var TG,FBe=Br();function RBe(t){if(t===null)return!1;try{var e="("+t+")",r=UI.parse(e,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch(i){return!1}}function NBe(t){var e="("+t+")",r=UI.parse(e,{range:!0}),i=[],n;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&
|
|||
|
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function JBe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var XG=new Array(256),ZG=new Array(256);for(var kc=0;kc<256;kc++)XG[kc]=VG(kc)?1:0,ZG[kc]=VG(kc);function WBe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||KBe,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function _G(t,e){return new HG(e,new TBe(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function et(t,e){throw _G(t,e)}function jI(t,e){t.onWarning&&t.onWarning.call(null,_G(t,e))}var $G={YAML:function(e,r,i){var n,s,o;e.version!==null&&et(e,"duplication of %YAML directive"),i.length!==1&&et(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&et(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&&et(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&jI(e,"unsupported YAML version of the document")},TAG:function(e,r,i){var n,s;i.length!==2&&et(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],JG.test(n)||et(e,"ill-formed tag handle (first argument) of the TAG directive"),oa.call(e.tagMap,n)&&et(e,'there is a previously declared suffix for "'+n+'" tag handle'),WG.test(s)||et(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=s}};function aa(t,e,r,i){var n,s,o,a;if(e<r){if(a=t.input.slice(e,r),i)for(n=0,s=a.length;n<s;n+=1)o=a.charCodeAt(n),o===9||32<=o&&o<=1114111||et(t,"expected valid JSON character");else UBe.test(a)&&et(t,"the stream contains non-printable characters");t.result+=a}}function eJ(t,e,r,i){var n,s,o,a;for(oo.isObject(r)||et(t,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),o=0,a=n.length;o<a;o+=1)s=n[o],oa.call(e,s)||(e[s]=r[s],i[s]=!0)}function vc(t,e,r,i,n,s,o,a){var l,c;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),l=0,c=n.length;l<c;l+=1)Array.isArray(n[l])&&et(t,"nested arrays are not supported inside keys"),typeof n=="object"&&zG(n[l])==="[object Object]"&&(n[l]="[object Object]");if(typeof n=="object"&&zG(n)==="[object Object]"&&(n="[object Object]"),n=String(n),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(l=0,c=s.length;l<c;l+=1)eJ(t,e,s[l],r);else eJ(t,e,s,r);else!t.json&&!oa.call(r,n)&&oa.call(e,n)&&(t.line=o||t.line,t.position=a||t.position,et(t,"duplicated mapping key")),e[n]=s,delete r[n];return e}function Qx(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):et(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function Cr(t,e,r){for(var i=0,n=t.input.charCodeAt(t.position);n!==0;){for(;TA(n);)n=t.input.charCodeAt(++t.position);if(e&&n===35)do n=t.input.charCodeAt(++t.position);while(n!==10&&n!==13&&n!==0);if(us(n))for(Qx(t),n=t.input.charCodeAt(t.position),i++,t.lineIndent=0;n===32;)t.lineIndent++,n=t.input.charCodeAt(++t.position);else break}return r!==-1&&i!==0&&t.lineIndent<r&&jI(t,"deficient indentation"),i}function qI(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Pi(r)))}function bx(t,e){e===1?t.result+=" ":e>1&&(t.result+=oo.repeat(`
|
|||
|
`,e-1))}function zBe(t,e,r){var i,n,s,o,a,l,c,u,g=t.kind,f=t.result,h;if(h=t.input.charCodeAt(t.position),Pi(h)||Sc(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(n=t.input.charCodeAt(t.position+1),Pi(n)||r&&Sc(n)))return!1;for(t.kind="scalar",t.result="",s=o=t.position,a=!1;h!==0;){if(h===58){if(n=t.input.charCodeAt(t.position+1),Pi(n)||r&&Sc(n))break}else if(h===35){if(i=t.input.charCodeAt(t.position-1),Pi(i))break}else{if(t.position===t.lineStart&&qI(t)||r&&Sc(h))break;if(us(h))if(l=t.line,c=t.lineStart,u=t.lineIndent,Cr(t,!1,-1),t.lineIndent>=e){a=!0,h=t.input.charCodeAt(t.position);continue}else{t.position=o,t.line=l,t.lineStart=c,t.lineIndent=u;break}}a&&(aa(t,s,o,!1),bx(t,t.line-l),s=o=t.position,a=!1),TA(h)||(o=t.position+1),h=t.input.charCodeAt(++t.position)}return aa(t,s,o,!1),t.result?!0:(t.kind=g,t.result=f,!1)}function VBe(t,e){var r,i,n;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(aa(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,n=t.position;else return!0;else us(r)?(aa(t,i,n,!0),bx(t,Cr(t,!1,e)),i=n=t.position):t.position===t.lineStart&&qI(t)?et(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);et(t,"unexpected end of the stream within a single quoted scalar")}function XBe(t,e){var r,i,n,s,o,a;if(a=t.input.charCodeAt(t.position),a!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(a=t.input.charCodeAt(t.position))!==0;){if(a===34)return aa(t,r,t.position,!0),t.position++,!0;if(a===92){if(aa(t,r,t.position,!0),a=t.input.charCodeAt(++t.position),us(a))Cr(t,!1,e);else if(a<256&&XG[a])t.result+=ZG[a],t.position++;else if((o=qBe(a))>0){for(n=o,s=0;n>0;n--)a=t.input.charCodeAt(++t.position),(o=jBe(a))>=0?s=(s<<4)+o:et(t,"expected hexadecimal character");t.result+=JBe(s),t.position++}else et(t,"unknown escape sequence");r=i=t.position}else us(a)?(aa(t,r,i,!0),bx(t,Cr(t,!1,e)),r=i=t.position):t.position===t.lineStart&&qI(t)?et(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}et(t,"unexpected end of the stream within a double quoted scalar")}function ZBe(t,e){var r=!0,i,n=t.tag,s,o=t.anchor,a,l,c,u,g,f={},h,p,m,I;if(I=t.input.charCodeAt(t.position),I===91)l=93,g=!1,s=[];else if(I===123)l=125,g=!0,s={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),I=t.input.charCodeAt(++t.position);I!==0;){if(Cr(t,!0,e),I=t.input.charCodeAt(t.position),I===l)return t.position++,t.tag=n,t.anchor=o,t.kind=g?"mapping":"sequence",t.result=s,!0;r||et(t,"missed comma between flow collection entries"),p=h=m=null,c=u=!1,I===63&&(a=t.input.charCodeAt(t.position+1),Pi(a)&&(c=u=!0,t.position++,Cr(t,!0,e))),i=t.line,Pc(t,e,HI,!1,!0),p=t.tag,h=t.result,Cr(t,!0,e),I=t.input.charCodeAt(t.position),(u||t.line===i)&&I===58&&(c=!0,I=t.input.charCodeAt(++t.position),Cr(t,!0,e),Pc(t,e,HI,!1,!0),m=t.result),g?vc(t,s,f,p,h,m):c?s.push(vc(t,null,f,p,h,m)):s.push(h),Cr(t,!0,e),I=t.input.charCodeAt(t.position),I===44?(r=!0,I=t.input.charCodeAt(++t.position)):r=!1}et(t,"unexpected end of the stream within a flow collection")}function _Be(t,e){var r,i,n=wx,s=!1,o=!1,a=e,l=0,c=!1,u,g;if(g=t.input.charCodeAt(t.position),g===124)i=!1;else if(g===62)i=!0;else return!1;for(t.kind="scalar",t.result="";g!==0;)if(g=t.input.charCodeAt(++t.position),g===43||g===45)wx===n?n=g===43?GG:OBe:et(t,"repeat of a chomping mode identifier");else if((u=GBe(g))>=0)u===0?et(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?et(t,"repeat of an indentation width identifier"):(a=e+u-1,o=!0);else break;if(TA(g)){do g=t.input.charCodeAt(++t.position);while(TA(g));if(g===35)do g=t.input.charCodeAt(++t.position);while(!us(g)&&g!==0)}for(;g!==0;){for(Qx(t),t.lineIndent=0,g=t.input.charCodeAt(t.position);(!o||t.lineIndent<a)&&g===32;)t.lineIndent++,g=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>a&&(a=t
|
|||
|
`,s?1+l:l):n===wx&&s&&(t.result+=`
|
|||
|
`);break}for(i?TA(g)?(c=!0,t.result+=oo.repeat(`
|
|||
|
`,s?1+l:l)):c?(c=!1,t.result+=oo.repeat(`
|
|||
|
`,l+1)):l===0?s&&(t.result+=" "):t.result+=oo.repeat(`
|
|||
|
`,l):t.result+=oo.repeat(`
|
|||
|
`,s?1+l:l),s=!0,o=!0,l=0,r=t.position;!us(g)&&g!==0;)g=t.input.charCodeAt(++t.position);aa(t,r,t.position,!1)}return!0}function tJ(t,e){var r,i=t.tag,n=t.anchor,s=[],o,a=!1,l;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),l=t.input.charCodeAt(t.position);l!==0&&!(l!==45||(o=t.input.charCodeAt(t.position+1),!Pi(o)));){if(a=!0,t.position++,Cr(t,!0,-1)&&t.lineIndent<=e){s.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,Pc(t,e,qG,!1,!0),s.push(t.result),Cr(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)et(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return a?(t.tag=i,t.anchor=n,t.kind="sequence",t.result=s,!0):!1}function $Be(t,e,r){var i,n,s,o,a=t.tag,l=t.anchor,c={},u={},g=null,f=null,h=null,p=!1,m=!1,I;for(t.anchor!==null&&(t.anchorMap[t.anchor]=c),I=t.input.charCodeAt(t.position);I!==0;){if(i=t.input.charCodeAt(t.position+1),s=t.line,o=t.position,(I===63||I===58)&&Pi(i))I===63?(p&&(vc(t,c,u,g,f,null),g=f=h=null),m=!0,p=!0,n=!0):p?(p=!1,n=!0):et(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,I=i;else if(Pc(t,r,jG,!1,!0))if(t.line===s){for(I=t.input.charCodeAt(t.position);TA(I);)I=t.input.charCodeAt(++t.position);if(I===58)I=t.input.charCodeAt(++t.position),Pi(I)||et(t,"a whitespace character is expected after the key-value separator within a block mapping"),p&&(vc(t,c,u,g,f,null),g=f=h=null),m=!0,p=!1,n=!1,g=t.tag,f=t.result;else if(m)et(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=a,t.anchor=l,!0}else if(m)et(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=a,t.anchor=l,!0;else break;if((t.line===s||t.lineIndent>e)&&(Pc(t,e,YI,!0,n)&&(p?f=t.result:h=t.result),p||(vc(t,c,u,g,f,h,s,o),g=f=h=null),Cr(t,!0,-1),I=t.input.charCodeAt(t.position)),t.lineIndent>e&&I!==0)et(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return p&&vc(t,c,u,g,f,null),m&&(t.tag=a,t.anchor=l,t.kind="mapping",t.result=c),m}function ewe(t){var e,r=!1,i=!1,n,s,o;if(o=t.input.charCodeAt(t.position),o!==33)return!1;if(t.tag!==null&&et(t,"duplication of a tag property"),o=t.input.charCodeAt(++t.position),o===60?(r=!0,o=t.input.charCodeAt(++t.position)):o===33?(i=!0,n="!!",o=t.input.charCodeAt(++t.position)):n="!",e=t.position,r){do o=t.input.charCodeAt(++t.position);while(o!==0&&o!==62);t.position<t.length?(s=t.input.slice(e,t.position),o=t.input.charCodeAt(++t.position)):et(t,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!Pi(o);)o===33&&(i?et(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),JG.test(n)||et(t,"named tag handle cannot contain such characters"),i=!0,e=t.position+1)),o=t.input.charCodeAt(++t.position);s=t.input.slice(e,t.position),YBe.test(s)&&et(t,"tag suffix cannot contain flow indicator characters")}return s&&!WG.test(s)&&et(t,"tag name cannot contain such characters: "+s),r?t.tag=s:oa.call(t.tagMap,n)?t.tag=t.tagMap[n]+s:n==="!"?t.tag="!"+s:n==="!!"?t.tag="tag:yaml.org,2002:"+s:et(t,'undeclared tag handle "'+n+'"'),!0}function twe(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&et(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Pi(r)&&!Sc(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&et(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function rwe(t){var e,r,i;if(i=t.input.charCodeAt(t.position),i!==42)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!Pi(i)&&!Sc(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&et(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),oa.call(t.anchorMap,r)||et(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Cr(t,!0,-1),!0}function Pc(t,e,r,i,n){var s,o,a,l=1,c=!1,u=!1,g,f,h,p,m;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s
|
|||
|
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new WBe(t,e),i=t.indexOf("\0");for(i!==-1&&(r.position=i,et(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)iwe(r);return r.documents}function iJ(t,e,r){e!==null&&typeof e=="object"&&typeof r=="undefined"&&(r=e,e=null);var i=rJ(t,r);if(typeof e!="function")return i;for(var n=0,s=i.length;n<s;n+=1)e(i[n])}function nJ(t,e){var r=rJ(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new HG("expected a single document in the stream, but found more")}}function nwe(t,e,r){return typeof e=="object"&&e!==null&&typeof r=="undefined"&&(r=e,e=null),iJ(t,e,oo.extend({schema:YG},r))}function swe(t,e){return nJ(t,oo.extend({schema:YG},e))}Jf.exports.loadAll=iJ;Jf.exports.load=nJ;Jf.exports.safeLoadAll=nwe;Jf.exports.safeLoad=swe});var SJ=C((fZe,Dx)=>{"use strict";var Wf=NA(),zf=bc(),owe=Gf(),awe=xc(),oJ=Object.prototype.toString,aJ=Object.prototype.hasOwnProperty,Awe=9,Vf=10,lwe=13,cwe=32,uwe=33,gwe=34,AJ=35,fwe=37,hwe=38,pwe=39,dwe=42,lJ=44,Cwe=45,cJ=58,mwe=61,Iwe=62,Ewe=63,ywe=64,uJ=91,gJ=93,Bwe=96,fJ=123,wwe=124,hJ=125,Zr={};Zr[0]="\\0";Zr[7]="\\a";Zr[8]="\\b";Zr[9]="\\t";Zr[10]="\\n";Zr[11]="\\v";Zr[12]="\\f";Zr[13]="\\r";Zr[27]="\\e";Zr[34]='\\"';Zr[92]="\\\\";Zr[133]="\\N";Zr[160]="\\_";Zr[8232]="\\L";Zr[8233]="\\P";var Qwe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function bwe(t,e){var r,i,n,s,o,a,l;if(e===null)return{};for(r={},i=Object.keys(e),n=0,s=i.length;n<s;n+=1)o=i[n],a=String(e[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),l=t.compiledTypeMap.fallback[o],l&&aJ.call(l.styleAliases,a)&&(a=l.styleAliases[a]),r[o]=a;return r}function pJ(t){var e,r,i;if(e=t.toString(16).toUpperCase(),t<=255)r="x",i=2;else if(t<=65535)r="u",i=4;else if(t<=4294967295)r="U",i=8;else throw new zf("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+Wf.repeat("0",i-e.length)+e}function Dwe(t){this.schema=t.schema||owe,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=Wf.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=bwe(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function dJ(t,e){for(var r=Wf.repeat(" ",e),i=0,n=-1,s="",o,a=t.length;i<a;)n=t.indexOf(`
|
|||
|
`,i),n===-1?(o=t.slice(i),i=a):(o=t.slice(i,n+1),i=n+1),o.length&&o!==`
|
|||
|
`&&(s+=r),s+=o;return s}function xx(t,e){return`
|
|||
|
`+Wf.repeat(" ",t.indent*e)}function xwe(t,e){var r,i,n;for(r=0,i=t.implicitTypes.length;r<i;r+=1)if(n=t.implicitTypes[r],n.resolve(e))return!0;return!1}function Sx(t){return t===cwe||t===Awe}function Fc(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==65279||65536<=t&&t<=1114111}function Swe(t){return Fc(t)&&!Sx(t)&&t!==65279&&t!==lwe&&t!==Vf}function CJ(t,e){return Fc(t)&&t!==65279&&t!==lJ&&t!==uJ&&t!==gJ&&t!==fJ&&t!==hJ&&t!==cJ&&(t!==AJ||e&&Swe(e))}function kwe(t){return Fc(t)&&t!==65279&&!Sx(t)&&t!==Cwe&&t!==Ewe&&t!==cJ&&t!==lJ&&t!==uJ&&t!==gJ&&t!==fJ&&t!==hJ&&t!==AJ&&t!==hwe&&t!==dwe&&t!==uwe&&t!==wwe&&t!==mwe&&t!==Iwe&&t!==pwe&&t!==gwe&&t!==fwe&&t!==ywe&&t!==Bwe}function mJ(t){var e=/^\n* /;return e.test(t)}var IJ=1,EJ=2,yJ=3,BJ=4,GI=5;function vwe(t,e,r,i,n){var s,o,a,l=!1,c=!1,u=i!==-1,g=-1,f=kwe(t.charCodeAt(0))&&!Sx(t.charCodeAt(t.length-1));if(e)for(s=0;s<t.length;s++){if(o=t.charCodeAt(s),!Fc(o))return GI;a=s>0?t.charCodeAt(s-1):null,f=f&&CJ(o,a)}else{for(s=0;s<t.length;s++){if(o=t.charCodeAt(s),o===Vf)l=!0,u&&(c=c||s-g-1>i&&t[g+1]!==" ",g=s);else if(!Fc(o))return GI;a=s>0?t.charCodeAt(s-1):null,f=f&&CJ(o,a)}c=c||u&&s-g-1>i&&t[g+1]!==" "}return!l&&!c?f&&!n(t)?IJ:EJ:r>9&&mJ(t)?GI:c?BJ:yJ}function Rwe(t,e,r,i){t.dump=function(){if(e.length===0)return"''";if(!t.noCompatMode&&Qwe.indexOf(e)!==-1)return"'"+e+"'";var n=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-n),o=i||t.flowLevel>-1&&r>=t.flowLevel;function a(l){return xwe(t,l)}switch(vwe(e,o,t.indent,s,a)){case IJ:return e;case EJ:return"'"+e.replace(/'/g,"''")+"'";case yJ:return"|"+wJ(e,t.indent)+QJ(dJ(e,n));case BJ:return">"+wJ(e,t.indent)+QJ(dJ(Pwe(e,s),n));case GI:return'"'+Fwe(e,s)+'"';default:throw new zf("impossible error: invalid scalar style")}}()}function wJ(t,e){var r=mJ(t)?String(e):"",i=t[t.length-1]===`
|
|||
|
`,n=i&&(t[t.length-2]===`
|
|||
|
`||t===`
|
|||
|
`),s=n?"+":i?"":"-";return r+s+`
|
|||
|
`}function QJ(t){return t[t.length-1]===`
|
|||
|
`?t.slice(0,-1):t}function Pwe(t,e){for(var r=/(\n+)([^\n]*)/g,i=function(){var c=t.indexOf(`
|
|||
|
`);return c=c!==-1?c:t.length,r.lastIndex=c,bJ(t.slice(0,c),e)}(),n=t[0]===`
|
|||
|
`||t[0]===" ",s,o;o=r.exec(t);){var a=o[1],l=o[2];s=l[0]===" ",i+=a+(!n&&!s&&l!==""?`
|
|||
|
`:"")+bJ(l,e),n=s}return i}function bJ(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,i,n=0,s,o=0,a=0,l="";i=r.exec(t);)a=i.index,a-n>e&&(s=o>n?o:a,l+=`
|
|||
|
`+t.slice(n,s),n=s+1),o=a;return l+=`
|
|||
|
`,t.length-n>e&&o>n?l+=t.slice(n,o)+`
|
|||
|
`+t.slice(o+1):l+=t.slice(n),l.slice(1)}function Fwe(t){for(var e="",r,i,n,s=0;s<t.length;s++){if(r=t.charCodeAt(s),r>=55296&&r<=56319&&(i=t.charCodeAt(s+1),i>=56320&&i<=57343)){e+=pJ((r-55296)*1024+i-56320+65536),s++;continue}n=Zr[r],e+=!n&&Fc(r)?t[s]:n||pJ(r)}return e}function Nwe(t,e,r){var i="",n=t.tag,s,o;for(s=0,o=r.length;s<o;s+=1)KA(t,e,r[s],!1,!1)&&(s!==0&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump);t.tag=n,t.dump="["+i+"]"}function Lwe(t,e,r,i){var n="",s=t.tag,o,a;for(o=0,a=r.length;o<a;o+=1)KA(t,e+1,r[o],!0,!0)&&((!i||o!==0)&&(n+=xx(t,e)),t.dump&&Vf===t.dump.charCodeAt(0)?n+="-":n+="- ",n+=t.dump);t.tag=s,t.dump=n||"[]"}function Mwe(t,e,r){var i="",n=t.tag,s=Object.keys(r),o,a,l,c,u;for(o=0,a=s.length;o<a;o+=1)u="",o!==0&&(u+=", "),t.condenseFlow&&(u+='"'),l=s[o],c=r[l],!!KA(t,e,l,!1,!1)&&(t.dump.length>1024&&(u+="? "),u+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),!!KA(t,e,c,!1,!1)&&(u+=t.dump,i+=u));t.tag=n,t.dump="{"+i+"}"}function Twe(t,e,r,i){var n="",s=t.tag,o=Object.keys(r),a,l,c,u,g,f;if(t.sortKeys===!0)o.sort();else if(typeof t.sortKeys=="function")o.sort(t.sortKeys);else if(t.sortKeys)throw new zf("sortKeys must be a boolean or a function");for(a=0,l=o.length;a<l;a+=1)f="",(!i||a!==0)&&(f+=xx(t,e)),c=o[a],u=r[c],!!KA(t,e+1,c,!0,!0,!0)&&(g=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,g&&(t.dump&&Vf===t.dump.charCodeAt(0)?f+="?":f+="? "),f+=t.dump,g&&(f+=xx(t,e)),!!KA(t,e+1,u,!0,g)&&(t.dump&&Vf===t.dump.charCodeAt(0)?f+=":":f+=": ",f+=t.dump,n+=f));t.tag=s,t.dump=n||"{}"}function DJ(t,e,r){var i,n,s,o,a,l;for(n=r?t.explicitTypes:t.implicitTypes,s=0,o=n.length;s<o;s+=1)if(a=n[s],(a.instanceOf||a.predicate)&&(!a.instanceOf||typeof e=="object"&&e instanceof a.instanceOf)&&(!a.predicate||a.predicate(e))){if(t.tag=r?a.tag:"?",a.represent){if(l=t.styleMap[a.tag]||a.defaultStyle,oJ.call(a.represent)==="[object Function]")i=a.represent(e,l);else if(aJ.call(a.represent,l))i=a.represent[l](e,l);else throw new zf("!<"+a.tag+'> tag resolver accepts not "'+l+'" style');t.dump=i}return!0}return!1}function KA(t,e,r,i,n,s){t.tag=null,t.dump=r,DJ(t,r,!1)||DJ(t,r,!0);var o=oJ.call(t.dump);i&&(i=t.flowLevel<0||t.flowLevel>e);var a=o==="[object Object]"||o==="[object Array]",l,c;if(a&&(l=t.duplicates.indexOf(r),c=l!==-1),(t.tag!==null&&t.tag!=="?"||c||t.indent!==2&&e>0)&&(n=!1),c&&t.usedDuplicates[l])t.dump="*ref_"+l;else{if(a&&c&&!t.usedDuplicates[l]&&(t.usedDuplicates[l]=!0),o==="[object Object]")i&&Object.keys(t.dump).length!==0?(Twe(t,e,t.dump,n),c&&(t.dump="&ref_"+l+t.dump)):(Mwe(t,e,t.dump),c&&(t.dump="&ref_"+l+" "+t.dump));else if(o==="[object Array]"){var u=t.noArrayIndent&&e>0?e-1:e;i&&t.dump.length!==0?(Lwe(t,u,t.dump,n),c&&(t.dump="&ref_"+l+t.dump)):(Nwe(t,u,t.dump),c&&(t.dump="&ref_"+l+" "+t.dump))}else if(o==="[object String]")t.tag!=="?"&&Rwe(t,t.dump,e,s);else{if(t.skipInvalid)return!1;throw new zf("unacceptable kind of an object to dump "+o)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function Kwe(t,e){var r=[],i=[],n,s;for(kx(t,r,i),n=0,s=i.length;n<s;n+=1)e.duplicates.push(r[i[n]]);e.usedDuplicates=new Array(s)}function kx(t,e,r){var i,n,s;if(t!==null&&typeof t=="object")if(n=e.indexOf(t),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(e.push(t),Array.isArray(t))for(n=0,s=t.length;n<s;n+=1)kx(t[n],e,r);else for(i=Object.keys(t),n=0,s=i.length;n<s;n+=1)kx(t[i[n]],e,r)}function xJ(t,e){e=e||{};var r=new Dwe(e);return r.noRefs||Kwe(t,r),KA(r,0,t,!0,!0)?r.dump+`
|
|||
|
`:""}function Owe(t,e){return xJ(t,Wf.extend({schema:awe},e))}Dx.exports.dump=xJ;Dx.exports.safeDump=Owe});var vJ=C((hZe,er)=>{"use strict";var JI=sJ(),kJ=SJ();function WI(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}er.exports.Type=Br();er.exports.Schema=LA();er.exports.FAILSAFE_SCHEMA=OI();er.exports.JSON_SCHEMA=Ex();er.exports.CORE_SCHEMA=yx();er.exports.DEFAULT_SAFE_SCHEMA=xc();er.exports.DEFAULT_FULL_SCHEMA=Gf();er.exports.load=JI.load;er.exports.loadAll=JI.loadAll;er.exports.safeLoad=JI.safeLoad;er.exports.safeLoadAll=JI.safeLoadAll;er.exports.dump=kJ.dump;er.exports.safeDump=kJ.safeDump;er.exports.YAMLException=bc();er.exports.MINIMAL_SCHEMA=OI();er.exports.SAFE_SCHEMA=xc();er.exports.DEFAULT_SCHEMA=Gf();er.exports.scan=WI("scan");er.exports.parse=WI("parse");er.exports.compose=WI("compose");er.exports.addConstructor=WI("addConstructor")});var FJ=C((pZe,PJ)=>{"use strict";var Uwe=vJ();PJ.exports=Uwe});var NJ=C((dZe,RJ)=>{"use strict";function Hwe(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function OA(t,e,r,i){this.message=t,this.expected=e,this.found=r,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,OA)}Hwe(OA,Error);OA.buildMessage=function(t,e){var r={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g<c.parts.length;g++)u+=c.parts[g]instanceof Array?s(c.parts[g][0])+"-"+s(c.parts[g][1]):s(c.parts[g]);return"["+(c.inverted?"^":"")+u+"]"},any:function(c){return"any character"},end:function(c){return"end of input"},other:function(c){return c.description}};function i(c){return c.charCodeAt(0).toString(16).toUpperCase()}function n(c){return c.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+i(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+i(u)})}function s(c){return c.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(u){return"\\x0"+i(u)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(u){return"\\x"+i(u)})}function o(c){return r[c.type](c)}function a(c){var u=new Array(c.length),g,f;for(g=0;g<c.length;g++)u[g]=o(c[g]);if(u.sort(),u.length>0){for(g=1,f=1;g<u.length;g++)u[g-1]!==u[g]&&(u[f]=u[g],f++);u.length=f}switch(u.length){case 1:return u[0];case 2:return u[0]+" or "+u[1];default:return u.slice(0,-1).join(", ")+", or "+u[u.length-1]}}function l(c){return c?'"'+n(c)+'"':"end of input"}return"Expected "+a(t)+" but "+l(e)+" found."};function Ywe(t,e){e=e!==void 0?e:{};var r={},i={Start:gC},n=gC,s=function(x){return[].concat(...x)},o="-",a=zt("-",!1),l=function(x){return x},c=function(x){return Object.assign({},...x)},u="#",g=zt("#",!1),f=dw(),h=function(){return{}},p=":",m=zt(":",!1),I=function(x,O){return{[x]:O}},w=",",Q=zt(",",!1),S=function(x,O){return O},R=function(x,O,se){return Object.assign({},...[x].concat(O).map(be=>({[be]:se})))},U=function(x){return x},L=function(x){return x},P=Ls("correct indentation"),Y=" ",$=zt(" ",!1),H=function(x){return x.length===vl*mC},A=function(x){return x.length===(vl+1)*mC},J=function(){return vl++,!0},_=function(){return vl--,!0},ne=function(){return AC()},j=Ls("pseudostring"),N=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,Me=vn(["\r",`
|
|||
|
`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),ve=/^[^\r\n\t ,\][{}:#"']/,He=vn(["\r",`
|
|||
|
`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),Ke=function(){return AC().replace(/^ *| *$/g,"")},te="--",ce=zt("--",!1),De=/^[a-zA-Z\/0-9]/,fe=vn([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),Be=/^[^\r\n\t :,]/,pe=vn(["\r",`
|
|||
|
`," "," ",":",","],!0,!1),ke="null",Z=zt("null",!1),V=function(){return null},Ae="true",ue=zt("true",!1),Qe=function(){return!0},nt="false",dt=zt("false",!1),Bt=function(){return!1},kn=Ls("string"),Bi='"',_t=zt('"',!1),en=function(){return""},Zn=function(x){return x},ng=function(x){return x.join("")},Yd=/^[^"\\\0-\x1F\x7F]/,Rs=vn(['"',"\\",["\0",""],"\x7F"],!0,!1),sg='\\"',jd=zt('\\"',!1),iw=function(){return'"'},og="\\\\",qd=zt("\\\\",!1),Gd=function(){return"\\"},Jd="\\/",nw=zt("\\/",!1),sw=function(){return"/"},ag="\\b",ow=zt("\\b",!1),aw=function(){return"\b"},Wd="\\f",Aw=zt("\\f",!1),Fo=function(){return"\f"},Ns="\\n",ee=zt("\\n",!1),zd=function(){return`
|
|||
|
`},Oi="\\r",Vd=zt("\\r",!1),Xd=function(){return"\r"},Ya="\\t",Zd=zt("\\t",!1),_d=function(){return" "},Ag="\\u",$d=zt("\\u",!1),eC=function(x,O,se,be){return String.fromCharCode(parseInt(`0x${x}${O}${se}${be}`))},lw=/^[0-9a-fA-F]/,cw=vn([["0","9"],["a","f"],["A","F"]],!1,!1),tC=Ls("blank space"),rC=/^[ \t]/,iC=vn([" "," "],!1,!1),nC=Ls("white space"),sC=/^[ \t\n\r]/,oC=vn([" "," ",`
|
|||
|
`,"\r"],!1,!1),lg=`\r
|
|||
|
`,uw=zt(`\r
|
|||
|
`,!1),gw=`
|
|||
|
`,aC=zt(`
|
|||
|
`,!1),fw="\r",hw=zt("\r",!1),T=0,ct=0,xl=[{line:1,column:1}],Ui=0,cg=[],Ue=0,ja;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function AC(){return t.substring(ct,T)}function yN(){return Ro(ct,T)}function pw(x,O){throw O=O!==void 0?O:Ro(ct,T),uC([Ls(x)],t.substring(ct,T),O)}function BN(x,O){throw O=O!==void 0?O:Ro(ct,T),Cw(x,O)}function zt(x,O){return{type:"literal",text:x,ignoreCase:O}}function vn(x,O,se){return{type:"class",parts:x,inverted:O,ignoreCase:se}}function dw(){return{type:"any"}}function lC(){return{type:"end"}}function Ls(x){return{type:"other",description:x}}function cC(x){var O=xl[x],se;if(O)return O;for(se=x-1;!xl[se];)se--;for(O=xl[se],O={line:O.line,column:O.column};se<x;)t.charCodeAt(se)===10?(O.line++,O.column=1):O.column++,se++;return xl[x]=O,O}function Ro(x,O){var se=cC(x),be=cC(O);return{start:{offset:x,line:se.line,column:se.column},end:{offset:O,line:be.line,column:be.column}}}function Xe(x){T<Ui||(T>Ui&&(Ui=T,cg=[]),cg.push(x))}function Cw(x,O){return new OA(x,null,null,O)}function uC(x,O,se){return new OA(OA.buildMessage(x,O),x,O,se)}function gC(){var x;return x=Ga(),x}function No(){var x,O,se;for(x=T,O=[],se=qa();se!==r;)O.push(se),se=qa();return O!==r&&(ct=x,O=s(O)),x=O,x}function qa(){var x,O,se,be,ye;return x=T,O=Wa(),O!==r?(t.charCodeAt(T)===45?(se=o,T++):(se=r,Ue===0&&Xe(a)),se!==r?(be=nr(),be!==r?(ye=Ms(),ye!==r?(ct=x,O=l(ye),x=O):(T=x,x=r)):(T=x,x=r)):(T=x,x=r)):(T=x,x=r),x}function Ga(){var x,O,se;for(x=T,O=[],se=Ja();se!==r;)O.push(se),se=Ja();return O!==r&&(ct=x,O=c(O)),x=O,x}function Ja(){var x,O,se,be,ye,Oe,ot,Ut,Ks;if(x=T,O=nr(),O===r&&(O=null),O!==r){if(se=T,t.charCodeAt(T)===35?(be=u,T++):(be=r,Ue===0&&Xe(g)),be!==r){if(ye=[],Oe=T,ot=T,Ue++,Ut=_n(),Ue--,Ut===r?ot=void 0:(T=ot,ot=r),ot!==r?(t.length>T?(Ut=t.charAt(T),T++):(Ut=r,Ue===0&&Xe(f)),Ut!==r?(ot=[ot,Ut],Oe=ot):(T=Oe,Oe=r)):(T=Oe,Oe=r),Oe!==r)for(;Oe!==r;)ye.push(Oe),Oe=T,ot=T,Ue++,Ut=_n(),Ue--,Ut===r?ot=void 0:(T=ot,ot=r),ot!==r?(t.length>T?(Ut=t.charAt(T),T++):(Ut=r,Ue===0&&Xe(f)),Ut!==r?(ot=[ot,Ut],Oe=ot):(T=Oe,Oe=r)):(T=Oe,Oe=r);else ye=r;ye!==r?(be=[be,ye],se=be):(T=se,se=r)}else T=se,se=r;if(se===r&&(se=null),se!==r){if(be=[],ye=Ts(),ye!==r)for(;ye!==r;)be.push(ye),ye=Ts();else be=r;be!==r?(ct=x,O=h(),x=O):(T=x,x=r)}else T=x,x=r}else T=x,x=r;if(x===r&&(x=T,O=Wa(),O!==r?(se=Iw(),se!==r?(be=nr(),be===r&&(be=null),be!==r?(t.charCodeAt(T)===58?(ye=p,T++):(ye=r,Ue===0&&Xe(m)),ye!==r?(Oe=nr(),Oe===r&&(Oe=null),Oe!==r?(ot=Ms(),ot!==r?(ct=x,O=I(se,ot),x=O):(T=x,x=r)):(T=x,x=r)):(T=x,x=r)):(T=x,x=r)):(T=x,x=r)):(T=x,x=r),x===r&&(x=T,O=Wa(),O!==r?(se=za(),se!==r?(be=nr(),be===r&&(be=null),be!==r?(t.charCodeAt(T)===58?(ye=p,T++):(ye=r,Ue===0&&Xe(m)),ye!==r?(Oe=nr(),Oe===r&&(Oe=null),Oe!==r?(ot=Ms(),ot!==r?(ct=x,O=I(se,ot),x=O):(T=x,x=r)):(T=x,x=r)):(T=x,x=r)):(T=x,x=r)):(T=x,x=r)):(T=x,x=r),x===r))){if(x=T,O=Wa(),O!==r)if(se=za(),se!==r)if(be=nr(),be!==r)if(ye=pC(),ye!==r){if(Oe=[],ot=Ts(),ot!==r)for(;ot!==r;)Oe.push(ot),ot=Ts();else Oe=r;Oe!==r?(ct=x,O=I(se,ye),x=O):(T=x,x=r)}else T=x,x=r;else T=x,x=r;else T=x,x=r;else T=x,x=r;if(x===r)if(x=T,O=Wa(),O!==r)if(se=za(),se!==r){if(be=[],ye=T,Oe=nr(),Oe===r&&(Oe=null),Oe!==r?(t.charCodeAt(T)===44?(ot=w,T++):(ot=r,Ue===0&&Xe(Q)),ot!==r?(Ut=nr(),Ut===r&&(Ut=null),Ut!==r?(Ks=za(),Ks!==r?(ct=ye,Oe=S(se,Ks),ye=Oe):(T=ye,ye=r)):(T=ye,ye=r)):(T=ye,ye=r)):(T=ye,ye=r),ye!==r)for(;ye!==r;)be.push(ye),ye=T,Oe=nr(),Oe===r&&(Oe=null),Oe!==r?(t.charCodeAt(T)===44?(ot=w,T++):(ot=r,Ue===0&&Xe(Q)),ot!==r?(Ut=nr(),Ut===r&&(Ut=null),Ut!==r?(Ks=za(),Ks!==r?(ct=ye,Oe=S(se,Ks),ye=Oe):(T=ye,ye=r)):(T=ye,ye=r)):(T=ye,ye=r)):(T=ye,ye=r);else be=r;be!==r?(ye=nr(),ye===r&&(ye=null),ye!==r?(t.charCodeAt(T)===58?(Oe=p,T++):(Oe=r,Ue===0&&Xe(m)),Oe!==r?(ot=nr(),ot===r&&(ot=null),ot!==r?(Ut=Ms(),Ut!==r?(ct=x,O=R(se,be,Ut),x=O):(T=x,x=r)):(T=x,x=r)):(T=x,x=r)):(T=x,x=r)):(T=x,x=r)}else T=x,x=r;else T=x,x=r}return x}function Ms(){var x,O,se,be,ye,Oe,ot;if(x=T,O=T,Ue++,se=T,be=_n(),be!==r?(ye=mw(),ye!==r?(t.charCodeAt(T)===45?(Oe=o,T+
|
|||
|
`,n=Buffer.byteLength(i),s=Math.floor(Math.log(n)/Math.log(10))+1;return n+s>=Math.pow(10,s)&&(s+=1),s+n+i}};CE.parse=(t,e,r)=>new CE(abe(Abe(t),e),r);var abe=(t,e)=>e?Object.keys(t).reduce((r,i)=>(r[i]=t[i],r),e):t,Abe=t=>t.replace(/\n$/,"").split(`
|
|||
|
`).reduce(lbe,Object.create(null)),lbe=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.substr((r+" ").length);let i=e.split("="),n=i.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!n)return t;let s=i.join("=");return t[n]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(n)?new Date(s*1e3):/^[0-9]+$/.test(s)?+s:s,t};_W.exports=CE});var IE=C((c$e,$W)=>{"use strict";$W.exports=t=>class extends t{warn(e,r,i={}){this.file&&(i.file=this.file),this.cwd&&(i.cwd=this.cwd),i.code=r instanceof Error&&r.code||e,i.tarCode=e,!this.strict&&i.recoverable!==!1?(r instanceof Error&&(i=Object.assign(r,i),r=r.message),this.emit("warn",i.tarCode,r,i)):r instanceof Error?this.emit("error",Object.assign(r,i)):this.emit("error",Object.assign(new Error(`${e}: ${r}`),i))}}});var cS=C((u$e,e8)=>{"use strict";var EE=["|","<",">","?",":"],lS=EE.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),cbe=new Map(EE.map((t,e)=>[t,lS[e]])),ube=new Map(lS.map((t,e)=>[t,EE[e]]));e8.exports={encode:t=>EE.reduce((e,r)=>e.split(r).join(cbe.get(r)),t),decode:t=>lS.reduce((e,r)=>e.split(r).join(ube.get(r)),t)}});var r8=C((g$e,t8)=>{"use strict";t8.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&~18),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var CS=C((C$e,i8)=>{"use strict";var n8=Mc(),s8=mE(),o8=Oc(),f$e=uh(),ps=require("fs"),Uc=require("path"),h$e=ch(),gbe=16*1024*1024,a8=Symbol("process"),A8=Symbol("file"),l8=Symbol("directory"),uS=Symbol("symlink"),c8=Symbol("hardlink"),gh=Symbol("header"),yE=Symbol("read"),gS=Symbol("lstat"),BE=Symbol("onlstat"),fS=Symbol("onread"),hS=Symbol("onreadlink"),pS=Symbol("openfile"),dS=Symbol("onopenfile"),zA=Symbol("close"),wE=Symbol("mode"),u8=IE(),fbe=cS(),g8=r8(),QE=u8(class extends n8{constructor(e,r){if(r=r||{},super(r),typeof e!="string")throw new TypeError("path is required");this.path=e,this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid(),this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||gbe,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=r.cwd||process.cwd(),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let i=!1;if(!this.preservePaths&&Uc.win32.isAbsolute(e)){let n=Uc.win32.parse(e);this.path=e.substr(n.root.length),i=n.root}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=fbe.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=r.absolute||Uc.resolve(this.cwd,e),this.path===""&&(this.path="./"),i&&this.warn("TAR_ENTRY_INFO",`stripping ${i} from absolute path`,{entry:this,path:i+this.path}),this.statCache.has(this.absolute)?this[BE](this.statCache.get(this.absolute)):this[gS]()}[gS](){ps.lstat(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[BE](r)})}[BE](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=hbe(e),this.emit("stat",e),this[a8]()}[a8](){switch(this.type){case"File":return this[A8]();case"Directory":return this[l8]();case"SymbolicLink":return this[uS]();default:return this.end()}}[wE](e){return g8(e,this.type==="Directory",this.portable)}[gh](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new o8({path:this.path,linkpath:this.linkpath,mode:this[wE](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&this.write(new s8({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this.path,linkpath:this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.d
|
|||
|
`}),a},i})});var N4=C((Ret,hk)=>{"use strict";var oxe=t=>{let e=!1,r=!1,i=!1;for(let n=0;n<t.length;n++){let s=t[n];e&&/[a-zA-Z]/.test(s)&&s.toUpperCase()===s?(t=t.slice(0,n)+"-"+t.slice(n),e=!1,i=r,r=!0,n++):r&&i&&/[a-zA-Z]/.test(s)&&s.toLowerCase()===s?(t=t.slice(0,n-1)+"-"+t.slice(n-1),i=r,r=!1,e=!0):(e=s.toLowerCase()===s&&s.toUpperCase()!==s,i=r,r=s.toUpperCase()===s&&s.toLowerCase()!==s)}return t},R4=(t,e)=>{if(!(typeof t=="string"||Array.isArray(t)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let r=n=>e.pascalCase?n.charAt(0).toUpperCase()+n.slice(1):n;return Array.isArray(t)?t=t.map(n=>n.trim()).filter(n=>n.length).join("-"):t=t.trim(),t.length===0?"":t.length===1?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=oxe(t)),t=t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(n,s)=>s.toUpperCase()).replace(/\d+(\w|$)/g,n=>n.toUpperCase()),r(t))};hk.exports=R4;hk.exports.default=R4});var mo=C(bk=>{"use strict";Object.defineProperty(bk,"__esModule",{value:!0});bk.default=H4;function H4(){}H4.prototype={diff:function(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=i.callback;typeof i=="function"&&(n=i,i={}),this.options=i;var s=this;function o(m){return n?(setTimeout(function(){n(void 0,m)},0),!0):m}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var a=r.length,l=e.length,c=1,u=a+l,g=[{newPos:-1,components:[]}],f=this.extractCommon(g[0],r,e,0);if(g[0].newPos+1>=a&&f+1>=l)return o([{value:this.join(r),count:r.length}]);function h(){for(var m=-1*c;m<=c;m+=2){var I=void 0,w=g[m-1],Q=g[m+1],S=(Q?Q.newPos:0)-m;w&&(g[m-1]=void 0);var R=w&&w.newPos+1<a,U=Q&&0<=S&&S<l;if(!R&&!U){g[m]=void 0;continue}if(!R||U&&w.newPos<Q.newPos?(I=fxe(Q),s.pushComponent(I.components,void 0,!0)):(I=w,I.newPos++,s.pushComponent(I.components,!0,void 0)),S=s.extractCommon(I,r,e,m),I.newPos+1>=a&&S+1>=l)return o(gxe(s,I.components,r,e,s.useLongestToken));g[m]=I}c++}if(n)(function m(){setTimeout(function(){if(c>u)return n();h()||m()},0)})();else for(;c<=u;){var p=h();if(p)return p}},pushComponent:function(e,r,i){var n=e[e.length-1];n&&n.added===r&&n.removed===i?e[e.length-1]={count:n.count+1,added:r,removed:i}:e.push({count:1,added:r,removed:i})},extractCommon:function(e,r,i,n){for(var s=r.length,o=i.length,a=e.newPos,l=a-n,c=0;a+1<s&&l+1<o&&this.equals(r[a+1],i[l+1]);)a++,l++,c++;return c&&e.components.push({count:c}),e.newPos=a,l},equals:function(e,r){return this.options.comparator?this.options.comparator(e,r):e===r||this.options.ignoreCase&&e.toLowerCase()===r.toLowerCase()},removeEmpty:function(e){for(var r=[],i=0;i<e.length;i++)e[i]&&r.push(e[i]);return r},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};function gxe(t,e,r,i,n){for(var s=0,o=e.length,a=0,l=0;s<o;s++){var c=e[s];if(c.removed){if(c.value=t.join(i.slice(l,l+c.count)),l+=c.count,s&&e[s-1].added){var g=e[s-1];e[s-1]=e[s],e[s]=g}}else{if(!c.added&&n){var u=r.slice(a,a+c.count);u=u.map(function(h,p){var m=i[l+p];return m.length>h.length?m:h}),c.value=t.join(u)}else c.value=t.join(r.slice(a,a+c.count));a+=c.count,c.added||(l+=c.count)}}var f=e[o-1];return o>1&&typeof f.value=="string"&&(f.added||f.removed)&&t.equals("",f.value)&&(e[o-2].value+=f.value,e.pop()),e}function fxe(t){return{newPos:t.newPos,components:t.components.slice(0)}}});var j4=C(bh=>{"use strict";Object.defineProperty(bh,"__esModule",{value:!0});bh.diffChars=hxe;bh.characterDiff=void 0;var dxe=pxe(mo());function pxe(t){return t&&t.__esModule?t:{default:t}}var Y4=new dxe.default;bh.characterDiff=Y4;function hxe(t,e,r){return Y4.diff(t,e,r)}});var xk=C(Dk=>{"use strict";Object.defineProperty(Dk,"__esModule",{value:!0});Dk.generateOptions=Cxe;function Cxe(t,e){if(typeof t=="function")e.callback=t;else if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}});var J4=C(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.diffWords=mxe;iu.diffWordsWithSpace=Ix
|
|||
|
`),m==="+"?h++:m==="-"?p++:m===" "&&(h++,p++);else break}if(!h&&f.newLines===1&&(f.newLines=0),!p&&f.oldLines===1&&(f.oldLines=0),e.strict){if(h!==f.newLines)throw new Error("Added line count did not match for hunk at line "+(c+1));if(p!==f.oldLines)throw new Error("Removed line count did not match for hunk at line "+(c+1))}return f}for(;s<r.length;)o();return n}});var _4=C(Pk=>{"use strict";Object.defineProperty(Pk,"__esModule",{value:!0});Pk.default=Yxe;function Yxe(t,e,r){var i=!0,n=!1,s=!1,o=1;return function a(){if(i&&!s){if(n?o++:i=!1,t+o<=r)return o;s=!0}if(!n)return s||(i=!0),e<=t-o?-o++:(n=!0,a())}}});var t5=C(fy=>{"use strict";Object.defineProperty(fy,"__esModule",{value:!0});fy.applyPatch=$4;fy.applyPatches=jxe;var e5=gy(),Gxe=qxe(_4());function qxe(t){return t&&t.__esModule?t:{default:t}}function $4(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof e=="string"&&(e=(0,e5.parsePatch)(e)),Array.isArray(e)){if(e.length>1)throw new Error("applyPatch only works with a single input.");e=e[0]}var i=t.split(/\r\n|[\n\v\f\r\x85]/),n=t.match(/\r\n|[\n\v\f\r\x85]/g)||[],s=e.hunks,o=r.compareLine||function(j,N,Me,ve){return N===ve},a=0,l=r.fuzzFactor||0,c=0,u=0,g,f;function h(j,N){for(var Me=0;Me<j.lines.length;Me++){var ve=j.lines[Me],He=ve.length>0?ve[0]:" ",Ke=ve.length>0?ve.substr(1):ve;if(He===" "||He==="-"){if(!o(N+1,i[N],He,Ke)&&(a++,a>l))return!1;N++}}return!0}for(var p=0;p<s.length;p++){for(var m=s[p],I=i.length-m.oldLines,w=0,Q=u+m.oldStart-1,S=(0,Gxe.default)(Q,c,I);w!==void 0;w=S())if(h(m,Q+w)){m.offset=u+=w;break}if(w===void 0)return!1;c=m.offset+m.oldStart+m.oldLines}for(var R=0,U=0;U<s.length;U++){var L=s[U],P=L.oldStart+L.offset+R-1;R+=L.newLines-L.oldLines,P<0&&(P=0);for(var Y=0;Y<L.lines.length;Y++){var $=L.lines[Y],H=$.length>0?$[0]:" ",A=$.length>0?$.substr(1):$,J=L.linedelimiters[Y];if(H===" ")P++;else if(H==="-")i.splice(P,1),n.splice(P,1);else if(H==="+")i.splice(P,0,A),n.splice(P,0,J),P++;else if(H==="\\"){var _=L.lines[Y-1]?L.lines[Y-1][0]:null;_==="+"?g=!0:_==="-"&&(f=!0)}}}if(g)for(;!i[i.length-1];)i.pop(),n.pop();else f&&(i.push(""),n.push(`
|
|||
|
`));for(var ne=0;ne<i.length-1;ne++)i[ne]=i[ne]+n[ne];return i.join("")}function jxe(t,e){typeof t=="string"&&(t=(0,e5.parsePatch)(t));var r=0;function i(){var n=t[r++];if(!n)return e.complete();e.loadFile(n,function(s,o){if(s)return e.complete(s);var a=$4(o,n,e);e.patched(n,a,function(l){if(l)return e.complete(l);i()})})}i()}});var Rk=C(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});Ph.structuredPatch=r5;Ph.createTwoFilesPatch=i5;Ph.createPatch=Jxe;var Wxe=ly();function Fk(t){return Xxe(t)||Vxe(t)||zxe()}function zxe(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function Vxe(t){if(Symbol.iterator in Object(t)||Object.prototype.toString.call(t)==="[object Arguments]")return Array.from(t)}function Xxe(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}function r5(t,e,r,i,n,s,o){o||(o={}),typeof o.context=="undefined"&&(o.context=4);var a=(0,Wxe.diffLines)(r,i,o);a.push({value:"",lines:[]});function l(w){return w.map(function(Q){return" "+Q})}for(var c=[],u=0,g=0,f=[],h=1,p=1,m=function(Q){var S=a[Q],R=S.lines||S.value.replace(/\n$/,"").split(`
|
|||
|
`);if(S.lines=R,S.added||S.removed){var U;if(!u){var L=a[Q-1];u=h,g=p,L&&(f=o.context>0?l(L.lines.slice(-o.context)):[],u-=f.length,g-=f.length)}(U=f).push.apply(U,Fk(R.map(function(ne){return(S.added?"+":"-")+ne}))),S.added?p+=R.length:h+=R.length}else{if(u)if(R.length<=o.context*2&&Q<a.length-2){var P;(P=f).push.apply(P,Fk(l(R)))}else{var Y,$=Math.min(R.length,o.context);(Y=f).push.apply(Y,Fk(l(R.slice(0,$))));var H={oldStart:u,oldLines:h-u+$,newStart:g,newLines:p-g+$,lines:f};if(Q>=a.length-2&&R.length<=o.context){var A=/\n$/.test(r),J=/\n$/.test(i),_=R.length==0&&f.length>H.oldLines;!A&&_&&f.splice(H.oldLines,0,"\\ No newline at end of file"),(!A&&!_||!J)&&f.push("\\ No newline at end of file")}c.push(H),u=0,g=0,f=[]}h+=R.length,p+=R.length}},I=0;I<a.length;I++)m(I);return{oldFileName:t,newFileName:e,oldHeader:n,newHeader:s,hunks:c}}function i5(t,e,r,i,n,s,o){var a=r5(t,e,r,i,n,s,o),l=[];t==e&&l.push("Index: "+t),l.push("==================================================================="),l.push("--- "+a.oldFileName+(typeof a.oldHeader=="undefined"?"":" "+a.oldHeader)),l.push("+++ "+a.newFileName+(typeof a.newHeader=="undefined"?"":" "+a.newHeader));for(var c=0;c<a.hunks.length;c++){var u=a.hunks[c];l.push("@@ -"+u.oldStart+","+u.oldLines+" +"+u.newStart+","+u.newLines+" @@"),l.push.apply(l,u.lines)}return l.join(`
|
|||
|
`)+`
|
|||
|
`}function Jxe(t,e,r,i,n,s){return i5(t,t,e,r,i,n,s)}});var s5=C(hy=>{"use strict";Object.defineProperty(hy,"__esModule",{value:!0});hy.arrayEqual=Zxe;hy.arrayStartsWith=n5;function Zxe(t,e){return t.length!==e.length?!1:n5(t,e)}function n5(t,e){if(e.length>t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}});var d5=C(py=>{"use strict";Object.defineProperty(py,"__esModule",{value:!0});py.calcLineCount=o5;py.merge=_xe;var $xe=Rk(),eSe=gy(),Nk=s5();function ou(t){return iSe(t)||rSe(t)||tSe()}function tSe(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function rSe(t){if(Symbol.iterator in Object(t)||Object.prototype.toString.call(t)==="[object Arguments]")return Array.from(t)}function iSe(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}function o5(t){var e=Lk(t.lines),r=e.oldLines,i=e.newLines;r!==void 0?t.oldLines=r:delete t.oldLines,i!==void 0?t.newLines=i:delete t.newLines}function _xe(t,e,r){t=a5(t,r),e=a5(e,r);var i={};(t.index||e.index)&&(i.index=t.index||e.index),(t.newFileName||e.newFileName)&&(A5(t)?A5(e)?(i.oldFileName=dy(i,t.oldFileName,e.oldFileName),i.newFileName=dy(i,t.newFileName,e.newFileName),i.oldHeader=dy(i,t.oldHeader,e.oldHeader),i.newHeader=dy(i,t.newHeader,e.newHeader)):(i.oldFileName=t.oldFileName,i.newFileName=t.newFileName,i.oldHeader=t.oldHeader,i.newHeader=t.newHeader):(i.oldFileName=e.oldFileName||t.oldFileName,i.newFileName=e.newFileName||t.newFileName,i.oldHeader=e.oldHeader||t.oldHeader,i.newHeader=e.newHeader||t.newHeader)),i.hunks=[];for(var n=0,s=0,o=0,a=0;n<t.hunks.length||s<e.hunks.length;){var l=t.hunks[n]||{oldStart:Infinity},c=e.hunks[s]||{oldStart:Infinity};if(l5(l,c))i.hunks.push(c5(l,o)),n++,a+=l.newLines-l.oldLines;else if(l5(c,l))i.hunks.push(c5(c,a)),s++,o+=c.newLines-c.oldLines;else{var u={oldStart:Math.min(l.oldStart,c.oldStart),oldLines:0,newStart:Math.min(l.newStart+o,c.oldStart+a),newLines:0,lines:[]};nSe(u,l.oldStart,l.lines,c.oldStart,c.lines),s++,n++,i.hunks.push(u)}}return i}function a5(t,e){if(typeof t=="string"){if(/^@@/m.test(t)||/^Index:/m.test(t))return(0,eSe.parsePatch)(t)[0];if(!e)throw new Error("Must provide a base reference or pass in a patch");return(0,$xe.structuredPatch)(void 0,void 0,e,t)}return t}function A5(t){return t.newFileName&&t.newFileName!==t.oldFileName}function dy(t,e,r){return e===r?e:(t.conflict=!0,{mine:e,theirs:r})}function l5(t,e){return t.oldStart<e.oldStart&&t.oldStart+t.oldLines<e.oldStart}function c5(t,e){return{oldStart:t.oldStart,oldLines:t.oldLines,newStart:t.newStart+e,newLines:t.newLines,lines:t.lines}}function nSe(t,e,r,i,n){var s={offset:e,lines:r,index:0},o={offset:i,lines:n,index:0};for(g5(t,s,o),g5(t,o,s);s.index<s.lines.length&&o.index<o.lines.length;){var a=s.lines[s.index],l=o.lines[o.index];if((a[0]==="-"||a[0]==="+")&&(l[0]==="-"||l[0]==="+"))sSe(t,s,o);else if(a[0]==="+"&&l[0]===" "){var c;(c=t.lines).push.apply(c,ou(sl(s)))}else if(l[0]==="+"&&a[0]===" "){var u;(u=t.lines).push.apply(u,ou(sl(o)))}else a[0]==="-"&&l[0]===" "?u5(t,s,o):l[0]==="-"&&a[0]===" "?u5(t,o,s,!0):a===l?(t.lines.push(a),s.index++,o.index++):Mk(t,sl(s),sl(o))}f5(t,s),f5(t,o),o5(t)}function sSe(t,e,r){var i=sl(e),n=sl(r);if(h5(i)&&h5(n)){if((0,Nk.arrayStartsWith)(i,n)&&p5(r,i,i.length-n.length)){var s;(s=t.lines).push.apply(s,ou(i));return}else if((0,Nk.arrayStartsWith)(n,i)&&p5(e,n,n.length-i.length)){var o;(o=t.lines).push.apply(o,ou(n));return}}else if((0,Nk.arrayEqual)(i,n)){var a;(a=t.lines).push.apply(a,ou(i));return}Mk(t,i,n)}function u5(t,e,r,i){var n=sl(e),s=oSe(r,n);if(s.merged){var o;(o=t.lines).push.apply(o,ou(s.merged))}else Mk(t,i?s:n,i?n:s)}function Mk(t,e,r){t.conflict=!0,t.lines.push({conflict:!0,mine:e,theirs:r})}function g5(t,e,r){for(;e.offset<r.offset&&e.index<e.lines.length;){var i=e.lines[e.index++];t.lines.push(i),e.offset++}}function f5(t,e){for(;e.index<e.lines.length;){var r=e.lines[e.index++];t.lines.push(r)}}function sl(t){for(var e=[],r=t.lines[t.index][0];t.index<t.lines.length;){var i=t.lines[t.index];if(r==="-"&&i[0]===
|
|||
|
|
|||
|
attempted value: ${s}
|
|||
|
`+(o!==s?`result of cast: ${o}`:""))}return n}_cast(e,r){let i=e===void 0?e:this.transforms.reduce((n,s)=>s.call(this,n,e,this),e);return i===void 0&&(i=this.getDefault()),i}_validate(e,r={},i){let{sync:n,path:s,from:o=[],originalValue:a=e,strict:l=this.spec.strict,abortEarly:c=this.spec.abortEarly}=r,u=e;l||(u=this._cast(u,Qn({assert:!1},r)));let g={value:u,path:s,options:r,originalValue:a,schema:this,label:this.spec.label,sync:n,from:o},f=[];this._typeError&&f.push(this._typeError),this._whitelistError&&f.push(this._whitelistError),this._blacklistError&&f.push(this._blacklistError),(0,EX.default)({args:g,value:u,path:s,sync:n,tests:f,endEarly:c},h=>{if(h)return void i(h,u);(0,EX.default)({tests:this.tests,args:g,path:s,sync:n,value:u,endEarly:c},i)})}validate(e,r,i){let n=this.resolve(Qn({},r,{value:e}));return typeof i=="function"?n._validate(e,r,i):new Promise((s,o)=>n._validate(e,r,(a,l)=>{a?o(a):s(l)}))}validateSync(e,r){let i=this.resolve(Qn({},r,{value:e})),n;return i._validate(e,Qn({},r,{sync:!0}),(s,o)=>{if(s)throw s;n=o}),n}isValid(e,r){return this.validate(e,r).then(()=>!0,i=>{if(BX.default.isError(i))return!1;throw i})}isValidSync(e,r){try{return this.validateSync(e,r),!0}catch(i){if(BX.default.isError(i))return!1;throw i}}_getDefault(){let e=this.spec.default;return e==null?e:typeof e=="function"?e.call(this):(0,IX.default)(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){return arguments.length===0?this._getDefault():this.clone({default:e})}strict(e=!0){var r=this.clone();return r.spec.strict=e,r}_isPresent(e){return e!=null}defined(e=Eu.mixed.defined){return this.test({message:e,name:"defined",exclusive:!0,test(r){return r!==void 0}})}required(e=Eu.mixed.required){return this.clone({presence:"required"}).withMutation(r=>r.test({message:e,name:"required",exclusive:!0,test(i){return this.schema._isPresent(i)}}))}notRequired(){var e=this.clone({presence:"optional"});return e.tests=e.tests.filter(r=>r.OPTIONS.name!=="required"),e}nullable(e=!0){var r=this.clone({nullable:e!==!1});return r}transform(e){var r=this.clone();return r.transforms.push(e),r}test(...e){let r;if(e.length===1?typeof e[0]=="function"?r={test:e[0]}:r=e[0]:e.length===2?r={name:e[0],test:e[1]}:r={name:e[0],message:e[1],test:e[2]},r.message===void 0&&(r.message=Eu.mixed.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let i=this.clone(),n=(0,zy.default)(r),s=r.exclusive||r.name&&i.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(i.exclusiveTests[r.name]=!!r.exclusive),i.tests=i.tests.filter(o=>!(o.OPTIONS.name===r.name&&(s||o.OPTIONS.test===n.OPTIONS.test))),i.tests.push(n),i}when(e,r){!Array.isArray(e)&&typeof e!="string"&&(r=e,e=".");let i=this.clone(),n=(0,VMe.default)(e).map(s=>new WMe.default(s));return n.forEach(s=>{s.isSibling&&i.deps.push(s.key)}),i.conditions.push(new JMe.default(n,r)),i}typeError(e){var r=this.clone();return r._typeError=(0,zy.default)({message:e,name:"typeError",test(i){return i!==void 0&&!this.schema.isType(i)?this.createError({params:{type:this.schema._type}}):!0}}),r}oneOf(e,r=Eu.mixed.oneOf){var i=this.clone();return e.forEach(n=>{i._whitelist.add(n),i._blacklist.delete(n)}),i._whitelistError=(0,zy.default)({message:r,name:"oneOf",test(n){if(n===void 0)return!0;let s=this.schema._whitelist;return s.has(n,this.resolve)?!0:this.createError({params:{values:s.toArray().join(", ")}})}}),i}notOneOf(e,r=Eu.mixed.notOneOf){var i=this.clone();return e.forEach(n=>{i._blacklist.add(n),i._whitelist.delete(n)}),i._blacklistError=(0,zy.default)({message:r,name:"notOneOf",test(n){let s=this.schema._blacklist;return s.has(n,this.resolve)?this.createError({params:{values:s.toArray().join(", ")}}):!0}}),i}strip(e=!0){let r=this.clone();return r.spec.strip=e,r}describe(){let e=this.clone(),{label:r,meta:i}=e.spec;return{meta:i,label:r,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(s=>({name:s.OPTIONS.name,params:s.OP
|
|||
|
`),c=o.length;for(c>0&&o.includes("unstyle")&&(o=[...new Set(["unstyle",...o])].reverse());c-- >0;)a=r(t.styles[o[c]],a,l);return a},n=(s,o,a)=>{t.styles[s]=e({name:s,codes:o}),(t.keys[a]||(t.keys[a]=[])).push(s),Reflect.defineProperty(t,s,{configurable:!0,enumerable:!0,set(c){t.alias(s,c)},get(){let c=u=>i(u,c.stack);return Reflect.setPrototypeOf(c,t),c.stack=this.stack?this.stack.concat(s):[s],c}})};return n("reset",[0,0],"modifier"),n("bold",[1,22],"modifier"),n("dim",[2,22],"modifier"),n("italic",[3,23],"modifier"),n("underline",[4,24],"modifier"),n("inverse",[7,27],"modifier"),n("hidden",[8,28],"modifier"),n("strikethrough",[9,29],"modifier"),n("black",[30,39],"color"),n("red",[31,39],"color"),n("green",[32,39],"color"),n("yellow",[33,39],"color"),n("blue",[34,39],"color"),n("magenta",[35,39],"color"),n("cyan",[36,39],"color"),n("white",[37,39],"color"),n("gray",[90,39],"color"),n("grey",[90,39],"color"),n("bgBlack",[40,49],"bg"),n("bgRed",[41,49],"bg"),n("bgGreen",[42,49],"bg"),n("bgYellow",[43,49],"bg"),n("bgBlue",[44,49],"bg"),n("bgMagenta",[45,49],"bg"),n("bgCyan",[46,49],"bg"),n("bgWhite",[47,49],"bg"),n("blackBright",[90,39],"bright"),n("redBright",[91,39],"bright"),n("greenBright",[92,39],"bright"),n("yellowBright",[93,39],"bright"),n("blueBright",[94,39],"bright"),n("magentaBright",[95,39],"bright"),n("cyanBright",[96,39],"bright"),n("whiteBright",[97,39],"bright"),n("bgBlackBright",[100,49],"bgBright"),n("bgRedBright",[101,49],"bgBright"),n("bgGreenBright",[102,49],"bgBright"),n("bgYellowBright",[103,49],"bgBright"),n("bgBlueBright",[104,49],"bgBright"),n("bgMagentaBright",[105,49],"bgBright"),n("bgCyanBright",[106,49],"bgBright"),n("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=gOe,t.hasColor=t.hasAnsi=s=>(t.ansiRegex.lastIndex=0,typeof s=="string"&&s!==""&&t.ansiRegex.test(s)),t.alias=(s,o)=>{let a=typeof o=="string"?t[o]:o;if(typeof a!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");a.stack||(Reflect.defineProperty(a,"name",{value:s}),t.styles[s]=a,a.stack=[s]),Reflect.defineProperty(t,s,{configurable:!0,enumerable:!0,set(l){t.alias(s,l)},get(){let l=c=>i(c,l.stack);return Reflect.setPrototypeOf(l,t),l.stack=this.stack?this.stack.concat(a.stack):a.stack,l}})},t.theme=s=>{if(!uOe(s))throw new TypeError("Expected theme to be an object");for(let o of Object.keys(s))t.alias(o,s[o]);return t},t.alias("unstyle",s=>typeof s=="string"&&s!==""?(t.ansiRegex.lastIndex=0,s.replace(t.ansiRegex,"")):""),t.alias("noop",s=>s),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=t_(),t.define=n,t};iP.exports=r_();iP.exports.create=r_});var ri=C(It=>{"use strict";var fOe=Object.prototype.toString,bn=Gn(),i_=!1,nP=[],n_={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};It.longest=(t,e)=>t.reduce((r,i)=>Math.max(r,e?i[e].length:i.length),0);It.hasColor=t=>!!t&&bn.hasColor(t);var sB=It.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);It.nativeType=t=>fOe.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"");It.isAsyncFn=t=>It.nativeType(t)==="asyncfunction";It.isPrimitive=t=>t!=null&&typeof t!="object"&&typeof t!="function";It.resolve=(t,e,...r)=>typeof e=="function"?e.call(t,...r):e;It.scrollDown=(t=[])=>[...t.slice(1),t[0]];It.scrollUp=(t=[])=>[t.pop(),...t];It.reorder=(t=[])=>{let e=t.slice();return e.sort((r,i)=>r.index>i.index?1:r.index<i.index?-1:0),e};It.swap=(t,e,r)=>{let i=t.length,n=r===i?0:r<0?i-1:r,s=t[e];t[e]=t[n],t[n]=s};It.width=(t,e=80)=>{let r=t&&t.columns?t.columns:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[0]),process.platform==="win32"?r-1:r};It.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[1]),r};It.wordWrap=(t,e={})=>{if(!t)return t;typeof e=="number"&&(e={width:e});let{indent:r="",newline:i=`
|
|||
|
`+r,width:n=80}=e;n-=((i+r).match(/[^\S\n]/g)||[]).length;let o=`.{1,${n}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,a=t.trim(),l=new RegExp(o,"g"),c=a.match(l)||[];return c=c.map(u=>u.replace(/\n$/,"")),e.padEnd&&(c=c.map(u=>u.padEnd(n," "))),e.padStart&&(c=c.map(u=>u.padStart(n," "))),r+c.join(i)};It.unmute=t=>{let e=t.stack.find(i=>bn.keys.color.includes(i));return e?bn[e]:t.stack.find(i=>i.slice(2)==="bg")?bn[e.slice(2)]:i=>i};It.pascal=t=>t?t[0].toUpperCase()+t.slice(1):"";It.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(i=>bn.keys.color.includes(i));if(e){let i=bn["bg"+It.pascal(e)];return i?i.black:t}let r=t.stack.find(i=>i.slice(0,2)==="bg");return r?bn[r.slice(2).toLowerCase()]||t:bn.none};It.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(i=>bn.keys.color.includes(i)),r=t.stack.find(i=>i.slice(0,2)==="bg");if(e&&!r)return bn[n_[e]||e];if(r){let i=r.slice(2).toLowerCase(),n=n_[i];return n&&bn["bg"+It.pascal(n)]||t}return bn.none};It.meridiem=t=>{let e=t.getHours(),r=t.getMinutes(),i=e>=12?"pm":"am";e=e%12;let n=e===0?12:e,s=r<10?"0"+r:r;return n+":"+s+" "+i};It.set=(t={},e="",r)=>e.split(".").reduce((i,n,s,o)=>{let a=o.length-1>s?i[n]||{}:r;return!It.isObject(a)&&s<o.length-1&&(a={}),i[n]=a},t);It.get=(t={},e="",r)=>{let i=t[e]==null?e.split(".").reduce((n,s)=>n&&n[s],t):t[e];return i==null?r:i};It.mixin=(t,e)=>{if(!sB(t))return e;if(!sB(e))return t;for(let r of Object.keys(e)){let i=Object.getOwnPropertyDescriptor(e,r);if(i.hasOwnProperty("value"))if(t.hasOwnProperty(r)&&sB(i.value)){let n=Object.getOwnPropertyDescriptor(t,r);sB(n.value)?t[r]=It.merge({},t[r],e[r]):Reflect.defineProperty(t,r,i)}else Reflect.defineProperty(t,r,i);else Reflect.defineProperty(t,r,i)}return t};It.merge=(...t)=>{let e={};for(let r of t)It.mixin(e,r);return e};It.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let i of Object.keys(r)){let n=r[i];typeof n=="function"?It.define(t,i,n.bind(e)):It.define(t,i,n)}};It.onExit=t=>{let e=(r,i)=>{i_||(i_=!0,nP.forEach(n=>n()),r===!0&&process.exit(128+i))};nP.length===0&&(process.once("SIGTERM",e.bind(null,!0,15)),process.once("SIGINT",e.bind(null,!0,2)),process.once("exit",e)),nP.push(t)};It.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};It.defineExport=(t,e,r)=>{let i;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(n){i=n},get(){return i?i():r()}})}});var s_=C(Du=>{"use strict";Du.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"};Du.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};Du.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};Du.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};Du.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"}});var A_=C((lat,o_)=>{"use strict";var a_=require("readline"),hOe=s_(),pOe=/^(?:\x1b)([a-zA-Z0-9])$/,dOe=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,COe={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear",
|
|||
|
`)i.name="enter";else if(t===" ")i.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x7F"||t==="\b")i.name="backspace",i.meta=t.charAt(0)==="";else if(t===""||t==="")i.name="escape",i.meta=t.length===2;else if(t===" "||t===" ")i.name="space",i.meta=t.length===2;else if(t<="")i.name=String.fromCharCode(t.charCodeAt(0)+"a".charCodeAt(0)-1),i.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")i.name="number";else if(t.length===1&&t>="a"&&t<="z")i.name=t;else if(t.length===1&&t>="A"&&t<="Z")i.name=t.toLowerCase(),i.shift=!0;else if(r=pOe.exec(t))i.meta=!0,i.shift=/^[A-Z]$/.test(r[1]);else if(r=dOe.exec(t)){let n=[...t];n[0]===""&&n[1]===""&&(i.option=!0);let s=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),o=(r[3]||r[5]||1)-1;i.ctrl=!!(o&4),i.meta=!!(o&10),i.shift=!!(o&1),i.code=s,i.name=COe[s],i.shift=mOe(s)||i.shift,i.ctrl=IOe(s)||i.ctrl}return i};oB.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let i=a_.createInterface({terminal:!0,input:r});a_.emitKeypressEvents(r,i);let n=(a,l)=>e(a,oB(a,l),i),s=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",n),i.resume(),()=>{r.isTTY&&r.setRawMode(s),r.removeListener("keypress",n),i.pause(),i.close()}};oB.action=(t,e,r)=>{let i=v(v({},hOe),r);return e.ctrl?(e.action=i.ctrl[e.name],e):e.option&&i.option?(e.action=i.option[e.name],e):e.shift?(e.action=i.shift[e.name],e):(e.action=i.keys[e.name],e)};o_.exports=oB});var c_=C((cat,l_)=>{"use strict";l_.exports=t=>{t.timers=t.timers||{};let e=t.options.timers;if(!!e)for(let r of Object.keys(e)){let i=e[r];typeof i=="number"&&(i={interval:i}),EOe(t,r,i)}};function EOe(t,e,r={}){let i=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},n=r.interval||120;i.frames=r.frames||[],i.loading=!0;let s=setInterval(()=>{i.ms=Date.now()-i.start,i.tick++,t.render()},n);return i.stop=()=>{i.loading=!1,clearInterval(s)},Reflect.defineProperty(i,"interval",{value:s}),t.once("close",()=>i.stop()),i.stop}});var f_=C((uat,u_)=>{"use strict";var{define:yOe,width:BOe}=ri(),g_=class{constructor(e){let r=e.options;yOe(this,"_prompt",e),this.type=e.type,this.name=e.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=BOe(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e=v({},this);return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let r=this._color||e[this.status];return typeof r=="function"?r:e.pending}set loading(e){this._loading=e}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}};u_.exports=g_});var p_=C((gat,h_)=>{"use strict";var sP=ri(),qr=Gn(),oP={default:qr.noop,noop:qr.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||sP.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||sP.complement(this.primary)},primary:qr.cyan,success:qr.green,danger:qr.magenta,strong:qr.bold,warning:qr.yellow,muted:qr.dim,disabled:qr.gray,dark:qr.dim.gray,underline:qr.underline,set info(t){this._info=t},get info(){return this._info||this.primary},set em(t){this._em=t},get em(){return this._em||this.primary.underline},set heading(t){this._heading=t},get heading(){return this._heading||this.muted.underline},set pending(t){this._pending=t},get pending(){return this._pending||this.primary},set submitted(t){this._submitted=t},get submitted(){return this._submitted||this.success},set cancelled(t){this._cancelled=t},get cancelled(){return this._cancelled||this.danger},set typing(t){this._typing=t},get typing(){return this._typing||this.dim},s
|
|||
|
`),c=l[0],u=l[l.length-1],f=(i+(r?" "+r:"")).length,h=f<c.length?c.slice(f+1):"";return{header:o,prompt:c,after:h,rest:l.slice(1),last:u}}async submit(){this.state.submitted=!0,this.state.validating=!0,this.options.onSubmit&&await this.options.onSubmit.call(this,this.name,this.value,this);let e=this.state.error||await this.validate(this.value,this.state);if(e!==!0){let r=`
|
|||
|
`+this.symbols.pointer+" ";typeof e=="string"?r+=e.trim():r+="Invalid input",this.state.error=`
|
|||
|
`+this.styles.danger(r),this.state.submitted=!1,await this.render(),await this.alert(),this.state.validating=!1,this.state.error=void 0;return}this.state.validating=!1,await this.render(),await this.close(),this.value=await this.result(this.value),this.emit("submit",this.value)}async cancel(e){this.state.cancelled=this.state.submitted=!0,await this.render(),await this.close(),typeof this.options.onCancel=="function"&&await this.options.onCancel.call(this,this.name,this.value,this),this.emit("cancel",await this.error(e))}async close(){this.state.closed=!0;try{let e=this.sections(),r=Math.ceil(e.prompt.length/this.width);e.rest&&this.write(pl.cursor.down(e.rest.length)),this.write(`
|
|||
|
`.repeat(r))}catch(e){}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=gP.listen(this,this.keypress.bind(this)),this.once("close",this.stop))}async skip(){return this.skipped=this.options.skip===!0,typeof this.options.skip=="function"&&(this.skipped=await this.options.skip.call(this,this.name,this.value)),this.skipped}async initialize(){let{format:e,options:r,result:i}=this;if(this.format=()=>e.call(this,this.value),this.result=()=>i.call(this,this.value),typeof r.initial=="function"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun=="function"&&await r.onRun.call(this,this),typeof r.onSubmit=="function"){let n=r.onSubmit.bind(this),s=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await n(this.name,this.value,this),s())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(e,r)=>{if(this.once("submit",e),this.once("cancel",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(e,r,i){let{options:n,state:s,symbols:o,timers:a}=this,l=a&&a[e];s.timer=l;let c=n[e]||s[e]||o[e],u=r&&r[e]!=null?r[e]:await c;if(u==="")return u;let g=await this.resolve(u,s,r,i);return!g&&r&&r[e]?this.resolve(c,s,r,i):g}async prefix(){let e=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,i=this.state;return i.timer=r,Li.isObject(e)&&(e=e[i.status]||e.pending),Li.hasColor(e)?e:(this.styles[i.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return Li.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,i=this.state;i.timer=r;let n=e[i.status]||e.pending||i.separator,s=await this.resolve(n,i);return Li.isObject(s)&&(s=s[i.status]||s.pending),Li.hasColor(s)?s:this.styles.muted(s)}async pointer(e,r){let i=await this.element("pointer",e,r);if(typeof i=="string"&&Li.hasColor(i))return i;if(i){let n=this.styles,s=this.index===r,o=s?n.primary:c=>c,a=await this.resolve(i[s?"on":"off"]||i,this.state),l=Li.hasColor(a)?a:o(a);return s?l:" ".repeat(a.length)}}async indicator(e,r){let i=await this.element("indicator",e,r);if(typeof i=="string"&&Li.hasColor(i))return i;if(i){let n=this.styles,s=e.enabled===!0,o=s?n.success:n.dark,a=i[s?"on":"off"]||i;return Li.hasColor(a)?a:o(a)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let e=await this.element("hint");return Li.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?"":e||this.state.error}format(e){return e}result(e){return e}validate(e){return this.options.required===!0?this.isValue(e):!0}isValue(e){return e!=null&&e!==""}resolve(e,...r){return Li.resolve(this,e,...r)}get base(){return aB.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||Li.height(this.stdout,25)}get width(){return this.options.columns||Li.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:r}=this.state,i=[r,e].find(this.isValue.bind(this));return this.isValue(i)?i:this.initial}static get prompt(){return e=>new this(e).run()}};function FOe(t){let e=n=>t[n]===void 0||typeof t[n]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],i=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let n of Object.keys(t.options)){if(r.includes(n)||/^on[A-Z]/.test(n))continue;let s=t.options[n];typeof s=="function"&&e(n)?i.includes(n)||(t[n]=s.bind(t)):typeof t[n]!="function"&&(t[n]=s)}}function ROe(t
|
|||
|
`:" ",i=[];for(let n=0;n<4;n++){let s=r(n);e[n]?i.push(s.repeat(e[n])):i.push("")}return i}b_.exports=aB});var k_=C((dat,x_)=>{"use strict";var NOe=ri(),S_={default(t,e){return e},checkbox(t,e){throw new Error("checkbox role is not implemented yet")},editable(t,e){throw new Error("editable role is not implemented yet")},expandable(t,e){throw new Error("expandable role is not implemented yet")},heading(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||"",e},input(t,e){throw new Error("input role is not implemented yet")},option(t,e){return S_.default(t,e)},radio(t,e){throw new Error("radio role is not implemented yet")},separator(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||t.symbols.line.repeat(5),e},spacer(t,e){return e}};x_.exports=(t,e={})=>{let r=NOe.merge({},S_,e.roles);return r[t]||r.default}});var fp=C((Cat,v_)=>{"use strict";var LOe=Gn(),MOe=xu(),TOe=k_(),AB=ri(),{reorder:fP,scrollUp:KOe,scrollDown:OOe,isObject:P_,swap:UOe}=AB,F_=class extends MOe{constructor(e){super(e);this.cursorHide(),this.maxSelected=e.maxSelected||Infinity,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:r,autofocus:i,suggest:n}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(s=>s.enabled=!1),typeof n!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");P_(r)&&(r=Object.keys(r)),Array.isArray(r)?(i!=null&&(this.index=this.findIndex(i)),r.forEach(s=>this.enable(this.find(s))),await this.render()):(i!=null&&(r=i),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,r){this.state.loadingChoices=!0;let i=[],n=0,s=async(o,a)=>{typeof o=="function"&&(o=await o.call(this)),o instanceof Promise&&(o=await o);for(let l=0;l<o.length;l++){let c=o[l]=await this.toChoice(o[l],n++,a);i.push(c),c.choices&&await s(c.choices,c)}return i};return s(e,r).then(o=>(this.state.loadingChoices=!1,o))}async toChoice(e,r,i){if(typeof e=="function"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e=="string"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let n=e.value;if(e=TOe(e.role,this.options)(this,e),typeof e.disabled=="string"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint="(disabled)"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||"",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input="",e.index=r,e.cursor=0,AB.define(e,"parent",i),e.level=i?i.level+1:1,e.indent==null&&(e.indent=i?i.indent+" ":e.indent||""),e.path=i?i.path+"."+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,LOe.unstyle(e.message).length));let o=v({},e);return e.reset=(a=o.input,l=o.value)=>{for(let c of Object.keys(o))e[c]=o[c];e.input=a,e.value=l},n==null&&typeof e.initial=="function"&&(e.input=await e.initial.call(this,this.state,e,r)),e}async onChoice(e,r){this.emit("choice",e,r,this),typeof e.onChoice=="function"&&await e.onChoice.call(this,this.state,e,r)}async addChoice(e,r,i){let n=await this.toChoice(e,r,i);return this.choices.push(n),this.index=this.choices.length-1,this.limit=this.choices.length,n}async newItem(e,r,i){let n=v({name:"New choice name?",editable:!0,newChoice:!0},e),s=await this.addChoice(n,r,i);return s.updateChoice=()=>{delete s.newChoice,s.name=s.message=s.input,s.input="",s.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,r){if(this.mul
|
|||
|
`),n;return this.options.choicesHeader&&(n=await this.resolve(this.options.choicesHeader,this.state)),[n,i].filter(Boolean).join(`
|
|||
|
`)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:r}=this.state,i="",n=await this.header(),s=await this.prefix(),o=await this.separator(),a=await this.message();this.options.promptLine!==!1&&(i=[s,a,o,""].join(" "),this.state.prompt=i);let l=await this.format(),c=await this.error()||await this.hint(),u=await this.renderChoices(),g=await this.footer();l&&(i+=l),c&&!i.includes(c)&&(i+=" "+c),e&&!l&&!u.trim()&&this.multiple&&this.emptyError!=null&&(i+=this.styles.danger(this.emptyError)),this.clear(r),this.write([n,i,u,g].filter(Boolean).join(`
|
|||
|
`)),this.write(this.margin[2]),this.restore()}};N_.exports=L_});var K_=C((Iat,M_)=>{"use strict";var YOe=ba(),jOe=(t,e)=>{let r=t.toLowerCase();return i=>{let s=i.toLowerCase().indexOf(r),o=e(i.slice(s,s+r.length));return s>=0?i.slice(0,s)+o+i.slice(s+r.length):i}},T_=class extends YOe{constructor(e){super(e);this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:r,input:i}=this.state;return this.input=i.slice(0,r)+e+i.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:r}=this.state;return r?(this.input=r.slice(0,e-1)+r.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:r}=this.state;return r[e]===void 0?this.alert():(this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,r=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,e,r);let i=e.toLowerCase();return r.filter(n=>n.message.toLowerCase().includes(i))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(", ");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=jOe(this.input,e),i=this.choices;this.choices=i.map(n=>z(v({},n),{message:r(n.message)})),await super.render(),this.choices=i}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};M_.exports=T_});var dP=C((Eat,O_)=>{"use strict";var pP=ri();O_.exports=(t,e={})=>{t.cursorHide();let{input:r="",initial:i="",pos:n,showCursor:s=!0,color:o}=e,a=o||t.styles.placeholder,l=pP.inverse(t.styles.primary),c=m=>l(t.styles.black(m)),u=r,g=" ",f=c(g);if(t.blink&&t.blink.off===!0&&(c=m=>m,f=""),s&&n===0&&i===""&&r==="")return c(g);if(s&&n===0&&(r===i||r===""))return c(i[0])+a(i.slice(1));i=pP.isPrimitive(i)?`${i}`:"",r=pP.isPrimitive(r)?`${r}`:"";let h=i&&i.startsWith(r)&&i!==r,p=h?c(i[r.length]):f;if(n!==r.length&&s===!0&&(u=r.slice(0,n)+c(r[n])+r.slice(n+1),p=""),s===!1&&(p=""),h){let m=t.styles.unstyle(u+p);return u+p+a(i.slice(m.length))}return u+p}});var lB=C((yat,U_)=>{"use strict";var qOe=Gn(),GOe=ba(),JOe=dP(),H_=class extends GOe{constructor(e){super(z(v({},e),{multiple:!0}));this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(r=>r!=null),this.emptyError="",this.values={}}async reset(e){return await super.reset(),e===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let r=this.focused;if(!r)return this.alert();let{cursor:i,input:n}=r;return r.value=r.input=n.slice(0,i)+e+n.slice(i),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:i}=e;return e.value=e.input=i.slice(0,r-1)+i.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:i}=e;if(i[r]===void 0)return this.alert();let n=`${i}`.slice(0,r)+`${i}`.slice(r+1);return e.value=e.input=n,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,r){return this.dispatch(e,r)}number(e,r){return this.dispatch(e,r)}next(){let e=this.focused;if(!e)return this.alert();let{initial:r,input:i}=e;return r&&r.startsWith(i)&
|
|||
|
`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};W_.exports=z_});var Z_=C((bat,V_)=>{"use strict";var e1e=cB(),X_=class extends e1e{constructor(e){super(e);this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};V_.exports=X_});var e$=C((Dat,__)=>{"use strict";var t1e=ba(),r1e=lB(),Su=r1e.prototype,$_=class extends t1e{constructor(e){super(z(v({},e),{multiple:!0}));this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(e,r){let i=this.focused,n=i.parent||{};return!i.editable&&!n.editable&&(e==="a"||e==="i")?super[e]():Su.dispatch.call(this,e,r)}append(e,r){return Su.append.call(this,e,r)}delete(e,r){return Su.delete.call(this,e,r)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?Su.next.call(this):super.next()}prev(){return this.focused.editable?Su.prev.call(this):super.prev()}async indicator(e,r){let i=e.indicator||"",n=e.editable?i:super.indicator(e,r);return await this.resolve(n,this.state,e,r)||""}indent(e){return e.role==="heading"?"":e.editable?" ":" "}async renderChoice(e,r){return e.indent="",e.editable?Su.renderChoice.call(this,e,r):super.renderChoice(e,r)}error(){return""}footer(){return this.state.error}async validate(){let e=!0;for(let r of this.choices){if(typeof r.validate!="function"||r.role==="heading")continue;let i=r.parent?this.value[r.parent.name]:this.value;if(r.editable?i=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(i=r.enabled===!0),e=await r.validate(i,this.state),e!==!0)break}return e!==!0&&(this.state.error=typeof e=="string"?e:"Invalid Input"),e}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let r=e.parent?this.value[e.parent.name]:this.value;if(e.role==="heading"){this.value[e.name]={};continue}e.editable?r[e.name]=e.value===e.name?e.initial||"":e.value:this.isDisabled(e)||(r[e.name]=e.enabled===!0)}return this.base.submit.call(this)}};__.exports=$_});var dl=C((xat,t$)=>{"use strict";var i1e=xu(),n1e=dP(),{isPrimitive:s1e}=ri(),r$=class extends i1e{constructor(e){super(e);this.initial=s1e(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let i=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!i||i.name!=="return")?this.append(`
|
|||
|
`,r):super.keypress(e,r)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(e,r){if(!e||r.ctrl||r.code)return this.alert();this.append(e)}append(e){let{cursor:r,input:i}=this.state;this.input=`${i}`.slice(0,r)+e+`${i}`.slice(r),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:r}=this.state;if(e<=0)return this.alert();this.input=`${r}`.slice(0,e-1)+`${r}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:r}=this.state;if(r[e]===void 0)return this.alert();this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let r=this.input.slice(0,e),i=this.input.slice(e),n=r.split(" ");this.state.clipboard.push(n.pop()),this.input=n.join(" "),this.cursor=this.input.length,this.input+=i,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):"";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||r):n1e(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),i=await this.separator(),n=await this.message(),s=[r,n,i].filter(Boolean).join(" ");this.state.prompt=s;let o=await this.header(),a=await this.format(),l=await this.error()||await this.hint(),c=await this.footer();l&&!a.includes(l)&&(a+=" "+l),s+=" "+a,this.clear(e),this.write([o,s,c].filter(Boolean).join(`
|
|||
|
`)),this.restore()}};t$.exports=r$});var n$=C((Sat,i$)=>{"use strict";var o1e=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),uB=t=>o1e(t).filter(Boolean);i$.exports=(t,e={},r="")=>{let{past:i=[],present:n=""}=e,s,o;switch(t){case"prev":case"undo":return s=i.slice(0,i.length-1),o=i[i.length-1]||"",{past:uB([r,...s]),present:o};case"next":case"redo":return s=i.slice(1),o=i[0]||"",{past:uB([...s,r]),present:o};case"save":return{past:uB([...i,r]),present:""};case"remove":return o=uB(i.filter(a=>a!==r)),n="",o.length&&(n=o.pop()),{past:o,present:n};default:throw new Error(`Invalid action: "${t}"`)}}});var mP=C((kat,s$)=>{"use strict";var a1e=dl(),o$=n$(),a$=class extends a1e{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let i=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:i},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=o$(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){!this.store||(this.data=o$("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};s$.exports=a$});var c$=C((vat,A$)=>{"use strict";var A1e=dl(),l$=class extends A1e{format(){return""}};A$.exports=l$});var f$=C((Pat,u$)=>{"use strict";var l1e=dl(),g$=class extends l1e{constructor(e={}){super(e);this.sep=this.options.separator||/, */,this.initial=e.initial||""}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:r=>r;return this.list.map(e).join(", ")}async submit(e){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}};u$.exports=g$});var d$=C((Fat,h$)=>{"use strict";var c1e=ba(),p$=class extends c1e{constructor(e){super(z(v({},e),{multiple:!0}))}};h$.exports=p$});var IP=C((Rat,C$)=>{"use strict";var u1e=dl(),m$=class extends u1e{constructor(e={}){super(v({style:"number"},e));this.min=this.isValue(e.min)?this.toNumber(e.min):-Infinity,this.max=this.isValue(e.max)?this.toNumber(e.max):Infinity,this.delay=e.delay!=null?e.delay:1e3,this.float=e.float!==!1,this.round=e.round===!0||e.float===!1,this.major=e.major||10,this.minor=e.minor||1,this.initial=e.initial!=null?e.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||e==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let r=e||this.minor,i=this.toNumber(this.input);return i>this.max+r?this.alert():(this.input=`${i+r}`,this.render())}down(e){let r=e||this.minor,i=this.toNumber(this.input);return i<this.min-r?this.alert():(this.input=`${i-r}`,this.render())}shiftDown(){return this.down(this.major)}shiftUp(){return this.up(this.major)}format(e=this.input){return typeof this.options.format=="function"?this.options.format.call(this,e):this.styles.info(e)}toNumber(e=""){return this.float?+e:Math.round(+e)}isValue(e){return/^[-+]?[0-9]+((\.)|(\.[0-9]+))?$/.test(e)}submit(){let e=[this.input,this.initial].find(r=>this.isValue(r));return this.value=this.toNumber(e||0),super.submit()}};C$.exports=m$});var E$=C((Nat,I$)=>{I$.exports=IP()});var w$=C((Lat,y$)=>{"use strict";var g1e=dl(),B$=class extends g1e{constructor(e){super(e);this.cursorShow()}format(e=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length)):""}};y$.exports=B$});var x$=C((Mat,Q$)=>{"use strict";var f1e=Gn(),h
|
|||
|
`;let r=e.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((i,n)=>({name:n+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let e=0;for(let r of this.choices){e=Math.max(e,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let i=0;i<this.scale.length;i++)r.scale.push({index:i})}this.widths[0]=Math.min(this.widths[0],e+3)}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}heading(e,r,i){return this.styles.strong(e)}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIndex>=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(", "):""}pointer(){return""}renderScaleKey(){if(this.scaleKey===!1||this.state.submitted)return"";let e=this.scale.map(i=>` ${i.name} - ${i.message}`);return["",...e].map(i=>this.styles.muted(i)).join(`
|
|||
|
`)}renderScaleHeading(e){let r=this.scale.map(l=>l.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let i=this.scaleLength-r.join("").length,n=Math.round(i/(r.length-1)),o=r.map(l=>this.styles.strong(l)).join(" ".repeat(n)),a=" ".repeat(this.widths[0]);return this.margin[3]+a+this.margin[1]+o}scaleIndicator(e,r,i){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,i);let n=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):n?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let i=e.scale.map(s=>this.scaleIndicator(e,s,r)),n=this.term==="Hyper"?"":" ";return i.join(n+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let i=this.index===r,n=await this.pointer(e,r),s=await e.hint;s&&!b$.hasColor(s)&&(s=this.styles.muted(s));let o=p=>this.margin[3]+p.replace(/\s+$/,"").padEnd(this.widths[0]," "),a=this.newline,l=this.indent(e),c=await this.resolve(e.message,this.state,e,r),u=await this.renderScale(e,r),g=this.margin[1]+this.margin[3];this.scaleLength=f1e.unstyle(u).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-g.length);let h=b$.wordWrap(c,{width:this.widths[0],newline:a}).split(`
|
|||
|
`).map(p=>o(p)+this.margin[1]);return i&&(u=this.styles.info(u),h=h.map(p=>this.styles.info(p))),h[0]+=u,this.linebreak&&h.push(""),[l+n,h.join(`
|
|||
|
`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(n,s)=>await this.renderChoice(n,s)),r=await Promise.all(e),i=await this.renderScaleHeading();return this.margin[0]+[i,...r.map(n=>n.join(" "))].join(`
|
|||
|
`)}async render(){let{submitted:e,size:r}=this.state,i=await this.prefix(),n=await this.separator(),s=await this.message(),o="";this.options.promptLine!==!1&&(o=[i,s,n,""].join(" "),this.state.prompt=o);let a=await this.header(),l=await this.format(),c=await this.renderScaleKey(),u=await this.error()||await this.hint(),g=await this.renderChoices(),f=await this.footer(),h=this.emptyError;l&&(o+=l),u&&!o.includes(u)&&(o+=" "+u),e&&!l&&!g.trim()&&this.multiple&&h!=null&&(o+=this.styles.danger(h)),this.clear(r),this.write([a,o,c,g,f].filter(Boolean).join(`
|
|||
|
`)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}};Q$.exports=D$});var P$=C((Tat,S$)=>{"use strict";var k$=Gn(),p1e=(t="")=>typeof t=="string"?t.replace(/^['"]|['"]$/g,""):"",v$=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=p1e(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}},d1e=async(t={},e={},r=i=>i)=>{let i=new Set,n=t.fields||[],s=t.template,o=[],a=[],l=[],c=1;typeof s=="function"&&(s=await s());let u=-1,g=()=>s[++u],f=()=>s[u+1],h=p=>{p.line=c,o.push(p)};for(h({type:"bos",value:""});u<s.length-1;){let p=g();if(/^[^\S\n ]$/.test(p)){h({type:"text",value:p});continue}if(p===`
|
|||
|
`){h({type:"newline",value:p}),c++;continue}if(p==="\\"){p+=g(),h({type:"text",value:p});continue}if((p==="$"||p==="#"||p==="{")&&f()==="{"){p+=g();let w={type:"template",open:p,inner:"",close:"",value:p},Q;for(;Q=g();){if(Q==="}"){f()==="}"&&(Q+=g()),w.value+=Q,w.close=Q;break}Q===":"?(w.initial="",w.key=w.inner):w.initial!==void 0&&(w.initial+=Q),w.value+=Q,w.inner+=Q}w.template=w.open+(w.initial||w.inner)+w.close,w.key=w.key||w.inner,e.hasOwnProperty(w.key)&&(w.initial=e[w.key]),w=r(w),h(w),l.push(w.key),i.add(w.key);let S=a.find(R=>R.name===w.key);w.field=n.find(R=>R.name===w.key),S||(S=new v$(w),a.push(S)),S.lines.push(w.line-1);continue}let m=o[o.length-1];m.type==="text"&&m.line===c?m.value+=p:h({type:"text",value:p})}return h({type:"eos",value:""}),{input:s,tabstops:o,unique:i,keys:l,items:a}};S$.exports=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),i=v(v({},e.values),e.initial),{tabstops:n,items:s,keys:o}=await d1e(e,i),a=EP("result",t,e),l=EP("format",t,e),c=EP("validate",t,e,!0),u=t.isValue.bind(t);return async(g={},f=!1)=>{let h=0;g.required=r,g.items=s,g.keys=o,g.output="";let p=async(Q,S,R,U)=>{let L=await c(Q,S,R,U);return L===!1?"Invalid field "+R.name:L};for(let Q of n){let S=Q.value,R=Q.key;if(Q.type!=="template"){S&&(g.output+=S);continue}if(Q.type==="template"){let U=s.find(H=>H.name===R);e.required===!0&&g.required.add(U.name);let L=[U.input,g.values[U.value],U.value,S].find(u),Y=(U.field||{}).message||Q.inner;if(f){let H=await p(g.values[R],g,U,h);if(H&&typeof H=="string"||H===!1){g.invalid.set(R,H);continue}g.invalid.delete(R);let A=await a(g.values[R],g,U,h);g.output+=k$.unstyle(A);continue}U.placeholder=!1;let $=S;S=await l(S,g,U,h),L!==S?(g.values[R]=L,S=t.styles.typing(L),g.missing.delete(Y)):(g.values[R]=void 0,L=`<${Y}>`,S=t.styles.primary(L),U.placeholder=!0,g.required.has(R)&&g.missing.add(Y)),g.missing.has(Y)&&g.validating&&(S=t.styles.warning(L)),g.invalid.has(R)&&g.validating&&(S=t.styles.danger(L)),h===g.index&&($!==S?S=t.styles.underline(S):S=t.styles.heading(k$.unstyle(S))),h++}S&&(g.output+=S)}let m=g.output.split(`
|
|||
|
`).map(Q=>" "+Q),I=s.length,w=0;for(let Q of s)g.invalid.has(Q.name)&&Q.lines.forEach(S=>{m[S][0]===" "&&(m[S]=g.styles.danger(g.symbols.bullet)+m[S].slice(1))}),t.isValue(g.values[Q.name])&&w++;return g.completed=(w/I*100).toFixed(0),g.output=m.join(`
|
|||
|
`),g.output}};function EP(t,e,r,i){return(n,s,o,a)=>typeof o.field[t]=="function"?o.field[t].call(e,n,s,o,a):[i,n].find(l=>e.isValue(l))}});var N$=C((Kat,F$)=>{"use strict";var C1e=Gn(),m1e=P$(),I1e=xu(),R$=class extends I1e{constructor(e){super(e);this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await m1e(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},e!==!0&&(await this.initialize(),await this.render())}moveCursor(e){let r=this.getItem();this.cursor+=e,r.cursor+=e}dispatch(e,r){if(!r.code&&!r.ctrl&&e!=null&&this.getItem()){this.append(e,r);return}this.alert()}append(e,r){let i=this.getItem(),n=i.input.slice(0,this.cursor),s=i.input.slice(this.cursor);this.input=i.input=`${n}${e}${s}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let r=e.input.slice(this.cursor),i=e.input.slice(0,this.cursor-1);this.input=e.input=`${i}${r}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:e,keys:r=[],submitted:i,size:n}=this.state,s=[this.options.newline,`
|
|||
|
`].find(Q=>Q!=null),o=await this.prefix(),a=await this.separator(),l=await this.message(),c=[o,l,a].filter(Boolean).join(" ");this.state.prompt=c;let u=await this.header(),g=await this.error()||"",f=await this.hint()||"",h=i?"":await this.interpolate(this.state),p=this.state.key=r[e]||"",m=await this.format(p),I=await this.footer();m&&(c+=" "+m),f&&!m&&this.state.completed===0&&(c+=" "+f),this.clear(n);let w=[u,c,h,I,g.trim()];this.write(w.filter(Boolean).join(s)),this.restore()}getItem(e){let{items:r,keys:i,index:n}=this.state,s=r.find(o=>o.name===i[n]);return s&&s.input!=null&&(this.input=s.input,this.cursor=s.cursor),s}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:r,output:i,values:n}=this.state;if(e.size){let a="";for(let[l,c]of e)a+=`Invalid ${l}: ${c}
|
|||
|
`;return this.state.error=a,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let o=C1e.unstyle(i).split(`
|
|||
|
`).map(a=>a.slice(1)).join(`
|
|||
|
`);return this.value={values:n,result:o},super.submit()}};F$.exports=R$});var T$=C((Oat,L$)=>{"use strict";var E1e="(Use <shift>+<up/down> to sort)",y1e=ba(),M$=class extends y1e{constructor(e){super(z(v({},e),{reorder:!1,sort:!0,multiple:!0}));this.state.hint=[this.options.hint,E1e].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,r){let i=await super.renderChoice(e,r),n=this.symbols.identicalTo+" ",s=this.index===r&&this.sorting?this.styles.muted(n):" ";return this.options.drag===!1&&(s=""),this.options.numbered===!0?s+`${r+1} - `+i:s+i}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};L$.exports=M$});var U$=C((Uat,K$)=>{"use strict";var B1e=fp(),O$=class extends B1e{constructor(e={}){super(e);if(this.emptyError=e.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];r=r.map(i=>this.styles.muted(i)),this.state.header=r.join(`
|
|||
|
`)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let i of r)i.scale=w1e(5,this.options),i.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],i=r.selected;return e.scale.forEach(n=>n.selected=!1),r.selected=!i,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return" "}async renderChoice(e,r){await this.onChoice(e,r);let i=this.index===r,n=this.term==="Hyper",s=n?9:8,o=n?"":" ",a=this.symbols.line.repeat(s),l=" ".repeat(s+(n?0:1)),c=S=>(S?this.styles.success("\u25C9"):"\u25EF")+o,u=r+1+".",g=i?this.styles.heading:this.styles.noop,f=await this.resolve(e.message,this.state,e,r),h=this.indent(e),p=h+e.scale.map((S,R)=>c(R===e.scaleIdx)).join(a),m=S=>S===e.scaleIdx?g(S):S,I=h+e.scale.map((S,R)=>m(R)).join(l),w=()=>[u,f].filter(Boolean).join(" "),Q=()=>[w(),p,I," "].filter(Boolean).join(`
|
|||
|
`);return i&&(p=this.styles.cyan(p),I=this.styles.cyan(I)),Q()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(i,n)=>await this.renderChoice(i,n)),r=await Promise.all(e);return r.length||r.push(this.styles.danger("No matching choices")),r.join(`
|
|||
|
`)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:e,size:r}=this.state,i=await this.prefix(),n=await this.separator(),s=await this.message(),o=[i,s,n].filter(Boolean).join(" ");this.state.prompt=o;let a=await this.header(),l=await this.format(),c=await this.error()||await this.hint(),u=await this.renderChoices(),g=await this.footer();(l||!c)&&(o+=" "+l),c&&!o.includes(c)&&(o+=" "+c),e&&!l&&!u&&this.multiple&&this.type!=="form"&&(o+=this.styles.danger(this.emptyError)),this.clear(r),this.write([o,a,u,g].filter(Boolean).join(`
|
|||
|
`)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}};function w1e(t,e={}){if(Array.isArray(e.scale))return e.scale.map(i=>v({},i));let r=[];for(let i=1;i<t+1;i++)r.push({i,selected:!1});return r}K$.exports=O$});var Y$=C((Hat,H$)=>{H$.exports=mP()});var G$=C((Yat,j$)=>{"use strict";var Q1e=cB(),q$=class extends Q1e{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e="",r){switch(e.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let e=i=>this.styles.primary.underline(i);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:e}=this.state,r=await this.header(),i=await this.prefix(),n=await this.separator(),s=await this.message(),o=await this.format(),a=await this.error()||await this.hint(),l=await this.footer(),c=[i,s,n,o].join(" ");this.state.prompt=c,a&&!c.includes(a)&&(c+=" "+a),this.clear(e),this.write([r,c,l].filter(Boolean).join(`
|
|||
|
`)),this.write(this.margin[2]),this.restore()}};j$.exports=q$});var z$=C((jat,J$)=>{"use strict";var b1e=ba(),W$=class extends b1e{constructor(e){super(e);if(typeof this.options.correctChoice!="number"||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(e,r){let i=await super.toChoices(e,r);if(i.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>i.length)throw new Error("Please specify the index of the correct answer from the list of choices");return i}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};J$.exports=W$});var X$=C(yP=>{"use strict";var V$=ri(),Dr=(t,e)=>{V$.defineExport(yP,t,e),V$.defineExport(yP,t.toLowerCase(),e)};Dr("AutoComplete",()=>K_());Dr("BasicAuth",()=>J_());Dr("Confirm",()=>Z_());Dr("Editable",()=>e$());Dr("Form",()=>lB());Dr("Input",()=>mP());Dr("Invisible",()=>c$());Dr("List",()=>f$());Dr("MultiSelect",()=>d$());Dr("Numeral",()=>E$());Dr("Password",()=>w$());Dr("Scale",()=>x$());Dr("Select",()=>ba());Dr("Snippet",()=>N$());Dr("Sort",()=>T$());Dr("Survey",()=>U$());Dr("Text",()=>Y$());Dr("Toggle",()=>G$());Dr("Quiz",()=>z$())});var _$=C((Gat,Z$)=>{Z$.exports={ArrayPrompt:fp(),AuthPrompt:CP(),BooleanPrompt:cB(),NumberPrompt:IP(),StringPrompt:dl()}});var pp=C((Jat,$$)=>{"use strict";var eee=require("assert"),BP=require("events"),Da=ri(),bs=class extends BP{constructor(e,r){super();this.options=Da.merge({},e),this.answers=v({},r)}register(e,r){if(Da.isObject(e)){for(let n of Object.keys(e))this.register(n,e[n]);return this}eee.equal(typeof r,"function","expected a function");let i=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[i]=r:this.prompts[i]=r(this.Prompt,this),this}async prompt(e=[]){for(let r of[].concat(e))try{typeof r=="function"&&(r=await r.call(this)),await this.ask(Da.merge({},this.options,r))}catch(i){return Promise.reject(i)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let r=Da.merge({},this.options,e),{type:i,name:n}=e,{set:s,get:o}=Da;if(typeof i=="function"&&(i=await i.call(this,e,this.answers)),!i)return this.answers[n];eee(this.prompts[i],`Prompt "${i}" is not registered`);let a=new this.prompts[i](r),l=o(this.answers,n);a.state.answers=this.answers,a.enquirer=this,n&&a.on("submit",u=>{this.emit("answer",n,u,a),s(this.answers,n,u)});let c=a.emit.bind(a);return a.emit=(...u)=>(this.emit.call(this,...u),c(...u)),this.emit("prompt",a,this),r.autofill&&l!=null?(a.value=a.input=l,r.autofill==="show"&&await a.submit()):l=a.value=await a.run(),l}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||xu()}static get prompts(){return X$()}static get types(){return _$()}static get prompt(){let e=(r,...i)=>{let n=new this(...i),s=n.emit.bind(n);return n.emit=(...o)=>(e.emit(...o),s(...o)),n.prompt(r)};return Da.mixinEmitter(e,new BP),e}};Da.mixinEmitter(bs,new BP);var wP=bs.prompts;for(let t of Object.keys(wP)){let e=t.toLowerCase(),r=i=>new wP[t](i).run();bs.prompt[e]=r,bs[e]=r,bs[t]||Reflect.defineProperty(bs,t,{get:()=>wP[t]})}var hp=t=>{Da.defineExport(bs,t,()=>bs.types[t])};hp("ArrayPrompt");hp("AuthPrompt");hp("BooleanPrompt");hp("NumberPrompt");hp("StringPrompt");$$.exports=bs});var fee=C((LAt,gee)=>{function v1e(t,e){for(var r=-1,i=t==null?0:t.length;++r<i&&e(t[r],r,t)!==!1;);return t}gee.exports=v1e});var vu=C((MAt,hee)=>{var P1e=yy(),F1e=gu();function R1e(t,e,r,i){var n=!r;r||(r={});for(var s=-1,o=e.length;++s<o;){var a=e[s],l=i?i(r[a],t[a],a,r,t):void 0;l===void 0&&(l=t[a]),n?F1e(r,a,l):P1e(r,a,l)}return r}hee.exports=R1e});var dee=C((TAt,pee)=>{var N1e=vu(),L1e=Cu();function M1e(t,e){return t&&N1e(e,L1e(e),t)}pee.exports=M1e});var mee=C((KAt,Cee)=>{fu
|
|||
|
`:"";return o?g+=`@IF EXIST ${o} (\r
|
|||
|
${o} ${l} ${n} ${u}%*\r
|
|||
|
) ELSE (\r
|
|||
|
@SETLOCAL\r
|
|||
|
@SET PATHEXT=%PATHEXT:;.JS;=;%\r
|
|||
|
${a} ${l} ${n} ${u}%*\r
|
|||
|
)\r
|
|||
|
`:g+=`@${a} ${l} ${n} ${u}%*\r
|
|||
|
`,g}function Iqe(t,e,r){let i=Dn.relative(Dn.dirname(e),t),n=r.prog&&r.prog.split("\\").join("/"),s;i=i.split("\\").join("/");let o=Dn.isAbsolute(i)?`"${i}"`:`"$basedir/${i}"`,a=r.args||"",l=XF(r.nodePath).posix;n?(s=`"$basedir/${r.prog}"`,i=o):(n=o,a="",i="");let c=r.progArgs?`${r.progArgs.join(" ")} `:"",u=`#!/bin/sh
|
|||
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')")
|
|||
|
|
|||
|
case \`uname\` in
|
|||
|
*CYGWIN*) basedir=\`cygpath -w "$basedir"\`;;
|
|||
|
esac
|
|||
|
|
|||
|
`,g=r.nodePath?`export NODE_PATH="${l}"
|
|||
|
`:"";return s?u+=`${g}if [ -x ${s} ]; then
|
|||
|
exec ${s} ${a} ${i} ${c}"$@"
|
|||
|
else
|
|||
|
exec ${n} ${a} ${i} ${c}"$@"
|
|||
|
fi
|
|||
|
`:u+=`${g}${n} ${a} ${i} ${c}"$@"
|
|||
|
exit $?
|
|||
|
`,u}function Eqe(t,e,r){let i=Dn.relative(Dn.dirname(e),t),n=r.prog&&r.prog.split("\\").join("/"),s=n&&`"${n}$exe"`,o;i=i.split("\\").join("/");let a=Dn.isAbsolute(i)?`"${i}"`:`"$basedir/${i}"`,l=r.args||"",c=XF(r.nodePath),u=c.win32,g=c.posix;s?(o=`"$basedir/${r.prog}$exe"`,i=a):(s=a,l="",i="");let f=r.progArgs?`${r.progArgs.join(" ")} `:"",h=`#!/usr/bin/env pwsh
|
|||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|||
|
|
|||
|
$exe=""
|
|||
|
${r.nodePath?`$env_node_path=$env:NODE_PATH
|
|||
|
$env:NODE_PATH="${u}"
|
|||
|
`:""}if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
|
|||
|
# Fix case when both the Windows and Linux builds of Node
|
|||
|
# are installed in the same directory
|
|||
|
$exe=".exe"
|
|||
|
}`;return r.nodePath&&(h+=` else {
|
|||
|
$env:NODE_PATH="${g}"
|
|||
|
}`),o?h+=`
|
|||
|
$ret=0
|
|||
|
if (Test-Path ${o}) {
|
|||
|
# Support pipeline input
|
|||
|
if ($MyInvocation.ExpectingInput) {
|
|||
|
$input | & ${o} ${l} ${i} ${f}$args
|
|||
|
} else {
|
|||
|
& ${o} ${l} ${i} ${f}$args
|
|||
|
}
|
|||
|
$ret=$LASTEXITCODE
|
|||
|
} else {
|
|||
|
# Support pipeline input
|
|||
|
if ($MyInvocation.ExpectingInput) {
|
|||
|
$input | & ${s} ${l} ${i} ${f}$args
|
|||
|
} else {
|
|||
|
& ${s} ${l} ${i} ${f}$args
|
|||
|
}
|
|||
|
$ret=$LASTEXITCODE
|
|||
|
}
|
|||
|
${r.nodePath?`$env:NODE_PATH=$env_node_path
|
|||
|
`:""}exit $ret
|
|||
|
`:h+=`
|
|||
|
# Support pipeline input
|
|||
|
if ($MyInvocation.ExpectingInput) {
|
|||
|
$input | & ${s} ${l} ${i} ${f}$args
|
|||
|
} else {
|
|||
|
& ${s} ${l} ${i} ${f}$args
|
|||
|
}
|
|||
|
${r.nodePath?`$env:NODE_PATH=$env_node_path
|
|||
|
`:""}exit $LASTEXITCODE
|
|||
|
`,h}function Bqe(t,e){return e.fs_.chmod(t,493)}function XF(t){if(!t)return{win32:"",posix:""};let e=typeof t=="string"?t.split(Dn.delimiter):Array.from(t),r={};for(let i=0;i<e.length;i++){let n=e[i].split("/").join("\\"),s=une()?e[i].split("\\").join("/").replace(/^([^:\\/]*):/,(o,a)=>`/mnt/${a.toLowerCase()}`):e[i];r.win32=r.win32?`${r.win32};${n}`:n,r.posix=r.posix?`${r.posix}:${s}`:s,r[i]={win32:n,posix:s}}return r}cne.exports=VF});var dR=C((_Et,vne)=>{vne.exports=require("stream")});var Nne=C(($Et,Pne)=>{"use strict";function Fne(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function jqe(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fne(Object(r),!0).forEach(function(i){Yqe(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fne(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Yqe(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qqe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rne(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Gqe(t,e,r){return e&&Rne(t.prototype,e),r&&Rne(t,r),t}var Jqe=require("buffer"),SB=Jqe.Buffer,Wqe=require("util"),CR=Wqe.inspect,zqe=CR&&CR.custom||"inspect";function Vqe(t,e,r){SB.prototype.copy.call(t,e,r)}Pne.exports=function(){function t(){qqe(this,t),this.head=null,this.tail=null,this.length=0}return Gqe(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return SB.alloc(0);for(var i=SB.allocUnsafe(r>>>0),n=this.head,s=0;n;)Vqe(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var o=i.data,a=r>o.length?o.length:r;if(a===o.length?s+=o:s+=o.slice(0,r),r-=a,r===0){a===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=SB.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var o=n.data,a=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,a),r-=a,r===0){a===o.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++s}return this.length-=s,i}},{key:zqe,value:function(r,i){return CR(this,jqe({},i,{depth:0,customInspect:!1}))}}]),t}()});var IR=C((eyt,Lne)=>{"use strict";function Xqe(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(mR,this,t)):process.nextTick(mR,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(
|
|||
|
`)),t.linkname&&(e+=zR(" linkpath="+t.linkname+`
|
|||
|
`));var r=t.pax;if(r)for(var i in r)e+=zR(" "+i+"="+r[i]+`
|
|||
|
`);return Buffer.from(e)};Vu.decodePax=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&t[r]!==32;)r++;var i=parseInt(t.slice(0,r).toString(),10);if(!i)return e;var n=t.slice(r+1,i-1).toString(),s=n.indexOf("=");if(s===-1)return e;e[n.slice(0,s)]=n.slice(s+1),t=t.slice(i)}return e};Vu.encode=function(t){var e=qJe(512),r=t.name,i="";if(t.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var n=r.indexOf("/");if(n===-1)return null;i+=i?"/"+r.slice(0,n):r.slice(0,n),r=r.slice(n+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(i)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(Ua(t.mode&XJe,6),100),e.write(Ua(t.uid,6),108),e.write(Ua(t.gid,6),116),e.write(Ua(t.size,11),124),e.write(Ua(t.mtime.getTime()/1e3|0,11),136),e[156]=Mse+$Je(t.type),t.linkname&&e.write(t.linkname,157),Tse.copy(e,Id),WJe.copy(e,WR),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(Ua(t.devmajor||0,6),329),e.write(Ua(t.devminor||0,6),337),i&&e.write(i,345),e.write(Ua(Ose(e),6),148),e)};Vu.decode=function(t,e,r){var i=t[156]===0?0:t[156]-Mse,n=Xu(t,0,100,e),s=Ha(t,100,8),o=Ha(t,108,8),a=Ha(t,116,8),l=Ha(t,124,12),c=Ha(t,136,12),u=_Je(i),g=t[157]===0?null:Xu(t,157,100,e),f=Xu(t,265,32),h=Xu(t,297,32),p=Ha(t,329,8),m=Ha(t,337,8),I=Ose(t);if(I===8*32)return null;if(I!==Ha(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(Tse.compare(t,Id,Id+6)===0)t[345]&&(n=Xu(t,345,155,e)+"/"+n);else if(!(zJe.compare(t,Id,Id+6)===0&&VJe.compare(t,WR,WR+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return i===0&&n&&n[n.length-1]==="/"&&(i=5),{name:n,mode:s,uid:o,gid:a,size:l,mtime:new Date(1e3*c),type:u,linkname:g,uname:f,gname:h,devmajor:p,devminor:m}}});var Jse=C((Eyt,Use)=>{var Hse=require("util"),t3e=Lse(),Ed=VR(),Yse=zu().Writable,jse=zu().PassThrough,qse=function(){},Gse=function(t){return t&=511,t&&512-t},r3e=function(t,e){var r=new qB(t,e);return r.end(),r},i3e=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t},qB=function(t,e){this._parent=t,this.offset=e,jse.call(this,{autoDestroy:!1})};Hse.inherits(qB,jse);qB.prototype.destroy=function(t){this._parent.destroy(t)};var vo=function(t){if(!(this instanceof vo))return new vo(t);Yse.call(this,t),t=t||{},this._offset=0,this._buffer=t3e(),this._missing=0,this._partial=!1,this._onparse=qse,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,r=e._buffer,i=function(){e._continue()},n=function(f){if(e._locked=!1,f)return e.destroy(f);e._stream||i()},s=function(){e._stream=null;var f=Gse(e._header.size);f?e._parse(f,o):e._parse(512,g),e._locked||i()},o=function(){e._buffer.consume(Gse(e._header.size)),e._parse(512,g),i()},a=function(){var f=e._header.size;e._paxGlobal=Ed.decodePax(r.slice(0,f)),r.consume(f),s()},l=function(){var f=e._header.size;e._pax=Ed.decodePax(r.slice(0,f)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(f),s()},c=function(){var f=e._header.size;this._gnuLongPath=Ed.decodeLongPath(r.slice(0,f),t.filenameEncoding),r.consume(f),s()},u=function(){var f=e._header.size;this._gnuLongLinkPath=Ed.decodeLongPath(r.slice(0,f),t.filenameEncoding),r.consume(f),s()},g=function(){var f=e._offset,h;try{h=e._header=Ed.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(p){e.emit("error",p)}if(r.consume(512),!h){e._parse(512,g),i();return}if(h.type==="gnu-long-path"){e._parse(h.size,c),i();return}if(h.type==="gnu-long-link-path"){e._parse(h.size,u),i();return}if(h.type==="pax-global-header"){e._parse(h.size,a),i();return}if(h.type==="pax-header"){e._parse(h.size,l),i();return}if(e._gnuLongPath&&(h.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(h.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=h=i3e(h,e._pax),e
|
|||
|
Wanted: ${r.size}
|
|||
|
Found: ${t.length}`);throw a.code="EBADSIZE",a.found=t.length,a.expected=r.size,a.sri=e,a}else{let a=new Error(`Integrity checksum failed when using ${i}: Wanted ${e}, but got ${s}. (${t.length} bytes)`);throw a.code="EINTEGRITY",a.found=s,a.expected=e,a.algorithm=i,a.sri=e,a}}vs.exports.checkStream=L3e;function L3e(t,e,r){r=yi(r);let i=r.Promise||Promise,n=oN(r.concat({integrity:e}));return new i((s,o)=>{t.pipe(n),t.on("error",o),n.on("error",o);let a;n.on("verified",l=>{a=l}),n.on("end",()=>s(a)),n.on("data",()=>{})})}vs.exports.integrityStream=oN;function oN(t){t=yi(t);let e=t.integrity&&Ps(t.integrity,t),r=e&&Object.keys(e).length,i=r&&e.pickAlgorithm(t),n=r&&e[i],s=Array.from(new Set(t.algorithms.concat(i?[i]:[]))),o=s.map(wd.createHash),a=0,l=new b3e({transform(c,u,g){a+=c.length,o.forEach(f=>f.update(c,u)),g(null,c,u)}}).on("end",()=>{let c=t.options&&t.options.length?`?${t.options.join("?")}`:"",u=Ps(o.map((f,h)=>`${s[h]}-${f.digest("base64")}${c}`).join(" "),t),g=r&&u.match(e,t);if(typeof t.size=="number"&&a!==t.size){let f=new Error(`stream size mismatch when checking ${e}.
|
|||
|
Wanted: ${t.size}
|
|||
|
Found: ${a}`);f.code="EBADSIZE",f.found=a,f.expected=t.size,f.sri=e,l.emit("error",f)}else if(t.integrity&&!g){let f=new Error(`${e} integrity checksum failed when using ${i}: wanted ${n} but got ${u}. (${a} bytes)`);f.code="EINTEGRITY",f.found=u,f.expected=n,f.algorithm=i,f.sri=e,l.emit("error",f)}else l.emit("size",a),l.emit("integrity",u),g&&l.emit("verified",g)});return l}vs.exports.create=M3e;function M3e(t){t=yi(t);let e=t.algorithms,r=t.options.length?`?${t.options.join("?")}`:"",i=e.map(wd.createHash);return{update:function(n,s){return i.forEach(o=>o.update(n,s)),this},digest:function(n){return e.reduce((o,a)=>{let l=i.shift().digest("base64"),c=new Dl(`${a}-${l}${r}`,t);if(c.algorithm&&c.digest){let u=c.algorithm;o[u]||(o[u]=[]),o[u].push(c)}return o},new eg)}}}var T3e=new Set(wd.getHashes()),poe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>T3e.has(t));function v3e(t,e){return poe.indexOf(t.toLowerCase())>=poe.indexOf(e.toLowerCase())?t:e}});var Hh={};rt(Hh,{BuildType:()=>Zi,Cache:()=>mt,Configuration:()=>le,DEFAULT_LOCK_FILENAME:()=>Ek,DEFAULT_RC_FILENAME:()=>Ik,FormatType:()=>Es,InstallMode:()=>Rr,LightReport:()=>Co,LinkType:()=>ht,Manifest:()=>ze,MessageName:()=>W,PackageExtensionStatus:()=>zr,PackageExtensionType:()=>vr,Project:()=>Ne,ProjectLookup:()=>Ba,Report:()=>fi,ReportError:()=>$e,SettingsType:()=>ge,StreamReport:()=>Fe,TAG_REGEXP:()=>tu,TelemetryManager:()=>Uh,ThrowReport:()=>br,VirtualFetcher:()=>wh,Workspace:()=>Oh,WorkspaceResolver:()=>Ei,YarnVersion:()=>wr,execUtils:()=>Or,folderUtils:()=>rQ,formatUtils:()=>ae,hashUtils:()=>Si,httpUtils:()=>Lt,miscUtils:()=>he,scriptUtils:()=>St,semverUtils:()=>Ft,structUtils:()=>b,tgzUtils:()=>mr,treeUtils:()=>jn});var Or={};rt(Or,{EndStrategy:()=>on,execvp:()=>EAe,pipevp:()=>Ys});var Rg={};rt(Rg,{AliasFS:()=>eA,CwdFS:()=>bt,DEFAULT_COMPRESSION_LEVEL:()=>$a,FakeFS:()=>Os,Filename:()=>Pt,JailFS:()=>Us,LazyFS:()=>kg,LinkStrategy:()=>wg,NoFS:()=>LC,NodeFS:()=>Nt,PortablePath:()=>xe,PosixFS:()=>vg,ProxiedFS:()=>Kr,VirtualFS:()=>or,ZipFS:()=>Sr,ZipOpenFS:()=>sn,extendFs:()=>TC,normalizeLineEndings:()=>Pl,npath:()=>K,opendir:()=>FC,patchFs:()=>Hw,ppath:()=>D,statUtils:()=>Sw,toFilename:()=>sr,xfs:()=>M});var Sw={};rt(Sw,{BigIntStatsEntry:()=>Eg,DEFAULT_MODE:()=>Ig,DirEntry:()=>VN,StatEntry:()=>Ko,areStatsEqual:()=>vw,clearStats:()=>DC,convertToBigIntStats:()=>xC,makeDefaultStats:()=>yg,makeEmptyStats:()=>Mae});var kw=re(require("util"));var rn=61440,Lo=16384,Mo=32768,To=40960;var Ig=Mo|420,VN=class{constructor(){this.name="";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&rn)===Lo}isFIFO(){return!1}isFile(){return(this.mode&rn)===Mo}isSocket(){return!1}isSymbolicLink(){return(this.mode&rn)===To}},Ko=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=Ig;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&rn)===Lo}isFIFO(){return!1}isFile(){return(this.mode&rn)===Mo}isSocket(){return!1}isSymbolicLink(){return(this.mode&rn)===To}},Eg=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=BigInt(0);this.ino=BigInt(0);this.mode=BigInt(Ig);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&BigInt(rn))===BigInt(Lo)}isFIFO(){return!1}isFile(){return(this.mode&BigInt(rn))===BigInt(Mo)}isSocket(){return!1}isSymbolicLink
|
|||
|
`)}writeJsonSync(e,r){return this.writeFileSync(e,`${JSON.stringify(r,null,2)}
|
|||
|
`)}async preserveTimePromise(e,r){let i=await this.lstatPromise(e),n=await r();typeof n!="undefined"&&(e=n),this.lutimesPromise?await this.lutimesPromise(e,i.atime,i.mtime):i.isSymbolicLink()||await this.utimesPromise(e,i.atime,i.mtime)}async preserveTimeSync(e,r){let i=this.lstatSync(e),n=r();typeof n!="undefined"&&(e=n),this.lutimesSync?this.lutimesSync(e,i.atime,i.mtime):i.isSymbolicLink()||this.utimesSync(e,i.atime,i.mtime)}};Os.DEFAULT_TIME=315532800;var Xa=class extends Os{constructor(){super(D)}};function Yae(t){let e=t.match(/\r?\n/g);if(e===null)return lL.EOL;let r=e.filter(n=>n===`\r
|
|||
|
`).length,i=e.length-r;return r>i?`\r
|
|||
|
`:`
|
|||
|
`}function Pl(t,e){return e.replace(/\r?\n/g,Yae(t))}var Fl=re(require("fs")),Mw=re(require("stream")),fL=re(require("util")),Tw=re(require("zlib"));var cL=re(require("fs"));var Nt=class extends Xa{constructor(e=cL.default){super();this.realFs=e,typeof this.realFs.lutimes!="undefined"&&(this.lutimesPromise=this.lutimesPromiseImpl,this.lutimesSync=this.lutimesSyncImpl)}getExtractHint(){return!1}getRealPath(){return xe.root}resolve(e){return D.resolve(e)}async openPromise(e,r,i){return await new Promise((n,s)=>{this.realFs.open(K.fromPortablePath(e),r,i,this.makeCallback(n,s))})}openSync(e,r,i){return this.realFs.openSync(K.fromPortablePath(e),r,i)}async opendirPromise(e,r){return await new Promise((i,n)=>{typeof r!="undefined"?this.realFs.opendir(K.fromPortablePath(e),r,this.makeCallback(i,n)):this.realFs.opendir(K.fromPortablePath(e),this.makeCallback(i,n))}).then(i=>Object.defineProperty(i,"path",{value:e,configurable:!0,writable:!0}))}opendirSync(e,r){let i=typeof r!="undefined"?this.realFs.opendirSync(K.fromPortablePath(e),r):this.realFs.opendirSync(K.fromPortablePath(e));return Object.defineProperty(i,"path",{value:e,configurable:!0,writable:!0})}async readPromise(e,r,i=0,n=0,s=-1){return await new Promise((o,a)=>{this.realFs.read(e,r,i,n,s,(l,c)=>{l?a(l):o(c)})})}readSync(e,r,i,n,s){return this.realFs.readSync(e,r,i,n,s)}async writePromise(e,r,i,n,s){return await new Promise((o,a)=>typeof r=="string"?this.realFs.write(e,r,i,this.makeCallback(o,a)):this.realFs.write(e,r,i,n,s,this.makeCallback(o,a)))}writeSync(e,r,i,n,s){return typeof r=="string"?this.realFs.writeSync(e,r,i):this.realFs.writeSync(e,r,i,n,s)}async closePromise(e){await new Promise((r,i)=>{this.realFs.close(e,this.makeCallback(r,i))})}closeSync(e){this.realFs.closeSync(e)}createReadStream(e,r){let i=e!==null?K.fromPortablePath(e):e;return this.realFs.createReadStream(i,r)}createWriteStream(e,r){let i=e!==null?K.fromPortablePath(e):e;return this.realFs.createWriteStream(i,r)}async realpathPromise(e){return await new Promise((r,i)=>{this.realFs.realpath(K.fromPortablePath(e),{},this.makeCallback(r,i))}).then(r=>K.toPortablePath(r))}realpathSync(e){return K.toPortablePath(this.realFs.realpathSync(K.fromPortablePath(e),{}))}async existsPromise(e){return await new Promise(r=>{this.realFs.exists(K.fromPortablePath(e),r)})}accessSync(e,r){return this.realFs.accessSync(K.fromPortablePath(e),r)}async accessPromise(e,r){return await new Promise((i,n)=>{this.realFs.access(K.fromPortablePath(e),r,this.makeCallback(i,n))})}existsSync(e){return this.realFs.existsSync(K.fromPortablePath(e))}async statPromise(e,r){return await new Promise((i,n)=>{r?this.realFs.stat(K.fromPortablePath(e),r,this.makeCallback(i,n)):this.realFs.stat(K.fromPortablePath(e),this.makeCallback(i,n))})}statSync(e,r){return r?this.realFs.statSync(K.fromPortablePath(e),r):this.realFs.statSync(K.fromPortablePath(e))}async fstatPromise(e,r){return await new Promise((i,n)=>{r?this.realFs.fstat(e,r,this.makeCallback(i,n)):this.realFs.fstat(e,this.makeCallback(i,n))})}fstatSync(e,r){return r?this.realFs.fstatSync(e,r):this.realFs.fstatSync(e)}async lstatPromise(e,r){return await new Promise((i,n)=>{r?this.realFs.lstat(K.fromPortablePath(e),r,this.makeCallback(i,n)):this.realFs.lstat(K.fromPortablePath(e),this.makeCallback(i,n))})}lstatSync(e,r){return r?this.realFs.lstatSync(K.fromPortablePath(e),r):this.realFs.lstatSync(K.fromPortablePath(e))}async chmodPromise(e,r){return await new Promise((i,n)=>{this.realFs.chmod(K.fromPortablePath(e),r,this.makeCallback(i,n))})}chmodSync(e,r){return this.realFs.chmodSync(K.fromPortablePath(e),r)}async chownPromise(e,r,i){return await new Promise((n,s)=>{this.realFs.chown(K.fromPortablePath(e),r,i,this.makeCallback(n,s))})}chownSync(e,r,i){return this.realFs.chownSync(K.fromPortablePath(e),r,i)}async renamePromise(e,r){return await new Promise((i,n)=>{this.realFs.rename(K.fromPortablePath(e),K.fromPortablePath(r),this.makeCallback(i,n))})}renameSync(e,r){return this.realFs.renameSync(K.fromPortablePath(e),K.fromPortablePath(r))}async copyFilePromise(e,r,i=0){retu
|
|||
|
|
|||
|
${I}`),{code:tQ(h,p),stdout:m,stderr:I}))})})}var yAe=new Map([["SIGINT",2],["SIGQUIT",3],["SIGKILL",9],["SIGTERM",15]]);function tQ(t,e){let r=yAe.get(e);return typeof r!="undefined"?128+r:t!=null?t:1}var rQ={};rt(rQ,{getDefaultGlobalFolder:()=>nQ,getHomeFolder:()=>Ng,isFolderInside:()=>sQ});var iQ=re(require("os"));function nQ(){if(process.platform==="win32"){let t=K.toPortablePath(process.env.LOCALAPPDATA||K.join((0,iQ.homedir)(),"AppData","Local"));return D.resolve(t,"Yarn/Berry")}if(process.env.XDG_DATA_HOME){let t=K.toPortablePath(process.env.XDG_DATA_HOME);return D.resolve(t,"yarn/berry")}return D.resolve(Ng(),".yarn/berry")}function Ng(){return K.toPortablePath((0,iQ.homedir)()||"/usr/local/share")}function sQ(t,e){let r=D.relative(e,t);return r&&!r.startsWith("..")&&!D.isAbsolute(r)}var ae={};rt(ae,{LogLevel:()=>Kn,Style:()=>wA,Type:()=>Re,addLogFilterSupport:()=>Df,applyColor:()=>Ji,applyHyperlink:()=>oc,applyStyle:()=>eI,json:()=>ac,mark:()=>mb,pretty:()=>We,prettyField:()=>bA,prettyList:()=>kb,supportsColor:()=>_m,supportsHyperlinks:()=>xb,tuple:()=>QA});var bf=re(pQ()),pH=re(Kg()),dH=re(qi()),CH=re(tK());var W;(function(ee){ee[ee.UNNAMED=0]="UNNAMED",ee[ee.EXCEPTION=1]="EXCEPTION",ee[ee.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",ee[ee.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",ee[ee.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",ee[ee.BUILD_DISABLED=5]="BUILD_DISABLED",ee[ee.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",ee[ee.MUST_BUILD=7]="MUST_BUILD",ee[ee.MUST_REBUILD=8]="MUST_REBUILD",ee[ee.BUILD_FAILED=9]="BUILD_FAILED",ee[ee.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",ee[ee.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",ee[ee.LINKER_NOT_FOUND=12]="LINKER_NOT_FOUND",ee[ee.FETCH_NOT_CACHED=13]="FETCH_NOT_CACHED",ee[ee.YARN_IMPORT_FAILED=14]="YARN_IMPORT_FAILED",ee[ee.REMOTE_INVALID=15]="REMOTE_INVALID",ee[ee.REMOTE_NOT_FOUND=16]="REMOTE_NOT_FOUND",ee[ee.RESOLUTION_PACK=17]="RESOLUTION_PACK",ee[ee.CACHE_CHECKSUM_MISMATCH=18]="CACHE_CHECKSUM_MISMATCH",ee[ee.UNUSED_CACHE_ENTRY=19]="UNUSED_CACHE_ENTRY",ee[ee.MISSING_LOCKFILE_ENTRY=20]="MISSING_LOCKFILE_ENTRY",ee[ee.WORKSPACE_NOT_FOUND=21]="WORKSPACE_NOT_FOUND",ee[ee.TOO_MANY_MATCHING_WORKSPACES=22]="TOO_MANY_MATCHING_WORKSPACES",ee[ee.CONSTRAINTS_MISSING_DEPENDENCY=23]="CONSTRAINTS_MISSING_DEPENDENCY",ee[ee.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY=24]="CONSTRAINTS_INCOMPATIBLE_DEPENDENCY",ee[ee.CONSTRAINTS_EXTRANEOUS_DEPENDENCY=25]="CONSTRAINTS_EXTRANEOUS_DEPENDENCY",ee[ee.CONSTRAINTS_INVALID_DEPENDENCY=26]="CONSTRAINTS_INVALID_DEPENDENCY",ee[ee.CANT_SUGGEST_RESOLUTIONS=27]="CANT_SUGGEST_RESOLUTIONS",ee[ee.FROZEN_LOCKFILE_EXCEPTION=28]="FROZEN_LOCKFILE_EXCEPTION",ee[ee.CROSS_DRIVE_VIRTUAL_LOCAL=29]="CROSS_DRIVE_VIRTUAL_LOCAL",ee[ee.FETCH_FAILED=30]="FETCH_FAILED",ee[ee.DANGEROUS_NODE_MODULES=31]="DANGEROUS_NODE_MODULES",ee[ee.NODE_GYP_INJECTED=32]="NODE_GYP_INJECTED",ee[ee.AUTHENTICATION_NOT_FOUND=33]="AUTHENTICATION_NOT_FOUND",ee[ee.INVALID_CONFIGURATION_KEY=34]="INVALID_CONFIGURATION_KEY",ee[ee.NETWORK_ERROR=35]="NETWORK_ERROR",ee[ee.LIFECYCLE_SCRIPT=36]="LIFECYCLE_SCRIPT",ee[ee.CONSTRAINTS_MISSING_FIELD=37]="CONSTRAINTS_MISSING_FIELD",ee[ee.CONSTRAINTS_INCOMPATIBLE_FIELD=38]="CONSTRAINTS_INCOMPATIBLE_FIELD",ee[ee.CONSTRAINTS_EXTRANEOUS_FIELD=39]="CONSTRAINTS_EXTRANEOUS_FIELD",ee[ee.CONSTRAINTS_INVALID_FIELD=40]="CONSTRAINTS_INVALID_FIELD",ee[ee.AUTHENTICATION_INVALID=41]="AUTHENTICATION_INVALID",ee[ee.PROLOG_UNKNOWN_ERROR=42]="PROLOG_UNKNOWN_ERROR",ee[ee.PROLOG_SYNTAX_ERROR=43]="PROLOG_SYNTAX_ERROR",ee[ee.PROLOG_EXISTENCE_ERROR=44]="PROLOG_EXISTENCE_ERROR",ee[ee.STACK_OVERFLOW_RESOLUTION=45]="STACK_OVERFLOW_RESOLUTION",ee[ee.AUTOMERGE_FAILED_TO_PARSE=46]="AUTOMERGE_FAILED_TO_PARSE",ee[ee.AUTOMERGE_IMMUTABLE=47]="AUTOMERGE_IMMUTABLE",ee[ee.AUTOMERGE_SUCCESS=48]="AUTOMERGE_SUCCESS",ee[ee.AUTOMERGE_REQUIRED=49]="AUTOMERGE_REQUIRED",ee[ee.DEPRECATED_CLI_SETTINGS=50]="DEPRECATED_CLI_SETTINGS",ee[ee.PLUGIN_NAME_NOT_FOUND=51]="PLUGIN_NAME_NOT_FOUND",ee[ee.INVALID_PLUGIN_REFERENCE=52]="INVALID_PLUGIN_REFERENCE",ee[ee.CONSTRAINTS_AMBIGUITY=53]="CONSTRAINTS_AMBIGUITY
|
|||
|
|
|||
|
${this.candidates.map(({usage:n})=>`$ ${n}`).join(`
|
|||
|
`)}`}else if(this.candidates.length===1){let[{usage:i}]=this.candidates;this.message=`Command not found; did you mean:
|
|||
|
|
|||
|
$ ${i}
|
|||
|
${LQ(e)}`}else this.message=`Command not found; did you mean one of:
|
|||
|
|
|||
|
${this.candidates.map(({usage:i},n)=>`${`${n}.`.padStart(4)} ${i}`).join(`
|
|||
|
`)}
|
|||
|
|
|||
|
${LQ(e)}`}},MQ=class extends Error{constructor(e,r){super();this.input=e,this.usages=r,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives:
|
|||
|
|
|||
|
${this.usages.map((i,n)=>`${`${n}.`.padStart(4)} ${i}`).join(`
|
|||
|
`)}
|
|||
|
|
|||
|
${LQ(e)}`}},LQ=t=>`While running ${t.filter(e=>e!==Ur).map(e=>{let r=JSON.stringify(e);return e.match(/\s/)||e.length===0||r!==`"${e}"`?r:e}).join(" ")}`;var Gg=Symbol("clipanion/isOption");function oi(t){return z(v({},t),{[Gg]:!0})}function ns(t,e){return typeof t=="undefined"?[t,e]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[void 0,t]:[t,e]}function ZC(t,e=!1){let r=t.replace(/^\.: /,"");return e&&(r=r[0].toLowerCase()+r.slice(1)),r}function Jg(t,e){return e.length===1?new Ie(`${t}: ${ZC(e[0],!0)}`):new Ie(`${t}:
|
|||
|
${e.map(r=>`
|
|||
|
- ${ZC(r)}`).join("")}`)}function Wg(t,e,r){if(typeof r=="undefined")return e;let i=[],n=[],s=a=>{let l=e;return e=a,s.bind(null,l)};if(!r(e,{errors:i,coercions:n,coercion:s}))throw Jg(`Invalid value for ${t}`,i);for(let[,a]of n)a();return e}var Ce=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let r=this.constructor.schema;if(typeof r!="undefined"){let{isDict:n,isUnknown:s,applyCascade:o}=await Promise.resolve().then(()=>(Nn(),Yl)),a=o(n(s()),r),l=[],c=[];if(!a(this,{errors:l,coercions:c}))throw Jg("Invalid option schema",l);for(let[,g]of c)g()}let i=await this.execute();return typeof i!="undefined"?i:0}};Ce.isOption=Gg;Ce.Default=[];function Di(t){NQ&&console.log(t)}var gK={candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:Hl};function fK(){return{nodes:[Ai(),Ai(),Ai()]}}function qce(t){let e=fK(),r=[],i=e.nodes.length;for(let n of t){r.push(i);for(let s=0;s<n.nodes.length;++s)hK(s)||e.nodes.push(jce(n.nodes[s],i));i+=n.nodes.length-2}for(let n of r)jl(e,sA,n);return e}function Ln(t,e){return t.nodes.push(e),t.nodes.length-1}function Gce(t){let e=new Set,r=i=>{if(e.has(i))return;e.add(i);let n=t.nodes[i];for(let o of Object.values(n.statics))for(let{to:a}of o)r(a);for(let[,{to:o}]of n.dynamics)r(o);for(let{to:o}of n.shortcuts)r(o);let s=new Set(n.shortcuts.map(({to:o})=>o));for(;n.shortcuts.length>0;){let{to:o}=n.shortcuts.shift(),a=t.nodes[o];for(let[l,c]of Object.entries(a.statics)){let u=Object.prototype.hasOwnProperty.call(n.statics,l)?n.statics[l]:n.statics[l]=[];for(let g of c)u.some(({to:f})=>g.to===f)||u.push(g)}for(let[l,c]of a.dynamics)n.dynamics.some(([u,{to:g}])=>l===u&&c.to===g)||n.dynamics.push([l,c]);for(let l of a.shortcuts)s.has(l.to)||(n.shortcuts.push(l),s.add(l.to))}};r(sA)}function Jce(t,{prefix:e=""}={}){if(NQ){Di(`${e}Nodes are:`);for(let r=0;r<t.nodes.length;++r)Di(`${e} ${r}: ${JSON.stringify(t.nodes[r])}`)}}function pK(t,e,r=!1){Di(`Running a vm on ${JSON.stringify(e)}`);let i=[{node:sA,state:{candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null}}];Jce(t,{prefix:" "});let n=[PQ,...e];for(let s=0;s<n.length;++s){let o=n[s];Di(` Processing ${JSON.stringify(o)}`);let a=[];for(let{node:l,state:c}of i){Di(` Current node is ${l}`);let u=t.nodes[l];if(l===si){a.push({node:l,state:c});continue}console.assert(u.shortcuts.length===0,"Shortcuts should have been eliminated by now");let g=Object.prototype.hasOwnProperty.call(u.statics,o);if(!r||s<n.length-1||g)if(g){let f=u.statics[o];for(let{to:h,reducer:p}of f)a.push({node:h,state:typeof p!="undefined"?$C(YQ,p,c,o):c}),Di(` Static transition to ${h} found`)}else Di(" No static transition found");else{let f=!1;for(let h of Object.keys(u.statics))if(!!h.startsWith(o)){if(o===h)for(let{to:p,reducer:m}of u.statics[h])a.push({node:p,state:typeof m!="undefined"?$C(YQ,m,c,o):c}),Di(` Static transition to ${p} found`);else for(let{to:p}of u.statics[h])a.push({node:p,state:z(v({},c),{remainder:h.slice(o.length)})}),Di(` Static transition to ${p} found (partial match)`);f=!0}f||Di(" No partial static transition found")}if(o!==Ur)for(let[f,{to:h,reducer:p}]of u.dynamics)$C(em,f,c,o)&&(a.push({node:h,state:typeof p!="undefined"?$C(YQ,p,c,o):c}),Di(` Dynamic transition to ${h} found (via ${f})`))}if(a.length===0&&o===Ur&&e.length===1)return[{node:sA,state:gK}];if(a.length===0)throw new qg(e,i.filter(({node:l})=>l!==si).map(({state:l})=>({usage:l.candidateUsage,reason:null})));if(a.every(({node:l})=>l===si))throw new qg(e,a.map(({state:l})=>({usage:l.candidateUsage,reason:l.errorMessage})));i=Wce(a)}if(i.length>0){Di(" Results:");for(let s of i)Di(` - ${s.node} -> ${JSON.stringify(s.state)}`)}else Di(" No results");return i}function zce(t,e){if(e.selectedIndex!==null)return!0;if(Object.prototype.hasOwnProperty.call(t.statics,Ur)){for(let{to:r}of t.statics[Ur])if(r===jg)return!0}return!1}functio
|
|||
|
`),r=e.filter(n=>n.match(/\S/)),i=r.length>0?r.reduce((n,s)=>Math.min(n,s.length-s.trimStart().length),Number.MAX_VALUE):0;return e.map(n=>n.slice(i).trimRight()).join(`
|
|||
|
`)}function ln(t,{format:e,paragraphs:r}){return t=t.replace(/\r\n?/g,`
|
|||
|
`),t=eue(t),t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2
|
|||
|
|
|||
|
`),t=t.replace(/\n(\n)?\n*/g,"$1"),r&&(t=t.split(/\n/).map(i=>{let n=i.match(/^\s*[*-][\t ]+(.*)/);if(!n)return i.match(/(.{1,80})(?: |$)/g).join(`
|
|||
|
`);let s=i.length-i.trimStart().length;return n[1].match(new RegExp(`(.{1,${78-s}})(?: |$)`,"g")).map((o,a)=>" ".repeat(s)+(a===0?"- ":" ")+o).join(`
|
|||
|
`)}).join(`
|
|||
|
|
|||
|
`)),t=t.replace(/(`+)((?:.|[\n])*?)\1/g,(i,n,s)=>e.code(n+s+n)),t=t.replace(/(\*\*)((?:.|[\n])*?)\1/g,(i,n,s)=>e.bold(n+s+n)),t?`${t}
|
|||
|
`:""}var Vg=class extends Ce{constructor(e){super();this.contexts=e,this.commands=[]}static from(e,r){let i=new Vg(r);i.path=e.path;for(let n of e.options)switch(n.name){case"-c":i.commands.push(Number(n.value));break;case"-i":i.index=Number(n.value);break}return i}async execute(){let e=this.commands;if(typeof this.index!="undefined"&&this.index>=0&&this.index<e.length&&(e=[e[this.index]]),e.length===0)this.context.stdout.write(this.cli.usage());else if(e.length===1)this.context.stdout.write(this.cli.usage(this.contexts[e[0]].commandClass,{detailed:!0}));else if(e.length>1){this.context.stdout.write(`Multiple commands match your selection:
|
|||
|
`),this.context.stdout.write(`
|
|||
|
`);let r=0;for(let i of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[i].commandClass,{prefix:`${r++}. `.padStart(5)}));this.context.stdout.write(`
|
|||
|
`),this.context.stdout.write(`Run again with -h=<index> to see the longer details of any of those commands.
|
|||
|
`)}}};var EK=Symbol("clipanion/errorCommand");function tue(){return process.env.FORCE_COLOR==="0"?!1:!!(process.env.FORCE_COLOR==="1"||typeof process.stdout!="undefined"&&process.stdout.isTTY)}var ss=class{constructor({binaryLabel:e,binaryName:r="...",binaryVersion:i,enableColors:n=tue()}={}){this.registrations=new Map,this.builder=new zg({binaryName:r}),this.binaryLabel=e,this.binaryName=r,this.binaryVersion=i,this.enableColors=n}static from(e,r={}){let i=new ss(r);for(let n of e)i.register(n);return i}register(e){var r;let i=new Map,n=new e;for(let l in n){let c=n[l];typeof c=="object"&&c!==null&&c[Ce.isOption]&&i.set(l,c)}let s=this.builder.command(),o=s.cliIndex,a=(r=e.paths)!==null&&r!==void 0?r:n.paths;if(typeof a!="undefined")for(let l of a)s.addPath(l);this.registrations.set(e,{specs:i,builder:s,index:o});for(let[l,{definition:c}]of i.entries())c(s,l);s.setContext({commandClass:e})}process(e){let{contexts:r,process:i}=this.builder.compile(),n=i(e);switch(n.selectedIndex){case Hl:return Vg.from(n,r);default:{let{commandClass:s}=r[n.selectedIndex],o=this.registrations.get(s);if(typeof o=="undefined")throw new Error("Assertion failed: Expected the command class to have been registered.");let a=new s;a.path=n.path;try{for(let[l,{transformer:c}]of o.specs.entries())a[l]=c(o.builder,l,n);return a}catch(l){throw l[EK]=a,l}}break}}async run(e,r){let i;if(!Array.isArray(e))i=e;else try{i=this.process(e)}catch(s){return r.stdout.write(this.error(s)),1}if(i.help)return r.stdout.write(this.usage(i,{detailed:!0})),0;i.context=r,i.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableColors:this.enableColors,definitions:()=>this.definitions(),error:(s,o)=>this.error(s,o),process:s=>this.process(s),run:(s,o)=>this.run(s,v(v({},r),o)),usage:(s,o)=>this.usage(s,o)};let n;try{n=await i.validateAndExecute().catch(s=>i.catch(s).then(()=>0))}catch(s){return r.stdout.write(this.error(s,{command:i})),1}return n}async runExit(e,r){process.exitCode=await this.run(e,r)}suggest(e,r){let{suggest:i}=this.builder.compile();return i(e,r)}definitions({colored:e=!1}={}){let r=[];for(let[i,{index:n}]of this.registrations){if(typeof i.usage=="undefined")continue;let{usage:s}=this.getUsageByIndex(n,{detailed:!1}),{usage:o,options:a}=this.getUsageByIndex(n,{detailed:!0,inlineOptions:!1}),l=typeof i.usage.category!="undefined"?ln(i.usage.category,{format:this.format(e),paragraphs:!1}):void 0,c=typeof i.usage.description!="undefined"?ln(i.usage.description,{format:this.format(e),paragraphs:!1}):void 0,u=typeof i.usage.details!="undefined"?ln(i.usage.details,{format:this.format(e),paragraphs:!0}):void 0,g=typeof i.usage.examples!="undefined"?i.usage.examples.map(([f,h])=>[ln(f,{format:this.format(e),paragraphs:!1}),h.replace(/\$0/g,this.binaryName)]):void 0;r.push({path:s,usage:o,category:l,description:c,details:u,examples:g,options:a})}return r}usage(e=null,{colored:r,detailed:i=!1,prefix:n="$ "}={}){var s;if(e===null){for(let l of this.registrations.keys()){let c=l.paths,u=typeof l.usage!="undefined";if(!c||c.length===0||c.length===1&&c[0].length===0||((s=c==null?void 0:c.some(h=>h.length===0))!==null&&s!==void 0?s:!1))if(e){e=null;break}else e=l;else if(u){e=null;continue}}e&&(i=!0)}let o=e!==null&&e instanceof Ce?e.constructor:e,a="";if(o)if(i){let{description:l="",details:c="",examples:u=[]}=o.usage||{};l!==""&&(a+=ln(l,{format:this.format(r),paragraphs:!1}).replace(/^./,h=>h.toUpperCase()),a+=`
|
|||
|
`),(c!==""||u.length>0)&&(a+=`${this.format(r).header("Usage")}
|
|||
|
`,a+=`
|
|||
|
`);let{usage:g,options:f}=this.getUsageByRegistration(o,{inlineOptions:!1});if(a+=`${this.format(r).bold(n)}${g}
|
|||
|
`,f.length>0){a+=`
|
|||
|
`,a+=`${GQ.header("Options")}
|
|||
|
`;let h=f.reduce((p,m)=>Math.max(p,m.definition.length),0);a+=`
|
|||
|
`;for(let{definition:p,description:m}of f)a+=` ${this.format(r).bold(p.padEnd(h))} ${ln(m,{format:this.format(r),paragraphs:!1})}`}if(c!==""&&(a+=`
|
|||
|
`,a+=`${this.format(r).header("Details")}
|
|||
|
`,a+=`
|
|||
|
`,a+=ln(c,{format:this.format(r),paragraphs:!0})),u.length>0){a+=`
|
|||
|
`,a+=`${this.format(r).header("Examples")}
|
|||
|
`;for(let[h,p]of u)a+=`
|
|||
|
`,a+=ln(h,{format:this.format(r),paragraphs:!1}),a+=`${p.replace(/^/m,` ${this.format(r).bold(n)}`).replace(/\$0/g,this.binaryName)}
|
|||
|
`}}else{let{usage:l}=this.getUsageByRegistration(o);a+=`${this.format(r).bold(n)}${l}
|
|||
|
`}else{let l=new Map;for(let[f,{index:h}]of this.registrations.entries()){if(typeof f.usage=="undefined")continue;let p=typeof f.usage.category!="undefined"?ln(f.usage.category,{format:this.format(r),paragraphs:!1}):null,m=l.get(p);typeof m=="undefined"&&l.set(p,m=[]);let{usage:I}=this.getUsageByIndex(h);m.push({commandClass:f,usage:I})}let c=Array.from(l.keys()).sort((f,h)=>f===null?-1:h===null?1:f.localeCompare(h,"en",{usage:"sort",caseFirst:"upper"})),u=typeof this.binaryLabel!="undefined",g=typeof this.binaryVersion!="undefined";u||g?(u&&g?a+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}
|
|||
|
|
|||
|
`:u?a+=`${this.format(r).header(`${this.binaryLabel}`)}
|
|||
|
`:a+=`${this.format(r).header(`${this.binaryVersion}`)}
|
|||
|
`,a+=` ${this.format(r).bold(n)}${this.binaryName} <command>
|
|||
|
`):a+=`${this.format(r).bold(n)}${this.binaryName} <command>
|
|||
|
`;for(let f of c){let h=l.get(f).slice().sort((m,I)=>m.usage.localeCompare(I.usage,"en",{usage:"sort",caseFirst:"upper"})),p=f!==null?f.trim():"General commands";a+=`
|
|||
|
`,a+=`${this.format(r).header(`${p}`)}
|
|||
|
`;for(let{commandClass:m,usage:I}of h){let w=m.usage.description||"undocumented";a+=`
|
|||
|
`,a+=` ${this.format(r).bold(I)}
|
|||
|
`,a+=` ${ln(w,{format:this.format(r),paragraphs:!1})}`}}a+=`
|
|||
|
`,a+=ln("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(r),paragraphs:!0})}return a}error(e,r){var i,{colored:n,command:s=(i=e[EK])!==null&&i!==void 0?i:null}=r===void 0?{}:r;e instanceof Error||(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let o="",a=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");a==="Error"&&(a="Internal Error"),o+=`${this.format(n).error(a)}: ${e.message}
|
|||
|
`;let l=e.clipanion;return typeof l!="undefined"?l.type==="usage"&&(o+=`
|
|||
|
`,o+=this.usage(s)):e.stack&&(o+=`${e.stack.replace(/^.*\n/,"")}
|
|||
|
`),o}getUsageByRegistration(e,r){let i=this.registrations.get(e);if(typeof i=="undefined")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(i.index,r)}getUsageByIndex(e,r){return this.builder.getBuilderByIndex(e).usage(r)}format(e=this.enableColors){return e?GQ:IK}};ss.defaultContext={stdin:process.stdin,stdout:process.stdout,stderr:process.stderr};var JQ={};rt(JQ,{DefinitionsCommand:()=>tm,HelpCommand:()=>rm,VersionCommand:()=>im});var tm=class extends Ce{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)}
|
|||
|
`)}};tm.paths=[["--clipanion=definitions"]];var rm=class extends Ce{async execute(){this.context.stdout.write(this.cli.usage())}};rm.paths=[["-h"],["--help"]];var im=class extends Ce{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:"<unknown>"}
|
|||
|
`)}};im.paths=[["-v"],["--version"]];var q={};rt(q,{Array:()=>yK,Boolean:()=>BK,Counter:()=>wK,Proxy:()=>QK,Rest:()=>bK,String:()=>DK,applyValidator:()=>Wg,cleanValidationError:()=>ZC,formatError:()=>Jg,isOptionSymbol:()=>Gg,makeCommandOption:()=>oi,rerouteArguments:()=>ns});function yK(t,e,r){let[i,n]=ns(e,r!=null?r:{}),{arity:s=1}=n,o=t.split(","),a=new Set(o);return oi({definition(l){l.addOption({names:o,arity:s,hidden:n==null?void 0:n.hidden,description:n==null?void 0:n.description,required:n.required})},transformer(l,c,u){let g=typeof i!="undefined"?[...i]:void 0;for(let{name:f,value:h}of u.options)!a.has(f)||(g=g!=null?g:[],g.push(h));return g}})}function BK(t,e,r){let[i,n]=ns(e,r!=null?r:{}),s=t.split(","),o=new Set(s);return oi({definition(a){a.addOption({names:s,allowBinding:!1,arity:0,hidden:n.hidden,description:n.description,required:n.required})},transformer(a,l,c){let u=i;for(let{name:g,value:f}of c.options)!o.has(g)||(u=f);return u}})}function wK(t,e,r){let[i,n]=ns(e,r!=null?r:{}),s=t.split(","),o=new Set(s);return oi({definition(a){a.addOption({names:s,allowBinding:!1,arity:0,hidden:n.hidden,description:n.description,required:n.required})},transformer(a,l,c){let u=i;for(let{name:g,value:f}of c.options)!o.has(g)||(u!=null||(u=0),f?u+=1:u=0);return u}})}function QK(t={}){return oi({definition(e,r){var i;e.addProxy({name:(i=t.name)!==null&&i!==void 0?i:r,required:t.required})},transformer(e,r,i){return i.positionals.map(({value:n})=>n)}})}function bK(t={}){return oi({definition(e,r){var i;e.addRest({name:(i=t.name)!==null&&i!==void 0?i:r,required:t.required})},transformer(e,r,i){let n=o=>{let a=i.positionals[o];return a.extra===Gi||a.extra===!1&&o<e.arity.leading.length},s=0;for(;s<i.positionals.length&&n(s);)s+=1;return i.positionals.splice(0,s).map(({value:o})=>o)}})}function rue(t,e,r){let[i,n]=ns(e,r!=null?r:{}),{arity:s=1}=n,o=t.split(","),a=new Set(o);return oi({definition(l){l.addOption({names:o,arity:n.tolerateBoolean?0:s,hidden:n.hidden,description:n.description,required:n.required})},transformer(l,c,u){let g,f=i;for(let{name:h,value:p}of u.options)!a.has(h)||(g=h,f=p);return typeof f=="string"?Wg(g!=null?g:c,f,n.validator):f}})}function iue(t={}){let{required:e=!0}=t;return oi({definition(r,i){var n;r.addPositional({name:(n=t.name)!==null&&n!==void 0?n:i,required:t.required})},transformer(r,i,n){var s;for(let o=0;o<n.positionals.length;++o){if(n.positionals[o].extra===Gi||e&&n.positionals[o].extra===!0||!e&&n.positionals[o].extra===!1)continue;let[a]=n.positionals.splice(o,1);return Wg((s=t.name)!==null&&s!==void 0?s:i,a.value,t.validator)}}})}function DK(t,...e){return typeof t=="string"?rue(t,...e):iue(t)}var B1=re(qi()),w1=re(hr()),s0=re(require("stream"));function gfe(t){return w1.default.valid(t)&&t.match(/^[^-]+(-rc\.[0-9]+)?$/)}function ffe(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function o0(t){}function a0(t){throw new Error(`Assertion failed: Unexpected object '${t}'`)}function hfe(t,e){let r=Object.values(t);if(!r.includes(e))throw new Ie(`Invalid value for enumeration: ${JSON.stringify(e)} (expected one of ${r.map(i=>JSON.stringify(i)).join(", ")})`);return e}function fA(t,e){let r=[];for(let i of t){let n=e(i);n!==Q1&&r.push(n)}return r}var Q1=Symbol();fA.skip=Q1;function D1(t,e){for(let r of t){let i=e(r);if(i!==b1)return i}}var b1=Symbol();D1.skip=b1;function A0(t){return typeof t=="object"&&t!==null}function Cm(t){if(t instanceof Map&&(t=Object.fromEntries(t)),A0(t))for(let e of Object.keys(t)){let r=t[e];A0(r)&&(t[e]=Cm(r))}return t}function Ws(t,e,r){let i=t.get(e);return typeof i=="undefined"&&t.set(e,i=r()),i}function Wl(t,e){let r=t.get(e);return typeof r=="undefined"&&t.set(e,r=[]),r}function hA(t,e){let r=t.get(e);return typeof r=="undefined"&&t.set(e,r=new Set),r}function zl(t,e){let r=t.get(e);return typeof r=="undefined"&&t.set(e,r=new Map),r}async function pfe(t,e){if(e==null)return await t();try{return await t()}finally{await e()}}async function Vl(t,e){try{return await t()}catch(r){throw r.message=e(r.message),r}}function l0(t,e){try{return t()}catch(r){throw r
|
|||
|
`),a!==-1){let l=n+o.substr(0,a);o=o.substr(a+1),n="",e!==null?this.reportInfo(null,`${e} ${l}`):this.reportInfo(null,l)}while(a!==-1);n+=o}),r.on("end",()=>{let s=i.end();s!==""&&(e!==null?this.reportInfo(null,`${e} ${s}`):this.reportInfo(null,s))}),r}};var nq=re(mI()),sq=new Map,oq=new Map,$Ie=new iq.Agent({keepAlive:!0}),eEe=new rq.Agent({keepAlive:!0});function aq(t){let e=new II.URL(t),r={host:e.hostname,headers:{}};return e.port&&(r.port=Number(e.port)),{proxy:r}}async function tEe(t){return Ws(oq,t,()=>M.readFilePromise(t).then(e=>(oq.set(t,e),e)))}function rEe({statusCode:t,statusMessage:e},r){let i=We(r,t,Re.NUMBER),n=`https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/${t}`;return oc(r,`${i}${e?` (${e})`:""}`,n)}async function EI(t,{configuration:e,customErrorMessage:r}){var i,n;try{return await t}catch(s){if(s.name!=="HTTPError")throw s;let o=(n=r==null?void 0:r(s))!=null?n:(i=s.response.body)==null?void 0:i.error;o==null&&(s.message.startsWith("Response code")?o="The remote server failed to provide the requested resource":o=s.message),s instanceof tq.TimeoutError&&s.event==="socket"&&(o+=`(can be increased via ${We(e,"httpTimeout",Re.SETTING)})`);let a=new $e(W.NETWORK_ERROR,o,l=>{s.response&&l.reportError(W.NETWORK_ERROR,` ${bA(e,{label:"Response Code",value:QA(Re.NO_HINT,rEe(s.response,e))})}`),s.request&&(l.reportError(W.NETWORK_ERROR,` ${bA(e,{label:"Request Method",value:QA(Re.NO_HINT,s.request.options.method)})}`),l.reportError(W.NETWORK_ERROR,` ${bA(e,{label:"Request URL",value:QA(Re.URL,s.request.requestUrl)})}`)),s.request.redirects.length>0&&l.reportError(W.NETWORK_ERROR,` ${bA(e,{label:"Request Redirects",value:QA(Re.NO_HINT,kb(e,s.request.redirects,Re.URL))})}`),s.request.retryCount===s.request.options.retry.limit&&l.reportError(W.NETWORK_ERROR,` ${bA(e,{label:"Request Retry Count",value:QA(Re.NO_HINT,`${We(e,s.request.retryCount,Re.NUMBER)} (can be increased via ${We(e,"httpRetry",Re.SETTING)})`)})}`)});throw a.originalError=s,a}}function Aq(t,e){let r=[...e.configuration.get("networkSettings")].sort(([o],[a])=>a.length-o.length),i={enableNetwork:void 0,caFilePath:void 0,httpProxy:void 0,httpsProxy:void 0},n=Object.keys(i),s=typeof t=="string"?new II.URL(t):t;for(let[o,a]of r)if(qD.default.isMatch(s.hostname,o))for(let l of n){let c=a.get(l);c!==null&&typeof i[l]=="undefined"&&(i[l]=c)}for(let o of n)typeof i[o]=="undefined"&&(i[o]=e.configuration.get(o));return i}var xA;(function(n){n.GET="GET",n.PUT="PUT",n.POST="POST",n.DELETE="DELETE"})(xA||(xA={}));async function Tf(t,e,{configuration:r,headers:i,jsonRequest:n,jsonResponse:s,method:o=xA.GET}){let a=typeof t=="string"?new II.URL(t):t,l=Aq(a,{configuration:r});if(l.enableNetwork===!1)throw new Error(`Request to '${a.href}' has been blocked because of your configuration settings`);if(a.protocol==="http:"&&!qD.default.isMatch(a.hostname,r.get("unsafeHttpWhitelist")))throw new Error(`Unsafe http requests must be explicitly whitelisted in your configuration (${a.hostname})`);let u={agent:{http:l.httpProxy?GD.default.httpOverHttp(aq(l.httpProxy)):$Ie,https:l.httpsProxy?GD.default.httpsOverHttp(aq(l.httpsProxy)):eEe},headers:i,method:o};u.responseType=s?"json":"buffer",e!==null&&(Buffer.isBuffer(e)||!n&&typeof e=="string"?u.body=e:u.json=e);let g=r.get("httpTimeout"),f=r.get("httpRetry"),h=r.get("enableStrictSsl"),p=l.caFilePath,{default:m}=await Promise.resolve().then(()=>re(mI())),I=p?await tEe(p):void 0,w=m.extend(v({timeout:{socket:g},retry:f,https:{rejectUnauthorized:h,certificateAuthority:I}},u));return r.getLimit("networkConcurrency")(()=>w(a))}async function iEe(t,n){var s=n,{configuration:e,jsonResponse:r}=s,i=Tr(s,["configuration","jsonResponse"]);let o=Ws(sq,t,()=>EI(Tf(t,null,v({configuration:e},i)),{configuration:e}).then(a=>(sq.set(t,a.body),a.body)));return Buffer.isBuffer(o)===!1&&(o=await o),r?JSON.parse(o.toString()):o}async function nEe(t,e,n){var s=n,{customErrorMessage:r}=s,i=Tr(s,["customErrorMessage"]);return(await EI(Tf(t,e,z(v({},i),{method:xA.PUT})),i)).body}async function JD(t,e,n){var s=n,{customErrorMessage:r
|
|||
|
`;if(typeof t=="number"||typeof t=="boolean")return`${t.toString()}
|
|||
|
`;if(typeof t=="string")return`${TJ(t)}
|
|||
|
`;if(Array.isArray(t)){if(t.length===0)return`[]
|
|||
|
`;let i=" ".repeat(e);return`
|
|||
|
${t.map(s=>`${i}- ${Px(s,e+1,!1)}`).join("")}`}if(typeof t=="object"&&t){let i,n;t instanceof vx?(i=t.data,n=!1):(i=t,n=!0);let s=" ".repeat(e),o=Object.keys(i);n&&o.sort((l,c)=>{let u=MJ.indexOf(l),g=MJ.indexOf(c);return u===-1&&g===-1?l<c?-1:l>c?1:0:u!==-1&&g===-1?-1:u===-1&&g!==-1?1:u-g});let a=o.filter(l=>!KJ(i[l])).map((l,c)=>{let u=i[l],g=TJ(l),f=Px(u,e+1,!0),h=c>0||r?s:"";return f.startsWith(`
|
|||
|
`)?`${h}${g}:${f}`:`${h}${g}: ${f}`}).join(e===0?`
|
|||
|
`:"")||`
|
|||
|
`;return r?`
|
|||
|
${a}`:`${a}`}throw new Error(`Unsupported value type (${t})`)}function ao(t){try{let e=Px(t,0,!1);return e!==`
|
|||
|
`?e:""}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}ao.PreserveOrdering=vx;function qwe(t){return t.endsWith(`
|
|||
|
`)||(t+=`
|
|||
|
`),(0,LJ.parse)(t)}var Gwe=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i;function Jwe(t){if(Gwe.test(t))return qwe(t);let e=(0,zI.safeLoad)(t,{schema:zI.FAILSAFE_SCHEMA,json:!0});if(e==null)return{};if(typeof e!="object")throw new Error(`Expected an indexed object, got a ${typeof e} instead. Does your file follow Yaml's rules?`);if(Array.isArray(e))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return e}function jr(t){return Jwe(t)}var XJ=re(pQ()),ZJ=re(require("os")),Wi=re(require("stream")),_J=re(require("util"));var Aa=class extends Error{constructor(e){super(e);this.name="ShellError"}};var VI={};rt(VI,{fastGlobOptions:()=>HJ,isBraceExpansion:()=>YJ,isGlobPattern:()=>Wwe,match:()=>zwe,micromatchOptions:()=>ZI});var OJ=re(Tm()),UJ=re(require("fs")),XI=re(qi()),ZI={strictBrackets:!0},HJ={onlyDirectories:!1,onlyFiles:!1};function Wwe(t){if(!XI.default.scan(t,ZI).isGlob)return!1;try{XI.default.parse(t,ZI)}catch{return!1}return!0}function zwe(t,{cwd:e,baseFs:r}){return(0,OJ.default)(t,z(v({},HJ),{cwd:K.fromPortablePath(e),fs:TC(UJ.default,new vg(r))}))}function YJ(t){return XI.default.scan(t,ZI).isBrace}var jJ=re(Zw()),gs=re(require("stream")),qJ=re(require("string_decoder")),Fi;(function(i){i[i.STDIN=0]="STDIN",i[i.STDOUT=1]="STDOUT",i[i.STDERR=2]="STDERR"})(Fi||(Fi={}));var UA=new Set;function Fx(){}function Rx(){for(let t of UA)t.kill()}function GJ(t,e,r,i){return n=>{let s=n[0]instanceof gs.Transform?"pipe":n[0],o=n[1]instanceof gs.Transform?"pipe":n[1],a=n[2]instanceof gs.Transform?"pipe":n[2],l=(0,jJ.default)(t,e,z(v({},i),{stdio:[s,o,a]}));return UA.add(l),UA.size===1&&(process.on("SIGINT",Fx),process.on("SIGTERM",Rx)),n[0]instanceof gs.Transform&&n[0].pipe(l.stdin),n[1]instanceof gs.Transform&&l.stdout.pipe(n[1],{end:!1}),n[2]instanceof gs.Transform&&l.stderr.pipe(n[2],{end:!1}),{stdin:l.stdin,promise:new Promise(c=>{l.on("error",u=>{switch(UA.delete(l),UA.size===0&&(process.off("SIGINT",Fx),process.off("SIGTERM",Rx)),u.code){case"ENOENT":n[2].write(`command not found: ${t}
|
|||
|
`),c(127);break;case"EACCES":n[2].write(`permission denied: ${t}
|
|||
|
`),c(128);break;default:n[2].write(`uncaught error: ${u.message}
|
|||
|
`),c(1);break}}),l.on("exit",u=>{UA.delete(l),UA.size===0&&(process.off("SIGINT",Fx),process.off("SIGTERM",Rx)),c(u!==null?u:129)})})}}}function JJ(t){return e=>{let r=e[0]==="pipe"?new gs.PassThrough:e[0];return{stdin:r,promise:Promise.resolve().then(()=>t({stdin:r,stdout:e[1],stderr:e[2]}))}}}var Un=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},WJ=class{constructor(){this.stream=null}close(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(e){this.stream=e}get(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");return this.stream}},Zf=class{constructor(e,r){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=e,this.implementation=r}static start(e,{stdin:r,stdout:i,stderr:n}){let s=new Zf(null,e);return s.stdin=r,s.stdout=i,s.stderr=n,s}pipeTo(e,r=1){let i=new Zf(this,e),n=new WJ;return i.pipe=n,i.stdout=this.stdout,i.stderr=this.stderr,(r&1)==1?this.stdout=n:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)==2?this.stderr=n:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),i}async exec(){let e=["ignore","ignore","ignore"];if(this.pipe)e[0]="pipe";else{if(this.stdin===null)throw new Error("Assertion failed: No input stream registered");e[0]=this.stdin.get()}let r;if(this.stdout===null)throw new Error("Assertion failed: No output stream registered");r=this.stdout,e[1]=r.get();let i;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");i=this.stderr,e[2]=i.get();let n=this.implementation(e);return this.pipe&&this.pipe.attach(n.stdin),await n.promise.then(s=>(r.close(),i.close(),s))}async run(){let e=[];for(let i=this;i;i=i.ancestor)e.push(i.exec());return(await Promise.all(e))[0]}};function _I(t,e){return Zf.start(t,e)}function zJ(t,e=null){let r=new gs.PassThrough,i=new qJ.StringDecoder,n="";return r.on("data",s=>{let o=i.write(s),a;do if(a=o.indexOf(`
|
|||
|
`),a!==-1){let l=n+o.substr(0,a);o=o.substr(a+1),n="",t(e!==null?`${e} ${l}`:l)}while(a!==-1);n+=o}),r.on("end",()=>{let s=i.end();s!==""&&t(e!==null?`${e} ${s}`:s)}),r}function VJ(t,{prefix:e}){return{stdout:zJ(r=>t.stdout.write(`${r}
|
|||
|
`),t.stdout.isTTY?e:null),stderr:zJ(r=>t.stderr.write(`${r}
|
|||
|
`),t.stderr.isTTY?e:null)}}var Vwe=(0,_J.promisify)(setTimeout);var _r;(function(r){r[r.Readable=1]="Readable",r[r.Writable=2]="Writable"})(_r||(_r={}));function $J(t,e,r){let i=new Wi.PassThrough({autoDestroy:!0});switch(t){case Fi.STDIN:(e&1)==1&&r.stdin.pipe(i,{end:!1}),(e&2)==2&&r.stdin instanceof Wi.Writable&&i.pipe(r.stdin,{end:!1});break;case Fi.STDOUT:(e&1)==1&&r.stdout.pipe(i,{end:!1}),(e&2)==2&&i.pipe(r.stdout,{end:!1});break;case Fi.STDERR:(e&1)==1&&r.stderr.pipe(i,{end:!1}),(e&2)==2&&i.pipe(r.stderr,{end:!1});break;default:throw new Aa(`Bad file descriptor: "${t}"`)}return i}function $I(t,e={}){let r=v(v({},t),e);return r.environment=v(v({},t.environment),e.environment),r.variables=v(v({},t.variables),e.variables),r}var Xwe=new Map([["cd",async([t=(0,ZJ.homedir)(),...e],r,i)=>{let n=D.resolve(i.cwd,K.toPortablePath(t));return(await r.baseFs.statPromise(n)).isDirectory()?(i.cwd=n,0):(i.stderr.write(`cd: not a directory
|
|||
|
`),1)}],["pwd",async(t,e,r)=>(r.stdout.write(`${K.fromPortablePath(r.cwd)}
|
|||
|
`),0)],[":",async(t,e,r)=>0],["true",async(t,e,r)=>0],["false",async(t,e,r)=>1],["exit",async([t,...e],r,i)=>i.exitCode=parseInt(t!=null?t:i.variables["?"],10)],["echo",async(t,e,r)=>(r.stdout.write(`${t.join(" ")}
|
|||
|
`),0)],["sleep",async([t],e,r)=>{if(typeof t=="undefined")return r.stderr.write(`sleep: missing operand
|
|||
|
`),1;let i=Number(t);return Number.isNaN(i)?(r.stderr.write(`sleep: invalid time interval '${t}'
|
|||
|
`),1):await Vwe(1e3*i,0)}],["__ysh_run_procedure",async(t,e,r)=>{let i=r.procedures[t[0]];return await _I(i,{stdin:new Un(r.stdin),stdout:new Un(r.stdout),stderr:new Un(r.stderr)}).run()}],["__ysh_set_redirects",async(t,e,r)=>{let i=r.stdin,n=r.stdout,s=r.stderr,o=[],a=[],l=[],c=0;for(;t[c]!=="--";){let g=t[c++],{type:f,fd:h}=JSON.parse(g),p=Q=>{switch(h){case null:case 0:o.push(Q);break;default:throw new Error(`Unsupported file descriptor: "${h}"`)}},m=Q=>{switch(h){case null:case 1:a.push(Q);break;case 2:l.push(Q);break;default:throw new Error(`Unsupported file descriptor: "${h}"`)}},I=Number(t[c++]),w=c+I;for(let Q=c;Q<w;++c,++Q)switch(f){case"<":p(()=>e.baseFs.createReadStream(D.resolve(r.cwd,K.toPortablePath(t[Q]))));break;case"<<<":p(()=>{let S=new Wi.PassThrough;return process.nextTick(()=>{S.write(`${t[Q]}
|
|||
|
`),S.end()}),S});break;case"<&":p(()=>$J(Number(t[Q]),1,r));break;case">":case">>":{let S=D.resolve(r.cwd,K.toPortablePath(t[Q]));m(S==="/dev/null"?new Wi.Writable({autoDestroy:!0,emitClose:!0,write(R,U,L){setImmediate(L)}}):e.baseFs.createWriteStream(S,f===">>"?{flags:"a"}:void 0))}break;case">&":m($J(Number(t[Q]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${f}"`)}}if(o.length>0){let g=new Wi.PassThrough;i=g;let f=h=>{if(h===o.length)g.end();else{let p=o[h]();p.pipe(g,{end:!1}),p.on("end",()=>{f(h+1)})}};f(0)}if(a.length>0){let g=new Wi.PassThrough;n=g;for(let f of a)g.pipe(f)}if(l.length>0){let g=new Wi.PassThrough;s=g;for(let f of l)g.pipe(f)}let u=await _I($f(t.slice(c+1),e,r),{stdin:new Un(i),stdout:new Un(n),stderr:new Un(s)}).run();return await Promise.all(a.map(g=>new Promise((f,h)=>{g.on("error",p=>{h(p)}),g.on("close",()=>{f()}),g.end()}))),await Promise.all(l.map(g=>new Promise((f,h)=>{g.on("error",p=>{h(p)}),g.on("close",()=>{f()}),g.end()}))),u}]]);async function Zwe(t,e,r){let i=[],n=new Wi.PassThrough;return n.on("data",s=>i.push(s)),await eE(t,e,$I(r,{stdout:n})),Buffer.concat(i).toString().replace(/[\r\n]+$/,"")}async function e3(t,e,r){let i=t.map(async s=>{let o=await HA(s.args,e,r);return{name:s.name,value:o.join(" ")}});return(await Promise.all(i)).reduce((s,o)=>(s[o.name]=o.value,s),{})}function tE(t){return t.match(/[^ \r\n\t]+/g)||[]}async function t3(t,e,r,i,n=i){switch(t.name){case"$":i(String(process.pid));break;case"#":i(String(e.args.length));break;case"@":if(t.quoted)for(let s of e.args)n(s);else for(let s of e.args){let o=tE(s);for(let a=0;a<o.length-1;++a)n(o[a]);i(o[o.length-1])}break;case"*":{let s=e.args.join(" ");if(t.quoted)i(s);else for(let o of tE(s))n(o)}break;case"PPID":i(String(process.ppid));break;case"RANDOM":i(String(Math.floor(Math.random()*32768)));break;default:{let s=parseInt(t.name,10),o;if(Number.isFinite(s))if(s>=0&&s<e.args.length)o=e.args[s];else if(t.defaultValue)o=(await HA(t.defaultValue,e,r)).join(" ");else throw new Aa(`Unbound argument #${s}`);else if(Object.prototype.hasOwnProperty.call(r.variables,t.name))o=r.variables[t.name];else if(Object.prototype.hasOwnProperty.call(r.environment,t.name))o=r.environment[t.name];else if(t.defaultValue)o=(await HA(t.defaultValue,e,r)).join(" ");else throw new Aa(`Unbound variable "${t.name}"`);if(t.quoted)i(o);else{let a=tE(o);for(let l=0;l<a.length-1;++l)n(a[l]);i(a[a.length-1])}}break}}var _we={addition:(t,e)=>t+e,subtraction:(t,e)=>t-e,multiplication:(t,e)=>t*e,division:(t,e)=>Math.trunc(t/e)};async function eh(t,e,r){if(t.type==="number"){if(Number.isInteger(t.value))return t.value;throw new Error(`Invalid number: "${t.value}", only integers are allowed`)}else if(t.type==="variable"){let i=[];await t3(z(v({},t),{quoted:!0}),e,r,s=>i.push(s));let n=Number(i.join(" "));return Number.isNaN(n)?eh({type:"variable",name:i.join(" ")},e,r):eh({type:"number",value:n},e,r)}else return _we[t.type](await eh(t.left,e,r),await eh(t.right,e,r))}async function HA(t,e,r){let i=new Map,n=[],s=[],o=u=>{s.push(u)},a=()=>{s.length>0&&n.push(s.join("")),s=[]},l=u=>{o(u),a()},c=(u,g,f)=>{let h=JSON.stringify({type:u,fd:g}),p=i.get(h);typeof p=="undefined"&&i.set(h,p=[]),p.push(f)};for(let u of t){let g=!1;switch(u.type){case"redirection":{let f=await HA(u.args,e,r);for(let h of f)c(u.subtype,u.fd,h)}break;case"argument":for(let f of u.segments)switch(f.type){case"text":o(f.text);break;case"glob":o(f.pattern),g=!0;break;case"shell":{let h=await Zwe(f.shell,e,r);if(f.quoted)o(h);else{let p=tE(h);for(let m=0;m<p.length-1;++m)l(p[m]);o(p[p.length-1])}}break;case"variable":await t3(f,e,r,o,l);break;case"arithmetic":o(String(await eh(f.arithmetic,e,r)));break}break}if(a(),g){let f=n.pop();if(typeof f=="undefined")throw new Error("Assertion failed: Expected a glob pattern to have been set");let h=await e.glob.match(f,{cwd:r.cwd,baseFs:e.baseFs});if(h.length===0){let p=YJ(f)?". Note: Brace expansion of arbitrary strings isn't currently supported. For more details, please read this issue: https://github.com/
|
|||
|
`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${l}, '${o(wc(t))}' has ended
|
|||
|
`)})),0}return await i3(t,e,r)}async function rQe(t,e,r,{background:i=!1}={}){let n,s=a=>{n=a,r.variables["?"]=String(a)},o=async a=>{try{return await tQe(a.chain,e,r,{background:i&&typeof a.then=="undefined"})}catch(l){if(!(l instanceof Aa))throw l;return r.stderr.write(`${l.message}
|
|||
|
`),1}};for(s(await o(t));t.then;){if(r.exitCode!==null)return r.exitCode;switch(t.then.type){case"&&":n===0&&s(await o(t.then.line));break;case"||":n!==0&&s(await o(t.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${t.then.type}"`)}t=t.then.line}return n}async function eE(t,e,r){let i=r.backgroundJobs;r.backgroundJobs=[];let n=0;for(let{command:s,type:o}of t){if(n=await rQe(s,e,r,{background:o==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(n)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=i,n}function n3(t){switch(t.type){case"variable":return t.name==="@"||t.name==="#"||t.name==="*"||Number.isFinite(parseInt(t.name,10))||"defaultValue"in t&&!!t.defaultValue&&t.defaultValue.some(e=>rE(e));case"arithmetic":return Nx(t.arithmetic);case"shell":return Lx(t.shell);default:return!1}}function rE(t){switch(t.type){case"redirection":return t.args.some(e=>rE(e));case"argument":return t.segments.some(e=>n3(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${t.type}"`)}}function Nx(t){switch(t.type){case"variable":return n3(t);case"number":return!1;default:return Nx(t.left)||Nx(t.right)}}function Lx(t){return t.some(({command:e})=>{for(;e;){let r=e.chain;for(;r;){let i;switch(r.type){case"subshell":i=Lx(r.subshell);break;case"command":i=r.envs.some(n=>n.args.some(s=>rE(s)))||r.args.some(n=>rE(n));break}if(i)return!0;if(!r.then)break;r=r.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function iE(t,e=[],{baseFs:r=new Nt,builtins:i={},cwd:n=K.toPortablePath(process.cwd()),env:s=process.env,stdin:o=process.stdin,stdout:a=process.stdout,stderr:l=process.stderr,variables:c={},glob:u=VI}={}){let g={};for(let[p,m]of Object.entries(s))typeof m!="undefined"&&(g[p]=m);let f=new Map(Xwe);for(let[p,m]of Object.entries(i))f.set(p,m);o===null&&(o=new Wi.PassThrough,o.end());let h=FI(t,u);if(!Lx(h)&&h.length>0&&e.length>0){let{command:p}=h[h.length-1];for(;p.then;)p=p.then.line;let m=p.chain;for(;m.then;)m=m.then.chain;m.type==="command"&&(m.args=m.args.concat(e.map(I=>({type:"argument",segments:[{type:"text",text:I}]}))))}return await eE(h,{args:e,baseFs:r,builtins:f,initialStdin:o,initialStdout:a,initialStderr:l,glob:u},{cwd:n,environment:g,exitCode:null,procedures:{},stdin:o,stdout:a,stderr:l,variables:Object.assign({},c,{["?"]:0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var fW=re(Hx()),hW=re(sE()),Nc=re(require("stream"));var rW=re(hr());var Ft={};rt(Ft,{SemVer:()=>$3.SemVer,satisfiesWithPrereleases:()=>rh,validRange:()=>Yn});var oE=re(hr()),$3=re(hr()),eW=new Map;function rh(t,e,r=!1){if(!t)return!1;let i=`${e}${r}`,n=eW.get(i);if(typeof n=="undefined")try{n=new oE.default.Range(e,{includePrerelease:!0,loose:r})}catch{return!1}finally{eW.set(i,n||null)}else if(n===null)return!1;let s;try{s=new oE.default.SemVer(t,n)}catch(o){return!1}return n.test(s)?!0:(s.prerelease&&(s.prerelease=[]),n.set.some(o=>{for(let a of o)a.semver.prerelease&&(a.semver.prerelease=[]);return o.every(a=>a.test(s))}))}var tW=new Map;function Yn(t){if(t.indexOf(":")!==-1)return null;let e=tW.get(t);if(typeof e!="undefined")return e;try{e=new oE.default.Range(t)}catch{e=null}return tW.set(t,e),e}var la=class{constructor(){this.indent=" ";this.name=null;this.version=null;this.os=null;this.cpu=null;this.type=null;this.packageManager=null;this.private=!1;this.license=null;this.main=null;this.module=null;this.browser=null;this.languageName=null;this.bin=new Map;this.scripts=new Map;this.dependencies=new Map;this.devDependencies=new Map;this.peerDependencies=new Map;this.workspaceDefinitions=[];this.dependenciesMeta=new Map;this.peerDependenciesMeta=new Map;this.resolutions=[];this.files=null;this.publishConfig=null;this.installConfig=null;this.preferUnplugged=null;this.raw={};this.errors=[]}static async tryFind(e,{baseFs:r=new Nt}={}){let i=D.join(e,"package.json");return await r.existsPromise(i)?await la.fromFile(i,{baseFs:r}):null}static async find(e,{baseFs:r}={}){let i=await la.tryFind(e,{baseFs:r});if(i===null)throw new Error("Manifest not found");return
|
|||
|
`,end:t=>`::endgroup::
|
|||
|
`}:process.env.TRAVIS?{start:t=>`travis_fold:start:${t}
|
|||
|
`,end:t=>`travis_fold:end:${t}
|
|||
|
`}:process.env.GITLAB_CI?{start:t=>`section_start:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}[collapsed=true]\r[0K${t}
|
|||
|
`,end:t=>`section_end:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}\r[0K`}:null,uW=new Date,D0e=["iTerm.app","Apple_Terminal"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,x0e=t=>t,lE=x0e({patrick:{date:[17,3],chars:["\u{1F340}","\u{1F331}"],size:40},simba:{date:[19,7],chars:["\u{1F981}","\u{1F334}"],size:40},jack:{date:[31,10],chars:["\u{1F383}","\u{1F987}"],size:40},hogsfather:{date:[31,12],chars:["\u{1F389}","\u{1F384}"],size:40},default:{chars:["=","-"],size:80}}),S0e=D0e&&Object.keys(lE).find(t=>{let e=lE[t];return!(e.date&&(e.date[0]!==uW.getDate()||e.date[1]!==uW.getMonth()+1))})||"default";function gW(t,{configuration:e,json:r}){if(!e.get("enableMessageNames"))return"";let n=VC(t===null?0:t);return!r&&t===null?We(e,n,"grey"):n}function jx(t,{configuration:e,json:r}){let i=gW(t,{configuration:e,json:r});if(!i||t===null||t===W.UNNAMED)return i;let n=W[t],s=`https://yarnpkg.com/advanced/error-codes#${i}---${n}`.toLowerCase();return oc(e,i,s)}var Fe=class extends fi{constructor({configuration:e,stdout:r,json:i=!1,includeFooter:n=!0,includeLogs:s=!i,includeInfos:o=s,includeWarnings:a=s,forgettableBufferSize:l=b0e,forgettableNames:c=new Set}){super();this.uncommitted=new Set;this.cacheHitCount=0;this.cacheMissCount=0;this.lastCacheMiss=null;this.warningCount=0;this.errorCount=0;this.startTime=Date.now();this.indent=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.forgettableLines=[];Df(this,{configuration:e}),this.configuration=e,this.forgettableBufferSize=l,this.forgettableNames=new Set([...c,...Q0e]),this.includeFooter=n,this.includeInfos=o,this.includeWarnings=a,this.json=i,this.stdout=r;let u=this.configuration.get("progressBarStyle")||S0e;if(!Object.prototype.hasOwnProperty.call(lE,u))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=lE[u];let g="\u27A4 YN0000: \u250C ".length,f=Math.max(0,Math.min(process.stdout.columns-g,80));this.progressMaxScaledSize=Math.floor(this.progressStyle.size*f/80)}static async start(e,r){let i=new this(e),n=process.emitWarning;process.emitWarning=(s,o)=>{if(typeof s!="string"){let l=s;s=l.message,o=o!=null?o:l.name}let a=typeof o!="undefined"?`${o}: ${s}`:s;i.reportWarning(W.UNNAMED,a)};try{await r(i)}catch(s){i.reportExceptionOnce(s)}finally{await i.finalize(),process.emitWarning=n}return i}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){this.cacheHitCount+=1}reportCacheMiss(e,r){this.lastCacheMiss=e,this.cacheMissCount+=1,typeof r!="undefined"&&!this.configuration.get("preferAggregateCacheInfo")&&this.reportInfo(W.FETCH_NOT_CACHED,r)}startTimerSync(e,r,i){let n=typeof r=="function"?{}:r,s=typeof r=="function"?r:i,o={committed:!1,action:()=>{this.reportInfo(null,`\u250C ${e}`),this.indent+=1,ca!==null&&!this.json&&this.includeInfos&&this.stdout.write(ca.start(e))}};n.skipIfEmpty?this.uncommitted.add(o):(o.action(),o.committed=!0);let a=Date.now();try{return s()}catch(l){throw this.reportExceptionOnce(l),l}finally{let l=Date.now();this.uncommitted.delete(o),o.committed&&(this.indent-=1,ca!==null&&!this.json&&this.includeInfos&&this.stdout.write(ca.end(e)),this.configuration.get("enableTimers")&&l-a>200?this.reportInfo(null,`\u2514 Completed in ${We(this.configuration,l-a,Re.DURATION)}`):this.reportInfo(null,"\u2514 Completed"))}}async startTimerPromise(e,r,i){let n=typeof r=="function"?{}:r,s=typeof r=="function"?r:i,o={committed:!1,action:()=>{this.reportInfo(null,`\u250C ${e}`),this.indent+=1,ca!==null&&!this.json&&this.includeInfos&&this.stdout.write(ca.start(e))}};n.skipIfEmpty?this.uncommitted.add(o):(o.action(),o.committed=!0);let a=Date.now();try{return await s()}catch(l){throw this.reportExceptionOnce(l),l}finally{let l=Date.now();this.uncommitted.delete(o),o.committed&&(this.indent-=1,ca!==null&&!this.json&&this.includeInfos&&this.stdout.write(ca.end(e)),this.configuration.get("enableTimers")&&l-a>200?this.reportInfo(null,`\u2514 Completed in ${We(this.configuration,l-a,Re.DURATION)}`):this.reportInfo(null,"\u2
|
|||
|
`),this.writeProgress()}writeLineWithForgettableReset(e,{truncate:r}={}){this.forgettableLines=[],this.writeLine(e,{truncate:r})}writeLines(e,{truncate:r}={}){this.clearProgress({delta:e.length});for(let i of e)this.stdout.write(`${this.truncate(i,{truncate:r})}
|
|||
|
`);this.writeProgress()}reportCacheChanges({cacheHitCount:e,cacheMissCount:r}){let i=this.cacheHitCount-e,n=this.cacheMissCount-r;if(i===0&&n===0)return;let s="";this.cacheHitCount>1?s+=`${this.cacheHitCount} packages were already cached`:this.cacheHitCount===1?s+=" - one package was already cached":s+="No packages were cached",this.cacheHitCount>0?this.cacheMissCount>1?s+=`, ${this.cacheMissCount} had to be fetched`:this.cacheMissCount===1&&(s+=`, one had to be fetched (${At(this.configuration,this.lastCacheMiss)})`):this.cacheMissCount>1?s+=` - ${this.cacheMissCount} packages had to be fetched`:this.cacheMissCount===1&&(s+=` - one package had to be fetched (${At(this.configuration,this.lastCacheMiss)})`),this.reportInfo(W.FETCH_NOT_CACHED,s)}commit(){let e=this.uncommitted;this.uncommitted=new Set;for(let r of e)r.committed=!0,r.action()}clearProgress({delta:e=0,clear:r=!1}){!this.configuration.get("enableProgressBars")||this.json||this.progress.size+e>0&&(this.stdout.write(`[${this.progress.size+e}A`),(e>0||r)&&this.stdout.write("[0J"))}writeProgress(){if(!this.configuration.get("enableProgressBars")||this.json||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let e=Date.now();e-this.progressTime>cW&&(this.progressFrame=(this.progressFrame+1)%lW.length,this.progressTime=e);let r=lW[this.progressFrame];for(let i of this.progress.values()){let n=this.progressStyle.chars[0].repeat(i.lastScaledSize),s=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-i.lastScaledSize),o=this.formatName(null),a=o?`${o}: `:"";this.stdout.write(`${We(this.configuration,"\u27A4","blueBright")} ${a}${r} ${n}${s}
|
|||
|
`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress()},cW)}refreshProgress(e=0){let r=!1;if(this.progress.size===0)r=!0;else for(let i of this.progress.values()){let n=Math.trunc(this.progressMaxScaledSize*i.definition.progress),s=i.lastScaledSize;if(i.lastScaledSize=n,n!==s){r=!0;break}}r&&(this.clearProgress({delta:e}),this.writeProgress())}truncate(e,{truncate:r}={}){return this.configuration.get("enableProgressBars")||(r=!1),typeof r=="undefined"&&(r=this.configuration.get("preferTruncatedLines")),r&&(e=(0,AW.default)(e,0,process.stdout.columns-1)),e}formatName(e){return gW(e,{configuration:this.configuration,json:this.json})}formatNameWithHyperlink(e){return jx(e,{configuration:this.configuration,json:this.json})}formatIndent(){return"\u2502 ".repeat(this.indent)}};var wr="3.1.0-rc.1";var hs;(function(n){n.Yarn1="Yarn Classic",n.Yarn2="Yarn",n.Npm="npm",n.Pnpm="pnpm"})(hs||(hs={}));async function Ao(t,e,r,i=[]){if(process.platform==="win32"){let n=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${i.map(s=>`"${s.replace('"','""')}"`).join(" ")} %*`;await M.writeFilePromise(D.format({dir:t,name:e,ext:".cmd"}),n)}await M.writeFilePromise(D.join(t,e),`#!/bin/sh
|
|||
|
exec "${r}" ${i.map(n=>`'${n.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@"
|
|||
|
`,{mode:493})}async function k0e(t){let e=null;try{e=await M.readFilePromise(D.join(t,Pt.lockfile),"utf8")}catch{}return e!==null?e.match(/^__metadata:$/m)?{packageManager:hs.Yarn2,reason:'"__metadata" key found in yarn.lock'}:{packageManager:hs.Yarn1,reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:M.existsSync(D.join(t,"package-lock.json"))?{packageManager:hs.Npm,reason:`found npm's "package-lock.json" lockfile`}:M.existsSync(D.join(t,"pnpm-lock.yaml"))?{packageManager:hs.Pnpm,reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function ih({project:t,locator:e,binFolder:r,lifecycleScript:i}){var l,c;let n={};for(let[u,g]of Object.entries(process.env))typeof g!="undefined"&&(n[u.toLowerCase()!=="path"?u:"PATH"]=g);let s=K.fromPortablePath(r);n.BERRY_BIN_FOLDER=K.fromPortablePath(s);let o=process.env.COREPACK_ROOT?K.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([Ao(r,"node",process.execPath),...wr!==null?[Ao(r,"run",process.execPath,[o,"run"]),Ao(r,"yarn",process.execPath,[o]),Ao(r,"yarnpkg",process.execPath,[o]),Ao(r,"node-gyp",process.execPath,[o,"run","--top-level","node-gyp"])]:[]]),t&&(n.INIT_CWD=K.fromPortablePath(t.configuration.startingCwd),n.PROJECT_CWD=K.fromPortablePath(t.cwd)),n.PATH=n.PATH?`${s}${K.delimiter}${n.PATH}`:`${s}`,n.npm_execpath=`${s}${K.sep}yarn`,n.npm_node_execpath=`${s}${K.sep}node`,e){if(!t)throw new Error("Assertion failed: Missing project");let u=t.tryWorkspaceByLocator(e),g=u?(l=u.manifest.version)!=null?l:"":(c=t.storedPackages.get(e.locatorHash).version)!=null?c:"";n.npm_package_name=Et(e),n.npm_package_version=g}let a=wr!==null?`yarn/${wr}`:`yarn/${Xl("@yarnpkg/core").version}-core`;return n.npm_config_user_agent=`${a} npm/? node/${process.versions.node} ${process.platform} ${process.arch}`,i&&(n.npm_lifecycle_event=i),t&&await t.configuration.triggerHook(u=>u.setupScriptEnvironment,t,n,async(u,g,f)=>await Ao(r,sr(u),g,f)),n}var v0e=2,P0e=(0,hW.default)(v0e);async function F0e(t,e,{configuration:r,report:i,workspace:n=null,locator:s=null}){await P0e(async()=>{await M.mktempPromise(async o=>{let a=D.join(o,"pack.log"),l=null,{stdout:c,stderr:u}=r.getSubprocessStreams(a,{prefix:K.fromPortablePath(t),report:i}),g=s&&ls(s)?Ef(s):s,f=g?fn(g):"an external project";c.write(`Packing ${f} from sources
|
|||
|
`);let h=await k0e(t),p;h!==null?(c.write(`Using ${h.packageManager} for bootstrap. Reason: ${h.reason}
|
|||
|
|
|||
|
`),p=h.packageManager):(c.write(`No package manager configuration detected; defaulting to Yarn
|
|||
|
|
|||
|
`),p=hs.Yarn2),await M.mktempPromise(async m=>{let I=await ih({binFolder:m}),Q=new Map([[hs.Yarn1,async()=>{let R=n!==null?["workspace",n]:[],U=await Ys("yarn",["set","version","classic","--only-if-needed"],{cwd:t,env:I,stdin:l,stdout:c,stderr:u,end:on.ErrorCode});if(U.code!==0)return U.code;await M.appendFilePromise(D.join(t,".npmignore"),`/.yarn
|
|||
|
`),c.write(`
|
|||
|
`);let L=await Ys("yarn",["install"],{cwd:t,env:I,stdin:l,stdout:c,stderr:u,end:on.ErrorCode});if(L.code!==0)return L.code;c.write(`
|
|||
|
`);let P=await Ys("yarn",[...R,"pack","--filename",K.fromPortablePath(e)],{cwd:t,env:I,stdin:l,stdout:c,stderr:u});return P.code!==0?P.code:0}],[hs.Yarn2,async()=>{let R=n!==null?["workspace",n]:[];I.YARN_ENABLE_INLINE_BUILDS="1";let U=D.join(t,Pt.lockfile);await M.existsPromise(U)||await M.writeFilePromise(U,"");let L=await Ys("yarn",[...R,"pack","--install-if-needed","--filename",K.fromPortablePath(e)],{cwd:t,env:I,stdin:l,stdout:c,stderr:u});return L.code!==0?L.code:0}],[hs.Npm,async()=>{if(n!==null)throw new Error(`Workspaces aren't supported by npm, which has been detected as the primary package manager for ${t}`);delete I.npm_config_user_agent;let R=await Ys("npm",["install"],{cwd:t,env:I,stdin:l,stdout:c,stderr:u,end:on.ErrorCode});if(R.code!==0)return R.code;let U=new Nc.PassThrough,L=uf(U);U.pipe(c);let P=await Ys("npm",["pack","--silent"],{cwd:t,env:I,stdin:l,stdout:U,stderr:u});if(P.code!==0)return P.code;let Y=(await L).toString().trim().replace(/^.*\n/s,""),$=D.resolve(t,K.toPortablePath(Y));return await M.renamePromise($,e),0}]]).get(p);if(typeof Q=="undefined")throw new Error("Assertion failed: Unsupported workflow");let S=await Q();if(!(S===0||typeof S=="undefined"))throw M.detachTemp(o),new $e(W.PACKAGE_PREPARATION_FAILED,`Packing the package failed (exit code ${S}, logs can be found here: ${a})`)})})})}async function R0e(t,e,{project:r}){let i=r.tryWorkspaceByLocator(t);if(i!==null)return qx(i,e);let n=r.storedPackages.get(t.locatorHash);if(!n)throw new Error(`Package for ${At(r.configuration,t)} not found in the project`);return await sn.openPromise(async s=>{let o=r.configuration,a=r.configuration.getLinkers(),l={project:r,report:new Fe({stdout:new Nc.PassThrough,configuration:o})},c=a.find(h=>h.supportsPackage(n,l));if(!c)throw new Error(`The package ${At(r.configuration,n)} isn't supported by any of the available linkers`);let u=await c.findPackageLocation(n,l),g=new bt(u,{baseFs:s});return(await ze.find(xe.dot,{baseFs:g})).scripts.has(e)},{libzip:await pi()})}async function cE(t,e,r,{cwd:i,project:n,stdin:s,stdout:o,stderr:a}){return await M.mktempPromise(async l=>{let{manifest:c,env:u,cwd:g}=await pW(t,{project:n,binFolder:l,cwd:i,lifecycleScript:e}),f=c.scripts.get(e);if(typeof f=="undefined")return 1;let h=async()=>await iE(f,r,{cwd:g,env:u,stdin:s,stdout:o,stderr:a});return await(await n.configuration.reduceHook(m=>m.wrapScriptExecution,h,n,t,e,{script:f,args:r,cwd:g,env:u,stdin:s,stdout:o,stderr:a}))()})}async function Gx(t,e,r,{cwd:i,project:n,stdin:s,stdout:o,stderr:a}){return await M.mktempPromise(async l=>{let{env:c,cwd:u}=await pW(t,{project:n,binFolder:l,cwd:i});return await iE(e,r,{cwd:u,env:c,stdin:s,stdout:o,stderr:a})})}async function N0e(t,{binFolder:e,cwd:r,lifecycleScript:i}){let n=await ih({project:t.project,locator:t.anchoredLocator,binFolder:e,lifecycleScript:i});return await Promise.all(Array.from(await dW(t),([s,[,o]])=>Ao(e,sr(s),process.execPath,[o]))),typeof r=="undefined"&&(r=D.dirname(await M.realpathPromise(D.join(t.cwd,"package.json")))),{manifest:t.manifest,binFolder:e,env:n,cwd:r}}async function pW(t,{project:e,binFolder:r,cwd:i,lifecycleScript:n}){let s=e.tryWorkspaceByLocator(t);if(s!==null)return N0e(s,{binFolder:r,cwd:i,lifecycleScript:n});let o=e.storedPackages.get(t.locatorHash);if(!o)throw new Error(`Package for ${At(e.configuration,t)} not found in the project`);return await sn.openPromise(async a=>{let l=e.configuration,c=e.configuration.getLinkers(),u={project:e,report:new Fe({stdout:new Nc.PassThrough,configuration:l})},g=c.find(I=>I.supportsPackage(o,u));if(!g)throw new Error(`The package ${At(e.configuration,o)} isn't supported by any of the available linkers`);let f=await ih({project:e,locator:t,binFolder:r,lifecycleScript:n});await Promise.all(Array.from(await uE(t,{project:e}),([I,[,w]])=>Ao(r,sr(I),process.execPath,[w])));let h=await g.findPackageLocation(o,u),p=new bt(h,{baseFs:a}),m=await ze.find(xe.dot,{baseFs:p});return typeof i=="undefined"&&(i=h),{manifest:m,binFolder:r,env:f,cwd:i}},{libzip:await pi()})}async function CW(t,e,r,{cwd:i,stdin:n,
|
|||
|
`,{stdout:c,stderr:u}=n.getSubprocessStreams(a,{report:i,prefix:At(n,t.anchoredLocator),header:l});i.reportInfo(W.LIFECYCLE_SCRIPT,`Calling the "${e}" lifecycle script`);let g=await CW(t,e,[],{cwd:r,stdin:s,stdout:c,stderr:u});if(c.end(),u.end(),g!==0)throw M.detachTemp(o),new $e(W.LIFECYCLE_SCRIPT,`${(0,fW.default)(e)} script failed (exit code ${We(n,g,Re.NUMBER)}, logs can be found here: ${We(n,a,Re.PATH)}); run ${We(n,`yarn ${e}`,Re.CODE)} to investigate`)})}async function L0e(t,e,r){qx(t,e)&&await mW(t,e,r)}async function uE(t,{project:e}){let r=e.configuration,i=new Map,n=e.storedPackages.get(t.locatorHash);if(!n)throw new Error(`Package for ${At(r,t)} not found in the project`);let s=new Nc.Writable,o=r.getLinkers(),a={project:e,report:new Fe({configuration:r,stdout:s})},l=new Set([t.locatorHash]);for(let u of n.dependencies.values()){let g=e.storedResolutions.get(u.descriptorHash);if(!g)throw new Error(`Assertion failed: The resolution (${Ht(r,u)}) should have been registered`);l.add(g)}let c=await Promise.all(Array.from(l,async u=>{let g=e.storedPackages.get(u);if(!g)throw new Error(`Assertion failed: The package (${u}) should have been registered`);if(g.bin.size===0)return fA.skip;let f=o.find(p=>p.supportsPackage(g,a));if(!f)return fA.skip;let h=null;try{h=await f.findPackageLocation(g,a)}catch(p){if(p.code==="LOCATOR_NOT_INSTALLED")return fA.skip;throw p}return{dependency:g,packageLocation:h}}));for(let u of c){if(u===fA.skip)continue;let{dependency:g,packageLocation:f}=u;for(let[h,p]of g.bin)i.set(h,[g,K.fromPortablePath(D.resolve(f,p))])}return i}async function dW(t){return await uE(t.anchoredLocator,{project:t.project})}async function IW(t,e,r,{cwd:i,project:n,stdin:s,stdout:o,stderr:a,nodeArgs:l=[],packageAccessibleBinaries:c}){c!=null||(c=await uE(t,{project:n}));let u=c.get(e);if(!u)throw new Error(`Binary not found (${e}) for ${At(n.configuration,t)}`);return await M.mktempPromise(async g=>{let[,f]=u,h=await ih({project:n,locator:t,binFolder:g});await Promise.all(Array.from(c,([m,[,I]])=>Ao(h.BERRY_BIN_FOLDER,sr(m),process.execPath,[I])));let p;try{p=await Ys(process.execPath,[...l,f,...r],{cwd:i,env:h,stdin:s,stdout:o,stderr:a})}finally{await M.removePromise(h.BERRY_BIN_FOLDER)}return p.code})}async function M0e(t,e,r,{cwd:i,stdin:n,stdout:s,stderr:o,packageAccessibleBinaries:a}){return await IW(t.anchoredLocator,e,r,{project:t.project,cwd:i,stdin:n,stdout:s,stderr:o,packageAccessibleBinaries:a})}var mr={};rt(mr,{convertToZip:()=>exe,extractArchiveTo:()=>rxe,makeArchiveFromDirectory:()=>$De,safeTime:()=>Xi});var w4=re(require("stream")),Q4=re(s4());var m4=re(require("os")),I4=re(C4()),E4=re(require("worker_threads")),lk=class{constructor(e){this.source=e;this.pool=[];this.queue=new I4.default({concurrency:Math.max(1,(0,m4.cpus)().length)});let r=setTimeout(()=>{if(!(this.queue.size!==0||this.queue.pending!==0)){for(let i of this.pool)i.terminate();this.pool=[]}},1e3).unref();this.queue.on("idle",()=>{r.refresh()})}run(e){return this.queue.add(()=>{var i;let r=(i=this.pool.pop())!=null?i:new E4.Worker(this.source,{eval:!0,execArgv:[...process.execArgv,"--unhandled-rejections=strict"]});return r.ref(),new Promise((n,s)=>{let o=a=>{a!==0&&s(new Error(`Worker exited with code ${a}`))};r.once("message",a=>{this.pool.push(r),r.unref(),r.off("error",s),r.off("exit",o),n(a)}),r.once("error",s),r.once("exit",o),r.postMessage(e)})})}};var b4=re(B4()),Xi=456789e3;async function $De(t,{baseFs:e=new Nt,prefixPath:r=xe.root,compressionLevel:i,inMemory:n=!1}={}){let s=await pi(),o;if(n)o=new Sr(null,{libzip:s,level:i});else{let l=await M.mktempPromise(),c=D.join(l,"archive.zip");o=new Sr(c,{create:!0,libzip:s,level:i})}let a=D.resolve(xe.root,r);return await o.copyPromise(a,t,{baseFs:e,stableTime:!0,stableSort:!0}),o}var D4;async function exe(t,e){let r=await M.mktempPromise(),i=D.join(r,"archive.zip");return D4||(D4=new lk((0,b4.getContent)())),await D4.run({tmpFile:i,tgz:t,opts:e}),new Sr(i,{libzip:await pi(),level:e.compressionLevel})}async function*txe(t){let e=new Q4.default.Parse,r=new w4.PassThrough({objectMo
|
|||
|
`);return}let s=(0,k4.asTree)(v4(t,{configuration:e}),!1,!1);if(n>=1&&(s=s.replace(/^([├└]─)/gm,`\u2502
|
|||
|
$1`).replace(/^│\n/,"")),n>=2)for(let a=0;a<2;++a)s=s.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3 \u2502
|
|||
|
$2`).replace(/^│\n/,"");if(n>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(s)}var gk=re(require("fs"));var nxe=8,mt=class{constructor(e,{configuration:r,immutable:i=r.get("enableImmutableCache"),check:n=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.configuration=r,this.cwd=e,this.immutable=i,this.check=n;let s=r.get("cacheKeyOverride");if(s!==null)this.cacheKey=`${s}`;else{let o=r.get("compressionLevel"),a=o!==$a?`c${o}`:"";this.cacheKey=[nxe,a].join("")}}static async find(e,{immutable:r,check:i}={}){let n=new mt(e.get("cacheFolder"),{configuration:e,immutable:r,check:i});return await n.setup(),n}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;let e=`${this.configuration.get("globalFolder")}/cache`;return e!==this.cwd?e:null}getVersionFilename(e){return`${nc(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let n=sxe(r).slice(0,10);return`${nc(e)}-${n}.zip`}getLocatorPath(e,r){return this.mirrorCwd===null?D.resolve(this.cwd,this.getVersionFilename(e)):r===null||fk(r)!==this.cacheKey?null:D.resolve(this.cwd,this.getChecksumFilename(e,r))}getLocatorMirrorPath(e){let r=this.mirrorCwd;return r!==null?D.resolve(r,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache"))if(this.immutable){if(!await M.existsPromise(this.cwd))throw new $e(W.IMMUTABLE_CACHE,"Cache path does not exist.")}else{await M.mkdirPromise(this.cwd,{recursive:!0});let e=D.resolve(this.cwd,".gitignore");await M.changeFilePromise(e,`/.gitignore
|
|||
|
*.flock
|
|||
|
`)}(this.mirrorCwd||!this.immutable)&&await M.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(e,r,{onHit:i,onMiss:n,loader:s,skipIntegrityCheck:o}){let a=this.getLocatorMirrorPath(e),l=new Nt,c=async(U,L=null)=>{let P=!o||!r?`${this.cacheKey}/${await qm(U)}`:r;if(L!==null){let Y=!o||!r?`${this.cacheKey}/${await qm(L)}`:r;if(P!==Y)throw new $e(W.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}if(r!==null&&P!==r){let Y;switch(this.check?Y="throw":fk(r)!==fk(P)?Y="update":Y=this.configuration.get("checksumBehavior"),Y){case"ignore":return r;case"update":return P;default:case"throw":throw new $e(W.CACHE_CHECKSUM_MISMATCH,"The remote archive doesn't match the expected checksum")}}return P},u=async U=>{if(!s)throw new Error(`Cache check required but no loader configured for ${At(this.configuration,e)}`);let L=await s(),P=L.getRealPath();return L.saveAndClose(),await M.chmodPromise(P,420),await c(U,P)},g=async()=>{if(a===null||!await M.existsPromise(a)){let P=await s(),Y=P.getRealPath();return P.saveAndClose(),{source:"loader",path:Y}}let U=await M.mktempPromise(),L=D.join(U,this.getVersionFilename(e));return await M.copyFilePromise(a,L,gk.default.constants.COPYFILE_FICLONE),{source:"mirror",path:L}},f=async()=>{if(!s)throw new Error(`Cache entry required but missing for ${At(this.configuration,e)}`);if(this.immutable)throw new $e(W.IMMUTABLE_CACHE,`Cache entry required but missing for ${At(this.configuration,e)}`);let{path:U,source:L}=await g();await M.chmodPromise(U,420);let P=await c(U),Y=this.getLocatorPath(e,P);if(!Y)throw new Error("Assertion failed: Expected the cache path to be available");let $=null;if(L!=="mirror"&&a!==null){let H=await M.mktempPromise();$=D.join(H,this.getVersionFilename(e)),await M.copyFilePromise(U,$,gk.default.constants.COPYFILE_FICLONE)}return await this.writeFileWithLock(Y,async()=>await this.writeFileWithLock(L==="mirror"?null:a,async()=>(await M.movePromise(U,Y),$&&a&&await M.movePromise($,a),[Y,P])))},h=async()=>{let L=(async()=>{let P=this.getLocatorPath(e,r),Y=P!==null?await l.existsPromise(P):!1,$=Y?i:n;if($&&$(),Y){let H=null,A=P;return this.check?H=await u(A):H=await c(A),[A,H]}else return f()})();this.mutexes.set(e.locatorHash,L);try{return await L}finally{this.mutexes.delete(e.locatorHash)}};for(let U;U=this.mutexes.get(e.locatorHash);)await U;let[p,m]=await h();this.markedFiles.add(p);let I=null,w=await pi(),Q=new kg(()=>l0(()=>I=new Sr(p,{baseFs:l,libzip:w,readOnly:!0}),U=>`Failed to open the cache entry for ${At(this.configuration,e)}: ${U}`),D);return[new eA(p,{baseFs:Q,pathUtils:D}),()=>{I!==null&&I.discardAndClose()},m]}async writeFileWithLock(e,r){return e===null?await r():await M.lockPromise(e,async()=>await r())}};function fk(t){let e=t.indexOf("/");return e!==-1?t.slice(0,e):null}function sxe(t){let e=t.indexOf("/");return e!==-1?t.slice(e+1):t}var O4=re(N4()),ny=re(Kg());var U4=re(sE()),mk=re(require("stream"));var L4={hooks:{reduceDependency:(t,e,r,i,{resolver:n,resolveOptions:s})=>{for(let{pattern:o,reference:a}of e.topLevelWorkspace.manifest.resolutions){if(o.from&&o.from.fullName!==Et(r)||o.from&&o.from.description&&o.from.description!==r.reference||o.descriptor.fullName!==Et(t)||o.descriptor.description&&o.descriptor.description!==t.range)continue;return n.bindDescriptor(Xt(t,a),e.topLevelWorkspace.anchoredLocator,s)}return t},validateProject:async(t,e)=>{for(let r of t.workspaces){let i=Qf(t.configuration,r);await t.configuration.triggerHook(n=>n.validateWorkspace,r,{reportWarning:(n,s)=>e.reportWarning(n,`${i}: ${s}`),reportError:(n,s)=>e.reportError(n,`${i}: ${s}`)})}},validateWorkspace:async(t,e)=>{let{manifest:r}=t;r.resolutions.length&&t.cwd!==t.project.cwd&&r.errors.push(new Error("Resolutions field will be ignored"));for(let i of r.errors)e.reportWarning(W.INVALID_MANIFEST,i.message)}}};var pk=class{constructor(e){this.fetchers=e}supports(e,r){return!!this.tryFetcher(e,r)}getLocalPath(e,r){return this.getFetcher(e,r).getLocalPath(e,r)}async fetch(e,r){return a
|
|||
|
`);return{stdout:s,stderr:o}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let i of r.resolvers||[])e.push(new i);return new eu([new iy,new Ei,new dk,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let i of r.fetchers||[])e.push(new i);return new pk([new wh,new Ck,...e])}getLinkers(){let e=[];for(let r of this.plugins.values())for(let i of r.linkers||[])e.push(new i);return e}async refreshPackageExtensions(){this.packageExtensions=new Map;let e=this.packageExtensions,r=(i,n,{userProvided:s=!1}={})=>{if(!Yn(i.range))throw new Error("Only semver ranges are allowed as keys for the lockfileExtensions setting");let o=new ze;o.load(n,{yamlCompatibilityMode:!0});let a=Wl(e,i.identHash),l=[];a.push([i.range,l]);let c={status:zr.Inactive,userProvided:s,parentDescriptor:i};for(let u of o.dependencies.values())l.push(z(v({},c),{type:vr.Dependency,descriptor:u}));for(let u of o.peerDependencies.values())l.push(z(v({},c),{type:vr.PeerDependency,descriptor:u}));for(let[u,g]of o.peerDependenciesMeta)for(let[f,h]of Object.entries(g))l.push(z(v({},c),{type:vr.PeerDependencyMeta,selector:u,key:f,value:h}))};await this.triggerHook(i=>i.registerPackageExtensions,this,r);for(let[i,n]of this.get("packageExtensions"))r(Zo(i,!0),Cm(n),{userProvided:!0})}normalizePackage(e){let r=mf(e);if(this.packageExtensions==null)throw new Error("refreshPackageExtensions has to be called before normalizing packages");let i=this.packageExtensions.get(e.identHash);if(typeof i!="undefined"){let s=e.version;if(s!==null){for(let[o,a]of i)if(!!rh(s,o))for(let l of a)switch(l.status===zr.Inactive&&(l.status=zr.Redundant),l.type){case vr.Dependency:typeof r.dependencies.get(l.descriptor.identHash)=="undefined"&&(l.status=zr.Active,r.dependencies.set(l.descriptor.identHash,l.descriptor));break;case vr.PeerDependency:typeof r.peerDependencies.get(l.descriptor.identHash)=="undefined"&&(l.status=zr.Active,r.peerDependencies.set(l.descriptor.identHash,l.descriptor));break;case vr.PeerDependencyMeta:{let c=r.peerDependenciesMeta.get(l.selector);(typeof c=="undefined"||!Object.prototype.hasOwnProperty.call(c,l.key)||c[l.key]!==l.value)&&(l.status=zr.Active,Ws(r.peerDependenciesMeta,l.selector,()=>({}))[l.key]=l.value)}break;default:a0(l);break}}}let n=s=>s.scope?`${s.scope}__${s.name}`:`${s.name}`;for(let s of r.peerDependencies.values()){if(s.scope==="types")continue;let o=n(s),a=Vo("types",o),l=Et(a);r.peerDependencies.has(a.identHash)||r.peerDependenciesMeta.has(l)||r.peerDependenciesMeta.set(l,{optional:!0})}for(let s of r.peerDependenciesMeta.keys()){let o=ki(s);r.peerDependencies.has(o.identHash)||r.peerDependencies.set(o.identHash,Xt(o,"*"))}return r.dependencies=new Map(xi(r.dependencies,([,s])=>vi(s))),r.peerDependencies=new Map(xi(r.peerDependencies,([,s])=>vi(s))),r}getLimit(e){return Ws(this.limits,e,()=>(0,U4.default)(this.get(e)))}async triggerHook(e,...r){for(let i of this.plugins.values()){let n=i.hooks;if(!n)continue;let s=e(n);!s||await s(...r)}}async triggerMultipleHooks(e,r){for(let i of r)await this.triggerHook(e,...i)}async reduceHook(e,r,...i){let n=r;for(let s of this.plugins.values()){let o=s.hooks;if(!o)continue;let a=e(o);!a||(n=await a(n,...i))}return n}async firstHook(e,...r){for(let i of this.plugins.values()){let n=i.hooks;if(!n)continue;let s=e(n);if(!s)continue;let o=await s(...r);if(typeof o!="undefined")return o}return null}},le=po;le.telemetry=null;var Zi;(function(r){r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE"})(Zi||(Zi={}));var Co=class extends fi{constructor({configuration:e,stdout:r,suggestInstall:i=!0}){super();this.errorCount=0;Df(this,{configuration:e}),this.configuration=e,this.stdout=r,this.suggestInstall=i}static async start(e,r){let i=new this(e);try{await r(i)}catch(n){i.reportExceptionOnce(n)}finally{await i.finalize()}return i}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(e){}reportCacheMiss(e){}startTimerSync(e,r,i){return(typeof r=="function"?r:i)()}async startTimerPromise(e,r,i){return await(typeof r=="function"?r:i)()}async start
|
|||
|
`)}reportProgress(e){let r=Promise.resolve().then(async()=>{for await(let{}of e);}),i=()=>{};return z(v({},r),{stop:i})}reportJson(e){}async finalize(){this.errorCount>0&&(this.stdout.write(`
|
|||
|
`),this.stdout.write(`${We(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command.
|
|||
|
`),this.suggestInstall&&this.stdout.write(`${We(this.configuration,"\u27A4","redBright")} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.
|
|||
|
`))}formatNameWithHyperlink(e){return jx(e,{configuration:this.configuration,json:!1})}};var Dy=re(require("crypto")),F9=re(w5()),xy=re(v9()),R9=re(sE()),N9=re(hr()),Zk=re(require("util")),_k=re(require("v8")),$k=re(require("zlib"));var zPe=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(t,e,r,i)=>`${r}#commit=${i}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(t,e,r="",i,n)=>`https://${r}github.com/${i}.git#commit=${n}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(t,e,r="",i,n)=>`https://${r}github.com/${i}.git#commit=${n}`],[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@.+(?:\/|(?:%2f)))?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/,t=>`npm:${t}`],[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)(?:#|$)/,t=>`npm:${t}`],[/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/,t=>`npm:${t}`],[/^https?:\/\/(?:[^\\.]+)\.jfrog\.io\/.*\/(@[^/]+)\/([^/]+)\/-\/\1\/\2-(?:[.\d\w-]+)\.tgz(?:#|$)/,(t,e)=>Xm({protocol:"npm:",source:null,selector:t,params:{__archiveUrl:e}})],[/^[^/]+\.tgz#[0-9a-f]+$/,t=>`npm:${t}`]],Vk=class{constructor(){this.resolutions=null}async setup(e,{report:r}){let i=D.join(e.cwd,e.configuration.get("lockfileFilename"));if(!M.existsSync(i))return;let n=await M.readFilePromise(i,"utf8"),s=jr(n);if(Object.prototype.hasOwnProperty.call(s,"__metadata"))return;let o=this.resolutions=new Map;for(let a of Object.keys(s)){let l=Bf(a);if(!l){r.reportWarning(W.YARN_IMPORT_FAILED,`Failed to parse the string "${a}" into a proper descriptor`);continue}Yn(l.range)&&(l=Xt(l,`npm:${l.range}`));let{version:c,resolved:u}=s[a];if(!u)continue;let g;for(let[h,p]of zPe){let m=u.match(h);if(m){g=p(c,...m);break}}if(!g){r.reportWarning(W.YARN_IMPORT_FAILED,`${Ht(e.configuration,l)}: Only some patterns can be imported from legacy lockfiles (not "${u}")`);continue}let f=l;try{let h=ic(l.range),p=Bf(h.selector,!0);p&&(f=p)}catch{}o.set(l.descriptorHash,ui(f,g))}}supportsDescriptor(e,r){return this.resolutions?this.resolutions.has(e.descriptorHash):!1}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}bindDescriptor(e,r,i){return e}getResolutionDependencies(e,r){return[]}async getCandidates(e,r,i){if(!this.resolutions)throw new Error("Assertion failed: The resolution store should have been setup");let n=this.resolutions.get(e.descriptorHash);if(!n)throw new Error("Assertion failed: The resolution should have been registered");return[n]}async getSatisfying(e,r,i){return null}async resolve(e,r){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}};var by=class{supportsDescriptor(e,r){return!!(r.project.storedResolutions.get(e.descriptorHash)||r.project.originalPackages.has(zm(e).locatorHash))}supportsLocator(e,r){return!!r.project.originalPackages.has(e.locatorHash)}shouldPersistResolution(e,r){throw new Error("The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes")}bindDescriptor(e,r,i){return e}getResolutionDependencies(e,r){return[]}async getCandidates(e,r,i){let n=i.project.originalPackages.get(zm(e).locatorHash);if(n)return[n];let s=i.project.storedResolutions.get(e.descriptorHash);if(!s)throw new Error("Expected the resolution to have been successful - resolution not found");if(n=i.project.originalPackages.get(s),!n)throw new Error("Expected the resolution to have been successful - package not found");return[n]}async getSatisfying(e,r,i){return null}async resolve(e,r){let i=r.project.originalPackages.get(e.locatorHash);if(!i)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return i}};var Xk=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return this.resolver.supportsDescriptor(e,r)}supportsLocator(e,r){return this.resolver.supportsLocator(e,r)}shouldPersistResolution(e,r){return this.res
|
|||
|
`;await M.changeFilePromise(r,i,{automaticNewlines:!0}),this.manifest.raw=e}};var ev=4,VPe=1,XPe=/ *, */g,L9=/\/$/,ZPe=32,_Pe=(0,Zk.promisify)($k.default.gzip),$Pe=(0,Zk.promisify)($k.default.gunzip),Rr;(function(r){r.UpdateLockfile="update-lockfile",r.SkipBuild="skip-build"})(Rr||(Rr={}));var tv={restoreInstallersCustomData:["installersCustomData"],restoreResolutions:["accessibleLocators","optionalBuilds","storedDescriptors","storedResolutions","storedPackages","lockFileChecksum"],restoreBuildState:["storedBuildState"]},Ne=class{constructor(e,{configuration:r}){this.resolutionAliases=new Map;this.workspaces=[];this.workspacesByCwd=new Map;this.workspacesByIdent=new Map;this.storedResolutions=new Map;this.storedDescriptors=new Map;this.storedPackages=new Map;this.storedChecksums=new Map;this.storedBuildState=new Map;this.accessibleLocators=new Set;this.originalPackages=new Map;this.optionalBuilds=new Set;this.peerRequirements=new Map;this.installersCustomData=new Map;this.lockFileChecksum=null;this.installStateChecksum=null;this.configuration=r,this.cwd=e}static async find(e,r){var c,u,g;if(!e.projectCwd)throw new Ie(`No project found in ${r}`);let i=e.projectCwd,n=r,s=null;for(;s!==e.projectCwd;){if(s=n,M.existsSync(D.join(s,Pt.manifest))){i=s;break}n=D.dirname(s)}let o=new Ne(e.projectCwd,{configuration:e});(c=le.telemetry)==null||c.reportProject(o.cwd),await o.setupResolutions(),await o.setupWorkspaces(),(u=le.telemetry)==null||u.reportWorkspaceCount(o.workspaces.length),(g=le.telemetry)==null||g.reportDependencyCount(o.workspaces.reduce((f,h)=>f+h.manifest.dependencies.size+h.manifest.devDependencies.size,0));let a=o.tryWorkspaceByCwd(i);if(a)return{project:o,workspace:a,locator:a.anchoredLocator};let l=await o.findLocatorForLocation(`${i}/`,{strict:!0});if(l)return{project:o,locator:l,workspace:null};throw new Ie(`The nearest package directory (${We(e,i,Re.PATH)}) doesn't seem to be part of the project declared in ${We(e,o.cwd,Re.PATH)}.
|
|||
|
|
|||
|
- If the project directory is right, it might be that you forgot to list ${We(e,D.relative(o.cwd,i),Re.PATH)} as a workspace.
|
|||
|
- If it isn't, it's likely because you have a yarn.lock or package.json file there, confusing the project root detection.`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=D.join(this.cwd,this.configuration.get("lockfileFilename")),r=this.configuration.get("defaultLanguageName");if(M.existsSync(e)){let i=await M.readFilePromise(e,"utf8");this.lockFileChecksum=ci(`${VPe}`,i);let n=jr(i);if(n.__metadata){let s=n.__metadata.version,o=n.__metadata.cacheKey;for(let a of Object.keys(n)){if(a==="__metadata")continue;let l=n[a];if(typeof l.resolution=="undefined")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${a})`);let c=BA(l.resolution,!0),u=new ze;u.load(l,{yamlCompatibilityMode:!0});let g=u.version,f=u.languageName||r,h=l.linkType.toUpperCase(),p=u.dependencies,m=u.peerDependencies,I=u.dependenciesMeta,w=u.peerDependenciesMeta,Q=u.bin;if(l.checksum!=null){let S=typeof o!="undefined"&&!l.checksum.includes("/")?`${o}/${l.checksum}`:l.checksum;this.storedChecksums.set(c.locatorHash,S)}if(s>=ev){let S=z(v({},c),{version:g,languageName:f,linkType:h,dependencies:p,peerDependencies:m,dependenciesMeta:I,peerDependenciesMeta:w,bin:Q});this.originalPackages.set(S.locatorHash,S)}for(let S of a.split(XPe)){let R=Zo(S);if(this.storedDescriptors.set(R.descriptorHash,R),s>=ev)this.storedResolutions.set(R.descriptorHash,c.locatorHash);else{let U=Vm(c);U.descriptorHash!==R.descriptorHash&&(this.storedDescriptors.set(U.descriptorHash,U),this.resolutionAliases.set(R.descriptorHash,U.descriptorHash))}}}}}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=[this.cwd];for(;e.length>0;){let r=e;e=[];for(let i of r){if(this.workspacesByCwd.has(i))continue;let n=await this.addWorkspace(i),s=this.storedPackages.get(n.anchoredLocator.locatorHash);s&&(n.dependencies=s.dependencies);for(let o of n.workspacesCwds)e.push(o)}}}async addWorkspace(e){let r=new Oh(e,{project:this});await r.setup();let i=this.workspacesByIdent.get(r.locator.identHash);if(typeof i!="undefined")throw new Error(`Duplicate workspace name ${Er(this.configuration,r.locator)}: ${K.fromPortablePath(e)} conflicts with ${K.fromPortablePath(i.cwd)}`);return this.workspaces.push(r),this.workspacesByCwd.set(e,r),this.workspacesByIdent.set(r.locator.identHash,r),r}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){D.isAbsolute(e)||(e=D.resolve(this.cwd,e)),e=D.normalize(e).replace(/\/+$/,"");let r=this.workspacesByCwd.get(e);return r||null}getWorkspaceByCwd(e){let r=this.tryWorkspaceByCwd(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByFilePath(e){let r=null;for(let i of this.workspaces)D.relative(i.cwd,e).startsWith("../")||r&&r.cwd.length>=i.cwd.length||(r=i);return r||null}getWorkspaceByFilePath(e){let r=this.tryWorkspaceByFilePath(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByIdent(e){let r=this.workspacesByIdent.get(e.identHash);return typeof r=="undefined"?null:r}getWorkspaceByIdent(e){let r=this.tryWorkspaceByIdent(e);if(!r)throw new Error(`Workspace not found (${Er(this.configuration,e)})`);return r}tryWorkspaceByDescriptor(e){let r=this.tryWorkspaceByIdent(e);return r===null||(Xo(e)&&(e=If(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){let r=this.tryWorkspaceByDescriptor(e);if(r===null)throw new Error(`Workspace not found (${Ht(this.configuration,e)})`);return r}tryWorkspaceByLocator(e){let r=this.tryWorkspaceByIdent(e);return r===null||(ls(e)&&(e=Ef(e)),r.locator.locatorHash!==e.locatorHash&&r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){let r=this.tryWorkspaceByLocator(e);if(!r)throw new Error(`Workspace not found (${At(this.configuration,e)})`);return r}refreshWorkspaceDependencies(){for(let e of this.workspaces){let r=this.storedPackages.get(e.anchoredLocator.locatorHash);if(!r)throw new Error(`Assertion failed: Expected workspace ${Qf(thi
|
|||
|
`;switch(ve){case Zi.SCRIPT:Ke+=`# Script name: ${He}
|
|||
|
`;break;case Zi.SHELLCODE:Ke+=`# Script code: ${He}
|
|||
|
`;break}let te=null;if(!await M.mktempPromise(async De=>{let fe=D.join(De,"build.log"),{stdout:Be,stderr:pe}=this.configuration.getSubprocessStreams(fe,{header:Ke,prefix:At(this.configuration,_),report:r}),ke;try{switch(ve){case Zi.SCRIPT:ke=await cE(_,He,[],{cwd:Me,project:this,stdin:te,stdout:Be,stderr:pe});break;case Zi.SHELLCODE:ke=await Gx(_,He,[],{cwd:Me,project:this,stdin:te,stdout:Be,stderr:pe});break}}catch(V){pe.write(V.stack),ke=1}if(Be.end(),pe.end(),ke===0)return P.set(_.locatorHash,N),!0;M.detachTemp(De);let Z=`${At(this.configuration,_)} couldn't be built successfully (exit code ${We(this.configuration,ke,Re.NUMBER)}, logs can be found here: ${We(this.configuration,fe,Re.PATH)})`;return this.optionalBuilds.has(_.locatorHash)?(r.reportInfo(W.BUILD_FAILED,Z),P.set(_.locatorHash,N),!0):(r.reportError(W.BUILD_FAILED,Z),!1)}))return}})())}}if(await Promise.all(A),H===w.size){let J=Array.from(w).map(_=>{let ne=this.storedPackages.get(_);if(!ne)throw new Error("Assertion failed: The package should have been registered");return At(this.configuration,ne)}).join(", ");r.reportError(W.CYCLIC_DEPENDENCIES,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${J})`);break}}this.storedBuildState=P}async install(e){var a,l;let r=this.configuration.get("nodeLinker");(a=le.telemetry)==null||a.reportInstall(r),await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(c=>c.validateProject,this,{reportWarning:e.report.reportWarning.bind(e.report),reportError:e.report.reportError.bind(e.report)})});for(let c of this.configuration.packageExtensions.values())for(let[,u]of c)for(let g of u)g.status=zr.Inactive;let i=D.join(this.cwd,this.configuration.get("lockfileFilename")),n=null;if(e.immutable)try{n=await M.readFilePromise(i,"utf8")}catch(c){throw c.code==="ENOENT"?new $e(W.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been created by this install, which is explicitly forbidden."):c}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{for(let[,c]of this.configuration.packageExtensions)for(let[,u]of c)for(let g of u)if(g.userProvided){let f=We(this.configuration,g,Re.PACKAGE_EXTENSION);switch(g.status){case zr.Inactive:e.report.reportWarning(W.UNUSED_PACKAGE_EXTENSION,`${f}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case zr.Redundant:e.report.reportWarning(W.REDUNDANT_PACKAGE_EXTENSION,`${f}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(n!==null){let c=Pl(n,this.generateLockfile());if(c!==n){let u=(0,F9.structuredPatch)(i,i,n,c);e.report.reportSeparator();for(let g of u.hunks){e.report.reportInfo(null,`@@ -${g.oldStart},${g.oldLines} +${g.newStart},${g.newLines} @@`);for(let f of g.lines)f.startsWith("+")?e.report.reportError(W.FROZEN_LOCKFILE_EXCEPTION,We(this.configuration,f,Re.ADDED)):f.startsWith("-")?e.report.reportError(W.FROZEN_LOCKFILE_EXCEPTION,We(this.configuration,f,Re.REMOVED)):e.report.reportInfo(null,We(this.configuration,f,"grey"))}throw e.report.reportSeparator(),new $e(W.FROZEN_LOCKFILE_EXCEPTION,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let c of this.configuration.packageExtensions.values())for(let[,u]of c)for(let g of u)g.userProvided&&g.status===zr.Active&&((l=le.telemetry)==null||l.reportPackageExtension(ac(g,Re.PACKAGE_EXTENSION)));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e),(typeof e.persistProject=="undefined"||e.persistProject)&&e.mode!==Rr.UpdateLockfile&&await this.cacheCleanup(e)});let s=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],o=await Promise.all(s.map(async c=>Gm(c,{cwd:this.cwd})));(typeof e.persistProject=="undefined"||e.persistProject)&&await this.persist(),awa
|
|||
|
`,`# Manual changes might be lost - proceed with caution!
|
|||
|
`].join("")}
|
|||
|
`+ao(r)}async persistLockfile(){let e=D.join(this.cwd,this.configuration.get("lockfileFilename")),r=this.generateLockfile();await M.changeFilePromise(e,r,{automaticNewlines:!0})}async persistInstallStateFile(){let e=[];for(let o of Object.values(tv))e.push(...o);let r=(0,xy.default)(this,e),i=_k.default.serialize(r),n=ci(i);if(this.installStateChecksum===n)return;let s=this.configuration.get("installStatePath");await M.mkdirPromise(D.dirname(s),{recursive:!0}),await M.writeFilePromise(s,await _Pe(i)),this.installStateChecksum=n}async restoreInstallState({restoreInstallersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:i=!0}={}){let n=this.configuration.get("installStatePath");if(!M.existsSync(n)){r&&await this.applyLightResolution();return}let s=await $Pe(await M.readFilePromise(n));this.installStateChecksum=ci(s);let o=_k.default.deserialize(s);e&&typeof o.installersCustomData!="undefined"&&(this.installersCustomData=o.installersCustomData),i&&Object.assign(this,(0,xy.default)(o,tv.restoreBuildState)),r&&(o.lockFileChecksum===this.lockFileChecksum?(Object.assign(this,(0,xy.default)(o,tv.restoreResolutions)),this.refreshWorkspaceDependencies()):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new br}),await this.persistInstallStateFile()}async persist(){await this.persistLockfile();for(let e of this.workspacesByCwd.values())await e.persistManifest()}async cacheCleanup({cache:e,report:r}){let i=new Set([".gitignore"]);if(!sQ(e.cwd,this.cwd)||!await M.existsPromise(e.cwd))return;let n=this.configuration.get("preferAggregateCacheInfo"),s=0,o=null;for(let a of await M.readdirPromise(e.cwd)){if(i.has(a))continue;let l=D.resolve(e.cwd,a);e.markedFiles.has(l)||(o=a,e.immutable?r.reportError(W.IMMUTABLE_CACHE,`${We(this.configuration,D.basename(l),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):(n?s+=1:r.reportInfo(W.UNUSED_CACHE_ENTRY,`${We(this.configuration,D.basename(l),"magenta")} appears to be unused - removing`),await M.removePromise(l)))}n&&s!==0&&r.reportInfo(W.UNUSED_CACHE_ENTRY,s>1?`${s} packages appeared to be unused and were removed`:`${o} appeared to be unused and was removed`),e.markedFiles.clear()}};function eFe({project:t,allDescriptors:e,allResolutions:r,allPackages:i,accessibleLocators:n=new Set,optionalBuilds:s=new Set,volatileDescriptors:o=new Set,peerRequirements:a=new Map,report:l,tolerateMissingPackages:c=!1}){var $;let u=new Map,g=[],f=new Map,h=new Map,p=new Map,m=new Map,I=new Map,w=new Map(t.workspaces.map(H=>{let A=H.anchoredLocator.locatorHash,J=i.get(A);if(typeof J=="undefined"){if(c)return[A,null];throw new Error("Assertion failed: The workspace should have an associated package")}return[A,mf(J)]})),Q=()=>{let H=M.mktempSync(),A=D.join(H,"stacktrace.log"),J=String(g.length+1).length,_=g.map((ne,j)=>`${`${j+1}.`.padStart(J," ")} ${fn(ne)}
|
|||
|
`).join("");throw M.writeFileSync(A,_),M.detachTemp(H),new $e(W.STACK_OVERFLOW_RESOLUTION,`Encountered a stack overflow when resolving peer dependencies; cf ${K.fromPortablePath(A)}`)},S=H=>{let A=r.get(H.descriptorHash);if(typeof A=="undefined")throw new Error("Assertion failed: The resolution should have been registered");let J=i.get(A);if(!J)throw new Error("Assertion failed: The package could not be found");return J},R=(H,A,{top:J,optional:_})=>{g.length>1e3&&Q(),g.push(H);let ne=U(H,A,{top:J,optional:_});return g.pop(),ne},U=(H,A,{top:J,optional:_})=>{if(n.has(H.locatorHash))return;n.add(H.locatorHash),_||s.delete(H.locatorHash);let ne=i.get(H.locatorHash);if(!ne){if(c)return;throw new Error(`Assertion failed: The package (${At(t.configuration,H)}) should have been registered`)}let j=[],N=[],Me=[],ve=[],He=[];for(let te of Array.from(ne.dependencies.values())){if(ne.peerDependencies.has(te.identHash)&&ne.locatorHash!==J)continue;if(Xo(te))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");o.delete(te.descriptorHash);let ce=_;if(!ce){let Ae=ne.dependenciesMeta.get(Et(te));if(typeof Ae!="undefined"){let ue=Ae.get(null);typeof ue!="undefined"&&ue.optional&&(ce=!0)}}let De=r.get(te.descriptorHash);if(!De){if(c)continue;throw new Error(`Assertion failed: The resolution (${Ht(t.configuration,te)}) should have been registered`)}let fe=w.get(De)||i.get(De);if(!fe)throw new Error(`Assertion failed: The package (${De}, resolved from ${Ht(t.configuration,te)}) should have been registered`);if(fe.peerDependencies.size===0){R(fe,new Map,{top:J,optional:ce});continue}let Be=u.get(fe.locatorHash);typeof Be=="number"&&Be>=2&&Q();let pe,ke,Z=new Set,V;N.push(()=>{pe=Ib(te,H.locatorHash),ke=Eb(fe,H.locatorHash),ne.dependencies.delete(te.identHash),ne.dependencies.set(pe.identHash,pe),r.set(pe.descriptorHash,ke.locatorHash),e.set(pe.descriptorHash,pe),i.set(ke.locatorHash,ke),j.push([fe,pe,ke])}),Me.push(()=>{var Ae;V=new Map;for(let ue of ke.peerDependencies.values()){let Qe=ne.dependencies.get(ue.identHash);if(!Qe&&yf(H,ue)&&(Qe=Vm(H),e.set(Qe.descriptorHash,Qe),r.set(Qe.descriptorHash,H.locatorHash),o.delete(Qe.descriptorHash)),(!Qe||Qe.range==="missing:")&&ke.dependencies.has(ue.identHash)){ke.peerDependencies.delete(ue.identHash);continue}Qe||(Qe=Xt(ue,"missing:")),ke.dependencies.set(Qe.identHash,Qe),Xo(Qe)&&hA(p,Qe.descriptorHash).add(ke.locatorHash),f.set(Qe.identHash,Qe),Qe.range==="missing:"&&Z.add(Qe.identHash),V.set(ue.identHash,(Ae=A.get(ue.identHash))!=null?Ae:ke.locatorHash)}ke.dependencies=new Map(xi(ke.dependencies,([ue,Qe])=>Et(Qe)))}),ve.push(()=>{if(!i.has(ke.locatorHash))return;let Ae=u.get(fe.locatorHash),ue=typeof Ae!="undefined"?Ae+1:1;u.set(fe.locatorHash,ue),R(ke,V,{top:J,optional:ce}),u.set(fe.locatorHash,ue-1)}),He.push(()=>{let Ae=ne.dependencies.get(te.identHash);if(typeof Ae=="undefined")throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");let ue=r.get(Ae.descriptorHash);if(typeof ue=="undefined")throw new Error("Assertion failed: Expected the descriptor to be registered");if(hA(I,ue).add(H.locatorHash),!!i.has(ke.locatorHash)){for(let Qe of ke.peerDependencies.values()){let nt=V.get(Qe.identHash);if(typeof nt=="undefined")throw new Error("Assertion failed: Expected the peer dependency ident to be registered");Wl(zl(m,nt),Et(Qe)).push(ke.locatorHash)}for(let Qe of Z)ke.dependencies.delete(Qe)}})}for(let te of[...N,...Me])te();let Ke;do{Ke=!0;for(let[te,ce,De]of j){if(!i.has(De.locatorHash))continue;let fe=zl(h,te.locatorHash),Be=ci(...[...De.dependencies.values()].map(V=>{let Ae=V.range!=="missing:"?r.get(V.descriptorHash):"missing:";if(typeof Ae=="undefined")throw new Error(`Assertion failed: Expected the resolution for ${Ht(t.configuration,V)} to have been registered`);return Ae===J?`${Ae} (top)`:Ae}),ce.identHash),pe=fe.get(Be);if(typeof pe=="undefined"){fe.set(Be,ce);continue}if(pe===ce)continue;Ke=!1,i.delete(De.locatorHash),e.delete(ce.descriptorHash),r.delete(ce.descriptorHash),n.delete(De.lo
|
|||
|
`),(await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout,includeLogs:!this.context.quiet},async I=>{await r.install({cache:n,report:I,mode:this.mode})})).exitCode()}};mp.paths=[["add"]],mp.usage=Ce.Usage({description:"add dependencies to the project",details:"\n This command adds a package to the package.json for the nearest workspace.\n\n - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\n\n - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\n\n - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\n\n - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\"peerDependenciesMeta\": { \"<package>\": { \"optional\": true } }`\n\n - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `defaultSemverRangePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\n\n - If the added package specifies a range (such as `^1.0.0`, `latest`, or `rc`), Yarn will add this range as-is in the resulting package.json entry (in particular, tags such as `rc` will be encoded as-is rather than being converted into a semver range).\n\n If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\n\n If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/features/protocols.\n ",examples:[["Add a regular package to the current workspace","$0 add lo
|
|||
|
`),0}return(await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout},async s=>{let o=await St.getPackageAccessibleBinaries(i,{project:r}),l=Array.from(o.keys()).reduce((c,u)=>Math.max(c,u.length),0);for(let[c,[u,g]]of o)s.reportJson({name:c,source:b.stringifyIdent(u),path:g});if(this.verbose)for(let[c,[u]]of o)s.reportInfo(null,`${c.padEnd(l," ")} ${b.prettyLocator(e,u)}`);else for(let c of o.keys())s.reportInfo(null,c)})).exitCode()}};Ip.paths=[["bin"]],Ip.usage=Ce.Usage({description:"get the path to a binary script",details:`
|
|||
|
When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the \`-v,--verbose\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary.
|
|||
|
|
|||
|
When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive.
|
|||
|
`,examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]});var Aee=Ip;var Ep=class extends Ee{constructor(){super(...arguments);this.mirror=q.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=q.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),r=await mt.find(e);return(await Fe.start({configuration:e,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&r.mirrorCwd!==null,s=!this.mirror;n&&(await M.removePromise(r.mirrorCwd),await e.triggerHook(o=>o.cleanGlobalArtifacts,e)),s&&await M.removePromise(r.cwd)})).exitCode()}};Ep.paths=[["cache","clean"],["cache","clear"]],Ep.usage=Ce.Usage({description:"remove the shared cache files",details:`
|
|||
|
This command will remove all the files from the cache.
|
|||
|
`,examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]});var lee=Ep;var cee=re(Uy()),SP=re(require("util")),yp=class extends Ee{constructor(){super(...arguments);this.json=q.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=q.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=q.String()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),r=this.name.replace(/[.[].*$/,""),i=this.name.replace(/^[^.[]*/,"");if(typeof e.settings.get(r)=="undefined")throw new Ie(`Couldn't find a configuration settings named "${r}"`);let s=e.getSpecial(r,{hideSecrets:!this.unsafe,getNativePaths:!0}),o=he.convertMapsToIndexableObjects(s),a=i?(0,cee.default)(o,i):o,l=await Fe.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async c=>{c.reportJson(a)});if(!this.json){if(typeof a=="string")return this.context.stdout.write(`${a}
|
|||
|
`),l.exitCode();SP.inspect.styles.name="cyan",this.context.stdout.write(`${(0,SP.inspect)(a,{depth:Infinity,colors:e.get("enableColors"),compact:!1})}
|
|||
|
`)}return l.exitCode()}};yp.paths=[["config","get"]],yp.usage=Ce.Usage({description:"read a configuration settings",details:`
|
|||
|
This command will print a configuration setting.
|
|||
|
|
|||
|
Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the \`--no-redacted\` to get the untransformed value.
|
|||
|
`,examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration",`yarn config get 'npmScopes["my-company"].npmRegistryServer'`],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]});var uee=yp;var wte=re(NP()),Qte=re(Uy()),bte=re(Bte()),LP=re(require("util")),wp=class extends Ee{constructor(){super(...arguments);this.json=q.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=q.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=q.String();this.value=q.String()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),r=()=>{if(!e.projectCwd)throw new Ie("This command must be run from within a project folder");return e.projectCwd},i=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof e.settings.get(i)=="undefined")throw new Ie(`Couldn't find a configuration settings named "${i}"`);if(i==="enableStrictSettings")throw new Ie("This setting only affects the file it's in, and thus cannot be set from the CLI");let o=this.json?JSON.parse(this.value):this.value;await(this.home?h=>le.updateHomeConfiguration(h):h=>le.updateConfiguration(r(),h))(h=>{if(n){let p=(0,wte.default)(h);return(0,bte.default)(p,this.name,o),p}else return z(v({},h),{[i]:o})});let c=(await le.find(this.context.cwd,this.context.plugins)).getSpecial(i,{hideSecrets:!0,getNativePaths:!0}),u=he.convertMapsToIndexableObjects(c),g=n?(0,Qte.default)(u,n):u;return(await Fe.start({configuration:e,includeFooter:!1,stdout:this.context.stdout},async h=>{LP.inspect.styles.name="cyan",h.reportInfo(W.UNNAMED,`Successfully set ${this.name} to ${(0,LP.inspect)(g,{depth:Infinity,colors:e.get("enableColors"),compact:!1})}`)})).exitCode()}};wp.paths=[["config","set"]],wp.usage=Ce.Usage({description:"change a configuration settings",details:`
|
|||
|
This command will set a configuration setting.
|
|||
|
|
|||
|
When used without the \`--json\` flag, it can only set a simple configuration setting (a string, a number, or a boolean).
|
|||
|
|
|||
|
When used with the \`--json\` flag, it can set both simple and complex configuration settings, including Arrays and Objects.
|
|||
|
`,examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",`yarn config set unsafeHttpWhitelist --json '["*.example.com", "example.com"]'`],["Set a complex configuration setting (an Object) using the `--json` flag",`yarn config set packageExtensions --json '{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }'`],["Set a nested configuration setting",'yarn config set npmScopes.company.npmRegistryServer "https://npm.example.com"'],["Set a nested configuration setting using indexed access for non-simple keys",`yarn config set 'npmRegistries["//npm.example.com"].npmAuthToken' "ffffffff-ffff-ffff-ffff-ffffffffffff"`]]});var Dte=wp;var Lte=re(NP()),Mte=re(jh()),Tte=re(Nte()),Qp=class extends Ee{constructor(){super(...arguments);this.home=q.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=q.String()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),r=()=>{if(!e.projectCwd)throw new Ie("This command must be run from within a project folder");return e.projectCwd},i=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof e.settings.get(i)=="undefined")throw new Ie(`Couldn't find a configuration settings named "${i}"`);let o=this.home?l=>le.updateHomeConfiguration(l):l=>le.updateConfiguration(r(),l);return(await Fe.start({configuration:e,includeFooter:!1,stdout:this.context.stdout},async l=>{let c=!1;await o(u=>{if(!(0,Mte.default)(u,this.name))return l.reportWarning(W.UNNAMED,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),c=!0,u;let g=n?(0,Lte.default)(u):v({},u);return(0,Tte.default)(g,this.name),g}),c||l.reportInfo(W.UNNAMED,`Successfully unset ${this.name}`)})).exitCode()}};Qp.paths=[["config","unset"]],Qp.usage=Ce.Usage({description:"unset a configuration setting",details:`
|
|||
|
This command will unset a configuration setting.
|
|||
|
`,examples:[["Unset a simple configuration setting","yarn config unset initScope"],["Unset a complex configuration setting","yarn config unset packageExtensions"],["Unset a nested configuration setting","yarn config unset npmScopes.company.npmRegistryServer"]]});var Kte=Qp;var MP=re(require("util")),bp=class extends Ee{constructor(){super(...arguments);this.verbose=q.Boolean("-v,--verbose",!1,{description:"Print the setting description on top of the regular key/value information"});this.why=q.Boolean("--why",!1,{description:"Print the reason why a setting is set a particular way"});this.json=q.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await le.find(this.context.cwd,this.context.plugins,{strict:!1});return(await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout},async i=>{if(e.invalid.size>0&&!this.json){for(let[n,s]of e.invalid)i.reportError(W.INVALID_CONFIGURATION_KEY,`Invalid configuration key "${n}" in ${s}`);i.reportSeparator()}if(this.json){let n=he.sortMap(e.settings.keys(),s=>s);for(let s of n){let o=e.settings.get(s),a=e.getSpecial(s,{hideSecrets:!0,getNativePaths:!0}),l=e.sources.get(s);this.verbose?i.reportJson({key:s,effective:a,source:l}):i.reportJson(v({key:s,effective:a,source:l},o))}}else{let n=he.sortMap(e.settings.keys(),a=>a),s=n.reduce((a,l)=>Math.max(a,l.length),0),o={breakLength:Infinity,colors:e.get("enableColors"),maxArrayLength:2};if(this.why||this.verbose){let a=n.map(c=>{let u=e.settings.get(c);if(!u)throw new Error(`Assertion failed: This settings ("${c}") should have been registered`);let g=this.why?e.sources.get(c)||"<default>":u.description;return[c,g]}),l=a.reduce((c,[,u])=>Math.max(c,u.length),0);for(let[c,u]of a)i.reportInfo(null,`${c.padEnd(s," ")} ${u.padEnd(l," ")} ${(0,MP.inspect)(e.getSpecial(c,{hideSecrets:!0,getNativePaths:!0}),o)}`)}else for(let a of n)i.reportInfo(null,`${a.padEnd(s," ")} ${(0,MP.inspect)(e.getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),o)}`)}})).exitCode()}};bp.paths=[["config"]],bp.usage=Ce.Usage({description:"display the current configuration",details:`
|
|||
|
This command prints the current active configuration settings.
|
|||
|
`,examples:[["Print the active configuration settings","$0 config"]]});var Ote=bp;Nn();var TP={};rt(TP,{Strategy:()=>Cl,acceptedStrategies:()=>FHe,dedupe:()=>KP});var Ute=re(qi()),Cl;(function(e){e.HIGHEST="highest"})(Cl||(Cl={}));var FHe=new Set(Object.values(Cl)),RHe={highest:async(t,e,{resolver:r,fetcher:i,resolveOptions:n,fetchOptions:s})=>{let o=new Map;for(let[a,l]of t.storedResolutions){let c=t.storedDescriptors.get(a);if(typeof c=="undefined")throw new Error(`Assertion failed: The descriptor (${a}) should have been registered`);he.getSetWithDefault(o,c.identHash).add(l)}return Array.from(t.storedDescriptors.values(),async a=>{if(e.length&&!Ute.default.isMatch(b.stringifyIdent(a),e))return null;let l=t.storedResolutions.get(a.descriptorHash);if(typeof l=="undefined")throw new Error(`Assertion failed: The resolution (${a.descriptorHash}) should have been registered`);let c=t.originalPackages.get(l);if(typeof c=="undefined"||!r.shouldPersistResolution(c,n))return null;let u=o.get(a.identHash);if(typeof u=="undefined")throw new Error(`Assertion failed: The resolutions (${a.identHash}) should have been registered`);if(u.size===1)return null;let g=[...u].map(I=>{let w=t.originalPackages.get(I);if(typeof w=="undefined")throw new Error(`Assertion failed: The package (${I}) should have been registered`);return w.reference}),f=await r.getSatisfying(a,g,n),h=f==null?void 0:f[0];if(typeof h=="undefined")return null;let p=h.locatorHash,m=t.originalPackages.get(p);if(typeof m=="undefined")throw new Error(`Assertion failed: The package (${p}) should have been registered`);return p===l?null:{descriptor:a,currentPackage:c,updatedPackage:m}})}};async function KP(t,{strategy:e,patterns:r,cache:i,report:n}){let{configuration:s}=t,o=new br,a=s.makeResolver(),l=s.makeFetcher(),c={cache:i,checksums:t.storedChecksums,fetcher:l,project:t,report:o,skipIntegrityCheck:!0},u={project:t,resolver:a,report:o,fetchOptions:c};return await n.startTimerPromise("Deduplication step",async()=>{let f=await RHe[e](t,r,{resolver:a,resolveOptions:u,fetcher:l,fetchOptions:c}),h=fi.progressViaCounter(f.length);n.reportProgress(h);let p=0;await Promise.all(f.map(w=>w.then(Q=>{if(Q===null)return;p++;let{descriptor:S,currentPackage:R,updatedPackage:U}=Q;n.reportInfo(W.UNNAMED,`${b.prettyDescriptor(s,S)} can be deduped from ${b.prettyLocator(s,R)} to ${b.prettyLocator(s,U)}`),n.reportJson({descriptor:b.stringifyDescriptor(S),currentResolution:b.stringifyLocator(R),updatedResolution:b.stringifyLocator(U)}),t.storedResolutions.set(S.descriptorHash,U.locatorHash)}).finally(()=>h.tick())));let m;switch(p){case 0:m="No packages";break;case 1:m="One package";break;default:m=`${p} packages`}let I=ae.pretty(s,e,ae.Type.CODE);return n.reportInfo(W.UNNAMED,`${m} can be deduped using the ${I} strategy`),p})}var Dp=class extends Ee{constructor(){super(...arguments);this.strategy=q.String("-s,--strategy",Cl.HIGHEST,{description:"The strategy to use when deduping dependencies",validator:ai(Cl)});this.check=q.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"});this.json=q.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.mode=q.String("--mode",{description:"Change what artifacts installs generate",validator:ai(Rr)});this.patterns=q.Rest()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),{project:r}=await Ne.find(e,this.context.cwd),i=await mt.find(e);await r.restoreInstallState({restoreResolutions:!1});let n=0,s=await Fe.start({configuration:e,includeFooter:!1,stdout:this.context.stdout,json:this.json},async o=>{n=await KP(r,{strategy:this.strategy,patterns:this.patterns,cache:i,report:o})});return s.hasErrors()?s.exitCode():this.check?n?1:0:(await Fe.start({configuration:e,stdout:this.context.stdout,json:this.json},async a=>{await r.install({cache:i,report:a,mode:this.mode})})).exitCode()}};Dp.paths=[["dedupe"]],Dp.usage=Ce.Usage({description:"deduplicate dependencies with overlapping ranges",details:"\n Duplicates are defined as desc
|
|||
|
`)}};pB.paths=[["--clipanion=definitions"]];var qte=pB;var dB=class extends Ee{async execute(){this.context.stdout.write(this.cli.usage(null))}};dB.paths=[["help"],["--help"],["-h"]];var Gte=dB;var OP=class extends Ee{constructor(){super(...arguments);this.leadingArgument=q.String();this.args=q.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!b.tryParseIdent(this.leadingArgument)){let e=D.resolve(this.context.cwd,K.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:e})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}},Jte=OP;var CB=class extends Ee{async execute(){this.context.stdout.write(`${wr||"<unknown>"}
|
|||
|
`)}};CB.paths=[["-v"],["--version"]];var Wte=CB;var xp=class extends Ee{constructor(){super(...arguments);this.commandName=q.String();this.args=q.Proxy()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),{project:r,locator:i}=await Ne.find(e,this.context.cwd);return await r.restoreInstallState(),await St.executePackageShellcode(i,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:r})}};xp.paths=[["exec"]],xp.usage=Ce.Usage({description:"execute a shell script",details:`
|
|||
|
This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell.
|
|||
|
|
|||
|
It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
|
|||
|
`,examples:[["Execute a single shell command","$0 exec echo Hello World"],["Execute a shell script",'$0 exec "tsc & babel src --out-dir lib"']]});var zte=xp;Nn();var Sp=class extends Ee{constructor(){super(...arguments);this.hash=q.String({required:!1,validator:OQ(KQ(),[UQ(/^p[0-9a-f]{5}$/)])})}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),{project:r}=await Ne.find(e,this.context.cwd);return await r.restoreInstallState({restoreResolutions:!1}),await r.applyLightResolution(),typeof this.hash!="undefined"?await NHe(this.hash,r,{stdout:this.context.stdout}):(await Fe.start({configuration:e,stdout:this.context.stdout,includeFooter:!1},async n=>{var o;let s=[([,a])=>b.stringifyLocator(r.storedPackages.get(a.subject)),([,a])=>b.stringifyIdent(a.requested)];for(let[a,l]of he.sortMap(r.peerRequirements,s)){let c=r.storedPackages.get(l.subject);if(typeof c=="undefined")throw new Error("Assertion failed: Expected the subject package to have been registered");let u=r.storedPackages.get(l.rootRequester);if(typeof u=="undefined")throw new Error("Assertion failed: Expected the root package to have been registered");let g=(o=c.dependencies.get(l.requested.identHash))!=null?o:null,f=ae.pretty(e,a,ae.Type.CODE),h=b.prettyLocator(e,c),p=b.prettyIdent(e,l.requested),m=b.prettyIdent(e,u),I=l.allRequesters.length-1,w=`descendant${I===1?"":"s"}`,Q=I>0?` and ${I} ${w}`:"",S=g!==null?"provides":"doesn't provide";n.reportInfo(null,`${f} \u2192 ${h} ${S} ${p} to ${m}${Q}`)}})).exitCode()}};Sp.paths=[["explain","peer-requirements"]],Sp.usage=Ce.Usage({description:"explain a set of peer requirements",details:`
|
|||
|
A set of peer requirements represents all peer requirements that a dependent must satisfy when providing a given peer request to a requester and its descendants.
|
|||
|
|
|||
|
When the hash argument is specified, this command prints a detailed explanation of all requirements of the set corresponding to the hash and whether they're satisfied or not.
|
|||
|
|
|||
|
When used without arguments, this command lists all sets of peer requirements and the corresponding hash that can be used to get detailed information about a given set.
|
|||
|
|
|||
|
**Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (\`yarn explain peer-requirements\`).
|
|||
|
`,examples:[["Explain the corresponding set of peer requirements for a hash","$0 explain peer-requirements p1a4ed"],["List all sets of peer requirements","$0 explain peer-requirements"]]});var Vte=Sp;async function NHe(t,e,r){let{configuration:i}=e,n=e.peerRequirements.get(t);if(typeof n=="undefined")throw new Error(`No peerDependency requirements found for hash: "${t}"`);return(await Fe.start({configuration:i,stdout:r.stdout,includeFooter:!1},async o=>{var w,Q;let a=e.storedPackages.get(n.subject);if(typeof a=="undefined")throw new Error("Assertion failed: Expected the subject package to have been registered");let l=e.storedPackages.get(n.rootRequester);if(typeof l=="undefined")throw new Error("Assertion failed: Expected the root package to have been registered");let c=(w=a.dependencies.get(n.requested.identHash))!=null?w:null,u=c!==null?e.storedResolutions.get(c.descriptorHash):null;if(typeof u=="undefined")throw new Error("Assertion failed: Expected the resolution to have been registered");let g=u!==null?e.storedPackages.get(u):null;if(typeof g=="undefined")throw new Error("Assertion failed: Expected the provided package to have been registered");let f=[...n.allRequesters.values()].map(S=>{let R=e.storedPackages.get(S);if(typeof R=="undefined")throw new Error("Assertion failed: Expected the package to be registered");let U=b.devirtualizeLocator(R),L=e.storedPackages.get(U.locatorHash);if(typeof L=="undefined")throw new Error("Assertion failed: Expected the package to be registered");let P=L.peerDependencies.get(n.requested.identHash);if(typeof P=="undefined")throw new Error("Assertion failed: Expected the peer dependency to be registered");return{pkg:R,peerDependency:P}});if(g!==null){let S=f.every(({peerDependency:R})=>Ft.satisfiesWithPrereleases(g.version,R.range));o.reportInfo(W.UNNAMED,`${b.prettyLocator(i,a)} provides ${b.prettyLocator(i,g)} with version ${b.prettyReference(i,(Q=g.version)!=null?Q:"<missing>")}, which ${S?"satisfies":"doesn't satisfy"} the following requirements:`)}else o.reportInfo(W.UNNAMED,`${b.prettyLocator(i,a)} doesn't provide ${b.prettyIdent(i,n.requested)}, breaking the following requirements:`);o.reportSeparator();let h=ae.mark(i),p=[];for(let{pkg:S,peerDependency:R}of he.sortMap(f,U=>b.stringifyLocator(U.pkg))){let L=(g!==null?Ft.satisfiesWithPrereleases(g.version,R.range):!1)?h.Check:h.Cross;p.push({stringifiedLocator:b.stringifyLocator(S),prettyLocator:b.prettyLocator(i,S),prettyRange:b.prettyRange(i,R.range),mark:L})}let m=Math.max(...p.map(({stringifiedLocator:S})=>S.length)),I=Math.max(...p.map(({prettyRange:S})=>S.length));for(let{stringifiedLocator:S,prettyLocator:R,prettyRange:U,mark:L}of he.sortMap(p,({stringifiedLocator:P})=>P))o.reportInfo(null,`${R.padEnd(m+(R.length-S.length)," ")} \u2192 ${U.padEnd(I," ")} ${L}`);p.length>1&&(o.reportSeparator(),o.reportInfo(W.UNNAMED,`Note: these requirements start with ${b.prettyLocator(e.configuration,l)}`))})).exitCode()}var Xte=re(qi()),kp=class extends Ee{constructor(){super(...arguments);this.all=q.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=q.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=q.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=q.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=q.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=q.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=q.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=q.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=q.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=q.Rest()}async execute(){let e=await le.fin
|
|||
|
This command setup your project if needed. The installation is splitted in four different steps that each have their own characteristics:
|
|||
|
|
|||
|
- **Resolution:** First the package manager will resolve your dependencies. The exact way a dependency version is privileged over another isn't standardized outside of the regular semver guarantees. If a package doesn't resolve to what you would expect, check that all dependencies are correctly declared (also check our website for more information: ).
|
|||
|
|
|||
|
- **Fetch:** Then we download all the dependencies if needed, and make sure that they're all stored within our cache (check the value of \`cacheFolder\` in \`yarn config\` to see where are stored the cache files).
|
|||
|
|
|||
|
- **Link:** Then we send the dependency tree information to internal plugins tasked from writing them on the disk in some form (for example by generating the .pnp.cjs file you might know).
|
|||
|
|
|||
|
- **Build:** Once the dependency tree has been written on the disk, the package manager will now be free to run the build scripts for all packages that might need it, in a topological order compatible with the way they depend on one another.
|
|||
|
|
|||
|
Note that running this command is not part of the recommended workflow. Yarn supports zero-installs, which means that as long as you store your cache and your .pnp.cjs file inside your repository, everything will work without requiring any install right after cloning your repository or switching branches.
|
|||
|
|
|||
|
If the \`--immutable\` option is set (defaults to true on CI), Yarn will abort with an error exit code if the lockfile was to be modified (other paths can be added using the \`immutablePatterns\` configuration setting). For backward compatibility we offer an alias under the name of \`--frozen-lockfile\`, but it will be removed in a later release.
|
|||
|
|
|||
|
If the \`--immutable-cache\` option is set, Yarn will abort with an error exit code if the cache folder was to be modified (either because files would be added, or because they'd be removed).
|
|||
|
|
|||
|
If the \`--check-cache\` option is set, Yarn will always refetch the packages and will ensure that their checksum matches what's 1/ described in the lockfile 2/ inside the existing cache files (if present). This is recommended as part of your CI workflow if you're both following the Zero-Installs model and accepting PRs from third-parties, as they'd otherwise have the ability to alter the checked-in packages before submitting them.
|
|||
|
|
|||
|
If the \`--inline-builds\` option is set, Yarn will verbosely print the output of the build steps of your dependencies (instead of writing them into individual files). This is likely useful mostly for debug purposes only when using Docker-like environments.
|
|||
|
|
|||
|
If the \`--mode=<mode>\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:
|
|||
|
|
|||
|
- \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.
|
|||
|
|
|||
|
- \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
|
|||
|
`,examples:[["Install the project","$0 install"],["Validate a project when using Zero-Installs","$0 install --immutable --immutable-cache"],["Validate a project when using Zero-Installs (slightly safer if you accept external PRs)","$0 install --immutable --immutable-cache --check-cache"]]});var _te=vp,MHe="|||||||",THe=">>>>>>>",KHe="=======",$te="<<<<<<<";async function LHe(t,e){if(!t.projectCwd)return!1;let r=D.join(t.projectCwd,t.get("lockfileFilename"));if(!await M.existsPromise(r))return!1;let i=await M.readFilePromise(r,"utf8");if(!i.includes($te))return!1;if(e)throw new $e(W.AUTOMERGE_IMMUTABLE,"Cannot autofix a lockfile when running an immutable install");let[n,s]=OHe(i),o,a;try{o=jr(n),a=jr(s)}catch(c){throw new $e(W.AUTOMERGE_FAILED_TO_PARSE,"The individual variants of the lockfile failed to parse")}let l=v(v({},o),a);for(let[c,u]of Object.entries(l))typeof u=="string"&&delete l[c];return await M.changeFilePromise(r,ao(l),{automaticNewlines:!0}),!0}function OHe(t){let e=[[],[]],r=t.split(/\r?\n/g),i=!1;for(;r.length>0;){let n=r.shift();if(typeof n=="undefined")throw new Error("Assertion failed: Some lines should remain");if(n.startsWith($te)){for(;r.length>0;){let s=r.shift();if(typeof s=="undefined")throw new Error("Assertion failed: Some lines should remain");if(s===KHe){i=!1;break}else if(i||s.startsWith(MHe)){i=!0;continue}else e[0].push(s)}for(;r.length>0;){let s=r.shift();if(typeof s=="undefined")throw new Error("Assertion failed: Some lines should remain");if(s.startsWith(THe))break;e[1].push(s)}}else e[0].push(n),e[1].push(n)}return[e[0].join(`
|
|||
|
`),e[1].join(`
|
|||
|
`)]}var Pp=class extends Ee{constructor(){super(...arguments);this.all=q.Boolean("-A,--all",!1,{description:"Link all workspaces belonging to the target project to the current one"});this.private=q.Boolean("-p,--private",!1,{description:"Also link private workspaces belonging to the target project to the current one"});this.relative=q.Boolean("-r,--relative",!1,{description:"Link workspaces using relative paths instead of absolute paths"});this.destination=q.String()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ne.find(e,this.context.cwd),n=await mt.find(e);if(!i)throw new _e(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});let s=D.resolve(this.context.cwd,K.toPortablePath(this.destination)),o=await le.find(s,this.context.plugins,{useRc:!1,strict:!1}),{project:a,workspace:l}=await Ne.find(o,s);if(r.cwd===a.cwd)throw new Ie("Invalid destination; Can't link the project to itself");if(!l)throw new _e(a.cwd,s);let c=r.topLevelWorkspace,u=[];if(this.all){for(let f of a.workspaces)f.manifest.name&&(!f.manifest.private||this.private)&&u.push(f);if(u.length===0)throw new Ie("No workspace found to be linked in the target project")}else{if(!l.manifest.name)throw new Ie("The target workspace doesn't have a name and thus cannot be linked");if(l.manifest.private&&!this.private)throw new Ie("The target workspace is marked private - use the --private flag to link it anyway");u.push(l)}for(let f of u){let h=b.stringifyIdent(f.locator),p=this.relative?D.relative(r.cwd,f.cwd):f.cwd;c.manifest.resolutions.push({pattern:{descriptor:{fullName:h}},reference:`portal:${p}`})}return(await Fe.start({configuration:e,stdout:this.context.stdout},async f=>{await r.install({cache:n,report:f})})).exitCode()}};Pp.paths=[["link"]],Pp.usage=Ce.Usage({description:"connect the local project to another one",details:"\n This command will set a new `resolutions` field in the project-level manifest and point it to the workspace at the specified location (even if part of another project).\n ",examples:[["Register a remote workspace for use in the current project","$0 link ~/ts-loader"],["Register all workspaces from a remote project for use in the current project","$0 link ~/jest --all"]]});var ere=Pp;var Fp=class extends Ee{constructor(){super(...arguments);this.args=q.Proxy()}async execute(){return this.cli.run(["exec","node",...this.args])}};Fp.paths=[["node"]],Fp.usage=Ce.Usage({description:"run node with the hook already setup",details:`
|
|||
|
This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment).
|
|||
|
|
|||
|
The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version.
|
|||
|
`,examples:[["Run a Node script","$0 node ./my-script.js"]]});var tre=Fp;var fre=re(require("os"));var ore=re(require("os"));var UHe="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function ml(t){let e=await Lt.get(UHe,{configuration:t});return jr(e.toString())}var Rp=class extends Ee{constructor(){super(...arguments);this.json=q.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await le.find(this.context.cwd,this.context.plugins);return(await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout},async i=>{let n=await ml(e);for(let s of Object.entries(n)){let[l,o]=s,a=o,{experimental:c}=a,u=Tr(a,["experimental"]);let g=l;c&&(g+=" [experimental]"),i.reportJson(v({name:l,experimental:c},u)),i.reportInfo(null,g)}})).exitCode()}};Rp.paths=[["plugin","list"]],Rp.usage=Ce.Usage({category:"Plugin-related commands",description:"list the available official plugins",details:"\n This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]});var rre=Rp;var ire=re(hr()),Np=class extends Ee{constructor(){super(...arguments);this.onlyIfNeeded=q.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn't already locked"});this.version=q.String()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins);if(e.get("yarnPath")&&this.onlyIfNeeded)return 0;let r=()=>{if(typeof wr=="undefined")throw new Ie("The --install flag can only be used without explicit version specifier from the Yarn CLI");return`file://${process.argv[1]}`},i;if(this.version==="self")i=r();else if(this.version==="latest"||this.version==="berry"||this.version==="stable")i=`https://repo.yarnpkg.com/${await nre(e,"stable")}/packages/yarnpkg-cli/bin/yarn.js`;else if(this.version==="canary")i=`https://repo.yarnpkg.com/${await nre(e,"canary")}/packages/yarnpkg-cli/bin/yarn.js`;else if(this.version==="classic")i="https://nightly.yarnpkg.com/latest.js";else if(this.version.match(/^\.{0,2}[\\/]/)||K.isAbsolute(this.version))i=`file://${K.resolve(this.version)}`;else if(Ft.satisfiesWithPrereleases(this.version,">=2.0.0"))i=`https://repo.yarnpkg.com/${this.version}/packages/yarnpkg-cli/bin/yarn.js`;else if(Ft.satisfiesWithPrereleases(this.version,"^0.x || ^1.x"))i=`https://github.com/yarnpkg/yarn/releases/download/v${this.version}/yarn-${this.version}.js`;else if(Ft.validRange(this.version))i=`https://repo.yarnpkg.com/${await HHe(e,this.version)}/packages/yarnpkg-cli/bin/yarn.js`;else throw new Ie(`Invalid version descriptor "${this.version}"`);return(await Fe.start({configuration:e,stdout:this.context.stdout,includeLogs:!this.context.quiet},async s=>{let o="file://",a;i.startsWith(o)?(s.reportInfo(W.UNNAMED,`Downloading ${ae.pretty(e,i,Es.URL)}`),a=await M.readFilePromise(K.toPortablePath(i.slice(o.length)))):(s.reportInfo(W.UNNAMED,`Retrieving ${ae.pretty(e,i,Es.PATH)}`),a=await Lt.get(i,{configuration:e})),await UP(e,null,a,{report:s})})).exitCode()}};Np.paths=[["set","version"]],Np.usage=Ce.Usage({description:"lock the Yarn version used by the project",details:"\n This command will download a specific release of Yarn directly from the Yarn GitHub repository, will store it inside your project, and will change the `yarnPath` settings from your project `.yarnrc.yml` file to point to the new file.\n\n A very good use case for this command is to enforce the version of Yarn used by the any single member of your team inside a same project - by doing this you ensure that you have control on Yarn upgrades and downgrades (including on your deployment servers), and get rid of most of the headaches related to someone using a slightly different version and getting a different behavior than you.\n\n The version specifier can be:\n\n - a tag:\n - `latest` / `berry` / `stable` -> the most recent stable berry (`>=2.0.0`) release\n - `canary` -> the most recent canary (release
|
|||
|
${e}`)});let n=(g=t.projectCwd)!=null?g:t.startingCwd,s=D.resolve(n,".yarn/releases"),o=D.resolve(s,`yarn-${e}.cjs`),a=D.relative(t.startingCwd,o),l=D.relative(n,o),c=t.get("yarnPath"),u=c===null||c.startsWith(`${s}/`);if(i.reportInfo(W.UNNAMED,`Saving the new release in ${ae.pretty(t,a,"magenta")}`),await M.removePromise(D.dirname(o)),await M.mkdirPromise(D.dirname(o),{recursive:!0}),await M.writeFilePromise(o,r,{mode:493}),u){await le.updateConfiguration(n,{yarnPath:l});let f=await ze.tryFind(n)||new ze;e&&he.isTaggedYarnVersion(e)&&(f.packageManager=`yarn@${e}`);let h={};f.exportTo(h);let p=D.join(n,ze.fileName),m=`${JSON.stringify(h,null,f.indent)}
|
|||
|
`;await M.changeFilePromise(p,m,{automaticNewlines:!0})}}var YHe=/^[0-9]+$/;function are(t){return YHe.test(t)?`pull/${t}/head`:t}var jHe=({repository:t,branch:e},r)=>[["git","init",K.fromPortablePath(r)],["git","remote","add","origin",t],["git","fetch","origin",are(e)],["git","reset","--hard","FETCH_HEAD"]],qHe=({branch:t})=>[["git","fetch","origin",are(t),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx"]],GHe=({plugins:t,noMinify:e},r)=>[["yarn","build:cli",...new Array().concat(...t.map(i=>["--plugin",D.resolve(r,i)])),...e?["--no-minify"]:[],"|"]],Lp=class extends Ee{constructor(){super(...arguments);this.installPath=q.String("--path",{description:"The path where the repository should be cloned to"});this.repository=q.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=q.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=q.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.noMinify=q.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=q.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=q.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),{project:r}=await Ne.find(e,this.context.cwd),i=typeof this.installPath!="undefined"?D.resolve(this.context.cwd,K.toPortablePath(this.installPath)):D.resolve(K.toPortablePath((0,ore.tmpdir)()),"yarnpkg-sources",Si.makeHash(this.repository).slice(0,6));return(await Fe.start({configuration:e,stdout:this.context.stdout},async s=>{await YP(this,{configuration:e,report:s,target:i}),s.reportSeparator(),s.reportInfo(W.UNNAMED,"Building a fresh bundle"),s.reportSeparator(),await Mp(GHe(this,i),{configuration:e,context:this.context,target:i}),s.reportSeparator();let o=D.resolve(i,"packages/yarnpkg-cli/bundles/yarn.js"),a=await M.readFilePromise(o);await UP(e,"sources",a,{report:s}),this.skipPlugins||await JHe(this,{project:r,report:s,target:i})})).exitCode()}};Lp.paths=[["set","version","from","sources"]],Lp.usage=Ce.Usage({description:"build Yarn from master",details:`
|
|||
|
This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project.
|
|||
|
|
|||
|
By default, it also updates all contrib plugins to the same commit the bundle is built from. This behavior can be disabled by using the \`--skip-plugins\` flag.
|
|||
|
`,examples:[["Build Yarn from master","$0 set version from sources"]]});var Are=Lp;async function Mp(t,{configuration:e,context:r,target:i}){for(let[n,...s]of t){let o=s[s.length-1]==="|";if(o&&s.pop(),o)await Or.pipevp(n,s,{cwd:i,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${ae.pretty(e,` $ ${[n,...s].join(" ")}`,"grey")}
|
|||
|
`);try{await Or.execvp(n,s,{cwd:i,strict:!0})}catch(a){throw r.stdout.write(a.stdout||a.stack),a}}}}async function YP(t,{configuration:e,report:r,target:i}){let n=!1;if(!t.force&&M.existsSync(D.join(i,".git"))){r.reportInfo(W.UNNAMED,"Fetching the latest commits"),r.reportSeparator();try{await Mp(qHe(t),{configuration:e,context:t.context,target:i}),n=!0}catch(s){r.reportSeparator(),r.reportWarning(W.UNNAMED,"Repository update failed; we'll try to regenerate it")}}n||(r.reportInfo(W.UNNAMED,"Cloning the remote repository"),r.reportSeparator(),await M.removePromise(i),await M.mkdirPromise(i,{recursive:!0}),await Mp(jHe(t,i),{configuration:e,context:t.context,target:i}))}async function JHe(t,{project:e,report:r,target:i}){let n=await ml(e.configuration),s=new Set(Object.keys(n));for(let o of e.configuration.plugins.keys())!s.has(o)||await HP(o,t,{project:e,report:r,target:i})}var lre=re(hr()),cre=re(require("url")),ure=re(require("vm"));var Tp=class extends Ee{constructor(){super(...arguments);this.name=q.String()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins);return(await Fe.start({configuration:e,stdout:this.context.stdout},async i=>{let{project:n}=await Ne.find(e,this.context.cwd),s,o;if(this.name.match(/^\.{0,2}[\\/]/)||K.isAbsolute(this.name)){let a=D.resolve(this.context.cwd,K.toPortablePath(this.name));i.reportInfo(W.UNNAMED,`Reading ${ae.pretty(e,a,ae.Type.PATH)}`),s=D.relative(n.cwd,a),o=await M.readFilePromise(a)}else{let a;if(this.name.match(/^https?:/)){try{new cre.URL(this.name)}catch{throw new $e(W.INVALID_PLUGIN_REFERENCE,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}s=this.name,a=this.name}else{let l=b.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(l.reference!=="unknown"&&!lre.default.valid(l.reference))throw new $e(W.UNNAMED,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let c=b.stringifyIdent(l),u=await ml(e);if(!Object.prototype.hasOwnProperty.call(u,c))throw new $e(W.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${c}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be referenced by their name; any other plugin will have to be referenced through its public url (for example https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js).`);s=c,a=u[c].url,l.reference!=="unknown"?a=a.replace(/\/master\//,`/${c}/${l.reference}/`):wr!==null&&(a=a.replace(/\/master\//,`/@yarnpkg/cli/${wr}/`))}i.reportInfo(W.UNNAMED,`Downloading ${ae.pretty(e,a,"green")}`),o=await Lt.get(a,{configuration:e})}await jP(s,o,{project:n,report:i})})).exitCode()}};Tp.paths=[["plugin","import"]],Tp.usage=Ce.Usage({category:"Plugin-related commands",description:"download a plugin",details:`
|
|||
|
This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.
|
|||
|
|
|||
|
Three types of plugin references are accepted:
|
|||
|
|
|||
|
- If the plugin is stored within the Yarn repository, it can be referenced by name.
|
|||
|
- Third-party plugins can be referenced directly through their public urls.
|
|||
|
- Local plugins can be referenced by their path on the disk.
|
|||
|
|
|||
|
Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the \`@yarnpkg/builder\` package).
|
|||
|
`,examples:[['Download and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import @yarnpkg/plugin-exec"],['Download and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import exec"],["Download and activate a community plugin","$0 plugin import https://example.org/path/to/plugin.js"],["Activate a local plugin","$0 plugin import ./path/to/plugin.js"]]});var gre=Tp;async function jP(t,e,{project:r,report:i}){let{configuration:n}=r,s={},o={exports:s};(0,ure.runInNewContext)(e.toString(),{module:o,exports:s});let a=o.exports.name,l=`.yarn/plugins/${a}.cjs`,c=D.resolve(r.cwd,l);i.reportInfo(W.UNNAMED,`Saving the new plugin in ${ae.pretty(n,l,"magenta")}`),await M.mkdirPromise(D.dirname(c),{recursive:!0}),await M.writeFilePromise(c,e);let u={path:l,spec:t};await le.updateConfiguration(r.cwd,g=>{let f=[],h=!1;for(let p of g.plugins||[]){let m=typeof p!="string"?p.path:p,I=D.resolve(r.cwd,K.toPortablePath(m)),{name:w}=he.dynamicRequire(I);w!==a?f.push(p):(f.push(u),h=!0)}return h||f.push(u),z(v({},g),{plugins:f})})}var WHe=({pluginName:t,noMinify:e},r)=>[["yarn",`build:${t}`,...e?["--no-minify"]:[],"|"]],Kp=class extends Ee{constructor(){super(...arguments);this.installPath=q.String("--path",{description:"The path where the repository should be cloned to"});this.repository=q.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=q.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=q.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=q.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=q.String()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),r=typeof this.installPath!="undefined"?D.resolve(this.context.cwd,K.toPortablePath(this.installPath)):D.resolve(K.toPortablePath((0,fre.tmpdir)()),"yarnpkg-sources",Si.makeHash(this.repository).slice(0,6));return(await Fe.start({configuration:e,stdout:this.context.stdout},async n=>{let{project:s}=await Ne.find(e,this.context.cwd),o=b.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),a=b.stringifyIdent(o),l=await ml(e);if(!Object.prototype.hasOwnProperty.call(l,a))throw new $e(W.PLUGIN_NAME_NOT_FOUND,`Couldn't find a plugin named "${a}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let c=a;await YP(this,{configuration:e,report:n,target:r}),await HP(c,this,{project:s,report:n,target:r})})).exitCode()}};Kp.paths=[["plugin","import","from","sources"]],Kp.usage=Ce.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:`
|
|||
|
This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations.
|
|||
|
|
|||
|
The plugins can be referenced by their short name if sourced from the official Yarn repository.
|
|||
|
`,examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]});var hre=Kp;async function HP(t,{context:e,noMinify:r},{project:i,report:n,target:s}){let o=t.replace(/@yarnpkg\//,""),{configuration:a}=i;n.reportSeparator(),n.reportInfo(W.UNNAMED,`Building a fresh ${o}`),n.reportSeparator(),await Mp(WHe({pluginName:o,noMinify:r},s),{configuration:a,context:e,target:s}),n.reportSeparator();let l=D.resolve(s,`packages/${o}/bundles/${t}.js`),c=await M.readFilePromise(l);await jP(t,c,{project:i,report:n})}var Op=class extends Ee{constructor(){super(...arguments);this.name=q.String()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),{project:r}=await Ne.find(e,this.context.cwd);return(await Fe.start({configuration:e,stdout:this.context.stdout},async n=>{let s=this.name,o=b.parseIdent(s);if(!e.plugins.has(s))throw new Ie(`${b.prettyIdent(e,o)} isn't referenced by the current configuration`);let a=`.yarn/plugins/${s}.cjs`,l=D.resolve(r.cwd,a);M.existsSync(l)&&(n.reportInfo(W.UNNAMED,`Removing ${ae.pretty(e,a,ae.Type.PATH)}...`),await M.removePromise(l)),n.reportInfo(W.UNNAMED,"Updating the configuration..."),await le.updateConfiguration(r.cwd,c=>{if(!Array.isArray(c.plugins))return c;let u=c.plugins.filter(g=>g.path!==a);return c.plugins.length===u.length?c:z(v({},c),{plugins:u})})})).exitCode()}};Op.paths=[["plugin","remove"]],Op.usage=Ce.Usage({category:"Plugin-related commands",description:"remove a plugin",details:`
|
|||
|
This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration.
|
|||
|
|
|||
|
**Note:** The plugins have to be referenced by their name property, which can be obtained using the \`yarn plugin runtime\` command. Shorthands are not allowed.
|
|||
|
`,examples:[["Remove a plugin imported from the Yarn repository","$0 plugin remove @yarnpkg/plugin-typescript"],["Remove a plugin imported from a local file","$0 plugin remove my-local-plugin"]]});var pre=Op;var Up=class extends Ee{constructor(){super(...arguments);this.json=q.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await le.find(this.context.cwd,this.context.plugins);return(await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout},async i=>{for(let n of e.plugins.keys()){let s=this.context.plugins.plugins.has(n),o=n;s&&(o+=" [builtin]"),i.reportJson({name:n,builtin:s}),i.reportInfo(null,`${o}`)}})).exitCode()}};Up.paths=[["plugin","runtime"]],Up.usage=Ce.Usage({category:"Plugin-related commands",description:"list the active plugins",details:`
|
|||
|
This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins.
|
|||
|
`,examples:[["List the currently active plugins","$0 plugin runtime"]]});var dre=Up;var Hp=class extends Ee{constructor(){super(...arguments);this.idents=q.Rest()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ne.find(e,this.context.cwd),n=await mt.find(e);if(!i)throw new _e(r.cwd,this.context.cwd);let s=new Set;for(let a of this.idents)s.add(b.parseIdent(a).identHash);if(await r.restoreInstallState({restoreResolutions:!1}),await r.resolveEverything({cache:n,report:new br}),s.size>0)for(let a of r.storedPackages.values())s.has(a.identHash)&&r.storedBuildState.delete(a.locatorHash);else r.storedBuildState.clear();return(await Fe.start({configuration:e,stdout:this.context.stdout,includeLogs:!this.context.quiet},async a=>{await r.install({cache:n,report:a})})).exitCode()}};Hp.paths=[["rebuild"]],Hp.usage=Ce.Usage({description:"rebuild the project's native packages",details:`
|
|||
|
This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again.
|
|||
|
|
|||
|
Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future).
|
|||
|
|
|||
|
By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory.
|
|||
|
`,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]});var Cre=Hp;var qP=re(qi());Nn();var Yp=class extends Ee{constructor(){super(...arguments);this.all=q.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=q.String("--mode",{description:"Change what artifacts installs generate",validator:ai(Rr)});this.patterns=q.Rest()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ne.find(e,this.context.cwd),n=await mt.find(e);if(!i)throw new _e(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});let s=this.all?r.workspaces:[i],o=[rr.REGULAR,rr.DEVELOPMENT,rr.PEER],a=[],l=!1,c=[];for(let h of this.patterns){let p=!1,m=b.parseIdent(h);for(let I of s){let w=[...I.manifest.peerDependenciesMeta.keys()];for(let Q of(0,qP.default)(w,h))I.manifest.peerDependenciesMeta.delete(Q),l=!0,p=!0;for(let Q of o){let S=I.manifest.getForScope(Q),R=[...S.values()].map(U=>b.stringifyIdent(U));for(let U of(0,qP.default)(R,b.stringifyIdent(m))){let{identHash:L}=b.parseIdent(U),P=S.get(L);if(typeof P=="undefined")throw new Error("Assertion failed: Expected the descriptor to be registered");I.manifest[Q].delete(L),c.push([I,Q,P]),l=!0,p=!0}}}p||a.push(h)}let u=a.length>1?"Patterns":"Pattern",g=a.length>1?"don't":"doesn't",f=this.all?"any":"this";if(a.length>0)throw new Ie(`${u} ${ae.prettyList(e,a,Es.CODE)} ${g} match any packages referenced by ${f} workspace`);return l?(await e.triggerMultipleHooks(p=>p.afterWorkspaceDependencyRemoval,c),(await Fe.start({configuration:e,stdout:this.context.stdout},async p=>{await r.install({cache:n,report:p,mode:this.mode})})).exitCode()):0}};Yp.paths=[["remove"]],Yp.usage=Ce.Usage({description:"remove dependencies from the project",details:`
|
|||
|
This command will remove the packages matching the specified patterns from the current workspace.
|
|||
|
|
|||
|
If the \`--mode=<mode>\` option is set, Yarn will change which artifacts are generated. The modes currently supported are:
|
|||
|
|
|||
|
- \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.
|
|||
|
|
|||
|
- \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.
|
|||
|
|
|||
|
This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.
|
|||
|
`,examples:[["Remove a dependency from the current project","$0 remove lodash"],["Remove a dependency from all workspaces at once","$0 remove lodash --all"],["Remove all dependencies starting with `eslint-`","$0 remove 'eslint-*'"],["Remove all dependencies with the `@babel` scope","$0 remove '@babel/*'"],["Remove all dependencies matching `react-dom` or `react-helmet`","$0 remove 'react-{dom,helmet}'"]]});var mre=Yp;var Ire=re(require("util")),mB=class extends Ee{async execute(){let e=await le.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ne.find(e,this.context.cwd);if(!i)throw new _e(r.cwd,this.context.cwd);return(await Fe.start({configuration:e,stdout:this.context.stdout},async s=>{let o=i.manifest.scripts,a=he.sortMap(o.keys(),u=>u),l={breakLength:Infinity,colors:e.get("enableColors"),maxArrayLength:2},c=a.reduce((u,g)=>Math.max(u,g.length),0);for(let[u,g]of o.entries())s.reportInfo(null,`${u.padEnd(c," ")} ${(0,Ire.inspect)(g,l)}`)})).exitCode()}};mB.paths=[["run"]];var Ere=mB;var jp=class extends Ee{constructor(){super(...arguments);this.inspect=q.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=q.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=q.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=q.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.silent=q.Boolean("--silent",{hidden:!0});this.scriptName=q.String();this.args=q.Proxy()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),{project:r,workspace:i,locator:n}=await Ne.find(e,this.context.cwd);await r.restoreInstallState();let s=this.topLevel?r.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await St.hasPackageScript(s,this.scriptName,{project:r}))return await St.executePackageScript(s,this.scriptName,this.args,{project:r,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let o=await St.getPackageAccessibleBinaries(s,{project:r});if(o.get(this.scriptName)){let l=[];return this.inspect&&(typeof this.inspect=="string"?l.push(`--inspect=${this.inspect}`):l.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?l.push(`--inspect-brk=${this.inspectBrk}`):l.push("--inspect-brk")),await St.executePackageAccessibleBinary(s,this.scriptName,this.args,{cwd:this.context.cwd,project:r,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:l,packageAccessibleBinaries:o})}if(!this.topLevel&&!this.binariesOnly&&i&&this.scriptName.includes(":")){let c=(await Promise.all(r.workspaces.map(async u=>u.manifest.scripts.has(this.scriptName)?u:null))).filter(u=>u!==null);if(c.length===1)return await St.executeWorkspaceScript(c[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw this.scriptName==="node-gyp"?new Ie(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${b.prettyLocator(e,n)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new Ie(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${b.prettyLocator(e,n)}).`);{if(this.scriptName==="global")throw new Ie("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");let l=[this.scriptName].concat(this.args);for(let[c,u]of fu)for(let g of u)if(l.length>=g.length&&JSON.stringify(l.slice(0,g.length))===JSON.stringify(g))throw new Ie(`Couldn't find a script named "${this.scriptName}", but a matchin
|
|||
|
This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace:
|
|||
|
|
|||
|
- If the \`scripts\` field from your local package.json contains a matching script name, its definition will get executed.
|
|||
|
|
|||
|
- Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed.
|
|||
|
|
|||
|
- Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed.
|
|||
|
|
|||
|
Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax).
|
|||
|
`,examples:[["Run the tests from the local workspace","$0 run test"],['Same thing, but without the "run" keyword',"$0 test"],["Inspect Webpack while running","$0 run --inspect-brk webpack"]]});var yre=jp;var qp=class extends Ee{constructor(){super(...arguments);this.save=q.Boolean("-s,--save",!1,{description:"Persist the resolution inside the top-level manifest"});this.descriptor=q.String();this.resolution=q.String()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ne.find(e,this.context.cwd),n=await mt.find(e);if(await r.restoreInstallState({restoreResolutions:!1}),!i)throw new _e(r.cwd,this.context.cwd);let s=b.parseDescriptor(this.descriptor,!0),o=b.makeDescriptor(s,this.resolution);return r.storedDescriptors.set(s.descriptorHash,s),r.storedDescriptors.set(o.descriptorHash,o),r.resolutionAliases.set(s.descriptorHash,o.descriptorHash),(await Fe.start({configuration:e,stdout:this.context.stdout},async l=>{await r.install({cache:n,report:l})})).exitCode()}};qp.paths=[["set","resolution"]],qp.usage=Ce.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, add the `-s,--save` flag which will also edit the `resolutions` field from your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@npm:^1.2.3 1.5.0"]]});var Bre=qp;var wre=re(qi()),Gp=class extends Ee{constructor(){super(...arguments);this.all=q.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=q.Rest()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ne.find(e,this.context.cwd),n=await mt.find(e);if(!i)throw new _e(r.cwd,this.context.cwd);let s=r.topLevelWorkspace,o=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:l,reference:c}of s.manifest.resolutions)c.startsWith("portal:")&&o.add(l.descriptor.fullName);if(this.leadingArguments.length>0)for(let l of this.leadingArguments){let c=D.resolve(this.context.cwd,K.toPortablePath(l));if(he.isPathLike(l)){let u=await le.find(c,this.context.plugins,{useRc:!1,strict:!1}),{project:g,workspace:f}=await Ne.find(u,c);if(!f)throw new _e(g.cwd,c);if(this.all){for(let h of g.workspaces)h.manifest.name&&o.add(b.stringifyIdent(h.locator));if(o.size===0)throw new Ie("No workspace found to be unlinked in the target project")}else{if(!f.manifest.name)throw new Ie("The target workspace doesn't have a name and thus cannot be unlinked");o.add(b.stringifyIdent(f.locator))}}else{let u=[...s.manifest.resolutions.map(({pattern:g})=>g.descriptor.fullName)];for(let g of(0,wre.default)(u,l))o.add(g)}}return s.manifest.resolutions=s.manifest.resolutions.filter(({pattern:l})=>!o.has(l.descriptor.fullName)),(await Fe.start({configuration:e,stdout:this.context.stdout},async l=>{await r.install({cache:n,report:l})})).exitCode()}};Gp.paths=[["unlink"]],Gp.usage=Ce.Usage({description:"disconnect the local project from another one",details:`
|
|||
|
This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments.
|
|||
|
`,examples:[["Unregister a remote workspace in the current project","$0 unlink ~/ts-loader"],["Unregister all workspaces from a remote project in the current project","$0 unlink ~/jest --all"],["Unregister all previously linked workspaces","$0 unlink --all"],["Unregister all workspaces matching a glob","$0 unlink '@babel/*' 'pkg-{a,b}'"]]});var Qre=Gp;var bre=re(pp()),GP=re(qi());Nn();var Ru=class extends Ee{constructor(){super(...arguments);this.interactive=q.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.exact=q.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=q.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=q.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=q.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=q.String("--mode",{description:"Change what artifacts installs generate",validator:ai(Rr)});this.patterns=q.Rest()}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let e=await le.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ne.find(e,this.context.cwd),n=await mt.find(e);if(!i)throw new _e(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});let s=[...r.storedDescriptors.values()],o=s.map(u=>b.stringifyIdent(u)),a=new Set;for(let u of this.patterns){if(b.parseDescriptor(u).range!=="unknown")throw new Ie("Ranges aren't allowed when using --recursive");for(let g of(0,GP.default)(o,u)){let f=b.parseIdent(g);a.add(f.identHash)}}let l=s.filter(u=>a.has(u.identHash));for(let u of l)r.storedDescriptors.delete(u.descriptorHash),r.storedResolutions.delete(u.descriptorHash);return(await Fe.start({configuration:e,stdout:this.context.stdout},async u=>{await r.install({cache:n,report:u})})).exitCode()}async executeUpClassic(){var m;let e=await le.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ne.find(e,this.context.cwd),n=await mt.find(e);if(!i)throw new _e(r.cwd,this.context.cwd);await r.restoreInstallState({restoreResolutions:!1});let s=(m=this.interactive)!=null?m:e.get("preferInteractive"),o=dp(this,r),a=s?[lr.KEEP,lr.REUSE,lr.PROJECT,lr.LATEST]:[lr.PROJECT,lr.LATEST],l=[],c=[];for(let I of this.patterns){let w=!1,Q=b.parseDescriptor(I);for(let S of r.workspaces)for(let R of[rr.REGULAR,rr.DEVELOPMENT]){let L=[...S.manifest.getForScope(R).values()].map(P=>b.stringifyIdent(P));for(let P of(0,GP.default)(L,b.stringifyIdent(Q))){let Y=b.parseIdent(P),$=S.manifest[R].get(Y.identHash);if(typeof $=="undefined")throw new Error("Assertion failed: Expected the descriptor to be registered");let H=b.makeDescriptor(Y,Q.range);l.push(Promise.resolve().then(async()=>[S,R,$,await Cp(H,{project:r,workspace:S,cache:n,target:R,modifier:o,strategies:a})])),w=!0}}w||c.push(I)}if(c.length>1)throw new Ie(`Patterns ${ae.prettyList(e,c,Es.CODE)} don't match any packages referenced by any workspace`);if(c.length>0)throw new Ie(`Pattern ${ae.prettyList(e,c,Es.CODE)} doesn't match any packages referenced by any workspace`);let u=await Promise.all(l),g=await Co.start({configuration:e,stdout:this.context.stdout,suggestInstall:!1},async I=>{for(let[,,w,{suggestions:Q,rejections:S}]of u){let R=Q.filter(U=>U.descriptor!==null);if(R.length===0){let[U]=S;if(typeof U=="undefined")throw new Error("Assertion failed: Expected an error to have been set");let L=this.cli.error(U);r.configuration.get("enableNetwork")?I.reportError(W.CANT_SUGGEST_RESOLUTIONS,`${b.prettyDescriptor(e,w)} can't be resolved to a satisfying range
|
|||
|
|
|||
|
${L}`):I.reportError(W.CANT_SUGGEST_RESOLUTIONS,`${b.prettyDescriptor(e,w)} can't be resolved to a satisfying range (note: network resolution has been disabled)
|
|||
|
|
|||
|
${L}`)}else R.length>1&&!s&&I.reportError(W.CANT_SUGGEST_RESOLUTIONS,`${b.prettyDescriptor(e,w)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(g.hasErrors())return g.exitCode();let f=!1,h=[];for(let[I,w,,{suggestions:Q}]of u){let S,R=Q.filter(Y=>Y.descriptor!==null),U=R[0].descriptor,L=R.every(Y=>b.areDescriptorsEqual(Y.descriptor,U));R.length===1||L?S=U:(f=!0,{answer:S}=await(0,bre.prompt)({type:"select",name:"answer",message:`Which range to you want to use in ${b.prettyWorkspace(e,I)} \u276F ${w}?`,choices:Q.map(({descriptor:Y,name:$,reason:H})=>Y?{name:$,hint:H,descriptor:Y}:{name:$,hint:H,disabled:!0}),onCancel:()=>process.exit(130),result(Y){return this.find(Y,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let P=I.manifest[w].get(S.identHash);if(typeof P=="undefined")throw new Error("Assertion failed: This descriptor should have a matching entry");if(P.descriptorHash!==S.descriptorHash)I.manifest[w].set(S.identHash,S),h.push([I,w,P,S]);else{let Y=e.makeResolver(),$={project:r,resolver:Y},H=Y.bindDescriptor(P,I.anchoredLocator,$);r.forgetResolution(H)}}return await e.triggerMultipleHooks(I=>I.afterWorkspaceDependencyReplacement,h),f&&this.context.stdout.write(`
|
|||
|
`),(await Fe.start({configuration:e,stdout:this.context.stdout},async I=>{await r.install({cache:n,report:I,mode:this.mode})})).exitCode()}};Ru.paths=[["up"]],Ru.usage=Ce.Usage({description:"upgrade dependencies across the project",details:"\n This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\n\n If `-R,--recursive` is set the command will change behavior and no other switch will be allowed. When operating under this mode `yarn up` will force all ranges matching the selected packages to be resolved again (often to the highest available versions) before being stored in the lockfile. It however won't touch your manifests anymore, so depending on your needs you might want to run both `yarn up` and `yarn up -R` to cover all bases.\n\n If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\n\n The, `-C,--caret`, `-E,--exact` and `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the later will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up` will upgrade all workspaces at the same time.\n\n This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\n ",examples:[["Upgrade all instances of lodash to the latest release","$0 up lodash"],["Upgrade all instances of lodash to the latest release, but ask confirmation for each","$0 up lodash -i"],["Upgrade all instances of lodash to 1.2.3","$0 up lodash@1.2.3"],["Upgrade all instances of packages with the `@babel` scope to the latest release","$0 up '@babel/*'"],["Upgrade all instances of packages containing the word `jest` to the latest release","$0 up '*jest*'"],["Upgrade all instances of packages with the `@babel` scope to 7.0.0","$0 up '@babel/*@7.0.0'"]]}),Ru.schema=[HQ("recursive",aA.Forbids,["interactive","exact","tilde","caret"],{ignore:[void 0,!1]})];var Dre=Ru;var Jp=class extends Ee{constructor(){super(...arguments);this.recursive=q.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=q.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=q.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=q.String()}async execute(){let e=await le.find(this.context.cwd,this.c
|
|||
|
This command prints the exact reasons why a package appears in the dependency tree.
|
|||
|
|
|||
|
If \`-R,--recursive\` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named "Foo" when looking for "Bar", it means that "Foo" already got printed higher in the tree.
|
|||
|
`,examples:[["Explain why lodash is used in your project","$0 why lodash"]]});var xre=Jp;function zHe(t,e,{configuration:r,peers:i}){let n=he.sortMap(t.storedPackages.values(),a=>b.stringifyLocator(a)),s={},o={children:s};for(let a of n){let l={},c=null;for(let u of a.dependencies.values()){if(!i&&a.peerDependencies.has(u.identHash))continue;let g=t.storedResolutions.get(u.descriptorHash);if(!g)throw new Error("Assertion failed: The resolution should have been registered");let f=t.storedPackages.get(g);if(!f)throw new Error("Assertion failed: The package should have been registered");if(f.identHash!==e)continue;if(c===null){let p=b.stringifyLocator(a);s[p]={value:[a,ae.Type.LOCATOR],children:l}}let h=b.stringifyLocator(f);l[h]={value:[{descriptor:u,locator:f},ae.Type.DEPENDENT]}}}return o}function VHe(t,e,{configuration:r,peers:i}){let n=he.sortMap(t.workspaces,f=>b.stringifyLocator(f.anchoredLocator)),s=new Set,o=new Set,a=f=>{if(s.has(f.locatorHash))return o.has(f.locatorHash);if(s.add(f.locatorHash),f.identHash===e)return o.add(f.locatorHash),!0;let h=!1;f.identHash===e&&(h=!0);for(let p of f.dependencies.values()){if(!i&&f.peerDependencies.has(p.identHash))continue;let m=t.storedResolutions.get(p.descriptorHash);if(!m)throw new Error("Assertion failed: The resolution should have been registered");let I=t.storedPackages.get(m);if(!I)throw new Error("Assertion failed: The package should have been registered");a(I)&&(h=!0)}return h&&o.add(f.locatorHash),h};for(let f of n){let h=t.storedPackages.get(f.anchoredLocator.locatorHash);if(!h)throw new Error("Assertion failed: The package should have been registered");a(h)}let l=new Set,c={},u={children:c},g=(f,h,p)=>{if(!o.has(f.locatorHash))return;let m=p!==null?ae.tuple(ae.Type.DEPENDENT,{locator:f,descriptor:p}):ae.tuple(ae.Type.LOCATOR,f),I={},w={value:m,children:I},Q=b.stringifyLocator(f);if(h[Q]=w,!l.has(f.locatorHash)&&(l.add(f.locatorHash),!(p!==null&&t.tryWorkspaceByLocator(f))))for(let S of f.dependencies.values()){if(!i&&f.peerDependencies.has(S.identHash))continue;let R=t.storedResolutions.get(S.descriptorHash);if(!R)throw new Error("Assertion failed: The resolution should have been registered");let U=t.storedPackages.get(R);if(!U)throw new Error("Assertion failed: The package should have been registered");g(U,I,S)}};for(let f of n){let h=t.storedPackages.get(f.anchoredLocator.locatorHash);if(!h)throw new Error("Assertion failed: The package should have been registered");g(h,c,null)}return u}var Wp=class extends Ee{constructor(){super(...arguments);this.verbose=q.Boolean("-v,--verbose",!1,{description:"Also return the cross-dependencies between workspaces"});this.json=q.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),{project:r}=await Ne.find(e,this.context.cwd);return(await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout},async n=>{for(let s of r.workspaces){let{manifest:o}=s,a;if(this.verbose){let l=new Set,c=new Set;for(let u of ze.hardDependencies)for(let[g,f]of o.getForScope(u)){let h=r.tryWorkspaceByDescriptor(f);h===null?r.workspacesByIdent.has(g)&&c.add(f):l.add(h)}a={workspaceDependencies:Array.from(l).map(u=>u.relativeCwd),mismatchedWorkspaceDependencies:Array.from(c).map(u=>b.stringifyDescriptor(u))}}n.reportInfo(null,`${s.relativeCwd}`),n.reportJson(v({location:s.relativeCwd,name:o.name?b.stringifyIdent(o.name):null},a))}})).exitCode()}};Wp.paths=[["workspaces","list"]],Wp.usage=Ce.Usage({category:"Workspace-related commands",description:"list all available workspaces",details:"\n This command will print the list of all workspaces in the project. If both the `-v,--verbose` and `--json` options are set, Yarn will also return the cross-dependencies between each workspaces (useful when you wish to automatically generate Buck / Bazel rules).\n "});var Sre=Wp;var zp=class extends Ee{constructor(){super(...arguments);this.workspaceName=q.String();this.commandName=q.String();this.args=q.Proxy()}async execute(){let e=await le.fi
|
|||
|
- ${a.join(`
|
|||
|
- `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:o.cwd})}};zp.paths=[["workspace"]],zp.usage=Ce.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:`
|
|||
|
This command will run a given sub-command on a single workspace.
|
|||
|
`,examples:[["Add a package to a single workspace","yarn workspace components add -D react"],["Run build script on a single workspace","yarn workspace components run build"]]});var kre=zp;var XHe={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:ge.BOOLEAN,default:vre.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:ge.STRING,values:["^","~",""],default:Ds.CARET}},commands:[lee,uee,Dte,Kte,Bre,Are,sre,Sre,qte,Gte,Jte,Wte,aee,Aee,Ote,Hte,zte,Vte,Zte,_te,ere,Qre,tre,hre,gre,pre,rre,dre,Cre,mre,Ere,yre,Dre,xre,kre]},ZHe=XHe;var XP={};rt(XP,{default:()=>$He});var Te={optional:!0},Pre=[["@tailwindcss/aspect-ratio@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@tailwindcss/line-clamp@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@fullhuman/postcss-purgecss@3.1.3 || 3.1.3-alpha.0",{peerDependencies:{postcss:"^8.0.0"}}],["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:Te,zenObservable:Te}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:Te,zenObservable:Te}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{["supports-color"]:Te}}],["got@<11",{dependencies:{["@types/responselike"]:"^1.0.0",["@types/keyv"]:"^3.1.1"}}],["cacheable-lookup@<4.1.2",{dependencies:{["@types/keyv"]:"^3.1.1"}}],["http-link-dataloader@*",{peerDependencies:{graphql:"^0.13.1 || ^14.0.0"}}],["typescript-language-server@*",{dependencies:{["vscode-jsonrpc"]:"^5.0.1",["vscode-languageserver-protocol"]:"^3.15.0"}}],["postcss-syntax@*",{peerDependenciesMeta:{["postcss-html"]:Te,["postcss-jsx"]:Te,["postcss-less"]:Te,["postcss-markdown"]:Te,["postcss-scss"]:Te}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{["tiny-warning"]:"^1.0.2"}}],["ink-select-input@<4.1.0",{peerDependencies:{react:"^16.8.2"}}],["license-webpack-plugin@<2.3.18",{peerDependenciesMeta:{webpack:Te}}],["snowpack@>=3.3.0",{dependencies:{["node-gyp"]:"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:Te}}],["reactcss@*",{peerDependencies:{react:"*"}}],["react-color@<=2.19.0",{peerDependencies:{react:"*"}}],["gatsby-plugin-i18n@*",{dependencies:{ramda:"^0.24.1"}}],["useragent@^2.0.0",{dependencies:{request:"^2.88.0",yamlparser:"0.0.x",semver:"5.5.x"}}],["@apollographql/apollo-tools@*",{peerDependencies:{graphql:"^14.2.1 || ^15.0.0"}}],["material-table@^2.0.0",{dependencies:{"@babel/runtime":"^7.11.2"}}],["@babel/parser@*",{dependencies:{"@babel/types":"^7.8.3"}}],["fork-ts-checker-webpack-plugin@*",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4","vue-template-compiler":"*"},peerDependenciesMeta:{eslint:Te,"vue-template-compiler":Te}}],["rc-animate@<=3.1.1",{peerDependencies:{react:">=16.9.0","react-dom":">=16.9.0"}}],["react-bootstrap-table2-paginator@*",{dependencies:{classnames:"^2.2.6"}}],["react-draggable@<=4.4.3",{peerDependencies:{react:">= 16.3.0","react-dom":">= 16.3.0"}}],["apollo-upload-client@<14",{peerDependencies:{graphql:"14 - 15"}}],["react-instantsearch-core@<=6.7.0",{peerDependencies:{algoliasearch:">= 3.1 < 5"}}],["react-instantsearch-dom@<=6.7.0",{dependencies:{"react-fast-compare":"^3.0.0"}}],["ws@<7.2.1",{peerDependencies:{bufferutil:"^4.0.1","utf-8-validate":"^5.0.2"},peerDependenciesMeta:{bufferutil:Te,"utf-8-validate":Te}}],["react-portal@*",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}],["react-scripts@<=4.0.1",{peerDependencies:{react:"*"}}],["testcafe@<=1.10.1",{dependencies:{"@babel/plugin-transform-for-of":"^7.12.1","@babel/runtime":"^7.12.5"}}],["testcafe-legacy-api@<=4.2.0",{dependencies:{"testcafe-hammerhead":"^17.0.1","read-file-relative":"^1.2.0"}}],["@google-cloud/firestore@<=4.9.3",{dependencies:{protobufjs:"^6.8.6"}}],["gatsby-source-apiserver@*",{dependencies:{["babel-polyfill"]:"^6.26.0"}}],["@webpack-cli/package-utils@<=1.0.1-alpha.4",{dependencies:{["cross-spawn"]:"^7.0.3"}}],["gatsby-remark-prismjs@<3.3.28",{dependencies:{lodash:"^4"}}],["gatsby-plugin-favicon@*",
|
|||
|
`),await M.writeFilePromise(D.join(r,"yarn.lock"),"");let i=D.join(r,".yarnrc.yml"),n=await le.findProjectCwd(this.context.cwd,Pt.lockfile),s=!(await le.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),o=n!==null?D.join(n,".yarnrc.yml"):null;o!==null&&M.existsSync(o)?(await M.copyFilePromise(o,i),await le.updateConfiguration(r,m=>{let I=z(v({},m),{enableGlobalCache:s,enableTelemetry:!1});return Array.isArray(m.plugins)&&(I.plugins=m.plugins.map(w=>{let Q=typeof w=="string"?w:w.path,S=K.isAbsolute(Q)?Q:K.resolve(K.fromPortablePath(n),Q);return typeof w=="string"?S:{path:S,spec:w.spec}})),I})):await M.writeFilePromise(i,`enableGlobalCache: ${s}
|
|||
|
enableTelemetry: false
|
|||
|
`);let a=(p=this.packages)!=null?p:[this.command],l=b.parseDescriptor(this.command).name,c=await this.cli.run(["add","--",...a],{cwd:r,quiet:this.quiet});if(c!==0)return c;this.quiet||this.context.stdout.write(`
|
|||
|
`);let u=await le.find(r,this.context.plugins),{project:g,workspace:f}=await Ne.find(u,r);if(f===null)throw new _e(g.cwd,r);await g.restoreInstallState();let h=await St.getWorkspaceAccessibleBinaries(f);return h.has(l)===!1&&h.size===1&&typeof this.packages=="undefined"&&(l=Array.from(h)[0][0]),await St.executeWorkspaceAccessibleBinary(f,l,this.args,{packageAccessibleBinaries:h,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};Vp.paths=[["dlx"]],Vp.usage=Ce.Usage({description:"run a package in a temporary environment",details:"\n This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\n\n By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\n\n Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-react-app to create a new React app","yarn dlx create-react-app ./my-app"]]});var Tre=Vp;var eYe={commands:[Mre,Tre]},tYe=eYe;var oF={};rt(oF,{default:()=>nYe,fileUtils:()=>_P});var Nu=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,Xp=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,cr="file:";var _P={};rt(_P,{makeArchiveFromLocator:()=>EB,makeBufferFromLocator:()=>tF,makeLocator:()=>eF,makeSpec:()=>Kre,parseSpec:()=>$P});function $P(t){let{params:e,selector:r}=b.parseRange(t),i=K.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?b.parseLocator(e.locator):null,path:i}}function Kre({parentLocator:t,path:e,folderHash:r,protocol:i}){let n=t!==null?{locator:b.stringifyLocator(t)}:{},s=typeof r!="undefined"?{hash:r}:{};return b.makeRange({protocol:i,source:e,selector:e,params:v(v({},s),n)})}function eF(t,{parentLocator:e,path:r,folderHash:i,protocol:n}){return b.makeLocator(t,Kre({parentLocator:e,path:r,folderHash:i,protocol:n}))}async function EB(t,{protocol:e,fetchOptions:r,inMemory:i=!1}){let{parentLocator:n,path:s}=b.parseFileStyleRange(t.reference,{protocol:e}),o=D.isAbsolute(s)?{packageFs:new bt(xe.root),prefixPath:xe.dot,localPath:xe.root}:await r.fetcher.fetch(n,r),a=o.localPath?{packageFs:new bt(xe.root),prefixPath:D.relative(xe.root,o.localPath)}:o;o!==a&&o.releaseFs&&o.releaseFs();let l=a.packageFs,c=D.join(a.prefixPath,s);return await he.releaseAfterUseAsync(async()=>await mr.makeArchiveFromDirectory(c,{baseFs:l,prefixPath:b.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:i}),a.releaseFs)}async function tF(t,{protocol:e,fetchOptions:r}){return(await EB(t,{protocol:e,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var rF=class{supports(e,r){return!!e.reference.startsWith(cr)}getLocalPath(e,r){let{parentLocator:i,path:n}=b.parseFileStyleRange(e.reference,{protocol:cr});if(D.isAbsolute(n))return n;let s=r.fetcher.getLocalPath(i,r);return s===null?null:D.resolve(s,n)}async fetch(e,r){let i=r.checksums.get(e.locatorHash)||null,[n,s,o]=await r.cache.fetchPackageFromCache(e,i,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${b.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),skipIntegrityCheck:r.skipIntegrityCheck});return{packageFs:n,releaseFs:s,prefixPath:b.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:o}}async fetchFromDisk(e,r){return EB(e,{protocol:cr,fetchOptions:r})}};var rYe=1,iF=class{supportsDescriptor(e,r){return e.range.match(Nu)?!0:!!e.range.startsWith(cr)}supportsLocator(e,r){return!!e.reference.startsWith(cr)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,i){return Nu.test(e.range)&&(e=b.makeDescriptor(e,`${cr}${e.range}`)),b.bindDescriptor(e,{locator:b.stringifyLocator(r)})}getResolutionDependencies(e,r){return
|
|||
|
`);let s=[];return this.private&&s.push("-p"),this.workspace&&s.push("-w"),this.yes&&s.push("-y"),await M.mktempPromise(async o=>{let{code:a}=await Or.pipevp("yarn",["init",...s],{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await St.makeScriptEnv({binFolder:o})});return a})}async executeRegular(e){var l;let r=null;try{r=(await Ne.find(e,this.context.cwd)).project}catch{r=null}M.existsSync(this.context.cwd)||await M.mkdirPromise(this.context.cwd,{recursive:!0});let i=await ze.tryFind(this.context.cwd)||new ze,n=Object.fromEntries(e.get("initFields").entries());i.load(n),i.name=(l=i.name)!=null?l:b.makeIdent(e.get("initScope"),D.basename(this.context.cwd)),i.packageManager=wr&&he.isTaggedYarnVersion(wr)?`yarn@${wr}`:null,typeof i.raw.private=="undefined"&&(this.private||this.workspace&&i.workspaceDefinitions.length===0)&&(i.private=!0),this.workspace&&i.workspaceDefinitions.length===0&&(await M.mkdirPromise(D.join(this.context.cwd,"packages"),{recursive:!0}),i.workspaceDefinitions=[{pattern:"packages/*"}]);let s={};i.exportTo(s),bF.inspect.styles.name="cyan",this.context.stdout.write(`${(0,bF.inspect)(s,{depth:Infinity,colors:!0,compact:!1})}
|
|||
|
`);let o=D.join(this.context.cwd,ze.fileName);await M.changeFilePromise(o,`${JSON.stringify(s,null,2)}
|
|||
|
`,{automaticNewlines:!0});let a=D.join(this.context.cwd,"README.md");if(M.existsSync(a)||await M.writeFilePromise(a,`# ${b.stringifyIdent(i.name)}
|
|||
|
`),!r||r.cwd===this.context.cwd){let c=D.join(this.context.cwd,Pt.lockfile);M.existsSync(c)||await M.writeFilePromise(c,"");let g=["/.yarn/*","!/.yarn/patches","!/.yarn/plugins","!/.yarn/releases","!/.yarn/sdks","","# Swap the comments on the following lines if you don't wish to use zero-installs","# Documentation here: https://yarnpkg.com/features/zero-installs","!/.yarn/cache","#/.pnp.*"].map(I=>`${I}
|
|||
|
`).join(""),f=D.join(this.context.cwd,".gitignore");M.existsSync(f)||await M.writeFilePromise(f,g);let h={["*"]:{endOfLine:"lf",insertFinalNewline:!0},["*.{js,json,yml}"]:{charset:"utf-8",indentStyle:"space",indentSize:2}};(0,Rie.default)(h,e.get("initEditorConfig"));let p=`root = true
|
|||
|
`;for(let[I,w]of Object.entries(h)){p+=`
|
|||
|
[${I}]
|
|||
|
`;for(let[Q,S]of Object.entries(w))p+=`${Q.replace(/[A-Z]/g,U=>`_${U.toLowerCase()}`)} = ${S}
|
|||
|
`}let m=D.join(this.context.cwd,".editorconfig");M.existsSync(m)||await M.writeFilePromise(m,p),M.existsSync(D.join(this.context.cwd,".git"))||await Or.execvp("git",["init"],{cwd:this.context.cwd})}}};rd.paths=[["init"]],rd.usage=Ce.Usage({description:"create a new package",details:"\n This command will setup a new package in your local directory.\n\n If the `-p,--private` or `-w,--workspace` options are set, the package will be private by default.\n\n If the `-w,--workspace` option is set, the package will be configured to accept a set of workspaces in the `packages/` directory.\n\n If the `-i,--install` option is given a value, Yarn will first download it using `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\n\n The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\n ",examples:[["Create a new package in the local directory","yarn init"],["Create a new private package in the local directory","yarn init -p"],["Create a new package and store the Yarn release inside","yarn init -i=latest"],["Create a new private package and defines it as a workspace root","yarn init -w"]]});var Nie=rd;var Dje={configuration:{initScope:{description:"Scope used when creating packages via the init command",type:ge.STRING,default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:ge.MAP,valueDefinition:{description:"",type:ge.ANY}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:ge.MAP,valueDefinition:{description:"",type:ge.ANY}}},commands:[Nie]},xje=Dje;var PF={};rt(PF,{default:()=>kje});var Qo="portal:",bo="link:";var xF=class{supports(e,r){return!!e.reference.startsWith(Qo)}getLocalPath(e,r){let{parentLocator:i,path:n}=b.parseFileStyleRange(e.reference,{protocol:Qo});if(D.isAbsolute(n))return n;let s=r.fetcher.getLocalPath(i,r);return s===null?null:D.resolve(s,n)}async fetch(e,r){let{parentLocator:i,path:n}=b.parseFileStyleRange(e.reference,{protocol:Qo}),s=D.isAbsolute(n)?{packageFs:new bt(xe.root),prefixPath:xe.dot,localPath:xe.root}:await r.fetcher.fetch(i,r),o=s.localPath?{packageFs:new bt(xe.root),prefixPath:D.relative(xe.root,s.localPath)}:s;s!==o&&s.releaseFs&&s.releaseFs();let a=o.packageFs,l=D.join(o.prefixPath,n);return s.localPath?{packageFs:new bt(l,{baseFs:a}),releaseFs:o.releaseFs,prefixPath:xe.dot,localPath:l}:{packageFs:new Us(l,{baseFs:a}),releaseFs:o.releaseFs,prefixPath:xe.dot}}};var SF=class{supportsDescriptor(e,r){return!!e.range.startsWith(Qo)}supportsLocator(e,r){return!!e.reference.startsWith(Qo)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,i){return b.bindDescriptor(e,{locator:b.stringifyLocator(r)})}getResolutionDependencies(e,r){return[]}async getCandidates(e,r,i){let n=e.range.slice(Qo.length);return[b.makeLocator(e,`${Qo}${K.toPortablePath(n)}`)]}async getSatisfying(e,r,i){return null}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let i=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),n=await he.releaseAfterUseAsync(async()=>await ze.find(i.prefixPath,{baseFs:i.packageFs}),i.releaseFs);return z(v({},e),{version:n.version||"0.0.0",languageName:n.languageName||r.project.configuration.get("defaultLanguageName"),linkType:ht.SOFT,dependencies:new Map([...n.dependencies]),peerDependencies:n.peerDependencies,dependenciesMeta:n.dependenciesMeta,peerDependenciesMeta:n.peerDependenciesMeta,bin:n.bin})}};var kF=class{supports(e,r){return!!e.reference.startsWith(bo)}getLocalPath(e,r){let{parentLocator:i,path:n}=b.parseFileStyleRange(e.reference,{protocol:bo});if(D.isAbsolute(n))return n;let s=r.fetcher.getLocalPath(i,r);return s===null?null:D.resolve(s,n)}async fetch(e,r){let
|
|||
|
${u}, next tree:
|
|||
|
${id(a)}`);let f=Mie(a);if(f)throw new Error(`${f}, after hoisting finished:
|
|||
|
${id(a)}`)}return s.debugLevel>=2&&console.log(id(a)),Pje(a)},Fje=t=>{let e=t[t.length-1],r=new Map,i=new Set,n=s=>{if(!i.has(s)){i.add(s);for(let o of s.hoistedDependencies.values())r.set(o.name,o);for(let o of s.dependencies.values())s.peerNames.has(o.name)||n(o)}};return n(e),r},Rje=t=>{let e=t[t.length-1],r=new Map,i=new Set,n=new Set,s=(o,a)=>{if(i.has(o))return;i.add(o);for(let c of o.hoistedDependencies.values())if(!a.has(c.name)){let u;for(let g of t)u=g.dependencies.get(c.name),u&&r.set(u.name,u)}let l=new Set;for(let c of o.dependencies.values())l.add(c.name);for(let c of o.dependencies.values())o.peerNames.has(c.name)||s(c,l)};return s(e,n),r},Kie=(t,e)=>{if(e.decoupled)return e;let{name:r,references:i,ident:n,locator:s,dependencies:o,originalDependencies:a,hoistedDependencies:l,peerNames:c,reasons:u,isHoistBorder:g,hoistPriority:f}=e,h={name:r,references:new Set(i),ident:n,locator:s,dependencies:new Map(o),originalDependencies:new Map(a),hoistedDependencies:new Map(l),peerNames:new Set(c),reasons:new Map(u),decoupled:!0,isHoistBorder:g,hoistPriority:f,hoistedFrom:[]},p=h.dependencies.get(r);return p&&p.ident==h.ident&&h.dependencies.set(r,h),t.dependencies.set(h.name,h),h},Nje=(t,e)=>{let r=new Map([[t.name,[t.ident]]]);for(let n of t.dependencies.values())t.peerNames.has(n.name)||r.set(n.name,[n.ident]);let i=Array.from(e.keys());i.sort((n,s)=>{let o=e.get(n),a=e.get(s);return a.hoistPriority!==o.hoistPriority?a.hoistPriority-o.hoistPriority:a.peerDependents.size!==o.peerDependents.size?a.peerDependents.size-o.peerDependents.size:a.dependents.size-o.dependents.size});for(let n of i){let s=n.substring(0,n.indexOf("@",1)),o=n.substring(s.length+1);if(!t.peerNames.has(s)){let a=r.get(s);a||(a=[],r.set(s,a)),a.indexOf(o)<0&&a.push(o)}}return r},NF=t=>{let e=new Set,r=(i,n=new Set)=>{if(!n.has(i)){n.add(i);for(let s of i.peerNames)if(!t.peerNames.has(s)){let o=t.dependencies.get(s);o&&!e.has(o)&&r(o,n)}e.add(i)}};for(let i of t.dependencies.values())t.peerNames.has(i.name)||r(i);return e},RF=(t,e,r,i,n,s=new Set)=>{let o=e[e.length-1];if(s.has(o))return{anotherRoundNeeded:!1,isGraphChanged:!1};s.add(o);let a=Mje(o),l=Nje(o,a),c=t==o?new Map:n.fastLookupPossible?Fje(e):Rje(e),u,g=!1,f=!1,h=new Map(Array.from(l.entries()).map(([m,I])=>[m,I[0]])),p=new Map;do{let m=Lje(t,e,r,c,h,l,i,p,n);m.isGraphChanged&&(f=!0),m.anotherRoundNeeded&&(g=!0),u=!1;for(let[I,w]of l)w.length>1&&!o.dependencies.has(I)&&(h.delete(I),w.shift(),h.set(I,w[0]),u=!0)}while(u);for(let m of o.dependencies.values())if(!o.peerNames.has(m.name)&&!r.has(m.locator)){r.add(m.locator);let I=RF(t,[...e,m],r,p,n);I.isGraphChanged&&(f=!0),I.anotherRoundNeeded&&(g=!0),r.delete(m.locator)}return{anotherRoundNeeded:g,isGraphChanged:f}},Tje=(t,e,r,i,n,s,o,a,{outputReason:l})=>{let c,u=null,g=new Set;l&&(c=`${Array.from(e).map(m=>Ti(m)).join("\u2192")}`);let f=r[r.length-1],p=!(i.ident===f.ident);if(l&&!p&&(u="- self-reference"),p&&(p=!t.peerNames.has(i.name),l&&!p&&(u=`- cannot shadow peer: ${Ti(t.originalDependencies.get(i.name).locator)} at ${c}`)),p){let m=!1,I=n.get(i.name);if(m=!I||I.ident===i.ident,l&&!m&&(u=`- filled by: ${Ti(I.locator)} at ${c}`),m)for(let w=r.length-1;w>=1;w--){let S=r[w].dependencies.get(i.name);if(S&&S.ident!==i.ident){m=!1;let R=a.get(f);R||(R=new Set,a.set(f,R)),R.add(i.name),l&&(u=`- filled by ${Ti(S.locator)} at ${r.slice(0,w).map(U=>Ti(U.locator)).join("\u2192")}`);break}}p=m}if(p&&(p=s.get(i.name)===i.ident,l&&!p&&(u=`- filled by: ${Ti(o.get(i.name)[0])} at ${c}`)),p){let m=!0,I=new Set(i.peerNames);for(let w=r.length-1;w>=1;w--){let Q=r[w];for(let S of I){if(Q.peerNames.has(S)&&Q.originalDependencies.has(S))continue;let R=Q.dependencies.get(S);R&&t.dependencies.get(S)!==R&&(w===r.length-1?g.add(R):(g=null,m=!1,l&&(u=`- peer dependency ${Ti(R.locator)} from parent ${Ti(Q.locator)} was not hoisted to ${c}`))),I.delete(S)}if(!m)break}p=m}return g!==null&&g.size>0?{isHoistable:2,dependsOn:g,reason:u}:{isHoistable:p?0:1,reason:u}},Lje=(t,e,r,i,n,s,o,a,l)=>{let c=e[e.length-1],u=new Set,g=!1,f=!1,h=(I,w,Q,S)=>{if(u.has(Q))return;
|
|||
|
${id(t)}`)}let $=NF(Q);for(let H of $)if(P.has(H)){let A=L.get(H);if((n.get(H.name)===H.ident||!Q.reasons.has(H.name))&&A.isHoistable!==0&&Q.reasons.set(H.name,A.reason),!H.isHoistBorder&&R.indexOf(H.locator)<0){u.add(Q);let _=Kie(Q,H);h([...I,Q],[...w,Q.locator],_,m),u.delete(Q)}}},p,m=new Set(NF(c));do{p=m,m=new Set;for(let I of p){if(I.locator===c.locator||I.isHoistBorder)continue;let w=Kie(c,I);h([],Array.from(r),w,m)}}while(m.size>0);return{anotherRoundNeeded:g,isGraphChanged:f}},Mie=t=>{let e=[],r=new Set,i=new Set,n=(s,o)=>{if(r.has(s)||(r.add(s),i.has(s)))return;let a=new Map(o);for(let l of s.dependencies.values())s.peerNames.has(l.name)||a.set(l.name,l);for(let l of s.originalDependencies.values()){let c=a.get(l.name),u=()=>`${Array.from(i).concat([s]).map(g=>Ti(g.locator)).join("\u2192")}`;if(s.peerNames.has(l.name)){let g=o.get(l.name);(g!==c||!g||g.ident!==l.ident)&&e.push(`${u()} - broken peer promise: expected ${l.ident} but found ${g&&g.ident}`)}else c?c.ident!==l.ident&&e.push(`${u()} - broken require promise for ${l.name}: expected ${l.ident}, but found: ${c.ident}`):e.push(`${u()} - broken require promise: no required dependency ${l.locator} found`)}i.add(s);for(let l of s.dependencies.values())s.peerNames.has(l.name)||n(l,a);i.delete(s)};return n(t,t.dependencies),e.join(`
|
|||
|
`)},vje=(t,e)=>{let{identName:r,name:i,reference:n,peerNames:s}=t,o={name:i,references:new Set([n]),locator:FF(r,n),ident:Lie(r,n),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(s),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,hoistedFrom:[]},a=new Map([[t,o]]),l=(c,u)=>{let g=a.get(c),f=!!g;if(!g){let{name:h,identName:p,reference:m,peerNames:I,hoistPriority:w}=c,Q=e.hoistingLimits.get(u.locator);g={name:h,references:new Set([m]),locator:FF(p,m),ident:Lie(p,m),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(I),reasons:new Map,decoupled:!0,isHoistBorder:Q?Q.has(h):!1,hoistPriority:w||0,hoistedFrom:[]},a.set(c,g)}if(u.dependencies.set(c.name,g),u.originalDependencies.set(c.name,g),f){let h=new Set,p=m=>{if(!h.has(m)){h.add(m),m.decoupled=!1;for(let I of m.dependencies.values())m.peerNames.has(I.name)||p(I)}};p(g)}else for(let h of c.dependencies)l(h,g)};for(let c of t.dependencies)l(c,o);return o},LF=t=>t.substring(0,t.indexOf("@",1)),Pje=t=>{let e={name:t.name,identName:LF(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),i=(n,s,o)=>{let a=r.has(n),l;if(s===n)l=o;else{let{name:c,references:u,locator:g}=n;l={name:c,identName:LF(g),references:u,dependencies:new Set}}if(o.dependencies.add(l),!a){r.add(n);for(let c of n.dependencies.values())n.peerNames.has(c.name)||i(c,n,l);r.delete(n)}};for(let n of t.dependencies.values())i(n,t,e);return e},Mje=t=>{let e=new Map,r=new Set([t]),i=o=>`${o.name}@${o.ident}`,n=o=>{let a=i(o),l=e.get(a);return l||(l={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(a,l)),l},s=(o,a)=>{let l=!!r.has(a);if(n(a).dependents.add(o.ident),!l){r.add(a);for(let u of a.dependencies.values()){let g=n(u);g.hoistPriority=Math.max(g.hoistPriority,u.hoistPriority),a.peerNames.has(u.name)?g.peerDependents.add(a.ident):s(a,u)}}};for(let o of t.dependencies.values())t.peerNames.has(o.name)||s(t,o);return e},Ti=t=>{let e=t.indexOf("@",1),r=t.substring(0,e);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let i=t.substring(e+1);if(i==="workspace:.")return".";if(i){let n=(i.indexOf("#")>0?i.split("#")[1]:i).replace("npm:","");return i.startsWith("virtual")&&(r=`v:${r}`),n.startsWith("workspace")&&(r=`w:${r}`,n=""),`${r}${n?`@${n}`:""}`}else return`${r}`},Oie=5e4,id=t=>{let e=0,r=(n,s,o="")=>{if(e>Oie||s.has(n))return"";e++;let a=Array.from(n.dependencies.values()).sort((c,u)=>c.name.localeCompare(u.name)),l="";s.add(n);for(let c=0;c<a.length;c++){let u=a[c];if(!n.peerNames.has(u.name)&&u!==n){let g=n.reasons.get(u.name),f=LF(u.locator);l+=`${o}${c<a.length-1?"\u251C\u2500":"\u2514\u2500"}${(s.has(u)?">":"")+(f!==u.name?`a:${u.name}:`:"")+Ti(u.locator)+(g?` ${g}`:"")+(u!==n&&u.hoistedFrom.length>0?`, hoisted from: ${u.hoistedFrom.join(", ")}`:"")}
|
|||
|
`,l+=r(u,s,`${o}${c<a.length-1?"\u2502 ":" "}`)}}return s.delete(n),l};return r(t,new Set)+(e>Oie?`
|
|||
|
Tree is too large, part of the tree has been dunped
|
|||
|
`:"")};var Tu;(function(r){r.HARD="HARD",r.SOFT="SOFT"})(Tu||(Tu={}));var Ki;(function(i){i.WORKSPACES="workspaces",i.DEPENDENCIES="dependencies",i.NONE="none"})(Ki||(Ki={}));var Uie="node_modules",yB="$wsroot$";var nd=(t,e)=>{let{packageTree:r,hoistingLimits:i,errors:n,preserveSymlinksRequired:s}=Kje(t,e),o=null;if(n.length===0){let a=Tie(r,{hoistingLimits:i});o=Oje(t,a,e)}return{tree:o,errors:n,preserveSymlinksRequired:s}},xs=t=>`${t.name}@${t.reference}`,MF=t=>{let e=new Map;for(let[r,i]of t.entries())if(!i.dirList){let n=e.get(i.locator);n||(n={target:i.target,linkType:i.linkType,locations:[],aliases:i.aliases},e.set(i.locator,n)),n.locations.push(r)}for(let r of e.values())r.locations=r.locations.sort((i,n)=>{let s=i.split(D.delimiter).length,o=n.split(D.delimiter).length;return s!==o?o-s:n.localeCompare(i)});return e},Hie=(t,e)=>{let r=b.isVirtualLocator(t)?b.devirtualizeLocator(t):t,i=b.isVirtualLocator(e)?b.devirtualizeLocator(e):e;return b.areLocatorsEqual(r,i)},Kje=(t,e)=>{let r=t.getDependencyTreeRoots(),i=[],n=!1,s=new Map,o=new Map,a=t.getPackageInformation(t.topLevel);if(a===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let l=t.findPackageLocator(a.packageLocation);if(l===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let c=K.toPortablePath(a.packageLocation),u=xs(l);if(e.project){let I={children:new Map},w=e.project.cwd.split(D.sep);for(let[S,R]of e.project.workspacesByCwd){let U=S.split(D.sep).slice(w.length),L=I;for(let P of U){let Y=L.children.get(P);Y||(Y={children:new Map},L.children.set(P,Y)),L=Y}L.workspaceLocator={name:b.stringifyIdent(R.anchoredLocator),reference:R.anchoredLocator.reference}}let Q=(S,R)=>{if(S.workspaceLocator){let U=xs(R),L=o.get(U);L||(L=new Set,o.set(U,L)),L.add(S.workspaceLocator)}for(let U of S.children.values())Q(U,S.workspaceLocator||R)};for(let S of I.children.values())Q(S,I.workspaceLocator)}else for(let I of r)if(I.name!==l.name||I.reference!==l.reference){let w=o.get(u);w||(w=new Set,o.set(u,w)),w.add(I)}let g={name:l.name,identName:l.name,reference:l.reference,peerNames:a.packagePeers,dependencies:new Set},f=new Map,h=(I,w)=>`${xs(w)}:${I}`,p=(I,w)=>{if(I.linkType!==Tu.SOFT||!e.project)return!1;let Q=K.toPortablePath(t.resolveVirtual&&w.reference&&w.reference.startsWith("virtual:")?t.resolveVirtual(I.packageLocation):I.packageLocation);return D.contains(e.project.cwd,Q)===null},m=(I,w,Q,S,R,U,L,P)=>{var N,Me;let Y=h(I,Q),$=f.get(Y),H=!!$;!H&&Q.name===l.name&&Q.reference===l.reference&&($=g,f.set(Y,g)),$||($={name:I,identName:Q.name,reference:Q.reference,dependencies:new Set,peerNames:w.packagePeers},f.set(Y,$));let A,J=p(w,Q);if(J?A=2:R.linkType===Tu.SOFT?A=1:A=0,$.hoistPriority=Math.max($.hoistPriority||0,A),P&&!J){let ve=xs({name:S.identName,reference:S.reference}),He=s.get(ve)||new Set;s.set(ve,He),He.add($.name)}let _=new Map(w.packageDependencies);if(e.project){let ve=e.project.workspacesByCwd.get(K.toPortablePath(w.packageLocation.slice(0,-1)));if(ve){let He=new Set([...Array.from(ve.manifest.peerDependencies.values(),Ke=>b.stringifyIdent(Ke)),...Array.from(ve.manifest.peerDependenciesMeta.keys())]);for(let Ke of He)_.has(Ke)||(_.set(Ke,U.get(Ke)||null),$.peerNames.add(Ke))}}let ne=xs(Q),j=o.get(ne);if(j)for(let ve of j)_.set(`${ve.name}${yB}`,ve.reference);if(S.dependencies.add($),!H){let ve=new Map;for(let[He,Ke]of _)if(Ke!==null){let te=t.getLocator(He,Ke),ce=t.getLocator(He.replace(yB,""),Ke),De=t.getPackageInformation(ce);if(De===null)throw new Error("Assertion failed: Expected the package to have been registered");let fe=p(De,te);if(e.validateExternalSoftLinks&&e.project&&fe){De.packageDependencies.size>0&&(n=!0);for(let[V,Ae]of De.packageDependencies)if(Ae!==null){let ue=b.parseLocator(Array.isArray(Ae)?`${Ae[0]}@${Ae[1]}`:`${V}@${Ae}`);if(xs(ue)!==xs(te)){let Qe=_.get(V);if(Qe){let nt=b.parseLocator(Array.isArray(Qe)?`${Qe[0]}@${Qe[1]}`:`${V}@${Qe}`);Hie(nt,ue)||i.push({messageName:W.NM_CANT_INSTALL_EXTERNAL_SOFT_LINK,text:`Cannot link ${b.prettyIdent(
|
|||
|
`;for(let s=0,o=t.length;s<o;++s)n+=i+BB(String(s),t[s],e,i).replace(/^ +/,""),s+1<o&&(n+=","),n+=`
|
|||
|
`;return n+=r,n+="]",n}function jje(t,e,r){let i=Object.keys(t),n="";n+="{";for(let s=0,o=i.length;s<o;++s){let a=i[s],l=t[a];typeof l!="undefined"&&(n+=JSON.stringify(a),n+=": ",n+=BB(a,l,e,r).replace(/^ +/g,""),s+1<o&&(n+=", "))}return n+="}",n}function qje(t,e,r){let i=Object.keys(t),n=`${r} `,s="";s+=r,s+=`{
|
|||
|
`;for(let o=0,a=i.length;o<a;++o){let l=i[o],c=t[l];typeof c!="undefined"&&(s+=n,s+=JSON.stringify(l),s+=": ",s+=BB(l,c,e,n).replace(/^ +/g,""),o+1<a&&(s+=","),s+=`
|
|||
|
`)}return s+=r,s+="}",s}function BB(t,e,r,i){let{next:n}=jie[r],s=n[t]||n["*"];return qie(e,s,i)}function qie(t,e,r){let{collapsed:i}=jie[e];return Array.isArray(t)?i?Hje(t,e,r):Yje(t,e,r):typeof t=="object"&&t!==null?i?jje(t,e,r):qje(t,e,r):JSON.stringify(t)}function Gie(t){return qie(t,vt.TOP_LEVEL,"")}function sd(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let i=[];for(let s of e)i.push(r.map(o=>s(o)));let n=r.map((s,o)=>o);return n.sort((s,o)=>{for(let a of i){let l=a[s]<a[o]?-1:a[s]>a[o]?1:0;if(l!==0)return l}return 0}),n.map(s=>r[s])}function Gje(t){let e=new Map,r=sd(t.fallbackExclusionList||[],[({name:i,reference:n})=>i,({name:i,reference:n})=>n]);for(let{name:i,reference:n}of r){let s=e.get(i);typeof s=="undefined"&&e.set(i,s=new Set),s.add(n)}return Array.from(e).map(([i,n])=>[i,Array.from(n)])}function Jje(t){return sd(t.fallbackPool||[],([e])=>e)}function Wje(t){let e=[];for(let[r,i]of sd(t.packageRegistry,([n])=>n===null?"0":`1${n}`)){let n=[];e.push([r,n]);for(let[s,{packageLocation:o,packageDependencies:a,packagePeers:l,linkType:c,discardFromLookup:u}]of sd(i,([g])=>g===null?"0":`1${g}`)){let g=[];r!==null&&s!==null&&!a.has(r)&&g.push([r,s]);for(let[p,m]of sd(a.entries(),([I])=>I))g.push([p,m]);let f=l&&l.size>0?Array.from(l):void 0,h=u||void 0;n.push([s,{packageLocation:o,packageDependencies:g,packagePeers:f,linkType:c,discardFromLookup:h}])}}return e}function od(t){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost. We also recommend you not to read","it either without using the @yarnpkg/pnp package, as the data layout","is entirely unspecified and WILL change from a version to another."],dependencyTreeRoots:t.dependencyTreeRoots,enableTopLevelFallback:t.enableTopLevelFallback||!1,ignorePatternData:t.ignorePattern||null,fallbackExclusionList:Gje(t),fallbackPool:Jje(t),packageRegistryData:Wje(t)}}var zie=re(Wie());function Vie(t,e){return[t?`${t}
|
|||
|
`:"",`/* eslint-disable */
|
|||
|
|
|||
|
`,`try {
|
|||
|
`,` Object.freeze({}).detectStrictMode = true;
|
|||
|
`,`} catch (error) {
|
|||
|
`," throw new Error(`The whole PnP file got strict-mode-ified, which is known to break (Emscripten libraries aren't strict mode). This usually happens when the file goes through Babel.`);\n",`}
|
|||
|
`,`
|
|||
|
`,`var __non_webpack_module__ = module;
|
|||
|
`,`
|
|||
|
`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
|||
|
`,e.replace(/^/gm," "),`}
|
|||
|
`,`
|
|||
|
`,(0,zie.default)()].join("")}function zje(t){return JSON.stringify(t,null,2)}function Vje(t){return[`return hydrateRuntimeState(${Gie(t)}, {basePath: basePath || __dirname});
|
|||
|
`].join("")}function Xje(t){return[`var path = require('path');
|
|||
|
`,`var dataLocation = path.resolve(__dirname, ${JSON.stringify(t)});
|
|||
|
`,`return hydrateRuntimeState(require(dataLocation), {basePath: basePath || path.dirname(dataLocation)});
|
|||
|
`].join("")}function Xie(t){let e=od(t),r=Vje(e);return Vie(t.shebang,r)}function Zie(t){let e=od(t),r=Xje(t.dataLocation),i=Vie(t.shebang,r);return{dataFile:zje(e),loaderFile:i}}var tne=re(require("fs")),eqe=re(require("path")),rne=re(require("util"));function KF(t,{basePath:e}){let r=K.toPortablePath(e),i=D.resolve(r),n=t.ignorePatternData!==null?new RegExp(t.ignorePatternData):null,s=new Map,o=new Map(t.packageRegistryData.map(([g,f])=>[g,new Map(f.map(([h,p])=>{var S;if(g===null!=(h===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let m=(S=p.discardFromLookup)!=null?S:!1,I={name:g,reference:h},w=s.get(p.packageLocation);w?(w.discardFromLookup=w.discardFromLookup&&m,m||(w.locator=I)):s.set(p.packageLocation,{locator:I,discardFromLookup:m});let Q=null;return[h,{packageDependencies:new Map(p.packageDependencies),packagePeers:new Set(p.packagePeers),linkType:p.linkType,discardFromLookup:m,get packageLocation(){return Q||(Q=D.join(i,p.packageLocation))}}]}))])),a=new Map(t.fallbackExclusionList.map(([g,f])=>[g,new Set(f)])),l=new Map(t.fallbackPool),c=t.dependencyTreeRoots,u=t.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:c,enableTopLevelFallback:u,fallbackExclusionList:a,fallbackPool:l,ignorePattern:n,packageLocatorsByLocations:s,packageRegistry:o}}var Ou=re(require("module")),ene=re($ie()),UF=re(require("util"));var Jt;(function(l){l.API_ERROR="API_ERROR",l.BUILTIN_NODE_RESOLUTION_FAILED="BUILTIN_NODE_RESOLUTION_FAILED",l.MISSING_DEPENDENCY="MISSING_DEPENDENCY",l.MISSING_PEER_DEPENDENCY="MISSING_PEER_DEPENDENCY",l.QUALIFIED_PATH_RESOLUTION_FAILED="QUALIFIED_PATH_RESOLUTION_FAILED",l.INTERNAL="INTERNAL",l.UNDECLARED_DEPENDENCY="UNDECLARED_DEPENDENCY",l.UNSUPPORTED="UNSUPPORTED"})(Jt||(Jt={}));var $je=new Set([Jt.BUILTIN_NODE_RESOLUTION_FAILED,Jt.MISSING_DEPENDENCY,Jt.MISSING_PEER_DEPENDENCY,Jt.QUALIFIED_PATH_RESOLUTION_FAILED,Jt.UNDECLARED_DEPENDENCY]);function Lr(t,e,r={}){let i=$je.has(t)?"MODULE_NOT_FOUND":t,n={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(e),{code:z(v({},n),{value:i}),pnpCode:z(v({},n),{value:t}),data:z(v({},n),{value:r})})}function xa(t){return K.normalize(K.fromPortablePath(t))}function HF(t,e){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,i=Number(process.env.PNP_DEBUG_LEVEL),n=new Set(Ou.Module.builtinModules||Object.keys(process.binding("natives"))),s=te=>n.has(te)||te.startsWith("node:"),o=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,a=/^(\/|\.{1,2}(\/|$))/,l=/\/$/,c=/^\.{0,2}\//,u={name:null,reference:null},g=[],f=new Set;if(t.enableTopLevelFallback===!0&&g.push(u),e.compatibilityMode!==!1)for(let te of["react-scripts","gatsby"]){let ce=t.packageRegistry.get(te);if(ce)for(let De of ce.keys()){if(De===null)throw new Error("Assertion failed: This reference shouldn't be null");g.push({name:te,reference:De})}}let{ignorePattern:h,packageRegistry:p,packageLocatorsByLocations:m}=t;function I(te,ce){return{fn:te,args:ce,error:null,result:null}}function w(te){var pe,ke,Z,V,Ae,ue;let ce=(Z=(ke=(pe=process.stderr)==null?void 0:pe.hasColors)==null?void 0:ke.call(pe))!=null?Z:process.stdout.isTTY,De=(Qe,nt)=>`[${Qe}m${nt}[0m`,fe=te.error;console.error(fe?De("31;1",`\u2716 ${(V=te.error)==null?void 0:V.message.replace(/\n.*/s,"")}`):De("33;1","\u203C Resolution")),te.args.length>0&&console.error();for(let Qe of te.args)console.error(` ${De("37;1","In \u2190")} ${(0,UF.inspect)(Qe,{colors:ce,compact:!0})}`);te.result&&(console.error(),console.error(` ${De("37;1","Out \u2192")} ${(0,UF.inspect)(te.result,{colors:ce,compact:!0})}`));let Be=(ue=(Ae=new Error().stack.match(/(?<=^ +)at.*/gm))==null?void 0:Ae.slice(2))!=null?ue:[];if(Be.length>0){console.error();for(let Qe of Be)console.error(` ${De("38;5;244",Qe)}`)}console.error()}function Q(te,ce){if(e.allowDebug===!1)return ce;if(Number.isFinite(i)){if(i>=2)return(...De)=>{let fe=I(te,De);try{return fe.result=ce(...De)}catch(Be){throw fe.error=Be}finally{w(fe)}};if(i>=1)return(...De)=>{try{return ce(...D
|
|||
|
|
|||
|
Require request: "${fe}"
|
|||
|
Required by: ${Be}
|
|||
|
`,{request:fe,issuer:Be});return K.toPortablePath(Z)}let pe,ke=te.match(o);if(ke){if(!ce)throw Lr(Jt.API_ERROR,"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:fe,issuer:Be});let[,Z,V]=ke,Ae=j(ce);if(!Ae){let _t=Y(te,ce);if(_t===!1)throw Lr(Jt.BUILTIN_NODE_RESOLUTION_FAILED,`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree).
|
|||
|
|
|||
|
Require path: "${fe}"
|
|||
|
Required by: ${Be}
|
|||
|
`,{request:fe,issuer:Be});return K.toPortablePath(_t)}let Qe=S(Ae).packageDependencies.get(Z),nt=null;if(Qe==null&&Ae.name!==null){let _t=t.fallbackExclusionList.get(Ae.name);if(!_t||!_t.has(Ae.reference)){for(let Zn=0,ng=g.length;Zn<ng;++Zn){let Rs=S(g[Zn]).packageDependencies.get(Z);if(Rs!=null){r?nt=Rs:Qe=Rs;break}}if(t.enableTopLevelFallback&&Qe==null&&nt===null){let Zn=t.fallbackPool.get(Z);Zn!=null&&(nt=Zn)}}}let dt=null;if(Qe===null)if(R(Ae))dt=Lr(Jt.MISSING_PEER_DEPENDENCY,`Your application tried to access ${Z} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed.
|
|||
|
|
|||
|
Required package: ${Z}${Z!==fe?` (via "${fe}")`:""}
|
|||
|
Required by: ${Be}
|
|||
|
`,{request:fe,issuer:Be,dependencyName:Z});else{let _t=ne(Z,Ae);_t.every(en=>R(en))?dt=Lr(Jt.MISSING_PEER_DEPENDENCY,`${Ae.name} tried to access ${Z} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Z}${Z!==fe?` (via "${fe}")`:""}
|
|||
|
Required by: ${Ae.name}@${Ae.reference} (via ${Be})
|
|||
|
${_t.map(en=>`Ancestor breaking the chain: ${en.name}@${en.reference}
|
|||
|
`).join("")}
|
|||
|
`,{request:fe,issuer:Be,issuerLocator:Object.assign({},Ae),dependencyName:Z,brokenAncestors:_t}):dt=Lr(Jt.MISSING_PEER_DEPENDENCY,`${Ae.name} tried to access ${Z} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Z}${Z!==fe?` (via "${fe}")`:""}
|
|||
|
Required by: ${Ae.name}@${Ae.reference} (via ${Be})
|
|||
|
|
|||
|
${_t.map(en=>`Ancestor breaking the chain: ${en.name}@${en.reference}
|
|||
|
`).join("")}
|
|||
|
`,{request:fe,issuer:Be,issuerLocator:Object.assign({},Ae),dependencyName:Z,brokenAncestors:_t})}else Qe===void 0&&(!De&&s(te)?R(Ae)?dt=Lr(Jt.UNDECLARED_DEPENDENCY,`Your application tried to access ${Z}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${Z} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Z}${Z!==fe?` (via "${fe}")`:""}
|
|||
|
Required by: ${Be}
|
|||
|
`,{request:fe,issuer:Be,dependencyName:Z}):dt=Lr(Jt.UNDECLARED_DEPENDENCY,`${Ae.name} tried to access ${Z}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${Z} isn't otherwise declared in ${Ae.name}'s dependencies, this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Z}${Z!==fe?` (via "${fe}")`:""}
|
|||
|
Required by: ${Be}
|
|||
|
`,{request:fe,issuer:Be,issuerLocator:Object.assign({},Ae),dependencyName:Z}):R(Ae)?dt=Lr(Jt.UNDECLARED_DEPENDENCY,`Your application tried to access ${Z}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Z}${Z!==fe?` (via "${fe}")`:""}
|
|||
|
Required by: ${Be}
|
|||
|
`,{request:fe,issuer:Be,dependencyName:Z}):dt=Lr(Jt.UNDECLARED_DEPENDENCY,`${Ae.name} tried to access ${Z}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
|
|||
|
|
|||
|
Required package: ${Z}${Z!==fe?` (via "${fe}")`:""}
|
|||
|
Required by: ${Ae.name}@${Ae.reference} (via ${Be})
|
|||
|
`,{request:fe,issuer:Be,issuerLocator:Object.assign({},Ae),dependencyName:Z}));if(Qe==null){if(nt===null||dt===null)throw dt||new Error("Assertion failed: Expected an error to have been set");Qe=nt;let _t=dt.message.replace(/\n.*/g,"");dt.message=_t,!f.has(_t)&&i!==0&&(f.add(_t),process.emitWarning(dt))}let Bt=Array.isArray(Qe)?{name:Qe[0],reference:Qe[1]}:{name:Z,reference:Qe},kn=S(Bt);if(!kn.packageLocation)throw Lr(Jt.MISSING_DEPENDENCY,`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod.
|
|||
|
|
|||
|
Required package: ${Bt.name}@${Bt.reference}${Bt.name!==fe?` (via "${fe}")`:""}
|
|||
|
Required by: ${Ae.name}@${Ae.reference} (via ${Be})
|
|||
|
`,{request:fe,issuer:Be,dependencyLocator:Object.assign({},Bt)});let Bi=kn.packageLocation;V?pe=D.join(Bi,V):pe=Bi}else if(D.isAbsolute(te))pe=D.normalize(te);else{if(!ce)throw Lr(Jt.API_ERROR,"The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:fe,issuer:Be});let Z=D.resolve(ce);ce.match(l)?pe=D.normalize(D.join(Z,te)):pe=D.normalize(D.join(D.dirname(Z),te))}return D.normalize(pe)}function Me(te,ce){if(a.test(te))return ce;let De=U(ce);return De?D.normalize(De):ce}function ve(te,{extensions:ce=Object.keys(Ou.Module._extensions)}={}){let De=[],fe=L(te,De,{extensions:ce});if(fe)return D.normalize(fe);{let Be=xa(te),pe=j(te);if(pe){let{packageLocation:ke}=S(pe);if(!e.fakeFs.existsSync(ke)){let Z=ke.includes("/unplugged/")?"Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).":"Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.";throw Lr(Jt.QUALIFIED_PATH_RESOLUTION_FAILED,`${Z}
|
|||
|
|
|||
|
Missing package: ${pe.name}@${pe.reference}
|
|||
|
Expected package location: ${xa(ke)}
|
|||
|
`,{unqualifiedPath:Be})}}throw Lr(Jt.QUALIFIED_PATH_RESOLUTION_FAILED,`Qualified path resolution failed - none of those files can be found on the disk.
|
|||
|
|
|||
|
Source path: ${Be}
|
|||
|
${De.map(ke=>`Not found: ${xa(ke)}
|
|||
|
`).join("")}`,{unqualifiedPath:Be})}}function He(te,ce,{considerBuiltins:De,extensions:fe}={}){let Be=N(te,ce,{considerBuiltins:De});if(Be===null)return null;let pe=()=>ce!==null?$(ce):!1,ke=(!De||!s(te))&&!pe()?Me(te,Be):Be;try{return ve(ke,{extensions:fe})}catch(Z){throw Z.pnpCode==="QUALIFIED_PATH_RESOLUTION_FAILED"&&Object.assign(Z.data,{request:xa(te),issuer:ce&&xa(ce)}),Z}}function Ke(te){let ce=D.normalize(te),De=or.resolveVirtual(ce);return De!==ce?De:null}return{VERSIONS:H,topLevel:A,getLocator:(te,ce)=>Array.isArray(ce)?{name:ce[0],reference:ce[1]}:{name:te,reference:ce},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){let te=[];for(let[ce,De]of p)for(let fe of De.keys())ce!==null&&fe!==null&&te.push({name:ce,reference:fe});return te},getPackageInformation:te=>{let ce=J(te);if(ce===null)return null;let De=K.fromPortablePath(ce.packageLocation);return z(v({},ce),{packageLocation:De})},findPackageLocator:te=>j(K.toPortablePath(te)),resolveToUnqualified:Q("resolveToUnqualified",(te,ce,De)=>{let fe=ce!==null?K.toPortablePath(ce):null,Be=N(K.toPortablePath(te),fe,De);return Be===null?null:K.fromPortablePath(Be)}),resolveUnqualified:Q("resolveUnqualified",(te,ce)=>K.fromPortablePath(ve(K.toPortablePath(te),ce))),resolveRequest:Q("resolveRequest",(te,ce,De)=>{let fe=ce!==null?K.toPortablePath(ce):null,Be=He(K.toPortablePath(te),fe,De);return Be===null?null:K.fromPortablePath(Be)}),resolveVirtual:Q("resolveVirtual",te=>{let ce=Ke(K.toPortablePath(te));return ce!==null?K.fromPortablePath(ce):null})}}var amt=(0,rne.promisify)(tne.readFile);var ine=(t,e,r)=>{let i=od(t),n=KF(i,{basePath:e}),s=K.join(e,Pt.pnpCjs);return HF(n,{fakeFs:r,pnpapiResolution:s})};var Sa={};rt(Sa,{checkAndReportManifestCompatibility:()=>nne,extractBuildScripts:()=>wB,getExtractHint:()=>YF,hasBindingGyp:()=>jF});function nne(t,e,r,{configuration:i,report:n}){return ze.isManifestFieldCompatible(e.manifest.os,process.platform)?ze.isManifestFieldCompatible(e.manifest.cpu,process.arch)?!0:(n==null||n.reportWarningOnce(W.INCOMPATIBLE_CPU,`${b.prettyLocator(i,t)} The CPU architecture ${process.arch} is incompatible with this module, ${r} skipped.`),!1):(n==null||n.reportWarningOnce(W.INCOMPATIBLE_OS,`${b.prettyLocator(i,t)} The platform ${process.platform} is incompatible with this module, ${r} skipped.`),!1)}function wB(t,e,r,{configuration:i,report:n}){let s=[];for(let a of["preinstall","install","postinstall"])e.manifest.scripts.has(a)&&s.push([Zi.SCRIPT,a]);return!e.manifest.scripts.has("install")&&e.misc.hasBindingGyp&&s.push([Zi.SHELLCODE,"node-gyp rebuild"]),s.length===0?[]:t.linkType!==ht.HARD?(n==null||n.reportWarningOnce(W.SOFT_LINK_BUILD,`${b.prettyLocator(i,t)} lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored.`),[]):r&&r.built===!1?(n==null||n.reportInfoOnce(W.BUILD_DISABLED,`${b.prettyLocator(i,t)} lists build scripts, but its build has been explicitly disabled through configuration.`),[]):!i.get("enableScripts")&&!r.built?(n==null||n.reportWarningOnce(W.DISABLED_BUILD_SCRIPTS,`${b.prettyLocator(i,t)} lists build scripts, but all build scripts have been disabled.`),[]):nne(t,e,"build",{configuration:i,report:n})?s:[]}var tqe=new Set([".exe",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function YF(t){return t.packageFs.getExtractHint({relevantExtensions:tqe})}function jF(t){let e=D.join(t.prefixPath,"binding.gyp");return t.packageFs.existsSync(e)}var qF={};rt(qF,{getUnpluggedPath:()=>ad});function ad(t,{configuration:e}){return D.resolve(e.get("pnpUnpluggedFolder"),b.slugifyLocator(t))}var rqe=new Set([b.makeIdent(null,"nan").identHash,b.makeIdent(null,"node-gyp").identHash,b.makeIdent(null,"node-pre-gyp").identHash,b.makeIdent(null,"node-addon-api").identHash,b.makeIdent(null,"fsevents").identHash]),El=class{constructor(){this.mode="strict";this.pnpCache=new Map}supportsPackage(e,r){return!(r.project.configuration.get("nodeLinker")!=="pnp"||r.project.configuration.get("pnpMode")!==this.mode)}async findPackageLocation(e,r){let i=ka(
|
|||
|
`,n+=`# cause your node_modules installation to become invalidated.
|
|||
|
`,n+=`
|
|||
|
`,n+=`__metadata:
|
|||
|
`,n+=` version: ${dne}
|
|||
|
`,n+=` nmMode: ${i.value}
|
|||
|
`;let s=Array.from(e.keys()).sort(),o=b.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let c of s){let u=e.get(c);n+=`
|
|||
|
`,n+=`${JSON.stringify(c)}:
|
|||
|
`,n+=` locations:
|
|||
|
`;for(let g of u.locations){let f=D.contains(t.cwd,g);if(f===null)throw new Error(`Assertion failed: Expected the path to be within the project (${g})`);n+=` - ${JSON.stringify(f)}
|
|||
|
`}if(u.aliases.length>0){n+=` aliases:
|
|||
|
`;for(let g of u.aliases)n+=` - ${JSON.stringify(g)}
|
|||
|
`}if(c===o&&r.size>0){n+=` bin:
|
|||
|
`;for(let[g,f]of r){let h=D.contains(t.cwd,g);if(h===null)throw new Error(`Assertion failed: Expected the path to be within the project (${g})`);n+=` ${JSON.stringify(h)}:
|
|||
|
`;for(let[p,m]of f){let I=D.relative(D.join(g,Mr),m);n+=` ${JSON.stringify(p)}: ${JSON.stringify(I)}
|
|||
|
`}}}}let a=t.cwd,l=D.join(a,Mr,Cne);await M.changeFilePromise(l,n,{automaticNewlines:!0})}async function eR(t,{unrollAliases:e=!1}={}){let r=t.cwd,i=D.join(r,Mr,Cne);if(!M.existsSync(i))return null;let n=jr(await M.readFilePromise(i,"utf8"));if(n.__metadata.version>dne)return null;let s=n.__metadata.nmMode||Gr.CLASSIC,o=new Map,a=new Map;delete n.__metadata;for(let[l,c]of Object.entries(n)){let u=c.locations.map(f=>D.join(r,f)),g=c.bin;if(g)for(let[f,h]of Object.entries(g)){let p=D.join(r,K.toPortablePath(f)),m=he.getMapWithDefault(a,p);for(let[I,w]of Object.entries(h))m.set(sr(I),K.toPortablePath([p,Mr,w].join(D.delimiter)))}if(o.set(l,{target:xe.dot,linkType:ht.HARD,locations:u,aliases:c.aliases||[]}),e&&c.aliases)for(let f of c.aliases){let{scope:h,name:p}=b.parseLocator(l),m=b.makeLocator(b.makeIdent(h,p),f),I=b.stringifyLocator(m);o.set(I,{target:xe.dot,linkType:ht.HARD,locations:u,aliases:[]})}}return{locatorMap:o,binSymlinks:a,locationTree:Ene(o,{skipPrefix:t.cwd}),nmMode:s}}var Yu=async(t,e)=>{if(t.split(D.sep).indexOf(Mr)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{if(!e.innerLoop&&(await M.lstatPromise(t)).isSymbolicLink()){await M.unlinkPromise(t);return}let r=await M.readdirPromise(t,{withFileTypes:!0});for(let i of r){let n=D.join(t,sr(i.name));i.isDirectory()?(i.name!==Mr||e&&e.innerLoop)&&await Yu(n,{innerLoop:!0,contentsOnly:!1}):await M.unlinkPromise(n)}e.contentsOnly||await M.rmdirPromise(t)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},yne=4,QB=(t,{skipPrefix:e})=>{let r=D.contains(e,t);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${t} which is outside project root: ${e}`);let i=r.split(D.sep).filter(l=>l!==""),n=i.indexOf(Mr),s=i.slice(0,n).join(D.sep),o=D.join(e,s),a=i.slice(n);return{locationRoot:o,segments:a}},Ene=(t,{skipPrefix:e})=>{let r=new Map;if(t===null)return r;let i=()=>({children:new Map,linkType:ht.HARD});for(let[n,s]of t.entries()){if(s.linkType===ht.SOFT&&D.contains(e,s.target)!==null){let a=he.getFactoryWithDefault(r,s.target,i);a.locator=n,a.linkType=s.linkType}for(let o of s.locations){let{locationRoot:a,segments:l}=QB(o,{skipPrefix:e}),c=he.getFactoryWithDefault(r,a,i);for(let u=0;u<l.length;++u){let g=l[u];if(g!=="."){let f=he.getFactoryWithDefault(c.children,g,i);c.children.set(g,f),c=f}u===l.length-1&&(c.locator=n,c.linkType=s.linkType)}}}return r},tR=async(t,e)=>{let r;try{process.platform==="win32"&&(r=await M.lstatPromise(t))}catch(i){}process.platform=="win32"&&(!r||r.isDirectory())?await M.symlinkPromise(t,e,"junction"):await M.symlinkPromise(D.relative(D.dirname(e),t),e)};async function Bne(t,e,r){let i=D.join(t,sr(`${ZF.default.randomBytes(16).toString("hex")}.tmp`));try{await M.writeFilePromise(i,r);try{await M.linkPromise(i,e)}catch(n){}}finally{await M.unlinkPromise(i)}}async function xqe({srcPath:t,dstPath:e,srcMode:r,globalHardlinksStore:i,baseFs:n,nmMode:s,digest:o}){if(s.value===Gr.HARDLINKS_GLOBAL&&i&&o){let l=D.join(i,o.substring(0,2),`${o.substring(2)}.dat`),c;try{if(await Si.checksumFile(l,{baseFs:M,algorithm:"sha1"})!==o){let g=D.join(i,sr(`${ZF.default.randomBytes(16).toString("hex")}.tmp`));await M.renamePromise(l,g);let f=await n.readFilePromise(t);await M.writeFilePromise(g,f);try{await M.linkPromise(g,l),await M.unlinkPromise(g)}catch(h){}}await M.linkPromise(l,e),c=!0}catch(u){c=!1}if(!c){let u=await n.readFilePromise(t);await Bne(i,l,u);try{await M.linkPromise(l,e)}catch(g){g&&g.code&&g.code=="EXDEV"&&(s.value=Gr.HARDLINKS_LOCAL,await n.copyFilePromise(t,e))}}}else await n.copyFilePromise(t,e);let a=r&511;a!==420&&await M.chmodPromise(e,a)}var va;(function(i){i.FILE="file",i.DIRECTORY="directory",i.SYMLINK="symlink"})(va||(va={}));var Sqe=async(t,e,{baseFs:r,globalHardlinksStore:i,nmMode:n,packageChecksum:s})=>{await M.mkdirPromise(t,{recursive:!0});let o=async(l=xe.dot)=>{let c=D.join(e,l),u=await r.readdirPromise(c,{withFileTypes:!0}),g=new Map;for(let f of u){let h=D.join(l,f.name),p,m=D.join(c,f.name);if(f.isFile()){if(p={kind:va.FILE,mode:(aw
|
|||
|
This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths).
|
|||
|
|
|||
|
For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`.
|
|||
|
|
|||
|
Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${ZB.map(e=>`\`${e}\``).join(", ")}.
|
|||
|
|
|||
|
If the \`--json\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages.
|
|||
|
|
|||
|
To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--json\` flag or use \`yarn why <package>\` to get more information as to who depends on them.
|
|||
|
`,examples:[["Checks for known security issues with the installed packages. The output is a list of known issues.","yarn npm audit"],["Audit dependencies in all workspaces","yarn npm audit --all"],["Limit auditing to `dependencies` (excludes `devDependencies`)","yarn npm audit --environment production"],["Show audit report as valid JSON","yarn npm audit --json"],["Audit all direct and transitive dependencies","yarn npm audit --recursive"],["Output moderate (or more severe) vulnerabilities","yarn npm audit --severity moderate"]]});var Soe=Dd;var koe=re(require("path")),lN=re(hr()),cN=re(require("util")),xd=class extends Ee{constructor(){super(...arguments);this.fields=q.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=q.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=q.Rest()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),{project:r}=await Ne.find(e,this.context.cwd),i=typeof this.fields!="undefined"?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,n=[],s=!1,o=await Fe.start({configuration:e,includeFooter:!1,json:this.json,stdout:this.context.stdout},async a=>{for(let l of this.packages){let c;if(l==="."){let S=r.topLevelWorkspace;if(!S.manifest.name)throw new Ie(`Missing 'name' field in ${koe.default.join(S.cwd,"package.json")}`);c=b.makeDescriptor(S.manifest.name,"unknown")}else c=b.parseDescriptor(l);let u=Dt.getIdentUrl(c),g=uN(await Dt.get(u,{configuration:e,ident:c,jsonResponse:!0,customErrorMessage:Dt.customPackageError})),f=Object.keys(g.versions).sort(lN.default.compareLoose),p=g["dist-tags"].latest||f[f.length-1],m=Ft.validRange(c.range);if(m){let S=lN.default.maxSatisfying(f,m);S!==null?p=S:(a.reportWarning(W.UNNAMED,`Unmet range ${b.prettyRange(e,c.range)}; falling back to the latest version`),s=!0)}else c.range!=="unknown"&&(a.reportWarning(W.UNNAMED,`Invalid range ${b.prettyRange(e,c.range)}; falling back to the latest version`),s=!0);let I=g.versions[p],w=z(v(v({},g),I),{version:p,versions:f}),Q;if(i!==null){Q={};for(let S of i){let R=w[S];if(typeof R!="undefined")Q[S]=R;else{a.reportWarning(W.EXCEPTION,`The '${S}' field doesn't exist inside ${b.prettyIdent(e,c)}'s informations`),s=!0;continue}}}else this.json||(delete w.dist,delete w.readme,delete w.users),Q=w;a.reportJson(Q),this.json||n.push(Q)}});cN.inspect.styles.name="cyan";for(let a of n)(a!==n[0]||s)&&this.context.stdout.write(`
|
|||
|
`),this.context.stdout.write(`${(0,cN.inspect)(a,{depth:Infinity,colors:!0,compact:!1})}
|
|||
|
`);return o.exitCode()}};xd.paths=[["npm","info"]],xd.usage=Ce.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command will fetch information about a package from the npm registry, and prints it in a tree format.\n\n The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\n\n Append `@<range>` to the package argument to provide information specific to the latest version that satisfies the range. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\n\n If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package informations.\n\n By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\n ",examples:[["Show all available information about react (except the `dist`, `readme`, and `users` fields)","yarn npm info react"],["Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)","yarn npm info react --json"],["Show all available information about react 16.12.0","yarn npm info react@16.12.0"],["Show the description of react","yarn npm info react --fields description"],["Show all available versions of react","yarn npm info react --fields versions"],["Show the readme of react","yarn npm info react --fields readme"],["Show a few fields of react","yarn npm info react --fields homepage,repository"]]});var voe=xd;function uN(t){if(Array.isArray(t)){let e=[];for(let r of t)r=uN(r),r&&e.push(r);return e}else if(typeof t=="object"&&t!==null){let e={};for(let r of Object.keys(t)){if(r.startsWith("_"))continue;let i=uN(t[r]);i&&(e[r]=i)}return e}else return t||null}var Poe=re(pp()),Sd=class extends Ee{constructor(){super(...arguments);this.scope=q.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=q.Boolean("--publish",!1,{description:"Login to the publish registry"})}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),r=await _B({configuration:e,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Fe.start({configuration:e,stdout:this.context.stdout},async n=>{let s=await G3e({registry:r,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),o=`/-/user/org.couchdb.user:${encodeURIComponent(s.name)}`,a=await Dt.put(o,s,{attemptedAs:s.name,configuration:e,registry:r,jsonResponse:!0,authType:Dt.AuthType.NO_AUTH});return await q3e(r,a.token,{configuration:e,scope:this.scope}),n.reportInfo(W.UNNAMED,"Successfully logged in")})).exitCode()}};Sd.paths=[["npm","login"]],Sd.usage=Ce.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]});var Foe=Sd;async function _B({scope:t,publish:e,configuration:r,cwd:i}){return t&&e?Wt.getScopeRegistry(t,{configuration:r,type:Wt.RegistryType.PUBLISH_REGISTRY}):
|
|||
|
This command will list all tags of a package from the npm registry.
|
|||
|
|
|||
|
If the package is not specified, Yarn will default to the current workspace.
|
|||
|
`,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]});var Moe=Pd;async function Fd(t,e){let r=`/-/package${Dt.getIdentUrl(t)}/dist-tags`;return Dt.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:Dt.customPackageError})}var Rd=class extends Ee{constructor(){super(...arguments);this.package=q.String();this.tag=q.String()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ne.find(e,this.context.cwd);if(!i)throw new _e(r.cwd,this.context.cwd);let n=b.parseDescriptor(this.package,!0),s=n.range;if(!Toe.default.valid(s))throw new Ie(`The range ${ae.pretty(e,n.range,ae.Type.RANGE)} must be a valid semver version`);let o=Wt.getPublishRegistry(i.manifest,{configuration:e}),a=ae.pretty(e,n,ae.Type.IDENT),l=ae.pretty(e,s,ae.Type.RANGE),c=ae.pretty(e,this.tag,ae.Type.CODE);return(await Fe.start({configuration:e,stdout:this.context.stdout},async g=>{let f=await Fd(n,e);Object.prototype.hasOwnProperty.call(f,this.tag)&&f[this.tag]===s&&g.reportWarning(W.UNNAMED,`Tag ${c} is already set to version ${l}`);let h=`/-/package${Dt.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await Dt.put(h,s,{configuration:e,registry:o,ident:n,jsonRequest:!0,jsonResponse:!0}),g.reportInfo(W.UNNAMED,`Tag ${c} added to version ${l} of package ${a}`)})).exitCode()}};Rd.paths=[["npm","tag","add"]],Rd.usage=Ce.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:`
|
|||
|
This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten.
|
|||
|
`,examples:[["Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`","yarn npm tag add my-pkg@2.3.4-beta.4 beta"]]});var Koe=Rd;var Nd=class extends Ee{constructor(){super(...arguments);this.package=q.String();this.tag=q.String()}async execute(){if(this.tag==="latest")throw new Ie("The 'latest' tag cannot be removed.");let e=await le.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ne.find(e,this.context.cwd);if(!i)throw new _e(r.cwd,this.context.cwd);let n=b.parseIdent(this.package),s=Wt.getPublishRegistry(i.manifest,{configuration:e}),o=ae.pretty(e,this.tag,ae.Type.CODE),a=ae.pretty(e,n,ae.Type.IDENT),l=await Fd(n,e);if(!Object.prototype.hasOwnProperty.call(l,this.tag))throw new Ie(`${o} is not a tag of package ${a}`);return(await Fe.start({configuration:e,stdout:this.context.stdout},async u=>{let g=`/-/package${Dt.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await Dt.del(g,{configuration:e,registry:s,ident:n,jsonResponse:!0}),u.reportInfo(W.UNNAMED,`Tag ${o} removed from package ${a}`)})).exitCode()}};Nd.paths=[["npm","tag","remove"]],Nd.usage=Ce.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:`
|
|||
|
This command will remove a tag from a package from the npm registry.
|
|||
|
`,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]});var Ooe=Nd;var Ld=class extends Ee{constructor(){super(...arguments);this.scope=q.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=q.Boolean("--publish",!1,{description:"Print username for the publish registry"})}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),r;return this.scope&&this.publish?r=Wt.getScopeRegistry(this.scope,{configuration:e,type:Wt.RegistryType.PUBLISH_REGISTRY}):this.scope?r=Wt.getScopeRegistry(this.scope,{configuration:e}):this.publish?r=Wt.getPublishRegistry((await bu(e,this.context.cwd)).manifest,{configuration:e}):r=Wt.getDefaultRegistry({configuration:e}),(await Fe.start({configuration:e,stdout:this.context.stdout},async n=>{var o,a;let s;try{s=await Dt.get("/-/whoami",{configuration:e,registry:r,authType:Dt.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?b.makeIdent(this.scope,""):void 0})}catch(l){if(((o=l.response)==null?void 0:o.statusCode)===401||((a=l.response)==null?void 0:a.statusCode)===403){n.reportError(W.AUTHENTICATION_INVALID,"Authentication failed - your credentials may have expired");return}else throw l}n.reportInfo(W.UNNAMED,s.username)})).exitCode()}};Ld.paths=[["npm","whoami"]],Ld.usage=Ce.Usage({category:"Npm-related commands",description:"display the name of the authenticated user",details:"\n Print the username associated with the current authentication settings to the standard output.\n\n When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\n\n When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\n ",examples:[["Print username for the default registry","yarn npm whoami"],["Print username for the registry on a given scope","yarn npm whoami --scope company"]]});var Uoe=Ld;var z3e={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:ge.STRING,default:null}},commands:[Soe,voe,Foe,Noe,Loe,Koe,Moe,Ooe,Uoe]},V3e=z3e;var EN={};rt(EN,{default:()=>uWe,patchUtils:()=>fN});var fN={};rt(fN,{applyPatchFile:()=>rw,diffFolders:()=>CN,extractPackageToDisk:()=>dN,extractPatchFlags:()=>zoe,isParentRequired:()=>pN,loadPatchFiles:()=>Od,makeDescriptor:()=>AWe,makeLocator:()=>hN,parseDescriptor:()=>Td,parseLocator:()=>Kd,parsePatchFile:()=>ew});var Md=class extends Error{constructor(e,r){super(`Cannot apply hunk #${e+1}`);this.hunk=r}};var X3e=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function rg(t){return D.relative(xe.root,D.resolve(xe.root,K.toPortablePath(t)))}function Z3e(t){let e=t.trim().match(X3e);if(!e)throw new Error(`Bad header line: '${t}'`);return{original:{start:Math.max(Number(e[1]),1),length:Number(e[3]||1)},patched:{start:Math.max(Number(e[4]),1),length:Number(e[6]||1)}}}var _3e=420,$3e=493,ur;(function(i){i.Context="context",i.Insertion="insertion",i.Deletion="deletion"})(ur||(ur={}));var Hoe=()=>({semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}),eWe=t=>({header:Z3e(t),parts:[]}),tWe={["@"]:"header",["-"]:ur.Deletion,["+"]:ur.Insertion,[" "]:ur.Context,["\\"]:"pragma",undefined:ur.Context};function iWe(t){let e=[],r=Hoe(),i="parsing header",n=null,s=null;function o(){n&&(s&&(n.parts.push(s),s=null),r.hunks.push(n),n=null)}function a(){o(),e.push(r),r=Hoe()}for(let l=0;l<t.length;l++){let c=t[l];if(i==="parsing header")if(c.startsWith("@@"))i="parsing hunks",r.hunks=[],l-=1;else if(c.startsWith("diff --git ")){r&&r.diffLineFromPath&&
|
|||
|
`)+(n.hunk.parts[0].noNewlineAtEndOfFile?"":`
|
|||
|
`):"";await e.mkdirpPromise(D.dirname(n.path),{chmod:493,utimes:[tw,tw]}),await e.writeFilePromise(n.path,s,{mode:n.mode}),await e.utimesPromise(n.path,tw,tw)}break;case"patch":await ig(e,n.path,async()=>{await sWe(n,{baseFs:e,dryRun:r})});break;case"mode change":{let o=(await e.statPromise(n.path)).mode;if(Yoe(n.newMode)!==Yoe(o))continue;await ig(e,n.path,async()=>{await e.chmodPromise(n.path,n.newMode)})}break;default:he.assertNever(n);break}}function Yoe(t){return(t&64)>0}function joe(t){return t.replace(/\s+$/,"")}function oWe(t,e){return joe(t)===joe(e)}async function sWe({hunks:t,path:e},{baseFs:r,dryRun:i=!1}){let n=await r.statSync(e).mode,o=(await r.readFileSync(e,"utf8")).split(/\n/),a=[],l=0,c=0;for(let g of t){let f=Math.max(c,g.header.patched.start+l),h=Math.max(0,f-c),p=Math.max(0,o.length-f-g.header.original.length),m=Math.max(h,p),I=0,w=0,Q=null;for(;I<=m;){if(I<=h&&(w=f-I,Q=qoe(g,o,w),Q!==null)){I=-I;break}if(I<=p&&(w=f+I,Q=qoe(g,o,w),Q!==null))break;I+=1}if(Q===null)throw new Md(t.indexOf(g),g);a.push(Q),l+=I,c=w+g.header.original.length}if(i)return;let u=0;for(let g of a)for(let f of g)switch(f.type){case"splice":{let h=f.index+u;o.splice(h,f.numToDelete,...f.linesToInsert),u+=f.linesToInsert.length-f.numToDelete}break;case"pop":o.pop();break;case"push":o.push(f.line);break;default:he.assertNever(f);break}await r.writeFilePromise(e,o.join(`
|
|||
|
`),{mode:n})}function qoe(t,e,r){let i=[];for(let n of t.parts)switch(n.type){case ur.Context:case ur.Deletion:{for(let s of n.lines){let o=e[r];if(o==null||!oWe(o,s))return null;r+=1}n.type===ur.Deletion&&(i.push({type:"splice",index:r-n.lines.length,numToDelete:n.lines.length,linesToInsert:[]}),n.noNewlineAtEndOfFile&&i.push({type:"push",line:""}))}break;case ur.Insertion:i.push({type:"splice",index:r,numToDelete:0,linesToInsert:n.lines}),n.noNewlineAtEndOfFile&&i.push({type:"pop"});break;default:he.assertNever(n.type);break}return i}var aWe=/^builtin<([^>]+)>$/;function Goe(t,e){let{source:r,selector:i,params:n}=b.parseRange(t);if(r===null)throw new Error("Patch locators must explicitly define their source");let s=i?i.split(/&/).map(c=>K.toPortablePath(c)):[],o=n&&typeof n.locator=="string"?b.parseLocator(n.locator):null,a=n&&typeof n.version=="string"?n.version:null,l=e(r);return{parentLocator:o,sourceItem:l,patchPaths:s,sourceVersion:a}}function Td(t){let i=Goe(t.range,b.parseDescriptor),{sourceItem:e}=i,r=Tr(i,["sourceItem"]);return z(v({},r),{sourceDescriptor:e})}function Kd(t){let i=Goe(t.reference,b.parseLocator),{sourceItem:e}=i,r=Tr(i,["sourceItem"]);return z(v({},r),{sourceLocator:e})}function Joe({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:i,patchHash:n},s){let o=t!==null?{locator:b.stringifyLocator(t)}:{},a=typeof i!="undefined"?{version:i}:{},l=typeof n!="undefined"?{hash:n}:{};return b.makeRange({protocol:"patch:",source:s(e),selector:r.join("&"),params:v(v(v({},a),l),o)})}function AWe(t,{parentLocator:e,sourceDescriptor:r,patchPaths:i}){return b.makeLocator(t,Joe({parentLocator:e,sourceItem:r,patchPaths:i},b.stringifyDescriptor))}function hN(t,{parentLocator:e,sourcePackage:r,patchPaths:i,patchHash:n}){return b.makeLocator(t,Joe({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:i,patchHash:n},b.stringifyLocator))}function Woe({onAbsolute:t,onRelative:e,onBuiltin:r},i){i.startsWith("~")&&(i=i.slice(1));let s=i.match(aWe);return s!==null?r(s[1]):D.isAbsolute(i)?t(i):e(i)}function zoe(t){let e=t.startsWith("~");return e&&(t=t.slice(1)),{optional:e}}function pN(t){return Woe({onAbsolute:()=>!1,onRelative:()=>!0,onBuiltin:()=>!1},t)}async function Od(t,e,r){let i=t!==null?await r.fetcher.fetch(t,r):null,n=i&&i.localPath?{packageFs:new bt(xe.root),prefixPath:D.relative(xe.root,i.localPath)}:i;i&&i!==n&&i.releaseFs&&i.releaseFs();let s=await he.releaseAfterUseAsync(async()=>await Promise.all(e.map(async o=>{let a=zoe(o),l=await Woe({onAbsolute:async()=>await M.readFilePromise(o,"utf8"),onRelative:async()=>{if(n===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await n.packageFs.readFilePromise(D.join(n.prefixPath,o),"utf8")},onBuiltin:async c=>await r.project.configuration.firstHook(u=>u.getBuiltinPatch,r.project,c)},o);return z(v({},a),{source:l})})));for(let o of s)typeof o.source=="string"&&(o.source=o.source.replace(/\r\n?/g,`
|
|||
|
`));return s}async function dN(t,{cache:e,project:r}){let i=r.storedPackages.get(t.locatorHash);if(typeof i=="undefined")throw new Error("Assertion failed: Expected the package to be registered");let n=r.storedChecksums,s=new br,o=r.configuration.makeFetcher(),a=await o.fetch(t,{cache:e,project:r,fetcher:o,checksums:n,report:s}),l=await M.mktempPromise(),c=D.join(l,"source"),u=D.join(l,"user"),g=D.join(l,".yarn-patch.json");return await Promise.all([M.copyPromise(c,a.prefixPath,{baseFs:a.packageFs}),M.copyPromise(u,a.prefixPath,{baseFs:a.packageFs}),M.writeJsonPromise(g,{locator:b.stringifyLocator(t),version:i.version})]),M.detachTemp(l),u}async function CN(t,e){let r=K.fromPortablePath(t).replace(/\\/g,"/"),i=K.fromPortablePath(e).replace(/\\/g,"/"),{stdout:n,stderr:s}=await Or.execvp("git",["-c","core.safecrlf=false","diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index","--text",r,i],{cwd:K.toPortablePath(process.cwd()),env:z(v({},process.env),{GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""})});if(s.length>0)throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH.
|
|||
|
The following error was reported by 'git':
|
|||
|
${s}`);let o=r.startsWith("/")?a=>a.slice(1):a=>a;return n.replace(new RegExp(`(a|b)(${he.escapeRegExp(`/${o(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${he.escapeRegExp(`/${o(i)}/`)}`,"g"),"$1/").replace(new RegExp(he.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(he.escapeRegExp(`${i}/`),"g"),"")}function Voe(t,{configuration:e,report:r}){for(let i of t.parts)for(let n of i.lines)switch(i.type){case ur.Context:r.reportInfo(null,` ${ae.pretty(e,n,"grey")}`);break;case ur.Deletion:r.reportError(W.FROZEN_LOCKFILE_EXCEPTION,`- ${ae.pretty(e,n,ae.Type.REMOVED)}`);break;case ur.Insertion:r.reportError(W.FROZEN_LOCKFILE_EXCEPTION,`+ ${ae.pretty(e,n,ae.Type.ADDED)}`);break;default:he.assertNever(i.type)}}var mN=class{supports(e,r){return!!e.reference.startsWith("patch:")}getLocalPath(e,r){return null}async fetch(e,r){let i=r.checksums.get(e.locatorHash)||null,[n,s,o]=await r.cache.fetchPackageFromCache(e,i,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${b.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(e,r),skipIntegrityCheck:r.skipIntegrityCheck});return{packageFs:n,releaseFs:s,prefixPath:b.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:o}}async patchPackage(e,r){let{parentLocator:i,sourceLocator:n,sourceVersion:s,patchPaths:o}=Kd(e),a=await Od(i,o,r),l=await M.mktempPromise(),c=D.join(l,"current.zip"),u=await r.fetcher.fetch(n,r),g=b.getIdentVendorPath(e),f=await pi(),h=new Sr(c,{libzip:f,create:!0,level:r.project.configuration.get("compressionLevel")});await h.mkdirpPromise(g),await he.releaseAfterUseAsync(async()=>{await h.copyPromise(g,u.prefixPath,{baseFs:u.packageFs,stableSort:!0})},u.releaseFs),h.saveAndClose();for(let{source:p,optional:m}of a){if(p===null)continue;let I=new Sr(c,{libzip:f,level:r.project.configuration.get("compressionLevel")}),w=new bt(D.resolve(xe.root,g),{baseFs:I});try{await rw(ew(p),{baseFs:w,version:s})}catch(Q){if(!(Q instanceof Md))throw Q;let S=r.project.configuration.get("enableInlineHunks"),R=!S&&!m?" (set enableInlineHunks for details)":"",U=`${b.prettyLocator(r.project.configuration,e)}: ${Q.message}${R}`,L=P=>{!S||Voe(Q.hunk,{configuration:r.project.configuration,report:P})};if(I.discardAndClose(),m){r.report.reportWarningOnce(W.PATCH_HUNK_FAILED,U,{reportExtra:L});continue}else throw new $e(W.PATCH_HUNK_FAILED,U,L)}I.saveAndClose()}return new Sr(c,{libzip:f,level:r.project.configuration.get("compressionLevel")})}};var lWe=2,IN=class{supportsDescriptor(e,r){return!!e.range.startsWith("patch:")}supportsLocator(e,r){return!!e.reference.startsWith("patch:")}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,i){let{patchPaths:n}=Td(e);return n.every(s=>!pN(s))?e:b.bindDescriptor(e,{locator:b.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:i}=Td(e);return[i]}async getCandidates(e,r,i){if(!i.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:n,sourceDescriptor:s,patchPaths:o}=Td(e),a=await Od(n,o,i.fetchOptions),l=r.get(s.descriptorHash);if(typeof l=="undefined")throw new Error("Assertion failed: The dependency should have been resolved");let c=Si.makeHash(`${lWe}`,...a.map(u=>JSON.stringify(u))).slice(0,6);return[hN(e,{parentLocator:n,sourcePackage:l,patchPaths:o,patchHash:c})]}async getSatisfying(e,r,i){return null}async resolve(e,r){let{sourceLocator:i}=Kd(e),n=await r.resolver.resolve(i,r);return v(v({},n),e)}};var Ud=class extends Ee{constructor(){super(...arguments);this.save=q.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=q.String()}async execute(){let e=await le.find(this.context.cwd,this.context.plugins),{project:r,workspace:i}=await Ne.find(e,this.context.cwd);if(!i)throw new _e(r.cwd,this.context.cwd);await r.restoreInstallState();let n=D.resolve(this.context.cwd,K.toPortablePath(this.patchFolder)),s=D.join(n,"../source"),o=D.join(n,"../.yarn-patch.json");if(!M.existsSync(s))throw new
|
|||
|
${o.map(a=>`
|
|||
|
- ${b.prettyLocator(e,a)}`).join("")}`);s=o[0]}if(!r.storedPackages.has(s.locatorHash))throw new Ie("No package found in the project for the given locator");await Fe.start({configuration:e,json:this.json,stdout:this.context.stdout},async o=>{let a=await dN(s,{cache:n,project:r});o.reportJson({locator:b.stringifyLocator(s),path:K.fromPortablePath(a)}),o.reportInfo(W.UNNAMED,`Package ${b.prettyLocator(e,s)} got extracted with success!`),o.reportInfo(W.UNNAMED,`You can now edit the following folder: ${ae.pretty(e,K.fromPortablePath(a),"magenta")}`),o.reportInfo(W.UNNAMED,`Once you are done run ${ae.pretty(e,`yarn patch-commit ${process.platform==="win32"?'"':""}${K.fromPortablePath(a)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};Hd.paths=[["patch"]],Hd.usage=Ce.Usage({description:"prepare a package for patching",details:'\n This command will cause a package to be extracted in a temporary directory (under a folder named "patch-workdir"). This folder will be editable at will; running `yarn patch` inside it will then cause Yarn to generate a patchfile and register it into your top-level manifest (cf the `patch:` protocol).\n '});var Zoe=Hd;var cWe={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:ge.BOOLEAN,default:!1},patchFolder:{description:"Folder where the patch files must be written",type:ge.ABSOLUTE_PATH,default:"./.yarn/patches"}},commands:[Xoe,Zoe],fetchers:[mN],resolvers:[IN]},uWe=cWe;var nB=()=>({modules:new Map([["@yarnpkg/cli",up],["@yarnpkg/core",Hh],["@yarnpkg/fslib",Rg],["@yarnpkg/libzip",Yf],["@yarnpkg/parsers",Xf],["@yarnpkg/shell",_f],["clipanion",T9(Xg)],["semver",gWe],["typanion",Yl],["yup",fWe],["@yarnpkg/plugin-essentials",JP],["@yarnpkg/plugin-compat",XP],["@yarnpkg/plugin-dlx",ZP],["@yarnpkg/plugin-file",oF],["@yarnpkg/plugin-git",CF],["@yarnpkg/plugin-github",IF],["@yarnpkg/plugin-http",BF],["@yarnpkg/plugin-init",DF],["@yarnpkg/plugin-link",PF],["@yarnpkg/plugin-nm",nR],["@yarnpkg/plugin-npm",aN],["@yarnpkg/plugin-npm-cli",gN],["@yarnpkg/plugin-pack",iN],["@yarnpkg/plugin-patch",EN],["@yarnpkg/plugin-pnp",JF]]),plugins:new Set(["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-dlx","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-link","@yarnpkg/plugin-nm","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp"])});Sy({binaryVersion:wr||"<unknown>",pluginConfiguration:nB()});})();
|
|||
|
/*!
|
|||
|
* buildToken
|
|||
|
* Builds OAuth token prefix (helper function)
|
|||
|
*
|
|||
|
* @name buildToken
|
|||
|
* @function
|
|||
|
* @param {GitUrl} obj The parsed Git url object.
|
|||
|
* @return {String} token prefix
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|||
|
*
|
|||
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|||
|
* Licensed under the MIT License.
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|||
|
*
|
|||
|
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|||
|
* Licensed under the MIT License.
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|||
|
*
|
|||
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|||
|
* Released under the MIT License.
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* is-number <https://github.com/jonschlinkert/is-number>
|
|||
|
*
|
|||
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|||
|
* Released under the MIT License.
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* is-windows <https://github.com/jonschlinkert/is-windows>
|
|||
|
*
|
|||
|
* Copyright © 2015-2018, Jon Schlinkert.
|
|||
|
* Released under the MIT License.
|
|||
|
*/
|
|||
|
/*!
|
|||
|
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|||
|
*
|
|||
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
|||
|
* Released under the MIT License.
|
|||
|
*/
|