개발: Yarn 검사 명령 추가
프로젝트 전용 Yarn 실행 파일과 잠금 파일을 포함했다. Ruby 문법과 한국어 YAML 구문을 yarn test 한 번으로 검사할 수 있게 했다.
This commit is contained in:
1 parent
ced38f3ef7
commit
5b192ca158
4 files changed
+913
No files matched your search
Vendored
+876
@@ -0,0 +1,876 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
/* eslint-disable */
|
||||||
|
//prettier-ignore
|
||||||
|
(()=>{var m_e=Object.create;var bR=Object.defineProperty;var y_e=Object.getOwnPropertyDescriptor;var E_e=Object.getOwnPropertyNames;var C_e=Object.getPrototypeOf,I_e=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 new Error('Dynamic require of "'+t+'" is not supported')});var dt=(t,e)=>()=>(t&&(e=t(t=0)),e);var U=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Yt=(t,e)=>{for(var r in e)bR(t,r,{get:e[r],enumerable:!0})},w_e=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of E_e(e))!I_e.call(t,a)&&a!==r&&bR(t,a,{get:()=>e[a],enumerable:!(o=y_e(e,a))||o.enumerable});return t};var tt=(t,e,r)=>(r=t!=null?m_e(C_e(t)):{},w_e(e||!t||!t.__esModule?bR(r,"default",{value:t,enumerable:!0}):r,t));var Ii={};Yt(Ii,{SAFE_TIME:()=>B7,S_IFDIR:()=>rD,S_IFLNK:()=>nD,S_IFMT:()=>Hu,S_IFREG:()=>QI});var Hu,rD,QI,nD,B7,v7=dt(()=>{Hu=61440,rD=16384,QI=32768,nD=40960,B7=456789e3});var sr={};Yt(sr,{EBADF:()=>Co,EBUSY:()=>B_e,EEXIST:()=>b_e,EINVAL:()=>D_e,EISDIR:()=>P_e,ENOENT:()=>S_e,ENOSYS:()=>v_e,ENOTDIR:()=>x_e,ENOTEMPTY:()=>k_e,EOPNOTSUPP:()=>F_e,EROFS:()=>Q_e,ERR_DIR_CLOSED:()=>QR});function Ll(t,e){return Object.assign(new Error(`${t}: ${e}`),{code:t})}function B_e(t){return Ll("EBUSY",t)}function v_e(t,e){return Ll("ENOSYS",`${t}, ${e}`)}function D_e(t){return Ll("EINVAL",`invalid argument, ${t}`)}function Co(t){return Ll("EBADF",`bad file descriptor, ${t}`)}function S_e(t){return Ll("ENOENT",`no such file or directory, ${t}`)}function x_e(t){return Ll("ENOTDIR",`not a directory, ${t}`)}function P_e(t){return Ll("EISDIR",`illegal operation on a directory, ${t}`)}function b_e(t){return Ll("EEXIST",`file already exists, ${t}`)}function Q_e(t){return Ll("EROFS",`read-only filesystem, ${t}`)}function k_e(t){return Ll("ENOTEMPTY",`directory not empty, ${t}`)}function F_e(t){return Ll("EOPNOTSUPP",`operation not supported, ${t}`)}function QR(){return Ll("ERR_DIR_CLOSED","Directory handle was closed")}var iD=dt(()=>{});var Nl={};Yt(Nl,{BigIntStatsEntry:()=>$m,DEFAULT_MODE:()=>RR,DirEntry:()=>kR,StatEntry:()=>Zm,areStatsEqual:()=>TR,clearStats:()=>sD,convertToBigIntStats:()=>T_e,makeDefaultStats:()=>D7,makeEmptyStats:()=>R_e});function D7(){return new Zm}function R_e(){return sD(D7())}function sD(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let r=t[e];typeof r=="number"?t[e]=0:typeof r=="bigint"?t[e]=BigInt(0):FR.types.isDate(r)&&(t[e]=new Date(0))}return t}function T_e(t){let e=new $m;for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let o=t[r];typeof o=="number"?e[r]=BigInt(o):FR.types.isDate(o)&&(e[r]=new Date(o))}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 TR(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,o=e;return!(r.atimeNs!==o.atimeNs||r.mtimeNs!==o.mtimeNs||r.ctimeNs!==o.ctimeNs||r.birthtimeNs!==o.birthtimeNs)}var FR,RR,kR,Zm,$m,LR=dt(()=>{FR=tt(Ie("util")),RR=33188,kR=class{constructor(){this.name="";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}},Zm=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=RR;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}},$m=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(RR);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return!1}isCharacLine truncated
|
||||||
|
`).length,o=e.length-r;return r>o?`\r
|
||||||
|
`:`
|
||||||
|
`}function Tg(t,e){return e.replace(/\r?\n/g,W_e(t))}var T7,L7,hf,qu,Lg=dt(()=>{T7=Ie("crypto"),L7=Ie("os");MR();ya();hf=class{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:r=!1}={}){let o=[e];for(;o.length>0;){let a=o.shift();if((await this.lstatPromise(a)).isDirectory()){let u=await this.readdirPromise(a);if(r)for(let A of u.sort())o.push(this.pathUtils.join(a,A));else throw new Error("Not supported")}else yield a}}async checksumFilePromise(e,{algorithm:r="sha512"}={}){let o=await this.openPromise(e,"r");try{let n=Buffer.allocUnsafeSlow(65536),u=(0,T7.createHash)(r),A=0;for(;(A=await this.readPromise(o,n,0,65536))!==0;)u.update(A===65536?n:n.slice(0,A));return u.digest("hex")}finally{await this.closePromise(o)}}async removePromise(e,{recursive:r=!0,maxRetries:o=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(u=>this.removePromise(this.pathUtils.resolve(e,u))))}for(let n=0;n<=o;n++)try{await this.rmdirPromise(e);break}catch(u){if(u.code!=="EBUSY"&&u.code!=="ENOTEMPTY")throw u;n<o&&await new Promise(A=>setTimeout(A,n*100))}}else await this.unlinkPromise(e)}removeSync(e,{recursive:r=!0}={}){let o;try{o=this.lstatSync(e)}catch(a){if(a.code==="ENOENT")return;throw a}if(o.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:o}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{await this.mkdirPromise(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??(n=A),r!=null&&await this.chmodPromise(A,r),o!=null)await this.utimesPromise(A,o[0],o[1]);else{let p=await this.statPromise(this.pathUtils.dirname(A));await this.utimesPromise(A,p.atime,p.mtime)}}}return n}mkdirpSync(e,{chmod:r,utimes:o}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{this.mkdirSync(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??(n=A),r!=null&&this.chmodSync(A,r),o!=null)this.utimesSync(A,o[0],o[1]);else{let p=this.statSync(this.pathUtils.dirname(A));this.utimesSync(A,p.atime,p.mtime)}}}return n}async copyPromise(e,r,{baseFs:o=this,overwrite:a=!0,stableSort:n=!1,stableTime:u=!1,linkStrategy:A=null}={}){return await P7(this,e,o,r,{overwrite:a,stableSort:n,stableTime:u,linkStrategy:A})}copySync(e,r,{baseFs:o=this,overwrite:a=!0}={}){let n=o.lstatSync(r),u=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);let p=o.readdirSync(r);for(let h of p)this.copySync(this.pathUtils.join(e,h),o.pathUtils.join(r,h),{baseFs:o,overwrite:a})}else if(n.isFile()){if(!u||a){u&&this.removeSync(e);let p=o.readFileSync(r);this.writeFileSync(e,p)}}else if(n.isSymbolicLink()){if(!u||a){u&&this.removeSync(e);let p=o.readlinkSync(r);this.symlinkSync(oD(this.pathUtils,p),e)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);let A=n.mode&511;this.chmodSync(e,A)}async changeFilePromise(e,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(e,r,o):this.changeFileTextPromise(e,r,o)}async changeFileBufferPromise(e,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=await this.readFilePromise(e)}catch{}Buffer.compare(a,r)!==0&&await this.writeFilePromise(e,r,{mode:o})}async changeFileTextPromise(e,r,{automaticNewlines:o,mode:a}={}){let n="";try{n=await this.readFilePromise(e,"utf8")}catch{}let u=o?Tg(n,r):r;n!==u&&await this.writeFilePromise(e,u,{mode:a})}changeFileSync(e,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(e,r,o):this.changeFileTextSync(e,r,o)}changeFileBufferSync(e,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=this.readFileSync(e)}catch{}Buffer.compare(a,r)!==0&&this.writeFileSync(e,r,{mode:o})}changeFileTextSync(e,r,{automaticNewlines:o=!1,mode:a}={}){let n="";try{n=this.readFileSync(e,"utf8")}catch{}let u=o?Tg(n,r):r;n!==u&&this.writeFileSync(e,u,{mode:a})}async movePromise(e,r){try{await this.renamePromise(e,r)}catch(o){if(o.code==="EXDEV")await this.copyPromise(r,e),await this.removePromise(e);else throw o}}moveSync(e,r){try{this.renameSync(e,r)}catch(o){if(o.code==="EXDEV")this.copySync(r,e),this.removeSync(e);else throw o}}async lockPromise(e,r){let o=`${e}.flock`,a=1e3/60,n=Date.now(),u=null,A=async()=>{let p;try{[p]=await this.readJsonPromise(o)}catch{return Date.now()-n<500}try{return process.kill(p,0),!0}catch{return!1}};for(;u===null;)try{u=await this.openPromise(o,"wx")}catch(p){if(p.code==="EEXIST"){if(!await A())try{await this.unlinkPromise(o);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 ${o})`)}else
Line truncated
|
||||||
|
`)}writeJsonSync(e,r){return this.writeFileSync(e,`${JSON.stringify(r,null,2)}
|
||||||
|
`)}async preserveTimePromise(e,r){let o=await this.lstatPromise(e),a=await r();typeof a<"u"&&(e=a),await this.lutimesPromise(e,o.atime,o.mtime)}async preserveTimeSync(e,r){let o=this.lstatSync(e),a=r();typeof a<"u"&&(e=a),this.lutimesSync(e,o.atime,o.mtime)}},qu=class extends hf{constructor(){super(V)}}});var vs,gf=dt(()=>{Lg();vs=class extends hf{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,o){return this.baseFs.openPromise(this.mapToBase(e),r,o)}openSync(e,r,o){return this.baseFs.openSync(this.mapToBase(e),r,o)}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,o,a,n){return await this.baseFs.readPromise(e,r,o,a,n)}readSync(e,r,o,a,n){return this.baseFs.readSync(e,r,o,a,n)}async writePromise(e,r,o,a,n){return typeof r=="string"?await this.baseFs.writePromise(e,r,o):await this.baseFs.writePromise(e,r,o,a,n)}writeSync(e,r,o,a,n){return typeof r=="string"?this.baseFs.writeSync(e,r,o):this.baseFs.writeSync(e,r,o,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,o){return this.baseFs.fchownPromise(e,r,o)}fchownSync(e,r,o){return this.baseFs.fchownSync(e,r,o)}async chownPromise(e,r,o){return this.baseFs.chownPromise(this.mapToBase(e),r,o)}chownSync(e,r,o){return this.baseFs.chownSync(this.mapToBase(e),r,o)}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,o=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(r),o)}copyFileSync(e,r,o=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(r),o)}async appendFilePromise(e,r,o){return this.baseFs.appendFilePromise(this.fsMapToBase(e),r,o)}appendFileSync(e,r,o){return this.baseFs.appendFileSync(this.fsMapToBase(e),r,o)}async writeFilePromise(e,r,o){return this.baseFs.writeFilePromise(this.fsMapToBase(e),r,o)}writeFileSync(e,r,o){return this.baseFs.writeFileSync(this.fsMapToBase(e),r,o)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,r,o){return this.baseFs.utimesPromise(this.mapToBase(e),r,o)}utimesSync(e,r,o){return this.baseFs.utimesSync(this.mapToBase(e),r,o)}async lutimesPromise(e,r,o){return this.baseFs.lutimesPromise(this.mapToBase(e),r,o)}lutimesSync(e,r,o){return this.baseFs.lutimesSync(this.mapToBase(e),r,o)}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 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,o){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkPromise(this.mapToBase(e),a,o);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),u=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkPromise(u,a,o)}symlinkSync(e,r,o){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkSync(this.mapTo
Line truncated
|
||||||
|
`,_e=yr(`\\
|
||||||
|
`,!1),Fn=function(){return""},Fi="\\",Rn=yr("\\",!1),Ui=/^[\\$"`]/,Zt=ys(["\\","$",'"',"`"],!1,!1),Ri=function(L){return L},Zn="\\a",Oa=yr("\\a",!1),$t=function(){return"a"},fc="\\b",du=yr("\\b",!1),pc=function(){return"\b"},El=/^[Ee]/,SA=ys(["E","e"],!1,!1),mu=function(){return"\x1B"},Ce="\\f",Rt=yr("\\f",!1),hc=function(){return"\f"},_i="\\n",yu=yr("\\n",!1),qt=function(){return`
|
||||||
|
`},Cl="\\r",xA=yr("\\r",!1),cp=function(){return"\r"},gc="\\t",PA=yr("\\t",!1),Dn=function(){return" "},ui="\\v",dc=yr("\\v",!1),bA=function(){return"\v"},ta=/^[\\'"?]/,Hi=ys(["\\","'",'"',"?"],!1,!1),No=function(L){return String.fromCharCode(parseInt(L,16))},$e="\\x",so=yr("\\x",!1),Il="\\u",Eu=yr("\\u",!1),qi="\\U",Cu=yr("\\U",!1),QA=function(L){return String.fromCodePoint(parseInt(L,16))},Ma=/^[0-7]/,mc=ys([["0","7"]],!1,!1),ds=/^[0-9a-fA-f]/,Ot=ys([["0","9"],["a","f"],["A","f"]],!1,!1),Sn=ig(),di="{}",ra=yr("{}",!1),oo=function(){return"{}"},Rs="-",na=yr("-",!1),ia="+",Oo=yr("+",!1),Zi=".",Ts=yr(".",!1),Ls=function(L,K,te){return{type:"number",value:(L==="-"?-1:1)*parseFloat(K.join("")+"."+te.join(""))}},Ns=function(L,K){return{type:"number",value:(L==="-"?-1:1)*parseInt(K.join(""))}},ao=function(L){return{type:"variable",...L}},Wn=function(L){return{type:"variable",name:L}},qn=function(L){return L},$i="*",es=yr("*",!1),mi="/",Ua=yr("/",!1),sa=function(L,K,te){return{type:K==="*"?"multiplication":"division",right:te}},ee=function(L,K){return K.reduce((te,ue)=>({left:te,...ue}),L)},we=function(L,K,te){return{type:K==="+"?"addition":"subtraction",right:te}},qe="$((",Be=yr("$((",!1),Pe="))",Je=yr("))",!1),vt=function(L){return L},tr="$(",Zr=yr("$(",!1),Tn=function(L){return L},_r="${",$n=yr("${",!1),Ti=":-",Yn=yr(":-",!1),Ha=function(L,K){return{name:L,defaultValue:K}},oa=":-}",yi=yr(":-}",!1),aa=function(L){return{name:L,defaultValue:[]}},qa=":+",lo=yr(":+",!1),kA=function(L,K){return{name:L,alternativeValue:K}},yc=":+}",la=yr(":+}",!1),eg=function(L){return{name:L,alternativeValue:[]}},Ec=function(L){return{name:L}},Dm="$",tg=yr("$",!1),Kn=function(L){return e.isGlobPattern(L)},up=function(L){return L},rg=/^[a-zA-Z0-9_]/,FA=ys([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Os=function(){return ng()},Iu=/^[$@*?#a-zA-Z0-9_\-]/,ja=ys(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),ji=/^[()}<>$|&; \t"']/,ca=ys(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),wu=/^[<>&; \t"']/,ms=ys(["<",">","&",";"," "," ",'"',"'"],!1,!1),Cc=/^[ \t]/,Ic=ys([" "," "],!1,!1),G=0,Dt=0,wl=[{line:1,column:1}],Si=0,wc=[],lt=0,Bu;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function ng(){return t.substring(Dt,G)}function oI(){return Bc(Dt,G)}function RA(L,K){throw K=K!==void 0?K:Bc(Dt,G),ag([og(L)],t.substring(Dt,G),K)}function Ap(L,K){throw K=K!==void 0?K:Bc(Dt,G),Sm(L,K)}function yr(L,K){return{type:"literal",text:L,ignoreCase:K}}function ys(L,K,te){return{type:"class",parts:L,inverted:K,ignoreCase:te}}function ig(){return{type:"any"}}function sg(){return{type:"end"}}function og(L){return{type:"other",description:L}}function fp(L){var K=wl[L],te;if(K)return K;for(te=L-1;!wl[te];)te--;for(K=wl[te],K={line:K.line,column:K.column};te<L;)t.charCodeAt(te)===10?(K.line++,K.column=1):K.column++,te++;return wl[L]=K,K}function Bc(L,K){var te=fp(L),ue=fp(K);return{start:{offset:L,line:te.line,column:te.column},end:{offset:K,line:ue.line,column:ue.column}}}function mt(L){G<Si||(G>Si&&(Si=G,wc=[]),wc.push(L))}function Sm(L,K){return new Mg(L,null,null,K)}function ag(L,K,te){return new Mg(Mg.buildMessage(L,K),L,K,te)}function lg(){var L,K,te;for(L=G,K=[],te=kt();te!==r;)K.push(te),te=kt();return K!==r?(te=vu(),te===r&&(te=null),te!==r?(Dt=L,K=n(te),L=K):(G=L,L=r)):(G=L,L=r),L}function vu(){var L,K,te,ue,ze;if(L=G,K=Du(),K!==r){for(te=[],ue=kt();ue!==r;)te.push(ue),ue=kt();te!==r?(ue=cg(),ue!==r?(ze=xm(),ze===r&&(ze=null),ze!==r?(Dt=L,K=u(K,ue,ze),L=K):(G=L,L=r)):(G=L,L=r)):(G=L,L=r)}else G=L,L=r;if(L===r)if(L=G,K=Du(),K!==r){for(te=[],ue=kt();ue!==r;)te.push(ue),ue=kt();te!==r?(ue=cg(),ue===r&&(ue=null),ue!==r?(Dt=L,K=A(K,ue),L=K):(G=L,L=r)):(G=L,L=r)}else G=L,L=r;return L}function xm(){var L,K,te,ue,ze;for(L=G,K=[],te=kt();te!==r;)K.push(te),te=kt();if(K!==r)if(te=vu(),te!==r){for(ue=[],ze=kt();ze!==r;)ue.push(ze),ze=kt();ue!==r?(Dt=L,K=p(te),L=K):(G=L,L=r)}else G=L,L=r;else G=L,L=r;return L}function cg(){var L;return t.charCodeAt(G)===59?(L=h,G++):(L=r,lt===0&&mt(C)),L===r&&(t.charCodeAt(G)===38?(L=w,G++):(L=r,lt===0&&mt(v))),L}function Du(){var L,K,te;return L=G,K=ua(),K!==r?(te=aI(),te===r&&(te=null),te!==r?(Dt=L,K=b(K,te),L=K):(G=L,L=r)):(G=L,L=r),L}function aI(){var L,K,te,ue,ze,gt,ur;for(L=G,K=[],te=kt();te!==r;)K.push(te),te=kt();if(K!==r)if(te=Pm(),te!==r){for(ue=[],ze=kt();ze!==r;)ue.push(ze),ze=kt();if(ue!==r)if(ze=Du(),ze!==r){for(gt=[],ur=kt();ur!==r;)gt.push(ur),ur=kt();gt!==r?(Dt=L,K=E(te,ze),L=K):(G=L,L=r)}else G=L,L=r;else G=L,L=r}else G=L,L=r;else G=L,L=r;return L}function Pm(){var L;return t.substr(G,2)===R?(L=R,G+=2):(L=r,lt===0&&mt(N)),L===r&&(t.substr(G,2)===_?(L=_,G+=2):(L=r,lt===0&&mt(J))),L}function ua(){var L,K,te;return L=G,K=ug(),K!==r?(te=vc(),te===r&&(te=null),te!==r?(Dt=L,K=re(K,te),L=K):(G=L,L=r)):(G=L,L=r),L}function vc(){var L,K,te,ue,ze,gt,ur;for(L=G,K=[],te=kt();te!==r;)K.push(te),te=kt();if(K!==r)Line truncated
|
||||||
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>r/2-1){o=" ... ",a+=5;break}for(n="",u=this.position;u<this.buffer.length&&`\0\r
|
||||||
|
\x85\u2028\u2029`.indexOf(this.buffer.charAt(u))===-1;)if(u+=1,u-this.position>r/2-1){n=" ... ",u-=5;break}return A=this.buffer.slice(a,u),fY.repeat(" ",e)+o+A+n+`
|
||||||
|
`+fY.repeat(" ",e+this.position-a+o.length)+"^"};pT.prototype.toString=function(e){var r,o="";return this.name&&(o+='in "'+this.name+'" '),o+="at line "+(this.line+1)+", column "+(this.column+1),e||(r=this.getSnippet(),r&&(o+=`:
|
||||||
|
`+r)),o};pY.exports=pT});var as=U((SPt,dY)=>{"use strict";var gY=uy(),M8e=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],U8e=["scalar","sequence","mapping"];function _8e(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(o){e[String(o)]=r})}),e}function H8e(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(M8e.indexOf(r)===-1)throw new gY('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=_8e(e.styleAliases||null),U8e.indexOf(this.kind)===-1)throw new gY('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}dY.exports=H8e});var jg=U((xPt,yY)=>{"use strict";var mY=qg(),DD=uy(),q8e=as();function hT(t,e,r){var o=[];return t.include.forEach(function(a){r=hT(a,e,r)}),t[e].forEach(function(a){r.forEach(function(n,u){n.tag===a.tag&&n.kind===a.kind&&o.push(u)}),r.push(a)}),r.filter(function(a,n){return o.indexOf(n)===-1})}function j8e(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function o(a){t[a.kind][a.tag]=t.fallback[a.tag]=a}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(o);return t}function Ay(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 DD("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=hT(this,"implicit",[]),this.compiledExplicit=hT(this,"explicit",[]),this.compiledTypeMap=j8e(this.compiledImplicit,this.compiledExplicit)}Ay.DEFAULT=null;Ay.create=function(){var e,r;switch(arguments.length){case 1:e=Ay.DEFAULT,r=arguments[0];break;case 2:e=arguments[0],r=arguments[1];break;default:throw new DD("Wrong number of arguments for Schema.create function")}if(e=mY.toArray(e),r=mY.toArray(r),!e.every(function(o){return o instanceof Ay}))throw new DD("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!r.every(function(o){return o instanceof q8e}))throw new DD("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new Ay({include:e,explicit:r})};yY.exports=Ay});var CY=U((PPt,EY)=>{"use strict";var G8e=as();EY.exports=new G8e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var wY=U((bPt,IY)=>{"use strict";var W8e=as();IY.exports=new W8e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var vY=U((QPt,BY)=>{"use strict";var Y8e=as();BY.exports=new Y8e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var SD=U((kPt,DY)=>{"use strict";var K8e=jg();DY.exports=new K8e({explicit:[CY(),wY(),vY()]})});var xY=U((FPt,SY)=>{"use strict";var J8e=as();function V8e(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function z8e(){return null}function X8e(t){return t===null}SY.exports=new J8e("tag:yaml.org,2002:null",{kind:"scalar",resolve:V8e,construct:z8e,predicate:X8e,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var bY=U((RPt,PY)=>{"use strict";var Z8e=as();function $8e(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 eHe(t){return t==="true"||t==="True"||t==="TRUE"}function tHe(t){return Object.prototype.toString.call(t)==="[object Boolean]"}PY.exports=new Z8e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:$8e,construct:eHe,predicate:tHe,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 kY=U((TPt,QY)=>{"use strict";var rHe=qg(),nHe=as();function iHe(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function sHe(t){return 48<=t&&t<=55}function oHe(t){return 48<=t&&t<=57}function aHe(t){if(t===null)return!1;var e=t.length,r=0,o=!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;o=!0}return o&&a!=="_"}if(a==="x"){for(r++;r<e;r++)if(a=t[r],a!=="_"){if(!iHe(t.charCodeAt(r)))return!1;o=!0}return o&&a!=="_"}for(;r<e;r++)if(a=t[r],a!=="_"){if(!sHe(t.charCodeAt(r)))return!1;o=!0}return o&&a!=="_"}if(a==="_")return!1;for(;r<e;r++)if(a=t[r],a!=="_"){if(a===":")break;if(!oHe(t.charCodeAt(r)))return!1;o=!0}return!o||a==="_"?!1:a!==":"?!0:/^(:[0-5]?[0-9])+$/.test(t.slice(r))
Line truncated
|
||||||
|
\r`;function SHe(t){if(t===null)return!1;var e,r,o=0,a=t.length,n=mT;for(r=0;r<a;r++)if(e=n.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;o+=6}return o%8===0}function xHe(t){var e,r,o=t.replace(/[\r\n=]/g,""),a=o.length,n=mT,u=0,A=[];for(e=0;e<a;e++)e%4===0&&e&&(A.push(u>>16&255),A.push(u>>8&255),A.push(u&255)),u=u<<6|n.indexOf(o.charAt(e));return r=a%4*6,r===0?(A.push(u>>16&255),A.push(u>>8&255),A.push(u&255)):r===18?(A.push(u>>10&255),A.push(u>>2&255)):r===12&&A.push(u>>4&255),Gg?Gg.from?Gg.from(A):new Gg(A):A}function PHe(t){var e="",r=0,o,a,n=t.length,u=mT;for(o=0;o<n;o++)o%3===0&&o&&(e+=u[r>>18&63],e+=u[r>>12&63],e+=u[r>>6&63],e+=u[r&63]),r=(r<<8)+t[o];return a=n%3,a===0?(e+=u[r>>18&63],e+=u[r>>12&63],e+=u[r>>6&63],e+=u[r&63]):a===2?(e+=u[r>>10&63],e+=u[r>>4&63],e+=u[r<<2&63],e+=u[64]):a===1&&(e+=u[r>>2&63],e+=u[r<<4&63],e+=u[64],e+=u[64]),e}function bHe(t){return Gg&&Gg.isBuffer(t)}GY.exports=new DHe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:SHe,construct:xHe,predicate:bHe,represent:PHe})});var KY=U((qPt,YY)=>{"use strict";var QHe=as(),kHe=Object.prototype.hasOwnProperty,FHe=Object.prototype.toString;function RHe(t){if(t===null)return!0;var e=[],r,o,a,n,u,A=t;for(r=0,o=A.length;r<o;r+=1){if(a=A[r],u=!1,FHe.call(a)!=="[object Object]")return!1;for(n in a)if(kHe.call(a,n))if(!u)u=!0;else return!1;if(!u)return!1;if(e.indexOf(n)===-1)e.push(n);else return!1}return!0}function THe(t){return t!==null?t:[]}YY.exports=new QHe("tag:yaml.org,2002:omap",{kind:"sequence",resolve:RHe,construct:THe})});var VY=U((jPt,JY)=>{"use strict";var LHe=as(),NHe=Object.prototype.toString;function OHe(t){if(t===null)return!0;var e,r,o,a,n,u=t;for(n=new Array(u.length),e=0,r=u.length;e<r;e+=1){if(o=u[e],NHe.call(o)!=="[object Object]"||(a=Object.keys(o),a.length!==1))return!1;n[e]=[a[0],o[a[0]]]}return!0}function MHe(t){if(t===null)return[];var e,r,o,a,n,u=t;for(n=new Array(u.length),e=0,r=u.length;e<r;e+=1)o=u[e],a=Object.keys(o),n[e]=[a[0],o[a[0]]];return n}JY.exports=new LHe("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:OHe,construct:MHe})});var XY=U((GPt,zY)=>{"use strict";var UHe=as(),_He=Object.prototype.hasOwnProperty;function HHe(t){if(t===null)return!0;var e,r=t;for(e in r)if(_He.call(r,e)&&r[e]!==null)return!1;return!0}function qHe(t){return t!==null?t:{}}zY.exports=new UHe("tag:yaml.org,2002:set",{kind:"mapping",resolve:HHe,construct:qHe})});var fy=U((WPt,ZY)=>{"use strict";var jHe=jg();ZY.exports=new jHe({include:[dT()],implicit:[_Y(),qY()],explicit:[WY(),KY(),VY(),XY()]})});var eK=U((YPt,$Y)=>{"use strict";var GHe=as();function WHe(){return!0}function YHe(){}function KHe(){return""}function JHe(t){return typeof t>"u"}$Y.exports=new GHe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:WHe,construct:YHe,predicate:JHe,represent:KHe})});var rK=U((KPt,tK)=>{"use strict";var VHe=as();function zHe(t){if(t===null||t.length===0)return!1;var e=t,r=/\/([gim]*)$/.exec(t),o="";return!(e[0]==="/"&&(r&&(o=r[1]),o.length>3||e[e.length-o.length-1]!=="/"))}function XHe(t){var e=t,r=/\/([gim]*)$/.exec(t),o="";return e[0]==="/"&&(r&&(o=r[1]),e=e.slice(1,e.length-o.length-1)),new RegExp(e,o)}function ZHe(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function $He(t){return Object.prototype.toString.call(t)==="[object RegExp]"}tK.exports=new VHe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:zHe,construct:XHe,predicate:$He,represent:ZHe})});var sK=U((JPt,iK)=>{"use strict";var xD;try{nK=Ie,xD=nK("esprima")}catch{typeof window<"u"&&(xD=window.esprima)}var nK,eqe=as();function tqe(t){if(t===null)return!1;try{var e="("+t+")",r=xD.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 rqe(t){var e="("+t+")",r=xD.parse(e,{range:!0}),o=[],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){o.push(n.name)}),a=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(o,e.slice(a[0]+1,a[1]-1)):new Function(o,"return "+e.slice(a[0],a[1]))}function nqe(t){return t.toString()}function iqe(t){return Object.prototype.toString.call(t)==="[object Function]"}iK.exports=new eqe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:tqe,construct:rqe,predicate:iqe,represent:nqe})});var _I=U((zPt,aK)=>{"use strict";var oK=jg();aK.exports=oK.DEFAULT=new oK({include:[fy()],explicit:[eK(),rK(),sK()]})});var SK=U((XPt,HI)=>{"use strict";var yf=qg(),hK=uy(),sqe=hY(),gK=fy(),oqe=_I(),jp=Object.prototype.hasOwnProperty,PD=1,dK=2,mK=3,bD=4,yT=1,aqe=2,lK=3,lqe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uD
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 hqe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var CK=new Array(256),IK=new Array(256);for(Wg=0;Wg<256;Wg++)CK[Wg]=uK(Wg)?1:0,IK[Wg]=uK(Wg);var Wg;function gqe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||oqe,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 wK(t,e){return new hK(e,new sqe(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function wr(t,e){throw wK(t,e)}function QD(t,e){t.onWarning&&t.onWarning.call(null,wK(t,e))}var AK={YAML:function(e,r,o){var a,n,u;e.version!==null&&wr(e,"duplication of %YAML directive"),o.length!==1&&wr(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),a===null&&wr(e,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),u=parseInt(a[2],10),n!==1&&wr(e,"unacceptable YAML version of the document"),e.version=o[0],e.checkLineBreaks=u<2,u!==1&&u!==2&&QD(e,"unsupported YAML version of the document")},TAG:function(e,r,o){var a,n;o.length!==2&&wr(e,"TAG directive accepts exactly two arguments"),a=o[0],n=o[1],yK.test(a)||wr(e,"ill-formed tag handle (first argument) of the TAG directive"),jp.call(e.tagMap,a)&&wr(e,'there is a previously declared suffix for "'+a+'" tag handle'),EK.test(n)||wr(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[a]=n}};function qp(t,e,r,o){var a,n,u,A;if(e<r){if(A=t.input.slice(e,r),o)for(a=0,n=A.length;a<n;a+=1)u=A.charCodeAt(a),u===9||32<=u&&u<=1114111||wr(t,"expected valid JSON character");else lqe.test(A)&&wr(t,"the stream contains non-printable characters");t.result+=A}}function fK(t,e,r,o){var a,n,u,A;for(yf.isObject(r)||wr(t,"cannot merge mappings; the provided source object is unacceptable"),a=Object.keys(r),u=0,A=a.length;u<A;u+=1)n=a[u],jp.call(e,n)||(e[n]=r[n],o[n]=!0)}function hy(t,e,r,o,a,n,u,A){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])&&wr(t,"nested arrays are not supported inside keys"),typeof a=="object"&&cK(a[p])==="[object Object]"&&(a[p]="[object Object]");if(typeof a=="object"&&cK(a)==="[object Object]"&&(a="[object Object]"),a=String(a),e===null&&(e={}),o==="tag:yaml.org,2002:merge")if(Array.isArray(n))for(p=0,h=n.length;p<h;p+=1)fK(t,e,n[p],r);else fK(t,e,n,r);else!t.json&&!jp.call(r,a)&&jp.call(e,a)&&(t.line=u||t.line,t.position=A||t.position,wr(t,"duplicated mapping key")),e[a]=n,delete r[a];return e}function ET(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++):wr(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function Wi(t,e,r){for(var o=0,a=t.input.charCodeAt(t.position);a!==0;){for(;Yg(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(Wu(a))for(ET(t),a=t.input.charCodeAt(t.position),o++,t.lineIndent=0;a===32;)t.lineIndent++,a=t.input.charCodeAt(++t.position);else break}return r!==-1&&o!==0&&t.lineIndent<r&&QD(t,"deficient indentation"),o}function kD(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||Ca(r)))}function CT(t,e){e===1?t.result+=" ":e>1&&(t.result+=yf.repeat(`
|
||||||
|
`,e-1))}function dqe(t,e,r){var o,a,n,u,A,p,h,C,w=t.kind,v=t.result,b;if(b=t.input.charCodeAt(t.position),Ca(b)||py(b)||b===35||b===38||b===42||b===33||b===124||b===62||b===39||b===34||b===37||b===64||b===96||(b===63||b===45)&&(a=t.input.charCodeAt(t.position+1),Ca(a)||r&&py(a)))return!1;for(t.kind="scalar",t.result="",n=u=t.position,A=!1;b!==0;){if(b===58){if(a=t.input.charCodeAt(t.position+1),Ca(a)||r&&py(a))break}else if(b===35){if(o=t.input.charCodeAt(t.position-1),Ca(o))break}else{if(t.position===t.lineStart&&kD(t)||r&&py(b))break;if(Wu(b))if(p=t.line,h=t.lineStart,C=t.lineIndent,Wi(t,!1,-1),t.lineIndent>=e){A=!0,b=t.input.charCodeAt(t.position);continue}else{t.position=u,t.line=p,t.lineStart=h,t.lineIndent=C;break}}A&&(qp(t,n,u,!1),CT(t,t.line-p),n=u=t.position,A=!1),Yg(b)||(u=t.position+1),b=t.input.charCodeAt(++t.position)}return qp(t,n,u,!1),t.result?!0:(t.kind=w,t.result=v,!1)}function mqe(t,e){var r,o,a;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,o=a=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(qp(t,o,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)o=t.position,t.position++,a=t.position;else return!0;else Wu(r)?(qp(t,o,a,!0),CT(t,Wi(t,!1,e)),o=a=t.position):t.position===t.lineStart&&kD(t)?wr(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);wr(t,"unexpected end of the stream within a single quoted scalar")}function yqe(t,e){var r,o,a,n,u,A;if(A=t.input.charCodeAt(t.position),A!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=o=t.position;(A=t.input.charCodeAt(t.position))!==0;){if(A===34)return qp(t,r,t.position,!0),t.position++,!0;if(A===92){if(qp(t,r,t.position,!0),A=t.input.charCodeAt(++t.position),Wu(A))Wi(t,!1,e);else if(A<256&&CK[A])t.result+=IK[A],t.position++;else if((u=fqe(A))>0){for(a=u,n=0;a>0;a--)A=t.input.charCodeAt(++t.position),(u=Aqe(A))>=0?n=(n<<4)+u:wr(t,"expected hexadecimal character");t.result+=hqe(n),t.position++}else wr(t,"unknown escape sequence");r=o=t.position}else Wu(A)?(qp(t,r,o,!0),CT(t,Wi(t,!1,e)),r=o=t.position):t.position===t.lineStart&&kD(t)?wr(t,"unexpected end of the document within a double quoted scalar"):(t.position++,o=t.position)}wr(t,"unexpected end of the stream within a double quoted scalar")}function Eqe(t,e){var r=!0,o,a=t.tag,n,u=t.anchor,A,p,h,C,w,v={},b,E,R,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(Wi(t,!0,e),N=t.input.charCodeAt(t.position),N===p)return t.position++,t.tag=a,t.anchor=u,t.kind=w?"mapping":"sequence",t.result=n,!0;r||wr(t,"missed comma between flow collection entries"),E=b=R=null,h=C=!1,N===63&&(A=t.input.charCodeAt(t.position+1),Ca(A)&&(h=C=!0,t.position++,Wi(t,!0,e))),o=t.line,gy(t,e,PD,!1,!0),E=t.tag,b=t.result,Wi(t,!0,e),N=t.input.charCodeAt(t.position),(C||t.line===o)&&N===58&&(h=!0,N=t.input.charCodeAt(++t.position),Wi(t,!0,e),gy(t,e,PD,!1,!0),R=t.result),w?hy(t,n,v,E,b,R):h?n.push(hy(t,null,v,E,b,R)):n.push(b),Wi(t,!0,e),N=t.input.charCodeAt(t.position),N===44?(r=!0,N=t.input.charCodeAt(++t.position)):r=!1}wr(t,"unexpected end of the stream within a flow collection")}function Cqe(t,e){var r,o,a=yT,n=!1,u=!1,A=e,p=0,h=!1,C,w;if(w=t.input.charCodeAt(t.position),w===124)o=!1;else if(w===62)o=!0;else return!1;for(t.kind="scalar",t.result="";w!==0;)if(w=t.input.charCodeAt(++t.position),w===43||w===45)yT===a?a=w===43?lK:aqe:wr(t,"repeat of a chomping mode identifier");else if((C=pqe(w))>=0)C===0?wr(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?wr(t,"repeat of an indentation width identifier"):(A=e+C-1,u=!0);else break;if(Yg(w)){do w=t.input.charCodeAt(++t.position);while(Yg(w));if(w===35)do w=t.input.charCodeAt(++t.position);while(!Wu(w)&&w!==0)}for(;w!==0;){for(ET(t),t.lineIndent=0,w=t.input.charCodeAt(t.position);(!u||t.lineIndent<A)&&w===32;)t.lineIndent++,w=t.input.charCodeAt(++t.position);if(!u&&t.lineIndent>A&&(A=t.lineIndent),Wu(w)){p++;continue}if(t.lineIndent<A){a===lK?t.result+=yf.repeat(`
|
||||||
|
`,n?1+p:p):a===yT&&n&&(t.result+=`
|
||||||
|
`);break}for(o?Yg(w)?(h=!0,t.result+=yf.repeat(`
|
||||||
|
`,n?1+p:p)):h?(h=!1,t.result+=yf.repeat(`
|
||||||
|
`,p+1)):p===0?n&&(t.result+=" "):t.result+=yf.repeat(`
|
||||||
|
`,p):t.result+=yf.repeat(`
|
||||||
|
`,n?1+p:p),n=!0,u=!0,p=0,r=t.position;!Wu(w)&&w!==0;)w=t.input.charCodeAt(++t.position);qp(t,r,t.position,!1)}return!0}function pK(t,e){var r,o=t.tag,a=t.anchor,n=[],u,A=!1,p;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),p=t.input.charCodeAt(t.position);p!==0&&!(p!==45||(u=t.input.charCodeAt(t.position+1),!Ca(u)));){if(A=!0,t.position++,Wi(t,!0,-1)&&t.lineIndent<=e){n.push(null),p=t.input.charCodeAt(t.position);continue}if(r=t.line,gy(t,e,mK,!1,!0),n.push(t.result),Wi(t,!0,-1),p=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&p!==0)wr(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return A?(t.tag=o,t.anchor=a,t.kind="sequence",t.result=n,!0):!1}function Iqe(t,e,r){var o,a,n,u,A=t.tag,p=t.anchor,h={},C={},w=null,v=null,b=null,E=!1,R=!1,N;for(t.anchor!==null&&(t.anchorMap[t.anchor]=h),N=t.input.charCodeAt(t.position);N!==0;){if(o=t.input.charCodeAt(t.position+1),n=t.line,u=t.position,(N===63||N===58)&&Ca(o))N===63?(E&&(hy(t,h,C,w,v,null),w=v=b=null),R=!0,E=!0,a=!0):E?(E=!1,a=!0):wr(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,N=o;else if(gy(t,r,dK,!1,!0))if(t.line===n){for(N=t.input.charCodeAt(t.position);Yg(N);)N=t.input.charCodeAt(++t.position);if(N===58)N=t.input.charCodeAt(++t.position),Ca(N)||wr(t,"a whitespace character is expected after the key-value separator within a block mapping"),E&&(hy(t,h,C,w,v,null),w=v=b=null),R=!0,E=!1,a=!1,w=t.tag,v=t.result;else if(R)wr(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=A,t.anchor=p,!0}else if(R)wr(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=A,t.anchor=p,!0;else break;if((t.line===n||t.lineIndent>e)&&(gy(t,e,bD,!0,a)&&(E?v=t.result:b=t.result),E||(hy(t,h,C,w,v,b,n,u),w=v=b=null),Wi(t,!0,-1),N=t.input.charCodeAt(t.position)),t.lineIndent>e&&N!==0)wr(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return E&&hy(t,h,C,w,v,null),R&&(t.tag=A,t.anchor=p,t.kind="mapping",t.result=h),R}function wqe(t){var e,r=!1,o=!1,a,n,u;if(u=t.input.charCodeAt(t.position),u!==33)return!1;if(t.tag!==null&&wr(t,"duplication of a tag property"),u=t.input.charCodeAt(++t.position),u===60?(r=!0,u=t.input.charCodeAt(++t.position)):u===33?(o=!0,a="!!",u=t.input.charCodeAt(++t.position)):a="!",e=t.position,r){do u=t.input.charCodeAt(++t.position);while(u!==0&&u!==62);t.position<t.length?(n=t.input.slice(e,t.position),u=t.input.charCodeAt(++t.position)):wr(t,"unexpected end of the stream within a verbatim tag")}else{for(;u!==0&&!Ca(u);)u===33&&(o?wr(t,"tag suffix cannot contain exclamation marks"):(a=t.input.slice(e-1,t.position+1),yK.test(a)||wr(t,"named tag handle cannot contain such characters"),o=!0,e=t.position+1)),u=t.input.charCodeAt(++t.position);n=t.input.slice(e,t.position),uqe.test(n)&&wr(t,"tag suffix cannot contain flow indicator characters")}return n&&!EK.test(n)&&wr(t,"tag name cannot contain such characters: "+n),r?t.tag=n:jp.call(t.tagMap,a)?t.tag=t.tagMap[a]+n:a==="!"?t.tag="!"+n:a==="!!"?t.tag="tag:yaml.org,2002:"+n:wr(t,'undeclared tag handle "'+a+'"'),!0}function Bqe(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&wr(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Ca(r)&&!py(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&wr(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function vqe(t){var e,r,o;if(o=t.input.charCodeAt(t.position),o!==42)return!1;for(o=t.input.charCodeAt(++t.position),e=t.position;o!==0&&!Ca(o)&&!py(o);)o=t.input.charCodeAt(++t.position);return t.position===e&&wr(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),jp.call(t.anchorMap,r)||wr(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],Wi(t,!0,-1),!0}function gy(t,e,r,o,a){var n,u,A,p=1,h=!1,C=!1,w,v,b,E,R;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,n=u=A=bD===r||mK===r,o&&Wi(t,!0,-1)&&(h=!0,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)),p===1)for(;wqe(t)||Bqe(t);)Wi(t,!0,-1)?(h=!0,A=n,t.lineIndent>e?p=1:t.lineIndent===e?p=0:t.lineIndent<e&&(p=-1)):A=!1;if(A&&(A=h||a),(p===1||bD===r)&&(PD===r||dK===r?E=e:E=e+1,R=t.position-t.lineStart,p===1?A&&(pK(t,R)||Iqe(t,R,E))||Eqe(t,E)?C=!0:(u&&Cqe(t,E)||mqe(t,E)||yqe(t,E)?C=!0:vqe(t)?(C=!0,(t.tag!==null||t.anchor!==null)&&wr(t,"alias node should not have any properties")):dqe(t,E,PD===r)&&(C=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):p===0&&(C=A&&pK(t,R))),t.tag!==null&&t.tag!=="!")if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&wr(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),w=0,v=t.implicitTypes.length;w<v;w+=1)if(b=t.implicitTypes[w],b.resolve(t.result)){t.result=b.construct(t.result),t.tag=b.tag
Line truncated
|
||||||
|
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new gqe(t,e),o=t.indexOf("\0");for(o!==-1&&(r.position=o,wr(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;)Dqe(r);return r.documents}function vK(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var o=BK(t,r);if(typeof e!="function")return o;for(var a=0,n=o.length;a<n;a+=1)e(o[a])}function DK(t,e){var r=BK(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new hK("expected a single document in the stream, but found more")}}function Sqe(t,e,r){return typeof e=="object"&&e!==null&&typeof r>"u"&&(r=e,e=null),vK(t,e,yf.extend({schema:gK},r))}function xqe(t,e){return DK(t,yf.extend({schema:gK},e))}HI.exports.loadAll=vK;HI.exports.load=DK;HI.exports.safeLoadAll=Sqe;HI.exports.safeLoad=xqe});var VK=U((ZPt,vT)=>{"use strict";var jI=qg(),GI=uy(),Pqe=_I(),bqe=fy(),TK=Object.prototype.toString,LK=Object.prototype.hasOwnProperty,Qqe=9,qI=10,kqe=13,Fqe=32,Rqe=33,Tqe=34,NK=35,Lqe=37,Nqe=38,Oqe=39,Mqe=42,OK=44,Uqe=45,MK=58,_qe=61,Hqe=62,qqe=63,jqe=64,UK=91,_K=93,Gqe=96,HK=123,Wqe=124,qK=125,wo={};wo[0]="\\0";wo[7]="\\a";wo[8]="\\b";wo[9]="\\t";wo[10]="\\n";wo[11]="\\v";wo[12]="\\f";wo[13]="\\r";wo[27]="\\e";wo[34]='\\"';wo[92]="\\\\";wo[133]="\\N";wo[160]="\\_";wo[8232]="\\L";wo[8233]="\\P";var Yqe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Kqe(t,e){var r,o,a,n,u,A,p;if(e===null)return{};for(r={},o=Object.keys(e),a=0,n=o.length;a<n;a+=1)u=o[a],A=String(e[u]),u.slice(0,2)==="!!"&&(u="tag:yaml.org,2002:"+u.slice(2)),p=t.compiledTypeMap.fallback[u],p&&LK.call(p.styleAliases,A)&&(A=p.styleAliases[A]),r[u]=A;return r}function xK(t){var e,r,o;if(e=t.toString(16).toUpperCase(),t<=255)r="x",o=2;else if(t<=65535)r="u",o=4;else if(t<=4294967295)r="U",o=8;else throw new GI("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+jI.repeat("0",o-e.length)+e}function Jqe(t){this.schema=t.schema||Pqe,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=jI.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=Kqe(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 PK(t,e){for(var r=jI.repeat(" ",e),o=0,a=-1,n="",u,A=t.length;o<A;)a=t.indexOf(`
|
||||||
|
`,o),a===-1?(u=t.slice(o),o=A):(u=t.slice(o,a+1),o=a+1),u.length&&u!==`
|
||||||
|
`&&(n+=r),n+=u;return n}function IT(t,e){return`
|
||||||
|
`+jI.repeat(" ",t.indent*e)}function Vqe(t,e){var r,o,a;for(r=0,o=t.implicitTypes.length;r<o;r+=1)if(a=t.implicitTypes[r],a.resolve(e))return!0;return!1}function BT(t){return t===Fqe||t===Qqe}function dy(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 zqe(t){return dy(t)&&!BT(t)&&t!==65279&&t!==kqe&&t!==qI}function bK(t,e){return dy(t)&&t!==65279&&t!==OK&&t!==UK&&t!==_K&&t!==HK&&t!==qK&&t!==MK&&(t!==NK||e&&zqe(e))}function Xqe(t){return dy(t)&&t!==65279&&!BT(t)&&t!==Uqe&&t!==qqe&&t!==MK&&t!==OK&&t!==UK&&t!==_K&&t!==HK&&t!==qK&&t!==NK&&t!==Nqe&&t!==Mqe&&t!==Rqe&&t!==Wqe&&t!==_qe&&t!==Hqe&&t!==Oqe&&t!==Tqe&&t!==Lqe&&t!==jqe&&t!==Gqe}function jK(t){var e=/^\n* /;return e.test(t)}var GK=1,WK=2,YK=3,KK=4,FD=5;function Zqe(t,e,r,o,a){var n,u,A,p=!1,h=!1,C=o!==-1,w=-1,v=Xqe(t.charCodeAt(0))&&!BT(t.charCodeAt(t.length-1));if(e)for(n=0;n<t.length;n++){if(u=t.charCodeAt(n),!dy(u))return FD;A=n>0?t.charCodeAt(n-1):null,v=v&&bK(u,A)}else{for(n=0;n<t.length;n++){if(u=t.charCodeAt(n),u===qI)p=!0,C&&(h=h||n-w-1>o&&t[w+1]!==" ",w=n);else if(!dy(u))return FD;A=n>0?t.charCodeAt(n-1):null,v=v&&bK(u,A)}h=h||C&&n-w-1>o&&t[w+1]!==" "}return!p&&!h?v&&!a(t)?GK:WK:r>9&&jK(t)?FD:h?KK:YK}function $qe(t,e,r,o){t.dump=function(){if(e.length===0)return"''";if(!t.noCompatMode&&Yqe.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),u=o||t.flowLevel>-1&&r>=t.flowLevel;function A(p){return Vqe(t,p)}switch(Zqe(e,u,t.indent,n,A)){case GK:return e;case WK:return"'"+e.replace(/'/g,"''")+"'";case YK:return"|"+QK(e,t.indent)+kK(PK(e,a));case KK:return">"+QK(e,t.indent)+kK(PK(e6e(e,n),a));case FD:return'"'+t6e(e,n)+'"';default:throw new GI("impossible error: invalid scalar style")}}()}function QK(t,e){var r=jK(t)?String(e):"",o=t[t.length-1]===`
|
||||||
|
`,a=o&&(t[t.length-2]===`
|
||||||
|
`||t===`
|
||||||
|
`),n=a?"+":o?"":"-";return r+n+`
|
||||||
|
`}function kK(t){return t[t.length-1]===`
|
||||||
|
`?t.slice(0,-1):t}function e6e(t,e){for(var r=/(\n+)([^\n]*)/g,o=function(){var h=t.indexOf(`
|
||||||
|
`);return h=h!==-1?h:t.length,r.lastIndex=h,FK(t.slice(0,h),e)}(),a=t[0]===`
|
||||||
|
`||t[0]===" ",n,u;u=r.exec(t);){var A=u[1],p=u[2];n=p[0]===" ",o+=A+(!a&&!n&&p!==""?`
|
||||||
|
`:"")+FK(p,e),a=n}return o}function FK(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,o,a=0,n,u=0,A=0,p="";o=r.exec(t);)A=o.index,A-a>e&&(n=u>a?u:A,p+=`
|
||||||
|
`+t.slice(a,n),a=n+1),u=A;return p+=`
|
||||||
|
`,t.length-a>e&&u>a?p+=t.slice(a,u)+`
|
||||||
|
`+t.slice(u+1):p+=t.slice(a),p.slice(1)}function t6e(t){for(var e="",r,o,a,n=0;n<t.length;n++){if(r=t.charCodeAt(n),r>=55296&&r<=56319&&(o=t.charCodeAt(n+1),o>=56320&&o<=57343)){e+=xK((r-55296)*1024+o-56320+65536),n++;continue}a=wo[r],e+=!a&&dy(r)?t[n]:a||xK(r)}return e}function r6e(t,e,r){var o="",a=t.tag,n,u;for(n=0,u=r.length;n<u;n+=1)Kg(t,e,r[n],!1,!1)&&(n!==0&&(o+=","+(t.condenseFlow?"":" ")),o+=t.dump);t.tag=a,t.dump="["+o+"]"}function n6e(t,e,r,o){var a="",n=t.tag,u,A;for(u=0,A=r.length;u<A;u+=1)Kg(t,e+1,r[u],!0,!0)&&((!o||u!==0)&&(a+=IT(t,e)),t.dump&&qI===t.dump.charCodeAt(0)?a+="-":a+="- ",a+=t.dump);t.tag=n,t.dump=a||"[]"}function i6e(t,e,r){var o="",a=t.tag,n=Object.keys(r),u,A,p,h,C;for(u=0,A=n.length;u<A;u+=1)C="",u!==0&&(C+=", "),t.condenseFlow&&(C+='"'),p=n[u],h=r[p],Kg(t,e,p,!1,!1)&&(t.dump.length>1024&&(C+="? "),C+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Kg(t,e,h,!1,!1)&&(C+=t.dump,o+=C));t.tag=a,t.dump="{"+o+"}"}function s6e(t,e,r,o){var a="",n=t.tag,u=Object.keys(r),A,p,h,C,w,v;if(t.sortKeys===!0)u.sort();else if(typeof t.sortKeys=="function")u.sort(t.sortKeys);else if(t.sortKeys)throw new GI("sortKeys must be a boolean or a function");for(A=0,p=u.length;A<p;A+=1)v="",(!o||A!==0)&&(v+=IT(t,e)),h=u[A],C=r[h],Kg(t,e+1,h,!0,!0,!0)&&(w=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,w&&(t.dump&&qI===t.dump.charCodeAt(0)?v+="?":v+="? "),v+=t.dump,w&&(v+=IT(t,e)),Kg(t,e+1,C,!0,w)&&(t.dump&&qI===t.dump.charCodeAt(0)?v+=":":v+=": ",v+=t.dump,a+=v));t.tag=n,t.dump=a||"{}"}function RK(t,e,r){var o,a,n,u,A,p;for(a=r?t.explicitTypes:t.implicitTypes,n=0,u=a.length;n<u;n+=1)if(A=a[n],(A.instanceOf||A.predicate)&&(!A.instanceOf||typeof e=="object"&&e instanceof A.instanceOf)&&(!A.predicate||A.predicate(e))){if(t.tag=r?A.tag:"?",A.represent){if(p=t.styleMap[A.tag]||A.defaultStyle,TK.call(A.represent)==="[object Function]")o=A.represent(e,p);else if(LK.call(A.represent,p))o=A.represent[p](e,p);else throw new GI("!<"+A.tag+'> tag resolver accepts not "'+p+'" style');t.dump=o}return!0}return!1}function Kg(t,e,r,o,a,n){t.tag=null,t.dump=r,RK(t,r,!1)||RK(t,r,!0);var u=TK.call(t.dump);o&&(o=t.flowLevel<0||t.flowLevel>e);var A=u==="[object Object]"||u==="[object Array]",p,h;if(A&&(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(A&&h&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),u==="[object Object]")o&&Object.keys(t.dump).length!==0?(s6e(t,e,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(i6e(t,e,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump));else if(u==="[object Array]"){var C=t.noArrayIndent&&e>0?e-1:e;o&&t.dump.length!==0?(n6e(t,C,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(r6e(t,C,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump))}else if(u==="[object String]")t.tag!=="?"&&$qe(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new GI("unacceptable kind of an object to dump "+u)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function o6e(t,e){var r=[],o=[],a,n;for(wT(t,r,o),a=0,n=o.length;a<n;a+=1)e.duplicates.push(r[o[a]]);e.usedDuplicates=new Array(n)}function wT(t,e,r){var o,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)wT(t[a],e,r);else for(o=Object.keys(t),a=0,n=o.length;a<n;a+=1)wT(t[o[a]],e,r)}function JK(t,e){e=e||{};var r=new Jqe(e);return r.noRefs||o6e(t,r),Kg(r,0,t,!0,!0)?r.dump+`
|
||||||
|
`:""}function a6e(t,e){return JK(t,jI.extend({schema:bqe},e))}vT.exports.dump=JK;vT.exports.safeDump=a6e});var XK=U(($Pt,xi)=>{"use strict";var RD=SK(),zK=VK();function TD(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}xi.exports.Type=as();xi.exports.Schema=jg();xi.exports.FAILSAFE_SCHEMA=SD();xi.exports.JSON_SCHEMA=gT();xi.exports.CORE_SCHEMA=dT();xi.exports.DEFAULT_SAFE_SCHEMA=fy();xi.exports.DEFAULT_FULL_SCHEMA=_I();xi.exports.load=RD.load;xi.exports.loadAll=RD.loadAll;xi.exports.safeLoad=RD.safeLoad;xi.exports.safeLoadAll=RD.safeLoadAll;xi.exports.dump=zK.dump;xi.exports.safeDump=zK.safeDump;xi.exports.YAMLException=uy();xi.exports.MINIMAL_SCHEMA=SD();xi.exports.SAFE_SCHEMA=fy();xi.exports.DEFAULT_SCHEMA=_I();xi.exports.scan=TD("scan");xi.exports.parse=TD("parse");xi.exports.compose=TD("compose");xi.exports.addConstructor=TD("addConstructor")});var $K=U((ebt,ZK)=>{"use strict";var l6e=XK();ZK.exports=l6e});var tJ=U((tbt,eJ)=>{"use strict";function c6e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Jg(t,e,r,o){this.message=t,this.expected=e,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Jg)}c6e(Jg,Error);Jg.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var C="",w;for(w=0;w<h.parts.length;w++)C+=h.parts[w]instanceof Array?n(h.parts[w][0])+"-"+n(h.parts[w][1]):n(h.parts[w]);return"["+(h.inverted?"^":"")+C+"]"},any:function(h){return"any character"},end:function(h){return"end of input"},other:function(h){return h.description}};function o(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(C){return"\\x0"+o(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+o(C)})}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(C){return"\\x0"+o(C)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(C){return"\\x"+o(C)})}function u(h){return r[h.type](h)}function A(h){var C=new Array(h.length),w,v;for(w=0;w<h.length;w++)C[w]=u(h[w]);if(C.sort(),C.length>0){for(w=1,v=1;w<C.length;w++)C[w-1]!==C[w]&&(C[v]=C[w],v++);C.length=v}switch(C.length){case 1:return C[0];case 2:return C[0]+" or "+C[1];default:return C.slice(0,-1).join(", ")+", or "+C[C.length-1]}}function p(h){return h?'"'+a(h)+'"':"end of input"}return"Expected "+A(t)+" but "+p(e)+" found."};function u6e(t,e){e=e!==void 0?e:{};var r={},o={Start:Eu},a=Eu,n=function(ee){return[].concat(...ee)},u="-",A=Dn("-",!1),p=function(ee){return ee},h=function(ee){return Object.assign({},...ee)},C="#",w=Dn("#",!1),v=dc(),b=function(){return{}},E=":",R=Dn(":",!1),N=function(ee,we){return{[ee]:we}},_=",",J=Dn(",",!1),re=function(ee,we){return we},oe=function(ee,we,qe){return Object.assign({},...[ee].concat(we).map(Be=>({[Be]:qe})))},pe=function(ee){return ee},he=function(ee){return ee},ve=ta("correct indentation"),ge=" ",le=Dn(" ",!1),xe=function(ee){return ee.length===sa*Ua},g=function(ee){return ee.length===(sa+1)*Ua},De=function(){return sa++,!0},Ee=function(){return sa--,!0},de=function(){return xA()},ne=ta("pseudostring"),Z=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,me=ui(["\r",`
|
||||||
|
`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),be=/^[^\r\n\t ,\][{}:#"']/,ut=ui(["\r",`
|
||||||
|
`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),H=function(){return xA().replace(/^ *| *$/g,"")},yt="--",Me=Dn("--",!1),Te=/^[a-zA-Z\/0-9]/,Qe=ui([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),Ue=/^[^\r\n\t :,]/,je=ui(["\r",`
|
||||||
|
`," "," ",":",","],!0,!1),At="null",Ne=Dn("null",!1),P=function(){return null},I="true",x=Dn("true",!1),y=function(){return!0},F="false",z=Dn("false",!1),X=function(){return!1},$=ta("string"),ie='"',ke=Dn('"',!1),Le=function(){return""},st=function(ee){return ee},ht=function(ee){return ee.join("")},Ut=/^[^"\\\0-\x1F\x7F]/,Xt=ui(['"',"\\",["\0",""],"\x7F"],!0,!1),xt='\\"',tn=Dn('\\"',!1),Dr=function(){return'"'},fr="\\\\",Br=Dn("\\\\",!1),jr=function(){return"\\"},Hn="\\/",bs=Dn("\\/",!1),ki=function(){return"/"},gs="\\b",to=Dn("\\b",!1),Di=function(){return"\b"},Qs="\\f",ro=Dn("\\f",!1),Ac=function(){return"\f"},gu="\\n",ap=Dn("\\n",!1),lp=function(){return`
|
||||||
|
`},ks="\\r",Cn=Dn("\\r",!1),no=function(){return"\r"},Fs="\\t",ml=Dn("\\t",!1),yl=function(){return" "},io="\\u",_e=Dn("\\u",!1),Fn=function(ee,we,qe,Be){return String.fromCharCode(parseInt(`0x${ee}${we}${qe}${Be}`))},Fi=/^[0-9a-fA-F]/,Rn=ui([["0","9"],["a","f"],["A","F"]],!1,!1),Ui=ta("blank space"),Zt=/^[ \t]/,Ri=ui([" "," "],!1,!1),Zn=ta("white space"),Oa=/^[ \t\n\r]/,$t=ui([" "," ",`
|
||||||
|
`,"\r"],!1,!1),fc=`\r
|
||||||
|
`,du=Dn(`\r
|
||||||
|
`,!1),pc=`
|
||||||
|
`,El=Dn(`
|
||||||
|
`,!1),SA="\r",mu=Dn("\r",!1),Ce=0,Rt=0,hc=[{line:1,column:1}],_i=0,yu=[],qt=0,Cl;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function xA(){return t.substring(Rt,Ce)}function cp(){return No(Rt,Ce)}function gc(ee,we){throw we=we!==void 0?we:No(Rt,Ce),Il([ta(ee)],t.substring(Rt,Ce),we)}function PA(ee,we){throw we=we!==void 0?we:No(Rt,Ce),so(ee,we)}function Dn(ee,we){return{type:"literal",text:ee,ignoreCase:we}}function ui(ee,we,qe){return{type:"class",parts:ee,inverted:we,ignoreCase:qe}}function dc(){return{type:"any"}}function bA(){return{type:"end"}}function ta(ee){return{type:"other",description:ee}}function Hi(ee){var we=hc[ee],qe;if(we)return we;for(qe=ee-1;!hc[qe];)qe--;for(we=hc[qe],we={line:we.line,column:we.column};qe<ee;)t.charCodeAt(qe)===10?(we.line++,we.column=1):we.column++,qe++;return hc[ee]=we,we}function No(ee,we){var qe=Hi(ee),Be=Hi(we);return{start:{offset:ee,line:qe.line,column:qe.column},end:{offset:we,line:Be.line,column:Be.column}}}function $e(ee){Ce<_i||(Ce>_i&&(_i=Ce,yu=[]),yu.push(ee))}function so(ee,we){return new Jg(ee,null,null,we)}function Il(ee,we,qe){return new Jg(Jg.buildMessage(ee,we),ee,we,qe)}function Eu(){var ee;return ee=QA(),ee}function qi(){var ee,we,qe;for(ee=Ce,we=[],qe=Cu();qe!==r;)we.push(qe),qe=Cu();return we!==r&&(Rt=ee,we=n(we)),ee=we,ee}function Cu(){var ee,we,qe,Be,Pe;return ee=Ce,we=ds(),we!==r?(t.charCodeAt(Ce)===45?(qe=u,Ce++):(qe=r,qt===0&&$e(A)),qe!==r?(Be=qn(),Be!==r?(Pe=mc(),Pe!==r?(Rt=ee,we=p(Pe),ee=we):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r),ee}function QA(){var ee,we,qe;for(ee=Ce,we=[],qe=Ma();qe!==r;)we.push(qe),qe=Ma();return we!==r&&(Rt=ee,we=h(we)),ee=we,ee}function Ma(){var ee,we,qe,Be,Pe,Je,vt,tr,Zr;if(ee=Ce,we=qn(),we===r&&(we=null),we!==r){if(qe=Ce,t.charCodeAt(Ce)===35?(Be=C,Ce++):(Be=r,qt===0&&$e(w)),Be!==r){if(Pe=[],Je=Ce,vt=Ce,qt++,tr=mi(),qt--,tr===r?vt=void 0:(Ce=vt,vt=r),vt!==r?(t.length>Ce?(tr=t.charAt(Ce),Ce++):(tr=r,qt===0&&$e(v)),tr!==r?(vt=[vt,tr],Je=vt):(Ce=Je,Je=r)):(Ce=Je,Je=r),Je!==r)for(;Je!==r;)Pe.push(Je),Je=Ce,vt=Ce,qt++,tr=mi(),qt--,tr===r?vt=void 0:(Ce=vt,vt=r),vt!==r?(t.length>Ce?(tr=t.charAt(Ce),Ce++):(tr=r,qt===0&&$e(v)),tr!==r?(vt=[vt,tr],Je=vt):(Ce=Je,Je=r)):(Ce=Je,Je=r);else Pe=r;Pe!==r?(Be=[Be,Pe],qe=Be):(Ce=qe,qe=r)}else Ce=qe,qe=r;if(qe===r&&(qe=null),qe!==r){if(Be=[],Pe=es(),Pe!==r)for(;Pe!==r;)Be.push(Pe),Pe=es();else Be=r;Be!==r?(Rt=ee,we=b(),ee=we):(Ce=ee,ee=r)}else Ce=ee,ee=r}else Ce=ee,ee=r;if(ee===r&&(ee=Ce,we=ds(),we!==r?(qe=ra(),qe!==r?(Be=qn(),Be===r&&(Be=null),Be!==r?(t.charCodeAt(Ce)===58?(Pe=E,Ce++):(Pe=r,qt===0&&$e(R)),Pe!==r?(Je=qn(),Je===r&&(Je=null),Je!==r?(vt=mc(),vt!==r?(Rt=ee,we=N(qe,vt),ee=we):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r),ee===r&&(ee=Ce,we=ds(),we!==r?(qe=oo(),qe!==r?(Be=qn(),Be===r&&(Be=null),Be!==r?(t.charCodeAt(Ce)===58?(Pe=E,Ce++):(Pe=r,qt===0&&$e(R)),Pe!==r?(Je=qn(),Je===r&&(Je=null),Je!==r?(vt=mc(),vt!==r?(Rt=ee,we=N(qe,vt),ee=we):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r),ee===r))){if(ee=Ce,we=ds(),we!==r)if(qe=oo(),qe!==r)if(Be=qn(),Be!==r)if(Pe=na(),Pe!==r){if(Je=[],vt=es(),vt!==r)for(;vt!==r;)Je.push(vt),vt=es();else Je=r;Je!==r?(Rt=ee,we=N(qe,Pe),ee=we):(Ce=ee,ee=r)}else Ce=ee,ee=r;else Ce=ee,ee=r;else Ce=ee,ee=r;else Ce=ee,ee=r;if(ee===r)if(ee=Ce,we=ds(),we!==r)if(qe=oo(),qe!==r){if(Be=[],Pe=Ce,Je=qn(),Je===r&&(Je=null),Je!==r?(t.charCodeAt(Ce)===44?(vt=_,Ce++):(vt=r,qt===0&&$e(J)),vt!==r?(tr=qn(),tr===r&&(tr=null),tr!==r?(Zr=oo(),Zr!==r?(Rt=Pe,Je=re(qe,Zr),Pe=Je):(Ce=Pe,Pe=r)):(Ce=Pe,Pe=r)):(Ce=Pe,Pe=r)):(Ce=Pe,Pe=r),Pe!==r)for(;Pe!==r;)Be.push(Pe),Pe=Ce,Je=qn(),Je===r&&(Je=null),Je!==r?(t.charCodeAt(Ce)===44?(vt=_,Ce++):(vt=r,qt===0&&$e(J)),vt!==r?(tr=qn(),tr===r&&(tr=null),tr!==r?(Zr=oo(),Zr!==r?(Rt=Pe,Je=re(qe,Zr),Pe=Je):(Ce=Pe,Pe=r)):(Ce=Pe,Pe=r)):(Ce=Pe,Pe=r)):(Ce=Pe,Pe=r);else Be=r;Be!==r?(Pe=qn(),Pe===r&&(Pe=null),Pe!==r?(t.charCodeAt(Ce)===58?(Je=E,Ce++):(Je=r,qt===0&&$e(R)),Je!==r?(vt=qn(),vt===r&&(vt=null),vt!==r?(tr=mc(),tr!==r?(Rt=ee,we=oe(qe,Be,tr),ee=we):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)}else Ce=ee,ee=r;else Ce=ee,ee=r}return ee}function mc(){var ee,we,qe,Be,Pe,Je,vt;if(ee=Ce,we=Ce,qt++,qe=Ce,Be=mi(),Be!==r?(Pe=Ot(),Pe!==r?(t.charCodeAt(Ce)===45?(Je=u,Ce++):(Je=r,qt===0&&$e(A)),Je!==r?(vt=qn(),vt!==r?(Be=[Be,Pe,Je,vt],qe=Be):(Ce=qe,qe=r)):(Ce=qe,qe=r)):(Ce=qe,qe=r)):(Ce=qe,qe=r),qt--,qe!==r?(Ce=we,we=void 0):we=r,we!==r?(qe=es(),qe!==r?(Be=Sn(),Be!==r?(Pe=qi(),Pe!==r?(Je=di(),Je!==r?(Rt=ee,we=pe(Pe),ee=we):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r),ee===r&&(ee=Ce,we=mi(),we!==r?(qe=Sn(),qe!==r?(Be=QA(),Be!==r?(Pe=di(),Pe!==r?(Rt=ee,we=pe(Be),ee=we):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r)):(Ce=ee,ee=r),ee===r))if(ee=Ce,we=Rs(),we!==r){if(qe=[],Be=es(),Be!==r)for(;Be!==r;)qe.push(Be),Be=es();else qe=r;qe!==r?(Rt=ee,weLine truncated
|
||||||
|
`;if(typeof t=="number"||typeof t=="boolean")return`${t.toString()}
|
||||||
|
`;if(typeof t=="string")return`${nJ(t)}
|
||||||
|
`;if(Array.isArray(t)){if(t.length===0)return`[]
|
||||||
|
`;let o=" ".repeat(e);return`
|
||||||
|
${t.map(n=>`${o}- ${DT(n,e+1,!1)}`).join("")}`}if(typeof t=="object"&&t){let[o,a]=t instanceof LD?[t.data,!1]:[t,!0],n=" ".repeat(e),u=Object.keys(o);a&&u.sort((p,h)=>{let C=rJ.indexOf(p),w=rJ.indexOf(h);return C===-1&&w===-1?p<h?-1:p>h?1:0:C!==-1&&w===-1?-1:C===-1&&w!==-1?1:C-w});let A=u.filter(p=>!sJ(o[p])).map((p,h)=>{let C=o[p],w=nJ(p),v=DT(C,e+1,!0),b=h>0||r?n:"",E=w.length>1024?`? ${w}
|
||||||
|
${b}:`:`${w}:`,R=v.startsWith(`
|
||||||
|
`)?v:` ${v}`;return`${b}${E}${R}`}).join(e===0?`
|
||||||
|
`:"")||`
|
||||||
|
`;return r?`
|
||||||
|
${A}`:`${A}`}throw new Error(`Unsupported value type (${t})`)}function Ia(t){try{let e=DT(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 f6e(t){return t.endsWith(`
|
||||||
|
`)||(t+=`
|
||||||
|
`),(0,iJ.parse)(t)}function h6e(t){if(p6e.test(t))return f6e(t);let e=(0,ND.safeLoad)(t,{schema:ND.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 Yi(t){return h6e(t)}var ND,iJ,A6e,rJ,LD,p6e,oJ=dt(()=>{ND=tt($K()),iJ=tt(tJ()),A6e=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,rJ=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],LD=class{constructor(e){this.data=e}};Ia.PreserveOrdering=LD;p6e=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i});var WI={};Yt(WI,{parseResolution:()=>BD,parseShell:()=>CD,parseSyml:()=>Yi,stringifyArgument:()=>AT,stringifyArgumentSegment:()=>fT,stringifyArithmeticExpression:()=>wD,stringifyCommand:()=>uT,stringifyCommandChain:()=>cy,stringifyCommandChainThen:()=>cT,stringifyCommandLine:()=>ID,stringifyCommandLineThen:()=>lT,stringifyEnvSegment:()=>ED,stringifyRedirectArgument:()=>MI,stringifyResolution:()=>vD,stringifyShell:()=>ly,stringifyShellLine:()=>ly,stringifySyml:()=>Ia,stringifyValueArgument:()=>Ug});var Ml=dt(()=>{sY();cY();oJ()});var lJ=U((obt,ST)=>{"use strict";var g6e=t=>{let e=!1,r=!1,o=!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,o=r,r=!0,a++):r&&o&&/[a-zA-Z]/.test(n)&&n.toLowerCase()===n?(t=t.slice(0,a-1)+"-"+t.slice(a-1),o=r,r=!1,e=!0):(e=n.toLowerCase()===n&&n.toUpperCase()!==n,o=r,r=n.toUpperCase()===n&&n.toLowerCase()!==n)}return t},aJ=(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=g6e(t)),t=t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(a,n)=>n.toUpperCase()).replace(/\d+(\w|$)/g,a=>a.toUpperCase()),r(t))};ST.exports=aJ;ST.exports.default=aJ});var cJ=U((abt,d6e)=>{d6e.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:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{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:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{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:"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:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{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",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{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"
Line truncated
|
||||||
|
|
||||||
|
${this.candidates.map(({usage:a})=>`$ ${a}`).join(`
|
||||||
|
`)}`}else if(this.candidates.length===1){let[{usage:o}]=this.candidates;this.message=`Command not found; did you mean:
|
||||||
|
|
||||||
|
$ ${o}
|
||||||
|
${FT(e)}`}else this.message=`Command not found; did you mean one of:
|
||||||
|
|
||||||
|
${this.candidates.map(({usage:o},a)=>`${`${a}.`.padStart(4)} ${o}`).join(`
|
||||||
|
`)}
|
||||||
|
|
||||||
|
${FT(e)}`}},MD=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((o,a)=>`${`${a}.`.padStart(4)} ${o}`).join(`
|
||||||
|
`)}
|
||||||
|
|
||||||
|
${FT(e)}`}},FT=t=>`While running ${t.filter(e=>e!==js).map(e=>{let r=JSON.stringify(e);return e.match(/\s/)||e.length===0||r!==`"${e}"`?r:e}).join(" ")}`});function m6e(t){let e=t.split(`
|
||||||
|
`),r=e.filter(a=>a.match(/\S/)),o=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(o).trimRight()).join(`
|
||||||
|
`)}function Bo(t,{format:e,paragraphs:r}){return t=t.replace(/\r\n?/g,`
|
||||||
|
`),t=m6e(t),t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2
|
||||||
|
|
||||||
|
`),t=t.replace(/\n(\n)?\n*/g,(o,a)=>a||" "),r&&(t=t.split(/\n/).map(o=>{let a=o.match(/^\s*[*-][\t ]+(.*)/);if(!a)return o.match(/(.{1,80})(?: |$)/g).join(`
|
||||||
|
`);let n=o.length-o.trimStart().length;return a[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,"g")).map((u,A)=>" ".repeat(n)+(A===0?"- ":" ")+u).join(`
|
||||||
|
`)}).join(`
|
||||||
|
|
||||||
|
`)),t=t.replace(/(`+)((?:.|[\n])*?)\1/g,(o,a,n)=>e.code(a+n+a)),t=t.replace(/(\*\*)((?:.|[\n])*?)\1/g,(o,a,n)=>e.bold(a+n+a)),t?`${t}
|
||||||
|
`:""}var RT,pJ,hJ,TT=dt(()=>{RT=Array(80).fill("\u2501");for(let t=0;t<=24;++t)RT[RT.length-t]=`\x1B[38;5;${232+t}m\u2501`;pJ={header:t=>`\x1B[1m\u2501\u2501\u2501 ${t}${t.length<80-5?` ${RT.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`},hJ={header:t=>t,bold:t=>t,error:t=>t,code:t=>t}});function jo(t){return{...t,[YI]:!0}}function Ku(t,e){return typeof t>"u"?[t,e]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[void 0,t]:[t,e]}function _D(t,e=!1){let r=t.replace(/^\.: /,"");return e&&(r=r[0].toLowerCase()+r.slice(1)),r}function KI(t,e){return e.length===1?new ot(`${t}: ${_D(e[0],!0)}`):new ot(`${t}:
|
||||||
|
${e.map(r=>`
|
||||||
|
- ${_D(r)}`).join("")}`)}function JI(t,e,r){if(typeof r>"u")return e;let o=[],a=[],n=A=>{let p=e;return e=A,n.bind(null,p)};if(!r(e,{errors:o,coercions:a,coercion:n}))throw KI(`Invalid value for ${t}`,o);for(let[,A]of a)A();return e}var YI,Ef=dt(()=>{UD();YI=Symbol("clipanion/isOption")});var Go={};Yt(Go,{KeyRelationship:()=>zg,applyCascade:()=>Zg,base64RegExp:()=>yJ,colorStringAlphaRegExp:()=>mJ,colorStringRegExp:()=>dJ,computeKey:()=>Gp,getPrintable:()=>Ki,hasExactLength:()=>BJ,hasForbiddenKeys:()=>W6e,hasKeyRelationship:()=>_T,hasMaxLength:()=>Q6e,hasMinLength:()=>b6e,hasMutuallyExclusiveKeys:()=>Y6e,hasRequiredKeys:()=>G6e,hasUniqueItems:()=>k6e,isArray:()=>w6e,isAtLeast:()=>MT,isAtMost:()=>T6e,isBase64:()=>q6e,isBoolean:()=>C6e,isDate:()=>I6e,isDict:()=>v6e,isEnum:()=>Gs,isHexColor:()=>H6e,isISO8601:()=>_6e,isInExclusiveRange:()=>N6e,isInInclusiveRange:()=>L6e,isInstanceOf:()=>S6e,isInteger:()=>UT,isJSON:()=>j6e,isLiteral:()=>y6e,isLowerCase:()=>O6e,isNegative:()=>F6e,isNullable:()=>P6e,isNumber:()=>NT,isObject:()=>D6e,isOneOf:()=>OT,isOptional:()=>x6e,isPositive:()=>R6e,isString:()=>VI,isTuple:()=>B6e,isUUID4:()=>U6e,isUnknown:()=>wJ,isUpperCase:()=>M6e,iso8601RegExp:()=>LT,makeCoercionFn:()=>Xg,makeSetter:()=>IJ,makeTrait:()=>CJ,makeValidator:()=>Yr,matchesRegExp:()=>zI,plural:()=>HD,pushError:()=>Pr,simpleKeyRegExp:()=>gJ,uuid4RegExp:()=>EJ});function Yr({test:t}){return CJ(t)()}function Ki(t){return t===null?"null":t===void 0?"undefined":t===""?"an empty string":JSON.stringify(t)}function Gp(t,e){var r,o,a;return typeof e=="number"?`${(r=t==null?void 0:t.p)!==null&&r!==void 0?r:"."}[${e}]`:gJ.test(e)?`${(o=t==null?void 0:t.p)!==null&&o!==void 0?o:""}.${e}`:`${(a=t==null?void 0:t.p)!==null&&a!==void 0?a:"."}[${JSON.stringify(e)}]`}function Xg(t,e){return r=>{let o=t[e];return t[e]=r,Xg(t,e).bind(null,o)}}function IJ(t,e){return r=>{t[e]=r}}function HD(t,e,r){return t===1?e:r}function Pr({errors:t,p:e}={},r){return t==null||t.push(`${e??"."}: ${r}`),!1}function y6e(t){return Yr({test:(e,r)=>e!==t?Pr(r,`Expected a literal (got ${Ki(t)})`):!0})}function Gs(t){let e=Array.isArray(t)?t:Object.values(t),r=new Set(e);return Yr({test:(o,a)=>r.has(o)?!0:Pr(a,`Expected a valid enumeration value (got ${Ki(o)})`)})}var gJ,dJ,mJ,yJ,EJ,LT,CJ,wJ,VI,E6e,C6e,NT,I6e,w6e,B6e,v6e,D6e,S6e,OT,Zg,x6e,P6e,b6e,Q6e,BJ,k6e,F6e,R6e,MT,T6e,L6e,N6e,UT,zI,O6e,M6e,U6e,_6e,H6e,q6e,j6e,G6e,W6e,Y6e,zg,K6e,_T,el=dt(()=>{gJ=/^[a-zA-Z_][a-zA-Z0-9_]*$/,dJ=/^#[0-9a-f]{6}$/i,mJ=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,yJ=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,EJ=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,LT=/^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/,CJ=t=>()=>t;wJ=()=>Yr({test:(t,e)=>!0});VI=()=>Yr({test:(t,e)=>typeof t!="string"?Pr(e,`Expected a string (got ${Ki(t)})`):!0});E6e=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]),C6e=()=>Yr({test:(t,e)=>{var r;if(typeof t!="boolean"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return Pr(e,"Unbound coercion result");let o=E6e.get(t);if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return Pr(e,`Expected a boolean (got ${Ki(t)})`)}return!0}}),NT=()=>Yr({test:(t,e)=>{var r;if(typeof t!="number"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return Pr(e,"Unbound coercion result");let o;if(typeof t=="string"){let a;try{a=JSON.parse(t)}catch{}if(typeof a=="number")if(JSON.stringify(a)===t)o=a;else return Pr(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return Pr(e,`Expected a number (got ${Ki(t)})`)}return!0}}),I6e=()=>Yr({test:(t,e)=>{var r;if(!(t instanceof Date)){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return Pr(e,"Unbound coercion result");let o;if(typeof t=="string"&<.test(t))o=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))o=new Date(a*1e3);else return Pr(e,`Received a timestamp that can't be safely represented by the runtime (${t})`)}if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return Pr(e,`Expected a date (got ${Ki(t)})`)}return!0}}),w6e=(t,{delimiter:e}={})=>Yr({test:(r,o)=>{var a;if(typeof r=="string"&&typeof e<"u"&&typeof(o==null?void 0:o.coercions)<"u"){if(typeof(o==null?void
Line truncated
|
||||||
|
`),this.context.stdout.write(`
|
||||||
|
`);let r=0;for(let o of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[o].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 NJ(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=MJ(t);return vo.from(r,e).runExit(o,a)}async function OJ(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=MJ(t);return vo.from(r,e).run(o,a)}function MJ(t){let e,r,o,a;switch(typeof process<"u"&&typeof process.argv<"u"&&(o=process.argv.slice(2)),t.length){case 1:r=t[0];break;case 2:t[0]&&t[0].prototype instanceof it||Array.isArray(t[0])?(r=t[0],Array.isArray(t[1])?o=t[1]:a=t[1]):(e=t[0],r=t[1]);break;case 3:Array.isArray(t[2])?(e=t[0],r=t[1],o=t[2]):t[0]&&t[0].prototype instanceof it||Array.isArray(t[0])?(r=t[0],o=t[1],a=t[2]):(e=t[0],r=t[1],a=t[2]);break;default:e=t[0],r=t[1],o=t[2],a=t[3];break}if(typeof o>"u")throw new Error("The argv parameter must be provided when running Clipanion outside of a Node context");return{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}}function LJ(t){return t()}var TJ,vo,UJ=dt(()=>{YD();TT();FJ();$g();RJ();TJ=Symbol("clipanion/errorCommand");vo=class{constructor({binaryLabel:e,binaryName:r="...",binaryVersion:o,enableCapture:a=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new Cy({binaryName:r}),this.binaryLabel=e,this.binaryName=r,this.binaryVersion=o,this.enableCapture=a,this.enableColors=n}static from(e,r={}){let o=new vo(r),a=Array.isArray(e)?e:[e];for(let n of a)o.register(n);return o}register(e){var r;let o=new Map,a=new e;for(let p in a){let h=a[p];typeof h=="object"&&h!==null&&h[it.isOption]&&o.set(p,h)}let n=this.builder.command(),u=n.cliIndex,A=(r=e.paths)!==null&&r!==void 0?r:a.paths;if(typeof A<"u")for(let p of A)n.addPath(p);this.registrations.set(e,{specs:o,builder:n,index:u});for(let[p,{definition:h}]of o.entries())h(n,p);n.setContext({commandClass:e})}process(e,r){let{contexts:o,process:a}=this.builder.compile(),n=a(e),u={...vo.defaultContext,...r};switch(n.selectedIndex){case-1:{let A=Iy.from(n,o);return A.context=u,A}default:{let{commandClass:A}=o[n.selectedIndex],p=this.registrations.get(A);if(typeof p>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let h=new A;h.context=u,h.path=n.path;try{for(let[C,{transformer:w}]of p.specs.entries())h[C]=w(p.builder,C,n,u);return h}catch(C){throw C[TJ]=h,C}}break}}async run(e,r){var o,a;let n,u={...vo.defaultContext,...r},A=(o=this.enableColors)!==null&&o!==void 0?o:u.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e,u)}catch(C){return u.stdout.write(this.error(C,{colored:A})),1}if(n.help)return u.stdout.write(this.usage(n,{colored:A,detailed:!0})),0;n.context=u,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),error:(C,w)=>this.error(C,w),format:C=>this.format(C),process:(C,w)=>this.process(C,{...u,...w}),run:(C,w)=>this.run(C,{...u,...w}),usage:(C,w)=>this.usage(C,w)};let p=this.enableCapture&&(a=kJ(u))!==null&&a!==void 0?a:LJ,h;try{h=await p(()=>n.validateAndExecute().catch(C=>n.catch(C).then(()=>0)))}catch(C){return u.stdout.write(this.error(C,{colored:A,command:n})),1}return h}async runExit(e,r){process.exitCode=await this.run(e,r)}suggest(e,r){let{suggest:o}=this.builder.compile();return o(e,r)}definitions({colored:e=!1}={}){let r=[];for(let[o,{index:a}]of this.registrations){if(typeof o.usage>"u")continue;let{usage:n}=this.getUsageByIndex(a,{detailed:!1}),{usage:u,options:A}=this.getUsageByIndex(a,{detailed:!0,inlineOptions:!1}),p=typeof o.usage.category<"u"?Bo(o.usage.category,{format:this.format(e),paragraphs:!1}):void 0,h=typeof o.usage.description<"u"?Bo(o.usage.description,{format:this.format(e),paragraphs:!1}):void 0,C=typeof o.usage.details<"u"?Bo(o.usage.details,{format:this.format(e),paragraphs:!0}):void 0,w=typeof o.usage.examples<"u"?o.usage.examples.map(([v,b])=>[Bo(v,{format:this.format(e),paragraphs:!1}),b.replace(/\$0/g,this.binaryName)]):void 0;r.push({path:n,usage:u,category:p,description:h,details:C,examples:w,options:A})}return r}usage(e=null,{colored:r,detailed:o=!1,prefix:a="$ "}={}){var n;if(e===null){for(let p of this.registrations.keys()){let h=p.paths,C=typeof p.usage<"u";if(!h||h.length===0||h.length===1&&h[0].length===0||((n=h==null?void 0:h.some(b=>b.length===0))!==null&&n!==void 0?n:!1))if(e){e=null;break}else e=p;else if(C){e=null;continue}}e&&(o=!0)}let u=e!==null&&e instanceof it?e.constructor:e,A="";if(u)if(o){let{description:p="",details:h="",examples:C=[]}=u.usage||{};p!==""&&(A+=Bo(p,{format:this.format(r),paragraphs:!1}).replace(/^./,b=>b.toUpperCase()),A+=`
|
||||||
|
`),(h!==""||C.length>0)&&(A+=`${this.format(r).header("Usage")}
|
||||||
|
`,A+=`
|
||||||
|
`);let{usage:w,options:v}=this.getUsageByRegistration(u,{inlineOptions:!1});if(A+=`${this.format(r).bold(a)}${w}
|
||||||
|
`,v.length>0){A+=`
|
||||||
|
`,A+=`${this.format(r).header("Options")}
|
||||||
|
`;let b=v.reduce((E,R)=>Math.max(E,R.definition.length),0);A+=`
|
||||||
|
`;for(let{definition:E,description:R}of v)A+=` ${this.format(r).bold(E.padEnd(b))} ${Bo(R,{format:this.format(r),paragraphs:!1})}`}if(h!==""&&(A+=`
|
||||||
|
`,A+=`${this.format(r).header("Details")}
|
||||||
|
`,A+=`
|
||||||
|
`,A+=Bo(h,{format:this.format(r),paragraphs:!0})),C.length>0){A+=`
|
||||||
|
`,A+=`${this.format(r).header("Examples")}
|
||||||
|
`;for(let[b,E]of C)A+=`
|
||||||
|
`,A+=Bo(b,{format:this.format(r),paragraphs:!1}),A+=`${E.replace(/^/m,` ${this.format(r).bold(a)}`).replace(/\$0/g,this.binaryName)}
|
||||||
|
`}}else{let{usage:p}=this.getUsageByRegistration(u);A+=`${this.format(r).bold(a)}${p}
|
||||||
|
`}else{let p=new Map;for(let[v,{index:b}]of this.registrations.entries()){if(typeof v.usage>"u")continue;let E=typeof v.usage.category<"u"?Bo(v.usage.category,{format:this.format(r),paragraphs:!1}):null,R=p.get(E);typeof R>"u"&&p.set(E,R=[]);let{usage:N}=this.getUsageByIndex(b);R.push({commandClass:v,usage:N})}let h=Array.from(p.keys()).sort((v,b)=>v===null?-1:b===null?1:v.localeCompare(b,"en",{usage:"sort",caseFirst:"upper"})),C=typeof this.binaryLabel<"u",w=typeof this.binaryVersion<"u";C||w?(C&&w?A+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)}
|
||||||
|
|
||||||
|
`:C?A+=`${this.format(r).header(`${this.binaryLabel}`)}
|
||||||
|
`:A+=`${this.format(r).header(`${this.binaryVersion}`)}
|
||||||
|
`,A+=` ${this.format(r).bold(a)}${this.binaryName} <command>
|
||||||
|
`):A+=`${this.format(r).bold(a)}${this.binaryName} <command>
|
||||||
|
`;for(let v of h){let b=p.get(v).slice().sort((R,N)=>R.usage.localeCompare(N.usage,"en",{usage:"sort",caseFirst:"upper"})),E=v!==null?v.trim():"General commands";A+=`
|
||||||
|
`,A+=`${this.format(r).header(`${E}`)}
|
||||||
|
`;for(let{commandClass:R,usage:N}of b){let _=R.usage.description||"undocumented";A+=`
|
||||||
|
`,A+=` ${this.format(r).bold(N)}
|
||||||
|
`,A+=` ${Bo(_,{format:this.format(r),paragraphs:!1})}`}}A+=`
|
||||||
|
`,A+=Bo("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(r),paragraphs:!0})}return A}error(e,r){var o,{colored:a,command:n=(o=e[TJ])!==null&&o!==void 0?o:null}=r===void 0?{}:r;e instanceof Error||(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let u="",A=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");A==="Error"&&(A="Internal Error"),u+=`${this.format(a).error(A)}: ${e.message}
|
||||||
|
`;let p=e.clipanion;return typeof p<"u"?p.type==="usage"&&(u+=`
|
||||||
|
`,u+=this.usage(n)):e.stack&&(u+=`${e.stack.replace(/^.*\n/,"")}
|
||||||
|
`),u}format(e){var r;return((r=e??this.enableColors)!==null&&r!==void 0?r:vo.defaultContext.colorDepth>1)?pJ:hJ}getUsageByRegistration(e,r){let o=this.registrations.get(e);if(typeof o>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(o.index,r)}getUsageByIndex(e,r){return this.builder.getBuilderByIndex(e).usage(r)}};vo.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:QJ()}});var XI,_J=dt(()=>{$g();XI=class extends it{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)}
|
||||||
|
`)}};XI.paths=[["--clipanion=definitions"]]});var ZI,HJ=dt(()=>{$g();ZI=class extends it{async execute(){this.context.stdout.write(this.cli.usage())}};ZI.paths=[["-h"],["--help"]]});var $I,qJ=dt(()=>{$g();$I=class extends it{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:"<unknown>"}
|
||||||
|
`)}};$I.paths=[["-v"],["--version"]]});var GT={};Yt(GT,{DefinitionsCommand:()=>XI,HelpCommand:()=>ZI,VersionCommand:()=>$I});var jJ=dt(()=>{_J();HJ();qJ()});function GJ(t,e,r){let[o,a]=Ku(e,r??{}),{arity:n=1}=a,u=t.split(","),A=new Set(u);return jo({definition(p){p.addOption({names:u,arity:n,hidden:a==null?void 0:a.hidden,description:a==null?void 0:a.description,required:a.required})},transformer(p,h,C){let w=typeof o<"u"?[...o]:void 0;for(let{name:v,value:b}of C.options)!A.has(v)||(w=w??[],w.push(b));return w}})}var WJ=dt(()=>{Ef()});function YJ(t,e,r){let[o,a]=Ku(e,r??{}),n=t.split(","),u=new Set(n);return jo({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let C=o;for(let{name:w,value:v}of h.options)!u.has(w)||(C=v);return C}})}var KJ=dt(()=>{Ef()});function JJ(t,e,r){let[o,a]=Ku(e,r??{}),n=t.split(","),u=new Set(n);return jo({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let C=o;for(let{name:w,value:v}of h.options)!u.has(w)||(C??(C=0),v?C+=1:C=0);return C}})}var VJ=dt(()=>{Ef()});function zJ(t={}){return jo({definition(e,r){var o;e.addProxy({name:(o=t.name)!==null&&o!==void 0?o:r,required:t.required})},transformer(e,r,o){return o.positionals.map(({value:a})=>a)}})}var XJ=dt(()=>{Ef()});function ZJ(t={}){return jo({definition(e,r){var o;e.addRest({name:(o=t.name)!==null&&o!==void 0?o:r,required:t.required})},transformer(e,r,o){let a=u=>{let A=o.positionals[u];return A.extra===tl||A.extra===!1&&u<e.arity.leading.length},n=0;for(;n<o.positionals.length&&a(n);)n+=1;return o.positionals.splice(0,n).map(({value:u})=>u)}})}var $J=dt(()=>{YD();Ef()});function sje(t,e,r){let[o,a]=Ku(e,r??{}),{arity:n=1}=a,u=t.split(","),A=new Set(u);return jo({definition(p){p.addOption({names:u,arity:a.tolerateBoolean?0:n,hidden:a.hidden,description:a.description,required:a.required})},transformer(p,h,C,w){let v,b=o;typeof a.env<"u"&&w.env[a.env]&&(v=a.env,b=w.env[a.env]);for(let{name:E,value:R}of C.options)!A.has(E)||(v=E,b=R);return typeof b=="string"?JI(v??h,b,a.validator):b}})}function oje(t={}){let{required:e=!0}=t;return jo({definition(r,o){var a;r.addPositional({name:(a=t.name)!==null&&a!==void 0?a:o,required:t.required})},transformer(r,o,a){var n;for(let u=0;u<a.positionals.length;++u){if(a.positionals[u].extra===tl||e&&a.positionals[u].extra===!0||!e&&a.positionals[u].extra===!1)continue;let[A]=a.positionals.splice(u,1);return JI((n=t.name)!==null&&n!==void 0?n:o,A.value,t.validator)}}})}function eV(t,...e){return typeof t=="string"?sje(t,...e):oje(t)}var tV=dt(()=>{YD();Ef()});var fe={};Yt(fe,{Array:()=>GJ,Boolean:()=>YJ,Counter:()=>JJ,Proxy:()=>zJ,Rest:()=>ZJ,String:()=>eV,applyValidator:()=>JI,cleanValidationError:()=>_D,formatError:()=>KI,isOptionSymbol:()=>YI,makeCommandOption:()=>jo,rerouteArguments:()=>Ku});var rV=dt(()=>{Ef();WJ();KJ();VJ();XJ();$J();tV()});var ew={};Yt(ew,{Builtins:()=>GT,Cli:()=>vo,Command:()=>it,Option:()=>fe,UsageError:()=>ot,formatMarkdownish:()=>Bo,run:()=>OJ,runExit:()=>NJ});var _t=dt(()=>{UD();TT();$g();UJ();jJ();rV()});var iV=U((cQt,nV)=>{"use strict";nV.exports=(t,...e)=>new Promise(r=>{r(t(...e))})});var ed=U((uQt,WT)=>{"use strict";var aje=iV(),sV=t=>{if(t<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],r=0,o=()=>{r--,e.length>0&&e.shift()()},a=(A,p,...h)=>{r++;let C=aje(A,...h);p(C),C.then(o,o)},n=(A,p,...h)=>{r<t?a(A,p,...h):e.push(a.bind(null,A,p,...h))},u=(A,...p)=>new Promise(h=>n(A,h,...p));return Object.defineProperties(u,{activeCount:{get:()=>r},pendingCount:{get:()=>e.length}}),u};WT.exports=sV;WT.exports.default=sV});function Ju(t){return`YN${t.toString(10).padStart(4,"0")}`}function JD(t){let e=Number(t.slice(2));if(typeof dr[e]>"u")throw new Error(`Unknown message name: "${t}"`);return e}var dr,VD=dt(()=>{dr=(_e=>(_e[_e.UNNAMED=0]="UNNAMED",_e[_e.EXCEPTION=1]="EXCEPTION",_e[_e.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",_e[_e.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",_e[_e.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",_e[_e.BUILD_DISABLED=5]="BUILD_DISABLED",_e[_e.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",_e[_e.MUST_BUILD=7]="MUST_BUILD",_e[_e.MUST_REBUILD=8]="MUST_REBUILD",_e[_e.BUILD_FAILED=9]="BUILD_FAILED",_e[_e.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",_e[_e.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",_e[_e.LINKER_NOT_FOUND=12]="LINKER_NOT_FOUND",_e[_e.FETCH_NOT_CACHED=13]="FETCH_NOT_CACHED",_e[_e.YARN_IMPORT_FAILED=14]="YARN_IMPORT_FAILED",_e[_e.REMOTE_INVALID=15]="REMOTE_INVALID",_e[_e.REMOTE_NOT_FOUND=16]="REMOTE_NOT_FOUND",_e[_e.RESOLUTION_PACK=17]="RESOLUTION_PACK",_e[_e.CACHE_CHECKSUM_MISMATCH=18]="CACHE_CHECKSUM_MISMATCH",_e[_e.UNUSED_CACHE_ENTRY=19]="UNUSED_CACHE_ENTRY",_e[_e.MISSING_LOCKFILE_ENTRY=20]="MISSING_LOCKFILE_ENTRY",_e[_e.WORKSPACE_NOT_FOUND=21]="WORKSPACE_NOT_FOUND",_e[_e.TOO_MANY_MATCHING_WORKSPACES=22]="TOO
Line truncated
|
||||||
|
`,"\r","(",")","!","|","&","^"],!0,!1),he=function($){return e.queryPattern.test($)},ve=function($){return e.checkFn($)},ge=je("whitespace"),le=/^[ \t\n\r]/,xe=Te([" "," ",`
|
||||||
|
`,"\r"],!1,!1),g=0,De=0,Ee=[{line:1,column:1}],de=0,ne=[],Z=0,me;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function be(){return t.substring(De,g)}function ut(){return Ne(De,g)}function H($,ie){throw ie=ie!==void 0?ie:Ne(De,g),x([je($)],t.substring(De,g),ie)}function yt($,ie){throw ie=ie!==void 0?ie:Ne(De,g),I($,ie)}function Me($,ie){return{type:"literal",text:$,ignoreCase:ie}}function Te($,ie,ke){return{type:"class",parts:$,inverted:ie,ignoreCase:ke}}function Qe(){return{type:"any"}}function Ue(){return{type:"end"}}function je($){return{type:"other",description:$}}function At($){var ie=Ee[$],ke;if(ie)return ie;for(ke=$-1;!Ee[ke];)ke--;for(ie=Ee[ke],ie={line:ie.line,column:ie.column};ke<$;)t.charCodeAt(ke)===10?(ie.line++,ie.column=1):ie.column++,ke++;return Ee[$]=ie,ie}function Ne($,ie){var ke=At($),Le=At(ie);return{start:{offset:$,line:ke.line,column:ke.column},end:{offset:ie,line:Le.line,column:Le.column}}}function P($){g<de||(g>de&&(de=g,ne=[]),ne.push($))}function I($,ie){return new ad($,null,null,ie)}function x($,ie,ke){return new ad(ad.buildMessage($,ie),$,ie,ke)}function y(){var $,ie,ke,Le,st,ht,Ut,Xt;if($=g,ie=F(),ie!==r){for(ke=[],Le=g,st=X(),st!==r?(t.charCodeAt(g)===124?(ht=n,g++):(ht=r,Z===0&&P(u)),ht===r&&(t.charCodeAt(g)===38?(ht=A,g++):(ht=r,Z===0&&P(p)),ht===r&&(t.charCodeAt(g)===94?(ht=h,g++):(ht=r,Z===0&&P(C)))),ht!==r?(Ut=X(),Ut!==r?(Xt=F(),Xt!==r?(st=[st,ht,Ut,Xt],Le=st):(g=Le,Le=r)):(g=Le,Le=r)):(g=Le,Le=r)):(g=Le,Le=r);Le!==r;)ke.push(Le),Le=g,st=X(),st!==r?(t.charCodeAt(g)===124?(ht=n,g++):(ht=r,Z===0&&P(u)),ht===r&&(t.charCodeAt(g)===38?(ht=A,g++):(ht=r,Z===0&&P(p)),ht===r&&(t.charCodeAt(g)===94?(ht=h,g++):(ht=r,Z===0&&P(C)))),ht!==r?(Ut=X(),Ut!==r?(Xt=F(),Xt!==r?(st=[st,ht,Ut,Xt],Le=st):(g=Le,Le=r)):(g=Le,Le=r)):(g=Le,Le=r)):(g=Le,Le=r);ke!==r?(De=$,ie=w(ie,ke),$=ie):(g=$,$=r)}else g=$,$=r;return $}function F(){var $,ie,ke,Le,st,ht;return $=g,t.charCodeAt(g)===33?(ie=v,g++):(ie=r,Z===0&&P(b)),ie!==r?(ke=F(),ke!==r?(De=$,ie=E(ke),$=ie):(g=$,$=r)):(g=$,$=r),$===r&&($=g,t.charCodeAt(g)===40?(ie=R,g++):(ie=r,Z===0&&P(N)),ie!==r?(ke=X(),ke!==r?(Le=y(),Le!==r?(st=X(),st!==r?(t.charCodeAt(g)===41?(ht=_,g++):(ht=r,Z===0&&P(J)),ht!==r?(De=$,ie=re(Le),$=ie):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r)):(g=$,$=r),$===r&&($=z())),$}function z(){var $,ie,ke,Le,st;if($=g,ie=X(),ie!==r){if(ke=g,Le=[],oe.test(t.charAt(g))?(st=t.charAt(g),g++):(st=r,Z===0&&P(pe)),st!==r)for(;st!==r;)Le.push(st),oe.test(t.charAt(g))?(st=t.charAt(g),g++):(st=r,Z===0&&P(pe));else Le=r;Le!==r?ke=t.substring(ke,g):ke=Le,ke!==r?(De=g,Le=he(ke),Le?Le=void 0:Le=r,Le!==r?(De=$,ie=ve(ke),$=ie):(g=$,$=r)):(g=$,$=r)}else g=$,$=r;return $}function X(){var $,ie;for(Z++,$=[],le.test(t.charAt(g))?(ie=t.charAt(g),g++):(ie=r,Z===0&&P(xe));ie!==r;)$.push(ie),le.test(t.charAt(g))?(ie=t.charAt(g),g++):(ie=r,Z===0&&P(xe));return Z--,$===r&&(ie=r,Z===0&&P(ge)),$}if(me=a(),me!==r&&g===t.length)return me;throw me!==r&&g<t.length&&P(Ue()),x(ne,de<t.length?t.charAt(de):null,de<t.length?Ne(de,de+1):Ne(de,de))}eX.exports={SyntaxError:ad,parse:gGe}});var rX=U(uS=>{var{parse:dGe}=tX();uS.makeParser=(t=/[a-z]+/)=>(e,r)=>dGe(e,{queryPattern:t,checkFn:r});uS.parse=uS.makeParser()});var iX=U((okt,nX)=>{"use strict";nX.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],lightgrey:[Line truncated
|
||||||
|
`:`
|
||||||
|
`)+r,a=o+1,o=t.indexOf(`
|
||||||
|
`,a)}while(o!==-1);return n+=t.substr(a),n};CX.exports={stringReplaceAll:bGe,stringEncaseCRLFWithFirstIndex:QGe}});var SX=U((hkt,DX)=>{"use strict";var kGe=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,wX=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,FGe=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,RGe=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,TGe=new Map([["n",`
|
||||||
|
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function vX(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)):TGe.get(t)||t}function LGe(t,e){let r=[],o=e.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(FGe))r.push(a[2].replace(RGe,(A,p,h)=>p?vX(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function NGe(t){wX.lastIndex=0;let e=[],r;for(;(r=wX.exec(t))!==null;){let o=r[1];if(r[2]){let a=LGe(o,r[2]);e.push([o].concat(a))}else e.push([o])}return e}function BX(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 o=t;for(let[a,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(a in o))throw new Error(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}DX.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(kGe,(n,u,A,p,h,C)=>{if(u)a.push(vX(u));else if(p){let w=a.join("");a=[],o.push(r.length===0?w:BX(t,r)(w)),r.push({inverse:A,styles:NGe(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(BX(t,r)(a.join(""))),a=[],r.pop()}else a.push(C)}),o.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 o.join("")}});var mL=U((gkt,QX)=>{"use strict";var pw=fw(),{stdout:pL,stderr:hL}=AL(),{stringReplaceAll:OGe,stringEncaseCRLFWithFirstIndex:MGe}=IX(),xX=["ansi","ansi","ansi256","ansi16m"],by=Object.create(null),UGe=(t,e={})=>{if(e.level>3||e.level<0)throw new Error("The `level` option should be an integer from 0 to 3");let r=pL?pL.level:0;t.level=e.level===void 0?r:e.level},gL=class{constructor(e){return PX(e)}},PX=t=>{let e={};return UGe(e,t),e.template=(...r)=>qGe(e.template,...r),Object.setPrototypeOf(e,pS.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=gL,e.template};function pS(t){return PX(t)}for(let[t,e]of Object.entries(pw))by[t]={get(){let r=hS(this,dL(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};by.visible={get(){let t=hS(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var bX=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of bX)by[t]={get(){let{level:e}=this;return function(...r){let o=dL(pw.color[xX[e]][t](...r),pw.color.close,this._styler);return hS(this,o,this._isEmpty)}}};for(let t of bX){let e="bg"+t[0].toUpperCase()+t.slice(1);by[e]={get(){let{level:r}=this;return function(...o){let a=dL(pw.bgColor[xX[r]][t](...o),pw.bgColor.close,this._styler);return hS(this,a,this._isEmpty)}}}}var _Ge=Object.defineProperties(()=>{},{...by,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),dL=(t,e,r)=>{let o,a;return r===void 0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},hS=(t,e,r)=>{let o=(...a)=>HGe(o,a.length===1?""+a[0]:a.join(" "));return o.__proto__=_Ge,o._generator=t,o._styler=e,o._isEmpty=r,o},HGe=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=OGe(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
|
||||||
|
`);return n!==-1&&(e=MGe(e,a,o,n)),o+e+a},fL,qGe=(t,...e)=>{let[r]=e;if(!Array.isArray(r))return e.join(" ");let o=e.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(o[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return fL===void 0&&(fL=SX()),fL(t,a.join(""))};Object.defineProperties(pS.prototype,by);var hw=pS();hw.supportsColor=pL;hw.stderr=pS({level:hL?hL.level:0});hw.stderr.supportsColor=hL;hw.Level={None:0,Basic:1,Ansi256:2,TrueColor:3,0:"None",1:"Basic",2:"Ansi256",3:"TrueColor"};QX.exports=hw});var gS=U(ql=>{"use strict";ql.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;ql.find=(t,e)=>t.nodes.find(r=>r.type===e);ql.exceedsLimit=(t,e,r=1,o)=>o===!1||!ql.isInteger(t)||!ql.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=o;ql.escapeNode=(t,e=0,r)=>{let o=t.nodes[e];!o||(r&&o.type===r||o.type==="open"||o.type==="close")&&o.escaped!==!0&&(o.value="\\"+o.value,o.escaped=!0)};ql.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0===0?(t.invalid=!0,!0):!1;ql.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0===0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;ql.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;ql.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);ql.flatten=(...t)=>{let e=[],r=o=>{for(let a=0;a<o.length;a++){let n=o[a];Array.isArray(n)?r(n,e):n!==void 0&&e.push(n)}return e};return r(t),e}});var dS=U((mkt,FX)=>{"use strict";var kX=gS();FX.exports=(t,e={})=>{let r=(o,a={})=>{let n=e.escapeInvalid&&kX.isInvalidBrace(a),u=o.invalid===!0&&e.escapeInvalid===!0,A="";if(o.value)return(n||u)&&kX.isOpenOrClose(o)?"\\"+o.value:o.value;if(o.value)return o.value;if(o.nodes)for(let p of o.nodes)A+=r(p);return A};return r(t)}});var TX=U((ykt,RX)=>{"use strict";RX.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var jX=U((Ekt,qX)=>{"use strict";var LX=TX(),ld=(t,e,r)=>{if(LX(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(LX(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let o={relaxZeros:!0,...r};typeof o.strictZeros=="boolean"&&(o.relaxZeros=o.strictZeros===!1);let a=String(o.relaxZeros),n=String(o.shorthand),u=String(o.capture),A=String(o.wrap),p=t+":"+e+"="+a+n+u+A;if(ld.cache.hasOwnProperty(p))return ld.cache[p].result;let h=Math.min(t,e),C=Math.max(t,e);if(Math.abs(h-C)===1){let R=t+"|"+e;return o.capture?`(${R})`:o.wrap===!1?R:`(?:${R})`}let w=HX(t)||HX(e),v={min:t,max:e,a:h,b:C},b=[],E=[];if(w&&(v.isPadded=w,v.maxLen=String(v.max).length),h<0){let R=C<0?Math.abs(C):1;E=NX(R,Math.abs(h),v,o),h=v.a=0}return C>=0&&(b=NX(h,C,v,o)),v.negatives=E,v.positives=b,v.result=jGe(E,b,o),o.capture===!0?v.result=`(${v.result})`:o.wrap!==!1&&b.length+E.length>1&&(v.result=`(?:${v.result})`),ld.cache[p]=v,v.result};function jGe(t,e,r){let o=yL(t,e,"-",!1,r)||[],a=yL(e,t,"",!1,r)||[],n=yL(t,e,"-?",!0,r)||[];return o.concat(n).concat(a).join("|")}function GGe(t,e){let r=1,o=1,a=MX(t,r),n=new Set([e]);for(;t<=a&&a<=e;)n.add(a),r+=1,a=MX(t,r);for(a=UX(e+1,o)-1;t<a&&a<=e;)n.add(a),o+=1,a=UX(e+1,o)-1;return n=[...n],n.sort(KGe),n}function WGe(t,e,r){if(t===e)return{pattern:t,count:[],digits:0};let o=YGe(t,e),a=o.length,n="",u=0;for(let A=0;A<a;A++){let[p,h]=o[A];p===h?n+=p:p!=="0"||h!=="9"?n+=JGe(p,h,r):u++}return u&&(n+=r.shorthand===!0?"\\d":"[0-9]"),{pattern:n,count:[u],digits:a}}function NX(t,e,r,o){let a=GGe(t,e),n=[],u=t,A;for(let p=0;p<a.length;p++){let h=a[p],C=WGe(String(u),String(h),o),w="";if(!r.isPadded&&A&&A.pattern===C.pattern){A.count.length>1&&A.count.pop(),A.count.push(C.count[0]),A.string=A.pattern+_X(A.count),u=h+1;continue}r.isPadded&&(w=VGe(h,r,o)),C.string=w+C.pattern+_X(C.count),n.push(C),u=h+1,A=C}return n}function yL(t,e,r,o,a){let n=[];for(let u of t){let{string:A}=u;!o&&!OX(e,"string",A)&&n.push(r+A),o&&OX(e,"string",A)&&n.push(r+A)}return n}function YGe(t,e){let r=[];for(let o=0;o<t.length;o++)r.push([t[o],e[o]]);return r}function KGe(t,e){return t>e?1:e>t?-1:0}function OX(t,e,r){return t.some(o=>o[e]===r)}function MX(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function UX(t,e){return t-t%Math.pow(10,e)}function _X(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function JGe(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function HX(t){return/^-?(0+)\d/.test(t)}function VGe(t,e,r){if(!e.isPadded)return t;let o=Math.abs(e.maxLen-String(t).length),a=r.relaxZeros!==!1;switch(o){case 0:return"";case 1:return a?"0?":"0";case 2:return a?"0{0,2}":"00";default:return a?`0{0,${o}}`:`0{${o}}`}}ld.cache={};ld.clearCache=()=>ld.cache={};qX.exports=ld});var IL=U((Ckt,XX)=>{"use strict";var zGe=Ie("util"),YX=jX(),GX=t=>t!==null&&typeof t=="object"&&!Array.isArray(
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 uZ=U((vkt,cZ)=>{"use strict";var l5e=dS(),{MAX_LENGTH:oZ,CHAR_BACKSLASH:wL,CHAR_BACKTICK:c5e,CHAR_COMMA:u5e,CHAR_DOT:A5e,CHAR_LEFT_PARENTHESES:f5e,CHAR_RIGHT_PARENTHESES:p5e,CHAR_LEFT_CURLY_BRACE:h5e,CHAR_RIGHT_CURLY_BRACE:g5e,CHAR_LEFT_SQUARE_BRACKET:aZ,CHAR_RIGHT_SQUARE_BRACKET:lZ,CHAR_DOUBLE_QUOTE:d5e,CHAR_SINGLE_QUOTE:m5e,CHAR_NO_BREAK_SPACE:y5e,CHAR_ZERO_WIDTH_NOBREAK_SPACE:E5e}=sZ(),C5e=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},o=typeof r.maxLength=="number"?Math.min(oZ,r.maxLength):oZ;if(t.length>o)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${o})`);let a={type:"root",input:t,nodes:[]},n=[a],u=a,A=a,p=0,h=t.length,C=0,w=0,v,b={},E=()=>t[C++],R=N=>{if(N.type==="text"&&A.type==="dot"&&(A.type="text"),A&&A.type==="text"&&N.type==="text"){A.value+=N.value;return}return u.nodes.push(N),N.parent=u,N.prev=A,A=N,N};for(R({type:"bos"});C<h;)if(u=n[n.length-1],v=E(),!(v===E5e||v===y5e)){if(v===wL){R({type:"text",value:(e.keepEscaping?v:"")+E()});continue}if(v===lZ){R({type:"text",value:"\\"+v});continue}if(v===aZ){p++;let N=!0,_;for(;C<h&&(_=E());){if(v+=_,_===aZ){p++;continue}if(_===wL){v+=E();continue}if(_===lZ&&(p--,p===0))break}R({type:"text",value:v});continue}if(v===f5e){u=R({type:"paren",nodes:[]}),n.push(u),R({type:"text",value:v});continue}if(v===p5e){if(u.type!=="paren"){R({type:"text",value:v});continue}u=n.pop(),R({type:"text",value:v}),u=n[n.length-1];continue}if(v===d5e||v===m5e||v===c5e){let N=v,_;for(e.keepQuotes!==!0&&(v="");C<h&&(_=E());){if(_===wL){v+=_+E();continue}if(_===N){e.keepQuotes===!0&&(v+=_);break}v+=_}R({type:"text",value:v});continue}if(v===h5e){w++;let _={type:"brace",open:!0,close:!1,dollar:A.value&&A.value.slice(-1)==="$"||u.dollar===!0,depth:w,commas:0,ranges:0,nodes:[]};u=R(_),n.push(u),R({type:"open",value:v});continue}if(v===g5e){if(u.type!=="brace"){R({type:"text",value:v});continue}let N="close";u=n.pop(),u.close=!0,R({type:N,value:v}),w--,u=n[n.length-1];continue}if(v===u5e&&w>0){if(u.ranges>0){u.ranges=0;let N=u.nodes.shift();u.nodes=[N,{type:"text",value:l5e(u)}]}R({type:"comma",value:v}),u.commas++;continue}if(v===A5e&&w>0&&u.commas===0){let N=u.nodes;if(w===0||N.length===0){R({type:"text",value:v});continue}if(A.type==="dot"){if(u.range=[],A.value+=v,A.type="range",u.nodes.length!==3&&u.nodes.length!==5){u.invalid=!0,u.ranges=0,A.type="text";continue}u.ranges++,u.args=[];continue}if(A.type==="range"){N.pop();let _=N[N.length-1];_.value+=A.value+v,A=_,u.ranges--;continue}R({type:"dot",value:v});continue}R({type:"text",value:v})}do if(u=n.pop(),u.type!=="root"){u.nodes.forEach(J=>{J.nodes||(J.type==="open"&&(J.isOpen=!0),J.type==="close"&&(J.isClose=!0),J.nodes||(J.type="text"),J.invalid=!0)});let N=n[n.length-1],_=N.nodes.indexOf(u);N.nodes.splice(_,1,...u.nodes)}while(n.length>0);return R({type:"eos"}),a};cZ.exports=C5e});var pZ=U((Dkt,fZ)=>{"use strict";var AZ=dS(),I5e=eZ(),w5e=nZ(),B5e=uZ(),nl=(t,e={})=>{let r=[];if(Array.isArray(t))for(let o of t){let a=nl.create(o,e);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(nl.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};nl.parse=(t,e={})=>B5e(t,e);nl.stringify=(t,e={})=>AZ(typeof t=="string"?nl.parse(t,e):t,e);nl.compile=(t,e={})=>(typeof t=="string"&&(t=nl.parse(t,e)),I5e(t,e));nl.expand=(t,e={})=>{typeof t=="string"&&(t=nl.parse(t,e));let r=w5e(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};nl.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?nl.compile(t,e):nl.expand(t,e);fZ.exports=nl});var dw=U((Skt,yZ)=>{"use strict";var v5e=Ie("path"),Vu="\\\\/",hZ=`[^${Vu}]`,Bf="\\.",D5e="\\+",S5e="\\?",yS="\\/",x5e="(?=.)",gZ="[^/]",BL=`(?:${yS}|$)`,dZ=`(?:^|${yS})`,vL=`${Bf}{1,2}${BL}`,P5e=`(?!${Bf})`,b5e=`(?!${dZ}${vL})`,Q5e=`(?!${Bf}{0,1}${BL})`,k5e=`(?!${vL})`,F5e=`[^.${yS}]`,R5e=`${gZ}*?`,mZ={DOT_LITERAL:Bf,PLUS_LITERAL:D5e,QMARK_LITERAL:S5e,SLASH_LITERAL:yS,ONE_CHAR:x5e,QMARK:gZ,END_ANCHOR:BL,DOTS_SLASH:vL,NO_DOT:P5e,NO_DOTS:b5e,NO_DOT_SLASH:Q5e,NO_DOTS_SLASH:k5e,QMARK_NO_DOT:F5e,STAR:R5e,START_ANCHOR:dZ},T5e={...mZ,SLASH_LITERAL:`[${Vu}]`,QMARK:hZ,STAR:`${hZ}*?`,DOTS_SLASH:`${Bf}{1,2}(?:[${Vu}]|$)`,NO_DOT:`(?!${Bf})`,NO_DOTS:`(?!(?:^|[${Vu}])${Bf}{1,2}(?:[${Vu}]|$))`,NO_DOT_SLASH:`(?!${Bf}{0,1}(?:[${Vu}]|$))`,NO_DOTS_SLASH:`(?!${Bf}{1,2}(?:[${Vu}]|$))`,QMARK_NO_DOT:`[^.${Vu}]`,START_ANCHOR:`(?:^|[${Vu}])`,END_ANCHOR:`(?:[${Vu}]|$)`},L5e={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:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",spacLine truncated
|
||||||
|
`),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",e!==null?this.reportInfo(null,`${e} ${p}`):this.reportInfo(null,p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&(e!==null?this.reportInfo(null,`${e} ${n}`):this.reportInfo(null,n))}),r}}});var lE,EM=dt(()=>{Vl();Ks();lE=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 o=this.fetchers.find(a=>a.supports(e,r));return o||null}getFetcher(e,r){let o=this.fetchers.find(a=>a.supports(e,r));if(!o)throw new Jt(11,`${kr(r.project.configuration,e)} isn't supported by any available fetcher`);return o}}});var Dd,CM=dt(()=>{Ks();Dd=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,o){return this.getResolverByDescriptor(e,o).bindDescriptor(e,r,o)}getResolutionDependencies(e,r){return this.getResolverByDescriptor(e,r).getResolutionDependencies(e,r)}async getCandidates(e,r,o){return await this.getResolverByDescriptor(e,o).getCandidates(e,r,o)}async getSatisfying(e,r,o,a){return this.getResolverByDescriptor(e,a).getSatisfying(e,r,o,a)}async resolve(e,r){return await this.getResolverByLocator(e,r).resolve(e,r)}tryResolverByDescriptor(e,r){let o=this.resolvers.find(a=>a.supportsDescriptor(e,r));return o||null}getResolverByDescriptor(e,r){let o=this.resolvers.find(a=>a.supportsDescriptor(e,r));if(!o)throw new Error(`${Nn(r.project.configuration,e)} isn't supported by any available resolver`);return o}tryResolverByLocator(e,r){let o=this.resolvers.find(a=>a.supportsLocator(e,r));return o||null}getResolverByLocator(e,r){let o=this.resolvers.find(a=>a.supportsLocator(e,r));if(!o)throw new Error(`${kr(r.project.configuration,e)} isn't supported by any available resolver`);return o}}});var cE,IM=dt(()=>{bt();Ks();cE=class{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,r){let o=e.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(o+1),n=us(e,a);return r.fetcher.getLocalPath(n,r)}async fetch(e,r){let o=e.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(o+1),n=us(e,a),u=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(e,u,r)}getLocatorFilename(e){return nE(e)}async ensureVirtualLink(e,r,o){let a=r.packageFs.getRealPath(),n=o.project.configuration.get("virtualFolder"),u=this.getLocatorFilename(e),A=pi.makeVirtualPath(n,u,a),p=new ju(A,{baseFs:r.packageFs,pathUtils:V});return{...r,packageFs:p}}}});var uE,Xw,foe=dt(()=>{uE=class{static isVirtualDescriptor(e){return!!e.range.startsWith(uE.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(uE.protocol)}supportsDescriptor(e,r){return uE.isVirtualDescriptor(e)}supportsLocator(e,r){return uE.isVirtualLocator(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){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,o){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(e,r,o,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')}},Xw=uE;Xw.protocol="virtual:"});var AE,wM=dt(()=>{bt();Bd();AE=class{supports(e){return!!e.reference.startsWith(oi.protocol)}getLocalPath(e,r){return this.getWorkspace(e,r).cwd}async fetch(e,r){let o=this.getWorkspace(e,r).cwd;return{packageFs:new An(o),prefixPath:wt.dot,localPath:o}}getWorkspace(e,r){return r.project.getWorkspaceByCwd(e.reference.slice(oi.protocol.length))}}});function Zw(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function poe(t){return typeof t>"u"?3:Zw(t)?0:Array.isArray(t)?1:2}function DM(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Xtt(t){return Zw(t)&&DM(t,"onConflict")&&typeof t.onConflict=="string"}function Ztt(t){if(typeof t>"u")return{onConflict:"default",value:t};if(!Xtt(t))return{onConflict:"default",value:t};if(DM(t,"value"))return t;let{onConflict:e,...r}=t;return{onConflict:e,value:r}}function hoe(t,e){let r=Zw(t)&&DM(t,e)?t[e]:void 0;return Ztt(r)}function fE(t,e){return[t,e,goe]}function SM(t){return Array.isArray(t)?t[2]===goe:!1}function BM(t,e){if(Zw(t)){let r={};for(let o of Object.keys(t))r[o]=BM(t[o],e);return fE(e,r)}return Array.isArray(t)?fE(e,t.map(r=>BM(r,e))):fE(e,t)}function vM(t,e,r,o,a){let n,Line truncated
|
||||||
|
`,w.message,w.stack);var v=new Error("tunneling socket could not be established, cause="+w.message);v.code="ECONNRESET",e.request.emit("error",v),o.removeSocket(a)}};kf.prototype.removeSocket=function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var o=this.requests.shift();o&&this.createSocket(o,function(a){o.request.onSocket(a)})}};function Eoe(t,e){var r=this;kf.prototype.createSocket.call(r,t,function(o){var a=t.request.getHeader("host"),n=FM({},r.options,{socket:o,servername:a?a.replace(/:.*$/,""):t.host}),u=ert.connect(0,n);r.sockets[r.sockets.indexOf(o)]=u,e(u)})}function Coe(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function FM(t){for(var e=1,r=arguments.length;e<r;++e){var o=arguments[e];if(typeof o=="object")for(var a=Object.keys(o),n=0,u=a.length;n<u;++n){var A=a[n];o[A]!==void 0&&(t[A]=o[A])}}return t}var i0;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?i0=function(){var t=Array.prototype.slice.call(arguments);typeof t[0]=="string"?t[0]="TUNNEL: "+t[0]:t.unshift("TUNNEL:"),console.error.apply(console,t)}:i0=function(){};hE.debug=i0});var Boe=U((XLt,woe)=>{woe.exports=Ioe()});var Rf=U((Ff,Nx)=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});var voe=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function art(t){return voe.includes(t)}var lrt=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...voe];function crt(t){return lrt.includes(t)}var urt=["null","undefined","string","number","bigint","boolean","symbol"];function Art(t){return urt.includes(t)}function gE(t){return e=>typeof e===t}var{toString:Doe}=Object.prototype,e1=t=>{let e=Doe.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&Fe.domElement(t))return"HTMLElement";if(crt(e))return e},Jn=t=>e=>e1(e)===t;function Fe(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(Fe.observable(t))return"Observable";if(Fe.array(t))return"Array";if(Fe.buffer(t))return"Buffer";let e=e1(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}Fe.undefined=gE("undefined");Fe.string=gE("string");var frt=gE("number");Fe.number=t=>frt(t)&&!Fe.nan(t);Fe.bigint=gE("bigint");Fe.function_=gE("function");Fe.null_=t=>t===null;Fe.class_=t=>Fe.function_(t)&&t.toString().startsWith("class ");Fe.boolean=t=>t===!0||t===!1;Fe.symbol=gE("symbol");Fe.numericString=t=>Fe.string(t)&&!Fe.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));Fe.array=(t,e)=>Array.isArray(t)?Fe.function_(e)?t.every(e):!0:!1;Fe.buffer=t=>{var e,r,o,a;return(a=(o=(r=(e=t)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.isBuffer)===null||o===void 0?void 0:o.call(r,t))!==null&&a!==void 0?a:!1};Fe.nullOrUndefined=t=>Fe.null_(t)||Fe.undefined(t);Fe.object=t=>!Fe.null_(t)&&(typeof t=="object"||Fe.function_(t));Fe.iterable=t=>{var e;return Fe.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};Fe.asyncIterable=t=>{var e;return Fe.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};Fe.generator=t=>Fe.iterable(t)&&Fe.function_(t.next)&&Fe.function_(t.throw);Fe.asyncGenerator=t=>Fe.asyncIterable(t)&&Fe.function_(t.next)&&Fe.function_(t.throw);Fe.nativePromise=t=>Jn("Promise")(t);var prt=t=>{var e,r;return Fe.function_((e=t)===null||e===void 0?void 0:e.then)&&Fe.function_((r=t)===null||r===void 0?void 0:r.catch)};Fe.promise=t=>Fe.nativePromise(t)||prt(t);Fe.generatorFunction=Jn("GeneratorFunction");Fe.asyncGeneratorFunction=t=>e1(t)==="AsyncGeneratorFunction";Fe.asyncFunction=t=>e1(t)==="AsyncFunction";Fe.boundFunction=t=>Fe.function_(t)&&!t.hasOwnProperty("prototype");Fe.regExp=Jn("RegExp");Fe.date=Jn("Date");Fe.error=Jn("Error");Fe.map=t=>Jn("Map")(t);Fe.set=t=>Jn("Set")(t);Fe.weakMap=t=>Jn("WeakMap")(t);Fe.weakSet=t=>Jn("WeakSet")(t);Fe.int8Array=Jn("Int8Array");Fe.uint8Array=Jn("Uint8Array");Fe.uint8ClampedArray=Jn("Uint8ClampedArray");Fe.int16Array=Jn("Int16Array");Fe.uint16Array=Jn("Uint16Array");Fe.int32Array=Jn("Int32Array");Fe.uint32Array=Jn("Uint32Array");Fe.float32Array=Jn("Float32Array");Fe.float64Array=Jn("Float64Array");Fe.bigInt64Array=Jn("BigInt64Array");Fe.bigUint64Array=Jn("BigUint64Array");Fe.arrayBuffer=Jn("ArrayBuffer");Fe.sharedArrayBuffer=Jn("SharedArrayBuffer");Fe.dataView=Jn("DataView");Fe.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;Fe.urlInstance=t=>Jn(
Line truncated
|
||||||
|
Please report this to https://github.com/szmarczak/http2-wrapper/`);E(R)}return}o[0].resolve(b);return}}if(u in this.queue){if(A in this.queue[u]){this.queue[u][A].listeners.push(...o),this._tryToCreateNewSession(u,A);return}}else this.queue[u]={};let p=()=>{u in this.queue&&this.queue[u][A]===h&&(delete this.queue[u][A],Object.keys(this.queue[u]).length===0&&delete this.queue[u])},h=()=>{let C=`${A}:${u}`,w=!1;try{let v=wnt.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(C),...r});v[zo]=0,v[EE]=!1;let b=()=>v[zo]<v.remoteSettings.maxConcurrentStreams,E=!0;v.socket.once("session",N=>{this.tlsSessionCache.set(C,N)}),v.once("error",N=>{for(let{reject:_}of o)_(N);this.tlsSessionCache.delete(C)}),v.setTimeout(this.timeout,()=>{v.destroy()}),v.once("close",()=>{if(w){E&&this._freeSessionsCount--,this._sessionsCount--;let N=this.sessions[u];N.splice(N.indexOf(v),1),N.length===0&&delete this.sessions[u]}else{let N=new Error("Session closed without receiving a SETTINGS frame");N.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:_}of o)_(N);p()}this._tryToCreateNewSession(u,A)});let R=()=>{if(!(!(u in this.queue)||!b())){for(let N of v[zl])if(N in this.queue[u]){let{listeners:_}=this.queue[u][N];for(;_.length!==0&&b();)_.shift().resolve(v);let J=this.queue[u];if(J[N].listeners.length===0&&(delete J[N],Object.keys(J).length===0)){delete this.queue[u];break}if(!b())break}}};v.on("origin",()=>{v[zl]=v.originSet,b()&&(R(),n4(this.sessions[u],v))}),v.once("remoteSettings",()=>{if(v.ref(),v.unref(),this._sessionsCount++,h.destroyed){let N=new Error("Agent has been destroyed");for(let _ of o)_.reject(N);v.destroy();return}v[zl]=v.originSet;{let N=this.sessions;if(u in N){let _=N[u];_.splice(Dnt(_,v,Snt),0,v)}else N[u]=[v]}this._freeSessionsCount+=1,w=!0,this.emit("session",v),R(),p(),v[zo]===0&&this._freeSessionsCount>this.maxFreeSessions&&v.close(),o.length!==0&&(this.getSession(A,r,o),o.length=0),v.on("remoteSettings",()=>{R(),n4(this.sessions[u],v)})}),v[Iae]=v.request,v.request=(N,_)=>{if(v[EE])throw new Error("The session is gracefully closing. No new streams are allowed.");let J=v[Iae](N,_);return v.ref(),++v[zo],v[zo]===v.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,J.once("close",()=>{if(E=b(),--v[zo],!v.destroyed&&!v.closed&&(xnt(this.sessions[u],v),b()&&!v.closed)){E||(this._freeSessionsCount++,E=!0);let re=v[zo]===0;re&&v.unref(),re&&(this._freeSessionsCount>this.maxFreeSessions||v[EE])?v.close():(n4(this.sessions[u],v),R())}}),J}}catch(v){for(let b of o)b.reject(v);p()}};h.listeners=o,h.completed=!1,h.destroyed=!1,this.queue[u][A]=h,this._tryToCreateNewSession(u,A)})}request(e,r,o,a){return new Promise((n,u)=>{this.getSession(e,r,[{reject:u,resolve:A=>{try{n(A.request(o,a))}catch(p){u(p)}}}])})}createConnection(e,r){return iA.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let o=e.port||443,a=e.hostname||e.host;return typeof r.servername>"u"&&(r.servername=a),Int.connect(o,a,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[zo]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let o of r)o.destroy(e);for(let r of Object.values(this.queue))for(let o of Object.values(r))o.destroyed=!0;this.queue={}}get freeSessions(){return wae({agent:this,isFree:!0})}get busySessions(){return wae({agent:this,isFree:!1})}};iA.kCurrentStreamsCount=zo;iA.kGracefullyClosing=EE;vae.exports={Agent:iA,globalAgent:new iA}});var o4=U((BNt,Dae)=>{"use strict";var{Readable:Pnt}=Ie("stream"),s4=class extends Pnt{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()}};Dae.exports=s4});var a4=U((vNt,Sae)=>{"use strict";Sae.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 Pae=U((DNt,xae)=>{"use strict";xae.exports=(t,e,r)=>{for(let o of r)t.on(o,(...a)=>e.emit(o,...a))}});var Qae=U((SNt,bae)=>{"use strict";bae.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var Fae=U((PNt,kae)=>{"use strict";var CE=(t,e,r)=>{kae.exports[e]=class extends t{constructor(...a){super(typeof r=="string"?r
Line truncated
|
||||||
|
`).reverse(),A=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
|
||||||
|
`).reverse();for(;A.length!==0&&A[0]===u[0];)u.shift();this.stack=`${this.stack.slice(0,n)}${u.reverse().join(`
|
||||||
|
`)}${A.reverse().join(`
|
||||||
|
`)}`}}};yn.RequestError=Ji;var Zx=class extends Ji{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError"}};yn.MaxRedirectsError=Zx;var $x=class extends Ji{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError"}};yn.HTTPError=$x;var eP=class extends Ji{constructor(e,r){super(e.message,e,r),this.name="CacheError"}};yn.CacheError=eP;var tP=class extends Ji{constructor(e,r){super(e.message,e,r),this.name="UploadError"}};yn.UploadError=tP;var rP=class extends Ji{constructor(e,r,o){super(e.message,e,o),this.name="TimeoutError",this.event=e.event,this.timings=r}};yn.TimeoutError=rP;var a1=class extends Ji{constructor(e,r){super(e.message,e,r),this.name="ReadError"}};yn.ReadError=a1;var nP=class extends Ji{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e),this.name="UnsupportedProtocolError"}};yn.UnsupportedProtocolError=nP;var Lit=["socket","connect","continue","information","upgrade","timeout"],iP=class extends hle.Duplex{constructor(e,r={},o){super({autoDestroy:!1,highWaterMark:0}),this[wE]=0,this[vE]=0,this.requestInitialized=!1,this[Vx]=new Set,this.redirects=[],this[DE]=!1,this[zx]=!1,this[o1]=[],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 k4.IncomingMessage&&(this.options.headers={...h.headers,...this.options.headers})});let{json:u,body:A,form:p}=r;if((u||A||p)&&this._lockWrite(),yn.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,o)}catch(h){nt.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(h);return}(async()=>{var h;try{this.options.body instanceof hit.ReadStream&&await Fit(this.options.body);let{url:C}=this.options;if(!C)throw new TypeError("Missing `url` property");if(this.requestUrl=C.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(h=this[zs])===null||h===void 0||h.destroy();return}for(let w of this[o1])w();this[o1].length=0,this.requestInitialized=!0}catch(C){if(C instanceof Ji){this._beforeError(C);return}this.destroyed||this.destroy(C)}})()}static normalizeArguments(e,r,o){var a,n,u,A,p;let h=r;if(nt.default.object(e)&&!nt.default.urlInstance(e))r={...o,...e,...r};else{if(e&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...o,...r},e!==void 0&&(r.url=e),nt.default.urlInstance(r.url)&&(r.url=new s0.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),nt.assert.any([nt.default.string,nt.default.undefined],r.method),nt.assert.any([nt.default.object,nt.default.undefined],r.headers),nt.assert.any([nt.default.string,nt.default.urlInstance,nt.default.undefined],r.prefixUrl),nt.assert.any([nt.default.object,nt.default.undefined],r.cookieJar),nt.assert.any([nt.default.object,nt.default.string,nt.default.undefined],r.searchParams),nt.assert.any([nt.default.object,nt.default.string,nt.default.undefined],r.cache),nt.assert.any([nt.default.object,nt.default.number,nt.default.undefined],r.timeout),nt.assert.any([nt.default.object,nt.default.undefined],r.context),nt.assert.any([nt.default.object,nt.default.undefined],r.hooks),nt.assert.any([nt.default.boolean,nt.default.undefined],r.decompress),nt.assert.any([nt.default.boolean,nt.default.undefined],r.ignoreInvalidCookies),nt.assert.any([nt.default.boolean,nt.default.undefined],r.followRedirect),nt.assert.any([nt.default.number,nt.default.undefined],r.maxRedirects),nt.assert.any([nt.default.boolean,nt.default.undefined],r.throwHttpErrors),nt.assert.any([nt.default.boolean,nt.default.undefined],r.http2),nt.assert.any([nt.default.boolean,nt.default.undefined],r.allowGetBody),nt.assert.any([nt.default.string,nt.default.undefined],r.localAddress),nt.assert.any([Cle.isDnsLookupIpVersion,nt.default.undefined],r.dnsLookupIpVersion),nt.assert.any([nt.default.object,nt.default.undefined],r.https),nt.assert.any([nt.default.boolean,nt.default.undefined],r.rejectUnauthorized),r.https&&(nt.assert.any([nt.default.boolean,nt.default.undefined],r.https.rejectUnauthorized),nt.assert.any([nt.default.function_,nt.default.undefined],r.https.checkServerIdentity),nt.assert.any([nt.default.string,nt.default.object,nt.default.array,nt.default.undefined],r.https.certificateAuthority),nt.assert.any([nt.default.string,nt.default.object,nt.default.array,nt.default.undefined],r.https.key),nt.assert.any([nt.default.string,nt.default.object,nt.default.array,nt.default.undefined],r.https.certificate),nt.assert.any([nt.default.string,nt.default.undefined],r.https.passphrase),nt.assert.any([nt.default.string,nt.default.buffer,nt.default.array,nt.default.undefined],r.httpLine truncated
|
||||||
|
`)[3];return yst(e)}function z4(){return"availableParallelism"in fP.default?fP.default.availableParallelism():Math.max(1,fP.default.cpus().length)}var rce,fP,$le,pst,ece,tce,dst,mst,f1=dt(()=>{bt();rce=tt(Ie("module")),fP=tt(Ie("os"));pP();Wl();$le=new Map([["darwin","open"],["linux","xdg-open"],["win32","explorer.exe"]]).get(process.platform),pst=typeof $le<"u"?async t=>{try{return await X4($le,[t],{cwd:V.cwd()}),!0}catch{return!1}}:void 0;dst=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,mst=/\((\S*)(?::(\d+))(?::(\d+))\)/});function rU(t,e,r,o,a){let n=$w(r);if(o.isArray||o.type==="ANY"&&Array.isArray(n))return Array.isArray(n)?n.map((u,A)=>Z4(t,`${e}[${A}]`,u,o,a)):String(n).split(/,/).map(u=>Z4(t,e,u,o,a));if(Array.isArray(n))throw new Error(`Non-array configuration settings "${e}" cannot be an array`);return Z4(t,e,r,o,a)}function Z4(t,e,r,o,a){var p;let n=$w(r);switch(o.type){case"ANY":return Rx(n);case"SHAPE":return Bst(t,e,r,o,a);case"MAP":return vst(t,e,r,o,a)}if(n===null&&!o.isNullable&&o.default!==null)throw new Error(`Non-nullable configuration settings "${e}" cannot be set to null`);if((p=o.values)!=null&&p.includes(n))return n;let A=(()=>{if(o.type==="BOOLEAN"&&typeof n!="string")return Lw(n);if(typeof n!="string")throw new Error(`Expected value (${n}) to be a string`);let h=dN(n,{env:process.env});switch(o.type){case"ABSOLUTE_PATH":{let C=a,w=xM(r);return w&&(C=V.resolve(w,"..")),V.resolve(C,Ae.toPortablePath(h))}case"LOCATOR_LOOSE":return Qf(h,!1);case"NUMBER":return parseInt(h);case"LOCATOR":return Qf(h);case"BOOLEAN":return Lw(h);default:return h}})();if(o.values&&!o.values.includes(A))throw new Error(`Invalid value, expected one of ${o.values.join(", ")}`);return A}function Bst(t,e,r,o,a){let n=$w(r);if(typeof n!="object"||Array.isArray(n))throw new ot(`Object configuration settings "${e}" must be an object`);let u=nU(t,o,{ignoreArrays:!0});if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=`${e}.${A}`;if(!o.properties[A])throw new ot(`Unrecognized configuration settings found: ${e}.${A} - run "yarn config -v" to see the list of settings supported in Yarn`);u.set(A,rU(t,h,p,o.properties[A],a))}return u}function vst(t,e,r,o,a){let n=$w(r),u=new Map;if(typeof n!="object"||Array.isArray(n))throw new ot(`Map configuration settings "${e}" must be an object`);if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=o.normalizeKeys?o.normalizeKeys(A):A,C=`${e}['${h}']`,w=o.valueDefinition;u.set(h,rU(t,C,p,w,a))}return u}function nU(t,e,{ignoreArrays:r=!1}={}){switch(e.type){case"SHAPE":{if(e.isArray&&!r)return[];let o=new Map;for(let[a,n]of Object.entries(e.properties))o.set(a,nU(t,n));return o}break;case"MAP":return e.isArray&&!r?[]:new Map;case"ABSOLUTE_PATH":return e.default===null?null:t.projectCwd===null?V.isAbsolute(e.default)?V.normalize(e.default):e.isNullable?null:void 0:Array.isArray(e.default)?e.default.map(o=>V.resolve(t.projectCwd,o)):V.resolve(t.projectCwd,e.default);default:return e.default}}function gP(t,e,r){if(e.type==="SECRET"&&typeof t=="string"&&r.hideSecrets)return wst;if(e.type==="ABSOLUTE_PATH"&&typeof t=="string"&&r.getNativePaths)return Ae.fromPortablePath(t);if(e.isArray&&Array.isArray(t)){let o=[];for(let a of t)o.push(gP(a,e,r));return o}if(e.type==="MAP"&&t instanceof Map){let o=new Map;for(let[a,n]of t.entries())o.set(a,gP(n,e.valueDefinition,r));return o}if(e.type==="SHAPE"&&t instanceof Map){let o=new Map;for(let[a,n]of t.entries()){let u=e.properties[a];o.set(a,gP(n,u,r))}return o}return t}function Dst(){let t={};for(let[e,r]of Object.entries(process.env))e=e.toLowerCase(),e.startsWith(mP)&&(e=(0,ice.default)(e.slice(mP.length)),t[e]=r);return t}function dP(){let t=`${mP}rc_filename`;for(let[e,r]of Object.entries(process.env))if(e.toLowerCase()===t&&typeof r=="string")return r;return eU}var ice,c0,sce,$4,nce,Cst,Ist,SE,mP,eU,tU,wst,p1,oce,yP,hP,iU,Kc,Xe,h1=dt(()=>{bt();Mc();Ml();ice=tt(lJ()),c0=tt(Vg());_t();sce=tt(ed()),$4=Ie("stream");_se();oE();EM();CM();IM();foe();wM();Bd();moe();Lx();Kl();t0();AP();Wl();f1();n0();Ks();Cst=c0.GITHUB_ACTIONS&&process.env.GITHUB_EVENT_PATH?!(((nce=ae.readJsonSync(Ae.toPortablePath(process.env.GITHUB_EVENT_PATH)).repository)==null?void 0:nce.private)??!0):!1,Ist=new Set(["isTestEnv","injectNpmUser","injectNpmPassword","injectNpm2FaToken","binFolder","version","flags","profile","gpg","ignoreNode","wrapOutput","home","confDir"]),SE=/^(?!v)[a-z0-9._-]+$/i,mP="yarn_",eU=".yarnrc.yml",tU="yarn.lock",wst="********",p1=(C=>(C.ANY="ANY",C.BOOLEAN="BOOLEAN",C.ABSOLUTE_PATH="ABSOLUTE_PATH",C.LOCATOR="LOCATOR",C.LOCATOR_LOOSE="LOCATOR_LOOSE",C.NUMBER="NUMBER",C.STRING="STRING",C.SECRET="SECRET",C.SHAPE="SHAPE",C.MAP="MAP",C))(p1||{}),oce=Bt,yP=(r=>(r.JUNCTIONS="junctions",r.SYMLINKS="symlinks",r))(yP||{}),hP={lastUpdateCheck:{description:"Last timestamp we checked whether new Yarn versions were available",type:"STRING",default:nul
Line truncated
|
||||||
|
`);return{stdout:n,stderr:u}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let o of r.resolvers||[])e.push(new o);return new Dd([new Xw,new oi,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let o of r.fetchers||[])e.push(new o);return new lE([new cE,new AE,...e])}getLinkers(){let e=[];for(let r of this.plugins.values())for(let o of r.linkers||[])e.push(new o);return e}getSupportedArchitectures(){let e=A1(),r=this.get("supportedArchitectures"),o=r.get("os");o!==null&&(o=o.map(u=>u==="current"?e.os:u));let a=r.get("cpu");a!==null&&(a=a.map(u=>u==="current"?e.cpu:u));let n=r.get("libc");return n!==null&&(n=Zu(n,u=>u==="current"?e.libc??Zu.skip:u)),{os:o,cpu:a,libc:n}}async refreshPackageExtensions(){this.packageExtensions=new Map;let e=this.packageExtensions,r=(o,a,{userProvided:n=!1}={})=>{if(!Gc(o.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let u=new Lt;u.load(a,{yamlCompatibilityMode:!0});let A=qy(e,o.identHash),p=[];A.push([o.range,p]);let h={status:"inactive",userProvided:n,parentDescriptor:o};for(let C of u.dependencies.values())p.push({...h,type:"Dependency",descriptor:C});for(let C of u.peerDependencies.values())p.push({...h,type:"PeerDependency",descriptor:C});for(let[C,w]of u.peerDependenciesMeta)for(let[v,b]of Object.entries(w))p.push({...h,type:"PeerDependencyMeta",selector:C,key:v,value:b})};await this.triggerHook(o=>o.registerPackageExtensions,this,r);for(let[o,a]of this.get("packageExtensions"))r(r0(o,!0),qS(a),{userProvided:!0})}normalizeLocator(e){return Gc(e.reference)?us(e,`${this.get("defaultProtocol")}${e.reference}`):SE.test(e.reference)?us(e,`${this.get("defaultProtocol")}${e.reference}`):e}normalizeDependency(e){return Gc(e.range)?mn(e,`${this.get("defaultProtocol")}${e.range}`):SE.test(e.range)?mn(e,`${this.get("defaultProtocol")}${e.range}`):e}normalizeDependencyMap(e){return new Map([...e].map(([r,o])=>[r,this.normalizeDependency(o)]))}normalizePackage(e){let r=qw(e);if(this.packageExtensions==null)throw new Error("refreshPackageExtensions has to be called before normalizing packages");let o=this.packageExtensions.get(e.identHash);if(typeof o<"u"){let n=e.version;if(n!==null){for(let[u,A]of o)if(!!vd(n,u))for(let p of A)switch(p.status==="inactive"&&(p.status="redundant"),p.type){case"Dependency":typeof r.dependencies.get(p.descriptor.identHash)>"u"&&(p.status="active",r.dependencies.set(p.descriptor.identHash,this.normalizeDependency(p.descriptor)));break;case"PeerDependency":typeof r.peerDependencies.get(p.descriptor.identHash)>"u"&&(p.status="active",r.peerDependencies.set(p.descriptor.identHash,p.descriptor));break;case"PeerDependencyMeta":{let h=r.peerDependenciesMeta.get(p.selector);(typeof h>"u"||!Object.prototype.hasOwnProperty.call(h,p.key)||h[p.key]!==p.value)&&(p.status="active",vf(r.peerDependenciesMeta,p.selector,()=>({}))[p.key]=p.value)}break;default:hN(p);break}}}let a=n=>n.scope?`${n.scope}__${n.name}`:`${n.name}`;for(let n of r.peerDependenciesMeta.keys()){let u=Ys(n);r.peerDependencies.has(u.identHash)||r.peerDependencies.set(u.identHash,mn(u,"*"))}for(let n of r.peerDependencies.values()){if(n.scope==="types")continue;let u=a(n),A=nA("types",u),p=nn(A);r.peerDependencies.has(A.identHash)||r.peerDependenciesMeta.has(p)||(r.peerDependencies.set(A.identHash,mn(A,"*")),r.peerDependenciesMeta.set(p,{optional:!0}))}return r.dependencies=new Map(Sa(r.dependencies,([,n])=>Pa(n))),r.peerDependencies=new Map(Sa(r.peerDependencies,([,n])=>Pa(n))),r}getLimit(e){return vf(this.limits,e,()=>(0,sce.default)(this.get(e)))}async triggerHook(e,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=e(a);!n||await n(...r)}}async triggerMultipleHooks(e,r){for(let o of r)await this.triggerHook(e,...o)}async reduceHook(e,r,...o){let a=r;for(let n of this.plugins.values()){let u=n.hooks;if(!u)continue;let A=e(u);!A||(a=await A(a,...o))}return a}async firstHook(e,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=e(a);if(!n)continue;let u=await n(...r);if(typeof u<"u")return u}return null}},Xe=Kc;Xe.deleteProperty=Symbol(),Xe.telemetry=null});var Mr={};Yt(Mr,{EndStrategy:()=>lU,ExecError:()=>EP,PipeError:()=>g1,execvp:()=>X4,pipevp:()=>sA});function Pd(t){return t!==null&&typeof t.fd=="number"}function sU(){}function oU(){for(let t of bd)t.kill()}async function sA(t,e,{cwd:r,env:o=process.env,strict:a=!1,stdin:n=null,stdout:u,stderr:A,end:p=2}){let h=["pipe","pipe","pipe"];n===null?h[0]="ignore":Pd(n)&&(h[0]=n),Pd(u)&&(h[1]=u),Pd(A)&&(h[2]=A);let C=(0,aU.default)(t,e,{cwd:Ae.fromPortablePath(r),env:{...o,PWD:Ae.fromPortablePath(r)},stdio:h});bd.add(C),bd.size===1&&(process.on("SIGINT",sU),process.on("SIGTERM",oU)),!Pd(n)&&n!==null&&n.pipe(C.stdin),Pd(u)||C.stdout.pipe(u,{end:!1}),Pd(A)||C.stderr.pipe(A,{end:!1});let w=()=>{for(let v of new Set([u,A]))Pd(v)||v.end()};return new Promise((v,b)=>{C.on("error",E=>{bd.delete(C),bd.size===0&&(process.off(
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"']]}});var al,lce=dt(()=>{al=class extends Error{constructor(e){super(e),this.name="ShellError"}}});var wP={};Yt(wP,{fastGlobOptions:()=>Ace,isBraceExpansion:()=>uU,isGlobPattern:()=>Pst,match:()=>bst,micromatchOptions:()=>IP});function Pst(t){if(!CP.default.scan(t,IP).isGlob)return!1;try{CP.default.parse(t,IP)}catch{return!1}return!0}function bst(t,{cwd:e,baseFs:r}){return(0,cce.default)(t,{...Ace,cwd:Ae.fromPortablePath(e),fs:hD(uce.default,new _p(r))})}function uU(t){return CP.default.scan(t,IP).isBrace}var cce,uce,CP,IP,Ace,fce=dt(()=>{bt();cce=tt(gx()),uce=tt(Ie("fs")),CP=tt(Jo()),IP={strictBrackets:!0},Ace={onlyDirectories:!1,onlyFiles:!1}});function AU(){}function fU(){for(let t of Qd)t.kill()}function dce(t,e,r,o){return a=>{let n=a[0]instanceof oA.Transform?"pipe":a[0],u=a[1]instanceof oA.Transform?"pipe":a[1],A=a[2]instanceof oA.Transform?"pipe":a[2],p=(0,hce.default)(t,e,{...o,stdio:[n,u,A]});return Qd.add(p),Qd.size===1&&(process.on("SIGINT",AU),process.on("SIGTERM",fU)),a[0]instanceof oA.Transform&&a[0].pipe(p.stdin),a[1]instanceof oA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof oA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on("error",C=>{switch(Qd.delete(p),Qd.size===0&&(process.off("SIGINT",AU),process.off("SIGTERM",fU)),C.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: ${C.message}
|
||||||
|
`),h(1);break}}),p.on("close",C=>{Qd.delete(p),Qd.size===0&&(process.off("SIGINT",AU),process.off("SIGTERM",fU)),h(C!==null?C:129)})})}}}function mce(t){return e=>{let r=e[0]==="pipe"?new oA.PassThrough:e[0];return{stdin:r,promise:Promise.resolve().then(()=>t({stdin:r,stdout:e[1],stderr:e[2]}))}}}function BP(t,e){return bE.start(t,e)}function pce(t,e=null){let r=new oA.PassThrough,o=new gce.StringDecoder,a="";return r.on("data",n=>{let u=o.write(n),A;do if(A=u.indexOf(`
|
||||||
|
`),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",t(e!==null?`${e} ${p}`:p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&t(e!==null?`${e} ${n}`:n)}),r}function yce(t,{prefix:e}){return{stdout:pce(r=>t.stdout.write(`${r}
|
||||||
|
`),t.stdout.isTTY?e:null),stderr:pce(r=>t.stderr.write(`${r}
|
||||||
|
`),t.stderr.isTTY?e:null)}}var hce,oA,gce,Qd,$l,pU,bE,hU=dt(()=>{hce=tt($R()),oA=Ie("stream"),gce=Ie("string_decoder"),Qd=new Set;$l=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},pU=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}},bE=class{constructor(e,r){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=e,this.implementation=r}static start(e,{stdin:r,stdout:o,stderr:a}){let n=new bE(null,e);return n.stdin=r,n.stdout=o,n.stderr=a,n}pipeTo(e,r=1){let o=new bE(this,e),a=new pU;return o.pipe=a,o.stdout=this.stdout,o.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),o}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 o;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");o=this.stderr,e[2]=o.get();let a=this.implementation(e);return this.pipe&&this.pipe.attach(a.stdin),await a.promise.then(n=>(r.close(),o.close(),n))}async run(){let e=[];for(let o=this;o;o=o.ancestor)e.push(o.exec());return(await Promise.all(e))[0]}}});var C1={};Yt(C1,{EntryCommand:()=>xE,ShellError:()=>al,execute:()=>PE,globUtils:()=>wP});function Ece(t,e,r){let o=new ll.PassThrough({autoDestroy:!0});switch(t){case 0:(e&1)===1&&r.stdin.pipe(o,{end:!1}),(e&2)===2&&r.stdin instanceof ll.Writable&&o.pipe(r.stdin,{end:!1});break;case 1:(e&1)===1&&r.stdout.pipe(o,{end:!1}),(e&2)===2&&o.pipe(r.stdout,{end:!1});break;case 2:(e&1)===1&&r.stderr.pipe(o,{end:!1}),(e&2)===2&&o.pipe(r.stderr,{end:!1});break;default:throw new al(`Bad file descriptor: "${t}"`)}return o}function DP(t,e={}){let r={...t,...e};return r.environment={...t.environment,...e.environment},r.variables={...t.variables,...e.variables},r}async function Fst(t,e,r){let o=[],a=new ll.PassThrough;return a.on("data",n=>o.push(n)),await SP(t,e,DP(r,{stdout:a})),Buffer.concat(o).toString().replace(/[\r\n]+$/,"")}async function Cce(t,e,r){let o=t.map(async n=>{let u=await kd(n.args,e,r);return{name:n.name,value:u.join(" ")}});return(await Promise.all(o)).reduce((n,u)=>(n[u.name]=u.value,n),{})}function vP(t){return t.match(/[^ \r\n\t]+/g)||[]}async function Sce(t,e,r,o,a=o){switch(t.name){case"$":o(String(process.pid));break;case"#":o(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 u=vP(n);for(let A=0;A<u.length-1;++A)a(u[A]);o(u[u.length-1])}break;case"*":{let n=e.args.join(" ");if(t.quoted)o(n);else for(let u of vP(n))a(u)}break;case"PPID":o(String(process.ppid));break;case"RANDOM":o(String(Math.floor(Math.random()*32768)));break;default:{let n=parseInt(t.name,10),u,A=Number.isFinite(n);if(A?n>=0&&n<e.args.length&&(u=e.args[n]):Object.prototype.hasOwnProperty.call(r.variables,t.name)?u=r.variables[t.name]:Object.prototype.hasOwnProperty.call(r.environment,t.name)&&(u=r.environment[t.name]),typeof u<"u"&&t.alternativeValue?u=(await kd(t.alternativeValue,e,r)).join(" "):typeof u>"u"&&(t.defaultValue?u=(await kd(t.defaultValue,e,r)).join(" "):t.alternativeValue&&(u="")),typeof u>"u")throw A?new al(`Unbound argument #${n}`):new al(`Unbound variable "${t.name}"`);if(t.quoted)o(u);else{let p=vP(u);for(let C=0;C<p.length-1;++C)a(p[C]);let h=p[p.length-1];typeof h<"u"&&o(h)}}break}}async function m1(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 o=[];await Sce({...t,quoted:!0},e,r,n=>o.push(n));let a=Number(o.join(" "));return Number.isNaN(a)?m1({type:"variable",name:o.join(" ")},e,r):m1({type:"number",value:a},e,r)}else return Rst[t.type](await m1(t.left,e,r),await m1(t.right,e,r))}async function kd(t,e,r){let o=new Map,a=[],n=[],u=C=>{n.push(C)},A=()=>{n.length>0&&a.push(n.join("")),n=[]},p=C=>{u(C),A()},h=(C,w,v)=>{let b=JSON.stringify({type:C,fd:w}),E=o.get(b);typeof E>"u"&&o.set(b,E=[]),E.push(v)};for(let C of t){let w=!1;switch(C.type){case"redirection":{let v=await kd(C.args,e,r);for(let b of v)h(C.subtype,C.fd,b)}break;case"argument":for(let v of C.segments)switch(v.type){case"text":u(v.text);break;case"glob":u(v.pattern),w=!0;break;case"shell":{let b=await Fst(v.shell,e,r);if(v.quoted)u(b);else{let E=vP(b);for(let R=0;R<E.length-1;++R)p(E[R]);u(E[E.length-1])}}break;case"variable":await Sce(v,e,r,u,p);break;case"arithmetic":u(String(await m1(v.arithmetic,e,r)));break}break}if(A(),w){let v=a.pop();if(typeof v>"u")throw n
Line truncated
|
||||||
|
`)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${p}, '${u(cy(t))}' has ended
|
||||||
|
`)})),0}return await wce(t,e,r)}async function Ost(t,e,r,{background:o=!1}={}){let a,n=A=>{a=A,r.variables["?"]=String(A)},u=async A=>{try{return await Nst(A.chain,e,r,{background:o&&typeof A.then>"u"})}catch(p){if(!(p instanceof al))throw p;return r.stderr.write(`${p.message}
|
||||||
|
`),1}};for(n(await u(t));t.then;){if(r.exitCode!==null)return r.exitCode;switch(t.then.type){case"&&":a===0&&n(await u(t.then.line));break;case"||":a!==0&&n(await u(t.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${t.then.type}"`)}t=t.then.line}return a}async function SP(t,e,r){let o=r.backgroundJobs;r.backgroundJobs=[];let a=0;for(let{command:n,type:u}of t){if(a=await Ost(n,e,r,{background:u==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(a)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=o,a}function xce(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=>E1(e))||"alternativeValue"in t&&!!t.alternativeValue&&t.alternativeValue.some(e=>E1(e));case"arithmetic":return gU(t.arithmetic);case"shell":return dU(t.shell);default:return!1}}function E1(t){switch(t.type){case"redirection":return t.args.some(e=>E1(e));case"argument":return t.segments.some(e=>xce(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${t.type}"`)}}function gU(t){switch(t.type){case"variable":return xce(t);case"number":return!1;default:return gU(t.left)||gU(t.right)}}function dU(t){return t.some(({command:e})=>{for(;e;){let r=e.chain;for(;r;){let o;switch(r.type){case"subshell":o=dU(r.subshell);break;case"command":o=r.envs.some(a=>a.args.some(n=>E1(n)))||r.args.some(a=>E1(a));break}if(o)return!0;if(!r.then)break;r=r.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function PE(t,e=[],{baseFs:r=new Pn,builtins:o={},cwd:a=Ae.toPortablePath(process.cwd()),env:n=process.env,stdin:u=process.stdin,stdout:A=process.stdout,stderr:p=process.stderr,variables:h={},glob:C=wP}={}){let w={};for(let[E,R]of Object.entries(n))typeof R<"u"&&(w[E]=R);let v=new Map(kst);for(let[E,R]of Object.entries(o))v.set(E,R);u===null&&(u=new ll.PassThrough,u.end());let b=CD(t,C);if(!dU(b)&&b.length>0&&e.length>0){let{command:E}=b[b.length-1];for(;E.then;)E=E.then.line;let R=E.chain;for(;R.then;)R=R.then.chain;R.type==="command"&&(R.args=R.args.concat(e.map(N=>({type:"argument",segments:[{type:"text",text:N}]}))))}return await SP(b,{args:e,baseFs:r,builtins:v,initialStdin:u,initialStdout:A,initialStderr:p,glob:C},{cwd:a,environment:w,exitCode:null,procedures:{},stdin:u,stdout:A,stderr:p,variables:Object.assign({},h,{["?"]:0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var Bce,vce,ll,Dce,Qst,kst,Rst,d1=dt(()=>{bt();Ml();Bce=tt(mL()),vce=Ie("os"),ll=Ie("stream"),Dce=Ie("util");ace();lce();fce();hU();hU();Qst=(0,Dce.promisify)(setTimeout);kst=new Map([["cd",async([t=(0,vce.homedir)(),...e],r,o)=>{let a=V.resolve(o.cwd,Ae.toPortablePath(t));if(!(await r.baseFs.statPromise(a).catch(u=>{throw u.code==="ENOENT"?new al(`cd: no such file or directory: ${t}`):u})).isDirectory())throw new al(`cd: not a directory: ${t}`);return o.cwd=a,0}],["pwd",async(t,e,r)=>(r.stdout.write(`${Ae.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,o)=>o.exitCode=parseInt(t??o.variables["?"],10)],["echo",async(t,e,r)=>(r.stdout.write(`${t.join(" ")}
|
||||||
|
`),0)],["sleep",async([t],e,r)=>{if(typeof t>"u")throw new al("sleep: missing operand");let o=Number(t);if(Number.isNaN(o))throw new al(`sleep: invalid time interval '${t}'`);return await Qst(1e3*o,0)}],["__ysh_run_procedure",async(t,e,r)=>{let o=r.procedures[t[0]];return await BP(o,{stdin:new $l(r.stdin),stdout:new $l(r.stdout),stderr:new $l(r.stderr)}).run()}],["__ysh_set_redirects",async(t,e,r)=>{let o=r.stdin,a=r.stdout,n=r.stderr,u=[],A=[],p=[],h=0;for(;t[h]!=="--";){let w=t[h++],{type:v,fd:b}=JSON.parse(w),E=J=>{switch(b){case null:case 0:u.push(J);break;default:throw new Error(`Unsupported file descriptor: "${b}"`)}},R=J=>{switch(b){case null:case 1:A.push(J);break;case 2:p.push(J);break;default:throw new Error(`Unsupported file descriptor: "${b}"`)}},N=Number(t[h++]),_=h+N;for(let J=h;J<_;++h,++J)switch(v){case"<":E(()=>e.baseFs.createReadStream(V.resolve(r.cwd,Ae.toPortablePath(t[J]))));break;case"<<<":E(()=>{let re=new ll.PassThrough;return process.nextTick(()=>{re.write(`${t[J]}
|
||||||
|
`),re.end()}),re});break;case"<&":E(()=>Ece(Number(t[J]),1,r));break;case">":case">>":{let re=V.resolve(r.cwd,Ae.toPortablePath(t[J]));R(re==="/dev/null"?new ll.Writable({autoDestroy:!0,emitClose:!0,write(oe,pe,he){setImmediate(he)}}):e.baseFs.createWriteStream(re,v===">>"?{flags:"a"}:void 0))}break;case">&":R(Ece(Number(t[J]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${v}"`)}}if(u.length>0){let w=new ll.PassThrough;o=w;let v=b=>{if(b===u.length)w.end();else{let E=u[b]();E.pipe(w,{end:!1}),E.on("end",()=>{v(b+1)})}};v(0)}if(A.length>0){let w=new ll.PassThrough;a=w;for(let v of A)w.pipe(v)}if(p.length>0){let w=new ll.PassThrough;n=w;for(let v of p)w.pipe(v)}let C=await BP(y1(t.slice(h+1),e,r),{stdin:new $l(o),stdout:new $l(a),stderr:new $l(n)}).run();return await Promise.all(A.map(w=>new Promise((v,b)=>{w.on("error",E=>{b(E)}),w.on("close",()=>{v()}),w.end()}))),await Promise.all(p.map(w=>new Promise((v,b)=>{w.on("error",E=>{b(E)}),w.on("close",()=>{v()}),w.end()}))),C}]]);Rst={addition:(t,e)=>t+e,subtraction:(t,e)=>t-e,multiplication:(t,e)=>t*e,division:(t,e)=>Math.trunc(t/e)}});var xP=U((aMt,Pce)=>{function Mst(t,e){for(var r=-1,o=t==null?0:t.length,a=Array(o);++r<o;)a[r]=e(t[r],r,t);return a}Pce.exports=Mst});var Tce=U((lMt,Rce)=>{var bce=ud(),Ust=xP(),_st=Gl(),Hst=aE(),qst=1/0,Qce=bce?bce.prototype:void 0,kce=Qce?Qce.toString:void 0;function Fce(t){if(typeof t=="string")return t;if(_st(t))return Ust(t,Fce)+"";if(Hst(t))return kce?kce.call(t):"";var e=t+"";return e=="0"&&1/t==-qst?"-0":e}Rce.exports=Fce});var I1=U((cMt,Lce)=>{var jst=Tce();function Gst(t){return t==null?"":jst(t)}Lce.exports=Gst});var mU=U((uMt,Nce)=>{function Wst(t,e,r){var o=-1,a=t.length;e<0&&(e=-e>a?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var n=Array(a);++o<a;)n[o]=t[o+e];return n}Nce.exports=Wst});var Mce=U((AMt,Oce)=>{var Yst=mU();function Kst(t,e,r){var o=t.length;return r=r===void 0?o:r,!e&&r>=o?t:Yst(t,e,r)}Oce.exports=Kst});var yU=U((fMt,Uce)=>{var Jst="\\ud800-\\udfff",Vst="\\u0300-\\u036f",zst="\\ufe20-\\ufe2f",Xst="\\u20d0-\\u20ff",Zst=Vst+zst+Xst,$st="\\ufe0e\\ufe0f",eot="\\u200d",tot=RegExp("["+eot+Jst+Zst+$st+"]");function rot(t){return tot.test(t)}Uce.exports=rot});var Hce=U((pMt,_ce)=>{function not(t){return t.split("")}_ce.exports=not});var Vce=U((hMt,Jce)=>{var qce="\\ud800-\\udfff",iot="\\u0300-\\u036f",sot="\\ufe20-\\ufe2f",oot="\\u20d0-\\u20ff",aot=iot+sot+oot,lot="\\ufe0e\\ufe0f",cot="["+qce+"]",EU="["+aot+"]",CU="\\ud83c[\\udffb-\\udfff]",uot="(?:"+EU+"|"+CU+")",jce="[^"+qce+"]",Gce="(?:\\ud83c[\\udde6-\\uddff]){2}",Wce="[\\ud800-\\udbff][\\udc00-\\udfff]",Aot="\\u200d",Yce=uot+"?",Kce="["+lot+"]?",fot="(?:"+Aot+"(?:"+[jce,Gce,Wce].join("|")+")"+Kce+Yce+")*",pot=Kce+Yce+fot,hot="(?:"+[jce+EU+"?",EU,Gce,Wce,cot].join("|")+")",got=RegExp(CU+"(?="+CU+")|"+hot+pot,"g");function dot(t){return t.match(got)||[]}Jce.exports=dot});var Xce=U((gMt,zce)=>{var mot=Hce(),yot=yU(),Eot=Vce();function Cot(t){return yot(t)?Eot(t):mot(t)}zce.exports=Cot});var $ce=U((dMt,Zce)=>{var Iot=Mce(),wot=yU(),Bot=Xce(),vot=I1();function Dot(t){return function(e){e=vot(e);var r=wot(e)?Bot(e):void 0,o=r?r[0]:e.charAt(0),a=r?Iot(r,1).join(""):e.slice(1);return o[t]()+a}}Zce.exports=Dot});var tue=U((mMt,eue)=>{var Sot=$ce(),xot=Sot("toUpperCase");eue.exports=xot});var IU=U((yMt,rue)=>{var Pot=I1(),bot=tue();function Qot(t){return bot(Pot(t).toLowerCase())}rue.exports=Qot});var nue=U((EMt,PP)=>{function kot(){var t=0,e=1,r=2,o=3,a=4,n=5,u=6,A=7,p=8,h=9,C=10,w=11,v=12,b=13,E=14,R=15,N=16,_=17,J=0,re=1,oe=2,pe=3,he=4;function ve(g,De){return 55296<=g.charCodeAt(De)&&g.charCodeAt(De)<=56319&&56320<=g.charCodeAt(De+1)&&g.charCodeAt(De+1)<=57343}function ge(g,De){De===void 0&&(De=0);var Ee=g.charCodeAt(De);if(55296<=Ee&&Ee<=56319&&De<g.length-1){var de=Ee,ne=g.charCodeAt(De+1);return 56320<=ne&&ne<=57343?(de-55296)*1024+(ne-56320)+65536:de}if(56320<=Ee&&Ee<=57343&&De>=1){var de=g.charCodeAt(De-1),ne=Ee;return 55296<=de&&de<=56319?(de-55296)*1024+(ne-56320)+65536:ne}return Ee}function le(g,De,Ee){var de=[g].concat(De).concat([Ee]),ne=de[de.length-2],Z=Ee,me=de.lastIndexOf(E);if(me>1&&de.slice(1,me).every(function(H){return H==o})&&[o,b,_].indexOf(g)==-1)return oe;var be=de.lastIndexOf(a);if(be>0&&de.slice(1,be).every(function(H){return H==a})&&[v,a].indexOf(ne)==-1)return de.filter(function(H){return H==a}).length%2==1?pe:he;if(ne==t&&Z==e)return J;if(ne==r||ne==t||ne==e)return Z==E&&De.every(function(H){return H==o})?oe:re;if(Z==r||Z==t||Z==e)return re;if(ne==u&&(Z==u||Z==A||Z==h||Z==C))return J;if((ne==h||ne==A)&&(Z==A||Z==p))return J;if((ne==C||ne==p)&&Z==p)return J;if(Z==o||Z==R)return J;if(Z==n)return J;if(ne==v)return J;var ut=de.indexOf(o)!=-1?de.lastIndexOf(o)-1:de.length-2;return[b,_].indexOf(de[ut])!=-1&&de.slice(ut+1,-1).every(function(H){return H==o})&&Z==E||ne==R&&[N,_].indexOf(Z)!=-1?J:De.indexOf(a)!=-1?oe:ne==a&&Z==a?J:re}this.nextBreak=function(g,De){if(De===void 0&&(De=0),De<0
Line truncated
|
||||||
|
`,end:t=>`::endgroup::
|
||||||
|
`}:kP.default.TRAVIS?{start:t=>`travis_fold:start:${t}
|
||||||
|
`,end:t=>`travis_fold:end:${t}
|
||||||
|
`}:kP.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,lue=new Date,Not=["iTerm.app","Apple_Terminal","WarpTerminal","vscode"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,Oot=t=>t,FP=Oot({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}}),Mot=Not&&Object.keys(FP).find(t=>{let e=FP[t];return!(e.date&&(e.date[0]!==lue.getDate()||e.date[1]!==lue.getMonth()+1))})||"default";Ct=class extends Vs{constructor({configuration:r,stdout:o,json:a=!1,includeNames:n=!0,includePrefix:u=!0,includeFooter:A=!0,includeLogs:p=!a,includeInfos:h=p,includeWarnings:C=p,forgettableBufferSize:w=Lot,forgettableNames:v=new Set}){super();this.uncommitted=new Set;this.cacheHitCount=0;this.cacheMissCount=0;this.lastCacheMiss=null;this.warningCount=0;this.errorCount=0;this.startTime=Date.now();this.indent=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;this.forgettableLines=[];if(Mw(this,{configuration:r}),this.configuration=r,this.forgettableBufferSize=w,this.forgettableNames=new Set([...v,...Tot]),this.includeNames=n,this.includePrefix=u,this.includeFooter=A,this.includeInfos=h,this.includeWarnings=C,this.json=a,this.stdout=o,r.get("enableProgressBars")&&!a&&o.isTTY&&o.columns>22){let b=r.get("progressBarStyle")||Mot;if(!Object.prototype.hasOwnProperty.call(FP,b))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=FP[b];let E=12,R=Math.max(0,Math.min(o.columns-E,80));this.progressMaxScaledSize=Math.floor(this.progressStyle.size*R/80)}}static async start(r,o){let a=new this(r),n=process.emitWarning;process.emitWarning=(u,A)=>{if(typeof u!="string"){let h=u;u=h.message,A=A??h.name}let p=typeof A<"u"?`${A}: ${u}`:u;a.reportWarning(0,p)};try{await o(a)}catch(u){a.reportExceptionOnce(u)}finally{await a.finalize(),process.emitWarning=n}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(r){this.cacheHitCount+=1}reportCacheMiss(r,o){this.lastCacheMiss=r,this.cacheMissCount+=1,typeof o<"u"&&!this.configuration.get("preferAggregateCacheInfo")&&this.reportInfo(13,o)}startSectionSync({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r==null||r()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&(o==null||o(p-A))}}async startSectionPromise({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r==null||r()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return await n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&(o==null||o(p-A))}}startTimerImpl(r,o,a){return{cb:typeof o=="function"?o:a,reportHeader:()=>{this.reportInfo(null,`\u250C ${r}`),this.indent+=1,QP!==null&&!this.json&&this.includeInfos&&this.stdout.write(QP.start(r))},reportFooter:A=>{this.indent-=1,QP!==null&&!this.json&&this.includeInfos&&this.stdout.write(QP.end(r)),this.configuration.get("enableTimers")&&A>200?this.reportInfo(null,`\u2514 Completed in ${Kt(this.configuration,A,Bt.DURATION)}`):this.reportInfo(null,"\u2514 Completed")},skipIfEmpty:(typeof o=="function"?{}:o).skipIfEmpty}}startTimerSync(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionSync(u,n)}async startTimerPromise(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionPromise(u,n)}async startCacheReport(r){let o=this.configuration.get("preferAggregateCacheInfo")?{cacheHitCount:this.cacheHitCount,cacheMissCount:this.cacheMissCount}:null;try{return await r()}catch(a){throw this.reportExceptionOnce(a),a}finally{o!==null&&this.reportCacheChanges(o)}}reportSeparator(){this.indent===0?this.writeLineWithForgettableReset(""):this.reportInfo(null,"")}reportInfo(r,o){if(!this.includeInfos)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"",u=`${this.formatPrefix(n,"blueBright")}${o}`;if(this.json)this.reportJson({type:"info",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:o});else if(this.forgettableNames.has(r))if(this.forgettableLines.push(u),this.forgettableLines.length>this.forgettableBufferSize){for(;this.forgettableLines.length>this.forgettableBufferSize;)this.forgettableLines.shift();this.writeLines(this.forgettableLines,{truncate:!0})}else this.writeLine(u,{truncate:!0});else this.writeLineWithForgettableReset(u)}reportWarning(r,o){if(this.warningCount+=1,!this.includeWarnings)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.rep
Line truncated
|
||||||
|
`),this.writeProgress()}writeLineWithForgettableReset(r,{truncate:o}={}){this.forgettableLines=[],this.writeLine(r,{truncate:o})}writeLines(r,{truncate:o}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:o})}
|
||||||
|
`);this.writeProgress()}reportCacheChanges({cacheHitCount:r,cacheMissCount:o}){let a=this.cacheHitCount-r,n=this.cacheMissCount-o;if(a===0&&n===0)return;let u="";this.cacheHitCount>1?u+=`${this.cacheHitCount} packages were already cached`:this.cacheHitCount===1?u+=" - one package was already cached":u+="No packages were cached",this.cacheHitCount>0?this.cacheMissCount>1?u+=`, ${this.cacheMissCount} had to be fetched`:this.cacheMissCount===1&&(u+=`, one had to be fetched (${kr(this.configuration,this.lastCacheMiss)})`):this.cacheMissCount>1?u+=` - ${this.cacheMissCount} packages had to be fetched`:this.cacheMissCount===1&&(u+=` - one package had to be fetched (${kr(this.configuration,this.lastCacheMiss)})`),this.reportInfo(13,u)}commit(){let r=this.uncommitted;this.uncommitted=new Set;for(let o of r)o.committed=!0,o.action()}clearProgress({delta:r=0,clear:o=!1}){this.progressStyle!==null&&this.progress.size+r>0&&(this.stdout.write(`\x1B[${this.progress.size+r}A`),(r>0||o)&&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>aue&&(this.progressFrame=(this.progressFrame+1)%oue.length,this.progressTime=r);let o=oue[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),C=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=` ${h}${C}`}let u=this.formatName(null),A=u?`${u}: `:"",p=a.definition.title?` ${a.definition.title}`:"";this.stdout.write(`${Kt(this.configuration,"\u27A4","blueBright")} ${A}${o}${n}${p}
|
||||||
|
`)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},aue)}refreshProgress({delta:r=0,force:o=!1}={}){let a=!1,n=!1;if(o||this.progress.size===0)a=!0;else for(let u of this.progress.values()){let A=typeof u.definition.progress<"u"?Math.trunc(this.progressMaxScaledSize*u.definition.progress):void 0,p=u.lastScaledSize;u.lastScaledSize=A;let h=u.lastTitle;if(u.lastTitle=u.definition.title,A!==p||(n=h!==u.definition.title)){a=!0;break}}a&&(this.clearProgress({delta:r,clear:n}),this.writeProgress())}truncate(r,{truncate:o}={}){return this.progressStyle===null&&(o=!1),typeof o>"u"&&(o=this.configuration.get("preferTruncatedLines")),o&&(r=(0,cue.default)(r,0,this.stdout.columns-1)),r}formatName(r){return this.includeNames?uue(r,{configuration:this.configuration,json:this.json}):""}formatPrefix(r,o){return this.includePrefix?`${Kt(this.configuration,"\u27A4",o)} ${r}${this.formatIndent()}`:""}formatNameWithHyperlink(r){return this.includeNames?wU(r,{configuration:this.configuration,json:this.json}):""}formatIndent(){return"\u2502 ".repeat(this.indent)}}});var On,BU=dt(()=>{On="4.0.0-rc.40"});var sn={};Yt(sn,{PackageManager:()=>pue,detectPackageManager:()=>hue,executePackageAccessibleBinary:()=>Eue,executePackageScript:()=>TP,executePackageShellcode:()=>vU,executeWorkspaceAccessibleBinary:()=>Wot,executeWorkspaceLifecycleScript:()=>mue,executeWorkspaceScript:()=>due,getPackageAccessibleBinaries:()=>LP,getWorkspaceAccessibleBinaries:()=>yue,hasPackageScript:()=>qot,hasWorkspaceScript:()=>DU,makeScriptEnv:()=>w1,maybeExecuteWorkspaceLifecycleScript:()=>Got,prepareExternalProject:()=>Hot});async function Lf(t,e,r,o=[]){if(process.platform==="win32"){let a=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${o.map(n=>`"${n.replace('"','""')}"`).join(" ")} %*`;await ae.writeFilePromise(V.format({dir:t,name:e,ext:".cmd"}),a)}await ae.writeFilePromise(V.join(t,e),`#!/bin/sh
|
||||||
|
exec "${r}" ${o.map(a=>`'${a.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@"
|
||||||
|
`,{mode:493})}async function hue(t){let e=await Lt.tryFind(t);if(e!=null&&e.packageManager){let o=Sx(e.packageManager);if(o!=null&&o.name){let a=`found ${JSON.stringify({packageManager:e.packageManager})} in manifest`,[n]=o.reference.split(".");switch(o.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 ae.readFilePromise(V.join(t,Nr.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'}:ae.existsSync(V.join(t,"package-lock.json"))?{packageManager:"npm",reason:`found npm's "package-lock.json" lockfile`}:ae.existsSync(V.join(t,"pnpm-lock.yaml"))?{packageManager:"pnpm",reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function w1({project:t,locator:e,binFolder:r,ignoreCorepack:o,lifecycleScript:a}){let n={};for(let[h,C]of Object.entries(process.env))typeof C<"u"&&(n[h.toLowerCase()!=="path"?h:"PATH"]=C);let u=Ae.fromPortablePath(r);n.BERRY_BIN_FOLDER=Ae.fromPortablePath(u);let A=process.env.COREPACK_ROOT&&!o?Ae.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([Lf(r,"node",process.execPath),...On!==null?[Lf(r,"run",process.execPath,[A,"run"]),Lf(r,"yarn",process.execPath,[A]),Lf(r,"yarnpkg",process.execPath,[A]),Lf(r,"node-gyp",process.execPath,[A,"run","--top-level","node-gyp"])]:[]]),t&&(n.INIT_CWD=Ae.cwd(),n.PROJECT_CWD=Ae.fromPortablePath(t.cwd)),n.PATH=n.PATH?`${u}${Ae.delimiter}${n.PATH}`:`${u}`,n.npm_execpath=`${u}${Ae.sep}yarn`,n.npm_node_execpath=`${u}${Ae.sep}node`,e){if(!t)throw new Error("Assertion failed: Missing project");let h=t.tryWorkspaceByLocator(e),C=h?h.manifest.version??"":t.storedPackages.get(e.locatorHash).version??"";n.npm_package_name=nn(e),n.npm_package_version=C;let w;if(h)w=h.cwd;else{let v=t.storedPackages.get(e.locatorHash);if(!v)throw new Error(`Package for ${kr(t.configuration,e)} not found in the project`);let b=t.configuration.getLinkers(),E={project:t,report:new Ct({stdout:new u0.PassThrough,configuration:t.configuration})},R=b.find(N=>N.supportsPackage(v,E));if(!R)throw new Error(`The package ${kr(t.configuration,v)} isn't supported by any of the available linkers`);w=await R.findPackageLocation(v,E)}n.npm_package_json=Ae.fromPortablePath(V.join(w,Nr.manifest))}let p=On!==null?`yarn/${On}`:`yarn/${Jp("@yarnpkg/core").version}-core`;return n.npm_config_user_agent=`${p} npm/? node/${process.version} ${process.platform} ${process.arch}`,a&&(n.npm_lifecycle_event=a),t&&await t.configuration.triggerHook(h=>h.setupScriptEnvironment,t,n,async(h,C,w)=>await Lf(r,Ni(h),C,w)),n}async function Hot(t,e,{configuration:r,report:o,workspace:a=null,locator:n=null}){await _ot(async()=>{await ae.mktempPromise(async u=>{let A=V.join(u,"pack.log"),p=null,{stdout:h,stderr:C}=r.getSubprocessStreams(A,{prefix:Ae.fromPortablePath(t),report:o}),w=n&&jc(n)?Gw(n):n,v=w?Yl(w):"an external project";h.write(`Packing ${v} from sources
|
||||||
|
`);let b=await hue(t),E;b!==null?(h.write(`Using ${b.packageManager} for bootstrap. Reason: ${b.reason}
|
||||||
|
|
||||||
|
`),E=b.packageManager):(h.write(`No package manager configuration detected; defaulting to Yarn
|
||||||
|
|
||||||
|
`),E="Yarn");let R=E==="Yarn"&&!(b!=null&&b.packageManagerField);await ae.mktempPromise(async N=>{let _=await w1({binFolder:N,ignoreCorepack:R}),re=new Map([["Yarn Classic",async()=>{let pe=a!==null?["workspace",a]:[],he=V.join(t,Nr.manifest),ve=await ae.readFilePromise(he),ge=await sA(process.execPath,[process.argv[1],"set","version","classic","--only-if-needed","--yarn-path"],{cwd:t,env:_,stdin:p,stdout:h,stderr:C,end:1});if(ge.code!==0)return ge.code;await ae.writeFilePromise(he,ve),await ae.appendFilePromise(V.join(t,".npmignore"),`/.yarn
|
||||||
|
`),h.write(`
|
||||||
|
`),delete _.NODE_ENV;let le=await sA("yarn",["install"],{cwd:t,env:_,stdin:p,stdout:h,stderr:C,end:1});if(le.code!==0)return le.code;h.write(`
|
||||||
|
`);let xe=await sA("yarn",[...pe,"pack","--filename",Ae.fromPortablePath(e)],{cwd:t,env:_,stdin:p,stdout:h,stderr:C});return xe.code!==0?xe.code:0}],["Yarn",async()=>{let pe=a!==null?["workspace",a]:[];_.YARN_ENABLE_INLINE_BUILDS="1";let he=V.join(t,Nr.lockfile);await ae.existsPromise(he)||await ae.writeFilePromise(he,"");let ve=await sA("yarn",[...pe,"pack","--install-if-needed","--filename",Ae.fromPortablePath(e)],{cwd:t,env:_,stdin:p,stdout:h,stderr:C});return ve.code!==0?ve.code:0}],["npm",async()=>{if(a!==null){let De=new u0.PassThrough,Ee=Wy(De);De.pipe(h,{end:!1});let de=await sA("npm",["--version"],{cwd:t,env:_,stdin:p,stdout:De,stderr:C,end:0});if(De.end(),de.code!==0)return h.end(),C.end(),de.code;let ne=(await Ee).toString().trim();if(!vd(ne,">=7.x")){let Z=nA(null,"npm"),me=mn(Z,ne),be=mn(Z,">=7.x");throw new Error(`Workspaces aren't supported by ${Nn(r,me)}; please upgrade to ${Nn(r,be)} (npm has been detected as the primary package manager for ${Kt(r,t,Bt.PATH)})`)}}let pe=a!==null?["--workspace",a]:[];delete _.npm_config_user_agent,delete _.npm_config_production,delete _.NPM_CONFIG_PRODUCTION,delete _.NODE_ENV;let he=await sA("npm",["install"],{cwd:t,env:_,stdin:p,stdout:h,stderr:C,end:1});if(he.code!==0)return he.code;let ve=new u0.PassThrough,ge=Wy(ve);ve.pipe(h);let le=await sA("npm",["pack","--silent",...pe],{cwd:t,env:_,stdin:p,stdout:ve,stderr:C});if(le.code!==0)return le.code;let xe=(await ge).toString().trim().replace(/^.*\n/s,""),g=V.resolve(t,Ae.toPortablePath(xe));return await ae.renamePromise(g,e),0}]]).get(E);if(typeof re>"u")throw new Error("Assertion failed: Unsupported workflow");let oe=await re();if(!(oe===0||typeof oe>"u"))throw ae.detachTemp(u),new Jt(58,`Packing the package failed (exit code ${oe}, logs can be found here: ${Kt(r,A,Bt.PATH)})`)})})})}async function qot(t,e,{project:r}){let o=r.tryWorkspaceByLocator(t);if(o!==null)return DU(o,e);let a=r.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${kr(r.configuration,t)} not found in the project`);return await Ol.openPromise(async n=>{let u=r.configuration,A=r.configuration.getLinkers(),p={project:r,report:new Ct({stdout:new u0.PassThrough,configuration:u})},h=A.find(b=>b.supportsPackage(a,p));if(!h)throw new Error(`The package ${kr(r.configuration,a)} isn't supported by any of the available linkers`);let C=await h.findPackageLocation(a,p),w=new An(C,{baseFs:n});return(await Lt.find(wt.dot,{baseFs:w})).scripts.has(e)})}async function TP(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await ae.mktempPromise(async p=>{let{manifest:h,env:C,cwd:w}=await gue(t,{project:a,binFolder:p,cwd:o,lifecycleScript:e}),v=h.scripts.get(e);if(typeof v>"u")return 1;let b=async()=>await PE(v,r,{cwd:w,env:C,stdin:n,stdout:u,stderr:A});return await(await a.configuration.reduceHook(R=>R.wrapScriptExecution,b,a,t,e,{script:v,args:r,cwd:w,env:C,stdin:n,stdout:u,stderr:A}))()})}async function vU(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await ae.mktempPromise(async p=>{let{env:h,cwd:C}=await gue(t,{project:a,binFolder:p,cwd:o});return await PE(e,r,{cwd:C,env:h,stdin:n,stdout:u,stderr:A})})}async function jot(t,{binFolder:e,cwd:r,lifecycleScript:o}){let a=await w1({project:t.project,locator:t.anchoredLocator,binFolder:e,lifecycleScript:o});return await Promise.all(Array.from(await yue(t),([n,[,u]])=>Lf(e,Ni(n),process.execPath,[u]))),typeof r>"u"&&(r=V.dirname(await ae.realpathPromise(V.join(t.cwd,"package.json")))),{manifest:t.manifest,binFolder:e,env:a,cwd:r}}async function gue(t,{project:e,binFolder:r,cwd:o,lifecycleScript:a}){let n=e.tryWorkspaceByLocator(t);if(n!==null)return jot(n,{binFolder:r,cwd:o,lifecycleScript:a});let u=e.storedPackages.get(t.locatorHash);if(!u)throw new Error(`Package for ${kr(e.configuration,t)} not found in the project`);return await Ol.openPromise(async A=>{let p=e.configuration,h=e.configuration.getLinkers(),C={project:e,report:new Ct({stdout:new u0.PassThrough,configuration:p})},w=h.find(N=>N.supportsPackage(u,C));if(!w)throw new Error(`The package ${kr(e.configuration,u)} isn't supported by any of the available linkers`);let v=await w1({project:e,locator:t,binFolder:r,lifecycleScript:a});await Promise.all(Array.from(await LP(t,{project:e}),([N,[,_]])=>Lf(r,Ni(N),process.execPath,[_])));let b=await w.findPackageLocation(u,C),E=new An(b,{baseFs:A}),R=await Lt.find(wt.dot,{baseFs:E});return typeof o>"u"&&(o=b),{manifest:R,binFolder:r,env:v,cwd:o}})}async function due(t,e,r,{cwd:o,stdin:a,stdout:n,stderr:u}){return await TP(t.anchoredLocator,e,r,{cwd:o,project:t.project,stdin:a,stdout:n,stderr:u})}function DU(t,e){return t.manifest.scripts.has(e)}async function mue(t,e,{cwd:r,report:o}){let{configuration:a}=t.project,n=null;await ae.mktempPromise(async u=>{let A=V.join(u,`${e}.log`),p=`# This file contains the result of Yarn calling the "${e}" lifecycle script inside a workspace ("${Ae.fromPortablePath(t.cwd)}")
|
||||||
|
`,{stdout:h,stderr:C}=a.getSubprocessStreams(A,{report:o,prefix:kr(a,t.anchoredLocator),header:p});o.reportInfo(36,`Calling the "${e}" lifecycle script`);let w=await due(t,e,[],{cwd:r,stdin:n,stdout:h,stderr:C});if(h.end(),C.end(),w!==0)throw ae.detachTemp(u),new Jt(36,`${(0,Aue.default)(e)} script failed (exit code ${Kt(a,w,Bt.NUMBER)}, logs can be found here: ${Kt(a,A,Bt.PATH)}); run ${Kt(a,`yarn ${e}`,Bt.CODE)} to investigate`)})}async function Got(t,e,r){DU(t,e)&&await mue(t,e,r)}async function LP(t,{project:e}){let r=e.configuration,o=new Map,a=e.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${kr(r,t)} not found in the project`);let n=new u0.Writable,u=r.getLinkers(),A={project:e,report:new Ct({configuration:r,stdout:n})},p=new Set([t.locatorHash]);for(let C of a.dependencies.values()){let w=e.storedResolutions.get(C.descriptorHash);if(!w)throw new Error(`Assertion failed: The resolution (${Nn(r,C)}) should have been registered`);p.add(w)}let h=await Promise.all(Array.from(p,async C=>{let w=e.storedPackages.get(C);if(!w)throw new Error(`Assertion failed: The package (${C}) should have been registered`);if(w.bin.size===0)return Zu.skip;let v=u.find(E=>E.supportsPackage(w,A));if(!v)return Zu.skip;let b=null;try{b=await v.findPackageLocation(w,A)}catch(E){if(E.code==="LOCATOR_NOT_INSTALLED")return Zu.skip;throw E}return{dependency:w,packageLocation:b}}));for(let C of h){if(C===Zu.skip)continue;let{dependency:w,packageLocation:v}=C;for(let[b,E]of w.bin)o.set(b,[w,Ae.fromPortablePath(V.resolve(v,E))])}return o}async function yue(t){return await LP(t.anchoredLocator,{project:t.project})}async function Eue(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A,nodeArgs:p=[],packageAccessibleBinaries:h}){h??(h=await LP(t,{project:a}));let C=h.get(e);if(!C)throw new Error(`Binary not found (${e}) for ${kr(a.configuration,t)}`);return await ae.mktempPromise(async w=>{let[,v]=C,b=await w1({project:a,locator:t,binFolder:w});await Promise.all(Array.from(h,([R,[,N]])=>Lf(b.BERRY_BIN_FOLDER,Ni(R),process.execPath,[N])));let E;try{E=await sA(process.execPath,[...p,v,...r],{cwd:o,env:b,stdin:n,stdout:u,stderr:A})}finally{await ae.removePromise(b.BERRY_BIN_FOLDER)}return E.code})}async function Wot(t,e,r,{cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A}){return await Eue(t.anchoredLocator,e,r,{project:t.project,cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A})}var Aue,fue,u0,pue,Uot,_ot,SU=dt(()=>{bt();bt();Mc();d1();Aue=tt(IU()),fue=tt(ed()),u0=Ie("stream");oE();Vl();RP();BU();pP();Kl();Wl();n0();Ks();pue=(a=>(a.Yarn1="Yarn Classic",a.Yarn2="Yarn",a.Npm="npm",a.Pnpm="pnpm",a))(pue||{});Uot=2,_ot=(0,fue.default)(Uot)});var QE=U((_Mt,Iue)=>{"use strict";var Cue=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"]]);Iue.exports=t=>t?Object.keys(t).map(e=>[Cue.has(e)?Cue.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var FE=U((HMt,Que)=>{"use strict";var wue=typeof process=="object"&&process?process:{stdout:null,stderr:null},Yot=Ie("events"),Bue=Ie("stream"),vue=Ie("string_decoder").StringDecoder,Nf=Symbol("EOF"),Of=Symbol("maybeEmitEnd"),A0=Symbol("emittedEnd"),NP=Symbol("emittingEnd"),B1=Symbol("emittedError"),OP=Symbol("closed"),Due=Symbol("read"),MP=Symbol("flush"),Sue=Symbol("flushChunk"),ba=Symbol("encoding"),Mf=Symbol("decoder"),UP=Symbol("flowing"),v1=Symbol("paused"),kE=Symbol("resume"),Ss=Symbol("bufferLength"),xU=Symbol("bufferPush"),PU=Symbol("bufferShift"),bo=Symbol("objectMode"),Qo=Symbol("destroyed"),bU=Symbol("emitData"),xue=Symbol("emitEnd"),QU=Symbol("emitEnd2"),Uf=Symbol("async"),D1=t=>Promise.resolve().then(t),Pue=global._MP_NO_ITERATOR_SYMBOLS_!=="1",Kot=Pue&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),Jot=Pue&&Symbol.iterator||Symbol("iterator not implemented"),Vot=t=>t==="end"||t==="finish"||t==="prefinish",zot=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,Xot=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),_P=class{constructor(e,r,o){this.src=e,this.dest=r,this.opts=o,this.ondrain=()=>e[kE](),r.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},kU=class extends _P{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,o){super(e,r,o),this.proxyErrors=a=>r.emit("error",a),e.on("error",this.proxyErrors)}};Que.exports=class bue extends Bue{constructor(e){super(),this[UP]=!1,this[v1]=!1,this.pipes=[],this.buffer=[],this[bo]=e&&e.objectMode||!1,this[bo]?this[ba]=null:this[ba]=e&&e.encodi
Line truncated
|
||||||
|
`,a=Buffer.byteLength(o),n=Math.floor(Math.log(a)/Math.log(10))+1;return a+n>=Math.pow(10,n)&&(n+=1),n+a+o}};x1.parse=(t,e,r)=>new x1(Cat(Iat(t),e),r);var Cat=(t,e)=>e?Object.keys(t).reduce((r,o)=>(r[o]=t[o],r),e):t,Iat=t=>t.replace(/\n$/,"").split(`
|
||||||
|
`).reduce(wat,Object.create(null)),wat=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.substr((r+" ").length);let o=e.split("="),a=o.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!a)return t;let n=o.join("=");return t[a]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(a)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,t};Gue.exports=x1});var ME=U(($Mt,Wue)=>{Wue.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 KP=U((e4t,Yue)=>{"use strict";Yue.exports=t=>class extends t{warn(e,r,o={}){this.file&&(o.file=this.file),this.cwd&&(o.cwd=this.cwd),o.code=r instanceof Error&&r.code||e,o.tarCode=e,!this.strict&&o.recoverable!==!1?(r instanceof Error&&(o=Object.assign(r,o),r=r.message),this.emit("warn",o.tarCode,r,o)):r instanceof Error?this.emit("error",Object.assign(r,o)):this.emit("error",Object.assign(new Error(`${e}: ${r}`),o))}}});var n3=U((r4t,Kue)=>{"use strict";var JP=["|","<",">","?",":"],r3=JP.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),Bat=new Map(JP.map((t,e)=>[t,r3[e]])),vat=new Map(r3.map((t,e)=>[t,JP[e]]));Kue.exports={encode:t=>JP.reduce((e,r)=>e.split(r).join(Bat.get(r)),t),decode:t=>r3.reduce((e,r)=>e.split(r).join(vat.get(r)),t)}});var i3=U((n4t,Vue)=>{var{isAbsolute:Dat,parse:Jue}=Ie("path").win32;Vue.exports=t=>{let e="",r=Jue(t);for(;Dat(t)||r.root;){let o=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":r.root;t=t.substr(o.length),e+=o,r=Jue(t)}return[e,t]}});var Xue=U((i4t,zue)=>{"use strict";zue.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 h3=U((a4t,AAe)=>{"use strict";var iAe=FE(),sAe=YP(),oAe=OE(),lA=Ie("fs"),Zue=Ie("path"),aA=LE(),Sat=ME(),aAe=(t,e)=>e?(t=aA(t).replace(/^\.(\/|$)/,""),Sat(e)+"/"+t):aA(t),xat=16*1024*1024,$ue=Symbol("process"),eAe=Symbol("file"),tAe=Symbol("directory"),o3=Symbol("symlink"),rAe=Symbol("hardlink"),P1=Symbol("header"),VP=Symbol("read"),a3=Symbol("lstat"),zP=Symbol("onlstat"),l3=Symbol("onread"),c3=Symbol("onreadlink"),u3=Symbol("openfile"),A3=Symbol("onopenfile"),g0=Symbol("close"),XP=Symbol("mode"),f3=Symbol("awaitDrain"),s3=Symbol("ondrain"),cA=Symbol("prefix"),nAe=Symbol("hadError"),lAe=KP(),Pat=n3(),cAe=i3(),uAe=Xue(),ZP=lAe(class extends iAe{constructor(e,r){if(r=r||{},super(r),typeof e!="string")throw new TypeError("path is required");this.path=aA(e),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||xat,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=aA(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?aA(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 o=!1;if(!this.preservePaths){let[a,n]=cAe(this.path);a&&(this.path=n,o=a)}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=Pat.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=aA(r.absolute||Zue.resolve(this.cwd,e)),this.path===""&&(this.path="./"),o&&this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute path`,{entry:this,path:o+this.path}),this.statCache.has(this.absolute)?this[zP](this.statCache.get(this.absolute)):this[a3]()}emit(e,...r){return e==="error"&&(this[nAe]=!0),super.emit(e,...r)}[a3](){lA.lstat(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[zP](r)})}[zP](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=Qat(e),this.emit("stat",e),this[$ue]()}[$ue](){switch(this.type){case"File":return this[eAe]();case"Directory":return this[tAe]();case"SymbolicLink":return this[o3]();default:return this.end()}}[XP](e){return uAe(e,this.type==="Directory",this.portable)}[cA](e){return aAe(e,this.prefix)}[P1](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new oAe({path:this[cA](this.path),linkpath:this.type==="Link"?this[cA](this.linkpath):this.linkpath,mode:this[XP](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 sAe({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[cA](this.path),linkpath:this.type==="Link"?this[cA](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
|
||||||
|
`}),A},o})});var Xo={};Yt(Xo,{emitList:()=>Ict,emitTree:()=>Epe,treeNodeToJson:()=>ype,treeNodeToTreeify:()=>mpe});function mpe(t,{configuration:e}){let r={},o=(a,n)=>{let u=Array.isArray(a)?a.entries():Object.entries(a);for(let[A,{label:p,value:h,children:C}]of u){let w=[];typeof p<"u"&&w.push(WS(e,p,2)),typeof h<"u"&&w.push(Kt(e,h[0],h[1])),w.length===0&&w.push(WS(e,`${A}`,2));let v=w.join(": "),b=n[v]={};typeof C<"u"&&o(C,b)}};if(typeof t.children>"u")throw new Error("The root node must only contain children");return o(t.children,r),r}function ype(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 gd(r.value[0],r.value[1])}let o=Array.isArray(r.children)?r.children.entries():Object.entries(r.children??{}),a=Array.isArray(r.children)?[]:{};for(let[n,u]of o)a[n]=e(u);return typeof r.value>"u"?a:{value:gd(r.value[0],r.value[1]),children:a}};return e(t)}function Ict(t,{configuration:e,stdout:r,json:o}){let a=t.map(n=>({value:n}));Epe({children:a},{configuration:e,stdout:r,json:o})}function Epe(t,{configuration:e,stdout:r,json:o,separators:a=0}){if(o){let u=Array.isArray(t.children)?t.children.values():Object.values(t.children??{});for(let A of u)r.write(`${JSON.stringify(ype(A))}
|
||||||
|
`);return}let n=(0,dpe.asTree)(mpe(t,{configuration:e}),!1,!1);if(a>=1&&(n=n.replace(/^([├└]─)/gm,`\u2502
|
||||||
|
$1`).replace(/^│\n/,"")),a>=2)for(let u=0;u<2;++u)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)}var dpe,Cpe=dt(()=>{dpe=tt(gpe());Kl()});function a_(t){let e=t.indexOf("/");return e!==-1?t.slice(0,e):null}function Bct(t){let e=t.indexOf("/");return e!==-1?t.slice(e+1):t}var Ipe,l_,wct,Ur,wpe=dt(()=>{bt();bt();Mc();Ipe=Ie("crypto"),l_=tt(Ie("fs"));Vl();t0();Wl();Ks();wct=9,Ur=class{constructor(e,{configuration:r,immutable:o=r.get("enableImmutableCache"),check:a=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.cacheId=`-${(0,Ipe.randomBytes)(8).toString("hex")}.tmp`;this.configuration=r,this.cwd=e,this.immutable=o,this.check=a;let n=r.get("cacheKeyOverride");if(n!==null)this.cacheKey=`${n}`;else{let u=r.get("compressionLevel"),A=u!==ay?`c${u}`:"";this.cacheKey=[wct,A].join("")}}static async find(e,{immutable:r,check:o}={}){let a=new Ur(e.get("cacheFolder"),{configuration:e,immutable:r,check:o});return await a.setup(),a}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`${nE(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let a=Bct(r).slice(0,10);return`${nE(e)}-${a}.zip`}getLocatorPath(e,r,o={}){var n;return this.mirrorCwd===null||((n=o.unstablePackages)==null?void 0:n.has(e.locatorHash))?V.resolve(this.cwd,this.getVersionFilename(e)):r===null||a_(r)!==this.cacheKey?null:V.resolve(this.cwd,this.getChecksumFilename(e,r))}getLocatorMirrorPath(e){let r=this.mirrorCwd;return r!==null?V.resolve(r,this.getVersionFilename(e)):null}async setup(){if(!this.configuration.get("enableGlobalCache"))if(this.immutable){if(!await ae.existsPromise(this.cwd))throw new Jt(56,"Cache path does not exist.")}else{await ae.mkdirPromise(this.cwd,{recursive:!0});let e=V.resolve(this.cwd,".gitignore");await ae.changeFilePromise(e,`/.gitignore
|
||||||
|
*.flock
|
||||||
|
*.tmp
|
||||||
|
`)}(this.mirrorCwd||!this.immutable)&&await ae.mkdirPromise(this.mirrorCwd||this.cwd,{recursive:!0})}async fetchPackageFromCache(e,r,{onHit:o,onMiss:a,loader:n,...u}){var ge;let A=this.getLocatorMirrorPath(e),p=new Pn,h=()=>{let le=new os,xe=V.join(wt.root,gM(e));return le.mkdirSync(xe,{recursive:!0}),le.writeJsonSync(V.join(xe,Nr.manifest),{name:nn(e),mocked:!0}),le},C=async(le,xe=null)=>{var De;if(xe===null&&((De=u.unstablePackages)==null?void 0:De.has(e.locatorHash)))return{isValid:!0,hash:null};let g=!u.skipIntegrityCheck||!r?`${this.cacheKey}/${await Bx(le)}`:r;if(xe!==null){let Ee=!u.skipIntegrityCheck||!r?`${this.cacheKey}/${await Bx(xe)}`:r;if(g!==Ee)throw new Jt(18,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}if(r!==null&&g!==r){let Ee;switch(this.check?Ee="throw":a_(r)!==a_(g)?Ee="update":Ee=this.configuration.get("checksumBehavior"),Ee){case"ignore":return{isValid:!0,hash:r};case"update":return{isValid:!0,hash:g};case"reset":return{isValid:!1,hash:r};default:case"throw":throw new Jt(18,"The remote archive doesn't match the expected checksum")}}return{isValid:!0,hash:g}},w=async le=>{if(!n)throw new Error(`Cache check required but no loader configured for ${kr(this.configuration,e)}`);let xe=await n(),g=xe.getRealPath();xe.saveAndClose(),await ae.chmodPromise(g,420);let De=await C(le,g);if(!De.isValid)throw new Error("Assertion failed: Expected a valid checksum");return De.hash},v=async()=>{if(A===null||!await ae.existsPromise(A)){let le=await n(),xe=le.getRealPath();return le.saveAndClose(),{source:"loader",path:xe}}return{source:"mirror",path:A}},b=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${kr(this.configuration,e)}`);if(this.immutable)throw new Jt(56,`Cache entry required but missing for ${kr(this.configuration,e)}`);let{path:le,source:xe}=await v(),g=(await C(le)).hash,De=this.getLocatorPath(e,g,u);if(!De)throw new Error("Assertion failed: Expected the cache path to be available");let Ee=[];xe!=="mirror"&&A!==null&&Ee.push(async()=>{let ne=`${A}${this.cacheId}`;await ae.copyFilePromise(le,ne,l_.default.constants.COPYFILE_FICLONE),await ae.chmodPromise(ne,420),await ae.renamePromise(ne,A)}),(!u.mirrorWriteOnly||A===null)&&Ee.push(async()=>{let ne=`${De}${this.cacheId}`;await ae.copyFilePromise(le,ne,l_.default.constants.COPYFILE_FICLONE),await ae.chmodPromise(ne,420),await ae.renamePromise(ne,De)});let de=u.mirrorWriteOnly?A??De:De;return await Promise.all(Ee.map(ne=>ne())),[!1,de,g]},E=async()=>{let xe=(async()=>{var Z;let g=this.getLocatorPath(e,r,u),De=g!==null?this.markedFiles.has(g)||await p.existsPromise(g):!1,Ee=!!((Z=u.mockedPackages)!=null&&Z.has(e.locatorHash))&&(!this.check||!De),de=Ee||De,ne=de?o:a;if(ne&&ne(),de){let me=null,be=g;if(!Ee)if(this.check)me=await w(be);else{let ut=await C(be);if(ut.isValid)me=ut.hash;else return b()}return[Ee,be,me]}else return b()})();this.mutexes.set(e.locatorHash,xe);try{return await xe}finally{this.mutexes.delete(e.locatorHash)}};for(let le;le=this.mutexes.get(e.locatorHash);)await le;let[R,N,_]=await E();R||this.markedFiles.add(N);let J,re=R?()=>h():()=>new os(N,{baseFs:p,readOnly:!0}),oe=new ry(()=>gN(()=>J=re(),le=>`Failed to open the cache entry for ${kr(this.configuration,e)}: ${le}`),V),pe=new ju(N,{baseFs:oe,pathUtils:V}),he=()=>{J==null||J.discardAndClose()},ve=(ge=u.unstablePackages)!=null&&ge.has(e.locatorHash)?null:_;return[pe,he,ve]}}});var Ob,Bpe=dt(()=>{Ob=(r=>(r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE",r))(Ob||{})});var vct,$E,c_=dt(()=>{bt();Ml();n0();Ks();vct=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(t,e,r,o)=>`${r}#commit=${o}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(t,e,r="",o,a)=>`https://${r}github.com/${o}.git#commit=${a}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(t,e,r="",o,a)=>`https://${r}github.com/${o}.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)=>xx({protocol:"npm:",source:null,selector:t,params:{__archiveUrl:e}})],[/^[^/]+\.tgz#[0-9a-f]+$/,t=>`npm:${t}`]],$E=class{constructor(e){this.resolver=e;this.resolutions=null}async setup(e,{report:r}){let o=V.join(e.cwd,e.configuration.get("lockfileFilename"));if(!ae.existsSync(o))return;let a=await ae.readFilePromise(o,"utf8"),n=Yi(a);if(Object.prototype.hasOwnProperty.call(n,"__metadata"))return;let u=this.resolutions=new Map;for(let A of Object.keys(n)){let p=Kw(A);if(!p){r.reportWarning(14,`Failed to parse the string "${A}" into a proper descriptor`);continue}let h=Gc(p.range)?mn(p,`npm:${p.range}`):
Line truncated
|
||||||
|
`)}reportProgress(r){return{...Promise.resolve().then(async()=>{for await(let{}of r);}),stop:()=>{}}}reportJson(r){}async finalize(){this.errorCount>0&&(this.stdout.write(`
|
||||||
|
`),this.stdout.write(`${Kt(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command.
|
||||||
|
`),this.suggestInstall&&this.stdout.write(`${Kt(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 wU(r,{configuration:this.configuration,json:!1})}}});var eC,u_=dt(()=>{Ks();eC=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return!!(r.project.storedResolutions.get(e.descriptorHash)||r.project.originalPackages.has(Dx(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,o){return e}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,o){let a=o.project.storedResolutions.get(e.descriptorHash);if(a){let u=o.project.originalPackages.get(a);if(u)return[u]}let n=o.project.originalPackages.get(Dx(e).locatorHash);if(n)return[n];throw new Error("Resolution expected from the lockfile data")}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let o=r.project.originalPackages.get(e.locatorHash);if(!o)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return o}}});function Wf(){}function Dct(t,e,r,o,a){for(var n=0,u=e.length,A=0,p=0;n<u;n++){var h=e[n];if(h.removed){if(h.value=t.join(o.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 C=r.slice(A,A+h.count);C=C.map(function(b,E){var R=o[p+E];return R.length>b.length?R:b}),h.value=t.join(C)}else h.value=t.join(r.slice(A,A+h.count));A+=h.count,h.added||(p+=h.count)}}var v=e[u-1];return u>1&&typeof v.value=="string"&&(v.added||v.removed)&&t.equals("",v.value)&&(e[u-2].value+=v.value,e.pop()),e}function Sct(t){return{newPos:t.newPos,components:t.components.slice(0)}}function xct(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 xpe(t,e,r){return r=xct(r,{ignoreWhitespace:!0}),g_.diff(t,e,r)}function Pct(t,e,r){return d_.diff(t,e,r)}function Mb(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Mb=function(e){return typeof e}:Mb=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mb(t)}function A_(t){return kct(t)||Fct(t)||Rct(t)||Tct()}function kct(t){if(Array.isArray(t))return f_(t)}function Fct(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function Rct(t,e){if(!!t){if(typeof t=="string")return f_(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 f_(t,e)}}function f_(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);r<e;r++)o[r]=t[r];return o}function Tct(){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 p_(t,e,r,o,a){e=e||[],r=r||[],o&&(t=o(a,t));var n;for(n=0;n<e.length;n+=1)if(e[n]===t)return r[n];var u;if(Lct.call(t)==="[object Array]"){for(e.push(t),u=new Array(t.length),r.push(u),n=0;n<t.length;n+=1)u[n]=p_(t[n],e,r,o,a);return e.pop(),r.pop(),u}if(t&&t.toJSON&&(t=t.toJSON()),Mb(t)==="object"&&t!==null){e.push(t),u={},r.push(u);var A=[],p;for(p in t)t.hasOwnProperty(p)&&A.push(p);for(A.sort(),n=0;n<A.length;n+=1)p=A[n],u[p]=p_(t[p],e,r,o,p);e.pop(),r.pop()}else u=t;return u}function Ppe(t,e,r,o,a,n,u){u||(u={}),typeof u.context>"u"&&(u.context=4);var A=Pct(r,o,u);if(!A)return;A.push({value:"",lines:[]});function p(_){return _.map(function(J){return" "+J})}for(var h=[],C=0,w=0,v=[],b=1,E=1,R=function(J){var re=A[J],oe=re.lines||re.value.replace(/\n$/,"").split(`
|
||||||
|
`);if(re.lines=oe,re.added||re.removed){var pe;if(!C){var he=A[J-1];C=b,w=E,he&&(v=u.context>0?p(he.lines.slice(-u.context)):[],C-=v.length,w-=v.length)}(pe=v).push.apply(pe,A_(oe.map(function(de){return(re.added?"+":"-")+de}))),re.added?E+=oe.length:b+=oe.length}else{if(C)if(oe.length<=u.context*2&&J<A.length-2){var ve;(ve=v).push.apply(ve,A_(p(oe)))}else{var ge,le=Math.min(oe.length,u.context);(ge=v).push.apply(ge,A_(p(oe.slice(0,le))));var xe={oldStart:C,oldLines:b-C+le,newStart:w,newLines:E-w+le,lines:v};if(J>=A.length-2&&oe.length<=u.context){var g=/\n$/.test(r),De=/\n$/.test(o),Ee=oe.length==0&&v.length>xe.oldLines;!g&&Ee&&r.length>0&&v.splice(xe.oldLines,0,"\\ No newline at end of file"),(!g&&!Ee||!De)&&v.push("\\ No newline at end of file")}h.push(xe),C=0,w=0,v=[]}b+=oe.length,E+=oe.length}},N=0;N<A.length;N++)R(N);return{oldFileName:t,newFileName:e,oldHeader:a,newHeader:n,hunks:h}}var nUt,Dpe,Spe,g_,d_,bct,Qct,Lct,_1,h_,m_=dt(()=>{Wf.prototype={diff:function(e,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.callback;typeof o=="function"&&(a=o,o={}),this.options=o;var n=this;function u(R){return a?(setTimeout(function(){a(void 0,R)},0),!0):R}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var A=r.length,p=e.length,h=1,C=A+p;o.maxEditLength&&(C=Math.min(C,o.maxEditLength));var w=[{newPos:-1,components:[]}],v=this.extractCommon(w[0],r,e,0);if(w[0].newPos+1>=A&&v+1>=p)return u([{value:this.join(r),count:r.length}]);function b(){for(var R=-1*h;R<=h;R+=2){var N=void 0,_=w[R-1],J=w[R+1],re=(J?J.newPos:0)-R;_&&(w[R-1]=void 0);var oe=_&&_.newPos+1<A,pe=J&&0<=re&&re<p;if(!oe&&!pe){w[R]=void 0;continue}if(!oe||pe&&_.newPos<J.newPos?(N=Sct(J),n.pushComponent(N.components,void 0,!0)):(N=_,N.newPos++,n.pushComponent(N.components,!0,void 0)),re=n.extractCommon(N,r,e,R),N.newPos+1>=A&&re+1>=p)return u(Dct(n,N.components,r,e,n.useLongestToken));w[R]=N}h++}if(a)(function R(){setTimeout(function(){if(h>C)return a();b()||R()},0)})();else for(;h<=C;){var E=b();if(E)return E}},pushComponent:function(e,r,o){var a=e[e.length-1];a&&a.added===r&&a.removed===o?e[e.length-1]={count:a.count+1,added:r,removed:o}:e.push({count:1,added:r,removed:o})},extractCommon:function(e,r,o,a){for(var n=r.length,u=o.length,A=e.newPos,p=A-a,h=0;A+1<n&&p+1<u&&this.equals(r[A+1],o[p+1]);)A++,p++,h++;return h&&e.components.push({count:h}),e.newPos=A,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=[],o=0;o<e.length;o++)e[o]&&r.push(e[o]);return r},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}};nUt=new Wf;Dpe=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,Spe=/\S/,g_=new Wf;g_.equals=function(t,e){return this.options.ignoreCase&&(t=t.toLowerCase(),e=e.toLowerCase()),t===e||this.options.ignoreWhitespace&&!Spe.test(t)&&!Spe.test(e)};g_.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]&&Dpe.test(e[r])&&Dpe.test(e[r+2])&&(e[r]+=e[r+2],e.splice(r+1,2),r--);return e};d_=new Wf;d_.tokenize=function(t){var e=[],r=t.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var o=0;o<r.length;o++){var a=r[o];o%2&&!this.options.newlineIsToken?e[e.length-1]+=a:(this.options.ignoreWhitespace&&(a=a.trim()),e.push(a))}return e};bct=new Wf;bct.tokenize=function(t){return t.split(/(\S.+?[.!?])(?=\s+|$)/)};Qct=new Wf;Qct.tokenize=function(t){return t.split(/([{}:;,]|\s+)/)};Lct=Object.prototype.toString,_1=new Wf;_1.useLongestToken=!0;_1.tokenize=d_.tokenize;_1.castInput=function(t){var e=this.options,r=e.undefinedReplacement,o=e.stringifyReplacer,a=o===void 0?function(n,u){return typeof u>"u"?r:u}:o;return typeof t=="string"?t:JSON.stringify(p_(t,null,null,a),a," ")};_1.equals=function(t,e){return Wf.prototype.equals.call(_1,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};h_=new Wf;h_.tokenize=function(t){return t.slice()};h_.join=h_.removeEmpty=function(t){return t}});var Qpe=U((sUt,bpe)=>{var Nct=Gl(),Oct=aE(),Mct=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Uct=/^\w*$/;function _ct(t,e){if(Nct(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Oct(t)?!0:Uct.test(t)||!Mct.test(t)||e!=null&&t in Object(e)}bpe.exports=_ct});var Rpe=U((oUt,Fpe)=>{var kpe=vS(),Hct="Expected a function";function y_(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Hct);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],n=r.cache;if(n.has(a))return n.get(a);var u=t.apply(this,o);return r.cache=n.set(a,u)||n,u};return r.cache=new(y_.Cache||kpe),r}y_.Cache=kpe;Fpe.exports=y_});var Lpe=U((aUt,Tpe)=>{var qct=Rpe(),jct=500;function Gct(t){var e=qct(t,function(o){return r.size===jct&&r.clear(),o}),r=e.cache;return e}Tpe.exports=Gct});var E_=U((lUt,Npe)=>{
Line truncated
|
||||||
|
`;await ae.changeFilePromise(r,o,{automaticNewlines:!0}),this.manifest.raw=e}}});function Jut({project:t,allDescriptors:e,allResolutions:r,allPackages:o,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:u=new Map,volatileDescriptors:A=new Set,report:p}){let h=new Map,C=[],w=new Map,v=new Map,b=new Map,E=new Map,R=new Map,N=new Map(t.workspaces.map(ge=>{let le=ge.anchoredLocator.locatorHash,xe=o.get(le);if(typeof xe>"u")throw new Error("Assertion failed: The workspace should have an associated package");return[le,qw(xe)]})),_=()=>{let ge=ae.mktempSync(),le=V.join(ge,"stacktrace.log"),xe=String(C.length+1).length,g=C.map((De,Ee)=>`${`${Ee+1}.`.padStart(xe," ")} ${Yl(De)}
|
||||||
|
`).join("");throw ae.writeFileSync(le,g),ae.detachTemp(ge),new Jt(45,`Encountered a stack overflow when resolving peer dependencies; cf ${Ae.fromPortablePath(le)}`)},J=ge=>{let le=r.get(ge.descriptorHash);if(typeof le>"u")throw new Error("Assertion failed: The resolution should have been registered");let xe=o.get(le);if(!xe)throw new Error("Assertion failed: The package could not be found");return xe},re=(ge,le,xe,{top:g,optional:De})=>{C.length>1e3&&_(),C.push(le);let Ee=oe(ge,le,xe,{top:g,optional:De});return C.pop(),Ee},oe=(ge,le,xe,{top:g,optional:De})=>{if(a.has(le.locatorHash))return;a.add(le.locatorHash),De||n.delete(le.locatorHash);let Ee=o.get(le.locatorHash);if(!Ee)throw new Error(`Assertion failed: The package (${kr(t.configuration,le)}) should have been registered`);let de=[],ne=[],Z=[],me=[],be=[];for(let H of Array.from(Ee.dependencies.values())){if(Ee.peerDependencies.has(H.identHash)&&Ee.locatorHash!==g)continue;if(bf(H))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");A.delete(H.descriptorHash);let yt=De;if(!yt){let Ne=Ee.dependenciesMeta.get(nn(H));if(typeof Ne<"u"){let P=Ne.get(null);typeof P<"u"&&P.optional&&(yt=!0)}}let Me=r.get(H.descriptorHash);if(!Me)throw new Error(`Assertion failed: The resolution (${Nn(t.configuration,H)}) should have been registered`);let Te=N.get(Me)||o.get(Me);if(!Te)throw new Error(`Assertion failed: The package (${Me}, resolved from ${Nn(t.configuration,H)}) should have been registered`);if(Te.peerDependencies.size===0){re(H,Te,new Map,{top:g,optional:yt});continue}let Qe,Ue,je=new Set,At;ne.push(()=>{Qe=fM(H,le.locatorHash),Ue=pM(Te,le.locatorHash),Ee.dependencies.delete(H.identHash),Ee.dependencies.set(Qe.identHash,Qe),r.set(Qe.descriptorHash,Ue.locatorHash),e.set(Qe.descriptorHash,Qe),o.set(Ue.locatorHash,Ue),de.push([Te,Qe,Ue])}),Z.push(()=>{At=new Map;for(let Ne of Ue.peerDependencies.values()){let P=Ee.dependencies.get(Ne.identHash);if(!P&&Ww(le,Ne)&&(ge.identHash===le.identHash?P=ge:(P=mn(le,ge.range),e.set(P.descriptorHash,P),r.set(P.descriptorHash,le.locatorHash),A.delete(P.descriptorHash))),(!P||P.range==="missing:")&&Ue.dependencies.has(Ne.identHash)){Ue.peerDependencies.delete(Ne.identHash);continue}P||(P=mn(Ne,"missing:")),Ue.dependencies.set(P.identHash,P),bf(P)&&hd(b,P.descriptorHash).add(Ue.locatorHash),w.set(P.identHash,P),P.range==="missing:"&&je.add(P.identHash),At.set(Ne.identHash,xe.get(Ne.identHash)??Ue.locatorHash)}Ue.dependencies=new Map(Sa(Ue.dependencies,([Ne,P])=>nn(P)))}),me.push(()=>{if(!o.has(Ue.locatorHash))return;let Ne=h.get(Te.locatorHash);typeof Ne=="number"&&Ne>=2&&_();let P=h.get(Te.locatorHash),I=typeof P<"u"?P+1:1;h.set(Te.locatorHash,I),re(Qe,Ue,At,{top:g,optional:yt}),h.set(Te.locatorHash,I-1)}),be.push(()=>{let Ne=Ee.dependencies.get(H.identHash);if(typeof Ne>"u")throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");let P=r.get(Ne.descriptorHash);if(typeof P>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");if(hd(R,P).add(le.locatorHash),!!o.has(Ue.locatorHash)){for(let I of Ue.peerDependencies.values()){let x=At.get(I.identHash);if(typeof x>"u")throw new Error("Assertion failed: Expected the peer dependency ident to be registered");qy(jy(E,x),nn(I)).push(Ue.locatorHash)}for(let I of je)Ue.dependencies.delete(I)}})}for(let H of[...ne,...Z])H();let ut;do{ut=!0;for(let[H,yt,Me]of de){let Te=jy(v,H.locatorHash),Qe=Js(...[...Me.dependencies.values()].map(Ne=>{let P=Ne.range!=="missing:"?r.get(Ne.descriptorHash):"missing:";if(typeof P>"u")throw new Error(`Assertion failed: Expected the resolution for ${Nn(t.configuration,Ne)} to have been registered`);return P===g?`${P} (top)`:P}),yt.identHash),Ue=Te.get(Qe);if(typeof Ue>"u"){Te.set(Qe,yt);continue}if(Ue===yt)continue;o.delete(Me.locatorHash),e.delete(yt.descriptorHash),r.delete(yt.descriptorHash),a.delete(Me.locatorHash);let je=b.get(yt.descriptorHash)||[],At=[Ee.locatorHash,...je];b.delete(yt.descriptorHash);for(let Ne of At){let P=o.get(Ne);typeof P>"u"||(P.dependencies.get(yt.identHash).descriptorHash!==Ue.descriptorHash&&(ut=!1),P.dependencies.set(yt.identHash,Ue))}}}while(!ut);for(let H of[...me,...be])H()};for(let ge of t.workspaces){let le=ge.anchoredLocator;A.delete(ge.anchoredDescriptor.descriptorHash),re(ge.anchoredDescriptor,le,new Map,{top:le.locatorHash,optional:!1})}let pe;(xe=>(xe[xe.NotProvided=0]="NotProvided",xe[xe.NotCompatible=1]="NotCompatible"))(pe||(pe={}));let he=[];for(let[ge,le]of R){let xe=o.get(ge);if(typeof xe>"u")throw new Error("Assertion failed: Expected the root to be registered");let g=E.get(ge);if(!(typeof g>"u"))for(let De of le){let Ee=o.get(De);if(!(typeof Ee>"u"))for(let[de,ne]of g){let Z=Ys(de);if(Ee.peerDependencies.has(Z.identHash))continue;let me=`p${Js(De,de,ge).slice(0,5)}`;u.set(me,{subject:De,requested:Z,rootRequester:ge,allRequesters:ne});let be=xe.dependencies.get(Z.identHash);if(typeof
Line truncated
|
||||||
|
|
||||||
|
${[w,v,b].join(`
|
||||||
|
`)}`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=V.join(this.cwd,this.configuration.get("lockfileFilename")),r=this.configuration.get("defaultLanguageName");if(ae.existsSync(e)){let o=await ae.readFilePromise(e,"utf8");this.lockFileChecksum=p0e(o);let a=Yi(o);if(a.__metadata){let n=a.__metadata.version,u=a.__metadata.cacheKey;this.lockfileNeedsRefresh=n<A0e;for(let A of Object.keys(a)){if(A==="__metadata")continue;let p=a[A];if(typeof p.resolution>"u")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${A})`);let h=Qf(p.resolution,!0),C=new Lt;C.load(p,{yamlCompatibilityMode:!0});let w=C.version,v=C.languageName||r,b=p.linkType.toUpperCase(),E=p.conditions??null,R=C.dependencies,N=C.peerDependencies,_=C.dependenciesMeta,J=C.peerDependenciesMeta,re=C.bin;if(p.checksum!=null){let pe=typeof u<"u"&&!p.checksum.includes("/")?`${u}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,pe)}let oe={...h,version:w,languageName:v,linkType:b,conditions:E,dependencies:R,peerDependencies:N,dependenciesMeta:_,peerDependenciesMeta:J,bin:re};this.originalPackages.set(oe.locatorHash,oe);for(let pe of A.split(Gut)){let he=r0(pe);n<=6&&(he=this.configuration.normalizeDependency(he),he=mn(he,he.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(he.descriptorHash,he),this.storedResolutions.set(he.descriptorHash,h.locatorHash)}}}}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=[this.cwd];for(;e.length>0;){let r=e;e=[];for(let o of r){if(this.workspacesByCwd.has(o))continue;let a=await this.addWorkspace(o);for(let n of a.workspacesCwds)e.push(n)}}}async addWorkspace(e){let r=new rC(e,{project:this});await r.setup();let o=this.workspacesByIdent.get(r.locator.identHash);if(typeof o<"u")throw new Error(`Duplicate workspace name ${cs(this.configuration,r.locator)}: ${Ae.fromPortablePath(e)} conflicts with ${Ae.fromPortablePath(o.cwd)}`);return this.workspaces.push(r),this.workspacesByCwd.set(e,r),this.workspacesByIdent.set(r.locator.identHash,r),r}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){V.isAbsolute(e)||(e=V.resolve(this.cwd,e)),e=V.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 o of this.workspaces)V.relative(o.cwd,e).startsWith("../")||r&&r.cwd.length>=o.cwd.length||(r=o);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 (${cs(this.configuration,e)})`);return r}tryWorkspaceByDescriptor(e){let r=this.tryWorkspaceByIdent(e);return r===null||(bf(e)&&(e=jw(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){let r=this.tryWorkspaceByDescriptor(e);if(r===null)throw new Error(`Workspace not found (${Nn(this.configuration,e)})`);return r}tryWorkspaceByLocator(e){let r=this.tryWorkspaceByIdent(e);return r===null||(jc(e)&&(e=Gw(e)),r.locator.locatorHash!==e.locatorHash&&r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){let r=this.tryWorkspaceByLocator(e);if(!r)throw new Error(`Workspace not found (${kr(this.configuration,e)})`);return r}forgetResolution(e){let r=a=>{this.storedResolutions.delete(a),this.storedDescriptors.delete(a)},o=a=>{this.originalPackages.delete(a),this.storedPackages.delete(a),this.accessibleLocators.delete(a)};if("descriptorHash"in e){let a=this.storedResolutions.get(e.descriptorHash);r(e.descriptorHash);let n=new Set(this.storedResolutions.values());typeof a<"u"&&!n.has(a)&&o(a)}if("locatorHash"in e){o(e.locatorHash);for(let[a,n]of this.storedResolutions)n===e.locatorHash&&r(a)}}forgetTransientResolutions(){let e=this.configuration.makeResolver();for(let r of this.originalPackages.values()){let o;try{o=e.shouldPersistResolution(r,{project:this,resolver:e})}catch{o=!1}o||this.forgetResolution(r)}}forgetVirtualResolutions(){for(let e of this.storedPackages.values())for(let[r,o]of e.dependencies)bf(o)&&e.dependencies.set(r,jw(o))}getDependencyMeta(e,r){let o={},n=this.topLevelWorkspace.manifest.dependenciesMeta.get(nn(e));if(!n)return o;let u=n.get(null);if(u&&Object.assign(o,u),r===null||!g0e.default.valid(r))return o;for(let[A,p]of n)A!==null&&A===r&&Object.assign(o,p);return o}async findLocatorForLocation(e,{strict:r=!1}={}){let o=new Pi,a=this.configuration.getLinkers(),n={project:this,report:o};for(let u of a){let A=await u.findPackageLocator(e,n);if(A){if(r&&(await u.findPackageLocation(A,n)).replace(f0e,"")!==e.replaLine truncated
|
||||||
|
`;switch(Me){case 0:Qe+=`# Script name: ${Te}
|
||||||
|
`;break;case 1:Qe+=`# Script code: ${Te}
|
||||||
|
`;break}let Ue=null;if(!await ae.mktempPromise(async At=>{let Ne=V.join(At,"build.log"),{stdout:P,stderr:I}=this.configuration.getSubprocessStreams(Ne,{header:Qe,prefix:kr(this.configuration,me),report:r}),x;try{switch(Me){case 0:x=await TP(me,Te,[],{cwd:yt,project:this,stdin:Ue,stdout:P,stderr:I});break;case 1:x=await vU(me,Te,[],{cwd:yt,project:this,stdin:Ue,stdout:P,stderr:I});break}}catch(F){I.write(F.stack),x=1}if(P.end(),I.end(),x===0)return!0;ae.detachTemp(At);let y=`${kr(this.configuration,me)} couldn't be built successfully (exit code ${Kt(this.configuration,x,Bt.NUMBER)}, logs can be found here: ${Kt(this.configuration,Ne,Bt.PATH)})`;return this.optionalBuilds.has(me.locatorHash)?(r.reportInfo(9,y),!0):(r.reportError(9,y),!1)}))return!1}return!0});ne.push(...H,Promise.allSettled(H).then(yt=>{re.delete(Z),yt.every(Me=>Me.status==="fulfilled"&&Me.value===!0)&&le.set(me.locatorHash,ut)}))}if(await Hc(ne),de===re.size){let Z=Array.from(re).map(me=>{let be=this.storedPackages.get(me);if(!be)throw new Error("Assertion failed: The package should have been registered");return kr(this.configuration,be)}).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: ${Z})`);break}}this.storedBuildState=le}async install(e){var p,h;let r=this.configuration.get("nodeLinker");(p=Xe.telemetry)==null||p.reportInstall(r);let o=!1;if(await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{await this.configuration.triggerHook(C=>C.validateProject,this,{reportWarning:(C,w)=>{e.report.reportWarning(C,w)},reportError:(C,w)=>{e.report.reportError(C,w),o=!0}})}),o)return;for(let C of this.configuration.packageExtensions.values())for(let[,w]of C)for(let v of w)v.status="inactive";let a=V.join(this.cwd,this.configuration.get("lockfileFilename")),n=null;if(e.immutable)try{n=await ae.readFilePromise(a,"utf8")}catch(C){throw C.code==="ENOENT"?new Jt(28,"The lockfile would have been created by this install, which is explicitly forbidden."):C}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{for(let[,C]of this.configuration.packageExtensions)for(let[,w]of C)for(let v of w)if(v.userProvided){let b=Kt(this.configuration,v,Bt.PACKAGE_EXTENSION);switch(v.status){case"inactive":e.report.reportWarning(68,`${b}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case"redundant":e.report.reportWarning(69,`${b}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(n!==null){let C=Tg(n,this.generateLockfile());if(C!==n){let w=Ppe(a,a,n,C,void 0,void 0,{maxEditLength:100});if(w){e.report.reportSeparator();for(let v of w.hunks){e.report.reportInfo(null,`@@ -${v.oldStart},${v.oldLines} +${v.newStart},${v.newLines} @@`);for(let b of v.lines)b.startsWith("+")?e.report.reportError(28,Kt(this.configuration,b,Bt.ADDED)):b.startsWith("-")?e.report.reportError(28,Kt(this.configuration,b,Bt.REMOVED)):e.report.reportInfo(null,Kt(this.configuration,b,"grey"))}e.report.reportSeparator()}throw new Jt(28,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let C of this.configuration.packageExtensions.values())for(let[,w]of C)for(let v of w)v.userProvided&&v.status==="active"&&((h=Xe.telemetry)==null||h.reportPackageExtension(gd(v,Bt.PACKAGE_EXTENSION)));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e),(typeof e.persistProject>"u"||e.persistProject)&&e.mode!=="update-lockfile"&&await this.cacheCleanup(e)});let u=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],A=await Promise.all(u.map(async C=>vx(C,{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 ${Kt(this.configuration,"mode=update-lockfile",Bt.CODE)}`);return}await this.linkEverything(e);let C=await Promise.all(u.map(async w=>vx(w,{cwd:this.cwd})));for(let w=0;w<u.length;++w)A[w]!==C[w]&&e.report.reportError(64,`The checksum for ${u[w]} has been modified by this install, which is explicitly forbidden.`)}),await this.persistInstallStateFile(),await this.configuration.triggerHook(C=>C.afterAllInstalled,this,e)}generateLockfile(){let e=new Map;for(let[a,n]of this.storedResolutions.entries()){let u=e.get(n);u||e.set(n,u=new Set),u.add(a)}let r={};r.__metadata={version:A0e,cacheKey:void 0};for(let[a,n]of e.entries()){let u=this.originalPackages.get(a);if(!u)continue;let A=[];for(let v of n){let b=this.storedDescriptors.get(v);if(!b)throw new Error("Assertion failed: The descriptor should have been registered");A.push(b)}let p=A.map(v=>Pa(v)).sort().join(", "),h=new
Line truncated
|
||||||
|
`,`# Manual changes might be lost - proceed with caution!
|
||||||
|
`].join("")}
|
||||||
|
`+Ia(r)}async persistLockfile(){let e=V.join(this.cwd,this.configuration.get("lockfileFilename")),r="";try{r=await ae.readFilePromise(e,"utf8")}catch{}let o=this.generateLockfile(),a=Tg(r,o);a!==r&&(await ae.writeFilePromise(e,a),this.lockFileChecksum=p0e(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let u of Object.values(D_))e.push(...u);let r=(0,qb.default)(this,e),o=S_.default.serialize(r),a=Js(o);if(this.installStateChecksum===a)return;let n=this.configuration.get("installStatePath");await ae.mkdirPromise(V.dirname(n),{recursive:!0}),await ae.writeFilePromise(n,await Yut(o)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:o=!0}={}){let a=this.configuration.get("installStatePath"),n;try{let u=await Kut(await ae.readFilePromise(a));n=S_.default.deserialize(u),this.installStateChecksum=Js(u)}catch{r&&await this.applyLightResolution();return}e&&typeof n.linkersCustomData<"u"&&(this.linkersCustomData=n.linkersCustomData),o&&Object.assign(this,(0,qb.default)(n,D_.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?Object.assign(this,(0,qb.default)(n,D_.restoreResolutions)):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new Pi}),await this.persistInstallStateFile()}async persist(){await this.persistLockfile();for(let e of this.workspacesByCwd.values())await e.persistManifest()}async cacheCleanup({cache:e,report:r}){if(this.configuration.get("enableGlobalCache"))return;let o=new Set([".gitignore"]);if(!QM(e.cwd,this.cwd)||!await ae.existsPromise(e.cwd))return;let a=this.configuration.get("preferAggregateCacheInfo"),n=0,u=null;for(let A of await ae.readdirPromise(e.cwd)){if(o.has(A))continue;let p=V.resolve(e.cwd,A);e.markedFiles.has(p)||(u=A,e.immutable?r.reportError(56,`${Kt(this.configuration,V.basename(p),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):(a?n+=1:r.reportInfo(19,`${Kt(this.configuration,V.basename(p),"magenta")} appears to be unused - removing`),await ae.removePromise(p)))}a&&n!==0&&r.reportInfo(19,n>1?`${n} packages appeared to be unused and were removed`:`${u} appeared to be unused and was removed`)}}});var nC,m0e=dt(()=>{bt();t0();AP();Wl();nC=class{constructor(e,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.configuration=e;let o=this.getRegistryPath();this.isNew=!ae.existsSync(o),this.sendReport(r),this.startBuffer()}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){hd(this.values,e).add(r)}reportEnumerator(e,r){hd(this.enumerators,e).add(Js(r))}reportHit(e,r="*"){let o=jy(this.hits,e),a=vf(o,r,()=>0);o.set(r,a+1)}getRegistryPath(){let e=this.configuration.get("globalFolder");return V.join(e,"telemetry.json")}sendReport(e){let r=this.getRegistryPath(),o;try{o=ae.readJsonSync(r)}catch{o={}}let a=Date.now(),n=this.configuration.get("telemetryInterval")*24*60*60*1e3,A=(o.lastUpdate??a+n+Math.floor(n*Math.random()))+n;if(A>a&&o.lastUpdate!=null)return;try{ae.mkdirSync(V.dirname(r),{recursive:!0}),ae.writeJsonSync(r,{lastUpdate:a})}catch{return}if(A>a||!o.blocks)return;let p=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`,h=C=>K4(p,C,{configuration:this.configuration}).catch(()=>{});for(let[C,w]of Object.entries(o.blocks??{})){if(Object.keys(w).length===0)continue;let v=w;v.userId=C,v.reportType="primary";for(let R of Object.keys(v.enumerators??{}))v.enumerators[R]=v.enumerators[R].length;h(v);let b=new Map,E=20;for(let[R,N]of Object.entries(v.values))N.length>0&&b.set(R,N.slice(0,E));for(;b.size>0;){let R={};R.userId=C,R.reportType="secondary",R.metrics={};for(let[N,_]of b)R.metrics[N]=_.shift(),_.length===0&&b.delete(N);h(R)}}}applyChanges(){let e=this.getRegistryPath(),r;try{r=ae.readJsonSync(e)}catch{r={}}let o=this.configuration.get("telemetryUserId")??"*",a=r.blocks=r.blocks??{},n=a[o]=a[o]??{};for(let u of this.hits.keys()){let A=n.hits=n.hits??{},p=A[u]=A[u]??{};for(let[h,C]of this.hits.get(u))p[h]=(p[h]??0)+C}for(let u of["values","enumerators"])for(let A of this[u].keys()){let p=n[u]=n[u]??{};p[A]=[...new Set([...p[A]??[],...this[u].get(A)??[]])]}ae.mkdirSync(V.dirname(e),{recursive:!0}),ae.writeJsonSync(e,r)}startBuffer(){process.on("exit",()=>{try{this.applyChanges()}catch{}})}}});var H1={};Yt(H1,{BuildType:()=>Ob,Cache:()=>Ur,Configuration:()=>Xe,DEFAULT_LOCK_FILENAME:()=>tU,DEFAULT_RC_FILENAME:()=>eU,FormatType:()=>oce,Install
Line truncated
|
||||||
|
`),h=u.length;for(h>0&&u.includes("unstyle")&&(u=[...new Set(["unstyle",...u])].reverse());h-- >0;)A=r(t.styles[u[h]],A,p);return A},a=(n,u,A)=>{t.styles[n]=e({name:n,codes:u}),(t.keys[A]||(t.keys[A]=[])).push(n),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(h){t.alias(n,h)},get(){let h=C=>o(C,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=eAt,t.hasColor=t.hasAnsi=n=>(t.ansiRegex.lastIndex=0,typeof n=="string"&&n!==""&&t.ansiRegex.test(n)),t.alias=(n,u)=>{let A=typeof u=="string"?t[u]:u;if(typeof A!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");A.stack||(Reflect.defineProperty(A,"name",{value:n}),t.styles[n]=A,A.stack=[n]),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(p){t.alias(n,p)},get(){let p=h=>o(h,p.stack);return Reflect.setPrototypeOf(p,t),p.stack=this.stack?this.stack.concat(A.stack):A.stack,p}})},t.theme=n=>{if(!$ut(n))throw new TypeError("Expected theme to be an object");for(let u of Object.keys(n))t.alias(u,n[u]);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=B0e(),t.define=a,t};F_.exports=v0e();F_.exports.create=v0e});var Fo=U($r=>{"use strict";var tAt=Object.prototype.toString,sc=zc(),D0e=!1,R_=[],S0e={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};$r.longest=(t,e)=>t.reduce((r,o)=>Math.max(r,e?o[e].length:o.length),0);$r.hasColor=t=>!!t&&sc.hasColor(t);var Wb=$r.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);$r.nativeType=t=>tAt.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"");$r.isAsyncFn=t=>$r.nativeType(t)==="asyncfunction";$r.isPrimitive=t=>t!=null&&typeof t!="object"&&typeof t!="function";$r.resolve=(t,e,...r)=>typeof e=="function"?e.call(t,...r):e;$r.scrollDown=(t=[])=>[...t.slice(1),t[0]];$r.scrollUp=(t=[])=>[t.pop(),...t];$r.reorder=(t=[])=>{let e=t.slice();return e.sort((r,o)=>r.index>o.index?1:r.index<o.index?-1:0),e};$r.swap=(t,e,r)=>{let o=t.length,a=r===o?0:r<0?o-1:r,n=t[e];t[e]=t[a],t[a]=n};$r.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};$r.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[1]),r};$r.wordWrap=(t,e={})=>{if(!t)return t;typeof e=="number"&&(e={width:e});let{indent:r="",newline:o=`
|
||||||
|
`+r,width:a=80}=e,n=(o+r).match(/[^\S\n]/g)||[];a-=n.length;let u=`.{1,${a}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,A=t.trim(),p=new RegExp(u,"g"),h=A.match(p)||[];return h=h.map(C=>C.replace(/\n$/,"")),e.padEnd&&(h=h.map(C=>C.padEnd(a," "))),e.padStart&&(h=h.map(C=>C.padStart(a," "))),r+h.join(o)};$r.unmute=t=>{let e=t.stack.find(o=>sc.keys.color.includes(o));return e?sc[e]:t.stack.find(o=>o.slice(2)==="bg")?sc[e.slice(2)]:o=>o};$r.pascal=t=>t?t[0].toUpperCase()+t.slice(1):"";$r.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>sc.keys.color.includes(o));if(e){let o=sc["bg"+$r.pascal(e)];return o?o.black:t}let r=t.stack.find(o=>o.slice(0,2)==="bg");return r?sc[r.slice(2).toLowerCase()]||t:sc.none};$r.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>sc.keys.color.includes(o)),r=t.stack.find(o=>o.slice(0,2)==="bg");if(e&&!r)return sc[S0e[e]||e];if(r){let o=r.slice(2).toLowerCase(),a=S0e[o];return a&&sc["bg"+$r.pascal(a)]||t}return sc.none};$r.meridiem=t=>{let e=t.getHours(),r=t.getMinutes(),o=e>=12?"pm":"am";e=e%12;let a=e===0?12:e,n=r<10?"0"+r:r;return a+":"+n+" "+o};$r.set=(t={},e="",r)=>e.split(".").reduce((o,a,n,u)=>{let A=u.length-1>n?o[a]||{}:r;return!$r.isObject(A)&&n<u.length-1&&(A={}),o[a]=A},t);$r.get=(t={},e="",r)=>{let o=t[e]==null?e.split(".").reduce((a,n)=>a&&a[n],t):t[e];return o??r};$r.mixin=(t,e)=>{if(!Wb(t))return e;if(!Wb(e))return t;for(let r of Object.keys(e)){let o=Object.getOwnPropertyDescriptor(e,r);if(o.hasOwnProperty("value"))if(t.hasOwnProperty(r)&&Wb(o.value)){let a=Object.getOwnPropertyDescriptor(t,r);Wb(a.value)?t[r]=$r.merge({},t[r],e[r]):Reflect.defineProperty(t,r,o)}else Reflect.defineProperty(t,r,o);else Reflect.defineProperty(t,r,o)}return t};$r.merge=(...t)=>{let e={};for(let r of t)$r.mixin(e,r);return e};$r.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let o of Object.keys(r)){let a=r[o];typeof a=="function"?$r.define(t,o,a.bind(e)):$r.define(t,o,a)}};$r.onExit=t=>{let e=(r,o)=>{D0e||(D0e=!0,R_.forEach(a=>a()),r===!0&&process.exit(128+o))};R_.length===0&&(process.once("SIGTERM",e.bind(null,!0,15)),process.once("SIGINT",e.bind(null,!0,2)),process.once("exit",e)),R_.push(t)};$r.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};$r.defineExport=(t,e,r)=>{let o;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(a){o=a},get(){return o?o():r()}})}});var x0e=U(oC=>{"use strict";oC.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"};oC.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};oC.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};oC.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};oC.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 Q0e=U((t_t,b0e)=>{"use strict";var P0e=Ie("readline"),rAt=x0e(),nAt=/^(?:\x1b)([a-zA-Z0-9])$/,iAt=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,sAt={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 oAt(t){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(t)}function aAt(t){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(t)}var Yb=(t="",e={})=>{let r,o={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=o.sequence||""),o.sequence=o.sequence||t||o.name,t==="\r")o.raw=void 0,o.name="return";else if(t===`
|
||||||
|
`)o.name="enter";else if(t===" ")o.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x1B\x7F"||t==="\x1B\b")o.name="backspace",o.meta=t.charAt(0)==="\x1B";else if(t==="\x1B"||t==="\x1B\x1B")o.name="escape",o.meta=t.length===2;else if(t===" "||t==="\x1B ")o.name="space",o.meta=t.length===2;else if(t<="")o.name=String.fromCharCode(t.charCodeAt(0)+"a".charCodeAt(0)-1),o.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")o.name="number";else if(t.length===1&&t>="a"&&t<="z")o.name=t;else if(t.length===1&&t>="A"&&t<="Z")o.name=t.toLowerCase(),o.shift=!0;else if(r=nAt.exec(t))o.meta=!0,o.shift=/^[A-Z]$/.test(r[1]);else if(r=iAt.exec(t)){let a=[...t];a[0]==="\x1B"&&a[1]==="\x1B"&&(o.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),u=(r[3]||r[5]||1)-1;o.ctrl=!!(u&4),o.meta=!!(u&10),o.shift=!!(u&1),o.code=n,o.name=sAt[n],o.shift=oAt(n)||o.shift,o.ctrl=aAt(n)||o.ctrl}return o};Yb.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let o=P0e.createInterface({terminal:!0,input:r});P0e.emitKeypressEvents(r,o);let a=(A,p)=>e(A,Yb(A,p),o),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",a),o.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener("keypress",a),o.pause(),o.close()}};Yb.action=(t,e,r)=>{let o={...rAt,...r};return e.ctrl?(e.action=o.ctrl[e.name],e):e.option&&o.option?(e.action=o.option[e.name],e):e.shift?(e.action=o.shift[e.name],e):(e.action=o.keys[e.name],e)};b0e.exports=Yb});var F0e=U((r_t,k0e)=>{"use strict";k0e.exports=t=>{t.timers=t.timers||{};let e=t.options.timers;if(!!e)for(let r of Object.keys(e)){let o=e[r];typeof o=="number"&&(o={interval:o}),lAt(t,r,o)}};function lAt(t,e,r={}){let o=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},a=r.interval||120;o.frames=r.frames||[],o.loading=!0;let n=setInterval(()=>{o.ms=Date.now()-o.start,o.tick++,t.render()},a);return o.stop=()=>{o.loading=!1,clearInterval(n)},Reflect.defineProperty(o,"interval",{value:n}),t.once("close",()=>o.stop()),o.stop}});var T0e=U((n_t,R0e)=>{"use strict";var{define:cAt,width:uAt}=Fo(),T_=class{constructor(e){let r=e.options;cAt(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=uAt(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"}};R0e.exports=T_});var N0e=U((i_t,L0e)=>{"use strict";var L_=Fo(),Xs=zc(),N_={default:Xs.noop,noop:Xs.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||L_.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||L_.complement(this.primary)},primary:Xs.cyan,success:Xs.green,danger:Xs.magenta,strong:Xs.bold,warning:Xs.yellow,muted:Xs.dim,disabled:Xs.gray,dark:Xs.dim.gray,underline:Xs.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}};N_.merge=(t={})=>{t.styles&&typeof t.styles.enabled=="boolean"&&(Xs.enabled=t.styles.enabled),t.styles&&typeof t.styles.visible=="boolean"&&(Xs.visible=t.styles.visible);let e=L_.merge({},N_,t.styles);delete e.merge;for(let r of Object.keys(Xs))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>Xs[r]});for(let r of Object.keys(Xs.styles))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>Xs[r]});return e};L0e.exports=N_});var M0e=U((s_t,O0e)=>{"use strict";var O_=process.platform==="win32",Yf=zc(),AAt=Fo(),M_={...Yf.symbols,upDownDoubleArrow:"\u21D5",upDownDoubleArrow2:"\u2B0D",upDownArrow:"\u2195",asterisk:"*",asterism:"\u2042",bulletWhite:"\u25E6",electr
Line truncated
|
||||||
|
`),h=p[0],C=p[p.length-1],v=(o+(r?" "+r:"")).length,b=v<h.length?h.slice(v+1):"";return{header:u,prompt:h,after:b,rest:p.slice(1),last:C}}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(Wd.cursor.down(e.rest.length)),this.write(`
|
||||||
|
`.repeat(r))}catch{}this.emit("close")}start(){!this.stop&&this.options.show!==!1&&(this.stop=q_.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:o}=this;if(this.format=()=>e.call(this,this.value),this.result=()=>o.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,o){let{options:a,state:n,symbols:u,timers:A}=this,p=A&&A[e];n.timer=p;let h=a[e]||n[e]||u[e],C=r&&r[e]!=null?r[e]:await h;if(C==="")return C;let w=await this.resolve(C,n,r,o);return!w&&r&&r[e]?this.resolve(h,n,r,o):w}async prefix(){let e=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,o=this.state;return o.timer=r,Fa.isObject(e)&&(e=e[o.status]||e.pending),Fa.hasColor(e)?e:(this.styles[o.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return Fa.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,o=this.state;o.timer=r;let a=e[o.status]||e.pending||o.separator,n=await this.resolve(a,o);return Fa.isObject(n)&&(n=n[o.status]||n.pending),Fa.hasColor(n)?n:this.styles.muted(n)}async pointer(e,r){let o=await this.element("pointer",e,r);if(typeof o=="string"&&Fa.hasColor(o))return o;if(o){let a=this.styles,n=this.index===r,u=n?a.primary:h=>h,A=await this.resolve(o[n?"on":"off"]||o,this.state),p=Fa.hasColor(A)?A:u(A);return n?p:" ".repeat(A.length)}}async indicator(e,r){let o=await this.element("indicator",e,r);if(typeof o=="string"&&Fa.hasColor(o))return o;if(o){let a=this.styles,n=e.enabled===!0,u=n?a.success:a.dark,A=o[n?"on":"off"]||o;return Fa.hasColor(A)?A:u(A)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let e=await this.element("hint");return Fa.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 Fa.resolve(this,e,...r)}get base(){return G1.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||Fa.height(this.stdout,25)}get width(){return this.options.columns||Fa.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,o=[r,e].find(this.isValue.bind(this));return this.isValue(o)?o:this.initial}static get prompt(){return e=>new this(e).run()}};function CAt(t){let e=a=>t[a]===void 0||typeof t[a]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],o=["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)?o.includes(a)||(t[a]=n.bind(t)):typeof t[a]!="function"&&(t[a]=n)}}function IAt(t){typeof t=="number"&&(t=[t,t,t,t]);let e=[].concat(t||[]),r=a=>a%2===0?`
|
||||||
|
`:" ",o=[];for(let a=0;a<4;a++){let n=r(a);e[a]?o.push(n.repeat(e[a])):o.push("")}return o}K0e.exports=G1});var z0e=U((l_t,V0e)=>{"use strict";var wAt=Fo(),J0e={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 J0e.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}};V0e.exports=(t,e={})=>{let r=wAt.merge({},J0e,e.roles);return r[t]||r.default}});var W1=U((c_t,$0e)=>{"use strict";var BAt=zc(),vAt=aC(),DAt=z0e(),Kb=Fo(),{reorder:j_,scrollUp:SAt,scrollDown:xAt,isObject:X0e,swap:PAt}=Kb,G_=class extends vAt{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:o,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");X0e(r)&&(r=Object.keys(r)),Array.isArray(r)?(o!=null&&(this.index=this.findIndex(o)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(o!=null&&(r=o),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 o=[],a=0,n=async(u,A)=>{typeof u=="function"&&(u=await u.call(this)),u instanceof Promise&&(u=await u);for(let p=0;p<u.length;p++){let h=u[p]=await this.toChoice(u[p],a++,A);o.push(h),h.choices&&await n(h.choices,h)}return o};return n(e,r).then(u=>(this.state.loadingChoices=!1,u))}async toChoice(e,r,o){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=DAt(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,Kb.define(e,"parent",o),e.level=o?o.level+1:1,e.indent==null&&(e.indent=o?o.indent+" ":e.indent||""),e.path=o?o.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,BAt.unstyle(e.message).length));let u={...e};return e.reset=(A=u.input,p=u.value)=>{for(let h of Object.keys(u))e[h]=u[h];e.input=A,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,o){let a=await this.toChoice(e,r,o);return this.choices.push(a),this.index=this.choices.length-1,this.limit=this.choices.length,a}async newItem(e,r,o){let a={name:"New choice name?",editable:!0,newChoice:!0,...e},n=await this.addChoice(a,r,o);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,o].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,o="",a=await this.header(),n=await this.prefix(),u=await this.separator(),A=await this.message();this.options.promptLine!==!1&&(o=[n,A,u,""].join(" "),this.state.prompt=o);let p=await this.format(),h=await this.error()||await this.hint(),C=await this.renderChoices(),w=await this.footer();p&&(o+=p),h&&!o.includes(h)&&(o+=" "+h),e&&!p&&!C.trim()&&this.multiple&&this.emptyError!=null&&(o+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,o,C,w].filter(Boolean).join(`
|
||||||
|
`)),this.write(this.margin[2]),this.restore()}};ehe.exports=Y_});var rhe=U((A_t,the)=>{"use strict";var QAt=D0(),kAt=(t,e)=>{let r=t.toLowerCase();return o=>{let n=o.toLowerCase().indexOf(r),u=e(o.slice(n,n+r.length));return n>=0?o.slice(0,n)+u+o.slice(n+r.length):o}},K_=class extends QAt{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:o}=this.state;return this.input=o.slice(0,r)+e+o.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 o=e.toLowerCase();return r.filter(a=>a.message.toLowerCase().includes(o))}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=kAt(this.input,e),o=this.choices;this.choices=o.map(a=>({...a,message:r(a.message)})),await super.render(),this.choices=o}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};the.exports=K_});var V_=U((f_t,nhe)=>{"use strict";var J_=Fo();nhe.exports=(t,e={})=>{t.cursorHide();let{input:r="",initial:o="",pos:a,showCursor:n=!0,color:u}=e,A=u||t.styles.placeholder,p=J_.inverse(t.styles.primary),h=R=>p(t.styles.black(R)),C=r,w=" ",v=h(w);if(t.blink&&t.blink.off===!0&&(h=R=>R,v=""),n&&a===0&&o===""&&r==="")return h(w);if(n&&a===0&&(r===o||r===""))return h(o[0])+A(o.slice(1));o=J_.isPrimitive(o)?`${o}`:"",r=J_.isPrimitive(r)?`${r}`:"";let b=o&&o.startsWith(r)&&o!==r,E=b?h(o[r.length]):v;if(a!==r.length&&n===!0&&(C=r.slice(0,a)+h(r[a])+r.slice(a+1),E=""),n===!1&&(E=""),b){let R=t.styles.unstyle(C+E);return C+E+A(o.slice(R.length))}return C+E}});var Jb=U((p_t,ihe)=>{"use strict";var FAt=zc(),RAt=D0(),TAt=V_(),z_=class extends RAt{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:o,input:a}=r;return r.value=r.input=a.slice(0,o)+e+a.slice(o),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:o}=e;return e.value=e.input=o.slice(0,r-1)+o.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:o}=e;if(o[r]===void 0)return this.alert();let a=`${o}`.slice(0,r)+`${o}`.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:o}=e;return r&&r.startsWith(o)&&o!==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 o=await this.resolve(e.separator,this.state,e,r)||":";return o?" "+this.styles.disabled(o):""}async renderChoice(e,r){await this.onChoice(e,r);let{state:o,styles:a}=this,{cursor:n,initial:u="",name:A,hint:p,input:h=""}=e,{muted:C,submitted:w,primary:v,danger:b}=a,E=p,R=this.index===r,N=e.validate||(()=>!0),_=await this.choiceSeparator(e,r),J=e.message;this.align==="right"&&(J=J.padStart(this.longest+1," ")),this.align==="left"&&(J=J.padEnd(this.longest+1," "));let re=this.values[A]=h||u,oe=h?"success":"dark";await N.call(e,re,thi
Line truncated
|
||||||
|
`)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};uhe.exports=Z_});var fhe=U((m_t,Ahe)=>{"use strict";var qAt=Vb(),$_=class extends qAt{constructor(e){super(e),this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};Ahe.exports=$_});var hhe=U((y_t,phe)=>{"use strict";var jAt=D0(),GAt=Jb(),lC=GAt.prototype,e8=class extends jAt{constructor(e){super({...e,multiple:!0}),this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(e,r){let o=this.focused,a=o.parent||{};return!o.editable&&!a.editable&&(e==="a"||e==="i")?super[e]():lC.dispatch.call(this,e,r)}append(e,r){return lC.append.call(this,e,r)}delete(e,r){return lC.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?lC.next.call(this):super.next()}prev(){return this.focused.editable?lC.prev.call(this):super.prev()}async indicator(e,r){let o=e.indicator||"",a=e.editable?o: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?lC.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 o=r.parent?this.value[r.parent.name]:this.value;if(r.editable?o=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(o=r.enabled===!0),e=await r.validate(o,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)}};phe.exports=e8});var Yd=U((E_t,ghe)=>{"use strict";var WAt=aC(),YAt=V_(),{isPrimitive:KAt}=Fo(),t8=class extends WAt{constructor(e){super(e),this.initial=KAt(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let o=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!o||o.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:o}=this.state;this.input=`${o}`.slice(0,r)+e+`${o}`.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),o=this.input.slice(e),a=r.split(" ");this.state.clipboard.push(a.pop()),this.input=a.join(" "),this.cursor=this.input.length,this.input+=o,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):YAt(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),o=await this.separator(),a=await this.message(),n=[r,a,o].filter(Boolean).join(" ");this.state.prompt=n;let u=await this.header(),A=await this.format(),p=await this.error()||await this.hint(),h=await this.footer();p&&!A.includes(p)&&(A+=" "+p),n+=" "+A,this.clear(e),this.write([u,n,h].filter(Boolean).join(`
|
||||||
|
`)),this.restore()}};ghe.exports=t8});var mhe=U((C_t,dhe)=>{"use strict";var JAt=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),zb=t=>JAt(t).filter(Boolean);dhe.exports=(t,e={},r="")=>{let{past:o=[],present:a=""}=e,n,u;switch(t){case"prev":case"undo":return n=o.slice(0,o.length-1),u=o[o.length-1]||"",{past:zb([r,...n]),present:u};case"next":case"redo":return n=o.slice(1),u=o[0]||"",{past:zb([...n,r]),present:u};case"save":return{past:zb([...o,r]),present:""};case"remove":return u=zb(o.filter(A=>A!==r)),a="",u.length&&(a=u.pop()),{past:u,present:a};default:throw new Error(`Invalid action: "${t}"`)}}});var n8=U((I_t,Ehe)=>{"use strict";var VAt=Yd(),yhe=mhe(),r8=class extends VAt{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let o=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:o},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=yhe(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=yhe("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};Ehe.exports=r8});var Ihe=U((w_t,Che)=>{"use strict";var zAt=Yd(),i8=class extends zAt{format(){return""}};Che.exports=i8});var Bhe=U((B_t,whe)=>{"use strict";var XAt=Yd(),s8=class extends XAt{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()}};whe.exports=s8});var Dhe=U((v_t,vhe)=>{"use strict";var ZAt=D0(),o8=class extends ZAt{constructor(e){super({...e,multiple:!0})}};vhe.exports=o8});var l8=U((D_t,She)=>{"use strict";var $At=Yd(),a8=class extends $At{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,o=this.toNumber(this.input);return o>this.max+r?this.alert():(this.input=`${o+r}`,this.render())}down(e){let r=e||this.minor,o=this.toNumber(this.input);return o<this.min-r?this.alert():(this.input=`${o-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()}};She.exports=a8});var Phe=U((S_t,xhe)=>{xhe.exports=l8()});var Qhe=U((x_t,bhe)=>{"use strict";var eft=Yd(),c8=class extends eft{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)):""}};bhe.exports=c8});var Rhe=U((P_t,Fhe)=>{"use strict";var tft=zc(),rft=W1(),khe=Fo(),u8=class extends rft{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((o,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 o=0;o<this.scale.length;o++)r.scale.push({index:o})}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,o){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(o=>` ${o.name} - ${o.message}`)].map(o=>this.styles.muted(o)).join(`
|
||||||
|
`)}renderScaleHeading(e){let r=this.scale.map(p=>p.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let o=this.scaleLength-r.join("").length,a=Math.round(o/(r.length-1)),u=r.map(p=>this.styles.strong(p)).join(" ".repeat(a)),A=" ".repeat(this.widths[0]);return this.margin[3]+A+this.margin[1]+u}scaleIndicator(e,r,o){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,o);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 o=e.scale.map(n=>this.scaleIndicator(e,n,r)),a=this.term==="Hyper"?"":" ";return o.join(a+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let o=this.index===r,a=await this.pointer(e,r),n=await e.hint;n&&!khe.hasColor(n)&&(n=this.styles.muted(n));let u=E=>this.margin[3]+E.replace(/\s+$/,"").padEnd(this.widths[0]," "),A=this.newline,p=this.indent(e),h=await this.resolve(e.message,this.state,e,r),C=await this.renderScale(e,r),w=this.margin[1]+this.margin[3];this.scaleLength=tft.unstyle(C).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-w.length);let b=khe.wordWrap(h,{width:this.widths[0],newline:A}).split(`
|
||||||
|
`).map(E=>u(E)+this.margin[1]);return o&&(C=this.styles.info(C),b=b.map(E=>this.styles.info(E))),b[0]+=C,this.linebreak&&b.push(""),[p+a,b.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),o=await this.renderScaleHeading();return this.margin[0]+[o,...r.map(a=>a.join(" "))].join(`
|
||||||
|
`)}async render(){let{submitted:e,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u="";this.options.promptLine!==!1&&(u=[o,n,a,""].join(" "),this.state.prompt=u);let A=await this.header(),p=await this.format(),h=await this.renderScaleKey(),C=await this.error()||await this.hint(),w=await this.renderChoices(),v=await this.footer(),b=this.emptyError;p&&(u+=p),C&&!u.includes(C)&&(u+=" "+C),e&&!p&&!w.trim()&&this.multiple&&b!=null&&(u+=this.styles.danger(b)),this.clear(r),this.write([A,u,h,w,v].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)}};Fhe.exports=u8});var Nhe=U((b_t,Lhe)=>{"use strict";var The=zc(),nft=(t="")=>typeof t=="string"?t.replace(/^['"]|['"]$/g,""):"",f8=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=nft(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}},ift=async(t={},e={},r=o=>o)=>{let o=new Set,a=t.fields||[],n=t.template,u=[],A=[],p=[],h=1;typeof n=="function"&&(n=await n());let C=-1,w=()=>n[++C],v=()=>n[C+1],b=E=>{E.line=h,u.push(E)};for(b({type:"bos",value:""});C<n.length-1;){let E=w();if(/^[^\S\n ]$/.test(E)){b({type:"text",value:E});continue}if(E===`
|
||||||
|
`){b({type:"newline",value:E}),h++;continue}if(E==="\\"){E+=w(),b({type:"text",value:E});continue}if((E==="$"||E==="#"||E==="{")&&v()==="{"){let N=w();E+=N;let _={type:"template",open:E,inner:"",close:"",value:E},J;for(;J=w();){if(J==="}"){v()==="}"&&(J+=w()),_.value+=J,_.close=J;break}J===":"?(_.initial="",_.key=_.inner):_.initial!==void 0&&(_.initial+=J),_.value+=J,_.inner+=J}_.template=_.open+(_.initial||_.inner)+_.close,_.key=_.key||_.inner,e.hasOwnProperty(_.key)&&(_.initial=e[_.key]),_=r(_),b(_),p.push(_.key),o.add(_.key);let re=A.find(oe=>oe.name===_.key);_.field=a.find(oe=>oe.name===_.key),re||(re=new f8(_),A.push(re)),re.lines.push(_.line-1);continue}let R=u[u.length-1];R.type==="text"&&R.line===h?R.value+=E:b({type:"text",value:E})}return b({type:"eos",value:""}),{input:n,tabstops:u,unique:o,keys:p,items:A}};Lhe.exports=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),o={...e.values,...e.initial},{tabstops:a,items:n,keys:u}=await ift(e,o),A=A8("result",t,e),p=A8("format",t,e),h=A8("validate",t,e,!0),C=t.isValue.bind(t);return async(w={},v=!1)=>{let b=0;w.required=r,w.items=n,w.keys=u,w.output="";let E=async(J,re,oe,pe)=>{let he=await h(J,re,oe,pe);return he===!1?"Invalid field "+oe.name:he};for(let J of a){let re=J.value,oe=J.key;if(J.type!=="template"){re&&(w.output+=re);continue}if(J.type==="template"){let pe=n.find(xe=>xe.name===oe);e.required===!0&&w.required.add(pe.name);let he=[pe.input,w.values[pe.value],pe.value,re].find(C),ge=(pe.field||{}).message||J.inner;if(v){let xe=await E(w.values[oe],w,pe,b);if(xe&&typeof xe=="string"||xe===!1){w.invalid.set(oe,xe);continue}w.invalid.delete(oe);let g=await A(w.values[oe],w,pe,b);w.output+=The.unstyle(g);continue}pe.placeholder=!1;let le=re;re=await p(re,w,pe,b),he!==re?(w.values[oe]=he,re=t.styles.typing(he),w.missing.delete(ge)):(w.values[oe]=void 0,he=`<${ge}>`,re=t.styles.primary(he),pe.placeholder=!0,w.required.has(oe)&&w.missing.add(ge)),w.missing.has(ge)&&w.validating&&(re=t.styles.warning(he)),w.invalid.has(oe)&&w.validating&&(re=t.styles.danger(he)),b===w.index&&(le!==re?re=t.styles.underline(re):re=t.styles.heading(The.unstyle(re))),b++}re&&(w.output+=re)}let R=w.output.split(`
|
||||||
|
`).map(J=>" "+J),N=n.length,_=0;for(let J of n)w.invalid.has(J.name)&&J.lines.forEach(re=>{R[re][0]===" "&&(R[re]=w.styles.danger(w.symbols.bullet)+R[re].slice(1))}),t.isValue(w.values[J.name])&&_++;return w.completed=(_/N*100).toFixed(0),w.output=R.join(`
|
||||||
|
`),w.output}};function A8(t,e,r,o){return(a,n,u,A)=>typeof u.field[t]=="function"?u.field[t].call(e,a,n,u,A):[o,a].find(p=>e.isValue(p))}});var Mhe=U((Q_t,Ohe)=>{"use strict";var sft=zc(),oft=Nhe(),aft=aC(),p8=class extends aft{constructor(e){super(e),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await oft(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 o=this.getItem(),a=o.input.slice(0,this.cursor),n=o.input.slice(this.cursor);this.input=o.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),o=e.input.slice(0,this.cursor-1);this.input=e.input=`${o}${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:o,size:a}=this.state,n=[this.options.newline,`
|
||||||
|
`].find(J=>J!=null),u=await this.prefix(),A=await this.separator(),p=await this.message(),h=[u,p,A].filter(Boolean).join(" ");this.state.prompt=h;let C=await this.header(),w=await this.error()||"",v=await this.hint()||"",b=o?"":await this.interpolate(this.state),E=this.state.key=r[e]||"",R=await this.format(E),N=await this.footer();R&&(h+=" "+R),v&&!R&&this.state.completed===0&&(h+=" "+v),this.clear(a);let _=[C,h,b,N,w.trim()];this.write(_.filter(Boolean).join(n)),this.restore()}getItem(e){let{items:r,keys:o,index:a}=this.state,n=r.find(u=>u.name===o[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:o,values:a}=this.state;if(e.size){let A="";for(let[p,h]of e)A+=`Invalid ${p}: ${h}
|
||||||
|
`;return this.state.error=A,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let u=sft.unstyle(o).split(`
|
||||||
|
`).map(A=>A.slice(1)).join(`
|
||||||
|
`);return this.value={values:a,result:u},super.submit()}};Ohe.exports=p8});var _he=U((k_t,Uhe)=>{"use strict";var lft="(Use <shift>+<up/down> to sort)",cft=D0(),h8=class extends cft{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,lft].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,r){let o=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} - `+o:n+o}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};Uhe.exports=h8});var qhe=U((F_t,Hhe)=>{"use strict";var uft=W1(),g8=class extends uft{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(o=>this.styles.muted(o)),this.state.header=r.join(`
|
||||||
|
`)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let o of r)o.scale=Aft(5,this.options),o.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],o=r.selected;return e.scale.forEach(a=>a.selected=!1),r.selected=!o,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 o=this.index===r,a=this.term==="Hyper",n=a?9:8,u=a?"":" ",A=this.symbols.line.repeat(n),p=" ".repeat(n+(a?0:1)),h=re=>(re?this.styles.success("\u25C9"):"\u25EF")+u,C=r+1+".",w=o?this.styles.heading:this.styles.noop,v=await this.resolve(e.message,this.state,e,r),b=this.indent(e),E=b+e.scale.map((re,oe)=>h(oe===e.scaleIdx)).join(A),R=re=>re===e.scaleIdx?w(re):re,N=b+e.scale.map((re,oe)=>R(oe)).join(p),_=()=>[C,v].filter(Boolean).join(" "),J=()=>[_(),E,N," "].filter(Boolean).join(`
|
||||||
|
`);return o&&(E=this.styles.cyan(E),N=this.styles.cyan(N)),J()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(o,a)=>await this.renderChoice(o,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,o=await this.prefix(),a=await this.separator(),n=await this.message(),u=[o,n,a].filter(Boolean).join(" ");this.state.prompt=u;let A=await this.header(),p=await this.format(),h=await this.error()||await this.hint(),C=await this.renderChoices(),w=await this.footer();(p||!h)&&(u+=" "+p),h&&!u.includes(h)&&(u+=" "+h),e&&!p&&!C&&this.multiple&&this.type!=="form"&&(u+=this.styles.danger(this.emptyError)),this.clear(r),this.write([u,A,C,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 Aft(t,e={}){if(Array.isArray(e.scale))return e.scale.map(o=>({...o}));let r=[];for(let o=1;o<t+1;o++)r.push({i:o,selected:!1});return r}Hhe.exports=g8});var Ghe=U((R_t,jhe)=>{jhe.exports=n8()});var Yhe=U((T_t,Whe)=>{"use strict";var fft=Vb(),d8=class extends fft{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=o=>this.styles.primary.underline(o);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(),o=await this.prefix(),a=await this.separator(),n=await this.message(),u=await this.format(),A=await this.error()||await this.hint(),p=await this.footer(),h=[o,n,a,u].join(" ");this.state.prompt=h,A&&!h.includes(A)&&(h+=" "+A),this.clear(e),this.write([r,h,p].filter(Boolean).join(`
|
||||||
|
`)),this.write(this.margin[2]),this.restore()}};Whe.exports=d8});var Jhe=U((L_t,Khe)=>{"use strict";var pft=D0(),m8=class extends pft{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 o=await super.toChoices(e,r);if(o.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>o.length)throw new Error("Please specify the index of the correct answer from the list of choices");return o}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)}}};Khe.exports=m8});var zhe=U(y8=>{"use strict";var Vhe=Fo(),ps=(t,e)=>{Vhe.defineExport(y8,t,e),Vhe.defineExport(y8,t.toLowerCase(),e)};ps("AutoComplete",()=>rhe());ps("BasicAuth",()=>che());ps("Confirm",()=>fhe());ps("Editable",()=>hhe());ps("Form",()=>Jb());ps("Input",()=>n8());ps("Invisible",()=>Ihe());ps("List",()=>Bhe());ps("MultiSelect",()=>Dhe());ps("Numeral",()=>Phe());ps("Password",()=>Qhe());ps("Scale",()=>Rhe());ps("Select",()=>D0());ps("Snippet",()=>Mhe());ps("Sort",()=>_he());ps("Survey",()=>qhe());ps("Text",()=>Ghe());ps("Toggle",()=>Yhe());ps("Quiz",()=>Jhe())});var Zhe=U((O_t,Xhe)=>{Xhe.exports={ArrayPrompt:W1(),AuthPrompt:X_(),BooleanPrompt:Vb(),NumberPrompt:l8(),StringPrompt:Yd()}});var K1=U((M_t,ege)=>{"use strict";var $he=Ie("assert"),C8=Ie("events"),S0=Fo(),Zc=class extends C8{constructor(e,r){super(),this.options=S0.merge({},e),this.answers={...r}}register(e,r){if(S0.isObject(e)){for(let a of Object.keys(e))this.register(a,e[a]);return this}$he.equal(typeof r,"function","expected a function");let o=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[o]=r:this.prompts[o]=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(S0.merge({},this.options,r))}catch(o){return Promise.reject(o)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let r=S0.merge({},this.options,e),{type:o,name:a}=e,{set:n,get:u}=S0;if(typeof o=="function"&&(o=await o.call(this,e,this.answers)),!o)return this.answers[a];$he(this.prompts[o],`Prompt "${o}" is not registered`);let A=new this.prompts[o](r),p=u(this.answers,a);A.state.answers=this.answers,A.enquirer=this,a&&A.on("submit",C=>{this.emit("answer",a,C,A),n(this.answers,a,C)});let h=A.emit.bind(A);return A.emit=(...C)=>(this.emit.call(this,...C),h(...C)),this.emit("prompt",A,this),r.autofill&&p!=null?(A.value=A.input=p,r.autofill==="show"&&await A.submit()):p=A.value=await A.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||aC()}static get prompts(){return zhe()}static get types(){return Zhe()}static get prompt(){let e=(r,...o)=>{let a=new this(...o),n=a.emit.bind(a);return a.emit=(...u)=>(e.emit(...u),n(...u)),a.prompt(r)};return S0.mixinEmitter(e,new C8),e}};S0.mixinEmitter(Zc,new C8);var E8=Zc.prompts;for(let t of Object.keys(E8)){let e=t.toLowerCase(),r=o=>new E8[t](o).run();Zc.prompt[e]=r,Zc[e]=r,Zc[t]||Reflect.defineProperty(Zc,t,{get:()=>E8[t]})}var Y1=t=>{S0.defineExport(Zc,t,()=>Zc.types[t])};Y1("ArrayPrompt");Y1("AuthPrompt");Y1("BooleanPrompt");Y1("NumberPrompt");Y1("StringPrompt");ege.exports=Zc});var X1=U((C8t,age)=>{var Eft=Ub();function Cft(t,e,r){var o=t==null?void 0:Eft(t,e);return o===void 0?r:o}age.exports=Cft});var uge=U((S8t,cge)=>{function Ift(t,e){for(var r=-1,o=t==null?0:t.length;++r<o&&e(t[r],r,t)!==!1;);return t}cge.exports=Ift});var fge=U((x8t,Age)=>{var wft=pd(),Bft=LS();function vft(t,e){return t&&wft(e,Bft(e),t)}Age.exports=vft});var hge=U((P8t,pge)=>{var Dft=pd(),Sft=Hy();function xft(t,e){return t&&Dft(e,Sft(e),t)}pge.exports=xft});var dge=U((b8t,gge)=>{var Pft=pd(),bft=PS();function Qft(t,e){return Pft(t,bft(t),e)}gge.exports=Qft});var S8=U((Q8t,mge)=>{var kft=xS(),Fft=_S(),Rft=PS(),Tft=HL(),Lft=Object.getOwnPropertySymbols,Nft=Lft?function(t){for(var e=[];t;)kft(e,Rft(t)),t=Fft(t);return e}:Tft;mge.exports=Nft});var Ege=U((k8t,yge)=>{var Oft=pd(),Mft=S8();function Uft(t,e){return Oft(t,Mft(t),e)}yge.exports=Uft});var x8=U((F8t,Cge)=>{var _ft=_L(),Hft=S8(),qft=Hy();function jft(t){return _ft(t,qft,Hft)}Cge.exports=jft});var wge=U((R8t,Ige)=>{var Gft=Object.prototype,Wft=Gft.hasOwnProperty;function Yft(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Wft.call(t,"index")&&(r.index=t.index,r.input=t.input),r}Ige.exports=Yft});var vge=U((T8t,Bge)=>{var Kft=MS();function Jft(t,e){var r=e?Kft(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}Bge.exports=Jft});var Sge=U((L8t,Dge)=
Line truncated
|
||||||
|
${J} at ${re}`:`
|
||||||
|
${J}`}).join("");h.push({text:`Conflict detected in constraint targeting ${ye.pretty(t.configuration,b,ye.Type.CODE)}; conflicting values are:${R}`,fixable:!1})}else{let[[R]]=E,N=(0,ime.default)(v,b);if(N===R)continue;if(!o){let _=typeof N>"u"?`Missing field ${ye.pretty(t.configuration,b,ye.Type.CODE)}; expected ${ye.pretty(t.configuration,R,ye.Type.INSPECT)}`:typeof R>"u"?`Extraneous field ${ye.pretty(t.configuration,b,ye.Type.CODE)} currently set to ${ye.pretty(t.configuration,N,ye.Type.INSPECT)}`:`Invalid field ${ye.pretty(t.configuration,b,ye.Type.CODE)}; expected ${ye.pretty(t.configuration,R,ye.Type.INSPECT)}, found ${ye.pretty(t.configuration,N,ye.Type.INSPECT)}`;h.push({text:_,fixable:!0});continue}typeof R>"u"?(0,ame.default)(v,b):(0,sme.default)(v,b,R),C=!0}C&&a.set(w,v)}h.length>0&&n.set(w,h)}return{changedWorkspaces:a,remainingErrors:n}}var ime,sme,ome,ame,i2,zht,Xht,Zht,o2=dt(()=>{Ke();ime=tt(X1()),sme=tt(Q8()),ome=tt(nme()),ame=tt(R8()),i2=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 o=Object.prototype.hasOwnProperty.call(e,r)?e[r]:void 0;if(typeof o>"u")continue;Ye.getArrayWithDefault(this.indexes[r],o).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 o=[],a;for(let[u,A]of r){let p=u,h=Object.prototype.hasOwnProperty.call(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>"u"){o.push([p,A]);continue}let C=new Set(h.get(A)??[]);if(C.size===0)return[];if(typeof a>"u")a=C;else for(let w of a)C.has(w)||a.delete(w);if(a.size===0)break}let n=[...a??[]];return o.length>0&&(n=n.filter(u=>{for(let[A,p]of o)if(!(typeof p<"u"?Object.prototype.hasOwnProperty.call(u,A)&&u[A]===p:Object.prototype.hasOwnProperty.call(u,A)===!1))return!1;return!0})),n}},zht=/^[0-9]+$/,Xht=/^[a-zA-Z0-9_]+$/,Zht=new Set(["scripts",...Lt.allDependencies])});var lme=U((zGt,sH)=>{var tgt;(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.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.Var("C"),new t.type.Var("Cs")])]),ne
Line truncated
|
||||||
|
`+p:"")),u.error.method="_execFileSync",u.error.program=a,u.error.args=n,u.error.extMessage=p,u.error.exitCode=+A),Un.unlinkSync(h),Un.unlinkSync(C),Un.unlinkSync(w),Un.unlinkSync(v),u}function sgt(t){var e,r={},o,a={env:process.env,encoding:t.encoding};if(sh||($d?process.env.PSModulePath?(sh="powershell.exe",iQ=["-ExecutionPolicy","Bypass","-File",__dirname+"\\read.ps1"]):(sh="cscript.exe",iQ=["//nologo",__dirname+"\\read.cs.js"]):(sh="/bin/sh",iQ=[__dirname+"/read.sh"])),$d&&!process.env.PSModulePath&&(a.stdio=[process.stdin]),lH.execFileSync){e=pme(t),a2&&a2("execFileSync",e);try{r.input=lH.execFileSync(sh,e,a)}catch(n){o=n.stderr?(n.stderr+"").trim():"",r.error=new Error(Ame+(o?`
|
||||||
|
`+o:"")),r.error.method="execFileSync",r.error.program=sh,r.error.args=e,r.error.extMessage=o,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=igt(t,a);return r.error||(r.input=r.input.replace(/^\s*'|'\s*$/g,""),t.display=""),r}function AH(t){var e="",r=t.display,o=!t.display&&t.keyIn&&t.hideEchoBack&&!t.mask;function a(){var n=sgt(t);if(n.error)throw n.error;return n.input}return uH&&uH(t),function(){var n,u,A;function p(){return n||(n=process.binding("fs"),u=process.binding("constants")),n}if(typeof Jf=="string")if(Jf=null,$d){if(A=function(h){var C=h.replace(/^\D+/,"").split("."),w=0;return(C[0]=+C[0])&&(w+=C[0]*1e4),(C[1]=+C[1])&&(w+=C[1]*100),(C[2]=+C[2])&&(w+=C[2]),w}(process.version),!(A>=20302&&A<40204||A>=5e4&&A<50100||A>=50600&&A<60200)&&process.stdin.isTTY)process.stdin.pause(),Jf=process.stdin.fd,pC=process.stdin._handle;else try{Jf=p().open("CONIN$",u.O_RDWR,parseInt("0666",8)),pC=new cme(Jf,!0)}catch{}if(process.stdout.isTTY)eu=process.stdout.fd;else{try{eu=Un.openSync("\\\\.\\CON","w")}catch{}if(typeof eu!="number")try{eu=p().open("CONOUT$",u.O_RDWR,parseInt("0666",8))}catch{}}}else{if(process.stdin.isTTY){process.stdin.pause();try{Jf=Un.openSync("/dev/tty","r"),pC=process.stdin._handle}catch{}}else try{Jf=Un.openSync("/dev/tty","r"),pC=new cme(Jf,!1)}catch{}if(process.stdout.isTTY)eu=process.stdout.fd;else try{eu=Un.openSync("/dev/tty","w")}catch{}}}(),function(){var n,u,A=!t.hideEchoBack&&!t.keyIn,p,h,C,w,v;sQ="";function b(E){return E===ume?!0:pC.setRawMode(E)!==0?!1:(ume=E,!0)}if(fme||!pC||typeof eu!="number"&&(t.display||!A)){e=a();return}if(t.display&&(Un.writeSync(eu,t.display),t.display=""),!t.displayOnly){if(!b(!A)){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&&(u=new RegExp("[^"+t.limit+"]","g"+(t.caseSensitive?"":"i")));;){C=0;try{C=Un.readSync(Jf,p,0,h)}catch(E){if(E.code!=="EOF"){b(!1),e+=a();return}}if(C>0?(w=p.toString(t.encoding,0,C),sQ+=w):(w=`
|
||||||
|
`,sQ+=String.fromCharCode(0)),w&&typeof(v=(w.match(/^(.*?)[\r\n]/)||[])[1])=="string"&&(w=v,n=!0),w&&(w=w.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"")),w&&u&&(w=w.replace(u,"")),w&&(A||(t.hideEchoBack?t.mask&&Un.writeSync(eu,new Array(w.length+1).join(t.mask)):Un.writeSync(eu,w)),e+=w),!t.keyIn&&n||t.keyIn&&e.length>=h)break}!A&&!o&&Un.writeSync(eu,`
|
||||||
|
`),b(!1)}}(),t.print&&!o&&t.print(r+(t.displayOnly?"":(t.hideEchoBack?new Array(e.length+1).join(t.mask):e)+`
|
||||||
|
`),t.encoding),t.displayOnly?"":hH=t.keepWhitespace||t.keyIn?e:e.trim()}function ogt(t,e){var r=[];function o(a){a!=null&&(Array.isArray(a)?a.forEach(o):(!e||e(a))&&r.push(a))}return o(t),r}function gH(t){return t.replace(/[\x00-\x7f]/g,function(e){return"\\x"+("00"+e.charCodeAt().toString(16)).substr(-2)})}function xs(){var t=Array.prototype.slice.call(arguments),e,r;return t.length&&typeof t[0]=="boolean"&&(r=t.shift(),r&&(e=Object.keys(cH),t.unshift(cH))),t.reduce(function(o,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 u;if(!!a.hasOwnProperty(n))switch(u=a[n],n){case"mask":case"limitMessage":case"defaultInput":case"encoding":u=u!=null?u+"":"",u&&n!=="limitMessage"&&(u=u.replace(/[\r\n]/g,"")),o[n]=u;break;case"bufferSize":!isNaN(u=parseInt(u,10))&&typeof u=="number"&&(o[n]=u);break;case"displayOnly":case"keyIn":case"hideEchoBack":case"caseSensitive":case"keepWhitespace":case"history":case"cd":o[n]=!!u;break;case"limit":case"trueValue":case"falseValue":o[n]=ogt(u,function(A){var p=typeof A;return p==="string"||p==="number"||p==="function"||A instanceof RegExp}).map(function(A){return typeof A=="string"?A.replace(/[\r\n]/g,""):A});break;case"print":case"phContent":case"preCheck":o[n]=typeof u=="function"?u:void 0;break;case"prompt":case"display":o[n]=u??"";break}})),o},{})}function fH(t,e,r){return e.some(function(o){var a=typeof o;return a==="string"?r?t===o:t.toLowerCase()===o.toLowerCase():a==="number"?parseFloat(t)===o:a==="function"?o(t):o instanceof RegExp?o.test(t):!1})}function dH(t,e){var r=oh.normalize($d?(process.env.HOMEDRIVE||"")+(process.env.HOMEPATH||""):process.env.HOME||"").replace(/[\/\\]+$/,"");return t=oh.normalize(t),e?t.replace(/^~(?=\/|\\|$)/,r):t.replace(new RegExp("^"+gH(r)+"(?=\\/|\\\\|$)",$d?"i":""),"~")}function hC(t,e){var r="(?:\\(([\\s\\S]*?)\\))?(\\w+|.-.)(?:\\(([\\s\\S]*?)\\))?",o=new RegExp("(\\$)?(\\$<"+r+">)","g"),a=new RegExp("(\\$)?(\\$\\{"+r+"\\})","g");function n(u,A,p,h,C,w){var v;return A||typeof(v=e(C))!="string"?p:v?(h||"")+v+(w||""):""}return t.replace(o,n).replace(a,n)}function hme(t,e,r){var o,a=[],n=-1,u=0,A="",p;function h(C,w){return w.length>3?(C.push(w[0]+"..."+w[w.length-1]),p=!0):w.length&&(C=C.concat(w)),C}return o=t.reduce(function(C,w){return C.concat((w+"").split(""))},[]).reduce(function(C,w){var v,b;return e||(w=w.toLowerCase()),v=/^\d$/.test(w)?1:/^[A-Z]$/.test(w)?2:/^[a-z]$/.test(w)?3:0,r&&v===0?A+=w:(b=w.charCodeAt(0),v&&v===n&&b===u+1?a.push(w):(C=h(C,a),a=[w],n=v),u=b),C},[]),o=h(o,a),A&&(o.push(A),p=!0),{values:o,suppressed:p}}function gme(t,e){return t.join(t.length>2?", ":e?" / ":"/")}function dme(t,e){var r,o,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":o=e[e.hasOwnProperty(t+"Src")?t+"Src":t],e.keyIn?(a=hme(o,e.caseSensitive),o=a.values):o=o.filter(function(u){var A=typeof u;return A==="string"||A==="number"}),r=gme(o,a.suppressed);break;case"limitCount":case"limitCountNotZero":r=e[e.hasOwnProperty("limitSrc")?"limitSrc":"limit"].length,r=r||t!=="limitCountNotZero"?r+"":"";break;case"lastInput":r=hH;break;case"cwd":case"CWD":case"cwdHome":r=process.cwd(),t==="CWD"?r=oh.basename(r):t==="cwdHome"&&(r=dH(r));break;case"date":case"time":case"localeDate":case"localeTime":r=new Date()["to"+t.replace(/^./,function(u){return u.toUpperCase()})+"String"]();break;default:typeof(n=(t.match(/^history_m(\d+)$/)||[])[1])=="string"&&(r=Zd[Zd.length-n]||"")}return r}function mme(t){var e=/^(.)-(.)$/.exec(t),r="",o,a,n,u;if(!e)return null;for(o=e[1].charCodeAt(0),a=e[2].charCodeAt(0),u=o<a?1:-1,n=o;n!==a+u;n+=u)r+=String.fromCharCode(n);return r}function pH(t){var e=new RegExp(/(\s*)(?:("|')(.*?)(?:\2|$)|(\S+))/g),r,o="",a=[],n;for(t=t.trim();r=e.exec(t);)n=r[3]||r[4]||"",r[1]&&(a.push(o),o=""),o+=n;return o&&a.push(o),a}function yme(t,e){return e.trueValue.length&&fH(t,e.trueValue,e.caseSensitive)?!0:e.falseValue.length&&fH(t,e.falseValue,e.caseSensitive)?!1:t}function Eme(t){var e,r,o,a,n,u,A;function p(C){return dme(C,t)}function h(C){t.display+=(/[^\r\n]$/.test(t.display)?`
|
||||||
|
`:"")+C}for(t.limitSrc=t.limit,t.displaySrc=t.display,t.limit="",t.display=hC(t.display+"",p);;){if(e=AH(t),r=!1,o="",t.defaultInput&&!e&&(e=t.defaultInput),t.history&&((a=/^\s*\!(?:\!|-1)(:p)?\s*$/.exec(e))?(n=Zd[0]||"",a[1]?r=!0:e=n,h(n+`
|
||||||
|
`),r||(t.displayOnly=!0,AH(t),t.displayOnly=!1)):e&&e!==Zd[Zd.length-1]&&(Zd=[e])),!r&&t.cd&&e)switch(u=pH(e),u[0].toLowerCase()){case"cd":if(u[1])try{process.chdir(dH(u[1],!0))}catch(C){h(C+"")}r=!0;break;case"pwd":h(process.cwd()),r=!0;break}if(!r&&t.preCheck&&(A=t.preCheck(e,t),e=A.res,A.forceNext&&(r=!0)),!r){if(!t.limitSrc.length||fH(e,t.limitSrc,t.caseSensitive))break;t.limitMessage&&(o=hC(t.limitMessage,p))}h((o?o+`
|
||||||
|
`:"")+hC(t.displaySrc+"",p))}return yme(e,t)}qr._DBG_set_useExt=function(t){fme=t};qr._DBG_set_checkOptions=function(t){uH=t};qr._DBG_set_checkMethod=function(t){a2=t};qr._DBG_clearHistory=function(){hH="",Zd=[]};qr.setDefaultOptions=function(t){return cH=xs(!0,t),xs(!0)};qr.question=function(t,e){return Eme(xs(xs(!0,e),{display:t}))};qr.prompt=function(t){var e=xs(!0,t);return e.display=e.prompt,Eme(e)};qr.keyIn=function(t,e){var r=xs(xs(!0,e),{display:t,keyIn:!0,keepWhitespace:!0});return r.limitSrc=r.limit.filter(function(o){var a=typeof o;return a==="string"||a==="number"}).map(function(o){return hC(o+"",mme)}),r.limit=gH(r.limitSrc.join("")),["trueValue","falseValue"].forEach(function(o){r[o]=r[o].reduce(function(a,n){var u=typeof n;return u==="string"||u==="number"?a=a.concat((n+"").split("")):a.push(n),a},[])}),r.display=hC(r.display+"",function(o){return dme(o,r)}),yme(AH(r),r)};qr.questionEMail=function(t,e){return t==null&&(t="Input e-mail address: "),qr.question(t,xs({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}))};qr.questionNewPassword=function(t,e){var r,o,a,n=xs({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(b){return b==="charlist"?r.text:b==="length"?o+"..."+a:null}}),u,A,p,h,C,w,v;for(e=e||{},u=hC(e.charlist?e.charlist+"":"$<!-~>",mme),(isNaN(o=parseInt(e.min,10))||typeof o!="number")&&(o=12),(isNaN(a=parseInt(e.max,10))||typeof a!="number")&&(a=24),h=new RegExp("^["+gH(u)+"]{"+o+","+a+"}$"),r=hme([u],n.caseSensitive,!0),r.text=gme(r.values,r.suppressed),A=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: "),C=n.limitMessage;!v;)n.limit=h,n.limitMessage=C,w=qr.question(t,n),n.limit=[w,""],n.limitMessage=p,v=qr.question(A,n);return w};function Cme(t,e,r){var o;function a(n){return o=r(n),!isNaN(o)&&typeof o=="number"}return qr.question(t,xs({limitMessage:"Input valid number, please."},e,{limit:a,cd:!1})),o}qr.questionInt=function(t,e){return Cme(t,e,function(r){return parseInt(r,10)})};qr.questionFloat=function(t,e){return Cme(t,e,parseFloat)};qr.questionPath=function(t,e){var r,o="",a=xs({hideEchoBack:!1,limitMessage:`$<error(
|
||||||
|
)>Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},e,{keepWhitespace:!1,limit:function(n){var u,A,p;n=dH(n,!0),o="";function h(C){C.split(/\/|\\/).reduce(function(w,v){var b=oh.resolve(w+=v+oh.sep);if(!Un.existsSync(b))Un.mkdirSync(b);else if(!Un.statSync(b).isDirectory())throw new Error("Non directory already exists: "+b);return w},"")}try{if(u=Un.existsSync(n),r=u?Un.realpathSync(n):oh.resolve(n),!e.hasOwnProperty("exists")&&!u||typeof e.exists=="boolean"&&e.exists!==u)return o=(u?"Already exists":"No such file or directory")+": "+r,!1;if(!u&&e.create&&(e.isDirectory?h(r):(h(oh.dirname(r)),Un.closeSync(Un.openSync(r,"w"))),r=Un.realpathSync(r)),u&&(e.min||e.max||e.isFile||e.isDirectory)){if(A=Un.statSync(r),e.isFile&&!A.isFile())return o="Not file: "+r,!1;if(e.isDirectory&&!A.isDirectory())return o="Not directory: "+r,!1;if(e.min&&A.size<+e.min||e.max&&A.size>+e.max)return o="Size "+A.size+" is out of range: "+r,!1}if(typeof e.validate=="function"&&(p=e.validate(r))!==!0)return typeof p=="string"&&(o=p),!1}catch(C){return o=C+"",!1}return!0},phContent:function(n){return n==="error"?o:n!=="min"&&n!=="max"?null:e.hasOwnProperty(n)?e[n]+"":""}});return e=e||{},t==null&&(t='Input path (you can "cd" and "pwd"): '),qr.question(t,a),r};function Ime(t,e){var r={},o={};return typeof t=="object"?(Object.keys(t).forEach(function(a){typeof t[a]=="function"&&(o[e.caseSensitive?a:a.toLowerCase()]=t[a])}),r.preCheck=function(a){var n;return r.args=pH(a),n=r.args[0]||"",e.caseSensitive||(n=n.toLowerCase()),r.hRes=n!=="_"&&o.hasOwnProperty(n)?o[n].apply(a,r.args.slice(1)):o.hasOwnProperty("_")?o._.apply(a,r.args):null,{res:a,forceNext:!1}},o.hasOwnProperty("_")||(r.limit=function(){var a=r.args[0]||"";return e.caseSensitive||(a=a.toLowerCase()),o.hasOwnProperty(a)})):r.preCheck=function(a){return r.args=pH(a),r.hRes=typeof t=="function"?t.apply(a,r.args):!0,{res:a,forceNext:!1}},r}qr.promptCL=function(t,e){var r=xs({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=Ime(t,r);return r.limit=o.limit,r.preCheck=o.preCheck,qr.prompt(r),o.args};qr.promptLoop=function(t,e){for(var r=xs({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},e);!t(qr.prompt(r)););};qr.promptCLLoop=function(t,e){var r=xs({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=Ime(t,r);for(r.limit=o.limit,r.preCheck=o.preCheck;qr.prompt(r),!o.hRes;);};qr.promptSimShell=function(t){return qr.prompt(xs({hideEchoBack:!1,history:!0},t,{prompt:function(){return $d?"$<cwd>>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$<cwdHome>$ "}()}))};function wme(t,e,r){var o;return t==null&&(t="Are you sure? "),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s*:?\s*$/,"")+" [y/n]: "),o=qr.keyIn(t,xs(e,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof o=="boolean"?o:""}qr.keyInYN=function(t,e){return wme(t,e)};qr.keyInYNStrict=function(t,e){return wme(t,e,"yn")};qr.keyInPause=function(t,e){t==null&&(t="Continue..."),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s+$/,"")+" (Hit any key)"),qr.keyIn(t,xs({limit:null},e,{hideEchoBack:!0,mask:""}))};qr.keyInSelect=function(t,e,r){var o=xs({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={},u=49,A=`
|
||||||
|
`;if(!Array.isArray(t)||!t.length||t.length>35)throw"`items` must be Array (max length: 35).";return t.forEach(function(p,h){var C=String.fromCharCode(u);a+=C,n[C]=h,A+="["+C+"] "+(p+"").trim()+`
|
||||||
|
`,u=u===57?97:u+1}),(!r||r.cancel!==!1)&&(a+="0",n[0]=-1,A+="[0] "+(r&&r.cancel!=null&&typeof r.cancel!="boolean"?(r.cancel+"").trim():"CANCEL")+`
|
||||||
|
`),o.limit=a,A+=`
|
||||||
|
`,e==null&&(e="Choose one from list: "),(e+="")&&((!r||r.guide!==!1)&&(e=e.replace(/\s*:?\s*$/,"")+" [$<limit>]: "),A+=e),n[qr.keyIn(A,o).toLowerCase()]};qr.getRawInput=function(){return sQ};function l2(t,e){var r;return e.length&&(r={},r[t]=e[0]),qr.setDefaultOptions(r)[t]}qr.setPrint=function(){return l2("print",arguments)};qr.setPrompt=function(){return l2("prompt",arguments)};qr.setEncoding=function(){return l2("encoding",arguments)};qr.setMask=function(){return l2("mask",arguments)};qr.setBufferSize=function(){return l2("bufferSize",arguments)}});var mH=U((ZGt,hl)=>{(function(){var t={major:0,minor:2,patch:66,status:"beta"};tau_file_system={files:{},open:function(I,x,y){var F=tau_file_system.files[I];if(!F){if(y==="read")return null;F={path:I,text:"",type:x,get:function(z,X){return X===this.text.length||X>this.text.length?"end_of_file":this.text.substring(X,X+z)},put:function(z,X){return X==="end_of_file"?(this.text+=z,!0):X==="past_end_of_file"?null:(this.text=this.text.substring(0,X)+z+this.text.substring(X+z.length),!0)},get_byte:function(z){if(z==="end_of_stream")return-1;var X=Math.floor(z/2);if(this.text.length<=X)return-1;var $=n(this.text[Math.floor(z/2)],0);return z%2===0?$&255:$/256>>>0},put_byte:function(z,X){var $=X==="end_of_stream"?this.text.length:Math.floor(X/2);if(this.text.length<$)return null;var ie=this.text.length===$?-1:n(this.text[Math.floor(X/2)],0);return X%2===0?(ie=ie/256>>>0,ie=(ie&255)<<8|z&255):(ie=ie&255,ie=(z&255)<<8|ie&255),this.text.length===$?this.text+=u(ie):this.text=this.text.substring(0,$)+u(ie)+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[I]=F}return y==="write"&&(F.text=""),F}},tau_user_input={buffer:"",get:function(I,x){for(var y;tau_user_input.buffer.length<I;)y=window.prompt(),y&&(tau_user_input.buffer+=y);return y=tau_user_input.buffer.substr(0,I),tau_user_input.buffer=tau_user_input.buffer.substr(I),y}},tau_user_output={put:function(I,x){return console.log(I),!0},flush:function(){return!0}},nodejs_file_system={open:function(I,x,y){var F=Ie("fs"),z=F.openSync(I,y[0]);return y==="read"&&!F.existsSync(I)?null:{get:function(X,$){var ie=new Buffer(X);return F.readSync(z,ie,0,X,$),ie.toString()},put:function(X,$){var ie=Buffer.from(X);if($==="end_of_file")F.writeSync(z,ie);else{if($==="past_end_of_file")return null;F.writeSync(z,ie,0,ie.length,$)}return!0},get_byte:function(X){return null},put_byte:function(X,$){return null},flush:function(){return!0},close:function(){return F.closeSync(z),!0}}}},nodejs_user_input={buffer:"",get:function(I,x){for(var y,F=Bme();nodejs_user_input.buffer.length<I;)nodejs_user_input.buffer+=F.question();return y=nodejs_user_input.buffer.substr(0,I),nodejs_user_input.buffer=nodejs_user_input.buffer.substr(I),y}},nodejs_user_output={put:function(I,x){return process.stdout.write(I),!0},flush:function(){return!0}};var e;Array.prototype.indexOf?e=function(I,x){return I.indexOf(x)}:e=function(I,x){for(var y=I.length,F=0;F<y;F++)if(x===I[F])return F;return-1};var r=function(I,x){if(I.length!==0){for(var y=I[0],F=I.length,z=1;z<F;z++)y=x(y,I[z]);return y}},o;Array.prototype.map?o=function(I,x){return I.map(x)}:o=function(I,x){for(var y=[],F=I.length,z=0;z<F;z++)y.push(x(I[z]));return y};var a;Array.prototype.filter?a=function(I,x){return I.filter(x)}:a=function(I,x){for(var y=[],F=I.length,z=0;z<F;z++)x(I[z])&&y.push(I[z]);return y};var n;String.prototype.codePointAt?n=function(I,x){return I.codePointAt(x)}:n=function(I,x){return I.charCodeAt(x)};var u;String.fromCodePoint?u=function(){return String.fromCodePoint.apply(null,arguments)}:u=function(){return String.fromCharCode.apply(null,arguments)};var A=0,p=1,h=/(\\a)|(\\b)|(\\f)|(\\n)|(\\r)|(\\t)|(\\v)|\\x([0-9a-fA-F]+)\\|\\([0-7]+)\\|(\\\\)|(\\')|('')|(\\")|(\\`)|(\\.)|(.)/g,C={"\\a":7,"\\b":8,"\\f":12,"\\n":10,"\\r":13,"\\t":9,"\\v":11};function w(I){var x=[],y=!1;return I.replace(h,function(F,z,X,$,ie,ke,Le,st,ht,Ut,Xt,xt,tn,Dr,fr,Br,jr){switch(!0){case ht!==void 0:return x.push(parseInt(ht,16)),"";case Ut!==void 0:return x.push(parseInt(Ut,8)),"";case Xt!==void 0:case xt!==void 0:case tn!==void 0:case Dr!==void 0:case fr!==void 0:return x.push(n(F.substr(1),0)),"";case jr!==void 0:return x.push(n(jr,0)),"";case Br!==void 0:y=!0;default:return x.push(C[F]),""}}),y?null:x}function v(I,x){var y="";if(I.length<2)return I;try{I=I.replace(/\\([0-7]+)\\/g,function($,ie){return u(parseInt(ie,8))}),I=I.replace(/\\x([0-9a-fA-F]+)\\/g,function($,ie){return u(parseInt(ie,16))})}catch{return null}for(var F=0;F<I.length;F++){var z=I.charAt(F),X=I.charAt(F+1);if(z===x&&X===x)F++,y+=x;else if(z==="\\")if(["a","b","f","n","r","t","v","'",'"',"\\","a","\b","\f",`
|
||||||
|
`,"\r"," ","\v"].indexOf(X)!==-1)switch(F+=1,X){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 b(I){for(var x="",y=0;y<I.length;y++)switch(I.charAt(y)){case"'":x+="\\'";break;case"\\":x+="\\\\";break;case"\b":x+="\\b";break;case"\f":x+="\\f";break;case`
|
||||||
|
`:x+="\\n";break;case"\r":x+="\\r";break;case" ":x+="\\t";break;case"\v":x+="\\v";break;default:x+=I.charAt(y);break}return x}function E(I){var x=I.substr(2);switch(I.substr(0,2).toLowerCase()){case"0x":return parseInt(x,16);case"0b":return parseInt(x,2);case"0o":return parseInt(x,8);case"0'":return w(x)[0];default:return parseFloat(I)}}var R={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(I,x){return I.get_flag("char_conversion").id==="on"?x.replace(/./g,function(y){return I.get_char_conversion(y)}):x}function _(I){this.thread=I,this.text="",this.tokens=[]}_.prototype.set_last_tokens=function(I){return this.tokens=I},_.prototype.new_text=function(I){this.text=I,this.tokens=[]},_.prototype.get_tokens=function(I){var x,y=0,F=0,z=0,X=[],$=!1;if(I){var ie=this.tokens[I-1];y=ie.len,x=N(this.thread,this.text.substr(ie.len)),F=ie.line,z=ie.start}else x=this.text;if(/^\s*$/.test(x))return null;for(;x!=="";){var ke=[],Le=!1;if(/^\n/.exec(x)!==null){F++,z=0,y++,x=x.replace(/\n/,""),$=!0;continue}for(var st in R)if(R.hasOwnProperty(st)){var ht=R[st].exec(x);ht&&ke.push({value:ht[0],name:st,matches:ht})}if(!ke.length)return this.set_last_tokens([{value:x,matches:[],name:"lexical",line:F,start:z}]);var ie=r(ke,function(Dr,fr){return Dr.value.length>=fr.value.length?Dr:fr});switch(ie.start=z,ie.line=F,x=x.replace(ie.value,""),z+=ie.value.length,y+=ie.value.length,ie.name){case"atom":ie.raw=ie.value,ie.value.charAt(0)==="'"&&(ie.value=v(ie.value.substr(1,ie.value.length-2),"'"),ie.value===null&&(ie.name="lexical",ie.value="unknown escape sequence"));break;case"number":ie.float=ie.value.substring(0,2)!=="0x"&&ie.value.match(/[.eE]/)!==null&&ie.value!=="0'.",ie.value=E(ie.value),ie.blank=Le;break;case"string":var Ut=ie.value.charAt(0);ie.value=v(ie.value.substr(1,ie.value.length-2),Ut),ie.value===null&&(ie.name="lexical",ie.value="unknown escape sequence");break;case"whitespace":var Xt=X[X.length-1];Xt&&(Xt.space=!0),Le=!0;continue;case"r_bracket":X.length>0&&X[X.length-1].name==="l_bracket"&&(ie=X.pop(),ie.name="atom",ie.value="{}",ie.raw="{}",ie.space=!1);break;case"r_brace":X.length>0&&X[X.length-1].name==="l_brace"&&(ie=X.pop(),ie.name="atom",ie.value="[]",ie.raw="[]",ie.space=!1);break}ie.len=y,X.push(ie),Le=!1}var xt=this.set_last_tokens(X);return xt.length===0?null:xt};function J(I,x,y,F,z){if(!x[y])return{type:A,value:P.error.syntax(x[y-1],"expression expected",!0)};var X;if(F==="0"){var $=x[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 ie;switch(I.get_flag("double_quotes").id){case"atom":ie=new H($.value,[]);break;case"codes":ie=new H("[]",[]);for(var ke=$.value.length-1;ke>=0;ke--)ie=new H(".",[new P.type.Num(n($.value,ke),!1),ie]);break;case"chars":ie=new H("[]",[]);for(var ke=$.value.length-1;ke>=0;ke--)ie=new H(".",[new P.type.Term($.value.charAt(ke),[]),ie]);break}return{type:p,len:y+1,value:ie};case"l_paren":var xt=J(I,x,y+1,I.__get_max_priority(),!0);return xt.type!==p?xt:x[xt.len]&&x[xt.len].name==="r_paren"?(xt.len++,xt):{type:A,derived:!0,value:P.error.syntax(x[xt.len]?x[xt.len]:x[xt.len-1],") or operator expected",!x[xt.len])};case"l_bracket":var xt=J(I,x,y+1,I.__get_max_priority(),!0);return xt.type!==p?xt:x[xt.len]&&x[xt.len].name==="r_bracket"?(xt.len++,xt.value=new H("{}",[xt.value]),xt):{type:A,derived:!0,value:P.error.syntax(x[xt.len]?x[xt.len]:x[xt.len-1],"} or operator expected",!x[xt.len])}}var Le=re(I,x,y,z);return Le.type===p||Le.derived||(Le=oe(I,x,y),Le.type===p||Le.derived)?Le:{type:A,derived:!1,value:P.error.syntax(x[y],"unexpected token")}}var st=I.__get_max_priority(),ht=I.__get_next_priority(F),Ut=y;if(x[y].name==="atom"&&x[y+1]&&(x[y].space||x[y+1].name!=="l_paren")){var $=x[y++],Xt=I.__lookup_operator_classes(F,$.value);if(Xt&&Xt.indexOf("fy")>-1){var xt=J(I,x,y,F,z);if(xt.type!==A)return $.value==="-"&&!$.space&&P.type.is_number(xt.value)?{value:new P.type.Num(-xt.value.value,xt.value.is_float),len:xt.len,type:p}:{value:new P.type.Term($.value,[xt.value]),len:xt.len,type:p};X=xt}else if(Xt&&Xt.indexOf("fx")>-1){var xt=J(I,x,y,ht,z);if(xt.type!==A)return{value:new P.type.Term($.value,[xt.value]),len:xt.len,type:p};X=xt}}y=Ut;var xt=J(I,x,y,ht,z);if(xt.type===p){y=xt.len;var $=x[y];if(x[y]&&(x[y].name==="atom"&&I.__lookup_operator_classes(F,$.value)||x[y].name==="bar"&&I.__lookup_operator_classes(F,"|"))){var tn=ht,Dr=F,Xt=I.__lookup_operator_classes(F,$.value);if(Xt.indexOf("xf")>-1Line truncated
|
||||||
|
`;x+=`
|
||||||
|
`;for(key in this.rules)for(y=0;y<this.rules[key].length;y++)x+=this.rules[key][y].toString(I),x+=`
|
||||||
|
`;return x},me.prototype.clone=function(){return new me(this.id)},be.prototype.clone=function(){return new be(this.value,this.is_float)},H.prototype.clone=function(){return new H(this.id,o(this.args,function(I){return I.clone()}))},Me.prototype.clone=function(){return new Stram(this.stream,this.mode,this.alias,this.type,this.reposition,this.eof_action)},Te.prototype.clone=function(){var I={};for(var x in this.links)!this.links.hasOwnProperty(x)||(I[x]=this.links[x].clone());return new Te(I)},Qe.prototype.clone=function(){return new Qe(this.goal.clone(),this.substitution.clone(),this.parent)},Ue.prototype.clone=function(){return new Ue(this.head.clone(),this.body!==null?this.body.clone():null)},me.prototype.equals=function(I){return P.type.is_variable(I)&&this.id===I.id},be.prototype.equals=function(I){return P.type.is_number(I)&&this.value===I.value&&this.is_float===I.is_float},H.prototype.equals=function(I){if(!P.type.is_term(I)||this.indicator!==I.indicator)return!1;for(var x=0;x<this.args.length;x++)if(!this.args[x].equals(I.args[x]))return!1;return!0},Me.prototype.equals=function(I){return P.type.is_stream(I)&&this.id===I.id},Te.prototype.equals=function(I){var x;if(!P.type.is_substitution(I))return!1;for(x in this.links)if(!!this.links.hasOwnProperty(x)&&(!I.links[x]||!this.links[x].equals(I.links[x])))return!1;for(x in I.links)if(!!I.links.hasOwnProperty(x)&&!this.links[x])return!1;return!0},Qe.prototype.equals=function(I){return P.type.is_state(I)&&this.goal.equals(I.goal)&&this.substitution.equals(I.substitution)&&this.parent===I.parent},Ue.prototype.equals=function(I){return P.type.is_rule(I)&&this.head.equals(I.head)&&(this.body===null&&I.body===null||this.body!==null&&this.body.equals(I.body))},me.prototype.rename=function(I){return I.get_free_variable(this)},be.prototype.rename=function(I){return this},H.prototype.rename=function(I){return new H(this.id,o(this.args,function(x){return x.rename(I)}))},Me.prototype.rename=function(I){return this},Ue.prototype.rename=function(I){return new Ue(this.head.rename(I),this.body!==null?this.body.rename(I):null)},me.prototype.variables=function(){return[this.id]},be.prototype.variables=function(){return[]},H.prototype.variables=function(){return[].concat.apply([],o(this.args,function(I){return I.variables()}))},Me.prototype.variables=function(){return[]},Ue.prototype.variables=function(){return this.body===null?this.head.variables():this.head.variables().concat(this.body.variables())},me.prototype.apply=function(I){return I.lookup(this.id)?I.lookup(this.id):this},be.prototype.apply=function(I){return this},H.prototype.apply=function(I){if(this.indicator==="./2"){for(var x=[],y=this;y.indicator==="./2";)x.push(y.args[0].apply(I)),y=y.args[1];for(var F=y.apply(I),z=x.length-1;z>=0;z--)F=new H(".",[x[z],F]);return F}return new H(this.id,o(this.args,function(X){return X.apply(I)}),this.ref)},Me.prototype.apply=function(I){return this},Ue.prototype.apply=function(I){return new Ue(this.head.apply(I),this.body!==null?this.body.apply(I):null)},Te.prototype.apply=function(I){var x,y={};for(x in this.links)!this.links.hasOwnProperty(x)||(y[x]=this.links[x].apply(I));return new Te(y)},H.prototype.select=function(){for(var I=this;I.indicator===",/2";)I=I.args[0];return I},H.prototype.replace=function(I){return this.indicator===",/2"?this.args[0].indicator===",/2"?new H(",",[this.args[0].replace(I),this.args[1]]):I===null?this.args[1]:new H(",",[I,this.args[1]]):I},H.prototype.search=function(I){if(P.type.is_term(I)&&I.ref!==void 0&&this.ref===I.ref)return!0;for(var x=0;x<this.args.length;x++)if(P.type.is_term(this.args[x])&&this.args[x].search(I))return!0;return!1},je.prototype.get_current_input=function(){return this.current_input},At.prototype.get_current_input=function(){return this.session.get_current_input()},je.prototype.get_current_output=function(){return this.current_output},At.prototype.get_current_output=function(){return this.session.get_current_output()},je.prototype.set_current_input=function(I){this.current_input=I},At.prototype.set_current_input=function(I){return this.session.set_current_input(I)},je.prototype.set_current_output=function(I){this.current_input=I},At.prototype.set_current_output=function(I){return this.session.set_current_output(I)},je.prototype.get_stream_by_alias=function(I){return this.streams[I]},At.prototype.get_stream_by_alias=function(I){return this.session.get_stream_by_alias(I)},je.prototype.file_system_open=function(I,x,y){return this.file_system.open(I,x,y)},At.prototype.file_system_open=function(I,x,y){return this.session.file_system_open(I,x,y)},je.prototype.get_char_conversion=function(I){return this.__char_conversion[I]||I},At.prototype.get_char_conversion=function(I){return this.session.get_char_conversion(I)},je.prototype.parse=function(I){return this.thread.parse(I)},At.prototype.parse=function(I){var x=new _(this);x.new_text(I);var y=x.get_tokens();if(y===null)return!1;var F=J(this,y,0,this.__get_max_priority(),!1);re
Line truncated
|
||||||
|
`,[])])])),x.substitution,x)])},"nl/1":function(I,x,y){var F=y.args[0];I.prepend([new Qe(x.goal.replace(new H("put_char",[F,new H(`
|
||||||
|
`,[])])),x.substitution,x)])},"get_byte/1":function(I,x,y){var F=y.args[0];I.prepend([new Qe(x.goal.replace(new H(",",[new H("current_input",[new me("S")]),new H("get_byte",[new me("S"),F])])),x.substitution,x)])},"get_byte/2":function(I,x,y){var F=y.args[0],z=y.args[1],X=P.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(P.type.is_variable(F))I.throw_error(P.error.instantiation(y.indicator));else if(!P.type.is_variable(z)&&!P.type.is_byte(z))I.throw_error(P.error.type("in_byte",char,y.indicator));else if(!P.type.is_stream(F)&&!P.type.is_atom(F))I.throw_error(P.error.domain("stream_or_alias",F,y.indicator));else if(!P.type.is_stream(X)||X.stream===null)I.throw_error(P.error.existence("stream",F,y.indicator));else if(X.output)I.throw_error(P.error.permission("input","stream",F,y.indicator));else if(X.type==="text")I.throw_error(P.error.permission("input","text_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")I.throw_error(P.error.permission("input","past_end_of_stream",F,y.indicator));else{var $;if(X.position==="end_of_stream")$="end_of_file",X.position="past_end_of_stream";else{if($=X.stream.get_byte(X.position),$===null){I.throw_error(P.error.representation("byte",y.indicator));return}X.position++}I.prepend([new Qe(x.goal.replace(new H("=",[new be($,!1),z])),x.substitution,x)])}},"peek_byte/1":function(I,x,y){var F=y.args[0];I.prepend([new Qe(x.goal.replace(new H(",",[new H("current_input",[new me("S")]),new H("peek_byte",[new me("S"),F])])),x.substitution,x)])},"peek_byte/2":function(I,x,y){var F=y.args[0],z=y.args[1],X=P.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(P.type.is_variable(F))I.throw_error(P.error.instantiation(y.indicator));else if(!P.type.is_variable(z)&&!P.type.is_byte(z))I.throw_error(P.error.type("in_byte",char,y.indicator));else if(!P.type.is_stream(F)&&!P.type.is_atom(F))I.throw_error(P.error.domain("stream_or_alias",F,y.indicator));else if(!P.type.is_stream(X)||X.stream===null)I.throw_error(P.error.existence("stream",F,y.indicator));else if(X.output)I.throw_error(P.error.permission("input","stream",F,y.indicator));else if(X.type==="text")I.throw_error(P.error.permission("input","text_stream",F,y.indicator));else if(X.position==="past_end_of_stream"&&X.eof_action==="error")I.throw_error(P.error.permission("input","past_end_of_stream",F,y.indicator));else{var $;if(X.position==="end_of_stream")$="end_of_file",X.position="past_end_of_stream";else if($=X.stream.get_byte(X.position),$===null){I.throw_error(P.error.representation("byte",y.indicator));return}I.prepend([new Qe(x.goal.replace(new H("=",[new be($,!1),z])),x.substitution,x)])}},"put_byte/1":function(I,x,y){var F=y.args[0];I.prepend([new Qe(x.goal.replace(new H(",",[new H("current_output",[new me("S")]),new H("put_byte",[new me("S"),F])])),x.substitution,x)])},"put_byte/2":function(I,x,y){var F=y.args[0],z=y.args[1],X=P.type.is_stream(F)?F:I.get_stream_by_alias(F.id);P.type.is_variable(F)||P.type.is_variable(z)?I.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)?I.throw_error(P.error.domain("stream_or_alias",F,y.indicator)):!P.type.is_stream(X)||X.stream===null?I.throw_error(P.error.existence("stream",F,y.indicator)):X.input?I.throw_error(P.error.permission("output","stream",F,y.indicator)):X.type==="text"?I.throw_error(P.error.permission("output","text_stream",F,y.indicator)):X.stream.put_byte(z.value,X.position)&&(typeof X.position=="number"&&X.position++,I.success(x)):I.throw_error(P.error.type("byte",z,y.indicator))},"read/1":function(I,x,y){var F=y.args[0];I.prepend([new Qe(x.goal.replace(new H(",",[new H("current_input",[new me("S")]),new H("read_term",[new me("S"),F,new H("[]",[])])])),x.substitution,x)])},"read/2":function(I,x,y){var F=y.args[0],z=y.args[1];I.prepend([new Qe(x.goal.replace(new H("read_term",[F,z,new H("[]",[])])),x.substitution,x)])},"read_term/2":function(I,x,y){var F=y.args[0],z=y.args[1];I.prepend([new Qe(x.goal.replace(new H(",",[new H("current_input",[new me("S")]),new H("read_term",[new me("S"),F,z])])),x.substitution,x)])},"read_term/3":function(I,x,y){var F=y.args[0],z=y.args[1],X=y.args[2],$=P.type.is_stream(F)?F:I.get_stream_by_alias(F.id);if(P.type.is_variable(F)||P.type.is_variable(X))I.throw_error(P.error.instantiation(y.indicator));else if(!P.type.is_list(X))I.throw_error(P.error.type("list",X,y.indicator));else if(!P.type.is_stream(F)&&!P.type.is_atom(F))I.throw_error(P.error.domain("stream_or_alias",F,y.indicator));else if(!P.type.is_stream($)||$.stream===null)I.throw_error(P.error.existence("stream",F,y.indicator));else if($.output)I.throw_error(P.error.permission("input","stream",F,y.indicator));else if($.type==="binary")I.throw_error(P.error.permission("input","binary_stream",F,y.indicator));else if($.position==="past_end_of_stream"&&$.eof_action==="error")I.throw_error(P.error.permission("input","past_end_of_stream",F,y.indicator));else{for(var ie={},ke=X,Le;
Line truncated
|
||||||
|
`;for(let r of this.project.workspacesByCwd.values()){let o=r.relativeCwd;e+=`workspace(${lh(o)}).
|
||||||
|
`,e+=`workspace_ident(${lh(o)}, ${lh(Y.stringifyIdent(r.locator))}).
|
||||||
|
`,e+=`workspace_version(${lh(o)}, ${lh(r.manifest.version)}).
|
||||||
|
`;for(let a of bme)for(let n of r.manifest[a].values())e+=`workspace_has_dependency(${lh(o)}, ${lh(Y.stringifyIdent(n))}, ${lh(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 CH(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(),o=new Map;for(let{workspace:a,dependencyIdent:n,dependencyRange:u,dependencyType:A}of e){let p=s2([A,Y.stringifyIdent(n)]),h=Ye.getMapWithDefault(o,a.cwd);Ye.getMapWithDefault(h,p).set(u??void 0,new Set)}for(let{workspace:a,fieldPath:n,fieldValue:u}of r){let A=s2(n),p=Ye.getMapWithDefault(o,a.cwd);Ye.getMapWithDefault(p,A).set(JSON.parse(u)??void 0,new Set)}return{manifestUpdates:o,reportedErrors:new Map}}async genEnforcedDependencies(e){let r=[];for await(let o of e.makeQuery("workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).")){let a=V.resolve(this.project.cwd,em(o.links.WorkspaceCwd)),n=em(o.links.DependencyIdent),u=em(o.links.DependencyRange),A=em(o.links.DependencyType);if(a===null||n===null)throw new Error("Invalid rule");let p=this.project.getWorkspaceByCwd(a),h=Y.parseIdent(n);r.push({workspace:p,dependencyIdent:h,dependencyRange:u,dependencyType:A})}return Ye.sortMap(r,[({dependencyRange:o})=>o!==null?"0":"1",({workspace:o})=>Y.stringifyIdent(o.locator),({dependencyIdent:o})=>Y.stringifyIdent(o)])}async genEnforcedFields(e){let r=[];for await(let o of e.makeQuery("workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).")){let a=V.resolve(this.project.cwd,em(o.links.WorkspaceCwd)),n=em(o.links.FieldPath),u=ugt(o.links.FieldValue);if(a===null||n===null)throw new Error("Invalid rule");let A=this.project.getWorkspaceByCwd(a);r.push({workspace:A,fieldPath:n,fieldValue:u})}return Ye.sortMap(r,[({workspace:o})=>Y.stringifyIdent(o.locator),({fieldPath:o})=>o])}async*query(e){let r=this.createSession();for await(let o of r.makeQuery(e)){let a={};for(let[n,u]of Object.entries(o.links))n!=="_"&&(a[n]=em(u));yield a}}}});var _me=U(cQ=>{"use strict";Object.defineProperty(cQ,"__esModule",{value:!0});function x2(t){let e=[...t.caches],r=e.shift();return r===void 0?Ume():{get(o,a,n={miss:()=>Promise.resolve()}){return r.get(o,a,n).catch(()=>x2({caches:e}).get(o,a,n))},set(o,a){return r.set(o,a).catch(()=>x2({caches:e}).set(o,a))},delete(o){return r.delete(o).catch(()=>x2({caches:e}).delete(o))},clear(){return r.clear().catch(()=>x2({caches:e}).clear())}}}function Ume(){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()}}}cQ.createFallbackableCache=x2;cQ.createNullCache=Ume});var qme=U((kWt,Hme)=>{Hme.exports=_me()});var jme=U(TH=>{"use strict";Object.defineProperty(TH,"__esModule",{value:!0});function bgt(t={serializable:!0}){let e={};return{get(r,o,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 u=o(),A=a&&a.miss||(()=>Promise.resolve());return u.then(p=>A(p)).then(()=>u)},set(r,o){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(o):o,Promise.resolve(o)},delete(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}TH.createInMemoryCache=bgt});var Wme=U((RWt,Gme)=>{Gme.exports=jme()});var Kme=U(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});function Qgt(t,e,r){let o={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers(){return t===LH.WithinHeaders?o:{}},queryParameters(){return t===LH.WithinQueryParameters?o:{}}}}function kgt(t){let e=0,r=()=>(e++,new Promise(o=>{setTimeout(()=>{o(t(r))},Math.min(100*e,1e3))}));return t(r)}function Yme(t,e=(r,o)=>Promise.resolve()){return Object.assign(t,{wait(r){return Yme(t.then(o=>Promise.all([e(o,r),o])).then(o=>o[1]))}})}function Fgt(t){let e=t.length-1;for(e;e>0;e--){let r=Math.floor(Math.random()*(e+1)),o=t[e];t[e]=t[r],t[r]=o}return t}function Rgt(t,e){return e&&Object.keys(e).forEach(r=>{t[r]=e[r](t)}),t}function Tgt(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}var Lgt="4.14.2",Ngt=t=>()=>t.transporter.requester.destroy(),LH={WithinQueryParameters:0,WithinHeaders:1};tu.AuthMode=LH;tu.addMethods=Rgt;tu.createAuth=Qgt;tu.createRetryablePromise=kgt;tu.createWaitablePromise=Yme;tu.destroy=Ngt;tu.encode=Tgt;tu.shuffle=Fgt;tu.version=Lgt});var P2=U((LWt,Jme)=>{Jme.exports=Kme()});var Vme=U(NH=>{"use strict";Object.defineProperty(NH,"__esModule",{value:!0});var Ogt={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};NH.MethodEnum=Ogt});var b2=U((OWt,zme)=>{zme.exports=Vme()});var Aye=U(bi=>{"use strict";Object.defineProperty(bi,"__esModule",{value:!0});var Zme=b2();function OH(t,e){let r=t||{},o=r.data||{};return Object.keys(r).forEach(a=>{["timeout","headers","queryParam
Line truncated
|
||||||
|
`;A!==o&&(o=A,t.write(vEe.default.eraseLines(r)+A),r=A.split(`
|
||||||
|
`).length)};return n.clear=()=>{t.write(vEe.default.eraseLines(r)),o="",r=0},n.done=()=>{o="",r=0,e||(DEe.default.show(),a=!1)},n};_2.default={create:Vmt}});var PEe=U((uYt,zmt)=>{zmt.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 kEe=U(gl=>{"use strict";var QEe=PEe(),gA=process.env;Object.defineProperty(gl,"_vendors",{value:QEe.map(function(t){return t.constant})});gl.name=null;gl.isPR=null;QEe.forEach(function(t){var e=Array.isArray(t.env)?t.env:[t.env],r=e.every(function(o){return bEe(o)});if(gl[t.constant]=r,r)switch(gl.name=t.name,typeof t.pr){case"string":gl.isPR=!!gA[t.pr];break;case"object":"env"in t.pr?gl.isPR=t.pr.env in gA&&gA[t.pr.env]!==t.pr.ne:"any"in t.pr?gl.isPR=t.pr.any.some(function(o){return!!gA[o]}):gl.isPR=bEe(t.pr);break;default:gl.isPR=null}});gl.isCI=!!(gA.CI||gA.CONTINUOUS_INTEGRATION||gA.BUILD_NUMBER||gA.RUN_ID||gl.name);function bEe(t){return typeof t=="string"?!!gA[t]:Object.keys(t).every(function(e){return gA[e]===t[e]})}});var REe=U((fYt,FEe)=>{"use strict";FEe.exports=kEe().isCI});var LEe=U((pYt,TEe)=>{"use strict";var Xmt=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};TEe.exports=(t,{include:e,exclude:r}={})=>{let o=a=>{let n=u=>typeof u=="string"?a===u:u.test(a);return e?e.some(n):r?!r.some(n):!0};for(let[a,n]of Xmt(t.constructor.prototype)){if(n==="constructor"||!o(n))continue;let u=Reflect.getOwnPropertyDescriptor(a,n);u&&typeof u.value=="function"&&(t[n]=t[n].bind(t))}return t}});var qEe=U(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});var QC,j2,PQ,bQ,wq;typeof window>"u"||typeof MessageChannel!="function"?(bC=null,dq=null,mq=function(){if(bC!==null)try{var t=vn.unstable_now();bC(!0,t),bC=null}catch(e){throw setTimeout(mq,0),e}},NEe=Date.now(),vn.unstable_now=function(){return Date.now()-NEe},QC=function(t){bC!==null?setTimeout(QC,0,t):(bC=t,setTimeout(mq,0))},j2=function(t,e){dq=setTimeout(t,e)},PQ=function(){clearTimeout(dq)},bQ=function(){return!1},wq=vn.unstable_forceFrameRate=function(){}):(vQ=window.performance,yq=window.Date,OEe=window.setTimeout,MEe=window.clearTimeout,typeof console<"u"&&(UEe=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://fb.me/react-polyfills"),typeof UEe!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),typeof vQ=="object"&&typeof vQ.now=="function"?vn.unstable_now=function(){return vQ.now()}:(_Ee=yq.now(),vn.unstable_now=function(){return yq.now()-_Ee}),H2=!1,q2=null,DQ=-1,Eq=5,Cq=0,bQ=function(){return vn.unstable_now()>=Cq},wq=function(){},vn.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps
Line truncated
|
||||||
|
in `+(q||"Unknown")+ce}D+=T,S=S.return}while(S);return D}var yl=[],io=-1;function _e(S){0>io||(S.current=yl[io],yl[io]=null,io--)}function Fn(S,D){io++,yl[io]=S.current,S.current=D}var Fi={},Rn={current:Fi},Ui={current:!1},Zt=Fi;function Ri(S,D){var T=S.type.contextTypes;if(!T)return Fi;var q=S.stateNode;if(q&&q.__reactInternalMemoizedUnmaskedChildContext===D)return q.__reactInternalMemoizedMaskedChildContext;var W={},ce;for(ce in T)W[ce]=D[ce];return q&&(S=S.stateNode,S.__reactInternalMemoizedUnmaskedChildContext=D,S.__reactInternalMemoizedMaskedChildContext=W),W}function Zn(S){return S=S.childContextTypes,S!=null}function Oa(S){_e(Ui,S),_e(Rn,S)}function $t(S){_e(Ui,S),_e(Rn,S)}function fc(S,D,T){if(Rn.current!==Fi)throw Error(n(168));Fn(Rn,D,S),Fn(Ui,T,S)}function du(S,D,T){var q=S.stateNode;if(S=D.childContextTypes,typeof q.getChildContext!="function")return T;q=q.getChildContext();for(var W in q)if(!(W in S))throw Error(n(108,ge(D)||"Unknown",W));return r({},T,{},q)}function pc(S){var D=S.stateNode;return D=D&&D.__reactInternalMemoizedMergedChildContext||Fi,Zt=Rn.current,Fn(Rn,D,S),Fn(Ui,Ui.current,S),!0}function El(S,D,T){var q=S.stateNode;if(!q)throw Error(n(169));T?(D=du(S,D,Zt),q.__reactInternalMemoizedMergedChildContext=D,_e(Ui,S),_e(Rn,S),Fn(Rn,D,S)):_e(Ui,S),Fn(Ui,T,S)}var SA=a.unstable_runWithPriority,mu=a.unstable_scheduleCallback,Ce=a.unstable_cancelCallback,Rt=a.unstable_shouldYield,hc=a.unstable_requestPaint,_i=a.unstable_now,yu=a.unstable_getCurrentPriorityLevel,qt=a.unstable_ImmediatePriority,Cl=a.unstable_UserBlockingPriority,xA=a.unstable_NormalPriority,cp=a.unstable_LowPriority,gc=a.unstable_IdlePriority,PA={},Dn=hc!==void 0?hc:function(){},ui=null,dc=null,bA=!1,ta=_i(),Hi=1e4>ta?_i:function(){return _i()-ta};function No(){switch(yu()){case qt:return 99;case Cl:return 98;case xA:return 97;case cp:return 96;case gc:return 95;default:throw Error(n(332))}}function $e(S){switch(S){case 99:return qt;case 98:return Cl;case 97:return xA;case 96:return cp;case 95:return gc;default:throw Error(n(332))}}function so(S,D){return S=$e(S),SA(S,D)}function Il(S,D,T){return S=$e(S),mu(S,D,T)}function Eu(S){return ui===null?(ui=[S],dc=mu(qt,Cu)):ui.push(S),PA}function qi(){if(dc!==null){var S=dc;dc=null,Ce(S)}Cu()}function Cu(){if(!bA&&ui!==null){bA=!0;var S=0;try{var D=ui;so(99,function(){for(;S<D.length;S++){var T=D[S];do T=T(!0);while(T!==null)}}),ui=null}catch(T){throw ui!==null&&(ui=ui.slice(S+1)),mu(qt,qi),T}finally{bA=!1}}}var QA=3;function Ma(S,D,T){return T/=10,1073741821-(((1073741821-S+D/10)/T|0)+1)*T}function mc(S,D){return S===D&&(S!==0||1/S===1/D)||S!==S&&D!==D}var ds=typeof Object.is=="function"?Object.is:mc,Ot=Object.prototype.hasOwnProperty;function Sn(S,D){if(ds(S,D))return!0;if(typeof S!="object"||S===null||typeof D!="object"||D===null)return!1;var T=Object.keys(S),q=Object.keys(D);if(T.length!==q.length)return!1;for(q=0;q<T.length;q++)if(!Ot.call(D,T[q])||!ds(S[T[q]],D[T[q]]))return!1;return!0}function di(S,D){if(S&&S.defaultProps){D=r({},D),S=S.defaultProps;for(var T in S)D[T]===void 0&&(D[T]=S[T])}return D}var ra={current:null},oo=null,Rs=null,na=null;function ia(){na=Rs=oo=null}function Oo(S,D){var T=S.type._context;P?(Fn(ra,T._currentValue,S),T._currentValue=D):(Fn(ra,T._currentValue2,S),T._currentValue2=D)}function Zi(S){var D=ra.current;_e(ra,S),S=S.type._context,P?S._currentValue=D:S._currentValue2=D}function Ts(S,D){for(;S!==null;){var T=S.alternate;if(S.childExpirationTime<D)S.childExpirationTime=D,T!==null&&T.childExpirationTime<D&&(T.childExpirationTime=D);else if(T!==null&&T.childExpirationTime<D)T.childExpirationTime=D;else break;S=S.return}}function Ls(S,D){oo=S,na=Rs=null,S=S.dependencies,S!==null&&S.firstContext!==null&&(S.expirationTime>=D&&(Mo=!0),S.firstContext=null)}function Ns(S,D){if(na!==S&&D!==!1&&D!==0)if((typeof D!="number"||D===1073741823)&&(na=S,D=1073741823),D={context:S,observedBits:D,next:null},Rs===null){if(oo===null)throw Error(n(308));Rs=D,oo.dependencies={expirationTime:0,firstContext:D,responders:null}}else Rs=Rs.next=D;return P?S._currentValue:S._currentValue2}var ao=!1;function Wn(S){return{baseState:S,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function qn(S){return{baseState:S.baseState,firstUpdate:S.firstUpdate,lastUpdate:S.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function $i(S,D){return{expirationTime:S,suspenseConfig:D,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function es(S,D){S.lastUpdate===null?S.firstUpdate=S.lastUpdate=D:(S.lastUpdate.next=D,S.lastUpdate=D)}function mi(S,D){var T=S.alternate;if(T===null){var q=S.updateQueue,W=null;q===null&&(q=S.updateQueue=Wn(S.memoizedState))}else q=S.updateQueue,W=T.updateQueue,q===null?W===null?(q=S.updateQueue=Wn(S.memoizedState),W=T.updateQueue=Wn(T.memoiz
Line truncated
|
||||||
|
|
||||||
|
Add a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.`+ml(W))}Gi!==xc&&(Gi=Ci),ce=pg(ce,W),Et=q;do{switch(Et.tag){case 3:Se=ce,Et.effectTag|=4096,Et.expirationTime=D;var Ve=Dv(Et,Se,D);Ua(Et,Ve);break e;case 1:Se=ce;var ft=Et.type,jt=Et.stateNode;if((Et.effectTag&64)===0&&(typeof ft.getDerivedStateFromError=="function"||jt!==null&&typeof jt.componentDidCatch=="function"&&(bu===null||!bu.has(jt)))){Et.effectTag|=4096,Et.expirationTime=D;var Er=Sv(Et,Se,D);Ua(Et,Er);break e}}Et=Et.return}while(Et!==null)}Fr=kv(Fr)}catch(In){D=In;continue}break}while(1)}function jA(){var S=yp.current;return yp.current=Du,S===null?Du:S}function gI(S,D){S<Ka&&2<S&&(Ka=S),D!==null&&S<OA&&2<S&&(OA=S,Lm=D)}function Um(S){S>Ep&&(Ep=S)}function oF(){for(;Fr!==null;)Fr=Qv(Fr)}function aF(){for(;Fr!==null&&!Rt();)Fr=Qv(Fr)}function Qv(S){var D=Rv(S.alternate,S,ns);return S.memoizedProps=S.pendingProps,D===null&&(D=kv(S)),uI.current=null,D}function kv(S){Fr=S;do{var D=Fr.alternate;if(S=Fr.return,(Fr.effectTag&2048)===0){e:{var T=D;D=Fr;var q=ns,W=D.pendingProps;switch(D.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:Zn(D.type)&&Oa(D);break;case 3:Ec(D),$t(D),W=D.stateNode,W.pendingContext&&(W.context=W.pendingContext,W.pendingContext=null),(T===null||T.child===null)&&Ga(D)&&fa(D),vl(D);break;case 5:tg(D);var ce=la(yc.current);if(q=D.type,T!==null&&D.stateNode!=null)ts(T,D,q,W,ce),T.ref!==D.ref&&(D.effectTag|=128);else if(W){if(T=la(lo.current),Ga(D)){if(W=D,!y)throw Error(n(175));T=ap(W.stateNode,W.type,W.memoizedProps,ce,T,W),W.updateQueue=T,T=T!==null,T&&fa(D)}else{var Se=ut(q,W,ce,T,D);Dc(Se,D,!1,!1),D.stateNode=Se,yt(Se,q,W,ce,T)&&fa(D)}D.ref!==null&&(D.effectTag|=128)}else if(D.stateNode===null)throw Error(n(166));break;case 6:if(T&&D.stateNode!=null)Hr(T,D,T.memoizedProps,W);else{if(typeof W!="string"&&D.stateNode===null)throw Error(n(166));if(T=la(yc.current),ce=la(lo.current),Ga(D)){if(T=D,!y)throw Error(n(176));(T=lp(T.stateNode,T.memoizedProps,T))&&fa(D)}else D.stateNode=Ue(W,T,ce,D)}break;case 11:break;case 13:if(_e(Kn,D),W=D.memoizedState,(D.effectTag&64)!==0){D.expirationTime=q;break e}W=W!==null,ce=!1,T===null?D.memoizedProps.fallback!==void 0&&Ga(D):(q=T.memoizedState,ce=q!==null,W||q===null||(q=T.child.sibling,q!==null&&(Se=D.firstEffect,Se!==null?(D.firstEffect=q,q.nextEffect=Se):(D.firstEffect=D.lastEffect=q,q.nextEffect=null),q.effectTag=8))),W&&!ce&&(D.mode&2)!==0&&(T===null&&D.memoizedProps.unstable_avoidThisFallback!==!0||(Kn.current&1)!==0?Gi===xu&&(Gi=pa):((Gi===xu||Gi===pa)&&(Gi=Dl),Ep!==0&&Ai!==null&&(YA(Ai,ns),Lv(Ai,Ep)))),x&&W&&(D.effectTag|=4),I&&(W||ce)&&(D.effectTag|=4);break;case 7:break;case 8:break;case 12:break;case 4:Ec(D),vl(D);break;case 10:Zi(D);break;case 9:break;case 14:break;case 17:Zn(D.type)&&Oa(D);break;case 19:if(_e(Kn,D),W=D.memoizedState,W===null)break;if(ce=(D.effectTag&64)!==0,Se=W.rendering,Se===null){if(ce)Sc(W,!1);else if(Gi!==xu||T!==null&&(T.effectTag&64)!==0)for(T=D.child;T!==null;){if(Se=up(T),Se!==null){for(D.effectTag|=64,Sc(W,!1),T=Se.updateQueue,T!==null&&(D.updateQueue=T,D.effectTag|=4),W.lastEffect===null&&(D.firstEffect=null),D.lastEffect=W.lastEffect,T=q,W=D.child;W!==null;)ce=W,q=T,ce.effectTag&=2,ce.nextEffect=null,ce.firstEffect=null,ce.lastEffect=null,Se=ce.alternate,Se===null?(ce.childExpirationTime=0,ce.expirationTime=q,ce.child=null,ce.memoizedProps=null,ce.memoizedState=null,ce.updateQueue=null,ce.dependencies=null):(ce.childExpirationTime=Se.childExpirationTime,ce.expirationTime=Se.expirationTime,ce.child=Se.child,ce.memoizedProps=Se.memoizedProps,ce.memoizedState=Se.memoizedState,ce.updateQueue=Se.updateQueue,q=Se.dependencies,ce.dependencies=q===null?null:{expirationTime:q.expirationTime,firstContext:q.firstContext,responders:q.responders}),W=W.sibling;Fn(Kn,Kn.current&1|2,D),D=D.child;break e}T=T.sibling}}else{if(!ce)if(T=up(Se),T!==null){if(D.effectTag|=64,ce=!0,T=T.updateQueue,T!==null&&(D.updateQueue=T,D.effectTag|=4),Sc(W,!0),W.tail===null&&W.tailMode==="hidden"&&!Se.alternate){D=D.lastEffect=W.lastEffect,D!==null&&(D.nextEffect=null);break}}else Hi()>W.tailExpiration&&1<q&&(D.effectTag|=64,ce=!0,Sc(W,!1),D.expirationTime=D.childExpirationTime=q-1);W.isBackwards?(Se.sibling=D.child,D.child=Se):(T=W.last,T!==null?T.sibling=Se:D.child=Se,W.last=Se)}if(W.tail!==null){W.tailExpiration===0&&(W.tailExpiration=Hi()+500),T=W.tail,W.rendering=T,W.tail=T.sibling,W.lastEffect=D.lastEffect,T.sibling=null,W=Kn.current,W=ce?W&1|2:W&1,Fn(Kn,W,D),D=T;break e}break;case 20:break;case 21:break;default:throw Error(n(156,D.tag))}D=null}if(T=Fr,ns===1||T.childExpirationTime!==1){for(W=0,ce=T.child;ce!==null;)q=ce.expirationTime,Se=ce.childExpirationTime,q>W&&(W=q),Se>W&&(W=Se),ce=ce.sibling;T.childExpirationTime=W}if(D!==null)return D;S!==null&&(S.effectTag&2048)===0&&(S.firstEffect===null&&(S.firstEffect=Fr.firstEffect),Fr.lastEffect!==null&&(S.lastEffect!==null&&(S.lastEffect.nextEffect=Fr.firstEffec
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 o=r>0?r:lengthBytesUTF8(t)+1,a=new Array(o),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 o=t[r];o>255&&(o&=255),e.push(String.fromCharCode(o))}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 o,a;r&&(a=e+lengthBytesUTF8(t),o=HEAP8[a]),stringToUTF8(t,e,1/0),r&&(HEAP8[a]=o)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(t,e){HEAP8.set(t,e)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(t,e,r){for(var o=0;o<t.length;++o)HEAP8[e++>>0]=t.charCodeAt(o);r||(HEAP8[e>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function t(e,r){var o=e>>>16,a=e&65535,n=r>>>16,u=r&65535;return a*u+(o*u+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(o){r=o(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 am=U((IYt,eCe)=>{"use strict";var nyt=ZEe(),iyt=$Ee(),bq=!1,Qq=null;iyt({},function(t,e){if(!bq){if(bq=!0,t)throw t;Qq=e}});if(!bq)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");eCe.exports=nyt(Qq.bind,Qq.lib)});var Fq=U((wYt,kq)=>{"use strict";var tCe=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);kq.exports=tCe;kq.exports.default=tCe});var nCe=U((BYt,rCe)=>{"use strict";rCe.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,lyt(r));return e};Tq.exports=sCe;Tq.exports.default=sCe});var oCe=U(Y2=>{"use strict";var cyt=Y2&&Y2.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Y2,"__esModule",{value:!0});var uyt=cyt(Lq()),Nq={};Y2.default=t=>{if(t.length===0)return{width:0,height:0};if(Nq[t])return Nq[t];let e=uyt.default(t),r=t.split(`
|
||||||
|
`).length;return Nq[t]={width:e,height:r},{width:e,height:r}}});var aCe=U(K2=>{"use strict";var Ayt=K2&&K2.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(K2,"__esModule",{value:!0});var fn=Ayt(am()),fyt=(t,e)=>{"position"in e&&t.setPositionType(e.position==="absolute"?fn.default.POSITION_TYPE_ABSOLUTE:fn.default.POSITION_TYPE_RELATIVE)},pyt=(t,e)=>{"marginLeft"in e&&t.setMargin(fn.default.EDGE_START,e.marginLeft||0),"marginRight"in e&&t.setMargin(fn.default.EDGE_END,e.marginRight||0),"marginTop"in e&&t.setMargin(fn.default.EDGE_TOP,e.marginTop||0),"marginBottom"in e&&t.setMargin(fn.default.EDGE_BOTTOM,e.marginBottom||0)},hyt=(t,e)=>{"paddingLeft"in e&&t.setPadding(fn.default.EDGE_LEFT,e.paddingLeft||0),"paddingRight"in e&&t.setPadding(fn.default.EDGE_RIGHT,e.paddingRight||0),"paddingTop"in e&&t.setPadding(fn.default.EDGE_TOP,e.paddingTop||0),"paddingBottom"in e&&t.setPadding(fn.default.EDGE_BOTTOM,e.paddingBottom||0)},gyt=(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(fn.default.FLEX_DIRECTION_ROW),e.flexDirection==="row-reverse"&&t.setFlexDirection(fn.default.FLEX_DIRECTION_ROW_REVERSE),e.flexDirection==="column"&&t.setFlexDirection(fn.default.FLEX_DIRECTION_COLUMN),e.flexDirection==="column-reverse"&&t.setFlexDirection(fn.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(fn.default.ALIGN_STRETCH),e.alignItems==="flex-start"&&t.setAlignItems(fn.default.ALIGN_FLEX_START),e.alignItems==="center"&&t.setAlignItems(fn.default.ALIGN_CENTER),e.alignItems==="flex-end"&&t.setAlignItems(fn.default.ALIGN_FLEX_END)),"alignSelf"in e&&((e.alignSelf==="auto"||!e.alignSelf)&&t.setAlignSelf(fn.default.ALIGN_AUTO),e.alignSelf==="flex-start"&&t.setAlignSelf(fn.default.ALIGN_FLEX_START),e.alignSelf==="center"&&t.setAlignSelf(fn.default.ALIGN_CENTER),e.alignSelf==="flex-end"&&t.setAlignSelf(fn.default.ALIGN_FLEX_END)),"justifyContent"in e&&((e.justifyContent==="flex-start"||!e.justifyContent)&&t.setJustifyContent(fn.default.JUSTIFY_FLEX_START),e.justifyContent==="center"&&t.setJustifyContent(fn.default.JUSTIFY_CENTER),e.justifyContent==="flex-end"&&t.setJustifyContent(fn.default.JUSTIFY_FLEX_END),e.justifyContent==="space-between"&&t.setJustifyContent(fn.default.JUSTIFY_SPACE_BETWEEN),e.justifyContent==="space-around"&&t.setJustifyContent(fn.default.JUSTIFY_SPACE_AROUND))},dyt=(t,e)=>{var r,o;"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((o=e.minHeight)!==null&&o!==void 0?o:0))},myt=(t,e)=>{"display"in e&&t.setDisplay(e.display==="flex"?fn.default.DISPLAY_FLEX:fn.default.DISPLAY_NONE)},yyt=(t,e)=>{if("borderStyle"in e){let r=typeof e.borderStyle=="string"?1:0;t.setBorder(fn.default.EDGE_TOP,r),t.setBorder(fn.default.EDGE_BOTTOM,r),t.setBorder(fn.default.EDGE_LEFT,r),t.setBorder(fn.default.EDGE_RIGHT,r)}};K2.default=(t,e={})=>{fyt(t,e),pyt(t,e),hyt(t,e),gyt(t,e),dyt(t,e),myt(t,e),yyt(t,e)}});var uCe=U((PYt,cCe)=>{"use strict";var J2=TQ(),Eyt=IS(),Cyt=fw(),Mq=new Set(["\x1B","\x9B"]),Iyt=39,lCe=t=>`${Mq.values().next().value}[${t}m`,wyt=t=>t.split(" ").map(e=>J2(e)),Oq=(t,e,r)=>{let o=[...e],a=!1,n=J2(Eyt(t[t.length-1]));for(let[u,A]of o.entries()){let p=J2(A);if(n+p<=r?t[t.length-1]+=A:(t.push(A),n=0),Mq.has(A))a=!0;else if(a&&A==="m"){a=!1;continue}a||(n+=p,n===r&&u<o.length-1&&(t.push(""),n=0))}!n&&t[t.length-1].length>0&&t.length>1&&(t[t.length-2]+=t.pop())},Byt=t=>{let e=t.split(" "),r=e.length;for(;r>0&&!(J2(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},vyt=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let o="",a="",n,u=wyt(t),A=[""];for(let[p,h]of t.split(" ").entries()){r.trim!==!1&&(A[A.length-1]=A[A.length-1].trimLeft());let C=J2(A[A.length-1]);if(p!==0&&(C>=e&&(r.wordWrap===!1||r.trim===!1)&&(A.push(""),C=0),(C>0||r.trim===!1)&&(A[A.length-1]+=" ",C++)),r.hard&&u[p]>e){let w=e-C,v=1+Math.floor((u[p]-w-1)/e);Math.floor((u[p]-1)/e)<v&&A.push(""),Oq(A,h,e);continue}if(C+u[p]>e&&C>0&&u[p]>0){if(r.wordWrap===!1&&C<e){Oq(A,h,e);continue}A.push("")}if(C+u[p]>e&&r.wordWrap===!1){Oq(A,h,e);continue}A[A.
Line truncated
|
||||||
|
`);for(let[p,h]of[...o].entries()){if(a+=h,Mq.has(h)){let w=parseFloat(/\d[^m]*/.exec(o.slice(p,p+4)));n=w===Iyt?null:w}let C=Cyt.codes.get(Number(n));n&&C&&(o[p+1]===`
|
||||||
|
`?a+=lCe(C):h===`
|
||||||
|
`&&(a+=lCe(n)))}return a};cCe.exports=(t,e,r)=>String(t).normalize().replace(/\r\n/g,`
|
||||||
|
`).split(`
|
||||||
|
`).map(o=>vyt(o,e,r)).join(`
|
||||||
|
`)});var pCe=U((bYt,fCe)=>{"use strict";var ACe="[\uD800-\uDBFF][\uDC00-\uDFFF]",Dyt=t=>t&&t.exact?new RegExp(`^${ACe}$`):new RegExp(ACe,"g");fCe.exports=Dyt});var Uq=U((QYt,mCe)=>{"use strict";var Syt=Fq(),xyt=pCe(),hCe=fw(),dCe=["\x1B","\x9B"],LQ=t=>`${dCe[0]}[${t}m`,gCe=(t,e,r)=>{let o=[];t=[...t];for(let a of t){let n=a;a.match(";")&&(a=a.split(";")[0][0]+"0");let u=hCe.codes.get(parseInt(a,10));if(u){let A=t.indexOf(u.toString());A>=0?t.splice(A,1):o.push(LQ(e?u:n))}else if(e){o.push(LQ(0));break}else o.push(LQ(n))}if(e&&(o=o.filter((a,n)=>o.indexOf(a)===n),r!==void 0)){let a=LQ(hCe.codes.get(parseInt(r,10)));o=o.reduce((n,u)=>u===a?[u,...n]:[...n,u],[])}return o.join("")};mCe.exports=(t,e,r)=>{let o=[...t.normalize()],a=[];r=typeof r=="number"?r:o.length;let n=!1,u,A=0,p="";for(let[h,C]of o.entries()){let w=!1;if(dCe.includes(C)){let v=/\d[^m]*/.exec(t.slice(h,h+18));u=v&&v.length>0?v[0]:void 0,A<r&&(n=!0,u!==void 0&&a.push(u))}else n&&C==="m"&&(n=!1,w=!0);if(!n&&!w&&++A,!xyt({exact:!0}).test(C)&&Syt(C.codePointAt())&&++A,A>e&&A<=r)p+=C;else if(A===e&&!n&&u!==void 0)p=gCe(a);else if(A>=r){p+=gCe(a,!0,u);break}}return p}});var ECe=U((kYt,yCe)=>{"use strict";var dh=Uq(),Pyt=TQ();function NQ(t,e,r){if(t.charAt(e)===" ")return e;for(let o=1;o<=3;o++)if(r){if(t.charAt(e+o)===" ")return e+o}else if(t.charAt(e-o)===" ")return e-o;return e}yCe.exports=(t,e,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};let{position:o,space:a,preferTruncationOnSpace:n}=r,u="\u2026",A=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 u;let p=Pyt(t);if(p<=e)return t;if(o==="start"){if(n){let h=NQ(t,p-e+1,!0);return u+dh(t,h,p).trim()}return a===!0&&(u+=" ",A=2),u+dh(t,p-e+A,p)}if(o==="middle"){a===!0&&(u=" "+u+" ",A=3);let h=Math.floor(e/2);if(n){let C=NQ(t,h),w=NQ(t,p-(e-h)+1,!0);return dh(t,0,C)+u+dh(t,w,p).trim()}return dh(t,0,h)+u+dh(t,p-(e-h)+A,p)}if(o==="end"){if(n){let h=NQ(t,e-1);return dh(t,0,h)+u}return a===!0&&(u=" "+u,A=2),dh(t,0,e-A)+u}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${o}`)}});var Hq=U(V2=>{"use strict";var CCe=V2&&V2.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(V2,"__esModule",{value:!0});var byt=CCe(uCe()),Qyt=CCe(ECe()),_q={};V2.default=(t,e,r)=>{let o=t+String(e)+String(r);if(_q[o])return _q[o];let a=t;if(r==="wrap"&&(a=byt.default(t,e,{trim:!1,hard:!0})),r.startsWith("truncate")){let n="end";r==="truncate-middle"&&(n="middle"),r==="truncate-start"&&(n="start"),a=Qyt.default(t,e,{position:n})}return _q[o]=a,a}});var jq=U(qq=>{"use strict";Object.defineProperty(qq,"__esModule",{value:!0});var ICe=t=>{let e="";if(t.childNodes.length>0)for(let r of t.childNodes){let o="";r.nodeName==="#text"?o=r.nodeValue:((r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text")&&(o=ICe(r)),o.length>0&&typeof r.internal_transform=="function"&&(o=r.internal_transform(o))),e+=o}return e};qq.default=ICe});var Gq=U(ci=>{"use strict";var z2=ci&&ci.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ci,"__esModule",{value:!0});ci.setTextNodeValue=ci.createTextNode=ci.setStyle=ci.setAttribute=ci.removeChildNode=ci.insertBeforeNode=ci.appendChildNode=ci.createNode=ci.TEXT_NAME=void 0;var kyt=z2(am()),wCe=z2(oCe()),Fyt=z2(aCe()),Ryt=z2(Hq()),Tyt=z2(jq());ci.TEXT_NAME="#text";ci.createNode=t=>{var e;let r={nodeName:t,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:t==="ink-virtual-text"?void 0:kyt.default.Node.create()};return t==="ink-text"&&((e=r.yogaNode)===null||e===void 0||e.setMeasureFunc(Lyt.bind(null,r))),r};ci.appendChildNode=(t,e)=>{var r;e.parentNode&&ci.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")&&OQ(t)};ci.insertBeforeNode=(t,e,r)=>{var o,a;e.parentNode&&ci.removeChildNode(e.parentNode,e),e.parentNode=t;let n=t.childNodes.indexOf(r);if(n>=0){t.childNodes.splice(n,0,e),e.yogaNode&&((o=t.yogaNode)===null||o===void 0||o.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")&&OQ(t)};ci.removeChildNode=(t,e)=>{var r,o;e.yogaNode&&((o=(r=e.parentNode)===null||r===void 0?void 0:r.yogaNode)===null||o===void 0||o.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")&&OQ(t)};ci.setAttribute=(t,e,r)=>{t.attributes[e]=r};ci.setStyle=(t,e)=>{t.style=e,t.yogaNode&&Fyt.default(t.yogaNode,e)};ci.createTextNode=t=>{let e={nodeName:"#text",nodeValue:t,yogaLine truncated
|
||||||
|
`:`
|
||||||
|
`)+r,a=o+1,o=t.indexOf(`
|
||||||
|
`,a)}while(o!==-1);return n+=t.substr(a),n};LCe.exports={stringReplaceAll:Uyt,stringEncaseCRLFWithFirstIndex:_yt}});var HCe=U((HYt,_Ce)=>{"use strict";var Hyt=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,OCe=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,qyt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,jyt=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,Gyt=new Map([["n",`
|
||||||
|
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function UCe(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)):Gyt.get(t)||t}function Wyt(t,e){let r=[],o=e.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(qyt))r.push(a[2].replace(jyt,(A,p,h)=>p?UCe(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function Yyt(t){OCe.lastIndex=0;let e=[],r;for(;(r=OCe.exec(t))!==null;){let o=r[1];if(r[2]){let a=Wyt(o,r[2]);e.push([o].concat(a))}else e.push([o])}return e}function MCe(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 o=t;for(let[a,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(a in o))throw new Error(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}_Ce.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(Hyt,(n,u,A,p,h,C)=>{if(u)a.push(UCe(u));else if(p){let w=a.join("");a=[],o.push(r.length===0?w:MCe(t,r)(w)),r.push({inverse:A,styles:Yyt(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(MCe(t,r)(a.join(""))),a=[],r.pop()}else a.push(C)}),o.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 o.join("")}});var jQ=U((qYt,KCe)=>{"use strict";var $2=fw(),{stdout:Kq,stderr:Jq}=AL(),{stringReplaceAll:Kyt,stringEncaseCRLFWithFirstIndex:Jyt}=NCe(),{isArray:UQ}=Array,jCe=["ansi","ansi","ansi256","ansi16m"],kC=Object.create(null),Vyt=(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=Kq?Kq.level:0;t.level=e.level===void 0?r:e.level},Vq=class{constructor(e){return GCe(e)}},GCe=t=>{let e={};return Vyt(e,t),e.template=(...r)=>YCe(e.template,...r),Object.setPrototypeOf(e,_Q.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=Vq,e.template};function _Q(t){return GCe(t)}for(let[t,e]of Object.entries($2))kC[t]={get(){let r=HQ(this,zq(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};kC.visible={get(){let t=HQ(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var WCe=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of WCe)kC[t]={get(){let{level:e}=this;return function(...r){let o=zq($2.color[jCe[e]][t](...r),$2.color.close,this._styler);return HQ(this,o,this._isEmpty)}}};for(let t of WCe){let e="bg"+t[0].toUpperCase()+t.slice(1);kC[e]={get(){let{level:r}=this;return function(...o){let a=zq($2.bgColor[jCe[r]][t](...o),$2.bgColor.close,this._styler);return HQ(this,a,this._isEmpty)}}}}var zyt=Object.defineProperties(()=>{},{...kC,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),zq=(t,e,r)=>{let o,a;return r===void 0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},HQ=(t,e,r)=>{let o=(...a)=>UQ(a[0])&&UQ(a[0].raw)?qCe(o,YCe(o,...a)):qCe(o,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(o,zyt),o._generator=t,o._styler=e,o._isEmpty=r,o},qCe=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=Kyt(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
|
||||||
|
`);return n!==-1&&(e=Jyt(e,a,o,n)),o+e+a},Yq,YCe=(t,...e)=>{let[r]=e;if(!UQ(r)||!UQ(r.raw))return e.join(" ");let o=e.slice(1),a=[r.raw[0]];for(let n=1;n<r.length;n++)a.push(String(o[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return Yq===void 0&&(Yq=HCe()),Yq(t,a.join(""))};Object.defineProperties(_Q.prototype,kC);var qQ=_Q();qQ.supportsColor=Kq;qQ.stderr=_Q({level:Jq?Jq.level:0});qQ.stderr.supportsColor=Jq;KCe.exports=qQ});var Xq=U(tB=>{"use strict";var Xyt=tB&&tB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(tB,"__esModule",{value:!0});var eB=Xyt(jQ()),Zyt=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,$yt=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,GQ=(t,e)=>e==="foreground"?t:"bg"+t[0].toUpperCase()+t.slice(1);tB.default=(t,e,r)=>{if(!e)return t;if(e in eB.default){let a=GQ(e,r);return eB.default[a](t)}if(e.startsWith("#")){let a=GQ("hex",r);return eB.default[a](e)(t)}if(e.startsWith("ansi")){let a=$yt.exec(e);if(!a)return t;let n=GQ(a[1],r),u=Number(a[2]);return eB.default[n](u)(t)}if(e.startsWith("rgb")||e.startsWith("hsl")||e.startsWith("hsv")||e.startsWith("hwb")){let a=Zyt.exec(e);if(!a)return t;let n=GQ(a[1],r),u=Number(a[2]),A=Number(a[3]),p=Number(a[4]);return eB.default[n](u,A,p)(t)}return t}});var VCe=U(rB=>{"use strict";var JCe=rB&&rB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(rB,"__esModule",{value:!0});var eEt=JCe(TCe()),Zq=JCe(Xq());rB.default=(t,e,r,o)=>{if(typeof r.style.borderStyle=="string"){let a=r.yogaNode.getComputedWidth(),n=r.yogaNode.getComputedHeight(),u=r.style.borderColor,A=eEt.default[r.style.borderStyle],p=Zq.default(A.topLeft+A.horizontal.repeat(a-2)+A.topRight,u,"foreground"),h=(Zq.default(A.vertical,u,"foreground")+`
|
||||||
|
`).repeat(n-2),C=Zq.default(A.bottomLeft+A.horizontal.repeat(a-2)+A.bottomRight,u,"foreground");o.write(t,e,p,{transformers:[]}),o.write(t,e+1,h,{transformers:[]}),o.write(t+a-1,e+1,h,{transformers:[]}),o.write(t,e+n-1,C,{transformers:[]})}}});var XCe=U(nB=>{"use strict";var lm=nB&&nB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nB,"__esModule",{value:!0});var tEt=lm(am()),rEt=lm(Lq()),nEt=lm(QCe()),iEt=lm(Hq()),sEt=lm(kCe()),oEt=lm(jq()),aEt=lm(VCe()),lEt=(t,e)=>{var r;let o=(r=t.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(o){let a=o.getComputedLeft(),n=o.getComputedTop();e=`
|
||||||
|
`.repeat(n)+nEt.default(e,a)}return e},zCe=(t,e,r)=>{var o;let{offsetX:a=0,offsetY:n=0,transformers:u=[],skipStaticElements:A}=r;if(A&&t.internal_static)return;let{yogaNode:p}=t;if(p){if(p.getDisplay()===tEt.default.DISPLAY_NONE)return;let h=a+p.getComputedLeft(),C=n+p.getComputedTop(),w=u;if(typeof t.internal_transform=="function"&&(w=[t.internal_transform,...u]),t.nodeName==="ink-text"){let v=oEt.default(t);if(v.length>0){let b=rEt.default(v),E=sEt.default(p);if(b>E){let R=(o=t.style.textWrap)!==null&&o!==void 0?o:"wrap";v=iEt.default(v,E,R)}v=lEt(t,v),e.write(h,C,v,{transformers:w})}return}if(t.nodeName==="ink-box"&&aEt.default(h,C,t,e),t.nodeName==="ink-root"||t.nodeName==="ink-box")for(let v of t.childNodes)zCe(v,e,{offsetX:h,offsetY:C,transformers:w,skipStaticElements:A})}};nB.default=zCe});var $Ce=U((YYt,ZCe)=>{"use strict";ZCe.exports=t=>{t=Object.assign({onlyFirst:!1},t);let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t.onlyFirst?void 0:"g")}});var tIe=U((KYt,$q)=>{"use strict";var cEt=$Ce(),eIe=t=>typeof t=="string"?t.replace(cEt(),""):t;$q.exports=eIe;$q.exports.default=eIe});var iIe=U((JYt,nIe)=>{"use strict";var rIe="[\uD800-\uDBFF][\uDC00-\uDFFF]";nIe.exports=t=>t&&t.exact?new RegExp(`^${rIe}$`):new RegExp(rIe,"g")});var oIe=U((VYt,e6)=>{"use strict";var uEt=tIe(),AEt=iIe(),sIe=t=>uEt(t).replace(AEt()," ").length;e6.exports=sIe;e6.exports.default=sIe});var cIe=U(iB=>{"use strict";var lIe=iB&&iB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(iB,"__esModule",{value:!0});var aIe=lIe(Uq()),fEt=lIe(oIe()),t6=class{constructor(e){this.writes=[];let{width:r,height:o}=e;this.width=r,this.height=o}write(e,r,o,a){let{transformers:n}=a;!o||this.writes.push({x:e,y:r,text:o,transformers:n})}get(){let e=[];for(let o=0;o<this.height;o++)e.push(" ".repeat(this.width));for(let o of this.writes){let{x:a,y:n,text:u,transformers:A}=o,p=u.split(`
|
||||||
|
`),h=0;for(let C of p){let w=e[n+h];if(!w)continue;let v=fEt.default(C);for(let b of A)C=b(C);e[n+h]=aIe.default(w,0,a)+C+aIe.default(w,a+v),h++}}return{output:e.map(o=>o.trimRight()).join(`
|
||||||
|
`),height:e.length}}};iB.default=t6});var fIe=U(sB=>{"use strict";var r6=sB&&sB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sB,"__esModule",{value:!0});var pEt=r6(am()),uIe=r6(XCe()),AIe=r6(cIe());sB.default=(t,e)=>{var r;if(t.yogaNode.setWidth(e),t.yogaNode){t.yogaNode.calculateLayout(void 0,void 0,pEt.default.DIRECTION_LTR);let o=new AIe.default({width:t.yogaNode.getComputedWidth(),height:t.yogaNode.getComputedHeight()});uIe.default(t,o,{skipStaticElements:!0});let a;!((r=t.staticNode)===null||r===void 0)&&r.yogaNode&&(a=new AIe.default({width:t.staticNode.yogaNode.getComputedWidth(),height:t.staticNode.yogaNode.getComputedHeight()}),uIe.default(t.staticNode,a,{skipStaticElements:!1}));let{output:n,height:u}=o.get();return{output:n,outputHeight:u,staticOutput:a?`${a.get().output}
|
||||||
|
`:""}}return{output:"",outputHeight:0,staticOutput:""}}});var dIe=U((ZYt,gIe)=>{"use strict";var pIe=Ie("stream"),hIe=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],n6={},hEt=t=>{let e=new pIe.PassThrough,r=new pIe.PassThrough;e.write=a=>t("stdout",a),r.write=a=>t("stderr",a);let o=new console.Console(e,r);for(let a of hIe)n6[a]=console[a],console[a]=o[a];return()=>{for(let a of hIe)console[a]=n6[a];n6={}}};gIe.exports=hEt});var s6=U(i6=>{"use strict";Object.defineProperty(i6,"__esModule",{value:!0});i6.default=new WeakMap});var a6=U(o6=>{"use strict";Object.defineProperty(o6,"__esModule",{value:!0});var gEt=en(),mIe=gEt.createContext({exit:()=>{}});mIe.displayName="InternalAppContext";o6.default=mIe});var c6=U(l6=>{"use strict";Object.defineProperty(l6,"__esModule",{value:!0});var dEt=en(),yIe=dEt.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});yIe.displayName="InternalStdinContext";l6.default=yIe});var A6=U(u6=>{"use strict";Object.defineProperty(u6,"__esModule",{value:!0});var mEt=en(),EIe=mEt.createContext({stdout:void 0,write:()=>{}});EIe.displayName="InternalStdoutContext";u6.default=EIe});var p6=U(f6=>{"use strict";Object.defineProperty(f6,"__esModule",{value:!0});var yEt=en(),CIe=yEt.createContext({stderr:void 0,write:()=>{}});CIe.displayName="InternalStderrContext";f6.default=CIe});var WQ=U(h6=>{"use strict";Object.defineProperty(h6,"__esModule",{value:!0});var EEt=en(),IIe=EEt.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{}});IIe.displayName="InternalFocusContext";h6.default=IIe});var BIe=U((sKt,wIe)=>{"use strict";var CEt=/[|\\{}()[\]^$+*?.-]/g;wIe.exports=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(CEt,"\\$&")}});var xIe=U((oKt,SIe)=>{"use strict";var IEt=BIe(),wEt=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",DIe=[].concat(Ie("module").builtinModules,"bootstrap_node","node").map(t=>new RegExp(`(?:\\((?:node:)?${t}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${t}(?:\\.js)?:\\d+:\\d+$)`));DIe.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var oB=class{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=oB.nodeInternals()),"cwd"in e||(e.cwd=wEt),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,BEt(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...DIe]}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 o=!1,a=null,n=[];return e.forEach(u=>{if(u=u.replace(/\\/g,"/"),this._internals.some(p=>p.test(u)))return;let A=/^\s*at /.test(u);o?u=u.trimEnd().replace(/^(\s+)at /,"$1"):(u=u.trim(),A&&(u=u.slice(3))),u=u.replace(`${this._cwd}/`,""),u&&(A?(a&&(n.push(a),a=null),n.push(u)):(o=!0,a=u))}),n.map(u=>`${r}${u}
|
||||||
|
`).join("")}captureString(e,r=this.captureString){typeof e=="function"&&(r=e,e=1/0);let{stackTraceLimit:o}=Error;e&&(Error.stackTraceLimit=e);let a={};Error.captureStackTrace(a,r);let{stack:n}=a;return Error.stackTraceLimit=o,this.clean(n)}capture(e,r=this.capture){typeof e=="function"&&(r=e,e=1/0);let{prepareStackTrace:o,stackTraceLimit:a}=Error;Error.prepareStackTrace=(A,p)=>this._wrapCallSite?p.map(this._wrapCallSite):p,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,r);let{stack:u}=n;return Object.assign(Error,{prepareStackTrace:o,stackTraceLimit:a}),u}at(e=this.at){let[r]=this.capture(1,e);if(!r)return{};let o={line:r.getLineNumber(),column:r.getColumnNumber()};vIe(o,r.getFileName(),this._cwd),r.isConstructor()&&(o.constructor=!0),r.isEval()&&(o.evalOrigin=r.getEvalOrigin()),r.isNative()&&(o.native=!0);let a;try{a=r.getTypeName()}catch{}a&&a!=="Object"&&a!=="[object Object]"&&(o.type=a);let n=r.getFunctionName();n&&(o.function=n);let u=r.getMethodName();return u&&n!==u&&(o.method=u),o}parseLine(e){let r=e&&e.match(vEt);if(!r)return null;let o=r[1]==="new",a=r[2],n=r[3],u=r[4],A=Number(r[5]),p=Number(r[6]),h=r[7],C=r[8],w=r[9],v=r[10]==="native",b=r[11]===")",E,R={};if(C&&(R.line=Number(C)),w&&(R.column=Number(w)),b&&h){let N=0;for(let _=h.length-1;_>0;_--)if(h.charAt(_)===")")N++;else if(h.charAt(_)==="("&&h.charAt(_-1)===" "&&(N--,N===-1&&h.charAt(_-1)===" ")){let J=h.slice(0,_-1);h=h.slice(_+1),a+=` (${J}`;break}}if(a){let N=a.match(DEt);N&&(a=N[1],E=N[2])}return vIe(R,h,this._cwd),o&&(R.constructor=!0),n&&(R.evalOrigin=n,R.evalLine=A,R.evalColumn=p,R.evalFile=u&&u.replace(/\\/g,"/")),v&&(R.native=!0),a&&(R.function=a),E&&a!==E&&(R.method=E),R}};function vIe(t,e,r){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${r}/`)&&(e=e.slice(r.length+1)),t.file=e)}function BEt(t){if(t.length===0)return[];let e=t.map(r=>IEt(r));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var vEt=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),DEt=/^(.*?) \[as (.*?)\]$/;SIe.exports=oB});var bIe=U((aKt,PIe)=>{"use strict";PIe.exports=(t,e)=>t.replace(/^\t+/gm,r=>" ".repeat(r.length*(e||2)))});var kIe=U((lKt,QIe)=>{"use strict";var SEt=bIe(),xEt=(t,e)=>{let r=[],o=t-e,a=t+e;for(let n=o;n<=a;n++)r.push(n);return r};QIe.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=SEt(t).split(/\r?\n/),!(e>t.length))return r={around:3,...r},xEt(e,r.around).filter(o=>t[o-1]!==void 0).map(o=>({line:o,value:t[o-1]}))}});var YQ=U(su=>{"use strict";var PEt=su&&su.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),bEt=su&&su.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),QEt=su&&su.__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)&&PEt(e,t,r);return bEt(e,t),e},kEt=su&&su.__rest||function(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(t);a<o.length;a++)e.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(t,o[a])&&(r[o[a]]=t[o[a]]);return r};Object.defineProperty(su,"__esModule",{value:!0});var FIe=QEt(en()),g6=FIe.forwardRef((t,e)=>{var{children:r}=t,o=kEt(t,["children"]);let a=Object.assign(Object.assign({},o),{marginLeft:o.marginLeft||o.marginX||o.margin||0,marginRight:o.marginRight||o.marginX||o.margin||0,marginTop:o.marginTop||o.marginY||o.margin||0,marginBottom:o.marginBottom||o.marginY||o.margin||0,paddingLeft:o.paddingLeft||o.paddingX||o.padding||0,paddingRight:o.paddingRight||o.paddingX||o.padding||0,paddingTop:o.paddingTop||o.paddingY||o.padding||0,paddingBottom:o.paddingBottom||o.paddingY||o.padding||0});return FIe.default.createElement("ink-box",{ref:e,style:a},r)});g6.displayName="Box";g6.defaultProps={flexDirection:"row",flexGrow:0,flexShrink:1};su.default=g6});var y6=U(aB=>{"use strict";var d6=aB&&aB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(aB,"__esModule",{value:!0});var FEt=d6(en()),FC=d6(jQ()),RIe=d6(Xq()),m6=({color:t,backgroundColor:e,dimColor:r,bold:o,italic:a,underline:n,strikethrough:u,inverse:A,wrap:p,children:h})=>{if(h==null)return null;let C=w=>(r&&(w=FC.default.dim(w)),t&&(w=RIe.default(w,t,"foreground")),e&&(w=RIe.default(w,e,"background")),o&&(w=FC.default.bold(w)),a&&(w=FC.default.italic(w)),n&&(w=FC.default.underline(w)),u&&(w=FC.default.strikethrough(w)),A&&(w=FC.default.inverse(w)),w);return FEt.default.createElement("ink-text",{style:{flexGrow:0,flexSLine truncated
|
||||||
|
`).slice(1):void 0,r=e?NIe.parseLine(e[0]):void 0,o,a=0;if((r==null?void 0:r.file)&&(r==null?void 0:r.line)&&TIe.existsSync(r.file)){let n=TIe.readFileSync(r.file,"utf8");if(o=NEt.default(n,r.line),o)for(let{line:u}of o)a=Math.max(a,String(u).length)}return hs.default.createElement(zf.default,{flexDirection:"column",padding:1},hs.default.createElement(zf.default,null,hs.default.createElement(dA.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),hs.default.createElement(dA.default,null," ",t.message)),r&&hs.default.createElement(zf.default,{marginTop:1},hs.default.createElement(dA.default,{dimColor:!0},r.file,":",r.line,":",r.column)),r&&o&&hs.default.createElement(zf.default,{marginTop:1,flexDirection:"column"},o.map(({line:n,value:u})=>hs.default.createElement(zf.default,{key:n},hs.default.createElement(zf.default,{width:a+1},hs.default.createElement(dA.default,{dimColor:n!==r.line,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0},String(n).padStart(a," "),":")),hs.default.createElement(dA.default,{key:n,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0}," "+u)))),t.stack&&hs.default.createElement(zf.default,{marginTop:1,flexDirection:"column"},t.stack.split(`
|
||||||
|
`).slice(1).map(n=>{let u=NIe.parseLine(n);return u?hs.default.createElement(zf.default,{key:n},hs.default.createElement(dA.default,{dimColor:!0},"- "),hs.default.createElement(dA.default,{dimColor:!0,bold:!0},u.function),hs.default.createElement(dA.default,{dimColor:!0,color:"gray"}," ","(",u.file,":",u.line,":",u.column,")")):hs.default.createElement(zf.default,{key:n},hs.default.createElement(dA.default,{dimColor:!0},"- "),hs.default.createElement(dA.default,{dimColor:!0,bold:!0},n))})))};ou.default=OEt});var UIe=U(au=>{"use strict";var MEt=au&&au.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),UEt=au&&au.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_Et=au&&au.__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)&&MEt(e,t,r);return UEt(e,t),e},um=au&&au.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(au,"__esModule",{value:!0});var cm=_Et(en()),MIe=um(gq()),HEt=um(a6()),qEt=um(c6()),jEt=um(A6()),GEt=um(p6()),WEt=um(WQ()),YEt=um(OIe()),KEt=" ",JEt="\x1B[Z",VEt="\x1B",KQ=class extends cm.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===VEt&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(e===KEt&&this.focusNext(),e===JEt&&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.focusNext=()=>{this.setState(e=>{let r=e.focusables[0].id;return{activeFocusId:this.findNextFocusable(e)||r}})},this.focusPrevious=()=>{this.setState(e=>{let r=e.focusables[e.focusables.length-1].id;return{activeFocusId:this.findPreviousFocusable(e)||r}})},this.addFocusable=(e,{autoFocus:r})=>{this.setState(o=>{let a=o.activeFocusId;return!a&&r&&(a=e),{activeFocusId:a,focusables:[...o.focusables,{id:e,isActive:!0}]}})},this.removeFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.filter(o=>o.id!==e)}))},this.activateFocusable=e=>{this.setState(r=>({focusables:r.focusables.map(o=>o.id!==e?o:{id:e,isActive:!0})}))},this.deactivateFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.map(o=>o.id!==e?o:{id:e,isActive:!1})}))},this.findNextFocusable=e=>{let r=e.focusables.findIndex(o=>o.id===e.activeFocusId);for(let o=r+1;o<e.focusables.length;o++)if(e.focusables[o].isActive)return e.focusables[o].id},this.findPreviousFocusable=e=>{let r=e.focusables.findIndex(o=>o.id===e.activeFocusId);for(let o=r-1;o>=0;o--)if(e.focusables[o].isActive)return e.focusables[o].id}}static getDerivedStateFromError(e){return{error:e}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return cm.default.createElement(HEt.default.Provider,{value:{exit:this.handleExit}},cm.default.createElement(qEt.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},cm.default.createElement(jEt.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},cm.default.createElement(GEt.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},cm.default.createElement(WEt.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}},this.state.error?cm.default.createElement(YEt.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){MIe.default.hide(this.props.stdout)}componentWillUnmount(){MIe.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(e){this.handleExit(e)}};au.default=KQ;KQ.displayName="InternalApp"});var qIe=U(lu=>{"use strict";var zEt=lu&&lu.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),XEt=lu&&lu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),ZEt=lu&&lu.__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)&&zEt(e,t,r);return XEt(e,t),e},cu=lu&&lu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(lu,"__esModule",{value:!0});var $Et=cu(en()),_Ie=yM(),eCt=cu(xEe()),tCt=cu(uq()),rCt=cu(REe()),nCt=cu(LEe()),E6=cu(PCe()),iCt=cu(fIe()),sCt=cu(hq()),oCt=cu(dIe()),aCt=ZEt(Gq()),lCt=cu(s6()),cCt=cu(UIe()),RC=process.env.CI==="false"?!1:rCt.default,HIe=()=>{},C6=class{constructor(e){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:r,outputHeight:o,staticOutput:a}=iCt.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(RC){n&&this.options.stdout.write(a),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=a),o>=this.options.stdout.rows){this.options.stdout.write(tCt.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},nCt.default(this),this.options=e,this.rootNode=aCt.createNode("ink-root"),this.rootNode.onRender=e.debug?this.onRender:_Ie(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=eCt.default.create(e.stdout),this.throttledLog=e.debug?this.log:_Ie(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=E6.default.createContainer(this.rootNode,!1,!1),this.unsubscribeExit=sCt.default(this.unmount,{alwaysLast:!1}),e.patchConsole&&this.patchConsole(),RC||(e.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{e.stdout.off("resize",this.onRender)})}render(e){let r=$Et.default.createElement(cCt.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);E6.default.updateContainer(r,this.container,null,HIe)}writeToStdout(e){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput);return}if(RC){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(RC){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(),RC?this.options.stdout.write(this.lastOutput+`
|
||||||
|
`):this.options.debug||this.log.done(),this.isUnmounted=!0,E6.default.updateContainer(null,this.container,null,HIe),lCt.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(){!RC&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=oCt.default((e,r)=>{e==="stdout"&&this.writeToStdout(r),e==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}};lu.default=C6});var GIe=U(cB=>{"use strict";var jIe=cB&&cB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cB,"__esModule",{value:!0});var uCt=jIe(qIe()),JQ=jIe(s6()),ACt=Ie("stream"),fCt=(t,e)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},pCt(e)),o=hCt(r.stdout,()=>new uCt.default(r));return o.render(t),{rerender:o.render,unmount:()=>o.unmount(),waitUntilExit:o.waitUntilExit,cleanup:()=>JQ.default.delete(r.stdout),clear:o.clear}};cB.default=fCt;var pCt=(t={})=>t instanceof ACt.Stream?{stdout:t,stdin:process.stdin}:t,hCt=(t,e)=>{let r;return JQ.default.has(t)?r=JQ.default.get(t):(r=e(),JQ.default.set(t,r)),r}});var YIe=U(Xf=>{"use strict";var gCt=Xf&&Xf.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),dCt=Xf&&Xf.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),mCt=Xf&&Xf.__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)&&gCt(e,t,r);return dCt(e,t),e};Object.defineProperty(Xf,"__esModule",{value:!0});var uB=mCt(en()),WIe=t=>{let{items:e,children:r,style:o}=t,[a,n]=uB.useState(0),u=uB.useMemo(()=>e.slice(a),[e,a]);uB.useLayoutEffect(()=>{n(e.length)},[e.length]);let A=u.map((h,C)=>r(h,a+C)),p=uB.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},o),[o]);return uB.default.createElement("ink-box",{internal_static:!0,style:p},A)};WIe.displayName="Static";Xf.default=WIe});var JIe=U(AB=>{"use strict";var yCt=AB&&AB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(AB,"__esModule",{value:!0});var ECt=yCt(en()),KIe=({children:t,transform:e})=>t==null?null:ECt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:e},t);KIe.displayName="Transform";AB.default=KIe});var zIe=U(fB=>{"use strict";var CCt=fB&&fB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fB,"__esModule",{value:!0});var ICt=CCt(en()),VIe=({count:t=1})=>ICt.default.createElement("ink-text",null,`
|
||||||
|
`.repeat(t));VIe.displayName="Newline";fB.default=VIe});var $Ie=U(pB=>{"use strict";var XIe=pB&&pB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pB,"__esModule",{value:!0});var wCt=XIe(en()),BCt=XIe(YQ()),ZIe=()=>wCt.default.createElement(BCt.default,{flexGrow:1});ZIe.displayName="Spacer";pB.default=ZIe});var VQ=U(hB=>{"use strict";var vCt=hB&&hB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(hB,"__esModule",{value:!0});var DCt=en(),SCt=vCt(c6()),xCt=()=>DCt.useContext(SCt.default);hB.default=xCt});var twe=U(gB=>{"use strict";var PCt=gB&&gB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(gB,"__esModule",{value:!0});var ewe=en(),bCt=PCt(VQ()),QCt=(t,e={})=>{let{stdin:r,setRawMode:o,internal_exitOnCtrlC:a}=bCt.default();ewe.useEffect(()=>{if(e.isActive!==!1)return o(!0),()=>{o(!1)}},[e.isActive,o]),ewe.useEffect(()=>{if(e.isActive===!1)return;let n=u=>{let A=String(u),p={upArrow:A==="\x1B[A",downArrow:A==="\x1B[B",leftArrow:A==="\x1B[D",rightArrow:A==="\x1B[C",pageDown:A==="\x1B[6~",pageUp:A==="\x1B[5~",return:A==="\r",escape:A==="\x1B",ctrl:!1,shift:!1,tab:A===" "||A==="\x1B[Z",backspace:A==="\b",delete:A==="\x7F"||A==="\x1B[3~",meta:!1};A<=""&&!p.return&&(A=String.fromCharCode(A.charCodeAt(0)+"a".charCodeAt(0)-1),p.ctrl=!0),A.startsWith("\x1B")&&(A=A.slice(1),p.meta=!0);let h=A>="A"&&A<="Z",C=A>="\u0410"&&A<="\u042F";A.length===1&&(h||C)&&(p.shift=!0),p.tab&&A==="[Z"&&(p.shift=!0),(p.tab||p.backspace||p.delete)&&(A=""),(!(A==="c"&&p.ctrl)||!a)&&t(A,p)};return r==null||r.on("data",n),()=>{r==null||r.off("data",n)}},[e.isActive,r,a,t])};gB.default=QCt});var rwe=U(dB=>{"use strict";var kCt=dB&&dB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(dB,"__esModule",{value:!0});var FCt=en(),RCt=kCt(a6()),TCt=()=>FCt.useContext(RCt.default);dB.default=TCt});var nwe=U(mB=>{"use strict";var LCt=mB&&mB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(mB,"__esModule",{value:!0});var NCt=en(),OCt=LCt(A6()),MCt=()=>NCt.useContext(OCt.default);mB.default=MCt});var iwe=U(yB=>{"use strict";var UCt=yB&&yB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(yB,"__esModule",{value:!0});var _Ct=en(),HCt=UCt(p6()),qCt=()=>_Ct.useContext(HCt.default);yB.default=qCt});var owe=U(CB=>{"use strict";var swe=CB&&CB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(CB,"__esModule",{value:!0});var EB=en(),jCt=swe(WQ()),GCt=swe(VQ()),WCt=({isActive:t=!0,autoFocus:e=!1}={})=>{let{isRawModeSupported:r,setRawMode:o}=GCt.default(),{activeId:a,add:n,remove:u,activate:A,deactivate:p}=EB.useContext(jCt.default),h=EB.useMemo(()=>Math.random().toString().slice(2,7),[]);return EB.useEffect(()=>(n(h,{autoFocus:e}),()=>{u(h)}),[h,e]),EB.useEffect(()=>{t?A(h):p(h)},[t,h]),EB.useEffect(()=>{if(!(!r||!t))return o(!0),()=>{o(!1)}},[t]),{isFocused:Boolean(h)&&a===h}};CB.default=WCt});var awe=U(IB=>{"use strict";var YCt=IB&&IB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(IB,"__esModule",{value:!0});var KCt=en(),JCt=YCt(WQ()),VCt=()=>{let t=KCt.useContext(JCt.default);return{enableFocus:t.enableFocus,disableFocus:t.disableFocus,focusNext:t.focusNext,focusPrevious:t.focusPrevious}};IB.default=VCt});var lwe=U(I6=>{"use strict";Object.defineProperty(I6,"__esModule",{value:!0});I6.default=t=>{var e,r,o,a;return{width:(r=(e=t.yogaNode)===null||e===void 0?void 0:e.getComputedWidth())!==null&&r!==void 0?r:0,height:(a=(o=t.yogaNode)===null||o===void 0?void 0:o.getComputedHeight())!==null&&a!==void 0?a:0}}});var ac=U($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});var zCt=GIe();Object.defineProperty($s,"render",{enumerable:!0,get:function(){return zCt.default}});var XCt=YQ();Object.defineProperty($s,"Box",{enumerable:!0,get:function(){return XCt.default}});var ZCt=y6();Object.defineProperty($s,"Text",{enumerable:!0,get:function(){return ZCt.default}});var $Ct=YIe();Object.defineProperty($s,"Static",{enumerable:!0,get:function(){return $Ct.default}});var eIt=JIe();Object.defineProperty($s,"Transform",{enumerable:!0,get:function(){return eIt.default}});var tIt=zIe();Object.defineProperty($s,"Newline",{enumerable:!0,get:function(){return tIt.default}});var rIt=$Ie();Object.defineProperty($s,"Spacer",{enumerable:!0,get:function(){return rIt.default}});var nIt=twe();Object.defineProperty($s,"useInput",{enumerable:!0,get:function(){return nIt.default}});var iIt=rwe();Object.defineProperty($s,"useApp",{enumerable:!0,get:function(){return iIt.default}});var sIt=VQ();Object.defineProperty($s,"useStdin",{enumerable:!0,get:function(){return sIt.default}});var oIt=nwe();Object.defineProperty($s,"useStdout",{enumerable:!0,get:function(){return oIt.default}});var aIt=iwe();Object.defineProperty($s,"useStderr",{enumerable:!0,get:function(){r
Line truncated
|
||||||
|
`:"";return u?w+=`@IF EXIST ${u} (\r
|
||||||
|
${u} ${p} ${a} ${C}%*\r
|
||||||
|
) ELSE (\r
|
||||||
|
@SETLOCAL\r
|
||||||
|
@SET PATHEXT=%PATHEXT:;.JS;=;%\r
|
||||||
|
${A} ${p} ${a} ${C}%*\r
|
||||||
|
)\r
|
||||||
|
`:w+=`@${A} ${p} ${a} ${C}%*\r
|
||||||
|
`,w}function wwt(t,e,r){let o=lc.relative(lc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n;o=o.split("\\").join("/");let u=lc.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,A=r.args||"",p=aj(r.nodePath).posix;a?(n=`"$basedir/${r.prog}"`,o=u):(a=u,A="",o="");let h=r.progArgs?`${r.progArgs.join(" ")} `:"",C=`#!/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?C+=`${w}if [ -x ${n} ]; then
|
||||||
|
exec ${n} ${A} ${o} ${h}"$@"
|
||||||
|
else
|
||||||
|
exec ${a} ${A} ${o} ${h}"$@"
|
||||||
|
fi
|
||||||
|
`:C+=`${w}${a} ${A} ${o} ${h}"$@"
|
||||||
|
exit $?
|
||||||
|
`,C}function Bwt(t,e,r){let o=lc.relative(lc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n=a&&`"${a}$exe"`,u;o=o.split("\\").join("/");let A=lc.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,p=r.args||"",h=aj(r.nodePath),C=h.win32,w=h.posix;n?(u=`"$basedir/${r.prog}$exe"`,o=A):(n=A,p="",o="");let v=r.progArgs?`${r.progArgs.join(" ")} `:"",b=`#!/usr/bin/env pwsh
|
||||||
|
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
|
||||||
|
|
||||||
|
$exe=""
|
||||||
|
${r.nodePath?`$env_node_path=$env:NODE_PATH
|
||||||
|
$env:NODE_PATH="${C}"
|
||||||
|
`:""}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&&(b+=` else {
|
||||||
|
$env:NODE_PATH="${w}"
|
||||||
|
}`),u?b+=`
|
||||||
|
$ret=0
|
||||||
|
if (Test-Path ${u}) {
|
||||||
|
# Support pipeline input
|
||||||
|
if ($MyInvocation.ExpectingInput) {
|
||||||
|
$input | & ${u} ${p} ${o} ${v}$args
|
||||||
|
} else {
|
||||||
|
& ${u} ${p} ${o} ${v}$args
|
||||||
|
}
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
} else {
|
||||||
|
# Support pipeline input
|
||||||
|
if ($MyInvocation.ExpectingInput) {
|
||||||
|
$input | & ${n} ${p} ${o} ${v}$args
|
||||||
|
} else {
|
||||||
|
& ${n} ${p} ${o} ${v}$args
|
||||||
|
}
|
||||||
|
$ret=$LASTEXITCODE
|
||||||
|
}
|
||||||
|
${r.nodePath?`$env:NODE_PATH=$env_node_path
|
||||||
|
`:""}exit $ret
|
||||||
|
`:b+=`
|
||||||
|
# Support pipeline input
|
||||||
|
if ($MyInvocation.ExpectingInput) {
|
||||||
|
$input | & ${n} ${p} ${o} ${v}$args
|
||||||
|
} else {
|
||||||
|
& ${n} ${p} ${o} ${v}$args
|
||||||
|
}
|
||||||
|
${r.nodePath?`$env:NODE_PATH=$env_node_path
|
||||||
|
`:""}exit $LASTEXITCODE
|
||||||
|
`,b}function vwt(t,e){return e.fs_.chmod(t,493)}function aj(t){if(!t)return{win32:"",posix:""};let e=typeof t=="string"?t.split(lc.delimiter):Array.from(t),r={};for(let o=0;o<e.length;o++){let a=e[o].split("/").join("\\"),n=S1e()?e[o].split("\\").join("/").replace(/^([^:\\/]*):/,(u,A)=>`/mnt/${A.toLowerCase()}`):e[o];r.win32=r.win32?`${r.win32};${a}`:a,r.posix=r.posix?`${r.posix}:${n}`:n,r[o]={win32:a,posix:n}}return r}P1e.exports=oj});var Cj=U((AZt,V1e)=>{V1e.exports=Ie("stream")});var $1e=U((fZt,Z1e)=>{"use strict";function z1e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function Gwt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?z1e(Object(r),!0).forEach(function(o){Wwt(t,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):z1e(Object(r)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o))})}return t}function Wwt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ywt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function X1e(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function Kwt(t,e,r){return e&&X1e(t.prototype,e),r&&X1e(t,r),t}var Jwt=Ie("buffer"),Ik=Jwt.Buffer,Vwt=Ie("util"),Ij=Vwt.inspect,zwt=Ij&&Ij.custom||"inspect";function Xwt(t,e,r){Ik.prototype.copy.call(t,e,r)}Z1e.exports=function(){function t(){Ywt(this,t),this.head=null,this.tail=null,this.length=0}return Kwt(t,[{key:"push",value:function(r){var o={data:r,next:null};this.length>0?this.tail.next=o:this.head=o,this.tail=o,++this.length}},{key:"unshift",value:function(r){var o={data:r,next:this.head};this.length===0&&(this.tail=o),this.head=o,++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 o=this.head,a=""+o.data;o=o.next;)a+=r+o.data;return a}},{key:"concat",value:function(r){if(this.length===0)return Ik.alloc(0);for(var o=Ik.allocUnsafe(r>>>0),a=this.head,n=0;a;)Xwt(a.data,o,n),n+=a.data.length,a=a.next;return o}},{key:"consume",value:function(r,o){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=o?this._getString(r):this._getBuffer(r),a}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var o=this.head,a=1,n=o.data;for(r-=n.length;o=o.next;){var u=o.data,A=r>u.length?u.length:r;if(A===u.length?n+=u:n+=u.slice(0,r),r-=A,r===0){A===u.length?(++a,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=u.slice(A));break}++a}return this.length-=a,n}},{key:"_getBuffer",value:function(r){var o=Ik.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(o),r-=a.data.length;a=a.next;){var u=a.data,A=r>u.length?u.length:r;if(u.copy(o,o.length-r,0,A),r-=A,r===0){A===u.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=u.slice(A));break}++n}return this.length-=n,o}},{key:zwt,value:function(r,o){return Ij(this,Gwt({},o,{depth:0,customInspect:!1}))}}]),t}()});var Bj=U((pZt,t2e)=>{"use strict";function Zwt(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(wj,this,t)):process.nextTick(wj,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(wk,r):(r._writableState.errorEmitted=!0,process.nextTick(e2e,r,n)):process.nextTick(e2e,r,n):e?(process.nextTick(wk,r),e(n)):process.nextTick(wk,r)}),this)}function e2e(t,e){wj(t,e),wk(t)}function wk(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function $wt(){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 wj(t,e){t.emit("error",e)}function e1t(t,e){var r=t._readableState,o=t._writableState;r&&
Line truncated
|
||||||
|
`)),t.linkname&&(e+=Xj(" linkpath="+t.linkname+`
|
||||||
|
`));var r=t.pax;if(r)for(var o in r)e+=Xj(" "+o+"="+r[o]+`
|
||||||
|
`);return Buffer.from(e)};YC.decodePax=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&t[r]!==32;)r++;var o=parseInt(t.slice(0,r).toString(),10);if(!o)return e;var a=t.slice(r+1,o-1).toString(),n=a.indexOf("=");if(n===-1)return e;e[a.slice(0,n)]=a.slice(n+1),t=t.slice(o)}return e};YC.encode=function(t){var e=Y2t(512),r=t.name,o="";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;o+=o?"/"+r.slice(0,a):r.slice(0,a),r=r.slice(a+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(o)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(Fh(t.mode&Z2t,6),100),e.write(Fh(t.uid,6),108),e.write(Fh(t.gid,6),116),e.write(Fh(t.size,11),124),e.write(Fh(t.mtime.getTime()/1e3|0,11),136),e[156]=tBe+tBt(t.type),t.linkname&&e.write(t.linkname,157),rBe.copy(e,av),V2t.copy(e,Zj),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(Fh(t.devmajor||0,6),329),e.write(Fh(t.devminor||0,6),337),o&&e.write(o,345),e.write(Fh(iBe(e),6),148),e)};YC.decode=function(t,e,r){var o=t[156]===0?0:t[156]-tBe,a=WC(t,0,100,e),n=Rh(t,100,8),u=Rh(t,108,8),A=Rh(t,116,8),p=Rh(t,124,12),h=Rh(t,136,12),C=eBt(o),w=t[157]===0?null:WC(t,157,100,e),v=WC(t,265,32),b=WC(t,297,32),E=Rh(t,329,8),R=Rh(t,337,8),N=iBe(t);if(N===8*32)return null;if(N!==Rh(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(rBe.compare(t,av,av+6)===0)t[345]&&(a=WC(t,345,155,e)+"/"+a);else if(!(z2t.compare(t,av,av+6)===0&&X2t.compare(t,Zj,Zj+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return o===0&&a&&a[a.length-1]==="/"&&(o=5),{name:a,mode:n,uid:u,gid:A,size:p,mtime:new Date(1e3*h),type:C,linkname:w,uname:v,gname:b,devmajor:E,devminor:R}}});var ABe=U((RZt,uBe)=>{var oBe=Ie("util"),nBt=eBe(),lv=$j(),aBe=GC().Writable,lBe=GC().PassThrough,cBe=function(){},sBe=function(t){return t&=511,t&&512-t},iBt=function(t,e){var r=new Ok(t,e);return r.end(),r},sBt=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},Ok=function(t,e){this._parent=t,this.offset=e,lBe.call(this,{autoDestroy:!1})};oBe.inherits(Ok,lBe);Ok.prototype.destroy=function(t){this._parent.destroy(t)};var op=function(t){if(!(this instanceof op))return new op(t);aBe.call(this,t),t=t||{},this._offset=0,this._buffer=nBt(),this._missing=0,this._partial=!1,this._onparse=cBe,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,o=function(){e._continue()},a=function(v){if(e._locked=!1,v)return e.destroy(v);e._stream||o()},n=function(){e._stream=null;var v=sBe(e._header.size);v?e._parse(v,u):e._parse(512,w),e._locked||o()},u=function(){e._buffer.consume(sBe(e._header.size)),e._parse(512,w),o()},A=function(){var v=e._header.size;e._paxGlobal=lv.decodePax(r.slice(0,v)),r.consume(v),n()},p=function(){var v=e._header.size;e._pax=lv.decodePax(r.slice(0,v)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(v),n()},h=function(){var v=e._header.size;this._gnuLongPath=lv.decodeLongPath(r.slice(0,v),t.filenameEncoding),r.consume(v),n()},C=function(){var v=e._header.size;this._gnuLongLinkPath=lv.decodeLongPath(r.slice(0,v),t.filenameEncoding),r.consume(v),n()},w=function(){var v=e._offset,b;try{b=e._header=lv.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(E){e.emit("error",E)}if(r.consume(512),!b){e._parse(512,w),o();return}if(b.type==="gnu-long-path"){e._parse(b.size,h),o();return}if(b.type==="gnu-long-link-path"){e._parse(b.size,C),o();return}if(b.type==="pax-global-header"){e._parse(b.size,A),o();return}if(b.type==="pax-header"){e._parse(b.size,p),o();return}if(e._gnuLongPath&&(b.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(b.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=b=sBt(b,e._pax),e._pax=null),e._locked=!0,!b.size||b.type==="directory"){e._parse(512,w),e.emit("entry",b,iBt(e,v),a);return}e._stream=new Ok(e,v),e.emit("entry",b,e._stream,a),e._parse(b.size,n),o()};this._onheader=w,this._parse(512,w)};oBe.inherits(op,aBe);op.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.emit("close"))};op.prototype._parse=function(t,e){this._destroyed||(this._offset+=t,this._missing=t,e===this._onheader&&(this._partial=!1),this._onparse=e)};op.prototype._continue=function(){if(!this._destroyed){var t=this._cb;this._cb=cBe,this._overflow?this._write(this._overflow,void 0,t):t()}};op.prototype._write=function(t,e,r){if(!this._destroyed){var o=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,o?o.write(t,r):(a.append(t),
Line truncated
|
||||||
|
Wanted: ${r.size}
|
||||||
|
Found: ${t.length}`);throw A.code="EBADSIZE",A.found=t.length,A.expected=r.size,A.sri=e,A}else{let A=new Error(`Integrity checksum failed when using ${o}: Wanted ${e}, but got ${n}. (${t.length} bytes)`);throw A.code="EINTEGRITY",A.found=n,A.expected=e,A.algorithm=o,A.sri=e,A}}vA.exports.checkStream=NBt;function NBt(t,e,r){r=ea(r);let o=r.Promise||Promise,a=u9(r.concat({integrity:e}));return new o((n,u)=>{t.pipe(a),t.on("error",u),a.on("error",u);let A;a.on("verified",p=>{A=p}),a.on("end",()=>n(A)),a.on("data",()=>{})})}vA.exports.integrityStream=u9;function u9(t){t=ea(t);let e=t.integrity&&BA(t.integrity,t),r=e&&Object.keys(e).length,o=r&&e.pickAlgorithm(t),a=r&&e[o],n=Array.from(new Set(t.algorithms.concat(o?[o]:[]))),u=n.map(Av.createHash),A=0,p=new xBt({transform(h,C,w){A+=h.length,u.forEach(v=>v.update(h,C)),w(null,h,C)}}).on("end",()=>{let h=t.options&&t.options.length?`?${t.options.join("?")}`:"",C=BA(u.map((v,b)=>`${n[b]}-${v.digest("base64")}${h}`).join(" "),t),w=r&&C.match(e,t);if(typeof t.size=="number"&&A!==t.size){let v=new Error(`stream size mismatch when checking ${e}.
|
||||||
|
Wanted: ${t.size}
|
||||||
|
Found: ${A}`);v.code="EBADSIZE",v.found=A,v.expected=t.size,v.sri=e,p.emit("error",v)}else if(t.integrity&&!w){let v=new Error(`${e} integrity checksum failed when using ${o}: wanted ${a} but got ${C}. (${A} bytes)`);v.code="EINTEGRITY",v.found=C,v.expected=a,v.algorithm=o,v.sri=e,p.emit("error",v)}else p.emit("size",A),p.emit("integrity",C),w&&p.emit("verified",w)});return p}vA.exports.create=OBt;function OBt(t){t=ea(t);let e=t.algorithms,r=t.options.length?`?${t.options.join("?")}`:"",o=e.map(Av.createHash);return{update:function(a,n){return o.forEach(u=>u.update(a,n)),this},digest:function(a){return e.reduce((u,A)=>{let p=o.shift().digest("base64"),h=new Lh(`${A}-${p}${r}`,t);if(h.algorithm&&h.digest){let C=h.algorithm;u[C]||(u[C]=[]),u[C].push(h)}return u},new Bm)}}}var MBt=new Set(Av.getHashes()),RBe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>MBt.has(t));function UBt(t,e){return RBe.indexOf(t.toLowerCase())>=RBe.indexOf(e.toLowerCase())?t:e}});var fve=U((tnr,Ave)=>{var Hvt=iN();function qvt(t){return Hvt(t)?void 0:t}Ave.exports=qvt});var hve=U((rnr,pve)=>{var jvt=xP(),Gvt=P8(),Wvt=F8(),Yvt=jd(),Kvt=pd(),Jvt=fve(),Vvt=w_(),zvt=x8(),Xvt=1,Zvt=2,$vt=4,eDt=Vvt(function(t,e){var r={};if(t==null)return r;var o=!1;e=jvt(e,function(n){return n=Yvt(n,t),o||(o=n.length>1),n}),Kvt(t,zvt(t),r),o&&(r=Gvt(r,Xvt|Zvt|$vt,Jvt));for(var a=e.length;a--;)Wvt(r,e[a]);return r});pve.exports=eDt});Ke();Ke();bt();var b_=Ie("child_process"),y0e=tt(Vg());_t();var Q_=Ie("fs");var iC=new Map([]);function Vut(t){let e=Ae.fromPortablePath(t);process.on("SIGINT",()=>{}),e?(0,b_.execFileSync)(process.execPath,[e,...process.argv.slice(2)],{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}}):(0,b_.execFileSync)(e,process.argv.slice(2),{stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1",YARN_IGNORE_CWD:"1"}})}async function jb({binaryVersion:t,pluginConfiguration:e}){async function r(){let a=new vo({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:t});try{await o(a)}catch(n){process.stdout.write(a.error(n)),process.exitCode=1}}async function o(a){var R,N,_,J;let n=process.versions.node,u=">=14.15.0";if(!Ye.parseOptionalBoolean(process.env.YARN_IGNORE_NODE)&&!Tr.satisfiesWithPrereleases(n,u))throw new ot(`This tool requires a Node version compatible with ${u} (got ${n}). Upgrade Node, or set \`YARN_IGNORE_NODE=1\` in your environment.`);let p=await Xe.find(Ae.toPortablePath(process.cwd()),e,{usePath:!0,strict:!1}),h=p.get("yarnPath"),C=p.get("ignorePath"),w=p.get("ignoreCwd"),v=Ae.toPortablePath(Ae.resolve(process.argv[1])),b=re=>ae.readFilePromise(re).catch(()=>Buffer.of());if(!C&&!w&&await(async()=>h&&(h===v||Buffer.compare(...await Promise.all([b(h),b(v)]))===0))()){process.env.YARN_IGNORE_PATH="1",process.env.YARN_IGNORE_CWD="1",await o(a);return}else if(h!==null&&!C)if(!ae.existsSync(h))process.stdout.write(a.error(new Error(`The "yarn-path" option has been set (in ${p.sources.get("yarnPath")}), but the specified location doesn't exist (${h}).`))),process.exitCode=1;else try{Vut(h)}catch(re){process.exitCode=re.code||1}else{C&&delete process.env.YARN_IGNORE_PATH,p.get("enableTelemetry")&&!y0e.isCI&&process.stdout.isTTY&&(Xe.telemetry=new nC(p,"puba9cdc10ec5790a2cf4969dd413a47270")),(R=Xe.telemetry)==null||R.reportVersion(t);for(let[ve,ge]of p.plugins.entries()){iC.has(((N=ve.match(/^@yarnpkg\/plugin-(.*)$/))==null?void 0:N[1])??"")&&((_=Xe.telemetry)==null||_.reportPluginName(ve));for(let le of ge.commands||[])a.register(le)}let oe={cwd:Ae.toPortablePath(process.cwd()),plugins:e,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr},pe=a.process(process.argv.slice(2),oe);pe.help||(J=Xe.telemetry)==null||J.reportCommandName(pe.path.join(" "));let he=pe.cwd;if(typeof he<"u"&&!w){let ve=(0,Q_.realpathSync)(process.cwd()),ge=(0,Q_.realpathSync)(he);if(ve!==ge){process.chdir(he),await r();return}}await a.runExit(pe,oe)}}return r().catch(a=>{process.stdout.write(a.stack||a.message),process.exitCode=1}).finally(()=>ae.rmtempPromise())}var q1={};Yt(q1,{BaseCommand:()=>ct,WorkspaceRequiredError:()=>er,getDynamicLibs:()=>E0e,getPluginConfiguration:()=>Gb,main:()=>jb,openWorkspace:()=>sC,pluginCommands:()=>iC});_t();var ct=class extends it{constructor(){super(...arguments);this.cwd=fe.String("--cwd",{hidden:!0})}};Ke();bt();_t();var er=class extends ot{constructor(e,r){let o=V.relative(e,r),a=V.join(e,Lt.fileName);super(`This command can only be run from within a workspace of your project (${o} isn't a workspace of ${a}).`)}};Ke();bt();Mc();Ml();d1();_t();var zut=tt(ii());el();var E0e=()=>new Map([["@yarnpkg/cli",q1],["@yarnpkg/core",H1],["@yarnpkg/fslib",LI],["@yarnpkg/libzip",OI],["@yarnpkg/parsers",WI],["@yarnpkg/shell",C1],["clipanion",ew],["semver",zut],["typanion",Go]]);Ke();async function sC(t,e){let{project:r,workspace:o}=await St.find(t,e);if(!o)throw new er(r.Line truncated
|
||||||
|
Try running the command again with the package name prefixed: ${ye.pretty(r,"yarn add",ye.Type.CODE)} ${ye.pretty(r,Y.makeDescriptor(Y.makeIdent(null,"my-package"),`${oe[0]}...`),ye.Type.DESCRIPTOR)}`);if(!re)throw new ot(`The ${ye.pretty(r,J,ye.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let pe=yft(a,re,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(pe.map(async ve=>{let ge=await z1(re,{project:o,workspace:a,cache:n,fixed:u,target:ve,modifier:h,strategies:C,maxResults:w});return{request:re,suggestedDescriptors:ge,target:ve}}))})).then(J=>J.flat()),b=await pA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async J=>{for(let{request:re,suggestedDescriptors:{suggestions:oe,rejections:pe}}of v)if(oe.filter(ve=>ve.descriptor!==null).length===0){let[ve]=pe;if(typeof ve>"u")throw new Error("Assertion failed: Expected an error to have been set");o.configuration.get("enableNetwork")?J.reportError(27,`${Y.prettyDescriptor(r,re)} can't be resolved to a satisfying range`):J.reportError(27,`${Y.prettyDescriptor(r,re)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),J.reportSeparator(),J.reportExceptionOnce(ve)}});if(b.hasErrors())return b.exitCode();let E=!1,R=[],N=[];for(let{suggestedDescriptors:{suggestions:J},target:re}of v){let oe,pe=J.filter(le=>le.descriptor!==null),he=pe[0].descriptor,ve=pe.every(le=>Y.areDescriptorsEqual(le.descriptor,he));pe.length===1||ve?oe=he:(E=!0,{answer:oe}=await(0,oge.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:J.map(({descriptor:le,name:xe,reason:g})=>le?{name:xe,hint:g,descriptor:le}:{name:xe,hint:g,disabled:!0}),onCancel:()=>process.exit(130),result(le){return this.find(le,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let ge=a.manifest[re].get(oe.identHash);(typeof ge>"u"||ge.descriptorHash!==oe.descriptorHash)&&(a.manifest[re].set(oe.identHash,oe),this.optional&&(re==="dependencies"?a.manifest.ensureDependencyMeta({...oe,range:"unknown"}).optional=!0:re==="peerDependencies"&&(a.manifest.ensurePeerDependencyMeta({...oe,range:"unknown"}).optional=!0)),typeof ge>"u"?R.push([a,re,oe,C]):N.push([a,re,ge,oe]))}return await r.triggerMultipleHooks(J=>J.afterWorkspaceDependencyAddition,R),await r.triggerMultipleHooks(J=>J.afterWorkspaceDependencyReplacement,N),E&&this.context.stdout.write(`
|
||||||
|
`),(await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout,includeLogs:!this.context.quiet},async J=>{await o.install({cache:n,report:J,mode:this.mode})})).exitCode()}};x0.paths=[["add"]],x0.usage=it.Usage({description:"add dependencies to the project",details:"\n This command adds a package to the package.json for the nearest workspace.\n\n - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\n\n - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\n\n - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\n\n - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\"peerDependenciesMeta\": { \"<package>\": { \"optional\": true } }`\n\n - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `defaultSemverRangePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\n\n - If the added package specifies a range (such as `^1.0.0`, `latest`, or `rc`), Yarn will add this range as-is in the resulting package.json entry (in particular, tags such as `rc` will be encoded as-is rather than being converted into a semver range).\n\n If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\n\n If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\n\n If the `--mode=<mode>` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the 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 For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/features/protocols.\n ",examples:[["Add a regular package to the current workspace","$0 add lodash"],["Add a specific version for a package to the current workspace","$0 add lodash@1.2.3"],["Add a package from a GitHub repository (the master branch) to the current workspace using a URL","$0 add lodash@https://github.com/lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol","$0 add lodash@github:lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol (shorthand)","$0 add lodash@lodash/lodash"],["Add a package from a specific branch of a GitHub repository to the current workspace using the GitHub protocol (shorthand)","$0 add lodash-es@lodash/lodash#es"]]});function yft(t,e,{dev:r,peer:o,preferDev:a,optional:n}){let u=t.manifest["dependencies"].has(e.identHash),A=t.manifest["devDependencies"].has(e.identHash),p=t.manifest["peerDependencies"Line truncated
|
||||||
|
`),0}return(await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout},async u=>{let A=await sn.getPackageAccessibleBinaries(a,{project:o}),h=Array.from(A.keys()).reduce((C,w)=>Math.max(C,w.length),0);for(let[C,[w,v]]of A)u.reportJson({name:C,source:Y.stringifyIdent(w),path:v});if(this.verbose)for(let[C,[w]]of A)u.reportInfo(null,`${C.padEnd(h," ")} ${Y.prettyLocator(r,w)}`);else for(let C of A.keys())u.reportInfo(null,C)})).exitCode()}};P0.paths=[["bin"]],P0.usage=it.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"]]});Ke();bt();_t();var b0=class extends ct{constructor(){super(...arguments);this.mirror=fe.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=fe.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o=await Ur.find(r);return(await Ct.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&o.mirrorCwd!==null,u=!this.mirror;n&&(await ae.removePromise(o.mirrorCwd),await r.triggerHook(A=>A.cleanGlobalArtifacts,r)),u&&await ae.removePromise(o.cwd)})).exitCode()}};b0.paths=[["cache","clean"],["cache","clear"]],b0.usage=it.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"]]});Ke();_t();var lge=tt(X1()),D8=Ie("util"),Q0=class extends ct{constructor(){super(...arguments);this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=fe.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o=this.name.replace(/[.[].*$/,""),a=this.name.replace(/^[^.[]*/,"");if(typeof r.settings.get(o)>"u")throw new ot(`Couldn't find a configuration settings named "${o}"`);let u=r.getSpecial(o,{hideSecrets:!this.unsafe,getNativePaths:!0}),A=Ye.convertMapsToIndexableObjects(u),p=a?(0,lge.default)(A,a):A,h=await Ct.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async C=>{C.reportJson(p)});if(!this.json){if(typeof p=="string")return this.context.stdout.write(`${p}
|
||||||
|
`),h.exitCode();D8.inspect.styles.name="cyan",this.context.stdout.write(`${(0,D8.inspect)(p,{depth:1/0,colors:r.get("enableColors"),compact:!1})}
|
||||||
|
`)}return h.exitCode()}};Q0.paths=[["config","get"]],Q0.usage=it.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"]]});Ke();_t();var Zge=tt(b8()),$ge=tt(X1()),ede=tt(Q8()),k8=Ie("util"),k0=class extends ct{constructor(){super(...arguments);this.json=fe.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=fe.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=fe.String();this.value=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new ot("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 ot(`Couldn't find a configuration settings named "${a}"`);if(a==="enableStrictSettings")throw new ot("This setting only affects the file it's in, and thus cannot be set from the CLI");let A=this.json?JSON.parse(this.value):this.value;await(this.home?E=>Xe.updateHomeConfiguration(E):E=>Xe.updateConfiguration(o(),E))(E=>{if(n){let R=(0,Zge.default)(E);return(0,ede.default)(R,this.name,A),R}else return{...E,[a]:A}});let C=(await Xe.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),w=Ye.convertMapsToIndexableObjects(C),v=n?(0,$ge.default)(w,n):w;return(await Ct.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async E=>{k8.inspect.styles.name="cyan",E.reportInfo(0,`Successfully set ${this.name} to ${(0,k8.inspect)(v,{depth:1/0,colors:r.get("enableColors"),compact:!1})}`)})).exitCode()}};k0.paths=[["config","set"]],k0.usage=it.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"`]]});Ke();_t();var Ade=tt(b8()),fde=tt(ide()),pde=tt(R8()),F0=class extends ct{constructor(){super(...arguments);this.home=fe.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new ot("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 ot(`Couldn't find a configuration settings named "${a}"`);let A=this.home?h=>Xe.updateHomeConfiguration(h):h=>Xe.updateConfiguration(o(),h);return(await Ct.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let C=!1;await A(w=>{if(!(0,fde.default)(w,this.name))return h.reportWarning(0,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),C=!0,w;let v=n?(0,Ade.default)(w):{...w};return(0,pde.default)(v,this.name),v}),C||h.reportInfo(0,`Successfully unset ${this.name}`)})).exitCode()}};F0.paths=[["config","unset"]],F0.usage=it.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"]]});Ke();Ke();_t();var T8=Ie("util"),R0=class extends ct{constructor(){super(...arguments);this.verbose=fe.Boolean("-v,--verbose",!1,{description:"Print the setting description on top of the regular key/value information"});this.why=fe.Boolean("--why",!1,{description:"Print the reason why a setting is set a particular way"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins,{strict:!1});return(await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{if(r.invalid.size>0&&!this.json){for(let[n,u]of r.invalid)a.reportError(34,`Invalid configuration key "${n}" in ${u}`);a.reportSeparator()}if(this.json){let n=Ye.sortMap(r.settings.keys(),u=>u);for(let u of n){let A=r.settings.get(u),p=r.getSpecial(u,{hideSecrets:!0,getNativePaths:!0}),h=r.sources.get(u);this.verbose?a.reportJson({key:u,effective:p,source:h}):a.reportJson({key:u,effective:p,source:h,...A})}}else{let n=Ye.sortMap(r.settings.keys(),p=>p),u=n.reduce((p,h)=>Math.max(p,h.length),0),A={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2};if(this.why||this.verbose){let p=n.map(C=>{let w=r.settings.get(C);if(!w)throw new Error(`Assertion failed: This settings ("${C}") should have been registered`);let v=this.why?r.sources.get(C)||"<default>":w.description;return[C,v]}),h=p.reduce((C,[,w])=>Math.max(C,w.length),0);for(let[C,w]of p)a.reportInfo(null,`${C.padEnd(u," ")} ${w.padEnd(h," ")} ${(0,T8.inspect)(r.getSpecial(C,{hideSecrets:!0,getNativePaths:!0}),A)}`)}else for(let p of n)a.reportInfo(null,`${p.padEnd(u," ")} ${(0,T8.inspect)(r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),A)}`)}})).exitCode()}};R0.paths=[["config"]],R0.usage=it.Usage({description:"display the current configuration",details:`
|
||||||
|
This command prints the current active configuration settings.
|
||||||
|
`,examples:[["Print the active configuration settings","$0 config"]]});Ke();_t();el();var $b={};Yt($b,{Strategy:()=>Z1,acceptedStrategies:()=>eht,dedupe:()=>L8});Ke();Ke();var hde=tt(Jo()),Z1=(e=>(e.HIGHEST="highest",e))(Z1||{}),eht=new Set(Object.values(Z1)),tht={highest:async(t,e,{resolver:r,fetcher:o,resolveOptions:a,fetchOptions:n})=>{let u=new Map;for(let[p,h]of t.storedResolutions){let C=t.storedDescriptors.get(p);if(typeof C>"u")throw new Error(`Assertion failed: The descriptor (${p}) should have been registered`);Ye.getSetWithDefault(u,C.identHash).add(h)}let A=new Map(Ye.mapAndFilter(t.storedDescriptors.values(),p=>Y.isVirtualDescriptor(p)?Ye.mapAndFilter.skip:[p.descriptorHash,Ye.makeDeferred()]));for(let p of t.storedDescriptors.values()){let h=A.get(p.descriptorHash);if(typeof h>"u")throw new Error(`Assertion failed: The descriptor (${p.descriptorHash}) should have been registered`);let C=t.storedResolutions.get(p.descriptorHash);if(typeof C>"u")throw new Error(`Assertion failed: The resolution (${p.descriptorHash}) should have been registered`);let w=t.originalPackages.get(C);if(typeof w>"u")throw new Error(`Assertion failed: The package (${C}) should have been registered`);Promise.resolve().then(async()=>{var re;let v=r.getResolutionDependencies(p,a),b=Object.fromEntries(await Ye.allSettledSafe(Object.entries(v).map(async([oe,pe])=>{let he=A.get(pe.descriptorHash);if(typeof he>"u")throw new Error(`Assertion failed: The descriptor (${pe.descriptorHash}) should have been registered`);let ve=await he.promise;if(!ve)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[oe,ve.updatedPackage]})));if(e.length&&!hde.default.isMatch(Y.stringifyIdent(p),e)||!r.shouldPersistResolution(w,a))return w;let E=u.get(p.identHash);if(typeof E>"u")throw new Error(`Assertion failed: The resolutions (${p.identHash}) should have been registered`);if(E.size===1)return w;let R=[...E].map(oe=>{let pe=t.originalPackages.get(oe);if(typeof pe>"u")throw new Error(`Assertion failed: The package (${oe}) should have been registered`);return pe}),N=await r.getSatisfying(p,b,R,a),_=(re=N.locators)==null?void 0:re[0];if(typeof _>"u"||!N.sorted)return w;let J=t.originalPackages.get(_.locatorHash);if(typeof J>"u")throw new Error(`Assertion failed: The package (${_.locatorHash}) should have been registered`);return J}).then(async v=>{let b=await t.preparePackage(v,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:w,updatedPackage:v,resolvedPackage:b})}).catch(v=>{h.reject(v)})}return[...A.values()].map(p=>p.promise)}};async function L8(t,{strategy:e,patterns:r,cache:o,report:a}){let{configuration:n}=t,u=new Pi,A=n.makeResolver(),p=n.makeFetcher(),h={cache:o,checksums:t.storedChecksums,fetcher:p,project:t,report:u,cacheOptions:{skipIntegrityCheck:!0}},C={project:t,resolver:A,report:u,fetchOptions:h};return await a.startTimerPromise("Deduplication step",async()=>{let w=tht[e],v=await w(t,r,{resolver:A,resolveOptions:C,fetcher:p,fetchOptions:h}),b=Vs.progressViaCounter(v.length);await a.reportProgress(b);let E=0;await Promise.all(v.map(_=>_.then(J=>{if(J===null||J.currentPackage.locatorHash===J.updatedPackage.locatorHash)return;E++;let{descriptor:re,currentPackage:oe,updatedPackage:pe}=J;a.reportInfo(0,`${Y.prettyDescriptor(n,re)} can be deduped from ${Y.prettyLocator(n,oe)} to ${Y.prettyLocator(n,pe)}`),a.reportJson({descriptor:Y.stringifyDescriptor(re),currentResolution:Y.stringifyLocator(oe),updatedResolution:Y.stringifyLocator(pe)}),t.storedResolutions.set(re.descriptorHash,pe.locatorHash)}).finally(()=>b.tick())));let R;switch(E){case 0:R="No packages";break;case 1:R="One package";break;default:R=`${E} packages`}let N=ye.pretty(n,e,ye.Type.CODE);return a.reportInfo(0,`${R} can be deduped using the ${N} strategy`),E})}var T0=class extends ct{constructor(){super(...arguments);this.strategy=fe.String("-s,--strategy","highest",{description:"The strategy to use when deduping dependencies",validator:Gs(Z1)});this.check=fe.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.mode=fe.String("--mode",{description:"Change what artifacts installs generate",validator:Gs(pl)});this.patterns=fe.Rest()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd),a=await Ur.find(r);await o.restoreInstallState({restoreResolutions:!1});let n=0,u=await Ct.start({configuration:r,includeFooter:!1,stdout:this.context.stdout,json:this.json},async A=>{n=await L8(o,{strategy:this.strategy,patterns:this.patterns,cache:a,report:A})});return u.hasErrors()?u.exitCode():this.check?n?1:0:(await Ct.start({configuration:r,stdout:this.context.stdout,json:this.json},async p=>{await o.install({cache:a,report:p,mode:this.mode})})).exitCode()}};T0.paths=[["d
Line truncated
|
||||||
|
`)}};Kd.paths=[["--clipanion=definitions"]];var Jd=class extends ct{async execute(){this.context.stdout.write(this.cli.usage(null))}};Jd.paths=[["help"],["--help"],["-h"]];Ke();bt();_t();var cC=class extends ct{constructor(){super(...arguments);this.leadingArgument=fe.String();this.args=fe.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!Y.tryParseIdent(this.leadingArgument)){let r=V.resolve(this.context.cwd,Ae.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:r})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}};Ke();var Vd=class extends ct{async execute(){this.context.stdout.write(`${On||"<unknown>"}
|
||||||
|
`)}};Vd.paths=[["-v"],["--version"]];Ke();Ke();_t();var L0=class extends ct{constructor(){super(...arguments);this.commandName=fe.String();this.args=fe.Proxy()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,locator:a}=await St.find(r,this.context.cwd);return await o.restoreInstallState(),await sn.executePackageShellcode(a,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:o})}};L0.paths=[["exec"]],L0.usage=it.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"']]});Ke();_t();el();var N0=class extends ct{constructor(){super(...arguments);this.hash=fe.String({required:!1,validator:Zg(VI(),[zI(/^p[0-9a-f]{5}$/)])})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd);return await o.restoreInstallState({restoreResolutions:!1}),await o.applyLightResolution(),typeof this.hash<"u"?await nht(this.hash,o,{stdout:this.context.stdout}):(await Ct.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let u=[([,A])=>Y.stringifyLocator(o.storedPackages.get(A.subject)),([,A])=>Y.stringifyIdent(A.requested)];for(let[A,p]of Ye.sortMap(o.peerRequirements,u)){let h=o.storedPackages.get(p.subject);if(typeof h>"u")throw new Error("Assertion failed: Expected the subject package to have been registered");let C=o.storedPackages.get(p.rootRequester);if(typeof C>"u")throw new Error("Assertion failed: Expected the root package to have been registered");let w=h.dependencies.get(p.requested.identHash)??null,v=ye.pretty(r,A,ye.Type.CODE),b=Y.prettyLocator(r,h),E=Y.prettyIdent(r,p.requested),R=Y.prettyIdent(r,C),N=p.allRequesters.length-1,_=`descendant${N===1?"":"s"}`,J=N>0?` and ${N} ${_}`:"",re=w!==null?"provides":"doesn't provide";n.reportInfo(null,`${v} \u2192 ${b} ${re} ${E} to ${R}${J}`)}})).exitCode()}};N0.paths=[["explain","peer-requirements"]],N0.usage=it.Usage({description:"explain a set of peer requirements",details:`
|
||||||
|
A set of peer requirements represents all peer requirements that a dependent must satisfy when providing a given peer request to a requester and its descendants.
|
||||||
|
|
||||||
|
When the hash argument is specified, this command prints a detailed explanation of all requirements of the set corresponding to the hash and whether they're satisfied or not.
|
||||||
|
|
||||||
|
When used without arguments, this command lists all sets of peer requirements and the corresponding hash that can be used to get detailed information about a given set.
|
||||||
|
|
||||||
|
**Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (\`yarn explain peer-requirements\`).
|
||||||
|
`,examples:[["Explain the corresponding set of peer requirements for a hash","$0 explain peer-requirements p1a4ed"],["List all sets of peer requirements","$0 explain peer-requirements"]]});async function nht(t,e,r){let{configuration:o}=e,a=e.peerRequirements.get(t);if(typeof a>"u")throw new Error(`No peerDependency requirements found for hash: "${t}"`);return(await Ct.start({configuration:o,stdout:r.stdout,includeFooter:!1},async u=>{let A=e.storedPackages.get(a.subject);if(typeof A>"u")throw new Error("Assertion failed: Expected the subject package to have been registered");let p=e.storedPackages.get(a.rootRequester);if(typeof p>"u")throw new Error("Assertion failed: Expected the root package to have been registered");let h=A.dependencies.get(a.requested.identHash)??null,C=h!==null?e.storedResolutions.get(h.descriptorHash):null;if(typeof C>"u")throw new Error("Assertion failed: Expected the resolution to have been registered");let w=C!==null?e.storedPackages.get(C):null;if(typeof w>"u")throw new Error("Assertion failed: Expected the provided package to have been registered");let v=[...a.allRequesters.values()].map(_=>{let J=e.storedPackages.get(_);if(typeof J>"u")throw new Error("Assertion failed: Expected the package to be registered");let re=Y.devirtualizeLocator(J),oe=e.storedPackages.get(re.locatorHash);if(typeof oe>"u")throw new Error("Assertion failed: Expected the package to be registered");let pe=oe.peerDependencies.get(a.requested.identHash);if(typeof pe>"u")throw new Error("Assertion failed: Expected the peer dependency to be registered");return{pkg:J,peerDependency:pe}});if(w!==null){let _=v.every(({peerDependency:J})=>Tr.satisfiesWithPrereleases(w.version,J.range));u.reportInfo(0,`${Y.prettyLocator(o,A)} provides ${Y.prettyLocator(o,w)} with version ${Y.prettyReference(o,w.version??"<missing>")}, which ${_?"satisfies":"doesn't satisfy"} the following requirements:`)}else u.reportInfo(0,`${Y.prettyLocator(o,A)} doesn't provide ${Y.prettyIdent(o,a.requested)}, breaking the following requirements:`);u.reportSeparator();let b=ye.mark(o),E=[];for(let{pkg:_,peerDependency:J}of Ye.sortMap(v,re=>Y.stringifyLocator(re.pkg))){let oe=(w!==null?Tr.satisfiesWithPrereleases(w.version,J.range):!1)?b.Check:b.Cross;E.push({stringifiedLocator:Y.stringifyLocator(_),prettyLocator:Y.prettyLocator(o,_),prettyRange:Y.prettyRange(o,J.range),mark:oe})}let R=Math.max(...E.map(({stringifiedLocator:_})=>_.length)),N=Math.max(...E.map(({prettyRange:_})=>_.length));for(let{stringifiedLocator:_,prettyLocator:J,prettyRange:re,mark:oe}of Ye.sortMap(E,({stringifiedLocator:pe})=>pe))u.reportInfo(null,`${J.padEnd(R+(J.length-_.length)," ")} \u2192 ${re.padEnd(N," ")} ${oe}`);E.length>1&&(u.reportSeparator(),u.reportInfo(0,`Note: these requirements start with ${Y.prettyLocator(e.configuration,p)}`))})).exitCode()}Ke();_t();el();Ke();Ke();bt();_t();var dde=tt(ii()),O0=class extends ct{constructor(){super(...arguments);this.useYarnPath=fe.Boolean("--yarn-path",{description:"Set the yarnPath setting even if the version can be accessed by Corepack"});this.onlyIfNeeded=fe.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn't already locked"});this.version=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins);if(this.onlyIfNeeded&&r.get("yarnPath")){let A=r.sources.get("yarnPath");if(!A)throw new Error("Assertion failed: Expected 'yarnPath' to have a source");let p=r.projectCwd??r.startingCwd;if(V.contains(p,A))return 0}let o=()=>{if(typeof On>"u")throw new ot("The --install flag can only be used without explicit version specifier from the Yarn CLI");return`file://${process.argv[1]}`},a,n=(A,p)=>({version:p,url:A.replace(/\{\}/g,p)});if(this.version==="self")a={url:o(),version:On??"self"};else if(this.version==="latest"||this.version==="berry"||this.version==="stable")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await $1(r,"stable"));else if(this.version==="canary")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await $1(r,"canary"));else if(this.version==="classic")a={url:"https://classic.yarnpkg.com/latest.js",version:"classic"};else if(this.version.match(/^https?:/))a={url:this.version,version:"remote"};else if(this.version.match(/^\.{0,2}[\\/]/)||Ae.isAbsolute(this.version))a={url:`file://${V.resolve(Ae.toPortablePath(this.version))}`,version:"file"};else if(Tr.satisfiesWithPrereleases(this.version,">=2.0.0"))a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",this.version);else if(Tr.satisfiesWithPrereleases(this.version,"^0.x || ^1.x"))a=n("https://github.com/yarnpkg/yarn/releases/download/v{}/yarn-{}.js",this.version);else if(Tr.validRange(this.version))a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await iht(r,this.version));else throw new ot(`Invalid version descriptor "${this.version}"`);return(await Ct.start({configuration:r,stdout:this.context.stdout,includeLogs:!this.context.quiet},a
Line truncated
|
||||||
|
${e}`)})}let A=t.projectCwd??t.startingCwd,p=V.resolve(A,".yarn/releases"),h=V.resolve(p,`yarn-${e}.cjs`),C=V.relative(t.startingCwd,h),w=Ye.isTaggedYarnVersion(e),v=t.get("yarnPath"),b=!w,E=b||!!v||!!a;if(a===!1){if(b)throw new Jt(0,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");E=!1}else!E&&!process.env.COREPACK_ROOT&&(o.reportWarning(0,`You don't seem to have ${ye.applyHyperlink(t,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'll have to rely on ${ye.applyHyperlink(t,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")} instead`),E=!0);if(E){let re=await u();o.reportInfo(0,`Saving the new release in ${ye.pretty(t,C,"magenta")}`),await ae.removePromise(V.dirname(h)),await ae.mkdirPromise(V.dirname(h),{recursive:!0}),await ae.writeFilePromise(h,re,{mode:493}),await Xe.updateConfiguration(A,{yarnPath:V.relative(A,h)})}else await ae.removePromise(V.dirname(h)),await Xe.updateConfiguration(A,{yarnPath:Xe.deleteProperty});let R=await Lt.tryFind(A)||new Lt;R.packageManager=`yarn@${w?e:await $1(t,"stable")}`;let N={};R.exportTo(N);let _=V.join(A,Lt.fileName),J=`${JSON.stringify(N,null,R.indent)}
|
||||||
|
`;return await ae.changeFilePromise(_,J,{automaticNewlines:!0}),{bundleVersion:e}}function mde(t){return dr[JD(t)]}var sht=/## (?<code>YN[0-9]{4}) - `(?<name>[A-Z_]+)`\n\n(?<details>(?:.(?!##))+)/gs;async function oht(t){let r=`https://repo.yarnpkg.com/${Ye.isTaggedYarnVersion(On)?On:await $1(t,"canary")}/packages/gatsby/content/advanced/error-codes.md`,o=await ln.get(r,{configuration:t});return new Map(Array.from(o.toString().matchAll(sht),({groups:a})=>{if(!a)throw new Error("Assertion failed: Expected the match to have been successful");let n=mde(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 M0=class extends ct{constructor(){super(...arguments);this.code=fe.String({required:!1,validator:Zg(VI(),[zI(/^YN[0-9]{4}$/)])});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins);if(typeof this.code<"u"){let o=mde(this.code),a=ye.pretty(r,o,ye.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),A=(await oht(r)).get(this.code),p=typeof A<"u"?ye.jsonOrPretty(this.json,r,ye.tuple(ye.Type.MARKDOWN,{text:A,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}:
|
||||||
|
${ye.jsonOrPretty(this.json,r,ye.tuple(ye.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/gatsby/content/advanced/error-codes.md"))}
|
||||||
|
`;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:o,details:p})}
|
||||||
|
`):this.context.stdout.write(`${n}
|
||||||
|
|
||||||
|
${p}
|
||||||
|
`)}else{let o={children:Ye.mapAndFilter(Object.entries(dr),([a,n])=>Number.isNaN(Number(a))?Ye.mapAndFilter.skip:{label:Ju(Number(a)),value:ye.tuple(ye.Type.CODE,n)})};Xo.emitTree(o,{configuration:r,stdout:this.context.stdout,json:this.json})}}};M0.paths=[["explain"]],M0.usage=it.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"]]});Ke();bt();_t();var yde=tt(Jo()),U0=class extends ct{constructor(){super(...arguments);this.all=fe.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=fe.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=fe.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=fe.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=fe.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=fe.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=fe.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=fe.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=fe.Rest()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Ur.find(r);if(!a&&!this.all)throw new er(o.cwd,this.context.cwd);await o.restoreInstallState();let u=new Set(this.extra);this.cache&&u.add("cache"),this.dependents&&u.add("dependents"),this.manifest&&u.add("manifest");let A=(oe,{recursive:pe})=>{let he=oe.anchoredLocator.locatorHash,ve=new Map,ge=[he];for(;ge.length>0;){let le=ge.shift();if(ve.has(le))continue;let xe=o.storedPackages.get(le);if(typeof xe>"u")throw new Error("Assertion failed: Expected the package to be registered");if(ve.set(le,xe),Y.isVirtualLocator(xe)&&ge.push(Y.devirtualizeLocator(xe).locatorHash),!(!pe&&le!==he))for(let g of xe.dependencies.values()){let De=o.storedResolutions.get(g.descriptorHash);if(typeof De>"u")throw new Error("Assertion failed: Expected the resolution to be registered");ge.push(De)}}return ve.values()},p=({recursive:oe})=>{let pe=new Map;for(let he of o.workspaces)for(let ve of A(he,{recursive:oe}))pe.set(ve.locatorHash,ve);return pe.values()},h=({all:oe,recursive:pe})=>oe&&pe?o.storedPackages.values():oe?p({recursive:pe}):A(a,{recursive:pe}),C=({all:oe,recursive:pe})=>{let he=h({all:oe,recursive:pe}),ve=this.patterns.map(xe=>{let g=Y.parseLocator(xe),De=yde.default.makeRe(Y.stringifyIdent(g)),Ee=Y.isVirtualLocator(g),de=Ee?Y.devirtualizeLocator(g):g;return ne=>{let Z=Y.stringifyIdent(ne);if(!De.test(Z))return!1;if(g.reference==="unknown")return!0;let me=Y.isVirtualLocator(ne),be=me?Y.devirtualizeLocator(ne):ne;return!(Ee&&me&&g.reference!==ne.reference||de.reference!==be.reference)}}),ge=Ye.sortMap([...he],xe=>Y.stringifyLocator(xe));return{selection:ge.filter(xe=>ve.length===0||ve.some(g=>g(xe))),sortedLookup:ge}},{selection:w,sortedLookup:v}=C({all:this.all,recursive:this.recursive});if(w.length===0)throw new ot("No package matched your request");let b=new Map;if(this.dependents)for(let oe of v)for(let pe of oe.dependencies.values()){let he=o.storedResolutions.get(pe.descriptorHash);if(typeof he>"u")throw new Error("Assertion failed: Expected the resolution to be registered");Ye.getArrayWithDefault(b,he).push(oe)}let E=new Map;for(let oe of v){if(!Y.isVirtualLocator(oe))continue;let pe=Y.devirtualizeLocator(oe);Ye.getArrayWithDefault(E,pe.locatorHash).push(oe)}let R={},N={children:R},_=r.makeFetcher(),J={project:o,fetcher:_,cache:n,checksums:o.storedChecksums,report:new Pi,cacheOptions:{skipIntegrityCheck:!0}},re=[async(oe,pe,he)=>{var le;if(!pe.has("manifest"))return;let ve=await _.fetch(oe,J),ge;try{ge=await Lt.find(ve.prefixPath,{baseFs:ve.packageFs})}finally{(le=ve.releaseFs)==null||le.call(ve)}he("Manifest",{License:ye.tuple(ye.Type.NO_HINT,ge.license),Homepage:ye.tuple(ye.Type.URL,ge.raw.homepage??null)})},async(oe,pe,he)=>{if(!pe.has("cache"))return;let ve={mockedPackages:o.disabledLocators,unstablePackages:o.conditionalLocators},ge=o.storedChecksums.get(oe.locatorHash)??null,le=n.getLocatorPath(oe,ge,ve),xe;if(le!==null)try{xe=ae.statSync(le)}catch{}let g=typeof xe<"u"?[xe.size,ye.Type.SIZE]:void 0;he("Cache",{Checksum:ye.tuple(ye.Type.NO_HINT,ge),Path:ye.tuple(ye.Type.PATH,le),Size:g})}];for(let oe of w){let pe=Y.isVirtualLocator(oe);if(!this.virtuals&&pe)continue;let he={},ve={value:[oe,ye.Type.LOCATOR],children:he};if(R[Y.stringifyLocator(oe)]=ve,this.nameOnly){delete ve.children;continue}let ge=E.get(oe.locatorHash);typeof ge<"u"&&(he.Instances={label:"Instances",value:ye.tuple(ye.Type.NUMBER,ge.length)}),he.Version={label:"Version",value:ye.tuple(ye.Type.NO_HINT,oe.version)};let le=(g,De)=>{let Ee={};if(he[g]=Ee,Array.isArray(De))Ee.children=De.map(de=>({value:de}));else{let de={};Ee.children=de;for(let[ne,Z]of Object.entries(De))typeof Z>"u"||(de[ne]={label
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"]]});Ke();_t();var j0=class extends ct{constructor(){super(...arguments);this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o=await Xe.findRcFiles(this.context.cwd);return(await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{var u;for(let A of o)if(!!((u=A.data)!=null&&u.plugins))for(let p of A.data.plugins){if(!p.checksum||!p.spec.match(/^https?:/))continue;let h=await ln.get(p.spec,{configuration:r}),C=bn.makeHash(h);if(p.checksum===C)continue;let w=ye.pretty(r,p.path,ye.Type.PATH),v=ye.pretty(r,p.spec,ye.Type.URL),b=`${w} is different from the file provided by ${v}`;n.reportJson({...p,newChecksum:C}),n.reportError(0,b)}})).exitCode()}};j0.paths=[["plugin","check"]],j0.usage=it.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"]]});Ke();Ke();bt();_t();var vde=Ie("os");Ke();bt();_t();var Ede=Ie("os");Ke();Ml();_t();var cht="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function zd(t,e){let r=await ln.get(cht,{configuration:t}),o=Yi(r.toString());return Object.fromEntries(Object.entries(o).filter(([a,n])=>!e||Tr.satisfiesWithPrereleases(e,n.range??"<4.0.0-rc.1")))}var G0=class extends ct{constructor(){super(...arguments);this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins);return(await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await zd(r,On);for(let[u,{experimental:A,...p}]of Object.entries(n)){let h=u;A&&(h+=" [experimental]"),a.reportJson({name:u,experimental:A,...p}),a.reportInfo(null,h)}})).exitCode()}};G0.paths=[["plugin","list"]],G0.usage=it.Usage({category:"Plugin-related commands",description:"list the available official plugins",details:"\n This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]});var uht=/^[0-9]+$/;function Cde(t){return uht.test(t)?`pull/${t}/head`:t}var Aht=({repository:t,branch:e},r)=>[["git","init",Ae.fromPortablePath(r)],["git","remote","add","origin",t],["git","fetch","origin","--depth=1",Cde(e)],["git","reset","--hard","FETCH_HEAD"]],fht=({branch:t})=>[["git","fetch","origin","--depth=1",Cde(t),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx"]],pht=({plugins:t,noMinify:e},r)=>[["yarn","build:cli",...new Array().concat(...t.map(o=>["--plugin",V.resolve(r,o)])),...e?["--no-minify"]:[],"|"]],W0=class extends ct{constructor(){super(...arguments);this.installPath=fe.String("--path",{description:"The path where the repository should be cloned to"});this.repository=fe.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=fe.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=fe.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.noMinify=fe.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=fe.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=fe.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd),a=typeof this.installPath<"u"?V.resolve(this.context.cwd,Ae.toPortablePath(this.installPath)):V.resolve(Ae.toPortablePath((0,Ede.tmpdir)()),"yarnpkg-sources",bn.makeHash(this.repository).slice(0,6));return(await Ct.start({configuration:r,stdout:this.context.stdout},async u=>{await O8(this,{configuration:r,report:u,target:a}),u.reportSeparator(),u.reportInfo(0,"Building a fresh bundle"),u.reportSeparator(),await e2(pht(this,a),{configuration:r,context:this.context,target:a}),u.reportSeparator();let A=V.resolve(a,"packages/yarnpkg-cli/bundles/yarn.js"),p=await ae.readFilePromise(A),{bundleVersion:h}=await N8(r,null,async()=>p,{report:u});this.skipPlugins||await hht(this,h,{project:o,report:u,target:a})})).exitCode()}};W0.paths=[["set","version","from","sources"]],W0.usage=it.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 function e2(t,{configuration:e,context:r,target:o}){for(let[a,...n]of t){let u=n[n.length-1]==="|";if(u&&n.pop(),u)await Mr.pipevp(a,n,{cwd:o,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${ye.pretty(e,` $ ${[a,...n].join(" ")}`,"grey")}
|
||||||
|
`);try{await Mr.execvp(a,n,{cwd:o,strict:!0})}catch(A){throw r.stdout.write(A.stdout||A.stack),A}}}}async function O8(t,{configuration:e,report:r,target:o}){let a=!1;if(!t.force&&ae.existsSync(V.join(o,".git"))){r.reportInfo(0,"Fetching the latest commits"),r.reportSeparator();try{await e2(fht(t),{configuration:e,context:t.context,target:o}),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 ae.removePromise(o),await ae.mkdirPromise(o,{recursive:!0}),await e2(Aht(t,o),{configuration:e,context:t.context,target:o}))}async function hht(t,e,{project:r,report:o,target:a}){let n=await zd(r.configuration,e),u=new Set(Object.keys(n));for(let A of r.configuration.plugins.keys())!u.has(A)||await M8(A,t,{project:r,report:o,target:a})}Ke();Ke();bt();_t();var Ide=tt(ii()),wde=Ie("url"),Bde=Ie("vm");var Y0=class extends ct{constructor(){super(...arguments);this.name=fe.String();this.checksum=fe.Boolean("--checksum",!0,{description:"Whether to care if this plugin is modified"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins);return(await Ct.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await St.find(r,this.context.cwd),u,A;if(this.name.match(/^\.{0,2}[\\/]/)||Ae.isAbsolute(this.name)){let p=V.resolve(this.context.cwd,Ae.toPortablePath(this.name));a.reportInfo(0,`Reading ${ye.pretty(r,p,ye.Type.PATH)}`),u=V.relative(n.cwd,p),A=await ae.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new wde.URL(this.name)}catch{throw new Jt(52,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}u=this.name,p=this.name}else{let h=Y.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(h.reference!=="unknown"&&!Ide.default.valid(h.reference))throw new Jt(0,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let C=Y.stringifyIdent(h),w=await zd(r,On);if(!Object.prototype.hasOwnProperty.call(w,C)){let v=`Couldn't find a plugin named ${Y.prettyIdent(r,h)} on the remote registry.
|
||||||
|
`;throw r.plugins.has(C)?v+=`A plugin named ${Y.prettyIdent(r,h)} is already installed; possibly attempting to import a built-in plugin.`:v+=`Note that only the plugins referenced on our website (${ye.pretty(r,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",ye.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${ye.pretty(r,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",ye.Type.URL)}).`,new Jt(51,v)}u=C,p=w[C].url,h.reference!=="unknown"?p=p.replace(/\/master\//,`/${C}/${h.reference}/`):On!==null&&(p=p.replace(/\/master\//,`/@yarnpkg/cli/${On}/`))}a.reportInfo(0,`Downloading ${ye.pretty(r,p,"green")}`),A=await ln.get(p,{configuration:r})}await U8(u,A,{checksum:this.checksum,project:n,report:a})})).exitCode()}};Y0.paths=[["plugin","import"]],Y0.usage=it.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 function U8(t,e,{checksum:r=!0,project:o,report:a}){let{configuration:n}=o,u={},A={exports:u};(0,Bde.runInNewContext)(e.toString(),{module:A,exports:u});let h=`.yarn/plugins/${A.exports.name}.cjs`,C=V.resolve(o.cwd,h);a.reportInfo(0,`Saving the new plugin in ${ye.pretty(n,h,"magenta")}`),await ae.mkdirPromise(V.dirname(C),{recursive:!0}),await ae.writeFilePromise(C,e);let w={path:h,spec:t};r&&(w.checksum=bn.makeHash(e)),await Xe.addPlugin(o.cwd,[w])}var ght=({pluginName:t,noMinify:e},r)=>[["yarn",`build:${t}`,...e?["--no-minify"]:[],"|"]],K0=class extends ct{constructor(){super(...arguments);this.installPath=fe.String("--path",{description:"The path where the repository should be cloned to"});this.repository=fe.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=fe.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=fe.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=fe.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o=typeof this.installPath<"u"?V.resolve(this.context.cwd,Ae.toPortablePath(this.installPath)):V.resolve(Ae.toPortablePath((0,vde.tmpdir)()),"yarnpkg-sources",bn.makeHash(this.repository).slice(0,6));return(await Ct.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:u}=await St.find(r,this.context.cwd),A=Y.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),p=Y.stringifyIdent(A),h=await zd(r,On);if(!Object.prototype.hasOwnProperty.call(h,p))throw new Jt(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 C=p;await O8(this,{configuration:r,report:n,target:o}),await M8(C,this,{project:u,report:n,target:o})})).exitCode()}};K0.paths=[["plugin","import","from","sources"]],K0.usage=it.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 function M8(t,{context:e,noMinify:r},{project:o,report:a,target:n}){let u=t.replace(/@yarnpkg\//,""),{configuration:A}=o;a.reportSeparator(),a.reportInfo(0,`Building a fresh ${u}`),a.reportSeparator(),await e2(ght({pluginName:u,noMinify:r},n),{configuration:A,context:e,target:n}),a.reportSeparator();let p=V.resolve(n,`packages/${u}/bundles/${t}.js`),h=await ae.readFilePromise(p);await U8(t,h,{project:o,report:a})}Ke();bt();_t();var J0=class extends ct{constructor(){super(...arguments);this.name=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd);return(await Ct.start({configuration:r,stdout:this.context.stdout},async n=>{let u=this.name,A=Y.parseIdent(u);if(!r.plugins.has(u))throw new ot(`${Y.prettyIdent(r,A)} isn't referenced by the current configuration`);let p=`.yarn/plugins/${u}.cjs`,h=V.resolve(o.cwd,p);ae.existsSync(h)&&(n.reportInfo(0,`Removing ${ye.pretty(r,p,ye.Type.PATH)}...`),await ae.removePromise(h)),n.reportInfo(0,"Updating the configuration..."),await Xe.updateConfiguration(o.cwd,C=>{if(!Array.isArray(C.plugins))return C;let w=C.plugins.filter(v=>v.path!==p);return C.plugins.length===w.length?C:{...C,plugins:w}})})).exitCode()}};J0.paths=[["plugin","remove"]],J0.usage=it.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"]]});Ke();_t();var V0=class extends ct{constructor(){super(...arguments);this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins);return(await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let u=this.context.plugins.plugins.has(n),A=n;u&&(A+=" [builtin]"),a.reportJson({name:n,builtin:u}),a.reportInfo(null,`${A}`)}})).exitCode()}};V0.paths=[["plugin","runtime"]],V0.usage=it.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"]]});Ke();Ke();_t();var z0=class extends ct{constructor(){super(...arguments);this.idents=fe.Rest()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new er(o.cwd,this.context.cwd);let u=new Set;for(let p of this.idents)u.add(Y.parseIdent(p).identHash);if(await o.restoreInstallState({restoreResolutions:!1}),await o.resolveEverything({cache:n,report:new Pi}),u.size>0)for(let p of o.storedPackages.values())u.has(p.identHash)&&o.storedBuildState.delete(p.locatorHash);else o.storedBuildState.clear();return(await Ct.start({configuration:r,stdout:this.context.stdout,includeLogs:!this.context.quiet},async p=>{await o.install({cache:n,report:p})})).exitCode()}};z0.paths=[["rebuild"]],z0.usage=it.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"]]});Ke();Ke();Ke();_t();var _8=tt(Jo());el();var X0=class extends ct{constructor(){super(...arguments);this.all=fe.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=fe.String("--mode",{description:"Change what artifacts installs generate",validator:Gs(pl)});this.patterns=fe.Rest()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new er(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.all?o.workspaces:[a],A=["dependencies","devDependencies","peerDependencies"],p=[],h=!1,C=[];for(let E of this.patterns){let R=!1,N=Y.parseIdent(E);for(let _ of u){let J=[..._.manifest.peerDependenciesMeta.keys()];for(let re of(0,_8.default)(J,E))_.manifest.peerDependenciesMeta.delete(re),h=!0,R=!0;for(let re of A){let oe=_.manifest.getForScope(re),pe=[...oe.values()].map(he=>Y.stringifyIdent(he));for(let he of(0,_8.default)(pe,Y.stringifyIdent(N))){let{identHash:ve}=Y.parseIdent(he),ge=oe.get(ve);if(typeof ge>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");_.manifest[re].delete(ve),C.push([_,re,ge]),h=!0,R=!0}}}R||p.push(E)}let w=p.length>1?"Patterns":"Pattern",v=p.length>1?"don't":"doesn't",b=this.all?"any":"this";if(p.length>0)throw new ot(`${w} ${ye.prettyList(r,p,ye.Type.CODE)} ${v} match any packages referenced by ${b} workspace`);return h?(await r.triggerMultipleHooks(R=>R.afterWorkspaceDependencyRemoval,C),(await Ct.start({configuration:r,stdout:this.context.stdout},async R=>{await o.install({cache:n,report:R,mode:this.mode})})).exitCode()):0}};X0.paths=[["remove"]],X0.usage=it.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}'"]]});Ke();Ke();var Dde=Ie("util"),Xd=class extends ct{async execute(){let e=await Xe.find(this.context.cwd,this.context.plugins),{project:r,workspace:o}=await St.find(e,this.context.cwd);if(!o)throw new er(r.cwd,this.context.cwd);return(await Ct.start({configuration:e,stdout:this.context.stdout},async n=>{let u=o.manifest.scripts,A=Ye.sortMap(u.keys(),C=>C),p={breakLength:1/0,colors:e.get("enableColors"),maxArrayLength:2},h=A.reduce((C,w)=>Math.max(C,w.length),0);for(let[C,w]of u.entries())n.reportInfo(null,`${C.padEnd(h," ")} ${(0,Dde.inspect)(w,p)}`)})).exitCode()}};Xd.paths=[["run"]];Ke();Ke();_t();var Z0=class extends ct{constructor(){super(...arguments);this.inspect=fe.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=fe.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=fe.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=fe.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.require=fe.String("--require",{description:"Forwarded to the underlying Node process when executing a binary"});this.silent=fe.Boolean("--silent",{hidden:!0});this.scriptName=fe.String();this.args=fe.Proxy()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a,locator:n}=await St.find(r,this.context.cwd);await o.restoreInstallState();let u=this.topLevel?o.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await sn.hasPackageScript(u,this.scriptName,{project:o}))return await sn.executePackageScript(u,this.scriptName,this.args,{project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let A=await sn.getPackageAccessibleBinaries(u,{project:o});if(A.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 sn.executePackageAccessibleBinary(u,this.scriptName,this.args,{cwd:this.context.cwd,project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:h,packageAccessibleBinaries:A})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(":")){let C=(await Promise.all(o.workspaces.map(async w=>w.manifest.scripts.has(this.scriptName)?w:null))).filter(w=>w!==null);if(C.length===1)return await sn.executeWorkspaceScript(C[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw this.scriptName==="node-gyp"?new ot(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${Y.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 ot(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${Y.prettyLocator(r,n)}).`);{if(this.scriptName==="global")throw new ot("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[C,w]of iC)for(let v of w)if(h.length>=v.length&&JSON.stringify(h.slice(0,v.length))===JSON.stringify(v))throw new ot(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${C} plugin. You can install it with "yarn plugin import ${C}".`);throw new ot(`Couldn't find a script named "${this.scriptName}".`)}}};Z0.paths=[["run"]],Z0.usage=it.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"]]});Ke();Ke();_t();var $0=class extends ct{constructor(){super(...arguments);this.save=fe.Boolean("-s,--save",!1,{description:"Persist the resolution inside the top-level manifest"});this.descriptor=fe.String();this.resolution=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Ur.find(r);if(await o.restoreInstallState({restoreResolutions:!1}),!a)throw new er(o.cwd,this.context.cwd);let u=Y.parseDescriptor(this.descriptor,!0),A=Y.makeDescriptor(u,this.resolution);return o.storedDescriptors.set(u.descriptorHash,u),o.storedDescriptors.set(A.descriptorHash,A),o.resolutionAliases.set(u.descriptorHash,A.descriptorHash),(await Ct.start({configuration:r,stdout:this.context.stdout},async h=>{await o.install({cache:n,report:h})})).exitCode()}};$0.paths=[["set","resolution"]],$0.usage=it.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, add the `-s,--save` flag which will also edit the `resolutions` field from your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@npm:^1.2.3 1.5.0"]]});Ke();bt();_t();var Sde=tt(Jo()),eh=class extends ct{constructor(){super(...arguments);this.all=fe.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=fe.Rest()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new er(o.cwd,this.context.cwd);let u=o.topLevelWorkspace,A=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:h,reference:C}of u.manifest.resolutions)C.startsWith("portal:")&&A.add(h.descriptor.fullName);if(this.leadingArguments.length>0)for(let h of this.leadingArguments){let C=V.resolve(this.context.cwd,Ae.toPortablePath(h));if(Ye.isPathLike(h)){let w=await Xe.find(C,this.context.plugins,{useRc:!1,strict:!1}),{project:v,workspace:b}=await St.find(w,C);if(!b)throw new er(v.cwd,C);if(this.all){for(let E of v.workspaces)E.manifest.name&&A.add(Y.stringifyIdent(E.locator));if(A.size===0)throw new ot("No workspace found to be unlinked in the target project")}else{if(!b.manifest.name)throw new ot("The target workspace doesn't have a name and thus cannot be unlinked");A.add(Y.stringifyIdent(b.locator))}}else{let w=[...u.manifest.resolutions.map(({pattern:v})=>v.descriptor.fullName)];for(let v of(0,Sde.default)(w,h))A.add(v)}}return u.manifest.resolutions=u.manifest.resolutions.filter(({pattern:h})=>!A.has(h.descriptor.fullName)),(await Ct.start({configuration:r,stdout:this.context.stdout},async h=>{await o.install({cache:n,report:h})})).exitCode()}};eh.paths=[["unlink"]],eh.usage=it.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}'"]]});Ke();Ke();Ke();_t();var xde=tt(K1()),H8=tt(Jo());el();var Kf=class extends ct{constructor(){super(...arguments);this.interactive=fe.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.fixed=fe.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=fe.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=fe.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=fe.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=fe.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=fe.String("--mode",{description:"Change what artifacts installs generate",validator:Gs(pl)});this.patterns=fe.Rest()}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new er(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=[...o.storedDescriptors.values()],A=u.map(w=>Y.stringifyIdent(w)),p=new Set;for(let w of this.patterns){if(Y.parseDescriptor(w).range!=="unknown")throw new ot("Ranges aren't allowed when using --recursive");for(let v of(0,H8.default)(A,w)){let b=Y.parseIdent(v);p.add(b.identHash)}}let h=u.filter(w=>p.has(w.identHash));for(let w of h)o.storedDescriptors.delete(w.descriptorHash),o.storedResolutions.delete(w.descriptorHash);return(await Ct.start({configuration:r,stdout:this.context.stdout},async w=>{await o.install({cache:n,report:w})})).exitCode()}async executeUpClassic(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Ur.find(r);if(!a)throw new er(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.fixed,A=this.interactive??r.get("preferInteractive"),p=V1(this,o),h=A?["keep","reuse","project","latest"]:["project","latest"],C=[],w=[];for(let _ of this.patterns){let J=!1,re=Y.parseDescriptor(_);for(let oe of o.workspaces)for(let pe of["dependencies","devDependencies"]){let ve=[...oe.manifest.getForScope(pe).values()].map(ge=>Y.stringifyIdent(ge));for(let ge of(0,H8.default)(ve,Y.stringifyIdent(re))){let le=Y.parseIdent(ge),xe=oe.manifest[pe].get(le.identHash);if(typeof xe>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let g=Y.makeDescriptor(le,re.range);C.push(Promise.resolve().then(async()=>[oe,pe,xe,await z1(g,{project:o,workspace:oe,cache:n,target:pe,fixed:u,modifier:p,strategies:h})])),J=!0}}J||w.push(_)}if(w.length>1)throw new ot(`Patterns ${ye.prettyList(r,w,ye.Type.CODE)} don't match any packages referenced by any workspace`);if(w.length>0)throw new ot(`Pattern ${ye.prettyList(r,w,ye.Type.CODE)} doesn't match any packages referenced by any workspace`);let v=await Promise.all(C),b=await pA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async _=>{for(let[,,J,{suggestions:re,rejections:oe}]of v){let pe=re.filter(he=>he.descriptor!==null);if(pe.length===0){let[he]=oe;if(typeof he>"u")throw new Error("Assertion failed: Expected an error to have been set");let ve=this.cli.error(he);o.configuration.get("enableNetwork")?_.reportError(27,`${Y.prettyDescriptor(r,J)} can't be resolved to a satisfying range
|
||||||
|
|
||||||
|
${ve}`):_.reportError(27,`${Y.prettyDescriptor(r,J)} can't be resolved to a satisfying range (note: network resolution has been disabled)
|
||||||
|
|
||||||
|
${ve}`)}else pe.length>1&&!A&&_.reportError(27,`${Y.prettyDescriptor(r,J)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(b.hasErrors())return b.exitCode();let E=!1,R=[];for(let[_,J,,{suggestions:re}]of v){let oe,pe=re.filter(le=>le.descriptor!==null),he=pe[0].descriptor,ve=pe.every(le=>Y.areDescriptorsEqual(le.descriptor,he));pe.length===1||ve?oe=he:(E=!0,{answer:oe}=await(0,xde.prompt)({type:"select",name:"answer",message:`Which range do you want to use in ${Y.prettyWorkspace(r,_)} \u276F ${J}?`,choices:re.map(({descriptor:le,name:xe,reason:g})=>le?{name:xe,hint:g,descriptor:le}:{name:xe,hint:g,disabled:!0}),onCancel:()=>process.exit(130),result(le){return this.find(le,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let ge=_.manifest[J].get(oe.identHash);if(typeof ge>"u")throw new Error("Assertion failed: This descriptor should have a matching entry");if(ge.descriptorHash!==oe.descriptorHash)_.manifest[J].set(oe.identHash,oe),R.push([_,J,ge,oe]);else{let le=r.makeResolver(),xe={project:o,resolver:le},g=r.normalizeDependency(ge),De=le.bindDescriptor(g,_.anchoredLocator,xe);o.forgetResolution(De)}}return await r.triggerMultipleHooks(_=>_.afterWorkspaceDependencyReplacement,R),E&&this.context.stdout.write(`
|
||||||
|
`),(await Ct.start({configuration:r,stdout:this.context.stdout},async _=>{await o.install({cache:n,report:_,mode:this.mode})})).exitCode()}};Kf.paths=[["up"]],Kf.usage=it.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` will upgrade all workspaces at the same time.\n\n This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\n ",examples:[["Upgrade all instances of lodash to the latest release","$0 up lodash"],["Upgrade all instances of lodash to the latest release, but ask confirmation for each","$0 up lodash -i"],["Upgrade all instances of lodash to 1.2.3","$0 up lodash@1.2.3"],["Upgrade all instances of packages with the `@babel` scope to the latest release","$0 up '@babel/*'"],["Upgrade all instances of packages containing the word `jest` to the latest release","$0 up '*jest*'"],["Upgrade all instances of packages with the `@babel` scope to 7.0.0","$0 up '@babel/*@7.0.0'"]]}),Kf.schema=[_T("recursive",zg.Forbids,["interactive","exact","tilde","caret"],{ignore:[void 0,!1]})];Ke();Ke();Ke();_t();var th=class extends ct{constructor(){super(...arguments);this.recursive=fe.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=fe.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new er(o.cwd,this.context.cwd);await o.restoreInstallState();let n=Y.parseIdent(this.package).identHash,u=this.recursive?mht(o,n,{configuration:r,peers:this.peers}):dht(o,n,{configuration:r,peers:this.peers});Xo.emitTree(u,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1})}};th.paths=[["why"]],th.usage=it.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"]]});function dht(t,e,{configuration:r,peers:o}){let a=Ye.sortMap(t.storedPackages.values(),A=>Y.stringifyLocator(A)),n={},u={children:n};for(let A of a){let p={};for(let C of A.dependencies.values()){if(!o&&A.peerDependencies.has(C.identHash))continue;let w=t.storedResolutions.get(C.descriptorHash);if(!w)throw new Error("Assertion failed: The resolution should have been registered");let v=t.storedPackages.get(w);if(!v)throw new Error("Assertion failed: The package should have been registered");if(v.identHash!==e)continue;{let E=Y.stringifyLocator(A);n[E]={value:[A,ye.Type.LOCATOR],children:p}}let b=Y.stringifyLocator(v);p[b]={value:[{descriptor:C,locator:v},ye.Type.DEPENDENT]}}}return u}function mht(t,e,{configuration:r,peers:o}){let a=Ye.sortMap(t.workspaces,v=>Y.stringifyLocator(v.anchoredLocator)),n=new Set,u=new Set,A=v=>{if(n.has(v.locatorHash))return u.has(v.locatorHash);if(n.add(v.locatorHash),v.identHash===e)return u.add(v.locatorHash),!0;let b=!1;v.identHash===e&&(b=!0);for(let E of v.dependencies.values()){if(!o&&v.peerDependencies.has(E.identHash))continue;let R=t.storedResolutions.get(E.descriptorHash);if(!R)throw new Error("Assertion failed: The resolution should have been registered");let N=t.storedPackages.get(R);if(!N)throw new Error("Assertion failed: The package should have been registered");A(N)&&(b=!0)}return b&&u.add(v.locatorHash),b};for(let v of a)A(v.anchoredPackage);let p=new Set,h={},C={children:h},w=(v,b,E)=>{if(!u.has(v.locatorHash))return;let R=E!==null?ye.tuple(ye.Type.DEPENDENT,{locator:v,descriptor:E}):ye.tuple(ye.Type.LOCATOR,v),N={},_={value:R,children:N},J=Y.stringifyLocator(v);if(b[J]=_,!p.has(v.locatorHash)&&(p.add(v.locatorHash),!(E!==null&&t.tryWorkspaceByLocator(v))))for(let re of v.dependencies.values()){if(!o&&v.peerDependencies.has(re.identHash))continue;let oe=t.storedResolutions.get(re.descriptorHash);if(!oe)throw new Error("Assertion failed: The resolution should have been registered");let pe=t.storedPackages.get(oe);if(!pe)throw new Error("Assertion failed: The package should have been registered");w(pe,N,re)}};for(let v of a)w(v.anchoredPackage,h,null);return C}Ke();var Z8={};Yt(Z8,{GitFetcher:()=>r2,GitResolver:()=>n2,default:()=>Oht,gitUtils:()=>Zo});Ke();bt();var Zo={};Yt(Zo,{TreeishProtocols:()=>t2,clone:()=>X8,fetchBase:()=>Vde,fetchChangedFiles:()=>zde,fetchChangedWorkspaces:()=>Lht,fetchRoot:()=>Jde,isGitUrl:()=>AC,lsRemote:()=>Kde,normalizeLocator:()=>J8,normalizeRepoUrl:()=>tQ,resolveUrl:()=>z8,splitRepoUrl:()=>rh,validateRepoUrl:()=>V8});Ke();bt();_t();var Gde=tt(Hde()),Wde=tt(IU()),uC=tt(Ie("querystring")),Y8=tt(ii());function W8(t,e,r){let o=t.indexOf(r);return t.lastIndexOf(e,o>-1?o:1/0)}function qde(t){try{return new URL(t)}catch{return}}function Rht(t){let e=W8(t,"@","#"),r=W8(t,":","#");return r>e&&(t=`${t.slice(0,r)}/${t.slice(r+1)}`),W8(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`ssh://${t}`),t}function jde(t){return qde(t)||qde(Rht(t))}function Yde(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`}}var Tht=[/^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\/(.+)?$/],t2=(a=>(a.Commit="commit",a.Head="head",a.Tag="tag",a.Semver="semver",a))(t2||{});function AC(t){return t?Tht.some(e=>!!t.match(e)):!1}function rh(t){t=tQ(t);let e=t.indexOf("#");if(e===-1)return{repo:t,treeish:{protocol:"head",request:"HEAD"},extra:{}};let r=t.slice(0,e),o=t.slice(e+1);if(o.match(/^[a-z]+=/)){let a=uC.default.parse(o);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(t2).find(p=>Object.prototype.hasOwnProperty.call(a,p)),[u,A]=typeof n<"u"?[n,a[n]]:["head","HEAD"];for(let p of Object.values(t2))delete a[p];return{repo:r,treeish:{protocol:u,request:A},extra:a}}else{let a=o.indexOf(":"),[n,u]=a===-1?[null,o]:[o.slice(0,a),o.slice(a+1)];return{repo:r,treeish:{protocol:n,request:u},extra:{}}}}function tQ(t,{git:e=!1}={}){if(t=t.replace(/^git\+https:/,"https:"),t=t.replace(/^(?:github:|https:\/\/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=jde(t);r&&(t=r.href),t=t.replace(/^git\+([^:]+):/,"$1:")}return t}function J8(t){return Y.makeLocator(t,tQ(t.reference))}function V8(t,{configuration:e}){let r=tQ(t,{git:!0});if(!ln.getNetworkSettings(`https://${(0,Gde.default)(r).resource}`,{
Line truncated
|
||||||
|
- ${p.join(`
|
||||||
|
- `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:A.cwd})}};ih.paths=[["workspace"]],ih.usage=it.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:`
|
||||||
|
This command will run a given sub-command on a single workspace.
|
||||||
|
`,examples:[["Add a package to a single workspace","yarn workspace components add -D react"],["Run build script on a single workspace","yarn workspace components run build"]]});var Mht={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:"BOOLEAN",default:Xde.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:[b0,Q0,k0,F0,$0,W0,O0,nh,Kd,Jd,cC,Vd,x0,P0,R0,T0,L0,N0,M0,U0,_0,H0,eh,q0,j0,K0,Y0,J0,G0,V0,z0,X0,Xd,Z0,Kf,th,ih]},Uht=Mht;var iH={};Yt(iH,{default:()=>Hht});Ke();var Qt={optional:!0},eH=[["@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-u
Line 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, _, _).'"]]});function Agt(t){return typeof t!="string"?`${t}`:t.match(/^[a-zA-Z][a-zA-Z0-9_]+$/)?t:`'${t}'`}function fgt(t,e){let r=t===0,o=t===e-1;return r&&o?"":r?"\u250C ":o?"\u2514 ":"\u2502 "}Ke();_t();var uh=class extends ct{constructor(){super(...arguments);this.verbose=fe.Boolean("-v,--verbose",!1,{description:"Also print the fact database automatically compiled from the workspace manifests"})}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(A2(),u2)),o=await Xe.find(this.context.cwd,this.context.plugins),{project:a}=await St.find(o,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};uh.paths=[["constraints","source"]],uh.usage=it.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"]]});Ke();Ke();_t();o2();var Ah=class extends ct{constructor(){super(...arguments);this.fix=fe.Boolean("--fix",!1,{description:"Attempt to automatically fix unambiguous issues, following a multi-pass process"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd),a=await o.loadUserConfig(),n;if(a!=null&&a.constraints)n=new fC(o);else{let{Constraints:h}=await Promise.resolve().then(()=>(A2(),u2));n=await h.find(o)}let u={children:[]},A=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let C=await n.process();if(!C)break;let{changedWorkspaces:w,remainingErrors:v}=rQ(o,C,{fix:this.fix}),b=[];for(let[E,R]of w){let N=E.manifest.indent;E.manifest=new Lt,E.manifest.indent=N,E.manifest.load(R),b.push(E.persistManifest())}if(!(w.size>0&&h>1)){A=!1,p=!0;for(let[E,R]of v){let N=[];for(let J of R){let re=J.text.split(/\n/);J.fixable?(re[0]=`${ye.pretty(r,"\u2699","gray")} ${re[0]}`,A=!0):p=!1,N.push({value:ye.tuple(ye.Type.NO_HINT,re[0]),children:re.slice(1).map(oe=>({value:ye.tuple(ye.Type.NO_HINT,oe)}))})}let _={value:ye.tuple(ye.Type.LOCATOR,E.anchoredLocator),children:Ye.sortMap(N,J=>J.value[1])};u.children.push(_)}}}if(u.children.length===0)return 0;if(A){let h=p?`Those errors can all be fixed by running ${ye.pretty(r,"yarn constraints --fix",ye.Type.CODE)}`:`Errors prefixed by '\u2699' can be fixed by running ${ye.pretty(r,"yarn constraints --fix",ye.Type.CODE)}`;await Ct.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async C=>{C.reportInfo(0,h),C.reportSeparator()})}return u.children=Ye.sortMap(u.children,h=>h.value[1]),Xo.emitTree(u,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};Ah.paths=[["constraints"]],Ah.usage=it.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"]]});o2();var pgt={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:[ch,uh,Ah],hooks:{async validateProject(t,{reportError:e}){if(!t.configuration.get("enableConstraintsChecks"))return;let r=await t.loadUserConfig(),o;if(r!=null&&r.constraints)o=new fC(t);else{let{Constraints:u}=await Promise.resolve().then(()=>(A2(),u2));o=await u.find(t)}let a=await o.process();if(!a)return;let{remainingErrors:n}=rQ(t,a);n.size!==0&&e(84,`Constraint check failed; run ${ye.pretty(t.configuration,"yarn constraints",ye.Type.CODE)} for more details`)}}},hgt=pgt;var wH={};Yt(wH,{CreateCommand:()=>tm,DlxCommand:()=>fh,default:()=>dgt});Ke();_t();var tm=class extends ct{constructor(){super(...arguments);this.pkg=fe.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=fe.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=fe.String();this.args=fe.Proxy()}async execute(){let r=[];this.pkg&&r.push("--package",this.pkg),this.quiet&&r.push("--quiet");let o=this.command.replace(/^(@[^@/]+)(@|$)/,"$1/create$2"),a=Y.parseDescriptor(o),n=a.name.match(/^create(-|$)/)?a:a.scope?Y.makeIdent(a.scope,`create-${a.name}`):Y.makeIdent(null,`create-${a.name}`),u=Y.stringifyIdent(n);return a.range!=="unknown"&&(u+=`@${a.range}`),this.cli.run(["dlx",...r,u,...this.args])}};tm.paths=[["create"]];Ke();Ke();bt();_t();var fh=class extends ct{constructor(){super(...arguments);this.packages=fe.Array("-p,--package",{description:"The package(s) to install before running the command"});this.quiet=fe.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=fe.String();this.args=fe.Proxy()}async execute(){return Xe.telemetry=null,await ae.mktempPromise(async r=>{let o=V.join(r,`dlx-${process.pid}`);await ae.mkdirPromise(o),await ae.writeFilePromise(V.join(o,"package.json"),`{}
|
||||||
|
`),await ae.writeFilePromise(V.join(o,"yarn.lock"),"");let a=V.join(o,".yarnrc.yml"),n=await Xe.findProjectCwd(this.context.cwd,Nr.lockfile),A={enableGlobalCache:!(await Xe.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),enableTelemetry:!1,logFilters:[{code:Ju(68),level:ye.LogLevel.Discard}]},p=n!==null?V.join(n,".yarnrc.yml"):null;p!==null&&ae.existsSync(p)?(await ae.copyFilePromise(p,a),await Xe.updateConfiguration(o,N=>{let _=Ye.toMerged(N,A);return Array.isArray(N.plugins)&&(_.plugins=N.plugins.map(J=>{let re=typeof J=="string"?J:J.path,oe=Ae.isAbsolute(re)?re:Ae.resolve(Ae.fromPortablePath(n),re);return typeof J=="string"?oe:{path:oe,spec:J.spec}})),_})):await ae.writeJsonPromise(a,A);let h=this.packages??[this.command],C=Y.parseDescriptor(this.command).name,w=await this.cli.run(["add","--fixed","--",...h],{cwd:o,quiet:this.quiet});if(w!==0)return w;this.quiet||this.context.stdout.write(`
|
||||||
|
`);let v=await Xe.find(o,this.context.plugins),{project:b,workspace:E}=await St.find(v,o);if(E===null)throw new er(b.cwd,o);await b.restoreInstallState();let R=await sn.getWorkspaceAccessibleBinaries(E);return R.has(C)===!1&&R.size===1&&typeof this.packages>"u"&&(C=Array.from(R)[0][0]),await sn.executeWorkspaceAccessibleBinary(E,C,this.args,{packageAccessibleBinaries:R,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};fh.paths=[["dlx"]],fh.usage=it.Usage({description:"run a package in a temporary environment",details:"\n This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\n\n By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\n\n Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-react-app to create a new React app","yarn dlx create-react-app ./my-app"],["Install multiple packages for a single command",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e "console.log('hello!')"`]]});var ggt={commands:[tm,fh]},dgt=ggt;var DH={};Yt(DH,{ExecFetcher:()=>p2,ExecResolver:()=>h2,default:()=>Egt,execUtils:()=>oQ});Ke();Ke();bt();var hA="exec:";var oQ={};Yt(oQ,{loadGeneratorFile:()=>f2,makeLocator:()=>vH,makeSpec:()=>Rme,parseSpec:()=>BH});Ke();bt();function BH(t){let{params:e,selector:r}=Y.parseRange(t),o=Ae.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?Y.parseLocator(e.locator):null,path:o}}function Rme({parentLocator:t,path:e,generatorHash:r,protocol:o}){let a=t!==null?{locator:Y.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return Y.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function vH(t,{parentLocator:e,path:r,generatorHash:o,protocol:a}){return Y.makeLocator(t,Rme({parentLocator:e,path:r,generatorHash:o,protocol:a}))}async function f2(t,e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(t,{protocol:e}),n=V.isAbsolute(a)?{packageFs:new An(wt.root),prefixPath:wt.dot,localPath:wt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new An(wt.root),prefixPath:V.relative(wt.root,n.localPath)}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=V.join(u.prefixPath,a);return await A.readFilePromise(p,"utf8")}var p2=class{supports(e,r){return!!e.reference.startsWith(hA)}getLocalPath(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:hA});if(V.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:V.resolve(n,a)}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:Y.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async fetchFromDisk(e,r){let o=await f2(e.reference,hA,r);return ae.mktempPromise(async a=>{let n=V.join(a,"generator.js");return await ae.writeFilePromise(n,o),ae.mktempPromise(async u=>{if(await this.generatePackage(u,e,n,r),!ae.existsSync(V.join(u,"build")))throw new Error("The script should have generated a build directory");return await Vi.makeArchiveFromDirectory(V.join(u,"build"),{prefixPath:Y.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(e,r,o,a){return await ae.mktempPromise(async n=>{let u=await sn.makeScriptEnv({project:a.project,binFolder:n}),A=V.join(e,"runtime.js");return await ae.mktempPromise(async p=>{let h=V.join(p,"buildfile.log"),C=V.join(e,"generator"),w=V.join(e,"build");await ae.mkdirPromise(C),await ae.mkdirPromise(w);let v={tempDir:Ae.fromPortablePath(C),buildDir:Ae.fromPortablePath(w),locator:Y.stringifyLocator(r)};await ae.writeFilePromise(A,`
|
||||||
|
// 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(v)},
|
||||||
|
},
|
||||||
|
enumerable: true,
|
||||||
|
});
|
||||||
|
`);let b=u.NODE_OPTIONS||"",E=/\s*--require\s+\S*\.pnp\.c?js\s*/g;b=b.replace(E," ").trim(),u.NODE_OPTIONS=b;let{stdout:R,stderr:N}=a.project.configuration.getSubprocessStreams(h,{header:`# This file contains the result of Yarn generating a package (${Y.stringifyLocator(r)})
|
||||||
|
`,prefix:Y.prettyLocator(a.project.configuration,r),report:a.report}),{code:_}=await Mr.pipevp(process.execPath,["--require",Ae.fromPortablePath(A),Ae.fromPortablePath(o),Y.stringifyIdent(r)],{cwd:e,env:u,stdin:null,stdout:R,stderr:N});if(_!==0)throw ae.detachTemp(p),new Error(`Package generation failed (exit code ${_}, logs can be found here: ${ye.pretty(a.project.configuration,h,ye.Type.PATH)})`)})})}};Ke();Ke();var mgt=2,h2=class{supportsDescriptor(e,r){return!!e.range.startsWith(hA)}supportsLocator(e,r){return!!e.reference.startsWith(hA)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return Y.bindDescriptor(e,{locator:Y.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=BH(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let u=await f2(Y.makeRange({protocol:hA,source:a,selector:a,params:{locator:Y.stringifyLocator(n)}}),hA,o.fetchOptions),A=bn.makeHash(`${mgt}`,u).slice(0,6);return[vH(e,{parentLocator:n,path:a,generatorHash:A,protocol:hA})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.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 o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await Ye.releaseAfterUseAsync(async()=>await Lt.find(o.prefixPath,{baseFs:o.packageFs}),o.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 ygt={fetchers:[p2],resolvers:[h2]},Egt=ygt;var xH={};Yt(xH,{FileFetcher:()=>y2,FileResolver:()=>E2,TarballFileFetcher:()=>C2,TarballFileResolver:()=>I2,default:()=>wgt,fileUtils:()=>rm});Ke();bt();var dC=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,g2=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,Mi="file:";var rm={};Yt(rm,{fetchArchiveFromLocator:()=>m2,makeArchiveFromLocator:()=>aQ,makeBufferFromLocator:()=>SH,makeLocator:()=>mC,makeSpec:()=>Tme,parseSpec:()=>d2});Ke();bt();function d2(t){let{params:e,selector:r}=Y.parseRange(t),o=Ae.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?Y.parseLocator(e.locator):null,path:o}}function Tme({parentLocator:t,path:e,hash:r,protocol:o}){let a=t!==null?{locator:Y.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return Y.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function mC(t,{parentLocator:e,path:r,hash:o,protocol:a}){return Y.makeLocator(t,Tme({parentLocator:e,path:r,hash:o,protocol:a}))}async function m2(t,e){let{parentLocator:r,path:o}=Y.parseFileStyleRange(t.reference,{protocol:Mi}),a=V.isAbsolute(o)?{packageFs:new An(wt.root),prefixPath:wt.dot,localPath:wt.root}:await e.fetcher.fetch(r,e),n=a.localPath?{packageFs:new An(wt.root),prefixPath:V.relative(wt.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let u=n.packageFs,A=V.join(n.prefixPath,o);return await Ye.releaseAfterUseAsync(async()=>await u.readFilePromise(A),n.releaseFs)}async function aQ(t,{protocol:e,fetchOptions:r,inMemory:o=!1}){let{parentLocator:a,path:n}=Y.parseFileStyleRange(t.reference,{protocol:e}),u=V.isAbsolute(n)?{packageFs:new An(wt.root),prefixPath:wt.dot,localPath:wt.root}:await r.fetcher.fetch(a,r),A=u.localPath?{packageFs:new An(wt.root),prefixPath:V.relative(wt.root,u.localPath)}:u;u!==A&&u.releaseFs&&u.releaseFs();let p=A.packageFs,h=V.join(A.prefixPath,n);return await Ye.releaseAfterUseAsync(async()=>await Vi.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:Y.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:o}),A.releaseFs)}async function SH(t,{protocol:e,fetchOptions:r}){return(await aQ(t,{protocol:e,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var y2=class{supports(e,r){return!!e.reference.startsWith(Mi)}getLocalPath(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:Mi});if(V.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:V.resolve(n,a)}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${Y.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:Y.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async fetchFromDisk(e,r){return aQ(e,{protocol:Mi,fetchOptions:r})}};Ke();Ke();var Cgt=2,E2=c
Line truncated
|
||||||
|
`,{automaticNewlines:!0});let h=[p],C=V.join(this.context.cwd,"README.md");if(ae.existsSync(C)||(await ae.writeFilePromise(C,`# ${Y.stringifyIdent(n.name)}
|
||||||
|
`),h.push(C)),!o||o.cwd===this.context.cwd){let w=V.join(this.context.cwd,Nr.lockfile);ae.existsSync(w)||(await ae.writeFilePromise(w,""),h.push(w));let b=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# 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/zero-installs","","#!.yarn/cache",".pnp.*"].map(pe=>`${pe}
|
||||||
|
`).join(""),E=V.join(this.context.cwd,".gitignore");ae.existsSync(E)||(await ae.writeFilePromise(E,b),h.push(E));let N=["/.yarn/** linguist-vendored","/.yarn/releases/* binary","/.yarn/plugins/**/* binary","/.pnp.* binary linguist-generated"].map(pe=>`${pe}
|
||||||
|
`).join(""),_=V.join(this.context.cwd,".gitattributes");ae.existsSync(_)||(await ae.writeFilePromise(_,N),h.push(_));let J={["*"]:{endOfLine:"lf",insertFinalNewline:!0},["*.{js,json,yml}"]:{charset:"utf-8",indentStyle:"space",indentSize:2}};Ye.mergeIntoTarget(J,r.get("initEditorConfig"));let re=`root = true
|
||||||
|
`;for(let[pe,he]of Object.entries(J)){re+=`
|
||||||
|
[${pe}]
|
||||||
|
`;for(let[ve,ge]of Object.entries(he)){let le=ve.replace(/[A-Z]/g,xe=>`_${xe.toLowerCase()}`);re+=`${le} = ${ge}
|
||||||
|
`}}let oe=V.join(this.context.cwd,".editorconfig");ae.existsSync(oe)||(await ae.writeFilePromise(oe,re),h.push(oe)),await this.cli.run(["install"],{quiet:!0}),ae.existsSync(V.join(this.context.cwd,".git"))||(await Mr.execvp("git",["init"],{cwd:this.context.cwd}),await Mr.execvp("git",["add","--",...h],{cwd:this.context.cwd}),await Mr.execvp("git",["commit","--allow-empty","-m","First commit"],{cwd:this.context.cwd}))}}};ph.paths=[["init"]],ph.usage=it.Usage({description:"create a new package",details:"\n This command will setup a new package in your local directory.\n\n If the `-p,--private` or `-w,--workspace` options are set, the package will be private by default.\n\n If the `-w,--workspace` option is set, the package will be configured to accept a set of workspaces in the `packages/` directory.\n\n If the `-i,--install` option is given a value, Yarn will first download it using `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\n\n The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\n ",examples:[["Create a new package in the local directory","yarn init"],["Create a new private package in the local directory","yarn init -p"],["Create a new package and store the Yarn release inside","yarn init -i=latest"],["Create a new private package and defines it as a workspace root","yarn init -w"]]});var xgt={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:[ph]},Pgt=xgt;var T6={};Yt(T6,{SearchCommand:()=>yh,UpgradeInteractiveCommand:()=>Ch,default:()=>dIt});Ke();var Mme=tt(Ie("os"));function yC({stdout:t}){if(Mme.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")}_t();var zye=tt(zH()),XH={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},Dmt=(0,zye.default)(XH.appId,XH.apiKey).initIndex(XH.indexName),ZH=async(t,e=0)=>await Dmt.search(t,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:e,hitsPerPage:10});var DB=["regular","dev","peer"],yh=class extends ct{async execute(){yC(this.context);let{Gem:e}=await Promise.resolve().then(()=>(zQ(),B6)),{ScrollableItems:r}=await Promise.resolve().then(()=>(ek(),$Q)),{useKeypress:o}=await Promise.resolve().then(()=>(wB(),Awe)),{useMinistore:a}=await Promise.resolve().then(()=>(b6(),P6)),{renderForm:n}=await Promise.resolve().then(()=>(ik(),nk)),{default:u}=await Promise.resolve().then(()=>tt(Iwe())),{Box:A,Text:p}=await Promise.resolve().then(()=>tt(ac())),{default:h,useEffect:C,useState:w}=await Promise.resolve().then(()=>tt(en())),v=await Xe.find(this.context.cwd,this.context.plugins),b=()=>h.createElement(A,{flexDirection:"row"},h.createElement(A,{flexDirection:"column",width:48},h.createElement(A,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(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," to select a package.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<space>")," again to change the target."))),h.createElement(A,{flexDirection:"column"},h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to install the selected packages.")),h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),E=()=>h.createElement(h.Fragment,null,h.createElement(A,{width:15},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Owner")),h.createElement(A,{width:11},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Version")),h.createElement(A,{width:10},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Downloads"))),R=()=>h.createElement(A,{width:17},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Target")),N=({hit:ge,active:le})=>{let[xe,g]=a(ge.name,null);o({active:le},(de,ne)=>{if(ne.name!
Line truncated
|
||||||
|
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"]]});Ke();_t();m_();var Pwe=tt(ii()),xwe=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/,bwe=(t,e)=>t.length>0?[t.slice(0,e)].concat(bwe(t.slice(e),e)):[],Ch=class extends ct{async execute(){yC(this.context);let{ItemOptions:e}=await Promise.resolve().then(()=>(Swe(),Dwe)),{Pad:r}=await Promise.resolve().then(()=>(R6(),vwe)),{ScrollableItems:o}=await Promise.resolve().then(()=>(ek(),$Q)),{useMinistore:a}=await Promise.resolve().then(()=>(b6(),P6)),{renderForm:n}=await Promise.resolve().then(()=>(ik(),nk)),{Box:u,Text:A}=await Promise.resolve().then(()=>tt(ac())),{default:p,useEffect:h,useRef:C,useState:w}=await Promise.resolve().then(()=>tt(en())),v=await Xe.find(this.context.cwd,this.context.plugins),{project:b,workspace:E}=await St.find(v,this.context.cwd),R=await Ur.find(v);if(!E)throw new er(b.cwd,this.context.cwd);await b.restoreInstallState({restoreResolutions:!1});let N=this.context.stdout.rows-7,_=(Ee,de)=>{let ne=xpe(Ee,de),Z="";for(let me of ne)me.added?Z+=ye.pretty(v,me.value,"green"):me.removed||(Z+=me.value);return Z},J=(Ee,de)=>{if(Ee===de)return de;let ne=Y.parseRange(Ee),Z=Y.parseRange(de),me=ne.selector.match(xwe),be=Z.selector.match(xwe);if(!me||!be)return _(Ee,de);let ut=["gray","red","yellow","green","magenta"],H=null,yt="";for(let Me=1;Me<ut.length;++Me)H!==null||me[Me]!==be[Me]?(H===null&&(H=ut[Me-1]),yt+=ye.pretty(v,be[Me],H)):yt+=be[Me];return yt},re=async(Ee,de,ne)=>{let Z=await $c.fetchDescriptorFrom(Ee,ne,{project:b,cache:R,preserveModifier:de,workspace:E});return Z!==null?Z.range:Ee.range},oe=async Ee=>{let de=Pwe.default.valid(Ee.range)?`^${Ee.range}`:Ee.range,[ne,Z]=await Promise.all([re(Ee,Ee.range,de).catch(()=>null),re(Ee,Ee.range,"latest").catch(()=>null)]),me=[{value:null,label:Ee.range}];return ne&&ne!==Ee.range?me.push({value:ne,label:J(Ee.range,ne)}):me.push({value:null,label:""}),Z&&Z!==ne&&Z!==Ee.range?me.push({value:Z,label:J(Ee.range,Z)}):me.push({value:null,label:""}),me},pe=()=>p.createElement(u,{flexDirection:"row"},p.createElement(u,{flexDirection:"column",width:49},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<up>"),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"<down>")," to select packages.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<left>"),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"<right>")," to select versions."))),p.createElement(u,{flexDirection:"column"},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<enter>")," to install.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),he=()=>p.createElement(u,{flexDirection:"row",paddingTop:1,paddingBottom:1},p.createElement(u,{width:50},p.createElement(A,{bold:!0},p.createElement(A,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Current")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Range")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Latest"))),ve=({active:Ee,descriptor:de,suggestions:ne})=>{let[Z,me]=a(de.descriptorHash,null),be=Y.stringifyIdent(de),ut=Math.max(0,45-be.length);return p.createElement(p.Fragment,null,p.createElement(u,null,p.createElement(u,{width:45},p.createElement(A,{bold:!0},Y.prettyIdent(v,de)),p.createElement(r,{active:Ee,length:ut})),p.createElement(e,{active:Ee,options:ne,value:Z,skewer:!0,onChange:me,sizes:[17,17,17]})))},ge=({dependencies:Ee})=>{let[de,ne]=w(Ee.map(()=>null)),Z=C(!0),me=async be=>{let ut=await oe(be);return ut.filter(H=>H.label!=="").length<=1?null:{descriptor:be,suggestions:ut}};return h(()=>()=>{Z.current=!1},[]),h(()=>{let be=Math.trunc(N*1.75),ut=Ee.slice(0,be),H=Ee.slice(be),yt=bwe(H,N),Me=ut.map(me).reduce(async(Te,Qe)=>{await Te;let Ue=await Qe;Ue!==null&&(!Z.current||ne(je=>{let At=je.findIndex(P=>P===null),Ne=[...je];return Ne[At]=Ue,Ne}))},Promise.resolve());yt.reduce((Te,Qe)=>Promise.all(Qe.map(Ue=>Promise.resolve().then(()=>me(Ue)))).then(async Ue=>{Ue=Ue.filter(je=>je!==null),await Te,Z.current&&ne(je=>{let At=je.findIndex(Ne=>Ne===null);return je.slice(0,At).concat(Ue).concat(je.slice(At+Ue.length))})}),Me).then(()=>{Z.current&&ne(Te=>Te.filter(Qe=>Qe!==null))})},[]),de.length?p.createElement(o,{radius:N>>1,children:de.map((be,ut)=>be!==null?p.createElement(ve,{key:ut,active:!1,descriptor:be.descriptor,suggestions:be.suggestions}):p.createElement(A,{key:ut},"Loading..."))}):p.createElement(A,null,"No upgrades found")},xe=await n(({useSubmit:Ee})=>{Ee(a());let de=new Map;for(let Z of b.workspaces)for(let me of["dependencies","devDependencies"])for(let be of Z.manifest[me].values())b.tryWorkspaceByDe
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"]]});var gIt={commands:[yh,Ch]},dIt=gIt;var L6={};Yt(L6,{LinkFetcher:()=>xB,LinkResolver:()=>PB,PortalFetcher:()=>bB,PortalResolver:()=>QB,default:()=>yIt});Ke();bt();var $f="portal:",ep="link:";var xB=class{supports(e,r){return!!e.reference.startsWith(ep)}getLocalPath(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:ep});if(V.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:V.resolve(n,a)}async fetch(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:ep}),n=V.isAbsolute(a)?{packageFs:new An(wt.root),prefixPath:wt.dot,localPath:wt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new An(wt.root),prefixPath:V.relative(wt.root,n.localPath),localPath:wt.root}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=V.resolve(u.localPath??u.packageFs.getRealPath(),u.prefixPath,a);return n.localPath?{packageFs:new An(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:wt.dot,discardFromLookup:!0,localPath:p}:{packageFs:new Gu(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:wt.dot,discardFromLookup:!0}}};Ke();bt();var PB=class{supportsDescriptor(e,r){return!!e.range.startsWith(ep)}supportsLocator(e,r){return!!e.reference.startsWith(ep)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return Y.bindDescriptor(e,{locator:Y.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=e.range.slice(ep.length);return[Y.makeLocator(e,`${ep}${Ae.toPortablePath(a)}`)]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){return{...e,version:"0.0.0",languageName:r.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:null,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map}}};Ke();bt();var bB=class{supports(e,r){return!!e.reference.startsWith($f)}getLocalPath(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:$f});if(V.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:V.resolve(n,a)}async fetch(e,r){let{parentLocator:o,path:a}=Y.parseFileStyleRange(e.reference,{protocol:$f}),n=V.isAbsolute(a)?{packageFs:new An(wt.root),prefixPath:wt.dot,localPath:wt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new An(wt.root),prefixPath:V.relative(wt.root,n.localPath),localPath:wt.root}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=V.resolve(u.localPath??u.packageFs.getRealPath(),u.prefixPath,a);return n.localPath?{packageFs:new An(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:wt.dot,localPath:p}:{packageFs:new Gu(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:wt.dot}}};Ke();Ke();bt();var QB=class{supportsDescriptor(e,r){return!!e.range.startsWith($f)}supportsLocator(e,r){return!!e.reference.startsWith($f)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return Y.bindDescriptor(e,{locator:Y.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=e.range.slice($f.length);return[Y.makeLocator(e,`${$f}${Ae.toPortablePath(a)}`)]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.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 o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await Ye.releaseAfterUseAsync(async()=>await Lt.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var mIt={fetchers:[xB,bB],resolvers:[PB,QB]},yIt=mIt;var gj={};Yt(gj,{NodeModulesLinker:()=>GB,NodeModulesMode:()=>Aj,PnpLooseLinker:()=>WB,default:()=>Lwt});bt();Ke();bt();bt();var O6=(t,e)=>`${t}@${e}`,Qwe=(t,e)=>{let r=e.indexOf("#"),o=r>=0?e.substring(r+1):e;return O6(t,o)};var Rwe=(t,e={})=>{let r=e.debugLevel||Number(process.env.NM_DEBUG_LEVEL||-1),o=e.check||r>=9,a=e.hoistingLimits||new Map,n={check:o,debugLevel:r,hoistingLimits:a,fastLookupPossible:!0},u;n.debugLevel>=0&&(u=Date.now());let A=DIt(t,n),p=!1,h=0;do p=M6(A,[A],new Set([A.locator]),new Map,n).anotherRoundNeeded,n.fastLookupPossible=!1,h++;while(p);if(n.debugLevel>=0&&console.log(`hoist time: ${Date.now()-u}ms, rounds: ${h}`),n.debugLevel>=1){let C=kB(A);if(M6(A,[A],new Set([A.locator]),new Map,n).isGraphChanged)throw new Error(`The hoisting result is not terminal, prev tree:
|
||||||
|
${C}, next tree:
|
||||||
|
${kB(A)}`);let v=Twe(A);if(v)throw new Error(`${v}, after hoisting finished:
|
||||||
|
${kB(A)}`)}return n.debugLevel>=2&&console.log(kB(A)),SIt(A)},EIt=t=>{let e=t[t.length-1],r=new Map,o=new Set,a=n=>{if(!o.has(n)){o.add(n);for(let u of n.hoistedDependencies.values())r.set(u.name,u);for(let u of n.dependencies.values())n.peerNames.has(u.name)||a(u)}};return a(e),r},CIt=t=>{let e=t[t.length-1],r=new Map,o=new Set,a=new Set,n=(u,A)=>{if(o.has(u))return;o.add(u);for(let h of u.hoistedDependencies.values())if(!A.has(h.name)){let C;for(let w of t)C=w.dependencies.get(h.name),C&&r.set(C.name,C)}let p=new Set;for(let h of u.dependencies.values())p.add(h.name);for(let h of u.dependencies.values())u.peerNames.has(h.name)||n(h,p)};return n(e,a),r},kwe=(t,e)=>{if(e.decoupled)return e;let{name:r,references:o,ident:a,locator:n,dependencies:u,originalDependencies:A,hoistedDependencies:p,peerNames:h,reasons:C,isHoistBorder:w,hoistPriority:v,dependencyKind:b,hoistedFrom:E,hoistedTo:R}=e,N={name:r,references:new Set(o),ident:a,locator:n,dependencies:new Map(u),originalDependencies:new Map(A),hoistedDependencies:new Map(p),peerNames:new Set(h),reasons:new Map(C),decoupled:!0,isHoistBorder:w,hoistPriority:v,dependencyKind:b,hoistedFrom:new Map(E),hoistedTo:new Map(R)},_=N.dependencies.get(r);return _&&_.ident==N.ident&&N.dependencies.set(r,N),t.dependencies.set(N.name,N),N},IIt=(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 o=Array.from(e.keys());o.sort((a,n)=>{let u=e.get(a),A=e.get(n);return A.hoistPriority!==u.hoistPriority?A.hoistPriority-u.hoistPriority:A.peerDependents.size!==u.peerDependents.size?A.peerDependents.size-u.peerDependents.size:A.dependents.size-u.dependents.size});for(let a of o){let n=a.substring(0,a.indexOf("@",1)),u=a.substring(n.length+1);if(!t.peerNames.has(n)){let A=r.get(n);A||(A=[],r.set(n,A)),A.indexOf(u)<0&&A.push(u)}}return r},N6=t=>{let e=new Set,r=(o,a=new Set)=>{if(!a.has(o)){a.add(o);for(let n of o.peerNames)if(!t.peerNames.has(n)){let u=t.dependencies.get(n);u&&!e.has(u)&&r(u,a)}e.add(o)}};for(let o of t.dependencies.values())t.peerNames.has(o.name)||r(o);return e},M6=(t,e,r,o,a,n=new Set)=>{let u=e[e.length-1];if(n.has(u))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(u);let A=xIt(u),p=IIt(u,A),h=t==u?new Map:a.fastLookupPossible?EIt(e):CIt(e),C,w=!1,v=!1,b=new Map(Array.from(p.entries()).map(([R,N])=>[R,N[0]])),E=new Map;do{let R=vIt(t,e,r,h,b,p,o,E,a);R.isGraphChanged&&(v=!0),R.anotherRoundNeeded&&(w=!0),C=!1;for(let[N,_]of p)_.length>1&&!u.dependencies.has(N)&&(b.delete(N),_.shift(),b.set(N,_[0]),C=!0)}while(C);for(let R of u.dependencies.values())if(!u.peerNames.has(R.name)&&!r.has(R.locator)){r.add(R.locator);let N=M6(t,[...e,R],r,E,a);N.isGraphChanged&&(v=!0),N.anotherRoundNeeded&&(w=!0),r.delete(R.locator)}return{anotherRoundNeeded:w,isGraphChanged:v}},wIt=t=>{for(let[e,r]of t.dependencies)if(!t.peerNames.has(e)&&r.ident!==t.ident)return!0;return!1},BIt=(t,e,r,o,a,n,u,A,{outputReason:p,fastLookupPossible:h})=>{let C,w=null,v=new Set;p&&(C=`${Array.from(e).map(N=>eo(N)).join("\u2192")}`);let b=r[r.length-1],R=!(o.ident===b.ident);if(p&&!R&&(w="- self-reference"),R&&(R=o.dependencyKind!==1,p&&!R&&(w="- workspace")),R&&o.dependencyKind===2&&(R=!wIt(o),p&&!R&&(w="- external soft link with unhoisted dependencies")),R&&(R=b.dependencyKind!==1||b.hoistedFrom.has(o.name)||e.size===1,p&&!R&&(w=b.reasons.get(o.name))),R&&(R=!t.peerNames.has(o.name),p&&!R&&(w=`- cannot shadow peer: ${eo(t.originalDependencies.get(o.name).locator)} at ${C}`)),R){let N=!1,_=a.get(o.name);if(N=!_||_.ident===o.ident,p&&!N&&(w=`- filled by: ${eo(_.locator)} at ${C}`),N)for(let J=r.length-1;J>=1;J--){let oe=r[J].dependencies.get(o.name);if(oe&&oe.ident!==o.ident){N=!1;let pe=A.get(b);pe||(pe=new Set,A.set(b,pe)),pe.add(o.name),p&&(w=`- filled by ${eo(oe.locator)} at ${r.slice(0,J).map(he=>eo(he.locator)).join("\u2192")}`);break}}R=N}if(R&&(R=n.get(o.name)===o.ident,p&&!R&&(w=`- filled by: ${eo(u.get(o.name)[0])} at ${C}`)),R){let N=!0,_=new Set(o.peerNames);for(let J=r.length-1;J>=1;J--){let re=r[J];for(let oe of _){if(re.peerNames.has(oe)&&re.originalDependencies.has(oe))continue;let pe=re.dependencies.get(oe);pe&&t.dependencies.get(oe)!==pe&&(J===r.length-1?v.add(pe):(v=null,N=!1,p&&(w=`- peer dependency ${eo(pe.locator)} from parent ${eo(re.locator)} was not hoisted to ${C}`))),_.delete(oe)}if(!N)break}R=N}if(R&&!h)for(let N of o.hoistedDependencies.values()){let _=a.get(N.name)||t.dependencies.get(N.name);if(!_||N.ident!==_.ident){R=!1,p&&(w=`- previously hoisted dependency mismatch, needed: ${eo(N.locator)}, available: ${eo(_==null?void 0:_.locator)}`);break}}return v!==null&&v.size>0?{isHoistable:2,dependsOn:v,reason:w}:{isHoistable:R?0:1,reason:w}},sk=t=>`${t.name}@${t.locator}`,vIt=(t,e,r,o,a,n,u,A,p)=>{let h=e[e.length-1],C=new Set,w=!1,v=!1,b=(_,J,re,oe,pe)=>{if(C.has(oe))return;let he=[...J,sk(oe)],ve=[...re,sk(oe)],ge=new Map,le=new Map;for(let de of N6(oe)){let ne=BIt(h,r,[h,..._,oe],de,o,a,n,
Line truncated
|
||||||
|
${kB(t)}`)}let Ee=N6(oe);for(let de of Ee)if(xe.has(de)){let ne=le.get(de);if((a.get(de.name)===de.ident||!oe.reasons.has(de.name))&&ne.isHoistable!==0&&oe.reasons.set(de.name,ne.reason),!de.isHoistBorder&&ve.indexOf(sk(de))<0){C.add(oe);let me=kwe(oe,de);b([..._,oe],he,ve,me,R),C.delete(oe)}}},E,R=new Set(N6(h)),N=Array.from(e).map(_=>sk(_));do{E=R,R=new Set;for(let _ of E){if(_.locator===h.locator||_.isHoistBorder)continue;let J=kwe(h,_);b([],Array.from(r),N,J,R)}}while(R.size>0);return{anotherRoundNeeded:w,isGraphChanged:v}},Twe=t=>{let e=[],r=new Set,o=new Set,a=(n,u,A)=>{if(r.has(n)||(r.add(n),o.has(n)))return;let p=new Map(u);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 C=p.get(h.name),w=()=>`${Array.from(o).concat([n]).map(v=>eo(v.locator)).join("\u2192")}`;if(n.peerNames.has(h.name)){let v=u.get(h.name);(v!==C||!v||v.ident!==h.ident)&&e.push(`${w()} - broken peer promise: expected ${h.ident} but found ${v&&v.ident}`)}else{let v=A.hoistedFrom.get(n.name),b=n.hoistedTo.get(h.name),E=`${v?` hoisted from ${v.join(", ")}`:""}`,R=`${b?` hoisted to ${b}`:""}`,N=`${w()}${E}`;C?C.ident!==h.ident&&e.push(`${N} - broken require promise for ${h.name}${R}: expected ${h.ident}, but found: ${C.ident}`):e.push(`${N} - broken require promise: no required dependency ${h.name}${R} found`)}}o.add(n);for(let h of n.dependencies.values())n.peerNames.has(h.name)||a(h,p,n);o.delete(n)};return a(t,t.dependencies,t),e.join(`
|
||||||
|
`)},DIt=(t,e)=>{let{identName:r,name:o,reference:a,peerNames:n}=t,u={name:o,references:new Set([a]),locator:O6(r,a),ident:Qwe(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},A=new Map([[t,u]]),p=(h,C)=>{let w=A.get(h),v=!!w;if(!w){let{name:b,identName:E,reference:R,peerNames:N,hoistPriority:_,dependencyKind:J}=h,re=e.hoistingLimits.get(C.locator);w={name:b,references:new Set([R]),locator:O6(E,R),ident:Qwe(E,R),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(N),reasons:new Map,decoupled:!0,isHoistBorder:re?re.has(b):!1,hoistPriority:_||0,dependencyKind:J||0,hoistedFrom:new Map,hoistedTo:new Map},A.set(h,w)}if(C.dependencies.set(h.name,w),C.originalDependencies.set(h.name,w),v){let b=new Set,E=R=>{if(!b.has(R)){b.add(R),R.decoupled=!1;for(let N of R.dependencies.values())R.peerNames.has(N.name)||E(N)}};E(w)}else for(let b of h.dependencies)p(b,w)};for(let h of t.dependencies)p(h,u);return u},U6=t=>t.substring(0,t.indexOf("@",1)),SIt=t=>{let e={name:t.name,identName:U6(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),o=(a,n,u)=>{let A=r.has(a),p;if(n===a)p=u;else{let{name:h,references:C,locator:w}=a;p={name:h,identName:U6(w),references:C,dependencies:new Set}}if(u.dependencies.add(p),!A){r.add(a);for(let h of a.dependencies.values())a.peerNames.has(h.name)||o(h,a,p);r.delete(a)}};for(let a of t.dependencies.values())o(a,t,e);return e},xIt=t=>{let e=new Map,r=new Set([t]),o=u=>`${u.name}@${u.ident}`,a=u=>{let A=o(u),p=e.get(A);return p||(p={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(A,p)),p},n=(u,A)=>{let p=!!r.has(A);if(a(A).dependents.add(u.ident),!p){r.add(A);for(let C of A.dependencies.values()){let w=a(C);w.hoistPriority=Math.max(w.hoistPriority,C.hoistPriority),A.peerNames.has(C.name)?w.peerDependents.add(A.ident):n(A,C)}}};for(let u of t.dependencies.values())t.peerNames.has(u.name)||n(t,u);return e},eo=t=>{if(!t)return"none";let e=t.indexOf("@",1),r=t.substring(0,e);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let o=t.substring(e+1);if(o==="workspace:.")return".";if(o){let a=(o.indexOf("#")>0?o.split("#")[1]:o).replace("npm:","");return o.startsWith("virtual")&&(r=`v:${r}`),a.startsWith("workspace")&&(r=`w:${r}`,a=""),`${r}${a?`@${a}`:""}`}else return`${r}`},Fwe=5e4,kB=t=>{let e=0,r=(a,n,u="")=>{if(e>Fwe||n.has(a))return"";e++;let A=Array.from(a.dependencies.values()).sort((h,C)=>h.name===C.name?0:h.name>C.name?1:-1),p="";n.add(a);for(let h=0;h<A.length;h++){let C=A[h];if(!a.peerNames.has(C.name)&&C!==a){let w=a.reasons.get(C.name),v=U6(C.locator);p+=`${u}${h<A.length-1?"\u251C\u2500":"\u2514\u2500"}${(n.has(C)?">":"")+(v!==C.name?`a:${C.name}:`:"")+eo(C.locator)+(w?` ${w}`:"")}
|
||||||
|
`,p+=r(C,n,`${u}${h<A.length-1?"\u2502 ":" "}`)}}return n.delete(a),p};return r(t,new Set)+(e>Fwe?`
|
||||||
|
Tree is too large, part of the tree has been dunped
|
||||||
|
`:"")};var FB=(o=>(o.WORKSPACES="workspaces",o.DEPENDENCIES="dependencies",o.NONE="none",o))(FB||{}),Lwe="node_modules",hm="$wsroot$";var RB=(t,e)=>{let{packageTree:r,hoistingLimits:o,errors:a,preserveSymlinksRequired:n}=bIt(t,e),u=null;if(a.length===0){let A=Rwe(r,{hoistingLimits:o});u=kIt(t,A,e)}return{tree:u,errors:a,preserveSymlinksRequired:n}},mA=t=>`${t.name}@${t.reference}`,H6=t=>{let e=new Map;for(let[r,o]of t.entries())if(!o.dirList){let a=e.get(o.locator);a||(a={target:o.target,linkType:o.linkType,locations:[],aliases:o.aliases},e.set(o.locator,a)),a.locations.push(r)}for(let r of e.values())r.locations=r.locations.sort((o,a)=>{let n=o.split(V.delimiter).length,u=a.split(V.delimiter).length;return a===o?0:n!==u?u-n:a>o?1:-1});return e},Nwe=(t,e)=>{let r=Y.isVirtualLocator(t)?Y.devirtualizeLocator(t):t,o=Y.isVirtualLocator(e)?Y.devirtualizeLocator(e):e;return Y.areLocatorsEqual(r,o)},_6=(t,e,r,o)=>{if(t.linkType!=="SOFT")return!1;let a=Ae.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation);return V.contains(o,a)===null},PIt=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 o=Ae.toPortablePath(e.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},u=t.getDependencyTreeRoots(),A=new Map,p=new Set,h=(v,b)=>{let E=mA(v);if(p.has(E))return;p.add(E);let R=t.getPackageInformation(v);if(R){let N=b?mA(b):"";if(mA(v)!==N&&R.linkType==="SOFT"&&!_6(R,v,t,o)){let _=Owe(R,v,t);(!A.get(_)||v.reference.startsWith("workspace:"))&&A.set(_,v)}for(let[_,J]of R.packageDependencies)J!==null&&(R.packagePeers.has(_)||h(t.getLocator(_,J),v))}};for(let v of u)h(v,null);let C=o.split(V.sep);for(let v of A.values()){let b=t.getPackageInformation(v),R=Ae.toPortablePath(b.packageLocation.slice(0,-1)).split(V.sep).slice(C.length),N=n;for(let _ of R){let J=N.children.get(_);J||(J={children:new Map},N.children.set(_,J)),N=J}N.workspaceLocator=v}let w=(v,b)=>{if(v.workspaceLocator){let E=mA(b),R=a.get(E);R||(R=new Set,a.set(E,R)),R.add(v.workspaceLocator)}for(let E of v.children.values())w(E,v.workspaceLocator||b)};for(let v of n.children.values())w(v,n.workspaceLocator);return a},bIt=(t,e)=>{let r=[],o=!1,a=new Map,n=PIt(t),u=t.getPackageInformation(t.topLevel);if(u===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let A=t.findPackageLocator(u.packageLocation);if(A===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let p=Ae.toPortablePath(u.packageLocation.slice(0,-1)),h={name:A.name,identName:A.name,reference:A.reference,peerNames:u.packagePeers,dependencies:new Set,dependencyKind:1},C=new Map,w=(b,E)=>`${mA(E)}:${b}`,v=(b,E,R,N,_,J,re,oe)=>{var de,ne;let pe=w(b,R),he=C.get(pe),ve=!!he;!ve&&R.name===A.name&&R.reference===A.reference&&(he=h,C.set(pe,h));let ge=_6(E,R,t,p);if(!he){let Z=0;ge?Z=2:E.linkType==="SOFT"&&R.name.endsWith(hm)&&(Z=1),he={name:b,identName:R.name,reference:R.reference,dependencies:new Set,peerNames:Z===1?new Set:E.packagePeers,dependencyKind:Z},C.set(pe,he)}let le;if(ge?le=2:_.linkType==="SOFT"?le=1:le=0,he.hoistPriority=Math.max(he.hoistPriority||0,le),oe&&!ge){let Z=mA({name:N.identName,reference:N.reference}),me=a.get(Z)||new Set;a.set(Z,me),me.add(he.name)}let xe=new Map(E.packageDependencies);if(e.project){let Z=e.project.workspacesByCwd.get(Ae.toPortablePath(E.packageLocation.slice(0,-1)));if(Z){let me=new Set([...Array.from(Z.manifest.peerDependencies.values(),be=>Y.stringifyIdent(be)),...Array.from(Z.manifest.peerDependenciesMeta.keys())]);for(let be of me)xe.has(be)||(xe.set(be,J.get(be)||null),he.peerNames.add(be))}}let g=mA({name:R.name.replace(hm,""),reference:R.reference}),De=n.get(g);if(De)for(let Z of De)xe.set(`${Z.name}${hm}`,Z.reference);(E!==_||E.linkType!=="SOFT"||!ge&&(!e.selfReferencesByCwd||e.selfReferencesByCwd.get(re)))&&N.dependencies.add(he);let Ee=R!==A&&E.linkType==="SOFT"&&!R.name.endsWith(hm)&&!ge;if(!ve&&!Ee){let Z=new Map;for(let[me,be]of xe)if(be!==null){let ut=t.getLocator(me,be),H=t.getLocator(me.replace(hm,""),be),yt=t.getPackageInformation(H);if(yt===null)throw new Error("Assertion failed: Expected the package to have been registered");let Me=_6(yt,ut,t,p);if(e.validateExternalSoftLinks&&e.project&&Me){yt.packageDependencies.size>0&&(o=!0);for(let[At,Ne]of yt.packageDependencies)if(Ne!==null){let P=Y.parseLocator(Array.isArray(Ne)?`${Ne[0]}@${Ne[1]}`:`${At}@${Ne}`);if(mA(P)!==mA(ut)){let I=xe.get(At);if(I){let x=Y.parseLocator(Array.isArray(I)?`${I[0]}@${I[1]}`:`${At}@${I}`);Nwe(x,P)||r.push({messageName:71,text:`Cannot link ${Y.prettyIdent(e.project.configuration,Y.parseIdent(ut.name))} into ${Y.prettyLocator(e.project.configuration,Y.paLine truncated
|
||||||
|
`;for(let n=0,u=t.length;n<u;++n)a+=o+ok(String(n),t[n],e,o).replace(/^ +/,""),n+1<u&&(a+=","),a+=`
|
||||||
|
`;return a+=r,a+="]",a}function TIt(t,e,r){let o=Object.keys(t),a="";a+="{";for(let n=0,u=o.length,A=0;n<u;++n){let p=o[n],h=t[p];typeof h>"u"||(A!==0&&(a+=", "),a+=JSON.stringify(p),a+=": ",a+=ok(p,h,e,r).replace(/^ +/g,""),A+=1)}return a+="}",a}function LIt(t,e,r){let o=Object.keys(t),a=`${r} `,n="";n+=r,n+=`{
|
||||||
|
`;let u=0;for(let A=0,p=o.length;A<p;++A){let h=o[A],C=t[h];typeof C>"u"||(u!==0&&(n+=",",n+=`
|
||||||
|
`),n+=a,n+=JSON.stringify(h),n+=": ",n+=ok(h,C,e,a).replace(/^ +/g,""),u+=1)}return u!==0&&(n+=`
|
||||||
|
`),n+=r,n+="}",n}function ok(t,e,r,o){let{next:a}=Mwe[r],n=a[t]||a["*"];return Uwe(e,n,o)}function Uwe(t,e,r){let{collapsed:o}=Mwe[e];return Array.isArray(t)?o?FIt(t,e,r):RIt(t,e,r):typeof t=="object"&&t!==null?o?TIt(t,e,r):LIt(t,e,r):JSON.stringify(t)}function _we(t){return Uwe(t,"TOP_LEVEL","")}function TB(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let o=[];for(let n of e)o.push(r.map(u=>n(u)));let a=r.map((n,u)=>u);return a.sort((n,u)=>{for(let A of o){let p=A[n]<A[u]?-1:A[n]>A[u]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function NIt(t){let e=new Map,r=TB(t.fallbackExclusionList||[],[({name:o,reference:a})=>o,({name:o,reference:a})=>a]);for(let{name:o,reference:a}of r){let n=e.get(o);typeof n>"u"&&e.set(o,n=new Set),n.add(a)}return Array.from(e).map(([o,a])=>[o,Array.from(a)])}function OIt(t){return TB(t.fallbackPool||[],([e])=>e)}function MIt(t){let e=[];for(let[r,o]of TB(t.packageRegistry,([a])=>a===null?"0":`1${a}`)){let a=[];e.push([r,a]);for(let[n,{packageLocation:u,packageDependencies:A,packagePeers:p,linkType:h,discardFromLookup:C}]of TB(o,([w])=>w===null?"0":`1${w}`)){let w=[];r!==null&&n!==null&&!A.has(r)&&w.push([r,n]);for(let[E,R]of TB(A.entries(),([N])=>N))w.push([E,R]);let v=p&&p.size>0?Array.from(p):void 0,b=C||void 0;a.push([n,{packageLocation:u,packageDependencies:w,packagePeers:v,linkType:h,discardFromLookup:b}])}}return e}function LB(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,fallbackExclusionList:NIt(t),fallbackPool:OIt(t),packageRegistryData:MIt(t)}}var jwe=tt(qwe());function Gwe(t,e){return[t?`${t}
|
||||||
|
`:"",`/* eslint-disable */
|
||||||
|
`,`"use strict";
|
||||||
|
`,`
|
||||||
|
`,e,`
|
||||||
|
`,(0,jwe.default)()].join("")}function UIt(t){return JSON.stringify(t,null,2)}function _It(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,`\\
|
||||||
|
`)}'`}function HIt(t){return[`const RAW_RUNTIME_STATE =
|
||||||
|
`,`${_It(_we(t))};
|
||||||
|
|
||||||
|
`,`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||||
|
`,` return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname});
|
||||||
|
`,`}
|
||||||
|
`].join("")}function qIt(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||||
|
`,` return hydrateRuntimeState(require(${JSON.stringify(`./${Nr.pnpData}`)}), {basePath: basePath || __dirname});
|
||||||
|
`,`}
|
||||||
|
`].join("")}function Wwe(t){let e=LB(t),r=HIt(e);return Gwe(t.shebang,r)}function Ywe(t){let e=LB(t),r=qIt(),o=Gwe(t.shebang,r);return{dataFile:UIt(e),loaderFile:o}}bt();function j6(t,{basePath:e}){let r=Ae.toPortablePath(e),o=V.resolve(r),a=t.ignorePatternData!==null?new RegExp(t.ignorePatternData):null,n=new Map,u=new Map(t.packageRegistryData.map(([w,v])=>[w,new Map(v.map(([b,E])=>{if(w===null!=(b===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let R=E.discardFromLookup??!1,N={name:w,reference:b},_=n.get(E.packageLocation);_?(_.discardFromLookup=_.discardFromLookup&&R,R||(_.locator=N)):n.set(E.packageLocation,{locator:N,discardFromLookup:R});let J=null;return[b,{packageDependencies:new Map(E.packageDependencies),packagePeers:new Set(E.packagePeers),linkType:E.linkType,discardFromLookup:R,get packageLocation(){return J||(J=V.join(o,E.packageLocation))}}]}))])),A=new Map(t.fallbackExclusionList.map(([w,v])=>[w,new Set(v)])),p=new Map(t.fallbackPool),h=t.dependencyTreeRoots,C=t.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:h,enableTopLevelFallback:C,fallbackExclusionList:A,fallbackPool:p,ignorePattern:a,packageLocatorsByLocations:n,packageRegistry:u}}bt();bt();var HB=Ie("module");function TC(t,e){if(typeof t=="string")return t;if(t){let r,o;if(Array.isArray(t)){for(r=0;r<t.length;r++)if(o=TC(t[r],e))return o}else for(r in t)if(e.has(r))return TC(t[r],e)}}function gm(t,e,r){throw new Error(r?`No known conditions for "${e}" entry in "${t}" package`:`Missing "${e}" export in "${t}" package`)}function jIt(t,e){return e===t?".":e[0]==="."?e:e.replace(new RegExp("^"+t+"/"),"./")}function Kwe(t,e=".",r={}){let{name:o,exports:a}=t;if(a){let{browser:n,require:u,unsafe:A,conditions:p=[]}=r,h=jIt(o,e);if(h[0]!=="."&&(h="./"+h),typeof a=="string")return h==="."?a:gm(o,h);let C=new Set(["default",...p]);A||C.add(u?"require":"import"),A||C.add(n?"browser":"node");let w,v,b=!1;for(w in a){b=w[0]!==".";break}if(b)return h==="."?TC(a,C)||gm(o,h,1):gm(o,h);if(v=a[h])return TC(v,C)||gm(o,h,1);for(w in a){if(v=w[w.length-1],v==="/"&&h.startsWith(w))return(v=TC(a[w],C))?v+h.substring(w.length):gm(o,h,1);if(v==="*"&&h.startsWith(w.slice(0,-1))&&h.substring(w.length-1).length>0)return(v=TC(a[w],C))?v.replace("*",h.substring(w.length-1)):gm(o,h,1)}return gm(o,h)}}var hk=Ie("url"),z6=Ie("util");var uu=Ie("url");var e1e=tt(Ie("assert"));var Jwe=Array.isArray,NB=JSON.stringify,G6=Object.getOwnPropertyNames,LC=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),W6=(t,e)=>RegExp.prototype.exec.call(t,e),Y6=(t,...e)=>RegExp.prototype[Symbol.replace].apply(t,e),OB=(t,...e)=>String.prototype.endsWith.apply(t,e),Vwe=(t,...e)=>String.prototype.includes.apply(t,e),zwe=(t,...e)=>String.prototype.lastIndexOf.apply(t,e),ak=(t,...e)=>String.prototype.indexOf.apply(t,e),Xwe=(t,...e)=>String.prototype.replace.apply(t,e),MB=(t,...e)=>String.prototype.slice.apply(t,e),tp=(t,...e)=>String.prototype.startsWith.apply(t,e),Zwe=Map,$we=JSON.parse;function lk(t,e,r){return class extends r{constructor(...o){super(e(...o)),this.code=t,this.name=`${r.name} [${t}]`}}}var t1e=lk("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),K6=lk("ERR_INVALID_MODULE_SPECIFIER",(t,e,r=void 0)=>`Invalid module "${t}" ${e}${r?` imported from ${r}`:""}`,TypeError),r1e=lk("ERR_INVALID_PACKAGE_TARGET",(t,e,r,o=!1,a=void 0)=>{let n=typeof r=="string"&&!o&&r.length&&!tp(r,"./");return e==="."?((0,e1e.default)(o===!1),`Invalid "exports" main target ${NB(r)} defined in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${o?"imports":"exports"}" target ${NB(r)} defined for '${e}' in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`},Error),ck=lk("ERR_INVALID_PACKAGE_CONFIG",(t,e,r)=>`Invalid package config ${t}${e?` while importing ${e}`:""}${r?`. ${r}`:""}`,Error);var Ak=Ie("url");function n1e(t,e){let r=Object.create(null);for(let o=0;o<e.length;o++){let a=e[o];LC(t,a)&&(r[a]=t[a])}return r}var uk=new Zwe;function GIt(t,e,r,o){let a=uk.get(t);if(a!==void 0)return a;let n=o(t);if(n===void 0){let b={pjsonPath:t,exists:!1,main:void 0,name:void 0,type:"none",exports:void 0,imports:void 0};return uk.set(t,b),b}let u;try{u=$we(n)}catch(b){throw new ck(t,(r?`"${e}" from `:"")+(0,Ak.fileURLToPath)(r||e),b.message)}let{imports:A,main:p,name:h,type:C}=n1e(u,["imports","main","name","type"]),w=LC(u,"exports")?u.exports:void 0;(typeof A!="object"||A===null)&&(A=void 0),typeof p!="string"&&(p=void 0),typeof h!="string"&&(h=void 0),C!=="module"&&C!=="commonjs"&&(C="none");let v={pjsonPath:t,exists:!0,main:p,name:h,type:C,exports:w,imports:A};return uk.set(t,v),v}function i1e(t,e){let r=new URL("./package.json",t);for(;;){let n=r.pathname;if(OB(n,"node_modules/package.json"))break;let u=GIt((0,Ak.fileURL
Line truncated
|
||||||
|
`),r;u=t[++n]}else if(u===" "&&!o){a=!0;continue}else if(u==='"'){o=!o;continue}a?(r.push(u),a=!1):r[r.length-1]+=u}return o&&e.push(`invalid value for NODE_OPTIONS (unterminated string)
|
||||||
|
`),r}bt();var h1e=Ie("module");var[fu,dm]=process.versions.node.split(".").map(t=>parseInt(t,10)),vVt=fu>16||fu===16&&dm>=12,DVt=fu>17||fu===17&&dm>=5||fu===16&&dm>=15,SVt=fu>17||fu===17&&dm>=1||fu===16&&dm>14,p1e=fu>19||fu===19&&dm>=2||fu===18&&dm>=13;var ewt=new Set(h1e.Module.builtinModules||Object.keys(process.binding("natives"))),pk=t=>t.startsWith("node:")||ewt.has(t);function g1e(t){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send)if(t=t.map(e=>Ae.fromPortablePath(pi.resolveVirtual(Ae.toPortablePath(e)))),p1e)process.send({"watch:require":t});else for(let e of t)process.send({"watch:require":e})}function X6(t,e){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,o=Number(process.env.PNP_DEBUG_LEVEL),a=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,n=/^(\/|\.{1,2}(\/|$))/,u=/\/$/,A=/^\.{0,2}\//,p={name:null,reference:null},h=[],C=new Set;if(t.enableTopLevelFallback===!0&&h.push(p),e.compatibilityMode!==!1)for(let Me of["react-scripts","gatsby"]){let Te=t.packageRegistry.get(Me);if(Te)for(let Qe of Te.keys()){if(Qe===null)throw new Error("Assertion failed: This reference shouldn't be null");h.push({name:Me,reference:Qe})}}let{ignorePattern:w,packageRegistry:v,packageLocatorsByLocations:b}=t;function E(Me,Te){return{fn:Me,args:Te,error:null,result:null}}function R(Me){var At,Ne,P,I;let Te=((Ne=(At=process.stderr)==null?void 0:At.hasColors)==null?void 0:Ne.call(At))??process.stdout.isTTY,Qe=(x,y)=>`\x1B[${x}m${y}\x1B[0m`,Ue=Me.error;console.error(Ue?Qe("31;1",`\u2716 ${(P=Me.error)==null?void 0:P.message.replace(/\n.*/s,"")}`):Qe("33;1","\u203C Resolution")),Me.args.length>0&&console.error();for(let x of Me.args)console.error(` ${Qe("37;1","In \u2190")} ${(0,z6.inspect)(x,{colors:Te,compact:!0})}`);Me.result&&(console.error(),console.error(` ${Qe("37;1","Out \u2192")} ${(0,z6.inspect)(Me.result,{colors:Te,compact:!0})}`));let je=((I=new Error().stack.match(/(?<=^ +)at.*/gm))==null?void 0:I.slice(2))??[];if(je.length>0){console.error();for(let x of je)console.error(` ${Qe("38;5;244",x)}`)}console.error()}function N(Me,Te){if(e.allowDebug===!1)return Te;if(Number.isFinite(o)){if(o>=2)return(...Qe)=>{let Ue=E(Me,Qe);try{return Ue.result=Te(...Qe)}catch(je){throw Ue.error=je}finally{R(Ue)}};if(o>=1)return(...Qe)=>{try{return Te(...Qe)}catch(Ue){let je=E(Me,Qe);throw je.error=Ue,R(je),Ue}}}return Te}function _(Me){let Te=g(Me);if(!Te)throw Xi("INTERNAL","Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return Te}function J(Me){if(Me.name===null)return!0;for(let Te of t.dependencyTreeRoots)if(Te.name===Me.name&&Te.reference===Me.reference)return!0;return!1}let re=new Set(["default","node","require",...f1e("--conditions")]);function oe(Me,Te=re){let Qe=de(V.join(Me,"internal.js"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(Qe===null)throw Xi("INTERNAL",`The locator that owns the "${Me}" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:Ue}=_(Qe),je=V.join(Ue,Nr.manifest);if(!e.fakeFs.existsSync(je))return null;let At=JSON.parse(e.fakeFs.readFileSync(je,"utf8")),Ne=V.contains(Ue,Me);if(Ne===null)throw Xi("INTERNAL","unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)");A.test(Ne)||(Ne=`./${Ne}`);let P;try{P=Kwe(At,V.normalize(Ne),{conditions:Te,unsafe:!0})}catch(I){throw Xi("EXPORTS_RESOLUTION_FAILED",I.message,{unqualifiedPath:Au(Me),locator:Qe,pkgJson:At,subpath:Au(Ne),conditions:Te},"ERR_PACKAGE_PATH_NOT_EXPORTED")}return typeof P=="string"?V.join(Ue,P):null}function pe(Me,Te,{extensions:Qe}){let Ue;try{Te.push(Me),Ue=e.fakeFs.statSync(Me)}catch{}if(Ue&&!Ue.isDirectory())return e.fakeFs.realpathSync(Me);if(Ue&&Ue.isDirectory()){let je;try{je=JSON.parse(e.fakeFs.readFileSync(V.join(Me,Nr.manifest),"utf8"))}catch{}let At;if(je&&je.main&&(At=V.resolve(Me,je.main)),At&&At!==Me){let Ne=pe(At,Te,{extensions:Qe});if(Ne!==null)return Ne}}for(let je=0,At=Qe.length;je<At;je++){let Ne=`${Me}${Qe[je]}`;if(Te.push(Ne),e.fakeFs.existsSync(Ne))return Ne}if(Ue&&Ue.isDirectory())for(let je=0,At=Qe.length;je<At;je++){let Ne=V.format({dir:Me,name:"index",ext:Qe[je]});if(Te.push(Ne),e.fakeFs.existsSync(Ne))return Ne}return null}function he(Me){let Te=new HB.Module(Me,null);return Te.filename=Me,Te.paths=HB.Module._nodeModulePaths(Me),Te}function ve(Me,Te){return Te.endsWith("/")&&(Te=V.join(Te,"internal.js")),HB.Module._resolveFilename(Ae.fromPortablePath(Me),he(Ae.fromPortablePath(Te)),!1,{plugnplay:!1})}function ge(Me){if(w===null)return!1;let Te=V.contains(t.basePath,Me);return Te===null?!1:!!w.test(Te.replace(/\/$/,""))}let le={std:3,resolveVirtual:1,getAllLocators:1},xe=p;function g({name:Me,reference:Te}){let Qe=v.get(Me);if(!Qe)return null;let Ue=Qe.get(Te);return Ue||null}function De({name:Me,reference:Te}){let Qe=[];for(let[Ue,je]of v)if(Ue!==null)for(let[At,Ne]of je)At===null||Ne.packageDependencies.getLine truncated
|
||||||
|
|
||||||
|
Require request: "${Ue}"
|
||||||
|
Required by: ${je}
|
||||||
|
`,{request:Ue,issuer:je});return Ae.toPortablePath(P)}let At,Ne=Me.match(a);if(Ne){if(!Te)throw Xi("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ue,issuer:je});let[,P,I]=Ne,x=de(Te);if(!x){let Le=ve(Me,Te);if(Le===!1)throw Xi("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: "${Ue}"
|
||||||
|
Required by: ${je}
|
||||||
|
`,{request:Ue,issuer:je});return Ae.toPortablePath(Le)}let F=_(x).packageDependencies.get(P),z=null;if(F==null&&x.name!==null){let Le=t.fallbackExclusionList.get(x.name);if(!Le||!Le.has(x.reference)){for(let ht=0,Ut=h.length;ht<Ut;++ht){let xt=_(h[ht]).packageDependencies.get(P);if(xt!=null){r?z=xt:F=xt;break}}if(t.enableTopLevelFallback&&F==null&&z===null){let ht=t.fallbackPool.get(P);ht!=null&&(z=ht)}}}let X=null;if(F===null)if(J(x))X=Xi("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!==Ue?` (via "${Ue}")`:""}
|
||||||
|
Required by: ${je}
|
||||||
|
`,{request:Ue,issuer:je,dependencyName:P});else{let Le=Ee(P,x);Le.every(st=>J(st))?X=Xi("MISSING_PEER_DEPENDENCY",`${x.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!==Ue?` (via "${Ue}")`:""}
|
||||||
|
Required by: ${x.name}@${x.reference} (via ${je})
|
||||||
|
${Le.map(st=>`Ancestor breaking the chain: ${st.name}@${st.reference}
|
||||||
|
`).join("")}
|
||||||
|
`,{request:Ue,issuer:je,issuerLocator:Object.assign({},x),dependencyName:P,brokenAncestors:Le}):X=Xi("MISSING_PEER_DEPENDENCY",`${x.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!==Ue?` (via "${Ue}")`:""}
|
||||||
|
Required by: ${x.name}@${x.reference} (via ${je})
|
||||||
|
|
||||||
|
${Le.map(st=>`Ancestor breaking the chain: ${st.name}@${st.reference}
|
||||||
|
`).join("")}
|
||||||
|
`,{request:Ue,issuer:je,issuerLocator:Object.assign({},x),dependencyName:P,brokenAncestors:Le})}else F===void 0&&(!Qe&&pk(Me)?J(x)?X=Xi("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!==Ue?` (via "${Ue}")`:""}
|
||||||
|
Required by: ${je}
|
||||||
|
`,{request:Ue,issuer:je,dependencyName:P}):X=Xi("UNDECLARED_DEPENDENCY",`${x.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 ${x.name}'s dependencies, this makes the require call ambiguous and unsound.
|
||||||
|
|
||||||
|
Required package: ${P}${P!==Ue?` (via "${Ue}")`:""}
|
||||||
|
Required by: ${je}
|
||||||
|
`,{request:Ue,issuer:je,issuerLocator:Object.assign({},x),dependencyName:P}):J(x)?X=Xi("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!==Ue?` (via "${Ue}")`:""}
|
||||||
|
Required by: ${je}
|
||||||
|
`,{request:Ue,issuer:je,dependencyName:P}):X=Xi("UNDECLARED_DEPENDENCY",`${x.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!==Ue?` (via "${Ue}")`:""}
|
||||||
|
Required by: ${x.name}@${x.reference} (via ${je})
|
||||||
|
`,{request:Ue,issuer:je,issuerLocator:Object.assign({},x),dependencyName:P}));if(F==null){if(z===null||X===null)throw X||new Error("Assertion failed: Expected an error to have been set");F=z;let Le=X.message.replace(/\n.*/g,"");X.message=Le,!C.has(Le)&&o!==0&&(C.add(Le),process.emitWarning(X))}let $=Array.isArray(F)?{name:F[0],reference:F[1]}:{name:P,reference:F},ie=_($);if(!ie.packageLocation)throw Xi("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!==Ue?` (via "${Ue}")`:""}
|
||||||
|
Required by: ${x.name}@${x.reference} (via ${je})
|
||||||
|
`,{request:Ue,issuer:je,dependencyLocator:Object.assign({},$)});let ke=ie.packageLocation;I?At=V.join(ke,I):At=ke}else if(V.isAbsolute(Me))At=V.normalize(Me);else{if(!Te)throw Xi("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:Ue,issuer:je});let P=V.resolve(Te);Te.match(u)?At=V.normalize(V.join(P,Me)):At=V.normalize(V.join(V.dirname(P),Me))}return V.normalize(At)}function me(Me,Te,Qe=re){if(n.test(Me))return Te;let Ue=oe(Te,Qe);return Ue?V.normalize(Ue):Te}function be(Me,{extensions:Te=Object.keys(HB.Module._extensions)}={}){let Qe=[],Ue=pe(Me,Qe,{extensions:Te});if(Ue)return V.normalize(Ue);{g1e(Qe.map(Ne=>Ae.fromPortablePath(Ne)));let je=Au(Me),At=de(Me);if(At){let{packageLocation:Ne}=_(At),P=!0;try{e.fakeFs.accessSync(Ne)}catch(I){if((I==null?void 0:I.code)==="ENOENT")P=!1;else{let x=((I==null?void 0:I.message)??I??"empty exception thrown").replace(/^[A-Z]/,y=>y.toLowerCase());throw Xi("QUALIFIED_PATH_RESOLUTION_FAILED",`Required package exists but could not be accessed (${x}).
|
||||||
|
|
||||||
|
Missing package: ${At.name}@${At.reference}
|
||||||
|
Expected package location: ${Au(Ne)}
|
||||||
|
`,{unqualifiedPath:je,extensions:Te})}}if(!P){let I=Ne.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 Xi("QUALIFIED_PATH_RESOLUTION_FAILED",`${I}
|
||||||
|
|
||||||
|
Missing package: ${At.name}@${At.reference}
|
||||||
|
Expected package location: ${Au(Ne)}
|
||||||
|
`,{unqualifiedPath:je,extensions:Te})}}throw Xi("QUALIFIED_PATH_RESOLUTION_FAILED",`Qualified path resolution failed: we looked for the following paths, but none could be accessed.
|
||||||
|
|
||||||
|
Source path: ${je}
|
||||||
|
${Qe.map(Ne=>`Not found: ${Au(Ne)}
|
||||||
|
`).join("")}`,{unqualifiedPath:je,extensions:Te})}}function ut(Me,Te,Qe){if(!Te)throw new Error("Assertion failed: An issuer is required to resolve private import mappings");let Ue=a1e({name:Me,base:(0,hk.pathToFileURL)(Ae.fromPortablePath(Te)),conditions:Qe.conditions??re,readFileSyncFn:ne});if(Ue instanceof URL)return be(Ae.toPortablePath((0,hk.fileURLToPath)(Ue)),{extensions:Qe.extensions});if(Ue.startsWith("#"))throw new Error("Mapping from one private import to another isn't allowed");return H(Ue,Te,Qe)}function H(Me,Te,Qe={}){try{if(Me.startsWith("#"))return ut(Me,Te,Qe);let{considerBuiltins:Ue,extensions:je,conditions:At}=Qe,Ne=Z(Me,Te,{considerBuiltins:Ue});if(Me==="pnpapi")return Ne;if(Ne===null)return null;let P=()=>Te!==null?ge(Te):!1,I=(!Ue||!pk(Me))&&!P()?me(Me,Ne,At):Ne;return be(I,{extensions:je})}catch(Ue){throw Object.prototype.hasOwnProperty.call(Ue,"pnpCode")&&Object.assign(Ue.data,{request:Au(Me),issuer:Te&&Au(Te)}),Ue}}function yt(Me){let Te=V.normalize(Me),Qe=pi.resolveVirtual(Te);return Qe!==Te?Qe:null}return{VERSIONS:le,topLevel:xe,getLocator:(Me,Te)=>Array.isArray(Te)?{name:Te[0],reference:Te[1]}:{name:Me,reference:Te},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){let Me=[];for(let[Te,Qe]of v)for(let Ue of Qe.keys())Te!==null&&Ue!==null&&Me.push({name:Te,reference:Ue});return Me},getPackageInformation:Me=>{let Te=g(Me);if(Te===null)return null;let Qe=Ae.fromPortablePath(Te.packageLocation);return{...Te,packageLocation:Qe}},findPackageLocator:Me=>de(Ae.toPortablePath(Me)),resolveToUnqualified:N("resolveToUnqualified",(Me,Te,Qe)=>{let Ue=Te!==null?Ae.toPortablePath(Te):null,je=Z(Ae.toPortablePath(Me),Ue,Qe);return je===null?null:Ae.fromPortablePath(je)}),resolveUnqualified:N("resolveUnqualified",(Me,Te)=>Ae.fromPortablePath(be(Ae.toPortablePath(Me),Te))),resolveRequest:N("resolveRequest",(Me,Te,Qe)=>{let Ue=Te!==null?Ae.toPortablePath(Te):null,je=H(Ae.toPortablePath(Me),Ue,Qe);return je===null?null:Ae.fromPortablePath(je)}),resolveVirtual:N("resolveVirtual",Me=>{let Te=yt(Ae.toPortablePath(Me));return Te!==null?Ae.fromPortablePath(Te):null})}}bt();var d1e=(t,e,r)=>{let o=LB(t),a=j6(o,{basePath:e}),n=Ae.join(e,Nr.pnpCjs);return X6(a,{fakeFs:r,pnpapiResolution:n})};var $6=tt(y1e());_t();var yA={};Yt(yA,{checkAndReportManifestCompatibility:()=>C1e,checkManifestCompatibility:()=>E1e,extractBuildScripts:()=>gk,getExtractHint:()=>ej,hasBindingGyp:()=>tj});Ke();bt();function E1e(t){return Y.isPackageCompatible(t,As.getArchitectureSet())}function C1e(t,e,{configuration:r,report:o}){return E1e(t)?!0:(o==null||o.reportWarningOnce(76,`${Y.prettyLocator(r,t)} The ${As.getArchitectureName()} architecture is incompatible with this package, ${e} skipped.`),!1)}function gk(t,e,r,{configuration:o,report:a}){let n=[];for(let A of["preinstall","install","postinstall"])e.manifest.scripts.has(A)&&n.push([0,A]);return!e.manifest.scripts.has("install")&&e.misc.hasBindingGyp&&n.push([1,"node-gyp rebuild"]),n.length===0?[]:t.linkType!=="HARD"?(a==null||a.reportWarningOnce(6,`${Y.prettyLocator(o,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?(a==null||a.reportInfoOnce(5,`${Y.prettyLocator(o,t)} lists build scripts, but its build has been explicitly disabled through configuration.`),[]):!o.get("enableScripts")&&!r.built?(a==null||a.reportWarningOnce(4,`${Y.prettyLocator(o,t)} lists build scripts, but all build scripts have been disabled.`),[]):C1e(t,"build",{configuration:o,report:a})?n:[]}var rwt=new Set([".exe",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function ej(t){return t.packageFs.getExtractHint({relevantExtensions:rwt})}function tj(t){let e=V.join(t.prefixPath,"binding.gyp");return t.packageFs.existsSync(e)}var jB={};Yt(jB,{getUnpluggedPath:()=>qB});Ke();bt();function qB(t,{configuration:e}){return V.resolve(e.get("pnpUnpluggedFolder"),Y.slugifyLocator(t))}var nwt=new Set([Y.makeIdent(null,"open").identHash,Y.makeIdent(null,"opn").identHash]),Ih=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 o=wh(r.project).cjs;if(!ae.existsSync(o))throw new ot(`The project in ${ye.pretty(r.project.configuration,`${r.project.cwd}/package.json`,ye.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let a=Ye.getFactoryWithDefault(this.pnpCache,o,()=>Ye.dynamicRequire(o,{cachingStrategy:Ye.CachingStrategy.FsTime})),n={name:Y.stringifyIdent(e),reference:e.reference},u=a.getPackageInformation(n);if(!u)throw new ot(`Couldn't find ${Y.prettyLocator(r.project.configuration,e)} in the currently installed PnP map - running an install might help`);return Ae.toPortablePath(u.packageLocation)}asLine truncated
|
||||||
|
`,n+=`# cause your node_modules installation to become invalidated.
|
||||||
|
`,n+=`
|
||||||
|
`,n+=`__metadata:
|
||||||
|
`,n+=` version: ${T1e}
|
||||||
|
`,n+=` nmMode: ${o.value}
|
||||||
|
`;let u=Array.from(e.keys()).sort(),A=Y.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let C of u){let w=e.get(C);n+=`
|
||||||
|
`,n+=`${JSON.stringify(C)}:
|
||||||
|
`,n+=` locations:
|
||||||
|
`;for(let v of w.locations){let b=V.contains(t.cwd,v);if(b===null)throw new Error(`Assertion failed: Expected the path to be within the project (${v})`);n+=` - ${JSON.stringify(b)}
|
||||||
|
`}if(w.aliases.length>0){n+=` aliases:
|
||||||
|
`;for(let v of w.aliases)n+=` - ${JSON.stringify(v)}
|
||||||
|
`}if(C===A&&r.size>0){n+=` bin:
|
||||||
|
`;for(let[v,b]of r){let E=V.contains(t.cwd,v);if(E===null)throw new Error(`Assertion failed: Expected the path to be within the project (${v})`);n+=` ${JSON.stringify(E)}:
|
||||||
|
`;for(let[R,N]of b){let _=V.relative(V.join(v,vi),N);n+=` ${JSON.stringify(R)}: ${JSON.stringify(_)}
|
||||||
|
`}}}}let p=t.cwd,h=V.join(p,vi,L1e);a&&await ae.removePromise(h),await ae.changeFilePromise(h,n,{automaticNewlines:!0})}async function cj(t,{unrollAliases:e=!1}={}){let r=t.cwd,o=V.join(r,vi,L1e),a;try{a=await ae.statPromise(o)}catch{}if(!a)return null;let n=Yi(await ae.readFilePromise(o,"utf8"));if(n.__metadata.version>T1e)return null;let u=n.__metadata.nmMode||"classic",A=new Map,p=new Map;delete n.__metadata;for(let[h,C]of Object.entries(n)){let w=C.locations.map(b=>V.join(r,b)),v=C.bin;if(v)for(let[b,E]of Object.entries(v)){let R=V.join(r,Ae.toPortablePath(b)),N=Ye.getMapWithDefault(p,R);for(let[_,J]of Object.entries(E))N.set(Ni(_),Ae.toPortablePath([R,vi,J].join(V.sep)))}if(A.set(h,{target:wt.dot,linkType:"HARD",locations:w,aliases:C.aliases||[]}),e&&C.aliases)for(let b of C.aliases){let{scope:E,name:R}=Y.parseLocator(h),N=Y.makeLocator(Y.makeIdent(E,R),b),_=Y.stringifyLocator(N);A.set(_,{target:wt.dot,linkType:"HARD",locations:w,aliases:[]})}}return{locatorMap:A,binSymlinks:p,locationTree:N1e(A,{skipPrefix:t.cwd}),nmMode:u,mtimeMs:a.mtimeMs}}var OC=async(t,e)=>{if(t.split(V.sep).indexOf(vi)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{if(!e.innerLoop){let o=e.allowSymlink?await ae.statPromise(t):await ae.lstatPromise(t);if(e.allowSymlink&&!o.isDirectory()||!e.allowSymlink&&o.isSymbolicLink()){await ae.unlinkPromise(t);return}}let r=await ae.readdirPromise(t,{withFileTypes:!0});for(let o of r){let a=V.join(t,Ni(o.name));o.isDirectory()?(o.name!==vi||e&&e.innerLoop)&&await OC(a,{innerLoop:!0,contentsOnly:!1}):await ae.unlinkPromise(a)}e.contentsOnly||await ae.rmdirPromise(t)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},Q1e=4,mk=(t,{skipPrefix:e})=>{let r=V.contains(e,t);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${t} which is outside project root: ${e}`);let o=r.split(V.sep).filter(p=>p!==""),a=o.indexOf(vi),n=o.slice(0,a).join(V.sep),u=V.join(e,n),A=o.slice(a);return{locationRoot:u,segments:A}},N1e=(t,{skipPrefix:e})=>{let r=new Map;if(t===null)return r;let o=()=>({children:new Map,linkType:"HARD"});for(let[a,n]of t.entries()){if(n.linkType==="SOFT"&&V.contains(e,n.target)!==null){let A=Ye.getFactoryWithDefault(r,n.target,o);A.locator=a,A.linkType=n.linkType}for(let u of n.locations){let{locationRoot:A,segments:p}=mk(u,{skipPrefix:e}),h=Ye.getFactoryWithDefault(r,A,o);for(let C=0;C<p.length;++C){let w=p[C];if(w!=="."){let v=Ye.getFactoryWithDefault(h.children,w,o);h.children.set(w,v),h=v}C===p.length-1&&(h.locator=a,h.linkType=n.linkType)}}}return r},fj=async(t,e,r)=>{if(process.platform==="win32"&&r==="junctions"){let o;try{o=await ae.lstatPromise(t)}catch{}if(!o||o.isDirectory()){await ae.symlinkPromise(t,e,"junction");return}}await ae.symlinkPromise(V.relative(V.dirname(e),t),e)};async function O1e(t,e,r){let o=V.join(t,Ni(`${uj.default.randomBytes(16).toString("hex")}.tmp`));try{await ae.writeFilePromise(o,r);try{await ae.linkPromise(o,e)}catch{}}finally{await ae.unlinkPromise(o)}}async function Pwt({srcPath:t,dstPath:e,entry:r,globalHardlinksStore:o,baseFs:a,nmMode:n}){if(r.kind===M1e.FILE){if(n.value==="hardlinks-global"&&o&&r.digest){let A=V.join(o,r.digest.substring(0,2),`${r.digest.substring(2)}.dat`),p;try{let h=await ae.statPromise(A);if(h&&(!r.mtimeMs||h.mtimeMs>r.mtimeMs||h.mtimeMs<r.mtimeMs-Dwt))if(await bn.checksumFile(A,{baseFs:ae,algorithm:"sha1"})!==r.digest){let w=V.join(o,Ni(`${uj.default.randomBytes(16).toString("hex")}.tmp`));await ae.renamePromise(A,w);let v=await a.readFilePromise(t);await ae.writeFilePromise(w,v);try{await ae.linkPromise(w,A),r.mtimeMs=new Date().getTime(),await ae.unlinkPromise(w)}catch{}}else r.mtimeMs||(r.mtimeMs=Math.ceil(h.mtimeMs));await ae.linkPromise(A,e),p=!0}catch{p=!1}if(!p){let h=await a.readFilePromise(t);await O1e(o,A,h),r.mtimeMs=new Date().getTime();try{await ae.linkPromise(A,e)}catch(C){C&&C.code&&C.code=="EXDEV"&&(n.value="hardlinks-local",await a.copyFilePromise(t,e))}}}else await a.copyFilePromise(t,e);let u=r.mode&511;u!==420&&await ae.chmodPromise(e,u)}}var M1e=(o=>(o.FILE="file",o.DIRECTORY="directory",o.SYMLINK="symlink",o))(M1e||{}),bwt=async(t,e,{baseFs:r,globalHardlinksStore:o,nmMode:a,windowsLinkType:n,packageChecksum:u})=>{await ae.mkdirPromise(t,{recursive:!0});let A=async(C=wt.dot)=>{let w=V.join(e,C),v=await r.readdirPromise(w,{withFileTypes:!0}),b=new Map;for(let E of v){let R=V.join(C,E.name),N,_=V.join(w,E.name);if(E.isFile()){if(N={kind:"file",mode:(await r.lstatPromise(_)).mode},a.value==="hardlinks-global"){let J=await bn.checksumFile(_,{baseFs:r,algorithm:"sha1"});N.digest=J}}else if(E.isDirectory())N={kind:"directory"};else if(E.isSymbolicLink())N={kind:"symlink",symlinkTo:await r.readlinkPromise(_)};else throw new Error(`Unsupported file type (file: ${_}, mode: 0o${await r.statSync(_).mode.toString(8).padStart(6,"0")})`);if(b.set(R,N),E.isDirectory()&&R!==vi){let J=await A(R);for(let[re,oe]of J)b.set(re,oe)}}retu
Line truncated
|
||||||
|
`)),process.env.YARN_IS_TEST_ENV)return process.env.YARN_INJECT_NPM_2FA_TOKEN||"";let{otp:o}=await(0,yj.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return process.stdout.write(`
|
||||||
|
`),o}function Ek(t){var e,r;if(((e=t.originalError)==null?void 0:e.name)!=="HTTPError")return!1;try{return((r=t.originalError)==null?void 0:r.response.headers["www-authenticate"].split(/,\s*/).map(a=>a.toLowerCase())).includes("otp")}catch{return!1}}function MC(t){return{["npm-otp"]:t}}var KB=class{supports(e,r){if(!e.reference.startsWith(_n))return!1;let{selector:o,params:a}=Y.parseRange(e.reference);return!(!G1e.default.valid(o)||a===null||typeof a.__archiveUrl!="string")}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${Y.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:Y.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let{params:o}=Y.parseRange(e.reference);if(o===null||typeof o.__archiveUrl!="string")throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");let a=await pu(o.__archiveUrl,{customErrorMessage:np,configuration:r.project.configuration,ident:e});return await Vi.convertToZip(a,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:Y.getIdentVendorPath(e),stripComponents:1})}};Ke();var JB=class{supportsDescriptor(e,r){return!(!e.range.startsWith(_n)||!Y.tryParseDescriptor(e.range.slice(_n.length),!0))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Unreachable")}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){let o=r.project.configuration.normalizeDependency(Y.parseDescriptor(e.range.slice(_n.length),!0));return r.resolver.getResolutionDependencies(o,r)}async getCandidates(e,r,o){let a=o.project.configuration.normalizeDependency(Y.parseDescriptor(e.range.slice(_n.length),!0));return await o.resolver.getCandidates(a,r,o)}async getSatisfying(e,r,o,a){let n=a.project.configuration.normalizeDependency(Y.parseDescriptor(e.range.slice(_n.length),!0));return a.resolver.getSatisfying(n,r,o,a)}resolve(e,r){throw new Error("Unreachable")}};Ke();Ke();var W1e=tt(ii()),Y1e=Ie("url");var dl=class{supports(e,r){if(!e.reference.startsWith(_n))return!1;let o=new Y1e.URL(e.reference);return!(!W1e.default.valid(o.pathname)||o.searchParams.has("__archiveUrl"))}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${Y.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:Y.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let o;try{o=await pu(dl.getLocatorUrl(e),{customErrorMessage:np,configuration:r.project.configuration,ident:e})}catch{o=await pu(dl.getLocatorUrl(e).replace(/%2f/g,"/"),{customErrorMessage:np,configuration:r.project.configuration,ident:e})}return await Vi.convertToZip(o,{compressionLevel:r.project.configuration.get("compressionLevel"),prefixPath:Y.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,r,{configuration:o}){let a=rp(e.scope,{configuration:o}),n=dl.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=Tr.clean(e.reference.slice(_n.length));if(r===null)throw new Jt(10,"The npm semver resolver got selected, but the version isn't semver");return`${Dh(e)}/-/${e.name}-${r}.tgz`}};Ke();Ke();Ke();var K1e=tt(ii());var Ck=Y.makeIdent(null,"node-gyp"),jwt=/\b(node-gyp|prebuild-install)\b/,VB=class{supportsDescriptor(e,r){return e.range.startsWith(_n)?!!Tr.validRange(e.range.slice(_n.length)):!1}supportsLocator(e,r){if(!e.reference.startsWith(_n))return!1;let{selector:o}=Y.parseRange(e.reference);return!!K1e.default.valid(o)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=Tr.validRange(e.range.slice(_n.length));if(a===null)throw new Error(`Expected a valid range, got ${e.range.slice(_n.length)}`);let n=await pu(Dh(e),{customErrorMessage:np,configuration:o.project.configuration,ident:e,jsonResponse:!0}),u=Ye.mapAndFilter(Object.keys(n.versions),h=>{try{let C=new Tr.SemVer(h);if(a.test(C))return C}catch{}return Ye.mapAndFilter.skip}),A=u.filter(h=>!n.versions[h.raw].deprecated),p=A.length>0?A:u;return p.sort((h,C)=>-h.compare(C)),p.map(h=>{let C=Y.makeLocator(e,`${_n}${h.raw}`),w=n.versions[h.raw].dist.tarball;return dl.isConventionaLine 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 ${zC.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"]]});Ke();Ke();bt();_t();var m9=tt(ii()),y9=Ie("util"),Oh=class extends ct{constructor(){super(...arguments);this.fields=fe.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=fe.Rest()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd),a=typeof this.fields<"u"?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,n=[],u=!1,A=await Ct.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async p=>{for(let h of this.packages){let C;if(h==="."){let oe=o.topLevelWorkspace;if(!oe.manifest.name)throw new ot(`Missing ${ye.pretty(r,"name",ye.Type.CODE)} field in ${Ae.fromPortablePath(V.join(oe.cwd,Nr.manifest))}`);C=Y.makeDescriptor(oe.manifest.name,"unknown")}else C=Y.parseDescriptor(h);let w=an.getIdentUrl(C),v=E9(await an.get(w,{configuration:r,ident:C,jsonResponse:!0,customErrorMessage:an.customPackageError})),b=Object.keys(v.versions).sort(m9.default.compareLoose),R=v["dist-tags"].latest||b[b.length-1],N=Tr.validRange(C.range);if(N){let oe=m9.default.maxSatisfying(b,N);oe!==null?R=oe:(p.reportWarning(0,`Unmet range ${Y.prettyRange(r,C.range)}; falling back to the latest version`),u=!0)}else Object.prototype.hasOwnProperty.call(v["dist-tags"],C.range)?R=v["dist-tags"][C.range]:C.range!=="unknown"&&(p.reportWarning(0,`Unknown tag ${Y.prettyRange(r,C.range)}; falling back to the latest version`),u=!0);let _=v.versions[R],J={...v,..._,version:R,versions:b},re;if(a!==null){re={};for(let oe of a){let pe=J[oe];if(typeof pe<"u")re[oe]=pe;else{p.reportWarning(1,`The ${ye.pretty(r,oe,ye.Type.CODE)} field doesn't exist inside ${Y.prettyIdent(r,C)}'s information`),u=!0;continue}}}else this.json||(delete J.dist,delete J.readme,delete J.users),re=J;p.reportJson(re),this.json||n.push(re)}});y9.inspect.styles.name="cyan";for(let p of n)(p!==n[0]||u)&&this.context.stdout.write(`
|
||||||
|
`),this.context.stdout.write(`${(0,y9.inspect)(p,{depth:1/0,colors:!0,compact:!1})}
|
||||||
|
`);return A.exitCode()}};Oh.paths=[["npm","info"]],Oh.usage=it.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 --fields versions"],["Show the readme of react","yarn npm info react --fields readme"],["Show a few fields of react","yarn npm info react --fields homepage,repository"]]});function E9(t){if(Array.isArray(t)){let e=[];for(let r of t)r=E9(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 o=E9(t[r]);o&&(e[r]=o)}return e}else return t||null}Ke();Ke();_t();var jBe=tt(K1()),Mh=class extends ct{constructor(){super(...arguments);this.scope=fe.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=fe.Boolean("--publish",!1,{description:"Login to the publish registry"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o=await Kk({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Ct.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let u=await JBt({configuration:r,registry:o,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),A=`/-/user/org.couchdb.user:${encodeURIComponent(u.name)}`,p=await an.put(A,u,{attemptedAs:u.name,configuration:r,registry:o,jsonResponse:!0,authType:an.AuthType.NO_AUTH});return await KBt(o,p.token,{configuration:r,scope:this.scope}),n.reportInfo(0,"Successfully logged in")})).exitCode()}};Mh.paths=[["npm","login"]],Mh.usage=it.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 function Kk({scope:t,publish:e,configuration:r,cwd:o}){return t&&e?Gn.getScopeRegistry(t,{configuration:r,type:Gn.RegistryType.PUBLISH_REGISTRY}):t?Gn.getScopeRegistry(t,{configuration:r}):e?Gn.getPublishRegistry((await sC(r,o)).manifest,{configuration:r}):Gn.getDefaultRegistry({configuration:r})}async function KBt(t,e,{configuration:r,scope:o}){let a=u=>A=>{let p=Ye.isIndexableObject(A)?A:{},h=p[u],C=Ye.isIndexableObject(h)?h:{};return{...p,[u]:{...C,npmAuthToken:e}}},n=o?{npmScopes:a(o)}:{npmRegistries:a(t)};return await Xe.updateHomeConfiguration(n)}async function JBt({configuration:t,registry:e,report:r,stdin:o,stdout:a}){r.reportInfo(0,`Logging in to ${ye.pretty(t,e,ye.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' permissionsLine 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 function pv(t,e){let r=`/-/package${an.getIdentUrl(t)}/dist-tags`;return an.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:an.customPackageError})}var qh=class extends ct{constructor(){super(...arguments);this.package=fe.String();this.tag=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new er(o.cwd,this.context.cwd);let n=Y.parseDescriptor(this.package,!0),u=n.range;if(!WBe.default.valid(u))throw new ot(`The range ${ye.pretty(r,n.range,ye.Type.RANGE)} must be a valid semver version`);let A=Gn.getPublishRegistry(a.manifest,{configuration:r}),p=ye.pretty(r,n,ye.Type.IDENT),h=ye.pretty(r,u,ye.Type.RANGE),C=ye.pretty(r,this.tag,ye.Type.CODE);return(await Ct.start({configuration:r,stdout:this.context.stdout},async v=>{let b=await pv(n,r);Object.prototype.hasOwnProperty.call(b,this.tag)&&b[this.tag]===u&&v.reportWarning(0,`Tag ${C} is already set to version ${h}`);let E=`/-/package${an.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await an.put(E,u,{configuration:r,registry:A,ident:n,jsonRequest:!0,jsonResponse:!0}),v.reportInfo(0,`Tag ${C} added to version ${h} of package ${p}`)})).exitCode()}};qh.paths=[["npm","tag","add"]],qh.usage=it.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"]]});Ke();_t();var jh=class extends ct{constructor(){super(...arguments);this.package=fe.String();this.tag=fe.String()}async execute(){if(this.tag==="latest")throw new ot("The 'latest' tag cannot be removed.");let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new er(o.cwd,this.context.cwd);let n=Y.parseIdent(this.package),u=Gn.getPublishRegistry(a.manifest,{configuration:r}),A=ye.pretty(r,this.tag,ye.Type.CODE),p=ye.pretty(r,n,ye.Type.IDENT),h=await pv(n,r);if(!Object.prototype.hasOwnProperty.call(h,this.tag))throw new ot(`${A} is not a tag of package ${p}`);return(await Ct.start({configuration:r,stdout:this.context.stdout},async w=>{let v=`/-/package${an.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await an.del(v,{configuration:r,registry:u,ident:n,jsonResponse:!0}),w.reportInfo(0,`Tag ${A} removed from package ${p}`)})).exitCode()}};jh.paths=[["npm","tag","remove"]],jh.usage=it.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"]]});Ke();Ke();_t();var Gh=class extends ct{constructor(){super(...arguments);this.scope=fe.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=fe.Boolean("--publish",!1,{description:"Print username for the publish registry"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),o;return this.scope&&this.publish?o=Gn.getScopeRegistry(this.scope,{configuration:r,type:Gn.RegistryType.PUBLISH_REGISTRY}):this.scope?o=Gn.getScopeRegistry(this.scope,{configuration:r}):this.publish?o=Gn.getPublishRegistry((await sC(r,this.context.cwd)).manifest,{configuration:r}):o=Gn.getDefaultRegistry({configuration:r}),(await Ct.start({configuration:r,stdout:this.context.stdout},async n=>{var A,p;let u;try{u=await an.get("/-/whoami",{configuration:r,registry:o,authType:an.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?Y.makeIdent(this.scope,""):void 0})}catch(h){if(((A=h.response)==null?void 0:A.statusCode)===401||((p=h.response)==null?void 0:p.statusCode)===403){n.reportError(41,"Authentication failed - your credentials may have expired");return}else throw h}n.reportInfo(0,u.username)})).exitCode()}};Gh.paths=[["npm","whoami"]],Gh.usage=it.Usage({category:"Npm-related commands",description:"display the name of the authenticated user",details:"\n Print the username associated with the current authentication settings to the standard output.\n\n When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\n\n When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\n ",examples:[["Print username for the default registry","yarn npm whoami"],["Print username for the registry on a given scope","yarn npm whoami --scope company"]]});var XBt={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:"STRING",default:null},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:[Nh,Oh,Mh,Uh,_h,qh,Hh,jh,Gh]},ZBt=XBt;var x9={};Yt(x9,{PatchCommand:()=>Kh,PatchCommitCommand:()=>Yh,PatchFetcher:()=>yv,PatchResolver:()=>Ev,default:()=>dvt,patchUtils:()=>vm});Ke();Ke();bt();Mc();var vm={};Yt(vm,{applyPatchFile:()=>Vk,diffFolders:()=>D9,ensureUnpatchedDescriptor:()=>I9,ensureUnpatchedLocator:()=>Xk,extractPackageToDisk:()=>v9,extractPatchFlags:()=>ZBe,isParentRequired:()=>B9,isPatchDescriptor:()=>zk,isPatchLocator:()=>Wh,loadPatchFiles:()=>mv,makeDescriptor:()=>Zk,makeLocator:()=>w9,makePatchHash:()=>S9,parseDescriptor:()=>gv,parseLocator:()=>dv,parsePatchFile:()=>hv,unpatchDescriptor:()=>pvt,unpatchLocator:()=>hvt});Ke();bt();Ke();bt();var $Bt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function ZC(t){return V.relative(wt.root,V.resolve(wt.root,Ae.toPortablePath(t)))}function evt(t){let e=t.trim().match($Bt);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 tvt=420,rvt=493;var YBe=()=>({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}),nvt=t=>({header:evt(t),parts:[]}),ivt={["@"]:"header",["-"]:"deletion",["+"]:"insertion",[" "]:"context",["\\"]:"pragma",undefined:"context"};function svt(t){let e=[],r=YBe(),o="parsing header",a=null,n=null;function u(){a&&(n&&(a.parts.push(n),n=null),r.hunks.push(a),a=null)}function A(){u(),e.push(r),r=YBe()}for(let p=0;p<t.length;p++){let h=t[p];if(o==="parsing header")if(h.startsWith("@@"))o="parsing hunks",r.hunks=[],p-=1;else if(h.startsWith("diff --git ")){r&&r.diffLineFromPath&&A();let C=h.match(/^diff --git a\/(.*?) b\/(.*?)\s*$/);if(!C)throw new Error(`Bad diff line: ${h}`);r.diffLineFromPath=C[1],r.diffLineToPath=C[2]}else if(h.startsWith("old mode "))r.oldMode=h.slice(9).trim();else if(h.startsWith("new mode "))r.newMode=h.slice(9).trim();else if(h.startsWith("deleted file mode "))r.deletedFileMode=h.slice(18).trim();else if(h.startsWith("new file mode "))r.newFileMode=h.slice(14).trim();else if(h.startsWith("rename from "))r.renameFrom=h.slice(12).trim();else if(h.startsWith("rename to "))r.renameTo=h.slice(10).trim();e
Line truncated
|
||||||
|
`)+(a.hunk.parts[0].noNewlineAtEndOfFile?"":`
|
||||||
|
`):"";await e.mkdirpPromise(V.dirname(a.path),{chmod:493,utimes:[Ii.SAFE_TIME,Ii.SAFE_TIME]}),await e.writeFilePromise(a.path,n,{mode:a.mode}),await e.utimesPromise(a.path,Ii.SAFE_TIME,Ii.SAFE_TIME)}break;case"patch":await eI(e,a.path,async()=>{await uvt(a,{baseFs:e,dryRun:r})});break;case"mode change":{let u=(await e.statPromise(a.path)).mode;if(KBe(a.newMode)!==KBe(u))continue;await eI(e,a.path,async()=>{await e.chmodPromise(a.path,a.newMode)})}break;default:Ye.assertNever(a);break}}function KBe(t){return(t&64)>0}function JBe(t){return t.replace(/\s+$/,"")}function cvt(t,e){return JBe(t)===JBe(e)}async function uvt({hunks:t,path:e},{baseFs:r,dryRun:o=!1}){let a=await r.statSync(e).mode,u=(await r.readFileSync(e,"utf8")).split(/\n/),A=[],p=0,h=0;for(let w of t){let v=Math.max(h,w.header.patched.start+p),b=Math.max(0,v-h),E=Math.max(0,u.length-v-w.header.original.length),R=Math.max(b,E),N=0,_=0,J=null;for(;N<=R;){if(N<=b&&(_=v-N,J=VBe(w,u,_),J!==null)){N=-N;break}if(N<=E&&(_=v+N,J=VBe(w,u,_),J!==null))break;N+=1}if(J===null)throw new $C(t.indexOf(w),w);A.push(J),p+=N,h=_+w.header.original.length}if(o)return;let C=0;for(let w of A)for(let v of w)switch(v.type){case"splice":{let b=v.index+C;u.splice(b,v.numToDelete,...v.linesToInsert),C+=v.linesToInsert.length-v.numToDelete}break;case"pop":u.pop();break;case"push":u.push(v.line);break;default:Ye.assertNever(v);break}await r.writeFilePromise(e,u.join(`
|
||||||
|
`),{mode:a})}function VBe(t,e,r){let o=[];for(let a of t.parts)switch(a.type){case"context":case"deletion":{for(let n of a.lines){let u=e[r];if(u==null||!cvt(u,n))return null;r+=1}a.type==="deletion"&&(o.push({type:"splice",index:r-a.lines.length,numToDelete:a.lines.length,linesToInsert:[]}),a.noNewlineAtEndOfFile&&o.push({type:"push",line:""}))}break;case"insertion":o.push({type:"splice",index:r,numToDelete:0,linesToInsert:a.lines}),a.noNewlineAtEndOfFile&&o.push({type:"pop"});break;default:Ye.assertNever(a.type);break}return o}var fvt=/^builtin<([^>]+)>$/;function tI(t,e){let{protocol:r,source:o,selector:a,params:n}=Y.parseRange(t);if(r!=="patch:")throw new Error("Invalid patch range");if(o===null)throw new Error("Patch locators must explicitly define their source");let u=a?a.split(/&/).map(C=>Ae.toPortablePath(C)):[],A=n&&typeof n.locator=="string"?Y.parseLocator(n.locator):null,p=n&&typeof n.version=="string"?n.version:null,h=e(o);return{parentLocator:A,sourceItem:h,patchPaths:u,sourceVersion:p}}function zk(t){return t.range.startsWith("patch:")}function Wh(t){return t.reference.startsWith("patch:")}function gv(t){let{sourceItem:e,...r}=tI(t.range,Y.parseDescriptor);return{...r,sourceDescriptor:e}}function dv(t){let{sourceItem:e,...r}=tI(t.reference,Y.parseLocator);return{...r,sourceLocator:e}}function pvt(t){let{sourceItem:e}=tI(t.range,Y.parseDescriptor);return e}function hvt(t){let{sourceItem:e}=tI(t.reference,Y.parseLocator);return e}function I9(t){if(!zk(t))return t;let{sourceItem:e}=tI(t.range,Y.parseDescriptor);return e}function Xk(t){if(!Wh(t))return t;let{sourceItem:e}=tI(t.reference,Y.parseLocator);return e}function zBe({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:o,patchHash:a},n){let u=t!==null?{locator:Y.stringifyLocator(t)}:{},A=typeof o<"u"?{version:o}:{},p=typeof a<"u"?{hash:a}:{};return Y.makeRange({protocol:"patch:",source:n(e),selector:r.join("&"),params:{...A,...p,...u}})}function Zk(t,{parentLocator:e,sourceDescriptor:r,patchPaths:o}){return Y.makeDescriptor(t,zBe({parentLocator:e,sourceItem:r,patchPaths:o},Y.stringifyDescriptor))}function w9(t,{parentLocator:e,sourcePackage:r,patchPaths:o,patchHash:a}){return Y.makeLocator(t,zBe({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:o,patchHash:a},Y.stringifyLocator))}function XBe({onAbsolute:t,onRelative:e,onProject:r,onBuiltin:o},a){let n=a.lastIndexOf("!");n!==-1&&(a=a.slice(n+1));let u=a.match(fvt);return u!==null?o(u[1]):a.startsWith("~/")?r(a.slice(2)):V.isAbsolute(a)?t(a):e(a)}function ZBe(t){let e=t.lastIndexOf("!");return{optional:(e!==-1?new Set(t.slice(0,e).split(/!/)):new Set).has("optional")}}function B9(t){return XBe({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},t)}async function mv(t,e,r){let o=t!==null?await r.fetcher.fetch(t,r):null,a=o&&o.localPath?{packageFs:new An(wt.root),prefixPath:V.relative(wt.root,o.localPath)}:o;o&&o!==a&&o.releaseFs&&o.releaseFs();let n=await Ye.releaseAfterUseAsync(async()=>await Promise.all(e.map(async u=>{let A=ZBe(u),p=await XBe({onAbsolute:async h=>await ae.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(V.join(a.prefixPath,h),"utf8")},onProject:async h=>await ae.readFilePromise(V.join(r.project.cwd,h),"utf8"),onBuiltin:async h=>await r.project.configuration.firstHook(C=>C.getBuiltinPatch,r.project,h)},u);return{...A,source:p}})));for(let u of n)typeof u.source=="string"&&(u.source=u.source.replace(/\r\n?/g,`
|
||||||
|
`));return n}async function v9(t,{cache:e,project:r}){let o=r.storedPackages.get(t.locatorHash);if(typeof o>"u")throw new Error("Assertion failed: Expected the package to be registered");let a=Xk(t),n=r.storedChecksums,u=new Pi,A=await ae.mktempPromise(),p=V.join(A,"source"),h=V.join(A,"user"),C=V.join(A,".yarn-patch.json"),w=r.configuration.makeFetcher(),v=[];try{let b,E;if(t.locatorHash===a.locatorHash){let R=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:u});v.push(()=>{var N;return(N=R.releaseFs)==null?void 0:N.call(R)}),b=R,E=R}else b=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:u}),v.push(()=>{var R;return(R=b.releaseFs)==null?void 0:R.call(b)}),E=await w.fetch(t,{cache:e,project:r,fetcher:w,checksums:n,report:u}),v.push(()=>{var R;return(R=E.releaseFs)==null?void 0:R.call(E)});await Promise.all([ae.copyPromise(p,b.prefixPath,{baseFs:b.packageFs}),ae.copyPromise(h,E.prefixPath,{baseFs:E.packageFs}),ae.writeJsonPromise(C,{locator:Y.stringifyLocator(t),version:o.version})])}finally{for(let b of v)b()}return ae.detachTemp(A),h}async function D9(t,e){let r=Ae.fromPortablePath(t).replace(/\\/g,"/"),o=Ae.fromPortablePath(e).replace(/\\/g,"/"),{stdout:a,stderr:n}=await Mr.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,o],{cwd:Ae.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 u=r.startsWith("/")?A=>A.slice(1):A=>A;return a.replace(new RegExp(`(a|b)(${Ye.escapeRegExp(`/${u(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${Ye.escapeRegExp(`/${u(o)}/`)}`,"g"),"$1/").replace(new RegExp(Ye.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(Ye.escapeRegExp(`${o}/`),"g"),"")}function S9(t,e){let r=[];for(let{source:o}of t){if(o===null)continue;let a=hv(o);for(let n of a){let{semverExclusivity:u,...A}=n;u!==null&&e!==null&&!Tr.satisfiesWithPrereleases(e,u)||r.push(JSON.stringify(A))}}return bn.makeHash(`${3}`,...r).slice(0,6)}Ke();function $Be(t,{configuration:e,report:r}){for(let o of t.parts)for(let a of o.lines)switch(o.type){case"context":r.reportInfo(null,` ${ye.pretty(e,a,"grey")}`);break;case"deletion":r.reportError(28,`- ${ye.pretty(e,a,ye.Type.REMOVED)}`);break;case"insertion":r.reportError(28,`+ ${ye.pretty(e,a,ye.Type.ADDED)}`);break;default:Ye.assertNever(o.type)}}var yv=class{supports(e,r){return!!Wh(e)}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${Y.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:Y.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async patchPackage(e,r){let{parentLocator:o,sourceLocator:a,sourceVersion:n,patchPaths:u}=dv(e),A=await mv(o,u,r),p=await ae.mktempPromise(),h=V.join(p,"current.zip"),C=await r.fetcher.fetch(a,r),w=Y.getIdentVendorPath(e),v=new os(h,{create:!0,level:r.project.configuration.get("compressionLevel")});await Ye.releaseAfterUseAsync(async()=>{await v.copyPromise(w,C.prefixPath,{baseFs:C.packageFs,stableSort:!0})},C.releaseFs),v.saveAndClose();for(let{source:b,optional:E}of A){if(b===null)continue;let R=new os(h,{level:r.project.configuration.get("compressionLevel")}),N=new An(V.resolve(wt.root,w),{baseFs:R});try{await Vk(hv(b),{baseFs:N,version:n})}catch(_){if(!(_ instanceof $C))throw _;let J=r.project.configuration.get("enableInlineHunks"),re=!J&&!E?" (set enableInlineHunks for details)":"",oe=`${Y.prettyLocator(r.project.configuration,e)}: ${_.message}${re}`,pe=he=>{!J||$Be(_.hunk,{configuration:r.project.configuration,report:he})};if(R.discardAndClose(),E){r.report.reportWarningOnce(66,oe,{reportExtra:pe});continue}else throw new Jt(66,oe,pe)}R.saveAndClose()}return new os(h,{level:r.project.configuration.get("compressionLevel")})}};Ke();var Ev=class{supportsDescriptor(e,r){return!!zk(e)}supportsLocator(e,r){return!!Wh(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){let{patchPaths:a}=gv(e);return a.every(n=>!B9(n))?e:Y.bindDescriptor(e,{locator:Y.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:o}=gv(e);return{sourceDescriptor:r.project.configuration.normalizeDependency(o)}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:a,patchPaths:n}=gv(e),u=await mv(a,n,o.fetchOptions),A=r.sourceDescriptor;if(typeof A>"u")throw new Error("Assertion failed: The dependency should have been resolved");let p=S9(u,A.version);return[w9(e,{parentLocator:a,sourcePackage:A,patchPaths:n,patchHash:p})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let{sourceLocator:o}=dv(e);return{...await r.resolver.resolve(o,r),...e}}};Ke();bt();_t();var Yh=class extends ct{constructor(){super(...arguments);this.save=fe.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=fe.String()}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new er(o.cwd,this.context.cwd);await o.restoreInstallState();let n=V.resolve(this.context.cwd,Ae.toPortablePath(this.patchFolder)),u=V.join(n,"../source"),A=V.join(n,"../.yarn-patch.json");if(!ae.existsSync(u))throw new ot("The argument folder didn't get created by 'yarn patch'");let p=await D9(u,n),h=await ae.readJsonPromise(A),C=Y.parseLocator(h.locator,!0);if(!o.storedPackages.has(C.locatorHash))throw new ot("No package found in the project for the given locator");if(!this.save){this.context.stdout.write(p);return}let w=r.get("patchFolder"),v=V.join(w,`${Y.slugifyLocator(C)}.patch`);await ae.mkdirPromise(w,{recursive:!0}),await ae.writeFilePromise(v,p);let b=[],E=new Map;for(let R of o.storedPackages.values()){if(Y.isVirtualLocator(R))continue;let N=R.dependencies.get(C.identHash);if(!N)continue;let _=Y.ensureDevirtualizedDescriptor(N),J=I9(_),re=o.storedResolutions.get(J.descriptorHash);if(!re)throw new Error("Assertion failed: Expected the resolution to have been registered");if(!o.storedPackagLine truncated
|
||||||
|
${A.map(p=>`
|
||||||
|
- ${Y.prettyLocator(r,p)}`).join("")}`);u=A[0]}if(!o.storedPackages.has(u.locatorHash))throw new ot("No package found in the project for the given locator");await Ct.start({configuration:r,json:this.json,stdout:this.context.stdout},async A=>{let p=Xk(u),h=await v9(u,{cache:n,project:o});A.reportJson({locator:Y.stringifyLocator(p),path:Ae.fromPortablePath(h)});let C=this.update?" along with its current modifications":"";A.reportInfo(0,`Package ${Y.prettyLocator(r,p)} got extracted with success${C}!`),A.reportInfo(0,`You can now edit the following folder: ${ye.pretty(r,Ae.fromPortablePath(h),"magenta")}`),A.reportInfo(0,`Once you are done run ${ye.pretty(r,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${Ae.fromPortablePath(h)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};Kh.paths=[["patch"]],Kh.usage=it.Usage({description:"prepare a package for patching",details:"\n This command will cause a package to be extracted in a temporary directory intended to be editable at will.\n\n Once you're done with your changes, run `yarn patch-commit -s <path>` (with `<path>` being the temporary directory you received) to generate a patchfile and register it into your top-level manifest via the `patch:` protocol. Run `yarn patch-commit -h` for more details.\n\n Calling the command when you already have a patch won't import it by default (in other words, the default behavior is to reset existing patches). However, adding the `-u,--update` flag will import any current patch.\n "});var gvt={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:[Yh,Kh],fetchers:[yv],resolvers:[Ev]},dvt=gvt;var Q9={};Yt(Q9,{PnpmLinker:()=>Cv,default:()=>Ivt});Ke();bt();_t();var Cv=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 o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new ot(`The project in ${ye.pretty(r.project.configuration,`${r.project.cwd}/package.json`,ye.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 ot(`Couldn't find ${Y.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 o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new ot(`The project in ${ye.pretty(r.project.configuration,`${r.project.cwd}/package.json`,ye.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 u=e,A=e;do{A=u,u=V.dirname(A);let p=a.locatorByPath.get(A);if(p)return p}while(u!==A);return null}makeInstaller(e){return new P9(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="pnpm"}},P9=class{constructor(e){this.opts=e;this.asyncActions=new Ye.AsyncActions(10);this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.indexFolderPromise=aD(ae,{indexPath:V.join(e.project.configuration.get("globalFolder"),"index")})}attachCustomData(e){}async installPackage(e,r,o){switch(e.linkType){case"SOFT":return this.installPackageSoft(e,r,o);case"HARD":return this.installPackageHard(e,r,o)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(e,r,o){let a=V.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(e)?V.join(a,Nr.nodeModules):null;return this.customData.pathsByLocator.set(e.locatorHash,{packageLocation:a,dependenciesLocation:n}),{packageLocation:a,buildDirective:null}}async installPackageHard(e,r,o){let a=mvt(e,{project:this.opts.project}),n=a.packageLocation;this.customData.locatorByPath.set(n,Y.stringifyLocator(e)),this.customData.pathsByLocator.set(e.locatorHash,a),o.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{await ae.mkdirPromise(n,{recursive:!0}),await ae.copyPromise(n,r.prefixPath,{baseFs:r.packageFs,overwrite:!1,linkStrategy:{type:"HardlinkFromIndex",indexPath:await this.indexFolderPromise,autoRepair:!0}})}));let A=Y.isVirtualLocator(e)?Y.devirtualizeLocator(e):e,p={manifest:await Lt.tryFind(r.prefixPath,{baseFs:r.packageFs})??new Lt,misc:{hasBindingGyp:yA.hasBindingGyp(r)}},h=this.opts.project.getDependencyMeta(A,e.version),C=yA.extractBuildScripts(e,p,h,{configuration:this.opts.project.configuration,report:this.opts.report});return{packageLocation:n,buildDirective:C}}async attachInternalLine truncated
|
||||||
|
|
||||||
|
${Bvt}
|
||||||
|
`,"--",...o],{cwd:t,strict:!0})},async makeReset(t,e){let r=e.map(o=>Ae.fromPortablePath(o.path));await Mr.execvp("git",["reset","HEAD","--",...r],{cwd:t,strict:!0})}};var ove={async findRoot(t){return await Iv(t,{marker:".hg"})},async filterChanges(t,e,r){return[]},async genCommitMessage(t,e){return""},async makeStage(t,e){},async makeCommit(t,e,r){},async makeReset(t,e){},async makeUpdate(t,e){}};var Pvt=[sve,ove],Jh=class extends ct{constructor(){super(...arguments);this.commit=fe.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=fe.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=fe.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=fe.Boolean("-u,--update",!1,{hidden:!0})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd),{driver:a,root:n}=await bvt(o.cwd),u=[r.get("cacheFolder"),r.get("globalFolder"),r.get("virtualFolder"),r.get("yarnPath")];await r.triggerHook(w=>w.populateYarnPaths,o,w=>{u.push(w)});let A=new Set;for(let w of u)for(let v of Qvt(n,w))A.add(v);let p=new Set([r.get("rcFilename"),r.get("lockfileFilename"),"package.json"]),h=await a.filterChanges(n,A,p),C=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${C}
|
||||||
|
`);else for(let w of h)this.context.stdout.write(`${Ae.fromPortablePath(w.path)}
|
||||||
|
`);else if(this.reset){let w=await a.filterChanges(n,A,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,C):(await a.makeStage(n,h),this.context.stdout.write(C))}};Jh.paths=[["stage"]],Jh.usage=it.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 function bvt(t){let e=null,r=null;for(let o of Pvt)if((r=await o.findRoot(t))!==null){e=o;break}if(e===null||r===null)throw new ot("No stage driver has been found for your current project");return{driver:e,root:r}}function Qvt(t,e){let r=[];if(e===null)return r;for(;;){(e===t||e.startsWith(`${t}/`))&&r.push(e);let o;try{o=ae.statSync(e)}catch{break}if(o.isSymbolicLink())e=V.resolve(V.dirname(e),ae.readlinkSync(e));else break}return r}var kvt={commands:[Jh]},Fvt=kvt;var O9={};Yt(O9,{default:()=>_vt});Ke();Ke();bt();var cve=tt(ii());Ke();var ave=tt(zH()),Rvt="e8e1bd300d860104bb8c58453ffa1eb4",Tvt="OFCNCOG2CU",lve=async(t,e)=>{var n;let r=Y.stringifyIdent(t),a=Lvt(e).initIndex("npm-search");try{return((n=(await a.getObject(r,{attributesToRetrieve:["types"]})).types)==null?void 0:n.ts)==="definitely-typed"}catch{return!1}},Lvt=t=>(0,ave.default)(Tvt,Rvt,{requester:{async send(r){try{let o=await ln.request(r.url,r.data||null,{configuration:t,headers:r.headers});return{content:o.body,isTimedOut:!1,status:o.statusCode}}catch(o){return{content:o.response.body,isTimedOut:!1,status:o.response.statusCode}}}}});var uve=t=>t.scope?`${t.scope}__${t.name}`:`${t.name}`,Nvt=async(t,e,r,o)=>{if(r.scope==="types")return;let{project:a}=t,{configuration:n}=a;if(!(n.get("tsEnableAutoTypes")??ae.existsSync(V.join(a.cwd,"tsconfig.json"))))return;let A=n.makeResolver(),p={project:a,resolver:A,report:new Pi};if(!await lve(r,n))return;let C=uve(r),w=Y.parseRange(r.range).selector;if(!Tr.validRange(w)){let N=n.normalizeDependency(r),_=await A.getCandidates(N,{},p);w=Y.parseRange(_[0].reference).selector}let v=cve.default.coerce(w);if(v===null)return;let b=`${$c.Modifier.CARET}${v.major}`,E=Y.makeDescriptor(Y.makeIdent("types",C),b),R=Ye.mapAndFind(a.workspaces,N=>{var oe,pe;let _=(oe=N.manifest.dependencies.get(r.identHash))==null?void 0:oe.descriptorHash,J=(pe=N.manifest.devDependencies.get(r.identHash))==null?void 0:pe.descriptorHash;if(_!==r.descriptorHash&&J!==r.descriptorHash)return Ye.mapAndFind.skip;let re=[];for(let he of Lt.allDependencies){let ve=N.manifest[he].get(E.identHash);typeof ve>"u"||re.push([he,ve])}return re.length===0?Ye.mapAndFind.skip:re});if(typeof R<"u")for(let[N,_]of R)t.manifest[N].set(_.identHash,_);else{try{let N=n.normalizeDependency(E);if((await A.getCandidates(N,{},p)).length===0)return}catch{return}t.manifest[$c.Target.DEVELOPMENT].set(E.identHash,E)}},Ovt=async(t,e,r)=>{if(r.scope==="types")return;let{project:o}=t,{configuration:a}=o;if(!(a.get("tsEnableAutoTypes")??ae.existsSync(V.join(o.cwd,"tsconfig.json"))))return;let u=uve(r),A=Y.makeIdent("types",u);for(let p of Lt.allDependencies)typeof t.manifest[p].get(A.identHash)>"u"||t.manifest[p].delete(A.identHash)},Mvt=(t,e)=>{e.publishConfig&&e.publishConfig.typings&&(e.typings=e.publishConfig.typings),e.publishConfig&&e.publishConfig.types&&(e.types=e.publishConfig.types)},Uvt={configuration:{tsEnableAutoTypes:{description:"Whether Yarn should auto-install @types/ dependencies on 'yarn add'",type:"BOOLEAN",isNullable:!0,default:null}},hooks:{afterWorkspaceDependencyAddition:Nvt,afterWorkspaceDependencyRemoval:Ovt,beforeWorkspacePacking:Mvt}},_vt=Uvt;var q9={};Yt(q9,{VersionApplyCommand:()=>Vh,VersionCheckCommand:()=>zh,VersionCommand:()=>Xh,default:()=>sDt,versionUtils:()=>sI});Ke();Ke();_t();var sI={};Yt(sI,{Decision:()=>nI,applyPrerelease:()=>dve,applyReleases:()=>H9,applyStrategy:()=>tF,clearVersionFiles:()=>M9,getUndecidedDependentWorkspaces:()=>vv,getUndecidedWorkspaces:()=>eF,openVersionFile:()=>iI,requireMoreDecisions:()=>rDt,resolveVersionFiles:()=>Bv,suggestStrategy:()=>_9,updateVersionFiles:()=>U9,vali
Line truncated
|
||||||
|
- ${A.map(b=>Ae.fromPortablePath(b)).join(`
|
||||||
|
- `)}`);let p=new Set(Ye.mapAndFilter(n,b=>{let E=t.tryWorkspaceByFilePath(b);return E===null?Ye.mapAndFilter.skip:E}));if(A.length===0&&p.size===0&&!e)return null;let h=A.length===1?A[0]:V.join(u,`${bn.makeHash(Math.random().toString()).slice(0,8)}.yml`),C=ae.existsSync(h)?await ae.readFilePromise(h,"utf8"):"{}",w=Yi(C),v=new Map;for(let b of w.declined||[]){let E=Y.parseIdent(b),R=t.getWorkspaceByIdent(E);v.set(R,"decline")}for(let[b,E]of Object.entries(w.releases||{})){let R=Y.parseIdent(b),N=t.getWorkspaceByIdent(R);v.set(N,rI(E))}return{project:t,root:o,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:new Set(n),changedWorkspaces:p,releaseRoots:new Set([...p].filter(b=>b.manifest.version!==null)),releases:v,async saveAll(){let b={},E=[],R=[];for(let N of t.workspaces){if(N.manifest.version===null)continue;let _=Y.stringifyIdent(N.locator),J=v.get(N);J==="decline"?E.push(_):typeof J<"u"?b[_]=rI(J):p.has(N)&&R.push(_)}await ae.mkdirPromise(V.dirname(h),{recursive:!0}),await ae.changeFilePromise(h,Ia(new Ia.PreserveOrdering({releases:Object.keys(b).length>0?b:void 0,declined:E.length>0?E:void 0,undecided:R.length>0?R:void 0})))}}}function rDt(t){return eF(t).size>0||vv(t).length>0}function eF(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 vv(t,{include:e=new Set}={}){let r=[],o=new Map(Ye.mapAndFilter([...t.releases],([n,u])=>u==="decline"?Ye.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=new Map(Ye.mapAndFilter([...t.releases],([n,u])=>u!=="decline"?Ye.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of t.project.workspaces)if(!(!e.has(n)&&(a.has(n.anchoredLocator.locatorHash)||o.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let u of Lt.hardDependencies)for(let A of n.manifest.getForScope(u).values()){let p=t.project.tryWorkspaceByDescriptor(A);p!==null&&o.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}return r}function _9(t,e){let r=DA.default.clean(e);for(let o of Object.values(nI))if(o!=="undecided"&&o!=="decline"&&DA.default.inc(t,o)===r)return o;return null}function tF(t,e){if(DA.default.valid(e))return e;if(t===null)throw new ot(`Cannot apply the release strategy "${e}" unless the workspace already has a valid version`);if(!DA.default.valid(t))throw new ot(`Cannot apply the release strategy "${e}" on a non-semver version (${t})`);let r=DA.default.inc(t,e);if(r===null)throw new ot(`Cannot apply the release strategy "${e}" on the specified version (${t})`);return r}function H9(t,e,{report:r}){let o=new Map;for(let a of t.workspaces)for(let n of Lt.allDependencies)for(let u of a.manifest[n].values()){let A=t.tryWorkspaceByDescriptor(u);if(A===null||!e.has(A))continue;Ye.getArrayWithDefault(o,A).push([a,n,u.identHash])}for(let[a,n]of e){let u=a.manifest.version;a.manifest.version=n,DA.default.prerelease(n)===null?delete a.manifest.raw.stableVersion:a.manifest.raw.stableVersion||(a.manifest.raw.stableVersion=u);let A=a.manifest.name!==null?Y.stringifyIdent(a.manifest.name):null;r.reportInfo(0,`${Y.prettyLocator(t.configuration,a.anchoredLocator)}: Bumped to ${n}`),r.reportJson({cwd:Ae.fromPortablePath(a.cwd),ident:A,oldVersion:u,newVersion:n});let p=o.get(a);if(!(typeof p>"u"))for(let[h,C,w]of p){let v=h.manifest[C].get(w);if(typeof v>"u")throw new Error("Assertion failed: The dependency should have existed");let b=v.range,E=!1;if(b.startsWith(oi.protocol)&&(b=b.slice(oi.protocol.length),E=!0,b===a.relativeCwd))continue;let R=b.match(tDt);if(!R){r.reportWarning(0,`Couldn't auto-upgrade range ${b} (in ${Y.prettyLocator(t.configuration,h.anchoredLocator)})`);continue}let N=`${R[1]}${n}`;E&&(N=`${oi.protocol}${N}`);let _=Y.makeDescriptor(v,N);h.manifest[C].set(w,_)}}}var nDt=new Map([["%n",{extract:t=>t.length>=1?[t[0],t.slice(1)]:null,generate:(t=0)=>`${t+1}`}]]);function dve(t,{current:e,prerelease:r}){let o=new DA.default.SemVer(e),a=o.prerelease.slice(),n=[];o.prerelease=[],o.format()!==t&&(a.length=0);let u=!0,A=r.split(/\./g);for(let p of A){let h=nDt.get(p);if(typeof h>"u")n.push(p),a[0]===p?a.shift():u=!1;else{let C=u?h.extract(a):null;C!==null&&typeof C[0]=="number"?(n.push(h.generate(C[0])),a=C[1]):(n.push(h.generate()),u=!1)}}return o.prerelease&&(o.prerelease=[]),`${t}-${n.join(".")}`}var Vh=class extends ct{constructor(){super(...arguments);this.all=fe.Boolean("--all",!1,{description:"Apply the deferred version changes on all workspaces"});this.dryRun=fe.Boolean("--dry-run",!1,{description:"Print the versions without actually generating the package archive"});this.prerelease=fe.String("--prerelease",{description:"Add a prerelease identifier to new versions",tolerateBoolean:!0});this.recursive=fe.Boolean("-R,--recursive",{description:"Release the transitive workspaces as well"});this.json=fe.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Xe.find(this.context.cwd,this.context.plugins),{proLine 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.%d\`) 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"]]});Ke();bt();_t();var rF=tt(ii());var zh=class extends ct{constructor(){super(...arguments);this.interactive=fe.Boolean("-i,--interactive",{description:"Open an interactive interface used to set version bumps"})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){yC(this.context);let{Gem:r}=await Promise.resolve().then(()=>(zQ(),B6)),{ScrollableItems:o}=await Promise.resolve().then(()=>(ek(),$Q)),{FocusRequest:a}=await Promise.resolve().then(()=>(D6(),pwe)),{useListInput:n}=await Promise.resolve().then(()=>(ZQ(),hwe)),{renderForm:u}=await Promise.resolve().then(()=>(ik(),nk)),{Box:A,Text:p}=await Promise.resolve().then(()=>tt(ac())),{default:h,useCallback:C,useState:w}=await Promise.resolve().then(()=>tt(en())),v=await Xe.find(this.context.cwd,this.context.plugins),{project:b,workspace:E}=await St.find(v,this.context.cwd);if(!E)throw new er(b.cwd,this.context.cwd);await b.restoreInstallState();let R=await iI(b);if(R===null||R.releaseRoots.size===0)return 0;if(R.root===null)throw new ot("This command can only be run on Git repositories");let N=()=>h.createElement(A,{flexDirection:"row",paddingBottom:1},h.createElement(A,{flexDirection:"column",width:60},h.createElement(A,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(A,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(A,{flexDirection:"column"},h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<enter>")," to save.")),h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"<ctrl+c>")," to abort.")))),_=({workspace:ve,active:ge,decision:le,setDecision:xe})=>{let g=ve.manifest.raw.stableVersion??ve.manifest.version;if(g===null)throw new Error(`Assertion failed: The version should have been set (${Y.prettyLocator(v,ve.anchoredLocator)})`);if(rF.default.prerelease(g)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${g})`);let De=["undecided","decline","patch","minor","major"];n(le,De,{active:ge,minus:"left",plus:"right",set:xe});let Ee=le==="undecided"?h.createElement(p,{color:"yellow"},g):le==="decline"?h.createElement(p,{color:"green"},g):h.createElement(p,null,h.createElement(p,{color:"magenta"},g)," \u2192 ",h.createElement(p,{color:"green"},rF.default.valid(le)?le:rF.default.inc(g,le)));return h.createElement(A,{flexDirection:"column"},h.createElement(A,null,h.createElement(p,null,Y.prettyLocator(v,ve.anchoredLocator)," - ",Ee)),h.createElement(A,null,De.map(de=>h.createElement(A,{key:de,paddingLeft:2},h.createElement(p,null,h.createElement(r,{active:de===le})," ",de)))))},J=ve=>{let ge=new Set(R.releaseRoots),le=new Map([...ve].filter(([xe])=>ge.has(xe)));for(;;){let xe=vv({project:R.project,releases:le}),g=!1;if(xe.length>0){for(let[De]of xe)if(!ge.has(De)){ge.add(De),g=!0;let Ee=ve.get(De);typeof Ee<"u"&&le.set(De,Ee)}}if(!g)break}return{relevantWorkspaces:ge,relevantReleases:le}},re=()=>{let[ve,ge]=w(()=>new Map(R.releases)),le=C((xe,g)=>{let De=new Map(ve);g!=="undecided"?De.set(xe,g):De.delete(xe);let{relevantReleases:Ee}=J(De);ge(Ee)},[ve,ge]);return[ve,le]},oe=({workspaces:ve,releases:ge})=>{let le=[];le.push(`${ve.size} total`);let xe=0,g=0;for(let De of ve){let Ee=ge.get(De);typeof Ee>"u"?g+=1:Ee!=="decline"&&(xe+=1)}return le.push(`${xe} release${xe===1?"":"s"}`),le.push(`${g} remaining`),h.createElement(p,{color:"yellow"},le.join(", "))},he=await u(({useSubmit:ve})=>{let[ge,le]=re();ve(ge);let{relevantWorkspaces:xe}=J(ge),g=new Set([...xe].filter(ne=>!R.releaseRoots.has(ne))),[De,Ee]=w(0),de=C(ne=>{switch(ne){case a.BEFORE:Ee(De-1);break;case a.AFTER:Ee(De+1);break}},[De,Ee]);return h.createElement(A,{flexDirection:"column"},h.createElement(N,null),h.createElement(A,null,h.createElement(p,{wrap:"wrap"},"The following files have been modified in your local checkout.")),h.createElement(A,{flexDirection:"column",marginTop:1,paddingLeft:2},[...R.changedFiles].map(ne=>h.createElement(A,{key:ne},h.createElement(p,null,h.createElement(p,{color:"grey"},Ae.fromPortablePath(R.root)),Ae.sep,Ae.relative(Ae.fromPortablePath(R.root),Ae.fromPortablePath(ne)))))),R.releaseRoots.size>0&&h.createElement(h.Fragment,null,h.createElement(A,{marginTop:1},h.createElement(p,{wrap:"wrap"},"Because of those files having been modified, the following workspaces may need to be released again (note that private workspaces are also shown here, because even tho
Line truncated
|
||||||
|
/*
|
||||||
|
object-assign
|
||||||
|
(c) Sindre Sorhus
|
||||||
|
@license MIT
|
||||||
|
*/
|
||||||
|
/*!
|
||||||
|
* buildToken
|
||||||
|
* Builds OAuth token prefix (helper function)
|
||||||
|
*
|
||||||
|
* @name buildToken
|
||||||
|
* @function
|
||||||
|
* @param {GitUrl} obj The parsed Git url object.
|
||||||
|
* @return {String} token prefix
|
||||||
|
*/
|
||||||
|
/*!
|
||||||
|
* fill-range <https://github.com/jonschlinkert/fill-range>
|
||||||
|
*
|
||||||
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*/
|
||||||
|
/*!
|
||||||
|
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
||||||
|
*
|
||||||
|
* Copyright (c) 2014-2016, Jon Schlinkert.
|
||||||
|
* Licensed under the MIT License.
|
||||||
|
*/
|
||||||
|
/*!
|
||||||
|
* is-glob <https://github.com/jonschlinkert/is-glob>
|
||||||
|
*
|
||||||
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
/*!
|
||||||
|
* is-number <https://github.com/jonschlinkert/is-number>
|
||||||
|
*
|
||||||
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
/*!
|
||||||
|
* is-windows <https://github.com/jonschlinkert/is-windows>
|
||||||
|
*
|
||||||
|
* Copyright © 2015-2018, Jon Schlinkert.
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
/*!
|
||||||
|
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
||||||
|
*
|
||||||
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
@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 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.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
@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 React v0.18.0
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
/** @license React v0.24.0
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
/** @license React v16.13.1
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
nodeLinker: node-modules
|
||||||
|
|
||||||
|
yarnPath: .yarn/releases/yarn-4.0.0-rc.40.cjs
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"name": "discourse-korean-localization",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Discourse 관리자 설정 화면에서 내부 설정 키를 영어 문장으로 표시하는 항목을 자연스러운 한국어 이름으로 바꾼다.",
|
||||||
|
"main": "index.js",
|
||||||
|
"directories": {
|
||||||
|
"doc": "docs"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "yarn check:ruby && yarn check:yaml",
|
||||||
|
"check:ruby": "ruby -c plugin.rb",
|
||||||
|
"check:yaml": "ruby -e 'require %q(yaml); YAML.load_file(%q(config/locales/server.ko.yml)); puts %q(YAML_OK)'"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://gitea.itosm.co.kr/syskiller/discourse-korean-localization.git"
|
||||||
|
},
|
||||||
|
"keywords": [],
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"private": true,
|
||||||
|
"packageManager": "yarn@4.0.0-rc.40"
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# This file is generated by running "yarn install" inside your project.
|
||||||
|
# Manual changes might be lost - proceed with caution!
|
||||||
|
|
||||||
|
__metadata:
|
||||||
|
version: 7
|
||||||
|
|
||||||
|
"discourse-korean-localization@workspace:.":
|
||||||
|
version: 0.0.0-use.local
|
||||||
|
resolution: "discourse-korean-localization@workspace:."
|
||||||
|
languageName: unknown
|
||||||
|
linkType: soft
|
||||||
Reference in new issue
Block a user