|
|
|
@@ -0,0 +1,942 @@
|
|
|
|
|
#!/usr/bin/env node
|
|
|
|
|
/* eslint-disable */
|
|
|
|
|
//prettier-ignore
|
|
|
|
|
(()=>{var EGe=Object.create;var hU=Object.defineProperty;var IGe=Object.getOwnPropertyDescriptor;var CGe=Object.getOwnPropertyNames;var wGe=Object.getPrototypeOf,BGe=Object.prototype.hasOwnProperty;var Ie=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Ze=(t,e)=>()=>(t&&(e=t(t=0)),e);var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Vt=(t,e)=>{for(var r in e)hU(t,r,{get:e[r],enumerable:!0})},vGe=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of CGe(e))!BGe.call(t,a)&&a!==r&&hU(t,a,{get:()=>e[a],enumerable:!(s=IGe(e,a))||s.enumerable});return t};var ut=(t,e,r)=>(r=t!=null?EGe(wGe(t)):{},vGe(e||!t||!t.__esModule?hU(r,"default",{value:t,enumerable:!0}):r,t));var fi={};Vt(fi,{SAFE_TIME:()=>NX,S_IFDIR:()=>YP,S_IFLNK:()=>VP,S_IFMT:()=>Mf,S_IFREG:()=>T2});var Mf,YP,T2,VP,NX,OX=Ze(()=>{Mf=61440,YP=16384,T2=32768,VP=40960,NX=456789e3});var or={};Vt(or,{EBADF:()=>Mo,EBUSY:()=>SGe,EEXIST:()=>QGe,EINVAL:()=>bGe,EISDIR:()=>kGe,ENOENT:()=>PGe,ENOSYS:()=>DGe,ENOTDIR:()=>xGe,ENOTEMPTY:()=>TGe,EOPNOTSUPP:()=>FGe,EROFS:()=>RGe,ERR_DIR_CLOSED:()=>gU});function Cc(t,e){return Object.assign(new Error(`${t}: ${e}`),{code:t})}function SGe(t){return Cc("EBUSY",t)}function DGe(t,e){return Cc("ENOSYS",`${t}, ${e}`)}function bGe(t){return Cc("EINVAL",`invalid argument, ${t}`)}function Mo(t){return Cc("EBADF",`bad file descriptor, ${t}`)}function PGe(t){return Cc("ENOENT",`no such file or directory, ${t}`)}function xGe(t){return Cc("ENOTDIR",`not a directory, ${t}`)}function kGe(t){return Cc("EISDIR",`illegal operation on a directory, ${t}`)}function QGe(t){return Cc("EEXIST",`file already exists, ${t}`)}function RGe(t){return Cc("EROFS",`read-only filesystem, ${t}`)}function TGe(t){return Cc("ENOTEMPTY",`directory not empty, ${t}`)}function FGe(t){return Cc("EOPNOTSUPP",`operation not supported, ${t}`)}function gU(){return Cc("ERR_DIR_CLOSED","Directory handle was closed")}var JP=Ze(()=>{});var $a={};Vt($a,{BigIntStatsEntry:()=>iE,DEFAULT_MODE:()=>yU,DirEntry:()=>dU,StatEntry:()=>nE,areStatsEqual:()=>EU,clearStats:()=>KP,convertToBigIntStats:()=>OGe,makeDefaultStats:()=>LX,makeEmptyStats:()=>NGe});function LX(){return new nE}function NGe(){return KP(LX())}function KP(t){for(let e in t)if(Object.hasOwn(t,e)){let r=t[e];typeof r=="number"?t[e]=0:typeof r=="bigint"?t[e]=BigInt(0):mU.types.isDate(r)&&(t[e]=new Date(0))}return t}function OGe(t){let e=new iE;for(let r in t)if(Object.hasOwn(t,r)){let s=t[r];typeof s=="number"?e[r]=BigInt(s):mU.types.isDate(s)&&(e[r]=new Date(s))}return e.atimeNs=e.atimeMs*BigInt(1e6),e.mtimeNs=e.mtimeMs*BigInt(1e6),e.ctimeNs=e.ctimeMs*BigInt(1e6),e.birthtimeNs=e.birthtimeMs*BigInt(1e6),e}function EU(t,e){if(t.atimeMs!==e.atimeMs||t.birthtimeMs!==e.birthtimeMs||t.blksize!==e.blksize||t.blocks!==e.blocks||t.ctimeMs!==e.ctimeMs||t.dev!==e.dev||t.gid!==e.gid||t.ino!==e.ino||t.isBlockDevice()!==e.isBlockDevice()||t.isCharacterDevice()!==e.isCharacterDevice()||t.isDirectory()!==e.isDirectory()||t.isFIFO()!==e.isFIFO()||t.isFile()!==e.isFile()||t.isSocket()!==e.isSocket()||t.isSymbolicLink()!==e.isSymbolicLink()||t.mode!==e.mode||t.mtimeMs!==e.mtimeMs||t.nlink!==e.nlink||t.rdev!==e.rdev||t.size!==e.size||t.uid!==e.uid)return!1;let r=t,s=e;return!(r.atimeNs!==s.atimeNs||r.mtimeNs!==s.mtimeNs||r.ctimeNs!==s.ctimeNs||r.birthtimeNs!==s.birthtimeNs)}var mU,yU,dU,nE,iE,IU=Ze(()=>{mU=ut(Ie("util")),yU=33188,dU=class{constructor(){this.name="";this.path="";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},nE=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=yU;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},iE=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(yU);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){reLine truncated
|
|
|
|
|
`).length,s=e.length-r;return r>s?`\r
|
|
|
|
|
`:`
|
|
|
|
|
`}function Ed(t,e){return e.replace(/\r?\n/g,KGe(t))}var YX,VX,mp,Uf,Id=Ze(()=>{YX=Ie("crypto"),VX=Ie("os");BU();el();mp=class{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:r=!1}={}){let s=[e];for(;s.length>0;){let a=s.shift();if((await this.lstatPromise(a)).isDirectory()){let c=await this.readdirPromise(a);if(r)for(let f of c.sort())s.push(this.pathUtils.join(a,f));else throw new Error("Not supported")}else yield a}}async checksumFilePromise(e,{algorithm:r="sha512"}={}){let s=await this.openPromise(e,"r");try{let n=Buffer.allocUnsafeSlow(65536),c=(0,YX.createHash)(r),f=0;for(;(f=await this.readPromise(s,n,0,65536))!==0;)c.update(f===65536?n:n.slice(0,f));return c.digest("hex")}finally{await this.closePromise(s)}}async removePromise(e,{recursive:r=!0,maxRetries:s=5}={}){let a;try{a=await this.lstatPromise(e)}catch(n){if(n.code==="ENOENT")return;throw n}if(a.isDirectory()){if(r){let n=await this.readdirPromise(e);await Promise.all(n.map(c=>this.removePromise(this.pathUtils.resolve(e,c))))}for(let n=0;n<=s;n++)try{await this.rmdirPromise(e);break}catch(c){if(c.code!=="EBUSY"&&c.code!=="ENOTEMPTY")throw c;n<s&&await new Promise(f=>setTimeout(f,n*100))}}else await this.unlinkPromise(e)}removeSync(e,{recursive:r=!0}={}){let s;try{s=this.lstatSync(e)}catch(a){if(a.code==="ENOENT")return;throw a}if(s.isDirectory()){if(r)for(let a of this.readdirSync(e))this.removeSync(this.pathUtils.resolve(e,a));this.rmdirSync(e)}else this.unlinkSync(e)}async mkdirpPromise(e,{chmod:r,utimes:s}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let c=2;c<=a.length;++c){let f=a.slice(0,c).join(this.pathUtils.sep);if(!this.existsSync(f)){try{await this.mkdirPromise(f)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=f,r!=null&&await this.chmodPromise(f,r),s!=null)await this.utimesPromise(f,s[0],s[1]);else{let p=await this.statPromise(this.pathUtils.dirname(f));await this.utimesPromise(f,p.atime,p.mtime)}}}return n}mkdirpSync(e,{chmod:r,utimes:s}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let c=2;c<=a.length;++c){let f=a.slice(0,c).join(this.pathUtils.sep);if(!this.existsSync(f)){try{this.mkdirSync(f)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=f,r!=null&&this.chmodSync(f,r),s!=null)this.utimesSync(f,s[0],s[1]);else{let p=this.statSync(this.pathUtils.dirname(f));this.utimesSync(f,p.atime,p.mtime)}}}return n}async copyPromise(e,r,{baseFs:s=this,overwrite:a=!0,stableSort:n=!1,stableTime:c=!1,linkStrategy:f=null}={}){return await _X(this,e,s,r,{overwrite:a,stableSort:n,stableTime:c,linkStrategy:f})}copySync(e,r,{baseFs:s=this,overwrite:a=!0}={}){let n=s.lstatSync(r),c=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);let p=s.readdirSync(r);for(let h of p)this.copySync(this.pathUtils.join(e,h),s.pathUtils.join(r,h),{baseFs:s,overwrite:a})}else if(n.isFile()){if(!c||a){c&&this.removeSync(e);let p=s.readFileSync(r);this.writeFileSync(e,p)}}else if(n.isSymbolicLink()){if(!c||a){c&&this.removeSync(e);let p=s.readlinkSync(r);this.symlinkSync(zP(this.pathUtils,p),e)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);let f=n.mode&511;this.chmodSync(e,f)}async changeFilePromise(e,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(e,r,s):this.changeFileTextPromise(e,r,s)}async changeFileBufferPromise(e,r,{mode:s}={}){let a=Buffer.alloc(0);try{a=await this.readFilePromise(e)}catch{}Buffer.compare(a,r)!==0&&await this.writeFilePromise(e,r,{mode:s})}async changeFileTextPromise(e,r,{automaticNewlines:s,mode:a}={}){let n="";try{n=await this.readFilePromise(e,"utf8")}catch{}let c=s?Ed(n,r):r;n!==c&&await this.writeFilePromise(e,c,{mode:a})}changeFileSync(e,r,s={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(e,r,s):this.changeFileTextSync(e,r,s)}changeFileBufferSync(e,r,{mode:s}={}){let a=Buffer.alloc(0);try{a=this.readFileSync(e)}catch{}Buffer.compare(a,r)!==0&&this.writeFileSync(e,r,{mode:s})}changeFileTextSync(e,r,{automaticNewlines:s=!1,mode:a}={}){let n="";try{n=this.readFileSync(e,"utf8")}catch{}let c=s?Ed(n,r):r;n!==c&&this.writeFileSync(e,c,{mode:a})}async movePromise(e,r){try{await this.renamePromise(e,r)}catch(s){if(s.code==="EXDEV")await this.copyPromise(r,e),await this.removePromise(e);else throw s}}moveSync(e,r){try{this.renameSync(e,r)}catch(s){if(s.code==="EXDEV")this.copySync(r,e),this.removeSync(e);else throw s}}async lockPromise(e,r){let s=`${e}.flock`,a=1e3/60,n=Date.now(),c=null,f=async()=>{let p;try{[p]=await this.readJsonPromise(s)}catch{return Date.now()-n<500}try{return process.kill(p,0),!0}catch{return!1}};for(;c===null;)try{c=await this.openPromise(s,"wx")}catch(p){if(p.code==="EEXIST"){if(!await f())try{await this.unlinkPromise(s);continue}catch{}if(Date.now()-n<60*1e3)await new Promise(h=>setTimeout(h,a));else throw new Error(`Couldn't acquire a lock in a reasonable time (via ${s})`)}else throw
Line truncated
|
|
|
|
|
`)}writeJsonSync(e,r,{compact:s=!1}={}){let a=s?0:2;return this.writeFileSync(e,`${JSON.stringify(r,null,a)}
|
|
|
|
|
`)}async preserveTimePromise(e,r){let s=await this.lstatPromise(e),a=await r();typeof a<"u"&&(e=a),await this.lutimesPromise(e,s.atime,s.mtime)}async preserveTimeSync(e,r){let s=this.lstatSync(e),a=r();typeof a<"u"&&(e=a),this.lutimesSync(e,s.atime,s.mtime)}},Uf=class extends mp{constructor(){super(J)}}});var _s,yp=Ze(()=>{Id();_s=class extends mp{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(e,r,s){return this.baseFs.openPromise(this.mapToBase(e),r,s)}openSync(e,r,s){return this.baseFs.openSync(this.mapToBase(e),r,s)}async opendirPromise(e,r){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(e),r),{path:e})}opendirSync(e,r){return Object.assign(this.baseFs.opendirSync(this.mapToBase(e),r),{path:e})}async readPromise(e,r,s,a,n){return await this.baseFs.readPromise(e,r,s,a,n)}readSync(e,r,s,a,n){return this.baseFs.readSync(e,r,s,a,n)}async writePromise(e,r,s,a,n){return typeof r=="string"?await this.baseFs.writePromise(e,r,s):await this.baseFs.writePromise(e,r,s,a,n)}writeSync(e,r,s,a,n){return typeof r=="string"?this.baseFs.writeSync(e,r,s):this.baseFs.writeSync(e,r,s,a,n)}async closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,r){return this.baseFs.createReadStream(e!==null?this.mapToBase(e):e,r)}createWriteStream(e,r){return this.baseFs.createWriteStream(e!==null?this.mapToBase(e):e,r)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}async existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,r){return this.baseFs.accessSync(this.mapToBase(e),r)}async accessPromise(e,r){return this.baseFs.accessPromise(this.mapToBase(e),r)}async statPromise(e,r){return this.baseFs.statPromise(this.mapToBase(e),r)}statSync(e,r){return this.baseFs.statSync(this.mapToBase(e),r)}async fstatPromise(e,r){return this.baseFs.fstatPromise(e,r)}fstatSync(e,r){return this.baseFs.fstatSync(e,r)}lstatPromise(e,r){return this.baseFs.lstatPromise(this.mapToBase(e),r)}lstatSync(e,r){return this.baseFs.lstatSync(this.mapToBase(e),r)}async fchmodPromise(e,r){return this.baseFs.fchmodPromise(e,r)}fchmodSync(e,r){return this.baseFs.fchmodSync(e,r)}async chmodPromise(e,r){return this.baseFs.chmodPromise(this.mapToBase(e),r)}chmodSync(e,r){return this.baseFs.chmodSync(this.mapToBase(e),r)}async fchownPromise(e,r,s){return this.baseFs.fchownPromise(e,r,s)}fchownSync(e,r,s){return this.baseFs.fchownSync(e,r,s)}async chownPromise(e,r,s){return this.baseFs.chownPromise(this.mapToBase(e),r,s)}chownSync(e,r,s){return this.baseFs.chownSync(this.mapToBase(e),r,s)}async renamePromise(e,r){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(r))}renameSync(e,r){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(r))}async copyFilePromise(e,r,s=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(r),s)}copyFileSync(e,r,s=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(r),s)}async appendFilePromise(e,r,s){return this.baseFs.appendFilePromise(this.fsMapToBase(e),r,s)}appendFileSync(e,r,s){return this.baseFs.appendFileSync(this.fsMapToBase(e),r,s)}async writeFilePromise(e,r,s){return this.baseFs.writeFilePromise(this.fsMapToBase(e),r,s)}writeFileSync(e,r,s){return this.baseFs.writeFileSync(this.fsMapToBase(e),r,s)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,r,s){return this.baseFs.utimesPromise(this.mapToBase(e),r,s)}utimesSync(e,r,s){return this.baseFs.utimesSync(this.mapToBase(e),r,s)}async lutimesPromise(e,r,s){return this.baseFs.lutimesPromise(this.mapToBase(e),r,s)}lutimesSync(e,r,s){return this.baseFs.lutimesSync(this.mapToBase(e),r,s)}async mkdirPromise(e,r){return this.baseFs.mkdirPromise(this.mapToBase(e),r)}mkdirSync(e,r){return this.baseFs.mkdirSync(this.mapToBase(e),r)}async rmdirPromise(e,r){return this.baseFs.rmdirPromise(this.mapToBase(e),r)}rmdirSync(e,r){return this.baseFs.rmdirSync(this.mapToBase(e),r)}async rmPromise(e,r){return this.baseFs.rmPromise(this.mapToBase(e),r)}rmSync(e,r){return this.baseFs.rmSync(this.mapToBase(e),r)}async linkPromise(e,r){return this.baseFs.linkPromise(this.mapToBase(e),this.mapToBase(r))}linkSync(e,r){return this.baseFs.linkSync(this.mapToBase(e),this.mapToBase(r))}async symlinkPromise(e,r,s){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkPromise(this.mapToBase(e),a,s);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),c=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkP
Line truncated
|
|
|
|
|
`,RA=ur(`\\
|
|
|
|
|
`,!1),TA=function(){return""},sa="\\",oa=ur("\\",!1),FA=/^[\\$"`]/,gr=Ki(["\\","$",'"',"`"],!1,!1),Bo=function(O){return O},Me="\\a",cu=ur("\\a",!1),Cr=function(){return"a"},pf="\\b",NA=ur("\\b",!1),OA=function(){return"\b"},uu=/^[Ee]/,fu=Ki(["E","e"],!1,!1),oc=function(){return"\x1B"},ve="\\f",Nt=ur("\\f",!1),ac=function(){return"\f"},Ni="\\n",no=ur("\\n",!1),Tt=function(){return`
|
|
|
|
|
`},xn="\\r",aa=ur("\\r",!1),Hi=function(){return"\r"},Oi="\\t",Na=ur("\\t",!1),dn=function(){return" "},Kn="\\v",Au=ur("\\v",!1),yh=function(){return"\v"},Oa=/^[\\'"?]/,La=Ki(["\\","'",'"',"?"],!1,!1),Ma=function(O){return String.fromCharCode(parseInt(O,16))},$e="\\x",Ua=ur("\\x",!1),hf="\\u",lc=ur("\\u",!1),wn="\\U",la=ur("\\U",!1),LA=function(O){return String.fromCodePoint(parseInt(O,16))},MA=/^[0-7]/,ca=Ki([["0","7"]],!1,!1),Bl=/^[0-9a-fA-f]/,Mt=Ki([["0","9"],["a","f"],["A","f"]],!1,!1),kn=yf(),ua="{}",Ha=ur("{}",!1),rs=function(){return"{}"},cc="-",pu=ur("-",!1),uc="+",ja=ur("+",!1),Li=".",Is=ur(".",!1),vl=function(O,K,re){return{type:"number",value:(O==="-"?-1:1)*parseFloat(K.join("")+"."+re.join(""))}},gf=function(O,K){return{type:"number",value:(O==="-"?-1:1)*parseInt(K.join(""))}},fc=function(O){return{type:"variable",...O}},wi=function(O){return{type:"variable",name:O}},Qn=function(O){return O},Ac="*",Ke=ur("*",!1),st="/",St=ur("/",!1),lr=function(O,K,re){return{type:K==="*"?"multiplication":"division",right:re}},te=function(O,K){return K.reduce((re,de)=>({left:re,...de}),O)},Ee=function(O,K,re){return{type:K==="+"?"addition":"subtraction",right:re}},Oe="$((",dt=ur("$((",!1),Et="))",bt=ur("))",!1),tr=function(O){return O},fn="$(",li=ur("$(",!1),ji=function(O){return O},Rn="${",Ga=ur("${",!1),my=":-",z1=ur(":-",!1),vo=function(O,K){return{name:O,defaultValue:K}},yy=":-}",Eh=ur(":-}",!1),Z1=function(O){return{name:O,defaultValue:[]}},So=":+",Ih=ur(":+",!1),Ch=function(O,K){return{name:O,alternativeValue:K}},hu=":+}",wh=ur(":+}",!1),Fg=function(O){return{name:O,alternativeValue:[]}},Ng=function(O){return{name:O}},Og="$",Ey=ur("$",!1),df=function(O){return e.isGlobPattern(O)},Do=function(O){return O},Sl=/^[a-zA-Z0-9_]/,Bh=Ki([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Lg=function(){return By()},Dl=/^[$@*?#a-zA-Z0-9_\-]/,bl=Ki(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),Iy=/^[()}<>$|&; \t"']/,UA=Ki(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),Cy=/^[<>&; \t"']/,wy=Ki(["<",">","&",";"," "," ",'"',"'"],!1,!1),_A=/^[ \t]/,HA=Ki([" "," "],!1,!1),Y=0,xt=0,jA=[{line:1,column:1}],bo=0,mf=[],yt=0,gu;if("startRule"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=s[e.startRule]}function By(){return t.substring(xt,Y)}function Mg(){return Ef(xt,Y)}function X1(O,K){throw K=K!==void 0?K:Ef(xt,Y),GA([Ug(O)],t.substring(xt,Y),K)}function vh(O,K){throw K=K!==void 0?K:Ef(xt,Y),di(O,K)}function ur(O,K){return{type:"literal",text:O,ignoreCase:K}}function Ki(O,K,re){return{type:"class",parts:O,inverted:K,ignoreCase:re}}function yf(){return{type:"any"}}function qa(){return{type:"end"}}function Ug(O){return{type:"other",description:O}}function du(O){var K=jA[O],re;if(K)return K;for(re=O-1;!jA[re];)re--;for(K=jA[re],K={line:K.line,column:K.column};re<O;)t.charCodeAt(re)===10?(K.line++,K.column=1):K.column++,re++;return jA[O]=K,K}function Ef(O,K){var re=du(O),de=du(K);return{start:{offset:O,line:re.line,column:re.column},end:{offset:K,line:de.line,column:de.column}}}function wt(O){Y<bo||(Y>bo&&(bo=Y,mf=[]),mf.push(O))}function di(O,K){return new Bd(O,null,null,K)}function GA(O,K,re){return new Bd(Bd.buildMessage(O,K),O,K,re)}function Wa(){var O,K,re;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();return K!==r?(re=fa(),re===r&&(re=null),re!==r?(xt=O,K=n(re),O=K):(Y=O,O=r)):(Y=O,O=r),O}function fa(){var O,K,re,de,Je;if(O=Y,K=Sh(),K!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();re!==r?(de=_g(),de!==r?(Je=Ya(),Je===r&&(Je=null),Je!==r?(xt=O,K=c(K,de,Je),O=K):(Y=O,O=r)):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;if(O===r)if(O=Y,K=Sh(),K!==r){for(re=[],de=kt();de!==r;)re.push(de),de=kt();re!==r?(de=_g(),de===r&&(de=null),de!==r?(xt=O,K=f(K,de),O=K):(Y=O,O=r)):(Y=O,O=r)}else Y=O,O=r;return O}function Ya(){var O,K,re,de,Je;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(re=fa(),re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();de!==r?(xt=O,K=p(re),O=K):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r;return O}function _g(){var O;return t.charCodeAt(Y)===59?(O=h,Y++):(O=r,yt===0&&wt(E)),O===r&&(t.charCodeAt(Y)===38?(O=w,Y++):(O=r,yt===0&&wt(S))),O}function Sh(){var O,K,re;return O=Y,K=qA(),K!==r?(re=Hg(),re===r&&(re=null),re!==r?(xt=O,K=x(K,re),O=K):(Y=O,O=r)):(Y=O,O=r),O}function Hg(){var O,K,re,de,Je,At,dr;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)if(re=vy(),re!==r){for(de=[],Je=kt();Je!==r;)de.push(Je),Je=kt();if(de!==r)if(Je=Sh(),Je!==r){for(At=[],dr=kt();dr!==r;)At.push(dr),dr=kt();At!==r?(xt=O,K=I(re,Je),O=K):(Y=O,O=r)}else Y=O,O=r;else Y=O,O=r}else Y=O,O=r;else Y=O,O=r;return O}function vy(){var O;return t.substr(Y,2)===T?(O=T,Y+=2):(O=r,yt===0&&wt(N)),O===r&&(t.substr(Y,2)===U?(O=U,Y+=2):(O=r,yt===0&&wt(W))),O}function qA(){var O,K,re;return O=Y,K=If(),K!==r?(re=jg(),re===r&&(re=null),re!==r?(xt=O,K=ee(K,re),O=K):(Y=O,O=r)):(Y=O,O=r),O}function jg(){var O,K,re,de,Je,At,dr;for(O=Y,K=[],re=kt();re!==r;)K.push(re),re=kt();if(K!==r)Line truncated
|
|
|
|
|
`,"\\n"],["\r","\\r"],[" ","\\t"],["\v","\\v"],["\0","\\0"]]),P5e=new Map([["\\","\\\\"],["$","\\$"],['"','\\"'],...Array.from(uee,([t,e])=>[t,`"$'${e}'"`])]),fee=t=>uee.get(t)??`\\x${t.charCodeAt(0).toString(16).padStart(2,"0")}`,x5e=t=>P5e.get(t)??`"$'${fee(t)}'"`});var hee=_((xkt,pee)=>{"use strict";function k5e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Sd(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Sd)}k5e(Sd,Error);Sd.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",w;for(w=0;w<h.parts.length;w++)E+=h.parts[w]instanceof Array?n(h.parts[w][0])+"-"+n(h.parts[w][1]):n(h.parts[w]);return"["+(h.inverted?"^":"")+E+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.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(E){return"\\x0"+s(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+s(E)})}function n(h){return h.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(E){return"\\x0"+s(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),w,S;for(w=0;w<h.length;w++)E[w]=c(h[w]);if(E.sort(),E.length>0){for(w=1,S=1;w<E.length;w++)E[w-1]!==E[w]&&(E[S]=E[w],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+" or "+E[1];default:return E.slice(0,-1).join(", ")+", or "+E[E.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+f(t)+" but "+p(e)+" found."};function Q5e(t,e){e=e!==void 0?e:{};var r={},s={resolution:Ne},a=Ne,n="/",c=ye("/",!1),f=function(Ue,P){return{from:Ue,descriptor:P}},p=function(Ue){return{descriptor:Ue}},h="@",E=ye("@",!1),w=function(Ue,P){return{fullName:Ue,description:P}},S=function(Ue){return{fullName:Ue}},x=function(){return Be()},I=/^[^\/@]/,T=Ae(["/","@"],!0,!1),N=/^[^\/]/,U=Ae(["/"],!0,!1),W=0,ee=0,ie=[{line:1,column:1}],ue=0,le=[],me=0,pe;if("startRule"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=s[e.startRule]}function Be(){return t.substring(ee,W)}function Ce(){return mt(ee,W)}function g(Ue,P){throw P=P!==void 0?P:mt(ee,W),Fe([De(Ue)],t.substring(ee,W),P)}function we(Ue,P){throw P=P!==void 0?P:mt(ee,W),rt(Ue,P)}function ye(Ue,P){return{type:"literal",text:Ue,ignoreCase:P}}function Ae(Ue,P,C){return{type:"class",parts:Ue,inverted:P,ignoreCase:C}}function se(){return{type:"any"}}function X(){return{type:"end"}}function De(Ue){return{type:"other",description:Ue}}function Te(Ue){var P=ie[Ue],C;if(P)return P;for(C=Ue-1;!ie[C];)C--;for(P=ie[C],P={line:P.line,column:P.column};C<Ue;)t.charCodeAt(C)===10?(P.line++,P.column=1):P.column++,C++;return ie[Ue]=P,P}function mt(Ue,P){var C=Te(Ue),b=Te(P);return{start:{offset:Ue,line:C.line,column:C.column},end:{offset:P,line:b.line,column:b.column}}}function j(Ue){W<ue||(W>ue&&(ue=W,le=[]),le.push(Ue))}function rt(Ue,P){return new Sd(Ue,null,null,P)}function Fe(Ue,P,C){return new Sd(Sd.buildMessage(Ue,P),Ue,P,C)}function Ne(){var Ue,P,C,b;return Ue=W,P=Pe(),P!==r?(t.charCodeAt(W)===47?(C=n,W++):(C=r,me===0&&j(c)),C!==r?(b=Pe(),b!==r?(ee=Ue,P=f(P,b),Ue=P):(W=Ue,Ue=r)):(W=Ue,Ue=r)):(W=Ue,Ue=r),Ue===r&&(Ue=W,P=Pe(),P!==r&&(ee=Ue,P=p(P)),Ue=P),Ue}function Pe(){var Ue,P,C,b;return Ue=W,P=Ye(),P!==r?(t.charCodeAt(W)===64?(C=h,W++):(C=r,me===0&&j(E)),C!==r?(b=it(),b!==r?(ee=Ue,P=w(P,b),Ue=P):(W=Ue,Ue=r)):(W=Ue,Ue=r)):(W=Ue,Ue=r),Ue===r&&(Ue=W,P=Ye(),P!==r&&(ee=Ue,P=S(P)),Ue=P),Ue}function Ye(){var Ue,P,C,b,y;return Ue=W,t.charCodeAt(W)===64?(P=h,W++):(P=r,me===0&&j(E)),P!==r?(C=ke(),C!==r?(t.charCodeAt(W)===47?(b=n,W++):(b=r,me===0&&j(c)),b!==r?(y=ke(),y!==r?(ee=Ue,P=x(),Ue=P):(W=Ue,Ue=r)):(W=Ue,Ue=r)):(W=Ue,Ue=r)):(W=Ue,Ue=r),Ue===r&&(Ue=W,P=ke(),P!==r&&(ee=Ue,P=x()),Ue=P),Ue}function ke(){var Ue,P,C;if(Ue=W,P=[],I.test(t.charAt(W))?(C=t.charAt(W),W++):(C=r,me===0&&j(T)),C!==r)for(;C!==r;)P.push(C),I.test(t.charAt(W))?(C=t.charAt(W),W++):(C=r,me===0&&j(T));else P=r;return P!==r&&(ee=Ue,P=x()),Ue=P,Ue}function it(){var Ue,P,C;if(Ue=W,P=[],N.test(t.charAt(W))?(C=t.charAt(W),W++):(C=r,me===0&&j(U)),C!==r)for(;C!==r;)P.push(C),N.test(t.charAt(W))?(C=t.charAt(W),W++):(C=r,me===0&&j(U));else P=r;return P!==r&&(ee=Ue,P=x()),Ue=P,Ue}if(pe=a(),pe!==r&&W===t.length)return pe;throw pe!==r&&W<t.length&&j(X()),Fe(le,ue<t.length?t.charAt(ue):null,ue<t.length?mt(ue,ue+1):mt(ue,ue))}pee.exports={SyntaxError:Sd,parse:Q5e}});function fx(t){let e=t.match(/^\*{1,Line truncated
|
|
|
|
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>r/2-1){s=" ... ",a+=5;break}for(n="",c=this.position;c<this.buffer.length&&`\0\r
|
|
|
|
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(c))===-1;)if(c+=1,c-this.position>r/2-1){n=" ... ",c-=5;break}return f=this.buffer.slice(a,c),Eee.repeat(" ",e)+s+f+n+`
|
|
|
|
|
`+Eee.repeat(" ",e+this.position-a+s.length)+"^"};GU.prototype.toString=function(e){var r,s="";return this.name&&(s+='in "'+this.name+'" '),s+="at line "+(this.line+1)+", column "+(this.column+1),e||(r=this.getSnippet(),r&&(s+=`:
|
|
|
|
|
`+r)),s};Iee.exports=GU});var Ss=_((Fkt,Bee)=>{"use strict";var wee=pE(),L5e=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],M5e=["scalar","sequence","mapping"];function U5e(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(s){e[String(s)]=r})}),e}function _5e(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(L5e.indexOf(r)===-1)throw new wee('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=U5e(e.styleAliases||null),M5e.indexOf(this.kind)===-1)throw new wee('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}Bee.exports=_5e});var Pd=_((Nkt,See)=>{"use strict";var vee=bd(),px=pE(),H5e=Ss();function qU(t,e,r){var s=[];return t.include.forEach(function(a){r=qU(a,e,r)}),t[e].forEach(function(a){r.forEach(function(n,c){n.tag===a.tag&&n.kind===a.kind&&s.push(c)}),r.push(a)}),r.filter(function(a,n){return s.indexOf(n)===-1})}function j5e(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function s(a){t[a.kind][a.tag]=t.fallback[a.tag]=a}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(s);return t}function hE(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 px("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=qU(this,"implicit",[]),this.compiledExplicit=qU(this,"explicit",[]),this.compiledTypeMap=j5e(this.compiledImplicit,this.compiledExplicit)}hE.DEFAULT=null;hE.create=function(){var e,r;switch(arguments.length){case 1:e=hE.DEFAULT,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:throw new px("Wrong number of arguments for Schema.create function")}if(e=vee.toArray(e),r=vee.toArray(r),!e.every(function(s){return s instanceof hE}))throw new px("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(s){return s instanceof H5e}))throw new px("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new hE({include:e,explicit:r})};See.exports=hE});var bee=_((Okt,Dee)=>{"use strict";var G5e=Ss();Dee.exports=new G5e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var xee=_((Lkt,Pee)=>{"use strict";var q5e=Ss();Pee.exports=new q5e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var Qee=_((Mkt,kee)=>{"use strict";var W5e=Ss();kee.exports=new W5e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var hx=_((Ukt,Ree)=>{"use strict";var Y5e=Pd();Ree.exports=new Y5e({explicit:[bee(),xee(),Qee()]})});var Fee=_((_kt,Tee)=>{"use strict";var V5e=Ss();function J5e(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function K5e(){return null}function z5e(t){return t===null}Tee.exports=new V5e("tag:yaml.org,2002:null",{kind:"scalar",resolve:J5e,construct:K5e,predicate:z5e,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var Oee=_((Hkt,Nee)=>{"use strict";var Z5e=Ss();function X5e(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 $5e(t){return t==="true"||t==="True"||t==="TRUE"}function eqe(t){return Object.prototype.toString.call(t)==="[object Boolean]"}Nee.exports=new Z5e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:X5e,construct:$5e,predicate:eqe,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})});var Mee=_((jkt,Lee)=>{"use strict";var tqe=bd(),rqe=Ss();function nqe(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function iqe(t){return 48<=t&&t<=55}function sqe(t){return 48<=t&&t<=57}function oqe(t){if(t===null)return!1;var e=t.length,r=0,s=!1,a;if(!e)return!1;if(a=t[r],(a==="-"||a==="+")&&(a=t[++r]),a==="0"){if(r+1===e)return!0;if(a=t[++r],a==="b"){for(r++;r<e;r++)if(a=t[r],a!=="_"){if(a!=="0"&&a!=="1")return!1;s=!0}return s&&a!=="_"}if(a==="x"){for(r++;r<e;r++)if(a=t[r],a!=="_"){if(!nqe(t.charCodeAt(r)))return!1;s=!0}return s&&a!=="_"}for(;r<e;r++)if(a=t[r],a!=="_"){if(!iqe(t.charCodeAt(r)))return!1;s=!0}return s&&a!=="_"}if(a==="_")return!1;for(;r<e;r++)if(a=t[r],a!=="_"){if(a===":")break;if(!sqe(t.charCodeAt(r)))return!1;s=!0}return!s||a==="_"?!1:a!==":"?!0:/^(
Line truncated
|
|
|
|
|
\r`;function Sqe(t){if(t===null)return!1;var e,r,s=0,a=t.length,n=VU;for(r=0;r<a;r++)if(e=n.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;s+=6}return s%8===0}function Dqe(t){var e,r,s=t.replace(/[\r\n=]/g,""),a=s.length,n=VU,c=0,f=[];for(e=0;e<a;e++)e%4===0&&e&&(f.push(c>>16&255),f.push(c>>8&255),f.push(c&255)),c=c<<6|n.indexOf(s.charAt(e));return r=a%4*6,r===0?(f.push(c>>16&255),f.push(c>>8&255),f.push(c&255)):r===18?(f.push(c>>10&255),f.push(c>>2&255)):r===12&&f.push(c>>4&255),xd?xd.from?xd.from(f):new xd(f):f}function bqe(t){var e="",r=0,s,a,n=t.length,c=VU;for(s=0;s<n;s++)s%3===0&&s&&(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]),r=(r<<8)+t[s];return a=n%3,a===0?(e+=c[r>>18&63],e+=c[r>>12&63],e+=c[r>>6&63],e+=c[r&63]):a===2?(e+=c[r>>10&63],e+=c[r>>4&63],e+=c[r<<2&63],e+=c[64]):a===1&&(e+=c[r>>2&63],e+=c[r<<4&63],e+=c[64],e+=c[64]),e}function Pqe(t){return xd&&xd.isBuffer(t)}Zee.exports=new vqe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Sqe,construct:Dqe,predicate:Pqe,represent:bqe})});var ete=_((zkt,$ee)=>{"use strict";var xqe=Ss(),kqe=Object.prototype.hasOwnProperty,Qqe=Object.prototype.toString;function Rqe(t){if(t===null)return!0;var e=[],r,s,a,n,c,f=t;for(r=0,s=f.length;r<s;r+=1){if(a=f[r],c=!1,Qqe.call(a)!=="[object Object]")return!1;for(n in a)if(kqe.call(a,n))if(!c)c=!0;else return!1;if(!c)return!1;if(e.indexOf(n)===-1)e.push(n);else return!1}return!0}function Tqe(t){return t!==null?t:[]}$ee.exports=new xqe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Rqe,construct:Tqe})});var rte=_((Zkt,tte)=>{"use strict";var Fqe=Ss(),Nqe=Object.prototype.toString;function Oqe(t){if(t===null)return!0;var e,r,s,a,n,c=t;for(n=new Array(c.length),e=0,r=c.length;e<r;e+=1){if(s=c[e],Nqe.call(s)!=="[object Object]"||(a=Object.keys(s),a.length!==1))return!1;n[e]=[a[0],s[a[0]]]}return!0}function Lqe(t){if(t===null)return[];var e,r,s,a,n,c=t;for(n=new Array(c.length),e=0,r=c.length;e<r;e+=1)s=c[e],a=Object.keys(s),n[e]=[a[0],s[a[0]]];return n}tte.exports=new Fqe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Oqe,construct:Lqe})});var ite=_((Xkt,nte)=>{"use strict";var Mqe=Ss(),Uqe=Object.prototype.hasOwnProperty;function _qe(t){if(t===null)return!0;var e,r=t;for(e in r)if(Uqe.call(r,e)&&r[e]!==null)return!1;return!0}function Hqe(t){return t!==null?t:{}}nte.exports=new Mqe("tag:yaml.org,2002:set",{kind:"mapping",resolve:_qe,construct:Hqe})});var gE=_(($kt,ste)=>{"use strict";var jqe=Pd();ste.exports=new jqe({include:[YU()],implicit:[Vee(),Kee()],explicit:[Xee(),ete(),rte(),ite()]})});var ate=_((eQt,ote)=>{"use strict";var Gqe=Ss();function qqe(){return!0}function Wqe(){}function Yqe(){return""}function Vqe(t){return typeof t>"u"}ote.exports=new Gqe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:qqe,construct:Wqe,predicate:Vqe,represent:Yqe})});var cte=_((tQt,lte)=>{"use strict";var Jqe=Ss();function Kqe(t){if(t===null||t.length===0)return!1;var e=t,r=/\/([gim]*)$/.exec(t),s="";return!(e[0]==="/"&&(r&&(s=r[1]),s.length>3||e[e.length-s.length-1]!=="/"))}function zqe(t){var e=t,r=/\/([gim]*)$/.exec(t),s="";return e[0]==="/"&&(r&&(s=r[1]),e=e.slice(1,e.length-s.length-1)),new RegExp(e,s)}function Zqe(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function Xqe(t){return Object.prototype.toString.call(t)==="[object RegExp]"}lte.exports=new Jqe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:Kqe,construct:zqe,predicate:Xqe,represent:Zqe})});var Ate=_((rQt,fte)=>{"use strict";var gx;try{ute=Ie,gx=ute("esprima")}catch{typeof window<"u"&&(gx=window.esprima)}var ute,$qe=Ss();function e9e(t){if(t===null)return!1;try{var e="("+t+")",r=gx.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{return!1}}function t9e(t){var e="("+t+")",r=gx.parse(e,{range:!0}),s=[],a;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(n){s.push(n.name)}),a=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(s,e.slice(a[0]+1,a[1]-1)):new Function(s,"return "+e.slice(a[0],a[1]))}function r9e(t){return t.toString()}function n9e(t){return Object.prototype.toString.call(t)==="[object Function]"}fte.exports=new $qe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:e9e,construct:t9e,predicate:n9e,represent:r9e})});var H2=_((iQt,hte)=>{"use strict";var pte=Pd();hte.exports=pte.DEFAULT=new pte({include:[gE()],explicit:[ate(),cte(),Ate()]})});var Tte=_((sQt,j2)=>{"use strict";var Ip=bd(),Cte=pE(),i9e=Cee(),wte=gE(),s9e=H2(),i0=Object.prototype.hasOwnProperty,dx=1,Bte=2,vte=3,mx=4,JU=1,o9e=2,gte=3,a9e=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84
Line truncated
|
|
|
|
|
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function p9e(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var bte=new Array(256),Pte=new Array(256);for(kd=0;kd<256;kd++)bte[kd]=mte(kd)?1:0,Pte[kd]=mte(kd);var kd;function h9e(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||s9e,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 xte(t,e){return new Cte(e,new i9e(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function Tr(t,e){throw xte(t,e)}function yx(t,e){t.onWarning&&t.onWarning.call(null,xte(t,e))}var yte={YAML:function(e,r,s){var a,n,c;e.version!==null&&Tr(e,"duplication of %YAML directive"),s.length!==1&&Tr(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(s[0]),a===null&&Tr(e,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),c=parseInt(a[2],10),n!==1&&Tr(e,"unacceptable YAML version of the document"),e.version=s[0],e.checkLineBreaks=c<2,c!==1&&c!==2&&yx(e,"unsupported YAML version of the document")},TAG:function(e,r,s){var a,n;s.length!==2&&Tr(e,"TAG directive accepts exactly two arguments"),a=s[0],n=s[1],Ste.test(a)||Tr(e,"ill-formed tag handle (first argument) of the TAG directive"),i0.call(e.tagMap,a)&&Tr(e,'there is a previously declared suffix for "'+a+'" tag handle'),Dte.test(n)||Tr(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[a]=n}};function n0(t,e,r,s){var a,n,c,f;if(e<r){if(f=t.input.slice(e,r),s)for(a=0,n=f.length;a<n;a+=1)c=f.charCodeAt(a),c===9||32<=c&&c<=1114111||Tr(t,"expected valid JSON character");else a9e.test(f)&&Tr(t,"the stream contains non-printable characters");t.result+=f}}function Ete(t,e,r,s){var a,n,c,f;for(Ip.isObject(r)||Tr(t,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),c=0,f=a.length;c<f;c+=1)n=a[c],i0.call(e,n)||(e[n]=r[n],s[n]=!0)}function mE(t,e,r,s,a,n,c,f){var p,h;if(Array.isArray(a))for(a=Array.prototype.slice.call(a),p=0,h=a.length;p<h;p+=1)Array.isArray(a[p])&&Tr(t,"nested arrays are not supported inside keys"),typeof a=="object"&&dte(a[p])==="[object Object]"&&(a[p]="[object Object]");if(typeof a=="object"&&dte(a)==="[object Object]"&&(a="[object Object]"),a=String(a),e===null&&(e={}),s==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(p=0,h=n.length;p<h;p+=1)Ete(t,e,n[p],r);else Ete(t,e,n,r);else!t.json&&!i0.call(r,a)&&i0.call(e,a)&&(t.line=c||t.line,t.position=f||t.position,Tr(t,"duplicated mapping key")),e[a]=n,delete r[a];return e}function KU(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++):Tr(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function os(t,e,r){for(var s=0,a=t.input.charCodeAt(t.position);a!==0;){for(;Qd(a);)a=t.input.charCodeAt(++t.position);if(e&&a===35)do a=t.input.charCodeAt(++t.position);while(a!==10&&a!==13&&a!==0);if(jf(a))for(KU(t),a=t.input.charCodeAt(t.position),s++,t.lineIndent=0;a===32;)t.lineIndent++,a=t.input.charCodeAt(++t.position);else break}return r!==-1&&s!==0&&t.lineIndent<r&&yx(t,"deficient indentation"),s}function Ex(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||rl(r)))}function zU(t,e){e===1?t.result+=" ":e>1&&(t.result+=Ip.repeat(`
|
|
|
|
|
`,e-1))}function g9e(t,e,r){var s,a,n,c,f,p,h,E,w=t.kind,S=t.result,x;if(x=t.input.charCodeAt(t.position),rl(x)||dE(x)||x===35||x===38||x===42||x===33||x===124||x===62||x===39||x===34||x===37||x===64||x===96||(x===63||x===45)&&(a=t.input.charCodeAt(t.position+1),rl(a)||r&&dE(a)))return!1;for(t.kind="scalar",t.result="",n=c=t.position,f=!1;x!==0;){if(x===58){if(a=t.input.charCodeAt(t.position+1),rl(a)||r&&dE(a))break}else if(x===35){if(s=t.input.charCodeAt(t.position-1),rl(s))break}else{if(t.position===t.lineStart&&Ex(t)||r&&dE(x))break;if(jf(x))if(p=t.line,h=t.lineStart,E=t.lineIndent,os(t,!1,-1),t.lineIndent>=e){f=!0,x=t.input.charCodeAt(t.position);continue}else{t.position=c,t.line=p,t.lineStart=h,t.lineIndent=E;break}}f&&(n0(t,n,c,!1),zU(t,t.line-p),n=c=t.position,f=!1),Qd(x)||(c=t.position+1),x=t.input.charCodeAt(++t.position)}return n0(t,n,c,!1),t.result?!0:(t.kind=w,t.result=S,!1)}function d9e(t,e){var r,s,a;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,s=a=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(n0(t,s,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)s=t.position,t.position++,a=t.position;else return!0;else jf(r)?(n0(t,s,a,!0),zU(t,os(t,!1,e)),s=a=t.position):t.position===t.lineStart&&Ex(t)?Tr(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);Tr(t,"unexpected end of the stream within a single quoted scalar")}function m9e(t,e){var r,s,a,n,c,f;if(f=t.input.charCodeAt(t.position),f!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=s=t.position;(f=t.input.charCodeAt(t.position))!==0;){if(f===34)return n0(t,r,t.position,!0),t.position++,!0;if(f===92){if(n0(t,r,t.position,!0),f=t.input.charCodeAt(++t.position),jf(f))os(t,!1,e);else if(f<256&&bte[f])t.result+=Pte[f],t.position++;else if((c=f9e(f))>0){for(a=c,n=0;a>0;a--)f=t.input.charCodeAt(++t.position),(c=u9e(f))>=0?n=(n<<4)+c:Tr(t,"expected hexadecimal character");t.result+=p9e(n),t.position++}else Tr(t,"unknown escape sequence");r=s=t.position}else jf(f)?(n0(t,r,s,!0),zU(t,os(t,!1,e)),r=s=t.position):t.position===t.lineStart&&Ex(t)?Tr(t,"unexpected end of the document within a double quoted scalar"):(t.position++,s=t.position)}Tr(t,"unexpected end of the stream within a double quoted scalar")}function y9e(t,e){var r=!0,s,a=t.tag,n,c=t.anchor,f,p,h,E,w,S={},x,I,T,N;if(N=t.input.charCodeAt(t.position),N===91)p=93,w=!1,n=[];else if(N===123)p=125,w=!0,n={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),N=t.input.charCodeAt(++t.position);N!==0;){if(os(t,!0,e),N=t.input.charCodeAt(t.position),N===p)return t.position++,t.tag=a,t.anchor=c,t.kind=w?"mapping":"sequence",t.result=n,!0;r||Tr(t,"missed comma between flow collection entries"),I=x=T=null,h=E=!1,N===63&&(f=t.input.charCodeAt(t.position+1),rl(f)&&(h=E=!0,t.position++,os(t,!0,e))),s=t.line,yE(t,e,dx,!1,!0),I=t.tag,x=t.result,os(t,!0,e),N=t.input.charCodeAt(t.position),(E||t.line===s)&&N===58&&(h=!0,N=t.input.charCodeAt(++t.position),os(t,!0,e),yE(t,e,dx,!1,!0),T=t.result),w?mE(t,n,S,I,x,T):h?n.push(mE(t,null,S,I,x,T)):n.push(x),os(t,!0,e),N=t.input.charCodeAt(t.position),N===44?(r=!0,N=t.input.charCodeAt(++t.position)):r=!1}Tr(t,"unexpected end of the stream within a flow collection")}function E9e(t,e){var r,s,a=JU,n=!1,c=!1,f=e,p=0,h=!1,E,w;if(w=t.input.charCodeAt(t.position),w===124)s=!1;else if(w===62)s=!0;else return!1;for(t.kind="scalar",t.result="";w!==0;)if(w=t.input.charCodeAt(++t.position),w===43||w===45)JU===a?a=w===43?gte:o9e:Tr(t,"repeat of a chomping mode identifier");else if((E=A9e(w))>=0)E===0?Tr(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?Tr(t,"repeat of an indentation width identifier"):(f=e+E-1,c=!0);else break;if(Qd(w)){do w=t.input.charCodeAt(++t.position);while(Qd(w));if(w===35)do w=t.input.charCodeAt(++t.position);while(!jf(w)&&w!==0)}for(;w!==0;){for(KU(t),t.lineIndent=0,w=t.input.charCodeAt(t.position);(!c||t.lineIndent<f)&&w===32;)t.lineIndent++,w=t.input.charCodeAt(++t.position);if(!c&&t.lineIndent>f&&(f=t.lineIndent),jf(w)){p++;continue}if(t.lineIndent<f){a===gte?t.result+=Ip.repeat(`
|
|
|
|
|
`,n?1+p:p):a===JU&&n&&(t.result+=`
|
|
|
|
|
`);break}for(s?Qd(w)?(h=!0,t.result+=Ip.repeat(`
|
|
|
|
|
`,n?1+p:p)):h?(h=!1,t.result+=Ip.repeat(`
|
|
|
|
|
`,p+1)):p===0?n&&(t.result+=" "):t.result+=Ip.repeat(`
|
|
|
|
|
`,p):t.result+=Ip.repeat(`
|
|
|
|
|
`,n?1+p:p),n=!0,c=!0,p=0,r=t.position;!jf(w)&&w!==0;)w=t.input.charCodeAt(++t.position);n0(t,r,t.position,!1)}return!0}function Ite(t,e){var r,s=t.tag,a=t.anchor,n=[],c,f=!1,p;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),p=t.input.charCodeAt(t.position);p!==0&&!(p!==45||(c=t.input.charCodeAt(t.position+1),!rl(c)));){if(f=!0,t.position++,os(t,!0,-1)&&t.lineIndent<=e){n.push(null),p=t.input.charCodeAt(t.position);continue}if(r=t.line,yE(t,e,vte,!1,!0),n.push(t.result),os(t,!0,-1),p=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&p!==0)Tr(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return f?(t.tag=s,t.anchor=a,t.kind="sequence",t.result=n,!0):!1}function I9e(t,e,r){var s,a,n,c,f=t.tag,p=t.anchor,h={},E={},w=null,S=null,x=null,I=!1,T=!1,N;for(t.anchor!==null&&(t.anchorMap[t.anchor]=h),N=t.input.charCodeAt(t.position);N!==0;){if(s=t.input.charCodeAt(t.position+1),n=t.line,c=t.position,(N===63||N===58)&&rl(s))N===63?(I&&(mE(t,h,E,w,S,null),w=S=x=null),T=!0,I=!0,a=!0):I?(I=!1,a=!0):Tr(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,N=s;else if(yE(t,r,Bte,!1,!0))if(t.line===n){for(N=t.input.charCodeAt(t.position);Qd(N);)N=t.input.charCodeAt(++t.position);if(N===58)N=t.input.charCodeAt(++t.position),rl(N)||Tr(t,"a whitespace character is expected after the key-value separator within a block mapping"),I&&(mE(t,h,E,w,S,null),w=S=x=null),T=!0,I=!1,a=!1,w=t.tag,S=t.result;else if(T)Tr(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=f,t.anchor=p,!0}else if(T)Tr(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=f,t.anchor=p,!0;else break;if((t.line===n||t.lineIndent>e)&&(yE(t,e,mx,!0,a)&&(I?S=t.result:x=t.result),I||(mE(t,h,E,w,S,x,n,c),w=S=x=null),os(t,!0,-1),N=t.input.charCodeAt(t.position)),t.lineIndent>e&&N!==0)Tr(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return I&&mE(t,h,E,w,S,null),T&&(t.tag=f,t.anchor=p,t.kind="mapping",t.result=h),T}function C9e(t){var e,r=!1,s=!1,a,n,c;if(c=t.input.charCodeAt(t.position),c!==33)return!1;if(t.tag!==null&&Tr(t,"duplication of a tag property"),c=t.input.charCodeAt(++t.position),c===60?(r=!0,c=t.input.charCodeAt(++t.position)):c===33?(s=!0,a="!!",c=t.input.charCodeAt(++t.position)):a="!",e=t.position,r){do c=t.input.charCodeAt(++t.position);while(c!==0&&c!==62);t.position<t.length?(n=t.input.slice(e,t.position),c=t.input.charCodeAt(++t.position)):Tr(t,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!rl(c);)c===33&&(s?Tr(t,"tag suffix cannot contain exclamation marks"):(a=t.input.slice(e-1,t.position+1),Ste.test(a)||Tr(t,"named tag handle cannot contain such characters"),s=!0,e=t.position+1)),c=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),c9e.test(n)&&Tr(t,"tag suffix cannot contain flow indicator characters")}return n&&!Dte.test(n)&&Tr(t,"tag name cannot contain such characters: "+n),r?t.tag=n:i0.call(t.tagMap,a)?t.tag=t.tagMap[a]+n:a==="!"?t.tag="!"+n:a==="!!"?t.tag="tag:yaml.org,2002:"+n:Tr(t,'undeclared tag handle "'+a+'"'),!0}function w9e(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Tr(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!rl(r)&&!dE(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Tr(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function B9e(t){var e,r,s;if(s=t.input.charCodeAt(t.position),s!==42)return!1;for(s=t.input.charCodeAt(++t.position),e=t.position;s!==0&&!rl(s)&&!dE(s);)s=t.input.charCodeAt(++t.position);return t.position===e&&Tr(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),i0.call(t.anchorMap,r)||Tr(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],os(t,!0,-1),!0}function yE(t,e,r,s,a){var n,c,f,p=1,h=!1,E=!1,w,S,x,I,T;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=c=f=mx===r||vte===r,s&&os(t,!0,-1)&&(h=!0,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)),p===1)for(;C9e(t)||w9e(t);)os(t,!0,-1)?(h=!0,f=n,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)):f=!1;if(f&&(f=h||a),(p===1||mx===r)&&(dx===r||Bte===r?I=e:I=e+1,T=t.position-t.lineStart,p===1?f&&(Ite(t,T)||I9e(t,T,I))||y9e(t,I)?E=!0:(c&&E9e(t,I)||d9e(t,I)||m9e(t,I)?E=!0:B9e(t)?(E=!0,(t.tag!==null||t.anchor!==null)&&Tr(t,"alias node should not have any properties")):g9e(t,I,dx===r)&&(E=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):p===0&&(E=f&&Ite(t,T))),t.tag!==null&&t.tag!=="!")if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Tr(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),w=0,S=t.implicitTypes.length;w<S;w+=1)if(x=t.implicitTypes[w],x.resolve(t.result)){t.result=x.construct(t.result),t.
Line truncated
|
|
|
|
|
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new h9e(t,e),s=t.indexOf("\0");for(s!==-1&&(r.position=s,Tr(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;)v9e(r);return r.documents}function Qte(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var s=kte(t,r);if(typeof e!="function")return s;for(var a=0,n=s.length;a<n;a+=1)e(s[a])}function Rte(t,e){var r=kte(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new Cte("expected a single document in the stream, but found more")}}function S9e(t,e,r){return typeof e=="object"&&e!==null&&typeof r>"u"&&(r=e,e=null),Qte(t,e,Ip.extend({schema:wte},r))}function D9e(t,e){return Rte(t,Ip.extend({schema:wte},e))}j2.exports.loadAll=Qte;j2.exports.load=Rte;j2.exports.safeLoadAll=S9e;j2.exports.safeLoad=D9e});var rre=_((oQt,e_)=>{"use strict";var q2=bd(),W2=pE(),b9e=H2(),P9e=gE(),Hte=Object.prototype.toString,jte=Object.prototype.hasOwnProperty,x9e=9,G2=10,k9e=13,Q9e=32,R9e=33,T9e=34,Gte=35,F9e=37,N9e=38,O9e=39,L9e=42,qte=44,M9e=45,Wte=58,U9e=61,_9e=62,H9e=63,j9e=64,Yte=91,Vte=93,G9e=96,Jte=123,q9e=124,Kte=125,_o={};_o[0]="\\0";_o[7]="\\a";_o[8]="\\b";_o[9]="\\t";_o[10]="\\n";_o[11]="\\v";_o[12]="\\f";_o[13]="\\r";_o[27]="\\e";_o[34]='\\"';_o[92]="\\\\";_o[133]="\\N";_o[160]="\\_";_o[8232]="\\L";_o[8233]="\\P";var W9e=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Y9e(t,e){var r,s,a,n,c,f,p;if(e===null)return{};for(r={},s=Object.keys(e),a=0,n=s.length;a<n;a+=1)c=s[a],f=String(e[c]),c.slice(0,2)==="!!"&&(c="tag:yaml.org,2002:"+c.slice(2)),p=t.compiledTypeMap.fallback[c],p&&jte.call(p.styleAliases,f)&&(f=p.styleAliases[f]),r[c]=f;return r}function Fte(t){var e,r,s;if(e=t.toString(16).toUpperCase(),t<=255)r="x",s=2;else if(t<=65535)r="u",s=4;else if(t<=4294967295)r="U",s=8;else throw new W2("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+q2.repeat("0",s-e.length)+e}function V9e(t){this.schema=t.schema||b9e,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=q2.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Y9e(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 Nte(t,e){for(var r=q2.repeat(" ",e),s=0,a=-1,n="",c,f=t.length;s<f;)a=t.indexOf(`
|
|
|
|
|
`,s),a===-1?(c=t.slice(s),s=f):(c=t.slice(s,a+1),s=a+1),c.length&&c!==`
|
|
|
|
|
`&&(n+=r),n+=c;return n}function ZU(t,e){return`
|
|
|
|
|
`+q2.repeat(" ",t.indent*e)}function J9e(t,e){var r,s,a;for(r=0,s=t.implicitTypes.length;r<s;r+=1)if(a=t.implicitTypes[r],a.resolve(e))return!0;return!1}function $U(t){return t===Q9e||t===x9e}function EE(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 K9e(t){return EE(t)&&!$U(t)&&t!==65279&&t!==k9e&&t!==G2}function Ote(t,e){return EE(t)&&t!==65279&&t!==qte&&t!==Yte&&t!==Vte&&t!==Jte&&t!==Kte&&t!==Wte&&(t!==Gte||e&&K9e(e))}function z9e(t){return EE(t)&&t!==65279&&!$U(t)&&t!==M9e&&t!==H9e&&t!==Wte&&t!==qte&&t!==Yte&&t!==Vte&&t!==Jte&&t!==Kte&&t!==Gte&&t!==N9e&&t!==L9e&&t!==R9e&&t!==q9e&&t!==U9e&&t!==_9e&&t!==O9e&&t!==T9e&&t!==F9e&&t!==j9e&&t!==G9e}function zte(t){var e=/^\n* /;return e.test(t)}var Zte=1,Xte=2,$te=3,ere=4,Ix=5;function Z9e(t,e,r,s,a){var n,c,f,p=!1,h=!1,E=s!==-1,w=-1,S=z9e(t.charCodeAt(0))&&!$U(t.charCodeAt(t.length-1));if(e)for(n=0;n<t.length;n++){if(c=t.charCodeAt(n),!EE(c))return Ix;f=n>0?t.charCodeAt(n-1):null,S=S&&Ote(c,f)}else{for(n=0;n<t.length;n++){if(c=t.charCodeAt(n),c===G2)p=!0,E&&(h=h||n-w-1>s&&t[w+1]!==" ",w=n);else if(!EE(c))return Ix;f=n>0?t.charCodeAt(n-1):null,S=S&&Ote(c,f)}h=h||E&&n-w-1>s&&t[w+1]!==" "}return!p&&!h?S&&!a(t)?Zte:Xte:r>9&&zte(t)?Ix:h?ere:$te}function X9e(t,e,r,s){t.dump=function(){if(e.length===0)return"''";if(!t.noCompatMode&&W9e.indexOf(e)!==-1)return"'"+e+"'";var a=t.indent*Math.max(1,r),n=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),c=s||t.flowLevel>-1&&r>=t.flowLevel;function f(p){return J9e(t,p)}switch(Z9e(e,c,t.indent,n,f)){case Zte:return e;case Xte:return"'"+e.replace(/'/g,"''")+"'";case $te:return"|"+Lte(e,t.indent)+Mte(Nte(e,a));case ere:return">"+Lte(e,t.indent)+Mte(Nte($9e(e,n),a));case Ix:return'"'+eWe(e,n)+'"';default:throw new W2("impossible error: invalid scalar style")}}()}function Lte(t,e){var r=zte(t)?String(e):"",s=t[t.length-1]===`
|
|
|
|
|
`,a=s&&(t[t.length-2]===`
|
|
|
|
|
`||t===`
|
|
|
|
|
`),n=a?"+":s?"":"-";return r+n+`
|
|
|
|
|
`}function Mte(t){return t[t.length-1]===`
|
|
|
|
|
`?t.slice(0,-1):t}function $9e(t,e){for(var r=/(\n+)([^\n]*)/g,s=function(){var h=t.indexOf(`
|
|
|
|
|
`);return h=h!==-1?h:t.length,r.lastIndex=h,Ute(t.slice(0,h),e)}(),a=t[0]===`
|
|
|
|
|
`||t[0]===" ",n,c;c=r.exec(t);){var f=c[1],p=c[2];n=p[0]===" ",s+=f+(!a&&!n&&p!==""?`
|
|
|
|
|
`:"")+Ute(p,e),a=n}return s}function Ute(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,s,a=0,n,c=0,f=0,p="";s=r.exec(t);)f=s.index,f-a>e&&(n=c>a?c:f,p+=`
|
|
|
|
|
`+t.slice(a,n),a=n+1),c=f;return p+=`
|
|
|
|
|
`,t.length-a>e&&c>a?p+=t.slice(a,c)+`
|
|
|
|
|
`+t.slice(c+1):p+=t.slice(a),p.slice(1)}function eWe(t){for(var e="",r,s,a,n=0;n<t.length;n++){if(r=t.charCodeAt(n),r>=55296&&r<=56319&&(s=t.charCodeAt(n+1),s>=56320&&s<=57343)){e+=Fte((r-55296)*1024+s-56320+65536),n++;continue}a=_o[r],e+=!a&&EE(r)?t[n]:a||Fte(r)}return e}function tWe(t,e,r){var s="",a=t.tag,n,c;for(n=0,c=r.length;n<c;n+=1)Rd(t,e,r[n],!1,!1)&&(n!==0&&(s+=","+(t.condenseFlow?"":" ")),s+=t.dump);t.tag=a,t.dump="["+s+"]"}function rWe(t,e,r,s){var a="",n=t.tag,c,f;for(c=0,f=r.length;c<f;c+=1)Rd(t,e+1,r[c],!0,!0)&&((!s||c!==0)&&(a+=ZU(t,e)),t.dump&&G2===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=n,t.dump=a||"[]"}function nWe(t,e,r){var s="",a=t.tag,n=Object.keys(r),c,f,p,h,E;for(c=0,f=n.length;c<f;c+=1)E="",c!==0&&(E+=", "),t.condenseFlow&&(E+='"'),p=n[c],h=r[p],Rd(t,e,p,!1,!1)&&(t.dump.length>1024&&(E+="? "),E+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Rd(t,e,h,!1,!1)&&(E+=t.dump,s+=E));t.tag=a,t.dump="{"+s+"}"}function iWe(t,e,r,s){var a="",n=t.tag,c=Object.keys(r),f,p,h,E,w,S;if(t.sortKeys===!0)c.sort();else if(typeof t.sortKeys=="function")c.sort(t.sortKeys);else if(t.sortKeys)throw new W2("sortKeys must be a boolean or a function");for(f=0,p=c.length;f<p;f+=1)S="",(!s||f!==0)&&(S+=ZU(t,e)),h=c[f],E=r[h],Rd(t,e+1,h,!0,!0,!0)&&(w=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,w&&(t.dump&&G2===t.dump.charCodeAt(0)?S+="?":S+="? "),S+=t.dump,w&&(S+=ZU(t,e)),Rd(t,e+1,E,!0,w)&&(t.dump&&G2===t.dump.charCodeAt(0)?S+=":":S+=": ",S+=t.dump,a+=S));t.tag=n,t.dump=a||"{}"}function _te(t,e,r){var s,a,n,c,f,p;for(a=r?t.explicitTypes:t.implicitTypes,n=0,c=a.length;n<c;n+=1)if(f=a[n],(f.instanceOf||f.predicate)&&(!f.instanceOf||typeof e=="object"&&e instanceof f.instanceOf)&&(!f.predicate||f.predicate(e))){if(t.tag=r?f.tag:"?",f.represent){if(p=t.styleMap[f.tag]||f.defaultStyle,Hte.call(f.represent)==="[object Function]")s=f.represent(e,p);else if(jte.call(f.represent,p))s=f.represent[p](e,p);else throw new W2("!<"+f.tag+'> tag resolver accepts not "'+p+'" style');t.dump=s}return!0}return!1}function Rd(t,e,r,s,a,n){t.tag=null,t.dump=r,_te(t,r,!1)||_te(t,r,!0);var c=Hte.call(t.dump);s&&(s=t.flowLevel<0||t.flowLevel>e);var f=c==="[object Object]"||c==="[object Array]",p,h;if(f&&(p=t.duplicates.indexOf(r),h=p!==-1),(t.tag!==null&&t.tag!=="?"||h||t.indent!==2&&e>0)&&(a=!1),h&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(f&&h&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),c==="[object Object]")s&&Object.keys(t.dump).length!==0?(iWe(t,e,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(nWe(t,e,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump));else if(c==="[object Array]"){var E=t.noArrayIndent&&e>0?e-1:e;s&&t.dump.length!==0?(rWe(t,E,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(tWe(t,E,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump))}else if(c==="[object String]")t.tag!=="?"&&X9e(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new W2("unacceptable kind of an object to dump "+c)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function sWe(t,e){var r=[],s=[],a,n;for(XU(t,r,s),a=0,n=s.length;a<n;a+=1)e.duplicates.push(r[s[a]]);e.usedDuplicates=new Array(n)}function XU(t,e,r){var s,a,n;if(t!==null&&typeof t=="object")if(a=e.indexOf(t),a!==-1)r.indexOf(a)===-1&&r.push(a);else if(e.push(t),Array.isArray(t))for(a=0,n=t.length;a<n;a+=1)XU(t[a],e,r);else for(s=Object.keys(t),a=0,n=s.length;a<n;a+=1)XU(t[s[a]],e,r)}function tre(t,e){e=e||{};var r=new V9e(e);return r.noRefs||sWe(t,r),Rd(r,0,t,!0,!0)?r.dump+`
|
|
|
|
|
`:""}function oWe(t,e){return tre(t,q2.extend({schema:P9e},e))}e_.exports.dump=tre;e_.exports.safeDump=oWe});var ire=_((aQt,Gi)=>{"use strict";var Cx=Tte(),nre=rre();function wx(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}Gi.exports.Type=Ss();Gi.exports.Schema=Pd();Gi.exports.FAILSAFE_SCHEMA=hx();Gi.exports.JSON_SCHEMA=WU();Gi.exports.CORE_SCHEMA=YU();Gi.exports.DEFAULT_SAFE_SCHEMA=gE();Gi.exports.DEFAULT_FULL_SCHEMA=H2();Gi.exports.load=Cx.load;Gi.exports.loadAll=Cx.loadAll;Gi.exports.safeLoad=Cx.safeLoad;Gi.exports.safeLoadAll=Cx.safeLoadAll;Gi.exports.dump=nre.dump;Gi.exports.safeDump=nre.safeDump;Gi.exports.YAMLException=pE();Gi.exports.MINIMAL_SCHEMA=hx();Gi.exports.SAFE_SCHEMA=gE();Gi.exports.DEFAULT_SCHEMA=H2();Gi.exports.scan=wx("scan");Gi.exports.parse=wx("parse");Gi.exports.compose=wx("compose");Gi.exports.addConstructor=wx("addConstructor")});var ore=_((lQt,sre)=>{"use strict";var aWe=ire();sre.exports=aWe});var lre=_((cQt,are)=>{"use strict";function lWe(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Td(t,e,r,s){this.message=t,this.expected=e,this.found=r,this.location=s,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Td)}lWe(Td,Error);Td.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",w;for(w=0;w<h.parts.length;w++)E+=h.parts[w]instanceof Array?n(h.parts[w][0])+"-"+n(h.parts[w][1]):n(h.parts[w]);return"["+(h.inverted?"^":"")+E+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function s(h){return h.charCodeAt(0).toString(16).toUpperCase()}function a(h){return h.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(E){return"\\x0"+s(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+s(E)})}function n(h){return h.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(E){return"\\x0"+s(E)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(E){return"\\x"+s(E)})}function c(h){return r[h.type](h)}function f(h){var E=new Array(h.length),w,S;for(w=0;w<h.length;w++)E[w]=c(h[w]);if(E.sort(),E.length>0){for(w=1,S=1;w<E.length;w++)E[w-1]!==E[w]&&(E[S]=E[w],S++);E.length=S}switch(E.length){case 1:return E[0];case 2:return E[0]+" or "+E[1];default:return E.slice(0,-1).join(", ")+", or "+E[E.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+f(t)+" but "+p(e)+" found."};function cWe(t,e){e=e!==void 0?e:{};var r={},s={Start:lc},a=lc,n=function(te){return[].concat(...te)},c="-",f=dn("-",!1),p=function(te){return te},h=function(te){return Object.assign({},...te)},E="#",w=dn("#",!1),S=Au(),x=function(){return{}},I=":",T=dn(":",!1),N=function(te,Ee){return{[te]:Ee}},U=",",W=dn(",",!1),ee=function(te,Ee){return Ee},ie=function(te,Ee,Oe){return Object.assign({},...[te].concat(Ee).map(dt=>({[dt]:Oe})))},ue=function(te){return te},le=function(te){return te},me=Oa("correct indentation"),pe=" ",Be=dn(" ",!1),Ce=function(te){return te.length===lr*St},g=function(te){return te.length===(lr+1)*St},we=function(){return lr++,!0},ye=function(){return lr--,!0},Ae=function(){return aa()},se=Oa("pseudostring"),X=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,De=Kn(["\r",`
|
|
|
|
|
`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),Te=/^[^\r\n\t ,\][{}:#"']/,mt=Kn(["\r",`
|
|
|
|
|
`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),j=function(){return aa().replace(/^ *| *$/g,"")},rt="--",Fe=dn("--",!1),Ne=/^[a-zA-Z\/0-9]/,Pe=Kn([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),Ye=/^[^\r\n\t :,]/,ke=Kn(["\r",`
|
|
|
|
|
`," "," ",":",","],!0,!1),it="null",Ue=dn("null",!1),P=function(){return null},C="true",b=dn("true",!1),y=function(){return!0},F="false",z=dn("false",!1),Z=function(){return!1},$=Oa("string"),oe='"',xe=dn('"',!1),Re=function(){return""},lt=function(te){return te},Ct=function(te){return te.join("")},Gt=/^[^"\\\0-\x1F\x7F]/,ir=Kn(['"',"\\",["\0",""],"\x7F"],!0,!1),Pt='\\"',gn=dn('\\"',!1),Pr=function(){return'"'},Ir="\\\\",Nr=dn("\\\\",!1),nn=function(){return"\\"},ai="\\/",Io=dn("\\/",!1),ts=function(){return"/"},$s="\\b",Co=dn("\\b",!1),_i=function(){return"\b"},eo="\\f",wo=dn("\\f",!1),QA=function(){return"\f"},Af="\\n",dh=dn("\\n",!1),mh=function(){return`
|
|
|
|
|
`},to="\\r",jn=dn("\\r",!1),Rs=function(){return"\r"},ro="\\t",ou=dn("\\t",!1),au=function(){return" "},lu="\\u",RA=dn("\\u",!1),TA=function(te,Ee,Oe,dt){return String.fromCharCode(parseInt(`0x${te}${Ee}${Oe}${dt}`))},sa=/^[0-9a-fA-F]/,oa=Kn([["0","9"],["a","f"],["A","F"]],!1,!1),FA=Oa("blank space"),gr=/^[ \t]/,Bo=Kn([" "," "],!1,!1),Me=Oa("white space"),cu=/^[ \t\n\r]/,Cr=Kn([" "," ",`
|
|
|
|
|
`,"\r"],!1,!1),pf=`\r
|
|
|
|
|
`,NA=dn(`\r
|
|
|
|
|
`,!1),OA=`
|
|
|
|
|
`,uu=dn(`
|
|
|
|
|
`,!1),fu="\r",oc=dn("\r",!1),ve=0,Nt=0,ac=[{line:1,column:1}],Ni=0,no=[],Tt=0,xn;if("startRule"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=s[e.startRule]}function aa(){return t.substring(Nt,ve)}function Hi(){return Ma(Nt,ve)}function Oi(te,Ee){throw Ee=Ee!==void 0?Ee:Ma(Nt,ve),hf([Oa(te)],t.substring(Nt,ve),Ee)}function Na(te,Ee){throw Ee=Ee!==void 0?Ee:Ma(Nt,ve),Ua(te,Ee)}function dn(te,Ee){return{type:"literal",text:te,ignoreCase:Ee}}function Kn(te,Ee,Oe){return{type:"class",parts:te,inverted:Ee,ignoreCase:Oe}}function Au(){return{type:"any"}}function yh(){return{type:"end"}}function Oa(te){return{type:"other",description:te}}function La(te){var Ee=ac[te],Oe;if(Ee)return Ee;for(Oe=te-1;!ac[Oe];)Oe--;for(Ee=ac[Oe],Ee={line:Ee.line,column:Ee.column};Oe<te;)t.charCodeAt(Oe)===10?(Ee.line++,Ee.column=1):Ee.column++,Oe++;return ac[te]=Ee,Ee}function Ma(te,Ee){var Oe=La(te),dt=La(Ee);return{start:{offset:te,line:Oe.line,column:Oe.column},end:{offset:Ee,line:dt.line,column:dt.column}}}function $e(te){ve<Ni||(ve>Ni&&(Ni=ve,no=[]),no.push(te))}function Ua(te,Ee){return new Td(te,null,null,Ee)}function hf(te,Ee,Oe){return new Td(Td.buildMessage(te,Ee),te,Ee,Oe)}function lc(){var te;return te=LA(),te}function wn(){var te,Ee,Oe;for(te=ve,Ee=[],Oe=la();Oe!==r;)Ee.push(Oe),Oe=la();return Ee!==r&&(Nt=te,Ee=n(Ee)),te=Ee,te}function la(){var te,Ee,Oe,dt,Et;return te=ve,Ee=Bl(),Ee!==r?(t.charCodeAt(ve)===45?(Oe=c,ve++):(Oe=r,Tt===0&&$e(f)),Oe!==r?(dt=Qn(),dt!==r?(Et=ca(),Et!==r?(Nt=te,Ee=p(Et),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r),te}function LA(){var te,Ee,Oe;for(te=ve,Ee=[],Oe=MA();Oe!==r;)Ee.push(Oe),Oe=MA();return Ee!==r&&(Nt=te,Ee=h(Ee)),te=Ee,te}function MA(){var te,Ee,Oe,dt,Et,bt,tr,fn,li;if(te=ve,Ee=Qn(),Ee===r&&(Ee=null),Ee!==r){if(Oe=ve,t.charCodeAt(ve)===35?(dt=E,ve++):(dt=r,Tt===0&&$e(w)),dt!==r){if(Et=[],bt=ve,tr=ve,Tt++,fn=st(),Tt--,fn===r?tr=void 0:(ve=tr,tr=r),tr!==r?(t.length>ve?(fn=t.charAt(ve),ve++):(fn=r,Tt===0&&$e(S)),fn!==r?(tr=[tr,fn],bt=tr):(ve=bt,bt=r)):(ve=bt,bt=r),bt!==r)for(;bt!==r;)Et.push(bt),bt=ve,tr=ve,Tt++,fn=st(),Tt--,fn===r?tr=void 0:(ve=tr,tr=r),tr!==r?(t.length>ve?(fn=t.charAt(ve),ve++):(fn=r,Tt===0&&$e(S)),fn!==r?(tr=[tr,fn],bt=tr):(ve=bt,bt=r)):(ve=bt,bt=r);else Et=r;Et!==r?(dt=[dt,Et],Oe=dt):(ve=Oe,Oe=r)}else ve=Oe,Oe=r;if(Oe===r&&(Oe=null),Oe!==r){if(dt=[],Et=Ke(),Et!==r)for(;Et!==r;)dt.push(Et),Et=Ke();else dt=r;dt!==r?(Nt=te,Ee=x(),te=Ee):(ve=te,te=r)}else ve=te,te=r}else ve=te,te=r;if(te===r&&(te=ve,Ee=Bl(),Ee!==r?(Oe=Ha(),Oe!==r?(dt=Qn(),dt===r&&(dt=null),dt!==r?(t.charCodeAt(ve)===58?(Et=I,ve++):(Et=r,Tt===0&&$e(T)),Et!==r?(bt=Qn(),bt===r&&(bt=null),bt!==r?(tr=ca(),tr!==r?(Nt=te,Ee=N(Oe,tr),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r),te===r&&(te=ve,Ee=Bl(),Ee!==r?(Oe=rs(),Oe!==r?(dt=Qn(),dt===r&&(dt=null),dt!==r?(t.charCodeAt(ve)===58?(Et=I,ve++):(Et=r,Tt===0&&$e(T)),Et!==r?(bt=Qn(),bt===r&&(bt=null),bt!==r?(tr=ca(),tr!==r?(Nt=te,Ee=N(Oe,tr),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r),te===r))){if(te=ve,Ee=Bl(),Ee!==r)if(Oe=rs(),Oe!==r)if(dt=Qn(),dt!==r)if(Et=pu(),Et!==r){if(bt=[],tr=Ke(),tr!==r)for(;tr!==r;)bt.push(tr),tr=Ke();else bt=r;bt!==r?(Nt=te,Ee=N(Oe,Et),te=Ee):(ve=te,te=r)}else ve=te,te=r;else ve=te,te=r;else ve=te,te=r;else ve=te,te=r;if(te===r)if(te=ve,Ee=Bl(),Ee!==r)if(Oe=rs(),Oe!==r){if(dt=[],Et=ve,bt=Qn(),bt===r&&(bt=null),bt!==r?(t.charCodeAt(ve)===44?(tr=U,ve++):(tr=r,Tt===0&&$e(W)),tr!==r?(fn=Qn(),fn===r&&(fn=null),fn!==r?(li=rs(),li!==r?(Nt=Et,bt=ee(Oe,li),Et=bt):(ve=Et,Et=r)):(ve=Et,Et=r)):(ve=Et,Et=r)):(ve=Et,Et=r),Et!==r)for(;Et!==r;)dt.push(Et),Et=ve,bt=Qn(),bt===r&&(bt=null),bt!==r?(t.charCodeAt(ve)===44?(tr=U,ve++):(tr=r,Tt===0&&$e(W)),tr!==r?(fn=Qn(),fn===r&&(fn=null),fn!==r?(li=rs(),li!==r?(Nt=Et,bt=ee(Oe,li),Et=bt):(ve=Et,Et=r)):(ve=Et,Et=r)):(ve=Et,Et=r)):(ve=Et,Et=r);else dt=r;dt!==r?(Et=Qn(),Et===r&&(Et=null),Et!==r?(t.charCodeAt(ve)===58?(bt=I,ve++):(bt=r,Tt===0&&$e(T)),bt!==r?(tr=Qn(),tr===r&&(tr=null),tr!==r?(fn=ca(),fn!==r?(Nt=te,Ee=ie(Oe,dt,fn),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)}else ve=te,te=r;else ve=te,te=r}return te}function ca(){var te,Ee,Oe,dt,Et,bt,tr;if(te=ve,Ee=ve,Tt++,Oe=ve,dt=st(),dt!==r?(Et=Mt(),Et!==r?(t.charCodeAt(ve)===45?(bt=c,ve++):(bt=r,Tt===0&&$e(f)),bt!==r?(tr=Qn(),tr!==r?(dt=[dt,Et,bt,tr],Oe=dt):(ve=Oe,Oe=r)):(ve=Oe,Oe=r)):(ve=Oe,Oe=r)):(ve=Oe,Oe=r),Tt--,Oe!==r?(ve=Ee,Ee=void 0):Ee=r,Ee!==r?(Oe=Ke(),Oe!==r?(dt=kn(),dt!==r?(Et=wn(),Et!==r?(bt=ua(),bt!==r?(Nt=te,Ee=ue(Et),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r),te===r&&(te=ve,Ee=st(),Ee!==r?(Oe=kn(),Oe!==r?(dt=LA(),dt!==r?(Et=ua(),Et!==r?(Nt=te,Ee=ue(dt),te=Ee):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r)):(ve=te,te=r),te===r))if(te=ve,Ee=cc(),Ee!==r){if(Oe=[],dt=Ke(),dt!==r)for(;dt!==r;)Oe.push(dt),dt=Ke();else Oe=r;Oe!==r?(Nt=te,EeLine truncated
|
|
|
|
|
`;if(typeof t=="number"||typeof t=="boolean")return`${t.toString()}
|
|
|
|
|
`;if(typeof t=="string")return`${ure(t)}
|
|
|
|
|
`;if(Array.isArray(t)){if(t.length===0)return`[]
|
|
|
|
|
`;let s=" ".repeat(e);return`
|
|
|
|
|
${t.map(n=>`${s}- ${t_(n,e+1,!1)}`).join("")}`}if(typeof t=="object"&&t){let[s,a]=t instanceof Bx?[t.data,!1]:[t,!0],n=" ".repeat(e),c=Object.keys(s);a&&c.sort((p,h)=>{let E=cre.indexOf(p),w=cre.indexOf(h);return E===-1&&w===-1?p<h?-1:p>h?1:0:E!==-1&&w===-1?-1:E===-1&&w!==-1?1:E-w});let f=c.filter(p=>!Are(s[p])).map((p,h)=>{let E=s[p],w=ure(p),S=t_(E,e+1,!0),x=h>0||r?n:"",I=w.length>1024?`? ${w}
|
|
|
|
|
${x}:`:`${w}:`,T=S.startsWith(`
|
|
|
|
|
`)?S:` ${S}`;return`${x}${I}${T}`}).join(e===0?`
|
|
|
|
|
`:"")||`
|
|
|
|
|
`;return r?`
|
|
|
|
|
${f}`:`${f}`}throw new Error(`Unsupported value type (${t})`)}function nl(t){try{let e=t_(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}}function fWe(t){return t.endsWith(`
|
|
|
|
|
`)||(t+=`
|
|
|
|
|
`),(0,fre.parse)(t)}function pWe(t){if(AWe.test(t))return fWe(t);let e=(0,vx.safeLoad)(t,{schema:vx.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 as(t){return pWe(t)}var vx,fre,uWe,cre,Bx,AWe,pre=Ze(()=>{vx=ut(ore()),fre=ut(lre()),uWe=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,cre=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],Bx=class{constructor(e){this.data=e}};nl.PreserveOrdering=Bx;AWe=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i});var Y2={};Vt(Y2,{parseResolution:()=>fx,parseShell:()=>lx,parseSyml:()=>as,stringifyArgument:()=>HU,stringifyArgumentSegment:()=>jU,stringifyArithmeticExpression:()=>ux,stringifyCommand:()=>_U,stringifyCommandChain:()=>AE,stringifyCommandChainThen:()=>UU,stringifyCommandLine:()=>cx,stringifyCommandLineThen:()=>MU,stringifyEnvSegment:()=>ax,stringifyRedirectArgument:()=>U2,stringifyResolution:()=>Ax,stringifyShell:()=>fE,stringifyShellLine:()=>fE,stringifySyml:()=>nl,stringifyValueArgument:()=>vd});var wc=Ze(()=>{Aee();dee();pre()});var gre=_((hQt,r_)=>{"use strict";var hWe=t=>{let e=!1,r=!1,s=!1;for(let a=0;a<t.length;a++){let n=t[a];e&&/[a-zA-Z]/.test(n)&&n.toUpperCase()===n?(t=t.slice(0,a)+"-"+t.slice(a),e=!1,s=r,r=!0,a++):r&&s&&/[a-zA-Z]/.test(n)&&n.toLowerCase()===n?(t=t.slice(0,a-1)+"-"+t.slice(a-1),s=r,r=!1,e=!0):(e=n.toLowerCase()===n&&n.toUpperCase()!==n,s=r,r=n.toUpperCase()===n&&n.toLowerCase()!==n)}return t},hre=(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=a=>e.pascalCase?a.charAt(0).toUpperCase()+a.slice(1):a;return Array.isArray(t)?t=t.map(a=>a.trim()).filter(a=>a.length).join("-"):t=t.trim(),t.length===0?"":t.length===1?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=hWe(t)),t=t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(a,n)=>n.toUpperCase()).replace(/\d+(\w|$)/g,a=>a.toUpperCase()),r(t))};r_.exports=hre;r_.exports.default=hre});var dre=_((gQt,gWe)=>{gWe.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{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:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{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:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEH
Line truncated
|
|
|
|
|
|
|
|
|
|
${this.candidates.map(({usage:a})=>`$ ${a}`).join(`
|
|
|
|
|
`)}`}else if(this.candidates.length===1){let[{usage:s}]=this.candidates;this.message=`Command not found; did you mean:
|
|
|
|
|
|
|
|
|
|
$ ${s}
|
|
|
|
|
${o_(e)}`}else this.message=`Command not found; did you mean one of:
|
|
|
|
|
|
|
|
|
|
${this.candidates.map(({usage:s},a)=>`${`${a}.`.padStart(4)} ${s}`).join(`
|
|
|
|
|
`)}
|
|
|
|
|
|
|
|
|
|
${o_(e)}`}},bx=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((s,a)=>`${`${a}.`.padStart(4)} ${s}`).join(`
|
|
|
|
|
`)}
|
|
|
|
|
|
|
|
|
|
${o_(e)}`}},o_=t=>`While running ${t.filter(e=>e!==ei.EndOfInput&&e!==ei.EndOfPartialInput).map(e=>{let r=JSON.stringify(e);return e.match(/\s/)||e.length===0||r!==`"${e}"`?r:e}).join(" ")}`});function dWe(t){let e=t.split(`
|
|
|
|
|
`),r=e.filter(a=>a.match(/\S/)),s=r.length>0?r.reduce((a,n)=>Math.min(a,n.length-n.trimStart().length),Number.MAX_VALUE):0;return e.map(a=>a.slice(s).trimRight()).join(`
|
|
|
|
|
`)}function Ho(t,{format:e,paragraphs:r}){return t=t.replace(/\r\n?/g,`
|
|
|
|
|
`),t=dWe(t),t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2
|
|
|
|
|
|
|
|
|
|
`),t=t.replace(/\n(\n)?\n*/g,(s,a)=>a||" "),r&&(t=t.split(/\n/).map(s=>{let a=s.match(/^\s*[*-][\t ]+(.*)/);if(!a)return s.match(/(.{1,80})(?: |$)/g).join(`
|
|
|
|
|
`);let n=s.length-s.trimStart().length;return a[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,"g")).map((c,f)=>" ".repeat(n)+(f===0?"- ":" ")+c).join(`
|
|
|
|
|
`)}).join(`
|
|
|
|
|
|
|
|
|
|
`)),t=t.replace(/(`+)((?:.|[\n])*?)\1/g,(s,a,n)=>e.code(a+n+a)),t=t.replace(/(\*\*)((?:.|[\n])*?)\1/g,(s,a,n)=>e.bold(a+n+a)),t?`${t}
|
|
|
|
|
`:""}var a_,Ire,Cre,l_=Ze(()=>{a_=Array(80).fill("\u2501");for(let t=0;t<=24;++t)a_[a_.length-t]=`\x1B[38;5;${232+t}m\u2501`;Ire={header:t=>`\x1B[1m\u2501\u2501\u2501 ${t}${t.length<75?` ${a_.slice(t.length+5).join("")}`:":"}\x1B[0m`,bold:t=>`\x1B[1m${t}\x1B[22m`,error:t=>`\x1B[31m\x1B[1m${t}\x1B[22m\x1B[39m`,code:t=>`\x1B[36m${t}\x1B[39m`},Cre={header:t=>t,bold:t=>t,error:t=>t,code:t=>t}});function ma(t){return{...t,[V2]:!0}}function Gf(t,e){return typeof t>"u"?[t,e]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[void 0,t]:[t,e]}function xx(t,{mergeName:e=!1}={}){let r=t.match(/^([^:]+): (.*)$/m);if(!r)return"validation failed";let[,s,a]=r;return e&&(a=a[0].toLowerCase()+a.slice(1)),a=s!=="."||!e?`${s.replace(/^\.(\[|$)/,"$1")}: ${a}`:`: ${a}`,a}function J2(t,e){return e.length===1?new nt(`${t}${xx(e[0],{mergeName:!0})}`):new nt(`${t}:
|
|
|
|
|
${e.map(r=>`
|
|
|
|
|
- ${xx(r)}`).join("")}`)}function Od(t,e,r){if(typeof r>"u")return e;let s=[],a=[],n=f=>{let p=e;return e=f,n.bind(null,p)};if(!r(e,{errors:s,coercions:a,coercion:n}))throw J2(`Invalid value for ${t}`,s);for(let[,f]of a)f();return e}var V2,Cp=Ze(()=>{Px();V2=Symbol("clipanion/isOption")});var ya={};Vt(ya,{KeyRelationship:()=>qf,TypeAssertionError:()=>o0,applyCascade:()=>Z2,as:()=>NWe,assert:()=>RWe,assertWithErrors:()=>TWe,cascade:()=>Tx,fn:()=>OWe,hasAtLeastOneKey:()=>g_,hasExactLength:()=>Dre,hasForbiddenKeys:()=>tYe,hasKeyRelationship:()=>$2,hasMaxLength:()=>MWe,hasMinLength:()=>LWe,hasMutuallyExclusiveKeys:()=>rYe,hasRequiredKeys:()=>eYe,hasUniqueItems:()=>UWe,isArray:()=>kx,isAtLeast:()=>p_,isAtMost:()=>jWe,isBase64:()=>zWe,isBoolean:()=>vWe,isDate:()=>DWe,isDict:()=>xWe,isEnum:()=>fo,isHexColor:()=>KWe,isISO8601:()=>JWe,isInExclusiveRange:()=>qWe,isInInclusiveRange:()=>GWe,isInstanceOf:()=>QWe,isInteger:()=>h_,isJSON:()=>ZWe,isLiteral:()=>Bre,isLowerCase:()=>WWe,isMap:()=>PWe,isNegative:()=>_We,isNullable:()=>$We,isNumber:()=>f_,isObject:()=>vre,isOneOf:()=>A_,isOptional:()=>XWe,isPartial:()=>kWe,isPayload:()=>SWe,isPositive:()=>HWe,isRecord:()=>Rx,isSet:()=>bWe,isString:()=>wE,isTuple:()=>Qx,isUUID4:()=>VWe,isUnknown:()=>u_,isUpperCase:()=>YWe,makeTrait:()=>Sre,makeValidator:()=>Wr,matchesRegExp:()=>z2,softAssert:()=>FWe});function ti(t){return t===null?"null":t===void 0?"undefined":t===""?"an empty string":typeof t=="symbol"?`<${t.toString()}>`:Array.isArray(t)?"an array":JSON.stringify(t)}function CE(t,e){if(t.length===0)return"nothing";if(t.length===1)return ti(t[0]);let r=t.slice(0,-1),s=t[t.length-1],a=t.length>2?`, ${e} `:` ${e} `;return`${r.map(n=>ti(n)).join(", ")}${a}${ti(s)}`}function s0(t,e){var r,s,a;return typeof e=="number"?`${(r=t?.p)!==null&&r!==void 0?r:"."}[${e}]`:mWe.test(e)?`${(s=t?.p)!==null&&s!==void 0?s:""}.${e}`:`${(a=t?.p)!==null&&a!==void 0?a:"."}[${JSON.stringify(e)}]`}function c_(t,e,r){return t===1?e:r}function mr({errors:t,p:e}={},r){return t?.push(`${e??"."}: ${r}`),!1}function wWe(t,e){return r=>{t[e]=r}}function Wf(t,e){return r=>{let s=t[e];return t[e]=r,Wf(t,e).bind(null,s)}}function K2(t,e,r){let s=()=>(t(r()),a),a=()=>(t(e),s);return s}function u_(){return Wr({test:(t,e)=>!0})}function Bre(t){return Wr({test:(e,r)=>e!==t?mr(r,`Expected ${ti(t)} (got ${ti(e)})`):!0})}function wE(){return Wr({test:(t,e)=>typeof t!="string"?mr(e,`Expected a string (got ${ti(t)})`):!0})}function fo(t){let e=Array.isArray(t)?t:Object.values(t),r=e.every(a=>typeof a=="string"||typeof a=="number"),s=new Set(e);return s.size===1?Bre([...s][0]):Wr({test:(a,n)=>s.has(a)?!0:r?mr(n,`Expected one of ${CE(e,"or")} (got ${ti(a)})`):mr(n,`Expected a valid enumeration value (got ${ti(a)})`)})}function vWe(){return Wr({test:(t,e)=>{var r;if(typeof t!="boolean"){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return mr(e,"Unbound coercion result");let s=BWe.get(t);if(typeof s<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a boolean (got ${ti(t)})`)}return!0}})}function f_(){return Wr({test:(t,e)=>{var r;if(typeof t!="number"){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return mr(e,"Unbound coercion result");let s;if(typeof t=="string"){let a;try{a=JSON.parse(t)}catch{}if(typeof a=="number")if(JSON.stringify(a)===t)s=a;else return mr(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeof s<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a number (got ${ti(t)})`)}return!0}})}function SWe(t){return Wr({test:(e,r)=>{var s;if(typeof r?.coercions>"u")return mr(r,"The isPayload predicate can only be used with coercion enabled");if(typeof r.coercion>"u")return mr(r,"Unbound coercion result");if(typeof e!="string")return mr(r,`Expected a string (got ${ti(e)})`);let a;try{a=JSON.parse(e)}catch{return mr(r,`Expected a JSON string (got ${ti(e)})`)}let n={value:a};return t(a,Object.assign(Object.assign({},r),{coercion:Wf(n,"value")}))?(r.coercions.push([(s=r.p)!==null&&s!==void 0?s:".",r.coercion.bind(null,n.value)]),!0):!1}})}function DWe(){return Wr({test:(t,e)=>{var r;if(!(t instanceof Date)){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return mr(e,"Unbound coercion result");let s;if(typeof t=="string"&&wre.test(t))s=new Date(t);else{let a;if(typeof t=="string"){let n;try{n=JSON.parse(t)}catch{}typeof n=="number"&&(a=n)}else typeof t=="number"&&(a=t);if(typeof a<"u")if(Number.isSafeInteger(a)||!Number.isSafeInteger(a*1e3))s=new Date(a*1e3);else return mr(e,`Received a timestamp that can't be safely represented by the runtime (${t})`)}if(typeof s<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,s)]),!0}return mr(e,`Expected a date (got ${ti(t)})`)}return!0}})}function kx(t,{delimiter:e}={}){return Wr({test:(r,s)=>{var a;let n=r;if(typeof r=="string"&&typeof e<"u"&&typeof s?.coercions<"u"){iLine truncated
|
|
|
|
|
`;for(let s of e)r+=`
|
|
|
|
|
- ${s}`}super(r)}};X2={missing:(t,e)=>t.has(e),undefined:(t,e,r)=>t.has(e)&&typeof r[e]<"u",nil:(t,e,r)=>t.has(e)&&r[e]!=null,falsy:(t,e,r)=>t.has(e)&&!!r[e]};(function(t){t.Forbids="Forbids",t.Requires="Requires"})(qf||(qf={}));nYe={[qf.Forbids]:{expect:!1,message:"forbids using"},[qf.Requires]:{expect:!0,message:"requires using"}}});var ot,a0=Ze(()=>{Cp();ot=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let r=this.constructor.schema;if(Array.isArray(r)){let{isDict:a,isUnknown:n,applyCascade:c}=await Promise.resolve().then(()=>(Ul(),ya)),f=c(a(n()),r),p=[],h=[];if(!f(this,{errors:p,coercions:h}))throw J2("Invalid option schema",p);for(let[,w]of h)w()}else if(r!=null)throw new Error("Invalid command schema");let s=await this.execute();return typeof s<"u"?s:0}};ot.isOption=V2;ot.Default=[]});function il(t){s_&&console.log(t)}function Pre(){let t={nodes:[]};for(let e=0;e<En.CustomNode;++e)t.nodes.push(_l());return t}function iYe(t){let e=Pre(),r=[],s=e.nodes.length;for(let a of t){r.push(s);for(let n=0;n<a.nodes.length;++n)kre(n)||e.nodes.push(AYe(a.nodes[n],s));s+=a.nodes.length-En.CustomNode+1}for(let a of r)BE(e,En.InitialNode,a);return e}function Ou(t,e){return t.nodes.push(e),t.nodes.length-1}function sYe(t){let e=new Set,r=s=>{if(e.has(s))return;e.add(s);let a=t.nodes[s];for(let c of Object.values(a.statics))for(let{to:f}of c)r(f);for(let[,{to:c}]of a.dynamics)r(c);for(let{to:c}of a.shortcuts)r(c);let n=new Set(a.shortcuts.map(({to:c})=>c));for(;a.shortcuts.length>0;){let{to:c}=a.shortcuts.shift(),f=t.nodes[c];for(let[p,h]of Object.entries(f.statics)){let E=Object.prototype.hasOwnProperty.call(a.statics,p)?a.statics[p]:a.statics[p]=[];for(let w of h)E.some(({to:S})=>w.to===S)||E.push(w)}for(let[p,h]of f.dynamics)a.dynamics.some(([E,{to:w}])=>p===E&&h.to===w)||a.dynamics.push([p,h]);for(let p of f.shortcuts)n.has(p.to)||(a.shortcuts.push(p),n.add(p.to))}};r(En.InitialNode)}function oYe(t,{prefix:e=""}={}){if(s_){il(`${e}Nodes are:`);for(let r=0;r<t.nodes.length;++r)il(`${e} ${r}: ${JSON.stringify(t.nodes[r])}`)}}function aYe(t,e,r=!1){il(`Running a vm on ${JSON.stringify(e)}`);let s=[{node:En.InitialNode,state:{candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,options:[],path:[],positionals:[],remainder:null,selectedIndex:null,partial:!1,tokens:[]}}];oYe(t,{prefix:" "});let a=[ei.StartOfInput,...e];for(let n=0;n<a.length;++n){let c=a[n],f=c===ei.EndOfInput||c===ei.EndOfPartialInput,p=n-1;il(` Processing ${JSON.stringify(c)}`);let h=[];for(let{node:E,state:w}of s){il(` Current node is ${E}`);let S=t.nodes[E];if(E===En.ErrorNode){h.push({node:E,state:w});continue}console.assert(S.shortcuts.length===0,"Shortcuts should have been eliminated by now");let x=Object.prototype.hasOwnProperty.call(S.statics,c);if(!r||n<a.length-1||x)if(x){let I=S.statics[c];for(let{to:T,reducer:N}of I)h.push({node:T,state:typeof N<"u"?Fx(m_,N,w,c,p):w}),il(` Static transition to ${T} found`)}else il(" No static transition found");else{let I=!1;for(let T of Object.keys(S.statics))if(T.startsWith(c)){if(c===T)for(let{to:N,reducer:U}of S.statics[T])h.push({node:N,state:typeof U<"u"?Fx(m_,U,w,c,p):w}),il(` Static transition to ${N} found`);else for(let{to:N}of S.statics[T])h.push({node:N,state:{...w,remainder:T.slice(c.length)}}),il(` Static transition to ${N} found (partial match)`);I=!0}I||il(" No partial static transition found")}if(!f)for(let[I,{to:T,reducer:N}]of S.dynamics)Fx(pYe,I,w,c,p)&&(h.push({node:T,state:typeof N<"u"?Fx(m_,N,w,c,p):w}),il(` Dynamic transition to ${T} found (via ${I})`))}if(h.length===0&&f&&e.length===1)return[{node:En.InitialNode,state:bre}];if(h.length===0)throw new IE(e,s.filter(({node:E})=>E!==En.ErrorNode).map(({state:E})=>({usage:E.candidateUsage,reason:null})));if(h.every(({node:E})=>E===En.ErrorNode))throw new IE(e,h.map(({state:E})=>({usage:E.candidateUsage,reason:E.errorMessage})));s=cYe(h)}if(s.length>0){il(" Results:");for(let n of s)il(` - ${n.node} -> ${JSON.stringify(n.state)}`)}else il(" No results");return s}function lYe(t,e,{endToken:r=ei.EndOfInput}={}){let s=aYe(t,[...e,r]);return uYe(e,s.map(({state:a})=>a))}function cYe(t){let e=0;for(let{state:r}of t)r.path.length>e&&(e=r.path.length);return t.filter(({state:r})=>r.path.length===e)}function uYe(t,e){let r=e.filter(S=>S.selectedIndex!==null),s=r.filter(S=>!S.partial);if(s.length>0&&(r=s),r.length===0)throw new Error;let a=r.filter(S=>S.selectedIndex===Nd||S.requiredOptions.every(x=>x.some(I=>S.options.find(T=>T.name===I))));if(a.length===0)throw new IE(t,r.map(S=>({usage:S.candidateUsage,reason:null})));let n=0;for(let S of a)S.path.length>n&&(n=S.path.length);let c=a.filter(S=>S.path.length===n),f=S=>S.positionals.filter(({extra:x})=>!x).length+S.options.length,p=c.map(S=>({state:S,positionalCount:f(S)})),h=0;for(let{positionalCount:S}of p)S>h&&(h=S);let E=p.filter(({positionalCount:S})=>S===h).map(({state:S
Line truncated
|
|
|
|
|
`),this.context.stdout.write(`
|
|
|
|
|
`);let r=0;for(let s of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[s].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.
|
|
|
|
|
`)}}}});async function Mre(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}=_re(t);return Ia.from(r,e).runExit(s,a)}async function Ure(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}=_re(t);return Ia.from(r,e).run(s,a)}function _re(t){let e,r,s,a;switch(typeof process<"u"&&typeof process.argv<"u"&&(s=process.argv.slice(2)),t.length){case 1:r=t[0];break;case 2:t[0]&&t[0].prototype instanceof ot||Array.isArray(t[0])?(r=t[0],Array.isArray(t[1])?s=t[1]:a=t[1]):(e=t[0],r=t[1]);break;case 3:Array.isArray(t[2])?(e=t[0],r=t[1],s=t[2]):t[0]&&t[0].prototype instanceof ot||Array.isArray(t[0])?(r=t[0],s=t[1],a=t[2]):(e=t[0],r=t[1],a=t[2]);break;default:e=t[0],r=t[1],s=t[2],a=t[3];break}if(typeof s>"u")throw new Error("The argv parameter must be provided when running Clipanion outside of a Node context");return{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:s,resolvedContext:a}}function Lre(t){return t()}var Ore,Ia,Hre=Ze(()=>{Dx();Ox();l_();Fre();a0();Nre();Ore=Symbol("clipanion/errorCommand");Ia=class t{constructor({binaryLabel:e,binaryName:r="...",binaryVersion:s,enableCapture:a=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new Nx({binaryName:r}),this.binaryLabel=e,this.binaryName=r,this.binaryVersion=s,this.enableCapture=a,this.enableColors=n}static from(e,r={}){let s=new t(r),a=Array.isArray(e)?e:[e];for(let n of a)s.register(n);return s}register(e){var r;let s=new Map,a=new e;for(let p in a){let h=a[p];typeof h=="object"&&h!==null&&h[ot.isOption]&&s.set(p,h)}let n=this.builder.command(),c=n.cliIndex,f=(r=e.paths)!==null&&r!==void 0?r:a.paths;if(typeof f<"u")for(let p of f)n.addPath(p);this.registrations.set(e,{specs:s,builder:n,index:c});for(let[p,{definition:h}]of s.entries())h(n,p);n.setContext({commandClass:e})}process(e,r){let{input:s,context:a,partial:n}=typeof e=="object"&&Array.isArray(e)?{input:e,context:r}:e,{contexts:c,process:f}=this.builder.compile(),p=f(s,{partial:n}),h={...t.defaultContext,...a};switch(p.selectedIndex){case Nd:{let E=Mx.from(p,c);return E.context=h,E.tokens=p.tokens,E}default:{let{commandClass:E}=c[p.selectedIndex],w=this.registrations.get(E);if(typeof w>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let S=new E;S.context=h,S.tokens=p.tokens,S.path=p.path;try{for(let[x,{transformer:I}]of w.specs.entries())S[x]=I(w.builder,x,p,h);return S}catch(x){throw x[Ore]=S,x}}break}}async run(e,r){var s,a;let n,c={...t.defaultContext,...r},f=(s=this.enableColors)!==null&&s!==void 0?s:c.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e,c)}catch(E){return c.stdout.write(this.error(E,{colored:f})),1}if(n.help)return c.stdout.write(this.usage(n,{colored:f,detailed:!0})),0;n.context=c,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),definition:E=>this.definition(E),error:(E,w)=>this.error(E,w),format:E=>this.format(E),process:(E,w)=>this.process(E,{...c,...w}),run:(E,w)=>this.run(E,{...c,...w}),usage:(E,w)=>this.usage(E,w)};let p=this.enableCapture&&(a=Tre(c))!==null&&a!==void 0?a:Lre,h;try{h=await p(()=>n.validateAndExecute().catch(E=>n.catch(E).then(()=>0)))}catch(E){return c.stdout.write(this.error(E,{colored:f,command:n})),1}return h}async runExit(e,r){process.exitCode=await this.run(e,r)}definition(e,{colored:r=!1}={}){if(!e.usage)return null;let{usage:s}=this.getUsageByRegistration(e,{detailed:!1}),{usage:a,options:n}=this.getUsageByRegistration(e,{detailed:!0,inlineOptions:!1}),c=typeof e.usage.category<"u"?Ho(e.usage.category,{format:this.format(r),paragraphs:!1}):void 0,f=typeof e.usage.description<"u"?Ho(e.usage.description,{format:this.format(r),paragraphs:!1}):void 0,p=typeof e.usage.details<"u"?Ho(e.usage.details,{format:this.format(r),paragraphs:!0}):void 0,h=typeof e.usage.examples<"u"?e.usage.examples.map(([E,w])=>[Ho(E,{format:this.format(r),paragraphs:!1}),w.replace(/\$0/g,this.binaryName)]):void 0;return{path:s,usage:a,category:c,description:f,details:p,examples:h,options:n}}definitions({colored:e=!1}={}){let r=[];for(let s of this.registrations.keys()){let a=this.definition(s,{colored:e});a&&r.push(a)}return r}usage(e=null,{colored:r,detailed:s=!1,prefix:a="$ "}={}){var n;if(e===null){for(let p of this.registrations.keys()){let h=p.paths,E=typeof p.usage<"u";if(!h||h.length===0||h.length===1&&h[0].length===0||((n=h?.some(x=>x.length===0))!==null&&n!==void 0?n:!1))if(e){e=null;break}else e=p;else if(E){e=null;continue}}e&&(s=!0)}let c=e!==null&&e instanceof ot?e.constructor:e,f="";if(c)if(s){let{description:p="",details:h="",examples:E=[]}=c.usage||{};p!==""&&(f+=Ho(p,{format:this.format(r),paragraphs:!1}).replace(/^./,x=>x.toUpperCase()),f+=`
|
|
|
|
|
`),(h!==""||E.length>0)&&(f+=`${this.format(r).header("Usage")}
|
|
|
|
|
`,f+=`
|
|
|
|
|
`);let{usage:w,options:S}=this.getUsageByRegistration(c,{inlineOptions:!1});if(f+=`${this.format(r).bold(a)}${w}
|
|
|
|
|
`,S.length>0){f+=`
|
|
|
|
|
`,f+=`${this.format(r).header("Options")}
|
|
|
|
|
`;let x=S.reduce((I,T)=>Math.max(I,T.definition.length),0);f+=`
|
|
|
|
|
`;for(let{definition:I,description:T}of S)f+=` ${this.format(r).bold(I.padEnd(x))} ${Ho(T,{format:this.format(r),paragraphs:!1})}`}if(h!==""&&(f+=`
|
|
|
|
|
`,f+=`${this.format(r).header("Details")}
|
|
|
|
|
`,f+=`
|
|
|
|
|
`,f+=Ho(h,{format:this.format(r),paragraphs:!0})),E.length>0){f+=`
|
|
|
|
|
`,f+=`${this.format(r).header("Examples")}
|
|
|
|
|
`;for(let[x,I]of E)f+=`
|
|
|
|
|
`,f+=Ho(x,{format:this.format(r),paragraphs:!1}),f+=`${I.replace(/^/m,` ${this.format(r).bold(a)}`).replace(/\$0/g,this.binaryName)}
|
|
|
|
|
`}}else{let{usage:p}=this.getUsageByRegistration(c);f+=`${this.format(r).bold(a)}${p}
|
|
|
|
|
`}else{let p=new Map;for(let[S,{index:x}]of this.registrations.entries()){if(typeof S.usage>"u")continue;let I=typeof S.usage.category<"u"?Ho(S.usage.category,{format:this.format(r),paragraphs:!1}):null,T=p.get(I);typeof T>"u"&&p.set(I,T=[]);let{usage:N}=this.getUsageByIndex(x);T.push({commandClass:S,usage:N})}let h=Array.from(p.keys()).sort((S,x)=>S===null?-1:x===null?1:S.localeCompare(x,"en",{usage:"sort",caseFirst:"upper"})),E=typeof this.binaryLabel<"u",w=typeof this.binaryVersion<"u";E||w?(E&&w?f+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}
|
|
|
|
|
|
|
|
|
|
`:E?f+=`${this.format(r).header(`${this.binaryLabel}`)}
|
|
|
|
|
`:f+=`${this.format(r).header(`${this.binaryVersion}`)}
|
|
|
|
|
`,f+=` ${this.format(r).bold(a)}${this.binaryName} <command>
|
|
|
|
|
`):f+=`${this.format(r).bold(a)}${this.binaryName} <command>
|
|
|
|
|
`;for(let S of h){let x=p.get(S).slice().sort((T,N)=>T.usage.localeCompare(N.usage,"en",{usage:"sort",caseFirst:"upper"})),I=S!==null?S.trim():"General commands";f+=`
|
|
|
|
|
`,f+=`${this.format(r).header(`${I}`)}
|
|
|
|
|
`;for(let{commandClass:T,usage:N}of x){let U=T.usage.description||"undocumented";f+=`
|
|
|
|
|
`,f+=` ${this.format(r).bold(N)}
|
|
|
|
|
`,f+=` ${Ho(U,{format:this.format(r),paragraphs:!1})}`}}f+=`
|
|
|
|
|
`,f+=Ho("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 f}error(e,r){var s,{colored:a,command:n=(s=e[Ore])!==null&&s!==void 0?s:null}=r===void 0?{}:r;(!e||typeof e!="object"||!("stack"in e))&&(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let c="",f=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");f==="Error"&&(f="Internal Error"),c+=`${this.format(a).error(f)}: ${e.message}
|
|
|
|
|
`;let p=e.clipanion;return typeof p<"u"?p.type==="usage"&&(c+=`
|
|
|
|
|
`,c+=this.usage(n)):e.stack&&(c+=`${e.stack.replace(/^.*\n/,"")}
|
|
|
|
|
`),c}format(e){var r;return((r=e??this.enableColors)!==null&&r!==void 0?r:t.defaultContext.colorDepth>1)?Ire:Cre}getUsageByRegistration(e,r){let s=this.registrations.get(e);if(typeof s>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(s.index,r)}getUsageByIndex(e,r){return this.builder.getBuilderByIndex(e).usage(r)}};Ia.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:Rre()}});var eB,jre=Ze(()=>{a0();eB=class extends ot{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)}
|
|
|
|
|
`)}};eB.paths=[["--clipanion=definitions"]]});var tB,Gre=Ze(()=>{a0();tB=class extends ot{async execute(){this.context.stdout.write(this.cli.usage())}};tB.paths=[["-h"],["--help"]]});function Ux(t={}){return ma({definition(e,r){var s;e.addProxy({name:(s=t.name)!==null&&s!==void 0?s:r,required:t.required})},transformer(e,r,s){return s.positionals.map(({value:a})=>a)}})}var E_=Ze(()=>{Cp()});var rB,qre=Ze(()=>{a0();E_();rB=class extends ot{constructor(){super(...arguments),this.args=Ux()}async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.process(this.args).tokens,null,2)}
|
|
|
|
|
`)}};rB.paths=[["--clipanion=tokens"]]});var nB,Wre=Ze(()=>{a0();nB=class extends ot{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:"<unknown>"}
|
|
|
|
|
`)}};nB.paths=[["-v"],["--version"]]});var I_={};Vt(I_,{DefinitionsCommand:()=>eB,HelpCommand:()=>tB,TokensCommand:()=>rB,VersionCommand:()=>nB});var Yre=Ze(()=>{jre();Gre();qre();Wre()});function Vre(t,e,r){let[s,a]=Gf(e,r??{}),{arity:n=1}=a,c=t.split(","),f=new Set(c);return ma({definition(p){p.addOption({names:c,arity:n,hidden:a?.hidden,description:a?.description,required:a.required})},transformer(p,h,E){let w,S=typeof s<"u"?[...s]:void 0;for(let{name:x,value:I}of E.options)f.has(x)&&(w=x,S=S??[],S.push(I));return typeof S<"u"?Od(w??h,S,a.validator):S}})}var Jre=Ze(()=>{Cp()});function Kre(t,e,r){let[s,a]=Gf(e,r??{}),n=t.split(","),c=new Set(n);return ma({definition(f){f.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(f,p,h){let E=s;for(let{name:w,value:S}of h.options)c.has(w)&&(E=S);return E}})}var zre=Ze(()=>{Cp()});function Zre(t,e,r){let[s,a]=Gf(e,r??{}),n=t.split(","),c=new Set(n);return ma({definition(f){f.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(f,p,h){let E=s;for(let{name:w,value:S}of h.options)c.has(w)&&(E??(E=0),S?E+=1:E=0);return E}})}var Xre=Ze(()=>{Cp()});function $re(t={}){return ma({definition(e,r){var s;e.addRest({name:(s=t.name)!==null&&s!==void 0?s:r,required:t.required})},transformer(e,r,s){let a=c=>{let f=s.positionals[c];return f.extra===Hl||f.extra===!1&&c<e.arity.leading.length},n=0;for(;n<s.positionals.length&&a(n);)n+=1;return s.positionals.splice(0,n).map(({value:c})=>c)}})}var ene=Ze(()=>{Ox();Cp()});function hYe(t,e,r){let[s,a]=Gf(e,r??{}),{arity:n=1}=a,c=t.split(","),f=new Set(c);return ma({definition(p){p.addOption({names:c,arity:a.tolerateBoolean?0:n,hidden:a.hidden,description:a.description,required:a.required})},transformer(p,h,E,w){let S,x=s;typeof a.env<"u"&&w.env[a.env]&&(S=a.env,x=w.env[a.env]);for(let{name:I,value:T}of E.options)f.has(I)&&(S=I,x=T);return typeof x=="string"?Od(S??h,x,a.validator):x}})}function gYe(t={}){let{required:e=!0}=t;return ma({definition(r,s){var a;r.addPositional({name:(a=t.name)!==null&&a!==void 0?a:s,required:t.required})},transformer(r,s,a){var n;for(let c=0;c<a.positionals.length;++c){if(a.positionals[c].extra===Hl||e&&a.positionals[c].extra===!0||!e&&a.positionals[c].extra===!1)continue;let[f]=a.positionals.splice(c,1);return Od((n=t.name)!==null&&n!==void 0?n:s,f.value,t.validator)}}})}function tne(t,...e){return typeof t=="string"?hYe(t,...e):gYe(t)}var rne=Ze(()=>{Ox();Cp()});var ge={};Vt(ge,{Array:()=>Vre,Boolean:()=>Kre,Counter:()=>Zre,Proxy:()=>Ux,Rest:()=>$re,String:()=>tne,applyValidator:()=>Od,cleanValidationError:()=>xx,formatError:()=>J2,isOptionSymbol:()=>V2,makeCommandOption:()=>ma,rerouteArguments:()=>Gf});var nne=Ze(()=>{Cp();E_();Jre();zre();Xre();ene();rne()});var iB={};Vt(iB,{Builtins:()=>I_,Cli:()=>Ia,Command:()=>ot,Option:()=>ge,UsageError:()=>nt,formatMarkdownish:()=>Ho,run:()=>Ure,runExit:()=>Mre});var Wt=Ze(()=>{Px();l_();a0();Hre();Yre();nne()});var ine=_((wRt,dYe)=>{dYe.exports={name:"dotenv",version:"16.3.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var lne=_((BRt,wp)=>{var sne=Ie("fs"),w_=Ie("path"),mYe=Ie("os"),yYe=Ie("crypto"),EYe=ine(),B_=EYe.version,IYe=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function CYe(t){let e={},r=t.toString();r=r.replace(/\r\n?/mg,`
|
|
|
|
|
`);let s;for(;(s=IYe.exec(r))!=null;){let a=s[1],n=s[2]||"";n=n.trim();let c=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),c==='"'&&(n=n.replace(/\\n/g,`
|
|
|
|
|
`),n=n.replace(/\\r/g,"\r")),e[a]=n}return e}function wYe(t){let e=ane(t),r=js.configDotenv({path:e});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);let s=one(t).split(","),a=s.length,n;for(let c=0;c<a;c++)try{let f=s[c].trim(),p=SYe(r,f);n=js.decrypt(p.ciphertext,p.key);break}catch(f){if(c+1>=a)throw f}return js.parse(n)}function BYe(t){console.log(`[dotenv@${B_}][INFO] ${t}`)}function vYe(t){console.log(`[dotenv@${B_}][WARN] ${t}`)}function C_(t){console.log(`[dotenv@${B_}][DEBUG] ${t}`)}function one(t){return t&&t.DOTENV_KEY&&t.DOTENV_KEY.length>0?t.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function SYe(t,e){let r;try{r=new URL(e)}catch(f){throw f.code==="ERR_INVALID_URL"?new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development"):f}let s=r.password;if(!s)throw new Error("INVALID_DOTENV_KEY: Missing key part");let a=r.searchParams.get("environment");if(!a)throw new Error("INVALID_DOTENV_KEY: Missing environment part");let n=`DOTENV_VAULT_${a.toUpperCase()}`,c=t.parsed[n];if(!c)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${n} in your .env.vault file.`);return{ciphertext:c,key:s}}function ane(t){let e=w_.resolve(process.cwd(),".env");return t&&t.path&&t.path.length>0&&(e=t.path),e.endsWith(".vault")?e:`${e}.vault`}function DYe(t){return t[0]==="~"?w_.join(mYe.homedir(),t.slice(1)):t}function bYe(t){BYe("Loading env from encrypted .env.vault");let e=js._parseVault(t),r=process.env;return t&&t.processEnv!=null&&(r=t.processEnv),js.populate(r,e,t),{parsed:e}}function PYe(t){let e=w_.resolve(process.cwd(),".env"),r="utf8",s=!!(t&&t.debug);t&&(t.path!=null&&(e=DYe(t.path)),t.encoding!=null&&(r=t.encoding));try{let a=js.parse(sne.readFileSync(e,{encoding:r})),n=process.env;return t&&t.processEnv!=null&&(n=t.processEnv),js.populate(n,a,t),{parsed:a}}catch(a){return s&&C_(`Failed to load ${e} ${a.message}`),{error:a}}}function xYe(t){let e=ane(t);return one(t).length===0?js.configDotenv(t):sne.existsSync(e)?js._configVault(t):(vYe(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),js.configDotenv(t))}function kYe(t,e){let r=Buffer.from(e.slice(-64),"hex"),s=Buffer.from(t,"base64"),a=s.slice(0,12),n=s.slice(-16);s=s.slice(12,-16);try{let c=yYe.createDecipheriv("aes-256-gcm",r,a);return c.setAuthTag(n),`${c.update(s)}${c.final()}`}catch(c){let f=c instanceof RangeError,p=c.message==="Invalid key length",h=c.message==="Unsupported state or unable to authenticate data";if(f||p){let E="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(E)}else if(h){let E="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(E)}else throw console.error("Error: ",c.code),console.error("Error: ",c.message),c}}function QYe(t,e,r={}){let s=!!(r&&r.debug),a=!!(r&&r.override);if(typeof e!="object")throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(let n of Object.keys(e))Object.prototype.hasOwnProperty.call(t,n)?(a===!0&&(t[n]=e[n]),s&&C_(a===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):t[n]=e[n]}var js={configDotenv:PYe,_configVault:bYe,_parseVault:wYe,config:xYe,decrypt:kYe,parse:CYe,populate:QYe};wp.exports.configDotenv=js.configDotenv;wp.exports._configVault=js._configVault;wp.exports._parseVault=js._parseVault;wp.exports.config=js.config;wp.exports.decrypt=js.decrypt;wp.exports.parse=js.parse;wp.exports.populate=js.populate;wp.exports=js});var une=_((vRt,cne)=>{"use strict";cne.exports=(t,...e)=>new Promise(r=>{r(t(...e))})});var Ld=_((SRt,v_)=>{"use strict";var RYe=une(),fne=t=>{if(t<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],r=0,s=()=>{r--,e.length>0&&e.shift()()},a=(f,p,...h)=>{r++;let E=RYe(f,...h);p(E),E.then(s,s)},n=(f,p,...h)=>{r<t?a(f,p,...h):e.push(a.bind(null,f,p,...h))},c=(f,...p)=>new Promise(h=>n(f,h,...p));return Object.defineProperties(c,{activeCount:{get:()=>r},pendingCount:{get:()=>e.length}}),c};v_.exports=fne;v_.exports.default=fne});function Yf(t){return`YN${t.toString(10).padStart(4,"0")}`}function _x(t){let e=Number(t.slice(2));if(typeof Dr[e]>"u")throw new Error(`Unknown message name: "${t}"`);return e}var Dr,Hx=Ze(()=>{Dr=(Me=>(Me[Me.UNNAMED=0]="UNNAMED",Me[Me.EXCEPTION=1]="EXCEPTION",Me[Me.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",Me[Me.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",Me[Me.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",Me[Me.BUILD_DISABLED=5]="BUILD_DISABLED",Me[Me.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",Me[Me.MUST_BUILD=7]="MUST_BUILD",Me[Me.MUST_REBUILD=8]="MUST_REBUILD",Me[Me.BUILD_FAILED=9]="BUILD_FAILED",Me[Me.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",Me[Me.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",Me[Me.LINKER_NOT_FOUND=12]="LINKER_NOT_FO
Line truncated
|
|
|
|
|
`,"\r","(",")","!","|","&","^"],!0,!1),le=function($){return e.queryPattern.test($)},me=function($){return e.checkFn($)},pe=ke("whitespace"),Be=/^[ \t\n\r]/,Ce=Ne([" "," ",`
|
|
|
|
|
`,"\r"],!1,!1),g=0,we=0,ye=[{line:1,column:1}],Ae=0,se=[],X=0,De;if("startRule"in e){if(!(e.startRule in s))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=s[e.startRule]}function Te(){return t.substring(we,g)}function mt(){return Ue(we,g)}function j($,oe){throw oe=oe!==void 0?oe:Ue(we,g),b([ke($)],t.substring(we,g),oe)}function rt($,oe){throw oe=oe!==void 0?oe:Ue(we,g),C($,oe)}function Fe($,oe){return{type:"literal",text:$,ignoreCase:oe}}function Ne($,oe,xe){return{type:"class",parts:$,inverted:oe,ignoreCase:xe}}function Pe(){return{type:"any"}}function Ye(){return{type:"end"}}function ke($){return{type:"other",description:$}}function it($){var oe=ye[$],xe;if(oe)return oe;for(xe=$-1;!ye[xe];)xe--;for(oe=ye[xe],oe={line:oe.line,column:oe.column};xe<$;)t.charCodeAt(xe)===10?(oe.line++,oe.column=1):oe.column++,xe++;return ye[$]=oe,oe}function Ue($,oe){var xe=it($),Re=it(oe);return{start:{offset:$,line:xe.line,column:xe.column},end:{offset:oe,line:Re.line,column:Re.column}}}function P($){g<Ae||(g>Ae&&(Ae=g,se=[]),se.push($))}function C($,oe){return new jd($,null,null,oe)}function b($,oe,xe){return new jd(jd.buildMessage($,oe),$,oe,xe)}function y(){var $,oe,xe,Re,lt,Ct,Gt,ir;if($=g,oe=F(),oe!==r){for(xe=[],Re=g,lt=Z(),lt!==r?(t.charCodeAt(g)===124?(Ct=n,g++):(Ct=r,X===0&&P(c)),Ct===r&&(t.charCodeAt(g)===38?(Ct=f,g++):(Ct=r,X===0&&P(p)),Ct===r&&(t.charCodeAt(g)===94?(Ct=h,g++):(Ct=r,X===0&&P(E)))),Ct!==r?(Gt=Z(),Gt!==r?(ir=F(),ir!==r?(lt=[lt,Ct,Gt,ir],Re=lt):(g=Re,Re=r)):(g=Re,Re=r)):(g=Re,Re=r)):(g=Re,Re=r);Re!==r;)xe.push(Re),Re=g,lt=Z(),lt!==r?(t.charCodeAt(g)===124?(Ct=n,g++):(Ct=r,X===0&&P(c)),Ct===r&&(t.charCodeAt(g)===38?(Ct=f,g++):(Ct=r,X===0&&P(p)),Ct===r&&(t.charCodeAt(g)===94?(Ct=h,g++):(Ct=r,X===0&&P(E)))),Ct!==r?(Gt=Z(),Gt!==r?(ir=F(),ir!==r?(lt=[lt,Ct,Gt,ir],Re=lt):(g=Re,Re=r)):(g=Re,Re=r)):(g=Re,Re=r)):(g=Re,Re=r);xe!==r?(we=$,oe=w(oe,xe),$=oe):(g=$,$=r)}else g=$,$=r;return $}function F(){var $,oe,xe,Re,lt,Ct;return $=g,t.charCodeAt(g)===33?(oe=S,g++):(oe=r,X===0&&P(x)),oe!==r?(xe=F(),xe!==r?(we=$,oe=I(xe),$=oe):(g=$,$=r)):(g=$,$=r),$===r&&($=g,t.charCodeAt(g)===40?(oe=T,g++):(oe=r,X===0&&P(N)),oe!==r?(xe=Z(),xe!==r?(Re=y(),Re!==r?(lt=Z(),lt!==r?(t.charCodeAt(g)===41?(Ct=U,g++):(Ct=r,X===0&&P(W)),Ct!==r?(we=$,oe=ee(Re),$=oe):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r),$===r&&($=z())),$}function z(){var $,oe,xe,Re,lt;if($=g,oe=Z(),oe!==r){if(xe=g,Re=[],ie.test(t.charAt(g))?(lt=t.charAt(g),g++):(lt=r,X===0&&P(ue)),lt!==r)for(;lt!==r;)Re.push(lt),ie.test(t.charAt(g))?(lt=t.charAt(g),g++):(lt=r,X===0&&P(ue));else Re=r;Re!==r?xe=t.substring(xe,g):xe=Re,xe!==r?(we=g,Re=le(xe),Re?Re=void 0:Re=r,Re!==r?(we=$,oe=me(xe),$=oe):(g=$,$=r)):(g=$,$=r)}else g=$,$=r;return $}function Z(){var $,oe;for(X++,$=[],Be.test(t.charAt(g))?(oe=t.charAt(g),g++):(oe=r,X===0&&P(Ce));oe!==r;)$.push(oe),Be.test(t.charAt(g))?(oe=t.charAt(g),g++):(oe=r,X===0&&P(Ce));return X--,$===r&&(oe=r,X===0&&P(pe)),$}if(De=a(),De!==r&&g===t.length)return De;throw De!==r&&g<t.length&&P(Ye()),b(se,Ae<t.length?t.charAt(Ae):null,Ae<t.length?Ue(Ae,Ae+1):Ue(Ae,Ae))}lse.exports={SyntaxError:jd,parse:QJe}});var use=_(ek=>{var{parse:RJe}=cse();ek.makeParser=(t=/[a-z]+/)=>(e,r)=>RJe(e,{queryPattern:t,checkFn:r});ek.parse=ek.makeParser()});var Ase=_((CTt,fse)=>{"use strict";fse.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightLine truncated
|
|
|
|
|
`:`
|
|
|
|
|
`)+r,a=s+1,s=t.indexOf(`
|
|
|
|
|
`,a)}while(s!==-1);return n+=t.substr(a),n};xse.exports={stringReplaceAll:WJe,stringEncaseCRLFWithFirstIndex:YJe}});var Nse=_((xTt,Fse)=>{"use strict";var VJe=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Qse=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,JJe=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,KJe=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,zJe=new Map([["n",`
|
|
|
|
|
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Tse(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)):zJe.get(t)||t}function ZJe(t,e){let r=[],s=e.trim().split(/\s*,\s*/g),a;for(let n of s){let c=Number(n);if(!Number.isNaN(c))r.push(c);else if(a=n.match(JJe))r.push(a[2].replace(KJe,(f,p,h)=>p?Tse(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function XJe(t){Qse.lastIndex=0;let e=[],r;for(;(r=Qse.exec(t))!==null;){let s=r[1];if(r[2]){let a=ZJe(s,r[2]);e.push([s].concat(a))}else e.push([s])}return e}function Rse(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let s=t;for(let[a,n]of Object.entries(r))if(Array.isArray(n)){if(!(a in s))throw new Error(`Unknown Chalk style: ${a}`);s=n.length>0?s[a](...n):s[a]}return s}Fse.exports=(t,e)=>{let r=[],s=[],a=[];if(e.replace(VJe,(n,c,f,p,h,E)=>{if(c)a.push(Tse(c));else if(p){let w=a.join("");a=[],s.push(r.length===0?w:Rse(t,r)(w)),r.push({inverse:f,styles:XJe(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");s.push(Rse(t,r)(a.join(""))),a=[],r.pop()}else a.push(E)}),s.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return s.join("")}});var RE=_((kTt,Hse)=>{"use strict";var gB=nk(),{stdout:X_,stderr:$_}=Pse(),{stringReplaceAll:$Je,stringEncaseCRLFWithFirstIndex:eKe}=kse(),{isArray:ik}=Array,Lse=["ansi","ansi","ansi256","ansi16m"],QE=Object.create(null),tKe=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=X_?X_.level:0;t.level=e.level===void 0?r:e.level},e4=class{constructor(e){return Mse(e)}},Mse=t=>{let e={};return tKe(e,t),e.template=(...r)=>_se(e.template,...r),Object.setPrototypeOf(e,sk.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=e4,e.template};function sk(t){return Mse(t)}for(let[t,e]of Object.entries(gB))QE[t]={get(){let r=ok(this,t4(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};QE.visible={get(){let t=ok(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var Use=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of Use)QE[t]={get(){let{level:e}=this;return function(...r){let s=t4(gB.color[Lse[e]][t](...r),gB.color.close,this._styler);return ok(this,s,this._isEmpty)}}};for(let t of Use){let e="bg"+t[0].toUpperCase()+t.slice(1);QE[e]={get(){let{level:r}=this;return function(...s){let a=t4(gB.bgColor[Lse[r]][t](...s),gB.bgColor.close,this._styler);return ok(this,a,this._isEmpty)}}}}var rKe=Object.defineProperties(()=>{},{...QE,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),t4=(t,e,r)=>{let s,a;return r===void 0?(s=t,a=e):(s=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:s,closeAll:a,parent:r}},ok=(t,e,r)=>{let s=(...a)=>ik(a[0])&&ik(a[0].raw)?Ose(s,_se(s,...a)):Ose(s,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(s,rKe),s._generator=t,s._styler=e,s._isEmpty=r,s},Ose=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:s,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=$Je(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
|
|
|
|
|
`);return n!==-1&&(e=eKe(e,a,s,n)),s+e+a},Z_,_se=(t,...e)=>{let[r]=e;if(!ik(r)||!ik(r.raw))return e.join(" ");let s=e.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(s[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return Z_===void 0&&(Z_=Nse()),Z_(t,a.join(""))};Object.defineProperties(sk.prototype,QE);var ak=sk();ak.supportsColor=X_;ak.stderr=sk({level:$_?$_.level:0});ak.stderr.supportsColor=$_;Hse.exports=ak});var lk=_(Dc=>{"use strict";Dc.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;Dc.find=(t,e)=>t.nodes.find(r=>r.type===e);Dc.exceedsLimit=(t,e,r=1,s)=>s===!1||!Dc.isInteger(t)||!Dc.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=s;Dc.escapeNode=(t,e=0,r)=>{let s=t.nodes[e];s&&(r&&s.type===r||s.type==="open"||s.type==="close")&&s.escaped!==!0&&(s.value="\\"+s.value,s.escaped=!0)};Dc.encloseBrace=t=>t.type!=="brace"||t.commas>>0+t.ranges>>0?!1:(t.invalid=!0,!0);Dc.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:!(t.commas>>0+t.ranges>>0)||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;Dc.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;Dc.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);Dc.flatten=(...t)=>{let e=[],r=s=>{for(let a=0;a<s.length;a++){let n=s[a];Array.isArray(n)?r(n,e):n!==void 0&&e.push(n)}return e};return r(t),e}});var ck=_((RTt,Gse)=>{"use strict";var jse=lk();Gse.exports=(t,e={})=>{let r=(s,a={})=>{let n=e.escapeInvalid&&jse.isInvalidBrace(a),c=s.invalid===!0&&e.escapeInvalid===!0,f="";if(s.value)return(n||c)&&jse.isOpenOrClose(s)?"\\"+s.value:s.value;if(s.value)return s.value;if(s.nodes)for(let p of s.nodes)f+=r(p);return f};return r(t)}});var Wse=_((TTt,qse)=>{"use strict";qse.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var eoe=_((FTt,$se)=>{"use strict";var Yse=Wse(),Gd=(t,e,r)=>{if(Yse(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(Yse(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let s={relaxZeros:!0,...r};typeof s.strictZeros=="boolean"&&(s.relaxZeros=s.strictZeros===!1);let a=String(s.relaxZeros),n=String(s.shorthand),c=String(s.capture),f=String(s.wrap),p=t+":"+e+"="+a+n+c+f;if(Gd.cache.hasOwnProperty(p))return Gd.cache[p].result;let h=Math.min(t,e),E=Math.max(t,e);if(Math.abs(h-E)===1){let T=t+"|"+e;return s.capture?`(${T})`:s.wrap===!1?T:`(?:${T})`}let w=Xse(t)||Xse(e),S={min:t,max:e,a:h,b:E},x=[],I=[];if(w&&(S.isPadded=w,S.maxLen=String(S.max).length),h<0){let T=E<0?Math.abs(E):1;I=Vse(T,Math.abs(h),S,s),h=S.a=0}return E>=0&&(x=Vse(h,E,S,s)),S.negatives=I,S.positives=x,S.result=nKe(I,x,s),s.capture===!0?S.result=`(${S.result})`:s.wrap!==!1&&x.length+I.length>1&&(S.result=`(?:${S.result})`),Gd.cache[p]=S,S.result};function nKe(t,e,r){let s=r4(t,e,"-",!1,r)||[],a=r4(e,t,"",!1,r)||[],n=r4(t,e,"-?",!0,r)||[];return s.concat(n).concat(a).join("|")}function iKe(t,e){let r=1,s=1,a=Kse(t,r),n=new Set([e]);for(;t<=a&&a<=e;)n.add(a),r+=1,a=Kse(t,r);for(a=zse(e+1,s)-1;t<a&&a<=e;)n.add(a),s+=1,a=zse(e+1,s)-1;return n=[...n],n.sort(aKe),n}function sKe(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let s=oKe(t,e),a=s.length,n="",c=0;for(let f=0;f<a;f++){let[p,h]=s[f];p===h?n+=p:p!=="0"||h!=="9"?n+=lKe(p,h,r):c++}return c&&(n+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:n,count:[c],digits:a}}function Vse(t,e,r,s){let a=iKe(t,e),n=[],c=t,f;for(let p=0;p<a.length;p++){let h=a[p],E=sKe(String(c),String(h),s),w="";if(!r.isPadded&&f&&f.pattern===E.pattern){f.count.length>1&&f.count.pop(),f.count.push(E.count[0]),f.string=f.pattern+Zse(f.count),c=h+1;continue}r.isPadded&&(w=cKe(h,r,s)),E.string=w+E.pattern+Zse(E.count),n.push(E),c=h+1,f=E}return n}function r4(t,e,r,s,a){let n=[];for(let c of t){let{string:f}=c;!s&&!Jse(e,"string",f)&&n.push(r+f),s&&Jse(e,"string",f)&&n.push(r+f)}return n}function oKe(t,e){let r=[];for(let s=0;s<t.length;s++)r.push([t[s],e[s]]);return r}function aKe(t,e){return t>e?1:e>t?-1:0}function Jse(t,e,r){return t.some(s=>s[e]===r)}function Kse(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function zse(t,e){return t-t%Math.pow(10,e)}function Zse(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function lKe(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function Xse(t){return/^-?(0+)\d/.test(t)}function cKe(t,e,r){if(!e.isPadded)return t;let s=Math.abs(e.maxLen-String(t).length),a=r.relaxZeros!==!1;switch(s){case 0:return"";case 1:return a?"0?":"0";case 2:return a?"0{0,2}":"00";default:return a?`0{0,${s}}`:`0{${s}}`}}Gd.cache={};Gd.clearCache=()=>Gd.cache={};$se.exports=Gd});var s4=_((NTt,loe)=>{"use strict";var uKe=Ie("util"),noe=eoe(),toe=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),fKe=t=>e=>t===!0?Number(e):String(e),n4=t=>typeof t=="numb
Line truncated
|
|
|
|
|
`,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 Coe=_((UTt,Ioe)=>{"use strict";var wKe=ck(),{MAX_LENGTH:moe,CHAR_BACKSLASH:o4,CHAR_BACKTICK:BKe,CHAR_COMMA:vKe,CHAR_DOT:SKe,CHAR_LEFT_PARENTHESES:DKe,CHAR_RIGHT_PARENTHESES:bKe,CHAR_LEFT_CURLY_BRACE:PKe,CHAR_RIGHT_CURLY_BRACE:xKe,CHAR_LEFT_SQUARE_BRACKET:yoe,CHAR_RIGHT_SQUARE_BRACKET:Eoe,CHAR_DOUBLE_QUOTE:kKe,CHAR_SINGLE_QUOTE:QKe,CHAR_NO_BREAK_SPACE:RKe,CHAR_ZERO_WIDTH_NOBREAK_SPACE:TKe}=doe(),FKe=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},s=typeof r.maxLength=="number"?Math.min(moe,r.maxLength):moe;if(t.length>s)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${s})`);let a={type:"root",input:t,nodes:[]},n=[a],c=a,f=a,p=0,h=t.length,E=0,w=0,S,x={},I=()=>t[E++],T=N=>{if(N.type==="text"&&f.type==="dot"&&(f.type="text"),f&&f.type==="text"&&N.type==="text"){f.value+=N.value;return}return c.nodes.push(N),N.parent=c,N.prev=f,f=N,N};for(T({type:"bos"});E<h;)if(c=n[n.length-1],S=I(),!(S===TKe||S===RKe)){if(S===o4){T({type:"text",value:(e.keepEscaping?S:"")+I()});continue}if(S===Eoe){T({type:"text",value:"\\"+S});continue}if(S===yoe){p++;let N=!0,U;for(;E<h&&(U=I());){if(S+=U,U===yoe){p++;continue}if(U===o4){S+=I();continue}if(U===Eoe&&(p--,p===0))break}T({type:"text",value:S});continue}if(S===DKe){c=T({type:"paren",nodes:[]}),n.push(c),T({type:"text",value:S});continue}if(S===bKe){if(c.type!=="paren"){T({type:"text",value:S});continue}c=n.pop(),T({type:"text",value:S}),c=n[n.length-1];continue}if(S===kKe||S===QKe||S===BKe){let N=S,U;for(e.keepQuotes!==!0&&(S="");E<h&&(U=I());){if(U===o4){S+=U+I();continue}if(U===N){e.keepQuotes===!0&&(S+=U);break}S+=U}T({type:"text",value:S});continue}if(S===PKe){w++;let U={type:"brace",open:!0,close:!1,dollar:f.value&&f.value.slice(-1)==="$"||c.dollar===!0,depth:w,commas:0,ranges:0,nodes:[]};c=T(U),n.push(c),T({type:"open",value:S});continue}if(S===xKe){if(c.type!=="brace"){T({type:"text",value:S});continue}let N="close";c=n.pop(),c.close=!0,T({type:N,value:S}),w--,c=n[n.length-1];continue}if(S===vKe&&w>0){if(c.ranges>0){c.ranges=0;let N=c.nodes.shift();c.nodes=[N,{type:"text",value:wKe(c)}]}T({type:"comma",value:S}),c.commas++;continue}if(S===SKe&&w>0&&c.commas===0){let N=c.nodes;if(w===0||N.length===0){T({type:"text",value:S});continue}if(f.type==="dot"){if(c.range=[],f.value+=S,f.type="range",c.nodes.length!==3&&c.nodes.length!==5){c.invalid=!0,c.ranges=0,f.type="text";continue}c.ranges++,c.args=[];continue}if(f.type==="range"){N.pop();let U=N[N.length-1];U.value+=f.value+S,f=U,c.ranges--;continue}T({type:"dot",value:S});continue}T({type:"text",value:S})}do if(c=n.pop(),c.type!=="root"){c.nodes.forEach(W=>{W.nodes||(W.type==="open"&&(W.isOpen=!0),W.type==="close"&&(W.isClose=!0),W.nodes||(W.type="text"),W.invalid=!0)});let N=n[n.length-1],U=N.nodes.indexOf(c);N.nodes.splice(U,1,...c.nodes)}while(n.length>0);return T({type:"eos"}),a};Ioe.exports=FKe});var voe=_((_Tt,Boe)=>{"use strict";var woe=ck(),NKe=foe(),OKe=hoe(),LKe=Coe(),jl=(t,e={})=>{let r=[];if(Array.isArray(t))for(let s of t){let a=jl.create(s,e);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(jl.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};jl.parse=(t,e={})=>LKe(t,e);jl.stringify=(t,e={})=>woe(typeof t=="string"?jl.parse(t,e):t,e);jl.compile=(t,e={})=>(typeof t=="string"&&(t=jl.parse(t,e)),NKe(t,e));jl.expand=(t,e={})=>{typeof t=="string"&&(t=jl.parse(t,e));let r=OKe(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};jl.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?jl.compile(t,e):jl.expand(t,e);Boe.exports=jl});var mB=_((HTt,xoe)=>{"use strict";var MKe=Ie("path"),Vf="\\\\/",Soe=`[^${Vf}]`,Dp="\\.",UKe="\\+",_Ke="\\?",fk="\\/",HKe="(?=.)",Doe="[^/]",a4=`(?:${fk}|$)`,boe=`(?:^|${fk})`,l4=`${Dp}{1,2}${a4}`,jKe=`(?!${Dp})`,GKe=`(?!${boe}${l4})`,qKe=`(?!${Dp}{0,1}${a4})`,WKe=`(?!${l4})`,YKe=`[^.${fk}]`,VKe=`${Doe}*?`,Poe={DOT_LITERAL:Dp,PLUS_LITERAL:UKe,QMARK_LITERAL:_Ke,SLASH_LITERAL:fk,ONE_CHAR:HKe,QMARK:Doe,END_ANCHOR:a4,DOTS_SLASH:l4,NO_DOT:jKe,NO_DOTS:GKe,NO_DOT_SLASH:qKe,NO_DOTS_SLASH:WKe,QMARK_NO_DOT:YKe,STAR:VKe,START_ANCHOR:boe},JKe={...Poe,SLASH_LITERAL:`[${Vf}]`,QMARK:Soe,STAR:`${Soe}*?`,DOTS_SLASH:`${Dp}{1,2}(?:[${Vf}]|$)`,NO_DOT:`(?!${Dp})`,NO_DOTS:`(?!(?:^|[${Vf}])${Dp}{1,2}(?:[${Vf}]|$))`,NO_DOT_SLASH:`(?!${Dp}{0,1}(?:[${Vf}]|$))`,NO_DOTS_SLASH:`(?!${Dp}{1,2}(?:[${Vf}]|$))`,QMARK_NO_DOT:`[^.${Vf}]`,START_ANCHOR:`(?:^|[${Vf}])`,END_ANCHOR:`(?:[${Vf}]|$)`},KKe={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'
Line truncated
|
|
|
|
|
`),f!==-1){let p=a+c.substring(0,f);c=c.substring(f+1),a="",e!==null?this.reportInfo(null,`${e} ${p}`):this.reportInfo(null,p)}while(f!==-1);a+=c}),r.on("end",()=>{let n=s.end();n!==""&&(e!==null?this.reportInfo(null,`${e} ${n}`):this.reportInfo(null,n))}),r}}});var aI,x8=Ze(()=>{Rc();qo();aI=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 await this.getFetcher(e,r).fetch(e,r)}tryFetcher(e,r){let s=this.fetchers.find(a=>a.supports(e,r));return s||null}getFetcher(e,r){let s=this.fetchers.find(a=>a.supports(e,r));if(!s)throw new Yt(11,`${Yr(r.project.configuration,e)} isn't supported by any available fetcher`);return s}}});var rm,k8=Ze(()=>{qo();rm=class{constructor(e){this.resolvers=e.filter(r=>r)}supportsDescriptor(e,r){return!!this.tryResolverByDescriptor(e,r)}supportsLocator(e,r){return!!this.tryResolverByLocator(e,r)}shouldPersistResolution(e,r){return this.getResolverByLocator(e,r).shouldPersistResolution(e,r)}bindDescriptor(e,r,s){return this.getResolverByDescriptor(e,s).bindDescriptor(e,r,s)}getResolutionDependencies(e,r){return this.getResolverByDescriptor(e,r).getResolutionDependencies(e,r)}async getCandidates(e,r,s){return await this.getResolverByDescriptor(e,s).getCandidates(e,r,s)}async getSatisfying(e,r,s,a){return this.getResolverByDescriptor(e,a).getSatisfying(e,r,s,a)}async resolve(e,r){return await this.getResolverByLocator(e,r).resolve(e,r)}tryResolverByDescriptor(e,r){let s=this.resolvers.find(a=>a.supportsDescriptor(e,r));return s||null}getResolverByDescriptor(e,r){let s=this.resolvers.find(a=>a.supportsDescriptor(e,r));if(!s)throw new Error(`${ni(r.project.configuration,e)} isn't supported by any available resolver`);return s}tryResolverByLocator(e,r){let s=this.resolvers.find(a=>a.supportsLocator(e,r));return s||null}getResolverByLocator(e,r){let s=this.resolvers.find(a=>a.supportsLocator(e,r));if(!s)throw new Error(`${Yr(r.project.configuration,e)} isn't supported by any available resolver`);return s}}});var lI,Q8=Ze(()=>{Dt();qo();lI=class{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,r){let s=e.reference.indexOf("#");if(s===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(s+1),n=Ws(e,a);return r.fetcher.getLocalPath(n,r)}async fetch(e,r){let s=e.reference.indexOf("#");if(s===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(s+1),n=Ws(e,a),c=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(e,c,r)}getLocatorFilename(e){return nI(e)}async ensureVirtualLink(e,r,s){let a=r.packageFs.getRealPath(),n=s.project.configuration.get("virtualFolder"),c=this.getLocatorFilename(e),f=uo.makeVirtualPath(n,c,a),p=new _f(f,{baseFs:r.packageFs,pathUtils:J});return{...r,packageFs:p}}}});var QQ,sue=Ze(()=>{QQ=class t{static{this.protocol="virtual:"}static isVirtualDescriptor(e){return!!e.range.startsWith(t.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(t.protocol)}supportsDescriptor(e,r){return t.isVirtualDescriptor(e)}supportsLocator(e,r){return t.isVirtualLocator(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(e,r){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(e,r,s){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(e,r,s,a){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(e,r){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}}});var cI,R8=Ze(()=>{Dt();tm();cI=class{supports(e){return!!e.reference.startsWith(Ei.protocol)}getLocalPath(e,r){return this.getWorkspace(e,r).cwd}async fetch(e,r){let s=this.getWorkspace(e,r).cwd;return{packageFs:new Sn(s),prefixPath:vt.dot,localPath:s}}getWorkspace(e,r){return r.project.getWorkspaceByCwd(e.reference.slice(Ei.protocol.length))}}});function GB(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function oue(t){return typeof t>"u"?3:GB(t)?0:Array.isArray(t)?1:2}function N8(t,e){return Object.hasOwn(t,e)}function ret(t){return GB(t)&&N8(t,"onConflict")&&typeof t.onConflict=="string"}function net(t){if(typeof t>"u")return{onConflict:"default",value:t};if(!ret(t))return{onConflict:"default",value:t};if(N8(t,"value"))return t;let{onConflict:e,...r}=t;return{onConflict:e,value:r}}function aue(t,e){let r=GB(t)&&N8(t,e)?t[e]:void 0;return net(r)}function uI(t,e){return[t,e,lue]}function O8(t){return Array.isArray(t)?t[2]===lue:!1}function T8(t,e){if(GB(t)){let r={};for(let s of Object.keys(t))r[s]=T8(t[s],e);return uI(e,r)}return Array.isArray(t)?uI(e,t.map(r=>T8(r,e))):uI(e,t)}function F8(t,e,r,s,a){let n,c=[],f=a,p=0;for(let E=a-Line truncated
|
|
|
|
|
Please report this to https://github.com/szmarczak/http2-wrapper/`);I(T)}return}s[0].resolve(x);return}}if(c in this.queue){if(f in this.queue[c]){this.queue[c][f].listeners.push(...s),this._tryToCreateNewSession(c,f);return}}else this.queue[c]={};let p=()=>{c in this.queue&&this.queue[c][f]===h&&(delete this.queue[c][f],Object.keys(this.queue[c]).length===0&&delete this.queue[c])},h=()=>{let E=`${f}:${c}`,w=!1;try{let S=wtt.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(E),...r});S[Pa]=0,S[gI]=!1;let x=()=>S[Pa]<S.remoteSettings.maxConcurrentStreams,I=!0;S.socket.once("session",N=>{this.tlsSessionCache.set(E,N)}),S.once("error",N=>{for(let{reject:U}of s)U(N);this.tlsSessionCache.delete(E)}),S.setTimeout(this.timeout,()=>{S.destroy()}),S.once("close",()=>{if(w){I&&this._freeSessionsCount--,this._sessionsCount--;let N=this.sessions[c];N.splice(N.indexOf(S),1),N.length===0&&delete this.sessions[c]}else{let N=new Error("Session closed without receiving a SETTINGS frame");N.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:U}of s)U(N);p()}this._tryToCreateNewSession(c,f)});let T=()=>{if(!(!(c in this.queue)||!x())){for(let N of S[Tc])if(N in this.queue[c]){let{listeners:U}=this.queue[c][N];for(;U.length!==0&&x();)U.shift().resolve(S);let W=this.queue[c];if(W[N].listeners.length===0&&(delete W[N],Object.keys(W).length===0)){delete this.queue[c];break}if(!x())break}}};S.on("origin",()=>{S[Tc]=S.originSet,x()&&(T(),dH(this.sessions[c],S))}),S.once("remoteSettings",()=>{if(S.ref(),S.unref(),this._sessionsCount++,h.destroyed){let N=new Error("Agent has been destroyed");for(let U of s)U.reject(N);S.destroy();return}S[Tc]=S.originSet;{let N=this.sessions;if(c in N){let U=N[c];U.splice(Stt(U,S,Dtt),0,S)}else N[c]=[S]}this._freeSessionsCount+=1,w=!0,this.emit("session",S),T(),p(),S[Pa]===0&&this._freeSessionsCount>this.maxFreeSessions&&S.close(),s.length!==0&&(this.getSession(f,r,s),s.length=0),S.on("remoteSettings",()=>{T(),dH(this.sessions[c],S)})}),S[gfe]=S.request,S.request=(N,U)=>{if(S[gI])throw new Error("The session is gracefully closing. No new streams are allowed.");let W=S[gfe](N,U);return S.ref(),++S[Pa],S[Pa]===S.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,W.once("close",()=>{if(I=x(),--S[Pa],!S.destroyed&&!S.closed&&(btt(this.sessions[c],S),x()&&!S.closed)){I||(this._freeSessionsCount++,I=!0);let ee=S[Pa]===0;ee&&S.unref(),ee&&(this._freeSessionsCount>this.maxFreeSessions||S[gI])?S.close():(dH(this.sessions[c],S),T())}}),W}}catch(S){for(let x of s)x.reject(S);p()}};h.listeners=s,h.completed=!1,h.destroyed=!1,this.queue[c][f]=h,this._tryToCreateNewSession(c,f)})}request(e,r,s,a){return new Promise((n,c)=>{this.getSession(e,r,[{reject:c,resolve:f=>{try{n(f.request(s,a))}catch(p){c(p)}}}])})}createConnection(e,r){return t.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let s=e.port||443,a=e.hostname||e.host;return typeof r.servername>"u"&&(r.servername=a),Ctt.connect(s,a,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[Pa]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let s of r)s.destroy(e);for(let r of Object.values(this.queue))for(let s of Object.values(r))s.destroyed=!0;this.queue={}}get freeSessions(){return dfe({agent:this,isFree:!0})}get busySessions(){return dfe({agent:this,isFree:!1})}};im.kCurrentStreamsCount=Pa;im.kGracefullyClosing=gI;yfe.exports={Agent:im,globalAgent:new im}});var EH=_((CMt,Efe)=>{"use strict";var{Readable:Ptt}=Ie("stream"),yH=class extends Ptt{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("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};Efe.exports=yH});var IH=_((wMt,Ife)=>{"use strict";Ife.exports=t=>{let e={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return typeof t.port=="string"&&t.port.length!==0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}});var wfe=_((BMt,Cfe)=>{"use strict";Cfe.exports=(t,e,r)=>{for(let s of r)t.on(s,(...a)=>e.emit(s,...a))}});var vfe=_((vMt,Bfe)=>{"use strict";Bfe.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var Dfe=_((DMt,Sfe)=>{"use strict";var dI=(t,e,r)=>{Sfe.exports[e]=class extends t{constructor(...a){super(typeof r=="string"?r:
Line truncated
|
|
|
|
|
`).reverse(),f=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
|
|
|
|
|
`).reverse();for(;f.length!==0&&f[0]===c[0];)c.shift();this.stack=`${this.stack.slice(0,n)}${c.reverse().join(`
|
|
|
|
|
`)}${f.reverse().join(`
|
|
|
|
|
`)}`}}};Ln.RequestError=us;var XQ=class extends us{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError"}};Ln.MaxRedirectsError=XQ;var $Q=class extends us{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError"}};Ln.HTTPError=$Q;var eR=class extends us{constructor(e,r){super(e.message,e,r),this.name="CacheError"}};Ln.CacheError=eR;var tR=class extends us{constructor(e,r){super(e.message,e,r),this.name="UploadError"}};Ln.UploadError=tR;var rR=class extends us{constructor(e,r,s){super(e.message,e,s),this.name="TimeoutError",this.event=e.event,this.timings=r}};Ln.TimeoutError=rR;var $B=class extends us{constructor(e,r){super(e.message,e,r),this.name="ReadError"}};Ln.ReadError=$B;var nR=class extends us{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e),this.name="UnsupportedProtocolError"}};Ln.UnsupportedProtocolError=nR;var Nrt=["socket","connect","continue","information","upgrade","timeout"],iR=class extends lAe.Duplex{constructor(e,r={},s){super({autoDestroy:!1,highWaterMark:0}),this[yI]=0,this[II]=0,this.requestInitialized=!1,this[KQ]=new Set,this.redirects=[],this[CI]=!1,this[zQ]=!1,this[XB]=[],this.retryCount=0,this._progressCallbacks=[];let a=()=>this._unlockWrite(),n=()=>this._lockWrite();this.on("pipe",h=>{h.prependListener("data",a),h.on("data",n),h.prependListener("end",a),h.on("end",n)}),this.on("unpipe",h=>{h.off("data",a),h.off("data",n),h.off("end",a),h.off("end",n)}),this.on("pipe",h=>{h instanceof qH.IncomingMessage&&(this.options.headers={...h.headers,...this.options.headers})});let{json:c,body:f,form:p}=r;if((c||f||p)&&this._lockWrite(),Ln.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,s)}catch(h){at.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(h);return}(async()=>{var h;try{this.options.body instanceof hrt.ReadStream&&await Rrt(this.options.body);let{url:E}=this.options;if(!E)throw new TypeError("Missing `url` property");if(this.requestUrl=E.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(h=this[po])===null||h===void 0||h.destroy();return}for(let w of this[XB])w();this[XB].length=0,this.requestInitialized=!0}catch(E){if(E instanceof us){this._beforeError(E);return}this.destroyed||this.destroy(E)}})()}static normalizeArguments(e,r,s){var a,n,c,f,p;let h=r;if(at.default.object(e)&&!at.default.urlInstance(e))r={...s,...e,...r};else{if(e&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...s,...r},e!==void 0&&(r.url=e),at.default.urlInstance(r.url)&&(r.url=new w0.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),at.assert.any([at.default.string,at.default.undefined],r.method),at.assert.any([at.default.object,at.default.undefined],r.headers),at.assert.any([at.default.string,at.default.urlInstance,at.default.undefined],r.prefixUrl),at.assert.any([at.default.object,at.default.undefined],r.cookieJar),at.assert.any([at.default.object,at.default.string,at.default.undefined],r.searchParams),at.assert.any([at.default.object,at.default.string,at.default.undefined],r.cache),at.assert.any([at.default.object,at.default.number,at.default.undefined],r.timeout),at.assert.any([at.default.object,at.default.undefined],r.context),at.assert.any([at.default.object,at.default.undefined],r.hooks),at.assert.any([at.default.boolean,at.default.undefined],r.decompress),at.assert.any([at.default.boolean,at.default.undefined],r.ignoreInvalidCookies),at.assert.any([at.default.boolean,at.default.undefined],r.followRedirect),at.assert.any([at.default.number,at.default.undefined],r.maxRedirects),at.assert.any([at.default.boolean,at.default.undefined],r.throwHttpErrors),at.assert.any([at.default.boolean,at.default.undefined],r.http2),at.assert.any([at.default.boolean,at.default.undefined],r.allowGetBody),at.assert.any([at.default.string,at.default.undefined],r.localAddress),at.assert.any([hAe.isDnsLookupIpVersion,at.default.undefined],r.dnsLookupIpVersion),at.assert.any([at.default.object,at.default.undefined],r.https),at.assert.any([at.default.boolean,at.default.undefined],r.rejectUnauthorized),r.https&&(at.assert.any([at.default.boolean,at.default.undefined],r.https.rejectUnauthorized),at.assert.any([at.default.function_,at.default.undefined],r.https.checkServerIdentity),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.certificateAuthority),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.key),at.assert.any([at.default.string,at.default.object,at.default.array,at.default.undefined],r.https.certificate),at.assert.any([at.default.string,at.default.undefined],r.https.passphrase),at.assert.any([at.default.string,at.default.buffer,at.default.array,at.default.undefined],r.httpLine truncated
|
|
|
|
|
`)[3];return Int(e)}function aj(){return typeof fR.default.availableParallelism<"u"?fR.default.availableParallelism():Math.max(1,fR.default.cpus().length)}var fR,pnt,YAe,hnt,gnt,VAe,JAe,ynt,Ent,AR=Ze(()=>{Dt();fR=ut(Ie("os"));pR();Pc();pnt=Number(process.versions.node.split(".")[0]),YAe=new Map([["darwin","open"],["linux","xdg-open"],["win32","explorer.exe"]]).get(process.platform),hnt=typeof YAe<"u"?async t=>{try{return await lj(YAe,[t],{cwd:J.cwd()}),!0}catch{return!1}}:void 0,gnt="/usr/bin/ldd";ynt=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Ent=/\((\S*)(?::(\d+))(?::(\d+))\)/});function pj(t,e,r,s,a){let n=qB(r);if(s.isArray||s.type==="ANY"&&Array.isArray(n))return Array.isArray(n)?n.map((c,f)=>cj(t,`${e}[${f}]`,c,s,a)):String(n).split(/,/).map(c=>cj(t,e,c,s,a));if(Array.isArray(n))throw new Error(`Non-array configuration settings "${e}" cannot be an array`);return cj(t,e,r,s,a)}function cj(t,e,r,s,a){let n=qB(r);switch(s.type){case"ANY":return RQ(n);case"SHAPE":return Snt(t,e,r,s,a);case"MAP":return Dnt(t,e,r,s,a)}if(n===null&&!s.isNullable&&s.default!==null)throw new Error(`Non-nullable configuration settings "${e}" cannot be set to null`);if(s.values?.includes(n))return n;let f=(()=>{if(s.type==="BOOLEAN"&&typeof n!="string")return PB(n);if(typeof n!="string")throw new Error(`Expected configuration setting "${e}" to be a string, got ${typeof n}`);let p=Wk(n,{env:t.env});switch(s.type){case"ABSOLUTE_PATH":{let h=a,E=L8(r);return E&&E[0]!=="<"&&(h=J.dirname(E)),J.resolve(h,fe.toPortablePath(p))}case"LOCATOR_LOOSE":return Qp(p,!1);case"NUMBER":return parseInt(p);case"LOCATOR":return Qp(p);case"BOOLEAN":return PB(p);default:return p}})();if(s.values&&!s.values.includes(f))throw new Error(`Invalid value, expected one of ${s.values.join(", ")}`);return f}function Snt(t,e,r,s,a){let n=qB(r);if(typeof n!="object"||Array.isArray(n))throw new nt(`Object configuration settings "${e}" must be an object`);let c=hj(t,s,{ignoreArrays:!0});if(n===null)return c;for(let[f,p]of Object.entries(n)){let h=`${e}.${f}`;if(!s.properties[f])throw new nt(`Unrecognized configuration settings found: ${e}.${f} - run "yarn config" to see the list of settings supported in Yarn`);c.set(f,pj(t,h,p,s.properties[f],a))}return c}function Dnt(t,e,r,s,a){let n=qB(r),c=new Map;if(typeof n!="object"||Array.isArray(n))throw new nt(`Map configuration settings "${e}" must be an object`);if(n===null)return c;for(let[f,p]of Object.entries(n)){let h=s.normalizeKeys?s.normalizeKeys(f):f,E=`${e}['${h}']`,w=s.valueDefinition;c.set(h,pj(t,E,p,w,a))}return c}function hj(t,e,{ignoreArrays:r=!1}={}){switch(e.type){case"SHAPE":{if(e.isArray&&!r)return[];let s=new Map;for(let[a,n]of Object.entries(e.properties))s.set(a,hj(t,n));return s}case"MAP":return e.isArray&&!r?[]:new Map;case"ABSOLUTE_PATH":return e.default===null?null:t.projectCwd===null?Array.isArray(e.default)?e.default.map(s=>J.normalize(s)):J.isAbsolute(e.default)?J.normalize(e.default):e.isNullable?null:void 0:Array.isArray(e.default)?e.default.map(s=>J.resolve(t.projectCwd,s)):J.resolve(t.projectCwd,e.default);default:return e.default}}function gR(t,e,r){if(e.type==="SECRET"&&typeof t=="string"&&r.hideSecrets)return vnt;if(e.type==="ABSOLUTE_PATH"&&typeof t=="string"&&r.getNativePaths)return fe.fromPortablePath(t);if(e.isArray&&Array.isArray(t)){let s=[];for(let a of t)s.push(gR(a,e,r));return s}if(e.type==="MAP"&&t instanceof Map){if(t.size===0)return;let s=new Map;for(let[a,n]of t.entries()){let c=gR(n,e.valueDefinition,r);typeof c<"u"&&s.set(a,c)}return s}if(e.type==="SHAPE"&&t instanceof Map){if(t.size===0)return;let s=new Map;for(let[a,n]of t.entries()){let c=e.properties[a],f=gR(n,c,r);typeof f<"u"&&s.set(a,f)}return s}return t}function bnt(){let t={};for(let[e,r]of Object.entries(process.env))e=e.toLowerCase(),e.startsWith(dR)&&(e=(0,zAe.default)(e.slice(dR.length)),t[e]=r);return t}function fj(){let t=`${dR}rc_filename`;for(let[e,r]of Object.entries(process.env))if(e.toLowerCase()===t&&typeof r=="string")return r;return Aj}async function KAe(t){try{return await ce.readFilePromise(t)}catch{return Buffer.of()}}async function Pnt(t,e){return Buffer.compare(...await Promise.all([KAe(t),KAe(e)]))===0}async function xnt(t,e){let[r,s]=await Promise.all([ce.statPromise(t),ce.statPromise(e)]);return r.dev===s.dev&&r.ino===s.ino}async function Qnt({configuration:t,selfPath:e}){let r=t.get("yarnPath");return t.get("ignorePath")||r===null||r===e||await knt(r,e)?null:r}var zAe,Lp,ZAe,XAe,$Ae,uj,wnt,iv,Bnt,Mp,dR,Aj,vnt,sv,epe,mR,hR,knt,ze,ov=Ze(()=>{Dt();wc();zAe=ut(gre()),Lp=ut(Fd());Wt();ZAe=ut(lne()),XAe=Ie("module"),$Ae=ut(Ld()),uj=Ie("stream");Vce();oI();x8();k8();Q8();sue();R8();tm();uue();FQ();xc();I0();uR();Pc();AR();Tp();qo();wnt=function(){if(!Lp.GITHUB_ACTIONS||!process.env.GITHUB_EVENT_PATH)return!1;let t=fe.toPortablePath(process.env.GITHUB_EVENT_PATH),e;try{e=ce.readJsonSync(t)}catch{retu
Line truncated
|
|
|
|
|
`);return{stdout:n,stderr:c}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let s of r.resolvers||[])e.push(new s);return new rm([new QQ,new Ei,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let s of r.fetchers||[])e.push(new s);return new aI([new lI,new cI,...e])}getLinkers(){let e=[];for(let r of this.plugins.values())for(let s of r.linkers||[])e.push(new s);return e}getSupportedArchitectures(){let e=nv(),r=this.get("supportedArchitectures"),s=r.get("os");s!==null&&(s=s.map(c=>c==="current"?e.os:c));let a=r.get("cpu");a!==null&&(a=a.map(c=>c==="current"?e.cpu:c));let n=r.get("libc");return n!==null&&(n=Wl(n,c=>c==="current"?e.libc??Wl.skip:c)),{os:s,cpu:a,libc:n}}isInteractive({interactive:e,stdout:r}){return r.isTTY?e??this.get("preferInteractive"):!1}async getPackageExtensions(){if(this.packageExtensions!==null)return this.packageExtensions;this.packageExtensions=new Map;let e=this.packageExtensions,r=(s,a,{userProvided:n=!1}={})=>{if(!cl(s.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let c=new Ht;c.load(a,{yamlCompatibilityMode:!0});let f=bB(e,s.identHash),p=[];f.push([s.range,p]);let h={status:"inactive",userProvided:n,parentDescriptor:s};for(let E of c.dependencies.values())p.push({...h,type:"Dependency",descriptor:E});for(let E of c.peerDependencies.values())p.push({...h,type:"PeerDependency",descriptor:E});for(let[E,w]of c.peerDependenciesMeta)for(let[S,x]of Object.entries(w))p.push({...h,type:"PeerDependencyMeta",selector:E,key:S,value:x})};await this.triggerHook(s=>s.registerPackageExtensions,this,r);for(let[s,a]of this.get("packageExtensions"))r(C0(s,!0),qk(a),{userProvided:!0});return e}normalizeLocator(e){return cl(e.reference)?Ws(e,`${this.get("defaultProtocol")}${e.reference}`):Mp.test(e.reference)?Ws(e,`${this.get("defaultProtocol")}${e.reference}`):e}normalizeDependency(e){return cl(e.range)?On(e,`${this.get("defaultProtocol")}${e.range}`):Mp.test(e.range)?On(e,`${this.get("defaultProtocol")}${e.range}`):e}normalizeDependencyMap(e){return new Map([...e].map(([r,s])=>[r,this.normalizeDependency(s)]))}normalizePackage(e,{packageExtensions:r}){let s=NB(e),a=r.get(e.identHash);if(typeof a<"u"){let c=e.version;if(c!==null){for(let[f,p]of a)if(Xf(c,f))for(let h of p)switch(h.status==="inactive"&&(h.status="redundant"),h.type){case"Dependency":typeof s.dependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",s.dependencies.set(h.descriptor.identHash,this.normalizeDependency(h.descriptor)));break;case"PeerDependency":typeof s.peerDependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",s.peerDependencies.set(h.descriptor.identHash,h.descriptor));break;case"PeerDependencyMeta":{let E=s.peerDependenciesMeta.get(h.selector);(typeof E>"u"||!Object.hasOwn(E,h.key)||E[h.key]!==h.value)&&(h.status="active",Yl(s.peerDependenciesMeta,h.selector,()=>({}))[h.key]=h.value)}break;default:U4(h)}}}let n=c=>c.scope?`${c.scope}__${c.name}`:`${c.name}`;for(let c of s.peerDependenciesMeta.keys()){let f=Sa(c);s.peerDependencies.has(f.identHash)||s.peerDependencies.set(f.identHash,On(f,"*"))}for(let c of s.peerDependencies.values()){if(c.scope==="types")continue;let f=n(c),p=Da("types",f),h=cn(p);s.peerDependencies.has(p.identHash)||s.peerDependenciesMeta.has(h)||s.dependencies.has(p.identHash)||(s.peerDependencies.set(p.identHash,On(p,"*")),s.peerDependenciesMeta.set(h,{optional:!0}))}return s.dependencies=new Map(qs(s.dependencies,([,c])=>al(c))),s.peerDependencies=new Map(qs(s.peerDependencies,([,c])=>al(c))),s}getLimit(e){return Yl(this.limits,e,()=>(0,$Ae.default)(this.get(e)))}async triggerHook(e,...r){for(let s of this.plugins.values()){let a=s.hooks;if(!a)continue;let n=e(a);n&&await n(...r)}}async triggerMultipleHooks(e,r){for(let s of r)await this.triggerHook(e,...s)}async reduceHook(e,r,...s){let a=r;for(let n of this.plugins.values()){let c=n.hooks;if(!c)continue;let f=e(c);f&&(a=await f(a,...s))}return a}async firstHook(e,...r){for(let s of this.plugins.values()){let a=s.hooks;if(!a)continue;let n=e(a);if(!n)continue;let c=await n(...r);if(typeof c<"u")return c}return null}}});var qr={};Vt(qr,{EndStrategy:()=>yj,ExecError:()=>yR,PipeError:()=>av,execvp:()=>lj,pipevp:()=>Wu});function om(t){return t!==null&&typeof t.fd=="number"}function gj(){}function dj(){for(let t of am)t.kill()}async function Wu(t,e,{cwd:r,env:s=process.env,strict:a=!1,stdin:n=null,stdout:c,stderr:f,end:p=2}){let h=["pipe","pipe","pipe"];n===null?h[0]="ignore":om(n)&&(h[0]=n),om(c)&&(h[1]=c),om(f)&&(h[2]=f);let E=(0,mj.default)(t,e,{cwd:fe.fromPortablePath(r),env:{...s,PWD:fe.fromPortablePath(r)},stdio:h});am.add(E),am.size===1&&(process.on("SIGINT",gj),process.on("SIGTERM",dj)),!om(n)&&n!==null&&n.pipe(E.stdin),om(c)||E.stdout.pipe(c,{end:!1}),om(f)||E.stderr.pipe(f,{end:!1});let w=()=>{for(let S of new Set([c,f]))om(S)||S.end()};return new Promise((S,x)=>{E.on("error",I=>{am.delete(E),am.size===0&&(process.off("SIGINT",gj),pro
Line truncated
|
|
|
|
|
This command will run a command using Yarn's portable shell.
|
|
|
|
|
|
|
|
|
|
Make sure to escape glob patterns, redirections, and other features that might be expanded by your own shell.
|
|
|
|
|
|
|
|
|
|
Note: To escape something from Yarn's shell, you might have to escape it twice, the first time from your own shell.
|
|
|
|
|
|
|
|
|
|
Note: Don't use this command in Yarn scripts, as Yarn's shell is automatically used.
|
|
|
|
|
|
|
|
|
|
For a list of features, visit: https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-shell/README.md.
|
|
|
|
|
`,examples:[["Run a simple command","$0 echo Hello"],["Run a command with a glob pattern","$0 echo '*.js'"],["Run a command with a redirection","$0 echo Hello World '>' hello.txt"],["Run a command with an escaped glob pattern (The double escape is needed in Unix shells)",`$0 echo '"*.js"'`],["Run a command with a variable (Double quotes are needed in Unix shells, to prevent them from expanding the variable)",'$0 "GREETING=Hello echo $GREETING World"']]}}async execute(){let r=this.args.length>0?`${this.commandName} ${this.args.join(" ")}`:this.commandName;return await BI(r,[],{cwd:fe.toPortablePath(this.cwd),stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}}});var Vl,mpe=Ze(()=>{Vl=class extends Error{constructor(e){super(e),this.name="ShellError"}}});var SR={};Vt(SR,{fastGlobOptions:()=>Ipe,isBraceExpansion:()=>Rj,isGlobPattern:()=>Mnt,match:()=>Unt,micromatchOptions:()=>vR});function Mnt(t){if(!BR.default.scan(t,vR).isGlob)return!1;try{BR.default.parse(t,vR)}catch{return!1}return!0}function Unt(t,{cwd:e,baseFs:r}){return(0,ype.default)(t,{...Ipe,cwd:fe.fromPortablePath(e),fs:sx(Epe.default,new t0(r))})}function Rj(t){return BR.default.scan(t,vR).isBrace}var ype,Epe,BR,vR,Ipe,Cpe=Ze(()=>{Dt();ype=ut(IQ()),Epe=ut(Ie("fs")),BR=ut(Ba()),vR={strictBrackets:!0},Ipe={onlyDirectories:!1,onlyFiles:!1}});function Tj(){}function Fj(){for(let t of cm)t.kill()}function Spe(t,e,r,s){return a=>{let n=a[0]instanceof tA.Transform?"pipe":a[0],c=a[1]instanceof tA.Transform?"pipe":a[1],f=a[2]instanceof tA.Transform?"pipe":a[2],p=(0,Bpe.default)(t,e,{...s,stdio:[n,c,f]});return cm.add(p),cm.size===1&&(process.on("SIGINT",Tj),process.on("SIGTERM",Fj)),a[0]instanceof tA.Transform&&a[0].pipe(p.stdin),a[1]instanceof tA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof tA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on("error",E=>{switch(cm.delete(p),cm.size===0&&(process.off("SIGINT",Tj),process.off("SIGTERM",Fj)),E.code){case"ENOENT":a[2].write(`command not found: ${t}
|
|
|
|
|
`),h(127);break;case"EACCES":a[2].write(`permission denied: ${t}
|
|
|
|
|
`),h(128);break;default:a[2].write(`uncaught error: ${E.message}
|
|
|
|
|
`),h(1);break}}),p.on("close",E=>{cm.delete(p),cm.size===0&&(process.off("SIGINT",Tj),process.off("SIGTERM",Fj)),h(E!==null?E:129)})})}}}function Dpe(t){return e=>{let r=e[0]==="pipe"?new tA.PassThrough:e[0];return{stdin:r,promise:Promise.resolve().then(()=>t({stdin:r,stdout:e[1],stderr:e[2]}))}}}function DR(t,e){return Oj.start(t,e)}function wpe(t,e=null){let r=new tA.PassThrough,s=new vpe.StringDecoder,a="";return r.on("data",n=>{let c=s.write(n),f;do if(f=c.indexOf(`
|
|
|
|
|
`),f!==-1){let p=a+c.substring(0,f);c=c.substring(f+1),a="",t(e!==null?`${e} ${p}`:p)}while(f!==-1);a+=c}),r.on("end",()=>{let n=s.end();n!==""&&t(e!==null?`${e} ${n}`:n)}),r}function bpe(t,{prefix:e}){return{stdout:wpe(r=>t.stdout.write(`${r}
|
|
|
|
|
`),t.stdout.isTTY?e:null),stderr:wpe(r=>t.stderr.write(`${r}
|
|
|
|
|
`),t.stderr.isTTY?e:null)}}var Bpe,tA,vpe,cm,Oc,Nj,Oj,Lj=Ze(()=>{Bpe=ut(LU()),tA=Ie("stream"),vpe=Ie("string_decoder"),cm=new Set;Oc=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},Nj=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}},Oj=class t{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:s,stderr:a}){let n=new t(null,e);return n.stdin=r,n.stdout=s,n.stderr=a,n}pipeTo(e,r=1){let s=new t(this,e),a=new Nj;return s.pipe=a,s.stdout=this.stdout,s.stderr=this.stderr,(r&1)===1?this.stdout=a:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)===2?this.stderr=a:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),s}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 s;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");s=this.stderr,e[2]=s.get();let a=this.implementation(e);return this.pipe&&this.pipe.attach(a.stdin),await a.promise.then(n=>(r.close(),s.close(),n))}async run(){let e=[];for(let s=this;s;s=s.ancestor)e.push(s.exec());return(await Promise.all(e))[0]}}});var dv={};Vt(dv,{EntryCommand:()=>fv,ShellError:()=>Vl,execute:()=>BI,globUtils:()=>SR});function Ppe(t,e,r){let s=new Jl.PassThrough({autoDestroy:!0});switch(t){case 0:(e&1)===1&&r.stdin.pipe(s,{end:!1}),(e&2)===2&&r.stdin instanceof Jl.Writable&&s.pipe(r.stdin,{end:!1});break;case 1:(e&1)===1&&r.stdout.pipe(s,{end:!1}),(e&2)===2&&s.pipe(r.stdout,{end:!1});break;case 2:(e&1)===1&&r.stderr.pipe(s,{end:!1}),(e&2)===2&&s.pipe(r.stderr,{end:!1});break;default:throw new Vl(`Bad file descriptor: "${t}"`)}return s}function PR(t,e={}){let r={...t,...e};return r.environment={...t.environment,...e.environment},r.variables={...t.variables,...e.variables},r}async function Hnt(t,e,r){let s=[],a=new Jl.PassThrough;return a.on("data",n=>s.push(n)),await xR(t,e,PR(r,{stdout:a})),Buffer.concat(s).toString().replace(/[\r\n]+$/,"")}async function xpe(t,e,r){let s=t.map(async n=>{let c=await um(n.args,e,r);return{name:n.name,value:c.join(" ")}});return(await Promise.all(s)).reduce((n,c)=>(n[c.name]=c.value,n),{})}function bR(t){return t.match(/[^ \r\n\t]+/g)||[]}async function Npe(t,e,r,s,a=s){switch(t.name){case"$":s(String(process.pid));break;case"#":s(String(e.args.length));break;case"@":if(t.quoted)for(let n of e.args)a(n);else for(let n of e.args){let c=bR(n);for(let f=0;f<c.length-1;++f)a(c[f]);s(c[c.length-1])}break;case"*":{let n=e.args.join(" ");if(t.quoted)s(n);else for(let c of bR(n))a(c)}break;case"PPID":s(String(process.ppid));break;case"RANDOM":s(String(Math.floor(Math.random()*32768)));break;default:{let n=parseInt(t.name,10),c,f=Number.isFinite(n);if(f?n>=0&&n<e.args.length&&(c=e.args[n]):Object.hasOwn(r.variables,t.name)?c=r.variables[t.name]:Object.hasOwn(r.environment,t.name)&&(c=r.environment[t.name]),typeof c<"u"&&t.alternativeValue?c=(await um(t.alternativeValue,e,r)).join(" "):typeof c>"u"&&(t.defaultValue?c=(await um(t.defaultValue,e,r)).join(" "):t.alternativeValue&&(c="")),typeof c>"u")throw f?new Vl(`Unbound argument #${n}`):new Vl(`Unbound variable "${t.name}"`);if(t.quoted)s(c);else{let p=bR(c);for(let E=0;E<p.length-1;++E)a(p[E]);let h=p[p.length-1];typeof h<"u"&&s(h)}}break}}async function pv(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 s=[];await Npe({...t,quoted:!0},e,r,n=>s.push(n));let a=Number(s.join(" "));return Number.isNaN(a)?pv({type:"variable",name:s.join(" ")},e,r):pv({type:"number",value:a},e,r)}else return jnt[t.type](await pv(t.left,e,r),await pv(t.right,e,r))}async function um(t,e,r){let s=new Map,a=[],n=[],c=E=>{n.push(E)},f=()=>{n.length>0&&a.push(n.join("")),n=[]},p=E=>{c(E),f()},h=(E,w,S)=>{let x=JSON.stringify({type:E,fd:w}),I=s.get(x);typeof I>"u"&&s.set(x,I=[]),I.push(S)};for(let E of t){let w=!1;switch(E.type){case"redirection":{let S=await um(E.args,e,r);for(let x of S)h(E.subtype,E.fd,x)}break;case"argument":for(let S of E.segments)switch(S.type){case"text":c(S.text);break;case"glob":c(S.pattern),w=!0;break;case"shell":{let x=await Hnt(S.shell,e,r);if(S.quoted)c(x);else{let I=bR(x);for(let T=0;T<I.length-1;++T)p(I[T]);c(I[I.length-1])}}break;case"variable":await Npe(S,e,r,c,p);break;case"arithmetic":c(String(await pv(S.arithmetic,e,r)));break}break}if(f(),w){let S=a.pop();if(typeof S>"u")throw new Error("Assertion failed: Expected a glob pa
Line truncated
|
|
|
|
|
`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${p}, '${c(AE(t))}' has ended
|
|
|
|
|
`)})),0}return await Qpe(t,e,r)}async function Ynt(t,e,r,{background:s=!1}={}){let a,n=f=>{a=f,r.variables["?"]=String(f)},c=async f=>{try{return await Wnt(f.chain,e,r,{background:s&&typeof f.then>"u"})}catch(p){if(!(p instanceof Vl))throw p;return r.stderr.write(`${p.message}
|
|
|
|
|
`),1}};for(n(await c(t));t.then;){if(r.exitCode!==null)return r.exitCode;switch(t.then.type){case"&&":a===0&&n(await c(t.then.line));break;case"||":a!==0&&n(await c(t.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${t.then.type}"`)}t=t.then.line}return a}async function xR(t,e,r){let s=r.backgroundJobs;r.backgroundJobs=[];let a=0;for(let{command:n,type:c}of t){if(a=await Ynt(n,e,r,{background:c==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(a)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=s,a}function Ope(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=>gv(e))||"alternativeValue"in t&&!!t.alternativeValue&&t.alternativeValue.some(e=>gv(e));case"arithmetic":return Mj(t.arithmetic);case"shell":return Uj(t.shell);default:return!1}}function gv(t){switch(t.type){case"redirection":return t.args.some(e=>gv(e));case"argument":return t.segments.some(e=>Ope(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${t.type}"`)}}function Mj(t){switch(t.type){case"variable":return Ope(t);case"number":return!1;default:return Mj(t.left)||Mj(t.right)}}function Uj(t){return t.some(({command:e})=>{for(;e;){let r=e.chain;for(;r;){let s;switch(r.type){case"subshell":s=Uj(r.subshell);break;case"command":s=r.envs.some(a=>a.args.some(n=>gv(n)))||r.args.some(a=>gv(a));break}if(s)return!0;if(!r.then)break;r=r.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function BI(t,e=[],{baseFs:r=new Yn,builtins:s={},cwd:a=fe.toPortablePath(process.cwd()),env:n=process.env,stdin:c=process.stdin,stdout:f=process.stdout,stderr:p=process.stderr,variables:h={},glob:E=SR}={}){let w={};for(let[I,T]of Object.entries(n))typeof T<"u"&&(w[I]=T);let S=new Map(_nt);for(let[I,T]of Object.entries(s))S.set(I,T);c===null&&(c=new Jl.PassThrough,c.end());let x=lx(t,E);if(!Uj(x)&&x.length>0&&e.length>0){let{command:I}=x[x.length-1];for(;I.then;)I=I.then.line;let T=I.chain;for(;T.then;)T=T.then.chain;T.type==="command"&&(T.args=T.args.concat(e.map(N=>({type:"argument",segments:[{type:"text",text:N}]}))))}return await xR(x,{args:e,baseFs:r,builtins:S,initialStdin:c,initialStdout:f,initialStderr:p,glob:E},{cwd:a,environment:w,exitCode:null,procedures:{},stdin:c,stdout:f,stderr:p,variables:Object.assign({},h,{"?":0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var Rpe,Tpe,Jl,Fpe,_nt,jnt,Av=Ze(()=>{Dt();wc();Rpe=ut(RE()),Tpe=Ie("os"),Jl=Ie("stream"),Fpe=Ie("timers/promises");dpe();mpe();Cpe();Lj();Lj();_nt=new Map([["cd",async([t=(0,Tpe.homedir)(),...e],r,s)=>{let a=J.resolve(s.cwd,fe.toPortablePath(t));if(!(await r.baseFs.statPromise(a).catch(c=>{throw c.code==="ENOENT"?new Vl(`cd: no such file or directory: ${t}`):c})).isDirectory())throw new Vl(`cd: not a directory: ${t}`);return s.cwd=a,0}],["pwd",async(t,e,r)=>(r.stdout.write(`${fe.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,s)=>s.exitCode=parseInt(t??s.variables["?"],10)],["echo",async(t,e,r)=>(r.stdout.write(`${t.join(" ")}
|
|
|
|
|
`),0)],["sleep",async([t],e,r)=>{if(typeof t>"u")throw new Vl("sleep: missing operand");let s=Number(t);if(Number.isNaN(s))throw new Vl(`sleep: invalid time interval '${t}'`);return await(0,Fpe.setTimeout)(1e3*s,0)}],["unset",async(t,e,r)=>{for(let s of t)delete r.environment[s],delete r.variables[s];return 0}],["__ysh_run_procedure",async(t,e,r)=>{let s=r.procedures[t[0]];return await DR(s,{stdin:new Oc(r.stdin),stdout:new Oc(r.stdout),stderr:new Oc(r.stderr)}).run()}],["__ysh_set_redirects",async(t,e,r)=>{let s=r.stdin,a=r.stdout,n=r.stderr,c=[],f=[],p=[],h=0;for(;t[h]!=="--";){let w=t[h++],{type:S,fd:x}=JSON.parse(w),I=W=>{switch(x){case null:case 0:c.push(W);break;default:throw new Error(`Unsupported file descriptor: "${x}"`)}},T=W=>{switch(x){case null:case 1:f.push(W);break;case 2:p.push(W);break;default:throw new Error(`Unsupported file descriptor: "${x}"`)}},N=Number(t[h++]),U=h+N;for(let W=h;W<U;++h,++W)switch(S){case"<":I(()=>e.baseFs.createReadStream(J.resolve(r.cwd,fe.toPortablePath(t[W]))));break;case"<<<":I(()=>{let ee=new Jl.PassThrough;return process.nextTick(()=>{ee.write(`${t[W]}
|
|
|
|
|
`),ee.end()}),ee});break;case"<&":I(()=>Ppe(Number(t[W]),1,r));break;case">":case">>":{let ee=J.resolve(r.cwd,fe.toPortablePath(t[W]));T(ee==="/dev/null"?new Jl.Writable({autoDestroy:!0,emitClose:!0,write(ie,ue,le){setImmediate(le)}}):e.baseFs.createWriteStream(ee,S===">>"?{flags:"a"}:void 0))}break;case">&":T(Ppe(Number(t[W]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${S}"`)}}if(c.length>0){let w=new Jl.PassThrough;s=w;let S=x=>{if(x===c.length)w.end();else{let I=c[x]();I.pipe(w,{end:!1}),I.on("end",()=>{S(x+1)})}};S(0)}if(f.length>0){let w=new Jl.PassThrough;a=w;for(let S of f)w.pipe(S)}if(p.length>0){let w=new Jl.PassThrough;n=w;for(let S of p)w.pipe(S)}let E=await DR(hv(t.slice(h+1),e,r),{stdin:new Oc(s),stdout:new Oc(a),stderr:new Oc(n)}).run();return await Promise.all(f.map(w=>new Promise((S,x)=>{w.on("error",I=>{x(I)}),w.on("close",()=>{S()}),w.end()}))),await Promise.all(p.map(w=>new Promise((S,x)=>{w.on("error",I=>{x(I)}),w.on("close",()=>{S()}),w.end()}))),E}]]);jnt={addition:(t,e)=>t+e,subtraction:(t,e)=>t-e,multiplication:(t,e)=>t*e,division:(t,e)=>Math.trunc(t/e)}});var Lpe=_((e4t,kR)=>{function Vnt(){var t=0,e=1,r=2,s=3,a=4,n=5,c=6,f=7,p=8,h=9,E=10,w=11,S=12,x=13,I=14,T=15,N=16,U=17,W=0,ee=1,ie=2,ue=3,le=4;function me(g,we){return 55296<=g.charCodeAt(we)&&g.charCodeAt(we)<=56319&&56320<=g.charCodeAt(we+1)&&g.charCodeAt(we+1)<=57343}function pe(g,we){we===void 0&&(we=0);var ye=g.charCodeAt(we);if(55296<=ye&&ye<=56319&&we<g.length-1){var Ae=ye,se=g.charCodeAt(we+1);return 56320<=se&&se<=57343?(Ae-55296)*1024+(se-56320)+65536:Ae}if(56320<=ye&&ye<=57343&&we>=1){var Ae=g.charCodeAt(we-1),se=ye;return 55296<=Ae&&Ae<=56319?(Ae-55296)*1024+(se-56320)+65536:se}return ye}function Be(g,we,ye){var Ae=[g].concat(we).concat([ye]),se=Ae[Ae.length-2],X=ye,De=Ae.lastIndexOf(I);if(De>1&&Ae.slice(1,De).every(function(j){return j==s})&&[s,x,U].indexOf(g)==-1)return ie;var Te=Ae.lastIndexOf(a);if(Te>0&&Ae.slice(1,Te).every(function(j){return j==a})&&[S,a].indexOf(se)==-1)return Ae.filter(function(j){return j==a}).length%2==1?ue:le;if(se==t&&X==e)return W;if(se==r||se==t||se==e)return X==I&&we.every(function(j){return j==s})?ie:ee;if(X==r||X==t||X==e)return ee;if(se==c&&(X==c||X==f||X==h||X==E))return W;if((se==h||se==f)&&(X==f||X==p))return W;if((se==E||se==p)&&X==p)return W;if(X==s||X==T)return W;if(X==n)return W;if(se==S)return W;var mt=Ae.indexOf(s)!=-1?Ae.lastIndexOf(s)-1:Ae.length-2;return[x,U].indexOf(Ae[mt])!=-1&&Ae.slice(mt+1,-1).every(function(j){return j==s})&&X==I||se==T&&[N,U].indexOf(X)!=-1?W:we.indexOf(a)!=-1?ie:se==a&&X==a?W:ee}this.nextBreak=function(g,we){if(we===void 0&&(we=0),we<0)return 0;if(we>=g.length-1)return g.length;for(var ye=Ce(pe(g,we)),Ae=[],se=we+1;se<g.length;se++)if(!me(g,se-1)){var X=Ce(pe(g,se));if(Be(ye,Ae,X))return se;Ae.push(X)}return g.length},this.splitGraphemes=function(g){for(var we=[],ye=0,Ae;(Ae=this.nextBreak(g,ye))<g.length;)we.push(g.slice(ye,Ae)),ye=Ae;return ye<g.length&&we.push(g.slice(ye)),we},this.iterateGraphemes=function(g){var we=0,ye={next:function(){var Ae,se;return(se=this.nextBreak(g,we))<g.length?(Ae=g.slice(we,se),we=se,{value:Ae,done:!1}):we<g.length?(Ae=g.slice(we),we=g.length,{value:Ae,done:!1}):{value:void 0,done:!0}}.bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(ye[Symbol.iterator]=function(){return ye}),ye},this.countGraphemes=function(g){for(var we=0,ye=0,Ae;(Ae=this.nextBreak(g,ye))<g.length;)ye=Ae,we++;return ye<g.length&&we++,we};function Ce(g){return 1536<=g&&g<=1541||g==1757||g==1807||g==2274||g==3406||g==69821||70082<=g&&g<=70083||g==72250||72326<=g&&g<=72329||g==73030?S:g==13?t:g==10?e:0<=g&&g<=9||11<=g&&g<=12||14<=g&&g<=31||127<=g&&g<=159||g==173||g==1564||g==6158||g==8203||8206<=g&&g<=8207||g==8232||g==8233||8234<=g&&g<=8238||8288<=g&&g<=8292||g==8293||8294<=g&&g<=8303||55296<=g&&g<=57343||g==65279||65520<=g&&g<=65528||65529<=g&&g<=65531||113824<=g&&g<=113827||119155<=g&&g<=119162||g==917504||g==917505||917506<=g&&g<=917535||917632<=g&&g<=917759||918e3<=g&&g<=921599?r:768<=g&&g<=879||1155<=g&&g<=1159||1160<=g&&g<=1161||1425<=g&&g<=1469||g==1471||1473<=g&&g<=1474||1476<=g&&g<=1477||g==1479||1552<=g&&g<=1562||1611<=g&&g<=1631||g==1648||1750<=g&&g<=1756||1759<=g&&g<=1764||1767<=g&&g<=1768||1770<=g&&g<=1773||g==1809||1840<=g&&g<=1866||1958<=g&&g<=1968||2027<=g&&g<=2035||2070<=g&&g<=2073||2075<=g&&g<=2083||2085<=g&&g<=2087||2089<=g&&g<=2093||2137<=g&&g<=2139||2260<=g&&g<=2273||2275<=g&&g<=2306||g==2362||g==2364||2369<=g&&g<=2376||g==2381||2385<=g&&g<=2391||2402<=g&&g<=2403||g==2433||g==2492||g==2494||2497<=g&&g<=2500||g==2509||g==2519||2530<=g&&g<=2531||2561<=g&&g<=2562||g==2620||2625<=g&&g<=2626||2631<=g&&g<=2632||2635<=g&&g<=2637||g==2641||2672<=g&&g<=2673||g==2677||2689<=g&&g<=2690||g==2748||2753<=g&&g<=2757||2759<=g&&g<=2760||g==2765||2786<=g&&g<=2787||2810<=g&&g<=2815||g==2817||g==2876||g==2878||g==2879||2881<=g&&g<=2884||g==2893||g==2902||g==2903||2914<=g&&g<=2915||g==2946||g==3006||
Line truncated
|
|
|
|
|
`,end:t=>`::endgroup::
|
|
|
|
|
`}:RR.default.TRAVIS?{start:t=>`travis_fold:start:${t}
|
|
|
|
|
`,end:t=>`travis_fold:end:${t}
|
|
|
|
|
`}:RR.default.GITLAB?{start:t=>`section_start:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}[collapsed=true]\r\x1B[0K${t}
|
|
|
|
|
`,end:t=>`section_end:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}\r\x1B[0K`}:null,qpe=D0!==null,jpe=new Date,Znt=["iTerm.app","Apple_Terminal","WarpTerminal","vscode"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,Xnt=t=>t,TR=Xnt({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}}),$nt=Znt&&Object.keys(TR).find(t=>{let e=TR[t];return!(e.date&&(e.date[0]!==jpe.getDate()||e.date[1]!==jpe.getMonth()+1))})||"default";Ot=class extends Ao{constructor({configuration:r,stdout:s,json:a=!1,forceSectionAlignment:n=!1,includeNames:c=!0,includePrefix:f=!0,includeFooter:p=!0,includeLogs:h=!a,includeInfos:E=h,includeWarnings:w=h}){super();this.uncommitted=new Set;this.warningCount=0;this.errorCount=0;this.timerFooter=[];this.startTime=Date.now();this.indent=0;this.level=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;if(QB(this,{configuration:r}),this.configuration=r,this.forceSectionAlignment=n,this.includeNames=c,this.includePrefix=f,this.includeFooter=p,this.includeInfos=E,this.includeWarnings=w,this.json=a,this.stdout=s,r.get("enableProgressBars")&&!a&&s.isTTY&&s.columns>22){let S=r.get("progressBarStyle")||$nt;if(!Object.hasOwn(TR,S))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=TR[S];let x=Math.min(this.getRecommendedLength(),80);this.progressMaxScaledSize=Math.floor(this.progressStyle.size*x/80)}}static async start(r,s){let a=new this(r),n=process.emitWarning;process.emitWarning=(c,f)=>{if(typeof c!="string"){let h=c;c=h.message,f=f??h.name}let p=typeof f<"u"?`${f}: ${c}`:c;a.reportWarning(0,p)},r.includeVersion&&a.reportInfo(0,zd(r.configuration,`Yarn ${un}`,2));try{await s(a)}catch(c){a.reportExceptionOnce(c)}finally{await a.finalize(),process.emitWarning=n}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}getRecommendedLength(){let s=this.progressStyle!==null?this.stdout.columns-1:super.getRecommendedLength();return Math.max(40,s-12-this.indent*2)}startSectionSync({reportHeader:r,reportFooter:s,skipIfEmpty:a},n){let c={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(c):(c.action(),c.committed=!0);let f=Date.now();try{return n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(c),c.committed&&s?.(p-f)}}async startSectionPromise({reportHeader:r,reportFooter:s,skipIfEmpty:a},n){let c={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(c):(c.action(),c.committed=!0);let f=Date.now();try{return await n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(c),c.committed&&s?.(p-f)}}startTimerImpl(r,s,a){return{cb:typeof s=="function"?s:a,reportHeader:()=>{this.level+=1,this.reportInfo(null,`\u250C ${r}`),this.indent+=1,D0!==null&&!this.json&&this.includeInfos&&this.stdout.write(D0.start(r))},reportFooter:f=>{if(this.indent-=1,D0!==null&&!this.json&&this.includeInfos){this.stdout.write(D0.end(r));for(let p of this.timerFooter)p()}this.configuration.get("enableTimers")&&f>200?this.reportInfo(null,`\u2514 Completed in ${_t(this.configuration,f,ht.DURATION)}`):this.reportInfo(null,"\u2514 Completed"),this.level-=1},skipIfEmpty:(typeof s=="function"?{}:s).skipIfEmpty}}startTimerSync(r,s,a){let{cb:n,...c}=this.startTimerImpl(r,s,a);return this.startSectionSync(c,n)}async startTimerPromise(r,s,a){let{cb:n,...c}=this.startTimerImpl(r,s,a);return this.startSectionPromise(c,n)}reportSeparator(){this.indent===0?this.writeLine(""):this.reportInfo(null,"")}reportInfo(r,s){if(!this.includeInfos)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"",c=`${this.formatPrefix(n,"blueBright")}${s}`;this.json?this.reportJson({type:"info",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(c)}reportWarning(r,s){if(this.warningCount+=1,!this.includeWarnings)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"warning",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(`${this.formatPrefix(n,"yellowBright")}${s}`)}reportError(r,s){this.errorCount+=1,this.timerFooter.push(()=>this.reportErrorImpl(r,s)),this.reportErrorImpl(r,s)}reportErrorImpl(r,s){this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"error",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:s}):this.writeLine(`${this.formatPrefix(n,"redBright")}${s}`,{truncate:!1})}reportFold(r,s){if(!D0)return;let a=`${D0.start(r)}${s}${D0.end(r)}`;this.timerFooter.push(()=>this.stdout.write(a))}reportProgress(r){if(this.progressStyle===null)ret
Line truncated
|
|
|
|
|
`),this.writeProgress()}writeLines(r,{truncate:s}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:s})}
|
|
|
|
|
`);this.writeProgress()}commit(){let r=this.uncommitted;this.uncommitted=new Set;for(let s of r)s.committed=!0,s.action()}clearProgress({delta:r=0,clear:s=!1}){this.progressStyle!==null&&this.progress.size+r>0&&(this.stdout.write(`\x1B[${this.progress.size+r}A`),(r>0||s)&&this.stdout.write("\x1B[0J"))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let r=Date.now();r-this.progressTime>Hpe&&(this.progressFrame=(this.progressFrame+1)%_pe.length,this.progressTime=r);let s=_pe[this.progressFrame];for(let a of this.progress.values()){let n="";if(typeof a.lastScaledSize<"u"){let h=this.progressStyle.chars[0].repeat(a.lastScaledSize),E=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=` ${h}${E}`}let c=this.formatName(null),f=c?`${c}: `:"",p=a.definition.title?` ${a.definition.title}`:"";this.stdout.write(`${_t(this.configuration,"\u27A4","blueBright")} ${f}${s}${n}${p}
|
|
|
|
|
`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},Hpe)}refreshProgress({delta:r=0,force:s=!1}={}){let a=!1,n=!1;if(s||this.progress.size===0)a=!0;else for(let c of this.progress.values()){let f=typeof c.definition.progress<"u"?Math.trunc(this.progressMaxScaledSize*c.definition.progress):void 0,p=c.lastScaledSize;c.lastScaledSize=f;let h=c.lastTitle;if(c.lastTitle=c.definition.title,f!==p||(n=h!==c.definition.title)){a=!0;break}}a&&(this.clearProgress({delta:r,clear:n}),this.writeProgress())}truncate(r,{truncate:s}={}){return this.progressStyle===null&&(s=!1),typeof s>"u"&&(s=this.configuration.get("preferTruncatedLines")),s&&(r=(0,Gpe.default)(r,0,this.stdout.columns-1)),r}formatName(r){return this.includeNames?Wpe(r,{configuration:this.configuration,json:this.json}):""}formatPrefix(r,s){return this.includePrefix?`${_t(this.configuration,"\u27A4",s)} ${r}${this.formatIndent()}`:""}formatNameWithHyperlink(r){return this.includeNames?_j(r,{configuration:this.configuration,json:this.json}):""}formatIndent(){return this.level>0||!this.forceSectionAlignment?"\u2502 ".repeat(this.indent):`${znt} `}}});var In={};Vt(In,{PackageManager:()=>Vpe,detectPackageManager:()=>Jpe,executePackageAccessibleBinary:()=>$pe,executePackageScript:()=>FR,executePackageShellcode:()=>Hj,executeWorkspaceAccessibleBinary:()=>oit,executeWorkspaceLifecycleScript:()=>Zpe,executeWorkspaceScript:()=>zpe,getPackageAccessibleBinaries:()=>NR,getWorkspaceAccessibleBinaries:()=>Xpe,hasPackageScript:()=>nit,hasWorkspaceScript:()=>jj,isNodeScript:()=>Gj,makeScriptEnv:()=>Ev,maybeExecuteWorkspaceLifecycleScript:()=>sit,prepareExternalProject:()=>rit});async function b0(t,e,r,s=[]){if(process.platform==="win32"){let a=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${s.map(n=>`"${n.replace('"','""')}"`).join(" ")} %*`;await ce.writeFilePromise(J.format({dir:t,name:e,ext:".cmd"}),a)}await ce.writeFilePromise(J.join(t,e),`#!/bin/sh
|
|
|
|
|
exec "${r}" ${s.map(a=>`'${a.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@"
|
|
|
|
|
`,{mode:493})}async function Jpe(t){let e=await Ht.tryFind(t);if(e?.packageManager){let s=DQ(e.packageManager);if(s?.name){let a=`found ${JSON.stringify({packageManager:e.packageManager})} in manifest`,[n]=s.reference.split(".");switch(s.name){case"yarn":return{packageManagerField:!0,packageManager:Number(n)===1?"Yarn Classic":"Yarn",reason:a};case"npm":return{packageManagerField:!0,packageManager:"npm",reason:a};case"pnpm":return{packageManagerField:!0,packageManager:"pnpm",reason:a}}}}let r;try{r=await ce.readFilePromise(J.join(t,Er.lockfile),"utf8")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:"Yarn",reason:'"__metadata" key found in yarn.lock'}:{packageManager:"Yarn Classic",reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:ce.existsSync(J.join(t,"package-lock.json"))?{packageManager:"npm",reason:`found npm's "package-lock.json" lockfile`}:ce.existsSync(J.join(t,"pnpm-lock.yaml"))?{packageManager:"pnpm",reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function Ev({project:t,locator:e,binFolder:r,ignoreCorepack:s,lifecycleScript:a,baseEnv:n=t?.configuration.env??process.env}){let c={};for(let[E,w]of Object.entries(n))typeof w<"u"&&(c[E.toLowerCase()!=="path"?E:"PATH"]=w);let f=fe.fromPortablePath(r);c.BERRY_BIN_FOLDER=fe.fromPortablePath(f);let p=process.env.COREPACK_ROOT&&!s?fe.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([b0(r,"node",process.execPath),...un!==null?[b0(r,"run",process.execPath,[p,"run"]),b0(r,"yarn",process.execPath,[p]),b0(r,"yarnpkg",process.execPath,[p]),b0(r,"node-gyp",process.execPath,[p,"run","--top-level","node-gyp"])]:[]]),t&&(c.INIT_CWD=fe.fromPortablePath(t.configuration.startingCwd),c.PROJECT_CWD=fe.fromPortablePath(t.cwd)),c.PATH=c.PATH?`${f}${fe.delimiter}${c.PATH}`:`${f}`,c.npm_execpath=`${f}${fe.sep}yarn`,c.npm_node_execpath=`${f}${fe.sep}node`,e){if(!t)throw new Error("Assertion failed: Missing project");let E=t.tryWorkspaceByLocator(e),w=E?E.manifest.version??"":t.storedPackages.get(e.locatorHash).version??"";c.npm_package_name=cn(e),c.npm_package_version=w;let S;if(E)S=E.cwd;else{let x=t.storedPackages.get(e.locatorHash);if(!x)throw new Error(`Package for ${Yr(t.configuration,e)} not found in the project`);let I=t.configuration.getLinkers(),T={project:t,report:new Ot({stdout:new P0.PassThrough,configuration:t.configuration})},N=I.find(U=>U.supportsPackage(x,T));if(!N)throw new Error(`The package ${Yr(t.configuration,x)} isn't supported by any of the available linkers`);S=await N.findPackageLocation(x,T)}c.npm_package_json=fe.fromPortablePath(J.join(S,Er.manifest))}let h=un!==null?`yarn/${un}`:`yarn/${Pp("@yarnpkg/core").version}-core`;return c.npm_config_user_agent=`${h} npm/? node/${process.version} ${process.platform} ${process.arch}`,a&&(c.npm_lifecycle_event=a),t&&await t.configuration.triggerHook(E=>E.setupScriptEnvironment,t,c,async(E,w,S)=>await b0(r,E,w,S)),c}async function rit(t,e,{configuration:r,report:s,workspace:a=null,locator:n=null}){await tit(async()=>{await ce.mktempPromise(async c=>{let f=J.join(c,"pack.log"),p=null,{stdout:h,stderr:E}=r.getSubprocessStreams(f,{prefix:fe.fromPortablePath(t),report:s}),w=n&&Gu(n)?rI(n):n,S=w?ll(w):"an external project";h.write(`Packing ${S} from sources
|
|
|
|
|
`);let x=await Jpe(t),I;x!==null?(h.write(`Using ${x.packageManager} for bootstrap. Reason: ${x.reason}
|
|
|
|
|
|
|
|
|
|
`),I=x.packageManager):(h.write(`No package manager configuration detected; defaulting to Yarn
|
|
|
|
|
|
|
|
|
|
`),I="Yarn");let T=I==="Yarn"&&!x?.packageManagerField;await ce.mktempPromise(async N=>{let U=await Ev({binFolder:N,ignoreCorepack:T,baseEnv:{...process.env,COREPACK_ENABLE_AUTO_PIN:"0"}}),ee=new Map([["Yarn Classic",async()=>{let ue=a!==null?["workspace",a]:[],le=J.join(t,Er.manifest),me=await ce.readFilePromise(le),pe=await Wu(process.execPath,[process.argv[1],"set","version","classic","--only-if-needed","--yarn-path"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(pe.code!==0)return pe.code;await ce.writeFilePromise(le,me),await ce.appendFilePromise(J.join(t,".npmignore"),`/.yarn
|
|
|
|
|
`),h.write(`
|
|
|
|
|
`),delete U.NODE_ENV;let Be=await Wu("yarn",["install"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(Be.code!==0)return Be.code;h.write(`
|
|
|
|
|
`);let Ce=await Wu("yarn",[...ue,"pack","--filename",fe.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return Ce.code!==0?Ce.code:0}],["Yarn",async()=>{let ue=a!==null?["workspace",a]:[];U.YARN_ENABLE_INLINE_BUILDS="1";let le=J.join(t,Er.lockfile);await ce.existsPromise(le)||await ce.writeFilePromise(le,"");let me=await Wu("yarn",[...ue,"pack","--install-if-needed","--filename",fe.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return me.code!==0?me.code:0}],["npm",async()=>{if(a!==null){let we=new P0.PassThrough,ye=WE(we);we.pipe(h,{end:!1});let Ae=await Wu("npm",["--version"],{cwd:t,env:U,stdin:p,stdout:we,stderr:E,end:0});if(we.end(),Ae.code!==0)return h.end(),E.end(),Ae.code;let se=(await ye).toString().trim();if(!Xf(se,">=7.x")){let X=Da(null,"npm"),De=On(X,se),Te=On(X,">=7.x");throw new Error(`Workspaces aren't supported by ${ni(r,De)}; please upgrade to ${ni(r,Te)} (npm has been detected as the primary package manager for ${_t(r,t,ht.PATH)})`)}}let ue=a!==null?["--workspace",a]:[];delete U.npm_config_user_agent,delete U.npm_config_production,delete U.NPM_CONFIG_PRODUCTION,delete U.NODE_ENV;let le=await Wu("npm",["install","--legacy-peer-deps"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(le.code!==0)return le.code;let me=new P0.PassThrough,pe=WE(me);me.pipe(h);let Be=await Wu("npm",["pack","--silent",...ue],{cwd:t,env:U,stdin:p,stdout:me,stderr:E});if(Be.code!==0)return Be.code;let Ce=(await pe).toString().trim().replace(/^.*\n/s,""),g=J.resolve(t,fe.toPortablePath(Ce));return await ce.renamePromise(g,e),0}]]).get(I);if(typeof ee>"u")throw new Error("Assertion failed: Unsupported workflow");let ie=await ee();if(!(ie===0||typeof ie>"u"))throw ce.detachTemp(c),new Yt(58,`Packing the package failed (exit code ${ie}, logs can be found here: ${_t(r,f,ht.PATH)})`)})})})}async function nit(t,e,{project:r}){let s=r.tryWorkspaceByLocator(t);if(s!==null)return jj(s,e);let a=r.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${Yr(r.configuration,t)} not found in the project`);return await $f.openPromise(async n=>{let c=r.configuration,f=r.configuration.getLinkers(),p={project:r,report:new Ot({stdout:new P0.PassThrough,configuration:c})},h=f.find(x=>x.supportsPackage(a,p));if(!h)throw new Error(`The package ${Yr(r.configuration,a)} isn't supported by any of the available linkers`);let E=await h.findPackageLocation(a,p),w=new Sn(E,{baseFs:n});return(await Ht.find(vt.dot,{baseFs:w})).scripts.has(e)})}async function FR(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f}){return await ce.mktempPromise(async p=>{let{manifest:h,env:E,cwd:w}=await Kpe(t,{project:a,binFolder:p,cwd:s,lifecycleScript:e}),S=h.scripts.get(e);if(typeof S>"u")return 1;let x=async()=>await BI(S,r,{cwd:w,env:E,stdin:n,stdout:c,stderr:f});return await(await a.configuration.reduceHook(T=>T.wrapScriptExecution,x,a,t,e,{script:S,args:r,cwd:w,env:E,stdin:n,stdout:c,stderr:f}))()})}async function Hj(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f}){return await ce.mktempPromise(async p=>{let{env:h,cwd:E}=await Kpe(t,{project:a,binFolder:p,cwd:s});return await BI(e,r,{cwd:E,env:h,stdin:n,stdout:c,stderr:f})})}async function iit(t,{binFolder:e,cwd:r,lifecycleScript:s}){let a=await Ev({project:t.project,locator:t.anchoredLocator,binFolder:e,lifecycleScript:s});return await qj(e,await Xpe(t)),typeof r>"u"&&(r=J.dirname(await ce.realpathPromise(J.join(t.cwd,"package.json")))),{manifest:t.manifest,binFolder:e,env:a,cwd:r}}async function Kpe(t,{project:e,binFolder:r,cwd:s,lifecycleScript:a}){let n=e.tryWorkspaceByLocator(t);if(n!==null)return iit(n,{binFolder:r,cwd:s,lifecycleScript:a});let c=e.storedPackages.get(t.locatorHash);if(!c)throw new Error(`Package for ${Yr(e.configuration,t)} not found in the project`);return await $f.openPromise(async f=>{let p=e.configuration,h=e.configuration.getLinkers(),E={project:e,report:new Ot({stdout:new P0.PassThrough,configuration:p})},w=h.find(N=>N.supportsPackage(c,E));if(!w)throw new Error(`The package ${Yr(e.configuration,c)} isn't supported by any of the available linkers`);let S=await Ev({project:e,locator:t,binFolder:r,lifecycleScript:a});await qj(r,await NR(t,{project:e}));let x=await w.findPackageLocation(c,E),I=new Sn(x,{baseFs:f}),T=await Ht.find(vt.dot,{baseFs:I});return typeof s>"u"&&(s=x),{manifest:T,binFolder:r,env:S,cwd:s}})}async function zpe(t,e,r,{cwd:s,stdin:a,stdout:n,stderr:c}){return await FR(t.anchoredLocator,e,r,{cwd:s,project:t.project,stdin:a,stdout:n,stderr:c})}function jj(t,e){return t.manifest.scripts.has(e)}async function Zpe(t,e,{cwd:r,report:s}){let{configuration:a}=t.project,n=null;await ce.mktempPromise(async c=>{let f=J.join(c,`${e}.log`),p=`# This file contains the result of Yarn calling the "${e}" lifecycle script inside a workspace ("${fe.fromPortablePath(t.cwd)}")
|
|
|
|
|
`,{stdout:h,stderr:E}=a.getSubprocessStreams(f,{report:s,prefix:Yr(a,t.anchoredLocator),header:p});s.reportInfo(36,`Calling the "${e}" lifecycle script`);let w=await zpe(t,e,[],{cwd:r,stdin:n,stdout:h,stderr:E});if(h.end(),E.end(),w!==0)throw ce.detachTemp(c),new Yt(36,`${SB(e)} script failed (exit code ${_t(a,w,ht.NUMBER)}, logs can be found here: ${_t(a,f,ht.PATH)}); run ${_t(a,`yarn ${e}`,ht.CODE)} to investigate`)})}async function sit(t,e,r){jj(t,e)&&await Zpe(t,e,r)}function Gj(t){let e=J.extname(t);if(e.match(/\.[cm]?[jt]sx?$/))return!0;if(e===".exe"||e===".bin")return!1;let r=Buffer.alloc(4),s;try{s=ce.openSync(t,"r")}catch{return!0}try{ce.readSync(s,r,0,r.length,0)}finally{ce.closeSync(s)}let a=r.readUint32BE();return!(a===3405691582||a===3489328638||a===2135247942||(a&4294901760)===1297743872)}async function NR(t,{project:e}){let r=e.configuration,s=new Map,a=e.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${Yr(r,t)} not found in the project`);let n=new P0.Writable,c=r.getLinkers(),f={project:e,report:new Ot({configuration:r,stdout:n})},p=new Set([t.locatorHash]);for(let E of a.dependencies.values()){let w=e.storedResolutions.get(E.descriptorHash);if(!w)throw new Error(`Assertion failed: The resolution (${ni(r,E)}) should have been registered`);p.add(w)}let h=await Promise.all(Array.from(p,async E=>{let w=e.storedPackages.get(E);if(!w)throw new Error(`Assertion failed: The package (${E}) should have been registered`);if(w.bin.size===0)return Wl.skip;let S=c.find(I=>I.supportsPackage(w,f));if(!S)return Wl.skip;let x=null;try{x=await S.findPackageLocation(w,f)}catch(I){if(I.code==="LOCATOR_NOT_INSTALLED")return Wl.skip;throw I}return{dependency:w,packageLocation:x}}));for(let E of h){if(E===Wl.skip)continue;let{dependency:w,packageLocation:S}=E;for(let[x,I]of w.bin){let T=J.resolve(S,I);s.set(x,[w,fe.fromPortablePath(T),Gj(T)])}}return s}async function Xpe(t){return await NR(t.anchoredLocator,{project:t.project})}async function qj(t,e){await Promise.all(Array.from(e,([r,[,s,a]])=>a?b0(t,r,process.execPath,[s]):b0(t,r,s,[])))}async function $pe(t,e,r,{cwd:s,project:a,stdin:n,stdout:c,stderr:f,nodeArgs:p=[],packageAccessibleBinaries:h}){h??=await NR(t,{project:a});let E=h.get(e);if(!E)throw new Error(`Binary not found (${e}) for ${Yr(a.configuration,t)}`);return await ce.mktempPromise(async w=>{let[,S]=E,x=await Ev({project:a,locator:t,binFolder:w});await qj(x.BERRY_BIN_FOLDER,h);let I=Gj(fe.toPortablePath(S))?Wu(process.execPath,[...p,S,...r],{cwd:s,env:x,stdin:n,stdout:c,stderr:f}):Wu(S,r,{cwd:s,env:x,stdin:n,stdout:c,stderr:f}),T;try{T=await I}finally{await ce.removePromise(x.BERRY_BIN_FOLDER)}return T.code})}async function oit(t,e,r,{cwd:s,stdin:a,stdout:n,stderr:c,packageAccessibleBinaries:f}){return await $pe(t.anchoredLocator,e,r,{project:t.project,cwd:s,stdin:a,stdout:n,stderr:c,packageAccessibleBinaries:f})}var Ype,P0,Vpe,eit,tit,Wj=Ze(()=>{Dt();Dt();eA();Av();ql();Ype=ut(Ld()),P0=Ie("stream");oI();Rc();yv();mv();pR();xc();Pc();Tp();qo();Vpe=(a=>(a.Yarn1="Yarn Classic",a.Yarn2="Yarn",a.Npm="npm",a.Pnpm="pnpm",a))(Vpe||{});eit=2,tit=(0,Ype.default)(eit)});var SI=_((B4t,the)=>{"use strict";var ehe=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);the.exports=t=>t?Object.keys(t).map(e=>[ehe.has(e)?ehe.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var bI=_((v4t,uhe)=>{"use strict";var rhe=typeof process=="object"&&process?process:{stdout:null,stderr:null},ait=Ie("events"),nhe=Ie("stream"),ihe=Ie("string_decoder").StringDecoder,_p=Symbol("EOF"),Hp=Symbol("maybeEmitEnd"),x0=Symbol("emittedEnd"),OR=Symbol("emittingEnd"),Iv=Symbol("emittedError"),LR=Symbol("closed"),she=Symbol("read"),MR=Symbol("flush"),ohe=Symbol("flushChunk"),ul=Symbol("encoding"),jp=Symbol("decoder"),UR=Symbol("flowing"),Cv=Symbol("paused"),DI=Symbol("resume"),Ys=Symbol("bufferLength"),Yj=Symbol("bufferPush"),Vj=Symbol("bufferShift"),Jo=Symbol("objectMode"),Ko=Symbol("destroyed"),Jj=Symbol("emitData"),ahe=Symbol("emitEnd"),Kj=Symbol("emitEnd2"),Gp=Symbol("async"),wv=t=>Promise.resolve().then(t),lhe=global._MP_NO_ITERATOR_SYMBOLS_!=="1",lit=lhe&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),cit=lhe&&Symbol.iterator||Symbol("iterator not implemented"),uit=t=>t==="end"||t==="finish"||t==="prefinish",fit=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,Ait=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),_R=class{constructor(e,r,s){this.src=e,this.dest=r,this.opts=s,this.ondrain=()=>e[DI](),r.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ond
Line truncated
|
|
|
|
|
`,a=Buffer.byteLength(s),n=Math.floor(Math.log(a)/Math.log(10))+1;return a+n>=Math.pow(10,n)&&(n+=1),n+a+s}};vv.parse=(t,e,r)=>new vv(Nit(Oit(t),e),r);var Nit=(t,e)=>e?Object.keys(t).reduce((r,s)=>(r[s]=t[s],r),e):t,Oit=t=>t.replace(/\n$/,"").split(`
|
|
|
|
|
`).reduce(Lit,Object.create(null)),Lit=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.substr((r+" ").length);let s=e.split("="),a=s.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!a)return t;let n=s.join("=");return t[a]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(a)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,t};vhe.exports=vv});var TI=_((O4t,She)=>{She.exports=t=>{let e=t.length-1,r=-1;for(;e>-1&&t.charAt(e)==="/";)r=e,e--;return r===-1?t:t.slice(0,r)}});var VR=_((L4t,Dhe)=>{"use strict";Dhe.exports=t=>class extends t{warn(e,r,s={}){this.file&&(s.file=this.file),this.cwd&&(s.cwd=this.cwd),s.code=r instanceof Error&&r.code||e,s.tarCode=e,!this.strict&&s.recoverable!==!1?(r instanceof Error&&(s=Object.assign(r,s),r=r.message),this.emit("warn",s.tarCode,r,s)):r instanceof Error?this.emit("error",Object.assign(r,s)):this.emit("error",Object.assign(new Error(`${e}: ${r}`),s))}}});var w6=_((U4t,bhe)=>{"use strict";var JR=["|","<",">","?",":"],C6=JR.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),Mit=new Map(JR.map((t,e)=>[t,C6[e]])),Uit=new Map(C6.map((t,e)=>[t,JR[e]]));bhe.exports={encode:t=>JR.reduce((e,r)=>e.split(r).join(Mit.get(r)),t),decode:t=>C6.reduce((e,r)=>e.split(r).join(Uit.get(r)),t)}});var B6=_((_4t,xhe)=>{var{isAbsolute:_it,parse:Phe}=Ie("path").win32;xhe.exports=t=>{let e="",r=Phe(t);for(;_it(t)||r.root;){let s=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":r.root;t=t.substr(s.length),e+=s,r=Phe(t)}return[e,t]}});var Qhe=_((H4t,khe)=>{"use strict";khe.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&-19),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var T6=_((q4t,Whe)=>{"use strict";var Mhe=bI(),Uhe=YR(),_he=RI(),nA=Ie("fs"),Rhe=Ie("path"),rA=kI(),Hit=TI(),Hhe=(t,e)=>e?(t=rA(t).replace(/^\.(\/|$)/,""),Hit(e)+"/"+t):rA(t),jit=16*1024*1024,The=Symbol("process"),Fhe=Symbol("file"),Nhe=Symbol("directory"),S6=Symbol("symlink"),Ohe=Symbol("hardlink"),Sv=Symbol("header"),KR=Symbol("read"),D6=Symbol("lstat"),zR=Symbol("onlstat"),b6=Symbol("onread"),P6=Symbol("onreadlink"),x6=Symbol("openfile"),k6=Symbol("onopenfile"),T0=Symbol("close"),ZR=Symbol("mode"),Q6=Symbol("awaitDrain"),v6=Symbol("ondrain"),iA=Symbol("prefix"),Lhe=Symbol("hadError"),jhe=VR(),Git=w6(),Ghe=B6(),qhe=Qhe(),XR=jhe(class extends Mhe{constructor(e,r){if(r=r||{},super(r),typeof e!="string")throw new TypeError("path is required");this.path=rA(e),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||jit,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=rA(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,this.prefix=r.prefix?rA(r.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let s=!1;if(!this.preservePaths){let[a,n]=Ghe(this.path);a&&(this.path=n,s=a)}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=Git.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=rA(r.absolute||Rhe.resolve(this.cwd,e)),this.path===""&&(this.path="./"),s&&this.warn("TAR_ENTRY_INFO",`stripping ${s} from absolute path`,{entry:this,path:s+this.path}),this.statCache.has(this.absolute)?this[zR](this.statCache.get(this.absolute)):this[D6]()}emit(e,...r){return e==="error"&&(this[Lhe]=!0),super.emit(e,...r)}[D6](){nA.lstat(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[zR](r)})}[zR](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=Wit(e),this.emit("stat",e),this[The]()}[The](){switch(this.type){case"File":return this[Fhe]();case"Directory":return this[Nhe]();case"SymbolicLink":return this[S6]();default:return this.end()}}[ZR](e){return qhe(e,this.type==="Directory",this.portable)}[iA](e){return Hhe(e,this.prefix)}[Sv](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new _he({path:this[iA](this.path),linkpath:this.type==="Link"?this[iA](this.linkpath):this.linkpath,mode:this[ZR](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&&super.write(new Uhe({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[iA](this.path),linkpath:this.type==="Link"?this[iA](this.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.dev,ino:this.
Line truncated
|
|
|
|
|
`}),f},s})});var xs={};Vt(xs,{emitList:()=>Lot,emitTree:()=>$ge,treeNodeToJson:()=>Xge,treeNodeToTreeify:()=>Zge});function Zge(t,{configuration:e}){let r={},s=0,a=(n,c)=>{let f=Array.isArray(n)?n.entries():Object.entries(n);for(let[p,h]of f){if(!h)continue;let{label:E,value:w,children:S}=h,x=[];typeof E<"u"&&x.push(zd(e,E,2)),typeof w<"u"&&x.push(_t(e,w[0],w[1])),x.length===0&&x.push(zd(e,`${p}`,2));let I=x.join(": ").trim(),T=`\0${s++}\0`,N=c[`${T}${I}`]={};typeof S<"u"&&a(S,N)}};if(typeof t.children>"u")throw new Error("The root node must only contain children");return a(t.children,r),r}function Xge(t){let e=r=>{if(typeof r.children>"u"){if(typeof r.value>"u")throw new Error("Assertion failed: Expected a value to be set if the children are missing");return Zd(r.value[0],r.value[1])}let s=Array.isArray(r.children)?r.children.entries():Object.entries(r.children??{}),a=Array.isArray(r.children)?[]:{};for(let[n,c]of s)c&&(a[Mot(n)]=e(c));return typeof r.value>"u"?a:{value:Zd(r.value[0],r.value[1]),children:a}};return e(t)}function Lot(t,{configuration:e,stdout:r,json:s}){let a=t.map(n=>({value:n}));$ge({children:a},{configuration:e,stdout:r,json:s})}function $ge(t,{configuration:e,stdout:r,json:s,separators:a=0}){if(s){let c=Array.isArray(t.children)?t.children.values():Object.values(t.children??{});for(let f of c)f&&r.write(`${JSON.stringify(Xge(f))}
|
|
|
|
|
`);return}let n=(0,zge.asTree)(Zge(t,{configuration:e}),!1,!1);if(n=n.replace(/\0[0-9]+\0/g,""),a>=1&&(n=n.replace(/^([├└]─)/gm,`\u2502
|
|
|
|
|
$1`).replace(/^│\n/,"")),a>=2)for(let c=0;c<2;++c)n=n.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3 \u2502
|
|
|
|
|
$2`).replace(/^│\n/,"");if(a>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(n)}function Mot(t){return typeof t=="string"?t.replace(/^\0[0-9]+\0/,""):t}var zge,ede=Ze(()=>{zge=ut(Kge());xc()});var NT,tde=Ze(()=>{NT=class{constructor(e){this.releaseFunction=e;this.map=new Map}addOrCreate(e,r){let s=this.map.get(e);if(typeof s<"u"){if(s.refCount<=0)throw new Error(`Race condition in RefCountedMap. While adding a new key the refCount is: ${s.refCount} for ${JSON.stringify(e)}`);return s.refCount++,{value:s.value,release:()=>this.release(e)}}else{let a=r();return this.map.set(e,{refCount:1,value:a}),{value:a,release:()=>this.release(e)}}}release(e){let r=this.map.get(e);if(!r)throw new Error(`Unbalanced calls to release. No known instances of: ${JSON.stringify(e)}`);let s=r.refCount;if(s<=0)throw new Error(`Unbalanced calls to release. Too many release vs alloc refcount would become: ${s-1} of ${JSON.stringify(e)}`);s==1?(this.map.delete(e),this.releaseFunction(r.value)):r.refCount--}}});function Uv(t){let e=t.match(Uot);if(!e?.groups)throw new Error("Assertion failed: Expected the checksum to match the requested pattern");let r=e.groups.cacheVersion?parseInt(e.groups.cacheVersion):null;return{cacheKey:e.groups.cacheKey??null,cacheVersion:r,cacheSpec:e.groups.cacheSpec??null,hash:e.groups.hash}}var rde,kG,QG,OT,Kr,Uot,RG=Ze(()=>{Ve();Dt();Dt();eA();rde=Ie("crypto"),kG=ut(Ie("fs"));tde();Rc();I0();Pc();qo();QG=YE(process.env.YARN_CACHE_CHECKPOINT_OVERRIDE??process.env.YARN_CACHE_VERSION_OVERRIDE??9),OT=YE(process.env.YARN_CACHE_VERSION_OVERRIDE??10),Kr=class t{constructor(e,{configuration:r,immutable:s=r.get("enableImmutableCache"),check:a=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.refCountedZipFsCache=new NT(e=>{e.discardAndClose()});this.cacheId=`-${(0,rde.randomBytes)(8).toString("hex")}.tmp`;this.configuration=r,this.cwd=e,this.immutable=s,this.check=a;let{cacheSpec:n,cacheKey:c}=t.getCacheKey(r);this.cacheSpec=n,this.cacheKey=c}static async find(e,{immutable:r,check:s}={}){let a=new t(e.get("cacheFolder"),{configuration:e,immutable:r,check:s});return await a.setup(),a}static getCacheKey(e){let r=e.get("compressionLevel"),s=r!=="mixed"?`c${r}`:"";return{cacheKey:[OT,s].join(""),cacheSpec:s}}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`${nI(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let a=Uv(r).hash.slice(0,10);return`${nI(e)}-${a}.zip`}isChecksumCompatible(e){if(e===null)return!1;let{cacheVersion:r,cacheSpec:s}=Uv(e);if(r===null||r<QG)return!1;let a=this.configuration.get("cacheMigrationMode");return!(r<OT&&a==="always"||s!==this.cacheSpec&&a!=="required-only")}getLocatorPath(e,r){return this.mirrorCwd===null?J.resolve(this.cwd,this.getVersionFilename(e)):r===null?J.resolve(this.cwd,this.getVersionFilename(e)):J.resolve(this.cwd,this.getChecksumFilename(e,r))}getLocatorMirrorPath(e){let r=this.mirrorCwd;return r!==null?J.resolve(r,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache"))if(this.immutable){if(!await ce.existsPromise(this.cwd))throw new Yt(56,"Cache path does not exist.")}else{await ce.mkdirPromise(this.cwd,{recursive:!0});let e=J.resolve(this.cwd,".gitignore");await ce.changeFilePromise(e,`/.gitignore
|
|
|
|
|
*.flock
|
|
|
|
|
*.tmp
|
|
|
|
|
`)}(this.mirrorCwd||!this.immutable)&&await ce.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(e,r,{onHit:s,onMiss:a,loader:n,...c}){let f=this.getLocatorMirrorPath(e),p=new Yn,h=()=>{let pe=new As,Be=J.join(vt.root,S8(e));return pe.mkdirSync(Be,{recursive:!0}),pe.writeJsonSync(J.join(Be,Er.manifest),{name:cn(e),mocked:!0}),pe},E=async(pe,{isColdHit:Be,controlPath:Ce=null})=>{if(Ce===null&&c.unstablePackages?.has(e.locatorHash))return{isValid:!0,hash:null};let g=r&&!Be?Uv(r).cacheKey:this.cacheKey,we=!c.skipIntegrityCheck||!r?`${g}/${await wQ(pe)}`:r;if(Ce!==null){let Ae=!c.skipIntegrityCheck||!r?`${this.cacheKey}/${await wQ(Ce)}`:r;if(we!==Ae)throw new Yt(18,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}let ye=null;switch(r!==null&&we!==r&&(this.check?ye="throw":Uv(r).cacheKey!==Uv(we).cacheKey?ye="update":ye=this.configuration.get("checksumBehavior")),ye){case null:case"update":return{isValid:!0,hash:we};case"ignore":return{isValid:!0,hash:r};case"reset":return{isValid:!1,hash:r};default:case"throw":throw new Yt(18,"The remote archive doesn't match the expected checksum")}},w=async pe=>{if(!n)throw new Error(`Cache check required but no loader configured for ${Yr(this.configuration,e)}`);let Be=await n(),Ce=Be.getRealPath();Be.saveAndClose(),await ce.chmodPromise(Ce,420);let g=await E(pe,{controlPath:Ce,isColdHit:!1});if(!g.isValid)throw new Error("Assertion failed: Expected a valid checksum");return g.hash},S=async()=>{if(f===null||!await ce.existsPromise(f)){let pe=await n(),Be=pe.getRealPath();return pe.saveAndClose(),{source:"loader",path:Be}}return{source:"mirror",path:f}},x=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${Yr(this.configuration,e)}`);if(this.immutable)throw new Yt(56,`Cache entry required but missing for ${Yr(this.configuration,e)}`);let{path:pe,source:Be}=await S(),{hash:Ce}=await E(pe,{isColdHit:!0}),g=this.getLocatorPath(e,Ce),we=[];Be!=="mirror"&&f!==null&&we.push(async()=>{let Ae=`${f}${this.cacheId}`;await ce.copyFilePromise(pe,Ae,kG.default.constants.COPYFILE_FICLONE),await ce.chmodPromise(Ae,420),await ce.renamePromise(Ae,f)}),(!c.mirrorWriteOnly||f===null)&&we.push(async()=>{let Ae=`${g}${this.cacheId}`;await ce.copyFilePromise(pe,Ae,kG.default.constants.COPYFILE_FICLONE),await ce.chmodPromise(Ae,420),await ce.renamePromise(Ae,g)});let ye=c.mirrorWriteOnly?f??g:g;return await Promise.all(we.map(Ae=>Ae())),[!1,ye,Ce]},I=async()=>{let Be=(async()=>{let Ce=c.unstablePackages?.has(e.locatorHash),g=Ce||!r||this.isChecksumCompatible(r)?this.getLocatorPath(e,r):null,we=g!==null?this.markedFiles.has(g)||await p.existsPromise(g):!1,ye=!!c.mockedPackages?.has(e.locatorHash)&&(!this.check||!we),Ae=ye||we,se=Ae?s:a;if(se&&se(),Ae){let X=null,De=g;if(!ye)if(this.check)X=await w(De);else{let Te=await E(De,{isColdHit:!1});if(Te.isValid)X=Te.hash;else return x()}return[ye,De,X]}else{if(this.immutable&&Ce)throw new Yt(56,`Cache entry required but missing for ${Yr(this.configuration,e)}; consider defining ${he.pretty(this.configuration,"supportedArchitectures",he.Type.CODE)} to cache packages for multiple systems`);return x()}})();this.mutexes.set(e.locatorHash,Be);try{return await Be}finally{this.mutexes.delete(e.locatorHash)}};for(let pe;pe=this.mutexes.get(e.locatorHash);)await pe;let[T,N,U]=await I();T||this.markedFiles.add(N);let W=()=>this.refCountedZipFsCache.addOrCreate(N,()=>T?h():new As(N,{baseFs:p,readOnly:!0})),ee,ie=new oE(()=>H4(()=>(ee=W(),ee.value),pe=>`Failed to open the cache entry for ${Yr(this.configuration,e)}: ${pe}`),J),ue=new _f(N,{baseFs:ie,pathUtils:J}),le=()=>{ee?.release()},me=c.unstablePackages?.has(e.locatorHash)?null:U;return[ue,le,me]}},Uot=/^(?:(?<cacheKey>(?<cacheVersion>[0-9]+)(?<cacheSpec>.*))\/)?(?<hash>.*)$/});var LT,nde=Ze(()=>{LT=(r=>(r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE",r))(LT||{})});var _ot,JI,TG=Ze(()=>{Dt();wc();Tp();qo();_ot=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(t,e,r,s)=>`${r}#commit=${s}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(t,e,r="",s,a)=>`https://${r}github.com/${s}.git#commit=${a}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(t,e,r="",s,a)=>`https://${r}github.com/${s}.git#commit=${a}`],[/^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?:\/\/[^/]+\/.*\/(@[^/]+)\/([^/]+)\/-\/\1\/\2-(?:[.\d\w-]+)\.tgz(?:#|$)/,(t,e)=>bQ({protocol:"npm:",source:null,selector:t,params:{__archiveUrl:e}})],[/^[^/]+\.tgz#[0-9a-f]+$/,t=>`npm:${t}`]],JI=class{constructor(e){this.resolver=e;this.resolutions=null}async setup(e,{report:r}){let s=J.join(e.cwd,Er
Line truncated
|
|
|
|
|
`)}reportProgress(r){return{...Promise.resolve().then(async()=>{for await(let{}of r);}),stop:()=>{}}}reportJson(r){}reportFold(r,s){}async finalize(){this.errorCount>0&&(this.stdout.write(`
|
|
|
|
|
`),this.stdout.write(`${_t(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command.
|
|
|
|
|
`),this.suggestInstall&&this.stdout.write(`${_t(this.configuration,"\u27A4","redBright")} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help.
|
|
|
|
|
`))}formatNameWithHyperlink(r){return _j(r,{configuration:this.configuration,json:!1})}}});var KI,FG=Ze(()=>{qo();KI=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return!!(r.project.storedResolutions.get(e.descriptorHash)||r.project.originalPackages.has(vQ(e).locatorHash))}supportsLocator(e,r){return!!(r.project.originalPackages.has(e.locatorHash)&&!r.project.lockfileNeedsRefresh)}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,s){return e}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,s){let a=s.project.storedResolutions.get(e.descriptorHash);if(a){let c=s.project.originalPackages.get(a);if(c)return[c]}let n=s.project.originalPackages.get(vQ(e).locatorHash);if(n)return[n];throw new Error("Resolution expected from the lockfile data")}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let s=r.project.originalPackages.get(e.locatorHash);if(!s)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return s}}});function Kp(){}function Hot(t,e,r,s,a){for(var n=0,c=e.length,f=0,p=0;n<c;n++){var h=e[n];if(h.removed){if(h.value=t.join(s.slice(p,p+h.count)),p+=h.count,n&&e[n-1].added){var w=e[n-1];e[n-1]=e[n],e[n]=w}}else{if(!h.added&&a){var E=r.slice(f,f+h.count);E=E.map(function(x,I){var T=s[p+I];return T.length>x.length?T:x}),h.value=t.join(E)}else h.value=t.join(r.slice(f,f+h.count));f+=h.count,h.added||(p+=h.count)}}var S=e[c-1];return c>1&&typeof S.value=="string"&&(S.added||S.removed)&&t.equals("",S.value)&&(e[c-2].value+=S.value,e.pop()),e}function jot(t){return{newPos:t.newPos,components:t.components.slice(0)}}function Got(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}function ade(t,e,r){return r=Got(r,{ignoreWhitespace:!0}),UG.diff(t,e,r)}function qot(t,e,r){return _G.diff(t,e,r)}function MT(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?MT=function(e){return typeof e}:MT=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},MT(t)}function NG(t){return Vot(t)||Jot(t)||Kot(t)||zot()}function Vot(t){if(Array.isArray(t))return OG(t)}function Jot(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function Kot(t,e){if(t){if(typeof t=="string")return OG(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return OG(t,e)}}function OG(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,s=new Array(e);r<e;r++)s[r]=t[r];return s}function zot(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LG(t,e,r,s,a){e=e||[],r=r||[],s&&(t=s(a,t));var n;for(n=0;n<e.length;n+=1)if(e[n]===t)return r[n];var c;if(Zot.call(t)==="[object Array]"){for(e.push(t),c=new Array(t.length),r.push(c),n=0;n<t.length;n+=1)c[n]=LG(t[n],e,r,s,a);return e.pop(),r.pop(),c}if(t&&t.toJSON&&(t=t.toJSON()),MT(t)==="object"&&t!==null){e.push(t),c={},r.push(c);var f=[],p;for(p in t)t.hasOwnProperty(p)&&f.push(p);for(f.sort(),n=0;n<f.length;n+=1)p=f[n],c[p]=LG(t[p],e,r,s,p);e.pop(),r.pop()}else c=t;return c}function lde(t,e,r,s,a,n,c){c||(c={}),typeof c.context>"u"&&(c.context=4);var f=qot(r,s,c);if(!f)return;f.push({value:"",lines:[]});function p(U){return U.map(function(W){return" "+W})}for(var h=[],E=0,w=0,S=[],x=1,I=1,T=function(W){var ee=f[W],ie=ee.lines||ee.value.replace(/\n$/,"").split(`
|
|
|
|
|
`);if(ee.lines=ie,ee.added||ee.removed){var ue;if(!E){var le=f[W-1];E=x,w=I,le&&(S=c.context>0?p(le.lines.slice(-c.context)):[],E-=S.length,w-=S.length)}(ue=S).push.apply(ue,NG(ie.map(function(Ae){return(ee.added?"+":"-")+Ae}))),ee.added?I+=ie.length:x+=ie.length}else{if(E)if(ie.length<=c.context*2&&W<f.length-2){var me;(me=S).push.apply(me,NG(p(ie)))}else{var pe,Be=Math.min(ie.length,c.context);(pe=S).push.apply(pe,NG(p(ie.slice(0,Be))));var Ce={oldStart:E,oldLines:x-E+Be,newStart:w,newLines:I-w+Be,lines:S};if(W>=f.length-2&&ie.length<=c.context){var g=/\n$/.test(r),we=/\n$/.test(s),ye=ie.length==0&&S.length>Ce.oldLines;!g&&ye&&r.length>0&&S.splice(Ce.oldLines,0,"\\ No newline at end of file"),(!g&&!ye||!we)&&S.push("\\ No newline at end of file")}h.push(Ce),E=0,w=0,S=[]}x+=ie.length,I+=ie.length}},N=0;N<f.length;N++)T(N);return{oldFileName:t,newFileName:e,oldHeader:a,newHeader:n,hunks:h}}var V3t,sde,ode,UG,_G,Wot,Yot,Zot,_v,MG,HG=Ze(()=>{Kp.prototype={diff:function(e,r){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=s.callback;typeof s=="function"&&(a=s,s={}),this.options=s;var n=this;function c(T){return a?(setTimeout(function(){a(void 0,T)},0),!0):T}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var f=r.length,p=e.length,h=1,E=f+p;s.maxEditLength&&(E=Math.min(E,s.maxEditLength));var w=[{newPos:-1,components:[]}],S=this.extractCommon(w[0],r,e,0);if(w[0].newPos+1>=f&&S+1>=p)return c([{value:this.join(r),count:r.length}]);function x(){for(var T=-1*h;T<=h;T+=2){var N=void 0,U=w[T-1],W=w[T+1],ee=(W?W.newPos:0)-T;U&&(w[T-1]=void 0);var ie=U&&U.newPos+1<f,ue=W&&0<=ee&&ee<p;if(!ie&&!ue){w[T]=void 0;continue}if(!ie||ue&&U.newPos<W.newPos?(N=jot(W),n.pushComponent(N.components,void 0,!0)):(N=U,N.newPos++,n.pushComponent(N.components,!0,void 0)),ee=n.extractCommon(N,r,e,T),N.newPos+1>=f&&ee+1>=p)return c(Hot(n,N.components,r,e,n.useLongestToken));w[T]=N}h++}if(a)(function T(){setTimeout(function(){if(h>E)return a();x()||T()},0)})();else for(;h<=E;){var I=x();if(I)return I}},pushComponent:function(e,r,s){var a=e[e.length-1];a&&a.added===r&&a.removed===s?e[e.length-1]={count:a.count+1,added:r,removed:s}:e.push({count:1,added:r,removed:s})},extractCommon:function(e,r,s,a){for(var n=r.length,c=s.length,f=e.newPos,p=f-a,h=0;f+1<n&&p+1<c&&this.equals(r[f+1],s[p+1]);)f++,p++,h++;return h&&e.components.push({count:h}),e.newPos=f,p},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=[],s=0;s<e.length;s++)e[s]&&r.push(e[s]);return r},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};V3t=new Kp;sde=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,ode=/\S/,UG=new Kp;UG.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!ode.test(t)&&!ode.test(e)};UG.tokenize=function(t){for(var e=t.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<e.length-1;r++)!e[r+1]&&e[r+2]&&sde.test(e[r])&&sde.test(e[r+2])&&(e[r]+=e[r+2],e.splice(r+1,2),r--);return e};_G=new Kp;_G.tokenize=function(t){var e=[],r=t.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var s=0;s<r.length;s++){var a=r[s];s%2&&!this.options.newlineIsToken?e[e.length-1]+=a:(this.options.ignoreWhitespace&&(a=a.trim()),e.push(a))}return e};Wot=new Kp;Wot.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};Yot=new Kp;Yot.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};Zot=Object.prototype.toString,_v=new Kp;_v.useLongestToken=!0;_v.tokenize=_G.tokenize;_v.castInput=function(t){var e=this.options,r=e.undefinedReplacement,s=e.stringifyReplacer,a=s===void 0?function(n,c){return typeof c>"u"?r:c}:s;return typeof t=="string"?t:JSON.stringify(LG(t,null,null,a),a," ")};_v.equals=function(t,e){return Kp.prototype.equals.call(_v,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};MG=new Kp;MG.tokenize=function(t){return t.slice()};MG.join=MG.removeEmpty=function(t){return t}});var UT,cde=Ze(()=>{Rc();UT=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.resolver.shouldPersistResolution(e,r)}bindDescriptor(e,r,s){return this.resolver.bindDescriptor(e,r,s)}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,s){throw new Yt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async getSatisfying(e,r,s,a){throw new Yt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async resolve(e,r){throw new Yt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfLine truncated
|
|
|
|
|
`;await ce.changeFilePromise(r,s,{automaticNewlines:!0}),this.manifest.raw=e}}});function nat({project:t,allDescriptors:e,allResolutions:r,allPackages:s,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:c=new Map,peerWarnings:f=[],peerRequirementNodes:p=new Map,volatileDescriptors:h=new Set}){let E=new Map,w=[],S=new Map,x=new Map,I=new Map,T=new Map,N=new Map,U=new Map(t.workspaces.map(le=>{let me=le.anchoredLocator.locatorHash,pe=s.get(me);if(typeof pe>"u")throw new Error("Assertion failed: The workspace should have an associated package");return[me,NB(pe)]})),W=()=>{let le=ce.mktempSync(),me=J.join(le,"stacktrace.log"),pe=String(w.length+1).length,Be=w.map((Ce,g)=>`${`${g+1}.`.padStart(pe," ")} ${ll(Ce)}
|
|
|
|
|
`).join("");throw ce.writeFileSync(me,Be),ce.detachTemp(le),new Yt(45,`Encountered a stack overflow when resolving peer dependencies; cf ${fe.fromPortablePath(me)}`)},ee=le=>{let me=r.get(le.descriptorHash);if(typeof me>"u")throw new Error("Assertion failed: The resolution should have been registered");let pe=s.get(me);if(!pe)throw new Error("Assertion failed: The package could not be found");return pe},ie=(le,me,pe,{top:Be,optional:Ce})=>{w.length>1e3&&W(),w.push(me);let g=ue(le,me,pe,{top:Be,optional:Ce});return w.pop(),g},ue=(le,me,pe,{top:Be,optional:Ce})=>{if(Ce||n.delete(me.locatorHash),a.has(me.locatorHash))return;a.add(me.locatorHash);let g=s.get(me.locatorHash);if(!g)throw new Error(`Assertion failed: The package (${Yr(t.configuration,me)}) should have been registered`);let we=new Set,ye=new Map,Ae=[],se=[],X=[],De=[];for(let Te of Array.from(g.dependencies.values())){if(g.peerDependencies.has(Te.identHash)&&g.locatorHash!==Be)continue;if(kp(Te))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");h.delete(Te.descriptorHash);let mt=Ce;if(!mt){let ke=g.dependenciesMeta.get(cn(Te));if(typeof ke<"u"){let it=ke.get(null);typeof it<"u"&&it.optional&&(mt=!0)}}let j=r.get(Te.descriptorHash);if(!j)throw new Error(`Assertion failed: The resolution (${ni(t.configuration,Te)}) should have been registered`);let rt=U.get(j)||s.get(j);if(!rt)throw new Error(`Assertion failed: The package (${j}, resolved from ${ni(t.configuration,Te)}) should have been registered`);if(rt.peerDependencies.size===0){ie(Te,rt,new Map,{top:Be,optional:mt});continue}let Fe,Ne,Pe=new Set,Ye=new Map;Ae.push(()=>{Fe=B8(Te,me.locatorHash),Ne=v8(rt,me.locatorHash),g.dependencies.set(Te.identHash,Fe),r.set(Fe.descriptorHash,Ne.locatorHash),e.set(Fe.descriptorHash,Fe),s.set(Ne.locatorHash,Ne),bp(T,Ne.locatorHash).add(Fe.descriptorHash),we.add(Ne.locatorHash)}),se.push(()=>{N.set(Ne.locatorHash,Ye);for(let ke of Ne.peerDependencies.values()){let Ue=Yl(ye,ke.identHash,()=>{let P=pe.get(ke.identHash)??null,C=g.dependencies.get(ke.identHash);return!C&&LB(me,ke)&&(le.identHash===me.identHash?C=le:(C=On(me,le.range),e.set(C.descriptorHash,C),r.set(C.descriptorHash,me.locatorHash),h.delete(C.descriptorHash),P=null)),C||(C=On(ke,"missing:")),{subject:me,ident:ke,provided:C,root:!P,requests:new Map,hash:`p${cs(me.locatorHash,ke.identHash).slice(0,6)}`}}).provided;if(Ue.range==="missing:"&&Ne.dependencies.has(ke.identHash)){Ne.peerDependencies.delete(ke.identHash);continue}if(Ye.set(ke.identHash,{requester:Ne,descriptor:ke,meta:Ne.peerDependenciesMeta.get(cn(ke)),children:new Map}),Ne.dependencies.set(ke.identHash,Ue),kp(Ue)){let P=r.get(Ue.descriptorHash);bp(I,P).add(Ne.locatorHash)}S.set(Ue.identHash,Ue),Ue.range==="missing:"&&Pe.add(Ue.identHash)}Ne.dependencies=new Map(qs(Ne.dependencies,([ke,it])=>cn(it)))}),X.push(()=>{if(!s.has(Ne.locatorHash))return;let ke=E.get(rt.locatorHash);typeof ke=="number"&&ke>=2&&W();let it=E.get(rt.locatorHash),Ue=typeof it<"u"?it+1:1;E.set(rt.locatorHash,Ue),ie(Fe,Ne,Ye,{top:Be,optional:mt}),E.set(rt.locatorHash,Ue-1)}),De.push(()=>{let ke=r.get(Fe.descriptorHash);if(typeof ke>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let it=N.get(ke);if(typeof it>"u")throw new Error("Assertion failed: Expected the peer requests to be registered");for(let Ue of ye.values()){let P=it.get(Ue.ident.identHash);P&&(Ue.requests.set(Fe.descriptorHash,P),p.set(Ue.hash,Ue),Ue.root||pe.get(Ue.ident.identHash)?.children.set(Fe.descriptorHash,P))}if(s.has(Ne.locatorHash))for(let Ue of Pe)Ne.dependencies.delete(Ue)})}for(let Te of[...Ae,...se])Te();for(let Te of we){we.delete(Te);let mt=s.get(Te),j=cs(rI(mt).locatorHash,...Array.from(mt.dependencies.values(),Pe=>{let Ye=Pe.range!=="missing:"?r.get(Pe.descriptorHash):"missing:";if(typeof Ye>"u")throw new Error(`Assertion failed: Expected the resolution for ${ni(t.configuration,Pe)} to have been registered`);return Ye===Be?`${Ye} (top)`:Ye})),rt=x.get(j);if(typeof rt>"u"){x.set(j,mt);continue}let Fe=bp(T,rt.locatorHash);for(let Pe of T.get(mt.locatorHash)??[])r.set(Pe,rt.locatorHash),Fe.add(Pe);s.delete(mt.locatorHash),a.delete(mt.locatorHash),we.delete(mt.locatorHash);let Ne=I.get(mt.locatorHash);if(Ne!==void 0){let Pe=bp(I,rt.locatorHash);for(let Ye of Ne)Pe.add(Ye),we.add(Ye)}}for(let Te of[...X,...De])Te()};for(let le of t.workspaces){let me=le.anchoredLocator;h.delete(le.anchoredDescriptor.descriptorHash),ie(le.anchoredDescriptor,me,new Map,{top:me.locatorHash,optional:!1})}for(let le of p.values()){if(!le.root)continue;let me=s.get(le.subject.locatorHash);if(typeof me>"u")continue;for(let Be of le.requests.values()){let Ce=`p${cs(le.subject.locatorHash,cn(le.ident),Be.requester.locatorHash).slice(0,6)}`;c.set(Ce,{subject:le.subject.locatorHash,requested:le.ident,rootRequester:Be.requester.locatorHash,allRequesters:Array.from(jB(Be),g=>g.requester.locatorHash)})}let pe=[...jB(le)];if(le.provided.rang
Line truncated
|
|
|
|
|
|
|
|
|
|
${[w,S,x].join(`
|
|
|
|
|
`)}`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=J.join(this.cwd,Er.lockfile),r=this.configuration.get("defaultLanguageName");if(ce.existsSync(e)){let s=await ce.readFilePromise(e,"utf8");this.lockFileChecksum=Ade(s);let a=as(s);if(a.__metadata){let n=a.__metadata.version,c=a.__metadata.cacheKey;this.lockfileLastVersion=n,this.lockfileNeedsRefresh=n<jT;for(let f of Object.keys(a)){if(f==="__metadata")continue;let p=a[f];if(typeof p.resolution>"u")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${f})`);let h=Qp(p.resolution,!0),E=new Ht;E.load(p,{yamlCompatibilityMode:!0});let w=E.version,S=E.languageName||r,x=p.linkType.toUpperCase(),I=p.conditions??null,T=E.dependencies,N=E.peerDependencies,U=E.dependenciesMeta,W=E.peerDependenciesMeta,ee=E.bin;if(p.checksum!=null){let ue=typeof c<"u"&&!p.checksum.includes("/")?`${c}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,ue)}let ie={...h,version:w,languageName:S,linkType:x,conditions:I,dependencies:T,peerDependencies:N,dependenciesMeta:U,peerDependenciesMeta:W,bin:ee};this.originalPackages.set(ie.locatorHash,ie);for(let ue of f.split($ot)){let le=C0(ue);n<=6&&(le=this.configuration.normalizeDependency(le),le=On(le,le.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(le.descriptorHash,le),this.storedResolutions.set(le.descriptorHash,h.locatorHash)}}}else s.includes("yarn lockfile v1")&&(this.lockfileLastVersion=-1)}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=new Set,r=(0,HT.default)(4),s=async(a,n)=>{if(e.has(n))return a;e.add(n);let c=new zI(n,{project:this});await r(()=>c.setup());let f=a.then(()=>{this.addWorkspace(c)});return Array.from(c.workspacesCwds).reduce(s,f)};await s(Promise.resolve(),this.cwd)}addWorkspace(e){let r=this.workspacesByIdent.get(e.anchoredLocator.identHash);if(typeof r<"u")throw new Error(`Duplicate workspace name ${Xi(this.configuration,e.anchoredLocator)}: ${fe.fromPortablePath(e.cwd)} conflicts with ${fe.fromPortablePath(r.cwd)}`);this.workspaces.push(e),this.workspacesByCwd.set(e.cwd,e),this.workspacesByIdent.set(e.anchoredLocator.identHash,e)}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){J.isAbsolute(e)||(e=J.resolve(this.cwd,e)),e=J.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 s of this.workspaces)J.relative(s.cwd,e).startsWith("../")||r&&r.cwd.length>=s.cwd.length||(r=s);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>"u"?null:r}getWorkspaceByIdent(e){let r=this.tryWorkspaceByIdent(e);if(!r)throw new Error(`Workspace not found (${Xi(this.configuration,e)})`);return r}tryWorkspaceByDescriptor(e){if(e.range.startsWith(Ei.protocol)){let s=e.range.slice(Ei.protocol.length);if(s!=="^"&&s!=="~"&&s!=="*"&&!cl(s))return this.tryWorkspaceByCwd(s)}let r=this.tryWorkspaceByIdent(e);return r===null||(kp(e)&&(e=OB(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){let r=this.tryWorkspaceByDescriptor(e);if(r===null)throw new Error(`Workspace not found (${ni(this.configuration,e)})`);return r}tryWorkspaceByLocator(e){let r=this.tryWorkspaceByIdent(e);return r===null||(Gu(e)&&(e=rI(e)),r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){let r=this.tryWorkspaceByLocator(e);if(!r)throw new Error(`Workspace not found (${Yr(this.configuration,e)})`);return r}deleteDescriptor(e){this.storedResolutions.delete(e),this.storedDescriptors.delete(e)}deleteLocator(e){this.originalPackages.delete(e),this.storedPackages.delete(e),this.accessibleLocators.delete(e)}forgetResolution(e){if("descriptorHash"in e){let r=this.storedResolutions.get(e.descriptorHash);this.deleteDescriptor(e.descriptorHash);let s=new Set(this.storedResolutions.values());typeof r<"u"&&!s.has(r)&&this.deleteLocator(r)}if("locatorHash"in e){this.deleteLocator(e.locatorHash);for(let[r,s]of this.storedResolutions)s===e.locatorHash&&this.deleteDescriptor(r)}}forgetTransientResolutions(){let e=this.configuration.makeResolver(),r=new Map;for(let[s,a]of this.storedResolutions.entries()){let n=r.get(a);n||r.set(a,n=new Set),n.add(s)}for(let s of this.originalPackages.values()){let a;try{a=e.shouldPersistResolution(s,{project:this,resolver:e})}catch{a=!1}if(!a){this.deleteLocator(s.locatorHash);let n=r.get(s.locatorHash);if(n){r.delete(s.locatorHash);for(let c of n)this.deleteDescriptor(c)}}}}forgetVirtualResolutions(){for(let e of this.storedPackages.values())for(let[r,s]of e.dependencies)kp(s)&&e.dLine truncated
|
|
|
|
|
`;switch(rt.type){case 0:Fe+=`# Script name: ${rt.script}
|
|
|
|
|
`;break;case 1:Fe+=`# Script code: ${rt.script}
|
|
|
|
|
`;break}let Ne=null;if(!await ce.mktempPromise(async Ye=>{let ke=J.join(Ye,"build.log"),{stdout:it,stderr:Ue}=this.configuration.getSubprocessStreams(ke,{header:Fe,prefix:Yr(this.configuration,X),report:r}),P;try{switch(rt.type){case 0:P=await FR(X,rt.script,[],{cwd:j,project:this,stdin:Ne,stdout:it,stderr:Ue});break;case 1:P=await Hj(X,rt.script,[],{cwd:j,project:this,stdin:Ne,stdout:it,stderr:Ue});break}}catch(y){Ue.write(y.stack),P=1}if(it.end(),Ue.end(),P===0)return!0;ce.detachTemp(Ye);let C=`${Yr(this.configuration,X)} couldn't be built successfully (exit code ${_t(this.configuration,P,ht.NUMBER)}, logs can be found here: ${_t(this.configuration,ke,ht.PATH)})`,b=this.optionalBuilds.has(X.locatorHash);return b?r.reportInfo(9,C):r.reportError(9,C),qpe&&r.reportFold(fe.fromPortablePath(ke),ce.readFileSync(ke,"utf8")),b}))return!1}return!0});Ae.push(...mt,Promise.allSettled(mt).then(j=>{ie.delete(se),j.every(rt=>rt.status==="fulfilled"&&rt.value===!0)&&Ce.set(X.locatorHash,Te)}))}if(await Uu(Ae),ye===ie.size){let se=Array.from(ie).map(X=>{let De=this.storedPackages.get(X);if(!De)throw new Error("Assertion failed: The package should have been registered");return Yr(this.configuration,De)}).join(", ");r.reportError(3,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${se})`);break}}this.storedBuildState=Ce,this.skippedBuilds=N}async installWithNewReport(e,r){return(await Ot.start({configuration:this.configuration,json:e.json,stdout:e.stdout,forceSectionAlignment:!0,includeLogs:!e.json&&!e.quiet,includeVersion:!0},async a=>{await this.install({...r,report:a})})).exitCode()}async install(e){let r=this.configuration.get("nodeLinker");ze.telemetry?.reportInstall(r);let s=!1;if(await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{this.configuration.get("enableOfflineMode")&&e.report.reportWarning(90,"Offline work is enabled; Yarn won't fetch packages from the remote registry if it can avoid it"),await this.configuration.triggerHook(E=>E.validateProject,this,{reportWarning:(E,w)=>{e.report.reportWarning(E,w)},reportError:(E,w)=>{e.report.reportError(E,w),s=!0}})}),s)return;let a=await this.configuration.getPackageExtensions();for(let E of a.values())for(let[,w]of E)for(let S of w)S.status="inactive";let n=J.join(this.cwd,Er.lockfile),c=null;if(e.immutable)try{c=await ce.readFilePromise(n,"utf8")}catch(E){throw E.code==="ENOENT"?new Yt(28,"The lockfile would have been created by this install, which is explicitly forbidden."):E}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{sat(this,e.report);for(let[,E]of a)for(let[,w]of E)for(let S of w)if(S.userProvided){let x=_t(this.configuration,S,ht.PACKAGE_EXTENSION);switch(S.status){case"inactive":e.report.reportWarning(68,`${x}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case"redundant":e.report.reportWarning(69,`${x}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(c!==null){let E=Ed(c,this.generateLockfile());if(E!==c){let w=lde(n,n,c,E,void 0,void 0,{maxEditLength:100});if(w){e.report.reportSeparator();for(let S of w.hunks){e.report.reportInfo(null,`@@ -${S.oldStart},${S.oldLines} +${S.newStart},${S.newLines} @@`);for(let x of S.lines)x.startsWith("+")?e.report.reportError(28,_t(this.configuration,x,ht.ADDED)):x.startsWith("-")?e.report.reportError(28,_t(this.configuration,x,ht.REMOVED)):e.report.reportInfo(null,_t(this.configuration,x,"grey"))}e.report.reportSeparator()}throw new Yt(28,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let E of a.values())for(let[,w]of E)for(let S of w)S.userProvided&&S.status==="active"&&ze.telemetry?.reportPackageExtension(Zd(S,ht.PACKAGE_EXTENSION));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e)});let f=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],p=await Promise.all(f.map(async E=>BQ(E,{cwd:this.cwd})));(typeof e.persistProject>"u"||e.persistProject)&&await this.persist(),await e.report.startTimerPromise("Link step",async()=>{if(e.mode==="update-lockfile"){e.report.reportWarning(73,`Skipped due to ${_t(this.configuration,"mode=update-lockfile",ht.CODE)}`);return}await this.linkEverything(e);let E=await Promise.all(f.map(async w=>BQ(w,{cwd:this.cwd})));for(let w=0;w<f.length;++w)p[w]!==E[w]&&e.report.reportError(64,`The checksum for ${f[w]} has been modified by this install, which is explicitly forbidden.`)}),await this.persistInstallStateFile();let h=!1;await e.report.startTimerPromise("Post-install validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(E=>E.validateProjectAfterInstall,this,{reportWarning:(E,w)=>{e.report.r
Line truncated
|
|
|
|
|
`,`# Manual changes might be lost - proceed with caution!
|
|
|
|
|
`].join("")}
|
|
|
|
|
`+nl(r)}async persistLockfile(){let e=J.join(this.cwd,Er.lockfile),r="";try{r=await ce.readFilePromise(e,"utf8")}catch{}let s=this.generateLockfile(),a=Ed(r,s);a!==r&&(await ce.writeFilePromise(e,a),this.lockFileChecksum=Ade(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let c of Object.values(qG))e.push(...c);let r=Kd(this,e),s=WG.default.serialize(r),a=cs(s);if(this.installStateChecksum===a)return;let n=this.configuration.get("installStatePath");await ce.mkdirPromise(J.dirname(n),{recursive:!0}),await ce.writeFilePromise(n,await tat(s)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:s=!0}={}){let a=this.configuration.get("installStatePath"),n;try{let c=await rat(await ce.readFilePromise(a));n=WG.default.deserialize(c),this.installStateChecksum=cs(c)}catch{r&&await this.applyLightResolution();return}e&&typeof n.linkersCustomData<"u"&&(this.linkersCustomData=n.linkersCustomData),s&&Object.assign(this,Kd(n,qG.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?Object.assign(this,Kd(n,qG.restoreResolutions)):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new qi}),await this.persistInstallStateFile()}async persist(){let e=(0,HT.default)(4);await Promise.all([this.persistLockfile(),...this.workspaces.map(r=>e(()=>r.persistManifest()))])}async cacheCleanup({cache:e,report:r}){if(this.configuration.get("enableGlobalCache"))return null;let s=new Set([".gitignore"]);if(!_8(e.cwd,this.cwd)||!await ce.existsPromise(e.cwd))return null;let a=[];for(let c of await ce.readdirPromise(e.cwd)){if(s.has(c))continue;let f=J.resolve(e.cwd,c);e.markedFiles.has(f)||(e.immutable?r.reportError(56,`${_t(this.configuration,J.basename(f),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):a.push(ce.lstatPromise(f).then(async p=>(await ce.removePromise(f),p.size))))}if(a.length===0)return null;let n=await Promise.all(a);return{count:a.length,size:n.reduce((c,f)=>c+f,0)}}}});function oat(t){let s=Math.floor(t.timeNow/864e5),a=t.updateInterval*864e5,n=t.state.lastUpdate??t.timeNow+a+Math.floor(a*t.randomInitialInterval),c=n+a,f=t.state.lastTips??s*864e5,p=f+864e5+8*36e5-t.timeZone,h=c<=t.timeNow,E=p<=t.timeNow,w=null;return(h||E||!t.state.lastUpdate||!t.state.lastTips)&&(w={},w.lastUpdate=h?t.timeNow:n,w.lastTips=f,w.blocks=h?{}:t.state.blocks,w.displayedTips=t.state.displayedTips),{nextState:w,triggerUpdate:h,triggerTips:E,nextTips:E?s*864e5:f}}var ZI,gde=Ze(()=>{Dt();mv();I0();uR();Pc();Tp();ZI=class{constructor(e,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.nextTips=0;this.displayedTips=[];this.shouldCommitTips=!1;this.configuration=e;let s=this.getRegistryPath();this.isNew=!ce.existsSync(s),this.shouldShowTips=!1,this.sendReport(r),this.startBuffer()}commitTips(){this.shouldShowTips&&(this.shouldCommitTips=!0)}selectTip(e){let r=new Set(this.displayedTips),s=f=>f&&un?Xf(un,f):!1,a=e.map((f,p)=>p).filter(f=>e[f]&&s(e[f]?.selector));if(a.length===0)return null;let n=a.filter(f=>!r.has(f));if(n.length===0){let f=Math.floor(a.length*.2);this.displayedTips=f>0?this.displayedTips.slice(-f):[],n=a.filter(p=>!r.has(p))}let c=n[Math.floor(Math.random()*n.length)];return this.displayedTips.push(c),this.commitTips(),e[c]}reportVersion(e){this.reportValue("version",e.replace(/-git\..*/,"-git"))}reportCommandName(e){this.reportValue("commandName",e||"<none>")}reportPluginName(e){this.reportValue("pluginName",e)}reportProject(e){this.reportEnumerator("projectCount",e)}reportInstall(e){this.reportHit("installCount",e)}reportPackageExtension(e){this.reportValue("packageExtension",e)}reportWorkspaceCount(e){this.reportValue("workspaceCount",String(e))}reportDependencyCount(e){this.reportValue("dependencyCount",String(e))}reportValue(e,r){bp(this.values,e).add(r)}reportEnumerator(e,r){bp(this.enumerators,e).add(cs(r))}reportHit(e,r="*"){let s=_4(this.hits,e),a=Yl(s,r,()=>0);s.set(r,a+1)}getRegistryPath(){let e=this.configuration.get("globalFolder");return J.join(e,"telemetry.json")}sendReport(e){let r=this.getRegistryPath(),s;try{s=ce.readJsonSync(r)}catch{s={}}let{nextState:a,triggerUpdate:n,triggerTips:c,nextTips:f}=oat({state:s,timeNow:Date.now(),timeZone:new Date().getTimezoneOffset()*60*1e3,randomInitialInterval:Math.random(),updateInterval:this.configuration.get("telemetryInterval")});if(this.nextTips=f,this.displayedTips=s.displayedTips??[],a!==null)try{ce.mkdirSync(J.dirname(r),{recursive:!0}),ce.writeJsonSync(r,a)}catch{return!1}if(c&&this.configuration.get("enableTips")&&(this.shouldShowTips=!0),n){let p=s.blocks??{};if(Object.keys(p).length===0){let h=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`,E=w=>sj(h,w,{configuration:this.configuration}).catch(()=>{});for(let[w,S]of Object.entries(s.blocks??{})){if(Object.keys(S).length===0)continue;let x=S;x
Line truncated
|
|
|
|
|
`),h=c.length;for(h>0&&c.includes("unstyle")&&(c=[...new Set(["unstyle",...c])].reverse());h-- >0;)f=r(t.styles[c[h]],f,p);return f},a=(n,c,f)=>{t.styles[n]=e({name:n,codes:c}),(t.keys[f]||(t.keys[f]=[])).push(n),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(h){t.alias(n,h)},get(){let h=E=>s(E,h.stack);return Reflect.setPrototypeOf(h,t),h.stack=this.stack?this.stack.concat(n):[n],h}})};return a("reset",[0,0],"modifier"),a("bold",[1,22],"modifier"),a("dim",[2,22],"modifier"),a("italic",[3,23],"modifier"),a("underline",[4,24],"modifier"),a("inverse",[7,27],"modifier"),a("hidden",[8,28],"modifier"),a("strikethrough",[9,29],"modifier"),a("black",[30,39],"color"),a("red",[31,39],"color"),a("green",[32,39],"color"),a("yellow",[33,39],"color"),a("blue",[34,39],"color"),a("magenta",[35,39],"color"),a("cyan",[36,39],"color"),a("white",[37,39],"color"),a("gray",[90,39],"color"),a("grey",[90,39],"color"),a("bgBlack",[40,49],"bg"),a("bgRed",[41,49],"bg"),a("bgGreen",[42,49],"bg"),a("bgYellow",[43,49],"bg"),a("bgBlue",[44,49],"bg"),a("bgMagenta",[45,49],"bg"),a("bgCyan",[46,49],"bg"),a("bgWhite",[47,49],"bg"),a("blackBright",[90,39],"bright"),a("redBright",[91,39],"bright"),a("greenBright",[92,39],"bright"),a("yellowBright",[93,39],"bright"),a("blueBright",[94,39],"bright"),a("magentaBright",[95,39],"bright"),a("cyanBright",[96,39],"bright"),a("whiteBright",[97,39],"bright"),a("bgBlackBright",[100,49],"bgBright"),a("bgRedBright",[101,49],"bgBright"),a("bgGreenBright",[102,49],"bgBright"),a("bgYellowBright",[103,49],"bgBright"),a("bgBlueBright",[104,49],"bgBright"),a("bgMagentaBright",[105,49],"bgBright"),a("bgCyanBright",[106,49],"bgBright"),a("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=fat,t.hasColor=t.hasAnsi=n=>(t.ansiRegex.lastIndex=0,typeof n=="string"&&n!==""&&t.ansiRegex.test(n)),t.alias=(n,c)=>{let f=typeof c=="string"?t[c]:c;if(typeof f!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");f.stack||(Reflect.defineProperty(f,"name",{value:n}),t.styles[n]=f,f.stack=[n]),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(p){t.alias(n,p)},get(){let p=h=>s(h,p.stack);return Reflect.setPrototypeOf(p,t),p.stack=this.stack?this.stack.concat(f.stack):f.stack,p}})},t.theme=n=>{if(!uat(n))throw new TypeError("Expected theme to be an object");for(let c of Object.keys(n))t.alias(c,n[c]);return t},t.alias("unstyle",n=>typeof n=="string"&&n!==""?(t.ansiRegex.lastIndex=0,n.replace(t.ansiRegex,"")):""),t.alias("noop",n=>n),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=Cde(),t.define=a,t};KG.exports=wde();KG.exports.create=wde});var Zo=_(pn=>{"use strict";var Aat=Object.prototype.toString,jc=Ju(),Bde=!1,zG=[],vde={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};pn.longest=(t,e)=>t.reduce((r,s)=>Math.max(r,e?s[e].length:s.length),0);pn.hasColor=t=>!!t&&jc.hasColor(t);var WT=pn.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);pn.nativeType=t=>Aat.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"");pn.isAsyncFn=t=>pn.nativeType(t)==="asyncfunction";pn.isPrimitive=t=>t!=null&&typeof t!="object"&&typeof t!="function";pn.resolve=(t,e,...r)=>typeof e=="function"?e.call(t,...r):e;pn.scrollDown=(t=[])=>[...t.slice(1),t[0]];pn.scrollUp=(t=[])=>[t.pop(),...t];pn.reorder=(t=[])=>{let e=t.slice();return e.sort((r,s)=>r.index>s.index?1:r.index<s.index?-1:0),e};pn.swap=(t,e,r)=>{let s=t.length,a=r===s?0:r<0?s-1:r,n=t[e];t[e]=t[a],t[a]=n};pn.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};pn.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[1]),r};pn.wordWrap=(t,e={})=>{if(!t)return t;typeof e=="number"&&(e={width:e});let{indent:r="",newline:s=`
|
|
|
|
|
`+r,width:a=80}=e,n=(s+r).match(/[^\S\n]/g)||[];a-=n.length;let c=`.{1,${a}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,f=t.trim(),p=new RegExp(c,"g"),h=f.match(p)||[];return h=h.map(E=>E.replace(/\n$/,"")),e.padEnd&&(h=h.map(E=>E.padEnd(a," "))),e.padStart&&(h=h.map(E=>E.padStart(a," "))),r+h.join(s)};pn.unmute=t=>{let e=t.stack.find(s=>jc.keys.color.includes(s));return e?jc[e]:t.stack.find(s=>s.slice(2)==="bg")?jc[e.slice(2)]:s=>s};pn.pascal=t=>t?t[0].toUpperCase()+t.slice(1):"";pn.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(s=>jc.keys.color.includes(s));if(e){let s=jc["bg"+pn.pascal(e)];return s?s.black:t}let r=t.stack.find(s=>s.slice(0,2)==="bg");return r?jc[r.slice(2).toLowerCase()]||t:jc.none};pn.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(s=>jc.keys.color.includes(s)),r=t.stack.find(s=>s.slice(0,2)==="bg");if(e&&!r)return jc[vde[e]||e];if(r){let s=r.slice(2).toLowerCase(),a=vde[s];return a&&jc["bg"+pn.pascal(a)]||t}return jc.none};pn.meridiem=t=>{let e=t.getHours(),r=t.getMinutes(),s=e>=12?"pm":"am";e=e%12;let a=e===0?12:e,n=r<10?"0"+r:r;return a+":"+n+" "+s};pn.set=(t={},e="",r)=>e.split(".").reduce((s,a,n,c)=>{let f=c.length-1>n?s[a]||{}:r;return!pn.isObject(f)&&n<c.length-1&&(f={}),s[a]=f},t);pn.get=(t={},e="",r)=>{let s=t[e]==null?e.split(".").reduce((a,n)=>a&&a[n],t):t[e];return s??r};pn.mixin=(t,e)=>{if(!WT(t))return e;if(!WT(e))return t;for(let r of Object.keys(e)){let s=Object.getOwnPropertyDescriptor(e,r);if(s.hasOwnProperty("value"))if(t.hasOwnProperty(r)&&WT(s.value)){let a=Object.getOwnPropertyDescriptor(t,r);WT(a.value)?t[r]=pn.merge({},t[r],e[r]):Reflect.defineProperty(t,r,s)}else Reflect.defineProperty(t,r,s);else Reflect.defineProperty(t,r,s)}return t};pn.merge=(...t)=>{let e={};for(let r of t)pn.mixin(e,r);return e};pn.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let s of Object.keys(r)){let a=r[s];typeof a=="function"?pn.define(t,s,a.bind(e)):pn.define(t,s,a)}};pn.onExit=t=>{let e=(r,s)=>{Bde||(Bde=!0,zG.forEach(a=>a()),r===!0&&process.exit(128+s))};zG.length===0&&(process.once("SIGTERM",e.bind(null,!0,15)),process.once("SIGINT",e.bind(null,!0,2)),process.once("exit",e)),zG.push(t)};pn.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};pn.defineExport=(t,e,r)=>{let s;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(a){s=a},get(){return s?s():r()}})}});var Sde=_(tC=>{"use strict";tC.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"};tC.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};tC.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};tC.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};tC.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 Pde=_((vHt,bde)=>{"use strict";var Dde=Ie("readline"),pat=Sde(),hat=/^(?:\x1b)([a-zA-Z0-9])$/,gat=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,dat={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","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"};function mat(t){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(t)}function yat(t){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(t)}var YT=(t="",e={})=>{let r,s={name:e.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:t,raw:t,...e};if(Buffer.isBuffer(t)?t[0]>127&&t[1]===void 0?(t[0]-=128,t="\x1B"+String(t)):t=String(t):t!==void 0&&typeof t!="string"?t=String(t):t||(t=s.sequence||""),s.sequence=s.sequence||t||s.name,t==="\r")s.raw=void 0,s.name="return";else if(t===`
|
|
|
|
|
`)s.name="enter";else if(t===" ")s.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x1B\x7F"||t==="\x1B\b")s.name="backspace",s.meta=t.charAt(0)==="\x1B";else if(t==="\x1B"||t==="\x1B\x1B")s.name="escape",s.meta=t.length===2;else if(t===" "||t==="\x1B ")s.name="space",s.meta=t.length===2;else if(t<="")s.name=String.fromCharCode(t.charCodeAt(0)+97-1),s.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")s.name="number";else if(t.length===1&&t>="a"&&t<="z")s.name=t;else if(t.length===1&&t>="A"&&t<="Z")s.name=t.toLowerCase(),s.shift=!0;else if(r=hat.exec(t))s.meta=!0,s.shift=/^[A-Z]$/.test(r[1]);else if(r=gat.exec(t)){let a=[...t];a[0]==="\x1B"&&a[1]==="\x1B"&&(s.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),c=(r[3]||r[5]||1)-1;s.ctrl=!!(c&4),s.meta=!!(c&10),s.shift=!!(c&1),s.code=n,s.name=dat[n],s.shift=mat(n)||s.shift,s.ctrl=yat(n)||s.ctrl}return s};YT.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let s=Dde.createInterface({terminal:!0,input:r});Dde.emitKeypressEvents(r,s);let a=(f,p)=>e(f,YT(f,p),s),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",a),s.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener("keypress",a),s.pause(),s.close()}};YT.action=(t,e,r)=>{let s={...pat,...r};return e.ctrl?(e.action=s.ctrl[e.name],e):e.option&&s.option?(e.action=s.option[e.name],e):e.shift?(e.action=s.shift[e.name],e):(e.action=s.keys[e.name],e)};bde.exports=YT});var kde=_((SHt,xde)=>{"use strict";xde.exports=t=>{t.timers=t.timers||{};let e=t.options.timers;if(e)for(let r of Object.keys(e)){let s=e[r];typeof s=="number"&&(s={interval:s}),Eat(t,r,s)}};function Eat(t,e,r={}){let s=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},a=r.interval||120;s.frames=r.frames||[],s.loading=!0;let n=setInterval(()=>{s.ms=Date.now()-s.start,s.tick++,t.render()},a);return s.stop=()=>{s.loading=!1,clearInterval(n)},Reflect.defineProperty(s,"interval",{value:n}),t.once("close",()=>s.stop()),s.stop}});var Rde=_((DHt,Qde)=>{"use strict";var{define:Iat,width:Cat}=Zo(),ZG=class{constructor(e){let r=e.options;Iat(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=Cat(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={...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"}};Qde.exports=ZG});var Fde=_((bHt,Tde)=>{"use strict";var XG=Zo(),ho=Ju(),$G={default:ho.noop,noop:ho.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||XG.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||XG.complement(this.primary)},primary:ho.cyan,success:ho.green,danger:ho.magenta,strong:ho.bold,warning:ho.yellow,muted:ho.dim,disabled:ho.gray,dark:ho.dim.gray,underline:ho.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},set placeholder(t){this._placeholder=t},get placeholder(){return this._placeholder||this.primary.dim},set highlight(t){this._highlight=t},get highlight(){return this._highlight||this.inverse}};$G.merge=(t={})=>{t.styles&&typeof t.styles.enabled=="boolean"&&(ho.enabled=t.styles.enabled),t.styles&&typeof t.styles.visible=="boolean"&&(ho.visible=t.styles.visible);let e=XG.merge({},$G,t.styles);delete e.merge;for(let r of Object.keys(ho))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>ho[r]});for(let r of Object.keys(ho.styles))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>ho[r]});return e};Tde.exports=$G});var Ode=_((PHt,Nde)=>{"use strict";var e5=process.platform==="win32",zp=Ju(),wat=Zo(),t5={...zp.symbols,upDownDoubleArrow:"\u21D5",upDownDoubleArrow2:"\u2B0D",upDownArrow:"\u2195",asterisk:"*",asterism:"\u2042",bulletWhite:"\u25E6",electricArrow:"\u2301",
Line truncated
|
|
|
|
|
`),h=p[0],E=p[p.length-1],S=(s+(r?" "+r:"")).length,x=S<h.length?h.slice(S+1):"";return{header:c,prompt:h,after:x,rest:p.slice(1),last:E}}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(Bm.cursor.down(e.rest.length)),this.write(`
|
|
|
|
|
`.repeat(r))}catch{}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=s5.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:s}=this;if(this.format=()=>e.call(this,this.value),this.result=()=>s.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 a=r.onSubmit.bind(this),n=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await a(this.name,this.value,this),n())}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,s){let{options:a,state:n,symbols:c,timers:f}=this,p=f&&f[e];n.timer=p;let h=a[e]||n[e]||c[e],E=r&&r[e]!=null?r[e]:await h;if(E==="")return E;let w=await this.resolve(E,n,r,s);return!w&&r&&r[e]?this.resolve(h,n,r,s):w}async prefix(){let e=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,s=this.state;return s.timer=r,pl.isObject(e)&&(e=e[s.status]||e.pending),pl.hasColor(e)?e:(this.styles[s.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return pl.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,s=this.state;s.timer=r;let a=e[s.status]||e.pending||s.separator,n=await this.resolve(a,s);return pl.isObject(n)&&(n=n[s.status]||n.pending),pl.hasColor(n)?n:this.styles.muted(n)}async pointer(e,r){let s=await this.element("pointer",e,r);if(typeof s=="string"&&pl.hasColor(s))return s;if(s){let a=this.styles,n=this.index===r,c=n?a.primary:h=>h,f=await this.resolve(s[n?"on":"off"]||s,this.state),p=pl.hasColor(f)?f:c(f);return n?p:" ".repeat(f.length)}}async indicator(e,r){let s=await this.element("indicator",e,r);if(typeof s=="string"&&pl.hasColor(s))return s;if(s){let a=this.styles,n=e.enabled===!0,c=n?a.success:a.dark,f=s[n?"on":"off"]||s;return pl.hasColor(f)?f:c(f)}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 pl.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 pl.resolve(this,e,...r)}get base(){return t.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||pl.height(this.stdout,25)}get width(){return this.options.columns||pl.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,s=[r,e].find(this.isValue.bind(this));return this.isValue(s)?s:this.initial}static get prompt(){return e=>new this(e).run()}};function Qat(t){let e=a=>t[a]===void 0||typeof t[a]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],s=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let a of Object.keys(t.options)){if(r.includes(a)||/^on[A-Z]/.test(a))continue;let n=t.options[a];typeof n=="function"&&e(a)?s.includes(a)||(t[a]=n.bind(t)):typeof t[a]!="function"&&(t[a]=n)}}function Rat(t){typeof t=="number"&&(t=[t,t,t,t]);let e=[].concat(t||[]),r=a=>a%2===0?`
|
|
|
|
|
`:" ",s=[];for(let a=0;a<4;a++){let n=r(a);e[a]?s.push(n.repeat(e[a])):s.push("")}return s}Wde.exports=o5});var Jde=_((QHt,Vde)=>{"use strict";var Tat=Zo(),Yde={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 Yde.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}};Vde.exports=(t,e={})=>{let r=Tat.merge({},Yde,e.roles);return r[t]||r.default}});var qv=_((RHt,Zde)=>{"use strict";var Fat=Ju(),Nat=rC(),Oat=Jde(),VT=Zo(),{reorder:a5,scrollUp:Lat,scrollDown:Mat,isObject:Kde,swap:Uat}=VT,l5=class extends Nat{constructor(e){super(e),this.cursorHide(),this.maxSelected=e.maxSelected||1/0,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:s,suggest:a}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(n=>n.enabled=!1),typeof a!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");Kde(r)&&(r=Object.keys(r)),Array.isArray(r)?(s!=null&&(this.index=this.findIndex(s)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(s!=null&&(r=s),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 s=[],a=0,n=async(c,f)=>{typeof c=="function"&&(c=await c.call(this)),c instanceof Promise&&(c=await c);for(let p=0;p<c.length;p++){let h=c[p]=await this.toChoice(c[p],a++,f);s.push(h),h.choices&&await n(h.choices,h)}return s};return n(e,r).then(c=>(this.state.loadingChoices=!1,c))}async toChoice(e,r,s){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 a=e.value;if(e=Oat(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,VT.define(e,"parent",s),e.level=s?s.level+1:1,e.indent==null&&(e.indent=s?s.indent+" ":e.indent||""),e.path=s?s.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,Fat.unstyle(e.message).length));let c={...e};return e.reset=(f=c.input,p=c.value)=>{for(let h of Object.keys(c))e[h]=c[h];e.input=f,e.value=p},a==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,s){let a=await this.toChoice(e,r,s);return this.choices.push(a),this.index=this.choices.length-1,this.limit=this.choices.length,a}async newItem(e,r,s){let a={name:"New choice name?",editable:!0,newChoice:!0,...e},n=await this.addChoice(a,r,s);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input="",n.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,r){if(this.multiple&&this[r.name])return this[r.name]();this.alert()}focus(e,r){return typeof r!="boolean"&&(r=e.enabled),r&&!e.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=e.index,e.enabled=r&&!this.isDisabled(e),e)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelected<this.choices.length)return this.alert();let e=this.selectable.every(r=>r.enabled);return this.choices.forEach(r=>r.enabled=!e),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(e=>e.enabled=!e.enabled),this.render())}g(e=this.focused){return this.choices.some(r=>!!r.parent)?(this.toggle(e.parent&&!e.choices?e.parent:e),this.render()):this.a()}toggle(e,r){if(!e.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof r!="boolean"&&(r=!e.enabled),e.enabled=r,e.choices&&e.
Line truncated
|
|
|
|
|
`),a;return this.options.choicesHeader&&(a=await this.resolve(this.options.choicesHeader,this.state)),[a,s].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,s="",a=await this.header(),n=await this.prefix(),c=await this.separator(),f=await this.message();this.options.promptLine!==!1&&(s=[n,f,c,""].join(" "),this.state.prompt=s);let p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),w=await this.footer();p&&(s+=p),h&&!s.includes(h)&&(s+=" "+h),e&&!p&&!E.trim()&&this.multiple&&this.emptyError!=null&&(s+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,s,E,w].filter(Boolean).join(`
|
|
|
|
|
`)),this.write(this.margin[2]),this.restore()}};Xde.exports=u5});var eme=_((FHt,$de)=>{"use strict";var Hat=G0(),jat=(t,e)=>{let r=t.toLowerCase();return s=>{let n=s.toLowerCase().indexOf(r),c=e(s.slice(n,n+r.length));return n>=0?s.slice(0,n)+c+s.slice(n+r.length):s}},f5=class extends Hat{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:s}=this.state;return this.input=s.slice(0,r)+e+s.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 s=e.toLowerCase();return r.filter(a=>a.message.toLowerCase().includes(s))}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=jat(this.input,e),s=this.choices;this.choices=s.map(a=>({...a,message:r(a.message)})),await super.render(),this.choices=s}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};$de.exports=f5});var p5=_((NHt,tme)=>{"use strict";var A5=Zo();tme.exports=(t,e={})=>{t.cursorHide();let{input:r="",initial:s="",pos:a,showCursor:n=!0,color:c}=e,f=c||t.styles.placeholder,p=A5.inverse(t.styles.primary),h=T=>p(t.styles.black(T)),E=r,w=" ",S=h(w);if(t.blink&&t.blink.off===!0&&(h=T=>T,S=""),n&&a===0&&s===""&&r==="")return h(w);if(n&&a===0&&(r===s||r===""))return h(s[0])+f(s.slice(1));s=A5.isPrimitive(s)?`${s}`:"",r=A5.isPrimitive(r)?`${r}`:"";let x=s&&s.startsWith(r)&&s!==r,I=x?h(s[r.length]):S;if(a!==r.length&&n===!0&&(E=r.slice(0,a)+h(r[a])+r.slice(a+1),I=""),n===!1&&(I=""),x){let T=t.styles.unstyle(E+I);return E+I+f(s.slice(T.length))}return E+I}});var JT=_((OHt,rme)=>{"use strict";var Gat=Ju(),qat=G0(),Wat=p5(),h5=class extends qat{constructor(e){super({...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:s,input:a}=r;return r.value=r.input=a.slice(0,s)+e+a.slice(s),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:s}=e;return e.value=e.input=s.slice(0,r-1)+s.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:s}=e;if(s[r]===void 0)return this.alert();let a=`${s}`.slice(0,r)+`${s}`.slice(r+1);return e.value=e.input=a,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:s}=e;return r&&r.startsWith(s)&&s!==r?(e.value=e.input=r,e.cursor=e.value.length,this.render()):super.next()}prev(){let e=this.focused;return e?e.cursor===0?super.prev():(e.value=e.input="",e.cursor=0,this.render()):this.alert()}separator(){return""}format(e){return this.state.submitted?"":super.format(e)}pointer(){return""}indicator(e){return e.input?"\u29BF":"\u2299"}async choiceSeparator(e,r){let s=await this.resolve(e.separator,this.state,e,r)||":";return s?" "+this.styles.disabled(s):""}async renderChoice(e,r){await this.onChoice(e,r);let{state:s,styles:a}=this,{cursor:n,initial:c="",name:f,hint:p,input:h=""}=e,{muted:E,submitted:w,primary:S,danger:x}=a,I=p,T=this.index===r,N=e.validate||(()=>!0),U=await this.choiceSeparator(e,r),W=e.message;this.align==="right"&&(W=W.padStart(this.longest+1," ")),this.align==="left"&&(W=W.padEnd(this.longest+1," "));let ee=this.values[f]=h||c,ie=h?"success":"dark";await N.call(e,ee,thi
Line truncated
|
|
|
|
|
`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};lme.exports=d5});var ume=_((_Ht,cme)=>{"use strict";var $at=KT(),m5=class extends $at{constructor(e){super(e),this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};cme.exports=m5});var Ame=_((HHt,fme)=>{"use strict";var elt=G0(),tlt=JT(),nC=tlt.prototype,y5=class extends elt{constructor(e){super({...e,multiple:!0}),this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(e,r){let s=this.focused,a=s.parent||{};return!s.editable&&!a.editable&&(e==="a"||e==="i")?super[e]():nC.dispatch.call(this,e,r)}append(e,r){return nC.append.call(this,e,r)}delete(e,r){return nC.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?nC.next.call(this):super.next()}prev(){return this.focused.editable?nC.prev.call(this):super.prev()}async indicator(e,r){let s=e.indicator||"",a=e.editable?s:super.indicator(e,r);return await this.resolve(a,this.state,e,r)||""}indent(e){return e.role==="heading"?"":e.editable?" ":" "}async renderChoice(e,r){return e.indent="",e.editable?nC.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 s=r.parent?this.value[r.parent.name]:this.value;if(r.editable?s=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(s=r.enabled===!0),e=await r.validate(s,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)}};fme.exports=y5});var vm=_((jHt,pme)=>{"use strict";var rlt=rC(),nlt=p5(),{isPrimitive:ilt}=Zo(),E5=class extends rlt{constructor(e){super(e),this.initial=ilt(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let s=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!s||s.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:s}=this.state;this.input=`${s}`.slice(0,r)+e+`${s}`.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),s=this.input.slice(e),a=r.split(" ");this.state.clipboard.push(a.pop()),this.input=a.join(" "),this.cursor=this.input.length,this.input+=s,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):nlt(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),s=await this.separator(),a=await this.message(),n=[r,a,s].filter(Boolean).join(" ");this.state.prompt=n;let c=await this.header(),f=await this.format(),p=await this.error()||await this.hint(),h=await this.footer();p&&!f.includes(p)&&(f+=" "+p),n+=" "+f,this.clear(e),this.write([c,n,h].filter(Boolean).join(`
|
|
|
|
|
`)),this.restore()}};pme.exports=E5});var gme=_((GHt,hme)=>{"use strict";var slt=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),zT=t=>slt(t).filter(Boolean);hme.exports=(t,e={},r="")=>{let{past:s=[],present:a=""}=e,n,c;switch(t){case"prev":case"undo":return n=s.slice(0,s.length-1),c=s[s.length-1]||"",{past:zT([r,...n]),present:c};case"next":case"redo":return n=s.slice(1),c=s[0]||"",{past:zT([...n,r]),present:c};case"save":return{past:zT([...s,r]),present:""};case"remove":return c=zT(s.filter(f=>f!==r)),a="",c.length&&(a=c.pop()),{past:c,present:a};default:throw new Error(`Invalid action: "${t}"`)}}});var C5=_((qHt,mme)=>{"use strict";var olt=vm(),dme=gme(),I5=class extends olt{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let s=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:s},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=dme(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=dme("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};mme.exports=I5});var Eme=_((WHt,yme)=>{"use strict";var alt=vm(),w5=class extends alt{format(){return""}};yme.exports=w5});var Cme=_((YHt,Ime)=>{"use strict";var llt=vm(),B5=class extends llt{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()}};Ime.exports=B5});var Bme=_((VHt,wme)=>{"use strict";var clt=G0(),v5=class extends clt{constructor(e){super({...e,multiple:!0})}};wme.exports=v5});var D5=_((JHt,vme)=>{"use strict";var ult=vm(),S5=class extends ult{constructor(e={}){super({style:"number",...e}),this.min=this.isValue(e.min)?this.toNumber(e.min):-1/0,this.max=this.isValue(e.max)?this.toNumber(e.max):1/0,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,s=this.toNumber(this.input);return s>this.max+r?this.alert():(this.input=`${s+r}`,this.render())}down(e){let r=e||this.minor,s=this.toNumber(this.input);return s<this.min-r?this.alert():(this.input=`${s-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()}};vme.exports=S5});var Dme=_((KHt,Sme)=>{Sme.exports=D5()});var Pme=_((zHt,bme)=>{"use strict";var flt=vm(),b5=class extends flt{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)):""}};bme.exports=b5});var Qme=_((ZHt,kme)=>{"use strict";var Alt=Ju(),plt=qv(),xme=Zo(),P5=class extends plt{constructor(e={}){super(e),this.widths=[].concat(e.messageWidth||50),this.align=[].concat(e.align||"left"),this.linebreak=e.linebreak||!1,this.edgeLength=e.edgeLength||3,this.newline=e.newline||`
|
|
|
|
|
`;let r=e.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((s,a)=>({name:a+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 s=0;s<this.scale.length;s++)r.scale.push({index:s})}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,s){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(){return this.scaleKey===!1||this.state.submitted?"":["",...this.scale.map(s=>` ${s.name} - ${s.message}`)].map(s=>this.styles.muted(s)).join(`
|
|
|
|
|
`)}renderScaleHeading(e){let r=this.scale.map(p=>p.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let s=this.scaleLength-r.join("").length,a=Math.round(s/(r.length-1)),c=r.map(p=>this.styles.strong(p)).join(" ".repeat(a)),f=" ".repeat(this.widths[0]);return this.margin[3]+f+this.margin[1]+c}scaleIndicator(e,r,s){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,s);let a=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):a?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let s=e.scale.map(n=>this.scaleIndicator(e,n,r)),a=this.term==="Hyper"?"":" ";return s.join(a+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let s=this.index===r,a=await this.pointer(e,r),n=await e.hint;n&&!xme.hasColor(n)&&(n=this.styles.muted(n));let c=I=>this.margin[3]+I.replace(/\s+$/,"").padEnd(this.widths[0]," "),f=this.newline,p=this.indent(e),h=await this.resolve(e.message,this.state,e,r),E=await this.renderScale(e,r),w=this.margin[1]+this.margin[3];this.scaleLength=Alt.unstyle(E).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-w.length);let x=xme.wordWrap(h,{width:this.widths[0],newline:f}).split(`
|
|
|
|
|
`).map(I=>c(I)+this.margin[1]);return s&&(E=this.styles.info(E),x=x.map(I=>this.styles.info(I))),x[0]+=E,this.linebreak&&x.push(""),[p+a,x.join(`
|
|
|
|
|
`)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(a,n)=>await this.renderChoice(a,n)),r=await Promise.all(e),s=await this.renderScaleHeading();return this.margin[0]+[s,...r.map(a=>a.join(" "))].join(`
|
|
|
|
|
`)}async render(){let{submitted:e,size:r}=this.state,s=await this.prefix(),a=await this.separator(),n=await this.message(),c="";this.options.promptLine!==!1&&(c=[s,n,a,""].join(" "),this.state.prompt=c);let f=await this.header(),p=await this.format(),h=await this.renderScaleKey(),E=await this.error()||await this.hint(),w=await this.renderChoices(),S=await this.footer(),x=this.emptyError;p&&(c+=p),E&&!c.includes(E)&&(c+=" "+E),e&&!p&&!w.trim()&&this.multiple&&x!=null&&(c+=this.styles.danger(x)),this.clear(r),this.write([f,c,h,w,S].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)}};kme.exports=P5});var Fme=_((XHt,Tme)=>{"use strict";var Rme=Ju(),hlt=(t="")=>typeof t=="string"?t.replace(/^['"]|['"]$/g,""):"",k5=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=hlt(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}},glt=async(t={},e={},r=s=>s)=>{let s=new Set,a=t.fields||[],n=t.template,c=[],f=[],p=[],h=1;typeof n=="function"&&(n=await n());let E=-1,w=()=>n[++E],S=()=>n[E+1],x=I=>{I.line=h,c.push(I)};for(x({type:"bos",value:""});E<n.length-1;){let I=w();if(/^[^\S\n ]$/.test(I)){x({type:"text",value:I});continue}if(I===`
|
|
|
|
|
`){x({type:"newline",value:I}),h++;continue}if(I==="\\"){I+=w(),x({type:"text",value:I});continue}if((I==="$"||I==="#"||I==="{")&&S()==="{"){let N=w();I+=N;let U={type:"template",open:I,inner:"",close:"",value:I},W;for(;W=w();){if(W==="}"){S()==="}"&&(W+=w()),U.value+=W,U.close=W;break}W===":"?(U.initial="",U.key=U.inner):U.initial!==void 0&&(U.initial+=W),U.value+=W,U.inner+=W}U.template=U.open+(U.initial||U.inner)+U.close,U.key=U.key||U.inner,e.hasOwnProperty(U.key)&&(U.initial=e[U.key]),U=r(U),x(U),p.push(U.key),s.add(U.key);let ee=f.find(ie=>ie.name===U.key);U.field=a.find(ie=>ie.name===U.key),ee||(ee=new k5(U),f.push(ee)),ee.lines.push(U.line-1);continue}let T=c[c.length-1];T.type==="text"&&T.line===h?T.value+=I:x({type:"text",value:I})}return x({type:"eos",value:""}),{input:n,tabstops:c,unique:s,keys:p,items:f}};Tme.exports=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),s={...e.values,...e.initial},{tabstops:a,items:n,keys:c}=await glt(e,s),f=x5("result",t,e),p=x5("format",t,e),h=x5("validate",t,e,!0),E=t.isValue.bind(t);return async(w={},S=!1)=>{let x=0;w.required=r,w.items=n,w.keys=c,w.output="";let I=async(W,ee,ie,ue)=>{let le=await h(W,ee,ie,ue);return le===!1?"Invalid field "+ie.name:le};for(let W of a){let ee=W.value,ie=W.key;if(W.type!=="template"){ee&&(w.output+=ee);continue}if(W.type==="template"){let ue=n.find(Ce=>Ce.name===ie);e.required===!0&&w.required.add(ue.name);let le=[ue.input,w.values[ue.value],ue.value,ee].find(E),pe=(ue.field||{}).message||W.inner;if(S){let Ce=await I(w.values[ie],w,ue,x);if(Ce&&typeof Ce=="string"||Ce===!1){w.invalid.set(ie,Ce);continue}w.invalid.delete(ie);let g=await f(w.values[ie],w,ue,x);w.output+=Rme.unstyle(g);continue}ue.placeholder=!1;let Be=ee;ee=await p(ee,w,ue,x),le!==ee?(w.values[ie]=le,ee=t.styles.typing(le),w.missing.delete(pe)):(w.values[ie]=void 0,le=`<${pe}>`,ee=t.styles.primary(le),ue.placeholder=!0,w.required.has(ie)&&w.missing.add(pe)),w.missing.has(pe)&&w.validating&&(ee=t.styles.warning(le)),w.invalid.has(ie)&&w.validating&&(ee=t.styles.danger(le)),x===w.index&&(Be!==ee?ee=t.styles.underline(ee):ee=t.styles.heading(Rme.unstyle(ee))),x++}ee&&(w.output+=ee)}let T=w.output.split(`
|
|
|
|
|
`).map(W=>" "+W),N=n.length,U=0;for(let W of n)w.invalid.has(W.name)&&W.lines.forEach(ee=>{T[ee][0]===" "&&(T[ee]=w.styles.danger(w.symbols.bullet)+T[ee].slice(1))}),t.isValue(w.values[W.name])&&U++;return w.completed=(U/N*100).toFixed(0),w.output=T.join(`
|
|
|
|
|
`),w.output}};function x5(t,e,r,s){return(a,n,c,f)=>typeof c.field[t]=="function"?c.field[t].call(e,a,n,c,f):[s,a].find(p=>e.isValue(p))}});var Ome=_(($Ht,Nme)=>{"use strict";var dlt=Ju(),mlt=Fme(),ylt=rC(),Q5=class extends ylt{constructor(e){super(e),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await mlt(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 s=this.getItem(),a=s.input.slice(0,this.cursor),n=s.input.slice(this.cursor);this.input=s.input=`${a}${e}${n}`,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),s=e.input.slice(0,this.cursor-1);this.input=e.input=`${s}${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:s,size:a}=this.state,n=[this.options.newline,`
|
|
|
|
|
`].find(W=>W!=null),c=await this.prefix(),f=await this.separator(),p=await this.message(),h=[c,p,f].filter(Boolean).join(" ");this.state.prompt=h;let E=await this.header(),w=await this.error()||"",S=await this.hint()||"",x=s?"":await this.interpolate(this.state),I=this.state.key=r[e]||"",T=await this.format(I),N=await this.footer();T&&(h+=" "+T),S&&!T&&this.state.completed===0&&(h+=" "+S),this.clear(a);let U=[E,h,x,N,w.trim()];this.write(U.filter(Boolean).join(n)),this.restore()}getItem(e){let{items:r,keys:s,index:a}=this.state,n=r.find(c=>c.name===s[a]);return n&&n.input!=null&&(this.input=n.input,this.cursor=n.cursor),n}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:r,output:s,values:a}=this.state;if(e.size){let f="";for(let[p,h]of e)f+=`Invalid ${p}: ${h}
|
|
|
|
|
`;return this.state.error=f,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let c=dlt.unstyle(s).split(`
|
|
|
|
|
`).map(f=>f.slice(1)).join(`
|
|
|
|
|
`);return this.value={values:a,result:c},super.submit()}};Nme.exports=Q5});var Mme=_((ejt,Lme)=>{"use strict";var Elt="(Use <shift>+<up/down> to sort)",Ilt=G0(),R5=class extends Ilt{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,Elt].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,r){let s=await super.renderChoice(e,r),a=this.symbols.identicalTo+" ",n=this.index===r&&this.sorting?this.styles.muted(a):" ";return this.options.drag===!1&&(n=""),this.options.numbered===!0?n+`${r+1} - `+s:n+s}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};Lme.exports=R5});var _me=_((tjt,Ume)=>{"use strict";var Clt=qv(),T5=class extends Clt{constructor(e={}){if(super(e),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(s=>this.styles.muted(s)),this.state.header=r.join(`
|
|
|
|
|
`)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let s of r)s.scale=wlt(5,this.options),s.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],s=r.selected;return e.scale.forEach(a=>a.selected=!1),r.selected=!s,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 s=this.index===r,a=this.term==="Hyper",n=a?9:8,c=a?"":" ",f=this.symbols.line.repeat(n),p=" ".repeat(n+(a?0:1)),h=ee=>(ee?this.styles.success("\u25C9"):"\u25EF")+c,E=r+1+".",w=s?this.styles.heading:this.styles.noop,S=await this.resolve(e.message,this.state,e,r),x=this.indent(e),I=x+e.scale.map((ee,ie)=>h(ie===e.scaleIdx)).join(f),T=ee=>ee===e.scaleIdx?w(ee):ee,N=x+e.scale.map((ee,ie)=>T(ie)).join(p),U=()=>[E,S].filter(Boolean).join(" "),W=()=>[U(),I,N," "].filter(Boolean).join(`
|
|
|
|
|
`);return s&&(I=this.styles.cyan(I),N=this.styles.cyan(N)),W()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(s,a)=>await this.renderChoice(s,a)),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,s=await this.prefix(),a=await this.separator(),n=await this.message(),c=[s,n,a].filter(Boolean).join(" ");this.state.prompt=c;let f=await this.header(),p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),w=await this.footer();(p||!h)&&(c+=" "+p),h&&!c.includes(h)&&(c+=" "+h),e&&!p&&!E&&this.multiple&&this.type!=="form"&&(c+=this.styles.danger(this.emptyError)),this.clear(r),this.write([c,f,E,w].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 wlt(t,e={}){if(Array.isArray(e.scale))return e.scale.map(s=>({...s}));let r=[];for(let s=1;s<t+1;s++)r.push({i:s,selected:!1});return r}Ume.exports=T5});var jme=_((rjt,Hme)=>{Hme.exports=C5()});var qme=_((njt,Gme)=>{"use strict";var Blt=KT(),F5=class extends Blt{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=s=>this.styles.primary.underline(s);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(),s=await this.prefix(),a=await this.separator(),n=await this.message(),c=await this.format(),f=await this.error()||await this.hint(),p=await this.footer(),h=[s,n,a,c].join(" ");this.state.prompt=h,f&&!h.includes(f)&&(h+=" "+f),this.clear(e),this.write([r,h,p].filter(Boolean).join(`
|
|
|
|
|
`)),this.write(this.margin[2]),this.restore()}};Gme.exports=F5});var Yme=_((ijt,Wme)=>{"use strict";var vlt=G0(),N5=class extends vlt{constructor(e){if(super(e),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 s=await super.toChoices(e,r);if(s.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>s.length)throw new Error("Please specify the index of the correct answer from the list of choices");return s}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)}}};Wme.exports=N5});var Jme=_(O5=>{"use strict";var Vme=Zo(),ks=(t,e)=>{Vme.defineExport(O5,t,e),Vme.defineExport(O5,t.toLowerCase(),e)};ks("AutoComplete",()=>eme());ks("BasicAuth",()=>ame());ks("Confirm",()=>ume());ks("Editable",()=>Ame());ks("Form",()=>JT());ks("Input",()=>C5());ks("Invisible",()=>Eme());ks("List",()=>Cme());ks("MultiSelect",()=>Bme());ks("Numeral",()=>Dme());ks("Password",()=>Pme());ks("Scale",()=>Qme());ks("Select",()=>G0());ks("Snippet",()=>Ome());ks("Sort",()=>Mme());ks("Survey",()=>_me());ks("Text",()=>jme());ks("Toggle",()=>qme());ks("Quiz",()=>Yme())});var zme=_((ojt,Kme)=>{Kme.exports={ArrayPrompt:qv(),AuthPrompt:g5(),BooleanPrompt:KT(),NumberPrompt:D5(),StringPrompt:vm()}});var Yv=_((ajt,Xme)=>{"use strict";var Zme=Ie("assert"),M5=Ie("events"),q0=Zo(),zu=class extends M5{constructor(e,r){super(),this.options=q0.merge({},e),this.answers={...r}}register(e,r){if(q0.isObject(e)){for(let a of Object.keys(e))this.register(a,e[a]);return this}Zme.equal(typeof r,"function","expected a function");let s=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[s]=r:this.prompts[s]=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(q0.merge({},this.options,r))}catch(s){return Promise.reject(s)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let r=q0.merge({},this.options,e),{type:s,name:a}=e,{set:n,get:c}=q0;if(typeof s=="function"&&(s=await s.call(this,e,this.answers)),!s)return this.answers[a];Zme(this.prompts[s],`Prompt "${s}" is not registered`);let f=new this.prompts[s](r),p=c(this.answers,a);f.state.answers=this.answers,f.enquirer=this,a&&f.on("submit",E=>{this.emit("answer",a,E,f),n(this.answers,a,E)});let h=f.emit.bind(f);return f.emit=(...E)=>(this.emit.call(this,...E),h(...E)),this.emit("prompt",f,this),r.autofill&&p!=null?(f.value=f.input=p,r.autofill==="show"&&await f.submit()):p=f.value=await f.run(),p}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||rC()}static get prompts(){return Jme()}static get types(){return zme()}static get prompt(){let e=(r,...s)=>{let a=new this(...s),n=a.emit.bind(a);return a.emit=(...c)=>(e.emit(...c),n(...c)),a.prompt(r)};return q0.mixinEmitter(e,new M5),e}};q0.mixinEmitter(zu,new M5);var L5=zu.prompts;for(let t of Object.keys(L5)){let e=t.toLowerCase(),r=s=>new L5[t](s).run();zu.prompt[e]=r,zu[e]=r,zu[t]||Reflect.defineProperty(zu,t,{get:()=>L5[t]})}var Wv=t=>{q0.defineExport(zu,t,()=>zu.types[t])};Wv("ArrayPrompt");Wv("AuthPrompt");Wv("BooleanPrompt");Wv("NumberPrompt");Wv("StringPrompt");Xme.exports=zu});var oye=_((k6t,Tlt)=>{Tlt.exports={name:"@yarnpkg/cli",version:"4.9.4",license:"BSD-2-Clause",main:"./sources/index.ts",exports:{".":"./sources/index.ts","./polyfills":"./sources/polyfills.ts","./package.json":"./package.json"},dependencies:{"@yarnpkg/core":"workspace:^","@yarnpkg/fslib":"workspace:^","@yarnpkg/libzip":"workspace:^","@yarnpkg/parsers":"workspace:^","@yarnpkg/plugin-compat":"workspace:^","@yarnpkg/plugin-constraints":"workspace:^","@yarnpkg/plugin-dlx":"workspace:^","@yarnpkg/plugin-essentials":"workspace:^","@yarnpkg/plugin-exec":"workspace:^","@yarnpkg/plugin-file":"workspace:^","@yarnpkg/plugin-git":"workspace:^","@yarnpkg/plugin-github":"workspace:^","@yarnpkg/plugin-http":"workspace:^","@yarnpkg/plugin-init":"workspace:^","@yarnpkg/plugin-interactive-tools":"workspace:^","@yarnpkg/plugin-jsr":"workspace:^","@yarnpkg/plugin-link":"workspace:^","@yarnpkg/plugin-nm":"workspace:^","@yarnpkg/plugin-npm":"workspace:^","@yarnpkg/plugin-npm-cli":"workspace:^","@yarnpkg/plugin-pack":"workspace:^","@yarnpkg/plugin-patch":"workspace:^","@yarnpkg/plugin-pnp":"workspace:^","@yarnpkg/plugin-pnpm":"workspace:^","@yarnpkg/plugin-stage":"workspace:^","@yarnpkg/plugin-typescript":"workspace:^","@yarnpkg/plugin-version":"workspace:^","@yarnpkg/plugin-workspace-tools":"workspace:^","@yarnpkg/shell":"workspace:^","ci-info":"^4.0.0",clipanion:"^4.0.
Line truncated
|
|
|
|
|
${W} at ${ee}`:`
|
|
|
|
|
${W}`}).join("");h.push({text:`Conflict detected in constraint targeting ${he.pretty(t.configuration,x,he.Type.CODE)}; conflicting values are:${T}`,fixable:!1})}else{let[[T]]=I,N=va(S,x);if(JSON.stringify(N)===JSON.stringify(T))continue;if(!s){let U=typeof N>"u"?`Missing field ${he.pretty(t.configuration,x,he.Type.CODE)}; expected ${he.pretty(t.configuration,T,he.Type.INSPECT)}`:typeof T>"u"?`Extraneous field ${he.pretty(t.configuration,x,he.Type.CODE)} currently set to ${he.pretty(t.configuration,N,he.Type.INSPECT)}`:`Invalid field ${he.pretty(t.configuration,x,he.Type.CODE)}; expected ${he.pretty(t.configuration,T,he.Type.INSPECT)}, found ${he.pretty(t.configuration,N,he.Type.INSPECT)}`;h.push({text:U,fixable:!0});continue}typeof T>"u"?A0(S,x):Jd(S,x,T),E=!0}E&&a.set(w,S)}h.length>0&&n.set(w,h)}return{changedWorkspaces:a,remainingErrors:n}}function Wye(t,{configuration:e}){let r={children:[]};for(let[s,a]of t){let n=[];for(let f of a){let p=f.text.split(/\n/);f.fixable&&(p[0]=`${he.pretty(e,"\u2699","gray")} ${p[0]}`),n.push({value:he.tuple(he.Type.NO_HINT,p[0]),children:p.slice(1).map(h=>({value:he.tuple(he.Type.NO_HINT,h)}))})}let c={value:he.tuple(he.Type.LOCATOR,s.anchoredLocator),children:je.sortMap(n,f=>f.value[1])};r.children.push(c)}return r.children=je.sortMap(r.children,s=>s.value[1]),r}var qC,vct,Sct,Dct,nS=Ze(()=>{Ve();ql();qC=class{constructor(e){this.indexedFields=e;this.items=[];this.indexes={};this.clear()}clear(){this.items=[];for(let e of this.indexedFields)this.indexes[e]=new Map}insert(e){this.items.push(e);for(let r of this.indexedFields){let s=Object.hasOwn(e,r)?e[r]:void 0;if(typeof s>"u")continue;je.getArrayWithDefault(this.indexes[r],s).push(e)}return e}find(e){if(typeof e>"u")return this.items;let r=Object.entries(e);if(r.length===0)return this.items;let s=[],a;for(let[c,f]of r){let p=c,h=Object.hasOwn(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>"u"){s.push([p,f]);continue}let E=new Set(h.get(f)??[]);if(E.size===0)return[];if(typeof a>"u")a=E;else for(let w of a)E.has(w)||a.delete(w);if(a.size===0)break}let n=[...a??[]];return s.length>0&&(n=n.filter(c=>{for(let[f,p]of s)if(!(typeof p<"u"?Object.hasOwn(c,f)&&c[f]===p:Object.hasOwn(c,f)===!1))return!1;return!0})),n}},vct=/^[0-9]+$/,Sct=/^[a-zA-Z0-9_]+$/,Dct=new Set(["scripts",...Ht.allDependencies])});var Yye=_((iYt,gq)=>{var xct;(function(t){var e=function(){return{"append/2":[new t.type.Rule(new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("L")]),new t.type.Term("foldl",[new t.type.Term("append",[]),new t.type.Var("X"),new t.type.Term("[]",[]),new t.type.Var("L")]))],"append/3":[new t.type.Rule(new t.type.Term("append",[new t.type.Term("[]",[]),new t.type.Var("X"),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("append",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("S")])]),new t.type.Term("append",[new t.type.Var("T"),new t.type.Var("X"),new t.type.Var("S")]))],"member/2":[new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("_")])]),null),new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("_"),new t.type.Var("Xs")])]),new t.type.Term("member",[new t.type.Var("X"),new t.type.Var("Xs")]))],"permutation/2":[new t.type.Rule(new t.type.Term("permutation",[new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("permutation",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("permutation",[new t.type.Var("T"),new t.type.Var("P")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("P")]),new t.type.Term("append",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("Y")]),new t.type.Var("S")])])]))],"maplist/2":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("X")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("Xs")])]))],"maplist/3":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs")])]))],"maplist/4":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Ter
Line truncated
|
|
|
|
|
`+p:"")),c.error.method="_execFileSync",c.error.program=a,c.error.args=n,c.error.extMessage=p,c.error.exitCode=+f),si.unlinkSync(h),si.unlinkSync(E),si.unlinkSync(w),si.unlinkSync(S),c}function Tct(t){var e,r={},s,a={env:process.env,encoding:t.encoding};if(Y0||(bm?process.env.PSModulePath?(Y0="powershell.exe",nF=["-ExecutionPolicy","Bypass","-File",__dirname+"\\read.ps1"]):(Y0="cscript.exe",nF=["//nologo",__dirname+"\\read.cs.js"]):(Y0="/bin/sh",nF=[__dirname+"/read.sh"])),bm&&!process.env.PSModulePath&&(a.stdio=[process.stdin]),yq.execFileSync){e=Zye(t),iS&&iS("execFileSync",e);try{r.input=yq.execFileSync(Y0,e,a)}catch(n){s=n.stderr?(n.stderr+"").trim():"",r.error=new Error(Kye+(s?`
|
|
|
|
|
`+s:"")),r.error.method="execFileSync",r.error.program=Y0,r.error.args=e,r.error.extMessage=s,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=Rct(t,a);return r.error||(r.input=r.input.replace(/^\s*'|'\s*$/g,""),t.display=""),r}function Cq(t){var e="",r=t.display,s=!t.display&&t.keyIn&&t.hideEchoBack&&!t.mask;function a(){var n=Tct(t);if(n.error)throw n.error;return n.input}return Iq&&Iq(t),function(){var n,c,f;function p(){return n||(n=process.binding("fs"),c=process.binding("constants")),n}if(typeof Zp=="string")if(Zp=null,bm){if(f=function(h){var E=h.replace(/^\D+/,"").split("."),w=0;return(E[0]=+E[0])&&(w+=E[0]*1e4),(E[1]=+E[1])&&(w+=E[1]*100),(E[2]=+E[2])&&(w+=E[2]),w}(process.version),!(f>=20302&&f<40204||f>=5e4&&f<50100||f>=50600&&f<60200)&&process.stdin.isTTY)process.stdin.pause(),Zp=process.stdin.fd,YC=process.stdin._handle;else try{Zp=p().open("CONIN$",c.O_RDWR,parseInt("0666",8)),YC=new Vye(Zp,!0)}catch{}if(process.stdout.isTTY)Xu=process.stdout.fd;else{try{Xu=si.openSync("\\\\.\\CON","w")}catch{}if(typeof Xu!="number")try{Xu=p().open("CONOUT$",c.O_RDWR,parseInt("0666",8))}catch{}}}else{if(process.stdin.isTTY){process.stdin.pause();try{Zp=si.openSync("/dev/tty","r"),YC=process.stdin._handle}catch{}}else try{Zp=si.openSync("/dev/tty","r"),YC=new Vye(Zp,!1)}catch{}if(process.stdout.isTTY)Xu=process.stdout.fd;else try{Xu=si.openSync("/dev/tty","w")}catch{}}}(),function(){var n,c,f=!t.hideEchoBack&&!t.keyIn,p,h,E,w,S;iF="";function x(I){return I===Jye?!0:YC.setRawMode(I)!==0?!1:(Jye=I,!0)}if(zye||!YC||typeof Xu!="number"&&(t.display||!f)){e=a();return}if(t.display&&(si.writeSync(Xu,t.display),t.display=""),!t.displayOnly){if(!x(!f)){e=a();return}for(h=t.keyIn?1:t.bufferSize,p=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(h):new Buffer(h),t.keyIn&&t.limit&&(c=new RegExp("[^"+t.limit+"]","g"+(t.caseSensitive?"":"i")));;){E=0;try{E=si.readSync(Zp,p,0,h)}catch(I){if(I.code!=="EOF"){x(!1),e+=a();return}}if(E>0?(w=p.toString(t.encoding,0,E),iF+=w):(w=`
|
|
|
|
|
`,iF+="\0"),w&&typeof(S=(w.match(/^(.*?)[\r\n]/)||[])[1])=="string"&&(w=S,n=!0),w&&(w=w.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"")),w&&c&&(w=w.replace(c,"")),w&&(f||(t.hideEchoBack?t.mask&&si.writeSync(Xu,new Array(w.length+1).join(t.mask)):si.writeSync(Xu,w)),e+=w),!t.keyIn&&n||t.keyIn&&e.length>=h)break}!f&&!s&&si.writeSync(Xu,`
|
|
|
|
|
`),x(!1)}}(),t.print&&!s&&t.print(r+(t.displayOnly?"":(t.hideEchoBack?new Array(e.length+1).join(t.mask):e)+`
|
|
|
|
|
`),t.encoding),t.displayOnly?"":vq=t.keepWhitespace||t.keyIn?e:e.trim()}function Fct(t,e){var r=[];function s(a){a!=null&&(Array.isArray(a)?a.forEach(s):(!e||e(a))&&r.push(a))}return s(t),r}function Sq(t){return t.replace(/[\x00-\x7f]/g,function(e){return"\\x"+("00"+e.charCodeAt().toString(16)).substr(-2)})}function Vs(){var t=Array.prototype.slice.call(arguments),e,r;return t.length&&typeof t[0]=="boolean"&&(r=t.shift(),r&&(e=Object.keys(Eq),t.unshift(Eq))),t.reduce(function(s,a){return a==null||(a.hasOwnProperty("noEchoBack")&&!a.hasOwnProperty("hideEchoBack")&&(a.hideEchoBack=a.noEchoBack,delete a.noEchoBack),a.hasOwnProperty("noTrim")&&!a.hasOwnProperty("keepWhitespace")&&(a.keepWhitespace=a.noTrim,delete a.noTrim),r||(e=Object.keys(a)),e.forEach(function(n){var c;if(a.hasOwnProperty(n))switch(c=a[n],n){case"mask":case"limitMessage":case"defaultInput":case"encoding":c=c!=null?c+"":"",c&&n!=="limitMessage"&&(c=c.replace(/[\r\n]/g,"")),s[n]=c;break;case"bufferSize":!isNaN(c=parseInt(c,10))&&typeof c=="number"&&(s[n]=c);break;case"displayOnly":case"keyIn":case"hideEchoBack":case"caseSensitive":case"keepWhitespace":case"history":case"cd":s[n]=!!c;break;case"limit":case"trueValue":case"falseValue":s[n]=Fct(c,function(f){var p=typeof f;return p==="string"||p==="number"||p==="function"||f instanceof RegExp}).map(function(f){return typeof f=="string"?f.replace(/[\r\n]/g,""):f});break;case"print":case"phContent":case"preCheck":s[n]=typeof c=="function"?c:void 0;break;case"prompt":case"display":s[n]=c??"";break}})),s},{})}function wq(t,e,r){return e.some(function(s){var a=typeof s;return a==="string"?r?t===s:t.toLowerCase()===s.toLowerCase():a==="number"?parseFloat(t)===s:a==="function"?s(t):s instanceof RegExp?s.test(t):!1})}function Dq(t,e){var r=V0.normalize(bm?(process.env.HOMEDRIVE||"")+(process.env.HOMEPATH||""):process.env.HOME||"").replace(/[\/\\]+$/,"");return t=V0.normalize(t),e?t.replace(/^~(?=\/|\\|$)/,r):t.replace(new RegExp("^"+Sq(r)+"(?=\\/|\\\\|$)",bm?"i":""),"~")}function VC(t,e){var r="(?:\\(([\\s\\S]*?)\\))?(\\w+|.-.)(?:\\(([\\s\\S]*?)\\))?",s=new RegExp("(\\$)?(\\$<"+r+">)","g"),a=new RegExp("(\\$)?(\\$\\{"+r+"\\})","g");function n(c,f,p,h,E,w){var S;return f||typeof(S=e(E))!="string"?p:S?(h||"")+S+(w||""):""}return t.replace(s,n).replace(a,n)}function Xye(t,e,r){var s,a=[],n=-1,c=0,f="",p;function h(E,w){return w.length>3?(E.push(w[0]+"..."+w[w.length-1]),p=!0):w.length&&(E=E.concat(w)),E}return s=t.reduce(function(E,w){return E.concat((w+"").split(""))},[]).reduce(function(E,w){var S,x;return e||(w=w.toLowerCase()),S=/^\d$/.test(w)?1:/^[A-Z]$/.test(w)?2:/^[a-z]$/.test(w)?3:0,r&&S===0?f+=w:(x=w.charCodeAt(0),S&&S===n&&x===c+1?a.push(w):(E=h(E,a),a=[w],n=S),c=x),E},[]),s=h(s,a),f&&(s.push(f),p=!0),{values:s,suppressed:p}}function $ye(t,e){return t.join(t.length>2?", ":e?" / ":"/")}function eEe(t,e){var r,s,a={},n;if(e.phContent&&(r=e.phContent(t,e)),typeof r!="string")switch(t){case"hideEchoBack":case"mask":case"defaultInput":case"caseSensitive":case"keepWhitespace":case"encoding":case"bufferSize":case"history":case"cd":r=e.hasOwnProperty(t)?typeof e[t]=="boolean"?e[t]?"on":"off":e[t]+"":"";break;case"limit":case"trueValue":case"falseValue":s=e[e.hasOwnProperty(t+"Src")?t+"Src":t],e.keyIn?(a=Xye(s,e.caseSensitive),s=a.values):s=s.filter(function(c){var f=typeof c;return f==="string"||f==="number"}),r=$ye(s,a.suppressed);break;case"limitCount":case"limitCountNotZero":r=e[e.hasOwnProperty("limitSrc")?"limitSrc":"limit"].length,r=r||t!=="limitCountNotZero"?r+"":"";break;case"lastInput":r=vq;break;case"cwd":case"CWD":case"cwdHome":r=process.cwd(),t==="CWD"?r=V0.basename(r):t==="cwdHome"&&(r=Dq(r));break;case"date":case"time":case"localeDate":case"localeTime":r=new Date()["to"+t.replace(/^./,function(c){return c.toUpperCase()})+"String"]();break;default:typeof(n=(t.match(/^history_m(\d+)$/)||[])[1])=="string"&&(r=Dm[Dm.length-n]||"")}return r}function tEe(t){var e=/^(.)-(.)$/.exec(t),r="",s,a,n,c;if(!e)return null;for(s=e[1].charCodeAt(0),a=e[2].charCodeAt(0),c=s<a?1:-1,n=s;n!==a+c;n+=c)r+=String.fromCharCode(n);return r}function Bq(t){var e=new RegExp(/(\s*)(?:("|')(.*?)(?:\2|$)|(\S+))/g),r,s="",a=[],n;for(t=t.trim();r=e.exec(t);)n=r[3]||r[4]||"",r[1]&&(a.push(s),s=""),s+=n;return s&&a.push(s),a}function rEe(t,e){return e.trueValue.length&&wq(t,e.trueValue,e.caseSensitive)?!0:e.falseValue.length&&wq(t,e.falseValue,e.caseSensitive)?!1:t}function nEe(t){var e,r,s,a,n,c,f;function p(E){return eEe(E,t)}function h(E){t.display+=(/[^\r\n]$/.test(t.display)?`
|
|
|
|
|
`:"")+E}for(t.limitSrc=t.limit,t.displaySrc=t.display,t.limit="",t.display=VC(t.display+"",p);;){if(e=Cq(t),r=!1,s="",t.defaultInput&&!e&&(e=t.defaultInput),t.history&&((a=/^\s*\!(?:\!|-1)(:p)?\s*$/.exec(e))?(n=Dm[0]||"",a[1]?r=!0:e=n,h(n+`
|
|
|
|
|
`),r||(t.displayOnly=!0,Cq(t),t.displayOnly=!1)):e&&e!==Dm[Dm.length-1]&&(Dm=[e])),!r&&t.cd&&e)switch(c=Bq(e),c[0].toLowerCase()){case"cd":if(c[1])try{process.chdir(Dq(c[1],!0))}catch(E){h(E+"")}r=!0;break;case"pwd":h(process.cwd()),r=!0;break}if(!r&&t.preCheck&&(f=t.preCheck(e,t),e=f.res,f.forceNext&&(r=!0)),!r){if(!t.limitSrc.length||wq(e,t.limitSrc,t.caseSensitive))break;t.limitMessage&&(s=VC(t.limitMessage,p))}h((s?s+`
|
|
|
|
|
`:"")+VC(t.displaySrc+"",p))}return rEe(e,t)}$r._DBG_set_useExt=function(t){zye=t};$r._DBG_set_checkOptions=function(t){Iq=t};$r._DBG_set_checkMethod=function(t){iS=t};$r._DBG_clearHistory=function(){vq="",Dm=[]};$r.setDefaultOptions=function(t){return Eq=Vs(!0,t),Vs(!0)};$r.question=function(t,e){return nEe(Vs(Vs(!0,e),{display:t}))};$r.prompt=function(t){var e=Vs(!0,t);return e.display=e.prompt,nEe(e)};$r.keyIn=function(t,e){var r=Vs(Vs(!0,e),{display:t,keyIn:!0,keepWhitespace:!0});return r.limitSrc=r.limit.filter(function(s){var a=typeof s;return a==="string"||a==="number"}).map(function(s){return VC(s+"",tEe)}),r.limit=Sq(r.limitSrc.join("")),["trueValue","falseValue"].forEach(function(s){r[s]=r[s].reduce(function(a,n){var c=typeof n;return c==="string"||c==="number"?a=a.concat((n+"").split("")):a.push(n),a},[])}),r.display=VC(r.display+"",function(s){return eEe(s,r)}),rEe(Cq(r),r)};$r.questionEMail=function(t,e){return t==null&&(t="Input e-mail address: "),$r.question(t,Vs({hideEchoBack:!1,limit:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,limitMessage:"Input valid e-mail address, please.",trueValue:null,falseValue:null},e,{keepWhitespace:!1,cd:!1}))};$r.questionNewPassword=function(t,e){var r,s,a,n=Vs({hideEchoBack:!0,mask:"*",limitMessage:`It can include: $<charlist>
|
|
|
|
|
And the length must be: $<length>`,trueValue:null,falseValue:null,caseSensitive:!0},e,{history:!1,cd:!1,phContent:function(x){return x==="charlist"?r.text:x==="length"?s+"..."+a:null}}),c,f,p,h,E,w,S;for(e=e||{},c=VC(e.charlist?e.charlist+"":"$<!-~>",tEe),(isNaN(s=parseInt(e.min,10))||typeof s!="number")&&(s=12),(isNaN(a=parseInt(e.max,10))||typeof a!="number")&&(a=24),h=new RegExp("^["+Sq(c)+"]{"+s+","+a+"}$"),r=Xye([c],n.caseSensitive,!0),r.text=$ye(r.values,r.suppressed),f=e.confirmMessage!=null?e.confirmMessage:"Reinput a same one to confirm it: ",p=e.unmatchMessage!=null?e.unmatchMessage:"It differs from first one. Hit only the Enter key if you want to retry from first one.",t==null&&(t="Input new password: "),E=n.limitMessage;!S;)n.limit=h,n.limitMessage=E,w=$r.question(t,n),n.limit=[w,""],n.limitMessage=p,S=$r.question(f,n);return w};function iEe(t,e,r){var s;function a(n){return s=r(n),!isNaN(s)&&typeof s=="number"}return $r.question(t,Vs({limitMessage:"Input valid number, please."},e,{limit:a,cd:!1})),s}$r.questionInt=function(t,e){return iEe(t,e,function(r){return parseInt(r,10)})};$r.questionFloat=function(t,e){return iEe(t,e,parseFloat)};$r.questionPath=function(t,e){var r,s="",a=Vs({hideEchoBack:!1,limitMessage:`$<error(
|
|
|
|
|
)>Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},e,{keepWhitespace:!1,limit:function(n){var c,f,p;n=Dq(n,!0),s="";function h(E){E.split(/\/|\\/).reduce(function(w,S){var x=V0.resolve(w+=S+V0.sep);if(!si.existsSync(x))si.mkdirSync(x);else if(!si.statSync(x).isDirectory())throw new Error("Non directory already exists: "+x);return w},"")}try{if(c=si.existsSync(n),r=c?si.realpathSync(n):V0.resolve(n),!e.hasOwnProperty("exists")&&!c||typeof e.exists=="boolean"&&e.exists!==c)return s=(c?"Already exists":"No such file or directory")+": "+r,!1;if(!c&&e.create&&(e.isDirectory?h(r):(h(V0.dirname(r)),si.closeSync(si.openSync(r,"w"))),r=si.realpathSync(r)),c&&(e.min||e.max||e.isFile||e.isDirectory)){if(f=si.statSync(r),e.isFile&&!f.isFile())return s="Not file: "+r,!1;if(e.isDirectory&&!f.isDirectory())return s="Not directory: "+r,!1;if(e.min&&f.size<+e.min||e.max&&f.size>+e.max)return s="Size "+f.size+" is out of range: "+r,!1}if(typeof e.validate=="function"&&(p=e.validate(r))!==!0)return typeof p=="string"&&(s=p),!1}catch(E){return s=E+"",!1}return!0},phContent:function(n){return n==="error"?s:n!=="min"&&n!=="max"?null:e.hasOwnProperty(n)?e[n]+"":""}});return e=e||{},t==null&&(t='Input path (you can "cd" and "pwd"): '),$r.question(t,a),r};function sEe(t,e){var r={},s={};return typeof t=="object"?(Object.keys(t).forEach(function(a){typeof t[a]=="function"&&(s[e.caseSensitive?a:a.toLowerCase()]=t[a])}),r.preCheck=function(a){var n;return r.args=Bq(a),n=r.args[0]||"",e.caseSensitive||(n=n.toLowerCase()),r.hRes=n!=="_"&&s.hasOwnProperty(n)?s[n].apply(a,r.args.slice(1)):s.hasOwnProperty("_")?s._.apply(a,r.args):null,{res:a,forceNext:!1}},s.hasOwnProperty("_")||(r.limit=function(){var a=r.args[0]||"";return e.caseSensitive||(a=a.toLowerCase()),s.hasOwnProperty(a)})):r.preCheck=function(a){return r.args=Bq(a),r.hRes=typeof t=="function"?t.apply(a,r.args):!0,{res:a,forceNext:!1}},r}$r.promptCL=function(t,e){var r=Vs({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),s=sEe(t,r);return r.limit=s.limit,r.preCheck=s.preCheck,$r.prompt(r),s.args};$r.promptLoop=function(t,e){for(var r=Vs({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},e);!t($r.prompt(r)););};$r.promptCLLoop=function(t,e){var r=Vs({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),s=sEe(t,r);for(r.limit=s.limit,r.preCheck=s.preCheck;$r.prompt(r),!s.hRes;);};$r.promptSimShell=function(t){return $r.prompt(Vs({hideEchoBack:!1,history:!0},t,{prompt:function(){return bm?"$<cwd>>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$<cwdHome>$ "}()}))};function oEe(t,e,r){var s;return t==null&&(t="Are you sure? "),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s*:?\s*$/,"")+" [y/n]: "),s=$r.keyIn(t,Vs(e,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof s=="boolean"?s:""}$r.keyInYN=function(t,e){return oEe(t,e)};$r.keyInYNStrict=function(t,e){return oEe(t,e,"yn")};$r.keyInPause=function(t,e){t==null&&(t="Continue..."),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s+$/,"")+" (Hit any key)"),$r.keyIn(t,Vs({limit:null},e,{hideEchoBack:!0,mask:""}))};$r.keyInSelect=function(t,e,r){var s=Vs({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(p){return p==="itemsCount"?t.length+"":p==="firstItem"?(t[0]+"").trim():p==="lastItem"?(t[t.length-1]+"").trim():null}}),a="",n={},c=49,f=`
|
|
|
|
|
`;if(!Array.isArray(t)||!t.length||t.length>35)throw"`items` must be Array (max length: 35).";return t.forEach(function(p,h){var E=String.fromCharCode(c);a+=E,n[E]=h,f+="["+E+"] "+(p+"").trim()+`
|
|
|
|
|
`,c=c===57?97:c+1}),(!r||r.cancel!==!1)&&(a+="0",n[0]=-1,f+="[0] "+(r&&r.cancel!=null&&typeof r.cancel!="boolean"?(r.cancel+"").trim():"CANCEL")+`
|
|
|
|
|
`),s.limit=a,f+=`
|
|
|
|
|
`,e==null&&(e="Choose one from list: "),(e+="")&&((!r||r.guide!==!1)&&(e=e.replace(/\s*:?\s*$/,"")+" [$<limit>]: "),f+=e),n[$r.keyIn(f,s).toLowerCase()]};$r.getRawInput=function(){return iF};function sS(t,e){var r;return e.length&&(r={},r[t]=e[0]),$r.setDefaultOptions(r)[t]}$r.setPrint=function(){return sS("print",arguments)};$r.setPrompt=function(){return sS("prompt",arguments)};$r.setEncoding=function(){return sS("encoding",arguments)};$r.setMask=function(){return sS("mask",arguments)};$r.setBufferSize=function(){return sS("bufferSize",arguments)}});var bq=_((oYt,ec)=>{(function(){var t={major:0,minor:2,patch:66,status:"beta"};tau_file_system={files:{},open:function(C,b,y){var F=tau_file_system.files[C];if(!F){if(y==="read")return null;F={path:C,text:"",type:b,get:function(z,Z){return Z===this.text.length||Z>this.text.length?"end_of_file":this.text.substring(Z,Z+z)},put:function(z,Z){return Z==="end_of_file"?(this.text+=z,!0):Z==="past_end_of_file"?null:(this.text=this.text.substring(0,Z)+z+this.text.substring(Z+z.length),!0)},get_byte:function(z){if(z==="end_of_stream")return-1;var Z=Math.floor(z/2);if(this.text.length<=Z)return-1;var $=n(this.text[Math.floor(z/2)],0);return z%2===0?$&255:$/256>>>0},put_byte:function(z,Z){var $=Z==="end_of_stream"?this.text.length:Math.floor(Z/2);if(this.text.length<$)return null;var oe=this.text.length===$?-1:n(this.text[Math.floor(Z/2)],0);return Z%2===0?(oe=oe/256>>>0,oe=(oe&255)<<8|z&255):(oe=oe&255,oe=(z&255)<<8|oe&255),this.text.length===$?this.text+=c(oe):this.text=this.text.substring(0,$)+c(oe)+this.text.substring($+1),!0},flush:function(){return!0},close:function(){var z=tau_file_system.files[this.path];return z?!0:null}},tau_file_system.files[C]=F}return y==="write"&&(F.text=""),F}},tau_user_input={buffer:"",get:function(C,b){for(var y;tau_user_input.buffer.length<C;)y=window.prompt(),y&&(tau_user_input.buffer+=y);return y=tau_user_input.buffer.substr(0,C),tau_user_input.buffer=tau_user_input.buffer.substr(C),y}},tau_user_output={put:function(C,b){return console.log(C),!0},flush:function(){return!0}},nodejs_file_system={open:function(C,b,y){var F=Ie("fs"),z=F.openSync(C,y[0]);return y==="read"&&!F.existsSync(C)?null:{get:function(Z,$){var oe=new Buffer(Z);return F.readSync(z,oe,0,Z,$),oe.toString()},put:function(Z,$){var oe=Buffer.from(Z);if($==="end_of_file")F.writeSync(z,oe);else{if($==="past_end_of_file")return null;F.writeSync(z,oe,0,oe.length,$)}return!0},get_byte:function(Z){return null},put_byte:function(Z,$){return null},flush:function(){return!0},close:function(){return F.closeSync(z),!0}}}},nodejs_user_input={buffer:"",get:function(C,b){for(var y,F=aEe();nodejs_user_input.buffer.length<C;)nodejs_user_input.buffer+=F.question();return y=nodejs_user_input.buffer.substr(0,C),nodejs_user_input.buffer=nodejs_user_input.buffer.substr(C),y}},nodejs_user_output={put:function(C,b){return process.stdout.write(C),!0},flush:function(){return!0}};var e;Array.prototype.indexOf?e=function(C,b){return C.indexOf(b)}:e=function(C,b){for(var y=C.length,F=0;F<y;F++)if(b===C[F])return F;return-1};var r=function(C,b){if(C.length!==0){for(var y=C[0],F=C.length,z=1;z<F;z++)y=b(y,C[z]);return y}},s;Array.prototype.map?s=function(C,b){return C.map(b)}:s=function(C,b){for(var y=[],F=C.length,z=0;z<F;z++)y.push(b(C[z]));return y};var a;Array.prototype.filter?a=function(C,b){return C.filter(b)}:a=function(C,b){for(var y=[],F=C.length,z=0;z<F;z++)b(C[z])&&y.push(C[z]);return y};var n;String.prototype.codePointAt?n=function(C,b){return C.codePointAt(b)}:n=function(C,b){return C.charCodeAt(b)};var c;String.fromCodePoint?c=function(){return String.fromCodePoint.apply(null,arguments)}:c=function(){return String.fromCharCode.apply(null,arguments)};var f=0,p=1,h=/(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)|\\x([0-9a-fA-F]+)\\|\\([0-7]+)\\|(\\\\)|(\\')|('')|(\\")|(\\`)|(\\.)|(.)/g,E={"\\a":7,"\\b":8,"\\f":12,"\\n":10,"\\r":13,"\\t":9,"\\v":11};function w(C){var b=[],y=!1;return C.replace(h,function(F,z,Z,$,oe,xe,Re,lt,Ct,Gt,ir,Pt,gn,Pr,Ir,Nr,nn){switch(!0){case Ct!==void 0:return b.push(parseInt(Ct,16)),"";case Gt!==void 0:return b.push(parseInt(Gt,8)),"";case ir!==void 0:case Pt!==void 0:case gn!==void 0:case Pr!==void 0:case Ir!==void 0:return b.push(n(F.substr(1),0)),"";case nn!==void 0:return b.push(n(nn,0)),"";case Nr!==void 0:y=!0;default:return b.push(E[F]),""}}),y?null:b}function S(C,b){var y="";if(C.length<2)return C;try{C=C.replace(/\\([0-7]+)\\/g,function($,oe){return c(parseInt(oe,8))}),C=C.replace(/\\x([0-9a-fA-F]+)\\/g,function($,oe){return c(parseInt(oe,16))})}catch{return null}for(var F=0;F<C.length;F++){var z=C.charAt(F),Z=C.charAt(F+1);if(z===b&&Z===b)F++,y+=b;else if(z==="\\")if(["a","b","f","n","r","t","v","'",'"',"\\","a","\b","\f",`
|
|
|
|
|
`,"\r"," ","\v"].indexOf(Z)!==-1)switch(F+=1,Z){case"a":y+="a";break;case"b":y+="\b";break;case"f":y+="\f";break;case"n":y+=`
|
|
|
|
|
`;break;case"r":y+="\r";break;case"t":y+=" ";break;case"v":y+="\v";break;case"'":y+="'";break;case'"':y+='"';break;case"\\":y+="\\";break}else return null;else y+=z}return y}function x(C){for(var b="",y=0;y<C.length;y++)switch(C.charAt(y)){case"'":b+="\\'";break;case"\\":b+="\\\\";break;case"\b":b+="\\b";break;case"\f":b+="\\f";break;case`
|
|
|
|
|
`:b+="\\n";break;case"\r":b+="\\r";break;case" ":b+="\\t";break;case"\v":b+="\\v";break;default:b+=C.charAt(y);break}return b}function I(C){var b=C.substr(2);switch(C.substr(0,2).toLowerCase()){case"0x":return parseInt(b,16);case"0b":return parseInt(b,2);case"0o":return parseInt(b,8);case"0'":return w(b)[0];default:return parseFloat(C)}}var T={whitespace:/^\s*(?:(?:%.*)|(?:\/\*(?:\n|\r|.)*?\*\/)|(?:\s+))\s*/,variable:/^(?:[A-Z_][a-zA-Z0-9_]*)/,atom:/^(\!|,|;|[a-z][0-9a-zA-Z_]*|[#\$\&\*\+\-\.\/\:\<\=\>\?\@\^\~\\]+|'(?:[^']*?(?:\\(?:x?\d+)?\\)*(?:'')*(?:\\')*)*')/,number:/^(?:0o[0-7]+|0x[0-9a-fA-F]+|0b[01]+|0'(?:''|\\[abfnrtv\\'"`]|\\x?\d+\\|[^\\])|\d+(?:\.\d+(?:[eE][+-]?\d+)?)?)/,string:/^(?:"([^"]|""|\\")*"|`([^`]|``|\\`)*`)/,l_brace:/^(?:\[)/,r_brace:/^(?:\])/,l_bracket:/^(?:\{)/,r_bracket:/^(?:\})/,bar:/^(?:\|)/,l_paren:/^(?:\()/,r_paren:/^(?:\))/};function N(C,b){return C.get_flag("char_conversion").id==="on"?b.replace(/./g,function(y){return C.get_char_conversion(y)}):b}function U(C){this.thread=C,this.text="",this.tokens=[]}U.prototype.set_last_tokens=function(C){return this.tokens=C},U.prototype.new_text=function(C){this.text=C,this.tokens=[]},U.prototype.get_tokens=function(C){var b,y=0,F=0,z=0,Z=[],$=!1;if(C){var oe=this.tokens[C-1];y=oe.len,b=N(this.thread,this.text.substr(oe.len)),F=oe.line,z=oe.start}else b=this.text;if(/^\s*$/.test(b))return null;for(;b!=="";){var xe=[],Re=!1;if(/^\n/.exec(b)!==null){F++,z=0,y++,b=b.replace(/\n/,""),$=!0;continue}for(var lt in T)if(T.hasOwnProperty(lt)){var Ct=T[lt].exec(b);Ct&&xe.push({value:Ct[0],name:lt,matches:Ct})}if(!xe.length)return this.set_last_tokens([{value:b,matches:[],name:"lexical",line:F,start:z}]);var oe=r(xe,function(Pr,Ir){return Pr.value.length>=Ir.value.length?Pr:Ir});switch(oe.start=z,oe.line=F,b=b.replace(oe.value,""),z+=oe.value.length,y+=oe.value.length,oe.name){case"atom":oe.raw=oe.value,oe.value.charAt(0)==="'"&&(oe.value=S(oe.value.substr(1,oe.value.length-2),"'"),oe.value===null&&(oe.name="lexical",oe.value="unknown escape sequence"));break;case"number":oe.float=oe.value.substring(0,2)!=="0x"&&oe.value.match(/[.eE]/)!==null&&oe.value!=="0'.",oe.value=I(oe.value),oe.blank=Re;break;case"string":var Gt=oe.value.charAt(0);oe.value=S(oe.value.substr(1,oe.value.length-2),Gt),oe.value===null&&(oe.name="lexical",oe.value="unknown escape sequence");break;case"whitespace":var ir=Z[Z.length-1];ir&&(ir.space=!0),Re=!0;continue;case"r_bracket":Z.length>0&&Z[Z.length-1].name==="l_bracket"&&(oe=Z.pop(),oe.name="atom",oe.value="{}",oe.raw="{}",oe.space=!1);break;case"r_brace":Z.length>0&&Z[Z.length-1].name==="l_brace"&&(oe=Z.pop(),oe.name="atom",oe.value="[]",oe.raw="[]",oe.space=!1);break}oe.len=y,Z.push(oe),Re=!1}var Pt=this.set_last_tokens(Z);return Pt.length===0?null:Pt};function W(C,b,y,F,z){if(!b[y])return{type:f,value:P.error.syntax(b[y-1],"expression expected",!0)};var Z;if(F==="0"){var $=b[y];switch($.name){case"number":return{type:p,len:y+1,value:new P.type.Num($.value,$.float)};case"variable":return{type:p,len:y+1,value:new P.type.Var($.value)};case"string":var oe;switch(C.get_flag("double_quotes").id){case"atom":oe=new j($.value,[]);break;case"codes":oe=new j("[]",[]);for(var xe=$.value.length-1;xe>=0;xe--)oe=new j(".",[new P.type.Num(n($.value,xe),!1),oe]);break;case"chars":oe=new j("[]",[]);for(var xe=$.value.length-1;xe>=0;xe--)oe=new j(".",[new P.type.Term($.value.charAt(xe),[]),oe]);break}return{type:p,len:y+1,value:oe};case"l_paren":var Pt=W(C,b,y+1,C.__get_max_priority(),!0);return Pt.type!==p?Pt:b[Pt.len]&&b[Pt.len].name==="r_paren"?(Pt.len++,Pt):{type:f,derived:!0,value:P.error.syntax(b[Pt.len]?b[Pt.len]:b[Pt.len-1],") or operator expected",!b[Pt.len])};case"l_bracket":var Pt=W(C,b,y+1,C.__get_max_priority(),!0);return Pt.type!==p?Pt:b[Pt.len]&&b[Pt.len].name==="r_bracket"?(Pt.len++,Pt.value=new j("{}",[Pt.value]),Pt):{type:f,derived:!0,value:P.error.syntax(b[Pt.len]?b[Pt.len]:b[Pt.len-1],"} or operator expected",!b[Pt.len])}}var Re=ee(C,b,y,z);return Re.type===p||Re.derived||(Re=ie(C,b,y),Re.type===p||Re.derived)?Re:{type:f,derived:!1,value:P.error.syntax(b[y],"unexpected token")}}var lt=C.__get_max_priority(),Ct=C.__get_next_priority(F),Gt=y;if(b[y].name==="atom"&&b[y+1]&&(b[y].space||b[y+1].name!=="l_paren")){var $=b[y++],ir=C.__lookup_operator_classes(F,$.value);if(ir&&ir.indexOf("fy")>-1){var Pt=W(C,b,y,F,z);if(Pt.type!==f)return $.value==="-"&&!$.space&&P.type.is_number(Pt.value)?{value:new P.type.Num(-Pt.value.value,Pt.value.is_float),len:Pt.len,type:p}:{value:new P.type.Term($.value,[Pt.value]),len:Pt.len,type:p};Z=Pt}else if(ir&&ir.indexOf("fx")>-1){var Pt=W(C,b,y,Ct,z);if(Pt.type!==f)return{value:new P.type.Term($.value,[Pt.value]),len:Pt.len,type:p};Z=Pt}}y=Gt;var Pt=W(C,b,y,Ct,z);if(Pt.type===p){y=Pt.len;var $=b[y];if(b[y]&&(b[y].name==="atom"&&C.__lookup_operator_classes(F,$.value)||b[y].name==="bar"&&C.__lookup_operator_classes(F,"|"))){var gn=Ct,Pr=F,ir=C.__lookup_operator_classes(F,$.value);if(ir.indexOf("xf")>-1Line truncated
|
|
|
|
|
`;b+=`
|
|
|
|
|
`;for(key in this.rules)for(y=0;y<this.rules[key].length;y++)b+=this.rules[key][y].toString(C),b+=`
|
|
|
|
|
`;return b},De.prototype.clone=function(){return new De(this.id)},Te.prototype.clone=function(){return new Te(this.value,this.is_float)},j.prototype.clone=function(){return new j(this.id,s(this.args,function(C){return C.clone()}))},Fe.prototype.clone=function(){return new Stram(this.stream,this.mode,this.alias,this.type,this.reposition,this.eof_action)},Ne.prototype.clone=function(){var C={};for(var b in this.links)this.links.hasOwnProperty(b)&&(C[b]=this.links[b].clone());return new Ne(C)},Pe.prototype.clone=function(){return new Pe(this.goal.clone(),this.substitution.clone(),this.parent)},Ye.prototype.clone=function(){return new Ye(this.head.clone(),this.body!==null?this.body.clone():null)},De.prototype.equals=function(C){return P.type.is_variable(C)&&this.id===C.id},Te.prototype.equals=function(C){return P.type.is_number(C)&&this.value===C.value&&this.is_float===C.is_float},j.prototype.equals=function(C){if(!P.type.is_term(C)||this.indicator!==C.indicator)return!1;for(var b=0;b<this.args.length;b++)if(!this.args[b].equals(C.args[b]))return!1;return!0},Fe.prototype.equals=function(C){return P.type.is_stream(C)&&this.id===C.id},Ne.prototype.equals=function(C){var b;if(!P.type.is_substitution(C))return!1;for(b in this.links)if(this.links.hasOwnProperty(b)&&(!C.links[b]||!this.links[b].equals(C.links[b])))return!1;for(b in C.links)if(C.links.hasOwnProperty(b)&&!this.links[b])return!1;return!0},Pe.prototype.equals=function(C){return P.type.is_state(C)&&this.goal.equals(C.goal)&&this.substitution.equals(C.substitution)&&this.parent===C.parent},Ye.prototype.equals=function(C){return P.type.is_rule(C)&&this.head.equals(C.head)&&(this.body===null&&C.body===null||this.body!==null&&this.body.equals(C.body))},De.prototype.rename=function(C){return C.get_free_variable(this)},Te.prototype.rename=function(C){return this},j.prototype.rename=function(C){return new j(this.id,s(this.args,function(b){return b.rename(C)}))},Fe.prototype.rename=function(C){return this},Ye.prototype.rename=function(C){return new Ye(this.head.rename(C),this.body!==null?this.body.rename(C):null)},De.prototype.variables=function(){return[this.id]},Te.prototype.variables=function(){return[]},j.prototype.variables=function(){return[].concat.apply([],s(this.args,function(C){return C.variables()}))},Fe.prototype.variables=function(){return[]},Ye.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},De.prototype.apply=function(C){return C.lookup(this.id)?C.lookup(this.id):this},Te.prototype.apply=function(C){return this},j.prototype.apply=function(C){if(this.indicator==="./2"){for(var b=[],y=this;y.indicator==="./2";)b.push(y.args[0].apply(C)),y=y.args[1];for(var F=y.apply(C),z=b.length-1;z>=0;z--)F=new j(".",[b[z],F]);return F}return new j(this.id,s(this.args,function(Z){return Z.apply(C)}),this.ref)},Fe.prototype.apply=function(C){return this},Ye.prototype.apply=function(C){return new Ye(this.head.apply(C),this.body!==null?this.body.apply(C):null)},Ne.prototype.apply=function(C){var b,y={};for(b in this.links)this.links.hasOwnProperty(b)&&(y[b]=this.links[b].apply(C));return new Ne(y)},j.prototype.select=function(){for(var C=this;C.indicator===",/2";)C=C.args[0];return C},j.prototype.replace=function(C){return this.indicator===",/2"?this.args[0].indicator===",/2"?new j(",",[this.args[0].replace(C),this.args[1]]):C===null?this.args[1]:new j(",",[C,this.args[1]]):C},j.prototype.search=function(C){if(P.type.is_term(C)&&C.ref!==void 0&&this.ref===C.ref)return!0;for(var b=0;b<this.args.length;b++)if(P.type.is_term(this.args[b])&&this.args[b].search(C))return!0;return!1},ke.prototype.get_current_input=function(){return this.current_input},it.prototype.get_current_input=function(){return this.session.get_current_input()},ke.prototype.get_current_output=function(){return this.current_output},it.prototype.get_current_output=function(){return this.session.get_current_output()},ke.prototype.set_current_input=function(C){this.current_input=C},it.prototype.set_current_input=function(C){return this.session.set_current_input(C)},ke.prototype.set_current_output=function(C){this.current_input=C},it.prototype.set_current_output=function(C){return this.session.set_current_output(C)},ke.prototype.get_stream_by_alias=function(C){return this.streams[C]},it.prototype.get_stream_by_alias=function(C){return this.session.get_stream_by_alias(C)},ke.prototype.file_system_open=function(C,b,y){return this.file_system.open(C,b,y)},it.prototype.file_system_open=function(C,b,y){return this.session.file_system_open(C,b,y)},ke.prototype.get_char_conversion=function(C){return this.__char_conversion[C]||C},it.prototype.get_char_conversion=function(C){return this.session.get_char_conversion(C)},ke.prototype.parse=function(C){return this.thread.parse(C)},it.prototype.parse=function(C){var b=new U(this);b.new_text(C);var y=b.get_tokens();if(y===null)return!1;var F=W(this,y,0,this.__get_max_priority(),!1);return F
Line truncated
|
|
|
|
|
`,[])])])),b.substitution,b)])},"nl/1":function(C,b,y){var F=y.args[0];C.prepend([new Pe(b.goal.replace(new j("put_char",[F,new j(`
|
|
|
|
|
`,[])])),b.substitution,b)])},"get_byte/1":function(C,b,y){var F=y.args[0];C.prepend([new Pe(b.goal.replace(new j(",",[new j("current_input",[new De("S")]),new j("get_byte",[new De("S"),F])])),b.substitution,b)])},"get_byte/2":function(C,b,y){var F=y.args[0],z=y.args[1],Z=P.type.is_stream(F)?F:C.get_stream_by_alias(F.id);if(P.type.is_variable(F))C.throw_error(P.error.instantiation(y.indicator));else if(!P.type.is_variable(z)&&!P.type.is_byte(z))C.throw_error(P.error.type("in_byte",char,y.indicator));else if(!P.type.is_stream(F)&&!P.type.is_atom(F))C.throw_error(P.error.domain("stream_or_alias",F,y.indicator));else if(!P.type.is_stream(Z)||Z.stream===null)C.throw_error(P.error.existence("stream",F,y.indicator));else if(Z.output)C.throw_error(P.error.permission("input","stream",F,y.indicator));else if(Z.type==="text")C.throw_error(P.error.permission("input","text_stream",F,y.indicator));else if(Z.position==="past_end_of_stream"&&Z.eof_action==="error")C.throw_error(P.error.permission("input","past_end_of_stream",F,y.indicator));else{var $;if(Z.position==="end_of_stream")$="end_of_file",Z.position="past_end_of_stream";else{if($=Z.stream.get_byte(Z.position),$===null){C.throw_error(P.error.representation("byte",y.indicator));return}Z.position++}C.prepend([new Pe(b.goal.replace(new j("=",[new Te($,!1),z])),b.substitution,b)])}},"peek_byte/1":function(C,b,y){var F=y.args[0];C.prepend([new Pe(b.goal.replace(new j(",",[new j("current_input",[new De("S")]),new j("peek_byte",[new De("S"),F])])),b.substitution,b)])},"peek_byte/2":function(C,b,y){var F=y.args[0],z=y.args[1],Z=P.type.is_stream(F)?F:C.get_stream_by_alias(F.id);if(P.type.is_variable(F))C.throw_error(P.error.instantiation(y.indicator));else if(!P.type.is_variable(z)&&!P.type.is_byte(z))C.throw_error(P.error.type("in_byte",char,y.indicator));else if(!P.type.is_stream(F)&&!P.type.is_atom(F))C.throw_error(P.error.domain("stream_or_alias",F,y.indicator));else if(!P.type.is_stream(Z)||Z.stream===null)C.throw_error(P.error.existence("stream",F,y.indicator));else if(Z.output)C.throw_error(P.error.permission("input","stream",F,y.indicator));else if(Z.type==="text")C.throw_error(P.error.permission("input","text_stream",F,y.indicator));else if(Z.position==="past_end_of_stream"&&Z.eof_action==="error")C.throw_error(P.error.permission("input","past_end_of_stream",F,y.indicator));else{var $;if(Z.position==="end_of_stream")$="end_of_file",Z.position="past_end_of_stream";else if($=Z.stream.get_byte(Z.position),$===null){C.throw_error(P.error.representation("byte",y.indicator));return}C.prepend([new Pe(b.goal.replace(new j("=",[new Te($,!1),z])),b.substitution,b)])}},"put_byte/1":function(C,b,y){var F=y.args[0];C.prepend([new Pe(b.goal.replace(new j(",",[new j("current_output",[new De("S")]),new j("put_byte",[new De("S"),F])])),b.substitution,b)])},"put_byte/2":function(C,b,y){var F=y.args[0],z=y.args[1],Z=P.type.is_stream(F)?F:C.get_stream_by_alias(F.id);P.type.is_variable(F)||P.type.is_variable(z)?C.throw_error(P.error.instantiation(y.indicator)):P.type.is_byte(z)?!P.type.is_variable(F)&&!P.type.is_stream(F)&&!P.type.is_atom(F)?C.throw_error(P.error.domain("stream_or_alias",F,y.indicator)):!P.type.is_stream(Z)||Z.stream===null?C.throw_error(P.error.existence("stream",F,y.indicator)):Z.input?C.throw_error(P.error.permission("output","stream",F,y.indicator)):Z.type==="text"?C.throw_error(P.error.permission("output","text_stream",F,y.indicator)):Z.stream.put_byte(z.value,Z.position)&&(typeof Z.position=="number"&&Z.position++,C.success(b)):C.throw_error(P.error.type("byte",z,y.indicator))},"read/1":function(C,b,y){var F=y.args[0];C.prepend([new Pe(b.goal.replace(new j(",",[new j("current_input",[new De("S")]),new j("read_term",[new De("S"),F,new j("[]",[])])])),b.substitution,b)])},"read/2":function(C,b,y){var F=y.args[0],z=y.args[1];C.prepend([new Pe(b.goal.replace(new j("read_term",[F,z,new j("[]",[])])),b.substitution,b)])},"read_term/2":function(C,b,y){var F=y.args[0],z=y.args[1];C.prepend([new Pe(b.goal.replace(new j(",",[new j("current_input",[new De("S")]),new j("read_term",[new De("S"),F,z])])),b.substitution,b)])},"read_term/3":function(C,b,y){var F=y.args[0],z=y.args[1],Z=y.args[2],$=P.type.is_stream(F)?F:C.get_stream_by_alias(F.id);if(P.type.is_variable(F)||P.type.is_variable(Z))C.throw_error(P.error.instantiation(y.indicator));else if(!P.type.is_list(Z))C.throw_error(P.error.type("list",Z,y.indicator));else if(!P.type.is_stream(F)&&!P.type.is_atom(F))C.throw_error(P.error.domain("stream_or_alias",F,y.indicator));else if(!P.type.is_stream($)||$.stream===null)C.throw_error(P.error.existence("stream",F,y.indicator));else if($.output)C.throw_error(P.error.permission("input","stream",F,y.indicator));else if($.type==="binary")C.throw_error(P.error.permission("input","binary_stream",F,y.indicator));else if($.position==="past_end_of_stream"&&$.eof_action==="error")C.throw_error(P.error.permission("input","past_end_of_stream",F,y.indicator));else{for(var oe={},xe=Z,Re;
Line truncated
|
|
|
|
|
`;for(let r of this.project.workspacesByCwd.values()){let s=r.relativeCwd;e+=`workspace(${K0(s)}).
|
|
|
|
|
`,e+=`workspace_ident(${K0(s)}, ${K0(G.stringifyIdent(r.anchoredLocator))}).
|
|
|
|
|
`,e+=`workspace_version(${K0(s)}, ${K0(r.manifest.version)}).
|
|
|
|
|
`;for(let a of pEe)for(let n of r.manifest[a].values())e+=`workspace_has_dependency(${K0(s)}, ${K0(G.stringifyIdent(n))}, ${K0(n.range)}, ${a}).
|
|
|
|
|
`}return e+=`workspace(_) :- false.
|
|
|
|
|
`,e+=`workspace_ident(_, _) :- false.
|
|
|
|
|
`,e+=`workspace_version(_, _) :- false.
|
|
|
|
|
`,e+=`workspace_has_dependency(_, _, _, _) :- false.
|
|
|
|
|
`,e}getDeclarations(){let e="";return e+=`gen_enforced_dependency(_, _, _, _) :- false.
|
|
|
|
|
`,e+=`gen_enforced_field(_, _, _) :- false.
|
|
|
|
|
`,e}get fullSource(){return`${this.getProjectDatabase()}
|
|
|
|
|
${this.source}
|
|
|
|
|
${this.getDeclarations()}`}createSession(){return new xq(this.project,this.fullSource)}async processClassic(){let e=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(e),enforcedFields:await this.genEnforcedFields(e)}}async process(){let{enforcedDependencies:e,enforcedFields:r}=await this.processClassic(),s=new Map;for(let{workspace:a,dependencyIdent:n,dependencyRange:c,dependencyType:f}of e){let p=rS([f,G.stringifyIdent(n)]),h=je.getMapWithDefault(s,a.cwd);je.getMapWithDefault(h,p).set(c??void 0,new Set)}for(let{workspace:a,fieldPath:n,fieldValue:c}of r){let f=rS(n),p=je.getMapWithDefault(s,a.cwd);je.getMapWithDefault(p,f).set(JSON.parse(c)??void 0,new Set)}return{manifestUpdates:s,reportedErrors:new Map}}async genEnforcedDependencies(e){let r=[];for await(let s of e.makeQuery("workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).")){let a=J.resolve(this.project.cwd,Pm(s.links.WorkspaceCwd)),n=Pm(s.links.DependencyIdent),c=Pm(s.links.DependencyRange),f=Pm(s.links.DependencyType);if(a===null||n===null)throw new Error("Invalid rule");let p=this.project.getWorkspaceByCwd(a),h=G.parseIdent(n);r.push({workspace:p,dependencyIdent:h,dependencyRange:c,dependencyType:f})}return je.sortMap(r,[({dependencyRange:s})=>s!==null?"0":"1",({workspace:s})=>G.stringifyIdent(s.anchoredLocator),({dependencyIdent:s})=>G.stringifyIdent(s)])}async genEnforcedFields(e){let r=[];for await(let s of e.makeQuery("workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).")){let a=J.resolve(this.project.cwd,Pm(s.links.WorkspaceCwd)),n=Pm(s.links.FieldPath),c=Mct(s.links.FieldValue);if(a===null||n===null)throw new Error("Invalid rule");let f=this.project.getWorkspaceByCwd(a);r.push({workspace:f,fieldPath:n,fieldValue:c})}return je.sortMap(r,[({workspace:s})=>G.stringifyIdent(s.anchoredLocator),({fieldPath:s})=>s])}async*query(e){let r=this.createSession();for await(let s of r.makeQuery(e)){let a={};for(let[n,c]of Object.entries(s.links))n!=="_"&&(a[n]=Pm(c));yield a}}}});var SEe=_(lF=>{"use strict";Object.defineProperty(lF,"__esModule",{value:!0});function wS(t){let e=[...t.caches],r=e.shift();return r===void 0?vEe():{get(s,a,n={miss:()=>Promise.resolve()}){return r.get(s,a,n).catch(()=>wS({caches:e}).get(s,a,n))},set(s,a){return r.set(s,a).catch(()=>wS({caches:e}).set(s,a))},delete(s){return r.delete(s).catch(()=>wS({caches:e}).delete(s))},clear(){return r.clear().catch(()=>wS({caches:e}).clear())}}}function vEe(){return{get(t,e,r={miss:()=>Promise.resolve()}){return e().then(a=>Promise.all([a,r.miss(a)])).then(([a])=>a)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}lF.createFallbackableCache=wS;lF.createNullCache=vEe});var bEe=_((H7t,DEe)=>{DEe.exports=SEe()});var PEe=_(qq=>{"use strict";Object.defineProperty(qq,"__esModule",{value:!0});function nut(t={serializable:!0}){let e={};return{get(r,s,a={miss:()=>Promise.resolve()}){let n=JSON.stringify(r);if(n in e)return Promise.resolve(t.serializable?JSON.parse(e[n]):e[n]);let c=s(),f=a&&a.miss||(()=>Promise.resolve());return c.then(p=>f(p)).then(()=>c)},set(r,s){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(s):s,Promise.resolve(s)},delete(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}qq.createInMemoryCache=nut});var kEe=_((G7t,xEe)=>{xEe.exports=PEe()});var REe=_($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});function iut(t,e,r){let s={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers(){return t===Wq.WithinHeaders?s:{}},queryParameters(){return t===Wq.WithinQueryParameters?s:{}}}}function sut(t){let e=0,r=()=>(e++,new Promise(s=>{setTimeout(()=>{s(t(r))},Math.min(100*e,1e3))}));return t(r)}function QEe(t,e=(r,s)=>Promise.resolve()){return Object.assign(t,{wait(r){return QEe(t.then(s=>Promise.all([e(s,r),s])).then(s=>s[1]))}})}function out(t){let e=t.length-1;for(e;e>0;e--){let r=Math.floor(Math.random()*(e+1)),s=t[e];t[e]=t[r],t[r]=s}return t}function aut(t,e){return e&&Object.keys(e).forEach(r=>{t[r]=e[r](t)}),t}function lut(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}var cut="4.22.1",uut=t=>()=>t.transporter.requester.destroy(),Wq={WithinQueryParameters:0,WithinHeaders:1};$u.AuthMode=Wq;$u.addMethods=aut;$u.createAuth=iut;$u.createRetryablePromise=sut;$u.createWaitablePromise=QEe;$u.destroy=uut;$u.encode=lut;$u.shuffle=out;$u.version=cut});var BS=_((W7t,TEe)=>{TEe.exports=REe()});var FEe=_(Yq=>{"use strict";Object.defineProperty(Yq,"__esModule",{value:!0});var fut={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};Yq.MethodEnum=fut});var vS=_((V7t,NEe)=>{NEe.exports=FEe()});var zEe=_(Wi=>{"use strict";Object.defineProperty(Wi,"__esModule",{value:!0});var LEe=vS();function Vq(t,e){let r=t||{},s=r.data||{};return Object.keys(r).forEach(a=>{["timeout","head
Line truncated
|
|
|
|
|
`;f!==s&&(s=f,t.write(VCe.default.eraseLines(r)+f),r=f.split(`
|
|
|
|
|
`).length)};return n.clear=()=>{t.write(VCe.default.eraseLines(r)),s="",r=0},n.done=()=>{s="",r=0,e||(JCe.default.show(),a=!1)},n};OS.default={create:spt}});var ZCe=_((NJt,opt)=>{opt.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 ewe=_(tc=>{"use strict";var $Ce=ZCe(),uA=process.env;Object.defineProperty(tc,"_vendors",{value:$Ce.map(function(t){return t.constant})});tc.name=null;tc.isPR=null;$Ce.forEach(function(t){var e=Array.isArray(t.env)?t.env:[t.env],r=e.every(function(s){return XCe(s)});if(tc[t.constant]=r,r)switch(tc.name=t.name,typeof t.pr){case"string":tc.isPR=!!uA[t.pr];break;case"object":"env"in t.pr?tc.isPR=t.pr.env in uA&&uA[t.pr.env]!==t.pr.ne:"any"in t.pr?tc.isPR=t.pr.any.some(function(s){return!!uA[s]}):tc.isPR=XCe(t.pr);break;default:tc.isPR=null}});tc.isCI=!!(uA.CI||uA.CONTINUOUS_INTEGRATION||uA.BUILD_NUMBER||uA.RUN_ID||tc.name);function XCe(t){return typeof t=="string"?!!uA[t]:Object.keys(t).every(function(e){return uA[e]===t[e]})}});var rwe=_((LJt,twe)=>{"use strict";twe.exports=ewe().isCI});var iwe=_((MJt,nwe)=>{"use strict";var apt=t=>{let e=new Set;do for(let r of Reflect.ownKeys(t))e.add([t,r]);while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};nwe.exports=(t,{include:e,exclude:r}={})=>{let s=a=>{let n=c=>typeof c=="string"?a===c:c.test(a);return e?e.some(n):r?!r.some(n):!0};for(let[a,n]of apt(t.constructor.prototype)){if(n==="constructor"||!s(n))continue;let c=Reflect.getOwnPropertyDescriptor(a,n);c&&typeof c.value=="function"&&(t[n]=t[n].bind(t))}return t}});var uwe=_(Vn=>{"use strict";var dw,US,PF,R9;typeof performance=="object"&&typeof performance.now=="function"?(swe=performance,Vn.unstable_now=function(){return swe.now()}):(D9=Date,owe=D9.now(),Vn.unstable_now=function(){return D9.now()-owe});var swe,D9,owe;typeof window>"u"||typeof MessageChannel!="function"?(gw=null,b9=null,P9=function(){if(gw!==null)try{var t=Vn.unstable_now();gw(!0,t),gw=null}catch(e){throw setTimeout(P9,0),e}},dw=function(t){gw!==null?setTimeout(dw,0,t):(gw=t,setTimeout(P9,0))},US=function(t,e){b9=setTimeout(t,e)},PF=function(){clearTimeout(b9)},Vn.unstable_shouldYield=function(){return!1},R9=Vn.unstable_forceFrameRate=function(){}):(awe=window.setTimeout,lwe=window.clearTimeout,typeof console<"u"&&(cwe=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),typeof cwe!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")),LS=!1,MS=null,SF=-1,x9=5,k9=0,Vn.unstable_shouldYield=function(){return Vn.unstable_now()>=k9},R9=function(){},Vn.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):x9=0<t?Math
Line truncated
|
|
|
|
|
`+fu+v}var ve=!1;function Nt(v,D){if(!v||ve)return"";ve=!0;var Q=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(D)if(D=function(){throw Error()},Object.defineProperty(D.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(D,[])}catch(pt){var H=pt}Reflect.construct(v,[],D)}else{try{D.call()}catch(pt){H=pt}v.call(D.prototype)}else{try{throw Error()}catch(pt){H=pt}v()}}catch(pt){if(pt&&H&&typeof pt.stack=="string"){for(var V=pt.stack.split(`
|
|
|
|
|
`),ne=H.stack.split(`
|
|
|
|
|
`),Se=V.length-1,_e=ne.length-1;1<=Se&&0<=_e&&V[Se]!==ne[_e];)_e--;for(;1<=Se&&0<=_e;Se--,_e--)if(V[Se]!==ne[_e]){if(Se!==1||_e!==1)do if(Se--,_e--,0>_e||V[Se]!==ne[_e])return`
|
|
|
|
|
`+V[Se].replace(" at new "," at ");while(1<=Se&&0<=_e);break}}}finally{ve=!1,Error.prepareStackTrace=Q}return(v=v?v.displayName||v.name:"")?oc(v):""}var ac=[],Ni=-1;function no(v){return{current:v}}function Tt(v){0>Ni||(v.current=ac[Ni],ac[Ni]=null,Ni--)}function xn(v,D){Ni++,ac[Ni]=v.current,v.current=D}var aa={},Hi=no(aa),Oi=no(!1),Na=aa;function dn(v,D){var Q=v.type.contextTypes;if(!Q)return aa;var H=v.stateNode;if(H&&H.__reactInternalMemoizedUnmaskedChildContext===D)return H.__reactInternalMemoizedMaskedChildContext;var V={},ne;for(ne in Q)V[ne]=D[ne];return H&&(v=v.stateNode,v.__reactInternalMemoizedUnmaskedChildContext=D,v.__reactInternalMemoizedMaskedChildContext=V),V}function Kn(v){return v=v.childContextTypes,v!=null}function Au(){Tt(Oi),Tt(Hi)}function yh(v,D,Q){if(Hi.current!==aa)throw Error(c(168));xn(Hi,D),xn(Oi,Q)}function Oa(v,D,Q){var H=v.stateNode;if(v=D.childContextTypes,typeof H.getChildContext!="function")return Q;H=H.getChildContext();for(var V in H)if(!(V in v))throw Error(c(108,g(D)||"Unknown",V));return s({},Q,H)}function La(v){return v=(v=v.stateNode)&&v.__reactInternalMemoizedMergedChildContext||aa,Na=Hi.current,xn(Hi,v),xn(Oi,Oi.current),!0}function Ma(v,D,Q){var H=v.stateNode;if(!H)throw Error(c(169));Q?(v=Oa(v,D,Na),H.__reactInternalMemoizedMergedChildContext=v,Tt(Oi),Tt(Hi),xn(Hi,v)):Tt(Oi),xn(Oi,Q)}var $e=null,Ua=null,hf=n.unstable_now;hf();var lc=0,wn=8;function la(v){if(1&v)return wn=15,1;if(2&v)return wn=14,2;if(4&v)return wn=13,4;var D=24&v;return D!==0?(wn=12,D):v&32?(wn=11,32):(D=192&v,D!==0?(wn=10,D):v&256?(wn=9,256):(D=3584&v,D!==0?(wn=8,D):v&4096?(wn=7,4096):(D=4186112&v,D!==0?(wn=6,D):(D=62914560&v,D!==0?(wn=5,D):v&67108864?(wn=4,67108864):v&134217728?(wn=3,134217728):(D=805306368&v,D!==0?(wn=2,D):1073741824&v?(wn=1,1073741824):(wn=8,v))))))}function LA(v){switch(v){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function MA(v){switch(v){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(c(358,v))}}function ca(v,D){var Q=v.pendingLanes;if(Q===0)return wn=0;var H=0,V=0,ne=v.expiredLanes,Se=v.suspendedLanes,_e=v.pingedLanes;if(ne!==0)H=ne,V=wn=15;else if(ne=Q&134217727,ne!==0){var pt=ne&~Se;pt!==0?(H=la(pt),V=wn):(_e&=ne,_e!==0&&(H=la(_e),V=wn))}else ne=Q&~Se,ne!==0?(H=la(ne),V=wn):_e!==0&&(H=la(_e),V=wn);if(H===0)return 0;if(H=31-rs(H),H=Q&((0>H?0:1<<H)<<1)-1,D!==0&&D!==H&&!(D&Se)){if(la(D),V<=wn)return D;wn=V}if(D=v.entangledLanes,D!==0)for(v=v.entanglements,D&=H;0<D;)Q=31-rs(D),V=1<<Q,H|=v[Q],D&=~V;return H}function Bl(v){return v=v.pendingLanes&-1073741825,v!==0?v:v&1073741824?1073741824:0}function Mt(v,D){switch(v){case 15:return 1;case 14:return 2;case 12:return v=kn(24&~D),v===0?Mt(10,D):v;case 10:return v=kn(192&~D),v===0?Mt(8,D):v;case 8:return v=kn(3584&~D),v===0&&(v=kn(4186112&~D),v===0&&(v=512)),v;case 2:return D=kn(805306368&~D),D===0&&(D=268435456),D}throw Error(c(358,v))}function kn(v){return v&-v}function ua(v){for(var D=[],Q=0;31>Q;Q++)D.push(v);return D}function Ha(v,D,Q){v.pendingLanes|=D;var H=D-1;v.suspendedLanes&=H,v.pingedLanes&=H,v=v.eventTimes,D=31-rs(D),v[D]=Q}var rs=Math.clz32?Math.clz32:uc,cc=Math.log,pu=Math.LN2;function uc(v){return v===0?32:31-(cc(v)/pu|0)|0}var ja=n.unstable_runWithPriority,Li=n.unstable_scheduleCallback,Is=n.unstable_cancelCallback,vl=n.unstable_shouldYield,gf=n.unstable_requestPaint,fc=n.unstable_now,wi=n.unstable_getCurrentPriorityLevel,Qn=n.unstable_ImmediatePriority,Ac=n.unstable_UserBlockingPriority,Ke=n.unstable_NormalPriority,st=n.unstable_LowPriority,St=n.unstable_IdlePriority,lr={},te=gf!==void 0?gf:function(){},Ee=null,Oe=null,dt=!1,Et=fc(),bt=1e4>Et?fc:function(){return fc()-Et};function tr(){switch(wi()){case Qn:return 99;case Ac:return 98;case Ke:return 97;case st:return 96;case St:return 95;default:throw Error(c(332))}}function fn(v){switch(v){case 99:return Qn;case 98:return Ac;case 97:return Ke;case 96:return st;case 95:return St;default:throw Error(c(332))}}function li(v,D){return v=fn(v),ja(v,D)}function ji(v,D,Q){return v=fn(v),Li(v,D,Q)}function Rn(){if(Oe!==null){var v=Oe;Oe=null,Is(v)}Ga()}function Ga(){if(!dt&&Ee!==null){dt=!0;var v=0;try{var D=Ee;li(99,function(){for(;v<D.length;v++){var Q=D[v];do Q=Q(!0);while(Q!==null)}}),Ee=null}catch(Q){throw Ee!==null&&(Ee=Ee.slice(v+1)),Li(Qn,Rn),Q}finally{dt=!1}}}var my=f.ReactCurrentBatchConfig;function z1(v,D){return v===D&&(v!==0||1/v===1/D)||v!==v&&D!==D}var vo=typeof Object.is=="function"?Object.is:z1,yy=Object.prototype.hasOwnProperty;function Eh(v,D){if(vo(v,D))return!0;if(typeof v!="object"||v===null||typeof D!="object"||D===null)return!1;var Q=Object.keys(v),H=Object.keys(D);if(Q.length!==H.length)return!1;for(H=0;H<Q.length;H++)if(!yy.call(D,Q[H])||!vo(v[Q[H]],D[Q[H]]))return!1;return!0}function Z1(v){switch(v.tag){case 5:return oc(v.type);case 16:return oc("Lazy"
Line truncated
|
|
|
|
|
Error generating stack: `+ne.message+`
|
|
|
|
|
`+ne.stack}return{value:v,source:D,stack:V}}function Vg(v,D){try{console.error(D.value)}catch(Q){setTimeout(function(){throw Q})}}var HL=typeof WeakMap=="function"?WeakMap:Map;function r2(v,D,Q){Q=Dl(-1,Q),Q.tag=3,Q.payload={element:null};var H=D.value;return Q.callback=function(){_y||(_y=!0,d2=H),Vg(v,D)},Q}function Jg(v,D,Q){Q=Dl(-1,Q),Q.tag=3;var H=v.type.getDerivedStateFromError;if(typeof H=="function"){var V=D.value;Q.payload=function(){return Vg(v,D),H(V)}}var ne=v.stateNode;return ne!==null&&typeof ne.componentDidCatch=="function"&&(Q.callback=function(){typeof H!="function"&&(hc===null?hc=new Set([this]):hc.add(this),Vg(v,D));var Se=D.stack;this.componentDidCatch(D.value,{componentStack:Se!==null?Se:""})}),Q}var jL=typeof WeakSet=="function"?WeakSet:Set;function n2(v){var D=v.ref;if(D!==null)if(typeof D=="function")try{D(null)}catch(Q){xf(v,Q)}else D.current=null}function xy(v,D){switch(D.tag){case 0:case 11:case 15:case 22:return;case 1:if(D.flags&256&&v!==null){var Q=v.memoizedProps,H=v.memoizedState;v=D.stateNode,D=v.getSnapshotBeforeUpdate(D.elementType===D.type?Q:So(D.type,Q),H),v.__reactInternalSnapshotBeforeUpdate=D}return;case 3:F&&D.flags&256&&Rs(D.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(c(163))}function Rh(v,D){if(D=D.updateQueue,D=D!==null?D.lastEffect:null,D!==null){var Q=D=D.next;do{if((Q.tag&v)===v){var H=Q.destroy;Q.destroy=void 0,H!==void 0&&H()}Q=Q.next}while(Q!==D)}}function lP(v,D,Q){switch(Q.tag){case 0:case 11:case 15:case 22:if(D=Q.updateQueue,D=D!==null?D.lastEffect:null,D!==null){v=D=D.next;do{if((v.tag&3)===3){var H=v.create;v.destroy=H()}v=v.next}while(v!==D)}if(D=Q.updateQueue,D=D!==null?D.lastEffect:null,D!==null){v=D=D.next;do{var V=v;H=V.next,V=V.tag,V&4&&V&1&&(wP(Q,v),XL(Q,v)),v=H}while(v!==D)}return;case 1:v=Q.stateNode,Q.flags&4&&(D===null?v.componentDidMount():(H=Q.elementType===Q.type?D.memoizedProps:So(Q.type,D.memoizedProps),v.componentDidUpdate(H,D.memoizedState,v.__reactInternalSnapshotBeforeUpdate))),D=Q.updateQueue,D!==null&&Cy(Q,D,v);return;case 3:if(D=Q.updateQueue,D!==null){if(v=null,Q.child!==null)switch(Q.child.tag){case 5:v=Te(Q.child.stateNode);break;case 1:v=Q.child.stateNode}Cy(Q,D,v)}return;case 5:v=Q.stateNode,D===null&&Q.flags&4&&$s(v,Q.type,Q.memoizedProps,Q);return;case 6:return;case 4:return;case 12:return;case 13:Z&&Q.memoizedState===null&&(Q=Q.alternate,Q!==null&&(Q=Q.memoizedState,Q!==null&&(Q=Q.dehydrated,Q!==null&&uu(Q))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(c(163))}function cP(v,D){if(F)for(var Q=v;;){if(Q.tag===5){var H=Q.stateNode;D?dh(H):to(Q.stateNode,Q.memoizedProps)}else if(Q.tag===6)H=Q.stateNode,D?mh(H):jn(H,Q.memoizedProps);else if((Q.tag!==23&&Q.tag!==24||Q.memoizedState===null||Q===v)&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===v)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===v)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}}function ky(v,D){if(Ua&&typeof Ua.onCommitFiberUnmount=="function")try{Ua.onCommitFiberUnmount($e,D)}catch{}switch(D.tag){case 0:case 11:case 14:case 15:case 22:if(v=D.updateQueue,v!==null&&(v=v.lastEffect,v!==null)){var Q=v=v.next;do{var H=Q,V=H.destroy;if(H=H.tag,V!==void 0)if(H&4)wP(D,Q);else{H=D;try{V()}catch(ne){xf(H,ne)}}Q=Q.next}while(Q!==v)}break;case 1:if(n2(D),v=D.stateNode,typeof v.componentWillUnmount=="function")try{v.props=D.memoizedProps,v.state=D.memoizedState,v.componentWillUnmount()}catch(ne){xf(D,ne)}break;case 5:n2(D);break;case 4:F?pP(v,D):z&&z&&(D=D.stateNode.containerInfo,v=ou(D),RA(D,v))}}function uP(v,D){for(var Q=D;;)if(ky(v,Q),Q.child===null||F&&Q.tag===4){if(Q===D)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===D)return;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}else Q.child.return=Q,Q=Q.child}function Qy(v){v.alternate=null,v.child=null,v.dependencies=null,v.firstEffect=null,v.lastEffect=null,v.memoizedProps=null,v.memoizedState=null,v.pendingProps=null,v.return=null,v.updateQueue=null}function fP(v){return v.tag===5||v.tag===3||v.tag===4}function AP(v){if(F){e:{for(var D=v.return;D!==null;){if(fP(D))break e;D=D.return}throw Error(c(160))}var Q=D;switch(D=Q.stateNode,Q.tag){case 5:var H=!1;break;case 3:D=D.containerInfo,H=!0;break;case 4:D=D.containerInfo,H=!0;break;default:throw Error(c(161))}Q.flags&16&&(Af(D),Q.flags&=-17);e:t:for(Q=v;;){for(;Q.sibling===null;){if(Q.return===null||fP(Q.return)){Q=null;break e}Q=Q.return}for(Q.sibling.return=Q.return,Q=Q.sibling;Q.tag!==5&&Q.tag!==6&&Q.tag!==18;){if(Q.flags&2||Q.child===null||Q.tag===4)continue t;Q.child.return=Q,Q=Q.child}if(!(Q.flags&2)){Q=Q.stateNode;break e}}H?i2(v,Q,D):s2(v,Q,D)}}function i2(v,D,Q){var H=v.tag,V=H===5||H===6;if(V)v=V?v.stateNode:v.stateNode.instance,D?eo(Q,v,D):Io(Q,v);else if(H!==4&&(v=v.child,v!==null))for(i2(v,D,Q),v=v.sibling;v!==null;)i2(v,D,Q),v=v.sibling}function s2(v,D,Q){var H=v.tag,V=H===5||H===6;if(V)v=V?v.stateNode:v.stateNode.instance,D?_i(Q,v,D):ai(Q,v);els
Line truncated
|
|
|
|
|
|
|
|
|
|
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`)}ws!==5&&(ws=2),pt=Yg(pt,_e),Xt=Se;do{switch(Xt.tag){case 3:ne=pt,Xt.flags|=4096,D&=-D,Xt.lanes|=D;var Xn=r2(Xt,ne,D);Iy(Xt,Xn);break e;case 1:ne=pt;var kr=Xt.type,Tn=Xt.stateNode;if(!(Xt.flags&64)&&(typeof kr.getDerivedStateFromError=="function"||Tn!==null&&typeof Tn.componentDidCatch=="function"&&(hc===null||!hc.has(Tn)))){Xt.flags|=4096,D&=-D,Xt.lanes|=D;var _n=Jg(Xt,ne,D);Iy(Xt,_n);break e}}Xt=Xt.return}while(Xt!==null)}CP(Q)}catch(zr){D=zr,zi===Q&&Q!==null&&(zi=Q=Q.return);continue}break}while(!0)}function EP(){var v=My.current;return My.current=kt,v===null?kt:v}function id(v,D){var Q=xr;xr|=16;var H=EP();so===v&&Ns===D||Oh(v,D);do try{JL();break}catch(V){yP(v,V)}while(!0);if(Fg(),xr=Q,My.current=H,zi!==null)throw Error(c(261));return so=null,Ns=0,ws}function JL(){for(;zi!==null;)IP(zi)}function KL(){for(;zi!==null&&!vl();)IP(zi)}function IP(v){var D=SP(v.alternate,v,XA);v.memoizedProps=v.pendingProps,D===null?CP(v):zi=D,c2.current=null}function CP(v){var D=v;do{var Q=D.alternate;if(v=D.return,D.flags&2048){if(Q=_L(D),Q!==null){Q.flags&=2047,zi=Q;return}v!==null&&(v.firstEffect=v.lastEffect=null,v.flags|=2048)}else{if(Q=UL(Q,D,XA),Q!==null){zi=Q;return}if(Q=D,Q.tag!==24&&Q.tag!==23||Q.memoizedState===null||XA&1073741824||!(Q.mode&4)){for(var H=0,V=Q.child;V!==null;)H|=V.lanes|V.childLanes,V=V.sibling;Q.childLanes=H}v!==null&&!(v.flags&2048)&&(v.firstEffect===null&&(v.firstEffect=D.firstEffect),D.lastEffect!==null&&(v.lastEffect!==null&&(v.lastEffect.nextEffect=D.firstEffect),v.lastEffect=D.lastEffect),1<D.flags&&(v.lastEffect!==null?v.lastEffect.nextEffect=D:v.firstEffect=D,v.lastEffect=D))}if(D=D.sibling,D!==null){zi=D;return}zi=D=v}while(D!==null);ws===0&&(ws=5)}function $A(v){var D=tr();return li(99,zL.bind(null,v,D)),null}function zL(v,D){do vu();while($g!==null);if(xr&48)throw Error(c(327));var Q=v.finishedWork;if(Q===null)return null;if(v.finishedWork=null,v.finishedLanes=0,Q===v.current)throw Error(c(177));v.callbackNode=null;var H=Q.lanes|Q.childLanes,V=H,ne=v.pendingLanes&~V;v.pendingLanes=V,v.suspendedLanes=0,v.pingedLanes=0,v.expiredLanes&=V,v.mutableReadLanes&=V,v.entangledLanes&=V,V=v.entanglements;for(var Se=v.eventTimes,_e=v.expirationTimes;0<ne;){var pt=31-rs(ne),qt=1<<pt;V[pt]=0,Se[pt]=-1,_e[pt]=-1,ne&=~qt}if(wu!==null&&!(H&24)&&wu.has(v)&&wu.delete(v),v===so&&(zi=so=null,Ns=0),1<Q.flags?Q.lastEffect!==null?(Q.lastEffect.nextEffect=Q,H=Q.firstEffect):H=Q:H=Q.firstEffect,H!==null){V=xr,xr|=32,c2.current=null,rd=rt(v.containerInfo),nd=!1,sr=H;do try{ZL()}catch(Ge){if(sr===null)throw Error(c(330));xf(sr,Ge),sr=sr.nextEffect}while(sr!==null);rd=null,sr=H;do try{for(Se=v;sr!==null;){var vr=sr.flags;if(vr&16&&F&&Af(sr.stateNode),vr&128){var Lr=sr.alternate;if(Lr!==null){var Xt=Lr.ref;Xt!==null&&(typeof Xt=="function"?Xt(null):Xt.current=null)}}switch(vr&1038){case 2:AP(sr),sr.flags&=-3;break;case 6:AP(sr),sr.flags&=-3,o2(sr.alternate,sr);break;case 1024:sr.flags&=-1025;break;case 1028:sr.flags&=-1025,o2(sr.alternate,sr);break;case 4:o2(sr.alternate,sr);break;case 8:_e=Se,ne=sr,F?pP(_e,ne):uP(_e,ne);var zn=ne.alternate;Qy(ne),zn!==null&&Qy(zn)}sr=sr.nextEffect}}catch(Ge){if(sr===null)throw Error(c(330));xf(sr,Ge),sr=sr.nextEffect}while(sr!==null);nd&<(),Fe(v.containerInfo),v.current=Q,sr=H;do try{for(vr=v;sr!==null;){var yi=sr.flags;if(yi&36&&lP(vr,sr.alternate,sr),yi&128){Lr=void 0;var za=sr.ref;if(za!==null){var et=sr.stateNode;switch(sr.tag){case 5:Lr=Te(et);break;default:Lr=et}typeof za=="function"?za(Lr):za.current=Lr}}sr=sr.nextEffect}}catch(Ge){if(sr===null)throw Error(c(330));xf(sr,Ge),sr=sr.nextEffect}while(sr!==null);sr=null,te(),xr=V}else v.current=Q;if(Pf)Pf=!1,$g=v,ed=D;else for(sr=H;sr!==null;)D=sr.nextEffect,sr.nextEffect=null,sr.flags&8&&(yi=sr,yi.sibling=null,yi.stateNode=null),sr=D;if(H=v.pendingLanes,H===0&&(hc=null),H===1?v===E2?td++:(td=0,E2=v):td=0,Q=Q.stateNode,Ua&&typeof Ua.onCommitFiberRoot=="function")try{Ua.onCommitFiberRoot($e,Q,void 0,(Q.current.flags&64)===64)}catch{}if(ha(v,bt()),_y)throw _y=!1,v=d2,d2=null,v;return xr&8||Rn(),null}function ZL(){for(;sr!==null;){var v=sr.alternate;nd||rd===null||(sr.flags&8?De(sr,rd)&&(nd=!0,Re()):sr.tag===13&&qL(v,sr)&&De(sr,rd)&&(nd=!0,Re()));var D=sr.flags;D&256&&xy(v,sr),!(D&512)||Pf||(Pf=!0,ji(97,function(){return vu(),null})),sr=sr.nextEffect}}function vu(){if(ed!==90){var v=97<ed?97:ed;return ed=90,li(v,$L)}return!1}function XL(v,D){m2.push(D,v),Pf||(Pf=!0,ji(97,function(){return vu(),null}))}function wP(v,D){y2.push(D,v),Pf||(Pf=!0,ji(97,function(){return vu(),null}))}function $L(){if($g===null)return!1;var v=$g;if($g=null,xr&48)throw Error(c(331));var D=xr;xr|=32;var Q=y2;y2=[];for(var H=0;H<Q.length;H+=2){var V=Q[H],ne=Q[H+1],Se=V.destroy;if(V.destroy=void 0,typeof Se=="function")try{Se()}catch(pt){if(ne===null)throw Error(c(330));xf(ne,pt)}}for(Q=m2,m2=[],H=0;H<Q.length;H+=2){V=Q[H],ne=Q[H+1];try{va
Line truncated
|
|
|
|
|
`+(H.join(" > ")+`
|
|
|
|
|
|
|
|
|
|
No matching component was found for:
|
|
|
|
|
`)+v.join(" > ")}return null},r.getPublicRootInstance=function(v){if(v=v.current,!v.child)return null;switch(v.child.tag){case 5:return Te(v.child.stateNode);default:return v.child.stateNode}},r.injectIntoDevTools=function(v){if(v={bundleType:v.bundleType,version:v.version,rendererPackageName:v.rendererPackageName,rendererConfig:v.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:f.ReactCurrentDispatcher,findHostInstanceByFiber:iM,findFiberByHostInstance:v.findFiberByHostInstance||sM,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")v=!1;else{var D=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!D.isDisabled&&D.supportsFiber)try{$e=D.inject(v),Ua=D}catch{}v=!0}return v},r.observeVisibleRects=function(v,D,Q,H){if(!Gt)throw Error(c(363));v=l2(v,D);var V=nn(v,Q,H).disconnect;return{disconnect:function(){V()}}},r.registerMutableSourceForHydration=function(v,D){var Q=D._getVersion;Q=Q(D._source),v.mutableSourceEagerHydrationData==null?v.mutableSourceEagerHydrationData=[D,Q]:v.mutableSourceEagerHydrationData.push(D,Q)},r.runWithPriority=function(v,D){var Q=lc;try{return lc=v,D()}finally{lc=Q}},r.shouldSuspend=function(){return!1},r.unbatchedUpdates=function(v,D){var Q=xr;xr&=-2,xr|=8;try{return v(D)}finally{xr=Q,xr===0&&(bf(),Rn())}},r.updateContainer=function(v,D,Q,H){var V=D.current,ne=ko(),Se=Bs(V);e:if(Q){Q=Q._reactInternals;t:{if(we(Q)!==Q||Q.tag!==1)throw Error(c(170));var _e=Q;do{switch(_e.tag){case 3:_e=_e.stateNode.context;break t;case 1:if(Kn(_e.type)){_e=_e.stateNode.__reactInternalMemoizedMergedChildContext;break t}}_e=_e.return}while(_e!==null);throw Error(c(171))}if(Q.tag===1){var pt=Q.type;if(Kn(pt)){Q=Oa(Q,pt,_e);break e}}Q=_e}else Q=aa;return D.context===null?D.context=Q:D.pendingContext=Q,D=Dl(ne,Se),D.payload={element:v},H=H===void 0?null:H,H!==null&&(D.callback=H),bl(V,D),Rl(V,Se,ne),Se},r}});var hwe=_((jJt,pwe)=>{"use strict";pwe.exports=Awe()});var dwe=_((GJt,gwe)=>{"use strict";var upt={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};gwe.exports=upt});var Iwe=_((qJt,Ewe)=>{"use strict";var fpt=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},QF=function(){function t(e,r){for(var s=0;s<r.length;s++){var a=r[s];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(e,r,s){return r&&t(e.prototype,r),s&&t(e,s),e}}();function M9(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function U9(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var tf=dwe(),Apt=function(){function t(e,r,s,a,n,c){U9(this,t),this.left=e,this.right=r,this.top=s,this.bottom=a,this.width=n,this.height=c}return QF(t,[{key:"fromJS",value:function(r){r(this.left,this.right,this.top,this.bottom,this.width,this.height)}},{key:"toString",value:function(){return"<Layout#"+this.left+":"+this.right+";"+this.top+":"+this.bottom+";"+this.width+":"+this.height+">"}}]),t}(),mwe=function(){QF(t,null,[{key:"fromJS",value:function(r){var s=r.width,a=r.height;return new t(s,a)}}]);function t(e,r){U9(this,t),this.width=e,this.height=r}return QF(t,[{key:"fromJS",value:function(r){r(this.width,this.height)}},{key:"toStri
Line truncated
|
|
|
|
|
`+Module.extraStackTrace()),demangleAll(t)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY<TOTAL_STACK&&Module.printErr("TOTAL_MEMORY should be larger than TOTAL_STACK, was "+TOTAL_MEMORY+"! (TOTAL_STACK="+TOTAL_STACK+")"),Module.buffer?buffer=Module.buffer:buffer=new ArrayBuffer(TOTAL_MEMORY),updateGlobalBufferViews();function getTotalMemory(){return TOTAL_MEMORY}if(HEAP32[0]=1668509029,HEAP16[1]=25459,HEAPU8[2]!==115||HEAPU8[3]!==99)throw"Runtime error: expected the system to be little-endian!";Module.HEAP=HEAP,Module.buffer=buffer,Module.HEAP8=HEAP8,Module.HEAP16=HEAP16,Module.HEAP32=HEAP32,Module.HEAPU8=HEAPU8,Module.HEAPU16=HEAPU16,Module.HEAPU32=HEAPU32,Module.HEAPF32=HEAPF32,Module.HEAPF64=HEAPF64;function callRuntimeCallbacks(t){for(;t.length>0;){var e=t.shift();if(typeof e=="function"){e();continue}var r=e.func;typeof r=="number"?e.arg===void 0?Module.dynCall_v(r):Module.dynCall_vi(r,e.arg):r(e.arg===void 0?null:e.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(t){__ATPRERUN__.unshift(t)}Module.addOnPreRun=addOnPreRun;function addOnInit(t){__ATINIT__.unshift(t)}Module.addOnInit=addOnInit;function addOnPreMain(t){__ATMAIN__.unshift(t)}Module.addOnPreMain=addOnPreMain;function addOnExit(t){__ATEXIT__.unshift(t)}Module.addOnExit=addOnExit;function addOnPostRun(t){__ATPOSTRUN__.unshift(t)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(t,e,r){var s=r>0?r:lengthBytesUTF8(t)+1,a=new Array(s),n=stringToUTF8Array(t,a,0,a.length);return e&&(a.length=n),a}Module.intArrayFromString=intArrayFromString;function intArrayToString(t){for(var e=[],r=0;r<t.length;r++){var s=t[r];s>255&&(s&=255),e.push(String.fromCharCode(s))}return e.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(t,e,r){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var s,a;r&&(a=e+lengthBytesUTF8(t),s=HEAP8[a]),stringToUTF8(t,e,1/0),r&&(HEAP8[a]=s)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(t,e){HEAP8.set(t,e)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(t,e,r){for(var s=0;s<t.length;++s)HEAP8[e++>>0]=t.charCodeAt(s);r||(HEAP8[e>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function t(e,r){var s=e>>>16,a=e&65535,n=r>>>16,c=r&65535;return a*c+(s*c+a*n<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(t){return froundBuffer[0]=t,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(t){t=t>>>0;for(var e=0;e<32;e++)if(t&1<<31-e)return e;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.cei
Line truncated
|
|
|
|
|
If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,r="abort("+t+") at "+stackTrace()+e;throw abortDecorators&&abortDecorators.forEach(function(s){r=s(r,t)}),r}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var Fm=_((YJt,wwe)=>{"use strict";var ppt=Iwe(),hpt=Cwe(),_9=!1,H9=null;hpt({},function(t,e){if(!_9){if(_9=!0,t)throw t;H9=e}});if(!_9)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");wwe.exports=ppt(H9.bind,H9.lib)});var G9=_((VJt,j9)=>{"use strict";var Bwe=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);j9.exports=Bwe;j9.exports.default=Bwe});var Swe=_((JJt,vwe)=>{"use strict";vwe.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E
Line truncated
|
|
|
|
|
`))e=Math.max(e,ypt(r));return e};W9.exports=bwe;W9.exports.default=bwe});var Pwe=_(GS=>{"use strict";var Ept=GS&&GS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(GS,"__esModule",{value:!0});var Ipt=Ept(Y9()),V9={};GS.default=t=>{if(t.length===0)return{width:0,height:0};if(V9[t])return V9[t];let e=Ipt.default(t),r=t.split(`
|
|
|
|
|
`).length;return V9[t]={width:e,height:r},{width:e,height:r}}});var xwe=_(qS=>{"use strict";var Cpt=qS&&qS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(qS,"__esModule",{value:!0});var bn=Cpt(Fm()),wpt=(t,e)=>{"position"in e&&t.setPositionType(e.position==="absolute"?bn.default.POSITION_TYPE_ABSOLUTE:bn.default.POSITION_TYPE_RELATIVE)},Bpt=(t,e)=>{"marginLeft"in e&&t.setMargin(bn.default.EDGE_START,e.marginLeft||0),"marginRight"in e&&t.setMargin(bn.default.EDGE_END,e.marginRight||0),"marginTop"in e&&t.setMargin(bn.default.EDGE_TOP,e.marginTop||0),"marginBottom"in e&&t.setMargin(bn.default.EDGE_BOTTOM,e.marginBottom||0)},vpt=(t,e)=>{"paddingLeft"in e&&t.setPadding(bn.default.EDGE_LEFT,e.paddingLeft||0),"paddingRight"in e&&t.setPadding(bn.default.EDGE_RIGHT,e.paddingRight||0),"paddingTop"in e&&t.setPadding(bn.default.EDGE_TOP,e.paddingTop||0),"paddingBottom"in e&&t.setPadding(bn.default.EDGE_BOTTOM,e.paddingBottom||0)},Spt=(t,e)=>{var r;"flexGrow"in e&&t.setFlexGrow((r=e.flexGrow)!==null&&r!==void 0?r:0),"flexShrink"in e&&t.setFlexShrink(typeof e.flexShrink=="number"?e.flexShrink:1),"flexDirection"in e&&(e.flexDirection==="row"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_ROW),e.flexDirection==="row-reverse"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_ROW_REVERSE),e.flexDirection==="column"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_COLUMN),e.flexDirection==="column-reverse"&&t.setFlexDirection(bn.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in e&&(typeof e.flexBasis=="number"?t.setFlexBasis(e.flexBasis):typeof e.flexBasis=="string"?t.setFlexBasisPercent(Number.parseInt(e.flexBasis,10)):t.setFlexBasis(NaN)),"alignItems"in e&&((e.alignItems==="stretch"||!e.alignItems)&&t.setAlignItems(bn.default.ALIGN_STRETCH),e.alignItems==="flex-start"&&t.setAlignItems(bn.default.ALIGN_FLEX_START),e.alignItems==="center"&&t.setAlignItems(bn.default.ALIGN_CENTER),e.alignItems==="flex-end"&&t.setAlignItems(bn.default.ALIGN_FLEX_END)),"alignSelf"in e&&((e.alignSelf==="auto"||!e.alignSelf)&&t.setAlignSelf(bn.default.ALIGN_AUTO),e.alignSelf==="flex-start"&&t.setAlignSelf(bn.default.ALIGN_FLEX_START),e.alignSelf==="center"&&t.setAlignSelf(bn.default.ALIGN_CENTER),e.alignSelf==="flex-end"&&t.setAlignSelf(bn.default.ALIGN_FLEX_END)),"justifyContent"in e&&((e.justifyContent==="flex-start"||!e.justifyContent)&&t.setJustifyContent(bn.default.JUSTIFY_FLEX_START),e.justifyContent==="center"&&t.setJustifyContent(bn.default.JUSTIFY_CENTER),e.justifyContent==="flex-end"&&t.setJustifyContent(bn.default.JUSTIFY_FLEX_END),e.justifyContent==="space-between"&&t.setJustifyContent(bn.default.JUSTIFY_SPACE_BETWEEN),e.justifyContent==="space-around"&&t.setJustifyContent(bn.default.JUSTIFY_SPACE_AROUND))},Dpt=(t,e)=>{var r,s;"width"in e&&(typeof e.width=="number"?t.setWidth(e.width):typeof e.width=="string"?t.setWidthPercent(Number.parseInt(e.width,10)):t.setWidthAuto()),"height"in e&&(typeof e.height=="number"?t.setHeight(e.height):typeof e.height=="string"?t.setHeightPercent(Number.parseInt(e.height,10)):t.setHeightAuto()),"minWidth"in e&&(typeof e.minWidth=="string"?t.setMinWidthPercent(Number.parseInt(e.minWidth,10)):t.setMinWidth((r=e.minWidth)!==null&&r!==void 0?r:0)),"minHeight"in e&&(typeof e.minHeight=="string"?t.setMinHeightPercent(Number.parseInt(e.minHeight,10)):t.setMinHeight((s=e.minHeight)!==null&&s!==void 0?s:0))},bpt=(t,e)=>{"display"in e&&t.setDisplay(e.display==="flex"?bn.default.DISPLAY_FLEX:bn.default.DISPLAY_NONE)},Ppt=(t,e)=>{if("borderStyle"in e){let r=typeof e.borderStyle=="string"?1:0;t.setBorder(bn.default.EDGE_TOP,r),t.setBorder(bn.default.EDGE_BOTTOM,r),t.setBorder(bn.default.EDGE_LEFT,r),t.setBorder(bn.default.EDGE_RIGHT,r)}};qS.default=(t,e={})=>{wpt(t,e),Bpt(t,e),vpt(t,e),Spt(t,e),Dpt(t,e),bpt(t,e),Ppt(t,e)}});var Rwe=_(($Jt,Qwe)=>{"use strict";var WS=jS(),xpt=hk(),kpt=nk(),K9=new Set(["\x1B","\x9B"]),Qpt=39,kwe=t=>`${K9.values().next().value}[${t}m`,Rpt=t=>t.split(" ").map(e=>WS(e)),J9=(t,e,r)=>{let s=[...e],a=!1,n=WS(xpt(t[t.length-1]));for(let[c,f]of s.entries()){let p=WS(f);if(n+p<=r?t[t.length-1]+=f:(t.push(f),n=0),K9.has(f))a=!0;else if(a&&f==="m"){a=!1;continue}a||(n+=p,n===r&&c<s.length-1&&(t.push(""),n=0))}!n&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},Tpt=t=>{let e=t.split(" "),r=e.length;for(;r>0&&!(WS(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},Fpt=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let s="",a="",n,c=Rpt(t),f=[""];for(let[p,h]of t.split(" ").entries()){r.trim!==!1&&(f[f.length-1]=f[f.length-1].trimLeft());let E=WS(f[f.length-1]);if(p!==0&&(E>=e&&(r.wordWrap===!1||r.trim===!1)&&(f.push(""),E=0),(E>0||r.trim===!1)&&(f[f.length-1]+=" ",E++)),r.hard&&c[p]>e){let w=e-E,S=1+Math.floor((c[p]-w-1)/e);Math.floor((c[p]-1)/e)<S&&f.push(""),J9(f,h,e);continue}if(E+c[p]>e&&E>0&&c[p]>0){if(r.wordWrap===!1&&E<e){J9(f,h,e);continue}f.push("")}if(E+c[p]>e&&r.wordWrap===!1){J9(f,h,e);continue}f[f.
Line truncated
|
|
|
|
|
`);for(let[p,h]of[...s].entries()){if(a+=h,K9.has(h)){let w=parseFloat(/\d[^m]*/.exec(s.slice(p,p+4)));n=w===Qpt?null:w}let E=kpt.codes.get(Number(n));n&&E&&(s[p+1]===`
|
|
|
|
|
`?a+=kwe(E):h===`
|
|
|
|
|
`&&(a+=kwe(n)))}return a};Qwe.exports=(t,e,r)=>String(t).normalize().replace(/\r\n/g,`
|
|
|
|
|
`).split(`
|
|
|
|
|
`).map(s=>Fpt(s,e,r)).join(`
|
|
|
|
|
`)});var Nwe=_((eKt,Fwe)=>{"use strict";var Twe="[\uD800-\uDBFF][\uDC00-\uDFFF]",Npt=t=>t&&t.exact?new RegExp(`^${Twe}$`):new RegExp(Twe,"g");Fwe.exports=Npt});var z9=_((tKt,Uwe)=>{"use strict";var Opt=G9(),Lpt=Nwe(),Owe=nk(),Mwe=["\x1B","\x9B"],RF=t=>`${Mwe[0]}[${t}m`,Lwe=(t,e,r)=>{let s=[];t=[...t];for(let a of t){let n=a;a.match(";")&&(a=a.split(";")[0][0]+"0");let c=Owe.codes.get(parseInt(a,10));if(c){let f=t.indexOf(c.toString());f>=0?t.splice(f,1):s.push(RF(e?c:n))}else if(e){s.push(RF(0));break}else s.push(RF(n))}if(e&&(s=s.filter((a,n)=>s.indexOf(a)===n),r!==void 0)){let a=RF(Owe.codes.get(parseInt(r,10)));s=s.reduce((n,c)=>c===a?[c,...n]:[...n,c],[])}return s.join("")};Uwe.exports=(t,e,r)=>{let s=[...t.normalize()],a=[];r=typeof r=="number"?r:s.length;let n=!1,c,f=0,p="";for(let[h,E]of s.entries()){let w=!1;if(Mwe.includes(E)){let S=/\d[^m]*/.exec(t.slice(h,h+18));c=S&&S.length>0?S[0]:void 0,f<r&&(n=!0,c!==void 0&&a.push(c))}else n&&E==="m"&&(n=!1,w=!0);if(!n&&!w&&++f,!Lpt({exact:!0}).test(E)&&Opt(E.codePointAt())&&++f,f>e&&f<=r)p+=E;else if(f===e&&!n&&c!==void 0)p=Lwe(a);else if(f>=r){p+=Lwe(a,!0,c);break}}return p}});var Hwe=_((rKt,_we)=>{"use strict";var $0=z9(),Mpt=jS();function TF(t,e,r){if(t.charAt(e)===" ")return e;for(let s=1;s<=3;s++)if(r){if(t.charAt(e+s)===" ")return e+s}else if(t.charAt(e-s)===" ")return e-s;return e}_we.exports=(t,e,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};let{position:s,space:a,preferTruncationOnSpace:n}=r,c="\u2026",f=1;if(typeof t!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof t}`);if(typeof e!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof e}`);if(e<1)return"";if(e===1)return c;let p=Mpt(t);if(p<=e)return t;if(s==="start"){if(n){let h=TF(t,p-e+1,!0);return c+$0(t,h,p).trim()}return a===!0&&(c+=" ",f=2),c+$0(t,p-e+f,p)}if(s==="middle"){a===!0&&(c=" "+c+" ",f=3);let h=Math.floor(e/2);if(n){let E=TF(t,h),w=TF(t,p-(e-h)+1,!0);return $0(t,0,E)+c+$0(t,w,p).trim()}return $0(t,0,h)+c+$0(t,p-(e-h)+f,p)}if(s==="end"){if(n){let h=TF(t,e-1);return $0(t,0,h)+c}return a===!0&&(c=" "+c,f=2),$0(t,0,e-f)+c}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${s}`)}});var X9=_(YS=>{"use strict";var jwe=YS&&YS.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(YS,"__esModule",{value:!0});var Upt=jwe(Rwe()),_pt=jwe(Hwe()),Z9={};YS.default=(t,e,r)=>{let s=t+String(e)+String(r);if(Z9[s])return Z9[s];let a=t;if(r==="wrap"&&(a=Upt.default(t,e,{trim:!1,hard:!0})),r.startsWith("truncate")){let n="end";r==="truncate-middle"&&(n="middle"),r==="truncate-start"&&(n="start"),a=_pt.default(t,e,{position:n})}return Z9[s]=a,a}});var eW=_($9=>{"use strict";Object.defineProperty($9,"__esModule",{value:!0});var Gwe=t=>{let e="";if(t.childNodes.length>0)for(let r of t.childNodes){let s="";r.nodeName==="#text"?s=r.nodeValue:((r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text")&&(s=Gwe(r)),s.length>0&&typeof r.internal_transform=="function"&&(s=r.internal_transform(s))),e+=s}return e};$9.default=Gwe});var tW=_(bi=>{"use strict";var VS=bi&&bi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bi,"__esModule",{value:!0});bi.setTextNodeValue=bi.createTextNode=bi.setStyle=bi.setAttribute=bi.removeChildNode=bi.insertBeforeNode=bi.appendChildNode=bi.createNode=bi.TEXT_NAME=void 0;var Hpt=VS(Fm()),qwe=VS(Pwe()),jpt=VS(xwe()),Gpt=VS(X9()),qpt=VS(eW());bi.TEXT_NAME="#text";bi.createNode=t=>{var e;let r={nodeName:t,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:t==="ink-virtual-text"?void 0:Hpt.default.Node.create()};return t==="ink-text"&&((e=r.yogaNode)===null||e===void 0||e.setMeasureFunc(Wpt.bind(null,r))),r};bi.appendChildNode=(t,e)=>{var r;e.parentNode&&bi.removeChildNode(e.parentNode,e),e.parentNode=t,t.childNodes.push(e),e.yogaNode&&((r=t.yogaNode)===null||r===void 0||r.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&FF(t)};bi.insertBeforeNode=(t,e,r)=>{var s,a;e.parentNode&&bi.removeChildNode(e.parentNode,e),e.parentNode=t;let n=t.childNodes.indexOf(r);if(n>=0){t.childNodes.splice(n,0,e),e.yogaNode&&((s=t.yogaNode)===null||s===void 0||s.insertChild(e.yogaNode,n));return}t.childNodes.push(e),e.yogaNode&&((a=t.yogaNode)===null||a===void 0||a.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&FF(t)};bi.removeChildNode=(t,e)=>{var r,s;e.yogaNode&&((s=(r=e.parentNode)===null||r===void 0?void 0:r.yogaNode)===null||s===void 0||s.removeChild(e.yogaNode)),e.parentNode=null;let a=t.childNodes.indexOf(e);a>=0&&t.childNodes.splice(a,1),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&FF(t)};bi.setAttribute=(t,e,r)=>{t.attributes[e]=r};bi.setStyle=(t,e)=>{t.style=e,t.yogaNode&&jpt.default(t.yogaNode,e)};bi.createTextNode=t=>{let e={nodeName:"#text",nodeValue:t,yogaLine truncated
|
|
|
|
|
`).repeat(n-2),E=iW.default(f.bottomLeft+f.horizontal.repeat(a-2)+f.bottomRight,c,"foreground");s.write(t,e,p,{transformers:[]}),s.write(t,e+1,h,{transformers:[]}),s.write(t+a-1,e+1,h,{transformers:[]}),s.write(t,e+n-1,E,{transformers:[]})}}});var o1e=_($S=>{"use strict";var Nm=$S&&$S.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty($S,"__esModule",{value:!0});var $pt=Nm(Fm()),eht=Nm(Y9()),tht=Nm(Xwe()),rht=Nm(X9()),nht=Nm($we()),iht=Nm(eW()),sht=Nm(i1e()),oht=(t,e)=>{var r;let s=(r=t.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(s){let a=s.getComputedLeft(),n=s.getComputedTop();e=`
|
|
|
|
|
`.repeat(n)+tht.default(e,a)}return e},s1e=(t,e,r)=>{var s;let{offsetX:a=0,offsetY:n=0,transformers:c=[],skipStaticElements:f}=r;if(f&&t.internal_static)return;let{yogaNode:p}=t;if(p){if(p.getDisplay()===$pt.default.DISPLAY_NONE)return;let h=a+p.getComputedLeft(),E=n+p.getComputedTop(),w=c;if(typeof t.internal_transform=="function"&&(w=[t.internal_transform,...c]),t.nodeName==="ink-text"){let S=iht.default(t);if(S.length>0){let x=eht.default(S),I=nht.default(p);if(x>I){let T=(s=t.style.textWrap)!==null&&s!==void 0?s:"wrap";S=rht.default(S,I,T)}S=oht(t,S),e.write(h,E,S,{transformers:w})}return}if(t.nodeName==="ink-box"&&sht.default(h,E,t,e),t.nodeName==="ink-root"||t.nodeName==="ink-box")for(let S of t.childNodes)s1e(S,e,{offsetX:h,offsetY:E,transformers:w,skipStaticElements:f})}};$S.default=s1e});var c1e=_(eD=>{"use strict";var l1e=eD&&eD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(eD,"__esModule",{value:!0});var a1e=l1e(z9()),aht=l1e(jS()),sW=class{constructor(e){this.writes=[];let{width:r,height:s}=e;this.width=r,this.height=s}write(e,r,s,a){let{transformers:n}=a;s&&this.writes.push({x:e,y:r,text:s,transformers:n})}get(){let e=[];for(let s=0;s<this.height;s++)e.push(" ".repeat(this.width));for(let s of this.writes){let{x:a,y:n,text:c,transformers:f}=s,p=c.split(`
|
|
|
|
|
`),h=0;for(let E of p){let w=e[n+h];if(!w)continue;let S=aht.default(E);for(let x of f)E=x(E);e[n+h]=a1e.default(w,0,a)+E+a1e.default(w,a+S),h++}}return{output:e.map(s=>s.trimRight()).join(`
|
|
|
|
|
`),height:e.length}}};eD.default=sW});var A1e=_(tD=>{"use strict";var oW=tD&&tD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(tD,"__esModule",{value:!0});var lht=oW(Fm()),u1e=oW(o1e()),f1e=oW(c1e());tD.default=(t,e)=>{var r;if(t.yogaNode.setWidth(e),t.yogaNode){t.yogaNode.calculateLayout(void 0,void 0,lht.default.DIRECTION_LTR);let s=new f1e.default({width:t.yogaNode.getComputedWidth(),height:t.yogaNode.getComputedHeight()});u1e.default(t,s,{skipStaticElements:!0});let a;!((r=t.staticNode)===null||r===void 0)&&r.yogaNode&&(a=new f1e.default({width:t.staticNode.yogaNode.getComputedWidth(),height:t.staticNode.yogaNode.getComputedHeight()}),u1e.default(t.staticNode,a,{skipStaticElements:!1}));let{output:n,height:c}=s.get();return{output:n,outputHeight:c,staticOutput:a?`${a.get().output}
|
|
|
|
|
`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var d1e=_((dKt,g1e)=>{"use strict";var p1e=Ie("stream"),h1e=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],aW={},cht=t=>{let e=new p1e.PassThrough,r=new p1e.PassThrough;e.write=a=>t("stdout",a),r.write=a=>t("stderr",a);let s=new console.Console(e,r);for(let a of h1e)aW[a]=console[a],console[a]=s[a];return()=>{for(let a of h1e)console[a]=aW[a];aW={}}};g1e.exports=cht});var cW=_(lW=>{"use strict";Object.defineProperty(lW,"__esModule",{value:!0});lW.default=new WeakMap});var fW=_(uW=>{"use strict";Object.defineProperty(uW,"__esModule",{value:!0});var uht=hn(),m1e=uht.createContext({exit:()=>{}});m1e.displayName="InternalAppContext";uW.default=m1e});var pW=_(AW=>{"use strict";Object.defineProperty(AW,"__esModule",{value:!0});var fht=hn(),y1e=fht.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});y1e.displayName="InternalStdinContext";AW.default=y1e});var gW=_(hW=>{"use strict";Object.defineProperty(hW,"__esModule",{value:!0});var Aht=hn(),E1e=Aht.createContext({stdout:void 0,write:()=>{}});E1e.displayName="InternalStdoutContext";hW.default=E1e});var mW=_(dW=>{"use strict";Object.defineProperty(dW,"__esModule",{value:!0});var pht=hn(),I1e=pht.createContext({stderr:void 0,write:()=>{}});I1e.displayName="InternalStderrContext";dW.default=I1e});var LF=_(yW=>{"use strict";Object.defineProperty(yW,"__esModule",{value:!0});var hht=hn(),C1e=hht.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{},focus:()=>{}});C1e.displayName="InternalFocusContext";yW.default=C1e});var B1e=_((BKt,w1e)=>{"use strict";var ght=/[|\\{}()[\]^$+*?.-]/g;w1e.exports=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(ght,"\\$&")}});var b1e=_((vKt,D1e)=>{"use strict";var dht=B1e(),mht=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",S1e=[].concat(Ie("module").builtinModules,"bootstrap_node","node").map(t=>new RegExp(`(?:\\((?:node:)?${t}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${t}(?:\\.js)?:\\d+:\\d+$)`));S1e.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var EW=class t{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=t.nodeInternals()),"cwd"in e||(e.cwd=mht),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,yht(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...S1e]}clean(e,r=0){r=" ".repeat(r),Array.isArray(e)||(e=e.split(`
|
|
|
|
|
`)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let s=!1,a=null,n=[];return e.forEach(c=>{if(c=c.replace(/\\/g,"/"),this._internals.some(p=>p.test(c)))return;let f=/^\s*at /.test(c);s?c=c.trimEnd().replace(/^(\s+)at /,"$1"):(c=c.trim(),f&&(c=c.slice(3))),c=c.replace(`${this._cwd}/`,""),c&&(f?(a&&(n.push(a),a=null),n.push(c)):(s=!0,a=c))}),n.map(c=>`${r}${c}
|
|
|
|
|
`).join("")}captureString(e,r=this.captureString){typeof e=="function"&&(r=e,e=1/0);let{stackTraceLimit:s}=Error;e&&(Error.stackTraceLimit=e);let a={};Error.captureStackTrace(a,r);let{stack:n}=a;return Error.stackTraceLimit=s,this.clean(n)}capture(e,r=this.capture){typeof e=="function"&&(r=e,e=1/0);let{prepareStackTrace:s,stackTraceLimit:a}=Error;Error.prepareStackTrace=(f,p)=>this._wrapCallSite?p.map(this._wrapCallSite):p,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,r);let{stack:c}=n;return Object.assign(Error,{prepareStackTrace:s,stackTraceLimit:a}),c}at(e=this.at){let[r]=this.capture(1,e);if(!r)return{};let s={line:r.getLineNumber(),column:r.getColumnNumber()};v1e(s,r.getFileName(),this._cwd),r.isConstructor()&&(s.constructor=!0),r.isEval()&&(s.evalOrigin=r.getEvalOrigin()),r.isNative()&&(s.native=!0);let a;try{a=r.getTypeName()}catch{}a&&a!=="Object"&&a!=="[object Object]"&&(s.type=a);let n=r.getFunctionName();n&&(s.function=n);let c=r.getMethodName();return c&&n!==c&&(s.method=c),s}parseLine(e){let r=e&&e.match(Eht);if(!r)return null;let s=r[1]==="new",a=r[2],n=r[3],c=r[4],f=Number(r[5]),p=Number(r[6]),h=r[7],E=r[8],w=r[9],S=r[10]==="native",x=r[11]===")",I,T={};if(E&&(T.line=Number(E)),w&&(T.column=Number(w)),x&&h){let N=0;for(let U=h.length-1;U>0;U--)if(h.charAt(U)===")")N++;else if(h.charAt(U)==="("&&h.charAt(U-1)===" "&&(N--,N===-1&&h.charAt(U-1)===" ")){let W=h.slice(0,U-1);h=h.slice(U+1),a+=` (${W}`;break}}if(a){let N=a.match(Iht);N&&(a=N[1],I=N[2])}return v1e(T,h,this._cwd),s&&(T.constructor=!0),n&&(T.evalOrigin=n,T.evalLine=f,T.evalColumn=p,T.evalFile=c&&c.replace(/\\/g,"/")),S&&(T.native=!0),a&&(T.function=a),I&&a!==I&&(T.method=I),T}};function v1e(t,e,r){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${r}/`)&&(e=e.slice(r.length+1)),t.file=e)}function yht(t){if(t.length===0)return[];let e=t.map(r=>dht(r));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var Eht=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),Iht=/^(.*?) \[as (.*?)\]$/;D1e.exports=EW});var x1e=_((SKt,P1e)=>{"use strict";P1e.exports=(t,e)=>t.replace(/^\t+/gm,r=>" ".repeat(r.length*(e||2)))});var Q1e=_((DKt,k1e)=>{"use strict";var Cht=x1e(),wht=(t,e)=>{let r=[],s=t-e,a=t+e;for(let n=s;n<=a;n++)r.push(n);return r};k1e.exports=(t,e,r)=>{if(typeof t!="string")throw new TypeError("Source code is missing.");if(!e||e<1)throw new TypeError("Line number must start from `1`.");if(t=Cht(t).split(/\r?\n/),!(e>t.length))return r={around:3,...r},wht(e,r.around).filter(s=>t[s-1]!==void 0).map(s=>({line:s,value:t[s-1]}))}});var MF=_(rf=>{"use strict";var Bht=rf&&rf.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),vht=rf&&rf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Sht=rf&&rf.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Bht(e,t,r);return vht(e,t),e},Dht=rf&&rf.__rest||function(t,e){var r={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&e.indexOf(s)<0&&(r[s]=t[s]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(t);a<s.length;a++)e.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(t,s[a])&&(r[s[a]]=t[s[a]]);return r};Object.defineProperty(rf,"__esModule",{value:!0});var R1e=Sht(hn()),IW=R1e.forwardRef((t,e)=>{var{children:r}=t,s=Dht(t,["children"]);let a=Object.assign(Object.assign({},s),{marginLeft:s.marginLeft||s.marginX||s.margin||0,marginRight:s.marginRight||s.marginX||s.margin||0,marginTop:s.marginTop||s.marginY||s.margin||0,marginBottom:s.marginBottom||s.marginY||s.margin||0,paddingLeft:s.paddingLeft||s.paddingX||s.padding||0,paddingRight:s.paddingRight||s.paddingX||s.padding||0,paddingTop:s.paddingTop||s.paddingY||s.padding||0,paddingBottom:s.paddingBottom||s.paddingY||s.padding||0});return R1e.default.createElement("ink-box",{ref:e,style:a},r)});IW.displayName="Box";IW.defaultProps={flexDirection:"row",flexGrow:0,flexShrink:1};rf.default=IW});var BW=_(rD=>{"use strict";var CW=rD&&rD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(rD,"__esModule",{value:!0});var bht=CW(hn()),mw=CW(RE()),T1e=CW(nW()),wW=({color:t,backgroundColor:e,dimColor:r,bold:s,italic:a,underline:n,strikethrough:c,inverse:f,wrap:p,children:h})=>{if(h==null)return null;let E=w=>(r&&(w=mw.default.dim(w)),t&&(w=T1e.default(w,t,"foreground")),e&&(w=T1e.default(w,e,"background")),s&&(w=mw.default.bold(w)),a&&(w=mw.default.italic(w)),n&&(w=mw.default.underline(w)),c&&(w=mw.default.strikethrough(w)),f&&(w=mw.default.inverse(w)),w);return bht.default.createElement("ink-text",{style:{flexGrow:0,flexSLine truncated
|
|
|
|
|
`).slice(1):void 0,r=e?O1e.parseLine(e[0]):void 0,s,a=0;if(r?.file&&r?.line&&F1e.existsSync(r.file)){let n=F1e.readFileSync(r.file,"utf8");if(s=Qht.default(n,r.line),s)for(let{line:c}of s)a=Math.max(a,String(c).length)}return Qs.default.createElement($p.default,{flexDirection:"column",padding:1},Qs.default.createElement($p.default,null,Qs.default.createElement(AA.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),Qs.default.createElement(AA.default,null," ",t.message)),r&&Qs.default.createElement($p.default,{marginTop:1},Qs.default.createElement(AA.default,{dimColor:!0},r.file,":",r.line,":",r.column)),r&&s&&Qs.default.createElement($p.default,{marginTop:1,flexDirection:"column"},s.map(({line:n,value:c})=>Qs.default.createElement($p.default,{key:n},Qs.default.createElement($p.default,{width:a+1},Qs.default.createElement(AA.default,{dimColor:n!==r.line,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0},String(n).padStart(a," "),":")),Qs.default.createElement(AA.default,{key:n,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0}," "+c)))),t.stack&&Qs.default.createElement($p.default,{marginTop:1,flexDirection:"column"},t.stack.split(`
|
|
|
|
|
`).slice(1).map(n=>{let c=O1e.parseLine(n);return c?Qs.default.createElement($p.default,{key:n},Qs.default.createElement(AA.default,{dimColor:!0},"- "),Qs.default.createElement(AA.default,{dimColor:!0,bold:!0},c.function),Qs.default.createElement(AA.default,{dimColor:!0,color:"gray"}," ","(",c.file,":",c.line,":",c.column,")")):Qs.default.createElement($p.default,{key:n},Qs.default.createElement(AA.default,{dimColor:!0},"- "),Qs.default.createElement(AA.default,{dimColor:!0,bold:!0},n))})))};nf.default=Rht});var U1e=_(sf=>{"use strict";var Tht=sf&&sf.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Fht=sf&&sf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Nht=sf&&sf.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Tht(e,t,r);return Fht(e,t),e},Lm=sf&&sf.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sf,"__esModule",{value:!0});var Om=Nht(hn()),M1e=Lm(S9()),Oht=Lm(fW()),Lht=Lm(pW()),Mht=Lm(gW()),Uht=Lm(mW()),_ht=Lm(LF()),Hht=Lm(L1e()),jht=" ",Ght="\x1B[Z",qht="\x1B",UF=class extends Om.PureComponent{constructor(){super(...arguments),this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=e=>{let{stdin:r}=this.props;if(!this.isRawModeSupported())throw r===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
|
|
|
|
|
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink.
|
|
|
|
|
Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(r.setEncoding("utf8"),e){this.rawModeEnabledCount===0&&(r.addListener("data",this.handleInput),r.resume(),r.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount===0&&(r.setRawMode(!1),r.removeListener("data",this.handleInput),r.pause())},this.handleInput=e=>{e===""&&this.props.exitOnCtrlC&&this.handleExit(),e===qht&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(e===jht&&this.focusNext(),e===Ght&&this.focusPrevious())},this.handleExit=e=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(e)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focus=e=>{this.setState(r=>r.focusables.some(a=>a?.id===e)?{activeFocusId:e}:r)},this.focusNext=()=>{this.setState(e=>{var r;let s=(r=e.focusables[0])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findNextFocusable(e)||s}})},this.focusPrevious=()=>{this.setState(e=>{var r;let s=(r=e.focusables[e.focusables.length-1])===null||r===void 0?void 0:r.id;return{activeFocusId:this.findPreviousFocusable(e)||s}})},this.addFocusable=(e,{autoFocus:r})=>{this.setState(s=>{let a=s.activeFocusId;return!a&&r&&(a=e),{activeFocusId:a,focusables:[...s.focusables,{id:e,isActive:!0}]}})},this.removeFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.filter(s=>s.id!==e)}))},this.activateFocusable=e=>{this.setState(r=>({focusables:r.focusables.map(s=>s.id!==e?s:{id:e,isActive:!0})}))},this.deactivateFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.map(s=>s.id!==e?s:{id:e,isActive:!1})}))},this.findNextFocusable=e=>{var r;let s=e.focusables.findIndex(a=>a.id===e.activeFocusId);for(let a=s+1;a<e.focusables.length;a++)if(!((r=e.focusables[a])===null||r===void 0)&&r.isActive)return e.focusables[a].id},this.findPreviousFocusable=e=>{var r;let s=e.focusables.findIndex(a=>a.id===e.activeFocusId);for(let a=s-1;a>=0;a--)if(!((r=e.focusables[a])===null||r===void 0)&&r.isActive)return e.focusables[a].id}}static getDerivedStateFromError(e){return{error:e}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return Om.default.createElement(Oht.default.Provider,{value:{exit:this.handleExit}},Om.default.createElement(Lht.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},Om.default.createElement(Mht.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},Om.default.createElement(Uht.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},Om.default.createElement(_ht.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious,focus:this.focus}},this.state.error?Om.default.createElement(Hht.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){M1e.default.hide(this.props.stdout)}componentWillUnmount(){M1e.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(e){this.handleExit(e)}};sf.default=UF;UF.displayName="InternalApp"});var j1e=_(of=>{"use strict";var Wht=of&&of.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),Yht=of&&of.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Vht=of&&of.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&Wht(e,t,r);return Yht(e,t),e},af=of&&of.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(of,"__esModule",{value:!0});var Jht=af(hn()),_1e=FCe(),Kht=af(zCe()),zht=af(I9()),Zht=af(rwe()),Xht=af(iwe()),vW=af(zwe()),$ht=af(A1e()),e0t=af(v9()),t0t=af(d1e()),r0t=Vht(tW()),n0t=af(cW()),i0t=af(U1e()),yw=process.env.CI==="false"?!1:Zht.default,H1e=()=>{},SW=class{constructor(e){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:r,outputHeight:s,staticOutput:a}=$ht.default(this.rootNode,this.options.stdout.columns||80),n=a&&a!==`
|
|
|
|
|
`;if(this.options.debug){n&&(this.fullStaticOutput+=a),this.options.stdout.write(this.fullStaticOutput+r);return}if(yw){n&&this.options.stdout.write(a),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=a),s>=this.options.stdout.rows){this.options.stdout.write(zht.default.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}n&&(this.log.clear(),this.options.stdout.write(a),this.log(r)),!n&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r},Xht.default(this),this.options=e,this.rootNode=r0t.createNode("ink-root"),this.rootNode.onRender=e.debug?this.onRender:_1e(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=Kht.default.create(e.stdout),this.throttledLog=e.debug?this.log:_1e(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=vW.default.createContainer(this.rootNode,0,!1,null),this.unsubscribeExit=e0t.default(this.unmount,{alwaysLast:!1}),e.patchConsole&&this.patchConsole(),yw||(e.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{e.stdout.off("resize",this.onRender)})}render(e){let r=Jht.default.createElement(i0t.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},e);vW.default.updateContainer(r,this.container,null,H1e)}writeToStdout(e){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput);return}if(yw){this.options.stdout.write(e);return}this.log.clear(),this.options.stdout.write(e),this.log(this.lastOutput)}}writeToStderr(e){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(e),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(yw){this.options.stderr.write(e);return}this.log.clear(),this.options.stderr.write(e),this.log(this.lastOutput)}}unmount(e){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),yw?this.options.stdout.write(this.lastOutput+`
|
|
|
|
|
`):this.options.debug||this.log.done(),this.isUnmounted=!0,vW.default.updateContainer(null,this.container,null,H1e),n0t.default.delete(this.options.stdout),e instanceof Error?this.rejectExitPromise(e):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((e,r)=>{this.resolveExitPromise=e,this.rejectExitPromise=r})),this.exitPromise}clear(){!yw&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=t0t.default((e,r)=>{e==="stdout"&&this.writeToStdout(r),e==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}};of.default=SW});var q1e=_(iD=>{"use strict";var G1e=iD&&iD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(iD,"__esModule",{value:!0});var s0t=G1e(j1e()),_F=G1e(cW()),o0t=Ie("stream"),a0t=(t,e)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},l0t(e)),s=c0t(r.stdout,()=>new s0t.default(r));return s.render(t),{rerender:s.render,unmount:()=>s.unmount(),waitUntilExit:s.waitUntilExit,cleanup:()=>_F.default.delete(r.stdout),clear:s.clear}};iD.default=a0t;var l0t=(t={})=>t instanceof o0t.Stream?{stdout:t,stdin:process.stdin}:t,c0t=(t,e)=>{let r;return _F.default.has(t)?r=_F.default.get(t):(r=e(),_F.default.set(t,r)),r}});var Y1e=_(eh=>{"use strict";var u0t=eh&&eh.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r),Object.defineProperty(t,s,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),f0t=eh&&eh.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),A0t=eh&&eh.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&u0t(e,t,r);return f0t(e,t),e};Object.defineProperty(eh,"__esModule",{value:!0});var sD=A0t(hn()),W1e=t=>{let{items:e,children:r,style:s}=t,[a,n]=sD.useState(0),c=sD.useMemo(()=>e.slice(a),[e,a]);sD.useLayoutEffect(()=>{n(e.length)},[e.length]);let f=c.map((h,E)=>r(h,a+E)),p=sD.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},s),[s]);return sD.default.createElement("ink-box",{internal_static:!0,style:p},f)};W1e.displayName="Static";eh.default=W1e});var J1e=_(oD=>{"use strict";var p0t=oD&&oD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(oD,"__esModule",{value:!0});var h0t=p0t(hn()),V1e=({children:t,transform:e})=>t==null?null:h0t.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:e},t);V1e.displayName="Transform";oD.default=V1e});var z1e=_(aD=>{"use strict";var g0t=aD&&aD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(aD,"__esModule",{value:!0});var d0t=g0t(hn()),K1e=({count:t=1})=>d0t.default.createElement("ink-text",null,`
|
|
|
|
|
`.repeat(t));K1e.displayName="Newline";aD.default=K1e});var $1e=_(lD=>{"use strict";var Z1e=lD&&lD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lD,"__esModule",{value:!0});var m0t=Z1e(hn()),y0t=Z1e(MF()),X1e=()=>m0t.default.createElement(y0t.default,{flexGrow:1});X1e.displayName="Spacer";lD.default=X1e});var HF=_(cD=>{"use strict";var E0t=cD&&cD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cD,"__esModule",{value:!0});var I0t=hn(),C0t=E0t(pW()),w0t=()=>I0t.useContext(C0t.default);cD.default=w0t});var t2e=_(uD=>{"use strict";var B0t=uD&&uD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(uD,"__esModule",{value:!0});var e2e=hn(),v0t=B0t(HF()),S0t=(t,e={})=>{let{stdin:r,setRawMode:s,internal_exitOnCtrlC:a}=v0t.default();e2e.useEffect(()=>{if(e.isActive!==!1)return s(!0),()=>{s(!1)}},[e.isActive,s]),e2e.useEffect(()=>{if(e.isActive===!1)return;let n=c=>{let f=String(c),p={upArrow:f==="\x1B[A",downArrow:f==="\x1B[B",leftArrow:f==="\x1B[D",rightArrow:f==="\x1B[C",pageDown:f==="\x1B[6~",pageUp:f==="\x1B[5~",return:f==="\r",escape:f==="\x1B",ctrl:!1,shift:!1,tab:f===" "||f==="\x1B[Z",backspace:f==="\b",delete:f==="\x7F"||f==="\x1B[3~",meta:!1};f<=""&&!p.return&&(f=String.fromCharCode(f.charCodeAt(0)+97-1),p.ctrl=!0),f.startsWith("\x1B")&&(f=f.slice(1),p.meta=!0);let h=f>="A"&&f<="Z",E=f>="\u0410"&&f<="\u042F";f.length===1&&(h||E)&&(p.shift=!0),p.tab&&f==="[Z"&&(p.shift=!0),(p.tab||p.backspace||p.delete)&&(f=""),(!(f==="c"&&p.ctrl)||!a)&&t(f,p)};return r?.on("data",n),()=>{r?.off("data",n)}},[e.isActive,r,a,t])};uD.default=S0t});var r2e=_(fD=>{"use strict";var D0t=fD&&fD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fD,"__esModule",{value:!0});var b0t=hn(),P0t=D0t(fW()),x0t=()=>b0t.useContext(P0t.default);fD.default=x0t});var n2e=_(AD=>{"use strict";var k0t=AD&&AD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(AD,"__esModule",{value:!0});var Q0t=hn(),R0t=k0t(gW()),T0t=()=>Q0t.useContext(R0t.default);AD.default=T0t});var i2e=_(pD=>{"use strict";var F0t=pD&&pD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pD,"__esModule",{value:!0});var N0t=hn(),O0t=F0t(mW()),L0t=()=>N0t.useContext(O0t.default);pD.default=L0t});var o2e=_(gD=>{"use strict";var s2e=gD&&gD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(gD,"__esModule",{value:!0});var hD=hn(),M0t=s2e(LF()),U0t=s2e(HF()),_0t=({isActive:t=!0,autoFocus:e=!1,id:r}={})=>{let{isRawModeSupported:s,setRawMode:a}=U0t.default(),{activeId:n,add:c,remove:f,activate:p,deactivate:h,focus:E}=hD.useContext(M0t.default),w=hD.useMemo(()=>r??Math.random().toString().slice(2,7),[r]);return hD.useEffect(()=>(c(w,{autoFocus:e}),()=>{f(w)}),[w,e]),hD.useEffect(()=>{t?p(w):h(w)},[t,w]),hD.useEffect(()=>{if(!(!s||!t))return a(!0),()=>{a(!1)}},[t]),{isFocused:!!w&&n===w,focus:E}};gD.default=_0t});var a2e=_(dD=>{"use strict";var H0t=dD&&dD.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(dD,"__esModule",{value:!0});var j0t=hn(),G0t=H0t(LF()),q0t=()=>{let t=j0t.useContext(G0t.default);return{enableFocus:t.enableFocus,disableFocus:t.disableFocus,focusNext:t.focusNext,focusPrevious:t.focusPrevious,focus:t.focus}};dD.default=q0t});var l2e=_(DW=>{"use strict";Object.defineProperty(DW,"__esModule",{value:!0});DW.default=t=>{var e,r,s,a;return{width:(r=(e=t.yogaNode)===null||e===void 0?void 0:e.getComputedWidth())!==null&&r!==void 0?r:0,height:(a=(s=t.yogaNode)===null||s===void 0?void 0:s.getComputedHeight())!==null&&a!==void 0?a:0}}});var Wc=_(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});var W0t=q1e();Object.defineProperty(mo,"render",{enumerable:!0,get:function(){return W0t.default}});var Y0t=MF();Object.defineProperty(mo,"Box",{enumerable:!0,get:function(){return Y0t.default}});var V0t=BW();Object.defineProperty(mo,"Text",{enumerable:!0,get:function(){return V0t.default}});var J0t=Y1e();Object.defineProperty(mo,"Static",{enumerable:!0,get:function(){return J0t.default}});var K0t=J1e();Object.defineProperty(mo,"Transform",{enumerable:!0,get:function(){return K0t.default}});var z0t=z1e();Object.defineProperty(mo,"Newline",{enumerable:!0,get:function(){return z0t.default}});var Z0t=$1e();Object.defineProperty(mo,"Spacer",{enumerable:!0,get:function(){return Z0t.default}});var X0t=t2e();Object.defineProperty(mo,"useInput",{enumerable:!0,get:function(){return X0t.default}});var $0t=r2e();Object.defineProperty(mo,"useApp",{enumerable:!0,get:function(){return $0t.default}});var egt=HF();Object.defineProperty(mo,"useStdin",{enumerable:!0,get:function(){return egt.default}});var tgt=n2e();Object.defineProperty(mo,"useStdout",{enumerable:!0,get:function(){return tgt.default}});var rgt=i2e();Object.defineProperty(mo,"useStderr",{enumerable:!0,get:function(){
Line truncated
|
|
|
|
|
`:"";return c?w+=`@IF EXIST ${c} (\r
|
|
|
|
|
${c} ${p} ${a} ${E}%*\r
|
|
|
|
|
) ELSE (\r
|
|
|
|
|
@SETLOCAL\r
|
|
|
|
|
@SET PATHEXT=%PATHEXT:;.JS;=;%\r
|
|
|
|
|
${f} ${p} ${a} ${E}%*\r
|
|
|
|
|
)\r
|
|
|
|
|
`:w+=`@${f} ${p} ${a} ${E}%*\r
|
|
|
|
|
`,w}function Idt(t,e,r){let s=Vc.relative(Vc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n;s=s.split("\\").join("/");let c=Vc.isAbsolute(s)?`"${s}"`:`"$basedir/${s}"`,f=r.args||"",p=mY(r.nodePath).posix;a?(n=`"$basedir/${r.prog}"`,s=c):(a=c,f="",s="");let h=r.progArgs?`${r.progArgs.join(" ")} `:"",E=`#!/bin/sh
|
|
|
|
|
basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')")
|
|
|
|
|
|
|
|
|
|
case \`uname\` in
|
|
|
|
|
*CYGWIN*) basedir=\`cygpath -w "$basedir"\`;;
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
`,w=r.nodePath?`export NODE_PATH="${p}"
|
|
|
|
|
`:"";return n?E+=`${w}if [ -x ${n} ]; then
|
|
|
|
|
exec ${n} ${f} ${s} ${h}"$@"
|
|
|
|
|
else
|
|
|
|
|
exec ${a} ${f} ${s} ${h}"$@"
|
|
|
|
|
fi
|
|
|
|
|
`:E+=`${w}${a} ${f} ${s} ${h}"$@"
|
|
|
|
|
exit $?
|
|
|
|
|
`,E}function Cdt(t,e,r){let s=Vc.relative(Vc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n=a&&`"${a}$exe"`,c;s=s.split("\\").join("/");let f=Vc.isAbsolute(s)?`"${s}"`:`"$basedir/${s}"`,p=r.args||"",h=mY(r.nodePath),E=h.win32,w=h.posix;n?(c=`"$basedir/${r.prog}$exe"`,s=f):(n=f,p="",s="");let S=r.progArgs?`${r.progArgs.join(" ")} `:"",x=`#!/usr/bin/env pwsh
|
|
|
|
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
|
|
|
|
|
|
|
|
|
$exe=""
|
|
|
|
|
${r.nodePath?`$env_node_path=$env:NODE_PATH
|
|
|
|
|
$env:NODE_PATH="${E}"
|
|
|
|
|
`:""}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&&(x+=` else {
|
|
|
|
|
$env:NODE_PATH="${w}"
|
|
|
|
|
}`),c?x+=`
|
|
|
|
|
$ret=0
|
|
|
|
|
if (Test-Path ${c}) {
|
|
|
|
|
# Support pipeline input
|
|
|
|
|
if ($MyInvocation.ExpectingInput) {
|
|
|
|
|
$input | & ${c} ${p} ${s} ${S}$args
|
|
|
|
|
} else {
|
|
|
|
|
& ${c} ${p} ${s} ${S}$args
|
|
|
|
|
}
|
|
|
|
|
$ret=$LASTEXITCODE
|
|
|
|
|
} else {
|
|
|
|
|
# Support pipeline input
|
|
|
|
|
if ($MyInvocation.ExpectingInput) {
|
|
|
|
|
$input | & ${n} ${p} ${s} ${S}$args
|
|
|
|
|
} else {
|
|
|
|
|
& ${n} ${p} ${s} ${S}$args
|
|
|
|
|
}
|
|
|
|
|
$ret=$LASTEXITCODE
|
|
|
|
|
}
|
|
|
|
|
${r.nodePath?`$env:NODE_PATH=$env_node_path
|
|
|
|
|
`:""}exit $ret
|
|
|
|
|
`:x+=`
|
|
|
|
|
# Support pipeline input
|
|
|
|
|
if ($MyInvocation.ExpectingInput) {
|
|
|
|
|
$input | & ${n} ${p} ${s} ${S}$args
|
|
|
|
|
} else {
|
|
|
|
|
& ${n} ${p} ${s} ${S}$args
|
|
|
|
|
}
|
|
|
|
|
${r.nodePath?`$env:NODE_PATH=$env_node_path
|
|
|
|
|
`:""}exit $LASTEXITCODE
|
|
|
|
|
`,x}function wdt(t,e){return e.fs_.chmod(t,493)}function mY(t){if(!t)return{win32:"",posix:""};let e=typeof t=="string"?t.split(Vc.delimiter):Array.from(t),r={};for(let s=0;s<e.length;s++){let a=e[s].split("/").join("\\"),n=wBe()?e[s].split("\\").join("/").replace(/^([^:\\/]*):/,(c,f)=>`/mnt/${f.toLowerCase()}`):e[s];r.win32=r.win32?`${r.win32};${a}`:a,r.posix=r.posix?`${r.posix}:${n}`:n,r[s]={win32:a,posix:n}}return r}vBe.exports=dY});var QY=_((Zer,qBe)=>{qBe.exports=Ie("stream")});var JBe=_((Xer,VBe)=>{"use strict";function WBe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,s)}return r}function Xdt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?WBe(Object(r),!0).forEach(function(s){$dt(t,s,r[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):WBe(Object(r)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(r,s))})}return t}function $dt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function emt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function YBe(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function tmt(t,e,r){return e&&YBe(t.prototype,e),r&&YBe(t,r),t}var rmt=Ie("buffer"),uN=rmt.Buffer,nmt=Ie("util"),RY=nmt.inspect,imt=RY&&RY.custom||"inspect";function smt(t,e,r){uN.prototype.copy.call(t,e,r)}VBe.exports=function(){function t(){emt(this,t),this.head=null,this.tail=null,this.length=0}return tmt(t,[{key:"push",value:function(r){var s={data:r,next:null};this.length>0?this.tail.next=s:this.head=s,this.tail=s,++this.length}},{key:"unshift",value:function(r){var s={data:r,next:this.head};this.length===0&&(this.tail=s),this.head=s,++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 s=this.head,a=""+s.data;s=s.next;)a+=r+s.data;return a}},{key:"concat",value:function(r){if(this.length===0)return uN.alloc(0);for(var s=uN.allocUnsafe(r>>>0),a=this.head,n=0;a;)smt(a.data,s,n),n+=a.data.length,a=a.next;return s}},{key:"consume",value:function(r,s){var a;return r<this.head.data.length?(a=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?a=this.shift():a=s?this._getString(r):this._getBuffer(r),a}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var s=this.head,a=1,n=s.data;for(r-=n.length;s=s.next;){var c=s.data,f=r>c.length?c.length:r;if(f===c.length?n+=c:n+=c.slice(0,r),r-=f,r===0){f===c.length?(++a,s.next?this.head=s.next:this.head=this.tail=null):(this.head=s,s.data=c.slice(f));break}++a}return this.length-=a,n}},{key:"_getBuffer",value:function(r){var s=uN.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(s),r-=a.data.length;a=a.next;){var c=a.data,f=r>c.length?c.length:r;if(c.copy(s,s.length-r,0,f),r-=f,r===0){f===c.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=c.slice(f));break}++n}return this.length-=n,s}},{key:imt,value:function(r,s){return RY(this,Xdt({},s,{depth:0,customInspect:!1}))}}]),t}()});var FY=_(($er,zBe)=>{"use strict";function omt(t,e){var r=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(TY,this,t)):process.nextTick(TY,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(n){!e&&n?r._writableState?r._writableState.errorEmitted?process.nextTick(fN,r):(r._writableState.errorEmitted=!0,process.nextTick(KBe,r,n)):process.nextTick(KBe,r,n):e?(process.nextTick(fN,r),e(n)):process.nextTick(fN,r)}),this)}function KBe(t,e){TY(t,e),fN(t)}function fN(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function amt(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function TY(t,e){t.emit("error",e)}function lmt(t,e){var r=t._readableState,s=t._writableState;r&&
Line truncated
|
|
|
|
|
`)),t.linkname&&(e+=lV(" linkpath="+t.linkname+`
|
|
|
|
|
`));var r=t.pax;if(r)for(var s in r)e+=lV(" "+s+"="+r[s]+`
|
|
|
|
|
`);return Buffer.from(e)};Lw.decodePax=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&t[r]!==32;)r++;var s=parseInt(t.slice(0,r).toString(),10);if(!s)return e;var a=t.slice(r+1,s-1).toString(),n=a.indexOf("=");if(n===-1)return e;e[a.slice(0,n)]=a.slice(n+1),t=t.slice(s)}return e};Lw.encode=function(t){var e=eEt(512),r=t.name,s="";if(t.typeflag===5&&r[r.length-1]!=="/"&&(r+="/"),Buffer.byteLength(r)!==r.length)return null;for(;Buffer.byteLength(r)>100;){var a=r.indexOf("/");if(a===-1)return null;s+=s?"/"+r.slice(0,a):r.slice(0,a),r=r.slice(a+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(s)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(hg(t.mode&oEt,6),100),e.write(hg(t.uid,6),108),e.write(hg(t.gid,6),116),e.write(hg(t.size,11),124),e.write(hg(t.mtime.getTime()/1e3|0,11),136),e[156]=zve+cEt(t.type),t.linkname&&e.write(t.linkname,157),Zve.copy(e,sb),nEt.copy(e,cV),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(hg(t.devmajor||0,6),329),e.write(hg(t.devminor||0,6),337),s&&e.write(s,345),e.write(hg($ve(e),6),148),e)};Lw.decode=function(t,e,r){var s=t[156]===0?0:t[156]-zve,a=Ow(t,0,100,e),n=gg(t,100,8),c=gg(t,108,8),f=gg(t,116,8),p=gg(t,124,12),h=gg(t,136,12),E=lEt(s),w=t[157]===0?null:Ow(t,157,100,e),S=Ow(t,265,32),x=Ow(t,297,32),I=gg(t,329,8),T=gg(t,337,8),N=$ve(t);if(N===8*32)return null;if(N!==gg(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(Zve.compare(t,sb,sb+6)===0)t[345]&&(a=Ow(t,345,155,e)+"/"+a);else if(!(iEt.compare(t,sb,sb+6)===0&&sEt.compare(t,cV,cV+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return s===0&&a&&a[a.length-1]==="/"&&(s=5),{name:a,mode:n,uid:c,gid:f,size:p,mtime:new Date(1e3*h),type:E,linkname:w,uname:S,gname:x,devmajor:I,devminor:T}}});var oSe=_((Itr,sSe)=>{var tSe=Ie("util"),fEt=Kve(),ob=uV(),rSe=Nw().Writable,nSe=Nw().PassThrough,iSe=function(){},eSe=function(t){return t&=511,t&&512-t},AEt=function(t,e){var r=new DN(t,e);return r.end(),r},pEt=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},DN=function(t,e){this._parent=t,this.offset=e,nSe.call(this,{autoDestroy:!1})};tSe.inherits(DN,nSe);DN.prototype.destroy=function(t){this._parent.destroy(t)};var ch=function(t){if(!(this instanceof ch))return new ch(t);rSe.call(this,t),t=t||{},this._offset=0,this._buffer=fEt(),this._missing=0,this._partial=!1,this._onparse=iSe,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,s=function(){e._continue()},a=function(S){if(e._locked=!1,S)return e.destroy(S);e._stream||s()},n=function(){e._stream=null;var S=eSe(e._header.size);S?e._parse(S,c):e._parse(512,w),e._locked||s()},c=function(){e._buffer.consume(eSe(e._header.size)),e._parse(512,w),s()},f=function(){var S=e._header.size;e._paxGlobal=ob.decodePax(r.slice(0,S)),r.consume(S),n()},p=function(){var S=e._header.size;e._pax=ob.decodePax(r.slice(0,S)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(S),n()},h=function(){var S=e._header.size;this._gnuLongPath=ob.decodeLongPath(r.slice(0,S),t.filenameEncoding),r.consume(S),n()},E=function(){var S=e._header.size;this._gnuLongLinkPath=ob.decodeLongPath(r.slice(0,S),t.filenameEncoding),r.consume(S),n()},w=function(){var S=e._offset,x;try{x=e._header=ob.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(I){e.emit("error",I)}if(r.consume(512),!x){e._parse(512,w),s();return}if(x.type==="gnu-long-path"){e._parse(x.size,h),s();return}if(x.type==="gnu-long-link-path"){e._parse(x.size,E),s();return}if(x.type==="pax-global-header"){e._parse(x.size,f),s();return}if(x.type==="pax-header"){e._parse(x.size,p),s();return}if(e._gnuLongPath&&(x.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(x.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=x=pEt(x,e._pax),e._pax=null),e._locked=!0,!x.size||x.type==="directory"){e._parse(512,w),e.emit("entry",x,AEt(e,S),a);return}e._stream=new DN(e,S),e.emit("entry",x,e._stream,a),e._parse(x.size,n),s()};this._onheader=w,this._parse(512,w)};tSe.inherits(ch,rSe);ch.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.emit("close"))};ch.prototype._parse=function(t,e){this._destroyed||(this._offset+=t,this._missing=t,e===this._onheader&&(this._partial=!1),this._onparse=e)};ch.prototype._continue=function(){if(!this._destroyed){var t=this._cb;this._cb=iSe,this._overflow?this._write(this._overflow,void 0,t):t()}};ch.prototype._write=function(t,e,r){if(!this._destroyed){var s=this._stream,a=this._buffer,n=this._missing;if(t.length&&(this._partial=!0),t.length<n)return this._missing-=t.length,this._overflow=null,s?s.write(t,r):(a.append(t),
Line truncated
|
|
|
|
|
Wanted: ${this.expectedSize}
|
|
|
|
|
Found: ${this.size}`);s.code="EBADSIZE",s.found=this.size,s.expected=this.expectedSize,s.sri=this.sri,this.emit("error",s)}else if(this.sri&&!r){let s=new Error(`${this.sri} integrity checksum failed when using ${this.algorithm}: wanted ${this.digests} but got ${e}. (${this.size} bytes)`);s.code="EINTEGRITY",s.found=e,s.expected=this.digests,s.algorithm=this.algorithm,s.sri=this.sri,this.emit("error",s)}else this.#r=this.size,this.emit("size",this.size),this.#t=e,this.emit("integrity",e),r&&(this.#i=r,this.emit("verified",r))}},Ah=class{get isHash(){return!0}constructor(e,r){let s=r?.strict;this.source=e.trim(),this.digest="",this.algorithm="",this.options=[];let a=this.source.match(s?WEt:qEt);if(!a||s&&!bV.includes(a[1]))return;this.algorithm=a[1],this.digest=a[2];let n=a[3];n&&(this.options=n.slice(1).split("?"))}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}match(e,r){let s=nc(e,r);if(!s)return!1;if(s.isIntegrity){let a=s.pickAlgorithm(r,[this.algorithm]);if(!a)return!1;let n=s[a].find(c=>c.digest===this.digest);return n||!1}return s.digest===this.digest?s:!1}toString(e){return e?.strict&&!(bV.includes(this.algorithm)&&this.digest.match(GEt)&&this.options.every(r=>r.match(YEt)))?"":`${this.algorithm}-${this.digest}${gb(this.options)}`}};function PSe(t,e,r,s){let a=t!=="",n=!1,c="",f=s.length-1;for(let h=0;h<f;h++){let E=Ah.prototype.toString.call(s[h],r);E&&(n=!0,c+=E,c+=e)}let p=Ah.prototype.toString.call(s[f],r);return p&&(n=!0,c+=p),a&&n?t+e+c:t+c}var Zm=class{get isIntegrity(){return!0}toJSON(){return this.toString()}isEmpty(){return Object.keys(this).length===0}toString(e){let r=e?.sep||" ",s="";if(e?.strict){r=r.replace(/\S+/g," ");for(let a of bV)this[a]&&(s=PSe(s,r,e,this[a]))}else for(let a of Object.keys(this))s=PSe(s,r,e,this[a]);return s}concat(e,r){let s=typeof e=="string"?e:pb(e,r);return nc(`${this.toString(r)} ${s}`,r)}hexDigest(){return nc(this,{single:!0}).hexDigest()}merge(e,r){let s=nc(e,r);for(let a in s)if(this[a]){if(!this[a].find(n=>s[a].find(c=>n.digest===c.digest)))throw new Error("hashes do not match, cannot update integrity")}else this[a]=s[a]}match(e,r){let s=nc(e,r);if(!s)return!1;let a=s.pickAlgorithm(r,Object.keys(this));return!!a&&this[a]&&s[a]&&this[a].find(n=>s[a].find(c=>n.digest===c.digest))||!1}pickAlgorithm(e,r){let s=e?.pickAlgorithm||eIt,a=Object.keys(this).filter(n=>r?.length?r.includes(n):!0);return a.length?a.reduce((n,c)=>s(n,c)||n):null}};IA.exports.parse=nc;function nc(t,e){if(!t)return null;if(typeof t=="string")return DV(t,e);if(t.algorithm&&t.digest){let r=new Zm;return r[t.algorithm]=[t],DV(pb(r,e),e)}else return DV(pb(t,e),e)}function DV(t,e){if(e?.single)return new Ah(t,e);let r=t.trim().split(/\s+/).reduce((s,a)=>{let n=new Ah(a,e);if(n.algorithm&&n.digest){let c=n.algorithm;s[c]||(s[c]=[]),s[c].push(n)}return s},new Zm);return r.isEmpty()?null:r}IA.exports.stringify=pb;function pb(t,e){return t.algorithm&&t.digest?Ah.prototype.toString.call(t,e):typeof t=="string"?pb(nc(t,e),e):Zm.prototype.toString.call(t,e)}IA.exports.fromHex=VEt;function VEt(t,e,r){let s=gb(r?.options);return nc(`${e}-${Buffer.from(t,"hex").toString("base64")}${s}`,r)}IA.exports.fromData=JEt;function JEt(t,e){let r=e?.algorithms||[...xV],s=gb(e?.options);return r.reduce((a,n)=>{let c=hb.createHash(n).update(t).digest("base64"),f=new Ah(`${n}-${c}${s}`,e);if(f.algorithm&&f.digest){let p=f.algorithm;a[p]||(a[p]=[]),a[p].push(f)}return a},new Zm)}IA.exports.fromStream=KEt;function KEt(t,e){let r=kV(e);return new Promise((s,a)=>{t.pipe(r),t.on("error",a),r.on("error",a);let n;r.on("integrity",c=>{n=c}),r.on("end",()=>s(n)),r.resume()})}IA.exports.checkData=zEt;function zEt(t,e,r){if(e=nc(e,r),!e||!Object.keys(e).length){if(r?.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let s=e.pickAlgorithm(r),a=hb.createHash(s).update(t).digest("base64"),n=nc({algorithm:s,digest:a}),c=n.match(e,r);if(r=r||{},c||!r.error)return c;if(typeof r.size=="number"&&t.length!==r.size){let f=new Error(`data size mismatch when checking ${e}.
|
|
|
|
|
Wanted: ${r.size}
|
|
|
|
|
Found: ${t.length}`);throw f.code="EBADSIZE",f.found=t.length,f.expected=r.size,f.sri=e,f}else{let f=new Error(`Integrity checksum failed when using ${s}: Wanted ${e}, but got ${n}. (${t.length} bytes)`);throw f.code="EINTEGRITY",f.found=n,f.expected=e,f.algorithm=s,f.sri=e,f}}IA.exports.checkStream=ZEt;function ZEt(t,e,r){if(r=r||Object.create(null),r.integrity=e,e=nc(e,r),!e||!Object.keys(e).length)return Promise.reject(Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"}));let s=kV(r);return new Promise((a,n)=>{t.pipe(s),t.on("error",n),s.on("error",n);let c;s.on("verified",f=>{c=f}),s.on("end",()=>a(c)),s.resume()})}IA.exports.integrityStream=kV;function kV(t=Object.create(null)){return new PV(t)}IA.exports.create=XEt;function XEt(t){let e=t?.algorithms||[...xV],r=gb(t?.options),s=e.map(hb.createHash);return{update:function(a,n){return s.forEach(c=>c.update(a,n)),this},digest:function(){return e.reduce((n,c)=>{let f=s.shift().digest("base64"),p=new Ah(`${c}-${f}${r}`,t);if(p.algorithm&&p.digest){let h=p.algorithm;n[h]||(n[h]=[]),n[h].push(p)}return n},new Zm)}}}var $Et=hb.getHashes(),xSe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>$Et.includes(t));function eIt(t,e){return xSe.indexOf(t.toLowerCase())>=xSe.indexOf(e.toLowerCase())?t:e}});var QV=_(mg=>{"use strict";Object.defineProperty(mg,"__esModule",{value:!0});mg.Signature=mg.Envelope=void 0;mg.Envelope={fromJSON(t){return{payload:_N(t.payload)?Buffer.from(QSe(t.payload)):Buffer.alloc(0),payloadType:_N(t.payloadType)?globalThis.String(t.payloadType):"",signatures:globalThis.Array.isArray(t?.signatures)?t.signatures.map(e=>mg.Signature.fromJSON(e)):[]}},toJSON(t){let e={};return t.payload.length!==0&&(e.payload=RSe(t.payload)),t.payloadType!==""&&(e.payloadType=t.payloadType),t.signatures?.length&&(e.signatures=t.signatures.map(r=>mg.Signature.toJSON(r))),e}};mg.Signature={fromJSON(t){return{sig:_N(t.sig)?Buffer.from(QSe(t.sig)):Buffer.alloc(0),keyid:_N(t.keyid)?globalThis.String(t.keyid):""}},toJSON(t){let e={};return t.sig.length!==0&&(e.sig=RSe(t.sig)),t.keyid!==""&&(e.keyid=t.keyid),e}};function QSe(t){return Uint8Array.from(globalThis.Buffer.from(t,"base64"))}function RSe(t){return globalThis.Buffer.from(t).toString("base64")}function _N(t){return t!=null}});var FSe=_(HN=>{"use strict";Object.defineProperty(HN,"__esModule",{value:!0});HN.Timestamp=void 0;HN.Timestamp={fromJSON(t){return{seconds:TSe(t.seconds)?globalThis.String(t.seconds):"0",nanos:TSe(t.nanos)?globalThis.Number(t.nanos):0}},toJSON(t){let e={};return t.seconds!=="0"&&(e.seconds=t.seconds),t.nanos!==0&&(e.nanos=Math.round(t.nanos)),e}};function TSe(t){return t!=null}});var Gw=_(Ur=>{"use strict";Object.defineProperty(Ur,"__esModule",{value:!0});Ur.TimeRange=Ur.X509CertificateChain=Ur.SubjectAlternativeName=Ur.X509Certificate=Ur.DistinguishedName=Ur.ObjectIdentifierValuePair=Ur.ObjectIdentifier=Ur.PublicKeyIdentifier=Ur.PublicKey=Ur.RFC3161SignedTimestamp=Ur.LogId=Ur.MessageSignature=Ur.HashOutput=Ur.SubjectAlternativeNameType=Ur.PublicKeyDetails=Ur.HashAlgorithm=void 0;Ur.hashAlgorithmFromJSON=OSe;Ur.hashAlgorithmToJSON=LSe;Ur.publicKeyDetailsFromJSON=MSe;Ur.publicKeyDetailsToJSON=USe;Ur.subjectAlternativeNameTypeFromJSON=_Se;Ur.subjectAlternativeNameTypeToJSON=HSe;var tIt=FSe(),yl;(function(t){t[t.HASH_ALGORITHM_UNSPECIFIED=0]="HASH_ALGORITHM_UNSPECIFIED",t[t.SHA2_256=1]="SHA2_256",t[t.SHA2_384=2]="SHA2_384",t[t.SHA2_512=3]="SHA2_512",t[t.SHA3_256=4]="SHA3_256",t[t.SHA3_384=5]="SHA3_384"})(yl||(Ur.HashAlgorithm=yl={}));function OSe(t){switch(t){case 0:case"HASH_ALGORITHM_UNSPECIFIED":return yl.HASH_ALGORITHM_UNSPECIFIED;case 1:case"SHA2_256":return yl.SHA2_256;case 2:case"SHA2_384":return yl.SHA2_384;case 3:case"SHA2_512":return yl.SHA2_512;case 4:case"SHA3_256":return yl.SHA3_256;case 5:case"SHA3_384":return yl.SHA3_384;default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum HashAlgorithm")}}function LSe(t){switch(t){case yl.HASH_ALGORITHM_UNSPECIFIED:return"HASH_ALGORITHM_UNSPECIFIED";case yl.SHA2_256:return"SHA2_256";case yl.SHA2_384:return"SHA2_384";case yl.SHA2_512:return"SHA2_512";case yl.SHA3_256:return"SHA3_256";case yl.SHA3_384:return"SHA3_384";default:throw new globalThis.Error("Unrecognized enum value "+t+" for enum HashAlgorithm")}}var rn;(function(t){t[t.PUBLIC_KEY_DETAILS_UNSPECIFIED=0]="PUBLIC_KEY_DETAILS_UNSPECIFIED",t[t.PKCS1_RSA_PKCS1V5=1]="PKCS1_RSA_PKCS1V5",t[t.PKCS1_RSA_PSS=2]="PKCS1_RSA_PSS",t[t.PKIX_RSA_PKCS1V5=3]="PKIX_RSA_PKCS1V5",t[t.PKIX_RSA_PSS=4]="PKIX_RSA_PSS",t[t.PKIX_RSA_PKCS1V15_2048_SHA256=9]="PKIX_RSA_PKCS1V15_2048_SHA256",t[t.PKIX_RSA_PKCS1V15_3072_SHA256=10]="PKIX_RSA_PKCS1V15_3072_SHA256",t[t.PKIX_RSA_PKCS1V15_4096_SHA256=11]="PKIX_RSA_PKCS1V15_4096_SHA256",t[t.PKIX_RSA_PSS_2048_SHA256=16]="PKIX_RSA_PSS_2048_SHA256",t[t.PKIX_RSA_PSS_3072_SHA256=17]="PKIX_RSA_PSS_3072_SHA256",t[t.PKIX_RS
Line truncated
|
|
|
|
|
`).forEach(r=>{r.match(VIt)||r.match(JIt)||(e+=r)}),Buffer.from(e,"base64")}function zIt(t,e="CERTIFICATE"){let s=t.toString("base64").match(/.{1,64}/g)||"";return[`-----BEGIN ${e}-----`,...s,`-----END ${e}-----`].join(`
|
|
|
|
|
`).concat(`
|
|
|
|
|
`)}});var cO=_(Jw=>{"use strict";Object.defineProperty(Jw,"__esModule",{value:!0});Jw.SHA2_HASH_ALGOS=Jw.ECDSA_SIGNATURE_ALGOS=void 0;Jw.ECDSA_SIGNATURE_ALGOS={"1.2.840.10045.4.3.1":"sha224","1.2.840.10045.4.3.2":"sha256","1.2.840.10045.4.3.3":"sha384","1.2.840.10045.4.3.4":"sha512"};Jw.SHA2_HASH_ALGOS={"2.16.840.1.101.3.4.2.1":"sha256","2.16.840.1.101.3.4.2.2":"sha384","2.16.840.1.101.3.4.2.3":"sha512"}});var zV=_(uO=>{"use strict";Object.defineProperty(uO,"__esModule",{value:!0});uO.RFC3161TimestampVerificationError=void 0;var KV=class extends Error{};uO.RFC3161TimestampVerificationError=KV});var mDe=_(vA=>{"use strict";var ZIt=vA&&vA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),XIt=vA&&vA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),$It=vA&&vA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&ZIt(e,t,r);return XIt(e,t),e};Object.defineProperty(vA,"__esModule",{value:!0});vA.TSTInfo=void 0;var dDe=$It(Vw()),eCt=cO(),tCt=zV(),ZV=class{constructor(e){this.root=e}get version(){return this.root.subs[0].toInteger()}get genTime(){return this.root.subs[4].toDate()}get messageImprintHashAlgorithm(){let e=this.messageImprintObj.subs[0].subs[0].toOID();return eCt.SHA2_HASH_ALGOS[e]}get messageImprintHashedMessage(){return this.messageImprintObj.subs[1].value}get raw(){return this.root.toDER()}verify(e){let r=dDe.digest(this.messageImprintHashAlgorithm,e);if(!dDe.bufferEqual(r,this.messageImprintHashedMessage))throw new tCt.RFC3161TimestampVerificationError("message imprint does not match artifact")}get messageImprintObj(){return this.root.subs[2]}};vA.TSTInfo=ZV});var EDe=_(SA=>{"use strict";var rCt=SA&&SA.__createBinding||(Object.create?function(t,e,r,s){s===void 0&&(s=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,s,a)}:function(t,e,r,s){s===void 0&&(s=r),t[s]=e[r]}),nCt=SA&&SA.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),iCt=SA&&SA.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&rCt(e,t,r);return nCt(e,t),e};Object.defineProperty(SA,"__esModule",{value:!0});SA.RFC3161Timestamp=void 0;var sCt=oO(),XV=iCt(Vw()),yDe=cO(),Cb=zV(),oCt=mDe(),aCt="1.2.840.113549.1.7.2",lCt="1.2.840.113549.1.9.16.1.4",cCt="1.2.840.113549.1.9.4",$V=class t{constructor(e){this.root=e}static parse(e){let r=sCt.ASN1Obj.parseBuffer(e);return new t(r)}get status(){return this.pkiStatusInfoObj.subs[0].toInteger()}get contentType(){return this.contentTypeObj.toOID()}get eContentType(){return this.eContentTypeObj.toOID()}get signingTime(){return this.tstInfo.genTime}get signerIssuer(){return this.signerSidObj.subs[0].value}get signerSerialNumber(){return this.signerSidObj.subs[1].value}get signerDigestAlgorithm(){let e=this.signerDigestAlgorithmObj.subs[0].toOID();return yDe.SHA2_HASH_ALGOS[e]}get signatureAlgorithm(){let e=this.signatureAlgorithmObj.subs[0].toOID();return yDe.ECDSA_SIGNATURE_ALGOS[e]}get signatureValue(){return this.signatureValueObj.value}get tstInfo(){return new oCt.TSTInfo(this.eContentObj.subs[0].subs[0])}verify(e,r){if(!this.timeStampTokenObj)throw new Cb.RFC3161TimestampVerificationError("timeStampToken is missing");if(this.contentType!==aCt)throw new Cb.RFC3161TimestampVerificationError(`incorrect content type: ${this.contentType}`);if(this.eContentType!==lCt)throw new Cb.RFC3161TimestampVerificationError(`incorrect encapsulated content type: ${this.eContentType}`);this.tstInfo.verify(e),this.verifyMessageDigest(),this.verifySignature(r)}verifyMessageDigest(){let e=XV.digest(this.signerDigestAlgorithm,this.tstInfo.raw),r=this.messageDigestAttributeObj.subs[1].subs[0].value;if(!XV.bufferEqual(e,r))throw new Cb.RFC3161TimestampVerificationError("signed data does not match tstInfo")}verifySignature(e){let r=this.signedAttrsObj.toDER();if(r[0]=49,!XV.verify(r,e,this.signatureValue,this.signatureAlgorithm))throw new Cb.RFC3161TimestampVerificationError("signature verification failed")}get pkiStatusInfoObj(){return this.root.subs[0]}get timeStampTokenObj(){return this.root.subs[1]}get contentTypeObj(){return this.timeStampTokenObj.subs[0]}get signedDataObj(){return this.timeStampTokenObj.subs.find(r=>r.tag.isContextSpecific(0)).subs[0]}get encapContentInfoObj(){return this.signedDataObj.subs[2]}get signerInfosObj(){let e=this.signedDataObj;return e.subs[e.subs.length-1]}get sig
Line truncated
|
|
|
|
|
globstar while`,e,S,r,x,I),this.matchOne(e.slice(S),r.slice(x),s))return this.debug("globstar found match!",S,p,I),!0;if(I==="."||I===".."||!a.dot&&I.charAt(0)==="."){this.debug("dot detected!",e,S,r,x);break}this.debug("globstar swallow a segment, and continue"),S++}return!!(s&&(this.debug(`
|
|
|
|
|
>>> no match, partial?`,e,S,r,x),S===p))}let T;if(typeof E=="string"?(T=w===E,this.debug("string match",E,w,T)):(T=E.test(w),this.debug("pattern match",E,w,T)),!T)return!1}if(c===p&&f===h)return!0;if(c===p)return s;if(f===h)return c===p-1&&e[c]==="";throw new Error("wtf?")}braceExpand(){return(0,pr.braceExpand)(this.pattern,this.options)}parse(e){(0,HO.assertValidPattern)(e);let r=this.options;if(e==="**")return pr.GLOBSTAR;if(e==="")return"";let s,a=null;(s=e.match(P2t))?a=r.dot?k2t:x2t:(s=e.match(y2t))?a=(r.nocase?r.dot?w2t:C2t:r.dot?I2t:E2t)(s[1]):(s=e.match(Q2t))?a=(r.nocase?r.dot?T2t:R2t:r.dot?F2t:N2t)(s):(s=e.match(B2t))?a=r.dot?S2t:v2t:(s=e.match(D2t))&&(a=b2t);let n=fPe.AST.fromGlob(e,this.options).toMMPattern();return a&&typeof n=="object"&&Reflect.defineProperty(n,"test",{value:a}),n}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,s=r.noglobstar?L2t:r.dot?M2t:U2t,a=new Set(r.nocase?["i"]:[]),n=e.map(p=>{let h=p.map(E=>{if(E instanceof RegExp)for(let w of E.flags.split(""))a.add(w);return typeof E=="string"?W2t(E):E===pr.GLOBSTAR?pr.GLOBSTAR:E._src});return h.forEach((E,w)=>{let S=h[w+1],x=h[w-1];E!==pr.GLOBSTAR||x===pr.GLOBSTAR||(x===void 0?S!==void 0&&S!==pr.GLOBSTAR?h[w+1]="(?:\\/|"+s+"\\/)?"+S:h[w]=s:S===void 0?h[w-1]=x+"(?:\\/|"+s+")?":S!==pr.GLOBSTAR&&(h[w-1]=x+"(?:\\/|\\/"+s+"\\/)"+S,h[w+1]=pr.GLOBSTAR))}),h.filter(E=>E!==pr.GLOBSTAR).join("/")}).join("|"),[c,f]=e.length>1?["(?:",")"]:["",""];n="^"+c+n+f+"$",this.negate&&(n="^(?!"+n+").+$");try{this.regexp=new RegExp(n,[...a].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let s=this.options;this.isWindows&&(e=e.split("\\").join("/"));let a=this.slashSplit(e);this.debug(this.pattern,"split",a);let n=this.set;this.debug(this.pattern,"set",n);let c=a[a.length-1];if(!c)for(let f=a.length-2;!c&&f>=0;f--)c=a[f];for(let f=0;f<n.length;f++){let p=n[f],h=a;if(s.matchBase&&p.length===1&&(h=[c]),this.matchOne(h,p,r))return s.flipNegate?!0:!this.negate}return s.flipNegate?!1:this.negate}static defaults(e){return pr.minimatch.defaults(e).Minimatch}};pr.Minimatch=ly;var Y2t=X7();Object.defineProperty(pr,"AST",{enumerable:!0,get:function(){return Y2t.AST}});var V2t=$7();Object.defineProperty(pr,"escape",{enumerable:!0,get:function(){return V2t.escape}});var J2t=OO();Object.defineProperty(pr,"unescape",{enumerable:!0,get:function(){return J2t.unescape}});pr.minimatch.AST=fPe.AST;pr.minimatch.Minimatch=ly;pr.minimatch.escape=g2t.escape;pr.minimatch.unescape=d2t.unescape});var rJ=_(ru=>{"use strict";var dPe=ru&&ru.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ru,"__esModule",{value:!0});ru.SuccinctRoles=ru.DelegatedRole=ru.Role=ru.TOP_LEVEL_ROLE_NAMES=void 0;var mPe=dPe(Ie("crypto")),K2t=gPe(),jO=dPe(Ie("util")),GO=PA(),cy=ff();ru.TOP_LEVEL_ROLE_NAMES=["root","targets","snapshot","timestamp"];var Ob=class t{constructor(e){let{keyIDs:r,threshold:s,unrecognizedFields:a}=e;if(z2t(r))throw new GO.ValueError("duplicate key IDs found");if(s<1)throw new GO.ValueError("threshold must be at least 1");this.keyIDs=r,this.threshold=s,this.unrecognizedFields=a||{}}equals(e){return e instanceof t?this.threshold===e.threshold&&jO.default.isDeepStrictEqual(this.keyIDs,e.keyIDs)&&jO.default.isDeepStrictEqual(this.unrecognizedFields,e.unrecognizedFields):!1}toJSON(){return{keyids:this.keyIDs,threshold:this.threshold,...this.unrecognizedFields}}static fromJSON(e){let{keyids:r,threshold:s,...a}=e;if(!cy.guard.isStringArray(r))throw new TypeError("keyids must be an array");if(typeof s!="number")throw new TypeError("threshold must be a number");return new t({keyIDs:r,threshold:s,unrecognizedFields:a})}};ru.Role=Ob;function z2t(t){return new Set(t).size!==t.length}var eJ=class t extends Ob{constructor(e){super(e);let{name:r,terminating:s,paths:a,pathHashPrefixes:n}=e;if(this.name=r,this.terminating=s,e.paths&&e.pathHashPrefixes)throw new GO.ValueError("paths and pathHashPrefixes are mutually exclusive");this.paths=a,this.pathHashPrefixes=n}equals(e){return e instanceof t?super.equals(e)&&this.name===e.name&&this.terminating===e.terminating&&jO.default.isDeepStrictEqual(this.paths,e.paths)&&jO.default.isDeepStrictEqual(this.pathHashPrefixes,e.pathHashPrefixes):!1}isDelegatedPath(e){if(this.paths)return this.paths.some(r=>X2t(e,r));if(this.pathHashPrefixes){let s=mPe.default.createHash("sha256").update(e).digest("hex");return this.pathHashPrefixes.some(a=>s.startsWith(a))}return!1}toJSON(){let e={...super.toJSON(),name:this.name,terminating:this.terminating};return this.paths&&(e.paths=this.paths),this.pathHashPrefixes&&(e.path_hash_prefixes=this.pathHashPrefixes),e}static fro
Line truncated
|
|
|
|
|
`).join(`
|
|
|
|
|
`+n),t.push(a+"m+"+tL.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=evt()+e+" "+t[0]}function evt(){return Xs.inspectOpts.hideDate?"":new Date().toISOString()+" "}function tvt(...t){return process.stderr.write(eL.formatWithOptions(Xs.inspectOpts,...t)+`
|
|
|
|
|
`)}function rvt(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function nvt(){return process.env.DEBUG}function ivt(t){t.inspectOpts={};let e=Object.keys(Xs.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=Xs.inspectOpts[e[r]]}tL.exports=wJ()(Xs);var{formatters:RPe}=tL.exports;RPe.o=function(t){return this.inspectOpts.colors=this.useColors,eL.inspect(t,this.inspectOpts).split(`
|
|
|
|
|
`).map(e=>e.trim()).join(" ")};RPe.O=function(t){return this.inspectOpts.colors=this.useColors,eL.inspect(t,this.inspectOpts)}});var vJ=_((_nr,BJ)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?BJ.exports=QPe():BJ.exports=TPe()});var nL=_(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.DownloadHTTPError=Ji.DownloadLengthMismatchError=Ji.DownloadError=Ji.ExpiredMetadataError=Ji.EqualVersionError=Ji.BadVersionError=Ji.RepositoryError=Ji.PersistError=Ji.RuntimeError=Ji.ValueError=void 0;var SJ=class extends Error{};Ji.ValueError=SJ;var DJ=class extends Error{};Ji.RuntimeError=DJ;var bJ=class extends Error{};Ji.PersistError=bJ;var Mb=class extends Error{};Ji.RepositoryError=Mb;var rL=class extends Mb{};Ji.BadVersionError=rL;var PJ=class extends rL{};Ji.EqualVersionError=PJ;var xJ=class extends Mb{};Ji.ExpiredMetadataError=xJ;var Ub=class extends Error{};Ji.DownloadError=Ub;var kJ=class extends Ub{};Ji.DownloadLengthMismatchError=kJ;var QJ=class extends Ub{constructor(e,r){super(e),this.statusCode=r}};Ji.DownloadHTTPError=QJ});var NPe=_(h1=>{"use strict";var TJ=h1&&h1.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(h1,"__esModule",{value:!0});h1.withTempFile=void 0;var RJ=TJ(Ie("fs/promises")),svt=TJ(Ie("os")),FPe=TJ(Ie("path")),ovt=async t=>avt(async e=>t(FPe.default.join(e,"tempfile")));h1.withTempFile=ovt;var avt=async t=>{let e=await RJ.default.realpath(svt.default.tmpdir()),r=await RJ.default.mkdtemp(e+FPe.default.sep);try{return await t(r)}finally{await RJ.default.rm(r,{force:!0,recursive:!0,maxRetries:3})}}});var NJ=_(kg=>{"use strict";var sL=kg&&kg.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kg,"__esModule",{value:!0});kg.DefaultFetcher=kg.BaseFetcher=void 0;var lvt=sL(vJ()),OPe=sL(Ie("fs")),cvt=sL(yO()),uvt=sL(Ie("util")),LPe=nL(),fvt=NPe(),Avt=(0,lvt.default)("tuf:fetch"),iL=class{async downloadFile(e,r,s){return(0,fvt.withTempFile)(async a=>{let n=await this.fetch(e),c=0,f=OPe.default.createWriteStream(a);try{for await(let p of n){let h=Buffer.from(p);if(c+=h.length,c>r)throw new LPe.DownloadLengthMismatchError("Max length reached");await pvt(f,h)}}finally{await uvt.default.promisify(f.close).bind(f)()}return s(a)})}async downloadBytes(e,r){return this.downloadFile(e,r,async s=>{let a=OPe.default.createReadStream(s),n=[];for await(let c of a)n.push(c);return Buffer.concat(n)})}};kg.BaseFetcher=iL;var FJ=class extends iL{constructor(e={}){super(),this.timeout=e.timeout,this.retry=e.retry}async fetch(e){Avt("GET %s",e);let r=await(0,cvt.default)(e,{timeout:this.timeout,retry:this.retry});if(!r.ok||!r?.body)throw new LPe.DownloadHTTPError("Failed to download",r.status);return r.body}};kg.DefaultFetcher=FJ;var pvt=async(t,e)=>new Promise((r,s)=>{t.write(e,a=>{a&&s(a),r(!0)})})});var MPe=_(oL=>{"use strict";Object.defineProperty(oL,"__esModule",{value:!0});oL.defaultConfig=void 0;oL.defaultConfig={maxRootRotations:256,maxDelegations:32,rootMaxLength:512e3,timestampMaxLength:16384,snapshotMaxLength:2e6,targetsMaxLength:5e6,prefixTargetsWithHash:!0,fetchTimeout:1e5,fetchRetries:void 0,fetchRetry:2}});var UPe=_(aL=>{"use strict";Object.defineProperty(aL,"__esModule",{value:!0});aL.TrustedMetadataStore=void 0;var Es=ZO(),Ui=nL(),OJ=class{constructor(e){this.trustedSet={},this.referenceTime=new Date,this.loadTrustedRoot(e)}get root(){if(!this.trustedSet.root)throw new ReferenceError("No trusted root metadata");return this.trustedSet.root}get timestamp(){return this.trustedSet.timestamp}get snapshot(){return this.trustedSet.snapshot}get targets(){return this.trustedSet.targets}getRole(e){return this.trustedSet[e]}updateRoot(e){let r=JSON.parse(e.toString("utf8")),s=Es.Metadata.fromJSON(Es.MetadataKind.Root,r);if(s.signed.type!=Es.MetadataKind.Root)throw new Ui.RepositoryError(`Expected 'root', got ${s.signed.type}`);if(this.root.verifyDelegate(Es.MetadataKind.Root,s),s.signed.version!=this.root.signed.version+1)throw new Ui.BadVersionError(`Expected version ${this.root.signed.version+1}, got ${s.signed.version}`);return s.verifyDelegate(Es.MetadataKind.Root,s),this.trustedSet.root=s,s}updateTimestamp(e){if(this.snapshot)throw new Ui.RuntimeError("Cannot update timestamp after snapshot");if(this.root.signed.isExpired(this.referenceTime))throw new Ui.ExpiredMetadataError("Final root.json is expired");let r=JSON.parse(e.toString("utf8")),s=Es.Metadata.fromJSON(Es.MetadataKind.Timestamp,r);if(s.signed.type!=Es.MetadataKind.Timestamp)throw new Ui.RepositoryError(`Expected 'timestamp', got ${s.signed.type}`);if(this.root.verifyDelegate(Es.MetadataKind.Timestamp,s),this.timestamp){if(s.signed.version<this.timestamp.signed.version)throw new Ui.BadVersionError(`New timestamp version ${s.signed.version} is less than current version ${this.timestamp.signed.version}`);if(s.signed.version===this.timestamp.signed.version)throw new Ui.EqualVersionError(`New timestamp version ${s.sLine truncated
|
|
|
|
|
|
|
|
|
|
`,CSt=/\u2014 (\S+) (\S+)\n/g;function wSt(t,e){let r=(0,ISt.filterTLogAuthorities)(e,{targetDate:new Date(Number(t.integratedTime)*1e3)}),s=t.inclusionProof,a=iK.fromString(s.checkpoint.envelope),n=sK.fromString(a.note);if(!BSt(a,r))throw new y1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid checkpoint signature"});if(!nK.crypto.bufferEqual(n.logHash,s.rootHash))throw new y1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"root hash mismatch"})}function BSt(t,e){let r=Buffer.from(t.note,"utf-8");return t.signatures.every(s=>{let a=e.find(n=>nK.crypto.bufferEqual(n.logID.subarray(0,4),s.keyHint));return a?nK.crypto.verify(r,a.publicKey,s.signature):!1})}var iK=class t{constructor(e,r){this.note=e,this.signatures=r}static fromString(e){if(!e.includes(rK))throw new y1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"missing checkpoint separator"});let r=e.indexOf(rK),s=e.slice(0,r+1),n=e.slice(r+rK.length).matchAll(CSt),c=Array.from(n,f=>{let[,p,h]=f,E=Buffer.from(h,"base64");if(E.length<5)throw new y1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"malformed checkpoint signature"});return{name:p,keyHint:E.subarray(0,4),signature:E.subarray(4)}});if(c.length===0)throw new y1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"no signatures found in checkpoint"});return new t(s,c)}},sK=class t{constructor(e,r,s,a){this.origin=e,this.logSize=r,this.logHash=s,this.rest=a}static fromString(e){let r=e.trimEnd().split(`
|
|
|
|
|
`);if(r.length<3)throw new y1.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"too few lines in checkpoint header"});let s=r[0],a=BigInt(r[1]),n=Buffer.from(r[2],"base64"),c=r.slice(3);return new t(s,a,n,c)}}});var lxe=_(uK=>{"use strict";Object.defineProperty(uK,"__esModule",{value:!0});uK.verifyMerkleInclusion=DSt;var cK=Cl(),aK=Eo(),vSt=Buffer.from([0]),SSt=Buffer.from([1]);function DSt(t){let e=t.inclusionProof,r=BigInt(e.logIndex),s=BigInt(e.treeSize);if(r<0n||r>=s)throw new aK.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:`invalid index: ${r}`});let{inner:a,border:n}=bSt(r,s);if(e.hashes.length!==a+n)throw new aK.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"invalid hash count"});let c=e.hashes.slice(0,a),f=e.hashes.slice(a),p=TSt(t.canonicalizedBody),h=xSt(PSt(p,c,r),f);if(!cK.crypto.bufferEqual(h,e.rootHash))throw new aK.VerificationError({code:"TLOG_INCLUSION_PROOF_ERROR",message:"calculated root hash does not match inclusion proof"})}function bSt(t,e){let r=kSt(t,e),s=QSt(t>>BigInt(r));return{inner:r,border:s}}function PSt(t,e,r){return e.reduce((s,a,n)=>r>>BigInt(n)&BigInt(1)?lK(a,s):lK(s,a),t)}function xSt(t,e){return e.reduce((r,s)=>lK(s,r),t)}function kSt(t,e){return RSt(t^e-BigInt(1))}function QSt(t){return t.toString(2).split("1").length-1}function RSt(t){return t===0n?0:t.toString(2).length}function lK(t,e){return cK.crypto.digest("sha256",SSt,t,e)}function TSt(t){return cK.crypto.digest("sha256",vSt,t)}});var uxe=_(fK=>{"use strict";Object.defineProperty(fK,"__esModule",{value:!0});fK.verifyTLogSET=OSt;var cxe=Cl(),FSt=Eo(),NSt=py();function OSt(t,e){if(!(0,NSt.filterTLogAuthorities)(e,{logID:t.logId.keyId,targetDate:new Date(Number(t.integratedTime)*1e3)}).some(a=>{let n=LSt(t),c=Buffer.from(cxe.json.canonicalize(n),"utf8"),f=t.inclusionPromise.signedEntryTimestamp;return cxe.crypto.verify(c,a.publicKey,f)}))throw new FSt.VerificationError({code:"TLOG_INCLUSION_PROMISE_ERROR",message:"inclusion promise could not be verified"})}function LSt(t){let{integratedTime:e,logIndex:r,logId:s,canonicalizedBody:a}=t;return{body:a.toString("base64"),integratedTime:Number(e),logIndex:Number(r),logID:s.keyId.toString("hex")}}});var fxe=_(hK=>{"use strict";Object.defineProperty(hK,"__esModule",{value:!0});hK.verifyRFC3161Timestamp=_St;var AK=Cl(),pK=Eo(),MSt=eK(),USt=py();function _St(t,e,r){let s=t.signingTime;if(r=(0,USt.filterCertAuthorities)(r,{start:s,end:s}),r=jSt(r,{serialNumber:t.signerSerialNumber,issuer:t.signerIssuer}),!r.some(n=>{try{return HSt(t,e,n),!0}catch{return!1}}))throw new pK.VerificationError({code:"TIMESTAMP_ERROR",message:"timestamp could not be verified"})}function HSt(t,e,r){let[s,...a]=r.certChain,n=AK.crypto.createPublicKey(s.publicKey),c=t.signingTime;try{new MSt.CertificateChainVerifier({untrustedCert:s,trustedCerts:a}).verify()}catch{throw new pK.VerificationError({code:"TIMESTAMP_ERROR",message:"invalid certificate chain"})}if(!r.certChain.every(p=>p.validForDate(c)))throw new pK.VerificationError({code:"TIMESTAMP_ERROR",message:"timestamp was signed with an expired certificate"});t.verify(e,n)}function jSt(t,e){return t.filter(r=>r.certChain.length>0&&AK.crypto.bufferEqual(r.certChain[0].serialNumber,e.serialNumber)&&AK.crypto.bufferEqual(r.certChain[0].issuer,e.issuer))}});var Axe=_(CL=>{"use strict";Object.defineProperty(CL,"__esModule",{value:!0});CL.verifyTSATimestamp=JSt;CL.verifyTLogTimestamp=KSt;var GSt=Eo(),qSt=axe(),WSt=lxe(),YSt=uxe(),VSt=fxe();function JSt(t,e,r){return(0,VSt.verifyRFC3161Timestamp)(t,e,r),{type:"timestamp-authority",logID:t.signerSerialNumber,timestamp:t.signingTime}}function KSt(t,e){let r=!1;if(zSt(t)&&((0,YSt.verifyTLogSET)(t,e),r=!0),ZSt(t)&&((0,WSt.verifyMerkleInclusion)(t),(0,qSt.verifyCheckpoint)(t,e),r=!0),!r)throw new GSt.VerificationError({code:"TLOG_MISSING_INCLUSION_ERROR",message:"inclusion could not be verified"});return{type:"transparency-log",logID:t.logId.keyId,timestamp:new Date(Number(t.integratedTime)*1e3)}}function zSt(t){return t.inclusionPromise!==void 0}function ZSt(t){return t.inclusionProof!==void 0}});var pxe=_(gK=>{"use strict";Object.defineProperty(gK,"__esModule",{value:!0});gK.verifyDSSETLogBody=XSt;var wL=Eo();function XSt(t,e){switch(t.apiVersion){case"0.0.1":return $St(t,e);default:throw new wL.VerificationError({code:"TLOG_BODY_ERROR",message:`unsupported dsse version: ${t.apiVersion}`})}}function $St(t,e){if(t.spec.signatures?.length!==1)throw new wL.VerificationError({code:"TLOG_BODY_ERROR",message:"signature count mismatch"});let r=t.spec.signatures[0].signature;if(!e.compareSignature(Buffer.from(r,"base64")))throw new wL.VerificationError({code:"TLOG_BODY_ERROR",message:"tlog entry signature mismatch"});let s=t.spec.payloadHash?.value||"";if(!e.compareDigest(Buffer.from(s,"hex")))throw new wL.VerificationError({code:"TLOG_BODY_ERROR",message:"DSSE payload hash mismatch"})}});var hxe=_(mK=>{"use strict";Object.defineProperty(mK,"__esModule",{value:!0});mK.verify
Line truncated
|
|
|
|
|
Try running the command again with the package name prefixed: ${he.pretty(r,"yarn add",he.Type.CODE)} ${he.pretty(r,G.makeDescriptor(G.makeIdent(null,"my-package"),`${ie[0]}...`),he.Type.DESCRIPTOR)}`);if(!ee)throw new nt(`The ${he.pretty(r,W,he.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let ue=klt(a,ee,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(ue.map(async me=>{let pe=await Kv(ee,{project:s,workspace:a,cache:n,fixed:c,target:me,modifier:h,strategies:E,maxResults:w});return{request:ee,suggestedDescriptors:pe,target:me}}))})).then(W=>W.flat()),I=await lA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async W=>{for(let{request:ee,suggestedDescriptors:{suggestions:ie,rejections:ue}}of x)if(ie.filter(me=>me.descriptor!==null).length===0){let[me]=ue;if(typeof me>"u")throw new Error("Assertion failed: Expected an error to have been set");s.configuration.get("enableNetwork")?W.reportError(27,`${G.prettyDescriptor(r,ee)} can't be resolved to a satisfying range`):W.reportError(27,`${G.prettyDescriptor(r,ee)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),W.reportSeparator(),W.reportExceptionOnce(me)}});if(I.hasErrors())return I.exitCode();let T=!1,N=[],U=[];for(let{suggestedDescriptors:{suggestions:W},target:ee}of x){let ie,ue=W.filter(Be=>Be.descriptor!==null),le=ue[0].descriptor,me=ue.every(Be=>G.areDescriptorsEqual(Be.descriptor,le));ue.length===1||me?ie=le:(T=!0,{answer:ie}=await(0,iye.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:W.map(({descriptor:Be,name:Ce,reason:g})=>Be?{name:Ce,hint:g,descriptor:Be}:{name:Ce,hint:g,disabled:!0}),onCancel:()=>process.exit(130),result(Be){return this.find(Be,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let pe=a.manifest[ee].get(ie.identHash);(typeof pe>"u"||pe.descriptorHash!==ie.descriptorHash)&&(a.manifest[ee].set(ie.identHash,ie),this.optional&&(ee==="dependencies"?a.manifest.ensureDependencyMeta({...ie,range:"unknown"}).optional=!0:ee==="peerDependencies"&&(a.manifest.ensurePeerDependencyMeta({...ie,range:"unknown"}).optional=!0)),typeof pe>"u"?N.push([a,ee,ie,E]):U.push([a,ee,pe,ie]))}return await r.triggerMultipleHooks(W=>W.afterWorkspaceDependencyAddition,N),await r.triggerMultipleHooks(W=>W.afterWorkspaceDependencyReplacement,U),T&&this.context.stdout.write(`
|
|
|
|
|
`),await s.installWithNewReport({json:this.json,stdout:this.context.stdout,quiet:this.context.quiet},{cache:n,mode:this.mode})}};function klt(t,e,{dev:r,peer:s,preferDev:a,optional:n}){let c=t.manifest.dependencies.has(e.identHash),f=t.manifest.devDependencies.has(e.identHash),p=t.manifest.peerDependencies.has(e.identHash);if((r||s)&&c)throw new nt(`Package "${G.prettyIdent(t.project.configuration,e)}" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!s&&p)throw new nt(`Package "${G.prettyIdent(t.project.configuration,e)}" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(n&&f)throw new nt(`Package "${G.prettyIdent(t.project.configuration,e)}" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(n&&!s&&p)throw new nt(`Package "${G.prettyIdent(t.project.configuration,e)}" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||a)&&n)throw new nt(`Package "${G.prettyIdent(t.project.configuration,e)}" cannot simultaneously be a dev dependency and an optional dependency`);let h=[];return s&&h.push("peerDependencies"),(r||a)&&h.push("devDependencies"),n&&h.push("dependencies"),h.length>0?h:f?["devDependencies"]:p?["peerDependencies"]:["dependencies"]}Ve();Ve();Wt();var sC=class extends ft{constructor(){super(...arguments);this.verbose=ge.Boolean("-v,--verbose",!1,{description:"Print both the binary name and the locator of the package that provides the binary"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.name=ge.String({required:!1})}static{this.paths=[["bin"]]}static{this.usage=ot.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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,locator:a}=await Rt.find(r,this.context.cwd);if(await s.restoreInstallState(),this.name){let f=(await In.getPackageAccessibleBinaries(a,{project:s})).get(this.name);if(!f)throw new nt(`Couldn't find a binary named "${this.name}" for package "${G.prettyLocator(r,a)}"`);let[,p]=f;return this.context.stdout.write(`${p}
|
|
|
|
|
`),0}return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async c=>{let f=await In.getPackageAccessibleBinaries(a,{project:s}),h=Array.from(f.keys()).reduce((E,w)=>Math.max(E,w.length),0);for(let[E,[w,S]]of f)c.reportJson({name:E,source:G.stringifyIdent(w),path:S});if(this.verbose)for(let[E,[w]]of f)c.reportInfo(null,`${E.padEnd(h," ")} ${G.prettyLocator(r,w)}`);else for(let E of f.keys())c.reportInfo(null,E)})).exitCode()}};Ve();Dt();Wt();var oC=class extends ft{constructor(){super(...arguments);this.mirror=ge.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=ge.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}static{this.paths=[["cache","clean"],["cache","clear"]]}static{this.usage=ot.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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(!r.get("enableCacheClean"))throw new nt("Cache cleaning is currently disabled. To enable it, set `enableCacheClean: true` in your configuration file. Note: Cache cleaning is typically not required and should be avoided when using Zero-Installs.");let s=await Kr.find(r);return(await Ot.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&s.mirrorCwd!==null,c=!this.mirror;n&&(await ce.removePromise(s.mirrorCwd),await r.triggerHook(f=>f.cleanGlobalArtifacts,r)),c&&await ce.removePromise(s.cwd)})).exitCode()}};Ve();Wt();ql();var G5=Ie("util"),aC=class extends ft{constructor(){super(...arguments);this.why=ge.Boolean("--why",!1,{description:"Print the explanation for why a setting has its value"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=ge.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=ge.String()}static{this.paths=[["config","get"]]}static{this.usage=ot.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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=this.name.replace(/[.[].*$/,""),a=this.name.replace(/^[^.[]*/,"");if(typeof r.settings.get(s)>"u")throw new nt(`Couldn't find a configuration settings named "${s}"`);let c=r.getSpecial(s,{hideSecrets:!this.unsafe,getNativePaths:!0}),f=je.convertMapsToIndexableObjects(c),p=a?va(f,a):f,h=await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async E=>{E.reportJson(p)});if(!this.json){if(typeof p=="string")return this.context.stdout.write(`${p}
|
|
|
|
|
`),h.exitCode();G5.inspect.styles.name="cyan",this.context.stdout.write(`${(0,G5.inspect)(p,{depth:1/0,colors:r.get("enableColors"),compact:!1})}
|
|
|
|
|
`)}return h.exitCode()}};Ve();Wt();ql();var q5=Ie("util"),lC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=ge.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=ge.String();this.value=ge.String()}static{this.paths=[["config","set"]]}static{this.usage=ot.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"`]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=()=>{if(!r.projectCwd)throw new nt("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new nt(`Couldn't find a configuration settings named "${a}"`);if(a==="enableStrictSettings")throw new nt("This setting only affects the file it's in, and thus cannot be set from the CLI");let f=this.json?JSON.parse(this.value):this.value;await(this.home?I=>ze.updateHomeConfiguration(I):I=>ze.updateConfiguration(s(),I))(I=>{if(n){let T=f0(I);return Jd(T,this.name,f),T}else return{...I,[a]:f}});let E=(await ze.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),w=je.convertMapsToIndexableObjects(E),S=n?va(w,n):w;return(await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async I=>{q5.inspect.styles.name="cyan",I.reportInfo(0,`Successfully set ${this.name} to ${(0,q5.inspect)(S,{depth:1/0,colors:r.get("enableColors"),compact:!1})}`)})).exitCode()}};Ve();Wt();ql();var cC=class extends ft{constructor(){super(...arguments);this.home=ge.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=ge.String()}static{this.paths=[["config","unset"]]}static{this.usage=ot.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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=()=>{if(!r.projectCwd)throw new nt("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new nt(`Couldn't find a configuration settings named "${a}"`);let f=this.home?h=>ze.updateHomeConfiguration(h):h=>ze.updateConfiguration(s(),h);return(await Ot.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let E=!1;await f(w=>{if(!wB(w,this.name))return h.reportWarning(0,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),E=!0,w;let S=n?f0(w):{...w};return A0(S,this.name),S}),E||h.reportInfo(0,`Successfully unset ${this.name}`)})).exitCode()}};Ve();Dt();Wt();var XT=Ie("util"),uC=class extends ft{constructor(){super(...arguments);this.noDefaults=ge.Boolean("--no-defaults",!1,{description:"Omit the default values from the display"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.verbose=ge.Boolean("-v,--verbose",{hidden:!0});this.why=ge.Boolean("--why",{hidden:!0});this.names=ge.Rest()}static{this.paths=[["config"]]}static{this.usage=ot.Usage({description:"display the current configuration",details:`
|
|
|
|
|
This command prints the current active configuration settings.
|
|
|
|
|
`,examples:[["Print the active configuration settings","$0 config"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins,{strict:!1}),s=await vI({configuration:r,stdout:this.context.stdout,forceError:this.json},[{option:this.verbose,message:"The --verbose option is deprecated, the settings' descriptions are now always displayed"},{option:this.why,message:"The --why option is deprecated, the settings' sources are now always displayed"}]);if(s!==null)return s;let a=this.names.length>0?[...new Set(this.names)].sort():[...r.settings.keys()].sort(),n,c=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async f=>{if(r.invalid.size>0&&!this.json){for(let[p,h]of r.invalid)f.reportError(34,`Invalid configuration key "${p}" in ${h}`);f.reportSeparator()}if(this.json)for(let p of a){if(this.noDefaults&&!r.sources.has(p))continue;let h=r.settings.get(p);typeof h>"u"&&f.reportError(34,`No configuration key named "${p}"`);let E=r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),w=r.sources.get(p)??"<default>",S=w&&w[0]!=="<"?fe.fromPortablePath(w):w;f.reportJson({key:p,effective:E,source:S,...h})}else{let p={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},h={},E={children:h};for(let w of a){if(this.noDefaults&&!r.sources.has(w))continue;let S=r.settings.get(w),x=r.sources.get(w)??"<default>",I=r.getSpecial(w,{hideSecrets:!0,getNativePaths:!0}),T={Description:{label:"Description",value:he.tuple(he.Type.MARKDOWN,{text:S.description,format:this.cli.format(),paragraphs:!1})},Source:{label:"Source",value:he.tuple(x[0]==="<"?he.Type.CODE:he.Type.PATH,x)}};h[w]={value:he.tuple(he.Type.CODE,w),children:T};let N=(U,W)=>{for(let[ee,ie]of W)if(ie instanceof Map){let ue={};U[ee]={children:ue},N(ue,ie)}else U[ee]={label:ee,value:he.tuple(he.Type.NO_HINT,(0,XT.inspect)(ie,p))}};I instanceof Map?N(T,I):T.Value={label:"Value",value:he.tuple(he.Type.NO_HINT,(0,XT.inspect)(I,p))}}a.length!==1&&(n=void 0),xs.emitTree(E,{configuration:r,json:this.json,stdout:this.context.stdout,separators:2})}});if(!this.json&&typeof n<"u"){let f=a[0],p=(0,XT.inspect)(r.getSpecial(f,{hideSecrets:!0,getNativePaths:!0}),{colors:r.get("enableColors")});this.context.stdout.write(`
|
|
|
|
|
`),this.context.stdout.write(`${p}
|
|
|
|
|
`)}return c.exitCode()}};Ve();Wt();Ul();var $T={};Vt($T,{Strategy:()=>zv,acceptedStrategies:()=>Qlt,dedupe:()=>W5});Ve();Ve();var sye=ut(Ba()),zv=(e=>(e.HIGHEST="highest",e))(zv||{}),Qlt=new Set(Object.values(zv)),Rlt={highest:async(t,e,{resolver:r,fetcher:s,resolveOptions:a,fetchOptions:n})=>{let c=new Map;for(let[p,h]of t.storedResolutions){let E=t.storedDescriptors.get(p);if(typeof E>"u")throw new Error(`Assertion failed: The descriptor (${p}) should have been registered`);je.getSetWithDefault(c,E.identHash).add(h)}let f=new Map(je.mapAndFilter(t.storedDescriptors.values(),p=>G.isVirtualDescriptor(p)?je.mapAndFilter.skip:[p.descriptorHash,je.makeDeferred()]));for(let p of t.storedDescriptors.values()){let h=f.get(p.descriptorHash);if(typeof h>"u")throw new Error(`Assertion failed: The descriptor (${p.descriptorHash}) should have been registered`);let E=t.storedResolutions.get(p.descriptorHash);if(typeof E>"u")throw new Error(`Assertion failed: The resolution (${p.descriptorHash}) should have been registered`);let w=t.originalPackages.get(E);if(typeof w>"u")throw new Error(`Assertion failed: The package (${E}) should have been registered`);Promise.resolve().then(async()=>{let S=r.getResolutionDependencies(p,a),x=Object.fromEntries(await je.allSettledSafe(Object.entries(S).map(async([ee,ie])=>{let ue=f.get(ie.descriptorHash);if(typeof ue>"u")throw new Error(`Assertion failed: The descriptor (${ie.descriptorHash}) should have been registered`);let le=await ue.promise;if(!le)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[ee,le.updatedPackage]})));if(e.length&&!sye.default.isMatch(G.stringifyIdent(p),e)||!r.shouldPersistResolution(w,a))return w;let I=c.get(p.identHash);if(typeof I>"u")throw new Error(`Assertion failed: The resolutions (${p.identHash}) should have been registered`);if(I.size===1)return w;let T=[...I].map(ee=>{let ie=t.originalPackages.get(ee);if(typeof ie>"u")throw new Error(`Assertion failed: The package (${ee}) should have been registered`);return ie}),N=await r.getSatisfying(p,x,T,a),U=N.locators?.[0];if(typeof U>"u"||!N.sorted)return w;let W=t.originalPackages.get(U.locatorHash);if(typeof W>"u")throw new Error(`Assertion failed: The package (${U.locatorHash}) should have been registered`);return W}).then(async S=>{let x=await t.preparePackage(S,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:w,updatedPackage:S,resolvedPackage:x})}).catch(S=>{h.reject(S)})}return[...f.values()].map(p=>p.promise)}};async function W5(t,{strategy:e,patterns:r,cache:s,report:a}){let{configuration:n}=t,c=new qi,f=n.makeResolver(),p=n.makeFetcher(),h={cache:s,checksums:t.storedChecksums,fetcher:p,project:t,report:c,cacheOptions:{skipIntegrityCheck:!0}},E={project:t,resolver:f,report:c,fetchOptions:h};return await a.startTimerPromise("Deduplication step",async()=>{let w=Rlt[e],S=await w(t,r,{resolver:f,resolveOptions:E,fetcher:p,fetchOptions:h}),x=Ao.progressViaCounter(S.length);await a.reportProgress(x);let I=0;await Promise.all(S.map(U=>U.then(W=>{if(W===null||W.currentPackage.locatorHash===W.updatedPackage.locatorHash)return;I++;let{descriptor:ee,currentPackage:ie,updatedPackage:ue}=W;a.reportInfo(0,`${G.prettyDescriptor(n,ee)} can be deduped from ${G.prettyLocator(n,ie)} to ${G.prettyLocator(n,ue)}`),a.reportJson({descriptor:G.stringifyDescriptor(ee),currentResolution:G.stringifyLocator(ie),updatedResolution:G.stringifyLocator(ue)}),t.storedResolutions.set(ee.descriptorHash,ue.locatorHash)}).finally(()=>x.tick())));let T;switch(I){case 0:T="No packages";break;case 1:T="One package";break;default:T=`${I} packages`}let N=he.pretty(n,e,he.Type.CODE);return a.reportInfo(0,`${T} can be deduped using the ${N} strategy`),I})}var fC=class extends ft{constructor(){super(...arguments);this.strategy=ge.String("-s,--strategy","highest",{description:"The strategy to use when deduping dependencies",validator:fo(zv)});this.check=ge.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:fo($l)});this.patterns=ge.Rest()}static{this.paths=[["dedupe"]]}static{this.usage=ot.Usage({description:"deduplicate dependencies with overlapping ranges",details:"\n Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\n\n This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\n\n - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never dow
Line truncated
|
|
|
|
|
`)}};var pC=class extends ft{static{this.paths=[["help"],["--help"],["-h"]]}async execute(){this.context.stdout.write(this.cli.usage(null))}};Ve();Dt();Wt();var hC=class extends ft{constructor(){super(...arguments);this.leadingArgument=ge.String();this.args=ge.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!G.tryParseIdent(this.leadingArgument)){let r=J.resolve(this.context.cwd,fe.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:r})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}};Ve();var gC=class extends ft{static{this.paths=[["-v"],["--version"]]}async execute(){this.context.stdout.write(`${un||"<unknown>"}
|
|
|
|
|
`)}};Ve();Ve();Wt();var dC=class extends ft{constructor(){super(...arguments);this.commandName=ge.String();this.args=ge.Proxy()}static{this.paths=[["exec"]]}static{this.usage=ot.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"']]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,locator:a}=await Rt.find(r,this.context.cwd);return await s.restoreInstallState(),await In.executePackageShellcode(a,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:s})}};Ve();Wt();Ul();var mC=class extends ft{constructor(){super(...arguments);this.hash=ge.String({required:!1,validator:Tx(wE(),[z2(/^p[0-9a-f]{6}$/)])})}static{this.paths=[["explain","peer-requirements"]]}static{this.usage=ot.Usage({description:"explain a set of peer requirements",details:`
|
|
|
|
|
A peer requirement represents all peer requests that a subject must satisfy when providing a requested package to requesters.
|
|
|
|
|
|
|
|
|
|
When the hash argument is specified, this command prints a detailed explanation of the peer requirement corresponding to the hash and whether it is satisfied or not.
|
|
|
|
|
|
|
|
|
|
When used without arguments, this command lists all peer requirements and the corresponding hash that can be used to get detailed information about a given requirement.
|
|
|
|
|
|
|
|
|
|
**Note:** A hash is a seven-letter code consisting of the letter 'p' followed by six characters that can be obtained from peer dependency warnings or from the list of all peer requirements(\`yarn explain peer-requirements\`).
|
|
|
|
|
`,examples:[["Explain the corresponding peer requirement for a hash","$0 explain peer-requirements p1a4ed"],["List all peer requirements","$0 explain peer-requirements"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Rt.find(r,this.context.cwd);return await s.restoreInstallState({restoreResolutions:!1}),await s.applyLightResolution(),typeof this.hash<"u"?await Flt(this.hash,s,{stdout:this.context.stdout}):await Nlt(s,{stdout:this.context.stdout})}};async function Flt(t,e,r){let s=e.peerRequirementNodes.get(t);if(typeof s>"u")throw new Error(`No peerDependency requirements found for hash: "${t}"`);let a=new Set,n=p=>a.has(p.requester.locatorHash)?{value:he.tuple(he.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:p.children.size>0?[{value:he.tuple(he.Type.NO_HINT,"...")}]:[]}:(a.add(p.requester.locatorHash),{value:he.tuple(he.Type.DEPENDENT,{locator:p.requester,descriptor:p.descriptor}),children:Object.fromEntries(Array.from(p.children.values(),h=>[G.stringifyLocator(h.requester),n(h)]))}),c=e.peerWarnings.find(p=>p.hash===t);return(await Ot.start({configuration:e.configuration,stdout:r.stdout,includeFooter:!1,includePrefix:!1},async p=>{let h=he.mark(e.configuration),E=c?h.Cross:h.Check;if(p.reportInfo(0,`Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} is requested to provide ${he.pretty(e.configuration,s.ident,he.Type.IDENT)} by its descendants`),p.reportSeparator(),p.reportInfo(0,he.pretty(e.configuration,s.subject,he.Type.LOCATOR)),xs.emitTree({children:Object.fromEntries(Array.from(s.requests.values(),w=>[G.stringifyLocator(w.requester),n(w)]))},{configuration:e.configuration,stdout:r.stdout,json:!1}),p.reportSeparator(),s.provided.range==="missing:"){let w=c?"":" , but all peer requests are optional";p.reportInfo(0,`${E} Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} does not provide ${he.pretty(e.configuration,s.ident,he.Type.IDENT)}${w}.`)}else{let w=e.storedResolutions.get(s.provided.descriptorHash);if(!w)throw new Error("Assertion failed: Expected the descriptor to be registered");let S=e.storedPackages.get(w);if(!S)throw new Error("Assertion failed: Expected the package to be registered");p.reportInfo(0,`${E} Package ${he.pretty(e.configuration,s.subject,he.Type.LOCATOR)} provides ${he.pretty(e.configuration,s.ident,he.Type.IDENT)} with version ${G.prettyReference(e.configuration,S.version??"0.0.0")}, ${c?"which does not satisfy all requests.":"which satisfies all requests"}`),c?.type===3&&(c.range?p.reportInfo(0,` The combined requested range is ${he.pretty(e.configuration,c.range,he.Type.RANGE)}`):p.reportInfo(0," Unfortunately, the requested ranges have no overlap"))}})).exitCode()}async function Nlt(t,e){return(await Ot.start({configuration:t.configuration,stdout:e.stdout,includeFooter:!1,includePrefix:!1},async s=>{let a=he.mark(t.configuration),n=je.sortMap(t.peerRequirementNodes,[([,c])=>G.stringifyLocator(c.subject),([,c])=>G.stringifyIdent(c.ident)]);for(let[,c]of n.values()){if(!c.root)continue;let f=t.peerWarnings.find(E=>E.hash===c.hash),p=[...G.allPeerRequests(c)],h;if(p.length>2?h=` and ${p.length-1} other dependencies`:p.length===2?h=" and 1 other dependency":h="",c.provided.range!=="missing:"){let E=t.storedResolutions.get(c.provided.descriptorHash);if(!E)throw new Error("Assertion failed: Expected the resolution to have been registered");let w=t.storedPackages.get(E);if(!w)throw new Error("Assertion failed: Expected the provided package to have been registered");let S=`${he.pretty(t.configuration,c.hash,he.Type.CODE)} \u2192 ${f?a.Cross:a.Check} ${G.prettyLocator(t.configuration,c.subject)} provides ${G.prettyLocator(t.configuration,w)} to ${G.prettyLocator(t.configuration,p[0].requester)}${h}`;f?s.reportWarning(0,S):s.reportInfo(0,S)}else{let E=`${he.pretty(t.configuration,c.hash,he.Type.CODE)} \u2192 ${f?a.Cross:a.Check} ${G.prettyLocator(t.configuration,c.subject)} doesn't provide ${G.prettyIdent(t.configuration,c.ident)} to ${G.prettyLocator(t.configuration,p[0].requester)}${h}`;f?s.reportWarning(0,E):s.reportInfo(0,E)}}})).exitCode()}Ve();Wt();Ul();Ve();Ve();Dt();Wt();var aye=ut(Ai()),yC=class extends ft{constructor(){super(...arguments);this.useYarnPath=ge.Boolean("--yarn-path",{description:"Set the yarnPath setting even if the version can be accessed by Corepack"});this.onlyIfNeeded=ge.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn't already locked"});this.version=ge.String()}static{this.paths=[["set","version"]]}static{this.usage=ot.Usage({description:"lock the Yarn version used by the project",details:"\n This command will set a specific release of Yarn to be used by Corepack: https://nodejs.org/api/corepack.html.\n\n By default it only will set the `packageManager` field at the root of your project, but if the referenced release cannot be represented this way, if you already have `yarnPath` configured, or if you set th
Line truncated
|
|
|
|
|
${e}`)})}let f=t.projectCwd??t.startingCwd,p=J.resolve(f,".yarn/releases"),h=J.resolve(p,`yarn-${e}.cjs`),E=J.relative(t.startingCwd,h),w=je.isTaggedYarnVersion(e),S=t.get("yarnPath"),x=!w,I=x||!!S||!!a;if(a===!1){if(x)throw new Yt(0,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");I=!1}else!I&&!process.env.COREPACK_ROOT&&(s.reportWarning(0,`You don't seem to have ${he.applyHyperlink(t,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'll have to rely on ${he.applyHyperlink(t,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")} instead`),I=!0);if(I){let ee=await c();s.reportInfo(0,`Saving the new release in ${he.pretty(t,E,"magenta")}`),await ce.removePromise(J.dirname(h)),await ce.mkdirPromise(J.dirname(h),{recursive:!0}),await ce.writeFilePromise(h,ee,{mode:493}),await ze.updateConfiguration(f,{yarnPath:J.relative(f,h)})}else await ce.removePromise(J.dirname(h)),await ze.updateConfiguration(f,{yarnPath:ze.deleteProperty});let T=await Ht.tryFind(f)||new Ht;T.packageManager=`yarn@${w?e:await Zv(t,"stable")}`;let N={};T.exportTo(N);let U=J.join(f,Ht.fileName),W=`${JSON.stringify(N,null,T.indent)}
|
|
|
|
|
`;return await ce.changeFilePromise(U,W,{automaticNewlines:!0}),{bundleVersion:e}}function lye(t){return Dr[_x(t)]}var Llt=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;async function Mlt(t){let r=`https://repo.yarnpkg.com/${je.isTaggedYarnVersion(un)?un:await Zv(t,"canary")}/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx`,s=await An.get(r,{configuration:t});return new Map(Array.from(s.toString().matchAll(Llt),({groups:a})=>{if(!a)throw new Error("Assertion failed: Expected the match to have been successful");let n=lye(a.code);if(a.name!==n)throw new Error(`Assertion failed: Invalid error code data: Expected "${a.name}" to be named "${n}"`);return[a.code,a.details]}))}var EC=class extends ft{constructor(){super(...arguments);this.code=ge.String({required:!1,validator:Z2(wE(),[z2(/^YN[0-9]{4}$/)])});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["explain"]]}static{this.usage=ot.Usage({description:"explain an error code",details:`
|
|
|
|
|
When the code argument is specified, this command prints its name and its details.
|
|
|
|
|
|
|
|
|
|
When used without arguments, this command lists all error codes and their names.
|
|
|
|
|
`,examples:[["Explain an error code","$0 explain YN0006"],["List all error codes","$0 explain"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);if(typeof this.code<"u"){let s=lye(this.code),a=he.pretty(r,s,he.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),f=(await Mlt(r)).get(this.code),p=typeof f<"u"?he.jsonOrPretty(this.json,r,he.tuple(he.Type.MARKDOWN,{text:f,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description.
|
|
|
|
|
|
|
|
|
|
You can help us by editing this page on GitHub \u{1F642}:
|
|
|
|
|
${he.jsonOrPretty(this.json,r,he.tuple(he.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/docusaurus/docs/advanced/01-general-reference/error-codes.mdx"))}
|
|
|
|
|
`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:s,details:p})}
|
|
|
|
|
`):this.context.stdout.write(`${n}
|
|
|
|
|
|
|
|
|
|
${p}
|
|
|
|
|
`)}else{let s={children:je.mapAndFilter(Object.entries(Dr),([a,n])=>Number.isNaN(Number(a))?je.mapAndFilter.skip:{label:Yf(Number(a)),value:he.tuple(he.Type.CODE,n)})};xs.emitTree(s,{configuration:r,stdout:this.context.stdout,json:this.json})}}};Ve();Dt();Wt();var cye=ut(Ba()),IC=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=ge.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=ge.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=ge.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=ge.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=ge.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=ge.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=ge.Rest()}static{this.paths=[["info"]]}static{this.usage=ot.Usage({description:"see information related to packages",details:"\n This command prints various information related to the specified packages, accepting glob patterns.\n\n By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\n\n Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\n\n Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\n ",examples:[["Show information about Lodash","$0 info lodash"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await Kr.find(r);if(!a&&!this.all)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let c=new Set(this.extra);this.cache&&c.add("cache"),this.dependents&&c.add("dependents"),this.manifest&&c.add("manifest");let f=(ie,{recursive:ue})=>{let le=ie.anchoredLocator.locatorHash,me=new Map,pe=[le];for(;pe.length>0;){let Be=pe.shift();if(me.has(Be))continue;let Ce=s.storedPackages.get(Be);if(typeof Ce>"u")throw new Error("Assertion failed: Expected the package to be registered");if(me.set(Be,Ce),G.isVirtualLocator(Ce)&&pe.push(G.devirtualizeLocator(Ce).locatorHash),!(!ue&&Be!==le))for(let g of Ce.dependencies.values()){let we=s.storedResolutions.get(g.descriptorHash);if(typeof we>"u")throw new Error("Assertion failed: Expected the resolution to be registered");pe.push(we)}}return me.values()},p=({recursive:ie})=>{let ue=new Map;for(let le of s.workspaces)for(let me of f(le,{recursive:ie}))ue.set(me.locatorHash,me);return ue.values()},h=({all:ie,recursive:ue})=>ie&&ue?s.storedPackages.values():ie?p({recursive:ue}):f(a,{recursive:ue}),E=({all:ie,recursive:ue})=>{let le=h({all:ie,recursive:ue}),me=this.patterns.map(Ce=>{let g=G.parseLocator(Ce),we=cye.default.makeRe(G.stringifyIdent(g)),ye=G.isVirtualLocator(g),Ae=ye?G.devirtualizeLocator(g):g;return se=>{let X=G.stringifyIdent(se);if(!we.test(X))return!1;if(g.reference==="unknown")return!0;let De=G.isVirtualLocator(se),Te=De?G.devirtualizeLocator(se):se;return!(ye&&De&&g.reference!==se.reference||Ae.reference!==Te.reference)}}),pe=je.sortMap([...le],Ce=>G.stringifyLocator(Ce));return{selection:pe.filter(Ce=>me.length===0||me.some(g=>g(Ce))),sortedLookup:pe}},{selection:w,sortedLookup:S}=E({all:this.all,recursive:this.recursive});if(w.length===0)throw new nt("No package matched your request");let x=new Map;if(this.dependents)for(let ie of S)for(let ue of ie.dependencies.values()){let le=s.storedResolutions.get(ue.descriptorHash);if(typeof le>"u")throw new Error("Assertion failed: Expected the resolution to be registered");je.getArrayWithDefault(x,le).push(ie)}let I=new Map;for(let ie of S){if(!G.isVirtualLocator(ie))continue;let ue=G.devirtualizeLocator(ie);je.getArrayWithDefault(I,ue.locatorHash).push(ie)}let T={},N={children:T},U=r.makeFetcher(),W={project:s,fetcher:U,cache:n,checksums:s.storedChecksum
Line truncated
|
|
|
|
|
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"]]})}async execute(){return this.cli.run(["exec","node",...this.args])}};Ve();Wt();var vC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","check"]]}static{this.usage=ot.Usage({category:"Plugin-related commands",description:"find all third-party plugins that differ from their own spec",details:`
|
|
|
|
|
Check only the plugins from https.
|
|
|
|
|
|
|
|
|
|
If this command detects any plugin differences in the CI environment, it will throw an error.
|
|
|
|
|
`,examples:[["find all third-party plugins that differ from their own spec","$0 plugin check"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=await ze.findRcFiles(this.context.cwd);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{for(let c of s)if(c.data?.plugins)for(let f of c.data.plugins){if(!f.checksum||!f.spec.match(/^https?:/))continue;let p=await An.get(f.spec,{configuration:r}),h=Nn.makeHash(p);if(f.checksum===h)continue;let E=he.pretty(r,f.path,he.Type.PATH),w=he.pretty(r,f.spec,he.Type.URL),S=`${E} is different from the file provided by ${w}`;n.reportJson({...f,newChecksum:h}),n.reportError(0,S)}})).exitCode()}};Ve();Ve();Dt();Wt();var hye=Ie("os");Ve();Dt();Wt();var uye=Ie("os");Ve();wc();Wt();var Glt="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function Sm(t,e){let r=await An.get(Glt,{configuration:t}),s=as(r.toString());return Object.fromEntries(Object.entries(s).filter(([a,n])=>!e||Or.satisfiesWithPrereleases(e,n.range??"<4.0.0-rc.1")))}var SC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","list"]]}static{this.usage=ot.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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await Sm(r,un);for(let[c,{experimental:f,...p}]of Object.entries(n)){let h=c;f&&(h+=" [experimental]"),a.reportJson({name:c,experimental:f,...p}),a.reportInfo(null,h)}})).exitCode()}};var qlt=/^[0-9]+$/,Wlt=process.platform==="win32";function fye(t){return qlt.test(t)?`pull/${t}/head`:t}var Ylt=({repository:t,branch:e},r)=>[["git","init",fe.fromPortablePath(r)],["git","remote","add","origin",t],["git","fetch","origin","--depth=1",fye(e)],["git","reset","--hard","FETCH_HEAD"]],Vlt=({branch:t})=>[["git","fetch","origin","--depth=1",fye(t),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx","-e","packages/yarnpkg-cli/bundles"]],Jlt=({plugins:t,noMinify:e},r,s)=>[["yarn","build:cli",...new Array().concat(...t.map(a=>["--plugin",J.resolve(s,a)])),...e?["--no-minify"]:[],"|"],[Wlt?"move":"mv","packages/yarnpkg-cli/bundles/yarn.js",fe.fromPortablePath(r),"|"]],DC=class extends ft{constructor(){super(...arguments);this.installPath=ge.String("--path",{description:"The path where the repository should be cloned to"});this.repository=ge.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=ge.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=ge.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.dryRun=ge.Boolean("-n,--dry-run",!1,{description:"If set, the bundle will be built but not added to the project"});this.noMinify=ge.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=ge.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=ge.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}static{this.paths=[["set","version","from","sources"]]}static{this.usage=ot.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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Rt.find(r,this.context.cwd),a=typeof this.installPath<"u"?J.resolve(this.context.cwd,fe.toPortablePath(this.installPath)):J.resolve(fe.toPortablePath((0,uye.tmpdir)()),"yarnpkg-sources",Nn.makeHash(this.repository).slice(0,6));return(await Ot.start({configuration:r,stdout:this.context.stdout},async c=>{await J5(this,{configuration:r,report:c,target:a}),c.reportSeparator(),c.reportInfo(0,"Building a fresh bundle"),c.reportSeparator();let f=await qr.execvp("git",["rev-parse","--short","HEAD"],{cwd:a,strict:!0}),p=J.join(a,`packages/yarnpkg-cli/bundles/yarn-${f.stdout.trim()}.js`);ce.existsSync(p)||(await Xv(Jlt(this,p,a),{configuration:r,context:this.context,target:a}),c.reportSeparator());let h=await ce.readFilePromise(p);if(!this.dryRun){let{bundleVersion:E}=await Y5(r,null,async()=>h,{report:c});this.skipPlugins||await Klt(this,E,{project:s,report:c,target:a})}})).exitCode()}};async function Xv(t,{configuration:e,context:r,target:s}){for(let[a,...n]of t){let c=n[n.length-1]==="|";if(c&&n.pop(),c)await qr.pipevp(a,n,{cwd:s,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${he.pretty(e,` $ ${[a,...n].join(" ")}`,"grey")}
|
|
|
|
|
`);try{await qr.execvp(a,n,{cwd:s,strict:!0})}catch(f){throw r.stdout.write(f.stdout||f.stack),f}}}}async function J5(t,{configuration:e,report:r,target:s}){let a=!1;if(!t.force&&ce.existsSync(J.join(s,".git"))){r.reportInfo(0,"Fetching the latest commits"),r.reportSeparator();try{await Xv(Vlt(t),{configuration:e,context:t.context,target:s}),a=!0}catch{r.reportSeparator(),r.reportWarning(0,"Repository update failed; we'll try to regenerate it")}}a||(r.reportInfo(0,"Cloning the remote repository"),r.reportSeparator(),await ce.removePromise(s),await ce.mkdirPromise(s,{recursive:!0}),await Xv(Ylt(t,s),{configuration:e,context:t.context,target:s}))}async function Klt(t,e,{project:r,report:s,target:a}){let n=await Sm(r.configuration,e),c=new Set(Object.keys(n));for(let f of r.configuration.plugins.keys())c.has(f)&&await K5(f,t,{project:r,report:s,target:a})}Ve();Ve();Dt();Wt();var Aye=ut(Ai()),pye=Ie("vm");var bC=class extends ft{constructor(){super(...arguments);this.name=ge.String();this.checksum=ge.Boolean("--checksum",!0,{description:"Whether to care if this plugin is modified"})}static{this.paths=[["plugin","import"]]}static{this.usage=ot.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.
|
|
|
|
|
|
|
|
|
|
If the \`--no-checksum\` option is set, Yarn will no longer care if the plugin is modified.
|
|
|
|
|
|
|
|
|
|
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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await Rt.find(r,this.context.cwd),c,f;if(this.name.match(/^\.{0,2}[\\/]/)||fe.isAbsolute(this.name)){let p=J.resolve(this.context.cwd,fe.toPortablePath(this.name));a.reportInfo(0,`Reading ${he.pretty(r,p,he.Type.PATH)}`),c=J.relative(n.cwd,p),f=await ce.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new URL(this.name)}catch{throw new Yt(52,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}c=this.name,p=this.name}else{let h=G.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(h.reference!=="unknown"&&!Aye.default.valid(h.reference))throw new Yt(0,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let E=G.stringifyIdent(h),w=await Sm(r,un);if(!Object.hasOwn(w,E)){let S=`Couldn't find a plugin named ${G.prettyIdent(r,h)} on the remote registry.
|
|
|
|
|
`;throw r.plugins.has(E)?S+=`A plugin named ${G.prettyIdent(r,h)} is already installed; possibly attempting to import a built-in plugin.`:S+=`Note that only the plugins referenced on our website (${he.pretty(r,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",he.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${he.pretty(r,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",he.Type.URL)}).`,new Yt(51,S)}c=E,p=w[E].url,h.reference!=="unknown"?p=p.replace(/\/master\//,`/${E}/${h.reference}/`):un!==null&&(p=p.replace(/\/master\//,`/@yarnpkg/cli/${un}/`))}a.reportInfo(0,`Downloading ${he.pretty(r,p,"green")}`),f=await An.get(p,{configuration:r})}await z5(c,f,{checksum:this.checksum,project:n,report:a})})).exitCode()}};async function z5(t,e,{checksum:r=!0,project:s,report:a}){let{configuration:n}=s,c={},f={exports:c};(0,pye.runInNewContext)(e.toString(),{module:f,exports:c});let h=`.yarn/plugins/${f.exports.name}.cjs`,E=J.resolve(s.cwd,h);a.reportInfo(0,`Saving the new plugin in ${he.pretty(n,h,"magenta")}`),await ce.mkdirPromise(J.dirname(E),{recursive:!0}),await ce.writeFilePromise(E,e);let w={path:h,spec:t};r&&(w.checksum=Nn.makeHash(e)),await ze.addPlugin(s.cwd,[w])}var zlt=({pluginName:t,noMinify:e},r)=>[["yarn",`build:${t}`,...e?["--no-minify"]:[],"|"]],PC=class extends ft{constructor(){super(...arguments);this.installPath=ge.String("--path",{description:"The path where the repository should be cloned to"});this.repository=ge.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=ge.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=ge.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=ge.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=ge.String()}static{this.paths=[["plugin","import","from","sources"]]}static{this.usage=ot.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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=typeof this.installPath<"u"?J.resolve(this.context.cwd,fe.toPortablePath(this.installPath)):J.resolve(fe.toPortablePath((0,hye.tmpdir)()),"yarnpkg-sources",Nn.makeHash(this.repository).slice(0,6));return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:c}=await Rt.find(r,this.context.cwd),f=G.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),p=G.stringifyIdent(f),h=await Sm(r,un);if(!Object.hasOwn(h,p))throw new Yt(51,`Couldn't find a plugin named "${p}" 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 E=p;await J5(this,{configuration:r,report:n,target:s}),await K5(E,this,{project:c,report:n,target:s})})).exitCode()}};async function K5(t,{context:e,noMinify:r},{project:s,report:a,target:n}){let c=t.replace(/@yarnpkg\//,""),{configuration:f}=s;a.reportSeparator(),a.reportInfo(0,`Building a fresh ${c}`),a.reportSeparator(),await Xv(zlt({pluginName:c,noMinify:r},n),{configuration:f,context:e,target:n}),a.reportSeparator();let p=J.resolve(n,`packages/${c}/bundles/${t}.js`),h=await ce.readFilePromise(p);await z5(t,h,{project:s,report:a})}Ve();Dt();Wt();var xC=class extends ft{constructor(){super(...arguments);this.name=ge.String()}static{this.paths=[["plugin","remove"]]}static{this.usage=ot.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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Rt.find(r,this.context.cwd);return(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let c=this.name,f=G.parseIdent(c);if(!r.plugins.has(c))throw new nt(`${G.prettyIdent(r,f)} isn't referenced by the current configuration`);let p=`.yarn/plugins/${c}.cjs`,h=J.resolve(s.cwd,p);ce.existsSync(h)&&(n.reportInfo(0,`Removing ${he.pretty(r,p,he.Type.PATH)}...`),await ce.removePromise(h)),n.reportInfo(0,"Updating the configuration..."),await ze.updateConfiguration(s.cwd,{plugins:E=>{if(!Array.isArray(E))return E;let w=E.filter(S=>S.path!==p);return w.length===0?ze.deleteProperty:w.length===E.length?E:w}})})).exitCode()}};Ve();Wt();var kC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["plugin","runtime"]]}static{this.usage=ot.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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins);return(await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let c=this.context.plugins.plugins.has(n),f=n;c&&(f+=" [builtin]"),a.reportJson({name:n,builtin:c}),a.reportInfo(null,`${f}`)}})).exitCode()}};Ve();Ve();Wt();var QC=class extends ft{constructor(){super(...arguments);this.idents=ge.Rest()}static{this.paths=[["rebuild"]]}static{this.usage=ot.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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);let c=new Set;for(let f of this.idents)c.add(G.parseIdent(f).identHash);if(await s.restoreInstallState({restoreResolutions:!1}),await s.resolveEverything({cache:n,report:new qi}),c.size>0)for(let f of s.storedPackages.values())c.has(f.identHash)&&(s.storedBuildState.delete(f.locatorHash),s.skippedBuilds.delete(f.locatorHash));else s.storedBuildState.clear(),s.skippedBuilds.clear();return await s.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ve();Ve();Ve();Wt();var Z5=ut(Ba());Ul();var RC=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:fo($l)});this.patterns=ge.Rest()}static{this.paths=[["remove"]]}static{this.usage=ot.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 latter 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}'"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=this.all?s.workspaces:[a],f=["dependencies","devDependencies","peerDependencies"],p=[],h=!1,E=[];for(let I of this.patterns){let T=!1,N=G.parseIdent(I);for(let U of c){let W=[...U.manifest.peerDependenciesMeta.keys()];for(let ee of(0,Z5.default)(W,I))U.manifest.peerDependenciesMeta.delete(ee),h=!0,T=!0;for(let ee of f){let ie=U.manifest.getForScope(ee),ue=[...ie.values()].map(le=>G.stringifyIdent(le));for(let le of(0,Z5.default)(ue,G.stringifyIdent(N))){let{identHash:me}=G.parseIdent(le),pe=ie.get(me);if(typeof pe>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");U.manifest[ee].delete(me),E.push([U,ee,pe]),h=!0,T=!0}}}T||p.push(I)}let w=p.length>1?"Patterns":"Pattern",S=p.length>1?"don't":"doesn't",x=this.all?"any":"this";if(p.length>0)throw new nt(`${w} ${he.prettyList(r,p,he.Type.CODE)} ${S} match any packages referenced by ${x} workspace`);return h?(await r.triggerMultipleHooks(I=>I.afterWorkspaceDependencyRemoval,E),await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})):0}};Ve();Ve();Wt();var gye=Ie("util"),TC=class extends ft{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["run"]]}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);return(await Ot.start({configuration:r,stdout:this.context.stdout,json:this.json},async c=>{let f=a.manifest.scripts,p=je.sortMap(f.keys(),w=>w),h={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},E=p.reduce((w,S)=>Math.max(w,S.length),0);for(let[w,S]of f.entries())c.reportInfo(null,`${w.padEnd(E," ")} ${(0,gye.inspect)(S,h)}`),c.reportJson({name:w,script:S})})).exitCode()}};Ve();Ve();Wt();var FC=class extends ft{constructor(){super(...arguments);this.inspect=ge.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=ge.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=ge.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=ge.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.require=ge.String("--require",{description:"Forwarded to the underlying Node process when executing a binary"});this.silent=ge.Boolean("--silent",{hidden:!0});this.scriptName=ge.String();this.args=ge.Proxy()}static{this.paths=[["run"]]}static{this.usage=ot.Usage({description:"run a script defined in the package.json",details:`
|
|
|
|
|
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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a,locator:n}=await Rt.find(r,this.context.cwd);await s.restoreInstallState();let c=this.topLevel?s.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await In.hasPackageScript(c,this.scriptName,{project:s}))return await In.executePackageScript(c,this.scriptName,this.args,{project:s,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let f=await In.getPackageAccessibleBinaries(c,{project:s});if(f.get(this.scriptName)){let h=[];return this.inspect&&(typeof this.inspect=="string"?h.push(`--inspect=${this.inspect}`):h.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?h.push(`--inspect-brk=${this.inspectBrk}`):h.push("--inspect-brk")),this.require&&h.push(`--require=${this.require}`),await In.executePackageAccessibleBinary(c,this.scriptName,this.args,{cwd:this.context.cwd,project:s,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:h,packageAccessibleBinaries:f})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(":")){let E=(await Promise.all(s.workspaces.map(async w=>w.manifest.scripts.has(this.scriptName)?w:null))).filter(w=>w!==null);if(E.length===1)return await In.executeWorkspaceScript(E[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 nt(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${G.prettyLocator(r,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 nt(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${G.prettyLocator(r,n)}).`);{if(this.scriptName==="global")throw new nt("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");let h=[this.scriptName].concat(this.args);for(let[E,w]of XI)for(let S of w)if(h.length>=S.length&&JSON.stringify(h.slice(0,S.length))===JSON.stringify(S))throw new nt(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${E} plugin. You can install it with "yarn plugin import ${E}".`);throw new nt(`Couldn't find a script named "${this.scriptName}".`)}}};Ve();Ve();Wt();var NC=class extends ft{constructor(){super(...arguments);this.descriptor=ge.String();this.resolution=ge.String()}static{this.paths=[["set","resolution"]]}static{this.usage=ot.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, edit the `resolutions` field in 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 npm:1.5.0"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await Kr.find(r);if(await s.restoreInstallState({restoreResolutions:!1}),!a)throw new ar(s.cwd,this.context.cwd);let c=G.parseDescriptor(this.descriptor,!0),f=G.makeDescriptor(c,this.resolution);return s.storedDescriptors.set(c.descriptorHash,c),s.storedDescriptors.set(f.descriptorHash,f),s.resolutionAliases.set(c.descriptorHash,f.descriptorHash),await s.installWithNewReport({stdout:this.context.stdout},{cache:n})}};Ve();Dt();Wt();var dye=ut(Ba()),OC=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=ge.Rest()}static{this.paths=[["unlink"]]}static{this.usage=ot.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}'"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);let c=s.topLevelWorkspace,f=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:p,reference:h}of c.manifest.resolutions)h.startsWith("portal:")&&f.add(p.descriptor.fullName);if(this.leadingArguments.length>0)for(let p of this.leadingArguments){let h=J.resolve(this.context.cwd,fe.toPortablePath(p));if(je.isPathLike(p)){let E=await ze.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:w,workspace:S}=await Rt.find(E,h);if(!S)throw new ar(w.cwd,h);if(this.all){for(let x of w.workspaces)x.manifest.name&&f.add(G.stringifyIdent(x.anchoredLocator));if(f.size===0)throw new nt("No workspace found to be unlinked in the target project")}else{if(!S.manifest.name)throw new nt("The target workspace doesn't have a name and thus cannot be unlinked");f.add(G.stringifyIdent(S.anchoredLocator))}}else{let E=[...c.manifest.resolutions.map(({pattern:w})=>w.descriptor.fullName)];for(let w of(0,dye.default)(E,p))f.add(w)}}return c.manifest.resolutions=c.manifest.resolutions.filter(({pattern:p})=>!f.has(p.descriptor.fullName)),await s.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};Ve();Ve();Ve();Wt();var mye=ut(Yv()),X5=ut(Ba());Ul();var LC=class extends ft{constructor(){super(...arguments);this.interactive=ge.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.fixed=ge.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=ge.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=ge.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=ge.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:fo($l)});this.patterns=ge.Rest()}static{this.paths=[["up"]]}static{this.usage=ot.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 latter 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`Line truncated
|
|
|
|
|
|
|
|
|
|
${le}`):N.reportError(27,`${G.prettyDescriptor(r,U)} can't be resolved to a satisfying range (note: network resolution has been disabled)
|
|
|
|
|
|
|
|
|
|
${le}`)}else ie.length>1&&!f&&N.reportError(27,`${G.prettyDescriptor(r,U)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(x.hasErrors())return x.exitCode();let I=!1,T=[];for(let[N,U,,{suggestions:W}]of S){let ee,ie=W.filter(pe=>pe.descriptor!==null),ue=ie[0].descriptor,le=ie.every(pe=>G.areDescriptorsEqual(pe.descriptor,ue));ie.length===1||le?ee=ue:(I=!0,{answer:ee}=await(0,mye.prompt)({type:"select",name:"answer",message:`Which range do you want to use in ${G.prettyWorkspace(r,N)} \u276F ${U}?`,choices:W.map(({descriptor:pe,name:Be,reason:Ce})=>pe?{name:Be,hint:Ce,descriptor:pe}:{name:Be,hint:Ce,disabled:!0}),onCancel:()=>process.exit(130),result(pe){return this.find(pe,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let me=N.manifest[U].get(ee.identHash);if(typeof me>"u")throw new Error("Assertion failed: This descriptor should have a matching entry");if(me.descriptorHash!==ee.descriptorHash)N.manifest[U].set(ee.identHash,ee),T.push([N,U,me,ee]);else{let pe=r.makeResolver(),Be={project:s,resolver:pe},Ce=r.normalizeDependency(me),g=pe.bindDescriptor(Ce,N.anchoredLocator,Be);s.forgetResolution(g)}}return await r.triggerMultipleHooks(N=>N.afterWorkspaceDependencyReplacement,T),I&&this.context.stdout.write(`
|
|
|
|
|
`),await s.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}};Ve();Ve();Ve();Wt();var MC=class extends ft{constructor(){super(...arguments);this.recursive=ge.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=ge.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=ge.String()}static{this.paths=[["why"]]}static{this.usage=ot.Usage({description:"display the reason why a package is needed",details:`
|
|
|
|
|
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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=G.parseIdent(this.package).identHash,c=this.recursive?Xlt(s,n,{configuration:r,peers:this.peers}):Zlt(s,n,{configuration:r,peers:this.peers});xs.emitTree(c,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1})}};function Zlt(t,e,{configuration:r,peers:s}){let a=je.sortMap(t.storedPackages.values(),f=>G.stringifyLocator(f)),n={},c={children:n};for(let f of a){let p={};for(let E of f.dependencies.values()){if(!s&&f.peerDependencies.has(E.identHash))continue;let w=t.storedResolutions.get(E.descriptorHash);if(!w)throw new Error("Assertion failed: The resolution should have been registered");let S=t.storedPackages.get(w);if(!S)throw new Error("Assertion failed: The package should have been registered");if(S.identHash!==e)continue;{let I=G.stringifyLocator(f);n[I]={value:[f,he.Type.LOCATOR],children:p}}let x=G.stringifyLocator(S);p[x]={value:[{descriptor:E,locator:S},he.Type.DEPENDENT]}}}return c}function Xlt(t,e,{configuration:r,peers:s}){let a=je.sortMap(t.workspaces,S=>G.stringifyLocator(S.anchoredLocator)),n=new Set,c=new Set,f=S=>{if(n.has(S.locatorHash))return c.has(S.locatorHash);if(n.add(S.locatorHash),S.identHash===e)return c.add(S.locatorHash),!0;let x=!1;S.identHash===e&&(x=!0);for(let I of S.dependencies.values()){if(!s&&S.peerDependencies.has(I.identHash))continue;let T=t.storedResolutions.get(I.descriptorHash);if(!T)throw new Error("Assertion failed: The resolution should have been registered");let N=t.storedPackages.get(T);if(!N)throw new Error("Assertion failed: The package should have been registered");f(N)&&(x=!0)}return x&&c.add(S.locatorHash),x};for(let S of a)f(S.anchoredPackage);let p=new Set,h={},E={children:h},w=(S,x,I)=>{if(!c.has(S.locatorHash))return;let T=I!==null?he.tuple(he.Type.DEPENDENT,{locator:S,descriptor:I}):he.tuple(he.Type.LOCATOR,S),N={},U={value:T,children:N},W=G.stringifyLocator(S);if(x[W]=U,!(I!==null&&t.tryWorkspaceByLocator(S))&&!p.has(S.locatorHash)){p.add(S.locatorHash);for(let ee of S.dependencies.values()){if(!s&&S.peerDependencies.has(ee.identHash))continue;let ie=t.storedResolutions.get(ee.descriptorHash);if(!ie)throw new Error("Assertion failed: The resolution should have been registered");let ue=t.storedPackages.get(ie);if(!ue)throw new Error("Assertion failed: The package should have been registered");w(ue,N,ee)}}};for(let S of a)w(S.anchoredPackage,h,null);return E}Ve();var lq={};Vt(lq,{GitFetcher:()=>eS,GitResolver:()=>tS,default:()=>Ect,gitUtils:()=>ka});Ve();Dt();var ka={};Vt(ka,{TreeishProtocols:()=>$v,clone:()=>aq,fetchBase:()=>Mye,fetchChangedFiles:()=>Uye,fetchChangedWorkspaces:()=>mct,fetchRoot:()=>Lye,isGitUrl:()=>HC,lsRemote:()=>Oye,normalizeLocator:()=>dct,normalizeRepoUrl:()=>UC,resolveUrl:()=>oq,splitRepoUrl:()=>W0,validateRepoUrl:()=>sq});Ve();Dt();Wt();ql();var Fye=ut(Qye()),_C=ut(Ie("querystring")),nq=ut(Ai());function rq(t,e,r){let s=t.indexOf(r);return t.lastIndexOf(e,s>-1?s:1/0)}function Rye(t){try{return new URL(t)}catch{return}}function hct(t){let e=rq(t,"@","#"),r=rq(t,":","#");return r>e&&(t=`${t.slice(0,r)}/${t.slice(r+1)}`),rq(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`ssh://${t}`),t}function Tye(t){return Rye(t)||Rye(hct(t))}function UC(t,{git:e=!1}={}){if(t=t.replace(/^git\+https:/,"https:"),t=t.replace(/^(?:github:|https:\/\/github\.com\/|git:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3"),t=t.replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3"),e){let r=Tye(t);r&&(t=r.href),t=t.replace(/^git\+([^:]+):/,"$1:")}return t}function Nye(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`}}var gct=[/^ssh:/,/^git(?:\+[^:]+)?:/,/^(?:git\+)?https?:[^#]+\/[^#]+(?:\.git)(?:#.*)?$/,/^git@[^#]+\/[^#]+\.git(?:#.*)?$/,/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z._0-9-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\.git)?(?:#.*)?$/,/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/],$v=(a=>(a.Commit="commit",a.Head="head",a.Tag="tag",a.Semver="semver",a))($v||{});function HC(t){return t?gct.some(e=>!!t.match(e)):!1}function W0(t){t=UC(t);let e=t.indexOf("#");if(e===-1)return{repo:t,treeish:{protocol:"head",request:"HEAD"},extra:{}};let r=t.slice(0,e),s=t.slice(e+1);if(s.match(/^[a-z]+=/)){let a=_C.default.parse(s);for(let[p,h]of Object.entries(a))if(typeof h!="string")throw new Error(`Assertion failed: The ${p} parameter must be a literal string`);let n=Object.values($v).find(p=>Object.hasOwn(a,p)),[c,f]=typeof n
Line truncated
|
|
|
|
|
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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=s.workspaces,c=new Map(n.map(p=>[G.stringifyIdent(p.anchoredLocator),p])),f=c.get(this.workspaceName);if(f===void 0){let p=Array.from(c.keys()).sort();throw new nt(`Workspace '${this.workspaceName}' not found. Did you mean any of the following:
|
|
|
|
|
- ${p.join(`
|
|
|
|
|
- `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:f.cwd})}};var Ict={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:"BOOLEAN",default:_ye.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:"STRING",values:["^","~",""],default:"^"},preferReuse:{description:"If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.",type:"BOOLEAN",default:!1}},commands:[oC,aC,lC,cC,NC,DC,yC,jC,AC,pC,hC,gC,iC,sC,uC,fC,dC,mC,EC,IC,CC,wC,OC,BC,vC,PC,bC,xC,SC,kC,QC,RC,TC,FC,LC,MC,GC]},Cct=Ict;var hq={};Vt(hq,{default:()=>Bct});Ve();var Qt={optional:!0},uq=[["@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:Qt,zenObservable:Qt}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:Qt,zenObservable:Qt}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{"supports-color":Qt}}],["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":Qt,"postcss-jsx":Qt,"postcss-less":Qt,"postcss-markdown":Qt,"postcss-scss":Qt}}],["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:Qt}}],["snowpack@>=3.3.0",{dependencies:{"node-gyp":"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:Qt}}],["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@<=0.5.2",{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@<=6.3.4",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4","vue-template-compiler":"*"},peerDependenciesMeta:{eslint:Qt,"vue-template-compiler":Qt}}],["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:Qt,"utf-8-validate":Qt}}],["react-portal@<4.2.2",{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@*",{peerDependencies:{webpack:"*"}}],["gatsby-plugin-sharp@<=4.6.0-next.3",{dependencies:{debug:"^4.3.1"}}],["gatsby-react-router-scroll@<=5.6.0-next.0",{dependencies:{"prop-types":"^15.7.2"}}],["@rebass/forms@*",{dependencies:{"@styled-system/should-forward-prop":"^5.0.0"},peerDependencies:{react:"^16.8.6"}}],["rebass@*",{peerDependencies:{react:"^16.8.6"}}],["@ant-design/react-slick@<=0.28.3",{peerDependencies:{react:">=16.0.0"}}],["mqtt@<4.2.7",{dependencies:{duplexify:"^4.1.1"}}],["vue-cli-plugin-vuetify@<=2.0.3",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":Qt,"vuetify-loader":Qt}}],["vue-cli-plugin-vuetify@<=2.0.4",{dependencies:{"null-loader":"^3.0.0"}}],["vue-cli-plugin-vuetify@>=2.4.3",{peerDependencies:{vue:"*"}}],["@vuetify/cli-plugin-utils@<=0.0.4",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":Qt}}],["@vue/cli-plugin-typescript@<=5.0.0-alpha.0",{deLine truncated
|
|
|
|
|
This command will output all matches to the given prolog query.
|
|
|
|
|
`,examples:[["List all dependencies throughout the workspace","yarn constraints query 'workspace_has_dependency(_, DependencyName, _, _).'"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(aS(),oS)),s=await ze.find(this.context.cwd,this.context.plugins),{project:a}=await Rt.find(s,this.context.cwd),n=await r.find(a),c=this.query;return c.endsWith(".")||(c=`${c}.`),(await Ot.start({configuration:s,json:this.json,stdout:this.context.stdout},async p=>{for await(let h of n.query(c)){let E=Array.from(Object.entries(h)),w=E.length,S=E.reduce((x,[I])=>Math.max(x,I.length),0);for(let x=0;x<w;x++){let[I,T]=E[x];p.reportInfo(null,`${_ct(x,w)}${I.padEnd(S," ")} = ${Uct(T)}`)}p.reportJson(h)}})).exitCode()}};function Uct(t){return typeof t!="string"?`${t}`:t.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?t:`'${t}'`}function _ct(t,e){let r=t===0,s=t===e-1;return r&&s?"":r?"\u250C ":s?"\u2514 ":"\u2502 "}Ve();Wt();var zC=class extends ft{constructor(){super(...arguments);this.verbose=ge.Boolean("-v,--verbose",!1,{description:"Also print the fact database automatically compiled from the workspace manifests"})}static{this.paths=[["constraints","source"]]}static{this.usage=ot.Usage({category:"Constraints-related commands",description:"print the source code for the constraints",details:"\n This command will print the Prolog source code used by the constraints engine. Adding the `-v,--verbose` flag will print the *full* source code, including the fact database automatically compiled from the workspace manifests.\n ",examples:[["Prints the source code","yarn constraints source"],["Print the source code and the fact database","yarn constraints source -v"]]})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(aS(),oS)),s=await ze.find(this.context.cwd,this.context.plugins),{project:a}=await Rt.find(s,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};Ve();Ve();Wt();nS();var ZC=class extends ft{constructor(){super(...arguments);this.fix=ge.Boolean("--fix",!1,{description:"Attempt to automatically fix unambiguous issues, following a multi-pass process"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}static{this.paths=[["constraints"]]}static{this.usage=ot.Usage({category:"Constraints-related commands",description:"check that the project constraints are met",details:`
|
|
|
|
|
This command will run constraints on your project and emit errors for each one that is found but isn't met. If any error is emitted the process will exit with a non-zero exit code.
|
|
|
|
|
|
|
|
|
|
If the \`--fix\` flag is used, Yarn will attempt to automatically fix the issues the best it can, following a multi-pass process (with a maximum of 10 iterations). Some ambiguous patterns cannot be autofixed, in which case you'll have to manually specify the right resolution.
|
|
|
|
|
|
|
|
|
|
For more information as to how to write constraints, please consult our dedicated page on our website: https://yarnpkg.com/features/constraints.
|
|
|
|
|
`,examples:[["Check that all constraints are satisfied","yarn constraints"],["Autofix all unmet constraints","yarn constraints --fix"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Rt.find(r,this.context.cwd);await s.restoreInstallState();let a=await s.loadUserConfig(),n;if(a?.constraints)n=new WC(s);else{let{Constraints:h}=await Promise.resolve().then(()=>(aS(),oS));n=await h.find(s)}let c,f=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let E=await n.process();if(!E)break;let{changedWorkspaces:w,remainingErrors:S}=tF(s,E,{fix:this.fix}),x=[];for(let[I,T]of w){let N=I.manifest.indent;I.manifest=new Ht,I.manifest.indent=N,I.manifest.load(T),x.push(I.persistManifest())}if(await Promise.all(x),!(w.size>0&&h>1)){c=Wye(S,{configuration:r}),f=!1,p=!0;for(let[,I]of S)for(let T of I)T.fixable?f=!0:p=!1}}if(c.children.length===0)return 0;if(f){let h=p?`Those errors can all be fixed by running ${he.pretty(r,"yarn constraints --fix",he.Type.CODE)}`:`Errors prefixed by '\u2699' can be fixed by running ${he.pretty(r,"yarn constraints --fix",he.Type.CODE)}`;await Ot.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async E=>{E.reportInfo(0,h),E.reportSeparator()})}return c.children=je.sortMap(c.children,h=>h.value[1]),xs.emitTree(c,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};nS();var Hct={configuration:{enableConstraintsChecks:{description:"If true, constraints will run during installs",type:"BOOLEAN",default:!1},constraintsPath:{description:"The path of the constraints file.",type:"ABSOLUTE_PATH",default:"./constraints.pro"}},commands:[KC,zC,ZC],hooks:{async validateProjectAfterInstall(t,{reportError:e}){if(!t.configuration.get("enableConstraintsChecks"))return;let r=await t.loadUserConfig(),s;if(r?.constraints)s=new WC(t);else{let{Constraints:c}=await Promise.resolve().then(()=>(aS(),oS));s=await c.find(t)}let a=await s.process();if(!a)return;let{remainingErrors:n}=tF(t,a);if(n.size!==0)if(t.configuration.isCI)for(let[c,f]of n)for(let p of f)e(84,`${he.pretty(t.configuration,c.anchoredLocator,he.Type.IDENT)}: ${p.text}`);else e(84,`Constraint check failed; run ${he.pretty(t.configuration,"yarn constraints",he.Type.CODE)} for more details`)}}},jct=Hct;var Rq={};Vt(Rq,{CreateCommand:()=>XC,DlxCommand:()=>$C,default:()=>qct});Ve();Wt();var XC=class extends ft{constructor(){super(...arguments);this.pkg=ge.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=ge.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=ge.String();this.args=ge.Proxy()}static{this.paths=[["create"]]}async execute(){let r=[];this.pkg&&r.push("--package",this.pkg),this.quiet&&r.push("--quiet");let s=this.command.replace(/^(@[^@/]+)(@|$)/,"$1/create$2"),a=G.parseDescriptor(s),n=a.name.match(/^create(-|$)/)?a:a.scope?G.makeIdent(a.scope,`create-${a.name}`):G.makeIdent(null,`create-${a.name}`),c=G.stringifyIdent(n);return a.range!=="unknown"&&(c+=`@${a.range}`),this.cli.run(["dlx",...r,c,...this.args])}};Ve();Ve();Dt();Wt();var $C=class extends ft{constructor(){super(...arguments);this.packages=ge.Array("-p,--package",{description:"The package(s) to install before running the command"});this.quiet=ge.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=ge.String();this.args=ge.Proxy()}static{this.paths=[["dlx"]]}static{this.usage=ot.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-vite to scaffold a new Vite project","yarn dlx create-vite"],["Install multiple packages for a single command",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e "console.log('hello!')"`]]})}async execute(){return ze.telemetry=null,await ce.mktempPromise(async r=>{let s=J.join(r,`dlx-${process.pid}`);await ce.mkdirPromise(s),await ce.writeFilePromise(J.join(s,"package.json"),`{}
|
|
|
|
|
`),await ce.writeFilePromise(J.join(s,"yarn.lock"),"");let a=J.join(s,".yarnrc.yml"),n=await ze.findProjectCwd(this.context.cwd),f={enableGlobalCache:!(await ze.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),enableTelemetry:!1,logFilters:[{code:Yf(68),level:he.LogLevel.Discard}]},p=n!==null?J.join(n,".yarnrc.yml"):null;p!==null&&ce.existsSync(p)?(await ce.copyFilePromise(p,a),await ze.updateConfiguration(s,N=>{let U=je.toMerged(N,f);return Array.isArray(N.plugins)&&(U.plugins=N.plugins.map(W=>{let ee=typeof W=="string"?W:W.path,ie=fe.isAbsolute(ee)?ee:fe.resolve(fe.fromPortablePath(n),ee);return typeof W=="string"?ie:{path:ie,spec:W.spec}})),U})):await ce.writeJsonPromise(a,f);let h=this.packages??[this.command],E=G.parseDescriptor(this.command).name,w=await this.cli.run(["add","--fixed","--",...h],{cwd:s,quiet:this.quiet});if(w!==0)return w;this.quiet||this.context.stdout.write(`
|
|
|
|
|
`);let S=await ze.find(s,this.context.plugins),{project:x,workspace:I}=await Rt.find(S,s);if(I===null)throw new ar(x.cwd,s);await x.restoreInstallState();let T=await In.getWorkspaceAccessibleBinaries(I);return T.has(E)===!1&&T.size===1&&typeof this.packages>"u"&&(E=Array.from(T)[0][0]),await In.executeWorkspaceAccessibleBinary(I,E,this.args,{packageAccessibleBinaries:T,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};var Gct={commands:[XC,$C]},qct=Gct;var Nq={};Vt(Nq,{ExecFetcher:()=>cS,ExecResolver:()=>uS,default:()=>Vct,execUtils:()=>sF});Ve();Ve();Dt();var cA="exec:";var sF={};Vt(sF,{loadGeneratorFile:()=>lS,makeLocator:()=>Fq,makeSpec:()=>mEe,parseSpec:()=>Tq});Ve();Dt();function Tq(t){let{params:e,selector:r}=G.parseRange(t),s=fe.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?G.parseLocator(e.locator):null,path:s}}function mEe({parentLocator:t,path:e,generatorHash:r,protocol:s}){let a=t!==null?{locator:G.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return G.makeRange({protocol:s,source:e,selector:e,params:{...n,...a}})}function Fq(t,{parentLocator:e,path:r,generatorHash:s,protocol:a}){return G.makeLocator(t,mEe({parentLocator:e,path:r,generatorHash:s,protocol:a}))}async function lS(t,e,r){let{parentLocator:s,path:a}=G.parseFileStyleRange(t,{protocol:e}),n=J.isAbsolute(a)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(s,r),c=n.localPath?{packageFs:new Sn(vt.root),prefixPath:J.relative(vt.root,n.localPath)}:n;n!==c&&n.releaseFs&&n.releaseFs();let f=c.packageFs,p=J.join(c.prefixPath,a);return await f.readFilePromise(p,"utf8")}var cS=class{supports(e,r){return!!e.reference.startsWith(cA)}getLocalPath(e,r){let{parentLocator:s,path:a}=G.parseFileStyleRange(e.reference,{protocol:cA});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:J.resolve(n,a)}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async fetchFromDisk(e,r){let s=await lS(e.reference,cA,r);return ce.mktempPromise(async a=>{let n=J.join(a,"generator.js");return await ce.writeFilePromise(n,s),ce.mktempPromise(async c=>{if(await this.generatePackage(c,e,n,r),!ce.existsSync(J.join(c,"build")))throw new Error("The script should have generated a build directory");return await ps.makeArchiveFromDirectory(J.join(c,"build"),{prefixPath:G.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(e,r,s,a){return await ce.mktempPromise(async n=>{let c=await In.makeScriptEnv({project:a.project,binFolder:n}),f=J.join(e,"runtime.js");return await ce.mktempPromise(async p=>{let h=J.join(p,"buildfile.log"),E=J.join(e,"generator"),w=J.join(e,"build");await ce.mkdirPromise(E),await ce.mkdirPromise(w);let S={tempDir:fe.fromPortablePath(E),buildDir:fe.fromPortablePath(w),locator:G.stringifyLocator(r)};await ce.writeFilePromise(f,`
|
|
|
|
|
// Expose 'Module' as a global variable
|
|
|
|
|
Object.defineProperty(global, 'Module', {
|
|
|
|
|
get: () => require('module'),
|
|
|
|
|
configurable: true,
|
|
|
|
|
enumerable: false,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Expose non-hidden built-in modules as global variables
|
|
|
|
|
for (const name of Module.builtinModules.filter((name) => name !== 'module' && !name.startsWith('_'))) {
|
|
|
|
|
Object.defineProperty(global, name, {
|
|
|
|
|
get: () => require(name),
|
|
|
|
|
configurable: true,
|
|
|
|
|
enumerable: false,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Expose the 'execEnv' global variable
|
|
|
|
|
Object.defineProperty(global, 'execEnv', {
|
|
|
|
|
value: {
|
|
|
|
|
...${JSON.stringify(S)},
|
|
|
|
|
},
|
|
|
|
|
enumerable: true,
|
|
|
|
|
});
|
|
|
|
|
`);let x=c.NODE_OPTIONS||"",I=/\s*--require\s+\S*\.pnp\.c?js\s*/g;x=x.replace(I," ").trim(),c.NODE_OPTIONS=x;let{stdout:T,stderr:N}=a.project.configuration.getSubprocessStreams(h,{header:`# This file contains the result of Yarn generating a package (${G.stringifyLocator(r)})
|
|
|
|
|
`,prefix:G.prettyLocator(a.project.configuration,r),report:a.report}),{code:U}=await qr.pipevp(process.execPath,["--require",fe.fromPortablePath(f),fe.fromPortablePath(s),G.stringifyIdent(r)],{cwd:e,env:c,stdin:null,stdout:T,stderr:N});if(U!==0)throw ce.detachTemp(p),new Error(`Package generation failed (exit code ${U}, logs can be found here: ${he.pretty(a.project.configuration,h,he.Type.PATH)})`)})})}};Ve();Ve();var Wct=2,uS=class{supportsDescriptor(e,r){return!!e.range.startsWith(cA)}supportsLocator(e,r){return!!e.reference.startsWith(cA)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){return G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=Tq(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let c=await lS(G.makeRange({protocol:cA,source:a,selector:a,params:{locator:G.stringifyLocator(n)}}),cA,s.fetchOptions),f=Nn.makeHash(`${Wct}`,c).slice(0,6);return[Fq(e,{parentLocator:n,path:a,generatorHash:f,protocol:cA})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let s=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await je.releaseAfterUseAsync(async()=>await Ht.find(s.prefixPath,{baseFs:s.packageFs}),s.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var Yct={fetchers:[cS],resolvers:[uS]},Vct=Yct;var Lq={};Vt(Lq,{FileFetcher:()=>hS,FileResolver:()=>gS,TarballFileFetcher:()=>dS,TarballFileResolver:()=>mS,default:()=>zct,fileUtils:()=>xm});Ve();Dt();var ew=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,fS=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,$i="file:";var xm={};Vt(xm,{fetchArchiveFromLocator:()=>pS,makeArchiveFromLocator:()=>oF,makeBufferFromLocator:()=>Oq,makeLocator:()=>tw,makeSpec:()=>yEe,parseSpec:()=>AS});Ve();Dt();function AS(t){let{params:e,selector:r}=G.parseRange(t),s=fe.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?G.parseLocator(e.locator):null,path:s}}function yEe({parentLocator:t,path:e,hash:r,protocol:s}){let a=t!==null?{locator:G.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return G.makeRange({protocol:s,source:e,selector:e,params:{...n,...a}})}function tw(t,{parentLocator:e,path:r,hash:s,protocol:a}){return G.makeLocator(t,yEe({parentLocator:e,path:r,hash:s,protocol:a}))}async function pS(t,e){let{parentLocator:r,path:s}=G.parseFileStyleRange(t.reference,{protocol:$i}),a=J.isAbsolute(s)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await e.fetcher.fetch(r,e),n=a.localPath?{packageFs:new Sn(vt.root),prefixPath:J.relative(vt.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let c=n.packageFs,f=J.join(n.prefixPath,s);return await je.releaseAfterUseAsync(async()=>await c.readFilePromise(f),n.releaseFs)}async function oF(t,{protocol:e,fetchOptions:r,inMemory:s=!1}){let{parentLocator:a,path:n}=G.parseFileStyleRange(t.reference,{protocol:e}),c=J.isAbsolute(n)?{packageFs:new Sn(vt.root),prefixPath:vt.dot,localPath:vt.root}:await r.fetcher.fetch(a,r),f=c.localPath?{packageFs:new Sn(vt.root),prefixPath:J.relative(vt.root,c.localPath)}:c;c!==f&&c.releaseFs&&c.releaseFs();let p=f.packageFs,h=J.join(f.prefixPath,n);return await je.releaseAfterUseAsync(async()=>await ps.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:G.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:s}),f.releaseFs)}async function Oq(t,{protocol:e,fetchOptions:r}){return(await oF(t,{protocol:e,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var hS=class{supports(e,r){return!!e.reference.startsWith($i)}getLocalPath(e,r){let{parentLocator:s,path:a}=G.parseFileStyleRange(e.reference,{protocol:$i});if(J.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(s,r);return n===null?null:J.resolve(n,a)}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async fetchFromDisk(e,r){return oF(e,{protocol:$i,fetchOptions:r})}};Ve();Ve();var Jct=2,gS=c
Line truncated
|
|
|
|
|
`,{automaticNewlines:!0});let h=[p],E=J.join(this.context.cwd,"README.md");if(ce.existsSync(E)||(await ce.writeFilePromise(E,`# ${G.stringifyIdent(n.name)}
|
|
|
|
|
`),h.push(E)),!s||s.cwd===this.context.cwd){let w=J.join(this.context.cwd,Er.lockfile);ce.existsSync(w)||(await ce.writeFilePromise(w,""),h.push(w));let x=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# Whether you use PnP or not, the node_modules folder is often used to store","# build artifacts that should be gitignored","node_modules","","# Swap the comments on the following lines if you wish to use zero-installs","# In that case, don't forget to run `yarn config set enableGlobalCache false`!","# Documentation here: https://yarnpkg.com/features/caching#zero-installs","","#!.yarn/cache",".pnp.*"].map(ue=>`${ue}
|
|
|
|
|
`).join(""),I=J.join(this.context.cwd,".gitignore");ce.existsSync(I)||(await ce.writeFilePromise(I,x),h.push(I));let N=["/.yarn/** linguist-vendored","/.yarn/releases/* binary","/.yarn/plugins/**/* binary","/.pnp.* binary linguist-generated"].map(ue=>`${ue}
|
|
|
|
|
`).join(""),U=J.join(this.context.cwd,".gitattributes");ce.existsSync(U)||(await ce.writeFilePromise(U,N),h.push(U));let W={"*":{charset:"utf-8",endOfLine:"lf",indentSize:2,indentStyle:"space",insertFinalNewline:!0}};je.mergeIntoTarget(W,r.get("initEditorConfig"));let ee=`root = true
|
|
|
|
|
`;for(let[ue,le]of Object.entries(W)){ee+=`
|
|
|
|
|
[${ue}]
|
|
|
|
|
`;for(let[me,pe]of Object.entries(le)){let Be=me.replace(/[A-Z]/g,Ce=>`_${Ce.toLowerCase()}`);ee+=`${Be} = ${pe}
|
|
|
|
|
`}}let ie=J.join(this.context.cwd,".editorconfig");ce.existsSync(ie)||(await ce.writeFilePromise(ie,ee),h.push(ie)),await this.cli.run(["install"],{quiet:!0}),await this.initialize(),ce.existsSync(J.join(this.context.cwd,".git"))||(await qr.execvp("git",["init"],{cwd:this.context.cwd}),await qr.execvp("git",["add","--",...h],{cwd:this.context.cwd}),await qr.execvp("git",["commit","--allow-empty","-m","First commit"],{cwd:this.context.cwd}))}}};var rw=class extends z0{constructor(){super(...arguments);this.initializer=ge.String();this.argv=ge.Proxy()}static{this.paths=[["init"]]}async initialize(){this.context.stdout.write(`
|
|
|
|
|
`),await this.cli.run(["dlx",this.initializer,...this.argv],{quiet:!0})}};var tut={configuration:{initScope:{description:"Scope used when creating packages via the init command",type:"STRING",default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:"MAP",valueDefinition:{description:"",type:"ANY"}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:"MAP",valueDefinition:{description:"",type:"ANY"}}},commands:[z0,rw]},rut=tut;var UW={};Vt(UW,{SearchCommand:()=>Ew,UpgradeInteractiveCommand:()=>Iw,default:()=>fgt});Ve();var BEe=ut(Ie("os"));function nw({stdout:t}){if(BEe.default.endianness()==="BE")throw new Error("Interactive commands cannot be used on big-endian systems because ink depends on yoga-layout-prebuilt which only supports little-endian architectures");if(!t.isTTY)throw new Error("Interactive commands can only be used inside a TTY environment")}Wt();var NIe=ut(o9()),a9={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},$ft=(0,NIe.default)(a9.appId,a9.apiKey).initIndex(a9.indexName),l9=async(t,e=0)=>await $ft.search(t,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:e,hitsPerPage:10});var ID=["regular","dev","peer"],Ew=class extends ft{static{this.paths=[["search"]]}static{this.usage=ot.Usage({category:"Interactive commands",description:"open the search interface",details:`
|
|
|
|
|
This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry.
|
|
|
|
|
`,examples:[["Open the search window","yarn search"]]})}async execute(){nw(this.context);let{Gem:e}=await Promise.resolve().then(()=>(jF(),PW)),{ScrollableItems:r}=await Promise.resolve().then(()=>(YF(),WF)),{useKeypress:s}=await Promise.resolve().then(()=>(mD(),f2e)),{useMinistore:a}=await Promise.resolve().then(()=>(FW(),TW)),{renderForm:n}=await Promise.resolve().then(()=>(zF(),KF)),{default:c}=await Promise.resolve().then(()=>ut(C2e())),{Box:f,Text:p}=await Promise.resolve().then(()=>ut(Wc())),{default:h,useEffect:E,useState:w}=await Promise.resolve().then(()=>ut(hn())),S=await ze.find(this.context.cwd,this.context.plugins),x=()=>h.createElement(f,{flexDirection:"row"},h.createElement(f,{flexDirection:"column",width:48},h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to move between packages.")),h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," to select a package.")),h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," again to change the target."))),h.createElement(f,{flexDirection:"column"},h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to install the selected packages.")),h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),I=()=>h.createElement(h.Fragment,null,h.createElement(f,{width:15},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Owner")),h.createElement(f,{width:11},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Version")),h.createElement(f,{width:10},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Downloads"))),T=()=>h.createElement(f,{width:17},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Target")),N=({hit:pe,active:Be})=>{let[Ce,g]=a(pe.name,null);s({active:Be},(Ae,se)=>{if(se.name!=="space")return;if(!Ce){g(ID[0]);return}let X=ID.indexOf(Ce)+1;X===ID.length?g(null):g(ID[X])},[Ce,g]);let we=G.parseIdent(pe.name),ye=G.prettyIdent(S,we);return h.createElement(f,null,h.createElement(f,{width:45},h.createElement(p,{bold:!0,wrap:"wrap"},ye)),h.createElement(f,{width:14,marginLeft:1},h.createElement(p,{bold:!0,wrap:"truncate"},pe.owner.name)),h.createElement(f,{width:10,marginLeft:1},h.createElement(p,{italic:!0,wrap:"truncate"},pe.version)),h.createElement(f,{width:16,marginLeft:1},h.createElement(p,null,pe.humanDownloadsLast30Days)))},U=({name:pe,active:Be})=>{let[Ce]=a(pe,null),g=G.parseIdent(pe);return h.createElement(f,null,h.createElement(f,{width:47},h.createElement(p,{bold:!0}," - ",G.prettyIdent(S,g))),ID.map(we=>h.createElement(f,{key:we,width:14,marginLeft:1},h.createElement(p,null," ",h.createElement(e,{active:Ce===we})," ",h.createElement(p,{bold:!0},we)))))},W=()=>h.createElement(f,{marginTop:1},h.createElement(p,null,"Powered by Algolia.")),ie=await n(({useSubmit:pe})=>{let Be=a();pe(Be);let Ce=Array.from(Be.keys()).filter(j=>Be.get(j)!==null),[g,we]=w(""),[ye,Ae]=w(0),[se,X]=w([]),De=j=>{j.match(/\t| /)||we(j)},Te=async()=>{Ae(0);let j=await l9(g);j.query===g&&X(j.hits)},mt=async()=>{let j=await l9(g,ye+1);j.query===g&&j.page-1===ye&&(Ae(j.page),X([...se,...j.hits]))};return E(()=>{g?Te():X([])},[g]),h.createElement(f,{flexDirection:"column"},h.createElement(x,null),h.createElement(f,{flexDirection:"row",marginTop:1},h.createElement(p,{bold:!0},"Search: "),h.createElement(f,{width:41},h.createElement(c,{value:g,onChange:De,placeholder:"i.e. babel, webpack, react...",showCursor:!1})),h.createElement(I,null)),se.length?h.createElement(r,{radius:2,loop:!1,children:se.map(j=>h.createElement(N,{key:j.name,hit:j,active:!1})),willReachEnd:mt}):h.createElement(p,{color:"gray"},"Start typing..."),h.createElement(f,{flexDirection:"row",marginTop:1},h.createElement(f,{width:49},h.createElement(p,{bold:!0},"Selected:")),h.createElement(T,null)),Ce.length?Ce.map(j=>h.createElement(U,{key:j,name:j,active:!1})):h.createElement(p,{color:"gray"},"No selected packages..."),h.createElement(W,null))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof ie>"u")return 1;let ue=Array.from(ie.keys()).filter(pe=>ie.get(pe)==="regular"),le=Array.from(ie.keys()).filter(pe=>ie.get(pe)==="dev"),me=Array.from(ie.keys()).filter(pe=>ie.get(pe)==="peer");return ue.length&&await this.cli.run(["add",...ue]),le.length&&await this.cli.run(["add","--dev",...le]),me&&await this.cli.run(["add","--peer",...me]),0}};Ve();Wt();HG();var P2e=ut(Ai()),b2e=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/;function x2e(t,e){return t.length>0?[t.slice(0,e)].concat(x2e(t.slice(e),e)):[]}var Iw=class extends ft{static{this.paths=[["upgrade-interactive"]]}static{this.usage=ot.Usage({category:"Interactive commands",description:"open
Line truncated
|
|
|
|
|
This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade.
|
|
|
|
|
`,examples:[["Open the upgrade window","yarn upgrade-interactive"]]})}async execute(){nw(this.context);let{ItemOptions:e}=await Promise.resolve().then(()=>(D2e(),S2e)),{Pad:r}=await Promise.resolve().then(()=>(MW(),v2e)),{ScrollableItems:s}=await Promise.resolve().then(()=>(YF(),WF)),{useMinistore:a}=await Promise.resolve().then(()=>(FW(),TW)),{renderForm:n}=await Promise.resolve().then(()=>(zF(),KF)),{Box:c,Text:f}=await Promise.resolve().then(()=>ut(Wc())),{default:p,useEffect:h,useRef:E,useState:w}=await Promise.resolve().then(()=>ut(hn())),S=await ze.find(this.context.cwd,this.context.plugins),{project:x,workspace:I}=await Rt.find(S,this.context.cwd),T=await Kr.find(S);if(!I)throw new ar(x.cwd,this.context.cwd);await x.restoreInstallState({restoreResolutions:!1});let N=this.context.stdout.rows-7,U=(we,ye)=>{let Ae=ade(we,ye),se="";for(let X of Ae)X.added?se+=he.pretty(S,X.value,"green"):X.removed||(se+=X.value);return se},W=(we,ye)=>{if(we===ye)return ye;let Ae=G.parseRange(we),se=G.parseRange(ye),X=Ae.selector.match(b2e),De=se.selector.match(b2e);if(!X||!De)return U(we,ye);let Te=["gray","red","yellow","green","magenta"],mt=null,j="";for(let rt=1;rt<Te.length;++rt)mt!==null||X[rt]!==De[rt]?(mt===null&&(mt=Te[rt-1]),j+=he.pretty(S,De[rt],mt)):j+=De[rt];return j},ee=async(we,ye,Ae)=>{let se=await Zu.fetchDescriptorFrom(we,Ae,{project:x,cache:T,preserveModifier:ye,workspace:I});return se!==null?se.range:we.range},ie=async we=>{let ye=P2e.default.valid(we.range)?`^${we.range}`:we.range,[Ae,se]=await Promise.all([ee(we,we.range,ye).catch(()=>null),ee(we,we.range,"latest").catch(()=>null)]),X=[{value:null,label:we.range}];return Ae&&Ae!==we.range?X.push({value:Ae,label:W(we.range,Ae)}):X.push({value:null,label:""}),se&&se!==Ae&&se!==we.range?X.push({value:se,label:W(we.range,se)}):X.push({value:null,label:""}),X},ue=()=>p.createElement(c,{flexDirection:"row"},p.createElement(c,{flexDirection:"column",width:49},p.createElement(c,{marginLeft:1},p.createElement(f,null,"Press ",p.createElement(f,{bold:!0,color:"cyanBright"},"<up>"),"/",p.createElement(f,{bold:!0,color:"cyanBright"},"<down>")," to select packages.")),p.createElement(c,{marginLeft:1},p.createElement(f,null,"Press ",p.createElement(f,{bold:!0,color:"cyanBright"},"<left>"),"/",p.createElement(f,{bold:!0,color:"cyanBright"},"<right>")," to select versions."))),p.createElement(c,{flexDirection:"column"},p.createElement(c,{marginLeft:1},p.createElement(f,null,"Press ",p.createElement(f,{bold:!0,color:"cyanBright"},"<enter>")," to install.")),p.createElement(c,{marginLeft:1},p.createElement(f,null,"Press ",p.createElement(f,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),le=()=>p.createElement(c,{flexDirection:"row",paddingTop:1,paddingBottom:1},p.createElement(c,{width:50},p.createElement(f,{bold:!0},p.createElement(f,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:"gray"},"Current")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:"gray"},"Range")),p.createElement(c,{width:17},p.createElement(f,{bold:!0,underline:!0,color:"gray"},"Latest"))),me=({active:we,descriptor:ye,suggestions:Ae})=>{let[se,X]=a(ye.descriptorHash,null),De=G.stringifyIdent(ye),Te=Math.max(0,45-De.length);return p.createElement(p.Fragment,null,p.createElement(c,null,p.createElement(c,{width:45},p.createElement(f,{bold:!0},G.prettyIdent(S,ye)),p.createElement(r,{active:we,length:Te})),p.createElement(e,{active:we,options:Ae,value:se,skewer:!0,onChange:X,sizes:[17,17,17]})))},pe=({dependencies:we})=>{let[ye,Ae]=w(we.map(()=>null)),se=E(!0),X=async De=>{let Te=await ie(De);return Te.filter(mt=>mt.label!=="").length<=1?null:{descriptor:De,suggestions:Te}};return h(()=>()=>{se.current=!1},[]),h(()=>{let De=Math.trunc(N*1.75),Te=we.slice(0,De),mt=we.slice(De),j=x2e(mt,N),rt=Te.map(X).reduce(async(Fe,Ne)=>{await Fe;let Pe=await Ne;Pe!==null&&se.current&&Ae(Ye=>{let ke=Ye.findIndex(Ue=>Ue===null),it=[...Ye];return it[ke]=Pe,it})},Promise.resolve());j.reduce((Fe,Ne)=>Promise.all(Ne.map(Pe=>Promise.resolve().then(()=>X(Pe)))).then(async Pe=>{Pe=Pe.filter(Ye=>Ye!==null),await Fe,se.current&&Ae(Ye=>{let ke=Ye.findIndex(it=>it===null);return Ye.slice(0,ke).concat(Pe).concat(Ye.slice(ke+Pe.length))})}),rt).then(()=>{se.current&&Ae(Fe=>Fe.filter(Ne=>Ne!==null))})},[]),ye.length?p.createElement(s,{radius:N>>1,children:ye.map((De,Te)=>De!==null?p.createElement(me,{key:Te,active:!1,descriptor:De.descriptor,suggestions:De.suggestions}):p.createElement(f,{key:Te},"Loading..."))}):p.createElement(f,null,"No upgrades found")},Ce=await n(({useSubmit:we})=>{we(a());let ye=new Map;for(let se of x.workspaces)for(let X of["dependencies","devDependencies"])for(let De of se.manifest[X].values())x.tryWorkspaceByDescriptor(De)===null&&(De.range.startsWith("link:")||ye.set(De.descriptorHash,De));let Ae=je.sortMap(ye.values(),se=>G.stringifyDescriptor(se));return p.createEleme
Line truncated
|
|
|
|
|
${E}, next tree:
|
|
|
|
|
${bD(f)}`);let S=T2e(f);if(S)throw new Error(`${S}, after hoisting finished:
|
|
|
|
|
${bD(f)}`)}return n.debugLevel>=2&&console.log(bD(f)),Sgt(f)},ygt=t=>{let e=t[t.length-1],r=new Map,s=new Set,a=n=>{if(!s.has(n)){s.add(n);for(let c of n.hoistedDependencies.values())r.set(c.name,c);for(let c of n.dependencies.values())n.peerNames.has(c.name)||a(c)}};return a(e),r},Egt=t=>{let e=t[t.length-1],r=new Map,s=new Set,a=new Set,n=(c,f)=>{if(s.has(c))return;s.add(c);for(let h of c.hoistedDependencies.values())if(!f.has(h.name)){let E;for(let w of t)E=w.dependencies.get(h.name),E&&r.set(E.name,E)}let p=new Set;for(let h of c.dependencies.values())p.add(h.name);for(let h of c.dependencies.values())c.peerNames.has(h.name)||n(h,p)};return n(e,a),r},Q2e=(t,e)=>{if(e.decoupled)return e;let{name:r,references:s,ident:a,locator:n,dependencies:c,originalDependencies:f,hoistedDependencies:p,peerNames:h,reasons:E,isHoistBorder:w,hoistPriority:S,dependencyKind:x,hoistedFrom:I,hoistedTo:T}=e,N={name:r,references:new Set(s),ident:a,locator:n,dependencies:new Map(c),originalDependencies:new Map(f),hoistedDependencies:new Map(p),peerNames:new Set(h),reasons:new Map(E),decoupled:!0,isHoistBorder:w,hoistPriority:S,dependencyKind:x,hoistedFrom:new Map(I),hoistedTo:new Map(T)},U=N.dependencies.get(r);return U&&U.ident==N.ident&&N.dependencies.set(r,N),t.dependencies.set(N.name,N),N},Igt=(t,e)=>{let r=new Map([[t.name,[t.ident]]]);for(let a of t.dependencies.values())t.peerNames.has(a.name)||r.set(a.name,[a.ident]);let s=Array.from(e.keys());s.sort((a,n)=>{let c=e.get(a),f=e.get(n);if(f.hoistPriority!==c.hoistPriority)return f.hoistPriority-c.hoistPriority;{let p=c.dependents.size+c.peerDependents.size;return f.dependents.size+f.peerDependents.size-p}});for(let a of s){let n=a.substring(0,a.indexOf("@",1)),c=a.substring(n.length+1);if(!t.peerNames.has(n)){let f=r.get(n);f||(f=[],r.set(n,f)),f.indexOf(c)<0&&f.push(c)}}return r},GW=t=>{let e=new Set,r=(s,a=new Set)=>{if(!a.has(s)){a.add(s);for(let n of s.peerNames)if(!t.peerNames.has(n)){let c=t.dependencies.get(n);c&&!e.has(c)&&r(c,a)}e.add(s)}};for(let s of t.dependencies.values())t.peerNames.has(s.name)||r(s);return e},WW=(t,e,r,s,a,n=new Set)=>{let c=e[e.length-1];if(n.has(c))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(c);let f=Dgt(c),p=Igt(c,f),h=t==c?new Map:a.fastLookupPossible?ygt(e):Egt(e),E,w=!1,S=!1,x=new Map(Array.from(p.entries()).map(([T,N])=>[T,N[0]])),I=new Map;do{let T=Bgt(t,e,r,h,x,p,s,I,a);T.isGraphChanged&&(S=!0),T.anotherRoundNeeded&&(w=!0),E=!1;for(let[N,U]of p)U.length>1&&!c.dependencies.has(N)&&(x.delete(N),U.shift(),x.set(N,U[0]),E=!0)}while(E);for(let T of c.dependencies.values())if(!c.peerNames.has(T.name)&&!r.has(T.locator)){r.add(T.locator);let N=WW(t,[...e,T],r,I,a);N.isGraphChanged&&(S=!0),N.anotherRoundNeeded&&(w=!0),r.delete(T.locator)}return{anotherRoundNeeded:w,isGraphChanged:S}},Cgt=t=>{for(let[e,r]of t.dependencies)if(!t.peerNames.has(e)&&r.ident!==t.ident)return!0;return!1},wgt=(t,e,r,s,a,n,c,f,{outputReason:p,fastLookupPossible:h})=>{let E,w=null,S=new Set;p&&(E=`${Array.from(e).map(N=>yo(N)).join("\u2192")}`);let x=r[r.length-1],T=!(s.ident===x.ident);if(p&&!T&&(w="- self-reference"),T&&(T=s.dependencyKind!==1,p&&!T&&(w="- workspace")),T&&s.dependencyKind===2&&(T=!Cgt(s),p&&!T&&(w="- external soft link with unhoisted dependencies")),T&&(T=!t.peerNames.has(s.name),p&&!T&&(w=`- cannot shadow peer: ${yo(t.originalDependencies.get(s.name).locator)} at ${E}`)),T){let N=!1,U=a.get(s.name);if(N=!U||U.ident===s.ident,p&&!N&&(w=`- filled by: ${yo(U.locator)} at ${E}`),N)for(let W=r.length-1;W>=1;W--){let ie=r[W].dependencies.get(s.name);if(ie&&ie.ident!==s.ident){N=!1;let ue=f.get(x);ue||(ue=new Set,f.set(x,ue)),ue.add(s.name),p&&(w=`- filled by ${yo(ie.locator)} at ${r.slice(0,W).map(le=>yo(le.locator)).join("\u2192")}`);break}}T=N}if(T&&(T=n.get(s.name)===s.ident,p&&!T&&(w=`- filled by: ${yo(c.get(s.name)[0])} at ${E}`)),T){let N=!0,U=new Set(s.peerNames);for(let W=r.length-1;W>=1;W--){let ee=r[W];for(let ie of U){if(ee.peerNames.has(ie)&&ee.originalDependencies.has(ie))continue;let ue=ee.dependencies.get(ie);ue&&t.dependencies.get(ie)!==ue&&(W===r.length-1?S.add(ue):(S=null,N=!1,p&&(w=`- peer dependency ${yo(ue.locator)} from parent ${yo(ee.locator)} was not hoisted to ${E}`))),U.delete(ie)}if(!N)break}T=N}if(T&&!h)for(let N of s.hoistedDependencies.values()){let U=a.get(N.name)||t.dependencies.get(N.name);if(!U||N.ident!==U.ident){T=!1,p&&(w=`- previously hoisted dependency mismatch, needed: ${yo(N.locator)}, available: ${yo(U?.locator)}`);break}}return S!==null&&S.size>0?{isHoistable:2,dependsOn:S,reason:w}:{isHoistable:T?0:1,reason:w}},$F=t=>`${t.name}@${t.locator}`,Bgt=(t,e,r,s,a,n,c,f,p)=>{let h=e[e.length-1],E=new Set,w=!1,S=!1,x=(U,W,ee,ie,ue)=>{if(E.has(ie))return;let le=[...W,$F(ie)],me=[...ee,$F(ie)],pe=new Map,Be=new Map;for(let Ae of GW(ie)){let se=wgt(h,r,[h,...U,ie],Ae,s,a,n,f,{outputReason:p.debugLevel>=2,fastLookupPossible:p.fastLookupPossible});if(Be.set(Ae,se),se.isHoistable===2)for(let X of se.dependsOn){let
Line truncated
|
|
|
|
|
${bD(t)}`)}let ye=GW(ie);for(let Ae of ye)if(Ce.has(Ae)){let se=Be.get(Ae);if((a.get(Ae.name)===Ae.ident||!ie.reasons.has(Ae.name))&&se.isHoistable!==0&&ie.reasons.set(Ae.name,se.reason),!Ae.isHoistBorder&&me.indexOf($F(Ae))<0){E.add(ie);let De=Q2e(ie,Ae);x([...U,ie],le,me,De,T),E.delete(ie)}}},I,T=new Set(GW(h)),N=Array.from(e).map(U=>$F(U));do{I=T,T=new Set;for(let U of I){if(U.locator===h.locator||U.isHoistBorder)continue;let W=Q2e(h,U);x([],Array.from(r),N,W,T)}}while(T.size>0);return{anotherRoundNeeded:w,isGraphChanged:S}},T2e=t=>{let e=[],r=new Set,s=new Set,a=(n,c,f)=>{if(r.has(n)||(r.add(n),s.has(n)))return;let p=new Map(c);for(let h of n.dependencies.values())n.peerNames.has(h.name)||p.set(h.name,h);for(let h of n.originalDependencies.values()){let E=p.get(h.name),w=()=>`${Array.from(s).concat([n]).map(S=>yo(S.locator)).join("\u2192")}`;if(n.peerNames.has(h.name)){let S=c.get(h.name);(S!==E||!S||S.ident!==h.ident)&&e.push(`${w()} - broken peer promise: expected ${h.ident} but found ${S&&S.ident}`)}else{let S=f.hoistedFrom.get(n.name),x=n.hoistedTo.get(h.name),I=`${S?` hoisted from ${S.join(", ")}`:""}`,T=`${x?` hoisted to ${x}`:""}`,N=`${w()}${I}`;E?E.ident!==h.ident&&e.push(`${N} - broken require promise for ${h.name}${T}: expected ${h.ident}, but found: ${E.ident}`):e.push(`${N} - broken require promise: no required dependency ${h.name}${T} found`)}}s.add(n);for(let h of n.dependencies.values())n.peerNames.has(h.name)||a(h,p,n);s.delete(n)};return a(t,t.dependencies,t),e.join(`
|
|
|
|
|
`)},vgt=(t,e)=>{let{identName:r,name:s,reference:a,peerNames:n}=t,c={name:s,references:new Set([a]),locator:qW(r,a),ident:k2e(r,a),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(n),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,dependencyKind:1,hoistedFrom:new Map,hoistedTo:new Map},f=new Map([[t,c]]),p=(h,E)=>{let w=f.get(h),S=!!w;if(!w){let{name:x,identName:I,reference:T,peerNames:N,hoistPriority:U,dependencyKind:W}=h,ee=e.hoistingLimits.get(E.locator);w={name:x,references:new Set([T]),locator:qW(I,T),ident:k2e(I,T),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(N),reasons:new Map,decoupled:!0,isHoistBorder:ee?ee.has(x):!1,hoistPriority:U||0,dependencyKind:W||0,hoistedFrom:new Map,hoistedTo:new Map},f.set(h,w)}if(E.dependencies.set(h.name,w),E.originalDependencies.set(h.name,w),S){let x=new Set,I=T=>{if(!x.has(T)){x.add(T),T.decoupled=!1;for(let N of T.dependencies.values())T.peerNames.has(N.name)||I(N)}};I(w)}else for(let x of h.dependencies)p(x,w)};for(let h of t.dependencies)p(h,c);return c},YW=t=>t.substring(0,t.indexOf("@",1)),Sgt=t=>{let e={name:t.name,identName:YW(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),s=(a,n,c)=>{let f=r.has(a),p;if(n===a)p=c;else{let{name:h,references:E,locator:w}=a;p={name:h,identName:YW(w),references:E,dependencies:new Set}}if(c.dependencies.add(p),!f){r.add(a);for(let h of a.dependencies.values())a.peerNames.has(h.name)||s(h,a,p);r.delete(a)}};for(let a of t.dependencies.values())s(a,t,e);return e},Dgt=t=>{let e=new Map,r=new Set([t]),s=c=>`${c.name}@${c.ident}`,a=c=>{let f=s(c),p=e.get(f);return p||(p={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(f,p)),p},n=(c,f)=>{let p=!!r.has(f);if(a(f).dependents.add(c.ident),!p){r.add(f);for(let E of f.dependencies.values()){let w=a(E);w.hoistPriority=Math.max(w.hoistPriority,E.hoistPriority),f.peerNames.has(E.name)?w.peerDependents.add(f.ident):n(f,E)}}};for(let c of t.dependencies.values())t.peerNames.has(c.name)||n(t,c);return e},yo=t=>{if(!t)return"none";let e=t.indexOf("@",1),r=t.substring(0,e);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let s=t.substring(e+1);if(s==="workspace:.")return".";if(s){let a=(s.indexOf("#")>0?s.split("#")[1]:s).replace("npm:","");return s.startsWith("virtual")&&(r=`v:${r}`),a.startsWith("workspace")&&(r=`w:${r}`,a=""),`${r}${a?`@${a}`:""}`}else return`${r}`};var bD=t=>{let e=0,r=(a,n,c="")=>{if(e>5e4||n.has(a))return"";e++;let f=Array.from(a.dependencies.values()).sort((h,E)=>h.name===E.name?0:h.name>E.name?1:-1),p="";n.add(a);for(let h=0;h<f.length;h++){let E=f[h];if(!a.peerNames.has(E.name)&&E!==a){let w=a.reasons.get(E.name),S=YW(E.locator);p+=`${c}${h<f.length-1?"\u251C\u2500":"\u2514\u2500"}${(n.has(E)?">":"")+(S!==E.name?`a:${E.name}:`:"")+yo(E.locator)+(w?` ${w}`:"")}
|
|
|
|
|
`,p+=r(E,n,`${c}${h<f.length-1?"\u2502 ":" "}`)}}return n.delete(a),p};return r(t,new Set)+(e>5e4?`
|
|
|
|
|
Tree is too large, part of the tree has been dunped
|
|
|
|
|
`:"")};var PD=(s=>(s.WORKSPACES="workspaces",s.DEPENDENCIES="dependencies",s.NONE="none",s))(PD||{}),F2e="node_modules",rg="$wsroot$";var xD=(t,e)=>{let{packageTree:r,hoistingLimits:s,errors:a,preserveSymlinksRequired:n}=Pgt(t,e),c=null;if(a.length===0){let f=R2e(r,{hoistingLimits:s});c=kgt(t,f,e)}return{tree:c,errors:a,preserveSymlinksRequired:n}},pA=t=>`${t.name}@${t.reference}`,JW=t=>{let e=new Map;for(let[r,s]of t.entries())if(!s.dirList){let a=e.get(s.locator);a||(a={target:s.target,linkType:s.linkType,locations:[],aliases:s.aliases},e.set(s.locator,a)),a.locations.push(r)}for(let r of e.values())r.locations=r.locations.sort((s,a)=>{let n=s.split(J.delimiter).length,c=a.split(J.delimiter).length;return a===s?0:n!==c?c-n:a>s?1:-1});return e},N2e=(t,e)=>{let r=G.isVirtualLocator(t)?G.devirtualizeLocator(t):t,s=G.isVirtualLocator(e)?G.devirtualizeLocator(e):e;return G.areLocatorsEqual(r,s)},VW=(t,e,r,s)=>{if(t.linkType!=="SOFT")return!1;let a=fe.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation);return J.contains(s,a)===null},bgt=t=>{let e=t.getPackageInformation(t.topLevel);if(e===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");if(t.findPackageLocator(e.packageLocation)===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let s=fe.toPortablePath(e.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},c=t.getDependencyTreeRoots(),f=new Map,p=new Set,h=(S,x)=>{let I=pA(S);if(p.has(I))return;p.add(I);let T=t.getPackageInformation(S);if(T){let N=x?pA(x):"";if(pA(S)!==N&&T.linkType==="SOFT"&&!S.reference.startsWith("link:")&&!VW(T,S,t,s)){let U=O2e(T,S,t);(!f.get(U)||S.reference.startsWith("workspace:"))&&f.set(U,S)}for(let[U,W]of T.packageDependencies)W!==null&&(T.packagePeers.has(U)||h(t.getLocator(U,W),S))}};for(let S of c)h(S,null);let E=s.split(J.sep);for(let S of f.values()){let x=t.getPackageInformation(S),T=fe.toPortablePath(x.packageLocation.slice(0,-1)).split(J.sep).slice(E.length),N=n;for(let U of T){let W=N.children.get(U);W||(W={children:new Map},N.children.set(U,W)),N=W}N.workspaceLocator=S}let w=(S,x)=>{if(S.workspaceLocator){let I=pA(x),T=a.get(I);T||(T=new Set,a.set(I,T)),T.add(S.workspaceLocator)}for(let I of S.children.values())w(I,S.workspaceLocator||x)};for(let S of n.children.values())w(S,n.workspaceLocator);return a},Pgt=(t,e)=>{let r=[],s=!1,a=new Map,n=bgt(t),c=t.getPackageInformation(t.topLevel);if(c===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let f=t.findPackageLocator(c.packageLocation);if(f===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let p=fe.toPortablePath(c.packageLocation.slice(0,-1)),h={name:f.name,identName:f.name,reference:f.reference,peerNames:c.packagePeers,dependencies:new Set,dependencyKind:1},E=new Map,w=(x,I)=>`${pA(I)}:${x}`,S=(x,I,T,N,U,W,ee,ie)=>{let ue=w(x,T),le=E.get(ue),me=!!le;!me&&T.name===f.name&&T.reference===f.reference&&(le=h,E.set(ue,h));let pe=VW(I,T,t,p);if(!le){let Ae=0;pe?Ae=2:I.linkType==="SOFT"&&T.name.endsWith(rg)&&(Ae=1),le={name:x,identName:T.name,reference:T.reference,dependencies:new Set,peerNames:Ae===1?new Set:I.packagePeers,dependencyKind:Ae},E.set(ue,le)}let Be;if(pe?Be=2:U.linkType==="SOFT"?Be=1:Be=0,le.hoistPriority=Math.max(le.hoistPriority||0,Be),ie&&!pe){let Ae=pA({name:N.identName,reference:N.reference}),se=a.get(Ae)||new Set;a.set(Ae,se),se.add(le.name)}let Ce=new Map(I.packageDependencies);if(e.project){let Ae=e.project.workspacesByCwd.get(fe.toPortablePath(I.packageLocation.slice(0,-1)));if(Ae){let se=new Set([...Array.from(Ae.manifest.peerDependencies.values(),X=>G.stringifyIdent(X)),...Array.from(Ae.manifest.peerDependenciesMeta.keys())]);for(let X of se)Ce.has(X)||(Ce.set(X,W.get(X)||null),le.peerNames.add(X))}}let g=pA({name:T.name.replace(rg,""),reference:T.reference}),we=n.get(g);if(we)for(let Ae of we)Ce.set(`${Ae.name}${rg}`,Ae.reference);(I!==U||I.linkType!=="SOFT"||!pe&&(!e.selfReferencesByCwd||e.selfReferencesByCwd.get(ee)))&&N.dependencies.add(le);let ye=T!==f&&I.linkType==="SOFT"&&!T.name.endsWith(rg)&&!pe;if(!me&&!ye){let Ae=new Map;for(let[se,X]of Ce)if(X!==null){let De=t.getLocator(se,X),Te=t.getLocator(se.replace(rg,""),X),mt=t.getPackageInformation(Te);if(mt===null)throw new Error("Assertion failed: Expected the package to have been registered");let j=VW(mt,De,t,p);if(e.validateExternalSoftLinks&&e.project&&j){mt.packageDependencies.size>0&&(s=!0);for(let[Ye,ke]of mt.packageDependencies)if(ke!==null){let it=G.parseLocator(Array.isArray(ke)?`${ke[0]}@${ke[1]}`:`${Ye}@${ke}`);if(pA(it)!==pA(De)){let Ue=Ce.get(Ye);if(Ue){let P=G.parseLocator(Array.isArray(Ue)?`${Ue[0]}@${Ue[1]}`:`${Ye}@${Ue}`);N2e(P,it)||r.push({messageName:71,text:`Cannot link ${G.prettyIdent(e.project.configuration,G.parseIdent(De.name))} into ${G.pretLine truncated
|
|
|
|
|
`;for(let n=0,c=t.length;n<c;++n)a+=s+eN(String(n),t[n],e,s).replace(/^ +/,""),n+1<c&&(a+=","),a+=`
|
|
|
|
|
`;return a+=r,a+="]",a}function Tgt(t,e,r){let s=Object.keys(t),a="";a+="{";for(let n=0,c=s.length,f=0;n<c;++n){let p=s[n],h=t[p];typeof h>"u"||(f!==0&&(a+=", "),a+=JSON.stringify(p),a+=": ",a+=eN(p,h,e,r).replace(/^ +/g,""),f+=1)}return a+="}",a}function Fgt(t,e,r){let s=Object.keys(t),a=`${r} `,n="";n+=r,n+=`{
|
|
|
|
|
`;let c=0;for(let f=0,p=s.length;f<p;++f){let h=s[f],E=t[h];typeof E>"u"||(c!==0&&(n+=",",n+=`
|
|
|
|
|
`),n+=a,n+=JSON.stringify(h),n+=": ",n+=eN(h,E,e,a).replace(/^ +/g,""),c+=1)}return c!==0&&(n+=`
|
|
|
|
|
`),n+=r,n+="}",n}function eN(t,e,r,s){let{next:a}=L2e[r],n=a[t]||a["*"];return M2e(e,n,s)}function M2e(t,e,r){let{collapsed:s}=L2e[e];return Array.isArray(t)?s?Qgt(t,e,r):Rgt(t,e,r):typeof t=="object"&&t!==null?s?Tgt(t,e,r):Fgt(t,e,r):JSON.stringify(t)}function U2e(t){return M2e(t,"TOP_LEVEL","")}function kD(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let s=[];for(let n of e)s.push(r.map(c=>n(c)));let a=r.map((n,c)=>c);return a.sort((n,c)=>{for(let f of s){let p=f[n]<f[c]?-1:f[n]>f[c]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function Ngt(t){let e=new Map,r=kD(t.fallbackExclusionList||[],[({name:s,reference:a})=>s,({name:s,reference:a})=>a]);for(let{name:s,reference:a}of r){let n=e.get(s);typeof n>"u"&&e.set(s,n=new Set),n.add(a)}return Array.from(e).map(([s,a])=>[s,Array.from(a)])}function Ogt(t){return kD(t.fallbackPool||[],([e])=>e)}function Lgt(t){let e=[],r=t.dependencyTreeRoots.find(s=>t.packageRegistry.get(s.name)?.get(s.reference)?.packageLocation==="./");for(let[s,a]of kD(t.packageRegistry,([n])=>n===null?"0":`1${n}`)){if(s===null)continue;let n=[];e.push([s,n]);for(let[c,{packageLocation:f,packageDependencies:p,packagePeers:h,linkType:E,discardFromLookup:w}]of kD(a,([S])=>S===null?"0":`1${S}`)){if(c===null)continue;let S=[];s!==null&&c!==null&&!p.has(s)&&S.push([s,c]);for(let[U,W]of p)S.push([U,W]);let x=kD(S,([U])=>U),I=h&&h.size>0?Array.from(h):void 0,N={packageLocation:f,packageDependencies:x,packagePeers:I,linkType:E,discardFromLookup:w||void 0};n.push([c,N]),r&&s===r.name&&c===r.reference&&e.unshift([null,[[null,N]]])}}return e}function QD(t){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost."],dependencyTreeRoots:t.dependencyTreeRoots,enableTopLevelFallback:t.enableTopLevelFallback||!1,ignorePatternData:t.ignorePattern||null,pnpZipBackend:t.pnpZipBackend,fallbackExclusionList:Ngt(t),fallbackPool:Ogt(t),packageRegistryData:Lgt(t)}}var j2e=ut(H2e());function G2e(t,e){return[t?`${t}
|
|
|
|
|
`:"",`/* eslint-disable */
|
|
|
|
|
`,`// @ts-nocheck
|
|
|
|
|
`,`"use strict";
|
|
|
|
|
`,`
|
|
|
|
|
`,e,`
|
|
|
|
|
`,(0,j2e.default)()].join("")}function Mgt(t){return JSON.stringify(t,null,2)}function Ugt(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,`\\
|
|
|
|
|
`)}'`}function _gt(t){return[`const RAW_RUNTIME_STATE =
|
|
|
|
|
`,`${Ugt(U2e(t))};
|
|
|
|
|
|
|
|
|
|
`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
|
|
|
|
`,` return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname});
|
|
|
|
|
`,`}
|
|
|
|
|
`].join("")}function Hgt(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
|
|
|
|
`,` const fs = require('fs');
|
|
|
|
|
`,` const path = require('path');
|
|
|
|
|
`,` const pnpDataFilepath = path.resolve(__dirname, ${JSON.stringify(Er.pnpData)});
|
|
|
|
|
`,` return hydrateRuntimeState(JSON.parse(fs.readFileSync(pnpDataFilepath, 'utf8')), {basePath: basePath || __dirname});
|
|
|
|
|
`,`}
|
|
|
|
|
`].join("")}function q2e(t){let e=QD(t),r=_gt(e);return G2e(t.shebang,r)}function W2e(t){let e=QD(t),r=Hgt(),s=G2e(t.shebang,r);return{dataFile:Mgt(e),loaderFile:s}}Dt();function zW(t,{basePath:e}){let r=fe.toPortablePath(e),s=J.resolve(r),a=t.ignorePatternData!==null?new RegExp(t.ignorePatternData):null,n=new Map,c=new Map(t.packageRegistryData.map(([w,S])=>[w,new Map(S.map(([x,I])=>{if(w===null!=(x===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let T=I.discardFromLookup??!1,N={name:w,reference:x},U=n.get(I.packageLocation);U?(U.discardFromLookup=U.discardFromLookup&&T,T||(U.locator=N)):n.set(I.packageLocation,{locator:N,discardFromLookup:T});let W=null;return[x,{packageDependencies:new Map(I.packageDependencies),packagePeers:new Set(I.packagePeers),linkType:I.linkType,discardFromLookup:T,get packageLocation(){return W||(W=J.join(s,I.packageLocation))}}]}))])),f=new Map(t.fallbackExclusionList.map(([w,S])=>[w,new Set(S)])),p=new Map(t.fallbackPool),h=t.dependencyTreeRoots,E=t.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:h,enableTopLevelFallback:E,fallbackExclusionList:f,pnpZipBackend:t.pnpZipBackend,fallbackPool:p,ignorePattern:a,packageLocatorsByLocations:n,packageRegistry:c}}Dt();Dt();var sh=Ie("module"),jm=Ie("url"),oY=Ie("util");var ea=Ie("url");var K2e=ut(Ie("assert"));var ZW=Array.isArray,RD=JSON.stringify,TD=Object.getOwnPropertyNames,Hm=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),XW=(t,e)=>RegExp.prototype.exec.call(t,e),$W=(t,...e)=>RegExp.prototype[Symbol.replace].apply(t,e),ng=(t,...e)=>String.prototype.endsWith.apply(t,e),eY=(t,...e)=>String.prototype.includes.apply(t,e),tY=(t,...e)=>String.prototype.lastIndexOf.apply(t,e),FD=(t,...e)=>String.prototype.indexOf.apply(t,e),Y2e=(t,...e)=>String.prototype.replace.apply(t,e),ig=(t,...e)=>String.prototype.slice.apply(t,e),hA=(t,...e)=>String.prototype.startsWith.apply(t,e),V2e=Map,J2e=JSON.parse;function ND(t,e,r){return class extends r{constructor(...s){super(e(...s)),this.code=t,this.name=`${r.name} [${t}]`}}}var z2e=ND("ERR_PACKAGE_IMPORT_NOT_DEFINED",(t,e,r)=>`Package import specifier "${t}" is not defined${e?` in package ${e}package.json`:""} imported from ${r}`,TypeError),rY=ND("ERR_INVALID_MODULE_SPECIFIER",(t,e,r=void 0)=>`Invalid module "${t}" ${e}${r?` imported from ${r}`:""}`,TypeError),Z2e=ND("ERR_INVALID_PACKAGE_TARGET",(t,e,r,s=!1,a=void 0)=>{let n=typeof r=="string"&&!s&&r.length&&!hA(r,"./");return e==="."?((0,K2e.default)(s===!1),`Invalid "exports" main target ${RD(r)} defined in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${s?"imports":"exports"}" target ${RD(r)} defined for '${e}' in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`},Error),OD=ND("ERR_INVALID_PACKAGE_CONFIG",(t,e,r)=>`Invalid package config ${t}${e?` while importing ${e}`:""}${r?`. ${r}`:""}`,Error),X2e=ND("ERR_PACKAGE_PATH_NOT_EXPORTED",(t,e,r=void 0)=>e==="."?`No "exports" main defined in ${t}package.json${r?` imported from ${r}`:""}`:`Package subpath '${e}' is not defined by "exports" in ${t}package.json${r?` imported from ${r}`:""}`,Error);var rN=Ie("url");function $2e(t,e){let r=Object.create(null);for(let s=0;s<e.length;s++){let a=e[s];Hm(t,a)&&(r[a]=t[a])}return r}var tN=new V2e;function jgt(t,e,r,s){let a=tN.get(t);if(a!==void 0)return a;let n=s(t);if(n===void 0){let x={pjsonPath:t,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return tN.set(t,x),x}let c;try{c=J2e(n)}catch(x){throw new OD(t,(r?`"${e}" from `:"")+(0,rN.fileURLToPath)(r||e),x.message)}let{imports:f,main:p,name:h,type:E}=$2e(c,["imports","main","name","type"]),w=Hm(c,"exports")?c.exports:void 0;(typeof f!="object"||f===null)&&(f=void 0),typeof p!="string"&&(p=void 0),typeof h!="string"&&(h=void 0),E!=="module"&&E!=="commonjs"&&(E="none");let S={pjsonPath:t,exists:!0,main:p,name:h,type:E,exports:w,imports:f};return tN.set(t,S),S}function eBe(t,e){let r=new URL("./package.json",t);for(;;){let n=r.pathname;if(ng(n,"node_modules/package.json"))break;let c=jgt((0,rN.fileURLToPath)(r),t,void 0,e);if(c.exists)return c;let f=r;if(r=new URL("../package.json",r),r.pathname===f.pathname)break}let s=(0,rN.fileURLToPath)(r),a={pjsonPath:s,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return tN.set(s,a),a}function Ggt(t,e,r){throw new z2e(t,e&&(0,ea.fileURLToPath)(new URL(".",e)),(0,ea.fileURLToPath)(r))}function qgt(t,e,r,s){let a=`request is not a valid subpath for the "${r?"imports":"exports"}" resolution of ${(0,ea.fileURLToPath)(e)}`;throw new rY(t,a,s&&(0,ea.fileURLToPath)(s))}function LD(t,e,r,s,a){throw typeof e=="object"&&e!==null?e=RD(e,null,""):e=`${e}`,new Z2e((0,ea.fileURLToPath)(new URL(".",r)),t,e,s,a&&(0,ea.fileURLToPath)(a))}var tBe=/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f
Line truncated
|
|
|
|
|
`),r;c=t[++n]}else if(c===" "&&!s){a=!0;continue}else if(c==='"'){s=!s;continue}a?(r.push(c),a=!1):r[r.length-1]+=c}return s&&e.push(`invalid value for NODE_OPTIONS (unterminated string)
|
|
|
|
|
`),r}Dt();var[ml,ih]=process.versions.node.split(".").map(t=>parseInt(t,10)),ABe=ml>19||ml===19&&ih>=2||ml===18&&ih>=13,nXt=ml===20&&ih<6||ml===19&&ih>=3,iXt=ml>19||ml===19&&ih>=6,sXt=ml>=21||ml===20&&ih>=10||ml===18&&ih>=19,oXt=ml>=21||ml===20&&ih>=10||ml===18&&ih>=20,aXt=ml>=22;function pBe(t){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send)if(t=t.map(e=>fe.fromPortablePath(uo.resolveVirtual(fe.toPortablePath(e)))),ABe)process.send({"watch:require":t});else for(let e of t)process.send({"watch:require":e})}function aY(t,e){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,s=Number(process.env.PNP_DEBUG_LEVEL),a=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,n=/^(\/|\.{1,2}(\/|$))/,c=/\/$/,f=/^\.{0,2}\//,p={name:null,reference:null},h=[],E=new Set;if(t.enableTopLevelFallback===!0&&h.push(p),e.compatibilityMode!==!1)for(let Fe of["react-scripts","gatsby"]){let Ne=t.packageRegistry.get(Fe);if(Ne)for(let Pe of Ne.keys()){if(Pe===null)throw new Error("Assertion failed: This reference shouldn't be null");h.push({name:Fe,reference:Pe})}}let{ignorePattern:w,packageRegistry:S,packageLocatorsByLocations:x}=t;function I(Fe,Ne){return{fn:Fe,args:Ne,error:null,result:null}}function T(Fe){let Ne=process.stderr?.hasColors?.()??process.stdout.isTTY,Pe=(it,Ue)=>`\x1B[${it}m${Ue}\x1B[0m`,Ye=Fe.error;console.error(Ye?Pe("31;1",`\u2716 ${Fe.error?.message.replace(/\n.*/s,"")}`):Pe("33;1","\u203C Resolution")),Fe.args.length>0&&console.error();for(let it of Fe.args)console.error(` ${Pe("37;1","In \u2190")} ${(0,oY.inspect)(it,{colors:Ne,compact:!0})}`);Fe.result&&(console.error(),console.error(` ${Pe("37;1","Out \u2192")} ${(0,oY.inspect)(Fe.result,{colors:Ne,compact:!0})}`));let ke=new Error().stack.match(/(?<=^ +)at.*/gm)?.slice(2)??[];if(ke.length>0){console.error();for(let it of ke)console.error(` ${Pe("38;5;244",it)}`)}console.error()}function N(Fe,Ne){if(e.allowDebug===!1)return Ne;if(Number.isFinite(s)){if(s>=2)return(...Pe)=>{let Ye=I(Fe,Pe);try{return Ye.result=Ne(...Pe)}catch(ke){throw Ye.error=ke}finally{T(Ye)}};if(s>=1)return(...Pe)=>{try{return Ne(...Pe)}catch(Ye){let ke=I(Fe,Pe);throw ke.error=Ye,T(ke),Ye}}}return Ne}function U(Fe){let Ne=g(Fe);if(!Ne)throw gs("INTERNAL","Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return Ne}function W(Fe){if(Fe.name===null)return!0;for(let Ne of t.dependencyTreeRoots)if(Ne.name===Fe.name&&Ne.reference===Fe.reference)return!0;return!1}let ee=new Set(["node","require",...fBe("--conditions")]);function ie(Fe,Ne=ee,Pe){let Ye=Ae(J.join(Fe,"internal.js"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(Ye===null)throw gs("INTERNAL",`The locator that owns the "${Fe}" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:ke}=U(Ye),it=J.join(ke,Er.manifest);if(!e.fakeFs.existsSync(it))return null;let Ue=JSON.parse(e.fakeFs.readFileSync(it,"utf8"));if(Ue.exports==null)return null;let P=J.contains(ke,Fe);if(P===null)throw gs("INTERNAL","unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)");P!=="."&&!f.test(P)&&(P=`./${P}`);try{let C=sBe({packageJSONUrl:(0,jm.pathToFileURL)(fe.fromPortablePath(it)),packageSubpath:P,exports:Ue.exports,base:Pe?(0,jm.pathToFileURL)(fe.fromPortablePath(Pe)):null,conditions:Ne});return fe.toPortablePath((0,jm.fileURLToPath)(C))}catch(C){throw gs("EXPORTS_RESOLUTION_FAILED",C.message,{unqualifiedPath:lf(Fe),locator:Ye,pkgJson:Ue,subpath:lf(P),conditions:Ne},C.code)}}function ue(Fe,Ne,{extensions:Pe}){let Ye;try{Ne.push(Fe),Ye=e.fakeFs.statSync(Fe)}catch{}if(Ye&&!Ye.isDirectory())return e.fakeFs.realpathSync(Fe);if(Ye&&Ye.isDirectory()){let ke;try{ke=JSON.parse(e.fakeFs.readFileSync(J.join(Fe,Er.manifest),"utf8"))}catch{}let it;if(ke&&ke.main&&(it=J.resolve(Fe,ke.main)),it&&it!==Fe){let Ue=ue(it,Ne,{extensions:Pe});if(Ue!==null)return Ue}}for(let ke=0,it=Pe.length;ke<it;ke++){let Ue=`${Fe}${Pe[ke]}`;if(Ne.push(Ue),e.fakeFs.existsSync(Ue))return Ue}if(Ye&&Ye.isDirectory())for(let ke=0,it=Pe.length;ke<it;ke++){let Ue=J.format({dir:Fe,name:"index",ext:Pe[ke]});if(Ne.push(Ue),e.fakeFs.existsSync(Ue))return Ue}return null}function le(Fe){let Ne=new sh.Module(Fe,null);return Ne.filename=Fe,Ne.paths=sh.Module._nodeModulePaths(Fe),Ne}function me(Fe,Ne){return Ne.endsWith("/")&&(Ne=J.join(Ne,"internal.js")),sh.Module._resolveFilename(fe.fromPortablePath(Fe),le(fe.fromPortablePath(Ne)),!1,{plugnplay:!1})}function pe(Fe){if(w===null)return!1;let Ne=J.contains(t.basePath,Fe);return Ne===null?!1:!!w.test(Ne.replace(/\/$/,""))}let Be={std:3,resolveVirtual:1,getAllLocators:1},Ce=p;function g({name:Fe,reference:Ne}){let Pe=S.get(Fe);if(!Pe)return null;let Ye=Pe.get(Ne);return Ye||null}function we({name:Fe,reference:Ne}){let Pe=[];for(let[Ye,ke]of S)if(Ye!==null)for(let[it,Ue]of ke)it===null||Ue.packageDependencies.get(Fe)!==Ne||Ye===Fe&&it===Ne||Pe.push({name:Ye,reLine truncated
|
|
|
|
|
|
|
|
|
|
Require request: "${Ye}"
|
|
|
|
|
Required by: ${ke}
|
|
|
|
|
`,{request:Ye,issuer:ke});return fe.toPortablePath(P)}let it,Ue=Fe.match(a);if(Ue){if(!Ne)throw gs("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ye,issuer:ke});let[,P,C]=Ue,b=Ae(Ne);if(!b){let Re=me(Fe,Ne);if(Re===!1)throw gs("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: "${Ye}"
|
|
|
|
|
Required by: ${ke}
|
|
|
|
|
`,{request:Ye,issuer:ke});return fe.toPortablePath(Re)}let F=U(b).packageDependencies.get(P),z=null;if(F==null&&b.name!==null){let Re=t.fallbackExclusionList.get(b.name);if(!Re||!Re.has(b.reference)){for(let Ct=0,Gt=h.length;Ct<Gt;++Ct){let Pt=U(h[Ct]).packageDependencies.get(P);if(Pt!=null){r?z=Pt:F=Pt;break}}if(t.enableTopLevelFallback&&F==null&&z===null){let Ct=t.fallbackPool.get(P);Ct!=null&&(z=Ct)}}}let Z=null;if(F===null)if(W(b))Z=gs("MISSING_PEER_DEPENDENCY",`Your application tried to access ${P} (a peer dependency); this isn't allowed as there is no ancestor to satisfy the requirement. Use a devDependency if needed.
|
|
|
|
|
|
|
|
|
|
Required package: ${P}${P!==Ye?` (via "${Ye}")`:""}
|
|
|
|
|
Required by: ${ke}
|
|
|
|
|
`,{request:Ye,issuer:ke,dependencyName:P});else{let Re=ye(P,b);Re.every(lt=>W(lt))?Z=gs("MISSING_PEER_DEPENDENCY",`${b.name} tried to access ${P} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound.
|
|
|
|
|
|
|
|
|
|
Required package: ${P}${P!==Ye?` (via "${Ye}")`:""}
|
|
|
|
|
Required by: ${b.name}@${b.reference} (via ${ke})
|
|
|
|
|
${Re.map(lt=>`Ancestor breaking the chain: ${lt.name}@${lt.reference}
|
|
|
|
|
`).join("")}
|
|
|
|
|
`,{request:Ye,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:P,brokenAncestors:Re}):Z=gs("MISSING_PEER_DEPENDENCY",`${b.name} tried to access ${P} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
|
|
|
|
|
|
|
|
|
|
Required package: ${P}${P!==Ye?` (via "${Ye}")`:""}
|
|
|
|
|
Required by: ${b.name}@${b.reference} (via ${ke})
|
|
|
|
|
|
|
|
|
|
${Re.map(lt=>`Ancestor breaking the chain: ${lt.name}@${lt.reference}
|
|
|
|
|
`).join("")}
|
|
|
|
|
`,{request:Ye,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:P,brokenAncestors:Re})}else F===void 0&&(!Pe&&(0,sh.isBuiltin)(Fe)?W(b)?Z=gs("UNDECLARED_DEPENDENCY",`Your application tried to access ${P}. 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 ${P} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound.
|
|
|
|
|
|
|
|
|
|
Required package: ${P}${P!==Ye?` (via "${Ye}")`:""}
|
|
|
|
|
Required by: ${ke}
|
|
|
|
|
`,{request:Ye,issuer:ke,dependencyName:P}):Z=gs("UNDECLARED_DEPENDENCY",`${b.name} tried to access ${P}. 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 ${P} isn't otherwise declared in ${b.name}'s dependencies, this makes the require call ambiguous and unsound.
|
|
|
|
|
|
|
|
|
|
Required package: ${P}${P!==Ye?` (via "${Ye}")`:""}
|
|
|
|
|
Required by: ${ke}
|
|
|
|
|
`,{request:Ye,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:P}):W(b)?Z=gs("UNDECLARED_DEPENDENCY",`Your application tried to access ${P}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound.
|
|
|
|
|
|
|
|
|
|
Required package: ${P}${P!==Ye?` (via "${Ye}")`:""}
|
|
|
|
|
Required by: ${ke}
|
|
|
|
|
`,{request:Ye,issuer:ke,dependencyName:P}):Z=gs("UNDECLARED_DEPENDENCY",`${b.name} tried to access ${P}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
|
|
|
|
|
|
|
|
|
|
Required package: ${P}${P!==Ye?` (via "${Ye}")`:""}
|
|
|
|
|
Required by: ${b.name}@${b.reference} (via ${ke})
|
|
|
|
|
`,{request:Ye,issuer:ke,issuerLocator:Object.assign({},b),dependencyName:P}));if(F==null){if(z===null||Z===null)throw Z||new Error("Assertion failed: Expected an error to have been set");F=z;let Re=Z.message.replace(/\n.*/g,"");Z.message=Re,!E.has(Re)&&s!==0&&(E.add(Re),process.emitWarning(Z))}let $=Array.isArray(F)?{name:F[0],reference:F[1]}:{name:P,reference:F},oe=U($);if(!oe.packageLocation)throw gs("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: ${$.name}@${$.reference}${$.name!==Ye?` (via "${Ye}")`:""}
|
|
|
|
|
Required by: ${b.name}@${b.reference} (via ${ke})
|
|
|
|
|
`,{request:Ye,issuer:ke,dependencyLocator:Object.assign({},$)});let xe=oe.packageLocation;C?it=J.join(xe,C):it=xe}else if(J.isAbsolute(Fe))it=J.normalize(Fe);else{if(!Ne)throw gs("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ye,issuer:ke});let P=J.resolve(Ne);Ne.match(c)?it=J.normalize(J.join(P,Fe)):it=J.normalize(J.join(J.dirname(P),Fe))}return J.normalize(it)}function De(Fe,Ne,Pe=ee,Ye){if(n.test(Fe))return Ne;let ke=ie(Ne,Pe,Ye);return ke?J.normalize(ke):Ne}function Te(Fe,{extensions:Ne=Object.keys(sh.Module._extensions)}={}){let Pe=[],Ye=ue(Fe,Pe,{extensions:Ne});if(Ye)return J.normalize(Ye);{pBe(Pe.map(Ue=>fe.fromPortablePath(Ue)));let ke=lf(Fe),it=Ae(Fe);if(it){let{packageLocation:Ue}=U(it),P=!0;try{e.fakeFs.accessSync(Ue)}catch(C){if(C?.code==="ENOENT")P=!1;else{let b=(C?.message??C??"empty exception thrown").replace(/^[A-Z]/,y=>y.toLowerCase());throw gs("QUALIFIED_PATH_RESOLUTION_FAILED",`Required package exists but could not be accessed (${b}).
|
|
|
|
|
|
|
|
|
|
Missing package: ${it.name}@${it.reference}
|
|
|
|
|
Expected package location: ${lf(Ue)}
|
|
|
|
|
`,{unqualifiedPath:ke,extensions:Ne})}}if(!P){let C=Ue.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 gs("QUALIFIED_PATH_RESOLUTION_FAILED",`${C}
|
|
|
|
|
|
|
|
|
|
Missing package: ${it.name}@${it.reference}
|
|
|
|
|
Expected package location: ${lf(Ue)}
|
|
|
|
|
`,{unqualifiedPath:ke,extensions:Ne})}}throw gs("QUALIFIED_PATH_RESOLUTION_FAILED",`Qualified path resolution failed: we looked for the following paths, but none could be accessed.
|
|
|
|
|
|
|
|
|
|
Source path: ${ke}
|
|
|
|
|
${Pe.map(Ue=>`Not found: ${lf(Ue)}
|
|
|
|
|
`).join("")}`,{unqualifiedPath:ke,extensions:Ne})}}function mt(Fe,Ne,Pe){if(!Ne)throw new Error("Assertion failed: An issuer is required to resolve private import mappings");let Ye=oBe({name:Fe,base:(0,jm.pathToFileURL)(fe.fromPortablePath(Ne)),conditions:Pe.conditions??ee,readFileSyncFn:se});if(Ye instanceof URL)return Te(fe.toPortablePath((0,jm.fileURLToPath)(Ye)),{extensions:Pe.extensions});if(Ye.startsWith("#"))throw new Error("Mapping from one private import to another isn't allowed");return j(Ye,Ne,Pe)}function j(Fe,Ne,Pe={}){try{if(Fe.startsWith("#"))return mt(Fe,Ne,Pe);let{considerBuiltins:Ye,extensions:ke,conditions:it}=Pe,Ue=X(Fe,Ne,{considerBuiltins:Ye});if(Fe==="pnpapi")return Ue;if(Ue===null)return null;let P=()=>Ne!==null?pe(Ne):!1,C=(!Ye||!(0,sh.isBuiltin)(Fe))&&!P()?De(Fe,Ue,it,Ne):Ue;return Te(C,{extensions:ke})}catch(Ye){throw Object.hasOwn(Ye,"pnpCode")&&Object.assign(Ye.data,{request:lf(Fe),issuer:Ne&&lf(Ne)}),Ye}}function rt(Fe){let Ne=J.normalize(Fe),Pe=uo.resolveVirtual(Ne);return Pe!==Ne?Pe:null}return{VERSIONS:Be,topLevel:Ce,getLocator:(Fe,Ne)=>Array.isArray(Ne)?{name:Ne[0],reference:Ne[1]}:{name:Fe,reference:Ne},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){let Fe=[];for(let[Ne,Pe]of S)for(let Ye of Pe.keys())Ne!==null&&Ye!==null&&Fe.push({name:Ne,reference:Ye});return Fe},getPackageInformation:Fe=>{let Ne=g(Fe);if(Ne===null)return null;let Pe=fe.fromPortablePath(Ne.packageLocation);return{...Ne,packageLocation:Pe}},findPackageLocator:Fe=>Ae(fe.toPortablePath(Fe)),resolveToUnqualified:N("resolveToUnqualified",(Fe,Ne,Pe)=>{let Ye=Ne!==null?fe.toPortablePath(Ne):null,ke=X(fe.toPortablePath(Fe),Ye,Pe);return ke===null?null:fe.fromPortablePath(ke)}),resolveUnqualified:N("resolveUnqualified",(Fe,Ne)=>fe.fromPortablePath(Te(fe.toPortablePath(Fe),Ne))),resolveRequest:N("resolveRequest",(Fe,Ne,Pe)=>{let Ye=Ne!==null?fe.toPortablePath(Ne):null,ke=j(fe.toPortablePath(Fe),Ye,Pe);return ke===null?null:fe.fromPortablePath(ke)}),resolveVirtual:N("resolveVirtual",Fe=>{let Ne=rt(fe.toPortablePath(Fe));return Ne!==null?fe.fromPortablePath(Ne):null})}}Dt();var hBe=(t,e,r)=>{let s=QD(t),a=zW(s,{basePath:e}),n=fe.join(e,Er.pnpCjs);return aY(a,{fakeFs:r,pnpapiResolution:n})};var cY=ut(dBe());Wt();var gA={};Vt(gA,{checkManifestCompatibility:()=>mBe,extractBuildRequest:()=>nN,getExtractHint:()=>uY,hasBindingGyp:()=>fY});Ve();Dt();function mBe(t){return G.isPackageCompatible(t,fs.getArchitectureSet())}function nN(t,e,r,{configuration:s}){let a=[];for(let n of["preinstall","install","postinstall"])e.manifest.scripts.has(n)&&a.push({type:0,script:n});return!e.manifest.scripts.has("install")&&e.misc.hasBindingGyp&&a.push({type:1,script:"node-gyp rebuild"}),a.length===0?null:t.linkType!=="HARD"?{skipped:!0,explain:n=>n.reportWarningOnce(6,`${G.prettyLocator(s,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?{skipped:!0,explain:n=>n.reportInfoOnce(5,`${G.prettyLocator(s,t)} lists build scripts, but its build has been explicitly disabled through configuration.`)}:!s.get("enableScripts")&&!r.built?{skipped:!0,explain:n=>n.reportWarningOnce(4,`${G.prettyLocator(s,t)} lists build scripts, but all build scripts have been disabled.`)}:mBe(t)?{skipped:!1,directives:a}:{skipped:!0,explain:n=>n.reportWarningOnce(76,`${G.prettyLocator(s,t)} The ${fs.getArchitectureName()} architecture is incompatible with this package, build skipped.`)}}var edt=new Set([".exe",".bin",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function uY(t){return t.packageFs.getExtractHint({relevantExtensions:edt})}function fY(t){let e=J.join(t.prefixPath,"binding.gyp");return t.packageFs.existsSync(e)}var _D={};Vt(_D,{getUnpluggedPath:()=>UD});Ve();Dt();function UD(t,{configuration:e}){return J.resolve(e.get("pnpUnpluggedFolder"),G.slugifyLocator(t))}var tdt=new Set([G.makeIdent(null,"open").identHash,G.makeIdent(null,"opn").identHash]),sg=class{constructor(){this.mode="strict";this.pnpCache=new Map}getCustomDataKey(){return JSON.stringify({name:"PnpLinker",version:2})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the PnP linker to be enabled");let s=og(r.project).cjs;if(!ce.existsSync(s))throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let a=je.getFactoryWithDefault(this.pnpCache,s,()=>je.dynamicRequire(s,{cachingStrategy:je.CachingStrategy.FsTime})),n={name:G.stringifyIdent(e),reference:e.reference},c=a.getPackageInformation(n);if(!c)throw new nt(`Couldn't find ${G.prettyLocator(r.project.configuration,e)} in the currently installed PnP map - running an install might help`);return fe.toPortablePath(c.packageLocation)}async findPackageLocator(e,r){if(!this.isEnabled(r))return nullLine truncated
|
|
|
|
|
`,n+=`# cause your node_modules installation to become invalidated.
|
|
|
|
|
`,n+=`
|
|
|
|
|
`,n+=`__metadata:
|
|
|
|
|
`,n+=` version: ${kBe}
|
|
|
|
|
`,n+=` nmMode: ${s.value}
|
|
|
|
|
`;let c=Array.from(e.keys()).sort(),f=G.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let E of c){let w=e.get(E);n+=`
|
|
|
|
|
`,n+=`${JSON.stringify(E)}:
|
|
|
|
|
`,n+=` locations:
|
|
|
|
|
`;for(let S of w.locations){let x=J.contains(t.cwd,S);if(x===null)throw new Error(`Assertion failed: Expected the path to be within the project (${S})`);n+=` - ${JSON.stringify(x)}
|
|
|
|
|
`}if(w.aliases.length>0){n+=` aliases:
|
|
|
|
|
`;for(let S of w.aliases)n+=` - ${JSON.stringify(S)}
|
|
|
|
|
`}if(E===f&&r.size>0){n+=` bin:
|
|
|
|
|
`;for(let[S,x]of r){let I=J.contains(t.cwd,S);if(I===null)throw new Error(`Assertion failed: Expected the path to be within the project (${S})`);n+=` ${JSON.stringify(I)}:
|
|
|
|
|
`;for(let[T,N]of x){let U=J.relative(J.join(S,Qi),N);n+=` ${JSON.stringify(T)}: ${JSON.stringify(U)}
|
|
|
|
|
`}}}}let p=t.cwd,h=J.join(p,Qi,QBe);a&&await ce.removePromise(h),await ce.changeFilePromise(h,n,{automaticNewlines:!0})}async function EY(t,{unrollAliases:e=!1}={}){let r=t.cwd,s=J.join(r,Qi,QBe),a;try{a=await ce.statPromise(s)}catch{}if(!a)return null;let n=as(await ce.readFilePromise(s,"utf8"));if(n.__metadata.version>kBe)return null;let c=n.__metadata.nmMode||"classic",f=new Map,p=new Map;delete n.__metadata;for(let[h,E]of Object.entries(n)){let w=E.locations.map(x=>J.join(r,x)),S=E.bin;if(S)for(let[x,I]of Object.entries(S)){let T=J.join(r,fe.toPortablePath(x)),N=je.getMapWithDefault(p,T);for(let[U,W]of Object.entries(I))N.set(U,fe.toPortablePath([T,Qi,W].join(J.sep)))}if(f.set(h,{target:vt.dot,linkType:"HARD",locations:w,aliases:E.aliases||[]}),e&&E.aliases)for(let x of E.aliases){let{scope:I,name:T}=G.parseLocator(h),N=G.makeLocator(G.makeIdent(I,T),x),U=G.stringifyLocator(N);f.set(U,{target:vt.dot,linkType:"HARD",locations:w,aliases:[]})}}return{locatorMap:f,binSymlinks:p,locationTree:RBe(f,{skipPrefix:t.cwd}),nmMode:c,mtimeMs:a.mtimeMs}}var Dw=async(t,e)=>{if(t.split(J.sep).indexOf(Qi)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{let r;if(!e.innerLoop&&(r=await ce.lstatPromise(t),!r.isDirectory()&&!r.isSymbolicLink()||r.isSymbolicLink()&&!e.isWorkspaceDir)){await ce.unlinkPromise(t);return}let s=await ce.readdirPromise(t,{withFileTypes:!0});for(let n of s){let c=J.join(t,n.name);n.isDirectory()?(n.name!==Qi||e&&e.innerLoop)&&await Dw(c,{innerLoop:!0,contentsOnly:!1}):await ce.unlinkPromise(c)}let a=!e.innerLoop&&e.isWorkspaceDir&&r?.isSymbolicLink();!e.contentsOnly&&!a&&await ce.rmdirPromise(t)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},DBe=4,sN=(t,{skipPrefix:e})=>{let r=J.contains(e,t);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${t} which is outside project root: ${e}`);let s=r.split(J.sep).filter(p=>p!==""),a=s.indexOf(Qi),n=s.slice(0,a).join(J.sep),c=J.join(e,n),f=s.slice(a);return{locationRoot:c,segments:f}},RBe=(t,{skipPrefix:e})=>{let r=new Map;if(t===null)return r;let s=()=>({children:new Map,linkType:"HARD"});for(let[a,n]of t.entries()){if(n.linkType==="SOFT"&&J.contains(e,n.target)!==null){let f=je.getFactoryWithDefault(r,n.target,s);f.locator=a,f.linkType=n.linkType}for(let c of n.locations){let{locationRoot:f,segments:p}=sN(c,{skipPrefix:e}),h=je.getFactoryWithDefault(r,f,s);for(let E=0;E<p.length;++E){let w=p[E];if(w!=="."){let S=je.getFactoryWithDefault(h.children,w,s);h.children.set(w,S),h=S}E===p.length-1&&(h.locator=a,h.linkType=n.linkType)}}}return r},wY=async(t,e,r)=>{if(process.platform==="win32"&&r==="junctions"){let s;try{s=await ce.lstatPromise(t)}catch{}if(!s||s.isDirectory()){await ce.symlinkPromise(t,e,"junction");return}}await ce.symlinkPromise(J.relative(J.dirname(e),t),e)};async function TBe(t,e,r){let s=J.join(t,`${IY.default.randomBytes(16).toString("hex")}.tmp`);try{await ce.writeFilePromise(s,r);try{await ce.linkPromise(s,e)}catch{}}finally{await ce.unlinkPromise(s)}}async function Ddt({srcPath:t,dstPath:e,entry:r,globalHardlinksStore:s,baseFs:a,nmMode:n}){if(r.kind==="file"){if(n.value==="hardlinks-global"&&s&&r.digest){let f=J.join(s,r.digest.substring(0,2),`${r.digest.substring(2)}.dat`),p;try{let h=await ce.statPromise(f);if(h&&(!r.mtimeMs||h.mtimeMs>r.mtimeMs||h.mtimeMs<r.mtimeMs-Bdt))if(await Nn.checksumFile(f,{baseFs:ce,algorithm:"sha1"})!==r.digest){let w=J.join(s,`${IY.default.randomBytes(16).toString("hex")}.tmp`);await ce.renamePromise(f,w);let S=await a.readFilePromise(t);await ce.writeFilePromise(w,S);try{await ce.linkPromise(w,f),r.mtimeMs=new Date().getTime(),await ce.unlinkPromise(w)}catch{}}else r.mtimeMs||(r.mtimeMs=Math.ceil(h.mtimeMs));await ce.linkPromise(f,e),p=!0}catch{p=!1}if(!p){let h=await a.readFilePromise(t);await TBe(s,f,h),r.mtimeMs=new Date().getTime();try{await ce.linkPromise(f,e)}catch(E){E&&E.code&&E.code=="EXDEV"&&(n.value="hardlinks-local",await a.copyFilePromise(t,e))}}}else await a.copyFilePromise(t,e);let c=r.mode&511;c!==420&&await ce.chmodPromise(e,c)}}var bdt=async(t,e,{baseFs:r,globalHardlinksStore:s,nmMode:a,windowsLinkType:n,packageChecksum:c})=>{await ce.mkdirPromise(t,{recursive:!0});let f=async(E=vt.dot)=>{let w=J.join(e,E),S=await r.readdirPromise(w,{withFileTypes:!0}),x=new Map;for(let I of S){let T=J.join(E,I.name),N,U=J.join(w,I.name);if(I.isFile()){if(N={kind:"file",mode:(await r.lstatPromise(U)).mode},a.value==="hardlinks-global"){let W=await Nn.checksumFile(U,{baseFs:r,algorithm:"sha1"});N.digest=W}}else if(I.isDirectory())N={kind:"directory"};else if(I.isSymbolicLink())N={kind:"symlink",symlinkTo:await r.readlinkPromise(U)};else throw new Error(`Unsupported file type (file: ${U}, mode: 0o${await r.statSync(U).mode.toString(8).padStart(6,"0")})`);if(x.set(T,N),I.isDirectory()&&T!==Qi){let W=await f(T);for(let[ee,ie]of W)x.set(ee,ie)}}return x},p;if(a.value==="hardlinks-global"&&s&&c){let E=J.join(s,c.sub
Line truncated
|
|
|
|
|
`)),process.env.YARN_IS_TEST_ENV)return process.env.YARN_INJECT_NPM_2FA_TOKEN||"";let{otp:s}=await(0,PY.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return process.stdout.write(`
|
|
|
|
|
`),s}function lN(t){if(t.originalError?.name!=="HTTPError")return!1;try{return(t.originalError?.response.headers["www-authenticate"].split(/,\s*/).map(r=>r.toLowerCase())).includes("otp")}catch{return!1}}function Pw(t){return{"npm-otp":t}}var WD=class{supports(e,r){if(!e.reference.startsWith(oi))return!1;let{selector:s,params:a}=G.parseRange(e.reference);return!(!HBe.default.valid(s)||a===null||typeof a.__archiveUrl!="string")}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let{params:s}=G.parseRange(e.reference);if(s===null||typeof s.__archiveUrl!="string")throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");let a=await Wm(s.__archiveUrl,{customErrorMessage:qm,configuration:r.project.configuration,ident:e});return await ps.convertToZip(a,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})}};Ve();var YD=class{supportsDescriptor(e,r){return!(!e.range.startsWith(oi)||!G.tryParseDescriptor(e.range.slice(oi.length),!0))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Unreachable")}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){let s=r.project.configuration.normalizeDependency(G.parseDescriptor(e.range.slice(oi.length),!0));return r.resolver.getResolutionDependencies(s,r)}async getCandidates(e,r,s){let a=s.project.configuration.normalizeDependency(G.parseDescriptor(e.range.slice(oi.length),!0));return await s.resolver.getCandidates(a,r,s)}async getSatisfying(e,r,s,a){let n=a.project.configuration.normalizeDependency(G.parseDescriptor(e.range.slice(oi.length),!0));return a.resolver.getSatisfying(n,r,s,a)}resolve(e,r){throw new Error("Unreachable")}};Ve();Ve();var jBe=ut(Ai());var oh=class t{supports(e,r){if(!e.reference.startsWith(oi))return!1;let s=new URL(e.reference);return!(!jBe.default.valid(s.pathname)||s.searchParams.has("__archiveUrl"))}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote registry`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),checksum:c}}async fetchFromNetwork(e,r){let s;try{s=await Wm(t.getLocatorUrl(e),{customErrorMessage:qm,configuration:r.project.configuration,ident:e})}catch{s=await Wm(t.getLocatorUrl(e).replace(/%2f/g,"/"),{customErrorMessage:qm,configuration:r.project.configuration,ident:e})}return await ps.convertToZip(s,{configuration:r.project.configuration,prefixPath:G.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,r,{configuration:s}){let a=bw(e.scope,{configuration:s}),n=t.getLocatorUrl(e);return r=r.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),a=a.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r=r.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r===a+n||r===a+n.replace(/%2f/g,"/")}static getLocatorUrl(e){let r=Or.clean(e.reference.slice(oi.length));if(r===null)throw new Yt(10,"The npm semver resolver got selected, but the version isn't semver");return`${oN(e)}/-/${e.name}-${r}.tgz`}};Ve();Ve();Ve();var kY=ut(Ai());var cN=G.makeIdent(null,"node-gyp"),Zdt=/\b(node-gyp|prebuild-install)\b/,VD=class{supportsDescriptor(e,r){return e.range.startsWith(oi)?!!Or.validRange(e.range.slice(oi.length)):!1}supportsLocator(e,r){if(!e.reference.startsWith(oi))return!1;let{selector:s}=G.parseRange(e.reference);return!!kY.default.valid(s)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,s){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,s){let a=Or.validRange(e.range.slice(oi.length));if(a===null)throw new Error(`Expected a valid range, got ${e.range.slice(oi.length)}`);let n=await xw(e,{cache:s.fetchOptions?.cache,project:s.project,version:kY.default.valid(a.raw)?a.raw:void 0}),c=je.mapAndFilter(Object.keys(n.versions),h=>{try{let E=new Or.SemVer(h);if(a.test(E))return E}catch{}return je.mapAndFilter.skip}),f=c.filter(h=>!n.versions[h.raw].deprecated),p=f.length>0?f:c;return p.sort((h,E)=>-h.compare(E)),p.map(h=>{let E=G.makeLocator(e,`${oi}${h.raw}`),w=n.versions[h.raw].dist.tarball;return oh.isConventionalTarballUrl(E,w,{configuration:s.project.configuration})?E:G.bindLocator(E,{__archiveUrl:w})})}async getSatisfying(e,r,sLine truncated
|
|
|
|
|
https://docs.gitlab.com/ee/ci/secrets/id_token_authentication.html`);r={_type:TDt,subject:t,predicateType:NDt,predicate:{buildType:`${UDt}/${_Dt}`,builder:{id:`${Bt.CI_PROJECT_URL}/-/runners/${Bt.CI_RUNNER_ID}`},invocation:{configSource:{uri:`git+${Bt.CI_PROJECT_URL}`,digest:{sha1:Bt.CI_COMMIT_SHA},entryPoint:Bt.CI_JOB_NAME},parameters:{CI:Bt.CI,CI_API_GRAPHQL_URL:Bt.CI_API_GRAPHQL_URL,CI_API_V4_URL:Bt.CI_API_V4_URL,CI_BUILD_BEFORE_SHA:Bt.CI_BUILD_BEFORE_SHA,CI_BUILD_ID:Bt.CI_BUILD_ID,CI_BUILD_NAME:Bt.CI_BUILD_NAME,CI_BUILD_REF:Bt.CI_BUILD_REF,CI_BUILD_REF_NAME:Bt.CI_BUILD_REF_NAME,CI_BUILD_REF_SLUG:Bt.CI_BUILD_REF_SLUG,CI_BUILD_STAGE:Bt.CI_BUILD_STAGE,CI_COMMIT_BEFORE_SHA:Bt.CI_COMMIT_BEFORE_SHA,CI_COMMIT_BRANCH:Bt.CI_COMMIT_BRANCH,CI_COMMIT_REF_NAME:Bt.CI_COMMIT_REF_NAME,CI_COMMIT_REF_PROTECTED:Bt.CI_COMMIT_REF_PROTECTED,CI_COMMIT_REF_SLUG:Bt.CI_COMMIT_REF_SLUG,CI_COMMIT_SHA:Bt.CI_COMMIT_SHA,CI_COMMIT_SHORT_SHA:Bt.CI_COMMIT_SHORT_SHA,CI_COMMIT_TIMESTAMP:Bt.CI_COMMIT_TIMESTAMP,CI_COMMIT_TITLE:Bt.CI_COMMIT_TITLE,CI_CONFIG_PATH:Bt.CI_CONFIG_PATH,CI_DEFAULT_BRANCH:Bt.CI_DEFAULT_BRANCH,CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX:Bt.CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX,CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX:Bt.CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX,CI_DEPENDENCY_PROXY_SERVER:Bt.CI_DEPENDENCY_PROXY_SERVER,CI_DEPENDENCY_PROXY_USER:Bt.CI_DEPENDENCY_PROXY_USER,CI_JOB_ID:Bt.CI_JOB_ID,CI_JOB_NAME:Bt.CI_JOB_NAME,CI_JOB_NAME_SLUG:Bt.CI_JOB_NAME_SLUG,CI_JOB_STAGE:Bt.CI_JOB_STAGE,CI_JOB_STARTED_AT:Bt.CI_JOB_STARTED_AT,CI_JOB_URL:Bt.CI_JOB_URL,CI_NODE_TOTAL:Bt.CI_NODE_TOTAL,CI_PAGES_DOMAIN:Bt.CI_PAGES_DOMAIN,CI_PAGES_URL:Bt.CI_PAGES_URL,CI_PIPELINE_CREATED_AT:Bt.CI_PIPELINE_CREATED_AT,CI_PIPELINE_ID:Bt.CI_PIPELINE_ID,CI_PIPELINE_IID:Bt.CI_PIPELINE_IID,CI_PIPELINE_SOURCE:Bt.CI_PIPELINE_SOURCE,CI_PIPELINE_URL:Bt.CI_PIPELINE_URL,CI_PROJECT_CLASSIFICATION_LABEL:Bt.CI_PROJECT_CLASSIFICATION_LABEL,CI_PROJECT_DESCRIPTION:Bt.CI_PROJECT_DESCRIPTION,CI_PROJECT_ID:Bt.CI_PROJECT_ID,CI_PROJECT_NAME:Bt.CI_PROJECT_NAME,CI_PROJECT_NAMESPACE:Bt.CI_PROJECT_NAMESPACE,CI_PROJECT_NAMESPACE_ID:Bt.CI_PROJECT_NAMESPACE_ID,CI_PROJECT_PATH:Bt.CI_PROJECT_PATH,CI_PROJECT_PATH_SLUG:Bt.CI_PROJECT_PATH_SLUG,CI_PROJECT_REPOSITORY_LANGUAGES:Bt.CI_PROJECT_REPOSITORY_LANGUAGES,CI_PROJECT_ROOT_NAMESPACE:Bt.CI_PROJECT_ROOT_NAMESPACE,CI_PROJECT_TITLE:Bt.CI_PROJECT_TITLE,CI_PROJECT_URL:Bt.CI_PROJECT_URL,CI_PROJECT_VISIBILITY:Bt.CI_PROJECT_VISIBILITY,CI_REGISTRY:Bt.CI_REGISTRY,CI_REGISTRY_IMAGE:Bt.CI_REGISTRY_IMAGE,CI_REGISTRY_USER:Bt.CI_REGISTRY_USER,CI_RUNNER_DESCRIPTION:Bt.CI_RUNNER_DESCRIPTION,CI_RUNNER_ID:Bt.CI_RUNNER_ID,CI_RUNNER_TAGS:Bt.CI_RUNNER_TAGS,CI_SERVER_HOST:Bt.CI_SERVER_HOST,CI_SERVER_NAME:Bt.CI_SERVER_NAME,CI_SERVER_PORT:Bt.CI_SERVER_PORT,CI_SERVER_PROTOCOL:Bt.CI_SERVER_PROTOCOL,CI_SERVER_REVISION:Bt.CI_SERVER_REVISION,CI_SERVER_SHELL_SSH_HOST:Bt.CI_SERVER_SHELL_SSH_HOST,CI_SERVER_SHELL_SSH_PORT:Bt.CI_SERVER_SHELL_SSH_PORT,CI_SERVER_URL:Bt.CI_SERVER_URL,CI_SERVER_VERSION:Bt.CI_SERVER_VERSION,CI_SERVER_VERSION_MAJOR:Bt.CI_SERVER_VERSION_MAJOR,CI_SERVER_VERSION_MINOR:Bt.CI_SERVER_VERSION_MINOR,CI_SERVER_VERSION_PATCH:Bt.CI_SERVER_VERSION_PATCH,CI_TEMPLATE_REGISTRY_HOST:Bt.CI_TEMPLATE_REGISTRY_HOST,GITLAB_CI:Bt.GITLAB_CI,GITLAB_FEATURES:Bt.GITLAB_FEATURES,GITLAB_USER_ID:Bt.GITLAB_USER_ID,GITLAB_USER_LOGIN:Bt.GITLAB_USER_LOGIN,RUNNER_GENERATE_ARTIFACTS_METADATA:Bt.RUNNER_GENERATE_ARTIFACTS_METADATA},environment:{name:Bt.CI_RUNNER_DESCRIPTION,architecture:Bt.CI_RUNNER_EXECUTABLE_ARCH,server:Bt.CI_SERVER_URL,project:Bt.CI_PROJECT_PATH,job:{id:Bt.CI_JOB_ID},pipeline:{id:Bt.CI_PIPELINE_ID,ref:Bt.CI_CONFIG_PATH}}},metadata:{buildInvocationId:`${Bt.CI_JOB_URL}`,completeness:{parameters:!0,environment:!0,materials:!1},reproducible:!1},materials:[{uri:`git+${Bt.CI_PROJECT_URL}`,digest:{sha1:Bt.CI_COMMIT_SHA}}]}}}else throw new Yt(91,"Provenance generation is only supported in GitHub Actions and GitLab CI");return kxe.attest(Buffer.from(JSON.stringify(r)),RDt,e)};async function HDt(t,e,{access:r,tag:s,registry:a,gitHead:n,provenance:c}){let f=t.manifest.name,p=t.manifest.version,h=G.stringifyIdent(f),E=Rxe.default.fromData(e,{algorithms:["sha1","sha512"]}),w=r??Txe(t,f),S=await Fxe(t),x=await yA.genPackageManifest(t),I=`${h}-${p}.tgz`,T=new URL(`${Jc(a)}/${h}/-/${I}`),N={[I]:{content_type:"application/octet-stream",data:e.toString("base64"),length:e.length}};if(c){let U={name:`pkg:npm/${h.replace(/^@/,"%40")}@${p}`,digest:{sha512:E.sha512[0].hexDigest()}},W=await Qxe([U]),ee=JSON.stringify(W);N[`${h}-${p}.sigstore`]={content_type:W.mediaType,data:ee,length:ee.length}}return{_id:h,_attachments:N,name:h,access:w,"dist-tags":{[s]:p},versions:{[p]:{...x,_id:`${h}@${p}`,name:h,version:p,gitHead:n,dist:{shasum:E.sha1[0].hexDigest(),integrity:E.sha512[0].toString(),tarball:T.toString()}}},readme:S}}async function jDt(t){try{let{stdout:e}=await qr.execvp("git",["rev-parse","--revs-only","HEAD"],{cwd:t});return e.trim()===""?void 0:e.trim()}catch{return}
Line truncated
|
|
|
|
|
`;try{a=await ce.readFilePromise(e,"utf8")}catch(n){if(n.code==="ENOENT")return a;throw n}return a}var vK={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"BOOLEAN",default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:"SECRET",default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:"SECRET",default:null}},Nxe={npmAuditRegistry:{description:"Registry to query for audit reports",type:"STRING",default:null},npmPublishRegistry:{description:"Registry to push packages to",type:"STRING",default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"STRING",default:"https://registry.yarnpkg.com"}},GDt={configuration:{...vK,...Nxe,npmScopes:{description:"Settings per package scope",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{...vK,...Nxe}}},npmRegistries:{description:"Settings per registry",type:"MAP",normalizeKeys:Jc,valueDefinition:{description:"",type:"SHAPE",properties:{...vK}}}},fetchers:[WD,oh],resolvers:[YD,VD,JD]},qDt=GDt;var FK={};Vt(FK,{NpmAuditCommand:()=>v1,NpmInfoCommand:()=>S1,NpmLoginCommand:()=>D1,NpmLogoutCommand:()=>P1,NpmPublishCommand:()=>x1,NpmTagAddCommand:()=>Q1,NpmTagListCommand:()=>k1,NpmTagRemoveCommand:()=>R1,NpmWhoamiCommand:()=>T1,default:()=>ZDt,npmAuditTypes:()=>Jb,npmAuditUtils:()=>bL});Ve();Ve();Wt();var kK=ut(Ba());Ul();var Jb={};Vt(Jb,{Environment:()=>Yb,Severity:()=>Vb});var Yb=(s=>(s.All="all",s.Production="production",s.Development="development",s))(Yb||{}),Vb=(n=>(n.Info="info",n.Low="low",n.Moderate="moderate",n.High="high",n.Critical="critical",n))(Vb||{});var bL={};Vt(bL,{allSeverities:()=>B1,getPackages:()=>xK,getReportTree:()=>bK,getSeverityInclusions:()=>DK,getTopLevelDependencies:()=>PK});Ve();var Oxe=ut(Ai());var B1=["info","low","moderate","high","critical"];function DK(t){if(typeof t>"u")return new Set(B1);let e=B1.indexOf(t),r=B1.slice(e);return new Set(r)}function bK(t){let e={},r={children:e};for(let[s,a]of je.sortMap(Object.entries(t),n=>n[0]))for(let n of je.sortMap(a,c=>`${c.id}`))e[`${s}/${n.id}`]={value:he.tuple(he.Type.IDENT,G.parseIdent(s)),children:{ID:typeof n.id<"u"&&{label:"ID",value:he.tuple(he.Type.ID,n.id)},Issue:{label:"Issue",value:he.tuple(he.Type.NO_HINT,n.title)},URL:typeof n.url<"u"&&{label:"URL",value:he.tuple(he.Type.URL,n.url)},Severity:{label:"Severity",value:he.tuple(he.Type.NO_HINT,n.severity)},"Vulnerable Versions":{label:"Vulnerable Versions",value:he.tuple(he.Type.RANGE,n.vulnerable_versions)},"Tree Versions":{label:"Tree Versions",children:[...n.versions].sort(Oxe.default.compare).map(c=>({value:he.tuple(he.Type.REFERENCE,c)}))},Dependents:{label:"Dependents",children:je.sortMap(n.dependents,c=>G.stringifyLocator(c)).map(c=>({value:he.tuple(he.Type.LOCATOR,c)}))}}};return r}function PK(t,e,{all:r,environment:s}){let a=[],n=r?t.workspaces:[e],c=["all","production"].includes(s),f=["all","development"].includes(s);for(let p of n)for(let h of p.anchoredPackage.dependencies.values())(p.manifest.devDependencies.has(h.identHash)?!f:!c)||a.push({workspace:p,dependency:h});return a}function xK(t,e,{recursive:r}){let s=new Map,a=new Set,n=[],c=(f,p)=>{let h=t.storedResolutions.get(p.descriptorHash);if(typeof h>"u")throw new Error("Assertion failed: The resolution should have been registered");if(!a.has(h))a.add(h);else return;let E=t.storedPackages.get(h);if(typeof E>"u")throw new Error("Assertion failed: The package should have been registered");if(G.ensureDevirtualizedLocator(E).reference.startsWith("npm:")&&E.version!==null){let S=G.stringifyIdent(E),x=je.getMapWithDefault(s,S);je.getArrayWithDefault(x,E.version).push(f)}if(r)for(let S of E.dependencies.values())n.push([E,S])};for(let{workspace:f,dependency:p}of e)n.push([f.anchoredLocator,p]);for(;n.length>0;){let[f,p]=n.shift();c(f,p)}return s}var v1=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Audit dependencies from all workspaces"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Audit transitive dependencies as well"});this.environment=ge.String("--environment","all",{description:"Which environments to cover",validator:fo(Yb)});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.noDeprecations=ge.Boolean("--no-deprecations",!1,{description:"Don't warn about deprecated packages"});this.severity=ge.String("--severity","info",{description:"Minimal severity requested for packages to be displayed",validator:fo(Vb)});this.excludes=ge.Array("--exclude",[],{description:"Array of glob patterns of packages to exclude from audit"});this.ignores=ge.Array("--ignore",[],{description:"Array of glob patterns of advisory ID's to ignore in the audit report"})}static{this.paths=[["npm","audit"]]}static{this.usage=ot.Usage({descript
Line truncated
|
|
|
|
|
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 ${B1.map(r=>`\`${r}\``).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.
|
|
|
|
|
|
|
|
|
|
If certain packages produce false positives for a particular environment, the \`--exclude\` flag can be used to exclude any number of packages from the audit. This can also be set in the configuration file with the \`npmAuditExcludePackages\` option.
|
|
|
|
|
|
|
|
|
|
If particular advisories are needed to be ignored, the \`--ignore\` flag can be used with Advisory ID's to ignore any number of advisories in the audit report. This can also be set in the configuration file with the \`npmAuditIgnoreAdvisories\` option.
|
|
|
|
|
|
|
|
|
|
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"],["Exclude certain packages","yarn npm audit --exclude package1 --exclude package2"],["Ignore specific advisories","yarn npm audit --ignore 1234567 --ignore 7654321"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=PK(s,a,{all:this.all,environment:this.environment}),c=xK(s,n,{recursive:this.recursive}),f=Array.from(new Set([...r.get("npmAuditExcludePackages"),...this.excludes])),p=Object.create(null);for(let[N,U]of c)f.some(W=>kK.default.isMatch(N,W))||(p[N]=[...U.keys()]);let h=hi.getAuditRegistry({configuration:r}),E,w=await lA.start({configuration:r,stdout:this.context.stdout},async()=>{let N=an.post("/-/npm/v1/security/advisories/bulk",p,{authType:an.AuthType.BEST_EFFORT,configuration:r,jsonResponse:!0,registry:h}),U=this.noDeprecations?[]:await Promise.all(Array.from(Object.entries(p),async([ee,ie])=>{let ue=await an.getPackageMetadata(G.parseIdent(ee),{project:s});return je.mapAndFilter(ie,le=>{let{deprecated:me}=ue.versions[le];return me?[ee,le,me]:je.mapAndFilter.skip})})),W=await N;for(let[ee,ie,ue]of U.flat(1))Object.hasOwn(W,ee)&&W[ee].some(le=>Or.satisfiesWithPrereleases(ie,le.vulnerable_versions))||(W[ee]??=[],W[ee].push({id:`${ee} (deprecation)`,title:(typeof ue=="string"?ue:"").trim()||"This package has been deprecated.",severity:"moderate",vulnerable_versions:ie}));E=W});if(w.hasErrors())return w.exitCode();let S=DK(this.severity),x=Array.from(new Set([...r.get("npmAuditIgnoreAdvisories"),...this.ignores])),I=Object.create(null);for(let[N,U]of Object.entries(E)){let W=U.filter(ee=>!kK.default.isMatch(`${ee.id}`,x)&&S.has(ee.severity));W.length>0&&(I[N]=W.map(ee=>{let ie=c.get(N);if(typeof ie>"u")throw new Error("Assertion failed: Expected the registry to only return packages that were requested");let ue=[...ie.keys()].filter(me=>Or.satisfiesWithPrereleases(me,ee.vulnerable_versions)),le=new Map;for(let me of ue)for(let pe of ie.get(me))le.set(pe.locatorHash,pe);return{...ee,versions:ue,dependents:[...le.values()]}}))}let T=Object.keys(I).length>0;return T?(xs.emitTree(bK(I),{configuration:r,json:this.json,stdout:this.context.stdout,separators:2}),1):(await Ot.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async N=>{N.reportInfo(1,"No audit suggestions")}),T?1:0)}};Ve();Ve();Dt();Wt();var QK=ut(Ai()),RK=Ie("util"),S1=class extends ft{constructor(){super(...arguments);this.fields=ge.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=ge.Rest()}static{this.paths=[["npm","info"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command fetches 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 or to the corresponding tagged version. 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 information.\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 all available information about react@next","yarn npm info react@next"],["Show the description of react","yarn npm info react --fields description"],["Show all available versions of react","yarn npm info react
Line truncated
|
|
|
|
|
`),this.context.stdout.write(`${(0,RK.inspect)(p,{depth:1/0,colors:!0,compact:!1})}
|
|
|
|
|
`);return f.exitCode()}};function TK(t){if(Array.isArray(t)){let e=[];for(let r of t)r=TK(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 s=TK(t[r]);s&&(e[r]=s)}return e}else return t||null}Ve();Ve();Wt();var Lxe=ut(Yv()),D1=class extends ft{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Login to the publish registry"});this.alwaysAuth=ge.Boolean("--always-auth",{description:"Set the npmAlwaysAuth configuration"})}static{this.paths=[["npm","login"]]}static{this.usage=ot.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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s=await PL({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Ot.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let c=await VDt({configuration:r,registry:s,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),f=await WDt(s,c,r);return await YDt(s,f,{alwaysAuth:this.alwaysAuth,scope:this.scope}),n.reportInfo(0,"Successfully logged in")})).exitCode()}};async function PL({scope:t,publish:e,configuration:r,cwd:s}){return t&&e?hi.getScopeRegistry(t,{configuration:r,type:hi.RegistryType.PUBLISH_REGISTRY}):t?hi.getScopeRegistry(t,{configuration:r}):e?hi.getPublishRegistry((await $I(r,s)).manifest,{configuration:r}):hi.getDefaultRegistry({configuration:r})}async function WDt(t,e,r){let s=`/-/user/org.couchdb.user:${encodeURIComponent(e.name)}`,a={_id:`org.couchdb.user:${e.name}`,name:e.name,password:e.password,type:"user",roles:[],date:new Date().toISOString()},n={attemptedAs:e.name,configuration:r,registry:t,jsonResponse:!0,authType:an.AuthType.NO_AUTH};try{return(await an.put(s,a,n)).token}catch(E){if(!(E.originalError?.name==="HTTPError"&&E.originalError?.response.statusCode===409))throw E}let c={...n,authType:an.AuthType.NO_AUTH,headers:{authorization:`Basic ${Buffer.from(`${e.name}:${e.password}`).toString("base64")}`}},f=await an.get(s,c);for(let[E,w]of Object.entries(f))(!a[E]||E==="roles")&&(a[E]=w);let p=`${s}/-rev/${a._rev}`;return(await an.put(p,a,c)).token}async function YDt(t,e,{alwaysAuth:r,scope:s}){let a=c=>f=>{let p=je.isIndexableObject(f)?f:{},h=p[c],E=je.isIndexableObject(h)?h:{};return{...p,[c]:{...E,...r!==void 0?{npmAlwaysAuth:r}:{},npmAuthToken:e}}},n=s?{npmScopes:a(s)}:{npmRegistries:a(t)};return await ze.updateHomeConfiguration(n)}async function VDt({configuration:t,registry:e,report:r,stdin:s,stdout:a}){r.reportInfo(0,`Logging in to ${he.pretty(t,e,he.Type.URL)}`);let n=!1;if(e.match(/^https:\/\/npm\.pkg\.github\.com(\/|$)/)&&(r.reportInfo(0,"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions."),n=!0),r.reportSeparator(),t.env.YARN_IS_TEST_ENV)return{name:t.env.YARN_INJECT_NPM_USER||"",password:t.env.YARN_INJECT_NPM_PASSWORD||""};let c=await(0,Lxe.prompt)([{type:"input",name:"name",message:"Username:",required:!0,onCancel:()=>process.exit(130),stdin:s,stdout:a},{type:"password",name:"password",message:n?"Token:":"Password:",required:!0,onCancel:()=>process.exit(130),stdin:s,stdout:a}]);return r.reportSeparator(),c}Ve();Ve();Wt();var b1=new Set(["npmAuthIdent","npmAuthToken"]),P1=class extends ft{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Logout of the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Logout of the publish registry"});this.all=ge.Boolean("-A,--all",!1,{description:"Logout of all registries"})}static{this.paths=[["npm","logout"]]}static{this.usage=ot.Usage({category:"Npm-related commands",description:"logout of the npm registry",details:"\n This command will log you out by modifying your local configuration (in your home folder, never in the project itself) to delete all credentials linked to a registry.\Line truncated
|
|
|
|
|
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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n;if(typeof this.package<"u")n=G.parseIdent(this.package);else{if(!a)throw new ar(s.cwd,this.context.cwd);if(!a.manifest.name)throw new nt(`Missing 'name' field in ${fe.fromPortablePath(J.join(a.cwd,Er.manifest))}`);n=a.manifest.name}let c=await Kb(n,r),p={children:je.sortMap(Object.entries(c),([h])=>h).map(([h,E])=>({value:he.tuple(he.Type.RESOLUTION,{descriptor:G.makeDescriptor(n,h),locator:G.makeLocator(n,E)})}))};return xs.emitTree(p,{configuration:r,json:this.json,stdout:this.context.stdout})}};async function Kb(t,e){let r=`/-/package${an.getIdentUrl(t)}/dist-tags`;return an.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:an.customPackageError})}var Q1=class extends ft{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}static{this.paths=[["npm","tag","add"]]}static{this.usage=ot.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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=G.parseDescriptor(this.package,!0),c=n.range;if(!Uxe.default.valid(c))throw new nt(`The range ${he.pretty(r,n.range,he.Type.RANGE)} must be a valid semver version`);let f=hi.getPublishRegistry(a.manifest,{configuration:r}),p=he.pretty(r,n,he.Type.IDENT),h=he.pretty(r,c,he.Type.RANGE),E=he.pretty(r,this.tag,he.Type.CODE);return(await Ot.start({configuration:r,stdout:this.context.stdout},async S=>{let x=await Kb(n,r);Object.hasOwn(x,this.tag)&&x[this.tag]===c&&S.reportWarning(0,`Tag ${E} is already set to version ${h}`);let I=`/-/package${an.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await an.put(I,c,{configuration:r,registry:f,ident:n,jsonRequest:!0,jsonResponse:!0}),S.reportInfo(0,`Tag ${E} added to version ${h} of package ${p}`)})).exitCode()}};Ve();Wt();var R1=class extends ft{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}static{this.paths=[["npm","tag","remove"]]}static{this.usage=ot.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"]]})}async execute(){if(this.tag==="latest")throw new nt("The 'latest' tag cannot be removed.");let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);let n=G.parseIdent(this.package),c=hi.getPublishRegistry(a.manifest,{configuration:r}),f=he.pretty(r,this.tag,he.Type.CODE),p=he.pretty(r,n,he.Type.IDENT),h=await Kb(n,r);if(!Object.hasOwn(h,this.tag))throw new nt(`${f} is not a tag of package ${p}`);return(await Ot.start({configuration:r,stdout:this.context.stdout},async w=>{let S=`/-/package${an.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await an.del(S,{configuration:r,registry:c,ident:n,jsonResponse:!0}),w.reportInfo(0,`Tag ${f} removed from package ${p}`)})).exitCode()}};Ve();Ve();Wt();var T1=class extends ft{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Print username for the publish registry"})}static{this.paths=[["npm","whoami"]]}static{this.usage=ot.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"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),s;return this.scope&&this.publish?s=hi.getScopeRegistry(this.scope,{configuration:r,type:hi.RegistryType.PUBLISH_REGISTRY}):this.scope?s=hi.getScopeRegistry(this.scope,{configuration:r}):this.publish?s=hi.getPublishRegistry((await $I(r,this.context.cwd)).manifest,{configuration:r}):s=hi.getDefaultRegistry({configuration:r}),(await Ot.start({configuration:r,stdout:this.context.stdout},async n=>{let c;try{c=await an.get("/-/whoami",{configuration:r,registry:s,authType:an.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?G.makeIdent(this.scope,""):void 0})}catch(f){if(f.response?.statusCode===401||f.response?.statusCode===403){n.reportError(41,"Authentication failed - your credentials may have expired");return}else throw f}n.reportInfo(0,c.username)})).exitCode()}};var zDt={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:"STRING",default:null},npmPublishProvenance:{description:"Whether to generate provenance for the published packages",type:"BOOLEAN",default:!1},npmAuditExcludePackages:{description:"Array of glob patterns of packages to exclude from npm audit",type:"STRING",default:[],isArray:!0},npmAuditIgnoreAdvisories:{description:"Array of glob patterns of advisory IDs to exclude from npm audit",type:"STRING",default:[],isArray:!0}},commands:[v1,S1,D1,P1,x1,Q1,k1,R1,T1]},ZDt=zDt;var HK={};Vt(HK,{PatchCommand:()=>U1,PatchCommitCommand:()=>M1,PatchFetcher:()=>eP,PatchResolver:()=>tP,default:()=>gbt,patchUtils:()=>gy});Ve();Ve();Dt();eA();var gy={};Vt(gy,{applyPatchFile:()=>kL,diffFolders:()=>UK,ensureUnpatchedDescriptor:()=>NK,ensureUnpatchedLocator:()=>RL,extractPackageToDisk:()=>MK,extractPatchFlags:()=>Yxe,isParentRequired:()=>LK,isPatchDescriptor:()=>QL,isPatchLocator:()=>Tg,loadPatchFiles:()=>$b,makeDescriptor:()=>TL,makeLocator:()=>OK,makePatchHash:()=>_K,parseDescriptor:()=>Zb,parseLocator:()=>Xb,parsePatchFile:()=>zb,unpatchDescriptor:()=>Abt,unpatchLocator:()=>pbt});Ve();Dt();Ve();Dt();var XDt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function F1(t){return J.relative(vt.root,J.resolve(vt.root,fe.toPortablePath(t)))}function $Dt(t){let e=t.trim().match(XDt);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 ebt=420,tbt=493;var _xe=()=>({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}),rbt=t=>({header:$Dt(t),parts:[]}),nbt={"@":"header","-":"deletion","+":"insertion"," ":"context","\\":"pragma",undefined:"context"};function ibt(t){let e=[],r=Line truncated
|
|
|
|
|
`)+(a.hunk.parts[0].noNewlineAtEndOfFile?"":`
|
|
|
|
|
`):"";await e.mkdirpPromise(J.dirname(a.path),{chmod:493,utimes:[fi.SAFE_TIME,fi.SAFE_TIME]}),await e.writeFilePromise(a.path,n,{mode:a.mode}),await e.utimesPromise(a.path,fi.SAFE_TIME,fi.SAFE_TIME)}break;case"patch":await O1(e,a.path,async()=>{await cbt(a,{baseFs:e,dryRun:r})});break;case"mode change":{let c=(await e.statPromise(a.path)).mode;if(Hxe(a.newMode)!==Hxe(c))continue;await O1(e,a.path,async()=>{await e.chmodPromise(a.path,a.newMode)})}break;default:je.assertNever(a);break}}function Hxe(t){return(t&64)>0}function jxe(t){return t.replace(/\s+$/,"")}function lbt(t,e){return jxe(t)===jxe(e)}async function cbt({hunks:t,path:e},{baseFs:r,dryRun:s=!1}){let a=await r.statSync(e).mode,c=(await r.readFileSync(e,"utf8")).split(/\n/),f=[],p=0,h=0;for(let w of t){let S=Math.max(h,w.header.patched.start+p),x=Math.max(0,S-h),I=Math.max(0,c.length-S-w.header.original.length),T=Math.max(x,I),N=0,U=0,W=null;for(;N<=T;){if(N<=x&&(U=S-N,W=Gxe(w,c,U),W!==null)){N=-N;break}if(N<=I&&(U=S+N,W=Gxe(w,c,U),W!==null))break;N+=1}if(W===null)throw new N1(t.indexOf(w),w);f.push(W),p+=N,h=U+w.header.original.length}if(s)return;let E=0;for(let w of f)for(let S of w)switch(S.type){case"splice":{let x=S.index+E;c.splice(x,S.numToDelete,...S.linesToInsert),E+=S.linesToInsert.length-S.numToDelete}break;case"pop":c.pop();break;case"push":c.push(S.line);break;default:je.assertNever(S);break}await r.writeFilePromise(e,c.join(`
|
|
|
|
|
`),{mode:a})}function Gxe(t,e,r){let s=[];for(let a of t.parts)switch(a.type){case"context":case"deletion":{for(let n of a.lines){let c=e[r];if(c==null||!lbt(c,n))return null;r+=1}a.type==="deletion"&&(s.push({type:"splice",index:r-a.lines.length,numToDelete:a.lines.length,linesToInsert:[]}),a.noNewlineAtEndOfFile&&s.push({type:"push",line:""}))}break;case"insertion":s.push({type:"splice",index:r,numToDelete:0,linesToInsert:a.lines}),a.noNewlineAtEndOfFile&&s.push({type:"pop"});break;default:je.assertNever(a.type);break}return s}var fbt=/^builtin<([^>]+)>$/;function L1(t,e){let{protocol:r,source:s,selector:a,params:n}=G.parseRange(t);if(r!=="patch:")throw new Error("Invalid patch range");if(s===null)throw new Error("Patch locators must explicitly define their source");let c=a?a.split(/&/).map(E=>fe.toPortablePath(E)):[],f=n&&typeof n.locator=="string"?G.parseLocator(n.locator):null,p=n&&typeof n.version=="string"?n.version:null,h=e(s);return{parentLocator:f,sourceItem:h,patchPaths:c,sourceVersion:p}}function QL(t){return t.range.startsWith("patch:")}function Tg(t){return t.reference.startsWith("patch:")}function Zb(t){let{sourceItem:e,...r}=L1(t.range,G.parseDescriptor);return{...r,sourceDescriptor:e}}function Xb(t){let{sourceItem:e,...r}=L1(t.reference,G.parseLocator);return{...r,sourceLocator:e}}function Abt(t){let{sourceItem:e}=L1(t.range,G.parseDescriptor);return e}function pbt(t){let{sourceItem:e}=L1(t.reference,G.parseLocator);return e}function NK(t){if(!QL(t))return t;let{sourceItem:e}=L1(t.range,G.parseDescriptor);return e}function RL(t){if(!Tg(t))return t;let{sourceItem:e}=L1(t.reference,G.parseLocator);return e}function qxe({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:s,patchHash:a},n){let c=t!==null?{locator:G.stringifyLocator(t)}:{},f=typeof s<"u"?{version:s}:{},p=typeof a<"u"?{hash:a}:{};return G.makeRange({protocol:"patch:",source:n(e),selector:r.join("&"),params:{...f,...p,...c}})}function TL(t,{parentLocator:e,sourceDescriptor:r,patchPaths:s}){return G.makeDescriptor(t,qxe({parentLocator:e,sourceItem:r,patchPaths:s},G.stringifyDescriptor))}function OK(t,{parentLocator:e,sourcePackage:r,patchPaths:s,patchHash:a}){return G.makeLocator(t,qxe({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:s,patchHash:a},G.stringifyLocator))}function Wxe({onAbsolute:t,onRelative:e,onProject:r,onBuiltin:s},a){let n=a.lastIndexOf("!");n!==-1&&(a=a.slice(n+1));let c=a.match(fbt);return c!==null?s(c[1]):a.startsWith("~/")?r(a.slice(2)):J.isAbsolute(a)?t(a):e(a)}function Yxe(t){let e=t.lastIndexOf("!");return{optional:(e!==-1?new Set(t.slice(0,e).split(/!/)):new Set).has("optional")}}function LK(t){return Wxe({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},t)}async function $b(t,e,r){let s=t!==null?await r.fetcher.fetch(t,r):null,a=s&&s.localPath?{packageFs:new Sn(vt.root),prefixPath:J.relative(vt.root,s.localPath)}:s;s&&s!==a&&s.releaseFs&&s.releaseFs();let n=await je.releaseAfterUseAsync(async()=>await Promise.all(e.map(async c=>{let f=Yxe(c),p=await Wxe({onAbsolute:async h=>await ce.readFilePromise(h,"utf8"),onRelative:async h=>{if(a===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await a.packageFs.readFilePromise(J.join(a.prefixPath,h),"utf8")},onProject:async h=>await ce.readFilePromise(J.join(r.project.cwd,h),"utf8"),onBuiltin:async h=>await r.project.configuration.firstHook(E=>E.getBuiltinPatch,r.project,h)},c);return{...f,source:p}})));for(let c of n)typeof c.source=="string"&&(c.source=c.source.replace(/\r\n?/g,`
|
|
|
|
|
`));return n}async function MK(t,{cache:e,project:r}){let s=r.storedPackages.get(t.locatorHash);if(typeof s>"u")throw new Error("Assertion failed: Expected the package to be registered");let a=RL(t),n=r.storedChecksums,c=new qi,f=await ce.mktempPromise(),p=J.join(f,"source"),h=J.join(f,"user"),E=J.join(f,".yarn-patch.json"),w=r.configuration.makeFetcher(),S=[];try{let x,I;if(t.locatorHash===a.locatorHash){let T=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:c});S.push(()=>T.releaseFs?.()),x=T,I=T}else x=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:c}),S.push(()=>x.releaseFs?.()),I=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:c}),S.push(()=>I.releaseFs?.());await Promise.all([ce.copyPromise(p,x.prefixPath,{baseFs:x.packageFs}),ce.copyPromise(h,I.prefixPath,{baseFs:I.packageFs}),ce.writeJsonPromise(E,{locator:G.stringifyLocator(t),version:s.version})])}finally{for(let x of S)x()}return ce.detachTemp(f),h}async function UK(t,e){let r=fe.fromPortablePath(t).replace(/\\/g,"/"),s=fe.fromPortablePath(e).replace(/\\/g,"/"),{stdout:a,stderr:n}=await qr.execvp("git",["-c","core.safecrlf=false","diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index","--no-renames","--text",r,s],{cwd:fe.toPortablePath(process.cwd()),env:{...process.env,GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""}});if(n.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':
|
|
|
|
|
${n}`);let c=r.startsWith("/")?f=>f.slice(1):f=>f;return a.replace(new RegExp(`(a|b)(${je.escapeRegExp(`/${c(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${je.escapeRegExp(`/${c(s)}/`)}`,"g"),"$1/").replace(new RegExp(je.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(je.escapeRegExp(`${s}/`),"g"),"")}function _K(t,e){let r=[];for(let{source:s}of t){if(s===null)continue;let a=zb(s);for(let n of a){let{semverExclusivity:c,...f}=n;c!==null&&e!==null&&!Or.satisfiesWithPrereleases(e,c)||r.push(JSON.stringify(f))}}return Nn.makeHash(`${3}`,...r).slice(0,6)}Ve();function Vxe(t,{configuration:e,report:r}){for(let s of t.parts)for(let a of s.lines)switch(s.type){case"context":r.reportInfo(null,` ${he.pretty(e,a,"grey")}`);break;case"deletion":r.reportError(28,`- ${he.pretty(e,a,he.Type.REMOVED)}`);break;case"insertion":r.reportError(28,`+ ${he.pretty(e,a,he.Type.ADDED)}`);break;default:je.assertNever(s.type)}}var eP=class{supports(e,r){return!!Tg(e)}getLocalPath(e,r){return null}async fetch(e,r){let s=r.checksums.get(e.locatorHash)||null,[a,n,c]=await r.cache.fetchPackageFromCache(e,s,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${G.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:G.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:c}}async patchPackage(e,r){let{parentLocator:s,sourceLocator:a,sourceVersion:n,patchPaths:c}=Xb(e),f=await $b(s,c,r),p=await ce.mktempPromise(),h=J.join(p,"current.zip"),E=await r.fetcher.fetch(a,r),w=G.getIdentVendorPath(e),S=new As(h,{create:!0,level:r.project.configuration.get("compressionLevel")});await je.releaseAfterUseAsync(async()=>{await S.copyPromise(w,E.prefixPath,{baseFs:E.packageFs,stableSort:!0})},E.releaseFs),S.saveAndClose();for(let{source:x,optional:I}of f){if(x===null)continue;let T=new As(h,{level:r.project.configuration.get("compressionLevel")}),N=new Sn(J.resolve(vt.root,w),{baseFs:T});try{await kL(zb(x),{baseFs:N,version:n})}catch(U){if(!(U instanceof N1))throw U;let W=r.project.configuration.get("enableInlineHunks"),ee=!W&&!I?" (set enableInlineHunks for details)":"",ie=`${G.prettyLocator(r.project.configuration,e)}: ${U.message}${ee}`,ue=le=>{W&&Vxe(U.hunk,{configuration:r.project.configuration,report:le})};if(T.discardAndClose(),I){r.report.reportWarningOnce(66,ie,{reportExtra:ue});continue}else throw new Yt(66,ie,ue)}T.saveAndClose()}return new As(h,{level:r.project.configuration.get("compressionLevel")})}};Ve();var tP=class{supportsDescriptor(e,r){return!!QL(e)}supportsLocator(e,r){return!!Tg(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,s){let{patchPaths:a}=Zb(e);return a.every(n=>!LK(n))?e:G.bindDescriptor(e,{locator:G.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:s}=Zb(e);return{sourceDescriptor:r.project.configuration.normalizeDependency(s)}}async getCandidates(e,r,s){if(!s.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:a,patchPaths:n}=Zb(e),c=await $b(a,n,s.fetchOptions),f=r.sourceDescriptor;if(typeof f>"u")throw new Error("Assertion failed: The dependency should have been resolved");let p=_K(c,f.version);return[OK(e,{parentLocator:a,sourcePackage:f,patchPaths:n,patchHash:p})]}async getSatisfying(e,r,s,a){let[n]=await this.getCandidates(e,r,a);return{locators:s.filter(c=>c.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let{sourceLocator:s}=Xb(e);return{...await r.resolver.resolve(s,r),...e}}};Ve();Dt();Wt();var M1=class extends ft{constructor(){super(...arguments);this.save=ge.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=ge.String()}static{this.paths=[["patch-commit"]]}static{this.usage=ot.Usage({description:"generate a patch out of a directory",details:"\n By default, this will print a patchfile on stdout based on the diff between the folder passed in and the original version of the package. Such file is suitable for consumption with the `patch:` protocol.\n\n With the `-s,--save` option set, the patchfile won't be printed on stdout anymore and will instead be stored within a local file (by default kept within `.yarn/patches`, but configurable via the `patchFolder` setting). A `resolutions` entry will also be added to your top-level manifest, referencing the patched package via the `patch:` protocol.\n\n Note that only folders generated by `yarn patch` are accepted as valid input for `yarn patch-commit`.\n "})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState();let n=J.resolve(this.context.cwd,fe.toPortablePath(this.patchFolder)),c=J.join(n,"../source"),f=J.join(n,"../.yarn-patch.json");if(!ce.existsSLine truncated
|
|
|
|
|
${f.map(p=>`
|
|
|
|
|
- ${G.prettyLocator(r,p)}`).join("")}`);c=f[0]}if(!s.storedPackages.has(c.locatorHash))throw new nt("No package found in the project for the given locator");await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async f=>{let p=RL(c),h=await MK(c,{cache:n,project:s});f.reportJson({locator:G.stringifyLocator(p),path:fe.fromPortablePath(h)});let E=this.update?" along with its current modifications":"";f.reportInfo(0,`Package ${G.prettyLocator(r,p)} got extracted with success${E}!`),f.reportInfo(0,`You can now edit the following folder: ${he.pretty(r,fe.fromPortablePath(h),"magenta")}`),f.reportInfo(0,`Once you are done run ${he.pretty(r,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${fe.fromPortablePath(h)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};var hbt={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:"BOOLEAN",default:!1},patchFolder:{description:"Folder where the patch files must be written",type:"ABSOLUTE_PATH",default:"./.yarn/patches"}},commands:[M1,U1],fetchers:[eP],resolvers:[tP]},gbt=hbt;var qK={};Vt(qK,{PnpmLinker:()=>rP,default:()=>Cbt});Ve();Dt();Wt();var rP=class{getCustomDataKey(){return JSON.stringify({name:"PnpmLinker",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the pnpm linker to be enabled");let s=this.getCustomDataKey(),a=r.project.linkersCustomData.get(s);if(!a)throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=a.pathsByLocator.get(e.locatorHash);if(typeof n>"u")throw new nt(`Couldn't find ${G.prettyLocator(r.project.configuration,e)} in the currently installed pnpm map - running an install might help`);return n.packageLocation}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let s=this.getCustomDataKey(),a=r.project.linkersCustomData.get(s);if(!a)throw new nt(`The project in ${he.pretty(r.project.configuration,`${r.project.cwd}/package.json`,he.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=e.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(n){let p=a.locatorByPath.get(n[1]);if(p)return p}let c=e,f=e;do{f=c,c=J.dirname(f);let p=a.locatorByPath.get(f);if(p)return p}while(c!==f);return null}makeInstaller(e){return new jK(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="pnpm"}},jK=class{constructor(e){this.opts=e;this.asyncActions=new je.AsyncActions(10);this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.indexFolderPromise=ZP(ce,{indexPath:J.join(e.project.configuration.get("globalFolder"),"index")})}attachCustomData(e){}async installPackage(e,r,s){switch(e.linkType){case"SOFT":return this.installPackageSoft(e,r,s);case"HARD":return this.installPackageHard(e,r,s)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(e,r,s){let a=J.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(e)?J.join(a,Er.nodeModules):null;return this.customData.pathsByLocator.set(e.locatorHash,{packageLocation:a,dependenciesLocation:n}),{packageLocation:a,buildRequest:null}}async installPackageHard(e,r,s){let a=mbt(e,{project:this.opts.project}),n=a.packageLocation;this.customData.locatorByPath.set(n,G.stringifyLocator(e)),this.customData.pathsByLocator.set(e.locatorHash,a),s.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{await ce.mkdirPromise(n,{recursive:!0}),await ce.copyPromise(n,r.prefixPath,{baseFs:r.packageFs,overwrite:!1,linkStrategy:{type:"HardlinkFromIndex",indexPath:await this.indexFolderPromise,autoRepair:!0}})}));let f=G.isVirtualLocator(e)?G.devirtualizeLocator(e):e,p={manifest:await Ht.tryFind(r.prefixPath,{baseFs:r.packageFs})??new Ht,misc:{hasBindingGyp:gA.hasBindingGyp(r)}},h=this.opts.project.getDependencyMeta(f,e.version),E=gA.extractBuildRequest(e,p,h,{configuration:this.opts.project.configuration});return{packageLocation:n,buildRequest:E}}async attachInternalDependencies(e,r){if(this.opts.project.configuration.get("nodeLinker")!=="pnpm"||!Jxe(e,{project:this.opts.project}))return;let s=this.customData.pathsByLocator.get(e.locatorHash);if(typeof s>"u")throw new Error(`Assertion failed: Expected the package to have been registered (${G.stringifyLocator(e)})`);let{dependenciesLocation:a}=s;a&&this.asyncActions.reduce(e.locatorHash,async n=>{await ce.mkdirPromise(a,{recursive:!0});let c=await ybt(a),f=new Map(c),p=[n],h=(w,S)=>{let x=S;Jxe(S,{project:this.opts.project})||(this.opts.report.reportWarningOnce(0,"The pnpm linker doesn't support providing different versions to workspaces' peer dependencies"),x=G.devirtualizeLocator(S));let I=this.customData.pathsByLocator.get(x.locatorHash);if(typeof I>"Line truncated
|
|
|
|
|
|
|
|
|
|
${Bbt}
|
|
|
|
|
`,"--",...s],{cwd:t,strict:!0})},async makeReset(t,e){let r=e.map(s=>fe.fromPortablePath(s.path));await qr.execvp("git",["reset","HEAD","--",...r],{cwd:t,strict:!0})}};var Pbt=[Xxe],_1=class extends ft{constructor(){super(...arguments);this.commit=ge.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=ge.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=ge.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=ge.Boolean("-u,--update",!1,{hidden:!0})}static{this.paths=[["stage"]]}static{this.usage=ot.Usage({description:"add all yarn files to your vcs",details:"\n This command will add to your staging area the files belonging to Yarn (typically any modified `package.json` and `.yarnrc.yml` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a `.gitignore` file (assuming you use Git).\n\n Running `--reset` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).\n\n Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the `--commit` flag which will directly create a commit.\n ",examples:[["Adds all modified project files to the staging area","yarn stage"],["Creates a new commit containing all modified project files","yarn stage --commit"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s}=await Rt.find(r,this.context.cwd),{driver:a,root:n}=await xbt(s.cwd),c=[r.get("cacheFolder"),r.get("globalFolder"),r.get("virtualFolder"),r.get("yarnPath")];await r.triggerHook(w=>w.populateYarnPaths,s,w=>{c.push(w)});let f=new Set;for(let w of c)for(let S of kbt(n,w))f.add(S);let p=new Set([r.get("rcFilename"),Er.lockfile,Er.manifest]),h=await a.filterChanges(n,f,p),E=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${E}
|
|
|
|
|
`);else for(let w of h)this.context.stdout.write(`${fe.fromPortablePath(w.path)}
|
|
|
|
|
`);else if(this.reset){let w=await a.filterChanges(n,f,p,{staged:!0});w.length===0?this.context.stdout.write("No staged changes found!"):await a.makeReset(n,w)}else h.length===0?this.context.stdout.write("No changes found!"):this.commit?await a.makeCommit(n,h,E):(await a.makeStage(n,h),this.context.stdout.write(E))}};async function xbt(t){let e=null,r=null;for(let s of Pbt)if((r=await s.findRoot(t))!==null){e=s;break}if(e===null||r===null)throw new nt("No stage driver has been found for your current project");return{driver:e,root:r}}function kbt(t,e){let r=[];if(e===null)return r;for(;;){(e===t||e.startsWith(`${t}/`))&&r.push(e);let s;try{s=ce.statSync(e)}catch{break}if(s.isSymbolicLink())e=J.resolve(J.dirname(e),ce.readlinkSync(e));else break}return r}var Qbt={commands:[_1]},Rbt=Qbt;var XK={};Vt(XK,{default:()=>_bt});Ve();Ve();Dt();var tke=ut(Ai());Ve();var $xe=ut(o9()),Tbt="e8e1bd300d860104bb8c58453ffa1eb4",Fbt="OFCNCOG2CU",eke=async(t,e)=>{let r=G.stringifyIdent(t),a=Nbt(e).initIndex("npm-search");try{return(await a.getObject(r,{attributesToRetrieve:["types"]})).types?.ts==="definitely-typed"}catch{return!1}},Nbt=t=>(0,$xe.default)(Fbt,Tbt,{requester:{async send(r){try{let s=await An.request(r.url,r.data||null,{configuration:t,headers:r.headers});return{content:s.body,isTimedOut:!1,status:s.statusCode}}catch(s){return{content:s.response.body,isTimedOut:!1,status:s.response.statusCode}}}}});var rke=t=>t.scope?`${t.scope}__${t.name}`:`${t.name}`,Obt=async(t,e,r,s)=>{if(r.scope==="types")return;let{project:a}=t,{configuration:n}=a;if(!(n.get("tsEnableAutoTypes")??(ce.existsSync(J.join(t.cwd,"tsconfig.json"))||ce.existsSync(J.join(a.cwd,"tsconfig.json")))))return;let f=n.makeResolver(),p={project:a,resolver:f,report:new qi};if(!await eke(r,n))return;let E=rke(r),w=G.parseRange(r.range).selector;if(!Or.validRange(w)){let N=n.normalizeDependency(r),U=await f.getCandidates(N,{},p);w=G.parseRange(U[0].reference).selector}let S=tke.default.coerce(w);if(S===null)return;let x=`${Zu.Modifier.CARET}${S.major}`,I=G.makeDescriptor(G.makeIdent("types",E),x),T=je.mapAndFind(a.workspaces,N=>{let U=N.manifest.dependencies.get(r.identHash)?.descriptorHash,W=N.manifest.devDependencies.get(r.identHash)?.descriptorHash;if(U!==r.descriptorHash&&W!==r.descriptorHash)return je.mapAndFind.skip;let ee=[];for(let ie of Ht.allDependencies){let ue=N.manifest[ie].get(I.identHash);typeof ue>"u"||ee.push([ie,ue])}return ee.length===0?je.mapAndFind.skip:ee});if(typeof T<"u")for(let[N,U]of T)t.manifest[N].set(U.identHash,U);else{try{let N=n.normalizeDependency(I);if((await f.getCandidates(N,{},p)).length===0)return}catch{return}t.manifest[Zu.Target.DEVELOPMENT].set(I.identHash,I)}},Lbt=async(t,e,r)=>{if(r.scope==="types")return;let{project:s}=t,{configuration:a}=s;if(!(a.get("tsEnableAutoTypes")??(ce.existsSync(J.join(t.cwd,"tsconfig.json"))||ce.existsSync(J.join(s.cwd,"tsconfig.json")))))return;let c=rke(r),f=G.makeIdent("types",c);for(let p of Ht.allDependencies)typeof t.manifest[p].get(f.identHash)>"u"||t.manifest[p].delete(f.identHash)},Mbt=(t,e)=>{e.publishConfig&&e.publishConfig.typings&&(e.typings=e.publishConfig.typings),e.publishConfig&&e.publishConfig.types&&(e.types=e.publishConfig.types)},Ubt={configuration:{tsEnableAutoTypes:{description:"Whether Yarn should auto-install @types/ dependencies on 'yarn add'",type:"BOOLEAN",isNullable:!0,default:null}},hooks:{afterWorkspaceDependencyAddition:Obt,afterWorkspaceDependencyRemoval:Lbt,beforeWorkspacePacking:Mbt}},_bt=Ubt;var nz={};Vt(nz,{VersionApplyCommand:()=>q1,VersionCheckCommand:()=>W1,VersionCommand:()=>Y1,default:()=>Wbt,versionUtils:()=>G1});Ve();Ve();Wt();var G1={};Vt(G1,{Decision:()=>H1,applyPrerelease:()=>nke,applyReleases:()=>rz,applyStrategy:()=>nP,clearVersionFiles:()=>$K,getUndecidedDependentWorkspaces:()=>sP,getUndecidedWorkspaces:()=>OL,openVersionFile:()=>j1,requireMoreDecisions:()=>jbt,resolveVersionFiles:()=>iP,suggestStrategy:()=>tz,updateVersionFiles:()=>ez,validateReleaseDecision:()=>dy});Ve();Dt();wc();Wt();ql();var kA=ut(Ai()),Hbt=/^(>=|[~^]|)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/,H1=(h=>(h.UNDECIDED="undecided",h.DECLINE="decline",h.MAJOR="major",h.MINOR="minor",h.PATCH="patch",h.PREMAJOR="premajor",h.PREMINOR="preminor",h.PREPATCH="prepatch",h.PRERELEASE="prerelease",h))(H1||{});function dy(t){let e=kA.default.valid(t);return e||je.validateEnum(T4(H1,"UNDECIDED"),t)}async function iP(t,{prerelease:e=null}={}){let r=new Map,s=t.configuration.get("deferredVersionFolder");if(!ce.existsSync(s))return r;let a=await ce.readdirPromise(s);for(let n of a){if(!n.endsWith(".yml"))continue;let c=J.join(s,n),f=await ce.readFilePromise(c,"utf8"),p=as(f);for(let[h,E]of Object.entries(p.releases||{})){if(E==="decline")continue;let w=G.parseIdent(h),S=t.tryWorkspaceByIdent(w);if(S===null)throw new Error(`Assertion failed: Expected a release definitioLine truncated
|
|
|
|
|
- ${f.map(x=>fe.fromPortablePath(x)).join(`
|
|
|
|
|
- `)}`);let p=new Set(je.mapAndFilter(n,x=>{let I=t.tryWorkspaceByFilePath(x);return I===null?je.mapAndFilter.skip:I}));if(f.length===0&&p.size===0&&!e)return null;let h=f.length===1?f[0]:J.join(c,`${Nn.makeHash(Math.random().toString()).slice(0,8)}.yml`),E=ce.existsSync(h)?await ce.readFilePromise(h,"utf8"):"{}",w=as(E),S=new Map;for(let x of w.declined||[]){let I=G.parseIdent(x),T=t.getWorkspaceByIdent(I);S.set(T,"decline")}for(let[x,I]of Object.entries(w.releases||{})){let T=G.parseIdent(x),N=t.getWorkspaceByIdent(T);S.set(N,dy(I))}return{project:t,root:s,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:new Set(n),changedWorkspaces:p,releaseRoots:new Set([...p].filter(x=>x.manifest.version!==null)),releases:S,async saveAll(){let x={},I=[],T=[];for(let N of t.workspaces){if(N.manifest.version===null)continue;let U=G.stringifyIdent(N.anchoredLocator),W=S.get(N);W==="decline"?I.push(U):typeof W<"u"?x[U]=dy(W):p.has(N)&&T.push(U)}await ce.mkdirPromise(J.dirname(h),{recursive:!0}),await ce.changeFilePromise(h,nl(new nl.PreserveOrdering({releases:Object.keys(x).length>0?x:void 0,declined:I.length>0?I:void 0,undecided:T.length>0?T:void 0})))}}}function jbt(t){return OL(t).size>0||sP(t).length>0}function OL(t){let e=new Set;for(let r of t.changedWorkspaces)r.manifest.version!==null&&(t.releases.has(r)||e.add(r));return e}function sP(t,{include:e=new Set}={}){let r=[],s=new Map(je.mapAndFilter([...t.releases],([n,c])=>c==="decline"?je.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=new Map(je.mapAndFilter([...t.releases],([n,c])=>c!=="decline"?je.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of t.project.workspaces)if(!(!e.has(n)&&(a.has(n.anchoredLocator.locatorHash)||s.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let c of Ht.hardDependencies)for(let f of n.manifest.getForScope(c).values()){let p=t.project.tryWorkspaceByDescriptor(f);p!==null&&s.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}return r}function tz(t,e){let r=kA.default.clean(e);for(let s of Object.values(H1))if(s!=="undecided"&&s!=="decline"&&kA.default.inc(t,s)===r)return s;return null}function nP(t,e){if(kA.default.valid(e))return e;if(t===null)throw new nt(`Cannot apply the release strategy "${e}" unless the workspace already has a valid version`);if(!kA.default.valid(t))throw new nt(`Cannot apply the release strategy "${e}" on a non-semver version (${t})`);let r=kA.default.inc(t,e);if(r===null)throw new nt(`Cannot apply the release strategy "${e}" on the specified version (${t})`);return r}function rz(t,e,{report:r,exact:s}){let a=new Map;for(let n of t.workspaces)for(let c of Ht.allDependencies)for(let f of n.manifest[c].values()){let p=t.tryWorkspaceByDescriptor(f);if(p===null||!e.has(p))continue;je.getArrayWithDefault(a,p).push([n,c,f.identHash])}for(let[n,c]of e){let f=n.manifest.version;n.manifest.version=c,kA.default.prerelease(c)===null?delete n.manifest.raw.stableVersion:n.manifest.raw.stableVersion||(n.manifest.raw.stableVersion=f);let p=n.manifest.name!==null?G.stringifyIdent(n.manifest.name):null;r.reportInfo(0,`${G.prettyLocator(t.configuration,n.anchoredLocator)}: Bumped to ${c}`),r.reportJson({cwd:fe.fromPortablePath(n.cwd),ident:p,oldVersion:f,newVersion:c});let h=a.get(n);if(!(typeof h>"u"))for(let[E,w,S]of h){let x=E.manifest[w].get(S);if(typeof x>"u")throw new Error("Assertion failed: The dependency should have existed");let I=x.range,T=!1;if(I.startsWith(Ei.protocol)&&(I=I.slice(Ei.protocol.length),T=!0,I===n.relativeCwd))continue;let N=I.match(Hbt);if(!N){r.reportWarning(0,`Couldn't auto-upgrade range ${I} (in ${G.prettyLocator(t.configuration,E.anchoredLocator)})`);continue}let U=s?`${c}`:`${N[1]}${c}`;T&&(U=`${Ei.protocol}${U}`);let W=G.makeDescriptor(x,U);E.manifest[w].set(S,W)}}}var Gbt=new Map([["%n",{extract:t=>t.length>=1?[t[0],t.slice(1)]:null,generate:(t=0)=>`${t+1}`}]]);function nke(t,{current:e,prerelease:r}){let s=new kA.default.SemVer(e),a=s.prerelease.slice(),n=[];s.prerelease=[],s.format()!==t&&(a.length=0);let c=!0,f=r.split(/\./g);for(let p of f){let h=Gbt.get(p);if(typeof h>"u")n.push(p),a[0]===p?a.shift():c=!1;else{let E=c?h.extract(a):null;E!==null&&typeof E[0]=="number"?(n.push(h.generate(E[0])),a=E[1]):(n.push(h.generate()),c=!1)}}return s.prerelease&&(s.prerelease=[]),`${t}-${n.join(".")}`}var q1=class extends ft{constructor(){super(...arguments);this.all=ge.Boolean("--all",!1,{description:"Apply the deferred version changes on all workspaces"});this.dryRun=ge.Boolean("--dry-run",!1,{description:"Print the versions without actually generating the package archive"});this.prerelease=ge.String("--prerelease",{description:"Add a prerelease identifier to new versions",tolerateBoolean:!0});this.exact=ge.Boolean("--exact",!1,{description:"Use the exact version of each package, removes any range. Useful for nightly releases where the range might match another version."});this.recursive=ge.Boolean("-R,--recursive",{description:"ReleLine truncated
|
|
|
|
|
This command will apply the deferred version changes and remove their definitions from the repository.
|
|
|
|
|
|
|
|
|
|
Note that if \`--prerelease\` is set, the given prerelease identifier (by default \`rc.%n\`) will be used on all new versions and the version definitions will be kept as-is.
|
|
|
|
|
|
|
|
|
|
By default only the current workspace will be bumped, but you can configure this behavior by using one of:
|
|
|
|
|
|
|
|
|
|
- \`--recursive\` to also apply the version bump on its dependencies
|
|
|
|
|
- \`--all\` to apply the version bump on all packages in the repository
|
|
|
|
|
|
|
|
|
|
Note that this command will also update the \`workspace:\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump.
|
|
|
|
|
`,examples:[["Apply the version change to the local workspace","yarn version apply"],["Apply the version change to all the workspaces in the local workspace","yarn version apply --all"]]})}async execute(){let r=await ze.find(this.context.cwd,this.context.plugins),{project:s,workspace:a}=await Rt.find(r,this.context.cwd),n=await Kr.find(r);if(!a)throw new ar(s.cwd,this.context.cwd);await s.restoreInstallState({restoreResolutions:!1});let c=await Ot.start({configuration:r,json:this.json,stdout:this.context.stdout},async f=>{let p=this.prerelease?typeof this.prerelease!="boolean"?this.prerelease:"rc.%n":null,h=await iP(s,{prerelease:p}),E=new Map;if(this.all)E=h;else{let w=this.recursive?a.getRecursiveWorkspaceDependencies():[a];for(let S of w){let x=h.get(S);typeof x<"u"&&E.set(S,x)}}if(E.size===0){let w=h.size>0?" Did you want to add --all?":"";f.reportWarning(0,`The current workspace doesn't seem to require a version bump.${w}`);return}rz(s,E,{report:f,exact:this.exact}),this.dryRun||(p||(this.all?await $K(s):await ez(s,[...E.keys()])),f.reportSeparator())});return this.dryRun||c.hasErrors()?c.exitCode():await s.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};Ve();Dt();Wt();var LL=ut(Ai());var W1=class extends ft{constructor(){super(...arguments);this.interactive=ge.Boolean("-i,--interactive",{description:"Open an interactive interface used to set version bumps"})}static{this.paths=[["version","check"]]}static{this.usage=ot.Usage({category:"Release-related commands",description:"check that all the relevant packages have been bumped",details:"\n **Warning:** This command currently requires Git.\n\n This command will check that all the packages covered by the files listed in argument have been properly bumped or declined to bump.\n\n In the case of a bump, the check will also cover transitive packages - meaning that should `Foo` be bumped, a package `Bar` depending on `Foo` will require a decision as to whether `Bar` will need to be bumped. This check doesn't cross packages that have declined to bump.\n\n In case no arguments are passed to the function, the list of modified files will be generated by comparing the HEAD against `master`.\n ",examples:[["Check whether the modified packages need a bump","yarn version check"]]})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){nw(this.context);let{Gem:r}=await Promise.resolve().then(()=>(jF(),PW)),{ScrollableItems:s}=await Promise.resolve().then(()=>(YF(),WF)),{FocusRequest:a}=await Promise.resolve().then(()=>(kW(),p2e)),{useListInput:n}=await Promise.resolve().then(()=>(qF(),h2e)),{renderForm:c}=await Promise.resolve().then(()=>(zF(),KF)),{Box:f,Text:p}=await Promise.resolve().then(()=>ut(Wc())),{default:h,useCallback:E,useState:w}=await Promise.resolve().then(()=>ut(hn())),S=await ze.find(this.context.cwd,this.context.plugins),{project:x,workspace:I}=await Rt.find(S,this.context.cwd);if(!I)throw new ar(x.cwd,this.context.cwd);await x.restoreInstallState();let T=await j1(x);if(T===null||T.releaseRoots.size===0)return 0;if(T.root===null)throw new nt("This command can only be run on Git repositories");let N=()=>h.createElement(f,{flexDirection:"row",paddingBottom:1},h.createElement(f,{flexDirection:"column",width:60},h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<up>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<down>")," to select workspaces.")),h.createElement(f,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<left>"),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"<right>")," to select release strategies."))),h.createElement(f,{flexDirection:"column"},h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to save.")),h.createElement(f,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),U=({workspace:me,active:pe,decision:Be,setDecision:Ce})=>{let g=me.manifest.raw.stableVersion??me.manifest.version;if(g===null)throw new Error(`Assertion failed: The version should have been set (${G.prettyLocator(S,me.anchoredLocator)})`);if(LL.default.prerelease(g)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${g})`);let we=["undecided","decline","patch","minor","major"];n(Be,we,{active:pe,minus:"left",plus:"right",set:Ce});let ye=Be==="undecided"?h.createElement(p,{color:"yellow"},g):Be==="decline"?h.createElement(p,{color:"green"},g):h.createElement(p,null,h.createElement(p,{color:"magenta"},g)," \u2192 ",h.createElement(p,{color:"green"},LL.default.valid(Be)?Be:LL.default.inc(g,Be)));return h.createElement(f,{flexDirection:"column"},h.createElement(f,null,h.createElement(p,null,G.prettyLocator(S,me.anchoredLocator)," - ",ye)),h.createElement(f,null,we.map(AeLine truncated
|
|
|
|
|
`)},p=()=>{let Ce=this.from.map(g=>J1.default.matcher(g));return s.workspaces.filter(g=>{let we=G.stringifyIdent(g.anchoredLocator),ye=g.relativeCwd;return Ce.some(Ae=>Ae(we)||Ae(ye))})},h=[];if(this.since?(f("Option --since is set; selecting the changed workspaces as root for workspace selection"),h=Array.from(await ka.fetchChangedWorkspaces({ref:this.since,project:s}))):this.from?(f("Option --from is set; selecting the specified workspaces"),h=[...p()]):this.worktree?(f("Option --worktree is set; selecting the current workspace"),h=[a]):this.recursive?(f("Option --recursive is set; selecting the current workspace"),h=[a]):this.all&&(f("Option --all is set; selecting all workspaces"),h=[...s.workspaces]),this.dryRun&&!this.all){for(let Ce of h)f(`
|
|
|
|
|
- ${Ce.relativeCwd}
|
|
|
|
|
${G.prettyLocator(r,Ce.anchoredLocator)}`);h.length>0&&f("")}let E;if(this.recursive?this.since?(f("Option --recursive --since is set; recursively selecting all dependent workspaces"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceDependents()]).flat())):(f("Option --recursive is set; recursively selecting all transitive dependencies"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceDependencies()]).flat())):this.worktree?(f("Option --worktree is set; recursively selecting all nested workspaces"),E=new Set(h.map(Ce=>[...Ce.getRecursiveWorkspaceChildren()]).flat())):E=null,E!==null&&(h=[...new Set([...h,...E])],this.dryRun))for(let Ce of E)f(`
|
|
|
|
|
- ${Ce.relativeCwd}
|
|
|
|
|
${G.prettyLocator(r,Ce.anchoredLocator)}`);let w=[],S=!1;if(c?.includes(":")){for(let Ce of s.workspaces)if(Ce.manifest.scripts.has(c)&&(S=!S,S===!1))break}for(let Ce of h){if(c&&!Ce.manifest.scripts.has(c)&&!S&&!(await In.getWorkspaceAccessibleBinaries(Ce)).has(c)){f(`Excluding ${Ce.relativeCwd} because it doesn't have a "${c}" script`);continue}if(!(c===r.env.npm_lifecycle_event&&Ce.cwd===a.cwd)){if(this.include.length>0&&!J1.default.isMatch(G.stringifyIdent(Ce.anchoredLocator),this.include)&&!J1.default.isMatch(Ce.relativeCwd,this.include)){f(`Excluding ${Ce.relativeCwd} because it doesn't match the --include filter`);continue}if(this.exclude.length>0&&(J1.default.isMatch(G.stringifyIdent(Ce.anchoredLocator),this.exclude)||J1.default.isMatch(Ce.relativeCwd,this.exclude))){f(`Excluding ${Ce.relativeCwd} because it matches the --exclude filter`);continue}if(this.publicOnly&&Ce.manifest.private===!0){f(`Excluding ${Ce.relativeCwd} because it's a private workspace and --no-private was set`);continue}w.push(Ce)}}if(this.dryRun)return 0;let x=this.verbose??(this.context.stdout.isTTY?1/0:0),I=x>0,T=x>1,N=this.parallel?this.jobs==="unlimited"?1/0:Number(this.jobs)||Math.ceil(fs.availableParallelism()/2):1,U=N===1?!1:this.parallel,W=U?this.interlaced:!0,ee=(0,ske.default)(N),ie=new Map,ue=new Set,le=0,me=null,pe=!1,Be=await Ot.start({configuration:r,stdout:this.context.stdout,includePrefix:!1},async Ce=>{let g=async(we,{commandIndex:ye})=>{if(pe)return-1;!U&&T&&ye>1&&Ce.reportSeparator();let Ae=Ybt(we,{configuration:r,label:I,commandIndex:ye}),[se,X]=ike(Ce,{prefix:Ae,interlaced:W}),[De,Te]=ike(Ce,{prefix:Ae,interlaced:W});try{T&&Ce.reportInfo(null,`${Ae?`${Ae} `:""}Process started`);let mt=Date.now(),j=await this.cli.run([this.commandName,...this.args],{cwd:we.cwd,stdout:se,stderr:De})||0;se.end(),De.end(),await X,await Te;let rt=Date.now();if(T){let Fe=r.get("enableTimers")?`, completed in ${he.pretty(r,rt-mt,he.Type.DURATION)}`:"";Ce.reportInfo(null,`${Ae?`${Ae} `:""}Process exited (exit code ${j})${Fe}`)}return j===130&&(pe=!0,me=j),j}catch(mt){throw se.end(),De.end(),await X,await Te,mt}};for(let we of w)ie.set(we.anchoredLocator.locatorHash,we);for(;ie.size>0&&!Ce.hasErrors();){let we=[];for(let[X,De]of ie){if(ue.has(De.anchoredDescriptor.descriptorHash))continue;let Te=!0;if(this.topological||this.topologicalDev){let mt=this.topologicalDev?new Map([...De.manifest.dependencies,...De.manifest.devDependencies]):De.manifest.dependencies;for(let j of mt.values()){let rt=s.tryWorkspaceByDescriptor(j);if(Te=rt===null||!ie.has(rt.anchoredLocator.locatorHash),!Te)break}}if(Te&&(ue.add(De.anchoredDescriptor.descriptorHash),we.push(ee(async()=>{let mt=await g(De,{commandIndex:++le});return ie.delete(X),ue.delete(De.anchoredDescriptor.descriptorHash),{workspace:De,exitCode:mt}})),!U))break}if(we.length===0){let X=Array.from(ie.values()).map(De=>G.prettyLocator(r,De.anchoredLocator)).join(", ");Ce.reportError(3,`Dependency cycle detected (${X})`);return}let ye=await Promise.all(we);ye.forEach(({workspace:X,exitCode:De})=>{De!==0&&Ce.reportError(0,`The command failed in workspace ${G.prettyLocator(r,X.anchoredLocator)} with exit code ${De}`)});let se=ye.map(X=>X.exitCode).find(X=>X!==0);(this.topological||this.topologicalDev)&&typeof se<"u"&&Ce.reportError(0,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return me!==null?me:Be.exitCode()}};function ike(t,{prefix:e,interlaced:r}){let s=t.createStreamReporter(e),a=new je.DefaultStream;a.pipe(s,{end:!1}),a.on("finish",()=>{s.end()});let n=new Promise(f=>{s.on("finish",()=>{f(a.active)})});if(r)return[a,n];let c=new je.BufferStream;return c.pipe(a,{end:!1}),c.on("finish",()=>{a.end()}),[c,n]}function Ybt(t,{configuration:e,commandIndex:r,label:s}){if(!s)return null;let n=`[${G.stringifyIdent(t.anchoredLocator)}]:`,c=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],f=c[r%c.length];return he.pretty(e,n,f)}var Vbt={commands:[V1,K1]},Jbt=Vbt;var eC=()=>({modules:new Map([["@yarnpkg/cli",jv],["@yarnpkg/core",Hv],["@yarnpkg/fslib",M2],["@yarnpkg/libzip",uv],["@yarnpkg/parsers",Y2],["@yarnpkg/shell",dv],["clipanion",iB],["semver",Kbt],["typanion",ya],["@yarnpkg/plugin-essentials",cq],["@yarnpkg/plugin-compat",hq],["@yarnpkg/plugin-constraints",Qq],["@yarnpkg/plugin-dlx",Rq],["@yarnpkg/plugin-exec",Nq],["@yarnpkg/plugin-file",Lq],["@yarnpkg/plugin-git",lq],["@yarnpkg/plugin-github",_q],["@yarnpkg/plugin-http",Hq],["@yarnpkg/plugin-init",jq],["@yarnpkg/plugin-interactive-tools",UW],["@yarnpkg/plugin-jsr",HW],["@yarnpkg/plugin-link",jW],["@yarnpkg/plugin-nm",SY],["@yarnpkg/plugin-npm",SK],["@yarnpkg/plugin-npm-cli",FK],["@yarnpkg/plugin-pack",yV],["@yarnpkg/plugin-patch",HK],["@yarnpkg/plugin-pnp",pY],["@yarnpkg/plugin-pnpm",qK],["@yarnpkg/plugin-stage",ZK],["@yarnpkg/plugin-typescript",XK],["@yarnpkg/plugin-version",nz],["@yarnpkg/plugin-workspace-tools",iz]]),plugins:new Set(["@yarnpkg/plugin-essentials",Line truncated
|
|
|
|
|
Please report this issue at https://github.com/yarnpkg/berry/issues.`)}process.once("beforeExit",n);try{process.exitCode=42,process.exitCode=await ePt(a,t,{selfPath:r,pluginConfiguration:s})}catch(c){Ia.defaultContext.stdout.write(a.error(c)),process.exitCode=1}finally{process.off("beforeExit",n),await ce.rmtempPromise()}}qT(process.argv.slice(2),{cwd:J.cwd(),selfPath:fe.toPortablePath(fe.resolve(process.argv[1])),pluginConfiguration:eC()});})();
|
|
|
|
|
/**
|
|
|
|
|
@license
|
|
|
|
|
Copyright (c) 2015, Rebecca Turner
|
|
|
|
|
|
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
|
purpose with or without fee is hereby granted, provided that the above
|
|
|
|
|
copyright notice and this permission notice appear in all copies.
|
|
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
|
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
|
|
|
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
|
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
|
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
*/
|
|
|
|
|
/**
|
|
|
|
|
@license
|
|
|
|
|
Copyright Node.js contributors. All rights reserved.
|
|
|
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
|
of this software and associated documentation files (the "Software"), to
|
|
|
|
|
deal in the Software without restriction, including without limitation the
|
|
|
|
|
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
|
|
|
sell copies of the Software, and to permit persons to whom the Software is
|
|
|
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
|
all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
|
|
|
IN THE SOFTWARE.
|
|
|
|
|
*/
|
|
|
|
|
/**
|
|
|
|
|
@license
|
|
|
|
|
The MIT License (MIT)
|
|
|
|
|
|
|
|
|
|
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)
|
|
|
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
|
|
|
in the Software without restriction, including without limitation the rights
|
|
|
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
|
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
|
all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
|
THE SOFTWARE.
|
|
|
|
|
*/
|
|
|
|
|
/**
|
|
|
|
|
@license
|
|
|
|
|
Copyright Joyent, Inc. and other Node contributors.
|
|
|
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
|
copy of this software and associated documentation files (the
|
|
|
|
|
"Software"), to deal in the Software without restriction, including
|
|
|
|
|
without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
|
distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
|
|
|
persons to whom the Software is furnished to do so, subject to the
|
|
|
|
|
following conditions:
|
|
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included
|
|
|
|
|
in all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
|
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
|
|
|
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
|
|
|
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
|
|
|
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
|
|
|
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
*/
|
|
|
|
|
/*! Bundled license information:
|
|
|
|
|
|
|
|
|
|
is-number/index.js:
|
|
|
|
|
(*!
|
|
|
|
|
* is-number <https://github.com/jonschlinkert/is-number>
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
|
|
|
* Released under the MIT License.
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
to-regex-range/index.js:
|
|
|
|
|
(*!
|
|
|
|
|
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
|
|
|
* Released under the MIT License.
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
fill-range/index.js:
|
|
|
|
|
(*!
|
|
|
|
|
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
|
|
|
* Licensed under the MIT License.
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
is-extglob/index.js:
|
|
|
|
|
(*!
|
|
|
|
|
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
|
|
|
* Licensed under the MIT License.
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
is-glob/index.js:
|
|
|
|
|
(*!
|
|
|
|
|
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
|
|
|
* Released under the MIT License.
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
queue-microtask/index.js:
|
|
|
|
|
(*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
|
|
|
|
|
|
|
|
run-parallel/index.js:
|
|
|
|
|
(*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
|
|
|
|
|
|
|
|
git-url-parse/lib/index.js:
|
|
|
|
|
(*!
|
|
|
|
|
* buildToken
|
|
|
|
|
* Builds OAuth token prefix (helper function)
|
|
|
|
|
*
|
|
|
|
|
* @name buildToken
|
|
|
|
|
* @function
|
|
|
|
|
* @param {GitUrl} obj The parsed Git url object.
|
|
|
|
|
* @return {String} token prefix
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
object-assign/index.js:
|
|
|
|
|
(*
|
|
|
|
|
object-assign
|
|
|
|
|
(c) Sindre Sorhus
|
|
|
|
|
@license MIT
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
react/cjs/react.production.min.js:
|
|
|
|
|
(** @license React v17.0.2
|
|
|
|
|
* react.production.min.js
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
|
|
|
*
|
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
scheduler/cjs/scheduler.production.min.js:
|
|
|
|
|
(** @license React v0.20.2
|
|
|
|
|
* scheduler.production.min.js
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
|
|
|
*
|
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
react-reconciler/cjs/react-reconciler.production.min.js:
|
|
|
|
|
(** @license React v0.26.2
|
|
|
|
|
* react-reconciler.production.min.js
|
|
|
|
|
*
|
|
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
|
|
|
*
|
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
|
*)
|
|
|
|
|
|
|
|
|
|
is-windows/index.js:
|
|
|
|
|
(*!
|
|
|
|
|
* is-windows <https://github.com/jonschlinkert/is-windows>
|
|
|
|
|
*
|
|
|
|
|
* Copyright © 2015-2018, Jon Schlinkert.
|
|
|
|
|
* Released under the MIT License.
|
|
|
|
|
*)
|
|
|
|
|
*/
|