@dz-web/esboot-plugin-docs 3.1.2 → 3.1.6
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/execa-BVGTTV6Q.mjs +43 -0
- package/dist/index.js +35 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{a as v,b as d,c as
|
|
2
|
-
GFS4: `),console.error(e)});x[L]||(et=global[L]||[],rt(x,et),x.close=function(e){function r(t,n){return e.call(x,t,function(i){i||tt(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(r,Se,{value:e}),r}(x.close),x.closeSync=function(e){function r(t){e.apply(x,arguments),tt()}return Object.defineProperty(r,Se,{value:e}),r}(x.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){ee(x[L]),v("assert").equal(x[L].length,0)}));var et;global[L]||rt(global,x[L]);Te.exports=Ce(dn(x));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!x.__patched&&(Te.exports=Ce(x),x.__patched=!0);function Ce(e){yn(e),e.gracefulify=Ce,e.createReadStream=Je,e.createWriteStream=Ue;var r=e.readFile;e.readFile=t;function t(l,p,h){return typeof p=="function"&&(h=p,p=null),T(l,p,h);function T($,D,F,O){return r($,D,function(g){g&&(g.code==="EMFILE"||g.code==="ENFILE")?re([T,[$,D,F],g,O||Date.now(),Date.now()]):typeof F=="function"&&F.apply(this,arguments)})}}var n=e.writeFile;e.writeFile=i;function i(l,p,h,T){return typeof h=="function"&&(T=h,h=null),$(l,p,h,T);function $(D,F,O,g,N){return n(D,F,O,function(E){E&&(E.code==="EMFILE"||E.code==="ENFILE")?re([$,[D,F,O,g],E,N||Date.now(),Date.now()]):typeof g=="function"&&g.apply(this,arguments)})}}var o=e.appendFile;o&&(e.appendFile=c);function c(l,p,h,T){return typeof h=="function"&&(T=h,h=null),$(l,p,h,T);function $(D,F,O,g,N){return o(D,F,O,function(E){E&&(E.code==="EMFILE"||E.code==="ENFILE")?re([$,[D,F,O,g],E,N||Date.now(),Date.now()]):typeof g=="function"&&g.apply(this,arguments)})}}var u=e.copyFile;u&&(e.copyFile=q);function q(l,p,h,T){return typeof h=="function"&&(T=h,h=0),$(l,p,h,T);function $(D,F,O,g,N){return u(D,F,O,function(E){E&&(E.code==="EMFILE"||E.code==="ENFILE")?re([$,[D,F,O,g],E,N||Date.now(),Date.now()]):typeof g=="function"&&g.apply(this,arguments)})}}var j=e.readdir;e.readdir=m;var a=/^v[0-5]\./;function m(l,p,h){typeof p=="function"&&(h=p,p=null);var T=a.test(process.version)?function(F,O,g,N){return j(F,$(F,O,g,N))}:function(F,O,g,N){return j(F,O,$(F,O,g,N))};return T(l,p,h);function $(D,F,O,g){return function(N,E){N&&(N.code==="EMFILE"||N.code==="ENFILE")?re([T,[D,F,O],N,g||Date.now(),Date.now()]):(E&&E.sort&&E.sort(),typeof O=="function"&&O.call(this,N,E))}}}if(process.version.substr(0,4)==="v0.8"){var f=mn(e);P=f.ReadStream,R=f.WriteStream}var s=e.ReadStream;s&&(P.prototype=Object.create(s.prototype),P.prototype.open=J);var y=e.WriteStream;y&&(R.prototype=Object.create(y.prototype),R.prototype.open=ae),Object.defineProperty(e,"ReadStream",{get:function(){return P},set:function(l){P=l},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return R},set:function(l){R=l},enumerable:!0,configurable:!0});var k=P;Object.defineProperty(e,"FileReadStream",{get:function(){return k},set:function(l){k=l},enumerable:!0,configurable:!0});var S=R;Object.defineProperty(e,"FileWriteStream",{get:function(){return S},set:function(l){S=l},enumerable:!0,configurable:!0});function P(l,p){return this instanceof P?(s.apply(this,arguments),this):P.apply(Object.create(P.prototype),arguments)}function J(){var l=this;xe(l.path,l.flags,l.mode,function(p,h){p?(l.autoClose&&l.destroy(),l.emit("error",p)):(l.fd=h,l.emit("open",h),l.read())})}function R(l,p){return this instanceof R?(y.apply(this,arguments),this):R.apply(Object.create(R.prototype),arguments)}function ae(){var l=this;xe(l.path,l.flags,l.mode,function(p,h){p?(l.destroy(),l.emit("error",p)):(l.fd=h,l.emit("open",h))})}function Je(l,p){return new e.ReadStream(l,p)}function Ue(l,p){return new e.WriteStream(l,p)}var rn=e.open;e.open=xe;function xe(l,p,h,T){return typeof h=="function"&&(T=h,h=null),$(l,p,h,T);function $(D,F,O,g,N){return rn(D,F,O,function(E,wo){E&&(E.code==="EMFILE"||E.code==="ENFILE")?re([$,[D,F,O,g],E,N||Date.now(),Date.now()]):typeof g=="function"&&g.apply(this,arguments)})}}return e}function re(e){ee("ENQUEUE",e[0].name,e[1]),x[L].push(e),_e()}var we;function tt(){for(var e=Date.now(),r=0;r<x[L].length;++r)x[L][r].length>2&&(x[L][r][3]=e,x[L][r][4]=e);_e()}function _e(){if(clearTimeout(we),we=void 0,x[L].length!==0){var e=x[L].shift(),r=e[0],t=e[1],n=e[2],i=e[3],o=e[4];if(i===void 0)ee("RETRY",r.name,t),r.apply(null,t);else if(Date.now()-i>=6e4){ee("TIMEOUT",r.name,t);var c=t.pop();typeof c=="function"&&c.call(null,n)}else{var u=Date.now()-o,q=Math.max(o-i,1),j=Math.min(q*1.2,100);u>=j?(ee("RETRY",r.name,t),r.apply(null,t.concat([i]))):x[L].push(e)}we===void 0&&(we=setTimeout(_e,0))}}});var A=d(G=>{"use strict";var nt=C().fromCallback,W=ne(),pn=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter(e=>typeof W[e]=="function");Object.assign(G,W);pn.forEach(e=>{G[e]=nt(W[e])});G.exists=function(e,r){return typeof r=="function"?W.exists(e,r):new Promise(t=>W.exists(e,t))};G.read=function(e,r,t,n,i,o){return typeof o=="function"?W.read(e,r,t,n,i,o):new Promise((c,u)=>{W.read(e,r,t,n,i,(q,j,a)=>{if(q)return u(q);c({bytesRead:j,buffer:a})})})};G.write=function(e,r,...t){return typeof t[t.length-1]=="function"?W.write(e,r,...t):new Promise((n,i)=>{W.write(e,r,...t,(o,c,u)=>{if(o)return i(o);n({bytesWritten:c,buffer:u})})})};G.readv=function(e,r,...t){return typeof t[t.length-1]=="function"?W.readv(e,r,...t):new Promise((n,i)=>{W.readv(e,r,...t,(o,c,u)=>{if(o)return i(o);n({bytesRead:c,buffers:u})})})};G.writev=function(e,r,...t){return typeof t[t.length-1]=="function"?W.writev(e,r,...t):new Promise((n,i)=>{W.writev(e,r,...t,(o,c,u)=>{if(o)return i(o);n({bytesWritten:c,buffers:u})})})};typeof W.realpath.native=="function"?G.realpath.native=nt(W.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var ot=d((Do,it)=>{"use strict";var wn=v("path");it.exports.checkPath=function(r){if(process.platform==="win32"&&/[<>:"|?*]/.test(r.replace(wn.parse(r).root,""))){let n=new Error(`Path contains invalid characters: ${r}`);throw n.code="EINVAL",n}}});var ut=d((Co,$e)=>{"use strict";var ct=A(),{checkPath:at}=ot(),st=e=>{let r={mode:511};return typeof e=="number"?e:{...r,...e}.mode};$e.exports.makeDir=async(e,r)=>(at(e),ct.mkdir(e,{mode:st(r),recursive:!0}));$e.exports.makeDirSync=(e,r)=>(at(e),ct.mkdirSync(e,{mode:st(r),recursive:!0}))});var U=d((_o,lt)=>{"use strict";var Sn=C().fromPromise,{makeDir:vn,makeDirSync:Ne}=ut(),Le=Sn(vn);lt.exports={mkdirs:Le,mkdirsSync:Ne,mkdirp:Le,mkdirpSync:Ne,ensureDir:Le,ensureDirSync:Ne}});var H=d((To,yt)=>{"use strict";var gn=C().fromPromise,ft=A();function bn(e){return ft.access(e).then(()=>!0).catch(()=>!1)}yt.exports={pathExists:gn(bn),pathExistsSync:ft.existsSync}});var je=d(($o,mt)=>{"use strict";var ie=A(),kn=C().fromPromise;async function En(e,r,t){let n=await ie.open(e,"r+"),i=null;try{await ie.futimes(n,r,t)}finally{try{await ie.close(n)}catch(o){i=o}}if(i)throw i}function qn(e,r,t){let n=ie.openSync(e,"r+");return ie.futimesSync(n,r,t),ie.closeSync(n)}mt.exports={utimesMillis:kn(En),utimesMillisSync:qn}});var te=d((No,wt)=>{"use strict";var oe=A(),_=v("path"),dt=C().fromPromise;function Pn(e,r,t){let n=t.dereference?i=>oe.stat(i,{bigint:!0}):i=>oe.lstat(i,{bigint:!0});return Promise.all([n(e),n(r).catch(i=>{if(i.code==="ENOENT")return null;throw i})]).then(([i,o])=>({srcStat:i,destStat:o}))}function Fn(e,r,t){let n,i=t.dereference?c=>oe.statSync(c,{bigint:!0}):c=>oe.lstatSync(c,{bigint:!0}),o=i(e);try{n=i(r)}catch(c){if(c.code==="ENOENT")return{srcStat:o,destStat:null};throw c}return{srcStat:o,destStat:n}}async function xn(e,r,t,n){let{srcStat:i,destStat:o}=await Pn(e,r,n);if(o){if(se(i,o)){let c=_.basename(e),u=_.basename(r);if(t==="move"&&c!==u&&c.toLowerCase()===u.toLowerCase())return{srcStat:i,destStat:o,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!o.isDirectory())throw new Error(`Cannot overwrite non-directory '${r}' with directory '${e}'.`);if(!i.isDirectory()&&o.isDirectory())throw new Error(`Cannot overwrite directory '${r}' with non-directory '${e}'.`)}if(i.isDirectory()&&Ie(e,r))throw new Error(ve(e,r,t));return{srcStat:i,destStat:o}}function On(e,r,t,n){let{srcStat:i,destStat:o}=Fn(e,r,n);if(o){if(se(i,o)){let c=_.basename(e),u=_.basename(r);if(t==="move"&&c!==u&&c.toLowerCase()===u.toLowerCase())return{srcStat:i,destStat:o,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!o.isDirectory())throw new Error(`Cannot overwrite non-directory '${r}' with directory '${e}'.`);if(!i.isDirectory()&&o.isDirectory())throw new Error(`Cannot overwrite directory '${r}' with non-directory '${e}'.`)}if(i.isDirectory()&&Ie(e,r))throw new Error(ve(e,r,t));return{srcStat:i,destStat:o}}async function ht(e,r,t,n){let i=_.resolve(_.dirname(e)),o=_.resolve(_.dirname(t));if(o===i||o===_.parse(o).root)return;let c;try{c=await oe.stat(o,{bigint:!0})}catch(u){if(u.code==="ENOENT")return;throw u}if(se(r,c))throw new Error(ve(e,t,n));return ht(e,r,o,n)}function pt(e,r,t,n){let i=_.resolve(_.dirname(e)),o=_.resolve(_.dirname(t));if(o===i||o===_.parse(o).root)return;let c;try{c=oe.statSync(o,{bigint:!0})}catch(u){if(u.code==="ENOENT")return;throw u}if(se(r,c))throw new Error(ve(e,t,n));return pt(e,r,o,n)}function se(e,r){return r.ino&&r.dev&&r.ino===e.ino&&r.dev===e.dev}function Ie(e,r){let t=_.resolve(e).split(_.sep).filter(i=>i),n=_.resolve(r).split(_.sep).filter(i=>i);return t.every((i,o)=>n[o]===i)}function ve(e,r,t){return`Cannot ${t} '${e}' to a subdirectory of itself, '${r}'.`}wt.exports={checkPaths:dt(xn),checkPathsSync:On,checkParentPaths:dt(ht),checkParentPathsSync:pt,isSrcSubdir:Ie,areIdentical:se}});var kt=d((Lo,bt)=>{"use strict";var I=A(),ue=v("path"),{mkdirs:Dn}=U(),{pathExists:Cn}=H(),{utimesMillis:_n}=je(),le=te();async function Tn(e,r,t={}){typeof t=="function"&&(t={filter:t}),t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
1
|
+
import{a as v,b as d,c as Ge,d as cn}from"./chunk-QYQDHCOP.mjs";var C=d(De=>{"use strict";De.fromCallback=function(e){return Object.defineProperty(function(...r){if(typeof r[r.length-1]=="function")e.apply(this,r);else return new Promise((t,n)=>{r.push((i,o)=>i!=null?n(i):t(o)),e.apply(this,r)})},"name",{value:e.name})};De.fromPromise=function(e){return Object.defineProperty(function(...r){let t=r[r.length-1];if(typeof t!="function")return e.apply(this,r);r.pop(),e.apply(this,r).then(n=>t(null,n),t)},"name",{value:e.name})}});var He=d((Fo,Ke)=>{"use strict";var K=v("constants"),an=process.cwd,pe=null,un=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return pe||(pe=an.call(process)),pe};try{process.cwd()}catch{}typeof process.chdir=="function"&&(_e=process.chdir,process.chdir=function(e){pe=null,_e.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,_e));var _e;Ke.exports=fn;function fn(e){K.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&r(e),e.lutimes||t(e),e.chown=o(e.chown),e.fchown=o(e.fchown),e.lchown=o(e.lchown),e.chmod=n(e.chmod),e.fchmod=n(e.fchmod),e.lchmod=n(e.lchmod),e.chownSync=c(e.chownSync),e.fchownSync=c(e.fchownSync),e.lchownSync=c(e.lchownSync),e.chmodSync=i(e.chmodSync),e.fchmodSync=i(e.fchmodSync),e.lchmodSync=i(e.lchmodSync),e.stat=a(e.stat),e.fstat=a(e.fstat),e.lstat=a(e.lstat),e.statSync=O(e.statSync),e.fstatSync=O(e.fstatSync),e.lstatSync=O(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(s,y,l){l&&process.nextTick(l)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(s,y,l,u){u&&process.nextTick(u)},e.lchownSync=function(){}),un==="win32"&&(e.rename=typeof e.rename!="function"?e.rename:(function(s){function y(l,u,m){var E=Date.now(),S=0;s(l,u,function x(J){if(J&&(J.code==="EACCES"||J.code==="EPERM"||J.code==="EBUSY")&&Date.now()-E<6e4){setTimeout(function(){e.stat(u,function(j,ae){j&&j.code==="ENOENT"?s(l,u,x):m(J)})},S),S<100&&(S+=10);return}m&&m(J)})}return Object.setPrototypeOf&&Object.setPrototypeOf(y,s),y})(e.rename)),e.read=typeof e.read!="function"?e.read:(function(s){function y(l,u,m,E,S,x){var J;if(x&&typeof x=="function"){var j=0;J=function(ae,Be,Ye){if(ae&&ae.code==="EAGAIN"&&j<10)return j++,s.call(e,l,u,m,E,S,J);x.apply(this,arguments)}}return s.call(e,l,u,m,E,S,J)}return Object.setPrototypeOf&&Object.setPrototypeOf(y,s),y})(e.read),e.readSync=typeof e.readSync!="function"?e.readSync:(function(s){return function(y,l,u,m,E){for(var S=0;;)try{return s.call(e,y,l,u,m,E)}catch(x){if(x.code==="EAGAIN"&&S<10){S++;continue}throw x}}})(e.readSync);function r(s){s.lchmod=function(y,l,u){s.open(y,K.O_WRONLY|K.O_SYMLINK,l,function(m,E){if(m){u&&u(m);return}s.fchmod(E,l,function(S){s.close(E,function(x){u&&u(S||x)})})})},s.lchmodSync=function(y,l){var u=s.openSync(y,K.O_WRONLY|K.O_SYMLINK,l),m=!0,E;try{E=s.fchmodSync(u,l),m=!1}finally{if(m)try{s.closeSync(u)}catch{}else s.closeSync(u)}return E}}function t(s){K.hasOwnProperty("O_SYMLINK")&&s.futimes?(s.lutimes=function(y,l,u,m){s.open(y,K.O_SYMLINK,function(E,S){if(E){m&&m(E);return}s.futimes(S,l,u,function(x){s.close(S,function(J){m&&m(x||J)})})})},s.lutimesSync=function(y,l,u){var m=s.openSync(y,K.O_SYMLINK),E,S=!0;try{E=s.futimesSync(m,l,u),S=!1}finally{if(S)try{s.closeSync(m)}catch{}else s.closeSync(m)}return E}):s.futimes&&(s.lutimes=function(y,l,u,m){m&&process.nextTick(m)},s.lutimesSync=function(){})}function n(s){return s&&function(y,l,u){return s.call(e,y,l,function(m){D(m)&&(m=null),u&&u.apply(this,arguments)})}}function i(s){return s&&function(y,l){try{return s.call(e,y,l)}catch(u){if(!D(u))throw u}}}function o(s){return s&&function(y,l,u,m){return s.call(e,y,l,u,function(E){D(E)&&(E=null),m&&m.apply(this,arguments)})}}function c(s){return s&&function(y,l,u){try{return s.call(e,y,l,u)}catch(m){if(!D(m))throw m}}}function a(s){return s&&function(y,l,u){typeof l=="function"&&(u=l,l=null);function m(E,S){S&&(S.uid<0&&(S.uid+=4294967296),S.gid<0&&(S.gid+=4294967296)),u&&u.apply(this,arguments)}return l?s.call(e,y,l,m):s.call(e,y,m)}}function O(s){return s&&function(y,l){var u=l?s.call(e,y,l):s.call(e,y);return u&&(u.uid<0&&(u.uid+=4294967296),u.gid<0&&(u.gid+=4294967296)),u}}function D(s){if(!s||s.code==="ENOSYS")return!0;var y=!process.getuid||process.getuid()!==0;return!!(y&&(s.code==="EINVAL"||s.code==="EPERM"))}}});var Xe=d((Oo,Qe)=>{"use strict";var ze=v("stream").Stream;Qe.exports=ln;function ln(e){return{ReadStream:r,WriteStream:t};function r(n,i){if(!(this instanceof r))return new r(n,i);ze.call(this);var o=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var c=Object.keys(i),a=0,O=c.length;a<O;a++){var D=c[a];this[D]=i[D]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){o._read()});return}e.open(this.path,this.flags,this.mode,function(s,y){if(s){o.emit("error",s),o.readable=!1;return}o.fd=y,o.emit("open",y),o._read()})}function t(n,i){if(!(this instanceof t))return new t(n,i);ze.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),c=0,a=o.length;c<a;c++){var O=o[c];this[O]=i[O]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}});var et=d((Do,Ze)=>{"use strict";Ze.exports=yn;var mn=Object.getPrototypeOf||function(e){return e.__proto__};function yn(e){if(e===null||typeof e!="object")return e;if(e instanceof Object)var r={__proto__:mn(e)};else var r=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(e,t))}),r}});var ie=d((_o,Ie)=>{"use strict";var q=v("fs"),dn=He(),hn=Xe(),pn=et(),we=v("util"),L,ve;typeof Symbol=="function"&&typeof Symbol.for=="function"?(L=Symbol.for("graceful-fs.queue"),ve=Symbol.for("graceful-fs.previous")):(L="___graceful-fs.queue",ve="___graceful-fs.previous");function wn(){}function nt(e,r){Object.defineProperty(e,L,{get:function(){return r}})}var te=wn;we.debuglog?te=we.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(te=function(){var e=we.format.apply(we,arguments);e="GFS4: "+e.split(/\n/).join(`
|
|
2
|
+
GFS4: `),console.error(e)});q[L]||(tt=global[L]||[],nt(q,tt),q.close=(function(e){function r(t,n){return e.call(q,t,function(i){i||rt(),typeof n=="function"&&n.apply(this,arguments)})}return Object.defineProperty(r,ve,{value:e}),r})(q.close),q.closeSync=(function(e){function r(t){e.apply(q,arguments),rt()}return Object.defineProperty(r,ve,{value:e}),r})(q.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){te(q[L]),v("assert").equal(q[L].length,0)}));var tt;global[L]||nt(global,q[L]);Ie.exports=Ce(pn(q));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!q.__patched&&(Ie.exports=Ce(q),q.__patched=!0);function Ce(e){dn(e),e.gracefulify=Ce,e.createReadStream=Be,e.createWriteStream=Ye;var r=e.readFile;e.readFile=t;function t(f,p,h){return typeof p=="function"&&(h=p,p=null),I(f,p,h);function I(N,_,P,F){return r(N,_,function(g){g&&(g.code==="EMFILE"||g.code==="ENFILE")?ne([I,[N,_,P],g,F||Date.now(),Date.now()]):typeof P=="function"&&P.apply(this,arguments)})}}var n=e.writeFile;e.writeFile=i;function i(f,p,h,I){return typeof h=="function"&&(I=h,h=null),N(f,p,h,I);function N(_,P,F,g,$){return n(_,P,F,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?ne([N,[_,P,F,g],k,$||Date.now(),Date.now()]):typeof g=="function"&&g.apply(this,arguments)})}}var o=e.appendFile;o&&(e.appendFile=c);function c(f,p,h,I){return typeof h=="function"&&(I=h,h=null),N(f,p,h,I);function N(_,P,F,g,$){return o(_,P,F,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?ne([N,[_,P,F,g],k,$||Date.now(),Date.now()]):typeof g=="function"&&g.apply(this,arguments)})}}var a=e.copyFile;a&&(e.copyFile=O);function O(f,p,h,I){return typeof h=="function"&&(I=h,h=0),N(f,p,h,I);function N(_,P,F,g,$){return a(_,P,F,function(k){k&&(k.code==="EMFILE"||k.code==="ENFILE")?ne([N,[_,P,F,g],k,$||Date.now(),Date.now()]):typeof g=="function"&&g.apply(this,arguments)})}}var D=e.readdir;e.readdir=y;var s=/^v[0-5]\./;function y(f,p,h){typeof p=="function"&&(h=p,p=null);var I=s.test(process.version)?function(P,F,g,$){return D(P,N(P,F,g,$))}:function(P,F,g,$){return D(P,F,N(P,F,g,$))};return I(f,p,h);function N(_,P,F,g){return function($,k){$&&($.code==="EMFILE"||$.code==="ENFILE")?ne([I,[_,P,F],$,g||Date.now(),Date.now()]):(k&&k.sort&&k.sort(),typeof F=="function"&&F.call(this,$,k))}}}if(process.version.substr(0,4)==="v0.8"){var l=hn(e);x=l.ReadStream,j=l.WriteStream}var u=e.ReadStream;u&&(x.prototype=Object.create(u.prototype),x.prototype.open=J);var m=e.WriteStream;m&&(j.prototype=Object.create(m.prototype),j.prototype.open=ae),Object.defineProperty(e,"ReadStream",{get:function(){return x},set:function(f){x=f},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return j},set:function(f){j=f},enumerable:!0,configurable:!0});var E=x;Object.defineProperty(e,"FileReadStream",{get:function(){return E},set:function(f){E=f},enumerable:!0,configurable:!0});var S=j;Object.defineProperty(e,"FileWriteStream",{get:function(){return S},set:function(f){S=f},enumerable:!0,configurable:!0});function x(f,p){return this instanceof x?(u.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function J(){var f=this;Oe(f.path,f.flags,f.mode,function(p,h){p?(f.autoClose&&f.destroy(),f.emit("error",p)):(f.fd=h,f.emit("open",h),f.read())})}function j(f,p){return this instanceof j?(m.apply(this,arguments),this):j.apply(Object.create(j.prototype),arguments)}function ae(){var f=this;Oe(f.path,f.flags,f.mode,function(p,h){p?(f.destroy(),f.emit("error",p)):(f.fd=h,f.emit("open",h))})}function Be(f,p){return new e.ReadStream(f,p)}function Ye(f,p){return new e.WriteStream(f,p)}var on=e.open;e.open=Oe;function Oe(f,p,h,I){return typeof h=="function"&&(I=h,h=null),N(f,p,h,I);function N(_,P,F,g,$){return on(_,P,F,function(k,go){k&&(k.code==="EMFILE"||k.code==="ENFILE")?ne([N,[_,P,F,g],k,$||Date.now(),Date.now()]):typeof g=="function"&&g.apply(this,arguments)})}}return e}function ne(e){te("ENQUEUE",e[0].name,e[1]),q[L].push(e),Te()}var Se;function rt(){for(var e=Date.now(),r=0;r<q[L].length;++r)q[L][r].length>2&&(q[L][r][3]=e,q[L][r][4]=e);Te()}function Te(){if(clearTimeout(Se),Se=void 0,q[L].length!==0){var e=q[L].shift(),r=e[0],t=e[1],n=e[2],i=e[3],o=e[4];if(i===void 0)te("RETRY",r.name,t),r.apply(null,t);else if(Date.now()-i>=6e4){te("TIMEOUT",r.name,t);var c=t.pop();typeof c=="function"&&c.call(null,n)}else{var a=Date.now()-o,O=Math.max(o-i,1),D=Math.min(O*1.2,100);a>=D?(te("RETRY",r.name,t),r.apply(null,t.concat([i]))):q[L].push(e)}Se===void 0&&(Se=setTimeout(Te,0))}}});var M=d(G=>{"use strict";var it=C().fromCallback,A=ie(),Sn=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter(e=>typeof A[e]=="function");Object.assign(G,A);Sn.forEach(e=>{G[e]=it(A[e])});G.exists=function(e,r){return typeof r=="function"?A.exists(e,r):new Promise(t=>A.exists(e,t))};G.read=function(e,r,t,n,i,o){return typeof o=="function"?A.read(e,r,t,n,i,o):new Promise((c,a)=>{A.read(e,r,t,n,i,(O,D,s)=>{if(O)return a(O);c({bytesRead:D,buffer:s})})})};G.write=function(e,r,...t){return typeof t[t.length-1]=="function"?A.write(e,r,...t):new Promise((n,i)=>{A.write(e,r,...t,(o,c,a)=>{if(o)return i(o);n({bytesWritten:c,buffer:a})})})};G.readv=function(e,r,...t){return typeof t[t.length-1]=="function"?A.readv(e,r,...t):new Promise((n,i)=>{A.readv(e,r,...t,(o,c,a)=>{if(o)return i(o);n({bytesRead:c,buffers:a})})})};G.writev=function(e,r,...t){return typeof t[t.length-1]=="function"?A.writev(e,r,...t):new Promise((n,i)=>{A.writev(e,r,...t,(o,c,a)=>{if(o)return i(o);n({bytesWritten:c,buffers:a})})})};typeof A.realpath.native=="function"?G.realpath.native=it(A.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var ct=d((To,ot)=>{"use strict";var vn=v("path");ot.exports.checkPath=function(r){if(process.platform==="win32"&&/[<>:"|?*]/.test(r.replace(vn.parse(r).root,""))){let n=new Error(`Path contains invalid characters: ${r}`);throw n.code="EINVAL",n}}});var ft=d((Io,Ne)=>{"use strict";var st=M(),{checkPath:at}=ct(),ut=e=>{let r={mode:511};return typeof e=="number"?e:{...r,...e}.mode};Ne.exports.makeDir=async(e,r)=>(at(e),st.mkdir(e,{mode:ut(r),recursive:!0}));Ne.exports.makeDirSync=(e,r)=>(at(e),st.mkdirSync(e,{mode:ut(r),recursive:!0}))});var Y=d((No,lt)=>{"use strict";var gn=C().fromPromise,{makeDir:bn,makeDirSync:$e}=ft(),Le=gn(bn);lt.exports={mkdirs:Le,mkdirsSync:$e,mkdirp:Le,mkdirpSync:$e,ensureDir:Le,ensureDirSync:$e}});var H=d(($o,yt)=>{"use strict";var En=C().fromPromise,mt=M();function kn(e){return mt.access(e).then(()=>!0).catch(()=>!1)}yt.exports={pathExists:En(kn),pathExistsSync:mt.existsSync}});var Re=d((Lo,dt)=>{"use strict";var oe=M(),xn=C().fromPromise;async function Pn(e,r,t){let n=await oe.open(e,"r+"),i=null;try{await oe.futimes(n,r,t)}catch(o){i=o}finally{try{await oe.close(n)}catch(o){i||(i=o)}}if(i)throw i}function qn(e,r,t){let n=oe.openSync(e,"r+"),i=null;try{oe.futimesSync(n,r,t)}catch(o){i=o}finally{try{oe.closeSync(n)}catch(o){i||(i=o)}}if(i)throw i}dt.exports={utimesMillis:xn(Pn),utimesMillisSync:qn}});var re=d((Ro,St)=>{"use strict";var ce=M(),T=v("path"),ht=C().fromPromise;function Fn(e,r,t){let n=t.dereference?i=>ce.stat(i,{bigint:!0}):i=>ce.lstat(i,{bigint:!0});return Promise.all([n(e),n(r).catch(i=>{if(i.code==="ENOENT")return null;throw i})]).then(([i,o])=>({srcStat:i,destStat:o}))}function On(e,r,t){let n,i=t.dereference?c=>ce.statSync(c,{bigint:!0}):c=>ce.lstatSync(c,{bigint:!0}),o=i(e);try{n=i(r)}catch(c){if(c.code==="ENOENT")return{srcStat:o,destStat:null};throw c}return{srcStat:o,destStat:n}}async function Dn(e,r,t,n){let{srcStat:i,destStat:o}=await Fn(e,r,n);if(o){if(ue(i,o)){let c=T.basename(e),a=T.basename(r);if(t==="move"&&c!==a&&c.toLowerCase()===a.toLowerCase())return{srcStat:i,destStat:o,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!o.isDirectory())throw new Error(`Cannot overwrite non-directory '${r}' with directory '${e}'.`);if(!i.isDirectory()&&o.isDirectory())throw new Error(`Cannot overwrite directory '${r}' with non-directory '${e}'.`)}if(i.isDirectory()&&je(e,r))throw new Error(ge(e,r,t));return{srcStat:i,destStat:o}}function _n(e,r,t,n){let{srcStat:i,destStat:o}=On(e,r,n);if(o){if(ue(i,o)){let c=T.basename(e),a=T.basename(r);if(t==="move"&&c!==a&&c.toLowerCase()===a.toLowerCase())return{srcStat:i,destStat:o,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!o.isDirectory())throw new Error(`Cannot overwrite non-directory '${r}' with directory '${e}'.`);if(!i.isDirectory()&&o.isDirectory())throw new Error(`Cannot overwrite directory '${r}' with non-directory '${e}'.`)}if(i.isDirectory()&&je(e,r))throw new Error(ge(e,r,t));return{srcStat:i,destStat:o}}async function pt(e,r,t,n){let i=T.resolve(T.dirname(e)),o=T.resolve(T.dirname(t));if(o===i||o===T.parse(o).root)return;let c;try{c=await ce.stat(o,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(ue(r,c))throw new Error(ge(e,t,n));return pt(e,r,o,n)}function wt(e,r,t,n){let i=T.resolve(T.dirname(e)),o=T.resolve(T.dirname(t));if(o===i||o===T.parse(o).root)return;let c;try{c=ce.statSync(o,{bigint:!0})}catch(a){if(a.code==="ENOENT")return;throw a}if(ue(r,c))throw new Error(ge(e,t,n));return wt(e,r,o,n)}function ue(e,r){return r.ino!==void 0&&r.dev!==void 0&&r.ino===e.ino&&r.dev===e.dev}function je(e,r){let t=T.resolve(e).split(T.sep).filter(i=>i),n=T.resolve(r).split(T.sep).filter(i=>i);return t.every((i,o)=>n[o]===i)}function ge(e,r,t){return`Cannot ${t} '${e}' to a subdirectory of itself, '${r}'.`}St.exports={checkPaths:ht(Dn),checkPathsSync:_n,checkParentPaths:ht(pt),checkParentPathsSync:wt,isSrcSubdir:je,areIdentical:ue}});var gt=d((jo,vt)=>{"use strict";async function Cn(e,r){let t=[];for await(let n of e)t.push(r(n).then(()=>null,i=>i??new Error("unknown error")));await Promise.all(t.map(n=>n.then(i=>{if(i!==null)throw i})))}vt.exports={asyncIteratorConcurrentProcess:Cn}});var Pt=d((Ao,xt)=>{"use strict";var R=M(),fe=v("path"),{mkdirs:Tn}=Y(),{pathExists:In}=H(),{utimesMillis:Nn}=Re(),le=re(),{asyncIteratorConcurrentProcess:$n}=gt();async function Ln(e,r,t={}){typeof t=="function"&&(t={filter:t}),t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
3
3
|
|
|
4
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:n,destStat:i}=await le.checkPaths(e,r,"copy",t);if(await le.checkParentPaths(e,n,r,"copy"),!await
|
|
4
|
+
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:n,destStat:i}=await le.checkPaths(e,r,"copy",t);if(await le.checkParentPaths(e,n,r,"copy"),!await Et(e,r,t))return;let c=fe.dirname(r);await In(c)||await Tn(c),await kt(i,e,r,t)}async function Et(e,r,t){return t.filter?t.filter(e,r):!0}async function kt(e,r,t,n){let o=await(n.dereference?R.stat:R.lstat)(r);if(o.isDirectory())return Mn(o,e,r,t,n);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return Rn(o,e,r,t,n);if(o.isSymbolicLink())return Wn(e,r,t,n);throw o.isSocket()?new Error(`Cannot copy a socket file: ${r}`):o.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${r}`):new Error(`Unknown file: ${r}`)}async function Rn(e,r,t,n,i){if(!r)return bt(e,t,n,i);if(i.overwrite)return await R.unlink(n),bt(e,t,n,i);if(i.errorOnExist)throw new Error(`'${n}' already exists`)}async function bt(e,r,t,n){if(await R.copyFile(r,t),n.preserveTimestamps){jn(e.mode)&&await An(t,e.mode);let i=await R.stat(r);await Nn(t,i.atime,i.mtime)}return R.chmod(t,e.mode)}function jn(e){return(e&128)===0}function An(e,r){return R.chmod(e,r|128)}async function Mn(e,r,t,n,i){r||await R.mkdir(n),await $n(await R.opendir(t),async o=>{let c=fe.join(t,o.name),a=fe.join(n,o.name);if(await Et(c,a,i)){let{destStat:D}=await le.checkPaths(c,a,"copy",i);await kt(D,c,a,i)}}),r||await R.chmod(n,e.mode)}async function Wn(e,r,t,n){let i=await R.readlink(r);if(n.dereference&&(i=fe.resolve(process.cwd(),i)),!e)return R.symlink(i,t);let o=null;try{o=await R.readlink(t)}catch(c){if(c.code==="EINVAL"||c.code==="UNKNOWN")return R.symlink(i,t);throw c}if(n.dereference&&(o=fe.resolve(process.cwd(),o)),i!==o){if(le.isSrcSubdir(i,o))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${o}'.`);if(le.isSrcSubdir(o,i))throw new Error(`Cannot overwrite '${o}' with '${i}'.`)}return await R.unlink(t),R.symlink(i,t)}xt.exports=Ln});var _t=d((Mo,Dt)=>{"use strict";var W=ie(),me=v("path"),Un=Y().mkdirsSync,Jn=Re().utimesMillisSync,ye=re();function Bn(e,r,t){typeof t=="function"&&(t={filter:t}),t=t||{},t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
|
|
5
5
|
|
|
6
|
-
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:n,destStat:i}=ye.checkPathsSync(e,r,"copy",t);if(ye.checkParentPathsSync(e,n,r,"copy"),t.filter&&!t.filter(e,r))return;let o=
|
|
7
|
-
`,finalEOL:t=!0,replacer:n=null,spaces:i}={}){let o=t?r:""
|
|
6
|
+
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0002");let{srcStat:n,destStat:i}=ye.checkPathsSync(e,r,"copy",t);if(ye.checkParentPathsSync(e,n,r,"copy"),t.filter&&!t.filter(e,r))return;let o=me.dirname(r);return W.existsSync(o)||Un(o),qt(i,e,r,t)}function qt(e,r,t,n){let o=(n.dereference?W.statSync:W.lstatSync)(r);if(o.isDirectory())return Qn(o,e,r,t,n);if(o.isFile()||o.isCharacterDevice()||o.isBlockDevice())return Yn(o,e,r,t,n);if(o.isSymbolicLink())return ei(e,r,t,n);throw o.isSocket()?new Error(`Cannot copy a socket file: ${r}`):o.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${r}`):new Error(`Unknown file: ${r}`)}function Yn(e,r,t,n,i){return r?Gn(e,t,n,i):Ft(e,t,n,i)}function Gn(e,r,t,n){if(n.overwrite)return W.unlinkSync(t),Ft(e,r,t,n);if(n.errorOnExist)throw new Error(`'${t}' already exists`)}function Ft(e,r,t,n){return W.copyFileSync(r,t),n.preserveTimestamps&&Vn(e.mode,r,t),Ae(t,e.mode)}function Vn(e,r,t){return Kn(e)&&Hn(t,e),zn(r,t)}function Kn(e){return(e&128)===0}function Hn(e,r){return Ae(e,r|128)}function Ae(e,r){return W.chmodSync(e,r)}function zn(e,r){let t=W.statSync(e);return Jn(r,t.atime,t.mtime)}function Qn(e,r,t,n,i){return r?Ot(t,n,i):Xn(e.mode,t,n,i)}function Xn(e,r,t,n){return W.mkdirSync(t),Ot(r,t,n),Ae(t,e)}function Ot(e,r,t){let n=W.opendirSync(e);try{let i;for(;(i=n.readSync())!==null;)Zn(i.name,e,r,t)}finally{n.closeSync()}}function Zn(e,r,t,n){let i=me.join(r,e),o=me.join(t,e);if(n.filter&&!n.filter(i,o))return;let{destStat:c}=ye.checkPathsSync(i,o,"copy",n);return qt(c,i,o,n)}function ei(e,r,t,n){let i=W.readlinkSync(r);if(n.dereference&&(i=me.resolve(process.cwd(),i)),e){let o;try{o=W.readlinkSync(t)}catch(c){if(c.code==="EINVAL"||c.code==="UNKNOWN")return W.symlinkSync(i,t);throw c}if(n.dereference&&(o=me.resolve(process.cwd(),o)),i!==o){if(ye.isSrcSubdir(i,o))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${o}'.`);if(ye.isSrcSubdir(o,i))throw new Error(`Cannot overwrite '${o}' with '${i}'.`)}return ti(i,t)}else return W.symlinkSync(i,t)}function ti(e,r){return W.unlinkSync(r),W.symlinkSync(e,r)}Dt.exports=Bn});var be=d((Wo,Ct)=>{"use strict";var ri=C().fromPromise;Ct.exports={copy:ri(Pt()),copySync:_t()}});var de=d((Uo,It)=>{"use strict";var Tt=ie(),ni=C().fromCallback;function ii(e,r){Tt.rm(e,{recursive:!0,force:!0},r)}function oi(e){Tt.rmSync(e,{recursive:!0,force:!0})}It.exports={remove:ni(ii),removeSync:oi}});var Wt=d((Jo,Mt)=>{"use strict";var ci=C().fromPromise,Lt=M(),Rt=v("path"),jt=Y(),At=de(),Nt=ci(async function(r){let t;try{t=await Lt.readdir(r)}catch{return jt.mkdirs(r)}return Promise.all(t.map(n=>At.remove(Rt.join(r,n))))});function $t(e){let r;try{r=Lt.readdirSync(e)}catch{return jt.mkdirsSync(e)}r.forEach(t=>{t=Rt.join(e,t),At.removeSync(t)})}Mt.exports={emptyDirSync:$t,emptydirSync:$t,emptyDir:Nt,emptydir:Nt}});var Yt=d((Bo,Bt)=>{"use strict";var si=C().fromPromise,Ut=v("path"),V=M(),Jt=Y();async function ai(e){let r;try{r=await V.stat(e)}catch{}if(r&&r.isFile())return;let t=Ut.dirname(e),n=null;try{n=await V.stat(t)}catch(i){if(i.code==="ENOENT"){await Jt.mkdirs(t),await V.writeFile(e,"");return}else throw i}n.isDirectory()?await V.writeFile(e,""):await V.readdir(t)}function ui(e){let r;try{r=V.statSync(e)}catch{}if(r&&r.isFile())return;let t=Ut.dirname(e);try{V.statSync(t).isDirectory()||V.readdirSync(t)}catch(n){if(n&&n.code==="ENOENT")Jt.mkdirsSync(t);else throw n}V.writeFileSync(e,"")}Bt.exports={createFile:si(ai),createFileSync:ui}});var zt=d((Yo,Ht)=>{"use strict";var fi=C().fromPromise,Gt=v("path"),z=M(),Vt=Y(),{pathExists:li}=H(),{areIdentical:Kt}=re();async function mi(e,r){let t;try{t=await z.lstat(r,{bigint:!0})}catch{}let n;try{n=await z.lstat(e,{bigint:!0})}catch(c){throw c.message=c.message.replace("lstat","ensureLink"),c}if(t&&Kt(n,t))return;let i=Gt.dirname(r);await li(i)||await Vt.mkdirs(i),await z.link(e,r)}function yi(e,r){let t;try{t=z.lstatSync(r,{bigint:!0})}catch{}try{let o=z.lstatSync(e,{bigint:!0});if(t&&Kt(o,t))return}catch(o){throw o.message=o.message.replace("lstat","ensureLink"),o}let n=Gt.dirname(r);return z.existsSync(n)||Vt.mkdirsSync(n),z.linkSync(e,r)}Ht.exports={createLink:fi(mi),createLinkSync:yi}});var Xt=d((Go,Qt)=>{"use strict";var Q=v("path"),he=M(),{pathExists:di}=H(),hi=C().fromPromise;async function pi(e,r){if(Q.isAbsolute(e)){try{await he.lstat(e)}catch(o){throw o.message=o.message.replace("lstat","ensureSymlink"),o}return{toCwd:e,toDst:e}}let t=Q.dirname(r),n=Q.join(t,e);if(await di(n))return{toCwd:n,toDst:e};try{await he.lstat(e)}catch(o){throw o.message=o.message.replace("lstat","ensureSymlink"),o}return{toCwd:e,toDst:Q.relative(t,e)}}function wi(e,r){if(Q.isAbsolute(e)){if(!he.existsSync(e))throw new Error("absolute srcpath does not exist");return{toCwd:e,toDst:e}}let t=Q.dirname(r),n=Q.join(t,e);if(he.existsSync(n))return{toCwd:n,toDst:e};if(!he.existsSync(e))throw new Error("relative srcpath does not exist");return{toCwd:e,toDst:Q.relative(t,e)}}Qt.exports={symlinkPaths:hi(pi),symlinkPathsSync:wi}});var tr=d((Vo,er)=>{"use strict";var Zt=M(),Si=C().fromPromise;async function vi(e,r){if(r)return r;let t;try{t=await Zt.lstat(e)}catch{return"file"}return t&&t.isDirectory()?"dir":"file"}function gi(e,r){if(r)return r;let t;try{t=Zt.lstatSync(e)}catch{return"file"}return t&&t.isDirectory()?"dir":"file"}er.exports={symlinkType:Si(vi),symlinkTypeSync:gi}});var ir=d((Ko,nr)=>{"use strict";var bi=C().fromPromise,X=v("path"),B=M(),{mkdirs:Ei,mkdirsSync:ki}=Y(),{symlinkPaths:xi,symlinkPathsSync:Pi}=Xt(),{symlinkType:qi,symlinkTypeSync:Fi}=tr(),{pathExists:Oi}=H(),{areIdentical:rr}=re();async function Di(e,r,t){let n;try{n=await B.lstat(r)}catch{}if(n&&n.isSymbolicLink()){let a;if(X.isAbsolute(e))a=await B.stat(e,{bigint:!0});else{let D=X.dirname(r),s=X.join(D,e);try{a=await B.stat(s,{bigint:!0})}catch{a=await B.stat(e,{bigint:!0})}}let O=await B.stat(r,{bigint:!0});if(rr(a,O))return}let i=await xi(e,r);e=i.toDst;let o=await qi(i.toCwd,t),c=X.dirname(r);return await Oi(c)||await Ei(c),B.symlink(e,r,o)}function _i(e,r,t){let n;try{n=B.lstatSync(r)}catch{}if(n&&n.isSymbolicLink()){let a;if(X.isAbsolute(e))a=B.statSync(e,{bigint:!0});else{let D=X.dirname(r),s=X.join(D,e);try{a=B.statSync(s,{bigint:!0})}catch{a=B.statSync(e,{bigint:!0})}}let O=B.statSync(r,{bigint:!0});if(rr(a,O))return}let i=Pi(e,r);e=i.toDst,t=Fi(i.toCwd,t);let o=X.dirname(r);return B.existsSync(o)||ki(o),B.symlinkSync(e,r,t)}nr.exports={createSymlink:bi(Di),createSymlinkSync:_i}});var mr=d((Ho,lr)=>{"use strict";var{createFile:or,createFileSync:cr}=Yt(),{createLink:sr,createLinkSync:ar}=zt(),{createSymlink:ur,createSymlinkSync:fr}=ir();lr.exports={createFile:or,createFileSync:cr,ensureFile:or,ensureFileSync:cr,createLink:sr,createLinkSync:ar,ensureLink:sr,ensureLinkSync:ar,createSymlink:ur,createSymlinkSync:fr,ensureSymlink:ur,ensureSymlinkSync:fr}});var Ee=d((zo,yr)=>{"use strict";function Ci(e,{EOL:r=`
|
|
7
|
+
`,finalEOL:t=!0,replacer:n=null,spaces:i}={}){let o=t?r:"",c=JSON.stringify(e,n,i);if(c===void 0)throw new TypeError(`Converting ${typeof e} value to JSON is not supported`);return c.replace(/\n/g,r)+o}function Ti(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}yr.exports={stringify:Ci,stripBom:Ti}});var wr=d((Qo,pr)=>{"use strict";var se;try{se=ie()}catch{se=v("fs")}var ke=C(),{stringify:dr,stripBom:hr}=Ee();async function Ii(e,r={}){typeof r=="string"&&(r={encoding:r});let t=r.fs||se,n="throws"in r?r.throws:!0,i=await ke.fromCallback(t.readFile)(e,r);i=hr(i);let o;try{o=JSON.parse(i,r?r.reviver:null)}catch(c){if(n)throw c.message=`${e}: ${c.message}`,c;return null}return o}var Ni=ke.fromPromise(Ii);function $i(e,r={}){typeof r=="string"&&(r={encoding:r});let t=r.fs||se,n="throws"in r?r.throws:!0;try{let i=t.readFileSync(e,r);return i=hr(i),JSON.parse(i,r.reviver)}catch(i){if(n)throw i.message=`${e}: ${i.message}`,i;return null}}async function Li(e,r,t={}){let n=t.fs||se,i=dr(r,t);await ke.fromCallback(n.writeFile)(e,i,t)}var Ri=ke.fromPromise(Li);function ji(e,r,t={}){let n=t.fs||se,i=dr(r,t);return n.writeFileSync(e,i,t)}pr.exports={readFile:Ni,readFileSync:$i,writeFile:Ri,writeFileSync:ji}});var vr=d((Xo,Sr)=>{"use strict";var xe=wr();Sr.exports={readJson:xe.readFile,readJsonSync:xe.readFileSync,writeJson:xe.writeFile,writeJsonSync:xe.writeFileSync}});var Pe=d((Zo,Er)=>{"use strict";var Ai=C().fromPromise,Me=M(),gr=v("path"),br=Y(),Mi=H().pathExists;async function Wi(e,r,t="utf-8"){let n=gr.dirname(e);return await Mi(n)||await br.mkdirs(n),Me.writeFile(e,r,t)}function Ui(e,...r){let t=gr.dirname(e);Me.existsSync(t)||br.mkdirsSync(t),Me.writeFileSync(e,...r)}Er.exports={outputFile:Ai(Wi),outputFileSync:Ui}});var xr=d((ec,kr)=>{"use strict";var{stringify:Ji}=Ee(),{outputFile:Bi}=Pe();async function Yi(e,r,t={}){let n=Ji(r,t);await Bi(e,n,t)}kr.exports=Yi});var qr=d((tc,Pr)=>{"use strict";var{stringify:Gi}=Ee(),{outputFileSync:Vi}=Pe();function Ki(e,r,t){let n=Gi(r,t);Vi(e,n,t)}Pr.exports=Ki});var Or=d((rc,Fr)=>{"use strict";var Hi=C().fromPromise,U=vr();U.outputJson=Hi(xr());U.outputJsonSync=qr();U.outputJSON=U.outputJson;U.outputJSONSync=U.outputJsonSync;U.writeJSON=U.writeJson;U.writeJSONSync=U.writeJsonSync;U.readJSON=U.readJson;U.readJSONSync=U.readJsonSync;Fr.exports=U});var Ir=d((nc,Tr)=>{"use strict";var zi=M(),Dr=v("path"),{copy:Qi}=be(),{remove:Cr}=de(),{mkdirp:Xi}=Y(),{pathExists:Zi}=H(),_r=re();async function eo(e,r,t={}){let n=t.overwrite||t.clobber||!1,{srcStat:i,isChangingCase:o=!1}=await _r.checkPaths(e,r,"move",t);await _r.checkParentPaths(e,i,r,"move");let c=Dr.dirname(r);return Dr.parse(c).root!==c&&await Xi(c),to(e,r,n,o)}async function to(e,r,t,n){if(!n){if(t)await Cr(r);else if(await Zi(r))throw new Error("dest already exists.")}try{await zi.rename(e,r)}catch(i){if(i.code!=="EXDEV")throw i;await ro(e,r,t)}}async function ro(e,r,t){return await Qi(e,r,{overwrite:t,errorOnExist:!0,preserveTimestamps:!0}),Cr(e)}Tr.exports=eo});var jr=d((ic,Rr)=>{"use strict";var $r=ie(),Ue=v("path"),no=be().copySync,Lr=de().removeSync,io=Y().mkdirpSync,Nr=re();function oo(e,r,t){t=t||{};let n=t.overwrite||t.clobber||!1,{srcStat:i,isChangingCase:o=!1}=Nr.checkPathsSync(e,r,"move",t);return Nr.checkParentPathsSync(e,i,r,"move"),co(r)||io(Ue.dirname(r)),so(e,r,n,o)}function co(e){let r=Ue.dirname(e);return Ue.parse(r).root===r}function so(e,r,t,n){if(n)return We(e,r,t);if(t)return Lr(r),We(e,r,t);if($r.existsSync(r))throw new Error("dest already exists.");return We(e,r,t)}function We(e,r,t){try{$r.renameSync(e,r)}catch(n){if(n.code!=="EXDEV")throw n;return ao(e,r,t)}}function ao(e,r,t){return no(e,r,{overwrite:t,errorOnExist:!0,preserveTimestamps:!0}),Lr(e)}Rr.exports=oo});var Mr=d((oc,Ar)=>{"use strict";var uo=C().fromPromise;Ar.exports={move:uo(Ir()),moveSync:jr()}});var Ur=d((cc,Wr)=>{"use strict";Wr.exports={...M(),...be(),...Wt(),...mr(),...Or(),...Y(),...Mr(),...Pe(),...H(),...de()}});import{join as nn,dirname as po,relative as wo}from"path";import{PluginHooks as tn}from"@dz-web/esboot";var bo=(e=>typeof v<"u"?v:typeof Proxy<"u"?new Proxy(e,{get:(r,t)=>(typeof v<"u"?v:r)[t]}):e)(function(e){if(typeof v<"u")return v.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var sn=import("./execa-BVGTTV6Q.mjs"),Ve=async(e,{options:r={},onError:t}={})=>{let{$:n}=await sn;try{return await n({stdio:"inherit",shell:!0,cwd:process.cwd(),...r})`${e}`}catch(i){if(t)t(i);else throw i}};var Z={};Ge(Z,cn(Ur(),1));import{resolve as fo,join as lo}from"path";var Jr=process.platform==="win32";var qe=fo(process.cwd(),"node_modules/.cache/esboot"),mo=lo(qe,"webpack-cache"),Br=(e=>(e.MOBILE="mobile",e.PC="pc",e))(Br||{}),Yr=(e=>(e.native="native",e.browser="browser",e))(Yr||{}),Gr=(e=>(e.terser="terser",e.esbuild="esbuild",e.swc="swc",e.none="none",e))(Gr||{}),Vr=(e=>(e.esbuild="esbuild",e.cssnano="cssnano",e.lightningcss="lightningcss",e.none="none",e))(Vr||{});var Kr=(e=>(e.dev="development",e.prod="production",e.test="test",e))(Kr||{});var Je,zr,Qr,Xr,Zr=!0;typeof process<"u"&&({FORCE_COLOR:Je,NODE_DISABLE_COLORS:zr,NO_COLOR:Qr,TERM:Xr}=process.env||{},Zr=process.stdout&&process.stdout.isTTY);var w={enabled:!zr&&Qr==null&&Xr!=="dumb"&&(Je!=null&&Je!=="0"||Zr),reset:b(0,0),bold:b(1,22),dim:b(2,22),italic:b(3,23),underline:b(4,24),inverse:b(7,27),hidden:b(8,28),strikethrough:b(9,29),black:b(30,39),red:b(31,39),green:b(32,39),yellow:b(33,39),blue:b(34,39),magenta:b(35,39),cyan:b(36,39),white:b(37,39),gray:b(90,39),grey:b(90,39),bgBlack:b(40,49),bgRed:b(41,49),bgGreen:b(42,49),bgYellow:b(43,49),bgBlue:b(44,49),bgMagenta:b(45,49),bgCyan:b(46,49),bgWhite:b(47,49)};function Hr(e,r){let t=0,n,i="",o="";for(;t<e.length;t++)n=e[t],i+=n.open,o+=n.close,~r.indexOf(n.close)&&(r=r.replace(n.rgx,n.close+n.open));return i+r+o}function yo(e,r){let t={has:e,keys:r};return t.reset=w.reset.bind(t),t.bold=w.bold.bind(t),t.dim=w.dim.bind(t),t.italic=w.italic.bind(t),t.underline=w.underline.bind(t),t.inverse=w.inverse.bind(t),t.hidden=w.hidden.bind(t),t.strikethrough=w.strikethrough.bind(t),t.black=w.black.bind(t),t.red=w.red.bind(t),t.green=w.green.bind(t),t.yellow=w.yellow.bind(t),t.blue=w.blue.bind(t),t.magenta=w.magenta.bind(t),t.cyan=w.cyan.bind(t),t.white=w.white.bind(t),t.gray=w.gray.bind(t),t.grey=w.grey.bind(t),t.bgBlack=w.bgBlack.bind(t),t.bgRed=w.bgRed.bind(t),t.bgGreen=w.bgGreen.bind(t),t.bgYellow=w.bgYellow.bind(t),t.bgBlue=w.bgBlue.bind(t),t.bgMagenta=w.bgMagenta.bind(t),t.bgCyan=w.bgCyan.bind(t),t.bgWhite=w.bgWhite.bind(t),t}function b(e,r){let t={open:`\x1B[${e}m`,close:`\x1B[${r}m`,rgx:new RegExp(`\\x1b\\[${r}m`,"g")};return function(n){return this!==void 0&&this.has!==void 0?(~this.has.indexOf(e)||(this.has.push(e),this.keys.push(t)),n===void 0?this:w.enabled?Hr(this.keys,n+""):n+""):n===void 0?yo([e],[t]):w.enabled?Hr([t],n+""):n+""}}var ee=w;import Ec from"os";import xc from"fs/promises";import qc from"child_process";var ho={wait:`${ee.cyan("wait")} -`,error:`${ee.red("error")} -`,warn:`${ee.yellow("warn")} -`,ready:`${ee.green("ready")} -`,info:`${ee.cyan("info")} -`,event:`${ee.magenta("event")} -`,debug:`${ee.gray("debug")} -`};function en(...e){console.log(ho.info,...e)}var So=nn(__dirname,"../config/.dumirc.ts"),Fe=nn(qe,"dumi/.dumirc.ts"),rn="./docs",vo=()=>({key:"plugin-docs",[tn.registerCommands]:()=>[{name:"docs",description:"Start docs",arguments:[{name:"[subCommand]",description:"the sub command",defaultValue:"dev"}],allowUnknownOption:!0,action:async(e,r)=>{let{port:t}=r;process.env.APP_ROOT=rn,process.env.DUMI_THEME=po(v.resolve("dumi-theme-lobehub/package.json"));let n=wo(rn,Fe),i=`node ~/Code/fork-repos/dumi/bin/dumi.js ${e} --config ${n}`;t&&(process.env.port=t,i+=` --port ${t}`),Ve(i)}}],[tn.prepare]:()=>{(0,Z.ensureFileSync)(Fe),(0,Z.copySync)(So,Fe),en(`Created Doc Config: ${Fe}.`)}});export{vo as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dz-web/esboot-plugin-docs",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"author": "",
|
|
14
14
|
"license": "ISC",
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@dz-web/esboot": "3.1.
|
|
17
|
-
"@dz-web/esboot-common": "3.1.
|
|
16
|
+
"@dz-web/esboot": "3.1.6",
|
|
17
|
+
"@dz-web/esboot-common": "3.1.6"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"dumi-theme-lobehub": "^1.8.1"
|