@turbo/codemod 1.10.13-canary.2 → 1.10.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +5 -5
- package/dist/transforms/add-package-manager.js +58 -58
- package/dist/transforms/clean-globs.js +2 -2
- package/dist/transforms/migrate-env-var-dependencies.js +2 -2
- package/dist/transforms/set-default-outputs.js +23 -23
- package/dist/transforms/stabilize-env-mode.js +2 -2
- package/dist/transforms/transform-env-literals-to-wildcards.js +23 -23
- package/package.json +6 -6
package/dist/cli.js
CHANGED
@@ -68,7 +68,7 @@ GFS4: `),console.error(g)}),t[s]||(u=global[s]||[],l(t,u),t.close=function(g){fu
|
|
68
68
|
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001"),s.checkPaths(T,k,"copy",O,(I,B)=>{if(I)return P(I);let{srcStat:H,destStat:G}=B;s.checkParentPaths(T,H,k,"copy",Q=>{if(Q)return P(Q);l(T,k,O,(L,M)=>{if(L)return P(L);if(!M)return P();f(G,T,k,O,P)})})})}function f(T,k,O,P,I){let B=n.dirname(O);c(B,(H,G)=>{if(H)return I(H);if(G)return h(T,k,O,P,I);i(B,Q=>Q?I(Q):h(T,k,O,P,I))})}function l(T,k,O,P){if(!O.filter)return P(null,!0);Promise.resolve(O.filter(T,k)).then(I=>P(null,I),I=>P(I))}function h(T,k,O,P,I){(P.dereference?t.stat:t.lstat)(k,(B,H)=>B?I(B):H.isDirectory()?v(H,T,k,O,P,I):H.isFile()||H.isCharacterDevice()||H.isBlockDevice()?u(H,T,k,O,P,I):H.isSymbolicLink()?D(T,k,O,P,I):H.isSocket()?I(new Error(`Cannot copy a socket file: ${k}`)):H.isFIFO()?I(new Error(`Cannot copy a FIFO pipe: ${k}`)):I(new Error(`Unknown file: ${k}`)))}function u(T,k,O,P,I,B){return k?d(T,O,P,I,B):p(T,O,P,I,B)}function d(T,k,O,P,I){if(P.overwrite)t.unlink(O,B=>B?I(B):p(T,k,O,P,I));else return P.errorOnExist?I(new Error(`'${O}' already exists`)):I()}function p(T,k,O,P,I){t.copyFile(k,O,B=>B?I(B):P.preserveTimestamps?y(T.mode,k,O,I):S(O,T.mode,I))}function y(T,k,O,P){return b(T)?_(O,T,I=>I?P(I):g(T,k,O,P)):g(T,k,O,P)}function b(T){return(T&128)===0}function _(T,k,O){return S(T,k|128,O)}function g(T,k,O,P){E(k,O,I=>I?P(I):S(O,T,P))}function S(T,k,O){return t.chmod(T,k,O)}function E(T,k,O){t.stat(T,(P,I)=>P?O(P):a(k,I.atime,I.mtime,O))}function v(T,k,O,P,I,B){return k?w(O,P,I,B):m(T.mode,O,P,I,B)}function m(T,k,O,P,I){t.mkdir(O,B=>{if(B)return I(B);w(k,O,P,H=>H?I(H):S(O,T,I))})}function w(T,k,O,P){t.readdir(T,(I,B)=>I?P(I):x(B,T,k,O,P))}function x(T,k,O,P,I){let B=T.pop();return B?A(T,B,k,O,P,I):I()}function A(T,k,O,P,I,B){let H=n.join(O,k),G=n.join(P,k);l(H,G,I,(Q,L)=>{if(Q)return B(Q);if(!L)return x(T,O,P,I,B);s.checkPaths(H,G,"copy",I,(M,R)=>{if(M)return B(M);let{destStat:K}=R;h(K,H,G,I,q=>q?B(q):x(T,O,P,I,B))})})}function D(T,k,O,P,I){t.readlink(k,(B,H)=>{if(B)return I(B);if(P.dereference&&(H=n.resolve(process.cwd(),H)),T)t.readlink(O,(G,Q)=>G?G.code==="EINVAL"||G.code==="UNKNOWN"?t.symlink(H,O,I):I(G):(P.dereference&&(Q=n.resolve(process.cwd(),Q)),s.isSrcSubdir(H,Q)?I(new Error(`Cannot copy '${H}' to a subdirectory of itself, '${Q}'.`)):s.isSrcSubdir(Q,H)?I(new Error(`Cannot overwrite '${Q}' with '${H}'.`)):F(H,O,I)));else return t.symlink(H,O,I)})}function F(T,k,O){t.unlink(k,P=>P?O(P):t.symlink(T,k,O))}r.exports=o}),LA=re((e,r)=>{"use strict";J();var t=Ne(),n=ce("path"),i=Mt().mkdirsSync,c=Cm().utimesMillisSync,a=pn();function s(w,x,A){typeof A=="function"&&(A={filter:A}),A=A||{},A.clobber="clobber"in A?!!A.clobber:!0,A.overwrite="overwrite"in A?!!A.overwrite:A.clobber,A.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
69
69
|
|
70
70
|
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:D,destStat:F}=a.checkPathsSync(w,x,"copy",A);if(a.checkParentPathsSync(w,D,x,"copy"),A.filter&&!A.filter(w,x))return;let T=n.dirname(x);return t.existsSync(T)||i(T),o(F,w,x,A)}function o(w,x,A,D){let F=(D.dereference?t.statSync:t.lstatSync)(x);if(F.isDirectory())return _(F,w,x,A,D);if(F.isFile()||F.isCharacterDevice()||F.isBlockDevice())return f(F,w,x,A,D);if(F.isSymbolicLink())return v(w,x,A,D);throw F.isSocket()?new Error(`Cannot copy a socket file: ${x}`):F.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${x}`):new Error(`Unknown file: ${x}`)}function f(w,x,A,D,F){return x?l(w,A,D,F):h(w,A,D,F)}function l(w,x,A,D){if(D.overwrite)return t.unlinkSync(A),h(w,x,A,D);if(D.errorOnExist)throw new Error(`'${A}' already exists`)}function h(w,x,A,D){return t.copyFileSync(x,A),D.preserveTimestamps&&u(w.mode,x,A),y(A,w.mode)}function u(w,x,A){return d(w)&&p(A,w),b(x,A)}function d(w){return(w&128)===0}function p(w,x){return y(w,x|128)}function y(w,x){return t.chmodSync(w,x)}function b(w,x){let A=t.statSync(w);return c(x,A.atime,A.mtime)}function _(w,x,A,D,F){return x?S(A,D,F):g(w.mode,A,D,F)}function g(w,x,A,D){return t.mkdirSync(A),S(x,A,D),y(A,w)}function S(w,x,A){t.readdirSync(w).forEach(D=>E(D,w,x,A))}function E(w,x,A,D){let F=n.join(x,w),T=n.join(A,w);if(D.filter&&!D.filter(F,T))return;let{destStat:k}=a.checkPathsSync(F,T,"copy",D);return o(k,F,T,D)}function v(w,x,A,D){let F=t.readlinkSync(x);if(D.dereference&&(F=n.resolve(process.cwd(),F)),w){let T;try{T=t.readlinkSync(A)}catch(k){if(k.code==="EINVAL"||k.code==="UNKNOWN")return t.symlinkSync(F,A);throw k}if(D.dereference&&(T=n.resolve(process.cwd(),T)),a.isSrcSubdir(F,T))throw new Error(`Cannot copy '${F}' to a subdirectory of itself, '${T}'.`);if(a.isSrcSubdir(T,F))throw new Error(`Cannot overwrite '${T}' with '${F}'.`);return m(F,A)}else return t.symlinkSync(F,A)}function m(w,x){return t.unlinkSync(x),t.symlinkSync(w,x)}r.exports=s}),ju=re((e,r)=>{"use strict";J();var t=yt().fromCallback;r.exports={copy:t(BA()),copySync:LA()}}),Ss=re((e,r)=>{"use strict";J();var t=Ne(),n=yt().fromCallback;function i(a,s){t.rm(a,{recursive:!0,force:!0},s)}function c(a){t.rmSync(a,{recursive:!0,force:!0})}r.exports={remove:n(i),removeSync:c}}),IA=re((e,r)=>{"use strict";J();var t=yt().fromPromise,n=fn(),i=ce("path"),c=Mt(),a=Ss(),s=t(async function(f){let l;try{l=await n.readdir(f)}catch{return c.mkdirs(f)}return Promise.all(l.map(h=>a.remove(i.join(f,h))))});function o(f){let l;try{l=n.readdirSync(f)}catch{return c.mkdirsSync(f)}l.forEach(h=>{h=i.join(f,h),a.removeSync(h)})}r.exports={emptyDirSync:o,emptydirSync:o,emptyDir:s,emptydir:s}}),MA=re((e,r)=>{"use strict";J();var t=yt().fromCallback,n=ce("path"),i=Ne(),c=Mt();function a(o,f){function l(){i.writeFile(o,"",h=>{if(h)return f(h);f()})}i.stat(o,(h,u)=>{if(!h&&u.isFile())return f();let d=n.dirname(o);i.stat(d,(p,y)=>{if(p)return p.code==="ENOENT"?c.mkdirs(d,b=>{if(b)return f(b);l()}):f(p);y.isDirectory()?l():i.readdir(d,b=>{if(b)return f(b)})})})}function s(o){let f;try{f=i.statSync(o)}catch{}if(f&&f.isFile())return;let l=n.dirname(o);try{i.statSync(l).isDirectory()||i.readdirSync(l)}catch(h){if(h&&h.code==="ENOENT")c.mkdirsSync(l);else throw h}i.writeFileSync(o,"")}r.exports={createFile:t(a),createFileSync:s}}),NA=re((e,r)=>{"use strict";J();var t=yt().fromCallback,n=ce("path"),i=Ne(),c=Mt(),a=Dr().pathExists,{areIdentical:s}=pn();function o(l,h,u){function d(p,y){i.link(p,y,b=>{if(b)return u(b);u(null)})}i.lstat(h,(p,y)=>{i.lstat(l,(b,_)=>{if(b)return b.message=b.message.replace("lstat","ensureLink"),u(b);if(y&&s(_,y))return u(null);let g=n.dirname(h);a(g,(S,E)=>{if(S)return u(S);if(E)return d(l,h);c.mkdirs(g,v=>{if(v)return u(v);d(l,h)})})})})}function f(l,h){let u;try{u=i.lstatSync(h)}catch{}try{let p=i.lstatSync(l);if(u&&s(p,u))return}catch(p){throw p.message=p.message.replace("lstat","ensureLink"),p}let d=n.dirname(h);return i.existsSync(d)||c.mkdirsSync(d),i.linkSync(l,h)}r.exports={createLink:t(o),createLinkSync:f}}),jA=re((e,r)=>{"use strict";J();var t=ce("path"),n=Ne(),i=Dr().pathExists;function c(s,o,f){if(t.isAbsolute(s))return n.lstat(s,l=>l?(l.message=l.message.replace("lstat","ensureSymlink"),f(l)):f(null,{toCwd:s,toDst:s}));{let l=t.dirname(o),h=t.join(l,s);return i(h,(u,d)=>u?f(u):d?f(null,{toCwd:h,toDst:s}):n.lstat(s,p=>p?(p.message=p.message.replace("lstat","ensureSymlink"),f(p)):f(null,{toCwd:s,toDst:t.relative(l,s)})))}}function a(s,o){let f;if(t.isAbsolute(s)){if(f=n.existsSync(s),!f)throw new Error("absolute srcpath does not exist");return{toCwd:s,toDst:s}}else{let l=t.dirname(o),h=t.join(l,s);if(f=n.existsSync(h),f)return{toCwd:h,toDst:s};if(f=n.existsSync(s),!f)throw new Error("relative srcpath does not exist");return{toCwd:s,toDst:t.relative(l,s)}}}r.exports={symlinkPaths:c,symlinkPathsSync:a}}),$A=re((e,r)=>{"use strict";J();var t=Ne();function n(c,a,s){if(s=typeof a=="function"?a:s,a=typeof a=="function"?!1:a,a)return s(null,a);t.lstat(c,(o,f)=>{if(o)return s(null,"file");a=f&&f.isDirectory()?"dir":"file",s(null,a)})}function i(c,a){let s;if(a)return a;try{s=t.lstatSync(c)}catch{return"file"}return s&&s.isDirectory()?"dir":"file"}r.exports={symlinkType:n,symlinkTypeSync:i}}),HA=re((e,r)=>{"use strict";J();var t=yt().fromCallback,n=ce("path"),i=fn(),c=Mt(),a=c.mkdirs,s=c.mkdirsSync,o=jA(),f=o.symlinkPaths,l=o.symlinkPathsSync,h=$A(),u=h.symlinkType,d=h.symlinkTypeSync,p=Dr().pathExists,{areIdentical:y}=pn();function b(S,E,v,m){m=typeof v=="function"?v:m,v=typeof v=="function"?!1:v,i.lstat(E,(w,x)=>{!w&&x.isSymbolicLink()?Promise.all([i.stat(S),i.stat(E)]).then(([A,D])=>{if(y(A,D))return m(null);_(S,E,v,m)}):_(S,E,v,m)})}function _(S,E,v,m){f(S,E,(w,x)=>{if(w)return m(w);S=x.toDst,u(x.toCwd,v,(A,D)=>{if(A)return m(A);let F=n.dirname(E);p(F,(T,k)=>{if(T)return m(T);if(k)return i.symlink(S,E,D,m);a(F,O=>{if(O)return m(O);i.symlink(S,E,D,m)})})})})}function g(S,E,v){let m;try{m=i.lstatSync(E)}catch{}if(m&&m.isSymbolicLink()){let A=i.statSync(S),D=i.statSync(E);if(y(A,D))return}let w=l(S,E);S=w.toDst,v=d(w.toCwd,v);let x=n.dirname(E);return i.existsSync(x)||s(x),i.symlinkSync(S,E,v)}r.exports={createSymlink:t(b),createSymlinkSync:g}}),qA=re((e,r)=>{"use strict";J();var{createFile:t,createFileSync:n}=MA(),{createLink:i,createLinkSync:c}=NA(),{createSymlink:a,createSymlinkSync:s}=HA();r.exports={createFile:t,createFileSync:n,ensureFile:t,ensureFileSync:n,createLink:i,createLinkSync:c,ensureLink:i,ensureLinkSync:c,createSymlink:a,createSymlinkSync:s,ensureSymlink:a,ensureSymlinkSync:s}}),$u=re((e,r)=>{J();function t(i,{EOL:c=`
|
71
|
-
`,finalEOL:a=!0,replacer:s=null,spaces:o}={}){let f=a?c:"";return JSON.stringify(i,s,o).replace(/\n/g,c)+f}function n(i){return Buffer.isBuffer(i)&&(i=i.toString("utf8")),i.replace(/^\uFEFF/,"")}r.exports={stringify:t,stripBom:n}}),GA=re((e,r)=>{J();var t;try{t=Ne()}catch{t=ce("fs")}var n=yt(),{stringify:i,stripBom:c}=$u();async function a(d,p={}){typeof p=="string"&&(p={encoding:p});let y=p.fs||t,b="throws"in p?p.throws:!0,_=await n.fromCallback(y.readFile)(d,p);_=c(_);let g;try{g=JSON.parse(_,p?p.reviver:null)}catch(S){if(b)throw S.message=`${d}: ${S.message}`,S;return null}return g}var s=n.fromPromise(a);function o(d,p={}){typeof p=="string"&&(p={encoding:p});let y=p.fs||t,b="throws"in p?p.throws:!0;try{let _=y.readFileSync(d,p);return _=c(_),JSON.parse(_,p.reviver)}catch(_){if(b)throw _.message=`${d}: ${_.message}`,_;return null}}async function f(d,p,y={}){let b=y.fs||t,_=i(p,y);await n.fromCallback(b.writeFile)(d,_,y)}var l=n.fromPromise(f);function h(d,p,y={}){let b=y.fs||t,_=i(p,y);return b.writeFileSync(d,_,y)}var u={readFile:s,readFileSync:o,writeFile:l,writeFileSync:h};r.exports=u}),UA=re((e,r)=>{"use strict";J();var t=GA();r.exports={readJson:t.readFile,readJsonSync:t.readFileSync,writeJson:t.writeFile,writeJsonSync:t.writeFileSync}}),Hu=re((e,r)=>{"use strict";J();var t=yt().fromCallback,n=Ne(),i=ce("path"),c=Mt(),a=Dr().pathExists;function s(f,l,h,u){typeof h=="function"&&(u=h,h="utf8");let d=i.dirname(f);a(d,(p,y)=>{if(p)return u(p);if(y)return n.writeFile(f,l,h,u);c.mkdirs(d,b=>{if(b)return u(b);n.writeFile(f,l,h,u)})})}function o(f,...l){let h=i.dirname(f);if(n.existsSync(h))return n.writeFileSync(f,...l);c.mkdirsSync(h),n.writeFileSync(f,...l)}r.exports={outputFile:t(s),outputFileSync:o}}),WA=re((e,r)=>{"use strict";J();var{stringify:t}=$u(),{outputFile:n}=Hu();async function i(c,a,s={}){let o=t(a,s);await n(c,o,s)}r.exports=i}),zA=re((e,r)=>{"use strict";J();var{stringify:t}=$u(),{outputFileSync:n}=Hu();function i(c,a,s){let o=t(a,s);n(c,o,s)}r.exports=i}),VA=re((e,r)=>{"use strict";J();var t=yt().fromPromise,n=UA();n.outputJson=t(WA()),n.outputJsonSync=zA(),n.outputJSON=n.outputJson,n.outputJSONSync=n.outputJsonSync,n.writeJSON=n.writeJson,n.writeJSONSync=n.writeJsonSync,n.readJSON=n.readJson,n.readJSONSync=n.readJsonSync,r.exports=n}),KA=re((e,r)=>{"use strict";J();var t=Ne(),n=ce("path"),i=ju().copy,c=Ss().remove,a=Mt().mkdirp,s=Dr().pathExists,o=pn();function f(p,y,b,_){typeof b=="function"&&(_=b,b={}),b=b||{};let g=b.overwrite||b.clobber||!1;o.checkPaths(p,y,"move",b,(S,E)=>{if(S)return _(S);let{srcStat:v,isChangingCase:m=!1}=E;o.checkParentPaths(p,v,y,"move",w=>{if(w)return _(w);if(l(y))return h(p,y,g,m,_);a(n.dirname(y),x=>x?_(x):h(p,y,g,m,_))})})}function l(p){let y=n.dirname(p);return n.parse(y).root===y}function h(p,y,b,_,g){if(_)return u(p,y,b,g);if(b)return c(y,S=>S?g(S):u(p,y,b,g));s(y,(S,E)=>S?g(S):E?g(new Error("dest already exists.")):u(p,y,b,g))}function u(p,y,b,_){t.rename(p,y,g=>g?g.code!=="EXDEV"?_(g):d(p,y,b,_):_())}function d(p,y,b,_){i(p,y,{overwrite:b,errorOnExist:!0,preserveTimestamps:!0},g=>g?_(g):c(p,_))}r.exports=f}),YA=re((e,r)=>{"use strict";J();var t=Ne(),n=ce("path"),i=ju().copySync,c=Ss().removeSync,a=Mt().mkdirpSync,s=pn();function o(d,p,y){y=y||{};let b=y.overwrite||y.clobber||!1,{srcStat:_,isChangingCase:g=!1}=s.checkPathsSync(d,p,"move",y);return s.checkParentPathsSync(d,_,p,"move"),f(p)||a(n.dirname(p)),l(d,p,b,g)}function f(d){let p=n.dirname(d);return n.parse(p).root===p}function l(d,p,y,b){if(b)return h(d,p,y);if(y)return c(p),h(d,p,y);if(t.existsSync(p))throw new Error("dest already exists.");return h(d,p,y)}function h(d,p,y){try{t.renameSync(d,p)}catch(b){if(b.code!=="EXDEV")throw b;return u(d,p,y)}}function u(d,p,y){return i(d,p,{overwrite:y,errorOnExist:!0,preserveTimestamps:!0}),c(d)}r.exports=o}),XA=re((e,r)=>{"use strict";J();var t=yt().fromCallback;r.exports={move:t(KA()),moveSync:YA()}}),xs=re((e,r)=>{"use strict";J(),r.exports={...fn(),...ju(),...IA(),...qA(),...VA(),...Mt(),...XA(),...Hu(),...Dr(),...Ss()}});J();var S4=Je(xs());J();var x4=Je(xs()),ZA=re((e,r)=>{J();function t(n,i){typeof i=="boolean"&&(i={forever:i}),this._originalTimeouts=JSON.parse(JSON.stringify(n)),this._timeouts=n,this._options=i||{},this._maxRetryTime=i&&i.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}r.exports=t,t.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},t.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},t.prototype.retry=function(n){if(this._timeout&&clearTimeout(this._timeout),!n)return!1;var i=new Date().getTime();if(n&&i-this._operationStart>=this._maxRetryTime)return this._errors.push(n),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(n);var c=this._timeouts.shift();if(c===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),c=this._cachedTimeouts.slice(-1);else return!1;var a=this;return this._timer=setTimeout(function(){a._attempts++,a._operationTimeoutCb&&(a._timeout=setTimeout(function(){a._operationTimeoutCb(a._attempts)},a._operationTimeout),a._options.unref&&a._timeout.unref()),a._fn(a._attempts)},c),this._options.unref&&this._timer.unref(),!0},t.prototype.attempt=function(n,i){this._fn=n,i&&(i.timeout&&(this._operationTimeout=i.timeout),i.cb&&(this._operationTimeoutCb=i.cb));var c=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){c._operationTimeoutCb()},c._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},t.prototype.try=function(n){console.log("Using RetryOperation.try() is deprecated"),this.attempt(n)},t.prototype.start=function(n){console.log("Using RetryOperation.start() is deprecated"),this.attempt(n)},t.prototype.start=t.prototype.try,t.prototype.errors=function(){return this._errors},t.prototype.attempts=function(){return this._attempts},t.prototype.mainError=function(){if(this._errors.length===0)return null;for(var n={},i=null,c=0,a=0;a<this._errors.length;a++){var s=this._errors[a],o=s.message,f=(n[o]||0)+1;n[o]=f,f>=c&&(i=s,c=f)}return i}}),JA=re(e=>{J();var r=ZA();e.operation=function(t){var n=e.timeouts(t);return new r(n,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})},e.timeouts=function(t){if(t instanceof Array)return[].concat(t);var n={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in t)n[i]=t[i];if(n.minTimeout>n.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var c=[],a=0;a<n.retries;a++)c.push(this.createTimeout(a,n));return t&&t.forever&&!c.length&&c.push(this.createTimeout(a,n)),c.sort(function(s,o){return s-o}),c},e.createTimeout=function(t,n){var i=n.randomize?Math.random()+1:1,c=Math.round(i*Math.max(n.minTimeout,1)*Math.pow(n.factor,t));return c=Math.min(c,n.maxTimeout),c},e.wrap=function(t,n,i){if(n instanceof Array&&(i=n,n=null),!i){i=[];for(var c in t)typeof t[c]=="function"&&i.push(c)}for(var a=0;a<i.length;a++){var s=i[a],o=t[s];t[s]=function(f){var l=e.operation(n),h=Array.prototype.slice.call(arguments,1),u=h.pop();h.push(function(d){l.retry(d)||(d&&(arguments[0]=l.mainError()),u.apply(this,arguments))}),l.attempt(function(){f.apply(t,h)})}.bind(t,o),t[s].options=n}}}),QA=re((e,r)=>{J(),r.exports=JA()}),eC=re((e,r)=>{J();var t=QA();function n(i,c){function a(s,o){var f=c||{},l;"randomize"in f||(f.randomize=!0),l=t.operation(f);function h(p){o(p||new Error("Aborted"))}function u(p,y){if(p.bail){h(p);return}l.retry(p)?f.onRetry&&f.onRetry(p,y):o(l.mainError())}function d(p){var y;try{y=i(h,p)}catch(b){u(b,p);return}Promise.resolve(y).then(s).catch(function(b){u(b,p)})}l.attempt(d)}return new Promise(a)}r.exports=n});J();J();var A4=Je(eC()),C4=Je(ws()),k4=Je(xs());J();var D4=Je(xs()),R4=Je(ws());J();J();var tC=re((e,r)=>{J();function t(n){return r.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},r.exports.__esModule=!0,r.exports.default=r.exports,t(n)}r.exports=t,r.exports.__esModule=!0,r.exports.default=r.exports}),rC=re((e,r)=>{J();var t=tC().default;function n(){"use strict";r.exports=n=function(){return i},r.exports.__esModule=!0,r.exports.default=r.exports;var i={},c=Object.prototype,a=c.hasOwnProperty,s=Object.defineProperty||function(I,B,H){I[B]=H.value},o=typeof Symbol=="function"?Symbol:{},f=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",h=o.toStringTag||"@@toStringTag";function u(I,B,H){return Object.defineProperty(I,B,{value:H,enumerable:!0,configurable:!0,writable:!0}),I[B]}try{u({},"")}catch{u=function(I,B,H){return I[B]=H}}function d(I,B,H,G){var Q=B&&B.prototype instanceof b?B:b,L=Object.create(Q.prototype),M=new k(G||[]);return s(L,"_invoke",{value:A(I,H,M)}),L}function p(I,B,H){try{return{type:"normal",arg:I.call(B,H)}}catch(G){return{type:"throw",arg:G}}}i.wrap=d;var y={};function b(){}function _(){}function g(){}var S={};u(S,f,function(){return this});var E=Object.getPrototypeOf,v=E&&E(E(O([])));v&&v!==c&&a.call(v,f)&&(S=v);var m=g.prototype=b.prototype=Object.create(S);function w(I){["next","throw","return"].forEach(function(B){u(I,B,function(H){return this._invoke(B,H)})})}function x(I,B){function H(Q,L,M,R){var K=p(I[Q],I,L);if(K.type!=="throw"){var q=K.arg,Z=q.value;return Z&&t(Z)=="object"&&a.call(Z,"__await")?B.resolve(Z.__await).then(function(N){H("next",N,M,R)},function(N){H("throw",N,M,R)}):B.resolve(Z).then(function(N){q.value=N,M(q)},function(N){return H("throw",N,M,R)})}R(K.arg)}var G;s(this,"_invoke",{value:function(Q,L){function M(){return new B(function(R,K){H(Q,L,R,K)})}return G=G?G.then(M,M):M()}})}function A(I,B,H){var G="suspendedStart";return function(Q,L){if(G==="executing")throw new Error("Generator is already running");if(G==="completed"){if(Q==="throw")throw L;return P()}for(H.method=Q,H.arg=L;;){var M=H.delegate;if(M){var R=D(M,H);if(R){if(R===y)continue;return R}}if(H.method==="next")H.sent=H._sent=H.arg;else if(H.method==="throw"){if(G==="suspendedStart")throw G="completed",H.arg;H.dispatchException(H.arg)}else H.method==="return"&&H.abrupt("return",H.arg);G="executing";var K=p(I,B,H);if(K.type==="normal"){if(G=H.done?"completed":"suspendedYield",K.arg===y)continue;return{value:K.arg,done:H.done}}K.type==="throw"&&(G="completed",H.method="throw",H.arg=K.arg)}}}function D(I,B){var H=B.method,G=I.iterator[H];if(G===void 0)return B.delegate=null,H==="throw"&&I.iterator.return&&(B.method="return",B.arg=void 0,D(I,B),B.method==="throw")||H!=="return"&&(B.method="throw",B.arg=new TypeError("The iterator does not provide a '"+H+"' method")),y;var Q=p(G,I.iterator,B.arg);if(Q.type==="throw")return B.method="throw",B.arg=Q.arg,B.delegate=null,y;var L=Q.arg;return L?L.done?(B[I.resultName]=L.value,B.next=I.nextLoc,B.method!=="return"&&(B.method="next",B.arg=void 0),B.delegate=null,y):L:(B.method="throw",B.arg=new TypeError("iterator result is not an object"),B.delegate=null,y)}function F(I){var B={tryLoc:I[0]};1 in I&&(B.catchLoc=I[1]),2 in I&&(B.finallyLoc=I[2],B.afterLoc=I[3]),this.tryEntries.push(B)}function T(I){var B=I.completion||{};B.type="normal",delete B.arg,I.completion=B}function k(I){this.tryEntries=[{tryLoc:"root"}],I.forEach(F,this),this.reset(!0)}function O(I){if(I){var B=I[f];if(B)return B.call(I);if(typeof I.next=="function")return I;if(!isNaN(I.length)){var H=-1,G=function Q(){for(;++H<I.length;)if(a.call(I,H))return Q.value=I[H],Q.done=!1,Q;return Q.value=void 0,Q.done=!0,Q};return G.next=G}}return{next:P}}function P(){return{value:void 0,done:!0}}return _.prototype=g,s(m,"constructor",{value:g,configurable:!0}),s(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,h,"GeneratorFunction"),i.isGeneratorFunction=function(I){var B=typeof I=="function"&&I.constructor;return!!B&&(B===_||(B.displayName||B.name)==="GeneratorFunction")},i.mark=function(I){return Object.setPrototypeOf?Object.setPrototypeOf(I,g):(I.__proto__=g,u(I,h,"GeneratorFunction")),I.prototype=Object.create(m),I},i.awrap=function(I){return{__await:I}},w(x.prototype),u(x.prototype,l,function(){return this}),i.AsyncIterator=x,i.async=function(I,B,H,G,Q){Q===void 0&&(Q=Promise);var L=new x(d(I,B,H,G),Q);return i.isGeneratorFunction(B)?L:L.next().then(function(M){return M.done?M.value:L.next()})},w(m),u(m,h,"Generator"),u(m,f,function(){return this}),u(m,"toString",function(){return"[object Generator]"}),i.keys=function(I){var B=Object(I),H=[];for(var G in B)H.push(G);return H.reverse(),function Q(){for(;H.length;){var L=H.pop();if(L in B)return Q.value=L,Q.done=!1,Q}return Q.done=!0,Q}},i.values=O,k.prototype={constructor:k,reset:function(I){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!I)for(var B in this)B.charAt(0)==="t"&&a.call(this,B)&&!isNaN(+B.slice(1))&&(this[B]=void 0)},stop:function(){this.done=!0;var I=this.tryEntries[0].completion;if(I.type==="throw")throw I.arg;return this.rval},dispatchException:function(I){if(this.done)throw I;var B=this;function H(K,q){return L.type="throw",L.arg=I,B.next=K,q&&(B.method="next",B.arg=void 0),!!q}for(var G=this.tryEntries.length-1;G>=0;--G){var Q=this.tryEntries[G],L=Q.completion;if(Q.tryLoc==="root")return H("end");if(Q.tryLoc<=this.prev){var M=a.call(Q,"catchLoc"),R=a.call(Q,"finallyLoc");if(M&&R){if(this.prev<Q.catchLoc)return H(Q.catchLoc,!0);if(this.prev<Q.finallyLoc)return H(Q.finallyLoc)}else if(M){if(this.prev<Q.catchLoc)return H(Q.catchLoc,!0)}else{if(!R)throw new Error("try statement without catch or finally");if(this.prev<Q.finallyLoc)return H(Q.finallyLoc)}}}},abrupt:function(I,B){for(var H=this.tryEntries.length-1;H>=0;--H){var G=this.tryEntries[H];if(G.tryLoc<=this.prev&&a.call(G,"finallyLoc")&&this.prev<G.finallyLoc){var Q=G;break}}Q&&(I==="break"||I==="continue")&&Q.tryLoc<=B&&B<=Q.finallyLoc&&(Q=null);var L=Q?Q.completion:{};return L.type=I,L.arg=B,Q?(this.method="next",this.next=Q.finallyLoc,y):this.complete(L)},complete:function(I,B){if(I.type==="throw")throw I.arg;return I.type==="break"||I.type==="continue"?this.next=I.arg:I.type==="return"?(this.rval=this.arg=I.arg,this.method="return",this.next="end"):I.type==="normal"&&B&&(this.next=B),y},finish:function(I){for(var B=this.tryEntries.length-1;B>=0;--B){var H=this.tryEntries[B];if(H.finallyLoc===I)return this.complete(H.completion,H.afterLoc),T(H),y}},catch:function(I){for(var B=this.tryEntries.length-1;B>=0;--B){var H=this.tryEntries[B];if(H.tryLoc===I){var G=H.completion;if(G.type==="throw"){var Q=G.arg;T(H)}return Q}}throw new Error("illegal catch attempt")},delegateYield:function(I,B,H){return this.delegate={iterator:O(I),resultName:B,nextLoc:H},this.method==="next"&&(this.arg=void 0),y}},i}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}),nC=re((e,r)=>{J();var t=rC()();r.exports=t;try{regeneratorRuntime=t}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}),iC=re((e,r)=>{"use strict";J();var t=(n,...i)=>new Promise(c=>{c(n(...i))});r.exports=t,r.exports.default=t}),sC=re((e,r)=>{"use strict";J();var t=iC(),n=i=>{if(!((Number.isInteger(i)||i===1/0)&&i>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));let c=[],a=0,s=()=>{a--,c.length>0&&c.shift()()},o=(h,u,...d)=>{a++;let p=t(h,...d);u(p),p.then(s,s)},f=(h,u,...d)=>{a<i?o(h,u,...d):c.push(o.bind(null,h,u,...d))},l=(h,...u)=>new Promise(d=>f(h,d,...u));return Object.defineProperties(l,{activeCount:{get:()=>a},pendingCount:{get:()=>c.length},clearQueue:{value:()=>{c.length=0}}}),l};r.exports=n,r.exports.default=n}),oC=re((e,r)=>{"use strict";J();var t=sC(),n=class extends Error{constructor(s){super(),this.value=s}},i=async(s,o)=>o(await s),c=async s=>{let o=await Promise.all(s);if(o[1]===!0)throw new n(o[0]);return!1},a=async(s,o,f)=>{f={concurrency:1/0,preserveOrder:!0,...f};let l=t(f.concurrency),h=[...s].map(d=>[d,l(i,d,o)]),u=t(f.preserveOrder?1:1/0);try{await Promise.all(h.map(d=>u(c,d)))}catch(d){if(d instanceof n)return d.value;throw d}};r.exports=a,r.exports.default=a}),aC=re((e,r)=>{"use strict";J();var t=ce("path"),n=ce("fs"),{promisify:i}=ce("util"),c=oC(),a=i(n.stat),s=i(n.lstat),o={directory:"isDirectory",file:"isFile"};function f({type:h}){if(!(h in o))throw new Error(`Invalid type specified: ${h}`)}var l=(h,u)=>h===void 0||u[o[h]]();r.exports=async(h,u)=>{u={cwd:process.cwd(),type:"file",allowSymlinks:!0,...u},f(u);let d=u.allowSymlinks?a:s;return c(h,async p=>{try{let y=await d(t.resolve(u.cwd,p));return l(u.type,y)}catch{return!1}},u)},r.exports.sync=(h,u)=>{u={cwd:process.cwd(),allowSymlinks:!0,type:"file",...u},f(u);let d=u.allowSymlinks?n.statSync:n.lstatSync;for(let p of h)try{let y=d(t.resolve(u.cwd,p));if(l(u.type,y))return p}catch{}}}),uC=re((e,r)=>{"use strict";J();var t=ce("fs"),{promisify:n}=ce("util"),i=n(t.access);r.exports=async c=>{try{return await i(c),!0}catch{return!1}},r.exports.sync=c=>{try{return t.accessSync(c),!0}catch{return!1}}}),lC=re((e,r)=>{"use strict";J();var t=ce("path"),n=aC(),i=uC(),c=Symbol("findUp.stop");r.exports=async(a,s={})=>{let o=t.resolve(s.cwd||""),{root:f}=t.parse(o),l=[].concat(a),h=async u=>{if(typeof a!="function")return n(l,u);let d=await a(u.cwd);return typeof d=="string"?n([d],u):d};for(;;){let u=await h({...s,cwd:o});if(u===c)return;if(u)return t.resolve(o,u);if(o===f)return;o=t.dirname(o)}},r.exports.sync=(a,s={})=>{let o=t.resolve(s.cwd||""),{root:f}=t.parse(o),l=[].concat(a),h=u=>{if(typeof a!="function")return n.sync(l,u);let d=a(u.cwd);return typeof d=="string"?n.sync([d],u):d};for(;;){let u=h({...s,cwd:o});if(u===c)return;if(u)return t.resolve(o,u);if(o===f)return;o=t.dirname(o)}},r.exports.exists=i,r.exports.sync.exists=i.sync,r.exports.stop=c}),gt=re(e=>{"use strict";J(),e.fromCallback=function(r){return Object.defineProperty(function(){if(typeof arguments[arguments.length-1]=="function")r.apply(this,arguments);else return new Promise((t,n)=>{arguments[arguments.length]=(i,c)=>{if(i)return n(i);t(c)},arguments.length++,r.apply(this,arguments)})},"name",{value:r.name})},e.fromPromise=function(r){return Object.defineProperty(function(){let t=arguments[arguments.length-1];if(typeof t!="function")return r.apply(this,arguments);r.apply(this,arguments).then(n=>t(null,n),t)},"name",{value:r.name})}}),km=re(e=>{"use strict";J();var r=gt().fromCallback,t=Ne(),n=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(i=>typeof t[i]=="function");Object.keys(t).forEach(i=>{i!=="promises"&&(e[i]=t[i])}),n.forEach(i=>{e[i]=r(t[i])}),e.exists=function(i,c){return typeof c=="function"?t.exists(i,c):new Promise(a=>t.exists(i,a))},e.read=function(i,c,a,s,o,f){return typeof f=="function"?t.read(i,c,a,s,o,f):new Promise((l,h)=>{t.read(i,c,a,s,o,(u,d,p)=>{if(u)return h(u);l({bytesRead:d,buffer:p})})})},e.write=function(i,c,...a){return typeof a[a.length-1]=="function"?t.write(i,c,...a):new Promise((s,o)=>{t.write(i,c,...a,(f,l,h)=>{if(f)return o(f);s({bytesWritten:l,buffer:h})})})},typeof t.realpath.native=="function"&&(e.realpath.native=r(t.realpath.native))}),Dm=re((e,r)=>{"use strict";J();var t=ce("path");function n(a){return a=t.normalize(t.resolve(a)).split(t.sep),a.length>0?a[0]:null}var i=/[<>:"|?*]/;function c(a){let s=n(a);return a=a.replace(s,""),i.test(a)}r.exports={getRootPath:n,invalidWin32Path:c}}),cC=re((e,r)=>{"use strict";J();var t=Ne(),n=ce("path"),i=Dm().invalidWin32Path,c=parseInt("0777",8);function a(s,o,f,l){if(typeof o=="function"?(f=o,o={}):(!o||typeof o!="object")&&(o={mode:o}),process.platform==="win32"&&i(s)){let d=new Error(s+" contains invalid WIN32 path characters.");return d.code="EINVAL",f(d)}let h=o.mode,u=o.fs||t;h===void 0&&(h=c&~process.umask()),l||(l=null),f=f||function(){},s=n.resolve(s),u.mkdir(s,h,d=>{if(!d)return l=l||s,f(null,l);switch(d.code){case"ENOENT":if(n.dirname(s)===s)return f(d);a(n.dirname(s),o,(p,y)=>{p?f(p,y):a(s,o,f,y)});break;default:u.stat(s,(p,y)=>{p||!y.isDirectory()?f(d,l):f(null,l)});break}})}r.exports=a}),hC=re((e,r)=>{"use strict";J();var t=Ne(),n=ce("path"),i=Dm().invalidWin32Path,c=parseInt("0777",8);function a(s,o,f){(!o||typeof o!="object")&&(o={mode:o});let l=o.mode,h=o.fs||t;if(process.platform==="win32"&&i(s)){let u=new Error(s+" contains invalid WIN32 path characters.");throw u.code="EINVAL",u}l===void 0&&(l=c&~process.umask()),f||(f=null),s=n.resolve(s);try{h.mkdirSync(s,l),f=f||s}catch(u){if(u.code==="ENOENT"){if(n.dirname(s)===s)throw u;f=a(n.dirname(s),o,f),a(s,o,f)}else{let d;try{d=h.statSync(s)}catch{throw u}if(!d.isDirectory())throw u}}return f}r.exports=a}),Et=re((e,r)=>{"use strict";J();var t=gt().fromCallback,n=t(cC()),i=hC();r.exports={mkdirs:n,mkdirsSync:i,mkdirp:n,mkdirpSync:i,ensureDir:n,ensureDirSync:i}}),Rm=re((e,r)=>{"use strict";J();var t=Ne(),n=ce("os"),i=ce("path");function c(){let l=i.join("millis-test-sync"+Date.now().toString()+Math.random().toString().slice(2));l=i.join(n.tmpdir(),l);let h=new Date(1435410243862);t.writeFileSync(l,"https://github.com/jprichardson/node-fs-extra/pull/141");let u=t.openSync(l,"r+");return t.futimesSync(u,h,h),t.closeSync(u),t.statSync(l).mtime>1435410243e3}function a(l){let h=i.join("millis-test"+Date.now().toString()+Math.random().toString().slice(2));h=i.join(n.tmpdir(),h);let u=new Date(1435410243862);t.writeFile(h,"https://github.com/jprichardson/node-fs-extra/pull/141",d=>{if(d)return l(d);t.open(h,"r+",(p,y)=>{if(p)return l(p);t.futimes(y,u,u,b=>{if(b)return l(b);t.close(y,_=>{if(_)return l(_);t.stat(h,(g,S)=>{if(g)return l(g);l(null,S.mtime>1435410243e3)})})})})})}function s(l){if(typeof l=="number")return Math.floor(l/1e3)*1e3;if(l instanceof Date)return new Date(Math.floor(l.getTime()/1e3)*1e3);throw new Error("fs-extra: timeRemoveMillis() unknown parameter type")}function o(l,h,u,d){t.open(l,"r+",(p,y)=>{if(p)return d(p);t.futimes(y,h,u,b=>{t.close(y,_=>{d&&d(b||_)})})})}function f(l,h,u){let d=t.openSync(l,"r+");return t.futimesSync(d,h,u),t.closeSync(d)}r.exports={hasMillisRes:a,hasMillisResSync:c,timeRemoveMillis:s,utimesMillis:o,utimesMillisSync:f}}),As=re((e,r)=>{"use strict";J();var t=Ne(),n=ce("path"),i=10,c=5,a=0,s=process.versions.node.split("."),o=Number.parseInt(s[0],10),f=Number.parseInt(s[1],10),l=Number.parseInt(s[2],10);function h(){return o>i||o===i&&(f>c||f===c&&l>=a)}function u(E,v,m){h()?t.stat(E,{bigint:!0},(w,x)=>{if(w)return m(w);t.stat(v,{bigint:!0},(A,D)=>A?A.code==="ENOENT"?m(null,{srcStat:x,destStat:null}):m(A):m(null,{srcStat:x,destStat:D}))}):t.stat(E,(w,x)=>{if(w)return m(w);t.stat(v,(A,D)=>A?A.code==="ENOENT"?m(null,{srcStat:x,destStat:null}):m(A):m(null,{srcStat:x,destStat:D}))})}function d(E,v){let m,w;h()?m=t.statSync(E,{bigint:!0}):m=t.statSync(E);try{h()?w=t.statSync(v,{bigint:!0}):w=t.statSync(v)}catch(x){if(x.code==="ENOENT")return{srcStat:m,destStat:null};throw x}return{srcStat:m,destStat:w}}function p(E,v,m,w){u(E,v,(x,A)=>{if(x)return w(x);let{srcStat:D,destStat:F}=A;return F&&F.ino&&F.dev&&F.ino===D.ino&&F.dev===D.dev?w(new Error("Source and destination must not be the same.")):D.isDirectory()&&g(E,v)?w(new Error(S(E,v,m))):w(null,{srcStat:D,destStat:F})})}function y(E,v,m){let{srcStat:w,destStat:x}=d(E,v);if(x&&x.ino&&x.dev&&x.ino===w.ino&&x.dev===w.dev)throw new Error("Source and destination must not be the same.");if(w.isDirectory()&&g(E,v))throw new Error(S(E,v,m));return{srcStat:w,destStat:x}}function b(E,v,m,w,x){let A=n.resolve(n.dirname(E)),D=n.resolve(n.dirname(m));if(D===A||D===n.parse(D).root)return x();h()?t.stat(D,{bigint:!0},(F,T)=>F?F.code==="ENOENT"?x():x(F):T.ino&&T.dev&&T.ino===v.ino&&T.dev===v.dev?x(new Error(S(E,m,w))):b(E,v,D,w,x)):t.stat(D,(F,T)=>F?F.code==="ENOENT"?x():x(F):T.ino&&T.dev&&T.ino===v.ino&&T.dev===v.dev?x(new Error(S(E,m,w))):b(E,v,D,w,x))}function _(E,v,m,w){let x=n.resolve(n.dirname(E)),A=n.resolve(n.dirname(m));if(A===x||A===n.parse(A).root)return;let D;try{h()?D=t.statSync(A,{bigint:!0}):D=t.statSync(A)}catch(F){if(F.code==="ENOENT")return;throw F}if(D.ino&&D.dev&&D.ino===v.ino&&D.dev===v.dev)throw new Error(S(E,m,w));return _(E,v,A,w)}function g(E,v){let m=n.resolve(E).split(n.sep).filter(x=>x),w=n.resolve(v).split(n.sep).filter(x=>x);return m.reduce((x,A,D)=>x&&w[D]===A,!0)}function S(E,v,m){return`Cannot ${m} '${E}' to a subdirectory of itself, '${v}'.`}r.exports={checkPaths:p,checkPathsSync:y,checkParentPaths:b,checkParentPathsSync:_,isSrcSubdir:g}}),fC=re((e,r)=>{"use strict";J(),r.exports=function(t){if(typeof Buffer.allocUnsafe=="function")try{return Buffer.allocUnsafe(t)}catch{return new Buffer(t)}return new Buffer(t)}}),pC=re((e,r)=>{"use strict";J();var t=Ne(),n=ce("path"),i=Et().mkdirsSync,c=Rm().utimesMillisSync,a=As();function s(v,m,w){typeof w=="function"&&(w={filter:w}),w=w||{},w.clobber="clobber"in w?!!w.clobber:!0,w.overwrite="overwrite"in w?!!w.overwrite:w.clobber,w.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
|
71
|
+
`,finalEOL:a=!0,replacer:s=null,spaces:o}={}){let f=a?c:"";return JSON.stringify(i,s,o).replace(/\n/g,c)+f}function n(i){return Buffer.isBuffer(i)&&(i=i.toString("utf8")),i.replace(/^\uFEFF/,"")}r.exports={stringify:t,stripBom:n}}),GA=re((e,r)=>{J();var t;try{t=Ne()}catch{t=ce("fs")}var n=yt(),{stringify:i,stripBom:c}=$u();async function a(d,p={}){typeof p=="string"&&(p={encoding:p});let y=p.fs||t,b="throws"in p?p.throws:!0,_=await n.fromCallback(y.readFile)(d,p);_=c(_);let g;try{g=JSON.parse(_,p?p.reviver:null)}catch(S){if(b)throw S.message=`${d}: ${S.message}`,S;return null}return g}var s=n.fromPromise(a);function o(d,p={}){typeof p=="string"&&(p={encoding:p});let y=p.fs||t,b="throws"in p?p.throws:!0;try{let _=y.readFileSync(d,p);return _=c(_),JSON.parse(_,p.reviver)}catch(_){if(b)throw _.message=`${d}: ${_.message}`,_;return null}}async function f(d,p,y={}){let b=y.fs||t,_=i(p,y);await n.fromCallback(b.writeFile)(d,_,y)}var l=n.fromPromise(f);function h(d,p,y={}){let b=y.fs||t,_=i(p,y);return b.writeFileSync(d,_,y)}var u={readFile:s,readFileSync:o,writeFile:l,writeFileSync:h};r.exports=u}),UA=re((e,r)=>{"use strict";J();var t=GA();r.exports={readJson:t.readFile,readJsonSync:t.readFileSync,writeJson:t.writeFile,writeJsonSync:t.writeFileSync}}),Hu=re((e,r)=>{"use strict";J();var t=yt().fromCallback,n=Ne(),i=ce("path"),c=Mt(),a=Dr().pathExists;function s(f,l,h,u){typeof h=="function"&&(u=h,h="utf8");let d=i.dirname(f);a(d,(p,y)=>{if(p)return u(p);if(y)return n.writeFile(f,l,h,u);c.mkdirs(d,b=>{if(b)return u(b);n.writeFile(f,l,h,u)})})}function o(f,...l){let h=i.dirname(f);if(n.existsSync(h))return n.writeFileSync(f,...l);c.mkdirsSync(h),n.writeFileSync(f,...l)}r.exports={outputFile:t(s),outputFileSync:o}}),WA=re((e,r)=>{"use strict";J();var{stringify:t}=$u(),{outputFile:n}=Hu();async function i(c,a,s={}){let o=t(a,s);await n(c,o,s)}r.exports=i}),zA=re((e,r)=>{"use strict";J();var{stringify:t}=$u(),{outputFileSync:n}=Hu();function i(c,a,s){let o=t(a,s);n(c,o,s)}r.exports=i}),VA=re((e,r)=>{"use strict";J();var t=yt().fromPromise,n=UA();n.outputJson=t(WA()),n.outputJsonSync=zA(),n.outputJSON=n.outputJson,n.outputJSONSync=n.outputJsonSync,n.writeJSON=n.writeJson,n.writeJSONSync=n.writeJsonSync,n.readJSON=n.readJson,n.readJSONSync=n.readJsonSync,r.exports=n}),KA=re((e,r)=>{"use strict";J();var t=Ne(),n=ce("path"),i=ju().copy,c=Ss().remove,a=Mt().mkdirp,s=Dr().pathExists,o=pn();function f(p,y,b,_){typeof b=="function"&&(_=b,b={}),b=b||{};let g=b.overwrite||b.clobber||!1;o.checkPaths(p,y,"move",b,(S,E)=>{if(S)return _(S);let{srcStat:v,isChangingCase:m=!1}=E;o.checkParentPaths(p,v,y,"move",w=>{if(w)return _(w);if(l(y))return h(p,y,g,m,_);a(n.dirname(y),x=>x?_(x):h(p,y,g,m,_))})})}function l(p){let y=n.dirname(p);return n.parse(y).root===y}function h(p,y,b,_,g){if(_)return u(p,y,b,g);if(b)return c(y,S=>S?g(S):u(p,y,b,g));s(y,(S,E)=>S?g(S):E?g(new Error("dest already exists.")):u(p,y,b,g))}function u(p,y,b,_){t.rename(p,y,g=>g?g.code!=="EXDEV"?_(g):d(p,y,b,_):_())}function d(p,y,b,_){i(p,y,{overwrite:b,errorOnExist:!0,preserveTimestamps:!0},g=>g?_(g):c(p,_))}r.exports=f}),YA=re((e,r)=>{"use strict";J();var t=Ne(),n=ce("path"),i=ju().copySync,c=Ss().removeSync,a=Mt().mkdirpSync,s=pn();function o(d,p,y){y=y||{};let b=y.overwrite||y.clobber||!1,{srcStat:_,isChangingCase:g=!1}=s.checkPathsSync(d,p,"move",y);return s.checkParentPathsSync(d,_,p,"move"),f(p)||a(n.dirname(p)),l(d,p,b,g)}function f(d){let p=n.dirname(d);return n.parse(p).root===p}function l(d,p,y,b){if(b)return h(d,p,y);if(y)return c(p),h(d,p,y);if(t.existsSync(p))throw new Error("dest already exists.");return h(d,p,y)}function h(d,p,y){try{t.renameSync(d,p)}catch(b){if(b.code!=="EXDEV")throw b;return u(d,p,y)}}function u(d,p,y){return i(d,p,{overwrite:y,errorOnExist:!0,preserveTimestamps:!0}),c(d)}r.exports=o}),XA=re((e,r)=>{"use strict";J();var t=yt().fromCallback;r.exports={move:t(KA()),moveSync:YA()}}),xs=re((e,r)=>{"use strict";J(),r.exports={...fn(),...ju(),...IA(),...qA(),...VA(),...Mt(),...XA(),...Hu(),...Dr(),...Ss()}});J();var S4=Je(xs());J();var x4=Je(xs()),ZA=re((e,r)=>{J();function t(n,i){typeof i=="boolean"&&(i={forever:i}),this._originalTimeouts=JSON.parse(JSON.stringify(n)),this._timeouts=n,this._options=i||{},this._maxRetryTime=i&&i.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}r.exports=t,t.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},t.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},t.prototype.retry=function(n){if(this._timeout&&clearTimeout(this._timeout),!n)return!1;var i=new Date().getTime();if(n&&i-this._operationStart>=this._maxRetryTime)return this._errors.push(n),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(n);var c=this._timeouts.shift();if(c===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),c=this._cachedTimeouts.slice(-1);else return!1;var a=this;return this._timer=setTimeout(function(){a._attempts++,a._operationTimeoutCb&&(a._timeout=setTimeout(function(){a._operationTimeoutCb(a._attempts)},a._operationTimeout),a._options.unref&&a._timeout.unref()),a._fn(a._attempts)},c),this._options.unref&&this._timer.unref(),!0},t.prototype.attempt=function(n,i){this._fn=n,i&&(i.timeout&&(this._operationTimeout=i.timeout),i.cb&&(this._operationTimeoutCb=i.cb));var c=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){c._operationTimeoutCb()},c._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},t.prototype.try=function(n){console.log("Using RetryOperation.try() is deprecated"),this.attempt(n)},t.prototype.start=function(n){console.log("Using RetryOperation.start() is deprecated"),this.attempt(n)},t.prototype.start=t.prototype.try,t.prototype.errors=function(){return this._errors},t.prototype.attempts=function(){return this._attempts},t.prototype.mainError=function(){if(this._errors.length===0)return null;for(var n={},i=null,c=0,a=0;a<this._errors.length;a++){var s=this._errors[a],o=s.message,f=(n[o]||0)+1;n[o]=f,f>=c&&(i=s,c=f)}return i}}),JA=re(e=>{J();var r=ZA();e.operation=function(t){var n=e.timeouts(t);return new r(n,{forever:t&&(t.forever||t.retries===1/0),unref:t&&t.unref,maxRetryTime:t&&t.maxRetryTime})},e.timeouts=function(t){if(t instanceof Array)return[].concat(t);var n={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in t)n[i]=t[i];if(n.minTimeout>n.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var c=[],a=0;a<n.retries;a++)c.push(this.createTimeout(a,n));return t&&t.forever&&!c.length&&c.push(this.createTimeout(a,n)),c.sort(function(s,o){return s-o}),c},e.createTimeout=function(t,n){var i=n.randomize?Math.random()+1:1,c=Math.round(i*Math.max(n.minTimeout,1)*Math.pow(n.factor,t));return c=Math.min(c,n.maxTimeout),c},e.wrap=function(t,n,i){if(n instanceof Array&&(i=n,n=null),!i){i=[];for(var c in t)typeof t[c]=="function"&&i.push(c)}for(var a=0;a<i.length;a++){var s=i[a],o=t[s];t[s]=function(f){var l=e.operation(n),h=Array.prototype.slice.call(arguments,1),u=h.pop();h.push(function(d){l.retry(d)||(d&&(arguments[0]=l.mainError()),u.apply(this,arguments))}),l.attempt(function(){f.apply(t,h)})}.bind(t,o),t[s].options=n}}}),QA=re((e,r)=>{J(),r.exports=JA()}),eC=re((e,r)=>{J();var t=QA();function n(i,c){function a(s,o){var f=c||{},l;"randomize"in f||(f.randomize=!0),l=t.operation(f);function h(p){o(p||new Error("Aborted"))}function u(p,y){if(p.bail){h(p);return}l.retry(p)?f.onRetry&&f.onRetry(p,y):o(l.mainError())}function d(p){var y;try{y=i(h,p)}catch(b){u(b,p);return}Promise.resolve(y).then(s).catch(function(b){u(b,p)})}l.attempt(d)}return new Promise(a)}r.exports=n});J();J();var A4=Je(eC()),C4=Je(ws()),k4=Je(xs());J();J();var D4=Je(xs()),R4=Je(ws());J();J();var tC=re((e,r)=>{J();function t(n){return r.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},r.exports.__esModule=!0,r.exports.default=r.exports,t(n)}r.exports=t,r.exports.__esModule=!0,r.exports.default=r.exports}),rC=re((e,r)=>{J();var t=tC().default;function n(){"use strict";r.exports=n=function(){return i},r.exports.__esModule=!0,r.exports.default=r.exports;var i={},c=Object.prototype,a=c.hasOwnProperty,s=Object.defineProperty||function(I,B,H){I[B]=H.value},o=typeof Symbol=="function"?Symbol:{},f=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",h=o.toStringTag||"@@toStringTag";function u(I,B,H){return Object.defineProperty(I,B,{value:H,enumerable:!0,configurable:!0,writable:!0}),I[B]}try{u({},"")}catch{u=function(I,B,H){return I[B]=H}}function d(I,B,H,G){var Q=B&&B.prototype instanceof b?B:b,L=Object.create(Q.prototype),M=new k(G||[]);return s(L,"_invoke",{value:A(I,H,M)}),L}function p(I,B,H){try{return{type:"normal",arg:I.call(B,H)}}catch(G){return{type:"throw",arg:G}}}i.wrap=d;var y={};function b(){}function _(){}function g(){}var S={};u(S,f,function(){return this});var E=Object.getPrototypeOf,v=E&&E(E(O([])));v&&v!==c&&a.call(v,f)&&(S=v);var m=g.prototype=b.prototype=Object.create(S);function w(I){["next","throw","return"].forEach(function(B){u(I,B,function(H){return this._invoke(B,H)})})}function x(I,B){function H(Q,L,M,R){var K=p(I[Q],I,L);if(K.type!=="throw"){var q=K.arg,Z=q.value;return Z&&t(Z)=="object"&&a.call(Z,"__await")?B.resolve(Z.__await).then(function(N){H("next",N,M,R)},function(N){H("throw",N,M,R)}):B.resolve(Z).then(function(N){q.value=N,M(q)},function(N){return H("throw",N,M,R)})}R(K.arg)}var G;s(this,"_invoke",{value:function(Q,L){function M(){return new B(function(R,K){H(Q,L,R,K)})}return G=G?G.then(M,M):M()}})}function A(I,B,H){var G="suspendedStart";return function(Q,L){if(G==="executing")throw new Error("Generator is already running");if(G==="completed"){if(Q==="throw")throw L;return P()}for(H.method=Q,H.arg=L;;){var M=H.delegate;if(M){var R=D(M,H);if(R){if(R===y)continue;return R}}if(H.method==="next")H.sent=H._sent=H.arg;else if(H.method==="throw"){if(G==="suspendedStart")throw G="completed",H.arg;H.dispatchException(H.arg)}else H.method==="return"&&H.abrupt("return",H.arg);G="executing";var K=p(I,B,H);if(K.type==="normal"){if(G=H.done?"completed":"suspendedYield",K.arg===y)continue;return{value:K.arg,done:H.done}}K.type==="throw"&&(G="completed",H.method="throw",H.arg=K.arg)}}}function D(I,B){var H=B.method,G=I.iterator[H];if(G===void 0)return B.delegate=null,H==="throw"&&I.iterator.return&&(B.method="return",B.arg=void 0,D(I,B),B.method==="throw")||H!=="return"&&(B.method="throw",B.arg=new TypeError("The iterator does not provide a '"+H+"' method")),y;var Q=p(G,I.iterator,B.arg);if(Q.type==="throw")return B.method="throw",B.arg=Q.arg,B.delegate=null,y;var L=Q.arg;return L?L.done?(B[I.resultName]=L.value,B.next=I.nextLoc,B.method!=="return"&&(B.method="next",B.arg=void 0),B.delegate=null,y):L:(B.method="throw",B.arg=new TypeError("iterator result is not an object"),B.delegate=null,y)}function F(I){var B={tryLoc:I[0]};1 in I&&(B.catchLoc=I[1]),2 in I&&(B.finallyLoc=I[2],B.afterLoc=I[3]),this.tryEntries.push(B)}function T(I){var B=I.completion||{};B.type="normal",delete B.arg,I.completion=B}function k(I){this.tryEntries=[{tryLoc:"root"}],I.forEach(F,this),this.reset(!0)}function O(I){if(I){var B=I[f];if(B)return B.call(I);if(typeof I.next=="function")return I;if(!isNaN(I.length)){var H=-1,G=function Q(){for(;++H<I.length;)if(a.call(I,H))return Q.value=I[H],Q.done=!1,Q;return Q.value=void 0,Q.done=!0,Q};return G.next=G}}return{next:P}}function P(){return{value:void 0,done:!0}}return _.prototype=g,s(m,"constructor",{value:g,configurable:!0}),s(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,h,"GeneratorFunction"),i.isGeneratorFunction=function(I){var B=typeof I=="function"&&I.constructor;return!!B&&(B===_||(B.displayName||B.name)==="GeneratorFunction")},i.mark=function(I){return Object.setPrototypeOf?Object.setPrototypeOf(I,g):(I.__proto__=g,u(I,h,"GeneratorFunction")),I.prototype=Object.create(m),I},i.awrap=function(I){return{__await:I}},w(x.prototype),u(x.prototype,l,function(){return this}),i.AsyncIterator=x,i.async=function(I,B,H,G,Q){Q===void 0&&(Q=Promise);var L=new x(d(I,B,H,G),Q);return i.isGeneratorFunction(B)?L:L.next().then(function(M){return M.done?M.value:L.next()})},w(m),u(m,h,"Generator"),u(m,f,function(){return this}),u(m,"toString",function(){return"[object Generator]"}),i.keys=function(I){var B=Object(I),H=[];for(var G in B)H.push(G);return H.reverse(),function Q(){for(;H.length;){var L=H.pop();if(L in B)return Q.value=L,Q.done=!1,Q}return Q.done=!0,Q}},i.values=O,k.prototype={constructor:k,reset:function(I){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!I)for(var B in this)B.charAt(0)==="t"&&a.call(this,B)&&!isNaN(+B.slice(1))&&(this[B]=void 0)},stop:function(){this.done=!0;var I=this.tryEntries[0].completion;if(I.type==="throw")throw I.arg;return this.rval},dispatchException:function(I){if(this.done)throw I;var B=this;function H(K,q){return L.type="throw",L.arg=I,B.next=K,q&&(B.method="next",B.arg=void 0),!!q}for(var G=this.tryEntries.length-1;G>=0;--G){var Q=this.tryEntries[G],L=Q.completion;if(Q.tryLoc==="root")return H("end");if(Q.tryLoc<=this.prev){var M=a.call(Q,"catchLoc"),R=a.call(Q,"finallyLoc");if(M&&R){if(this.prev<Q.catchLoc)return H(Q.catchLoc,!0);if(this.prev<Q.finallyLoc)return H(Q.finallyLoc)}else if(M){if(this.prev<Q.catchLoc)return H(Q.catchLoc,!0)}else{if(!R)throw new Error("try statement without catch or finally");if(this.prev<Q.finallyLoc)return H(Q.finallyLoc)}}}},abrupt:function(I,B){for(var H=this.tryEntries.length-1;H>=0;--H){var G=this.tryEntries[H];if(G.tryLoc<=this.prev&&a.call(G,"finallyLoc")&&this.prev<G.finallyLoc){var Q=G;break}}Q&&(I==="break"||I==="continue")&&Q.tryLoc<=B&&B<=Q.finallyLoc&&(Q=null);var L=Q?Q.completion:{};return L.type=I,L.arg=B,Q?(this.method="next",this.next=Q.finallyLoc,y):this.complete(L)},complete:function(I,B){if(I.type==="throw")throw I.arg;return I.type==="break"||I.type==="continue"?this.next=I.arg:I.type==="return"?(this.rval=this.arg=I.arg,this.method="return",this.next="end"):I.type==="normal"&&B&&(this.next=B),y},finish:function(I){for(var B=this.tryEntries.length-1;B>=0;--B){var H=this.tryEntries[B];if(H.finallyLoc===I)return this.complete(H.completion,H.afterLoc),T(H),y}},catch:function(I){for(var B=this.tryEntries.length-1;B>=0;--B){var H=this.tryEntries[B];if(H.tryLoc===I){var G=H.completion;if(G.type==="throw"){var Q=G.arg;T(H)}return Q}}throw new Error("illegal catch attempt")},delegateYield:function(I,B,H){return this.delegate={iterator:O(I),resultName:B,nextLoc:H},this.method==="next"&&(this.arg=void 0),y}},i}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}),nC=re((e,r)=>{J();var t=rC()();r.exports=t;try{regeneratorRuntime=t}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}),iC=re((e,r)=>{"use strict";J();var t=(n,...i)=>new Promise(c=>{c(n(...i))});r.exports=t,r.exports.default=t}),sC=re((e,r)=>{"use strict";J();var t=iC(),n=i=>{if(!((Number.isInteger(i)||i===1/0)&&i>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));let c=[],a=0,s=()=>{a--,c.length>0&&c.shift()()},o=(h,u,...d)=>{a++;let p=t(h,...d);u(p),p.then(s,s)},f=(h,u,...d)=>{a<i?o(h,u,...d):c.push(o.bind(null,h,u,...d))},l=(h,...u)=>new Promise(d=>f(h,d,...u));return Object.defineProperties(l,{activeCount:{get:()=>a},pendingCount:{get:()=>c.length},clearQueue:{value:()=>{c.length=0}}}),l};r.exports=n,r.exports.default=n}),oC=re((e,r)=>{"use strict";J();var t=sC(),n=class extends Error{constructor(s){super(),this.value=s}},i=async(s,o)=>o(await s),c=async s=>{let o=await Promise.all(s);if(o[1]===!0)throw new n(o[0]);return!1},a=async(s,o,f)=>{f={concurrency:1/0,preserveOrder:!0,...f};let l=t(f.concurrency),h=[...s].map(d=>[d,l(i,d,o)]),u=t(f.preserveOrder?1:1/0);try{await Promise.all(h.map(d=>u(c,d)))}catch(d){if(d instanceof n)return d.value;throw d}};r.exports=a,r.exports.default=a}),aC=re((e,r)=>{"use strict";J();var t=ce("path"),n=ce("fs"),{promisify:i}=ce("util"),c=oC(),a=i(n.stat),s=i(n.lstat),o={directory:"isDirectory",file:"isFile"};function f({type:h}){if(!(h in o))throw new Error(`Invalid type specified: ${h}`)}var l=(h,u)=>h===void 0||u[o[h]]();r.exports=async(h,u)=>{u={cwd:process.cwd(),type:"file",allowSymlinks:!0,...u},f(u);let d=u.allowSymlinks?a:s;return c(h,async p=>{try{let y=await d(t.resolve(u.cwd,p));return l(u.type,y)}catch{return!1}},u)},r.exports.sync=(h,u)=>{u={cwd:process.cwd(),allowSymlinks:!0,type:"file",...u},f(u);let d=u.allowSymlinks?n.statSync:n.lstatSync;for(let p of h)try{let y=d(t.resolve(u.cwd,p));if(l(u.type,y))return p}catch{}}}),uC=re((e,r)=>{"use strict";J();var t=ce("fs"),{promisify:n}=ce("util"),i=n(t.access);r.exports=async c=>{try{return await i(c),!0}catch{return!1}},r.exports.sync=c=>{try{return t.accessSync(c),!0}catch{return!1}}}),lC=re((e,r)=>{"use strict";J();var t=ce("path"),n=aC(),i=uC(),c=Symbol("findUp.stop");r.exports=async(a,s={})=>{let o=t.resolve(s.cwd||""),{root:f}=t.parse(o),l=[].concat(a),h=async u=>{if(typeof a!="function")return n(l,u);let d=await a(u.cwd);return typeof d=="string"?n([d],u):d};for(;;){let u=await h({...s,cwd:o});if(u===c)return;if(u)return t.resolve(o,u);if(o===f)return;o=t.dirname(o)}},r.exports.sync=(a,s={})=>{let o=t.resolve(s.cwd||""),{root:f}=t.parse(o),l=[].concat(a),h=u=>{if(typeof a!="function")return n.sync(l,u);let d=a(u.cwd);return typeof d=="string"?n.sync([d],u):d};for(;;){let u=h({...s,cwd:o});if(u===c)return;if(u)return t.resolve(o,u);if(o===f)return;o=t.dirname(o)}},r.exports.exists=i,r.exports.sync.exists=i.sync,r.exports.stop=c}),gt=re(e=>{"use strict";J(),e.fromCallback=function(r){return Object.defineProperty(function(){if(typeof arguments[arguments.length-1]=="function")r.apply(this,arguments);else return new Promise((t,n)=>{arguments[arguments.length]=(i,c)=>{if(i)return n(i);t(c)},arguments.length++,r.apply(this,arguments)})},"name",{value:r.name})},e.fromPromise=function(r){return Object.defineProperty(function(){let t=arguments[arguments.length-1];if(typeof t!="function")return r.apply(this,arguments);r.apply(this,arguments).then(n=>t(null,n),t)},"name",{value:r.name})}}),km=re(e=>{"use strict";J();var r=gt().fromCallback,t=Ne(),n=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(i=>typeof t[i]=="function");Object.keys(t).forEach(i=>{i!=="promises"&&(e[i]=t[i])}),n.forEach(i=>{e[i]=r(t[i])}),e.exists=function(i,c){return typeof c=="function"?t.exists(i,c):new Promise(a=>t.exists(i,a))},e.read=function(i,c,a,s,o,f){return typeof f=="function"?t.read(i,c,a,s,o,f):new Promise((l,h)=>{t.read(i,c,a,s,o,(u,d,p)=>{if(u)return h(u);l({bytesRead:d,buffer:p})})})},e.write=function(i,c,...a){return typeof a[a.length-1]=="function"?t.write(i,c,...a):new Promise((s,o)=>{t.write(i,c,...a,(f,l,h)=>{if(f)return o(f);s({bytesWritten:l,buffer:h})})})},typeof t.realpath.native=="function"&&(e.realpath.native=r(t.realpath.native))}),Dm=re((e,r)=>{"use strict";J();var t=ce("path");function n(a){return a=t.normalize(t.resolve(a)).split(t.sep),a.length>0?a[0]:null}var i=/[<>:"|?*]/;function c(a){let s=n(a);return a=a.replace(s,""),i.test(a)}r.exports={getRootPath:n,invalidWin32Path:c}}),cC=re((e,r)=>{"use strict";J();var t=Ne(),n=ce("path"),i=Dm().invalidWin32Path,c=parseInt("0777",8);function a(s,o,f,l){if(typeof o=="function"?(f=o,o={}):(!o||typeof o!="object")&&(o={mode:o}),process.platform==="win32"&&i(s)){let d=new Error(s+" contains invalid WIN32 path characters.");return d.code="EINVAL",f(d)}let h=o.mode,u=o.fs||t;h===void 0&&(h=c&~process.umask()),l||(l=null),f=f||function(){},s=n.resolve(s),u.mkdir(s,h,d=>{if(!d)return l=l||s,f(null,l);switch(d.code){case"ENOENT":if(n.dirname(s)===s)return f(d);a(n.dirname(s),o,(p,y)=>{p?f(p,y):a(s,o,f,y)});break;default:u.stat(s,(p,y)=>{p||!y.isDirectory()?f(d,l):f(null,l)});break}})}r.exports=a}),hC=re((e,r)=>{"use strict";J();var t=Ne(),n=ce("path"),i=Dm().invalidWin32Path,c=parseInt("0777",8);function a(s,o,f){(!o||typeof o!="object")&&(o={mode:o});let l=o.mode,h=o.fs||t;if(process.platform==="win32"&&i(s)){let u=new Error(s+" contains invalid WIN32 path characters.");throw u.code="EINVAL",u}l===void 0&&(l=c&~process.umask()),f||(f=null),s=n.resolve(s);try{h.mkdirSync(s,l),f=f||s}catch(u){if(u.code==="ENOENT"){if(n.dirname(s)===s)throw u;f=a(n.dirname(s),o,f),a(s,o,f)}else{let d;try{d=h.statSync(s)}catch{throw u}if(!d.isDirectory())throw u}}return f}r.exports=a}),Et=re((e,r)=>{"use strict";J();var t=gt().fromCallback,n=t(cC()),i=hC();r.exports={mkdirs:n,mkdirsSync:i,mkdirp:n,mkdirpSync:i,ensureDir:n,ensureDirSync:i}}),Rm=re((e,r)=>{"use strict";J();var t=Ne(),n=ce("os"),i=ce("path");function c(){let l=i.join("millis-test-sync"+Date.now().toString()+Math.random().toString().slice(2));l=i.join(n.tmpdir(),l);let h=new Date(1435410243862);t.writeFileSync(l,"https://github.com/jprichardson/node-fs-extra/pull/141");let u=t.openSync(l,"r+");return t.futimesSync(u,h,h),t.closeSync(u),t.statSync(l).mtime>1435410243e3}function a(l){let h=i.join("millis-test"+Date.now().toString()+Math.random().toString().slice(2));h=i.join(n.tmpdir(),h);let u=new Date(1435410243862);t.writeFile(h,"https://github.com/jprichardson/node-fs-extra/pull/141",d=>{if(d)return l(d);t.open(h,"r+",(p,y)=>{if(p)return l(p);t.futimes(y,u,u,b=>{if(b)return l(b);t.close(y,_=>{if(_)return l(_);t.stat(h,(g,S)=>{if(g)return l(g);l(null,S.mtime>1435410243e3)})})})})})}function s(l){if(typeof l=="number")return Math.floor(l/1e3)*1e3;if(l instanceof Date)return new Date(Math.floor(l.getTime()/1e3)*1e3);throw new Error("fs-extra: timeRemoveMillis() unknown parameter type")}function o(l,h,u,d){t.open(l,"r+",(p,y)=>{if(p)return d(p);t.futimes(y,h,u,b=>{t.close(y,_=>{d&&d(b||_)})})})}function f(l,h,u){let d=t.openSync(l,"r+");return t.futimesSync(d,h,u),t.closeSync(d)}r.exports={hasMillisRes:a,hasMillisResSync:c,timeRemoveMillis:s,utimesMillis:o,utimesMillisSync:f}}),As=re((e,r)=>{"use strict";J();var t=Ne(),n=ce("path"),i=10,c=5,a=0,s=process.versions.node.split("."),o=Number.parseInt(s[0],10),f=Number.parseInt(s[1],10),l=Number.parseInt(s[2],10);function h(){return o>i||o===i&&(f>c||f===c&&l>=a)}function u(E,v,m){h()?t.stat(E,{bigint:!0},(w,x)=>{if(w)return m(w);t.stat(v,{bigint:!0},(A,D)=>A?A.code==="ENOENT"?m(null,{srcStat:x,destStat:null}):m(A):m(null,{srcStat:x,destStat:D}))}):t.stat(E,(w,x)=>{if(w)return m(w);t.stat(v,(A,D)=>A?A.code==="ENOENT"?m(null,{srcStat:x,destStat:null}):m(A):m(null,{srcStat:x,destStat:D}))})}function d(E,v){let m,w;h()?m=t.statSync(E,{bigint:!0}):m=t.statSync(E);try{h()?w=t.statSync(v,{bigint:!0}):w=t.statSync(v)}catch(x){if(x.code==="ENOENT")return{srcStat:m,destStat:null};throw x}return{srcStat:m,destStat:w}}function p(E,v,m,w){u(E,v,(x,A)=>{if(x)return w(x);let{srcStat:D,destStat:F}=A;return F&&F.ino&&F.dev&&F.ino===D.ino&&F.dev===D.dev?w(new Error("Source and destination must not be the same.")):D.isDirectory()&&g(E,v)?w(new Error(S(E,v,m))):w(null,{srcStat:D,destStat:F})})}function y(E,v,m){let{srcStat:w,destStat:x}=d(E,v);if(x&&x.ino&&x.dev&&x.ino===w.ino&&x.dev===w.dev)throw new Error("Source and destination must not be the same.");if(w.isDirectory()&&g(E,v))throw new Error(S(E,v,m));return{srcStat:w,destStat:x}}function b(E,v,m,w,x){let A=n.resolve(n.dirname(E)),D=n.resolve(n.dirname(m));if(D===A||D===n.parse(D).root)return x();h()?t.stat(D,{bigint:!0},(F,T)=>F?F.code==="ENOENT"?x():x(F):T.ino&&T.dev&&T.ino===v.ino&&T.dev===v.dev?x(new Error(S(E,m,w))):b(E,v,D,w,x)):t.stat(D,(F,T)=>F?F.code==="ENOENT"?x():x(F):T.ino&&T.dev&&T.ino===v.ino&&T.dev===v.dev?x(new Error(S(E,m,w))):b(E,v,D,w,x))}function _(E,v,m,w){let x=n.resolve(n.dirname(E)),A=n.resolve(n.dirname(m));if(A===x||A===n.parse(A).root)return;let D;try{h()?D=t.statSync(A,{bigint:!0}):D=t.statSync(A)}catch(F){if(F.code==="ENOENT")return;throw F}if(D.ino&&D.dev&&D.ino===v.ino&&D.dev===v.dev)throw new Error(S(E,m,w));return _(E,v,A,w)}function g(E,v){let m=n.resolve(E).split(n.sep).filter(x=>x),w=n.resolve(v).split(n.sep).filter(x=>x);return m.reduce((x,A,D)=>x&&w[D]===A,!0)}function S(E,v,m){return`Cannot ${m} '${E}' to a subdirectory of itself, '${v}'.`}r.exports={checkPaths:p,checkPathsSync:y,checkParentPaths:b,checkParentPathsSync:_,isSrcSubdir:g}}),fC=re((e,r)=>{"use strict";J(),r.exports=function(t){if(typeof Buffer.allocUnsafe=="function")try{return Buffer.allocUnsafe(t)}catch{return new Buffer(t)}return new Buffer(t)}}),pC=re((e,r)=>{"use strict";J();var t=Ne(),n=ce("path"),i=Et().mkdirsSync,c=Rm().utimesMillisSync,a=As();function s(v,m,w){typeof w=="function"&&(w={filter:w}),w=w||{},w.clobber="clobber"in w?!!w.clobber:!0,w.overwrite="overwrite"in w?!!w.overwrite:w.clobber,w.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
|
72
72
|
|
73
73
|
see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:x,destStat:A}=a.checkPathsSync(v,m,"copy");return a.checkParentPathsSync(v,x,m,"copy"),o(A,v,m,w)}function o(v,m,w,x){if(x.filter&&!x.filter(m,w))return;let A=n.dirname(w);return t.existsSync(A)||i(A),f(v,m,w,x)}function f(v,m,w,x){if(!(x.filter&&!x.filter(m,w)))return l(v,m,w,x)}function l(v,m,w,x){let A=(x.dereference?t.statSync:t.lstatSync)(m);if(A.isDirectory())return y(A,v,m,w,x);if(A.isFile()||A.isCharacterDevice()||A.isBlockDevice())return h(A,v,m,w,x);if(A.isSymbolicLink())return S(v,m,w,x)}function h(v,m,w,x,A){return m?u(v,w,x,A):d(v,w,x,A)}function u(v,m,w,x){if(x.overwrite)return t.unlinkSync(w),d(v,m,w,x);if(x.errorOnExist)throw new Error(`'${w}' already exists`)}function d(v,m,w,x){return typeof t.copyFileSync=="function"?(t.copyFileSync(m,w),t.chmodSync(w,v.mode),x.preserveTimestamps?c(w,v.atime,v.mtime):void 0):p(v,m,w,x)}function p(v,m,w,x){let A=fC()(65536),D=t.openSync(m,"r"),F=t.openSync(w,"w",v.mode),T=0;for(;T<v.size;){let k=t.readSync(D,A,0,65536,T);t.writeSync(F,A,0,k),T+=k}x.preserveTimestamps&&t.futimesSync(F,v.atime,v.mtime),t.closeSync(D),t.closeSync(F)}function y(v,m,w,x,A){if(!m)return b(v,w,x,A);if(m&&!m.isDirectory())throw new Error(`Cannot overwrite non-directory '${x}' with directory '${w}'.`);return _(w,x,A)}function b(v,m,w,x){return t.mkdirSync(w),_(m,w,x),t.chmodSync(w,v.mode)}function _(v,m,w){t.readdirSync(v).forEach(x=>g(x,v,m,w))}function g(v,m,w,x){let A=n.join(m,v),D=n.join(w,v),{destStat:F}=a.checkPathsSync(A,D,"copy");return f(F,A,D,x)}function S(v,m,w,x){let A=t.readlinkSync(m);if(x.dereference&&(A=n.resolve(process.cwd(),A)),v){let D;try{D=t.readlinkSync(w)}catch(F){if(F.code==="EINVAL"||F.code==="UNKNOWN")return t.symlinkSync(A,w);throw F}if(x.dereference&&(D=n.resolve(process.cwd(),D)),a.isSrcSubdir(A,D))throw new Error(`Cannot copy '${A}' to a subdirectory of itself, '${D}'.`);if(t.statSync(w).isDirectory()&&a.isSrcSubdir(D,A))throw new Error(`Cannot overwrite '${D}' with '${A}'.`);return E(A,w)}else return t.symlinkSync(A,w)}function E(v,m){return t.unlinkSync(m),t.symlinkSync(v,m)}r.exports=s}),Om=re((e,r)=>{"use strict";J(),r.exports={copySync:pC()}}),Vt=re((e,r)=>{"use strict";J();var t=gt().fromPromise,n=km();function i(c){return n.access(c).then(()=>!0).catch(()=>!1)}r.exports={pathExists:t(i),pathExistsSync:n.existsSync}}),dC=re((e,r)=>{"use strict";J();var t=Ne(),n=ce("path"),i=Et().mkdirs,c=Vt().pathExists,a=Rm().utimesMillis,s=As();function o(A,D,F,T){typeof F=="function"&&!T?(T=F,F={}):typeof F=="function"&&(F={filter:F}),T=T||function(){},F=F||{},F.clobber="clobber"in F?!!F.clobber:!0,F.overwrite="overwrite"in F?!!F.overwrite:F.clobber,F.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
|
74
74
|
|
@@ -142,12 +142,12 @@ GFS4: `),console.error(g)}),t[s]||(u=global[s]||[],l(t,u),t.close=function(g){fu
|
|
142
142
|
`:`
|
143
143
|
`.charCodeAt(),i=typeof t=="string"?"\r":"\r".charCodeAt();return t[t.length-1]===n&&(t=t.slice(0,t.length-1)),t[t.length-1]===i&&(t=t.slice(0,t.length-1)),t}}),NF=te((e,r)=>{"use strict";Y();var t=le("path"),n=m1(),i=c=>{c={cwd:process.cwd(),path:process.env[n()],execPath:process.execPath,...c};let a,s=t.resolve(c.cwd),o=[];for(;a!==s;)o.push(t.join(s,"node_modules/.bin")),a=s,s=t.resolve(s,"..");let f=t.resolve(c.cwd,c.execPath,"..");return o.push(f),o.concat(c.path).join(t.delimiter)};r.exports=i,r.exports.default=i,r.exports.env=c=>{c={env:process.env,...c};let a={...c.env},s=n({env:a});return c.path=a[s],a[s]=r.exports(c),a}}),jF=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.SIGNALS=void 0;var r=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}];e.SIGNALS=r}),y1=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.SIGRTMAX=e.getRealtimeSignals=void 0;var r=function(){let c=i-n+1;return Array.from({length:c},t)};e.getRealtimeSignals=r;var t=function(c,a){return{name:`SIGRT${a+1}`,number:n+a,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},n=34,i=64;e.SIGRTMAX=i}),$F=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.getSignals=void 0;var r=le("os"),t=jF(),n=y1(),i=function(){let a=(0,n.getRealtimeSignals)();return[...t.SIGNALS,...a].map(c)};e.getSignals=i;var c=function({name:a,number:s,description:o,action:f,forced:l=!1,standard:h}){let{signals:{[a]:u}}=r.constants,d=u!==void 0;return{name:a,number:d?u:s,description:o,supported:d,action:f,forced:l,standard:h}}}),HF=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.signalsByNumber=e.signalsByName=void 0;var r=le("os"),t=$F(),n=y1(),i=function(){return(0,t.getSignals)().reduce(c,{})},c=function(h,{name:u,number:d,description:p,supported:y,action:b,forced:_,standard:g}){return{...h,[u]:{name:u,number:d,description:p,supported:y,action:b,forced:_,standard:g}}},a=i();e.signalsByName=a;var s=function(){let h=(0,t.getSignals)(),u=n.SIGRTMAX+1,d=Array.from({length:u},(p,y)=>o(y,h));return Object.assign({},...d)},o=function(h,u){let d=f(h,u);if(d===void 0)return{};let{name:p,description:y,supported:b,action:_,forced:g,standard:S}=d;return{[h]:{name:p,number:h,description:y,supported:b,action:_,forced:g,standard:S}}},f=function(h,u){let d=u.find(({name:p})=>r.constants.signals[p]===h);return d!==void 0?d:u.find(p=>p.number===h)},l=s();e.signalsByNumber=l}),qF=te((e,r)=>{"use strict";Y();var{signalsByName:t}=HF(),n=({timedOut:c,timeout:a,errorCode:s,signal:o,signalDescription:f,exitCode:l,isCanceled:h})=>c?`timed out after ${a} milliseconds`:h?"was canceled":s!==void 0?`failed with ${s}`:o!==void 0?`was killed with ${o} (${f})`:l!==void 0?`failed with exit code ${l}`:"failed",i=({stdout:c,stderr:a,all:s,error:o,signal:f,exitCode:l,command:h,escapedCommand:u,timedOut:d,isCanceled:p,killed:y,parsed:{options:{timeout:b}}})=>{l=l===null?void 0:l,f=f===null?void 0:f;let _=f===void 0?void 0:t[f].description,g=o&&o.code,S=`Command ${n({timedOut:d,timeout:b,errorCode:g,signal:f,signalDescription:_,exitCode:l,isCanceled:p})}: ${h}`,E=Object.prototype.toString.call(o)==="[object Error]",v=E?`${S}
|
144
144
|
${o.message}`:S,m=[v,a,c].filter(Boolean).join(`
|
145
|
-
`);return E?(o.originalMessage=o.message,o.message=m):o=new Error(m),o.shortMessage=v,o.command=h,o.escapedCommand=u,o.exitCode=l,o.signal=f,o.signalDescription=_,o.stdout=c,o.stderr=a,s!==void 0&&(o.all=s),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=!!d,o.isCanceled=p,o.killed=y&&!d,o};r.exports=i}),GF=te((e,r)=>{"use strict";Y();var t=["stdin","stdout","stderr"],n=c=>t.some(a=>c[a]!==void 0),i=c=>{if(!c)return;let{stdio:a}=c;if(a===void 0)return t.map(o=>c[o]);if(n(c))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${t.map(o=>`\`${o}\``).join(", ")}`);if(typeof a=="string")return a;if(!Array.isArray(a))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof a}\``);let s=Math.max(a.length,t.length);return Array.from({length:s},(o,f)=>a[f])};r.exports=i,r.exports.node=c=>{let a=i(c);return a==="ipc"?"ipc":a===void 0||typeof a=="string"?[a,a,a,"ipc"]:a.includes("ipc")?a:[...a,"ipc"]}}),UF=te((e,r)=>{"use strict";Y();var t=le("os"),n=Ps(),i=1e3*5,c=(y,b="SIGTERM",_={})=>{let g=y(b);return a(y,b,_,g),g},a=(y,b,_,g)=>{if(!s(b,_,g))return;let S=f(_),E=setTimeout(()=>{y("SIGKILL")},S);E.unref&&E.unref()},s=(y,{forceKillAfterTimeout:b},_)=>o(y)&&b!==!1&&_,o=y=>y===t.constants.signals.SIGTERM||typeof y=="string"&&y.toUpperCase()==="SIGTERM",f=({forceKillAfterTimeout:y=!0})=>{if(y===!0)return i;if(!Number.isFinite(y)||y<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${y}\` (${typeof y})`);return y},l=(y,b)=>{y.kill()&&(b.isCanceled=!0)},h=(y,b,_)=>{y.kill(b),_(Object.assign(new Error("Timed out"),{timedOut:!0,signal:b}))},u=(y,{timeout:b,killSignal:_="SIGTERM"},g)=>{if(b===0||b===void 0)return g;let S,E=new Promise((m,w)=>{S=setTimeout(()=>{h(y,_,w)},b)}),v=g.finally(()=>{clearTimeout(S)});return Promise.race([E,v])},d=({timeout:y})=>{if(y!==void 0&&(!Number.isFinite(y)||y<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${y}\` (${typeof y})`)},p=async(y,{cleanup:b,detached:_},g)=>{if(!b||_)return g;let S=n(()=>{y.kill()});return g.finally(()=>{S()})};r.exports={spawnedKill:c,spawnedCancel:l,setupTimeout:u,validateTimeout:d,setExitHandler:p}}),WF=te((e,r)=>{"use strict";Y();var t=n=>n!==null&&typeof n=="object"&&typeof n.pipe=="function";t.writable=n=>t(n)&&n.writable!==!1&&typeof n._write=="function"&&typeof n._writableState=="object",t.readable=n=>t(n)&&n.readable!==!1&&typeof n._read=="function"&&typeof n._readableState=="object",t.duplex=n=>t.writable(n)&&t.readable(n),t.transform=n=>t.duplex(n)&&typeof n._transform=="function",r.exports=t}),zF=te((e,r)=>{"use strict";Y();var{PassThrough:t}=le("stream");r.exports=n=>{n={...n};let{array:i}=n,{encoding:c}=n,a=c==="buffer",s=!1;i?s=!(c||a):c=c||"utf8",a&&(c=null);let o=new t({objectMode:s});c&&o.setEncoding(c);let f=0,l=[];return o.on("data",h=>{l.push(h),s?f=l.length:f+=h.length}),o.getBufferedValue=()=>i?l:a?Buffer.concat(l,f):l.join(""),o.getBufferedLength=()=>f,o}}),VF=te((e,r)=>{"use strict";Y();var{constants:t}=le("buffer"),n=le("stream"),{promisify:i}=le("util"),c=zF(),a=i(n.pipeline),s=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function o(f,l){if(!f)throw new Error("Expected a stream");l={maxBuffer:1/0,...l};let{maxBuffer:h}=l,u=c(l);return await new Promise((d,p)=>{let y=b=>{b&&u.getBufferedLength()<=t.MAX_LENGTH&&(b.bufferedData=u.getBufferedValue()),p(b)};(async()=>{try{await a(f,u),d()}catch(b){y(b)}})(),u.on("data",()=>{u.getBufferedLength()>h&&y(new s)})}),u.getBufferedValue()}r.exports=o,r.exports.buffer=(f,l)=>o(f,{...l,encoding:"buffer"}),r.exports.array=(f,l)=>o(f,{...l,array:!0}),r.exports.MaxBufferError=s}),KF=te((e,r)=>{"use strict";Y();var{PassThrough:t}=le("stream");r.exports=function(){var n=[],i=new t({objectMode:!0});return i.setMaxListeners(0),i.add=c,i.isEmpty=a,i.on("unpipe",s),Array.prototype.slice.call(arguments).forEach(c),i;function c(o){return Array.isArray(o)?(o.forEach(c),this):(n.push(o),o.once("end",s.bind(null,o)),o.once("error",i.emit.bind(i,"error")),o.pipe(i,{end:!1}),this)}function a(){return n.length==0}function s(o){n=n.filter(function(f){return f!==o}),!n.length&&i.readable&&i.end()}}}),YF=te((e,r)=>{"use strict";Y();var t=WF(),n=VF(),i=KF(),c=(h,u)=>{u===void 0||h.stdin===void 0||(t(u)?u.pipe(h.stdin):h.stdin.end(u))},a=(h,{all:u})=>{if(!u||!h.stdout&&!h.stderr)return;let d=i();return h.stdout&&d.add(h.stdout),h.stderr&&d.add(h.stderr),d},s=async(h,u)=>{if(h){h.destroy();try{return await u}catch(d){return d.bufferedData}}},o=(h,{encoding:u,buffer:d,maxBuffer:p})=>{if(!(!h||!d))return u?n(h,{encoding:u,maxBuffer:p}):n.buffer(h,{maxBuffer:p})},f=async({stdout:h,stderr:u,all:d},{encoding:p,buffer:y,maxBuffer:b},_)=>{let g=o(h,{encoding:p,buffer:y,maxBuffer:b}),S=o(u,{encoding:p,buffer:y,maxBuffer:b}),E=o(d,{encoding:p,buffer:y,maxBuffer:b*2});try{return await Promise.all([_,g,S,E])}catch(v){return Promise.all([{error:v,signal:v.signal,timedOut:v.timedOut},s(h,g),s(u,S),s(d,E)])}},l=({input:h})=>{if(t(h))throw new TypeError("The `input` option cannot be a stream in sync mode")};r.exports={handleInput:c,makeAllStream:a,getSpawnedResult:f,validateInputSync:l}}),XF=te((e,r)=>{"use strict";Y();var t=(async()=>{})().constructor.prototype,n=["then","catch","finally"].map(a=>[a,Reflect.getOwnPropertyDescriptor(t,a)]),i=(a,s)=>{for(let[o,f]of n){let l=typeof s=="function"?(...h)=>Reflect.apply(f.value,s(),h):f.value.bind(s);Reflect.defineProperty(a,o,{...f,value:l})}return a},c=a=>new Promise((s,o)=>{a.on("exit",(f,l)=>{s({exitCode:f,signal:l})}),a.on("error",f=>{o(f)}),a.stdin&&a.stdin.on("error",f=>{o(f)})});r.exports={mergePromise:i,getSpawnedPromise:c}}),ZF=te((e,r)=>{"use strict";Y();var t=(l,h=[])=>Array.isArray(h)?[l,...h]:[l],n=/^[\w.-]+$/,i=/"/g,c=l=>typeof l!="string"||n.test(l)?l:`"${l.replace(i,'\\"')}"`,a=(l,h)=>t(l,h).join(" "),s=(l,h)=>t(l,h).map(u=>c(u)).join(" "),o=/ +/g,f=l=>{let h=[];for(let u of l.trim().split(o)){let d=h[h.length-1];d&&d.endsWith("\\")?h[h.length-1]=`${d.slice(0,-1)} ${u}`:h.push(u)}return h};r.exports={joinCommand:a,getEscapedCommand:s,parseCommand:f}}),JF=te((e,r)=>{"use strict";Y();var t=le("path"),n=le("child_process"),i=IF(),c=MF(),a=NF(),s=Fs(),o=qF(),f=GF(),{spawnedKill:l,spawnedCancel:h,setupTimeout:u,validateTimeout:d,setExitHandler:p}=UF(),{handleInput:y,getSpawnedResult:b,makeAllStream:_,validateInputSync:g}=YF(),{mergePromise:S,getSpawnedPromise:E}=XF(),{joinCommand:v,parseCommand:m,getEscapedCommand:w}=ZF(),x=1e3*1e3*100,A=({env:k,extendEnv:O,preferLocal:P,localDir:I,execPath:B})=>{let H=O?{...process.env,...k}:k;return P?a.env({env:H,cwd:I,execPath:B}):H},D=(k,O,P={})=>{let I=i._parse(k,O,P);return k=I.command,O=I.args,P=I.options,P={maxBuffer:x,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:P.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...P},P.env=A(P),P.stdio=f(P),process.platform==="win32"&&t.basename(k,".exe")==="cmd"&&O.unshift("/q"),{file:k,args:O,options:P,parsed:I}},F=(k,O,P)=>typeof O!="string"&&!Buffer.isBuffer(O)?P===void 0?void 0:"":k.stripFinalNewline?c(O):O,T=(k,O,P)=>{let I=D(k,O,P),B=v(k,O),H=w(k,O);d(I.options);let G;try{G=n.spawn(I.file,I.args,I.options)}catch(q){let Z=new n.ChildProcess,N=Promise.reject(o({error:q,stdout:"",stderr:"",all:"",command:B,escapedCommand:H,parsed:I,timedOut:!1,isCanceled:!1,killed:!1}));return S(Z,N)}let Q=E(G),L=u(G,I.options,Q),M=p(G,I.options,L),R={isCanceled:!1};G.kill=l.bind(null,G.kill.bind(G)),G.cancel=h.bind(null,G,R);let K=s(async()=>{let[{error:q,exitCode:Z,signal:N,timedOut:z},ee,ae,oe]=await b(G,I.options,M),de=F(I.options,ee),pe=F(I.options,ae),j=F(I.options,oe);if(q||Z!==0||N!==null){let W=o({error:q,exitCode:Z,signal:N,stdout:de,stderr:pe,all:j,command:B,escapedCommand:H,parsed:I,timedOut:z,isCanceled:R.isCanceled,killed:G.killed});if(!I.options.reject)return W;throw W}return{command:B,escapedCommand:H,exitCode:0,stdout:de,stderr:pe,all:j,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return y(G,I.options.input),G.all=_(G,I.options),S(G,K)};r.exports=T,r.exports.sync=(k,O,P)=>{let I=D(k,O,P),B=v(k,O),H=w(k,O);g(I.options);let G;try{G=n.spawnSync(I.file,I.args,I.options)}catch(M){throw o({error:M,stdout:"",stderr:"",all:"",command:B,escapedCommand:H,parsed:I,timedOut:!1,isCanceled:!1,killed:!1})}let Q=F(I.options,G.stdout,G.error),L=F(I.options,G.stderr,G.error);if(G.error||G.status!==0||G.signal!==null){let M=o({stdout:Q,stderr:L,error:G.error,signal:G.signal,exitCode:G.status,command:B,escapedCommand:H,parsed:I,timedOut:G.error&&G.error.code==="ETIMEDOUT",isCanceled:!1,killed:G.signal!==null});if(!I.options.reject)return M;throw M}return{command:B,escapedCommand:H,exitCode:0,stdout:Q,stderr:L,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},r.exports.command=(k,O)=>{let[P,...I]=m(k);return T(P,I,O)},r.exports.commandSync=(k,O)=>{let[P,...I]=m(k);return T.sync(P,I,O)},r.exports.node=(k,O,P={})=>{O&&!Array.isArray(O)&&typeof O=="object"&&(P=O,O=[]);let I=f.node(P),B=process.execArgv.filter(Q=>!Q.startsWith("--inspect")),{nodePath:H=process.execPath,nodeOptions:G=B}=P;return T(H,[...G,k,...Array.isArray(O)?O:[]],{...P,stdin:void 0,stdout:void 0,stderr:void 0,stdio:I,shell:!1})}});Y();var QF=je(JF());async function vn(e,r=[],t){let n={cwd:g1.default.tmpdir(),env:{COREPACK_ENABLE_STRICT:"0"},...t};try{let{stdout:i}=await(0,QF.default)(e,r,n);return i.trim()}catch{return}}async function vl(){let[e,r,t]=await Promise.all([vn("yarnpkg",["--version"]),vn("npm",["--version"]),vn("pnpm",["--version"])]);return{yarn:e,pnpm:t,npm:r}}async function _l(){let[e,r,t]=await Promise.all([vn("yarnpkg",["global","bin"]),vn("npm",["config","get","prefix"]),vn("pnpm",["bin","--global"])]);return{yarn:e,pnpm:t,npm:r}}Y();var s7=je(fr()),o7=je(Tr());Y();Y();var tP=te((e,r)=>{Y();function t(n){return r.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},r.exports.__esModule=!0,r.exports.default=r.exports,t(n)}r.exports=t,r.exports.__esModule=!0,r.exports.default=r.exports}),rP=te((e,r)=>{Y();var t=tP().default;function n(){"use strict";r.exports=n=function(){return i},r.exports.__esModule=!0,r.exports.default=r.exports;var i={},c=Object.prototype,a=c.hasOwnProperty,s=Object.defineProperty||function(I,B,H){I[B]=H.value},o=typeof Symbol=="function"?Symbol:{},f=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",h=o.toStringTag||"@@toStringTag";function u(I,B,H){return Object.defineProperty(I,B,{value:H,enumerable:!0,configurable:!0,writable:!0}),I[B]}try{u({},"")}catch{u=function(I,B,H){return I[B]=H}}function d(I,B,H,G){var Q=B&&B.prototype instanceof b?B:b,L=Object.create(Q.prototype),M=new k(G||[]);return s(L,"_invoke",{value:A(I,H,M)}),L}function p(I,B,H){try{return{type:"normal",arg:I.call(B,H)}}catch(G){return{type:"throw",arg:G}}}i.wrap=d;var y={};function b(){}function _(){}function g(){}var S={};u(S,f,function(){return this});var E=Object.getPrototypeOf,v=E&&E(E(O([])));v&&v!==c&&a.call(v,f)&&(S=v);var m=g.prototype=b.prototype=Object.create(S);function w(I){["next","throw","return"].forEach(function(B){u(I,B,function(H){return this._invoke(B,H)})})}function x(I,B){function H(Q,L,M,R){var K=p(I[Q],I,L);if(K.type!=="throw"){var q=K.arg,Z=q.value;return Z&&t(Z)=="object"&&a.call(Z,"__await")?B.resolve(Z.__await).then(function(N){H("next",N,M,R)},function(N){H("throw",N,M,R)}):B.resolve(Z).then(function(N){q.value=N,M(q)},function(N){return H("throw",N,M,R)})}R(K.arg)}var G;s(this,"_invoke",{value:function(Q,L){function M(){return new B(function(R,K){H(Q,L,R,K)})}return G=G?G.then(M,M):M()}})}function A(I,B,H){var G="suspendedStart";return function(Q,L){if(G==="executing")throw new Error("Generator is already running");if(G==="completed"){if(Q==="throw")throw L;return P()}for(H.method=Q,H.arg=L;;){var M=H.delegate;if(M){var R=D(M,H);if(R){if(R===y)continue;return R}}if(H.method==="next")H.sent=H._sent=H.arg;else if(H.method==="throw"){if(G==="suspendedStart")throw G="completed",H.arg;H.dispatchException(H.arg)}else H.method==="return"&&H.abrupt("return",H.arg);G="executing";var K=p(I,B,H);if(K.type==="normal"){if(G=H.done?"completed":"suspendedYield",K.arg===y)continue;return{value:K.arg,done:H.done}}K.type==="throw"&&(G="completed",H.method="throw",H.arg=K.arg)}}}function D(I,B){var H=B.method,G=I.iterator[H];if(G===void 0)return B.delegate=null,H==="throw"&&I.iterator.return&&(B.method="return",B.arg=void 0,D(I,B),B.method==="throw")||H!=="return"&&(B.method="throw",B.arg=new TypeError("The iterator does not provide a '"+H+"' method")),y;var Q=p(G,I.iterator,B.arg);if(Q.type==="throw")return B.method="throw",B.arg=Q.arg,B.delegate=null,y;var L=Q.arg;return L?L.done?(B[I.resultName]=L.value,B.next=I.nextLoc,B.method!=="return"&&(B.method="next",B.arg=void 0),B.delegate=null,y):L:(B.method="throw",B.arg=new TypeError("iterator result is not an object"),B.delegate=null,y)}function F(I){var B={tryLoc:I[0]};1 in I&&(B.catchLoc=I[1]),2 in I&&(B.finallyLoc=I[2],B.afterLoc=I[3]),this.tryEntries.push(B)}function T(I){var B=I.completion||{};B.type="normal",delete B.arg,I.completion=B}function k(I){this.tryEntries=[{tryLoc:"root"}],I.forEach(F,this),this.reset(!0)}function O(I){if(I){var B=I[f];if(B)return B.call(I);if(typeof I.next=="function")return I;if(!isNaN(I.length)){var H=-1,G=function Q(){for(;++H<I.length;)if(a.call(I,H))return Q.value=I[H],Q.done=!1,Q;return Q.value=void 0,Q.done=!0,Q};return G.next=G}}return{next:P}}function P(){return{value:void 0,done:!0}}return _.prototype=g,s(m,"constructor",{value:g,configurable:!0}),s(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,h,"GeneratorFunction"),i.isGeneratorFunction=function(I){var B=typeof I=="function"&&I.constructor;return!!B&&(B===_||(B.displayName||B.name)==="GeneratorFunction")},i.mark=function(I){return Object.setPrototypeOf?Object.setPrototypeOf(I,g):(I.__proto__=g,u(I,h,"GeneratorFunction")),I.prototype=Object.create(m),I},i.awrap=function(I){return{__await:I}},w(x.prototype),u(x.prototype,l,function(){return this}),i.AsyncIterator=x,i.async=function(I,B,H,G,Q){Q===void 0&&(Q=Promise);var L=new x(d(I,B,H,G),Q);return i.isGeneratorFunction(B)?L:L.next().then(function(M){return M.done?M.value:L.next()})},w(m),u(m,h,"Generator"),u(m,f,function(){return this}),u(m,"toString",function(){return"[object Generator]"}),i.keys=function(I){var B=Object(I),H=[];for(var G in B)H.push(G);return H.reverse(),function Q(){for(;H.length;){var L=H.pop();if(L in B)return Q.value=L,Q.done=!1,Q}return Q.done=!0,Q}},i.values=O,k.prototype={constructor:k,reset:function(I){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!I)for(var B in this)B.charAt(0)==="t"&&a.call(this,B)&&!isNaN(+B.slice(1))&&(this[B]=void 0)},stop:function(){this.done=!0;var I=this.tryEntries[0].completion;if(I.type==="throw")throw I.arg;return this.rval},dispatchException:function(I){if(this.done)throw I;var B=this;function H(K,q){return L.type="throw",L.arg=I,B.next=K,q&&(B.method="next",B.arg=void 0),!!q}for(var G=this.tryEntries.length-1;G>=0;--G){var Q=this.tryEntries[G],L=Q.completion;if(Q.tryLoc==="root")return H("end");if(Q.tryLoc<=this.prev){var M=a.call(Q,"catchLoc"),R=a.call(Q,"finallyLoc");if(M&&R){if(this.prev<Q.catchLoc)return H(Q.catchLoc,!0);if(this.prev<Q.finallyLoc)return H(Q.finallyLoc)}else if(M){if(this.prev<Q.catchLoc)return H(Q.catchLoc,!0)}else{if(!R)throw new Error("try statement without catch or finally");if(this.prev<Q.finallyLoc)return H(Q.finallyLoc)}}}},abrupt:function(I,B){for(var H=this.tryEntries.length-1;H>=0;--H){var G=this.tryEntries[H];if(G.tryLoc<=this.prev&&a.call(G,"finallyLoc")&&this.prev<G.finallyLoc){var Q=G;break}}Q&&(I==="break"||I==="continue")&&Q.tryLoc<=B&&B<=Q.finallyLoc&&(Q=null);var L=Q?Q.completion:{};return L.type=I,L.arg=B,Q?(this.method="next",this.next=Q.finallyLoc,y):this.complete(L)},complete:function(I,B){if(I.type==="throw")throw I.arg;return I.type==="break"||I.type==="continue"?this.next=I.arg:I.type==="return"?(this.rval=this.arg=I.arg,this.method="return",this.next="end"):I.type==="normal"&&B&&(this.next=B),y},finish:function(I){for(var B=this.tryEntries.length-1;B>=0;--B){var H=this.tryEntries[B];if(H.finallyLoc===I)return this.complete(H.completion,H.afterLoc),T(H),y}},catch:function(I){for(var B=this.tryEntries.length-1;B>=0;--B){var H=this.tryEntries[B];if(H.tryLoc===I){var G=H.completion;if(G.type==="throw"){var Q=G.arg;T(H)}return Q}}throw new Error("illegal catch attempt")},delegateYield:function(I,B,H){return this.delegate={iterator:O(I),resultName:B,nextLoc:H},this.method==="next"&&(this.arg=void 0),y}},i}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}),nP=te((e,r)=>{Y();var t=rP()();r.exports=t;try{regeneratorRuntime=t}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}),iP=te((e,r)=>{"use strict";Y();var t=(n,...i)=>new Promise(c=>{c(n(...i))});r.exports=t,r.exports.default=t}),sP=te((e,r)=>{"use strict";Y();var t=iP(),n=i=>{if(!((Number.isInteger(i)||i===1/0)&&i>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));let c=[],a=0,s=()=>{a--,c.length>0&&c.shift()()},o=(h,u,...d)=>{a++;let p=t(h,...d);u(p),p.then(s,s)},f=(h,u,...d)=>{a<i?o(h,u,...d):c.push(o.bind(null,h,u,...d))},l=(h,...u)=>new Promise(d=>f(h,d,...u));return Object.defineProperties(l,{activeCount:{get:()=>a},pendingCount:{get:()=>c.length},clearQueue:{value:()=>{c.length=0}}}),l};r.exports=n,r.exports.default=n}),oP=te((e,r)=>{"use strict";Y();var t=sP(),n=class extends Error{constructor(s){super(),this.value=s}},i=async(s,o)=>o(await s),c=async s=>{let o=await Promise.all(s);if(o[1]===!0)throw new n(o[0]);return!1},a=async(s,o,f)=>{f={concurrency:1/0,preserveOrder:!0,...f};let l=t(f.concurrency),h=[...s].map(d=>[d,l(i,d,o)]),u=t(f.preserveOrder?1:1/0);try{await Promise.all(h.map(d=>u(c,d)))}catch(d){if(d instanceof n)return d.value;throw d}};r.exports=a,r.exports.default=a}),aP=te((e,r)=>{"use strict";Y();var t=le("path"),n=le("fs"),{promisify:i}=le("util"),c=oP(),a=i(n.stat),s=i(n.lstat),o={directory:"isDirectory",file:"isFile"};function f({type:h}){if(!(h in o))throw new Error(`Invalid type specified: ${h}`)}var l=(h,u)=>h===void 0||u[o[h]]();r.exports=async(h,u)=>{u={cwd:process.cwd(),type:"file",allowSymlinks:!0,...u},f(u);let d=u.allowSymlinks?a:s;return c(h,async p=>{try{let y=await d(t.resolve(u.cwd,p));return l(u.type,y)}catch{return!1}},u)},r.exports.sync=(h,u)=>{u={cwd:process.cwd(),allowSymlinks:!0,type:"file",...u},f(u);let d=u.allowSymlinks?n.statSync:n.lstatSync;for(let p of h)try{let y=d(t.resolve(u.cwd,p));if(l(u.type,y))return p}catch{}}}),uP=te((e,r)=>{"use strict";Y();var t=le("fs"),{promisify:n}=le("util"),i=n(t.access);r.exports=async c=>{try{return await i(c),!0}catch{return!1}},r.exports.sync=c=>{try{return t.accessSync(c),!0}catch{return!1}}}),lP=te((e,r)=>{"use strict";Y();var t=le("path"),n=aP(),i=uP(),c=Symbol("findUp.stop");r.exports=async(a,s={})=>{let o=t.resolve(s.cwd||""),{root:f}=t.parse(o),l=[].concat(a),h=async u=>{if(typeof a!="function")return n(l,u);let d=await a(u.cwd);return typeof d=="string"?n([d],u):d};for(;;){let u=await h({...s,cwd:o});if(u===c)return;if(u)return t.resolve(o,u);if(o===f)return;o=t.dirname(o)}},r.exports.sync=(a,s={})=>{let o=t.resolve(s.cwd||""),{root:f}=t.parse(o),l=[].concat(a),h=u=>{if(typeof a!="function")return n.sync(l,u);let d=a(u.cwd);return typeof d=="string"?n.sync([d],u):d};for(;;){let u=h({...s,cwd:o});if(u===c)return;if(u)return t.resolve(o,u);if(o===f)return;o=t.dirname(o)}},r.exports.exists=i,r.exports.sync.exists=i.sync,r.exports.stop=c}),vt=te(e=>{"use strict";Y(),e.fromCallback=function(r){return Object.defineProperty(function(){if(typeof arguments[arguments.length-1]=="function")r.apply(this,arguments);else return new Promise((t,n)=>{arguments[arguments.length]=(i,c)=>{if(i)return n(i);t(c)},arguments.length++,r.apply(this,arguments)})},"name",{value:r.name})},e.fromPromise=function(r){return Object.defineProperty(function(){let t=arguments[arguments.length-1];if(typeof t!="function")return r.apply(this,arguments);r.apply(this,arguments).then(n=>t(null,n),t)},"name",{value:r.name})}}),b1=te(e=>{"use strict";Y();var r=vt().fromCallback,t=Ie(),n=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(i=>typeof t[i]=="function");Object.keys(t).forEach(i=>{i!=="promises"&&(e[i]=t[i])}),n.forEach(i=>{e[i]=r(t[i])}),e.exists=function(i,c){return typeof c=="function"?t.exists(i,c):new Promise(a=>t.exists(i,a))},e.read=function(i,c,a,s,o,f){return typeof f=="function"?t.read(i,c,a,s,o,f):new Promise((l,h)=>{t.read(i,c,a,s,o,(u,d,p)=>{if(u)return h(u);l({bytesRead:d,buffer:p})})})},e.write=function(i,c,...a){return typeof a[a.length-1]=="function"?t.write(i,c,...a):new Promise((s,o)=>{t.write(i,c,...a,(f,l,h)=>{if(f)return o(f);s({bytesWritten:l,buffer:h})})})},typeof t.realpath.native=="function"&&(e.realpath.native=r(t.realpath.native))}),v1=te((e,r)=>{"use strict";Y();var t=le("path");function n(a){return a=t.normalize(t.resolve(a)).split(t.sep),a.length>0?a[0]:null}var i=/[<>:"|?*]/;function c(a){let s=n(a);return a=a.replace(s,""),i.test(a)}r.exports={getRootPath:n,invalidWin32Path:c}}),cP=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("path"),i=v1().invalidWin32Path,c=parseInt("0777",8);function a(s,o,f,l){if(typeof o=="function"?(f=o,o={}):(!o||typeof o!="object")&&(o={mode:o}),process.platform==="win32"&&i(s)){let d=new Error(s+" contains invalid WIN32 path characters.");return d.code="EINVAL",f(d)}let h=o.mode,u=o.fs||t;h===void 0&&(h=c&~process.umask()),l||(l=null),f=f||function(){},s=n.resolve(s),u.mkdir(s,h,d=>{if(!d)return l=l||s,f(null,l);switch(d.code){case"ENOENT":if(n.dirname(s)===s)return f(d);a(n.dirname(s),o,(p,y)=>{p?f(p,y):a(s,o,f,y)});break;default:u.stat(s,(p,y)=>{p||!y.isDirectory()?f(d,l):f(null,l)});break}})}r.exports=a}),hP=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("path"),i=v1().invalidWin32Path,c=parseInt("0777",8);function a(s,o,f){(!o||typeof o!="object")&&(o={mode:o});let l=o.mode,h=o.fs||t;if(process.platform==="win32"&&i(s)){let u=new Error(s+" contains invalid WIN32 path characters.");throw u.code="EINVAL",u}l===void 0&&(l=c&~process.umask()),f||(f=null),s=n.resolve(s);try{h.mkdirSync(s,l),f=f||s}catch(u){if(u.code==="ENOENT"){if(n.dirname(s)===s)throw u;f=a(n.dirname(s),o,f),a(s,o,f)}else{let d;try{d=h.statSync(s)}catch{throw u}if(!d.isDirectory())throw u}}return f}r.exports=a}),St=te((e,r)=>{"use strict";Y();var t=vt().fromCallback,n=t(cP()),i=hP();r.exports={mkdirs:n,mkdirsSync:i,mkdirp:n,mkdirpSync:i,ensureDir:n,ensureDirSync:i}}),_1=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("os"),i=le("path");function c(){let l=i.join("millis-test-sync"+Date.now().toString()+Math.random().toString().slice(2));l=i.join(n.tmpdir(),l);let h=new Date(1435410243862);t.writeFileSync(l,"https://github.com/jprichardson/node-fs-extra/pull/141");let u=t.openSync(l,"r+");return t.futimesSync(u,h,h),t.closeSync(u),t.statSync(l).mtime>1435410243e3}function a(l){let h=i.join("millis-test"+Date.now().toString()+Math.random().toString().slice(2));h=i.join(n.tmpdir(),h);let u=new Date(1435410243862);t.writeFile(h,"https://github.com/jprichardson/node-fs-extra/pull/141",d=>{if(d)return l(d);t.open(h,"r+",(p,y)=>{if(p)return l(p);t.futimes(y,u,u,b=>{if(b)return l(b);t.close(y,_=>{if(_)return l(_);t.stat(h,(g,S)=>{if(g)return l(g);l(null,S.mtime>1435410243e3)})})})})})}function s(l){if(typeof l=="number")return Math.floor(l/1e3)*1e3;if(l instanceof Date)return new Date(Math.floor(l.getTime()/1e3)*1e3);throw new Error("fs-extra: timeRemoveMillis() unknown parameter type")}function o(l,h,u,d){t.open(l,"r+",(p,y)=>{if(p)return d(p);t.futimes(y,h,u,b=>{t.close(y,_=>{d&&d(b||_)})})})}function f(l,h,u){let d=t.openSync(l,"r+");return t.futimesSync(d,h,u),t.closeSync(d)}r.exports={hasMillisRes:a,hasMillisResSync:c,timeRemoveMillis:s,utimesMillis:o,utimesMillisSync:f}}),$s=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("path"),i=10,c=5,a=0,s=process.versions.node.split("."),o=Number.parseInt(s[0],10),f=Number.parseInt(s[1],10),l=Number.parseInt(s[2],10);function h(){return o>i||o===i&&(f>c||f===c&&l>=a)}function u(E,v,m){h()?t.stat(E,{bigint:!0},(w,x)=>{if(w)return m(w);t.stat(v,{bigint:!0},(A,D)=>A?A.code==="ENOENT"?m(null,{srcStat:x,destStat:null}):m(A):m(null,{srcStat:x,destStat:D}))}):t.stat(E,(w,x)=>{if(w)return m(w);t.stat(v,(A,D)=>A?A.code==="ENOENT"?m(null,{srcStat:x,destStat:null}):m(A):m(null,{srcStat:x,destStat:D}))})}function d(E,v){let m,w;h()?m=t.statSync(E,{bigint:!0}):m=t.statSync(E);try{h()?w=t.statSync(v,{bigint:!0}):w=t.statSync(v)}catch(x){if(x.code==="ENOENT")return{srcStat:m,destStat:null};throw x}return{srcStat:m,destStat:w}}function p(E,v,m,w){u(E,v,(x,A)=>{if(x)return w(x);let{srcStat:D,destStat:F}=A;return F&&F.ino&&F.dev&&F.ino===D.ino&&F.dev===D.dev?w(new Error("Source and destination must not be the same.")):D.isDirectory()&&g(E,v)?w(new Error(S(E,v,m))):w(null,{srcStat:D,destStat:F})})}function y(E,v,m){let{srcStat:w,destStat:x}=d(E,v);if(x&&x.ino&&x.dev&&x.ino===w.ino&&x.dev===w.dev)throw new Error("Source and destination must not be the same.");if(w.isDirectory()&&g(E,v))throw new Error(S(E,v,m));return{srcStat:w,destStat:x}}function b(E,v,m,w,x){let A=n.resolve(n.dirname(E)),D=n.resolve(n.dirname(m));if(D===A||D===n.parse(D).root)return x();h()?t.stat(D,{bigint:!0},(F,T)=>F?F.code==="ENOENT"?x():x(F):T.ino&&T.dev&&T.ino===v.ino&&T.dev===v.dev?x(new Error(S(E,m,w))):b(E,v,D,w,x)):t.stat(D,(F,T)=>F?F.code==="ENOENT"?x():x(F):T.ino&&T.dev&&T.ino===v.ino&&T.dev===v.dev?x(new Error(S(E,m,w))):b(E,v,D,w,x))}function _(E,v,m,w){let x=n.resolve(n.dirname(E)),A=n.resolve(n.dirname(m));if(A===x||A===n.parse(A).root)return;let D;try{h()?D=t.statSync(A,{bigint:!0}):D=t.statSync(A)}catch(F){if(F.code==="ENOENT")return;throw F}if(D.ino&&D.dev&&D.ino===v.ino&&D.dev===v.dev)throw new Error(S(E,m,w));return _(E,v,A,w)}function g(E,v){let m=n.resolve(E).split(n.sep).filter(x=>x),w=n.resolve(v).split(n.sep).filter(x=>x);return m.reduce((x,A,D)=>x&&w[D]===A,!0)}function S(E,v,m){return`Cannot ${m} '${E}' to a subdirectory of itself, '${v}'.`}r.exports={checkPaths:p,checkPathsSync:y,checkParentPaths:b,checkParentPathsSync:_,isSrcSubdir:g}}),fP=te((e,r)=>{"use strict";Y(),r.exports=function(t){if(typeof Buffer.allocUnsafe=="function")try{return Buffer.allocUnsafe(t)}catch{return new Buffer(t)}return new Buffer(t)}}),pP=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("path"),i=St().mkdirsSync,c=_1().utimesMillisSync,a=$s();function s(v,m,w){typeof w=="function"&&(w={filter:w}),w=w||{},w.clobber="clobber"in w?!!w.clobber:!0,w.overwrite="overwrite"in w?!!w.overwrite:w.clobber,w.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
|
145
|
+
`);return E?(o.originalMessage=o.message,o.message=m):o=new Error(m),o.shortMessage=v,o.command=h,o.escapedCommand=u,o.exitCode=l,o.signal=f,o.signalDescription=_,o.stdout=c,o.stderr=a,s!==void 0&&(o.all=s),"bufferedData"in o&&delete o.bufferedData,o.failed=!0,o.timedOut=!!d,o.isCanceled=p,o.killed=y&&!d,o};r.exports=i}),GF=te((e,r)=>{"use strict";Y();var t=["stdin","stdout","stderr"],n=c=>t.some(a=>c[a]!==void 0),i=c=>{if(!c)return;let{stdio:a}=c;if(a===void 0)return t.map(o=>c[o]);if(n(c))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${t.map(o=>`\`${o}\``).join(", ")}`);if(typeof a=="string")return a;if(!Array.isArray(a))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof a}\``);let s=Math.max(a.length,t.length);return Array.from({length:s},(o,f)=>a[f])};r.exports=i,r.exports.node=c=>{let a=i(c);return a==="ipc"?"ipc":a===void 0||typeof a=="string"?[a,a,a,"ipc"]:a.includes("ipc")?a:[...a,"ipc"]}}),UF=te((e,r)=>{"use strict";Y();var t=le("os"),n=Ps(),i=1e3*5,c=(y,b="SIGTERM",_={})=>{let g=y(b);return a(y,b,_,g),g},a=(y,b,_,g)=>{if(!s(b,_,g))return;let S=f(_),E=setTimeout(()=>{y("SIGKILL")},S);E.unref&&E.unref()},s=(y,{forceKillAfterTimeout:b},_)=>o(y)&&b!==!1&&_,o=y=>y===t.constants.signals.SIGTERM||typeof y=="string"&&y.toUpperCase()==="SIGTERM",f=({forceKillAfterTimeout:y=!0})=>{if(y===!0)return i;if(!Number.isFinite(y)||y<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${y}\` (${typeof y})`);return y},l=(y,b)=>{y.kill()&&(b.isCanceled=!0)},h=(y,b,_)=>{y.kill(b),_(Object.assign(new Error("Timed out"),{timedOut:!0,signal:b}))},u=(y,{timeout:b,killSignal:_="SIGTERM"},g)=>{if(b===0||b===void 0)return g;let S,E=new Promise((m,w)=>{S=setTimeout(()=>{h(y,_,w)},b)}),v=g.finally(()=>{clearTimeout(S)});return Promise.race([E,v])},d=({timeout:y})=>{if(y!==void 0&&(!Number.isFinite(y)||y<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${y}\` (${typeof y})`)},p=async(y,{cleanup:b,detached:_},g)=>{if(!b||_)return g;let S=n(()=>{y.kill()});return g.finally(()=>{S()})};r.exports={spawnedKill:c,spawnedCancel:l,setupTimeout:u,validateTimeout:d,setExitHandler:p}}),WF=te((e,r)=>{"use strict";Y();var t=n=>n!==null&&typeof n=="object"&&typeof n.pipe=="function";t.writable=n=>t(n)&&n.writable!==!1&&typeof n._write=="function"&&typeof n._writableState=="object",t.readable=n=>t(n)&&n.readable!==!1&&typeof n._read=="function"&&typeof n._readableState=="object",t.duplex=n=>t.writable(n)&&t.readable(n),t.transform=n=>t.duplex(n)&&typeof n._transform=="function",r.exports=t}),zF=te((e,r)=>{"use strict";Y();var{PassThrough:t}=le("stream");r.exports=n=>{n={...n};let{array:i}=n,{encoding:c}=n,a=c==="buffer",s=!1;i?s=!(c||a):c=c||"utf8",a&&(c=null);let o=new t({objectMode:s});c&&o.setEncoding(c);let f=0,l=[];return o.on("data",h=>{l.push(h),s?f=l.length:f+=h.length}),o.getBufferedValue=()=>i?l:a?Buffer.concat(l,f):l.join(""),o.getBufferedLength=()=>f,o}}),VF=te((e,r)=>{"use strict";Y();var{constants:t}=le("buffer"),n=le("stream"),{promisify:i}=le("util"),c=zF(),a=i(n.pipeline),s=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function o(f,l){if(!f)throw new Error("Expected a stream");l={maxBuffer:1/0,...l};let{maxBuffer:h}=l,u=c(l);return await new Promise((d,p)=>{let y=b=>{b&&u.getBufferedLength()<=t.MAX_LENGTH&&(b.bufferedData=u.getBufferedValue()),p(b)};(async()=>{try{await a(f,u),d()}catch(b){y(b)}})(),u.on("data",()=>{u.getBufferedLength()>h&&y(new s)})}),u.getBufferedValue()}r.exports=o,r.exports.buffer=(f,l)=>o(f,{...l,encoding:"buffer"}),r.exports.array=(f,l)=>o(f,{...l,array:!0}),r.exports.MaxBufferError=s}),KF=te((e,r)=>{"use strict";Y();var{PassThrough:t}=le("stream");r.exports=function(){var n=[],i=new t({objectMode:!0});return i.setMaxListeners(0),i.add=c,i.isEmpty=a,i.on("unpipe",s),Array.prototype.slice.call(arguments).forEach(c),i;function c(o){return Array.isArray(o)?(o.forEach(c),this):(n.push(o),o.once("end",s.bind(null,o)),o.once("error",i.emit.bind(i,"error")),o.pipe(i,{end:!1}),this)}function a(){return n.length==0}function s(o){n=n.filter(function(f){return f!==o}),!n.length&&i.readable&&i.end()}}}),YF=te((e,r)=>{"use strict";Y();var t=WF(),n=VF(),i=KF(),c=(h,u)=>{u===void 0||h.stdin===void 0||(t(u)?u.pipe(h.stdin):h.stdin.end(u))},a=(h,{all:u})=>{if(!u||!h.stdout&&!h.stderr)return;let d=i();return h.stdout&&d.add(h.stdout),h.stderr&&d.add(h.stderr),d},s=async(h,u)=>{if(h){h.destroy();try{return await u}catch(d){return d.bufferedData}}},o=(h,{encoding:u,buffer:d,maxBuffer:p})=>{if(!(!h||!d))return u?n(h,{encoding:u,maxBuffer:p}):n.buffer(h,{maxBuffer:p})},f=async({stdout:h,stderr:u,all:d},{encoding:p,buffer:y,maxBuffer:b},_)=>{let g=o(h,{encoding:p,buffer:y,maxBuffer:b}),S=o(u,{encoding:p,buffer:y,maxBuffer:b}),E=o(d,{encoding:p,buffer:y,maxBuffer:b*2});try{return await Promise.all([_,g,S,E])}catch(v){return Promise.all([{error:v,signal:v.signal,timedOut:v.timedOut},s(h,g),s(u,S),s(d,E)])}},l=({input:h})=>{if(t(h))throw new TypeError("The `input` option cannot be a stream in sync mode")};r.exports={handleInput:c,makeAllStream:a,getSpawnedResult:f,validateInputSync:l}}),XF=te((e,r)=>{"use strict";Y();var t=(async()=>{})().constructor.prototype,n=["then","catch","finally"].map(a=>[a,Reflect.getOwnPropertyDescriptor(t,a)]),i=(a,s)=>{for(let[o,f]of n){let l=typeof s=="function"?(...h)=>Reflect.apply(f.value,s(),h):f.value.bind(s);Reflect.defineProperty(a,o,{...f,value:l})}return a},c=a=>new Promise((s,o)=>{a.on("exit",(f,l)=>{s({exitCode:f,signal:l})}),a.on("error",f=>{o(f)}),a.stdin&&a.stdin.on("error",f=>{o(f)})});r.exports={mergePromise:i,getSpawnedPromise:c}}),ZF=te((e,r)=>{"use strict";Y();var t=(l,h=[])=>Array.isArray(h)?[l,...h]:[l],n=/^[\w.-]+$/,i=/"/g,c=l=>typeof l!="string"||n.test(l)?l:`"${l.replace(i,'\\"')}"`,a=(l,h)=>t(l,h).join(" "),s=(l,h)=>t(l,h).map(u=>c(u)).join(" "),o=/ +/g,f=l=>{let h=[];for(let u of l.trim().split(o)){let d=h[h.length-1];d&&d.endsWith("\\")?h[h.length-1]=`${d.slice(0,-1)} ${u}`:h.push(u)}return h};r.exports={joinCommand:a,getEscapedCommand:s,parseCommand:f}}),JF=te((e,r)=>{"use strict";Y();var t=le("path"),n=le("child_process"),i=IF(),c=MF(),a=NF(),s=Fs(),o=qF(),f=GF(),{spawnedKill:l,spawnedCancel:h,setupTimeout:u,validateTimeout:d,setExitHandler:p}=UF(),{handleInput:y,getSpawnedResult:b,makeAllStream:_,validateInputSync:g}=YF(),{mergePromise:S,getSpawnedPromise:E}=XF(),{joinCommand:v,parseCommand:m,getEscapedCommand:w}=ZF(),x=1e3*1e3*100,A=({env:k,extendEnv:O,preferLocal:P,localDir:I,execPath:B})=>{let H=O?{...process.env,...k}:k;return P?a.env({env:H,cwd:I,execPath:B}):H},D=(k,O,P={})=>{let I=i._parse(k,O,P);return k=I.command,O=I.args,P=I.options,P={maxBuffer:x,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:P.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...P},P.env=A(P),P.stdio=f(P),process.platform==="win32"&&t.basename(k,".exe")==="cmd"&&O.unshift("/q"),{file:k,args:O,options:P,parsed:I}},F=(k,O,P)=>typeof O!="string"&&!Buffer.isBuffer(O)?P===void 0?void 0:"":k.stripFinalNewline?c(O):O,T=(k,O,P)=>{let I=D(k,O,P),B=v(k,O),H=w(k,O);d(I.options);let G;try{G=n.spawn(I.file,I.args,I.options)}catch(q){let Z=new n.ChildProcess,N=Promise.reject(o({error:q,stdout:"",stderr:"",all:"",command:B,escapedCommand:H,parsed:I,timedOut:!1,isCanceled:!1,killed:!1}));return S(Z,N)}let Q=E(G),L=u(G,I.options,Q),M=p(G,I.options,L),R={isCanceled:!1};G.kill=l.bind(null,G.kill.bind(G)),G.cancel=h.bind(null,G,R);let K=s(async()=>{let[{error:q,exitCode:Z,signal:N,timedOut:z},ee,ae,oe]=await b(G,I.options,M),de=F(I.options,ee),pe=F(I.options,ae),j=F(I.options,oe);if(q||Z!==0||N!==null){let W=o({error:q,exitCode:Z,signal:N,stdout:de,stderr:pe,all:j,command:B,escapedCommand:H,parsed:I,timedOut:z,isCanceled:R.isCanceled,killed:G.killed});if(!I.options.reject)return W;throw W}return{command:B,escapedCommand:H,exitCode:0,stdout:de,stderr:pe,all:j,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return y(G,I.options.input),G.all=_(G,I.options),S(G,K)};r.exports=T,r.exports.sync=(k,O,P)=>{let I=D(k,O,P),B=v(k,O),H=w(k,O);g(I.options);let G;try{G=n.spawnSync(I.file,I.args,I.options)}catch(M){throw o({error:M,stdout:"",stderr:"",all:"",command:B,escapedCommand:H,parsed:I,timedOut:!1,isCanceled:!1,killed:!1})}let Q=F(I.options,G.stdout,G.error),L=F(I.options,G.stderr,G.error);if(G.error||G.status!==0||G.signal!==null){let M=o({stdout:Q,stderr:L,error:G.error,signal:G.signal,exitCode:G.status,command:B,escapedCommand:H,parsed:I,timedOut:G.error&&G.error.code==="ETIMEDOUT",isCanceled:!1,killed:G.signal!==null});if(!I.options.reject)return M;throw M}return{command:B,escapedCommand:H,exitCode:0,stdout:Q,stderr:L,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},r.exports.command=(k,O)=>{let[P,...I]=m(k);return T(P,I,O)},r.exports.commandSync=(k,O)=>{let[P,...I]=m(k);return T.sync(P,I,O)},r.exports.node=(k,O,P={})=>{O&&!Array.isArray(O)&&typeof O=="object"&&(P=O,O=[]);let I=f.node(P),B=process.execArgv.filter(Q=>!Q.startsWith("--inspect")),{nodePath:H=process.execPath,nodeOptions:G=B}=P;return T(H,[...G,k,...Array.isArray(O)?O:[]],{...P,stdin:void 0,stdout:void 0,stderr:void 0,stdio:I,shell:!1})}});Y();var QF=je(JF());async function vn(e,r=[],t){let n={cwd:g1.default.tmpdir(),env:{COREPACK_ENABLE_STRICT:"0"},...t};try{let{stdout:i}=await(0,QF.default)(e,r,n);return i.trim()}catch{return}}async function vl(){let[e,r,t]=await Promise.all([vn("yarnpkg",["--version"]),vn("npm",["--version"]),vn("pnpm",["--version"])]);return{yarn:e,pnpm:t,npm:r}}async function _l(){let[e,r,t]=await Promise.all([vn("yarnpkg",["global","bin"]),vn("npm",["config","get","prefix"]),vn("pnpm",["bin","--global"])]);return{yarn:e,pnpm:t,npm:r}}Y();Y();var o7=je(fr()),a7=je(Tr());Y();Y();var tP=te((e,r)=>{Y();function t(n){return r.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},r.exports.__esModule=!0,r.exports.default=r.exports,t(n)}r.exports=t,r.exports.__esModule=!0,r.exports.default=r.exports}),rP=te((e,r)=>{Y();var t=tP().default;function n(){"use strict";r.exports=n=function(){return i},r.exports.__esModule=!0,r.exports.default=r.exports;var i={},c=Object.prototype,a=c.hasOwnProperty,s=Object.defineProperty||function(I,B,H){I[B]=H.value},o=typeof Symbol=="function"?Symbol:{},f=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",h=o.toStringTag||"@@toStringTag";function u(I,B,H){return Object.defineProperty(I,B,{value:H,enumerable:!0,configurable:!0,writable:!0}),I[B]}try{u({},"")}catch{u=function(I,B,H){return I[B]=H}}function d(I,B,H,G){var Q=B&&B.prototype instanceof b?B:b,L=Object.create(Q.prototype),M=new k(G||[]);return s(L,"_invoke",{value:A(I,H,M)}),L}function p(I,B,H){try{return{type:"normal",arg:I.call(B,H)}}catch(G){return{type:"throw",arg:G}}}i.wrap=d;var y={};function b(){}function _(){}function g(){}var S={};u(S,f,function(){return this});var E=Object.getPrototypeOf,v=E&&E(E(O([])));v&&v!==c&&a.call(v,f)&&(S=v);var m=g.prototype=b.prototype=Object.create(S);function w(I){["next","throw","return"].forEach(function(B){u(I,B,function(H){return this._invoke(B,H)})})}function x(I,B){function H(Q,L,M,R){var K=p(I[Q],I,L);if(K.type!=="throw"){var q=K.arg,Z=q.value;return Z&&t(Z)=="object"&&a.call(Z,"__await")?B.resolve(Z.__await).then(function(N){H("next",N,M,R)},function(N){H("throw",N,M,R)}):B.resolve(Z).then(function(N){q.value=N,M(q)},function(N){return H("throw",N,M,R)})}R(K.arg)}var G;s(this,"_invoke",{value:function(Q,L){function M(){return new B(function(R,K){H(Q,L,R,K)})}return G=G?G.then(M,M):M()}})}function A(I,B,H){var G="suspendedStart";return function(Q,L){if(G==="executing")throw new Error("Generator is already running");if(G==="completed"){if(Q==="throw")throw L;return P()}for(H.method=Q,H.arg=L;;){var M=H.delegate;if(M){var R=D(M,H);if(R){if(R===y)continue;return R}}if(H.method==="next")H.sent=H._sent=H.arg;else if(H.method==="throw"){if(G==="suspendedStart")throw G="completed",H.arg;H.dispatchException(H.arg)}else H.method==="return"&&H.abrupt("return",H.arg);G="executing";var K=p(I,B,H);if(K.type==="normal"){if(G=H.done?"completed":"suspendedYield",K.arg===y)continue;return{value:K.arg,done:H.done}}K.type==="throw"&&(G="completed",H.method="throw",H.arg=K.arg)}}}function D(I,B){var H=B.method,G=I.iterator[H];if(G===void 0)return B.delegate=null,H==="throw"&&I.iterator.return&&(B.method="return",B.arg=void 0,D(I,B),B.method==="throw")||H!=="return"&&(B.method="throw",B.arg=new TypeError("The iterator does not provide a '"+H+"' method")),y;var Q=p(G,I.iterator,B.arg);if(Q.type==="throw")return B.method="throw",B.arg=Q.arg,B.delegate=null,y;var L=Q.arg;return L?L.done?(B[I.resultName]=L.value,B.next=I.nextLoc,B.method!=="return"&&(B.method="next",B.arg=void 0),B.delegate=null,y):L:(B.method="throw",B.arg=new TypeError("iterator result is not an object"),B.delegate=null,y)}function F(I){var B={tryLoc:I[0]};1 in I&&(B.catchLoc=I[1]),2 in I&&(B.finallyLoc=I[2],B.afterLoc=I[3]),this.tryEntries.push(B)}function T(I){var B=I.completion||{};B.type="normal",delete B.arg,I.completion=B}function k(I){this.tryEntries=[{tryLoc:"root"}],I.forEach(F,this),this.reset(!0)}function O(I){if(I){var B=I[f];if(B)return B.call(I);if(typeof I.next=="function")return I;if(!isNaN(I.length)){var H=-1,G=function Q(){for(;++H<I.length;)if(a.call(I,H))return Q.value=I[H],Q.done=!1,Q;return Q.value=void 0,Q.done=!0,Q};return G.next=G}}return{next:P}}function P(){return{value:void 0,done:!0}}return _.prototype=g,s(m,"constructor",{value:g,configurable:!0}),s(g,"constructor",{value:_,configurable:!0}),_.displayName=u(g,h,"GeneratorFunction"),i.isGeneratorFunction=function(I){var B=typeof I=="function"&&I.constructor;return!!B&&(B===_||(B.displayName||B.name)==="GeneratorFunction")},i.mark=function(I){return Object.setPrototypeOf?Object.setPrototypeOf(I,g):(I.__proto__=g,u(I,h,"GeneratorFunction")),I.prototype=Object.create(m),I},i.awrap=function(I){return{__await:I}},w(x.prototype),u(x.prototype,l,function(){return this}),i.AsyncIterator=x,i.async=function(I,B,H,G,Q){Q===void 0&&(Q=Promise);var L=new x(d(I,B,H,G),Q);return i.isGeneratorFunction(B)?L:L.next().then(function(M){return M.done?M.value:L.next()})},w(m),u(m,h,"Generator"),u(m,f,function(){return this}),u(m,"toString",function(){return"[object Generator]"}),i.keys=function(I){var B=Object(I),H=[];for(var G in B)H.push(G);return H.reverse(),function Q(){for(;H.length;){var L=H.pop();if(L in B)return Q.value=L,Q.done=!1,Q}return Q.done=!0,Q}},i.values=O,k.prototype={constructor:k,reset:function(I){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!I)for(var B in this)B.charAt(0)==="t"&&a.call(this,B)&&!isNaN(+B.slice(1))&&(this[B]=void 0)},stop:function(){this.done=!0;var I=this.tryEntries[0].completion;if(I.type==="throw")throw I.arg;return this.rval},dispatchException:function(I){if(this.done)throw I;var B=this;function H(K,q){return L.type="throw",L.arg=I,B.next=K,q&&(B.method="next",B.arg=void 0),!!q}for(var G=this.tryEntries.length-1;G>=0;--G){var Q=this.tryEntries[G],L=Q.completion;if(Q.tryLoc==="root")return H("end");if(Q.tryLoc<=this.prev){var M=a.call(Q,"catchLoc"),R=a.call(Q,"finallyLoc");if(M&&R){if(this.prev<Q.catchLoc)return H(Q.catchLoc,!0);if(this.prev<Q.finallyLoc)return H(Q.finallyLoc)}else if(M){if(this.prev<Q.catchLoc)return H(Q.catchLoc,!0)}else{if(!R)throw new Error("try statement without catch or finally");if(this.prev<Q.finallyLoc)return H(Q.finallyLoc)}}}},abrupt:function(I,B){for(var H=this.tryEntries.length-1;H>=0;--H){var G=this.tryEntries[H];if(G.tryLoc<=this.prev&&a.call(G,"finallyLoc")&&this.prev<G.finallyLoc){var Q=G;break}}Q&&(I==="break"||I==="continue")&&Q.tryLoc<=B&&B<=Q.finallyLoc&&(Q=null);var L=Q?Q.completion:{};return L.type=I,L.arg=B,Q?(this.method="next",this.next=Q.finallyLoc,y):this.complete(L)},complete:function(I,B){if(I.type==="throw")throw I.arg;return I.type==="break"||I.type==="continue"?this.next=I.arg:I.type==="return"?(this.rval=this.arg=I.arg,this.method="return",this.next="end"):I.type==="normal"&&B&&(this.next=B),y},finish:function(I){for(var B=this.tryEntries.length-1;B>=0;--B){var H=this.tryEntries[B];if(H.finallyLoc===I)return this.complete(H.completion,H.afterLoc),T(H),y}},catch:function(I){for(var B=this.tryEntries.length-1;B>=0;--B){var H=this.tryEntries[B];if(H.tryLoc===I){var G=H.completion;if(G.type==="throw"){var Q=G.arg;T(H)}return Q}}throw new Error("illegal catch attempt")},delegateYield:function(I,B,H){return this.delegate={iterator:O(I),resultName:B,nextLoc:H},this.method==="next"&&(this.arg=void 0),y}},i}r.exports=n,r.exports.__esModule=!0,r.exports.default=r.exports}),nP=te((e,r)=>{Y();var t=rP()();r.exports=t;try{regeneratorRuntime=t}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}),iP=te((e,r)=>{"use strict";Y();var t=(n,...i)=>new Promise(c=>{c(n(...i))});r.exports=t,r.exports.default=t}),sP=te((e,r)=>{"use strict";Y();var t=iP(),n=i=>{if(!((Number.isInteger(i)||i===1/0)&&i>0))return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));let c=[],a=0,s=()=>{a--,c.length>0&&c.shift()()},o=(h,u,...d)=>{a++;let p=t(h,...d);u(p),p.then(s,s)},f=(h,u,...d)=>{a<i?o(h,u,...d):c.push(o.bind(null,h,u,...d))},l=(h,...u)=>new Promise(d=>f(h,d,...u));return Object.defineProperties(l,{activeCount:{get:()=>a},pendingCount:{get:()=>c.length},clearQueue:{value:()=>{c.length=0}}}),l};r.exports=n,r.exports.default=n}),oP=te((e,r)=>{"use strict";Y();var t=sP(),n=class extends Error{constructor(s){super(),this.value=s}},i=async(s,o)=>o(await s),c=async s=>{let o=await Promise.all(s);if(o[1]===!0)throw new n(o[0]);return!1},a=async(s,o,f)=>{f={concurrency:1/0,preserveOrder:!0,...f};let l=t(f.concurrency),h=[...s].map(d=>[d,l(i,d,o)]),u=t(f.preserveOrder?1:1/0);try{await Promise.all(h.map(d=>u(c,d)))}catch(d){if(d instanceof n)return d.value;throw d}};r.exports=a,r.exports.default=a}),aP=te((e,r)=>{"use strict";Y();var t=le("path"),n=le("fs"),{promisify:i}=le("util"),c=oP(),a=i(n.stat),s=i(n.lstat),o={directory:"isDirectory",file:"isFile"};function f({type:h}){if(!(h in o))throw new Error(`Invalid type specified: ${h}`)}var l=(h,u)=>h===void 0||u[o[h]]();r.exports=async(h,u)=>{u={cwd:process.cwd(),type:"file",allowSymlinks:!0,...u},f(u);let d=u.allowSymlinks?a:s;return c(h,async p=>{try{let y=await d(t.resolve(u.cwd,p));return l(u.type,y)}catch{return!1}},u)},r.exports.sync=(h,u)=>{u={cwd:process.cwd(),allowSymlinks:!0,type:"file",...u},f(u);let d=u.allowSymlinks?n.statSync:n.lstatSync;for(let p of h)try{let y=d(t.resolve(u.cwd,p));if(l(u.type,y))return p}catch{}}}),uP=te((e,r)=>{"use strict";Y();var t=le("fs"),{promisify:n}=le("util"),i=n(t.access);r.exports=async c=>{try{return await i(c),!0}catch{return!1}},r.exports.sync=c=>{try{return t.accessSync(c),!0}catch{return!1}}}),lP=te((e,r)=>{"use strict";Y();var t=le("path"),n=aP(),i=uP(),c=Symbol("findUp.stop");r.exports=async(a,s={})=>{let o=t.resolve(s.cwd||""),{root:f}=t.parse(o),l=[].concat(a),h=async u=>{if(typeof a!="function")return n(l,u);let d=await a(u.cwd);return typeof d=="string"?n([d],u):d};for(;;){let u=await h({...s,cwd:o});if(u===c)return;if(u)return t.resolve(o,u);if(o===f)return;o=t.dirname(o)}},r.exports.sync=(a,s={})=>{let o=t.resolve(s.cwd||""),{root:f}=t.parse(o),l=[].concat(a),h=u=>{if(typeof a!="function")return n.sync(l,u);let d=a(u.cwd);return typeof d=="string"?n.sync([d],u):d};for(;;){let u=h({...s,cwd:o});if(u===c)return;if(u)return t.resolve(o,u);if(o===f)return;o=t.dirname(o)}},r.exports.exists=i,r.exports.sync.exists=i.sync,r.exports.stop=c}),vt=te(e=>{"use strict";Y(),e.fromCallback=function(r){return Object.defineProperty(function(){if(typeof arguments[arguments.length-1]=="function")r.apply(this,arguments);else return new Promise((t,n)=>{arguments[arguments.length]=(i,c)=>{if(i)return n(i);t(c)},arguments.length++,r.apply(this,arguments)})},"name",{value:r.name})},e.fromPromise=function(r){return Object.defineProperty(function(){let t=arguments[arguments.length-1];if(typeof t!="function")return r.apply(this,arguments);r.apply(this,arguments).then(n=>t(null,n),t)},"name",{value:r.name})}}),b1=te(e=>{"use strict";Y();var r=vt().fromCallback,t=Ie(),n=["access","appendFile","chmod","chown","close","copyFile","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","lchown","lchmod","link","lstat","mkdir","mkdtemp","open","readFile","readdir","readlink","realpath","rename","rmdir","stat","symlink","truncate","unlink","utimes","writeFile"].filter(i=>typeof t[i]=="function");Object.keys(t).forEach(i=>{i!=="promises"&&(e[i]=t[i])}),n.forEach(i=>{e[i]=r(t[i])}),e.exists=function(i,c){return typeof c=="function"?t.exists(i,c):new Promise(a=>t.exists(i,a))},e.read=function(i,c,a,s,o,f){return typeof f=="function"?t.read(i,c,a,s,o,f):new Promise((l,h)=>{t.read(i,c,a,s,o,(u,d,p)=>{if(u)return h(u);l({bytesRead:d,buffer:p})})})},e.write=function(i,c,...a){return typeof a[a.length-1]=="function"?t.write(i,c,...a):new Promise((s,o)=>{t.write(i,c,...a,(f,l,h)=>{if(f)return o(f);s({bytesWritten:l,buffer:h})})})},typeof t.realpath.native=="function"&&(e.realpath.native=r(t.realpath.native))}),v1=te((e,r)=>{"use strict";Y();var t=le("path");function n(a){return a=t.normalize(t.resolve(a)).split(t.sep),a.length>0?a[0]:null}var i=/[<>:"|?*]/;function c(a){let s=n(a);return a=a.replace(s,""),i.test(a)}r.exports={getRootPath:n,invalidWin32Path:c}}),cP=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("path"),i=v1().invalidWin32Path,c=parseInt("0777",8);function a(s,o,f,l){if(typeof o=="function"?(f=o,o={}):(!o||typeof o!="object")&&(o={mode:o}),process.platform==="win32"&&i(s)){let d=new Error(s+" contains invalid WIN32 path characters.");return d.code="EINVAL",f(d)}let h=o.mode,u=o.fs||t;h===void 0&&(h=c&~process.umask()),l||(l=null),f=f||function(){},s=n.resolve(s),u.mkdir(s,h,d=>{if(!d)return l=l||s,f(null,l);switch(d.code){case"ENOENT":if(n.dirname(s)===s)return f(d);a(n.dirname(s),o,(p,y)=>{p?f(p,y):a(s,o,f,y)});break;default:u.stat(s,(p,y)=>{p||!y.isDirectory()?f(d,l):f(null,l)});break}})}r.exports=a}),hP=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("path"),i=v1().invalidWin32Path,c=parseInt("0777",8);function a(s,o,f){(!o||typeof o!="object")&&(o={mode:o});let l=o.mode,h=o.fs||t;if(process.platform==="win32"&&i(s)){let u=new Error(s+" contains invalid WIN32 path characters.");throw u.code="EINVAL",u}l===void 0&&(l=c&~process.umask()),f||(f=null),s=n.resolve(s);try{h.mkdirSync(s,l),f=f||s}catch(u){if(u.code==="ENOENT"){if(n.dirname(s)===s)throw u;f=a(n.dirname(s),o,f),a(s,o,f)}else{let d;try{d=h.statSync(s)}catch{throw u}if(!d.isDirectory())throw u}}return f}r.exports=a}),St=te((e,r)=>{"use strict";Y();var t=vt().fromCallback,n=t(cP()),i=hP();r.exports={mkdirs:n,mkdirsSync:i,mkdirp:n,mkdirpSync:i,ensureDir:n,ensureDirSync:i}}),_1=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("os"),i=le("path");function c(){let l=i.join("millis-test-sync"+Date.now().toString()+Math.random().toString().slice(2));l=i.join(n.tmpdir(),l);let h=new Date(1435410243862);t.writeFileSync(l,"https://github.com/jprichardson/node-fs-extra/pull/141");let u=t.openSync(l,"r+");return t.futimesSync(u,h,h),t.closeSync(u),t.statSync(l).mtime>1435410243e3}function a(l){let h=i.join("millis-test"+Date.now().toString()+Math.random().toString().slice(2));h=i.join(n.tmpdir(),h);let u=new Date(1435410243862);t.writeFile(h,"https://github.com/jprichardson/node-fs-extra/pull/141",d=>{if(d)return l(d);t.open(h,"r+",(p,y)=>{if(p)return l(p);t.futimes(y,u,u,b=>{if(b)return l(b);t.close(y,_=>{if(_)return l(_);t.stat(h,(g,S)=>{if(g)return l(g);l(null,S.mtime>1435410243e3)})})})})})}function s(l){if(typeof l=="number")return Math.floor(l/1e3)*1e3;if(l instanceof Date)return new Date(Math.floor(l.getTime()/1e3)*1e3);throw new Error("fs-extra: timeRemoveMillis() unknown parameter type")}function o(l,h,u,d){t.open(l,"r+",(p,y)=>{if(p)return d(p);t.futimes(y,h,u,b=>{t.close(y,_=>{d&&d(b||_)})})})}function f(l,h,u){let d=t.openSync(l,"r+");return t.futimesSync(d,h,u),t.closeSync(d)}r.exports={hasMillisRes:a,hasMillisResSync:c,timeRemoveMillis:s,utimesMillis:o,utimesMillisSync:f}}),$s=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("path"),i=10,c=5,a=0,s=process.versions.node.split("."),o=Number.parseInt(s[0],10),f=Number.parseInt(s[1],10),l=Number.parseInt(s[2],10);function h(){return o>i||o===i&&(f>c||f===c&&l>=a)}function u(E,v,m){h()?t.stat(E,{bigint:!0},(w,x)=>{if(w)return m(w);t.stat(v,{bigint:!0},(A,D)=>A?A.code==="ENOENT"?m(null,{srcStat:x,destStat:null}):m(A):m(null,{srcStat:x,destStat:D}))}):t.stat(E,(w,x)=>{if(w)return m(w);t.stat(v,(A,D)=>A?A.code==="ENOENT"?m(null,{srcStat:x,destStat:null}):m(A):m(null,{srcStat:x,destStat:D}))})}function d(E,v){let m,w;h()?m=t.statSync(E,{bigint:!0}):m=t.statSync(E);try{h()?w=t.statSync(v,{bigint:!0}):w=t.statSync(v)}catch(x){if(x.code==="ENOENT")return{srcStat:m,destStat:null};throw x}return{srcStat:m,destStat:w}}function p(E,v,m,w){u(E,v,(x,A)=>{if(x)return w(x);let{srcStat:D,destStat:F}=A;return F&&F.ino&&F.dev&&F.ino===D.ino&&F.dev===D.dev?w(new Error("Source and destination must not be the same.")):D.isDirectory()&&g(E,v)?w(new Error(S(E,v,m))):w(null,{srcStat:D,destStat:F})})}function y(E,v,m){let{srcStat:w,destStat:x}=d(E,v);if(x&&x.ino&&x.dev&&x.ino===w.ino&&x.dev===w.dev)throw new Error("Source and destination must not be the same.");if(w.isDirectory()&&g(E,v))throw new Error(S(E,v,m));return{srcStat:w,destStat:x}}function b(E,v,m,w,x){let A=n.resolve(n.dirname(E)),D=n.resolve(n.dirname(m));if(D===A||D===n.parse(D).root)return x();h()?t.stat(D,{bigint:!0},(F,T)=>F?F.code==="ENOENT"?x():x(F):T.ino&&T.dev&&T.ino===v.ino&&T.dev===v.dev?x(new Error(S(E,m,w))):b(E,v,D,w,x)):t.stat(D,(F,T)=>F?F.code==="ENOENT"?x():x(F):T.ino&&T.dev&&T.ino===v.ino&&T.dev===v.dev?x(new Error(S(E,m,w))):b(E,v,D,w,x))}function _(E,v,m,w){let x=n.resolve(n.dirname(E)),A=n.resolve(n.dirname(m));if(A===x||A===n.parse(A).root)return;let D;try{h()?D=t.statSync(A,{bigint:!0}):D=t.statSync(A)}catch(F){if(F.code==="ENOENT")return;throw F}if(D.ino&&D.dev&&D.ino===v.ino&&D.dev===v.dev)throw new Error(S(E,m,w));return _(E,v,A,w)}function g(E,v){let m=n.resolve(E).split(n.sep).filter(x=>x),w=n.resolve(v).split(n.sep).filter(x=>x);return m.reduce((x,A,D)=>x&&w[D]===A,!0)}function S(E,v,m){return`Cannot ${m} '${E}' to a subdirectory of itself, '${v}'.`}r.exports={checkPaths:p,checkPathsSync:y,checkParentPaths:b,checkParentPathsSync:_,isSrcSubdir:g}}),fP=te((e,r)=>{"use strict";Y(),r.exports=function(t){if(typeof Buffer.allocUnsafe=="function")try{return Buffer.allocUnsafe(t)}catch{return new Buffer(t)}return new Buffer(t)}}),pP=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("path"),i=St().mkdirsSync,c=_1().utimesMillisSync,a=$s();function s(v,m,w){typeof w=="function"&&(w={filter:w}),w=w||{},w.clobber="clobber"in w?!!w.clobber:!0,w.overwrite="overwrite"in w?!!w.overwrite:w.clobber,w.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
|
146
146
|
|
147
147
|
see https://github.com/jprichardson/node-fs-extra/issues/269`);let{srcStat:x,destStat:A}=a.checkPathsSync(v,m,"copy");return a.checkParentPathsSync(v,x,m,"copy"),o(A,v,m,w)}function o(v,m,w,x){if(x.filter&&!x.filter(m,w))return;let A=n.dirname(w);return t.existsSync(A)||i(A),f(v,m,w,x)}function f(v,m,w,x){if(!(x.filter&&!x.filter(m,w)))return l(v,m,w,x)}function l(v,m,w,x){let A=(x.dereference?t.statSync:t.lstatSync)(m);if(A.isDirectory())return y(A,v,m,w,x);if(A.isFile()||A.isCharacterDevice()||A.isBlockDevice())return h(A,v,m,w,x);if(A.isSymbolicLink())return S(v,m,w,x)}function h(v,m,w,x,A){return m?u(v,w,x,A):d(v,w,x,A)}function u(v,m,w,x){if(x.overwrite)return t.unlinkSync(w),d(v,m,w,x);if(x.errorOnExist)throw new Error(`'${w}' already exists`)}function d(v,m,w,x){return typeof t.copyFileSync=="function"?(t.copyFileSync(m,w),t.chmodSync(w,v.mode),x.preserveTimestamps?c(w,v.atime,v.mtime):void 0):p(v,m,w,x)}function p(v,m,w,x){let A=fP()(65536),D=t.openSync(m,"r"),F=t.openSync(w,"w",v.mode),T=0;for(;T<v.size;){let k=t.readSync(D,A,0,65536,T);t.writeSync(F,A,0,k),T+=k}x.preserveTimestamps&&t.futimesSync(F,v.atime,v.mtime),t.closeSync(D),t.closeSync(F)}function y(v,m,w,x,A){if(!m)return b(v,w,x,A);if(m&&!m.isDirectory())throw new Error(`Cannot overwrite non-directory '${x}' with directory '${w}'.`);return _(w,x,A)}function b(v,m,w,x){return t.mkdirSync(w),_(m,w,x),t.chmodSync(w,v.mode)}function _(v,m,w){t.readdirSync(v).forEach(x=>g(x,v,m,w))}function g(v,m,w,x){let A=n.join(m,v),D=n.join(w,v),{destStat:F}=a.checkPathsSync(A,D,"copy");return f(F,A,D,x)}function S(v,m,w,x){let A=t.readlinkSync(m);if(x.dereference&&(A=n.resolve(process.cwd(),A)),v){let D;try{D=t.readlinkSync(w)}catch(F){if(F.code==="EINVAL"||F.code==="UNKNOWN")return t.symlinkSync(A,w);throw F}if(x.dereference&&(D=n.resolve(process.cwd(),D)),a.isSrcSubdir(A,D))throw new Error(`Cannot copy '${A}' to a subdirectory of itself, '${D}'.`);if(t.statSync(w).isDirectory()&&a.isSrcSubdir(D,A))throw new Error(`Cannot overwrite '${D}' with '${A}'.`);return E(A,w)}else return t.symlinkSync(A,w)}function E(v,m){return t.unlinkSync(m),t.symlinkSync(v,m)}r.exports=s}),w1=te((e,r)=>{"use strict";Y(),r.exports={copySync:pP()}}),Kt=te((e,r)=>{"use strict";Y();var t=vt().fromPromise,n=b1();function i(c){return n.access(c).then(()=>!0).catch(()=>!1)}r.exports={pathExists:t(i),pathExistsSync:n.existsSync}}),dP=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("path"),i=St().mkdirs,c=Kt().pathExists,a=_1().utimesMillis,s=$s();function o(A,D,F,T){typeof F=="function"&&!T?(T=F,F={}):typeof F=="function"&&(F={filter:F}),T=T||function(){},F=F||{},F.clobber="clobber"in F?!!F.clobber:!0,F.overwrite="overwrite"in F?!!F.overwrite:F.clobber,F.preserveTimestamps&&process.arch==="ia32"&&console.warn(`fs-extra: Using the preserveTimestamps option in 32-bit node is not recommended;
|
148
148
|
|
149
149
|
see https://github.com/jprichardson/node-fs-extra/issues/269`),s.checkPaths(A,D,"copy",(k,O)=>{if(k)return T(k);let{srcStat:P,destStat:I}=O;s.checkParentPaths(A,P,D,"copy",B=>B?T(B):F.filter?l(f,I,A,D,F,T):f(I,A,D,F,T))})}function f(A,D,F,T,k){let O=n.dirname(F);c(O,(P,I)=>{if(P)return k(P);if(I)return h(A,D,F,T,k);i(O,B=>B?k(B):h(A,D,F,T,k))})}function l(A,D,F,T,k,O){Promise.resolve(k.filter(F,T)).then(P=>P?A(D,F,T,k,O):O(),P=>O(P))}function h(A,D,F,T,k){return T.filter?l(u,A,D,F,T,k):u(A,D,F,T,k)}function u(A,D,F,T,k){(T.dereference?t.stat:t.lstat)(D,(O,P)=>{if(O)return k(O);if(P.isDirectory())return g(P,A,D,F,T,k);if(P.isFile()||P.isCharacterDevice()||P.isBlockDevice())return d(P,A,D,F,T,k);if(P.isSymbolicLink())return w(A,D,F,T,k)})}function d(A,D,F,T,k,O){return D?p(A,F,T,k,O):y(A,F,T,k,O)}function p(A,D,F,T,k){if(T.overwrite)t.unlink(F,O=>O?k(O):y(A,D,F,T,k));else return T.errorOnExist?k(new Error(`'${F}' already exists`)):k()}function y(A,D,F,T,k){return typeof t.copyFile=="function"?t.copyFile(D,F,O=>O?k(O):_(A,F,T,k)):b(A,D,F,T,k)}function b(A,D,F,T,k){let O=t.createReadStream(D);O.on("error",P=>k(P)).once("open",()=>{let P=t.createWriteStream(F,{mode:A.mode});P.on("error",I=>k(I)).on("open",()=>O.pipe(P)).once("close",()=>_(A,F,T,k))})}function _(A,D,F,T){t.chmod(D,A.mode,k=>k?T(k):F.preserveTimestamps?a(D,A.atime,A.mtime,T):T())}function g(A,D,F,T,k,O){return D?D&&!D.isDirectory()?O(new Error(`Cannot overwrite non-directory '${T}' with directory '${F}'.`)):E(F,T,k,O):S(A,F,T,k,O)}function S(A,D,F,T,k){t.mkdir(F,O=>{if(O)return k(O);E(D,F,T,P=>P?k(P):t.chmod(F,A.mode,k))})}function E(A,D,F,T){t.readdir(A,(k,O)=>k?T(k):v(O,A,D,F,T))}function v(A,D,F,T,k){let O=A.pop();return O?m(A,O,D,F,T,k):k()}function m(A,D,F,T,k,O){let P=n.join(F,D),I=n.join(T,D);s.checkPaths(P,I,"copy",(B,H)=>{if(B)return O(B);let{destStat:G}=H;h(G,P,I,k,Q=>Q?O(Q):v(A,F,T,k,O))})}function w(A,D,F,T,k){t.readlink(D,(O,P)=>{if(O)return k(O);if(T.dereference&&(P=n.resolve(process.cwd(),P)),A)t.readlink(F,(I,B)=>I?I.code==="EINVAL"||I.code==="UNKNOWN"?t.symlink(P,F,k):k(I):(T.dereference&&(B=n.resolve(process.cwd(),B)),s.isSrcSubdir(P,B)?k(new Error(`Cannot copy '${P}' to a subdirectory of itself, '${B}'.`)):A.isDirectory()&&s.isSrcSubdir(B,P)?k(new Error(`Cannot overwrite '${B}' with '${P}'.`)):x(P,F,k)));else return t.symlink(P,F,k)})}function x(A,D,F){t.unlink(D,T=>T?F(T):t.symlink(A,D,F))}r.exports=o}),E1=te((e,r)=>{"use strict";Y();var t=vt().fromCallback;r.exports={copy:t(dP())}}),mP=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("path"),i=le("assert"),c=process.platform==="win32";function a(b){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach(_=>{b[_]=b[_]||t[_],_=_+"Sync",b[_]=b[_]||t[_]}),b.maxBusyTries=b.maxBusyTries||3}function s(b,_,g){let S=0;typeof _=="function"&&(g=_,_={}),i(b,"rimraf: missing path"),i.strictEqual(typeof b,"string","rimraf: path should be a string"),i.strictEqual(typeof g,"function","rimraf: callback function required"),i(_,"rimraf: invalid options argument provided"),i.strictEqual(typeof _,"object","rimraf: options should be object"),a(_),o(b,_,function E(v){if(v){if((v.code==="EBUSY"||v.code==="ENOTEMPTY"||v.code==="EPERM")&&S<_.maxBusyTries){S++;let m=S*100;return setTimeout(()=>o(b,_,E),m)}v.code==="ENOENT"&&(v=null)}g(v)})}function o(b,_,g){i(b),i(_),i(typeof g=="function"),_.lstat(b,(S,E)=>{if(S&&S.code==="ENOENT")return g(null);if(S&&S.code==="EPERM"&&c)return f(b,_,S,g);if(E&&E.isDirectory())return h(b,_,S,g);_.unlink(b,v=>{if(v){if(v.code==="ENOENT")return g(null);if(v.code==="EPERM")return c?f(b,_,v,g):h(b,_,v,g);if(v.code==="EISDIR")return h(b,_,v,g)}return g(v)})})}function f(b,_,g,S){i(b),i(_),i(typeof S=="function"),g&&i(g instanceof Error),_.chmod(b,438,E=>{E?S(E.code==="ENOENT"?null:g):_.stat(b,(v,m)=>{v?S(v.code==="ENOENT"?null:g):m.isDirectory()?h(b,_,g,S):_.unlink(b,S)})})}function l(b,_,g){let S;i(b),i(_),g&&i(g instanceof Error);try{_.chmodSync(b,438)}catch(E){if(E.code==="ENOENT")return;throw g}try{S=_.statSync(b)}catch(E){if(E.code==="ENOENT")return;throw g}S.isDirectory()?p(b,_,g):_.unlinkSync(b)}function h(b,_,g,S){i(b),i(_),g&&i(g instanceof Error),i(typeof S=="function"),_.rmdir(b,E=>{E&&(E.code==="ENOTEMPTY"||E.code==="EEXIST"||E.code==="EPERM")?u(b,_,S):E&&E.code==="ENOTDIR"?S(g):S(E)})}function u(b,_,g){i(b),i(_),i(typeof g=="function"),_.readdir(b,(S,E)=>{if(S)return g(S);let v=E.length,m;if(v===0)return _.rmdir(b,g);E.forEach(w=>{s(n.join(b,w),_,x=>{if(!m){if(x)return g(m=x);--v===0&&_.rmdir(b,g)}})})})}function d(b,_){let g;_=_||{},a(_),i(b,"rimraf: missing path"),i.strictEqual(typeof b,"string","rimraf: path should be a string"),i(_,"rimraf: missing options"),i.strictEqual(typeof _,"object","rimraf: options should be object");try{g=_.lstatSync(b)}catch(S){if(S.code==="ENOENT")return;S.code==="EPERM"&&c&&l(b,_,S)}try{g&&g.isDirectory()?p(b,_,null):_.unlinkSync(b)}catch(S){if(S.code==="ENOENT")return;if(S.code==="EPERM")return c?l(b,_,S):p(b,_,S);if(S.code!=="EISDIR")throw S;p(b,_,S)}}function p(b,_,g){i(b),i(_),g&&i(g instanceof Error);try{_.rmdirSync(b)}catch(S){if(S.code==="ENOTDIR")throw g;if(S.code==="ENOTEMPTY"||S.code==="EEXIST"||S.code==="EPERM")y(b,_);else if(S.code!=="ENOENT")throw S}}function y(b,_){if(i(b),i(_),_.readdirSync(b).forEach(g=>d(n.join(b,g),_)),c){let g=Date.now();do try{return _.rmdirSync(b,_)}catch{}while(Date.now()-g<500)}else return _.rmdirSync(b,_)}r.exports=s,s.sync=d}),Hs=te((e,r)=>{"use strict";Y();var t=vt().fromCallback,n=mP();r.exports={remove:t(n),removeSync:n.sync}}),yP=te((e,r)=>{"use strict";Y();var t=vt().fromCallback,n=Ie(),i=le("path"),c=St(),a=Hs(),s=t(function(f,l){l=l||function(){},n.readdir(f,(h,u)=>{if(h)return c.mkdirs(f,l);u=u.map(p=>i.join(f,p)),d();function d(){let p=u.pop();if(!p)return l();a.remove(p,y=>{if(y)return l(y);d()})}})});function o(f){let l;try{l=n.readdirSync(f)}catch{return c.mkdirsSync(f)}l.forEach(h=>{h=i.join(f,h),a.removeSync(h)})}r.exports={emptyDirSync:o,emptydirSync:o,emptyDir:s,emptydir:s}}),gP=te((e,r)=>{"use strict";Y();var t=vt().fromCallback,n=le("path"),i=Ie(),c=St(),a=Kt().pathExists;function s(f,l){function h(){i.writeFile(f,"",u=>{if(u)return l(u);l()})}i.stat(f,(u,d)=>{if(!u&&d.isFile())return l();let p=n.dirname(f);a(p,(y,b)=>{if(y)return l(y);if(b)return h();c.mkdirs(p,_=>{if(_)return l(_);h()})})})}function o(f){let l;try{l=i.statSync(f)}catch{}if(l&&l.isFile())return;let h=n.dirname(f);i.existsSync(h)||c.mkdirsSync(h),i.writeFileSync(f,"")}r.exports={createFile:t(s),createFileSync:o}}),bP=te((e,r)=>{"use strict";Y();var t=vt().fromCallback,n=le("path"),i=Ie(),c=St(),a=Kt().pathExists;function s(f,l,h){function u(d,p){i.link(d,p,y=>{if(y)return h(y);h(null)})}a(l,(d,p)=>{if(d)return h(d);if(p)return h(null);i.lstat(f,y=>{if(y)return y.message=y.message.replace("lstat","ensureLink"),h(y);let b=n.dirname(l);a(b,(_,g)=>{if(_)return h(_);if(g)return u(f,l);c.mkdirs(b,S=>{if(S)return h(S);u(f,l)})})})})}function o(f,l){if(i.existsSync(l))return;try{i.lstatSync(f)}catch(u){throw u.message=u.message.replace("lstat","ensureLink"),u}let h=n.dirname(l);return i.existsSync(h)||c.mkdirsSync(h),i.linkSync(f,l)}r.exports={createLink:t(s),createLinkSync:o}}),vP=te((e,r)=>{"use strict";Y();var t=le("path"),n=Ie(),i=Kt().pathExists;function c(s,o,f){if(t.isAbsolute(s))return n.lstat(s,l=>l?(l.message=l.message.replace("lstat","ensureSymlink"),f(l)):f(null,{toCwd:s,toDst:s}));{let l=t.dirname(o),h=t.join(l,s);return i(h,(u,d)=>u?f(u):d?f(null,{toCwd:h,toDst:s}):n.lstat(s,p=>p?(p.message=p.message.replace("lstat","ensureSymlink"),f(p)):f(null,{toCwd:s,toDst:t.relative(l,s)})))}}function a(s,o){let f;if(t.isAbsolute(s)){if(f=n.existsSync(s),!f)throw new Error("absolute srcpath does not exist");return{toCwd:s,toDst:s}}else{let l=t.dirname(o),h=t.join(l,s);if(f=n.existsSync(h),f)return{toCwd:h,toDst:s};if(f=n.existsSync(s),!f)throw new Error("relative srcpath does not exist");return{toCwd:s,toDst:t.relative(l,s)}}}r.exports={symlinkPaths:c,symlinkPathsSync:a}}),_P=te((e,r)=>{"use strict";Y();var t=Ie();function n(c,a,s){if(s=typeof a=="function"?a:s,a=typeof a=="function"?!1:a,a)return s(null,a);t.lstat(c,(o,f)=>{if(o)return s(null,"file");a=f&&f.isDirectory()?"dir":"file",s(null,a)})}function i(c,a){let s;if(a)return a;try{s=t.lstatSync(c)}catch{return"file"}return s&&s.isDirectory()?"dir":"file"}r.exports={symlinkType:n,symlinkTypeSync:i}}),wP=te((e,r)=>{"use strict";Y();var t=vt().fromCallback,n=le("path"),i=Ie(),c=St(),a=c.mkdirs,s=c.mkdirsSync,o=vP(),f=o.symlinkPaths,l=o.symlinkPathsSync,h=_P(),u=h.symlinkType,d=h.symlinkTypeSync,p=Kt().pathExists;function y(_,g,S,E){E=typeof S=="function"?S:E,S=typeof S=="function"?!1:S,p(g,(v,m)=>{if(v)return E(v);if(m)return E(null);f(_,g,(w,x)=>{if(w)return E(w);_=x.toDst,u(x.toCwd,S,(A,D)=>{if(A)return E(A);let F=n.dirname(g);p(F,(T,k)=>{if(T)return E(T);if(k)return i.symlink(_,g,D,E);a(F,O=>{if(O)return E(O);i.symlink(_,g,D,E)})})})})})}function b(_,g,S){if(i.existsSync(g))return;let E=l(_,g);_=E.toDst,S=d(E.toCwd,S);let v=n.dirname(g);return i.existsSync(v)||s(v),i.symlinkSync(_,g,S)}r.exports={createSymlink:t(y),createSymlinkSync:b}}),EP=te((e,r)=>{"use strict";Y();var t=gP(),n=bP(),i=wP();r.exports={createFile:t.createFile,createFileSync:t.createFileSync,ensureFile:t.createFile,ensureFileSync:t.createFileSync,createLink:n.createLink,createLinkSync:n.createLinkSync,ensureLink:n.createLink,ensureLinkSync:n.createLinkSync,createSymlink:i.createSymlink,createSymlinkSync:i.createSymlinkSync,ensureSymlink:i.createSymlink,ensureSymlinkSync:i.createSymlinkSync}}),SP=te((e,r)=>{Y();var t;try{t=Ie()}catch{t=le("fs")}function n(l,h,u){u==null&&(u=h,h={}),typeof h=="string"&&(h={encoding:h}),h=h||{};var d=h.fs||t,p=!0;"throws"in h&&(p=h.throws),d.readFile(l,h,function(y,b){if(y)return u(y);b=o(b);var _;try{_=JSON.parse(b,h?h.reviver:null)}catch(g){return p?(g.message=l+": "+g.message,u(g)):u(null,null)}u(null,_)})}function i(l,h){h=h||{},typeof h=="string"&&(h={encoding:h});var u=h.fs||t,d=!0;"throws"in h&&(d=h.throws);try{var p=u.readFileSync(l,h);return p=o(p),JSON.parse(p,h.reviver)}catch(y){if(d)throw y.message=l+": "+y.message,y;return null}}function c(l,h){var u,d=`
|
150
|
-
`;typeof h=="object"&&h!==null&&(h.spaces&&(u=h.spaces),h.EOL&&(d=h.EOL));var p=JSON.stringify(l,h?h.replacer:null,u);return p.replace(/\n/g,d)+d}function a(l,h,u,d){d==null&&(d=u,u={}),u=u||{};var p=u.fs||t,y="";try{y=c(h,u)}catch(b){d&&d(b,null);return}p.writeFile(l,y,u,d)}function s(l,h,u){u=u||{};var d=u.fs||t,p=c(h,u);return d.writeFileSync(l,p,u)}function o(l){return Buffer.isBuffer(l)&&(l=l.toString("utf8")),l=l.replace(/^\uFEFF/,""),l}var f={readFile:n,readFileSync:i,writeFile:a,writeFileSync:s};r.exports=f}),Sl=te((e,r)=>{"use strict";Y();var t=vt().fromCallback,n=SP();r.exports={readJson:t(n.readFile),readJsonSync:n.readFileSync,writeJson:t(n.writeFile),writeJsonSync:n.writeFileSync}}),xP=te((e,r)=>{"use strict";Y();var t=le("path"),n=St(),i=Kt().pathExists,c=Sl();function a(s,o,f,l){typeof f=="function"&&(l=f,f={});let h=t.dirname(s);i(h,(u,d)=>{if(u)return l(u);if(d)return c.writeJson(s,o,f,l);n.mkdirs(h,p=>{if(p)return l(p);c.writeJson(s,o,f,l)})})}r.exports=a}),AP=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("path"),i=St(),c=Sl();function a(s,o,f){let l=n.dirname(s);t.existsSync(l)||i.mkdirsSync(l),c.writeJsonSync(s,o,f)}r.exports=a}),CP=te((e,r)=>{"use strict";Y();var t=vt().fromCallback,n=Sl();n.outputJson=t(xP()),n.outputJsonSync=AP(),n.outputJSON=n.outputJson,n.outputJSONSync=n.outputJsonSync,n.writeJSON=n.writeJson,n.writeJSONSync=n.writeJsonSync,n.readJSON=n.readJson,n.readJSONSync=n.readJsonSync,r.exports=n}),kP=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("path"),i=w1().copySync,c=Hs().removeSync,a=St().mkdirpSync,s=$s();function o(u,d,p){p=p||{};let y=p.overwrite||p.clobber||!1,{srcStat:b}=s.checkPathsSync(u,d,"move");return s.checkParentPathsSync(u,b,d,"move"),a(n.dirname(d)),f(u,d,y)}function f(u,d,p){if(p)return c(d),l(u,d,p);if(t.existsSync(d))throw new Error("dest already exists.");return l(u,d,p)}function l(u,d,p){try{t.renameSync(u,d)}catch(y){if(y.code!=="EXDEV")throw y;return h(u,d,p)}}function h(u,d,p){return i(u,d,{overwrite:p,errorOnExist:!0}),c(u)}r.exports=o}),DP=te((e,r)=>{"use strict";Y(),r.exports={moveSync:kP()}}),RP=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("path"),i=E1().copy,c=Hs().remove,a=St().mkdirp,s=Kt().pathExists,o=$s();function f(d,p,y,b){typeof y=="function"&&(b=y,y={});let _=y.overwrite||y.clobber||!1;o.checkPaths(d,p,"move",(g,S)=>{if(g)return b(g);let{srcStat:E}=S;o.checkParentPaths(d,E,p,"move",v=>{if(v)return b(v);a(n.dirname(p),m=>m?b(m):l(d,p,_,b))})})}function l(d,p,y,b){if(y)return c(p,_=>_?b(_):h(d,p,y,b));s(p,(_,g)=>_?b(_):g?b(new Error("dest already exists.")):h(d,p,y,b))}function h(d,p,y,b){t.rename(d,p,_=>_?_.code!=="EXDEV"?b(_):u(d,p,y,b):b())}function u(d,p,y,b){i(d,p,{overwrite:y,errorOnExist:!0},_=>_?b(_):c(d,b))}r.exports=f}),OP=te((e,r)=>{"use strict";Y();var t=vt().fromCallback;r.exports={move:t(RP())}}),TP=te((e,r)=>{"use strict";Y();var t=vt().fromCallback,n=Ie(),i=le("path"),c=St(),a=Kt().pathExists;function s(f,l,h,u){typeof h=="function"&&(u=h,h="utf8");let d=i.dirname(f);a(d,(p,y)=>{if(p)return u(p);if(y)return n.writeFile(f,l,h,u);c.mkdirs(d,b=>{if(b)return u(b);n.writeFile(f,l,h,u)})})}function o(f,...l){let h=i.dirname(f);if(n.existsSync(h))return n.writeFileSync(f,...l);c.mkdirsSync(h),n.writeFileSync(f,...l)}r.exports={outputFile:t(s),outputFileSync:o}}),FP=te((e,r)=>{"use strict";Y(),r.exports=Object.assign({},b1(),w1(),E1(),yP(),EP(),CP(),St(),DP(),OP(),TP(),Kt(),Hs());var t=le("fs");Object.getOwnPropertyDescriptor(t,"promises")&&Object.defineProperty(r.exports,"promises",{get(){return t.promises}})});Y();Y();var m7=je(nP());Y();Y();function PP(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}Y();Y();function wl(e){return wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},wl(e)}Y();function BP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LP(e,r){if(r&&(wl(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BP(e)}Y();function js(e){return js=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},js(e)}Y();Y();function ui(e,r){return ui=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},ui(e,r)}function IP(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&ui(e,r)}Y();Y();function MP(e){return Function.toString.call(e).indexOf("[native code]")!==-1}Y();Y();function NP(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ns(e,r,t){return NP()?Ns=Reflect.construct.bind():Ns=function(n,i,c){var a=[null];a.push.apply(a,i);var s=Function.bind.apply(n,a),o=new s;return c&&ui(o,c.prototype),o},Ns.apply(null,arguments)}function El(e){var r=typeof Map=="function"?new Map:void 0;return El=function(t){if(t===null||!MP(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof r<"u"){if(r.has(t))return r.get(t);r.set(t,n)}function n(){return Ns(t,arguments,js(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ui(n,t)},El(e)}var y7=je(lP()),g7=je(FP()),b7=function(e){IP(r,e);function r(t){var n;return PP(this,r),n=LP(this,js(r).call(this,"No package.json could be found upwards from the directory ".concat(t))),n.directory=t,n}return r}(El(Error));Y();var $P=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.splitWhen=e.flatten=void 0;function r(n){return n.reduce((i,c)=>[].concat(i,c),[])}e.flatten=r;function t(n,i){let c=[[]],a=0;for(let s of n)i(s)?(a++,c[a]=[]):c[a].push(s);return c}e.splitWhen=t}),HP=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.isEnoentCodeError=void 0;function r(t){return t.code==="ENOENT"}e.isEnoentCodeError=r}),qP=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createDirentFromStats=void 0;var r=class{constructor(n,i){this.name=n,this.isBlockDevice=i.isBlockDevice.bind(i),this.isCharacterDevice=i.isCharacterDevice.bind(i),this.isDirectory=i.isDirectory.bind(i),this.isFIFO=i.isFIFO.bind(i),this.isFile=i.isFile.bind(i),this.isSocket=i.isSocket.bind(i),this.isSymbolicLink=i.isSymbolicLink.bind(i)}};function t(n,i){return new r(n,i)}e.createDirentFromStats=t}),GP=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.removeLeadingDotSegment=e.escape=e.makeAbsolute=e.unixify=void 0;var r=le("path"),t=2,n=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function i(o){return o.replace(/\\/g,"/")}e.unixify=i;function c(o,f){return r.resolve(o,f)}e.makeAbsolute=c;function a(o){return o.replace(n,"\\$2")}e.escape=a;function s(o){if(o.charAt(0)==="."){let f=o.charAt(1);if(f==="/"||f==="\\")return o.slice(t)}return o}e.removeLeadingDotSegment=s}),UP=te((e,r)=>{Y(),r.exports=function(t){if(typeof t!="string"||t==="")return!1;for(var n;n=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(n[2])return!0;t=t.slice(n.index+n[0].length)}return!1}}),WP=te((e,r)=>{Y();var t=UP(),n={"{":"}","(":")","[":"]"},i=function(a){if(a[0]==="!")return!0;for(var s=0,o=-2,f=-2,l=-2,h=-2,u=-2;s<a.length;){if(a[s]==="*"||a[s+1]==="?"&&/[\].+)]/.test(a[s])||f!==-1&&a[s]==="["&&a[s+1]!=="]"&&(f<s&&(f=a.indexOf("]",s)),f>s&&(u===-1||u>f||(u=a.indexOf("\\",s),u===-1||u>f)))||l!==-1&&a[s]==="{"&&a[s+1]!=="}"&&(l=a.indexOf("}",s),l>s&&(u=a.indexOf("\\",s),u===-1||u>l))||h!==-1&&a[s]==="("&&a[s+1]==="?"&&/[:!=]/.test(a[s+2])&&a[s+3]!==")"&&(h=a.indexOf(")",s),h>s&&(u=a.indexOf("\\",s),u===-1||u>h))||o!==-1&&a[s]==="("&&a[s+1]!=="|"&&(o<s&&(o=a.indexOf("|",s)),o!==-1&&a[o+1]!==")"&&(h=a.indexOf(")",o),h>o&&(u=a.indexOf("\\",o),u===-1||u>h))))return!0;if(a[s]==="\\"){var d=a[s+1];s+=2;var p=n[d];if(p){var y=a.indexOf(p,s);y!==-1&&(s=y+1)}if(a[s]==="!")return!0}else s++}return!1},c=function(a){if(a[0]==="!")return!0;for(var s=0;s<a.length;){if(/[*?{}()[\]]/.test(a[s]))return!0;if(a[s]==="\\"){var o=a[s+1];s+=2;var f=n[o];if(f){var l=a.indexOf(f,s);l!==-1&&(s=l+1)}if(a[s]==="!")return!0}else s++}return!1};r.exports=function(a,s){if(typeof a!="string"||a==="")return!1;if(t(a))return!0;var o=i;return s&&s.strict===!1&&(o=c),o(a)}}),zP=te((e,r)=>{"use strict";Y();var t=WP(),n=le("path").posix.dirname,i=le("os").platform()==="win32",c="/",a=/\\/g,s=/[\{\[].*[\}\]]$/,o=/(^|[^\\])([\{\[]|\([^\)]+$)/,f=/\\([\!\*\?\|\[\]\(\)\{\}])/g;r.exports=function(l,h){var u=Object.assign({flipBackslashes:!0},h);u.flipBackslashes&&i&&l.indexOf(c)<0&&(l=l.replace(a,c)),s.test(l)&&(l+=c),l+="a";do l=n(l);while(t(l)||o.test(l));return l.replace(f,"$1")}}),Fl=te(e=>{"use strict";Y(),e.isInteger=r=>typeof r=="number"?Number.isInteger(r):typeof r=="string"&&r.trim()!==""?Number.isInteger(Number(r)):!1,e.find=(r,t)=>r.nodes.find(n=>n.type===t),e.exceedsLimit=(r,t,n=1,i)=>i===!1||!e.isInteger(r)||!e.isInteger(t)?!1:(Number(t)-Number(r))/Number(n)>=i,e.escapeNode=(r,t=0,n)=>{let i=r.nodes[t];!i||(n&&i.type===n||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)},e.encloseBrace=r=>r.type!=="brace"||r.commas>>0+r.ranges>>0?!1:(r.invalid=!0,!0),e.isInvalidBrace=r=>r.type!=="brace"?!1:r.invalid===!0||r.dollar?!0:!(r.commas>>0+r.ranges>>0)||r.open!==!0||r.close!==!0?(r.invalid=!0,!0):!1,e.isOpenOrClose=r=>r.type==="open"||r.type==="close"?!0:r.open===!0||r.close===!0,e.reduce=r=>r.reduce((t,n)=>(n.type==="text"&&t.push(n.value),n.type==="range"&&(n.type="text"),t),[]),e.flatten=(...r)=>{let t=[],n=i=>{for(let c=0;c<i.length;c++){let a=i[c];Array.isArray(a)?n(a,t):a!==void 0&&t.push(a)}return t};return n(r),t}}),Pl=te((e,r)=>{"use strict";Y();var t=Fl();r.exports=(n,i={})=>{let c=(a,s={})=>{let o=i.escapeInvalid&&t.isInvalidBrace(s),f=a.invalid===!0&&i.escapeInvalid===!0,l="";if(a.value)return(o||f)&&t.isOpenOrClose(a)?"\\"+a.value:a.value;if(a.value)return a.value;if(a.nodes)for(let h of a.nodes)l+=c(h);return l};return c(n)}}),VP=te((e,r)=>{"use strict";Y(),r.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}}),KP=te((e,r)=>{"use strict";Y();var t=VP(),n=(g,S,E)=>{if(t(g)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(S===void 0||g===S)return String(g);if(t(S)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let v={relaxZeros:!0,...E};typeof v.strictZeros=="boolean"&&(v.relaxZeros=v.strictZeros===!1);let m=String(v.relaxZeros),w=String(v.shorthand),x=String(v.capture),A=String(v.wrap),D=g+":"+S+"="+m+w+x+A;if(n.cache.hasOwnProperty(D))return n.cache[D].result;let F=Math.min(g,S),T=Math.max(g,S);if(Math.abs(F-T)===1){let B=g+"|"+S;return v.capture?`(${B})`:v.wrap===!1?B:`(?:${B})`}let k=b(g)||b(S),O={min:g,max:S,a:F,b:T},P=[],I=[];if(k&&(O.isPadded=k,O.maxLen=String(O.max).length),F<0){let B=T<0?Math.abs(T):1;I=s(B,Math.abs(F),O,v),F=O.a=0}return T>=0&&(P=s(F,T,O,v)),O.negatives=I,O.positives=P,O.result=i(I,P,v),v.capture===!0?O.result=`(${O.result})`:v.wrap!==!1&&P.length+I.length>1&&(O.result=`(?:${O.result})`),n.cache[D]=O,O.result};function i(g,S,E){let v=o(g,S,"-",!1,E)||[],m=o(S,g,"",!1,E)||[],w=o(g,S,"-?",!0,E)||[];return v.concat(w).concat(m).join("|")}function c(g,S){let E=1,v=1,m=u(g,E),w=new Set([S]);for(;g<=m&&m<=S;)w.add(m),E+=1,m=u(g,E);for(m=d(S+1,v)-1;g<m&&m<=S;)w.add(m),v+=1,m=d(S+1,v)-1;return w=[...w],w.sort(l),w}function a(g,S,E){if(g===S)return{pattern:g,count:[],digits:0};let v=f(g,S),m=v.length,w="",x=0;for(let A=0;A<m;A++){let[D,F]=v[A];D===F?w+=D:D!=="0"||F!=="9"?w+=y(D,F,E):x++}return x&&(w+=E.shorthand===!0?"\\d":"[0-9]"),{pattern:w,count:[x],digits:m}}function s(g,S,E,v){let m=c(g,S),w=[],x=g,A;for(let D=0;D<m.length;D++){let F=m[D],T=a(String(x),String(F),v),k="";if(!E.isPadded&&A&&A.pattern===T.pattern){A.count.length>1&&A.count.pop(),A.count.push(T.count[0]),A.string=A.pattern+p(A.count),x=F+1;continue}E.isPadded&&(k=_(F,E,v)),T.string=k+T.pattern+p(T.count),w.push(T),x=F+1,A=T}return w}function o(g,S,E,v,m){let w=[];for(let x of g){let{string:A}=x;!v&&!h(S,"string",A)&&w.push(E+A),v&&h(S,"string",A)&&w.push(E+A)}return w}function f(g,S){let E=[];for(let v=0;v<g.length;v++)E.push([g[v],S[v]]);return E}function l(g,S){return g>S?1:S>g?-1:0}function h(g,S,E){return g.some(v=>v[S]===E)}function u(g,S){return Number(String(g).slice(0,-S)+"9".repeat(S))}function d(g,S){return g-g%Math.pow(10,S)}function p(g){let[S=0,E=""]=g;return E||S>1?`{${S+(E?","+E:"")}}`:""}function y(g,S,E){return`[${g}${S-g===1?"":"-"}${S}]`}function b(g){return/^-?(0+)\d/.test(g)}function _(g,S,E){if(!S.isPadded)return g;let v=Math.abs(S.maxLen-String(g).length),m=E.relaxZeros!==!1;switch(v){case 0:return"";case 1:return m?"0?":"0";case 2:return m?"0{0,2}":"00";default:return m?`0{0,${v}}`:`0{${v}}`}}n.cache={},n.clearCache=()=>n.cache={},r.exports=n}),N1=te((e,r)=>{"use strict";Y();var t=le("util"),n=KP(),i=v=>v!==null&&typeof v=="object"&&!Array.isArray(v),c=v=>m=>v===!0?Number(m):String(m),a=v=>typeof v=="number"||typeof v=="string"&&v!=="",s=v=>Number.isInteger(+v),o=v=>{let m=`${v}`,w=-1;if(m[0]==="-"&&(m=m.slice(1)),m==="0")return!1;for(;m[++w]==="0";);return w>0},f=(v,m,w)=>typeof v=="string"||typeof m=="string"?!0:w.stringify===!0,l=(v,m,w)=>{if(m>0){let x=v[0]==="-"?"-":"";x&&(v=v.slice(1)),v=x+v.padStart(x?m-1:m,"0")}return w===!1?String(v):v},h=(v,m)=>{let w=v[0]==="-"?"-":"";for(w&&(v=v.slice(1),m--);v.length<m;)v="0"+v;return w?"-"+v:v},u=(v,m)=>{v.negatives.sort((F,T)=>F<T?-1:F>T?1:0),v.positives.sort((F,T)=>F<T?-1:F>T?1:0);let w=m.capture?"":"?:",x="",A="",D;return v.positives.length&&(x=v.positives.join("|")),v.negatives.length&&(A=`-(${w}${v.negatives.join("|")})`),x&&A?D=`${x}|${A}`:D=x||A,m.wrap?`(${w}${D})`:D},d=(v,m,w,x)=>{if(w)return n(v,m,{wrap:!1,...x});let A=String.fromCharCode(v);if(v===m)return A;let D=String.fromCharCode(m);return`[${A}-${D}]`},p=(v,m,w)=>{if(Array.isArray(v)){let x=w.wrap===!0,A=w.capture?"":"?:";return x?`(${A}${v.join("|")})`:v.join("|")}return n(v,m,w)},y=(...v)=>new RangeError("Invalid range arguments: "+t.inspect(...v)),b=(v,m,w)=>{if(w.strictRanges===!0)throw y([v,m]);return[]},_=(v,m)=>{if(m.strictRanges===!0)throw new TypeError(`Expected step "${v}" to be a number`);return[]},g=(v,m,w=1,x={})=>{let A=Number(v),D=Number(m);if(!Number.isInteger(A)||!Number.isInteger(D)){if(x.strictRanges===!0)throw y([v,m]);return[]}A===0&&(A=0),D===0&&(D=0);let F=A>D,T=String(v),k=String(m),O=String(w);w=Math.max(Math.abs(w),1);let P=o(T)||o(k)||o(O),I=P?Math.max(T.length,k.length,O.length):0,B=P===!1&&f(v,m,x)===!1,H=x.transform||c(B);if(x.toRegex&&w===1)return d(h(v,I),h(m,I),!0,x);let G={negatives:[],positives:[]},Q=R=>G[R<0?"negatives":"positives"].push(Math.abs(R)),L=[],M=0;for(;F?A>=D:A<=D;)x.toRegex===!0&&w>1?Q(A):L.push(l(H(A,M),I,B)),A=F?A-w:A+w,M++;return x.toRegex===!0?w>1?u(G,x):p(L,null,{wrap:!1,...x}):L},S=(v,m,w=1,x={})=>{if(!s(v)&&v.length>1||!s(m)&&m.length>1)return b(v,m,x);let A=x.transform||(B=>String.fromCharCode(B)),D=`${v}`.charCodeAt(0),F=`${m}`.charCodeAt(0),T=D>F,k=Math.min(D,F),O=Math.max(D,F);if(x.toRegex&&w===1)return d(k,O,!1,x);let P=[],I=0;for(;T?D>=F:D<=F;)P.push(A(D,I)),D=T?D-w:D+w,I++;return x.toRegex===!0?p(P,null,{wrap:!1,options:x}):P},E=(v,m,w,x={})=>{if(m==null&&a(v))return[v];if(!a(v)||!a(m))return b(v,m,x);if(typeof w=="function")return E(v,m,1,{transform:w});if(i(w))return E(v,m,0,w);let A={...x};return A.capture===!0&&(A.wrap=!0),w=w||A.step||1,s(w)?s(v)&&s(m)?g(v,m,w,A):S(v,m,Math.max(Math.abs(w),1),A):w!=null&&!i(w)?_(w,A):E(v,m,1,w)};r.exports=E}),YP=te((e,r)=>{"use strict";Y();var t=N1(),n=Fl(),i=(c,a={})=>{let s=(o,f={})=>{let l=n.isInvalidBrace(f),h=o.invalid===!0&&a.escapeInvalid===!0,u=l===!0||h===!0,d=a.escapeInvalid===!0?"\\":"",p="";if(o.isOpen===!0||o.isClose===!0)return d+o.value;if(o.type==="open")return u?d+o.value:"(";if(o.type==="close")return u?d+o.value:")";if(o.type==="comma")return o.prev.type==="comma"?"":u?o.value:"|";if(o.value)return o.value;if(o.nodes&&o.ranges>0){let y=n.reduce(o.nodes),b=t(...y,{...a,wrap:!1,toRegex:!0});if(b.length!==0)return y.length>1&&b.length>1?`(${b})`:b}if(o.nodes)for(let y of o.nodes)p+=s(y,o);return p};return s(c)};r.exports=i}),XP=te((e,r)=>{"use strict";Y();var t=N1(),n=Pl(),i=Fl(),c=(s="",o="",f=!1)=>{let l=[];if(s=[].concat(s),o=[].concat(o),!o.length)return s;if(!s.length)return f?i.flatten(o).map(h=>`{${h}}`):o;for(let h of s)if(Array.isArray(h))for(let u of h)l.push(c(u,o,f));else for(let u of o)f===!0&&typeof u=="string"&&(u=`{${u}}`),l.push(Array.isArray(u)?c(h,u,f):h+u);return i.flatten(l)},a=(s,o={})=>{let f=o.rangeLimit===void 0?1e3:o.rangeLimit,l=(h,u={})=>{h.queue=[];let d=u,p=u.queue;for(;d.type!=="brace"&&d.type!=="root"&&d.parent;)d=d.parent,p=d.queue;if(h.invalid||h.dollar){p.push(c(p.pop(),n(h,o)));return}if(h.type==="brace"&&h.invalid!==!0&&h.nodes.length===2){p.push(c(p.pop(),["{}"]));return}if(h.nodes&&h.ranges>0){let g=i.reduce(h.nodes);if(i.exceedsLimit(...g,o.step,f))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let S=t(...g,o);S.length===0&&(S=n(h,o)),p.push(c(p.pop(),S)),h.nodes=[];return}let y=i.encloseBrace(h),b=h.queue,_=h;for(;_.type!=="brace"&&_.type!=="root"&&_.parent;)_=_.parent,b=_.queue;for(let g=0;g<h.nodes.length;g++){let S=h.nodes[g];if(S.type==="comma"&&h.type==="brace"){g===1&&b.push(""),b.push("");continue}if(S.type==="close"){p.push(c(p.pop(),b,y));continue}if(S.value&&S.type!=="open"){b.push(c(b.pop(),S.value));continue}S.nodes&&l(S,h)}return b};return i.flatten(l(s))};r.exports=a}),ZP=te((e,r)=>{"use strict";Y(),r.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
150
|
+
`;typeof h=="object"&&h!==null&&(h.spaces&&(u=h.spaces),h.EOL&&(d=h.EOL));var p=JSON.stringify(l,h?h.replacer:null,u);return p.replace(/\n/g,d)+d}function a(l,h,u,d){d==null&&(d=u,u={}),u=u||{};var p=u.fs||t,y="";try{y=c(h,u)}catch(b){d&&d(b,null);return}p.writeFile(l,y,u,d)}function s(l,h,u){u=u||{};var d=u.fs||t,p=c(h,u);return d.writeFileSync(l,p,u)}function o(l){return Buffer.isBuffer(l)&&(l=l.toString("utf8")),l=l.replace(/^\uFEFF/,""),l}var f={readFile:n,readFileSync:i,writeFile:a,writeFileSync:s};r.exports=f}),Sl=te((e,r)=>{"use strict";Y();var t=vt().fromCallback,n=SP();r.exports={readJson:t(n.readFile),readJsonSync:n.readFileSync,writeJson:t(n.writeFile),writeJsonSync:n.writeFileSync}}),xP=te((e,r)=>{"use strict";Y();var t=le("path"),n=St(),i=Kt().pathExists,c=Sl();function a(s,o,f,l){typeof f=="function"&&(l=f,f={});let h=t.dirname(s);i(h,(u,d)=>{if(u)return l(u);if(d)return c.writeJson(s,o,f,l);n.mkdirs(h,p=>{if(p)return l(p);c.writeJson(s,o,f,l)})})}r.exports=a}),AP=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("path"),i=St(),c=Sl();function a(s,o,f){let l=n.dirname(s);t.existsSync(l)||i.mkdirsSync(l),c.writeJsonSync(s,o,f)}r.exports=a}),CP=te((e,r)=>{"use strict";Y();var t=vt().fromCallback,n=Sl();n.outputJson=t(xP()),n.outputJsonSync=AP(),n.outputJSON=n.outputJson,n.outputJSONSync=n.outputJsonSync,n.writeJSON=n.writeJson,n.writeJSONSync=n.writeJsonSync,n.readJSON=n.readJson,n.readJSONSync=n.readJsonSync,r.exports=n}),kP=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("path"),i=w1().copySync,c=Hs().removeSync,a=St().mkdirpSync,s=$s();function o(u,d,p){p=p||{};let y=p.overwrite||p.clobber||!1,{srcStat:b}=s.checkPathsSync(u,d,"move");return s.checkParentPathsSync(u,b,d,"move"),a(n.dirname(d)),f(u,d,y)}function f(u,d,p){if(p)return c(d),l(u,d,p);if(t.existsSync(d))throw new Error("dest already exists.");return l(u,d,p)}function l(u,d,p){try{t.renameSync(u,d)}catch(y){if(y.code!=="EXDEV")throw y;return h(u,d,p)}}function h(u,d,p){return i(u,d,{overwrite:p,errorOnExist:!0}),c(u)}r.exports=o}),DP=te((e,r)=>{"use strict";Y(),r.exports={moveSync:kP()}}),RP=te((e,r)=>{"use strict";Y();var t=Ie(),n=le("path"),i=E1().copy,c=Hs().remove,a=St().mkdirp,s=Kt().pathExists,o=$s();function f(d,p,y,b){typeof y=="function"&&(b=y,y={});let _=y.overwrite||y.clobber||!1;o.checkPaths(d,p,"move",(g,S)=>{if(g)return b(g);let{srcStat:E}=S;o.checkParentPaths(d,E,p,"move",v=>{if(v)return b(v);a(n.dirname(p),m=>m?b(m):l(d,p,_,b))})})}function l(d,p,y,b){if(y)return c(p,_=>_?b(_):h(d,p,y,b));s(p,(_,g)=>_?b(_):g?b(new Error("dest already exists.")):h(d,p,y,b))}function h(d,p,y,b){t.rename(d,p,_=>_?_.code!=="EXDEV"?b(_):u(d,p,y,b):b())}function u(d,p,y,b){i(d,p,{overwrite:y,errorOnExist:!0},_=>_?b(_):c(d,b))}r.exports=f}),OP=te((e,r)=>{"use strict";Y();var t=vt().fromCallback;r.exports={move:t(RP())}}),TP=te((e,r)=>{"use strict";Y();var t=vt().fromCallback,n=Ie(),i=le("path"),c=St(),a=Kt().pathExists;function s(f,l,h,u){typeof h=="function"&&(u=h,h="utf8");let d=i.dirname(f);a(d,(p,y)=>{if(p)return u(p);if(y)return n.writeFile(f,l,h,u);c.mkdirs(d,b=>{if(b)return u(b);n.writeFile(f,l,h,u)})})}function o(f,...l){let h=i.dirname(f);if(n.existsSync(h))return n.writeFileSync(f,...l);c.mkdirsSync(h),n.writeFileSync(f,...l)}r.exports={outputFile:t(s),outputFileSync:o}}),FP=te((e,r)=>{"use strict";Y(),r.exports=Object.assign({},b1(),w1(),E1(),yP(),EP(),CP(),St(),DP(),OP(),TP(),Kt(),Hs());var t=le("fs");Object.getOwnPropertyDescriptor(t,"promises")&&Object.defineProperty(r.exports,"promises",{get(){return t.promises}})});Y();Y();var y7=je(nP());Y();Y();function PP(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}Y();Y();function wl(e){return wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},wl(e)}Y();function BP(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LP(e,r){if(r&&(wl(r)==="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BP(e)}Y();function js(e){return js=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},js(e)}Y();Y();function ui(e,r){return ui=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},ui(e,r)}function IP(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),r&&ui(e,r)}Y();Y();function MP(e){return Function.toString.call(e).indexOf("[native code]")!==-1}Y();Y();function NP(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ns(e,r,t){return NP()?Ns=Reflect.construct.bind():Ns=function(n,i,c){var a=[null];a.push.apply(a,i);var s=Function.bind.apply(n,a),o=new s;return c&&ui(o,c.prototype),o},Ns.apply(null,arguments)}function El(e){var r=typeof Map=="function"?new Map:void 0;return El=function(t){if(t===null||!MP(t))return t;if(typeof t!="function")throw new TypeError("Super expression must either be null or a function");if(typeof r<"u"){if(r.has(t))return r.get(t);r.set(t,n)}function n(){return Ns(t,arguments,js(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),ui(n,t)},El(e)}var g7=je(lP()),b7=je(FP()),v7=function(e){IP(r,e);function r(t){var n;return PP(this,r),n=LP(this,js(r).call(this,"No package.json could be found upwards from the directory ".concat(t))),n.directory=t,n}return r}(El(Error));Y();var $P=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.splitWhen=e.flatten=void 0;function r(n){return n.reduce((i,c)=>[].concat(i,c),[])}e.flatten=r;function t(n,i){let c=[[]],a=0;for(let s of n)i(s)?(a++,c[a]=[]):c[a].push(s);return c}e.splitWhen=t}),HP=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.isEnoentCodeError=void 0;function r(t){return t.code==="ENOENT"}e.isEnoentCodeError=r}),qP=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createDirentFromStats=void 0;var r=class{constructor(n,i){this.name=n,this.isBlockDevice=i.isBlockDevice.bind(i),this.isCharacterDevice=i.isCharacterDevice.bind(i),this.isDirectory=i.isDirectory.bind(i),this.isFIFO=i.isFIFO.bind(i),this.isFile=i.isFile.bind(i),this.isSocket=i.isSocket.bind(i),this.isSymbolicLink=i.isSymbolicLink.bind(i)}};function t(n,i){return new r(n,i)}e.createDirentFromStats=t}),GP=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.removeLeadingDotSegment=e.escape=e.makeAbsolute=e.unixify=void 0;var r=le("path"),t=2,n=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function i(o){return o.replace(/\\/g,"/")}e.unixify=i;function c(o,f){return r.resolve(o,f)}e.makeAbsolute=c;function a(o){return o.replace(n,"\\$2")}e.escape=a;function s(o){if(o.charAt(0)==="."){let f=o.charAt(1);if(f==="/"||f==="\\")return o.slice(t)}return o}e.removeLeadingDotSegment=s}),UP=te((e,r)=>{Y(),r.exports=function(t){if(typeof t!="string"||t==="")return!1;for(var n;n=/(\\).|([@?!+*]\(.*\))/g.exec(t);){if(n[2])return!0;t=t.slice(n.index+n[0].length)}return!1}}),WP=te((e,r)=>{Y();var t=UP(),n={"{":"}","(":")","[":"]"},i=function(a){if(a[0]==="!")return!0;for(var s=0,o=-2,f=-2,l=-2,h=-2,u=-2;s<a.length;){if(a[s]==="*"||a[s+1]==="?"&&/[\].+)]/.test(a[s])||f!==-1&&a[s]==="["&&a[s+1]!=="]"&&(f<s&&(f=a.indexOf("]",s)),f>s&&(u===-1||u>f||(u=a.indexOf("\\",s),u===-1||u>f)))||l!==-1&&a[s]==="{"&&a[s+1]!=="}"&&(l=a.indexOf("}",s),l>s&&(u=a.indexOf("\\",s),u===-1||u>l))||h!==-1&&a[s]==="("&&a[s+1]==="?"&&/[:!=]/.test(a[s+2])&&a[s+3]!==")"&&(h=a.indexOf(")",s),h>s&&(u=a.indexOf("\\",s),u===-1||u>h))||o!==-1&&a[s]==="("&&a[s+1]!=="|"&&(o<s&&(o=a.indexOf("|",s)),o!==-1&&a[o+1]!==")"&&(h=a.indexOf(")",o),h>o&&(u=a.indexOf("\\",o),u===-1||u>h))))return!0;if(a[s]==="\\"){var d=a[s+1];s+=2;var p=n[d];if(p){var y=a.indexOf(p,s);y!==-1&&(s=y+1)}if(a[s]==="!")return!0}else s++}return!1},c=function(a){if(a[0]==="!")return!0;for(var s=0;s<a.length;){if(/[*?{}()[\]]/.test(a[s]))return!0;if(a[s]==="\\"){var o=a[s+1];s+=2;var f=n[o];if(f){var l=a.indexOf(f,s);l!==-1&&(s=l+1)}if(a[s]==="!")return!0}else s++}return!1};r.exports=function(a,s){if(typeof a!="string"||a==="")return!1;if(t(a))return!0;var o=i;return s&&s.strict===!1&&(o=c),o(a)}}),zP=te((e,r)=>{"use strict";Y();var t=WP(),n=le("path").posix.dirname,i=le("os").platform()==="win32",c="/",a=/\\/g,s=/[\{\[].*[\}\]]$/,o=/(^|[^\\])([\{\[]|\([^\)]+$)/,f=/\\([\!\*\?\|\[\]\(\)\{\}])/g;r.exports=function(l,h){var u=Object.assign({flipBackslashes:!0},h);u.flipBackslashes&&i&&l.indexOf(c)<0&&(l=l.replace(a,c)),s.test(l)&&(l+=c),l+="a";do l=n(l);while(t(l)||o.test(l));return l.replace(f,"$1")}}),Fl=te(e=>{"use strict";Y(),e.isInteger=r=>typeof r=="number"?Number.isInteger(r):typeof r=="string"&&r.trim()!==""?Number.isInteger(Number(r)):!1,e.find=(r,t)=>r.nodes.find(n=>n.type===t),e.exceedsLimit=(r,t,n=1,i)=>i===!1||!e.isInteger(r)||!e.isInteger(t)?!1:(Number(t)-Number(r))/Number(n)>=i,e.escapeNode=(r,t=0,n)=>{let i=r.nodes[t];!i||(n&&i.type===n||i.type==="open"||i.type==="close")&&i.escaped!==!0&&(i.value="\\"+i.value,i.escaped=!0)},e.encloseBrace=r=>r.type!=="brace"||r.commas>>0+r.ranges>>0?!1:(r.invalid=!0,!0),e.isInvalidBrace=r=>r.type!=="brace"?!1:r.invalid===!0||r.dollar?!0:!(r.commas>>0+r.ranges>>0)||r.open!==!0||r.close!==!0?(r.invalid=!0,!0):!1,e.isOpenOrClose=r=>r.type==="open"||r.type==="close"?!0:r.open===!0||r.close===!0,e.reduce=r=>r.reduce((t,n)=>(n.type==="text"&&t.push(n.value),n.type==="range"&&(n.type="text"),t),[]),e.flatten=(...r)=>{let t=[],n=i=>{for(let c=0;c<i.length;c++){let a=i[c];Array.isArray(a)?n(a,t):a!==void 0&&t.push(a)}return t};return n(r),t}}),Pl=te((e,r)=>{"use strict";Y();var t=Fl();r.exports=(n,i={})=>{let c=(a,s={})=>{let o=i.escapeInvalid&&t.isInvalidBrace(s),f=a.invalid===!0&&i.escapeInvalid===!0,l="";if(a.value)return(o||f)&&t.isOpenOrClose(a)?"\\"+a.value:a.value;if(a.value)return a.value;if(a.nodes)for(let h of a.nodes)l+=c(h);return l};return c(n)}}),VP=te((e,r)=>{"use strict";Y(),r.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}}),KP=te((e,r)=>{"use strict";Y();var t=VP(),n=(g,S,E)=>{if(t(g)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(S===void 0||g===S)return String(g);if(t(S)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let v={relaxZeros:!0,...E};typeof v.strictZeros=="boolean"&&(v.relaxZeros=v.strictZeros===!1);let m=String(v.relaxZeros),w=String(v.shorthand),x=String(v.capture),A=String(v.wrap),D=g+":"+S+"="+m+w+x+A;if(n.cache.hasOwnProperty(D))return n.cache[D].result;let F=Math.min(g,S),T=Math.max(g,S);if(Math.abs(F-T)===1){let B=g+"|"+S;return v.capture?`(${B})`:v.wrap===!1?B:`(?:${B})`}let k=b(g)||b(S),O={min:g,max:S,a:F,b:T},P=[],I=[];if(k&&(O.isPadded=k,O.maxLen=String(O.max).length),F<0){let B=T<0?Math.abs(T):1;I=s(B,Math.abs(F),O,v),F=O.a=0}return T>=0&&(P=s(F,T,O,v)),O.negatives=I,O.positives=P,O.result=i(I,P,v),v.capture===!0?O.result=`(${O.result})`:v.wrap!==!1&&P.length+I.length>1&&(O.result=`(?:${O.result})`),n.cache[D]=O,O.result};function i(g,S,E){let v=o(g,S,"-",!1,E)||[],m=o(S,g,"",!1,E)||[],w=o(g,S,"-?",!0,E)||[];return v.concat(w).concat(m).join("|")}function c(g,S){let E=1,v=1,m=u(g,E),w=new Set([S]);for(;g<=m&&m<=S;)w.add(m),E+=1,m=u(g,E);for(m=d(S+1,v)-1;g<m&&m<=S;)w.add(m),v+=1,m=d(S+1,v)-1;return w=[...w],w.sort(l),w}function a(g,S,E){if(g===S)return{pattern:g,count:[],digits:0};let v=f(g,S),m=v.length,w="",x=0;for(let A=0;A<m;A++){let[D,F]=v[A];D===F?w+=D:D!=="0"||F!=="9"?w+=y(D,F,E):x++}return x&&(w+=E.shorthand===!0?"\\d":"[0-9]"),{pattern:w,count:[x],digits:m}}function s(g,S,E,v){let m=c(g,S),w=[],x=g,A;for(let D=0;D<m.length;D++){let F=m[D],T=a(String(x),String(F),v),k="";if(!E.isPadded&&A&&A.pattern===T.pattern){A.count.length>1&&A.count.pop(),A.count.push(T.count[0]),A.string=A.pattern+p(A.count),x=F+1;continue}E.isPadded&&(k=_(F,E,v)),T.string=k+T.pattern+p(T.count),w.push(T),x=F+1,A=T}return w}function o(g,S,E,v,m){let w=[];for(let x of g){let{string:A}=x;!v&&!h(S,"string",A)&&w.push(E+A),v&&h(S,"string",A)&&w.push(E+A)}return w}function f(g,S){let E=[];for(let v=0;v<g.length;v++)E.push([g[v],S[v]]);return E}function l(g,S){return g>S?1:S>g?-1:0}function h(g,S,E){return g.some(v=>v[S]===E)}function u(g,S){return Number(String(g).slice(0,-S)+"9".repeat(S))}function d(g,S){return g-g%Math.pow(10,S)}function p(g){let[S=0,E=""]=g;return E||S>1?`{${S+(E?","+E:"")}}`:""}function y(g,S,E){return`[${g}${S-g===1?"":"-"}${S}]`}function b(g){return/^-?(0+)\d/.test(g)}function _(g,S,E){if(!S.isPadded)return g;let v=Math.abs(S.maxLen-String(g).length),m=E.relaxZeros!==!1;switch(v){case 0:return"";case 1:return m?"0?":"0";case 2:return m?"0{0,2}":"00";default:return m?`0{0,${v}}`:`0{${v}}`}}n.cache={},n.clearCache=()=>n.cache={},r.exports=n}),N1=te((e,r)=>{"use strict";Y();var t=le("util"),n=KP(),i=v=>v!==null&&typeof v=="object"&&!Array.isArray(v),c=v=>m=>v===!0?Number(m):String(m),a=v=>typeof v=="number"||typeof v=="string"&&v!=="",s=v=>Number.isInteger(+v),o=v=>{let m=`${v}`,w=-1;if(m[0]==="-"&&(m=m.slice(1)),m==="0")return!1;for(;m[++w]==="0";);return w>0},f=(v,m,w)=>typeof v=="string"||typeof m=="string"?!0:w.stringify===!0,l=(v,m,w)=>{if(m>0){let x=v[0]==="-"?"-":"";x&&(v=v.slice(1)),v=x+v.padStart(x?m-1:m,"0")}return w===!1?String(v):v},h=(v,m)=>{let w=v[0]==="-"?"-":"";for(w&&(v=v.slice(1),m--);v.length<m;)v="0"+v;return w?"-"+v:v},u=(v,m)=>{v.negatives.sort((F,T)=>F<T?-1:F>T?1:0),v.positives.sort((F,T)=>F<T?-1:F>T?1:0);let w=m.capture?"":"?:",x="",A="",D;return v.positives.length&&(x=v.positives.join("|")),v.negatives.length&&(A=`-(${w}${v.negatives.join("|")})`),x&&A?D=`${x}|${A}`:D=x||A,m.wrap?`(${w}${D})`:D},d=(v,m,w,x)=>{if(w)return n(v,m,{wrap:!1,...x});let A=String.fromCharCode(v);if(v===m)return A;let D=String.fromCharCode(m);return`[${A}-${D}]`},p=(v,m,w)=>{if(Array.isArray(v)){let x=w.wrap===!0,A=w.capture?"":"?:";return x?`(${A}${v.join("|")})`:v.join("|")}return n(v,m,w)},y=(...v)=>new RangeError("Invalid range arguments: "+t.inspect(...v)),b=(v,m,w)=>{if(w.strictRanges===!0)throw y([v,m]);return[]},_=(v,m)=>{if(m.strictRanges===!0)throw new TypeError(`Expected step "${v}" to be a number`);return[]},g=(v,m,w=1,x={})=>{let A=Number(v),D=Number(m);if(!Number.isInteger(A)||!Number.isInteger(D)){if(x.strictRanges===!0)throw y([v,m]);return[]}A===0&&(A=0),D===0&&(D=0);let F=A>D,T=String(v),k=String(m),O=String(w);w=Math.max(Math.abs(w),1);let P=o(T)||o(k)||o(O),I=P?Math.max(T.length,k.length,O.length):0,B=P===!1&&f(v,m,x)===!1,H=x.transform||c(B);if(x.toRegex&&w===1)return d(h(v,I),h(m,I),!0,x);let G={negatives:[],positives:[]},Q=R=>G[R<0?"negatives":"positives"].push(Math.abs(R)),L=[],M=0;for(;F?A>=D:A<=D;)x.toRegex===!0&&w>1?Q(A):L.push(l(H(A,M),I,B)),A=F?A-w:A+w,M++;return x.toRegex===!0?w>1?u(G,x):p(L,null,{wrap:!1,...x}):L},S=(v,m,w=1,x={})=>{if(!s(v)&&v.length>1||!s(m)&&m.length>1)return b(v,m,x);let A=x.transform||(B=>String.fromCharCode(B)),D=`${v}`.charCodeAt(0),F=`${m}`.charCodeAt(0),T=D>F,k=Math.min(D,F),O=Math.max(D,F);if(x.toRegex&&w===1)return d(k,O,!1,x);let P=[],I=0;for(;T?D>=F:D<=F;)P.push(A(D,I)),D=T?D-w:D+w,I++;return x.toRegex===!0?p(P,null,{wrap:!1,options:x}):P},E=(v,m,w,x={})=>{if(m==null&&a(v))return[v];if(!a(v)||!a(m))return b(v,m,x);if(typeof w=="function")return E(v,m,1,{transform:w});if(i(w))return E(v,m,0,w);let A={...x};return A.capture===!0&&(A.wrap=!0),w=w||A.step||1,s(w)?s(v)&&s(m)?g(v,m,w,A):S(v,m,Math.max(Math.abs(w),1),A):w!=null&&!i(w)?_(w,A):E(v,m,1,w)};r.exports=E}),YP=te((e,r)=>{"use strict";Y();var t=N1(),n=Fl(),i=(c,a={})=>{let s=(o,f={})=>{let l=n.isInvalidBrace(f),h=o.invalid===!0&&a.escapeInvalid===!0,u=l===!0||h===!0,d=a.escapeInvalid===!0?"\\":"",p="";if(o.isOpen===!0||o.isClose===!0)return d+o.value;if(o.type==="open")return u?d+o.value:"(";if(o.type==="close")return u?d+o.value:")";if(o.type==="comma")return o.prev.type==="comma"?"":u?o.value:"|";if(o.value)return o.value;if(o.nodes&&o.ranges>0){let y=n.reduce(o.nodes),b=t(...y,{...a,wrap:!1,toRegex:!0});if(b.length!==0)return y.length>1&&b.length>1?`(${b})`:b}if(o.nodes)for(let y of o.nodes)p+=s(y,o);return p};return s(c)};r.exports=i}),XP=te((e,r)=>{"use strict";Y();var t=N1(),n=Pl(),i=Fl(),c=(s="",o="",f=!1)=>{let l=[];if(s=[].concat(s),o=[].concat(o),!o.length)return s;if(!s.length)return f?i.flatten(o).map(h=>`{${h}}`):o;for(let h of s)if(Array.isArray(h))for(let u of h)l.push(c(u,o,f));else for(let u of o)f===!0&&typeof u=="string"&&(u=`{${u}}`),l.push(Array.isArray(u)?c(h,u,f):h+u);return i.flatten(l)},a=(s,o={})=>{let f=o.rangeLimit===void 0?1e3:o.rangeLimit,l=(h,u={})=>{h.queue=[];let d=u,p=u.queue;for(;d.type!=="brace"&&d.type!=="root"&&d.parent;)d=d.parent,p=d.queue;if(h.invalid||h.dollar){p.push(c(p.pop(),n(h,o)));return}if(h.type==="brace"&&h.invalid!==!0&&h.nodes.length===2){p.push(c(p.pop(),["{}"]));return}if(h.nodes&&h.ranges>0){let g=i.reduce(h.nodes);if(i.exceedsLimit(...g,o.step,f))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let S=t(...g,o);S.length===0&&(S=n(h,o)),p.push(c(p.pop(),S)),h.nodes=[];return}let y=i.encloseBrace(h),b=h.queue,_=h;for(;_.type!=="brace"&&_.type!=="root"&&_.parent;)_=_.parent,b=_.queue;for(let g=0;g<h.nodes.length;g++){let S=h.nodes[g];if(S.type==="comma"&&h.type==="brace"){g===1&&b.push(""),b.push("");continue}if(S.type==="close"){p.push(c(p.pop(),b,y));continue}if(S.value&&S.type!=="open"){b.push(c(b.pop(),S.value));continue}S.nodes&&l(S,h)}return b};return i.flatten(l(s))};r.exports=a}),ZP=te((e,r)=>{"use strict";Y(),r.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:`
|
151
151
|
`,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"}}),JP=te((e,r)=>{"use strict";Y();var t=Pl(),{MAX_LENGTH:n,CHAR_BACKSLASH:i,CHAR_BACKTICK:c,CHAR_COMMA:a,CHAR_DOT:s,CHAR_LEFT_PARENTHESES:o,CHAR_RIGHT_PARENTHESES:f,CHAR_LEFT_CURLY_BRACE:l,CHAR_RIGHT_CURLY_BRACE:h,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_RIGHT_SQUARE_BRACKET:d,CHAR_DOUBLE_QUOTE:p,CHAR_SINGLE_QUOTE:y,CHAR_NO_BREAK_SPACE:b,CHAR_ZERO_WIDTH_NOBREAK_SPACE:_}=ZP(),g=(S,E={})=>{if(typeof S!="string")throw new TypeError("Expected a string");let v=E||{},m=typeof v.maxLength=="number"?Math.min(n,v.maxLength):n;if(S.length>m)throw new SyntaxError(`Input length (${S.length}), exceeds max characters (${m})`);let w={type:"root",input:S,nodes:[]},x=[w],A=w,D=w,F=0,T=S.length,k=0,O=0,P,I={},B=()=>S[k++],H=G=>{if(G.type==="text"&&D.type==="dot"&&(D.type="text"),D&&D.type==="text"&&G.type==="text"){D.value+=G.value;return}return A.nodes.push(G),G.parent=A,G.prev=D,D=G,G};for(H({type:"bos"});k<T;)if(A=x[x.length-1],P=B(),!(P===_||P===b)){if(P===i){H({type:"text",value:(E.keepEscaping?P:"")+B()});continue}if(P===d){H({type:"text",value:"\\"+P});continue}if(P===u){F++;let G=!0,Q;for(;k<T&&(Q=B());){if(P+=Q,Q===u){F++;continue}if(Q===i){P+=B();continue}if(Q===d&&(F--,F===0))break}H({type:"text",value:P});continue}if(P===o){A=H({type:"paren",nodes:[]}),x.push(A),H({type:"text",value:P});continue}if(P===f){if(A.type!=="paren"){H({type:"text",value:P});continue}A=x.pop(),H({type:"text",value:P}),A=x[x.length-1];continue}if(P===p||P===y||P===c){let G=P,Q;for(E.keepQuotes!==!0&&(P="");k<T&&(Q=B());){if(Q===i){P+=Q+B();continue}if(Q===G){E.keepQuotes===!0&&(P+=Q);break}P+=Q}H({type:"text",value:P});continue}if(P===l){O++;let G=D.value&&D.value.slice(-1)==="$"||A.dollar===!0;A=H({type:"brace",open:!0,close:!1,dollar:G,depth:O,commas:0,ranges:0,nodes:[]}),x.push(A),H({type:"open",value:P});continue}if(P===h){if(A.type!=="brace"){H({type:"text",value:P});continue}let G="close";A=x.pop(),A.close=!0,H({type:G,value:P}),O--,A=x[x.length-1];continue}if(P===a&&O>0){if(A.ranges>0){A.ranges=0;let G=A.nodes.shift();A.nodes=[G,{type:"text",value:t(A)}]}H({type:"comma",value:P}),A.commas++;continue}if(P===s&&O>0&&A.commas===0){let G=A.nodes;if(O===0||G.length===0){H({type:"text",value:P});continue}if(D.type==="dot"){if(A.range=[],D.value+=P,D.type="range",A.nodes.length!==3&&A.nodes.length!==5){A.invalid=!0,A.ranges=0,D.type="text";continue}A.ranges++,A.args=[];continue}if(D.type==="range"){G.pop();let Q=G[G.length-1];Q.value+=D.value+P,D=Q,A.ranges--;continue}H({type:"dot",value:P});continue}H({type:"text",value:P})}do if(A=x.pop(),A.type!=="root"){A.nodes.forEach(L=>{L.nodes||(L.type==="open"&&(L.isOpen=!0),L.type==="close"&&(L.isClose=!0),L.nodes||(L.type="text"),L.invalid=!0)});let G=x[x.length-1],Q=G.nodes.indexOf(A);G.nodes.splice(Q,1,...A.nodes)}while(x.length>0);return H({type:"eos"}),w};r.exports=g}),QP=te((e,r)=>{"use strict";Y();var t=Pl(),n=YP(),i=XP(),c=JP(),a=(s,o={})=>{let f=[];if(Array.isArray(s))for(let l of s){let h=a.create(l,o);Array.isArray(h)?f.push(...h):f.push(h)}else f=[].concat(a.create(s,o));return o&&o.expand===!0&&o.nodupes===!0&&(f=[...new Set(f)]),f};a.parse=(s,o={})=>c(s,o),a.stringify=(s,o={})=>t(typeof s=="string"?a.parse(s,o):s,o),a.compile=(s,o={})=>(typeof s=="string"&&(s=a.parse(s,o)),n(s,o)),a.expand=(s,o={})=>{typeof s=="string"&&(s=a.parse(s,o));let f=i(s,o);return o.noempty===!0&&(f=f.filter(Boolean)),o.nodupes===!0&&(f=[...new Set(f)]),f},a.create=(s,o={})=>s===""||s.length<3?[s]:o.expand!==!0?a.compile(s,o):a.expand(s,o),r.exports=a}),Vs=te((e,r)=>{"use strict";Y();var t=le("path"),n="\\\\/",i=`[^${n}]`,c="\\.",a="\\+",s="\\?",o="\\/",f="(?=.)",l="[^/]",h=`(?:${o}|$)`,u=`(?:^|${o})`,d=`${c}{1,2}${h}`,p=`(?!${c})`,y=`(?!${u}${d})`,b=`(?!${c}{0,1}${h})`,_=`(?!${d})`,g=`[^.${o}]`,S=`${l}*?`,E={DOT_LITERAL:c,PLUS_LITERAL:a,QMARK_LITERAL:s,SLASH_LITERAL:o,ONE_CHAR:f,QMARK:l,END_ANCHOR:h,DOTS_SLASH:d,NO_DOT:p,NO_DOTS:y,NO_DOT_SLASH:b,NO_DOTS_SLASH:_,QMARK_NO_DOT:g,STAR:S,START_ANCHOR:u},v={...E,SLASH_LITERAL:`[${n}]`,QMARK:i,STAR:`${i}*?`,DOTS_SLASH:`${c}{1,2}(?:[${n}]|$)`,NO_DOT:`(?!${c})`,NO_DOTS:`(?!(?:^|[${n}])${c}{1,2}(?:[${n}]|$))`,NO_DOT_SLASH:`(?!${c}{0,1}(?:[${n}]|$))`,NO_DOTS_SLASH:`(?!${c}{1,2}(?:[${n}]|$))`,QMARK_NO_DOT:`[^.${n}]`,START_ANCHOR:`(?:^|[${n}])`,END_ANCHOR:`(?:[${n}]|$)`},m={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:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};r.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:m,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:t.sep,extglobChars(w){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${w.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(w){return w===!0?v:E}}}),Ks=te(e=>{"use strict";Y();var r=le("path"),t=process.platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:c,REGEX_SPECIAL_CHARS_GLOBAL:a}=Vs();e.isObject=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),e.hasRegexChars=s=>c.test(s),e.isRegexChar=s=>s.length===1&&e.hasRegexChars(s),e.escapeRegex=s=>s.replace(a,"\\$1"),e.toPosixSlashes=s=>s.replace(n,"/"),e.removeBackslashes=s=>s.replace(i,o=>o==="\\"?"":o),e.supportsLookbehinds=()=>{let s=process.version.slice(1).split(".").map(Number);return s.length===3&&s[0]>=9||s[0]===8&&s[1]>=10},e.isWindows=s=>s&&typeof s.windows=="boolean"?s.windows:t===!0||r.sep==="\\",e.escapeLast=(s,o,f)=>{let l=s.lastIndexOf(o,f);return l===-1?s:s[l-1]==="\\"?e.escapeLast(s,o,l-1):`${s.slice(0,l)}\\${s.slice(l)}`},e.removePrefix=(s,o={})=>{let f=s;return f.startsWith("./")&&(f=f.slice(2),o.prefix="./"),f},e.wrapOutput=(s,o={},f={})=>{let l=f.contains?"":"^",h=f.contains?"":"$",u=`${l}(?:${s})${h}`;return o.negated===!0&&(u=`(?:^(?!${u}).*$)`),u}}),eB=te((e,r)=>{"use strict";Y();var t=Ks(),{CHAR_ASTERISK:n,CHAR_AT:i,CHAR_BACKWARD_SLASH:c,CHAR_COMMA:a,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:f,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:d,CHAR_QUESTION_MARK:p,CHAR_RIGHT_CURLY_BRACE:y,CHAR_RIGHT_PARENTHESES:b,CHAR_RIGHT_SQUARE_BRACKET:_}=Vs(),g=v=>v===f||v===c,S=v=>{v.isPrefix!==!0&&(v.depth=v.isGlobstar?1/0:1)},E=(v,m)=>{let w=m||{},x=v.length-1,A=w.parts===!0||w.scanToEnd===!0,D=[],F=[],T=[],k=v,O=-1,P=0,I=0,B=!1,H=!1,G=!1,Q=!1,L=!1,M=!1,R=!1,K=!1,q=!1,Z=!1,N=0,z,ee,ae={value:"",depth:0,isGlob:!1},oe=()=>O>=x,de=()=>k.charCodeAt(O+1),pe=()=>(z=ee,k.charCodeAt(++O));for(;O<x;){ee=pe();let X;if(ee===c){R=ae.backslashes=!0,ee=pe(),ee===l&&(M=!0);continue}if(M===!0||ee===l){for(N++;oe()!==!0&&(ee=pe());){if(ee===c){R=ae.backslashes=!0,pe();continue}if(ee===l){N++;continue}if(M!==!0&&ee===s&&(ee=pe())===s){if(B=ae.isBrace=!0,G=ae.isGlob=!0,Z=!0,A===!0)continue;break}if(M!==!0&&ee===a){if(B=ae.isBrace=!0,G=ae.isGlob=!0,Z=!0,A===!0)continue;break}if(ee===y&&(N--,N===0)){M=!1,B=ae.isBrace=!0,Z=!0;break}}if(A===!0)continue;break}if(ee===f){if(D.push(O),F.push(ae),ae={value:"",depth:0,isGlob:!1},Z===!0)continue;if(z===s&&O===P+1){P+=2;continue}I=O+1;continue}if(w.noext!==!0&&(ee===d||ee===i||ee===n||ee===p||ee===o)&&de()===h){if(G=ae.isGlob=!0,Q=ae.isExtglob=!0,Z=!0,ee===o&&O===P&&(q=!0),A===!0){for(;oe()!==!0&&(ee=pe());){if(ee===c){R=ae.backslashes=!0,ee=pe();continue}if(ee===b){G=ae.isGlob=!0,Z=!0;break}}continue}break}if(ee===n){if(z===n&&(L=ae.isGlobstar=!0),G=ae.isGlob=!0,Z=!0,A===!0)continue;break}if(ee===p){if(G=ae.isGlob=!0,Z=!0,A===!0)continue;break}if(ee===u){for(;oe()!==!0&&(X=pe());){if(X===c){R=ae.backslashes=!0,pe();continue}if(X===_){H=ae.isBracket=!0,G=ae.isGlob=!0,Z=!0;break}}if(A===!0)continue;break}if(w.nonegate!==!0&&ee===o&&O===P){K=ae.negated=!0,P++;continue}if(w.noparen!==!0&&ee===h){if(G=ae.isGlob=!0,A===!0){for(;oe()!==!0&&(ee=pe());){if(ee===h){R=ae.backslashes=!0,ee=pe();continue}if(ee===b){Z=!0;break}}continue}break}if(G===!0){if(Z=!0,A===!0)continue;break}}w.noext===!0&&(Q=!1,G=!1);let j=k,W="",C="";P>0&&(W=k.slice(0,P),k=k.slice(P),I-=P),j&&G===!0&&I>0?(j=k.slice(0,I),C=k.slice(I)):G===!0?(j="",C=k):j=k,j&&j!==""&&j!=="/"&&j!==k&&g(j.charCodeAt(j.length-1))&&(j=j.slice(0,-1)),w.unescape===!0&&(C&&(C=t.removeBackslashes(C)),j&&R===!0&&(j=t.removeBackslashes(j)));let U={prefix:W,input:v,start:P,base:j,glob:C,isBrace:B,isBracket:H,isGlob:G,isExtglob:Q,isGlobstar:L,negated:K,negatedExtglob:q};if(w.tokens===!0&&(U.maxDepth=0,g(ee)||F.push(ae),U.tokens=F),w.parts===!0||w.tokens===!0){let X;for(let ne=0;ne<D.length;ne++){let me=X?X+1:P,se=D[ne],fe=v.slice(me,se);w.tokens&&(ne===0&&P!==0?(F[ne].isPrefix=!0,F[ne].value=W):F[ne].value=fe,S(F[ne]),U.maxDepth+=F[ne].depth),(ne!==0||fe!=="")&&T.push(fe),X=se}if(X&&X+1<v.length){let ne=v.slice(X+1);T.push(ne),w.tokens&&(F[F.length-1].value=ne,S(F[F.length-1]),U.maxDepth+=F[F.length-1].depth)}U.slashes=D,U.parts=T}return U};r.exports=E}),tB=te((e,r)=>{"use strict";Y();var t=Vs(),n=Ks(),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:c,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:o}=t,f=(u,d)=>{if(typeof d.expandRange=="function")return d.expandRange(...u,d);u.sort();let p=`[${u.join("-")}]`;try{new RegExp(p)}catch{return u.map(y=>n.escapeRegex(y)).join("..")}return p},l=(u,d)=>`Missing ${u}: "${d}" - use "\\\\${d}" to match literal characters`,h=(u,d)=>{if(typeof u!="string")throw new TypeError("Expected a string");u=o[u]||u;let p={...d},y=typeof p.maxLength=="number"?Math.min(i,p.maxLength):i,b=u.length;if(b>y)throw new SyntaxError(`Input length: ${b}, exceeds maximum allowed length: ${y}`);let _={type:"bos",value:"",output:p.prepend||""},g=[_],S=p.capture?"":"?:",E=n.isWindows(d),v=t.globChars(E),m=t.extglobChars(v),{DOT_LITERAL:w,PLUS_LITERAL:x,SLASH_LITERAL:A,ONE_CHAR:D,DOTS_SLASH:F,NO_DOT:T,NO_DOT_SLASH:k,NO_DOTS_SLASH:O,QMARK:P,QMARK_NO_DOT:I,STAR:B,START_ANCHOR:H}=v,G=se=>`(${S}(?:(?!${H}${se.dot?F:w}).)*?)`,Q=p.dot?"":T,L=p.dot?P:I,M=p.bash===!0?G(p):B;p.capture&&(M=`(${M})`),typeof p.noext=="boolean"&&(p.noextglob=p.noext);let R={input:u,index:-1,start:0,dot:p.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};u=n.removePrefix(u,R),b=u.length;let K=[],q=[],Z=[],N=_,z,ee=()=>R.index===b-1,ae=R.peek=(se=1)=>u[R.index+se],oe=R.advance=()=>u[++R.index]||"",de=()=>u.slice(R.index+1),pe=(se="",fe=0)=>{R.consumed+=se,R.index+=fe},j=se=>{R.output+=se.output!=null?se.output:se.value,pe(se.value)},W=()=>{let se=1;for(;ae()==="!"&&(ae(2)!=="("||ae(3)==="?");)oe(),R.start++,se++;return se%2===0?!1:(R.negated=!0,R.start++,!0)},C=se=>{R[se]++,Z.push(se)},U=se=>{R[se]--,Z.pop()},X=se=>{if(N.type==="globstar"){let fe=R.braces>0&&(se.type==="comma"||se.type==="brace"),ie=se.extglob===!0||K.length&&(se.type==="pipe"||se.type==="paren");se.type!=="slash"&&se.type!=="paren"&&!fe&&!ie&&(R.output=R.output.slice(0,-N.output.length),N.type="star",N.value="*",N.output=M,R.output+=N.output)}if(K.length&&se.type!=="paren"&&(K[K.length-1].inner+=se.value),(se.value||se.output)&&j(se),N&&N.type==="text"&&se.type==="text"){N.value+=se.value,N.output=(N.output||"")+se.value;return}se.prev=N,g.push(se),N=se},ne=(se,fe)=>{let ie={...m[fe],conditions:1,inner:""};ie.prev=N,ie.parens=R.parens,ie.output=R.output;let ye=(p.capture?"(":"")+ie.open;C("parens"),X({type:se,value:fe,output:R.output?"":D}),X({type:"paren",extglob:!0,value:oe(),output:ye}),K.push(ie)},me=se=>{let fe=se.close+(p.capture?")":""),ie;if(se.type==="negate"){let ye=M;if(se.inner&&se.inner.length>1&&se.inner.includes("/")&&(ye=G(p)),(ye!==M||ee()||/^\)+$/.test(de()))&&(fe=se.close=`)$))${ye}`),se.inner.includes("*")&&(ie=de())&&/^\.[^\\/.]+$/.test(ie)){let we=h(ie,{...d,fastpaths:!1}).output;fe=se.close=`)${we})${ye})`}se.prev.type==="bos"&&(R.negatedExtglob=!0)}X({type:"paren",extglob:!0,value:z,output:fe}),U("parens")};if(p.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(u)){let se=!1,fe=u.replace(s,(ie,ye,we,Ae,V,$)=>Ae==="\\"?(se=!0,ie):Ae==="?"?ye?ye+Ae+(V?P.repeat(V.length):""):$===0?L+(V?P.repeat(V.length):""):P.repeat(we.length):Ae==="."?w.repeat(we.length):Ae==="*"?ye?ye+Ae+(V?M:""):M:ye?ie:`\\${ie}`);return se===!0&&(p.unescape===!0?fe=fe.replace(/\\/g,""):fe=fe.replace(/\\+/g,ie=>ie.length%2===0?"\\\\":ie?"\\":"")),fe===u&&p.contains===!0?(R.output=u,R):(R.output=n.wrapOutput(fe,R,d),R)}for(;!ee();){if(z=oe(),z==="\0")continue;if(z==="\\"){let ie=ae();if(ie==="/"&&p.bash!==!0||ie==="."||ie===";")continue;if(!ie){z+="\\",X({type:"text",value:z});continue}let ye=/^\\+/.exec(de()),we=0;if(ye&&ye[0].length>2&&(we=ye[0].length,R.index+=we,we%2!==0&&(z+="\\")),p.unescape===!0?z=oe():z+=oe(),R.brackets===0){X({type:"text",value:z});continue}}if(R.brackets>0&&(z!=="]"||N.value==="["||N.value==="[^")){if(p.posix!==!1&&z===":"){let ie=N.value.slice(1);if(ie.includes("[")&&(N.posix=!0,ie.includes(":"))){let ye=N.value.lastIndexOf("["),we=N.value.slice(0,ye),Ae=N.value.slice(ye+2),V=c[Ae];if(V){N.value=we+V,R.backtrack=!0,oe(),!_.output&&g.indexOf(N)===1&&(_.output=D);continue}}}(z==="["&&ae()!==":"||z==="-"&&ae()==="]")&&(z=`\\${z}`),z==="]"&&(N.value==="["||N.value==="[^")&&(z=`\\${z}`),p.posix===!0&&z==="!"&&N.value==="["&&(z="^"),N.value+=z,j({value:z});continue}if(R.quotes===1&&z!=='"'){z=n.escapeRegex(z),N.value+=z,j({value:z});continue}if(z==='"'){R.quotes=R.quotes===1?0:1,p.keepQuotes===!0&&X({type:"text",value:z});continue}if(z==="("){C("parens"),X({type:"paren",value:z});continue}if(z===")"){if(R.parens===0&&p.strictBrackets===!0)throw new SyntaxError(l("opening","("));let ie=K[K.length-1];if(ie&&R.parens===ie.parens+1){me(K.pop());continue}X({type:"paren",value:z,output:R.parens?")":"\\)"}),U("parens");continue}if(z==="["){if(p.nobracket===!0||!de().includes("]")){if(p.nobracket!==!0&&p.strictBrackets===!0)throw new SyntaxError(l("closing","]"));z=`\\${z}`}else C("brackets");X({type:"bracket",value:z});continue}if(z==="]"){if(p.nobracket===!0||N&&N.type==="bracket"&&N.value.length===1){X({type:"text",value:z,output:`\\${z}`});continue}if(R.brackets===0){if(p.strictBrackets===!0)throw new SyntaxError(l("opening","["));X({type:"text",value:z,output:`\\${z}`});continue}U("brackets");let ie=N.value.slice(1);if(N.posix!==!0&&ie[0]==="^"&&!ie.includes("/")&&(z=`/${z}`),N.value+=z,j({value:z}),p.literalBrackets===!1||n.hasRegexChars(ie))continue;let ye=n.escapeRegex(N.value);if(R.output=R.output.slice(0,-N.value.length),p.literalBrackets===!0){R.output+=ye,N.value=ye;continue}N.value=`(${S}${ye}|${N.value})`,R.output+=N.value;continue}if(z==="{"&&p.nobrace!==!0){C("braces");let ie={type:"brace",value:z,output:"(",outputIndex:R.output.length,tokensIndex:R.tokens.length};q.push(ie),X(ie);continue}if(z==="}"){let ie=q[q.length-1];if(p.nobrace===!0||!ie){X({type:"text",value:z,output:z});continue}let ye=")";if(ie.dots===!0){let we=g.slice(),Ae=[];for(let V=we.length-1;V>=0&&(g.pop(),we[V].type!=="brace");V--)we[V].type!=="dots"&&Ae.unshift(we[V].value);ye=f(Ae,p),R.backtrack=!0}if(ie.comma!==!0&&ie.dots!==!0){let we=R.output.slice(0,ie.outputIndex),Ae=R.tokens.slice(ie.tokensIndex);ie.value=ie.output="\\{",z=ye="\\}",R.output=we;for(let V of Ae)R.output+=V.output||V.value}X({type:"brace",value:z,output:ye}),U("braces"),q.pop();continue}if(z==="|"){K.length>0&&K[K.length-1].conditions++,X({type:"text",value:z});continue}if(z===","){let ie=z,ye=q[q.length-1];ye&&Z[Z.length-1]==="braces"&&(ye.comma=!0,ie="|"),X({type:"comma",value:z,output:ie});continue}if(z==="/"){if(N.type==="dot"&&R.index===R.start+1){R.start=R.index+1,R.consumed="",R.output="",g.pop(),N=_;continue}X({type:"slash",value:z,output:A});continue}if(z==="."){if(R.braces>0&&N.type==="dot"){N.value==="."&&(N.output=w);let ie=q[q.length-1];N.type="dots",N.output+=z,N.value+=z,ie.dots=!0;continue}if(R.braces+R.parens===0&&N.type!=="bos"&&N.type!=="slash"){X({type:"text",value:z,output:w});continue}X({type:"dot",value:z,output:w});continue}if(z==="?"){if(!(N&&N.value==="(")&&p.noextglob!==!0&&ae()==="("&&ae(2)!=="?"){ne("qmark",z);continue}if(N&&N.type==="paren"){let ie=ae(),ye=z;if(ie==="<"&&!n.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(N.value==="("&&!/[!=<:]/.test(ie)||ie==="<"&&!/<([!=]|\w+>)/.test(de()))&&(ye=`\\${z}`),X({type:"text",value:z,output:ye});continue}if(p.dot!==!0&&(N.type==="slash"||N.type==="bos")){X({type:"qmark",value:z,output:I});continue}X({type:"qmark",value:z,output:P});continue}if(z==="!"){if(p.noextglob!==!0&&ae()==="("&&(ae(2)!=="?"||!/[!=<:]/.test(ae(3)))){ne("negate",z);continue}if(p.nonegate!==!0&&R.index===0){W();continue}}if(z==="+"){if(p.noextglob!==!0&&ae()==="("&&ae(2)!=="?"){ne("plus",z);continue}if(N&&N.value==="("||p.regex===!1){X({type:"plus",value:z,output:x});continue}if(N&&(N.type==="bracket"||N.type==="paren"||N.type==="brace")||R.parens>0){X({type:"plus",value:z});continue}X({type:"plus",value:x});continue}if(z==="@"){if(p.noextglob!==!0&&ae()==="("&&ae(2)!=="?"){X({type:"at",extglob:!0,value:z,output:""});continue}X({type:"text",value:z});continue}if(z!=="*"){(z==="$"||z==="^")&&(z=`\\${z}`);let ie=a.exec(de());ie&&(z+=ie[0],R.index+=ie[0].length),X({type:"text",value:z});continue}if(N&&(N.type==="globstar"||N.star===!0)){N.type="star",N.star=!0,N.value+=z,N.output=M,R.backtrack=!0,R.globstar=!0,pe(z);continue}let se=de();if(p.noextglob!==!0&&/^\([^?]/.test(se)){ne("star",z);continue}if(N.type==="star"){if(p.noglobstar===!0){pe(z);continue}let ie=N.prev,ye=ie.prev,we=ie.type==="slash"||ie.type==="bos",Ae=ye&&(ye.type==="star"||ye.type==="globstar");if(p.bash===!0&&(!we||se[0]&&se[0]!=="/")){X({type:"star",value:z,output:""});continue}let V=R.braces>0&&(ie.type==="comma"||ie.type==="brace"),$=K.length&&(ie.type==="pipe"||ie.type==="paren");if(!we&&ie.type!=="paren"&&!V&&!$){X({type:"star",value:z,output:""});continue}for(;se.slice(0,3)==="/**";){let ue=u[R.index+4];if(ue&&ue!=="/")break;se=se.slice(3),pe("/**",3)}if(ie.type==="bos"&&ee()){N.type="globstar",N.value+=z,N.output=G(p),R.output=N.output,R.globstar=!0,pe(z);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&!Ae&&ee()){R.output=R.output.slice(0,-(ie.output+N.output).length),ie.output=`(?:${ie.output}`,N.type="globstar",N.output=G(p)+(p.strictSlashes?")":"|$)"),N.value+=z,R.globstar=!0,R.output+=ie.output+N.output,pe(z);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&se[0]==="/"){let ue=se[1]!==void 0?"|$":"";R.output=R.output.slice(0,-(ie.output+N.output).length),ie.output=`(?:${ie.output}`,N.type="globstar",N.output=`${G(p)}${A}|${A}${ue})`,N.value+=z,R.output+=ie.output+N.output,R.globstar=!0,pe(z+oe()),X({type:"slash",value:"/",output:""});continue}if(ie.type==="bos"&&se[0]==="/"){N.type="globstar",N.value+=z,N.output=`(?:^|${A}|${G(p)}${A})`,R.output=N.output,R.globstar=!0,pe(z+oe()),X({type:"slash",value:"/",output:""});continue}R.output=R.output.slice(0,-N.output.length),N.type="globstar",N.output=G(p),N.value+=z,R.output+=N.output,R.globstar=!0,pe(z);continue}let fe={type:"star",value:z,output:M};if(p.bash===!0){fe.output=".*?",(N.type==="bos"||N.type==="slash")&&(fe.output=Q+fe.output),X(fe);continue}if(N&&(N.type==="bracket"||N.type==="paren")&&p.regex===!0){fe.output=z,X(fe);continue}(R.index===R.start||N.type==="slash"||N.type==="dot")&&(N.type==="dot"?(R.output+=k,N.output+=k):p.dot===!0?(R.output+=O,N.output+=O):(R.output+=Q,N.output+=Q),ae()!=="*"&&(R.output+=D,N.output+=D)),X(fe)}for(;R.brackets>0;){if(p.strictBrackets===!0)throw new SyntaxError(l("closing","]"));R.output=n.escapeLast(R.output,"["),U("brackets")}for(;R.parens>0;){if(p.strictBrackets===!0)throw new SyntaxError(l("closing",")"));R.output=n.escapeLast(R.output,"("),U("parens")}for(;R.braces>0;){if(p.strictBrackets===!0)throw new SyntaxError(l("closing","}"));R.output=n.escapeLast(R.output,"{"),U("braces")}if(p.strictSlashes!==!0&&(N.type==="star"||N.type==="bracket")&&X({type:"maybe_slash",value:"",output:`${A}?`}),R.backtrack===!0){R.output="";for(let se of R.tokens)R.output+=se.output!=null?se.output:se.value,se.suffix&&(R.output+=se.suffix)}return R};h.fastpaths=(u,d)=>{let p={...d},y=typeof p.maxLength=="number"?Math.min(i,p.maxLength):i,b=u.length;if(b>y)throw new SyntaxError(`Input length: ${b}, exceeds maximum allowed length: ${y}`);u=o[u]||u;let _=n.isWindows(d),{DOT_LITERAL:g,SLASH_LITERAL:S,ONE_CHAR:E,DOTS_SLASH:v,NO_DOT:m,NO_DOTS:w,NO_DOTS_SLASH:x,STAR:A,START_ANCHOR:D}=t.globChars(_),F=p.dot?w:m,T=p.dot?x:m,k=p.capture?"":"?:",O={negated:!1,prefix:""},P=p.bash===!0?".*?":A;p.capture&&(P=`(${P})`);let I=Q=>Q.noglobstar===!0?P:`(${k}(?:(?!${D}${Q.dot?v:g}).)*?)`,B=Q=>{switch(Q){case"*":return`${F}${E}${P}`;case".*":return`${g}${E}${P}`;case"*.*":return`${F}${P}${g}${E}${P}`;case"*/*":return`${F}${P}${S}${E}${T}${P}`;case"**":return F+I(p);case"**/*":return`(?:${F}${I(p)}${S})?${T}${E}${P}`;case"**/*.*":return`(?:${F}${I(p)}${S})?${T}${P}${g}${E}${P}`;case"**/.*":return`(?:${F}${I(p)}${S})?${g}${E}${P}`;default:{let L=/^(.*?)\.(\w+)$/.exec(Q);if(!L)return;let M=B(L[1]);return M?M+g+L[2]:void 0}}},H=n.removePrefix(u,O),G=B(H);return G&&p.strictSlashes!==!0&&(G+=`${S}?`),G},r.exports=h}),rB=te((e,r)=>{"use strict";Y();var t=le("path"),n=eB(),i=tB(),c=Ks(),a=Vs(),s=f=>f&&typeof f=="object"&&!Array.isArray(f),o=(f,l,h=!1)=>{if(Array.isArray(f)){let S=f.map(E=>o(E,l,h));return E=>{for(let v of S){let m=v(E);if(m)return m}return!1}}let u=s(f)&&f.tokens&&f.input;if(f===""||typeof f!="string"&&!u)throw new TypeError("Expected pattern to be a non-empty string");let d=l||{},p=c.isWindows(l),y=u?o.compileRe(f,l):o.makeRe(f,l,!1,!0),b=y.state;delete y.state;let _=()=>!1;if(d.ignore){let S={...l,ignore:null,onMatch:null,onResult:null};_=o(d.ignore,S,h)}let g=(S,E=!1)=>{let{isMatch:v,match:m,output:w}=o.test(S,y,l,{glob:f,posix:p}),x={glob:f,state:b,regex:y,posix:p,input:S,output:w,match:m,isMatch:v};return typeof d.onResult=="function"&&d.onResult(x),v===!1?(x.isMatch=!1,E?x:!1):_(S)?(typeof d.onIgnore=="function"&&d.onIgnore(x),x.isMatch=!1,E?x:!1):(typeof d.onMatch=="function"&&d.onMatch(x),E?x:!0)};return h&&(g.state=b),g};o.test=(f,l,h,{glob:u,posix:d}={})=>{if(typeof f!="string")throw new TypeError("Expected input to be a string");if(f==="")return{isMatch:!1,output:""};let p=h||{},y=p.format||(d?c.toPosixSlashes:null),b=f===u,_=b&&y?y(f):f;return b===!1&&(_=y?y(f):f,b=_===u),(b===!1||p.capture===!0)&&(p.matchBase===!0||p.basename===!0?b=o.matchBase(f,l,h,d):b=l.exec(_)),{isMatch:!!b,match:b,output:_}},o.matchBase=(f,l,h,u=c.isWindows(h))=>(l instanceof RegExp?l:o.makeRe(l,h)).test(t.basename(f)),o.isMatch=(f,l,h)=>o(l,h)(f),o.parse=(f,l)=>Array.isArray(f)?f.map(h=>o.parse(h,l)):i(f,{...l,fastpaths:!1}),o.scan=(f,l)=>n(f,l),o.compileRe=(f,l,h=!1,u=!1)=>{if(h===!0)return f.output;let d=l||{},p=d.contains?"":"^",y=d.contains?"":"$",b=`${p}(?:${f.output})${y}`;f&&f.negated===!0&&(b=`^(?!${b}).*$`);let _=o.toRegex(b,l);return u===!0&&(_.state=f),_},o.makeRe=(f,l={},h=!1,u=!1)=>{if(!f||typeof f!="string")throw new TypeError("Expected a non-empty string");let d={negated:!1,fastpaths:!0};return l.fastpaths!==!1&&(f[0]==="."||f[0]==="*")&&(d.output=i.fastpaths(f,l)),d.output||(d=i(f,l)),o.compileRe(d,l,h,u)},o.toRegex=(f,l)=>{try{let h=l||{};return new RegExp(f,h.flags||(h.nocase?"i":""))}catch(h){if(l&&l.debug===!0)throw h;return/$^/}},o.constants=a,r.exports=o}),nB=te((e,r)=>{"use strict";Y(),r.exports=rB()}),iB=te((e,r)=>{"use strict";Y();var t=le("util"),n=QP(),i=nB(),c=Ks(),a=o=>o===""||o==="./",s=(o,f,l)=>{f=[].concat(f),o=[].concat(o);let h=new Set,u=new Set,d=new Set,p=0,y=_=>{d.add(_.output),l&&l.onResult&&l.onResult(_)};for(let _=0;_<f.length;_++){let g=i(String(f[_]),{...l,onResult:y},!0),S=g.state.negated||g.state.negatedExtglob;S&&p++;for(let E of o){let v=g(E,!0);!(S?!v.isMatch:v.isMatch)||(S?h.add(v.output):(h.delete(v.output),u.add(v.output)))}}let b=(p===f.length?[...d]:[...u]).filter(_=>!h.has(_));if(l&&b.length===0){if(l.failglob===!0)throw new Error(`No matches found for "${f.join(", ")}"`);if(l.nonull===!0||l.nullglob===!0)return l.unescape?f.map(_=>_.replace(/\\/g,"")):f}return b};s.match=s,s.matcher=(o,f)=>i(o,f),s.isMatch=(o,f,l)=>i(f,l)(o),s.any=s.isMatch,s.not=(o,f,l={})=>{f=[].concat(f).map(String);let h=new Set,u=[],d=y=>{l.onResult&&l.onResult(y),u.push(y.output)},p=new Set(s(o,f,{...l,onResult:d}));for(let y of u)p.has(y)||h.add(y);return[...h]},s.contains=(o,f,l)=>{if(typeof o!="string")throw new TypeError(`Expected a string: "${t.inspect(o)}"`);if(Array.isArray(f))return f.some(h=>s.contains(o,h,l));if(typeof f=="string"){if(a(o)||a(f))return!1;if(o.includes(f)||o.startsWith("./")&&o.slice(2).includes(f))return!0}return s.isMatch(o,f,{...l,contains:!0})},s.matchKeys=(o,f,l)=>{if(!c.isObject(o))throw new TypeError("Expected the first argument to be an object");let h=s(Object.keys(o),f,l),u={};for(let d of h)u[d]=o[d];return u},s.some=(o,f,l)=>{let h=[].concat(o);for(let u of[].concat(f)){let d=i(String(u),l);if(h.some(p=>d(p)))return!0}return!1},s.every=(o,f,l)=>{let h=[].concat(o);for(let u of[].concat(f)){let d=i(String(u),l);if(!h.every(p=>d(p)))return!1}return!0},s.all=(o,f,l)=>{if(typeof o!="string")throw new TypeError(`Expected a string: "${t.inspect(o)}"`);return[].concat(f).every(h=>i(h,l)(o))},s.capture=(o,f,l)=>{let h=c.isWindows(l),u=i.makeRe(String(o),{...l,capture:!0}).exec(h?c.toPosixSlashes(f):f);if(u)return u.slice(1).map(d=>d===void 0?"":d)},s.makeRe=(...o)=>i.makeRe(...o),s.scan=(...o)=>i.scan(...o),s.parse=(o,f)=>{let l=[];for(let h of[].concat(o||[]))for(let u of n(String(h),f))l.push(i.parse(u,f));return l},s.braces=(o,f)=>{if(typeof o!="string")throw new TypeError("Expected a string");return f&&f.nobrace===!0||!/\{.*\}/.test(o)?[o]:n(o,f)},s.braceExpand=(o,f)=>{if(typeof o!="string")throw new TypeError("Expected a string");return s.braces(o,{...f,expand:!0})},r.exports=s}),sB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.matchAny=e.convertPatternsToRe=e.makeRe=e.getPatternParts=e.expandBraceExpansion=e.expandPatternsWithBraceExpansion=e.isAffectDepthOfReadingPattern=e.endsWithSlashGlobStar=e.hasGlobStar=e.getBaseDirectory=e.isPatternRelatedToParentDirectory=e.getPatternsOutsideCurrentDirectory=e.getPatternsInsideCurrentDirectory=e.getPositivePatterns=e.getNegativePatterns=e.isPositivePattern=e.isNegativePattern=e.convertToNegativePattern=e.convertToPositivePattern=e.isDynamicPattern=e.isStaticPattern=void 0;var r=le("path"),t=zP(),n=iB(),i="**",c="\\",a=/[*?]|^!/,s=/\[[^[]*]/,o=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,f=/[!*+?@]\([^(]*\)/,l=/,|\.\./;function h(B,H={}){return!u(B,H)}e.isStaticPattern=h;function u(B,H={}){return B===""?!1:!!(H.caseSensitiveMatch===!1||B.includes(c)||a.test(B)||s.test(B)||o.test(B)||H.extglob!==!1&&f.test(B)||H.braceExpansion!==!1&&d(B))}e.isDynamicPattern=u;function d(B){let H=B.indexOf("{");if(H===-1)return!1;let G=B.indexOf("}",H+1);if(G===-1)return!1;let Q=B.slice(H,G);return l.test(Q)}function p(B){return b(B)?B.slice(1):B}e.convertToPositivePattern=p;function y(B){return"!"+B}e.convertToNegativePattern=y;function b(B){return B.startsWith("!")&&B[1]!=="("}e.isNegativePattern=b;function _(B){return!b(B)}e.isPositivePattern=_;function g(B){return B.filter(b)}e.getNegativePatterns=g;function S(B){return B.filter(_)}e.getPositivePatterns=S;function E(B){return B.filter(H=>!m(H))}e.getPatternsInsideCurrentDirectory=E;function v(B){return B.filter(m)}e.getPatternsOutsideCurrentDirectory=v;function m(B){return B.startsWith("..")||B.startsWith("./..")}e.isPatternRelatedToParentDirectory=m;function w(B){return t(B,{flipBackslashes:!1})}e.getBaseDirectory=w;function x(B){return B.includes(i)}e.hasGlobStar=x;function A(B){return B.endsWith("/"+i)}e.endsWithSlashGlobStar=A;function D(B){let H=r.basename(B);return A(B)||h(H)}e.isAffectDepthOfReadingPattern=D;function F(B){return B.reduce((H,G)=>H.concat(T(G)),[])}e.expandPatternsWithBraceExpansion=F;function T(B){return n.braces(B,{expand:!0,nodupes:!0})}e.expandBraceExpansion=T;function k(B,H){let{parts:G}=n.scan(B,Object.assign(Object.assign({},H),{parts:!0}));return G.length===0&&(G=[B]),G[0].startsWith("/")&&(G[0]=G[0].slice(1),G.unshift("")),G}e.getPatternParts=k;function O(B,H){return n.makeRe(B,H)}e.makeRe=O;function P(B,H){return B.map(G=>O(G,H))}e.convertPatternsToRe=P;function I(B,H){return H.some(G=>G.test(B))}e.matchAny=I}),oB=te((e,r)=>{"use strict";Y();var t=le("stream"),n=t.PassThrough,i=Array.prototype.slice;r.exports=c;function c(){let s=[],o=i.call(arguments),f=!1,l=o[o.length-1];l&&!Array.isArray(l)&&l.pipe==null?o.pop():l={};let h=l.end!==!1,u=l.pipeError===!0;l.objectMode==null&&(l.objectMode=!0),l.highWaterMark==null&&(l.highWaterMark=64*1024);let d=n(l);function p(){for(let _=0,g=arguments.length;_<g;_++)s.push(a(arguments[_],l));return y(),this}function y(){if(f)return;f=!0;let _=s.shift();if(!_){process.nextTick(b);return}Array.isArray(_)||(_=[_]);let g=_.length+1;function S(){--g>0||(f=!1,y())}function E(v){function m(){v.removeListener("merge2UnpipeEnd",m),v.removeListener("end",m),u&&v.removeListener("error",w),S()}function w(x){d.emit("error",x)}if(v._readableState.endEmitted)return S();v.on("merge2UnpipeEnd",m),v.on("end",m),u&&v.on("error",w),v.pipe(d,{end:!1}),v.resume()}for(let v=0;v<_.length;v++)E(_[v]);S()}function b(){f=!1,d.emit("queueDrain"),h&&d.end()}return d.setMaxListeners(0),d.add=p,d.on("unpipe",function(_){_.emit("merge2UnpipeEnd")}),o.length&&p.apply(null,o),d}function a(s,o){if(Array.isArray(s))for(let f=0,l=s.length;f<l;f++)s[f]=a(s[f],o);else{if(!s._readableState&&s.pipe&&(s=s.pipe(n(o))),!s._readableState||!s.pause||!s.pipe)throw new Error("Only readable stream can be merged.");s.pause()}return s}}),aB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.merge=void 0;var r=oB();function t(i){let c=r(i);return i.forEach(a=>{a.once("error",s=>c.emit("error",s))}),c.once("close",()=>n(i)),c.once("end",()=>n(i)),c}e.merge=t;function n(i){i.forEach(c=>c.emit("close"))}}),uB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.isEmpty=e.isString=void 0;function r(n){return typeof n=="string"}e.isString=r;function t(n){return n===""}e.isEmpty=t}),mr=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.string=e.stream=e.pattern=e.path=e.fs=e.errno=e.array=void 0;var r=$P();e.array=r;var t=HP();e.errno=t;var n=qP();e.fs=n;var i=GP();e.path=i;var c=sB();e.pattern=c;var a=aB();e.stream=a;var s=uB();e.string=s}),lB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.convertPatternGroupToTask=e.convertPatternGroupsToTasks=e.groupPatternsByBaseDirectory=e.getNegativePatternsAsPositive=e.getPositivePatterns=e.convertPatternsToTasks=e.generate=void 0;var r=mr();function t(f,l){let h=i(f),u=c(f,l.ignore),d=h.filter(_=>r.pattern.isStaticPattern(_,l)),p=h.filter(_=>r.pattern.isDynamicPattern(_,l)),y=n(d,u,!1),b=n(p,u,!0);return y.concat(b)}e.generate=t;function n(f,l,h){let u=[],d=r.pattern.getPatternsOutsideCurrentDirectory(f),p=r.pattern.getPatternsInsideCurrentDirectory(f),y=a(d),b=a(p);return u.push(...s(y,l,h)),"."in b?u.push(o(".",p,l,h)):u.push(...s(b,l,h)),u}e.convertPatternsToTasks=n;function i(f){return r.pattern.getPositivePatterns(f)}e.getPositivePatterns=i;function c(f,l){return r.pattern.getNegativePatterns(f).concat(l).map(r.pattern.convertToPositivePattern)}e.getNegativePatternsAsPositive=c;function a(f){let l={};return f.reduce((h,u)=>{let d=r.pattern.getBaseDirectory(u);return d in h?h[d].push(u):h[d]=[u],h},l)}e.groupPatternsByBaseDirectory=a;function s(f,l,h){return Object.keys(f).map(u=>o(u,f[u],l,h))}e.convertPatternGroupsToTasks=s;function o(f,l,h,u){return{dynamic:u,positive:l,negative:h,base:f,patterns:[].concat(l,h.map(r.pattern.convertToNegativePattern))}}e.convertPatternGroupToTask=o}),cB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.removeDuplicateSlashes=e.transform=void 0;var r=/(?!^)\/{2,}/g;function t(i){return i.map(c=>n(c))}e.transform=t;function n(i){return i.replace(r,"/")}e.removeDuplicateSlashes=n}),hB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.read=void 0;function r(i,c,a){c.fs.lstat(i,(s,o)=>{if(s!==null){t(a,s);return}if(!o.isSymbolicLink()||!c.followSymbolicLink){n(a,o);return}c.fs.stat(i,(f,l)=>{if(f!==null){if(c.throwErrorOnBrokenSymbolicLink){t(a,f);return}n(a,o);return}c.markSymbolicLink&&(l.isSymbolicLink=()=>!0),n(a,l)})})}e.read=r;function t(i,c){i(c)}function n(i,c){i(null,c)}}),fB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.read=void 0;function r(t,n){let i=n.fs.lstatSync(t);if(!i.isSymbolicLink()||!n.followSymbolicLink)return i;try{let c=n.fs.statSync(t);return n.markSymbolicLink&&(c.isSymbolicLink=()=>!0),c}catch(c){if(!n.throwErrorOnBrokenSymbolicLink)return i;throw c}}e.read=r}),pB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;var r=le("fs");e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync};function t(n){return n===void 0?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),n)}e.createFileSystemAdapter=t}),dB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=pB(),t=class{constructor(n={}){this._options=n,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=r.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(n,i){return n!=null?n:i}};e.default=t}),xn=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.statSync=e.stat=e.Settings=void 0;var r=hB(),t=fB(),n=dB();e.Settings=n.default;function i(s,o,f){if(typeof o=="function"){r.read(s,a(),o);return}r.read(s,a(o),f)}e.stat=i;function c(s,o){let f=a(o);return t.read(s,f)}e.statSync=c;function a(s={}){return s instanceof n.default?s:new n.default(s)}}),mB=te((e,r)=>{Y();var t;r.exports=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:global):n=>(t||(t=Promise.resolve())).then(n).catch(i=>setTimeout(()=>{throw i},0))}),yB=te((e,r)=>{Y(),r.exports=n;var t=mB();function n(i,c){let a,s,o,f=!0;Array.isArray(i)?(a=[],s=i.length):(o=Object.keys(i),a={},s=o.length);function l(u){function d(){c&&c(u,a),c=null}f?t(d):d()}function h(u,d,p){a[u]=p,(--s===0||d)&&l(d)}s?o?o.forEach(function(u){i[u](function(d,p){h(u,d,p)})}):i.forEach(function(u,d){u(function(p,y){h(d,p,y)})}):l(null),f=!1}}),j1=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var r=process.versions.node.split(".");if(r[0]===void 0||r[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var t=Number.parseInt(r[0],10),n=Number.parseInt(r[1],10),i=10,c=10,a=t>i,s=t===i&&n>=c;e.IS_SUPPORT_READDIR_WITH_FILE_TYPES=a||s}),gB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createDirentFromStats=void 0;var r=class{constructor(n,i){this.name=n,this.isBlockDevice=i.isBlockDevice.bind(i),this.isCharacterDevice=i.isCharacterDevice.bind(i),this.isDirectory=i.isDirectory.bind(i),this.isFIFO=i.isFIFO.bind(i),this.isFile=i.isFile.bind(i),this.isSocket=i.isSocket.bind(i),this.isSymbolicLink=i.isSymbolicLink.bind(i)}};function t(n,i){return new r(n,i)}e.createDirentFromStats=t}),$1=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.fs=void 0;var r=gB();e.fs=r}),H1=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.joinPathSegments=void 0;function r(t,n,i){return t.endsWith(i)?t+n:t+i+n}e.joinPathSegments=r}),bB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.readdir=e.readdirWithFileTypes=e.read=void 0;var r=xn(),t=yB(),n=j1(),i=$1(),c=H1();function a(u,d,p){if(!d.stats&&n.IS_SUPPORT_READDIR_WITH_FILE_TYPES){s(u,d,p);return}f(u,d,p)}e.read=a;function s(u,d,p){d.fs.readdir(u,{withFileTypes:!0},(y,b)=>{if(y!==null){l(p,y);return}let _=b.map(S=>({dirent:S,name:S.name,path:c.joinPathSegments(u,S.name,d.pathSegmentSeparator)}));if(!d.followSymbolicLinks){h(p,_);return}let g=_.map(S=>o(S,d));t(g,(S,E)=>{if(S!==null){l(p,S);return}h(p,E)})})}e.readdirWithFileTypes=s;function o(u,d){return p=>{if(!u.dirent.isSymbolicLink()){p(null,u);return}d.fs.stat(u.path,(y,b)=>{if(y!==null){if(d.throwErrorOnBrokenSymbolicLink){p(y);return}p(null,u);return}u.dirent=i.fs.createDirentFromStats(u.name,b),p(null,u)})}}function f(u,d,p){d.fs.readdir(u,(y,b)=>{if(y!==null){l(p,y);return}let _=b.map(g=>{let S=c.joinPathSegments(u,g,d.pathSegmentSeparator);return E=>{r.stat(S,d.fsStatSettings,(v,m)=>{if(v!==null){E(v);return}let w={name:g,path:S,dirent:i.fs.createDirentFromStats(g,m)};d.stats&&(w.stats=m),E(null,w)})}});t(_,(g,S)=>{if(g!==null){l(p,g);return}h(p,S)})})}e.readdir=f;function l(u,d){u(d)}function h(u,d){u(null,d)}}),vB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.readdir=e.readdirWithFileTypes=e.read=void 0;var r=xn(),t=j1(),n=$1(),i=H1();function c(o,f){return!f.stats&&t.IS_SUPPORT_READDIR_WITH_FILE_TYPES?a(o,f):s(o,f)}e.read=c;function a(o,f){return f.fs.readdirSync(o,{withFileTypes:!0}).map(l=>{let h={dirent:l,name:l.name,path:i.joinPathSegments(o,l.name,f.pathSegmentSeparator)};if(h.dirent.isSymbolicLink()&&f.followSymbolicLinks)try{let u=f.fs.statSync(h.path);h.dirent=n.fs.createDirentFromStats(h.name,u)}catch(u){if(f.throwErrorOnBrokenSymbolicLink)throw u}return h})}e.readdirWithFileTypes=a;function s(o,f){return f.fs.readdirSync(o).map(l=>{let h=i.joinPathSegments(o,l,f.pathSegmentSeparator),u=r.statSync(h,f.fsStatSettings),d={name:l,path:h,dirent:n.fs.createDirentFromStats(l,u)};return f.stats&&(d.stats=u),d})}e.readdir=s}),_B=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.createFileSystemAdapter=e.FILE_SYSTEM_ADAPTER=void 0;var r=le("fs");e.FILE_SYSTEM_ADAPTER={lstat:r.lstat,stat:r.stat,lstatSync:r.lstatSync,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync};function t(n){return n===void 0?e.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},e.FILE_SYSTEM_ADAPTER),n)}e.createFileSystemAdapter=t}),wB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=le("path"),t=xn(),n=_B(),i=class{constructor(c={}){this._options=c,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=n.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,r.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new t.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(c,a){return c!=null?c:a}};e.default=i}),Bl=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Settings=e.scandirSync=e.scandir=void 0;var r=bB(),t=vB(),n=wB();e.Settings=n.default;function i(s,o,f){if(typeof o=="function"){r.read(s,a(),o);return}r.read(s,a(o),f)}e.scandir=i;function c(s,o){let f=a(o);return t.read(s,f)}e.scandirSync=c;function a(s={}){return s instanceof n.default?s:new n.default(s)}}),EB=te((e,r)=>{"use strict";Y();function t(n){var i=new n,c=i;function a(){var o=i;return o.next?i=o.next:(i=new n,c=i),o.next=null,o}function s(o){c.next=o,c=o}return{get:a,release:s}}r.exports=t}),SB=te((e,r)=>{"use strict";Y();var t=EB();function n(s,o,f){if(typeof s=="function"&&(f=o,o=s,s=null),f<1)throw new Error("fastqueue concurrency must be greater than 1");var l=t(c),h=null,u=null,d=0,p=null,y={push:m,drain:i,saturated:i,pause:_,paused:!1,concurrency:f,running:b,resume:E,idle:v,length:g,getQueue:S,unshift:w,empty:i,kill:A,killAndDrain:D,error:F};return y;function b(){return d}function _(){y.paused=!0}function g(){for(var T=h,k=0;T;)T=T.next,k++;return k}function S(){for(var T=h,k=[];T;)k.push(T.value),T=T.next;return k}function E(){if(y.paused){y.paused=!1;for(var T=0;T<y.concurrency;T++)d++,x()}}function v(){return d===0&&y.length()===0}function m(T,k){var O=l.get();O.context=s,O.release=x,O.value=T,O.callback=k||i,O.errorHandler=p,d===y.concurrency||y.paused?u?(u.next=O,u=O):(h=O,u=O,y.saturated()):(d++,o.call(s,O.value,O.worked))}function w(T,k){var O=l.get();O.context=s,O.release=x,O.value=T,O.callback=k||i,d===y.concurrency||y.paused?h?(O.next=h,h=O):(h=O,u=O,y.saturated()):(d++,o.call(s,O.value,O.worked))}function x(T){T&&l.release(T);var k=h;k?y.paused?d--:(u===h&&(u=null),h=k.next,k.next=null,o.call(s,k.value,k.worked),u===null&&y.empty()):--d===0&&y.drain()}function A(){h=null,u=null,y.drain=i}function D(){h=null,u=null,y.drain(),y.drain=i}function F(T){p=T}}function i(){}function c(){this.value=null,this.callback=i,this.next=null,this.release=i,this.context=null,this.errorHandler=null;var s=this;this.worked=function(o,f){var l=s.callback,h=s.errorHandler,u=s.value;s.value=null,s.callback=i,s.errorHandler&&h(o,u),l.call(s.context,o,f),s.release(s)}}function a(s,o,f){typeof s=="function"&&(f=o,o=s,s=null);function l(_,g){o.call(this,_).then(function(S){g(null,S)},g)}var h=n(s,l,f),u=h.push,d=h.unshift;return h.push=p,h.unshift=y,h.drained=b,h;function p(_){var g=new Promise(function(S,E){u(_,function(v,m){if(v){E(v);return}S(m)})});return g.catch(i),g}function y(_){var g=new Promise(function(S,E){d(_,function(v,m){if(v){E(v);return}S(m)})});return g.catch(i),g}function b(){var _=h.drain,g=new Promise(function(S){h.drain=function(){_(),S()}});return g}}r.exports=n,r.exports.promise=a}),Ll=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.joinPathSegments=e.replacePathSegmentSeparator=e.isAppliedFilter=e.isFatalError=void 0;function r(c,a){return c.errorFilter===null?!0:!c.errorFilter(a)}e.isFatalError=r;function t(c,a){return c===null||c(a)}e.isAppliedFilter=t;function n(c,a){return c.split(/[/\\]/).join(a)}e.replacePathSegmentSeparator=n;function i(c,a,s){return c===""?a:c.endsWith(s)?c+a:c+s+a}e.joinPathSegments=i}),q1=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=Ll(),t=class{constructor(n,i){this._root=n,this._settings=i,this._root=r.replacePathSegmentSeparator(n,i.pathSegmentSeparator)}};e.default=t}),G1=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=le("events"),t=Bl(),n=SB(),i=Ll(),c=q1(),a=class extends c.default{constructor(s,o){super(s,o),this._settings=o,this._scandir=t.scandir,this._emitter=new r.EventEmitter,this._queue=n(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(s){this._emitter.on("entry",s)}onError(s){this._emitter.once("error",s)}onEnd(s){this._emitter.once("end",s)}_pushToQueue(s,o){let f={directory:s,base:o};this._queue.push(f,l=>{l!==null&&this._handleError(l)})}_worker(s,o){this._scandir(s.directory,this._settings.fsScandirSettings,(f,l)=>{if(f!==null){o(f,void 0);return}for(let h of l)this._handleEntry(h,s.base);o(null,void 0)})}_handleError(s){this._isDestroyed||!i.isFatalError(this._settings,s)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",s))}_handleEntry(s,o){if(this._isDestroyed||this._isFatalError)return;let f=s.path;o!==void 0&&(s.path=i.joinPathSegments(o,s.name,this._settings.pathSegmentSeparator)),i.isAppliedFilter(this._settings.entryFilter,s)&&this._emitEntry(s),s.dirent.isDirectory()&&i.isAppliedFilter(this._settings.deepFilter,s)&&this._pushToQueue(f,o===void 0?void 0:s.path)}_emitEntry(s){this._emitter.emit("entry",s)}};e.default=a}),xB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=G1(),t=class{constructor(c,a){this._root=c,this._settings=a,this._reader=new r.default(this._root,this._settings),this._storage=[]}read(c){this._reader.onError(a=>{n(c,a)}),this._reader.onEntry(a=>{this._storage.push(a)}),this._reader.onEnd(()=>{i(c,this._storage)}),this._reader.read()}};e.default=t;function n(c,a){c(a)}function i(c,a){c(null,a)}}),AB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=le("stream"),t=G1(),n=class{constructor(i,c){this._root=i,this._settings=c,this._reader=new t.default(this._root,this._settings),this._stream=new r.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(i=>{this._stream.emit("error",i)}),this._reader.onEntry(i=>{this._stream.push(i)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};e.default=n}),CB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=Bl(),t=Ll(),n=q1(),i=class extends n.default{constructor(){super(...arguments),this._scandir=r.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(c,a){this._queue.add({directory:c,base:a})}_handleQueue(){for(let c of this._queue.values())this._handleDirectory(c.directory,c.base)}_handleDirectory(c,a){try{let s=this._scandir(c,this._settings.fsScandirSettings);for(let o of s)this._handleEntry(o,a)}catch(s){this._handleError(s)}}_handleError(c){if(t.isFatalError(this._settings,c))throw c}_handleEntry(c,a){let s=c.path;a!==void 0&&(c.path=t.joinPathSegments(a,c.name,this._settings.pathSegmentSeparator)),t.isAppliedFilter(this._settings.entryFilter,c)&&this._pushToStorage(c),c.dirent.isDirectory()&&t.isAppliedFilter(this._settings.deepFilter,c)&&this._pushToQueue(s,a===void 0?void 0:c.path)}_pushToStorage(c){this._storage.push(c)}};e.default=i}),kB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=CB(),t=class{constructor(n,i){this._root=n,this._settings=i,this._reader=new r.default(this._root,this._settings)}read(){return this._reader.read()}};e.default=t}),DB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=le("path"),t=Bl(),n=class{constructor(i={}){this._options=i,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,r.sep),this.fsScandirSettings=new t.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(i,c){return i!=null?i:c}};e.default=n}),Il=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.Settings=e.walkStream=e.walkSync=e.walk=void 0;var r=xB(),t=AB(),n=kB(),i=DB();e.Settings=i.default;function c(f,l,h){if(typeof l=="function"){new r.default(f,o()).read(l);return}new r.default(f,o(l)).read(h)}e.walk=c;function a(f,l){let h=o(l);return new n.default(f,h).read()}e.walkSync=a;function s(f,l){let h=o(l);return new t.default(f,h).read()}e.walkStream=s;function o(f={}){return f instanceof i.default?f:new i.default(f)}}),Ml=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=le("path"),t=xn(),n=mr(),i=class{constructor(c){this._settings=c,this._fsStatSettings=new t.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(c){return r.resolve(this._settings.cwd,c)}_makeEntry(c,a){let s={name:a,path:a,dirent:n.fs.createDirentFromStats(a,c)};return this._settings.stats&&(s.stats=c),s}_isFatalError(c){return!n.errno.isEnoentCodeError(c)&&!this._settings.suppressErrors}};e.default=i}),U1=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=le("stream"),t=xn(),n=Il(),i=Ml(),c=class extends i.default{constructor(){super(...arguments),this._walkStream=n.walkStream,this._stat=t.stat}dynamic(a,s){return this._walkStream(a,s)}static(a,s){let o=a.map(this._getFullEntryPath,this),f=new r.PassThrough({objectMode:!0});f._write=(l,h,u)=>this._getEntry(o[l],a[l],s).then(d=>{d!==null&&s.entryFilter(d)&&f.push(d),l===o.length-1&&f.end(),u()}).catch(u);for(let l=0;l<o.length;l++)f.write(l);return f}_getEntry(a,s,o){return this._getStat(a).then(f=>this._makeEntry(f,s)).catch(f=>{if(o.errorFilter(f))return null;throw f})}_getStat(a){return new Promise((s,o)=>{this._stat(a,this._fsStatSettings,(f,l)=>f===null?s(l):o(f))})}};e.default=c}),RB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=Il(),t=Ml(),n=U1(),i=class extends t.default{constructor(){super(...arguments),this._walkAsync=r.walk,this._readerStream=new n.default(this._settings)}dynamic(c,a){return new Promise((s,o)=>{this._walkAsync(c,a,(f,l)=>{f===null?s(l):o(f)})})}async static(c,a){let s=[],o=this._readerStream.static(c,a);return new Promise((f,l)=>{o.once("error",l),o.on("data",h=>s.push(h)),o.once("end",()=>f(s))})}};e.default=i}),OB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=mr(),t=class{constructor(n,i,c){this._patterns=n,this._settings=i,this._micromatchOptions=c,this._storage=[],this._fillStorage()}_fillStorage(){let n=r.pattern.expandPatternsWithBraceExpansion(this._patterns);for(let i of n){let c=this._getPatternSegments(i),a=this._splitSegmentsIntoSections(c);this._storage.push({complete:a.length<=1,pattern:i,segments:c,sections:a})}}_getPatternSegments(n){return r.pattern.getPatternParts(n,this._micromatchOptions).map(i=>r.pattern.isDynamicPattern(i,this._settings)?{dynamic:!0,pattern:i,patternRe:r.pattern.makeRe(i,this._micromatchOptions)}:{dynamic:!1,pattern:i})}_splitSegmentsIntoSections(n){return r.array.splitWhen(n,i=>i.dynamic&&r.pattern.hasGlobStar(i.pattern))}};e.default=t}),TB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=OB(),t=class extends r.default{match(n){let i=n.split("/"),c=i.length,a=this._storage.filter(s=>!s.complete||s.segments.length>c);for(let s of a){let o=s.sections[0];if(!s.complete&&c>o.length||i.every((f,l)=>{let h=s.segments[l];return!!(h.dynamic&&h.patternRe.test(f)||!h.dynamic&&h.pattern===f)}))return!0}return!1}};e.default=t}),FB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=mr(),t=TB(),n=class{constructor(i,c){this._settings=i,this._micromatchOptions=c}getFilter(i,c,a){let s=this._getMatcher(c),o=this._getNegativePatternsRe(a);return f=>this._filter(i,f,s,o)}_getMatcher(i){return new t.default(i,this._settings,this._micromatchOptions)}_getNegativePatternsRe(i){let c=i.filter(r.pattern.isAffectDepthOfReadingPattern);return r.pattern.convertPatternsToRe(c,this._micromatchOptions)}_filter(i,c,a,s){if(this._isSkippedByDeep(i,c.path)||this._isSkippedSymbolicLink(c))return!1;let o=r.path.removeLeadingDotSegment(c.path);return this._isSkippedByPositivePatterns(o,a)?!1:this._isSkippedByNegativePatterns(o,s)}_isSkippedByDeep(i,c){return this._settings.deep===1/0?!1:this._getEntryLevel(i,c)>=this._settings.deep}_getEntryLevel(i,c){let a=c.split("/").length;if(i==="")return a;let s=i.split("/").length;return a-s}_isSkippedSymbolicLink(i){return!this._settings.followSymbolicLinks&&i.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(i,c){return!this._settings.baseNameMatch&&!c.match(i)}_isSkippedByNegativePatterns(i,c){return!r.pattern.matchAny(i,c)}};e.default=n}),PB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=mr(),t=class{constructor(n,i){this._settings=n,this._micromatchOptions=i,this.index=new Map}getFilter(n,i){let c=r.pattern.convertPatternsToRe(n,this._micromatchOptions),a=r.pattern.convertPatternsToRe(i,this._micromatchOptions);return s=>this._filter(s,c,a)}_filter(n,i,c){if(this._settings.unique&&this._isDuplicateEntry(n)||this._onlyFileFilter(n)||this._onlyDirectoryFilter(n)||this._isSkippedByAbsoluteNegativePatterns(n.path,c))return!1;let a=this._settings.baseNameMatch?n.name:n.path,s=n.dirent.isDirectory(),o=this._isMatchToPatterns(a,i,s)&&!this._isMatchToPatterns(n.path,c,s);return this._settings.unique&&o&&this._createIndexRecord(n),o}_isDuplicateEntry(n){return this.index.has(n.path)}_createIndexRecord(n){this.index.set(n.path,void 0)}_onlyFileFilter(n){return this._settings.onlyFiles&&!n.dirent.isFile()}_onlyDirectoryFilter(n){return this._settings.onlyDirectories&&!n.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(n,i){if(!this._settings.absolute)return!1;let c=r.path.makeAbsolute(this._settings.cwd,n);return r.pattern.matchAny(c,i)}_isMatchToPatterns(n,i,c){let a=r.path.removeLeadingDotSegment(n),s=r.pattern.matchAny(a,i);return!s&&c?r.pattern.matchAny(a+"/",i):s}};e.default=t}),BB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=mr(),t=class{constructor(n){this._settings=n}getFilter(){return n=>this._isNonFatalError(n)}_isNonFatalError(n){return r.errno.isEnoentCodeError(n)||this._settings.suppressErrors}};e.default=t}),LB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=mr(),t=class{constructor(n){this._settings=n}getTransformer(){return n=>this._transform(n)}_transform(n){let i=n.path;return this._settings.absolute&&(i=r.path.makeAbsolute(this._settings.cwd,i),i=r.path.unixify(i)),this._settings.markDirectories&&n.dirent.isDirectory()&&(i+="/"),this._settings.objectMode?Object.assign(Object.assign({},n),{path:i}):i}};e.default=t}),Nl=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=le("path"),t=FB(),n=PB(),i=BB(),c=LB(),a=class{constructor(s){this._settings=s,this.errorFilter=new i.default(this._settings),this.entryFilter=new n.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new t.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new c.default(this._settings)}_getRootDirectory(s){return r.resolve(this._settings.cwd,s.base)}_getReaderOptions(s){let o=s.base==="."?"":s.base;return{basePath:o,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(o,s.positive,s.negative),entryFilter:this.entryFilter.getFilter(s.positive,s.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};e.default=a}),IB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=RB(),t=Nl(),n=class extends t.default{constructor(){super(...arguments),this._reader=new r.default(this._settings)}async read(i){let c=this._getRootDirectory(i),a=this._getReaderOptions(i);return(await this.api(c,i,a)).map(s=>a.transform(s))}api(i,c,a){return c.dynamic?this._reader.dynamic(i,a):this._reader.static(c.patterns,a)}};e.default=n}),MB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=le("stream"),t=U1(),n=Nl(),i=class extends n.default{constructor(){super(...arguments),this._reader=new t.default(this._settings)}read(c){let a=this._getRootDirectory(c),s=this._getReaderOptions(c),o=this.api(a,c,s),f=new r.Readable({objectMode:!0,read:()=>{}});return o.once("error",l=>f.emit("error",l)).on("data",l=>f.emit("data",s.transform(l))).once("end",()=>f.emit("end")),f.once("close",()=>o.destroy()),f}api(c,a,s){return a.dynamic?this._reader.dynamic(c,s):this._reader.static(a.patterns,s)}};e.default=i}),NB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=xn(),t=Il(),n=Ml(),i=class extends n.default{constructor(){super(...arguments),this._walkSync=t.walkSync,this._statSync=r.statSync}dynamic(c,a){return this._walkSync(c,a)}static(c,a){let s=[];for(let o of c){let f=this._getFullEntryPath(o),l=this._getEntry(f,o,a);l===null||!a.entryFilter(l)||s.push(l)}return s}_getEntry(c,a,s){try{let o=this._getStat(c);return this._makeEntry(o,a)}catch(o){if(s.errorFilter(o))return null;throw o}}_getStat(c){return this._statSync(c,this._fsStatSettings)}};e.default=i}),jB=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0});var r=NB(),t=Nl(),n=class extends t.default{constructor(){super(...arguments),this._reader=new r.default(this._settings)}read(i){let c=this._getRootDirectory(i),a=this._getReaderOptions(i);return this.api(c,i,a).map(a.transform)}api(i,c,a){return c.dynamic?this._reader.dynamic(i,a):this._reader.static(c.patterns,a)}};e.default=n}),$B=te(e=>{"use strict";Y(),Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var r=le("fs"),t=le("os"),n=Math.max(t.cpus().length,1);e.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:r.lstat,lstatSync:r.lstatSync,stat:r.stat,statSync:r.statSync,readdir:r.readdir,readdirSync:r.readdirSync};var i=class{constructor(c={}){this._options=c,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,n),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0)}_getValue(c,a){return c===void 0?a:c}_getFileSystemMethods(c={}){return Object.assign(Object.assign({},e.DEFAULT_FILE_SYSTEM_ADAPTER),c)}};e.default=i}),HB=te((e,r)=>{"use strict";Y();var t=lB(),n=cB(),i=IB(),c=MB(),a=jB(),s=$B(),o=mr();async function f(u,d){h(u);let p=l(u,i.default,d),y=await Promise.all(p);return o.array.flatten(y)}(function(u){function d(g,S){h(g);let E=l(g,a.default,S);return o.array.flatten(E)}u.sync=d;function p(g,S){h(g);let E=l(g,c.default,S);return o.stream.merge(E)}u.stream=p;function y(g,S){h(g);let E=n.transform([].concat(g)),v=new s.default(S);return t.generate(E,v)}u.generateTasks=y;function b(g,S){h(g);let E=new s.default(S);return o.pattern.isDynamicPattern(g,E)}u.isDynamicPattern=b;function _(g){return h(g),o.path.escape(g)}u.escapePath=_})(f||(f={}));function l(u,d,p){let y=n.transform([].concat(u)),b=new s.default(p),_=t.generate(y,b),g=new d(b);return _.map(g.read,g)}function h(u){if(![].concat(u).every(d=>o.string.isString(d)&&!o.string.isEmpty(d)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}r.exports=f});Y();Y();function W1(e){return typeof e>"u"||e===null}function qB(e){return typeof e=="object"&&e!==null}function GB(e){return Array.isArray(e)?e:W1(e)?[]:[e]}function UB(e,r){var t,n,i,c;if(r)for(c=Object.keys(r),t=0,n=c.length;t<n;t+=1)i=c[t],e[i]=r[i];return e}function WB(e,r){var t="",n;for(n=0;n<r;n+=1)t+=e;return t}function zB(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var VB=W1,KB=qB,YB=GB,XB=WB,ZB=zB,JB=UB,Ke={isNothing:VB,isObject:KB,toArray:YB,repeat:XB,isNegativeZero:ZB,extend:JB};function z1(e,r){var t="",n=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(t+='in "'+e.mark.name+'" '),t+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!r&&e.mark.snippet&&(t+=`
|
152
152
|
|
153
153
|
`+e.mark.snippet),n+" "+t):n}function ci(e,r){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=r,this.message=z1(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}ci.prototype=Object.create(Error.prototype);ci.prototype.constructor=ci;ci.prototype.toString=function(e){return this.name+": "+z1(this,e)};var ht=ci;function xl(e,r,t,n,i){var c="",a="",s=Math.floor(i/2)-1;return n-r>s&&(c=" ... ",r=n-s+c.length),t-n>s&&(a=" ...",t=n+s-a.length),{str:c+e.slice(r,t).replace(/\t/g,"\u2192")+a,pos:n-r+c.length}}function Al(e,r){return Ke.repeat(" ",r-e.length)+e}function QB(e,r){if(r=Object.create(r||null),!e.buffer)return null;r.maxLength||(r.maxLength=79),typeof r.indent!="number"&&(r.indent=1),typeof r.linesBefore!="number"&&(r.linesBefore=3),typeof r.linesAfter!="number"&&(r.linesAfter=2);for(var t=/\r?\n|\r|\0/g,n=[0],i=[],c,a=-1;c=t.exec(e.buffer);)i.push(c.index),n.push(c.index+c[0].length),e.position<=c.index&&a<0&&(a=n.length-2);a<0&&(a=n.length-1);var s="",o,f,l=Math.min(e.line+r.linesAfter,i.length).toString().length,h=r.maxLength-(r.indent+l+3);for(o=1;o<=r.linesBefore&&!(a-o<0);o++)f=xl(e.buffer,n[a-o],i[a-o],e.position-(n[a]-n[a-o]),h),s=Ke.repeat(" ",r.indent)+Al((e.line-o+1).toString(),l)+" | "+f.str+`
|
@@ -179,9 +179,9 @@ ${o.message}`:S,m=[v,a,c].filter(Boolean).join(`
|
|
179
179
|
`+e.slice(i,c),i=c+1),a=s;return o+=`
|
180
180
|
`,e.length-i>r&&a>i?o+=e.slice(i,a)+`
|
181
181
|
`+e.slice(a+1):o+=e.slice(i),o.slice(1)}function rI(e){for(var r="",t=0,n,i=0;i<e.length;t>=65536?i+=2:i++)t=li(e,i),n=st[t],!n&&pi(t)?(r+=e[i],t>=65536&&(r+=e[i+1])):r+=n||VL(t);return r}function nI(e,r,t){var n="",i=e.tag,c,a,s;for(c=0,a=t.length;c<a;c+=1)s=t[c],e.replacer&&(s=e.replacer.call(t,String(c),s)),(Yt(e,r,s,!1,!1)||typeof s>"u"&&Yt(e,r,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=i,e.dump="["+n+"]"}function I1(e,r,t,n){var i="",c=e.tag,a,s,o;for(a=0,s=t.length;a<s;a+=1)o=t[a],e.replacer&&(o=e.replacer.call(t,String(a),o)),(Yt(e,r+1,o,!0,!0,!1,!0)||typeof o>"u"&&Yt(e,r+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=Rl(e,r)),e.dump&&hi===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=c,e.dump=i||"[]"}function iI(e,r,t){var n="",i=e.tag,c=Object.keys(t),a,s,o,f,l;for(a=0,s=c.length;a<s;a+=1)l="",n!==""&&(l+=", "),e.condenseFlow&&(l+='"'),o=c[a],f=t[o],e.replacer&&(f=e.replacer.call(t,o,f)),Yt(e,r,o,!1,!1)&&(e.dump.length>1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Yt(e,r,f,!1,!1)&&(l+=e.dump,n+=l));e.tag=i,e.dump="{"+n+"}"}function sI(e,r,t,n){var i="",c=e.tag,a=Object.keys(t),s,o,f,l,h,u;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new ht("sortKeys must be a boolean or a function");for(s=0,o=a.length;s<o;s+=1)u="",(!n||i!=="")&&(u+=Rl(e,r)),f=a[s],l=t[f],e.replacer&&(l=e.replacer.call(t,f,l)),Yt(e,r+1,f,!0,!0,!0)&&(h=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,h&&(e.dump&&hi===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,h&&(u+=Rl(e,r)),Yt(e,r+1,l,!0,h)&&(e.dump&&hi===e.dump.charCodeAt(0)?u+=":":u+=": ",u+=e.dump,i+=u));e.tag=c,e.dump=i||"{}"}function M1(e,r,t){var n,i,c,a,s,o;for(i=t?e.explicitTypes:e.implicitTypes,c=0,a=i.length;c<a;c+=1)if(s=i[c],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof r=="object"&&r instanceof s.instanceOf)&&(!s.predicate||s.predicate(r))){if(t?s.multi&&s.representName?e.tag=s.representName(r):e.tag=s.tag:e.tag="?",s.represent){if(o=e.styleMap[s.tag]||s.defaultStyle,sy.call(s.represent)==="[object Function]")n=s.represent(r,o);else if(oy.call(s.represent,o))n=s.represent[o](r,o);else throw new ht("!<"+s.tag+'> tag resolver accepts not "'+o+'" style');e.dump=n}return!0}return!1}function Yt(e,r,t,n,i,c,a){e.tag=null,e.dump=t,M1(e,t,!1)||M1(e,t,!0);var s=sy.call(e.dump),o=n,f;n&&(n=e.flowLevel<0||e.flowLevel>r);var l=s==="[object Object]"||s==="[object Array]",h,u;if(l&&(h=e.duplicates.indexOf(t),u=h!==-1),(e.tag!==null&&e.tag!=="?"||u||e.indent!==2&&r>0)&&(i=!1),u&&e.usedDuplicates[h])e.dump="*ref_"+h;else{if(l&&u&&!e.usedDuplicates[h]&&(e.usedDuplicates[h]=!0),s==="[object Object]")n&&Object.keys(e.dump).length!==0?(sI(e,r,e.dump,i),u&&(e.dump="&ref_"+h+e.dump)):(iI(e,r,e.dump),u&&(e.dump="&ref_"+h+" "+e.dump));else if(s==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!a&&r>0?I1(e,r-1,e.dump,i):I1(e,r,e.dump,i),u&&(e.dump="&ref_"+h+e.dump)):(nI(e,r,e.dump),u&&(e.dump="&ref_"+h+" "+e.dump));else if(s==="[object String]")e.tag!=="?"&&eI(e,e.dump,r,c,o);else{if(s==="[object Undefined]"||e.skipInvalid)return!1;throw new ht("unacceptable kind of an object to dump "+s)}e.tag!==null&&e.tag!=="?"&&(f=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?f="!"+f:f.slice(0,18)==="tag:yaml.org,2002:"?f="!!"+f.slice(18):f="!<"+f+">",e.dump=f+" "+e.dump)}return!0}function oI(e,r){var t=[],n=[],i,c;for(Tl(e,t,n),i=0,c=n.length;i<c;i+=1)r.duplicates.push(t[n[i]]);r.usedDuplicates=new Array(c)}function Tl(e,r,t){var n,i,c;if(e!==null&&typeof e=="object")if(i=r.indexOf(e),i!==-1)t.indexOf(i)===-1&&t.push(i);else if(r.push(e),Array.isArray(e))for(i=0,c=e.length;i<c;i+=1)Tl(e[i],r,t);else for(n=Object.keys(e),i=0,c=n.length;i<c;i+=1)Tl(e[n[i]],r,t)}function aI(e,r){r=r||{};var t=new YL(r);t.noRefs||oI(e,t);var n=e;return t.replacer&&(n=t.replacer.call({"":n},"",n)),Yt(t,0,n,!0,!0)?t.dump+`
|
182
|
-
`:""}var uI=aI,lI={dump:uI};function Gl(e,r){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+r+" instead, which is now safe by default.")}}var
|
182
|
+
`:""}var uI=aI,lI={dump:uI};function Gl(e,r){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+r+" instead, which is now safe by default.")}}var A7=iy.load,C7=iy.loadAll,k7=lI.dump;var D7=Gl("safeLoad","load"),R7=Gl("safeLoadAll","loadAll"),O7=Gl("safeDump","dump");var T7=je(HB());function cI(e,r="latest"){switch(e){case"yarn":return`yarn global add turbo@${r}`;case"npm":return`npm install turbo@${r} --global`;case"pnpm":return`pnpm add turbo@${r} --global`}}function hI({packageManager:e,packageManagerVersion:r,installType:t,isUsingWorkspaces:n,to:i="latest"}){let c=a=>a.filter(Boolean).join(" ");switch(e){case"yarn":return(0,gy.gte)(r,"2.0.0")?c(["yarn","add",`turbo@${i}`,t==="devDependencies"&&"--dev"]):c(["yarn","add",`turbo@${i}`,t==="devDependencies"&&"--dev",n&&"-W"]);case"npm":return c(["npm","install",`turbo@${i}`,t==="devDependencies"&&"--save-dev"]);case"pnpm":return c(["pnpm","add",`turbo@${i}`,t==="devDependencies"&&"--save-dev",n&&"-w"])}}function fI({root:e}){let r=yy.default.join(e,"package.json");if(!Ul.default.existsSync(r)){console.error(`Unable to find package.json at ${r}`);return}let t=Ul.default.readJsonSync(r),n=t.devDependencies&&"turbo"in t.devDependencies,i=t.dependencies&&"turbo"in t.dependencies;if(i||n)return i?"dependencies":"devDependencies"}async function Wl({project:e,to:r}){let t=Ct("turbo bin",{cwd:e.paths.root,stdio:"pipe"}),n=await _l(),i=Object.keys(n).find(c=>{let a=n[c];return a&&t?t.includes(a):!1});if(t&&i)return cI(i,r);{let{packageManager:c}=e,a=e.workspaceData.globs.length>0,s=fI({root:e.paths.root}),f=(await vl())[c];if(c&&f&&s)return hI({packageManager:c,packageManagerVersion:f,installType:s,isUsingWorkspaces:a,to:r})}}var gi=Pe(require("chalk"));var Xs=Pe(require("chalk")),Zs=require("diff"),di=Pe(require("fs-extra")),by=Pe(require("os")),zl=Pe(require("path")),mi=class{constructor(r){this.changes=[];if(this.filePath=r.filePath,this.rootPath=r.rootPath,this.after=r.after,this.error=r.error,r.before===void 0)try{zl.default.extname(r.filePath)===".json"?this.before=di.default.readJsonSync(r.filePath):this.before=di.default.readFileSync(r.filePath)}catch{this.before=""}else r.before===null?this.before="":this.before=r.before;r.after?typeof this.before=="object"||typeof r.after=="object"?this.changes=(0,Zs.diffJson)(this.before,r.after):this.changes=(0,Zs.diffLines)(this.before,r.after):this.changes=[]}fileName(){return zl.default.relative(this.rootPath,this.filePath)}write(){this.after&&(typeof this.after=="object"?di.default.writeJsonSync(this.filePath,this.after,{spaces:2}):di.default.writeFileSync(this.filePath,this.after))}additions(){return this.changes.filter(r=>r.added).length}deletions(){return this.changes.filter(r=>r.removed).length}hasChanges(){return this.additions()>0||this.deletions()>0}log(r){r.diff?(this.changes.forEach(t=>{t.added?process.stdout.write(Xs.default.green(t.value)):t.removed?process.stdout.write(Xs.default.red(t.value)):process.stdout.write(Xs.default.dim(t.value))}),console.log(by.default.EOL)):console.log(this.after)}};var kt=Pe(require("chalk")),yi=class{constructor(r){this.transform=r.transformer,this.dry=r.dry}modified(...r){console.log(kt.default.green(" MODIFIED "),...r,this.dry?kt.default.dim("(dry run)"):"")}unchanged(...r){console.log(kt.default.gray(" UNCHANGED "),...r,this.dry?kt.default.dim("(dry run)"):"")}skipped(...r){console.log(kt.default.yellow(" SKIPPED "),...r,this.dry?kt.default.dim("(dry run)"):"")}error(...r){console.log(kt.default.red(" ERROR "),...r,this.dry?kt.default.dim("(dry run)"):"")}info(...r){console.log(kt.default.bold(" INFO "),...r,this.dry?kt.default.dim("(dry run)"):"")}};var Vl=class{constructor(r){this.modifications={};this.transform=r.transformer,this.rootPath=r.rootPath,this.dry=r.dry,this.print=r.print,this.logger=new yi(r)}abortTransform(r){return this.logger.error(r.reason),{fatalError:new Error(r.reason),changes:r.changes||{}}}modifyFile(r){this.modifications[r.filePath]=new mi({rootPath:this.rootPath,...r})}finish(){let r={changes:{}};return Object.keys(this.modifications).forEach(n=>{let i=this.modifications[n],c={action:"unchanged",additions:i.additions(),deletions:i.deletions()};if(i.hasChanges()){if(this.dry)c.action="skipped",this.logger.skipped(gi.default.dim(i.fileName()));else try{i.write(),c.action="modified",this.logger.modified(gi.default.bold(i.fileName()))}catch(a){let s="Unknown error";a instanceof Error&&(s=a.message),c.error=new Error(s),c.action="error",this.logger.error(i.fileName(),s)}this.print&&i.log({diff:!0})}else this.logger.unchanged(gi.default.dim(i.fileName()));r.changes[i.fileName()]=c}),Object.keys(r.changes).some(n=>r.changes[n].action==="error")?this.abortTransform({reason:"Encountered an error while transforming files",changes:r.changes}):r}static logResults(r){let t=Object.keys(r.changes);if(console.log(),t.length>0){console.log(gi.default.bold("Results:"));let n={};t.forEach(i=>{var a;let c=r.changes[i];n[i]={action:c.action,additions:c.additions,deletions:c.deletions,error:((a=c.error)==null?void 0:a.message)||"None"}}),console.table(n),console.log()}}},bi=Vl;var vy=Pe(require("path")),_y=require("fs-extra"),pI=["package.json","turbo.json",".git"];function Kl({directory:e}){return pI.some(r=>(0,_y.existsSync)(vy.default.join(e,r)))}function wy({project:e}){try{let r={cwd:e.paths.root,stdio:"ignore"};if(Ct("turbo bin",r))Ct("turbo daemon stop",r);else{let n=`${e.packageManager} turbo daemon stop`;e.packageManager==="npm"&&(n="npm exec -c 'turbo daemon stop'"),Ct(n,r)}}catch{}}var Sy=require("child_process");function Dt({message:e,success:r}){return r?(console.log(Xe.default.bold(Xe.default.green("Migration completed"))),e&&console.log(e),process.exit(0)):(console.log(Xe.default.bold(Xe.default.red("Migration failed"))),e&&console.log(e),process.exit(1))}async function Js(e,r){r.dry||ri({directory:e,force:r.force});let t=await Ey.default.prompt([{type:"input",name:"directoryInput",message:"Where is the root of the repo to migrate?",when:!e,default:".",validate:d=>{let{exists:p,absolute:y}=Or({directory:d});return p?!0:`Directory ${Xe.default.dim(`(${y})`)} does not exist`},filter:d=>d.trim()}]),{directoryInput:n=e}=t,{exists:i,absolute:c}=Or({directory:n});if(!i)return Dt({success:!1,message:`Directory ${Xe.default.dim(`(${c})`)} does not exist`});if(!Kl({directory:c}))return Dt({success:!1,message:`Directory (${Xe.default.dim(c)}) does not appear to be a repository`});let a=await ei({root:c});if(!a)return Dt({success:!1,message:`Unable to read determine package manager details from ${Xe.default.dim(c)}`});let s=w2(a,r);if(!s)return Dt({success:!1,message:`Unable to infer the version of turbo being used by ${a.name}`});let o=r.to;try{o=await il(r)}catch(d){let p="UNKNOWN_ERROR";return d instanceof Error&&(p=d.message),Dt({success:!1,message:p})}if(!o)return Dt({success:!1,message:"Unable to fetch the latest version of turbo"});if(s===o)return Dt({success:!0,message:`Nothing to do, current version (${Xe.default.bold(s)}) is the same as the requested version (${Xe.default.bold(o)})`});let f=A2({fromVersion:s,toVersion:o});f.length===0&&console.log(`No codemods required to migrate from ${s} to ${o}`,An.default.EOL),r.dry||wy({project:a}),console.log(`Upgrading turbo from ${Xe.default.bold(s)} to ${Xe.default.bold(o)} (${f.length===0?"no codemods required":`${f.length} required codemod${f.length===1?"":"s"}`})`,An.default.EOL);let l=[];for(let[d,p]of f.entries()){console.log(`(${d+1}/${f.length}) ${Xe.default.bold(`Running ${p.name}`)}`);let y=await p.transformer({root:a.paths.root,options:r});bi.logResults(y),l.push(y)}if(l.some(d=>d.fatalError||Object.keys(d.changes).some(p=>d.changes[p].error)))return Dt({success:!1,message:"Could not complete migration due to codemod errors. Please fix the errors and try again."});let u=await Wl({project:a,to:r.to});if(!u)return Dt({success:!1,message:"Unable to determine upgrade command"});if(r.install)if(r.dry)console.log(`Upgrading turbo with ${Xe.default.bold(u)} ${Xe.default.dim("(dry run)")}`,An.default.EOL);else{console.log(`Upgrading turbo with ${Xe.default.bold(u)}`,An.default.EOL);try{(0,Sy.execSync)(u,{stdio:"pipe",cwd:a.paths.root})}catch(d){return Dt({success:!1,message:`Unable to upgrade turbo: ${d}`})}}else console.log(`Upgrade turbo with ${Xe.default.bold(u)}`,An.default.EOL);Dt({success:!0})}var yr=Pe(require("chalk")),xy=Pe(require("inquirer"));async function Qs(e,r,t){let n=ti();if(t.list)return console.log(n.map(u=>`- ${yr.default.cyan(u.name)}`).join(`
|
183
183
|
`)),process.exit(0);t.dry||ri({directory:r,force:t.force});let i=await xy.default.prompt([{type:"input",name:"directoryInput",message:"Where is the root of the repo where the transform should run?",when:!r,default:".",validate:u=>{let{exists:d,absolute:p}=Or({directory:u});return d?!0:`Directory ${yr.default.dim(`(${p})`)} does not exist`},filter:u=>u.trim()},{type:"list",name:"transformerInput",message:"Which transform would you like to apply?",when:!e,pageSize:n.length,choices:n.map(u=>({name:`${yr.default.bold(u.name)} - ${yr.default.gray(u.description)} ${yr.default.gray(`(${u.introducedIn})`)}`,value:u.name}))}]),{directoryInput:c=r,transformerInput:a=e}=i,{exists:s,absolute:o}=Or({directory:c});if(!s)return console.error(`Directory ${yr.default.dim(`(${o})`)} does not exist`),process.exit(1);let f=n.map(u=>u.name),l=n.find(u=>u.name===a);if(!l)return console.error(`Invalid transform choice ${yr.default.dim(`(${e})`)}, pick one of:`),console.error(f.map(u=>`- ${u}`).join(`
|
184
|
-
`)),process.exit(1);let h=await l.transformer({root:o,options:t});if(h.fatalError)return process.exit(1);bi.logResults(h)}var Yl=Pe(require("chalk")),Ay=Pe(require("update-check"));var eo={name:"@turbo/codemod",version:"1.10.13
|
184
|
+
`)),process.exit(1);let h=await l.transformer({root:o,options:t});if(h.fatalError)return process.exit(1);bi.logResults(h)}var Yl=Pe(require("chalk")),Ay=Pe(require("update-check"));var eo={name:"@turbo/codemod",version:"1.10.13",description:"Provides Codemod transformations to help upgrade your Turborepo codebase when a feature is deprecated.",homepage:"https://turbo.build/repo",license:"MPL-2.0",repository:{type:"git",url:"https://github.com/vercel/turbo",directory:"packages/turbo-codemod"},bugs:{url:"https://github.com/vercel/turbo/issues"},bin:"dist/cli.js",scripts:{build:"tsup",test:"jest",lint:"eslint src/**/*","check-types":"tsc --noEmit","add-transformer":"plop","lint:prettier":"prettier -c . --cache --ignore-path=../../.prettierignore"},dependencies:{axios:"0.27.2",chalk:"2.4.2",commander:"^9.5.0",diff:"^5.1.0","find-up":"4.1.0","fs-extra":"^10.0.0","gradient-string":"^2.0.0",inquirer:"^8.2.4","inquirer-file-tree-selection-prompt":"^1.0.19","is-git-clean":"^1.1.0",ora:"4.1.1",semver:"^7.3.7","update-check":"^1.5.4"},devDependencies:{"@turbo/eslint-config":"workspace:*","@turbo/gen":"workspace:*","@turbo/test-utils":"workspace:*","@turbo/tsconfig":"workspace:*","@turbo/types":"workspace:*","@turbo/utils":"workspace:*","@turbo/workspaces":"workspace:*","@types/chalk-animation":"^1.6.0","@types/diff":"^5.0.2","@types/fs-extra":"^9.0.13","@types/gradient-string":"^1.1.2","@types/inquirer":"^8.2.0","@types/jest":"^27.4.0","@types/node":"^18.17.2","@types/semver":"^7.3.9","@types/uuid":"^9.0.0",deepmerge:"^4.2.2",jest:"^27.4.3",plop:"^3.1.1",semver:"^7.3.5","ts-jest":"^27.1.1",tsup:"^6.7.0",typescript:"^4.5.5"},files:["dist"],publishConfig:{access:"public"}};var mI=(0,Ay.default)(eo).catch(()=>null);async function to(){try{let e=await mI;if(e!=null&&e.latest){let r=await ei({root:process.cwd()}),{packageManager:t}=r||{};console.log(),console.log(Yl.default.yellow.bold("A new version of `@turbo/codemod` is available!")),console.log("You can update by running: "+Yl.default.cyan(t==="yarn"?"yarn global add @turbo/codemod":t==="pnpm"?"pnpm i -g @turbo/codemod":"npm i -g @turbo/codemod")),console.log()}process.exit()}catch{}}var ro=new Cy.Command;ro.name("@turbo/codemod").description("Codemod transformations to help upgrade your Turborepo codebase when a feature is deprecated.").version(eo.version,"-v, --version","output the current version");ro.command("migrate").aliases(["update","upgrade"]).description("Migrate a project to the latest version of Turborepo").argument("[path]","Directory where the transforms should be applied").option("--from <version>","Specify the version to migrate from (default: current version)").option("--to <version>","Specify the version to migrate to (default: latest)").option("--install","Install new version of turbo after migration",!0).option("--force","Bypass Git safety checks and forcibly run codemods",!1).option("--dry","Dry run (no changes are made to files)",!1).option("--print","Print transformed files to your terminal",!1).action(Js);ro.command("transform",{isDefault:!0}).description("Apply a single code transformation to a project").argument("[transform]","The transformer to run").argument("[path]","Directory where the transforms should be applied").option("--force","Bypass Git safety checks and forcibly run codemods",!1).option("--list","List all available transforms",!1).option("--dry","Dry run (no changes are made to files)",!1).option("--print","Print transformed files to your terminal",!1).action(Qs);ro.parseAsync().then(to).catch(async e=>{console.log(),e.command?console.log(` ${Xl.default.cyan(e.command)} has failed.`):(console.log(Xl.default.red("Unexpected error. Please report it as a bug:")),console.log(e)),console.log(),await to(),process.exit(1)});
|
185
185
|
/*!
|
186
186
|
* fill-range <https://github.com/jonschlinkert/fill-range>
|
187
187
|
*
|