aronrepo 1.5.2 → 1.6.0
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/bin/index +8 -8
- package/dist/bin/index.map +4 -4
- package/package.json +1 -1
package/dist/bin/index
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var qo=Object.create;var Mt=Object.defineProperty;var Wo=Object.getOwnPropertyDescriptor;var zo=Object.getOwnPropertyNames;var Ho=Object.getPrototypeOf,Ko=Object.prototype.hasOwnProperty;var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Xo=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of zo(t))!Ko.call(e,o)&&o!==n&&Mt(e,o,{get:()=>t[o],enumerable:!(r=Wo(t,o))||r.enumerable});return e};var h=(e,t,n)=>(n=e!=null?qo(Ho(e)):{},Xo(t||!e||!e.__esModule?Mt(n,"default",{value:e,enumerable:!0}):n,e));var Xt=v((ic,Kt)=>{Kt.exports=Ht;Ht.sync=Zo;var Wt=require("fs");function Yo(e,t){var n=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var r=0;r<n.length;r++){var o=n[r].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}function zt(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:Yo(t,n)}function Ht(e,t,n){Wt.stat(e,function(r,o){n(r,r?!1:zt(o,e,t))})}function Zo(e,t){return zt(Wt.statSync(e),e,t)}});var Qt=v((sc,Zt)=>{Zt.exports=Jt;Jt.sync=Qo;var Vt=require("fs");function Jt(e,t,n){Vt.stat(e,function(r,o){n(r,r?!1:Yt(o,t))})}function Qo(e,t){return Yt(Vt.statSync(e),t)}function Yt(e,t){return e.isFile()&&ei(e,t)}function ei(e,t){var n=e.mode,r=e.uid,o=e.gid,i=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),s=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),a=parseInt("001",8),f=u|c,p=n&a||n&c&&o===s||n&u&&r===i||n&f&&i===0;return p}});var tn=v((cc,en)=>{var ac=require("fs"),xe;process.platform==="win32"||global.TESTING_WINDOWS?xe=Xt():xe=Qt();en.exports=Ue;Ue.sync=ti;function Ue(e,t,n){if(typeof t=="function"&&(n=t,t={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,o){Ue(e,t||{},function(i,s){i?o(i):r(s)})})}xe(e,t||{},function(r,o){r&&(r.code==="EACCES"||t&&t.ignoreErrors)&&(r=null,o=!1),n(r,o)})}function ti(e,t){try{return xe.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var un=v((uc,cn)=>{var H=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",nn=require("path"),ni=H?";":":",rn=tn(),on=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),sn=(e,t)=>{let n=t.colon||ni,r=e.match(/\//)||H&&e.match(/\\/)?[""]:[...H?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],o=H?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=H?o.split(n):[""];return H&&e.indexOf(".")!==-1&&i[0]!==""&&i.unshift(""),{pathEnv:r,pathExt:i,pathExtExe:o}},an=(e,t,n)=>{typeof t=="function"&&(n=t,t={}),t||(t={});let{pathEnv:r,pathExt:o,pathExtExe:i}=sn(e,t),s=[],u=a=>new Promise((f,p)=>{if(a===r.length)return t.all&&s.length?f(s):p(on(e));let l=r[a],m=/^".*"$/.test(l)?l.slice(1,-1):l,d=nn.join(m,e),y=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;f(c(y,a,0))}),c=(a,f,p)=>new Promise((l,m)=>{if(p===o.length)return l(u(f+1));let d=o[p];rn(a+d,{pathExt:i},(y,g)=>{if(!y&&g)if(t.all)s.push(a+d);else return l(a+d);return l(c(a,f,p+1))})});return n?u(0).then(a=>n(null,a),n):u(0)},ri=(e,t)=>{t=t||{};let{pathEnv:n,pathExt:r,pathExtExe:o}=sn(e,t),i=[];for(let s=0;s<n.length;s++){let u=n[s],c=/^".*"$/.test(u)?u.slice(1,-1):u,a=nn.join(c,e),f=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+a:a;for(let p=0;p<r.length;p++){let l=f+r[p];try{if(rn.sync(l,{pathExt:o}))if(t.all)i.push(l);else return l}catch{}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw on(e)};cn.exports=an;an.sync=ri});var ln=v((fc,qe)=>{"use strict";var fn=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};qe.exports=fn;qe.exports.default=fn});var gn=v((lc,mn)=>{"use strict";var dn=require("path"),oi=un(),ii=ln();function pn(e,t){let n=e.options.env||process.env,r=process.cwd(),o=e.options.cwd!=null,i=o&&process.chdir!==void 0&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch{}let s;try{s=oi.sync(e.command,{path:n[ii({env:n})],pathExt:t?dn.delimiter:void 0})}catch{}finally{i&&process.chdir(r)}return s&&(s=dn.resolve(o?e.options.cwd:"",s)),s}function si(e){return pn(e)||pn(e,!0)}mn.exports=si});var hn=v((dc,ze)=>{"use strict";var We=/([()\][%!^"`<>&|;, *?])/g;function ai(e){return e=e.replace(We,"^$1"),e}function ci(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(We,"^$1"),t&&(e=e.replace(We,"^$1")),e}ze.exports.command=ai;ze.exports.argument=ci});var xn=v((pc,yn)=>{"use strict";yn.exports=/^#!(.*)/});var wn=v((mc,bn)=>{"use strict";var ui=xn();bn.exports=(e="")=>{let t=e.match(ui);if(!t)return null;let[n,r]=t[0].replace(/#! ?/,"").split(" "),o=n.split("/").pop();return o==="env"?r:r?`${o} ${r}`:o}});var vn=v((gc,Sn)=>{"use strict";var He=require("fs"),fi=wn();function li(e){let n=Buffer.alloc(150),r;try{r=He.openSync(e,"r"),He.readSync(r,n,0,150,0),He.closeSync(r)}catch{}return fi(n.toString())}Sn.exports=li});var _n=v((hc,Pn)=>{"use strict";var di=require("path"),En=gn(),Tn=hn(),pi=vn(),mi=process.platform==="win32",gi=/\.(?:com|exe)$/i,hi=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function yi(e){e.file=En(e);let t=e.file&&pi(e.file);return t?(e.args.unshift(e.file),e.command=t,En(e)):e.file}function xi(e){if(!mi)return e;let t=yi(e),n=!gi.test(t);if(e.options.forceShell||n){let r=hi.test(t);e.command=di.normalize(e.command),e.command=Tn.command(e.command),e.args=e.args.map(i=>Tn.argument(i,r));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function bi(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:xi(r)}Pn.exports=bi});var On=v((yc,In)=>{"use strict";var Ke=process.platform==="win32";function Xe(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function wi(e,t){if(!Ke)return;let n=e.emit;e.emit=function(r,o){if(r==="exit"){let i=jn(o,t,"spawn");if(i)return n.call(e,"error",i)}return n.apply(e,arguments)}}function jn(e,t){return Ke&&e===1&&!t.file?Xe(t.original,"spawn"):null}function Si(e,t){return Ke&&e===1&&!t.file?Xe(t.original,"spawnSync"):null}In.exports={hookChildProcess:wi,verifyENOENT:jn,verifyENOENTSync:Si,notFoundError:Xe}});var kn=v((xc,K)=>{"use strict";var Cn=require("child_process"),Ve=_n(),Je=On();function An(e,t,n){let r=Ve(e,t,n),o=Cn.spawn(r.command,r.args,r.options);return Je.hookChildProcess(o,r),o}function vi(e,t,n){let r=Ve(e,t,n),o=Cn.spawnSync(r.command,r.args,r.options);return o.error=o.error||Je.verifyENOENTSync(o.status,r),o}K.exports=An;K.exports.spawn=An;K.exports.sync=vi;K.exports._parse=Ve;K.exports._enoent=Je});var Wn=v((Gc,ve)=>{ve.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&ve.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&ve.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var Vn=v((Mc,Y)=>{var S=global.process,M=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};M(S)?(zn=require("assert"),V=Wn(),Hn=/^win/i.test(S.platform),ie=require("events"),typeof ie!="function"&&(ie=ie.EventEmitter),S.__signal_exit_emitter__?T=S.__signal_exit_emitter__:(T=S.__signal_exit_emitter__=new ie,T.count=0,T.emitted={}),T.infinite||(T.setMaxListeners(1/0),T.infinite=!0),Y.exports=function(e,t){if(!M(global.process))return function(){};zn.equal(typeof e,"function","a callback must be provided for exit handler"),J===!1&&nt();var n="exit";t&&t.alwaysLast&&(n="afterexit");var r=function(){T.removeListener(n,e),T.listeners("exit").length===0&&T.listeners("afterexit").length===0&&Ee()};return T.on(n,e),r},Ee=function(){!J||!M(global.process)||(J=!1,V.forEach(function(t){try{S.removeListener(t,Te[t])}catch{}}),S.emit=Pe,S.reallyExit=rt,T.count-=1)},Y.exports.unload=Ee,L=function(t,n,r){T.emitted[t]||(T.emitted[t]=!0,T.emit(t,n,r))},Te={},V.forEach(function(e){Te[e]=function(){if(M(global.process)){var n=S.listeners(e);n.length===T.count&&(Ee(),L("exit",null,e),L("afterexit",null,e),Hn&&e==="SIGHUP"&&(e="SIGINT"),S.kill(S.pid,e))}}}),Y.exports.signals=function(){return V},J=!1,nt=function(){J||!M(global.process)||(J=!0,T.count+=1,V=V.filter(function(t){try{return S.on(t,Te[t]),!0}catch{return!1}}),S.emit=Xn,S.reallyExit=Kn)},Y.exports.load=nt,rt=S.reallyExit,Kn=function(t){M(global.process)&&(S.exitCode=t||0,L("exit",S.exitCode,null),L("afterexit",S.exitCode,null),rt.call(S,S.exitCode))},Pe=S.emit,Xn=function(t,n){if(t==="exit"&&M(global.process)){n!==void 0&&(S.exitCode=n);var r=Pe.apply(this,arguments);return L("exit",S.exitCode,null),L("afterexit",S.exitCode,null),r}else return Pe.apply(this,arguments)}):Y.exports=function(){return function(){}};var zn,V,Hn,ie,T,Ee,L,Te,J,nt,rt,Kn,Pe,Xn});var ir=v((Uc,or)=>{"use strict";var{PassThrough:Hi}=require("stream");or.exports=e=>{e={...e};let{array:t}=e,{encoding:n}=e,r=n==="buffer",o=!1;t?o=!(n||r):n=n||"utf8",r&&(n=null);let i=new Hi({objectMode:o});n&&i.setEncoding(n);let s=0,u=[];return i.on("data",c=>{u.push(c),o?s=u.length:s+=c.length}),i.getBufferedValue=()=>t?u:r?Buffer.concat(u,s):u.join(""),i.getBufferedLength=()=>s,i}});var sr=v((qc,se)=>{"use strict";var{constants:Ki}=require("buffer"),Xi=require("stream"),{promisify:Vi}=require("util"),Ji=ir(),Yi=Vi(Xi.pipeline),_e=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function ot(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};let{maxBuffer:n}=t,r=Ji(t);return await new Promise((o,i)=>{let s=u=>{u&&r.getBufferedLength()<=Ki.MAX_LENGTH&&(u.bufferedData=r.getBufferedValue()),i(u)};(async()=>{try{await Yi(e,r),o()}catch(u){s(u)}})(),r.on("data",()=>{r.getBufferedLength()>n&&s(new _e)})}),r.getBufferedValue()}se.exports=ot;se.exports.buffer=(e,t)=>ot(e,{...t,encoding:"buffer"});se.exports.array=(e,t)=>ot(e,{...t,array:!0});se.exports.MaxBufferError=_e});var cr=v((Wc,ar)=>{"use strict";var{PassThrough:Zi}=require("stream");ar.exports=function(){var e=[],t=new Zi({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=r,t.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),t;function n(i){return Array.isArray(i)?(i.forEach(n),this):(e.push(i),i.once("end",o.bind(null,i)),i.once("error",t.emit.bind(t,"error")),i.pipe(t,{end:!1}),this)}function r(){return e.length==0}function o(i){e=e.filter(function(s){return s!==i}),!e.length&&t.readable&&t.end()}}});var ee=v(Or=>{var xt="2.0.1",_r,je,jr,wt,St,Z,fe,ue,bt,Q,_,Ir=[].slice,ds=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},ps={}.hasOwnProperty;fe=require("path");jr=function(e){return typeof e=="function"};wt=function(e){return typeof e=="string"||!!e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object String]"};_=Or;_.VERSION=typeof xt<"u"&&xt!==null?xt:"NO-VERSION";Q=function(e){return e=e.replace(/\\/g,"/"),e=e.replace(/(?<!^)\/+/g,"/"),e};for(ue in fe)bt=fe[ue],jr(bt)?_[ue]=function(e){return function(){var t,n;return t=1<=arguments.length?Ir.call(arguments,0):[],t=t.map(function(r){return wt(r)?Q(r):r}),n=fe[e].apply(fe,t),wt(n)?Q(n):n}}(ue):_[ue]=bt;_.sep="/";je={toUnix:Q,normalizeSafe:function(e){var t;return e=Q(e),t=_.normalize(e),e.startsWith("./")&&!t.startsWith("./")&&!t.startsWith("..")?t="./"+t:e.startsWith("//")&&!t.startsWith("//")&&(e.startsWith("//./")?t="//."+t:t="/"+t),t},normalizeTrim:function(e){return e=_.normalizeSafe(e),e.endsWith("/")?e.slice(0,+(e.length-2)+1||9e9):e},joinSafe:function(){var e,t,n;return e=1<=arguments.length?Ir.call(arguments,0):[],n=_.join.apply(null,e),e.length>0&&(t=Q(e[0]),t.startsWith("./")&&!n.startsWith("./")&&!n.startsWith("..")?n="./"+n:t.startsWith("//")&&!n.startsWith("//")&&(t.startsWith("//./")?n="//."+n:n="/"+n)),n},addExt:function(e,t){return t?(t[0]!=="."&&(t="."+t),e+(e.endsWith(t)?"":t)):e},trimExt:function(e,t,n){var r;return n==null&&(n=7),r=_.extname(e),St(r,t,n)?e.slice(0,+(e.length-r.length-1)+1||9e9):e},removeExt:function(e,t){return t?(t=t[0]==="."?t:"."+t,_.extname(e)===t?_.trimExt(e,[],t.length):e):e},changeExt:function(e,t,n,r){return r==null&&(r=7),_.trimExt(e,n,r)+(t?t[0]==="."?t:"."+t:"")},defaultExt:function(e,t,n,r){var o;return r==null&&(r=7),o=_.extname(e),St(o,n,r)?e:_.addExt(e,t)}};St=function(e,t,n){return t==null&&(t=[]),e&&e.length<=n&&ds.call(t.map(function(r){return(r&&r[0]!=="."?".":"")+r}),e)<0};for(Z in je)if(ps.call(je,Z)){if(_r=je[Z],_[Z]!==void 0)throw new Error("path."+Z+" already exists.");_[Z]=_r}});var kr=v((wu,Ar)=>{Ar.exports=function(e,t){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var n=e.length;if(n<=1)return e;var r="";if(n>4&&e[3]==="\\"){var o=e[2];(o==="?"||o===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),r="//")}var i=e.split(/[/\\]+/);return t!==!1&&i[i.length-1]===""&&i.pop(),r+i.join("/")}});var mo=v((le,ne)=>{var xs=200,kt="__lodash_hash_undefined__",$e=1,Wr=2,zr=9007199254740991,Oe="[object Arguments]",Pt="[object Array]",bs="[object AsyncFunction]",Hr="[object Boolean]",Kr="[object Date]",Xr="[object Error]",Vr="[object Function]",ws="[object GeneratorFunction]",Ce="[object Map]",Jr="[object Number]",Ss="[object Null]",te="[object Object]",Nr="[object Promise]",vs="[object Proxy]",Yr="[object RegExp]",Ae="[object Set]",Zr="[object String]",Es="[object Symbol]",Ts="[object Undefined]",_t="[object WeakMap]",Qr="[object ArrayBuffer]",ke="[object DataView]",Ps="[object Float32Array]",_s="[object Float64Array]",js="[object Int8Array]",Is="[object Int16Array]",Os="[object Int32Array]",Cs="[object Uint8Array]",As="[object Uint8ClampedArray]",ks="[object Uint16Array]",Ns="[object Uint32Array]",Rs=/[\\^$.*+?()[\]{}|]/g,Fs=/^\[object .+?Constructor\]$/,$s=/^(?:0|[1-9]\d*)$/,w={};w[Ps]=w[_s]=w[js]=w[Is]=w[Os]=w[Cs]=w[As]=w[ks]=w[Ns]=!0;w[Oe]=w[Pt]=w[Qr]=w[Hr]=w[ke]=w[Kr]=w[Xr]=w[Vr]=w[Ce]=w[Jr]=w[te]=w[Yr]=w[Ae]=w[Zr]=w[_t]=!1;var eo=typeof global=="object"&&global&&global.Object===Object&&global,Bs=typeof self=="object"&&self&&self.Object===Object&&self,N=eo||Bs||Function("return this")(),to=typeof le=="object"&&le&&!le.nodeType&&le,Rr=to&&typeof ne=="object"&&ne&&!ne.nodeType&&ne,no=Rr&&Rr.exports===to,vt=no&&eo.process,Fr=function(){try{return vt&&vt.binding&&vt.binding("util")}catch{}}(),$r=Fr&&Fr.isTypedArray;function Gs(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}function Ms(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Ls(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function Ds(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Us(e){return function(t){return e(t)}}function qs(e,t){return e.has(t)}function Ws(e,t){return e?.[t]}function zs(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function Hs(e,t){return function(n){return e(t(n))}}function Ks(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Xs=Array.prototype,Vs=Function.prototype,Be=Object.prototype,Et=N["__core-js_shared__"],ro=Vs.toString,C=Be.hasOwnProperty,Br=function(){var e=/[^.]+$/.exec(Et&&Et.keys&&Et.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),oo=Be.toString,Js=RegExp("^"+ro.call(C).replace(Rs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gr=no?N.Buffer:void 0,Ne=N.Symbol,Mr=N.Uint8Array,io=Be.propertyIsEnumerable,Ys=Xs.splice,D=Ne?Ne.toStringTag:void 0,Lr=Object.getOwnPropertySymbols,Zs=Gr?Gr.isBuffer:void 0,Qs=Hs(Object.keys,Object),jt=re(N,"DataView"),de=re(N,"Map"),It=re(N,"Promise"),Ot=re(N,"Set"),Ct=re(N,"WeakMap"),pe=re(Object,"create"),ea=W(jt),ta=W(de),na=W(It),ra=W(Ot),oa=W(Ct),Dr=Ne?Ne.prototype:void 0,Tt=Dr?Dr.valueOf:void 0;function U(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ia(){this.__data__=pe?pe(null):{},this.size=0}function sa(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function aa(e){var t=this.__data__;if(pe){var n=t[e];return n===kt?void 0:n}return C.call(t,e)?t[e]:void 0}function ca(e){var t=this.__data__;return pe?t[e]!==void 0:C.call(t,e)}function ua(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pe&&t===void 0?kt:t,this}U.prototype.clear=ia;U.prototype.delete=sa;U.prototype.get=aa;U.prototype.has=ca;U.prototype.set=ua;function R(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function fa(){this.__data__=[],this.size=0}function la(e){var t=this.__data__,n=Ge(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Ys.call(t,n,1),--this.size,!0}function da(e){var t=this.__data__,n=Ge(t,e);return n<0?void 0:t[n][1]}function pa(e){return Ge(this.__data__,e)>-1}function ma(e,t){var n=this.__data__,r=Ge(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}R.prototype.clear=fa;R.prototype.delete=la;R.prototype.get=da;R.prototype.has=pa;R.prototype.set=ma;function q(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ga(){this.size=0,this.__data__={hash:new U,map:new(de||R),string:new U}}function ha(e){var t=Me(this,e).delete(e);return this.size-=t?1:0,t}function ya(e){return Me(this,e).get(e)}function xa(e){return Me(this,e).has(e)}function ba(e,t){var n=Me(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}q.prototype.clear=ga;q.prototype.delete=ha;q.prototype.get=ya;q.prototype.has=xa;q.prototype.set=ba;function Re(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new q;++t<n;)this.add(e[t])}function wa(e){return this.__data__.set(e,kt),this}function Sa(e){return this.__data__.has(e)}Re.prototype.add=Re.prototype.push=wa;Re.prototype.has=Sa;function G(e){var t=this.__data__=new R(e);this.size=t.size}function va(){this.__data__=new R,this.size=0}function Ea(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Ta(e){return this.__data__.get(e)}function Pa(e){return this.__data__.has(e)}function _a(e,t){var n=this.__data__;if(n instanceof R){var r=n.__data__;if(!de||r.length<xs-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new q(r)}return n.set(e,t),this.size=n.size,this}G.prototype.clear=va;G.prototype.delete=Ea;G.prototype.get=Ta;G.prototype.has=Pa;G.prototype.set=_a;function ja(e,t){var n=Fe(e),r=!n&&Ua(e),o=!n&&!r&&At(e),i=!n&&!r&&!o&&po(e),s=n||r||o||i,u=s?Ds(e.length,String):[],c=u.length;for(var a in e)(t||C.call(e,a))&&!(s&&(a=="length"||o&&(a=="offset"||a=="parent")||i&&(a=="buffer"||a=="byteLength"||a=="byteOffset")||Ba(a,c)))&&u.push(a);return u}function Ge(e,t){for(var n=e.length;n--;)if(co(e[n][0],t))return n;return-1}function Ia(e,t,n){var r=t(e);return Fe(e)?r:Ms(r,n(e))}function ge(e){return e==null?e===void 0?Ts:Ss:D&&D in Object(e)?Fa(e):Da(e)}function Ur(e){return me(e)&&ge(e)==Oe}function so(e,t,n,r,o){return e===t?!0:e==null||t==null||!me(e)&&!me(t)?e!==e&&t!==t:Oa(e,t,n,r,so,o)}function Oa(e,t,n,r,o,i){var s=Fe(e),u=Fe(t),c=s?Pt:B(e),a=u?Pt:B(t);c=c==Oe?te:c,a=a==Oe?te:a;var f=c==te,p=a==te,l=c==a;if(l&&At(e)){if(!At(t))return!1;s=!0,f=!1}if(l&&!f)return i||(i=new G),s||po(e)?ao(e,t,n,r,o,i):Na(e,t,c,n,r,o,i);if(!(n&$e)){var m=f&&C.call(e,"__wrapped__"),d=p&&C.call(t,"__wrapped__");if(m||d){var y=m?e.value():e,g=d?t.value():t;return i||(i=new G),o(y,g,n,r,i)}}return l?(i||(i=new G),Ra(e,t,n,r,o,i)):!1}function Ca(e){if(!lo(e)||Ma(e))return!1;var t=uo(e)?Js:Fs;return t.test(W(e))}function Aa(e){return me(e)&&fo(e.length)&&!!w[ge(e)]}function ka(e){if(!La(e))return Qs(e);var t=[];for(var n in Object(e))C.call(e,n)&&n!="constructor"&&t.push(n);return t}function ao(e,t,n,r,o,i){var s=n&$e,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var a=i.get(e);if(a&&i.get(t))return a==t;var f=-1,p=!0,l=n&Wr?new Re:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var m=e[f],d=t[f];if(r)var y=s?r(d,m,f,t,e,i):r(m,d,f,e,t,i);if(y!==void 0){if(y)continue;p=!1;break}if(l){if(!Ls(t,function(g,x){if(!qs(l,x)&&(m===g||o(m,g,n,r,i)))return l.push(x)})){p=!1;break}}else if(!(m===d||o(m,d,n,r,i))){p=!1;break}}return i.delete(e),i.delete(t),p}function Na(e,t,n,r,o,i,s){switch(n){case ke:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Qr:return!(e.byteLength!=t.byteLength||!i(new Mr(e),new Mr(t)));case Hr:case Kr:case Jr:return co(+e,+t);case Xr:return e.name==t.name&&e.message==t.message;case Yr:case Zr:return e==t+"";case Ce:var u=zs;case Ae:var c=r&$e;if(u||(u=Ks),e.size!=t.size&&!c)return!1;var a=s.get(e);if(a)return a==t;r|=Wr,s.set(e,t);var f=ao(u(e),u(t),r,o,i,s);return s.delete(e),f;case Es:if(Tt)return Tt.call(e)==Tt.call(t)}return!1}function Ra(e,t,n,r,o,i){var s=n&$e,u=qr(e),c=u.length,a=qr(t),f=a.length;if(c!=f&&!s)return!1;for(var p=c;p--;){var l=u[p];if(!(s?l in t:C.call(t,l)))return!1}var m=i.get(e);if(m&&i.get(t))return m==t;var d=!0;i.set(e,t),i.set(t,e);for(var y=s;++p<c;){l=u[p];var g=e[l],x=t[l];if(r)var b=s?r(x,g,l,t,e,i):r(g,x,l,e,t,i);if(!(b===void 0?g===x||o(g,x,n,r,i):b)){d=!1;break}y||(y=l=="constructor")}if(d&&!y){var j=e.constructor,P=t.constructor;j!=P&&"constructor"in e&&"constructor"in t&&!(typeof j=="function"&&j instanceof j&&typeof P=="function"&&P instanceof P)&&(d=!1)}return i.delete(e),i.delete(t),d}function qr(e){return Ia(e,za,$a)}function Me(e,t){var n=e.__data__;return Ga(t)?n[typeof t=="string"?"string":"hash"]:n.map}function re(e,t){var n=Ws(e,t);return Ca(n)?n:void 0}function Fa(e){var t=C.call(e,D),n=e[D];try{e[D]=void 0;var r=!0}catch{}var o=oo.call(e);return r&&(t?e[D]=n:delete e[D]),o}var $a=Lr?function(e){return e==null?[]:(e=Object(e),Gs(Lr(e),function(t){return io.call(e,t)}))}:Ha,B=ge;(jt&&B(new jt(new ArrayBuffer(1)))!=ke||de&&B(new de)!=Ce||It&&B(It.resolve())!=Nr||Ot&&B(new Ot)!=Ae||Ct&&B(new Ct)!=_t)&&(B=function(e){var t=ge(e),n=t==te?e.constructor:void 0,r=n?W(n):"";if(r)switch(r){case ea:return ke;case ta:return Ce;case na:return Nr;case ra:return Ae;case oa:return _t}return t});function Ba(e,t){return t=t??zr,!!t&&(typeof e=="number"||$s.test(e))&&e>-1&&e%1==0&&e<t}function Ga(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ma(e){return!!Br&&Br in e}function La(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Be;return e===n}function Da(e){return oo.call(e)}function W(e){if(e!=null){try{return ro.call(e)}catch{}try{return e+""}catch{}}return""}function co(e,t){return e===t||e!==e&&t!==t}var Ua=Ur(function(){return arguments}())?Ur:function(e){return me(e)&&C.call(e,"callee")&&!io.call(e,"callee")},Fe=Array.isArray;function qa(e){return e!=null&&fo(e.length)&&!uo(e)}var At=Zs||Ka;function Wa(e,t){return so(e,t)}function uo(e){if(!lo(e))return!1;var t=ge(e);return t==Vr||t==ws||t==bs||t==vs}function fo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=zr}function lo(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function me(e){return e!=null&&typeof e=="object"}var po=$r?Us($r):Aa;function za(e){return qa(e)?ja(e):ka(e)}function Ha(){return[]}function Ka(){return!1}ne.exports=Wa});var wo=v((Eu,Nt)=>{"use strict";var bo=require("module"),Xa=require("path");Nt.exports=function(t,n,r){if(typeof n=="object"&&(r=n,n=void 0),r=r||{},n=n||"",r.appendPaths=r.appendPaths||[],r.prependPaths=r.prependPaths||[],typeof t!="string")throw new Error("code must be a string, not "+typeof t);var o=bo._nodeModulePaths(Xa.dirname(n)),i=Nt.parent,s=new bo(n,i);s.filename=n,s.paths=[].concat(r.prependPaths).concat(o).concat(r.appendPaths),s._compile(t,n);var u=s.exports;return i&&i.children&&i.children.splice(i.children.indexOf(s),1),u}});var Bt=require("commander"),Uo=h(require("path"));var Dt=require("commander"),Ut=h(require("fast-glob")),De=h(require("fs-extra")),qt=h(require("path")),k=h(require("@techor/log"));var Lt=h(require("fs-extra"));function z(e="./package.json"){return Lt.default.readJSONSync(e,{throws:!1})||{}}var Vo=z(),Jo={workspaces:Vo.workspaces};Dt.program.command("version <version>").description("Bump to specific version for workspace's packages").option("-p, --prefix <symbol>","Version prefix `^`, `~`, `>`, `>=`, `<`, `<=` ","^").option("-w, --workspaces <paths>","Specific your workspaces",Jo.workspaces).option("-ls, --list","List current bumpable dependency tree in workspaces",!1).action((e,{prefix:t,list:n,workspaces:r})=>{let o=t+e,i={},s={},u=r.map(f=>qt.default.join(f,"*package.json")),c=(f,p)=>{let l=!1;for(let m in f)m in s&&f[m]===""&&(f[m]=o,l=!0);return l};for(let f of Ut.default.sync(u)){let p=De.default.readJSONSync(f);p.private||(i[f]=p,s[p.name]=p,p.version=e)}for(let f in i){let p=i[f],{dependencies:l,peerDependencies:m}=i[f];l&&c(l,"dependencies"),m&&c(m,"peerDependencies"),n||De.default.writeJSONSync(f,p)}let a={};for(let f in s){let{dependencies:p,peerDependencies:l}=s[f],m=a[(0,k.paint)("**"+f+"**")]={},d=(y,g)=>{if(y){m[g]={};for(let x in y)if(x in s){let b=y[x];m[g][(0,k.paint)("**"+x+"**")]=b===o?null:o}}};d(p,"dependencies"),d(l,"peerDependencies"),Object.keys(a[(0,k.paint)("**"+f+"**")]).length||(a[(0,k.paint)("**"+f+"**")]=null)}k.default`📦`,k.default.tree(a),k.default.success`bump version to +${o}+ for ${Object.keys(s).length} packages in all workspace`});var Bo=require("commander"),Go=h(require("fast-glob"));var xr=require("node:buffer"),br=h(require("node:path"),1),ft=h(require("node:child_process"),1),ae=h(require("node:process"),1),wr=h(kn(),1);function Ye(e){let t=typeof e=="string"?`
|
|
2
|
+
var zo=Object.create;var Mt=Object.defineProperty;var Ho=Object.getOwnPropertyDescriptor;var Ko=Object.getOwnPropertyNames;var Xo=Object.getPrototypeOf,Vo=Object.prototype.hasOwnProperty;var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Jo=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ko(t))!Vo.call(e,o)&&o!==n&&Mt(e,o,{get:()=>t[o],enumerable:!(r=Ho(t,o))||r.enumerable});return e};var h=(e,t,n)=>(n=e!=null?zo(Xo(e)):{},Jo(t||!e||!e.__esModule?Mt(n,"default",{value:e,enumerable:!0}):n,e));var Xt=v((ac,Kt)=>{Kt.exports=Ht;Ht.sync=ei;var Wt=require("fs");function Qo(e,t){var n=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!n||(n=n.split(";"),n.indexOf("")!==-1))return!0;for(var r=0;r<n.length;r++){var o=n[r].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o)return!0}return!1}function zt(e,t,n){return!e.isSymbolicLink()&&!e.isFile()?!1:Qo(t,n)}function Ht(e,t,n){Wt.stat(e,function(r,o){n(r,r?!1:zt(o,e,t))})}function ei(e,t){return zt(Wt.statSync(e),e,t)}});var Qt=v((cc,Zt)=>{Zt.exports=Jt;Jt.sync=ti;var Vt=require("fs");function Jt(e,t,n){Vt.stat(e,function(r,o){n(r,r?!1:Yt(o,t))})}function ti(e,t){return Yt(Vt.statSync(e),t)}function Yt(e,t){return e.isFile()&&ni(e,t)}function ni(e,t){var n=e.mode,r=e.uid,o=e.gid,i=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),s=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),u=parseInt("100",8),c=parseInt("010",8),a=parseInt("001",8),f=u|c,p=n&a||n&c&&o===s||n&u&&r===i||n&f&&i===0;return p}});var tn=v((fc,en)=>{var uc=require("fs"),xe;process.platform==="win32"||global.TESTING_WINDOWS?xe=Xt():xe=Qt();en.exports=Ue;Ue.sync=ri;function Ue(e,t,n){if(typeof t=="function"&&(n=t,t={}),!n){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(r,o){Ue(e,t||{},function(i,s){i?o(i):r(s)})})}xe(e,t||{},function(r,o){r&&(r.code==="EACCES"||t&&t.ignoreErrors)&&(r=null,o=!1),n(r,o)})}function ri(e,t){try{return xe.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var un=v((lc,cn)=>{var H=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",nn=require("path"),oi=H?";":":",rn=tn(),on=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),sn=(e,t)=>{let n=t.colon||oi,r=e.match(/\//)||H&&e.match(/\\/)?[""]:[...H?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)],o=H?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",i=H?o.split(n):[""];return H&&e.indexOf(".")!==-1&&i[0]!==""&&i.unshift(""),{pathEnv:r,pathExt:i,pathExtExe:o}},an=(e,t,n)=>{typeof t=="function"&&(n=t,t={}),t||(t={});let{pathEnv:r,pathExt:o,pathExtExe:i}=sn(e,t),s=[],u=a=>new Promise((f,p)=>{if(a===r.length)return t.all&&s.length?f(s):p(on(e));let l=r[a],m=/^".*"$/.test(l)?l.slice(1,-1):l,d=nn.join(m,e),y=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;f(c(y,a,0))}),c=(a,f,p)=>new Promise((l,m)=>{if(p===o.length)return l(u(f+1));let d=o[p];rn(a+d,{pathExt:i},(y,g)=>{if(!y&&g)if(t.all)s.push(a+d);else return l(a+d);return l(c(a,f,p+1))})});return n?u(0).then(a=>n(null,a),n):u(0)},ii=(e,t)=>{t=t||{};let{pathEnv:n,pathExt:r,pathExtExe:o}=sn(e,t),i=[];for(let s=0;s<n.length;s++){let u=n[s],c=/^".*"$/.test(u)?u.slice(1,-1):u,a=nn.join(c,e),f=!c&&/^\.[\\\/]/.test(e)?e.slice(0,2)+a:a;for(let p=0;p<r.length;p++){let l=f+r[p];try{if(rn.sync(l,{pathExt:o}))if(t.all)i.push(l);else return l}catch{}}}if(t.all&&i.length)return i;if(t.nothrow)return null;throw on(e)};cn.exports=an;an.sync=ii});var ln=v((dc,qe)=>{"use strict";var fn=(e={})=>{let t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"};qe.exports=fn;qe.exports.default=fn});var gn=v((pc,mn)=>{"use strict";var dn=require("path"),si=un(),ai=ln();function pn(e,t){let n=e.options.env||process.env,r=process.cwd(),o=e.options.cwd!=null,i=o&&process.chdir!==void 0&&!process.chdir.disabled;if(i)try{process.chdir(e.options.cwd)}catch{}let s;try{s=si.sync(e.command,{path:n[ai({env:n})],pathExt:t?dn.delimiter:void 0})}catch{}finally{i&&process.chdir(r)}return s&&(s=dn.resolve(o?e.options.cwd:"",s)),s}function ci(e){return pn(e)||pn(e,!0)}mn.exports=ci});var hn=v((mc,ze)=>{"use strict";var We=/([()\][%!^"`<>&|;, *?])/g;function ui(e){return e=e.replace(We,"^$1"),e}function fi(e,t){return e=`${e}`,e=e.replace(/(\\*)"/g,'$1$1\\"'),e=e.replace(/(\\*)$/,"$1$1"),e=`"${e}"`,e=e.replace(We,"^$1"),t&&(e=e.replace(We,"^$1")),e}ze.exports.command=ui;ze.exports.argument=fi});var xn=v((gc,yn)=>{"use strict";yn.exports=/^#!(.*)/});var wn=v((hc,bn)=>{"use strict";var li=xn();bn.exports=(e="")=>{let t=e.match(li);if(!t)return null;let[n,r]=t[0].replace(/#! ?/,"").split(" "),o=n.split("/").pop();return o==="env"?r:r?`${o} ${r}`:o}});var vn=v((yc,Sn)=>{"use strict";var He=require("fs"),di=wn();function pi(e){let n=Buffer.alloc(150),r;try{r=He.openSync(e,"r"),He.readSync(r,n,0,150,0),He.closeSync(r)}catch{}return di(n.toString())}Sn.exports=pi});var _n=v((xc,Pn)=>{"use strict";var mi=require("path"),En=gn(),Tn=hn(),gi=vn(),hi=process.platform==="win32",yi=/\.(?:com|exe)$/i,xi=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function bi(e){e.file=En(e);let t=e.file&&gi(e.file);return t?(e.args.unshift(e.file),e.command=t,En(e)):e.file}function wi(e){if(!hi)return e;let t=bi(e),n=!yi.test(t);if(e.options.forceShell||n){let r=xi.test(t);e.command=mi.normalize(e.command),e.command=Tn.command(e.command),e.args=e.args.map(i=>Tn.argument(i,r));let o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function Si(e,t,n){t&&!Array.isArray(t)&&(n=t,t=null),t=t?t.slice(0):[],n=Object.assign({},n);let r={command:e,args:t,options:n,file:void 0,original:{command:e,args:t}};return n.shell?r:wi(r)}Pn.exports=Si});var On=v((bc,In)=>{"use strict";var Ke=process.platform==="win32";function Xe(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function vi(e,t){if(!Ke)return;let n=e.emit;e.emit=function(r,o){if(r==="exit"){let i=jn(o,t,"spawn");if(i)return n.call(e,"error",i)}return n.apply(e,arguments)}}function jn(e,t){return Ke&&e===1&&!t.file?Xe(t.original,"spawn"):null}function Ei(e,t){return Ke&&e===1&&!t.file?Xe(t.original,"spawnSync"):null}In.exports={hookChildProcess:vi,verifyENOENT:jn,verifyENOENTSync:Ei,notFoundError:Xe}});var kn=v((wc,K)=>{"use strict";var Cn=require("child_process"),Ve=_n(),Je=On();function An(e,t,n){let r=Ve(e,t,n),o=Cn.spawn(r.command,r.args,r.options);return Je.hookChildProcess(o,r),o}function Ti(e,t,n){let r=Ve(e,t,n),o=Cn.spawnSync(r.command,r.args,r.options);return o.error=o.error||Je.verifyENOENTSync(o.status,r),o}K.exports=An;K.exports.spawn=An;K.exports.sync=Ti;K.exports._parse=Ve;K.exports._enoent=Je});var Wn=v((Lc,ve)=>{ve.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&ve.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&ve.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var Vn=v((Dc,Y)=>{var S=global.process,M=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};M(S)?(zn=require("assert"),V=Wn(),Hn=/^win/i.test(S.platform),ie=require("events"),typeof ie!="function"&&(ie=ie.EventEmitter),S.__signal_exit_emitter__?T=S.__signal_exit_emitter__:(T=S.__signal_exit_emitter__=new ie,T.count=0,T.emitted={}),T.infinite||(T.setMaxListeners(1/0),T.infinite=!0),Y.exports=function(e,t){if(!M(global.process))return function(){};zn.equal(typeof e,"function","a callback must be provided for exit handler"),J===!1&&nt();var n="exit";t&&t.alwaysLast&&(n="afterexit");var r=function(){T.removeListener(n,e),T.listeners("exit").length===0&&T.listeners("afterexit").length===0&&Ee()};return T.on(n,e),r},Ee=function(){!J||!M(global.process)||(J=!1,V.forEach(function(t){try{S.removeListener(t,Te[t])}catch{}}),S.emit=Pe,S.reallyExit=rt,T.count-=1)},Y.exports.unload=Ee,L=function(t,n,r){T.emitted[t]||(T.emitted[t]=!0,T.emit(t,n,r))},Te={},V.forEach(function(e){Te[e]=function(){if(M(global.process)){var n=S.listeners(e);n.length===T.count&&(Ee(),L("exit",null,e),L("afterexit",null,e),Hn&&e==="SIGHUP"&&(e="SIGINT"),S.kill(S.pid,e))}}}),Y.exports.signals=function(){return V},J=!1,nt=function(){J||!M(global.process)||(J=!0,T.count+=1,V=V.filter(function(t){try{return S.on(t,Te[t]),!0}catch{return!1}}),S.emit=Xn,S.reallyExit=Kn)},Y.exports.load=nt,rt=S.reallyExit,Kn=function(t){M(global.process)&&(S.exitCode=t||0,L("exit",S.exitCode,null),L("afterexit",S.exitCode,null),rt.call(S,S.exitCode))},Pe=S.emit,Xn=function(t,n){if(t==="exit"&&M(global.process)){n!==void 0&&(S.exitCode=n);var r=Pe.apply(this,arguments);return L("exit",S.exitCode,null),L("afterexit",S.exitCode,null),r}else return Pe.apply(this,arguments)}):Y.exports=function(){return function(){}};var zn,V,Hn,ie,T,Ee,L,Te,J,nt,rt,Kn,Pe,Xn});var ir=v((Wc,or)=>{"use strict";var{PassThrough:Xi}=require("stream");or.exports=e=>{e={...e};let{array:t}=e,{encoding:n}=e,r=n==="buffer",o=!1;t?o=!(n||r):n=n||"utf8",r&&(n=null);let i=new Xi({objectMode:o});n&&i.setEncoding(n);let s=0,u=[];return i.on("data",c=>{u.push(c),o?s=u.length:s+=c.length}),i.getBufferedValue=()=>t?u:r?Buffer.concat(u,s):u.join(""),i.getBufferedLength=()=>s,i}});var sr=v((zc,se)=>{"use strict";var{constants:Vi}=require("buffer"),Ji=require("stream"),{promisify:Yi}=require("util"),Zi=ir(),Qi=Yi(Ji.pipeline),_e=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function ot(e,t){if(!e)throw new Error("Expected a stream");t={maxBuffer:1/0,...t};let{maxBuffer:n}=t,r=Zi(t);return await new Promise((o,i)=>{let s=u=>{u&&r.getBufferedLength()<=Vi.MAX_LENGTH&&(u.bufferedData=r.getBufferedValue()),i(u)};(async()=>{try{await Qi(e,r),o()}catch(u){s(u)}})(),r.on("data",()=>{r.getBufferedLength()>n&&s(new _e)})}),r.getBufferedValue()}se.exports=ot;se.exports.buffer=(e,t)=>ot(e,{...t,encoding:"buffer"});se.exports.array=(e,t)=>ot(e,{...t,array:!0});se.exports.MaxBufferError=_e});var cr=v((Hc,ar)=>{"use strict";var{PassThrough:es}=require("stream");ar.exports=function(){var e=[],t=new es({objectMode:!0});return t.setMaxListeners(0),t.add=n,t.isEmpty=r,t.on("unpipe",o),Array.prototype.slice.call(arguments).forEach(n),t;function n(i){return Array.isArray(i)?(i.forEach(n),this):(e.push(i),i.once("end",o.bind(null,i)),i.once("error",t.emit.bind(t,"error")),i.pipe(t,{end:!1}),this)}function r(){return e.length==0}function o(i){e=e.filter(function(s){return s!==i}),!e.length&&t.readable&&t.end()}}});var ee=v(Or=>{var xt="2.0.1",_r,je,jr,wt,St,Z,fe,ue,bt,Q,_,Ir=[].slice,ms=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},gs={}.hasOwnProperty;fe=require("path");jr=function(e){return typeof e=="function"};wt=function(e){return typeof e=="string"||!!e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object String]"};_=Or;_.VERSION=typeof xt<"u"&&xt!==null?xt:"NO-VERSION";Q=function(e){return e=e.replace(/\\/g,"/"),e=e.replace(/(?<!^)\/+/g,"/"),e};for(ue in fe)bt=fe[ue],jr(bt)?_[ue]=function(e){return function(){var t,n;return t=1<=arguments.length?Ir.call(arguments,0):[],t=t.map(function(r){return wt(r)?Q(r):r}),n=fe[e].apply(fe,t),wt(n)?Q(n):n}}(ue):_[ue]=bt;_.sep="/";je={toUnix:Q,normalizeSafe:function(e){var t;return e=Q(e),t=_.normalize(e),e.startsWith("./")&&!t.startsWith("./")&&!t.startsWith("..")?t="./"+t:e.startsWith("//")&&!t.startsWith("//")&&(e.startsWith("//./")?t="//."+t:t="/"+t),t},normalizeTrim:function(e){return e=_.normalizeSafe(e),e.endsWith("/")?e.slice(0,+(e.length-2)+1||9e9):e},joinSafe:function(){var e,t,n;return e=1<=arguments.length?Ir.call(arguments,0):[],n=_.join.apply(null,e),e.length>0&&(t=Q(e[0]),t.startsWith("./")&&!n.startsWith("./")&&!n.startsWith("..")?n="./"+n:t.startsWith("//")&&!n.startsWith("//")&&(t.startsWith("//./")?n="//."+n:n="/"+n)),n},addExt:function(e,t){return t?(t[0]!=="."&&(t="."+t),e+(e.endsWith(t)?"":t)):e},trimExt:function(e,t,n){var r;return n==null&&(n=7),r=_.extname(e),St(r,t,n)?e.slice(0,+(e.length-r.length-1)+1||9e9):e},removeExt:function(e,t){return t?(t=t[0]==="."?t:"."+t,_.extname(e)===t?_.trimExt(e,[],t.length):e):e},changeExt:function(e,t,n,r){return r==null&&(r=7),_.trimExt(e,n,r)+(t?t[0]==="."?t:"."+t:"")},defaultExt:function(e,t,n,r){var o;return r==null&&(r=7),o=_.extname(e),St(o,n,r)?e:_.addExt(e,t)}};St=function(e,t,n){return t==null&&(t=[]),e&&e.length<=n&&ms.call(t.map(function(r){return(r&&r[0]!=="."?".":"")+r}),e)<0};for(Z in je)if(gs.call(je,Z)){if(_r=je[Z],_[Z]!==void 0)throw new Error("path."+Z+" already exists.");_[Z]=_r}});var kr=v((vu,Ar)=>{Ar.exports=function(e,t){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var n=e.length;if(n<=1)return e;var r="";if(n>4&&e[3]==="\\"){var o=e[2];(o==="?"||o===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),r="//")}var i=e.split(/[/\\]+/);return t!==!1&&i[i.length-1]===""&&i.pop(),r+i.join("/")}});var mo=v((le,ne)=>{var ws=200,kt="__lodash_hash_undefined__",$e=1,Wr=2,zr=9007199254740991,Oe="[object Arguments]",Pt="[object Array]",Ss="[object AsyncFunction]",Hr="[object Boolean]",Kr="[object Date]",Xr="[object Error]",Vr="[object Function]",vs="[object GeneratorFunction]",Ce="[object Map]",Jr="[object Number]",Es="[object Null]",te="[object Object]",Nr="[object Promise]",Ts="[object Proxy]",Yr="[object RegExp]",Ae="[object Set]",Zr="[object String]",Ps="[object Symbol]",_s="[object Undefined]",_t="[object WeakMap]",Qr="[object ArrayBuffer]",ke="[object DataView]",js="[object Float32Array]",Is="[object Float64Array]",Os="[object Int8Array]",Cs="[object Int16Array]",As="[object Int32Array]",ks="[object Uint8Array]",Ns="[object Uint8ClampedArray]",Fs="[object Uint16Array]",Rs="[object Uint32Array]",$s=/[\\^$.*+?()[\]{}|]/g,Bs=/^\[object .+?Constructor\]$/,Gs=/^(?:0|[1-9]\d*)$/,w={};w[js]=w[Is]=w[Os]=w[Cs]=w[As]=w[ks]=w[Ns]=w[Fs]=w[Rs]=!0;w[Oe]=w[Pt]=w[Qr]=w[Hr]=w[ke]=w[Kr]=w[Xr]=w[Vr]=w[Ce]=w[Jr]=w[te]=w[Yr]=w[Ae]=w[Zr]=w[_t]=!1;var eo=typeof global=="object"&&global&&global.Object===Object&&global,Ms=typeof self=="object"&&self&&self.Object===Object&&self,N=eo||Ms||Function("return this")(),to=typeof le=="object"&&le&&!le.nodeType&&le,Fr=to&&typeof ne=="object"&&ne&&!ne.nodeType&&ne,no=Fr&&Fr.exports===to,vt=no&&eo.process,Rr=function(){try{return vt&&vt.binding&&vt.binding("util")}catch{}}(),$r=Rr&&Rr.isTypedArray;function Ls(e,t){for(var n=-1,r=e==null?0:e.length,o=0,i=[];++n<r;){var s=e[n];t(s,n,e)&&(i[o++]=s)}return i}function Ds(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Us(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function qs(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ws(e){return function(t){return e(t)}}function zs(e,t){return e.has(t)}function Hs(e,t){return e?.[t]}function Ks(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function Xs(e,t){return function(n){return e(t(n))}}function Vs(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Js=Array.prototype,Ys=Function.prototype,Be=Object.prototype,Et=N["__core-js_shared__"],ro=Ys.toString,C=Be.hasOwnProperty,Br=function(){var e=/[^.]+$/.exec(Et&&Et.keys&&Et.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),oo=Be.toString,Zs=RegExp("^"+ro.call(C).replace($s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gr=no?N.Buffer:void 0,Ne=N.Symbol,Mr=N.Uint8Array,io=Be.propertyIsEnumerable,Qs=Js.splice,D=Ne?Ne.toStringTag:void 0,Lr=Object.getOwnPropertySymbols,ea=Gr?Gr.isBuffer:void 0,ta=Xs(Object.keys,Object),jt=re(N,"DataView"),de=re(N,"Map"),It=re(N,"Promise"),Ot=re(N,"Set"),Ct=re(N,"WeakMap"),pe=re(Object,"create"),na=W(jt),ra=W(de),oa=W(It),ia=W(Ot),sa=W(Ct),Dr=Ne?Ne.prototype:void 0,Tt=Dr?Dr.valueOf:void 0;function U(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function aa(){this.__data__=pe?pe(null):{},this.size=0}function ca(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function ua(e){var t=this.__data__;if(pe){var n=t[e];return n===kt?void 0:n}return C.call(t,e)?t[e]:void 0}function fa(e){var t=this.__data__;return pe?t[e]!==void 0:C.call(t,e)}function la(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pe&&t===void 0?kt:t,this}U.prototype.clear=aa;U.prototype.delete=ca;U.prototype.get=ua;U.prototype.has=fa;U.prototype.set=la;function F(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function da(){this.__data__=[],this.size=0}function pa(e){var t=this.__data__,n=Ge(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Qs.call(t,n,1),--this.size,!0}function ma(e){var t=this.__data__,n=Ge(t,e);return n<0?void 0:t[n][1]}function ga(e){return Ge(this.__data__,e)>-1}function ha(e,t){var n=this.__data__,r=Ge(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}F.prototype.clear=da;F.prototype.delete=pa;F.prototype.get=ma;F.prototype.has=ga;F.prototype.set=ha;function q(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ya(){this.size=0,this.__data__={hash:new U,map:new(de||F),string:new U}}function xa(e){var t=Me(this,e).delete(e);return this.size-=t?1:0,t}function ba(e){return Me(this,e).get(e)}function wa(e){return Me(this,e).has(e)}function Sa(e,t){var n=Me(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}q.prototype.clear=ya;q.prototype.delete=xa;q.prototype.get=ba;q.prototype.has=wa;q.prototype.set=Sa;function Fe(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new q;++t<n;)this.add(e[t])}function va(e){return this.__data__.set(e,kt),this}function Ea(e){return this.__data__.has(e)}Fe.prototype.add=Fe.prototype.push=va;Fe.prototype.has=Ea;function G(e){var t=this.__data__=new F(e);this.size=t.size}function Ta(){this.__data__=new F,this.size=0}function Pa(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function _a(e){return this.__data__.get(e)}function ja(e){return this.__data__.has(e)}function Ia(e,t){var n=this.__data__;if(n instanceof F){var r=n.__data__;if(!de||r.length<ws-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new q(r)}return n.set(e,t),this.size=n.size,this}G.prototype.clear=Ta;G.prototype.delete=Pa;G.prototype.get=_a;G.prototype.has=ja;G.prototype.set=Ia;function Oa(e,t){var n=Re(e),r=!n&&Wa(e),o=!n&&!r&&At(e),i=!n&&!r&&!o&&po(e),s=n||r||o||i,u=s?qs(e.length,String):[],c=u.length;for(var a in e)(t||C.call(e,a))&&!(s&&(a=="length"||o&&(a=="offset"||a=="parent")||i&&(a=="buffer"||a=="byteLength"||a=="byteOffset")||Ma(a,c)))&&u.push(a);return u}function Ge(e,t){for(var n=e.length;n--;)if(co(e[n][0],t))return n;return-1}function Ca(e,t,n){var r=t(e);return Re(e)?r:Ds(r,n(e))}function ge(e){return e==null?e===void 0?_s:Es:D&&D in Object(e)?Ba(e):qa(e)}function Ur(e){return me(e)&&ge(e)==Oe}function so(e,t,n,r,o){return e===t?!0:e==null||t==null||!me(e)&&!me(t)?e!==e&&t!==t:Aa(e,t,n,r,so,o)}function Aa(e,t,n,r,o,i){var s=Re(e),u=Re(t),c=s?Pt:B(e),a=u?Pt:B(t);c=c==Oe?te:c,a=a==Oe?te:a;var f=c==te,p=a==te,l=c==a;if(l&&At(e)){if(!At(t))return!1;s=!0,f=!1}if(l&&!f)return i||(i=new G),s||po(e)?ao(e,t,n,r,o,i):Ra(e,t,c,n,r,o,i);if(!(n&$e)){var m=f&&C.call(e,"__wrapped__"),d=p&&C.call(t,"__wrapped__");if(m||d){var y=m?e.value():e,g=d?t.value():t;return i||(i=new G),o(y,g,n,r,i)}}return l?(i||(i=new G),$a(e,t,n,r,o,i)):!1}function ka(e){if(!lo(e)||Da(e))return!1;var t=uo(e)?Zs:Bs;return t.test(W(e))}function Na(e){return me(e)&&fo(e.length)&&!!w[ge(e)]}function Fa(e){if(!Ua(e))return ta(e);var t=[];for(var n in Object(e))C.call(e,n)&&n!="constructor"&&t.push(n);return t}function ao(e,t,n,r,o,i){var s=n&$e,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var a=i.get(e);if(a&&i.get(t))return a==t;var f=-1,p=!0,l=n&Wr?new Fe:void 0;for(i.set(e,t),i.set(t,e);++f<u;){var m=e[f],d=t[f];if(r)var y=s?r(d,m,f,t,e,i):r(m,d,f,e,t,i);if(y!==void 0){if(y)continue;p=!1;break}if(l){if(!Us(t,function(g,x){if(!zs(l,x)&&(m===g||o(m,g,n,r,i)))return l.push(x)})){p=!1;break}}else if(!(m===d||o(m,d,n,r,i))){p=!1;break}}return i.delete(e),i.delete(t),p}function Ra(e,t,n,r,o,i,s){switch(n){case ke:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Qr:return!(e.byteLength!=t.byteLength||!i(new Mr(e),new Mr(t)));case Hr:case Kr:case Jr:return co(+e,+t);case Xr:return e.name==t.name&&e.message==t.message;case Yr:case Zr:return e==t+"";case Ce:var u=Ks;case Ae:var c=r&$e;if(u||(u=Vs),e.size!=t.size&&!c)return!1;var a=s.get(e);if(a)return a==t;r|=Wr,s.set(e,t);var f=ao(u(e),u(t),r,o,i,s);return s.delete(e),f;case Ps:if(Tt)return Tt.call(e)==Tt.call(t)}return!1}function $a(e,t,n,r,o,i){var s=n&$e,u=qr(e),c=u.length,a=qr(t),f=a.length;if(c!=f&&!s)return!1;for(var p=c;p--;){var l=u[p];if(!(s?l in t:C.call(t,l)))return!1}var m=i.get(e);if(m&&i.get(t))return m==t;var d=!0;i.set(e,t),i.set(t,e);for(var y=s;++p<c;){l=u[p];var g=e[l],x=t[l];if(r)var b=s?r(x,g,l,t,e,i):r(g,x,l,e,t,i);if(!(b===void 0?g===x||o(g,x,n,r,i):b)){d=!1;break}y||(y=l=="constructor")}if(d&&!y){var j=e.constructor,P=t.constructor;j!=P&&"constructor"in e&&"constructor"in t&&!(typeof j=="function"&&j instanceof j&&typeof P=="function"&&P instanceof P)&&(d=!1)}return i.delete(e),i.delete(t),d}function qr(e){return Ca(e,Ka,Ga)}function Me(e,t){var n=e.__data__;return La(t)?n[typeof t=="string"?"string":"hash"]:n.map}function re(e,t){var n=Hs(e,t);return ka(n)?n:void 0}function Ba(e){var t=C.call(e,D),n=e[D];try{e[D]=void 0;var r=!0}catch{}var o=oo.call(e);return r&&(t?e[D]=n:delete e[D]),o}var Ga=Lr?function(e){return e==null?[]:(e=Object(e),Ls(Lr(e),function(t){return io.call(e,t)}))}:Xa,B=ge;(jt&&B(new jt(new ArrayBuffer(1)))!=ke||de&&B(new de)!=Ce||It&&B(It.resolve())!=Nr||Ot&&B(new Ot)!=Ae||Ct&&B(new Ct)!=_t)&&(B=function(e){var t=ge(e),n=t==te?e.constructor:void 0,r=n?W(n):"";if(r)switch(r){case na:return ke;case ra:return Ce;case oa:return Nr;case ia:return Ae;case sa:return _t}return t});function Ma(e,t){return t=t??zr,!!t&&(typeof e=="number"||Gs.test(e))&&e>-1&&e%1==0&&e<t}function La(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Da(e){return!!Br&&Br in e}function Ua(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Be;return e===n}function qa(e){return oo.call(e)}function W(e){if(e!=null){try{return ro.call(e)}catch{}try{return e+""}catch{}}return""}function co(e,t){return e===t||e!==e&&t!==t}var Wa=Ur(function(){return arguments}())?Ur:function(e){return me(e)&&C.call(e,"callee")&&!io.call(e,"callee")},Re=Array.isArray;function za(e){return e!=null&&fo(e.length)&&!uo(e)}var At=ea||Va;function Ha(e,t){return so(e,t)}function uo(e){if(!lo(e))return!1;var t=ge(e);return t==Vr||t==vs||t==Ss||t==Ts}function fo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=zr}function lo(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function me(e){return e!=null&&typeof e=="object"}var po=$r?Ws($r):Na;function Ka(e){return za(e)?Oa(e):Fa(e)}function Xa(){return[]}function Va(){return!1}ne.exports=Ha});var vo=v((_u,Nt)=>{"use strict";var So=require("module"),Ja=require("path");Nt.exports=function(t,n,r){if(typeof n=="object"&&(r=n,n=void 0),r=r||{},n=n||"",r.appendPaths=r.appendPaths||[],r.prependPaths=r.prependPaths||[],typeof t!="string")throw new Error("code must be a string, not "+typeof t);var o=So._nodeModulePaths(Ja.dirname(n)),i=Nt.parent,s=new So(n,i);s.filename=n,s.paths=[].concat(r.prependPaths).concat(o).concat(r.appendPaths),s._compile(t,n);var u=s.exports;return i&&i.children&&i.children.splice(i.children.indexOf(s),1),u}});var Bt=require("commander"),Wo=h(require("path"));var Dt=require("commander"),Ut=h(require("fast-glob")),De=h(require("fs-extra")),qt=h(require("path")),k=h(require("@techor/log"));var Lt=h(require("fs-extra"));function z(e="./package.json"){return Lt.default.readJSONSync(e,{throws:!1})||{}}var Yo=z(),Zo={workspaces:Yo.workspaces};Dt.program.command("version <version>").description("Bump to specific version for workspace's packages").option("-p, --prefix <symbol>","Version prefix `^`, `~`, `>`, `>=`, `<`, `<=` ","^").option("-w, --workspaces <paths>","Specific your workspaces",Zo.workspaces).option("-ls, --list","List current bumpable dependency tree in workspaces",!1).action((e,{prefix:t,list:n,workspaces:r})=>{let o=t+e,i={},s={},u=r.map(f=>qt.default.join(f,"*package.json")),c=(f,p)=>{let l=!1;for(let m in f)m in s&&f[m]===""&&(f[m]=o,l=!0);return l};for(let f of Ut.default.sync(u)){let p=De.default.readJSONSync(f);p.private||(i[f]=p,s[p.name]=p,p.version=e)}for(let f in i){let p=i[f],{dependencies:l,peerDependencies:m}=i[f];l&&c(l,"dependencies"),m&&c(m,"peerDependencies"),n||De.default.writeJSONSync(f,p)}let a={};for(let f in s){let{dependencies:p,peerDependencies:l}=s[f],m=a[(0,k.paint)("**"+f+"**")]={},d=(y,g)=>{if(y){m[g]={};for(let x in y)if(x in s){let b=y[x];m[g][(0,k.paint)("**"+x+"**")]=b===o?null:o}}};d(p,"dependencies"),d(l,"peerDependencies"),Object.keys(a[(0,k.paint)("**"+f+"**")]).length||(a[(0,k.paint)("**"+f+"**")]=null)}k.default`📦`,k.default.tree(a),k.default.success`bump version to +${o}+ for ${Object.keys(s).length} packages in all workspace`});var Mo=require("commander"),Lo=h(require("fast-glob"));var xr=require("node:buffer"),br=h(require("node:path"),1),ft=h(require("node:child_process"),1),ae=h(require("node:process"),1),wr=h(kn(),1);function Ye(e){let t=typeof e=="string"?`
|
|
3
3
|
`:`
|
|
4
|
-
`.charCodeAt(),n=typeof e=="string"?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===n&&(e=e.slice(0,-1)),e}var oe=h(require("node:process"),1),X=h(require("node:path"),1),Nn=h(require("node:url"),1);function be(e={}){let{env:t=process.env,platform:n=process.platform}=e;return n!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"}function
|
|
5
|
-
${t}`,
|
|
4
|
+
`.charCodeAt(),n=typeof e=="string"?"\r":"\r".charCodeAt();return e[e.length-1]===t&&(e=e.slice(0,-1)),e[e.length-1]===n&&(e=e.slice(0,-1)),e}var oe=h(require("node:process"),1),X=h(require("node:path"),1),Nn=h(require("node:url"),1);function be(e={}){let{env:t=process.env,platform:n=process.platform}=e;return n!=="win32"?"PATH":Object.keys(t).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"}function Pi(e={}){let{cwd:t=oe.default.cwd(),path:n=oe.default.env[be()],execPath:r=oe.default.execPath}=e,o,i=t instanceof URL?Nn.default.fileURLToPath(t):t,s=X.default.resolve(i),u=[];for(;o!==s;)u.push(X.default.join(s,"node_modules/.bin")),o=s,s=X.default.resolve(s,"..");return u.push(X.default.resolve(i,r,"..")),[...u,n].join(X.default.delimiter)}function Fn({env:e=oe.default.env,...t}={}){e={...e};let n=be({env:e});return t.path=e[n],e[n]=Pi(t),e}var _i=(e,t,n,r)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;let o=Object.getOwnPropertyDescriptor(e,n),i=Object.getOwnPropertyDescriptor(t,n);!ji(o,i)&&r||Object.defineProperty(e,n,i)},ji=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},Ii=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},Oi=(e,t)=>`/* Wrapped ${e}*/
|
|
5
|
+
${t}`,Ci=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Ai=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),ki=(e,t,n)=>{let r=n===""?"":`with ${n.trim()}() `,o=Oi.bind(null,r,t.toString());Object.defineProperty(o,"name",Ai),Object.defineProperty(e,"toString",{...Ci,value:o})};function Ze(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let o of Reflect.ownKeys(t))_i(e,t,o,n);return Ii(e,t),ki(e,t,r),e}var we=new WeakMap,Rn=(e,t={})=>{if(typeof e!="function")throw new TypeError("Expected a function");let n,r=0,o=e.displayName||e.name||"<anonymous>",i=function(...s){if(we.set(i,++r),r===1)n=e.apply(this,s),e=null;else if(t.throw===!0)throw new Error(`Function \`${o}\` can only be called once`);return n};return Ze(i,e),we.set(i,r),i};Rn.callCount=e=>{if(!we.has(e))throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return we.get(e)};var $n=Rn;var Dn=require("os");var Bn=function(){let e=Qe-Gn+1;return Array.from({length:e},Ni)},Ni=function(e,t){return{name:`SIGRT${t+1}`,number:Gn+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},Gn=34,Qe=64;var Ln=require("os");var Mn=[{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"}];var et=function(){let e=Bn();return[...Mn,...e].map(Fi)},Fi=function({name:e,number:t,description:n,action:r,forced:o=!1,standard:i}){let{signals:{[e]:s}}=Ln.constants,u=s!==void 0;return{name:e,number:u?s:t,description:n,supported:u,action:r,forced:o,standard:i}};var Ri=function(){return et().reduce($i,{})},$i=function(e,{name:t,number:n,description:r,supported:o,action:i,forced:s,standard:u}){return{...e,[t]:{name:t,number:n,description:r,supported:o,action:i,forced:s,standard:u}}},Un=Ri(),Bi=function(){let e=et(),t=64+1,n=Array.from({length:t},(r,o)=>Gi(o,e));return Object.assign({},...n)},Gi=function(e,t){let n=Mi(e,t);if(n===void 0)return{};let{name:r,description:o,supported:i,action:s,forced:u,standard:c}=n;return{[e]:{name:r,number:e,description:o,supported:i,action:s,forced:u,standard:c}}},Mi=function(e,t){let n=t.find(({name:r})=>Dn.constants.signals[r]===e);return n!==void 0?n:t.find(r=>r.number===e)},Rc=Bi();var Li=({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:o,exitCode:i,isCanceled:s})=>e?`timed out after ${t} milliseconds`:s?"was canceled":n!==void 0?`failed with ${n}`:r!==void 0?`was killed with ${r} (${o})`:i!==void 0?`failed with exit code ${i}`:"failed",tt=({stdout:e,stderr:t,all:n,error:r,signal:o,exitCode:i,command:s,escapedCommand:u,timedOut:c,isCanceled:a,killed:f,parsed:{options:{timeout:p}}})=>{i=i===null?void 0:i,o=o===null?void 0:o;let l=o===void 0?void 0:Un[o].description,m=r&&r.code,y=`Command ${Li({timedOut:c,timeout:p,errorCode:m,signal:o,signalDescription:l,exitCode:i,isCanceled:a})}: ${s}`,g=Object.prototype.toString.call(r)==="[object Error]",x=g?`${y}
|
|
6
6
|
${r.message}`:y,b=[x,t,e].filter(Boolean).join(`
|
|
7
|
-
`);return g?(r.originalMessage=r.message,r.message=b):r=new Error(b),r.shortMessage=x,r.command=s,r.escapedCommand=u,r.exitCode=i,r.signal=o,r.signalDescription=l,r.stdout=e,r.stderr=t,n!==void 0&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=!!c,r.isCanceled=a,r.killed=f&&!c,r};var Se=["stdin","stdout","stderr"],
|
|
8
|
-
`).filter(o=>{let i=o.match(vr);if(i===null||!i[1])return!0;let s=i[1];return s.includes(".app/Contents/Resources/electron.asar")||s.includes(".app/Contents/Resources/default_app.asar")||s.includes("node_modules/electron/dist/resources/electron.asar")||s.includes("node_modules/electron/dist/resources/default_app.asar")?!1:!
|
|
9
|
-
`)}var
|
|
7
|
+
`);return g?(r.originalMessage=r.message,r.message=b):r=new Error(b),r.shortMessage=x,r.command=s,r.escapedCommand=u,r.exitCode=i,r.signal=o,r.signalDescription=l,r.stdout=e,r.stderr=t,n!==void 0&&(r.all=n),"bufferedData"in r&&delete r.bufferedData,r.failed=!0,r.timedOut=!!c,r.isCanceled=a,r.killed=f&&!c,r};var Se=["stdin","stdout","stderr"],Di=e=>Se.some(t=>e[t]!==void 0),qn=e=>{if(!e)return;let{stdio:t}=e;if(t===void 0)return Se.map(r=>e[r]);if(Di(e))throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${Se.map(r=>`\`${r}\``).join(", ")}`);if(typeof t=="string")return t;if(!Array.isArray(t))throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t}\``);let n=Math.max(t.length,Se.length);return Array.from({length:n},(r,o)=>t[o])};var Jn=h(require("node:os"),1),Yn=h(Vn(),1),Ui=1e3*5,Zn=(e,t="SIGTERM",n={})=>{let r=e(t);return qi(e,t,n,r),r},qi=(e,t,n,r)=>{if(!Wi(t,n,r))return;let o=Hi(n),i=setTimeout(()=>{e("SIGKILL")},o);i.unref&&i.unref()},Wi=(e,{forceKillAfterTimeout:t},n)=>zi(e)&&t!==!1&&n,zi=e=>e===Jn.default.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",Hi=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return Ui;if(!Number.isFinite(e)||e<0)throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},Qn=(e,t)=>{e.kill()&&(t.isCanceled=!0)},Ki=(e,t,n)=>{e.kill(t),n(Object.assign(new Error("Timed out"),{timedOut:!0,signal:t}))},er=(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(t===0||t===void 0)return r;let o,i=new Promise((u,c)=>{o=setTimeout(()=>{Ki(e,n,c)},t)}),s=r.finally(()=>{clearTimeout(o)});return Promise.race([i,s])},tr=({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},nr=async(e,{cleanup:t,detached:n},r)=>{if(!t||n)return r;let o=(0,Yn.default)(()=>{e.kill()});return r.finally(()=>{o()})};function rr(e){return e!==null&&typeof e=="object"&&typeof e.pipe=="function"}var at=h(sr(),1),ur=h(cr(),1),fr=(e,t)=>{t===void 0||e.stdin===void 0||(rr(t)?t.pipe(e.stdin):e.stdin.end(t))},lr=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr)return;let n=(0,ur.default)();return e.stdout&&n.add(e.stdout),e.stderr&&n.add(e.stderr),n},it=async(e,t)=>{if(e){e.destroy();try{return await t}catch(n){return n.bufferedData}}},st=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(!(!e||!n))return t?(0,at.default)(e,{encoding:t,maxBuffer:r}):at.default.buffer(e,{maxBuffer:r})},dr=async({stdout:e,stderr:t,all:n},{encoding:r,buffer:o,maxBuffer:i},s)=>{let u=st(e,{encoding:r,buffer:o,maxBuffer:i}),c=st(t,{encoding:r,buffer:o,maxBuffer:i}),a=st(n,{encoding:r,buffer:o,maxBuffer:i*2});try{return await Promise.all([s,u,c,a])}catch(f){return Promise.all([{error:f,signal:f.signal,timedOut:f.timedOut},it(e,u),it(t,c),it(n,a)])}};var ts=(async()=>{})().constructor.prototype,ns=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(ts,e)]),ct=(e,t)=>{for(let[n,r]of ns){let o=typeof t=="function"?(...i)=>Reflect.apply(r.value,t(),i):r.value.bind(t);Reflect.defineProperty(e,n,{...r,value:o})}return e},pr=e=>new Promise((t,n)=>{e.on("exit",(r,o)=>{t({exitCode:r,signal:o})}),e.on("error",r=>{n(r)}),e.stdin&&e.stdin.on("error",r=>{n(r)})});var mr=(e,t=[])=>Array.isArray(t)?[e,...t]:[e],rs=/^[\w.-]+$/,os=/"/g,is=e=>typeof e!="string"||rs.test(e)?e:`"${e.replace(os,'\\"')}"`,gr=(e,t)=>mr(e,t).join(" "),hr=(e,t)=>mr(e,t).map(n=>is(n)).join(" "),ss=/ +/g,yr=e=>{let t=[];for(let n of e.trim().split(ss)){let r=t[t.length-1];r&&r.endsWith("\\")?t[t.length-1]=`${r.slice(0,-1)} ${n}`:t.push(n)}return t};var as=1e3*1e3*100,cs=({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:o})=>{let i=t?{...ae.default.env,...e}:e;return n?Fn({env:i,cwd:r,execPath:o}):i},us=(e,t,n={})=>{let r=wr.default._parse(e,t,n);return e=r.command,t=r.args,n=r.options,n={maxBuffer:as,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:n.cwd||ae.default.cwd(),execPath:ae.default.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n},n.env=cs(n),n.stdio=qn(n),ae.default.platform==="win32"&&br.default.basename(e,".exe")==="cmd"&&t.unshift("/q"),{file:e,args:t,options:n,parsed:r}},ut=(e,t,n)=>typeof t!="string"&&!xr.Buffer.isBuffer(t)?n===void 0?void 0:"":e.stripFinalNewline?Ye(t):t;function fs(e,t,n){let r=us(e,t,n),o=gr(e,t),i=hr(e,t);tr(r.options);let s;try{s=ft.default.spawn(r.file,r.args,r.options)}catch(m){let d=new ft.default.ChildProcess,y=Promise.reject(tt({error:m,stdout:"",stderr:"",all:"",command:o,escapedCommand:i,parsed:r,timedOut:!1,isCanceled:!1,killed:!1}));return ct(d,y)}let u=pr(s),c=er(s,r.options,u),a=nr(s,r.options,c),f={isCanceled:!1};s.kill=Zn.bind(null,s.kill.bind(s)),s.cancel=Qn.bind(null,s,f);let l=$n(async()=>{let[{error:m,exitCode:d,signal:y,timedOut:g},x,b,j]=await dr(s,r.options,a),P=ut(r.options,x),I=ut(r.options,b),ye=ut(r.options,j);if(m||d!==0||y!==null){let Gt=tt({error:m,exitCode:d,signal:y,stdout:P,stderr:I,all:ye,command:o,escapedCommand:i,parsed:r,timedOut:g,isCanceled:f.isCanceled||(r.options.signal?r.options.signal.aborted:!1),killed:s.killed});if(!r.options.reject)return Gt;throw Gt}return{command:o,escapedCommand:i,exitCode:0,stdout:P,stderr:I,all:ye,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return fr(s,r.options.input),s.all=lr(s,r.options),ct(s,l)}function Sr(e,t){let[n,...r]=yr(e);return fs(n,r,t)}var Do=require("esbuild");function lt(e,t=1,n={}){let{indent:r=" ",includeEmptyLines:o=!1}=n;if(typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(t<0)throw new RangeError(`Expected \`count\` to be at least 0, got \`${t}\``);if(typeof r!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r}\``);if(t===0)return e;let i=o?/^/gm:/^(?!\s*$)/gm;return e.replace(i,r.repeat(t))}var pt=h(require("os"),1);function dt(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var vr=/\s+at.*[(\s](.*)\)?/,ls=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/,ds=typeof pt.default.homedir>"u"?"":pt.default.homedir().replace(/\\/g,"/");function mt(e,{pretty:t=!1,basePath:n}={}){let r=n&&new RegExp(`(at | \\()${dt(n.replace(/\\/g,"/"))}`,"g");if(typeof e=="string")return e.replace(/\\/g,"/").split(`
|
|
8
|
+
`).filter(o=>{let i=o.match(vr);if(i===null||!i[1])return!0;let s=i[1];return s.includes(".app/Contents/Resources/electron.asar")||s.includes(".app/Contents/Resources/default_app.asar")||s.includes("node_modules/electron/dist/resources/electron.asar")||s.includes("node_modules/electron/dist/resources/default_app.asar")?!1:!ls.test(s)}).filter(o=>o.trim()!=="").map(o=>(r&&(o=o.replace(r,"$1")),t&&(o=o.replace(vr,(i,s)=>i.replace(s,s.replace(ds,"~")))),o)).join(`
|
|
9
|
+
`)}var ps=e=>e.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g,""),ce=class extends Error{#e;name="AggregateError";constructor(t){if(!Array.isArray(t))throw new TypeError(`Expected input to be an Array, got ${typeof t}`);t=t.map(r=>r instanceof Error?r:r!==null&&typeof r=="object"?Object.assign(new Error(r.message),r):new Error(r));let n=t.map(r=>typeof r.stack=="string"&&r.stack.length>0?ps(mt(r.stack)):String(r)).join(`
|
|
10
10
|
`);n=`
|
|
11
|
-
`+lt(n,4),super(n),this.#e=t}get errors(){return this.#e.slice()}};var gt=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t}},Er=e=>globalThis.DOMException===void 0?new gt(e):new DOMException(e),Tr=e=>{let t=e.reason===void 0?Er("This operation was aborted."):e.reason;return t instanceof Error?t:Er(t)};async function ht(e,t,{concurrency:n=Number.POSITIVE_INFINITY,stopOnError:r=!0,signal:o}={}){return new Promise((i,s)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(n)||n===Number.POSITIVE_INFINITY)&&n>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`);let u=[],c=[],a=new Map,f=!1,p=!1,l=!1,m=0,d=0,y=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),g=b=>{f=!0,p=!0,s(b)};o&&(o.aborted&&g(Tr(o)),o.addEventListener("abort",()=>{g(Tr(o))}));let x=async()=>{if(p)return;let b=await y.next(),j=d;if(d++,b.done){if(l=!0,m===0&&!p){if(!r&&c.length>0){g(new ce(c));return}if(p=!0,a.size===0){i(u);return}let P=[];for(let[I,ye]of u.entries())a.get(I)!==Pr&&P.push(ye);i(P)}return}m++,(async()=>{try{let P=await b.value;if(p)return;let I=await t(P,j);I===Pr&&a.set(j,I),u[j]=I,m--,await x()}catch(P){if(r)g(P);else{c.push(P),m--;try{await x()}catch(I){g(I)}}}})()};(async()=>{for(let b=0;b<n;b++){try{await x()}catch(j){g(j);break}if(l||f)break}})()})}var Pr=Symbol("skip");async function yt(e,t){return ht(e,n=>n(),t)}var O=h(require("@techor/log")),$=h(ee());var he=h(require("to-line"));var ms=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],gs=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],hs=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],ys=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Cr=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function Ie(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,...t};let n=t.bits?t.binary?ys:hs:t.binary?gs:ms;if(t.signed&&e===0)return` 0 ${n[0]}`;let r=e<0,o=r?"-":t.signed?"+":"";r&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){let a=Cr(e,t.locale,i);return o+a+" "+n[0]}let s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,i||(e=e.toPrecision(3));let u=Cr(Number(e),t.locale,i),c=n[s];return o+u+" "+c}var Lo=h(kr()),Ft=h(require("fs")),Do=h(mo());var go=["sourcemap","legalComments","sourceRoot","sourcesContent","format","globalName","target","supported","platform","mangleProps","reserveProps","mangleQuoted","mangleCache","drop","minify","minifyWhitespace","minifyIdentifiers","minifySyntax","charset","treeShaking","ignoreAnnotations","jsx","jsxFactory","jsxFragment","jsxImportSource","jsxDev","jsxSideEffects","define","pure","keepNames","color","logLevel","logLimit","logOverride","bundle","splitting","preserveSymlinks","outfile","metafile","outdir","outbase","external","packages","alias","loader","resolveExtensions","mainFields","conditions","write","allowOverwrite","tsconfig","outExtension","publicPath","entryNames","chunkNames","assetNames","inject","banner","footer","incremental","entryPoints","stdin","plugins","absWorkingDir","nodePaths","watch"];var ho=h(require("fs")),yo=h(require("fast-glob")),F=h(ee());function xo(e=".js",t="src"){let n=F.default.resolve(t);return{name:"fill-module-ext",setup(r){let o={};o.promise=new Promise(i=>{o.resolve=i}),r.onStart(()=>{o.resolve(!0)}),r.onLoad({filter:/\.(?:ts|tsx|js|jsx|mjs|mts)$/},async i=>{if(await o.promise===!0){let s=await ho.default.promises.readFile(i.path,{encoding:"utf8"}),u=F.default.dirname(i.path);return{contents:s.replace(/((?:(?:import|export)(?:.*from | ))|(?:(?:import))\()'((\.(?:\.)?\/.*)|\.)'/gmi,(...c)=>{let a=c[2],f=F.default.parse(a);if(f.ext)return c[1];let p=F.default.resolve(u,a),l=yo.default.sync([p+".{ts,js,mjs,jsx,tsx,mjs,mts}",F.default.join(p,"index.{ts,js,mjs,jsx,tsx,mjs,mts}")])[0];if(!l)return c[0];let m=F.default.relative(n,F.default.changeExt(l,e)),d=F.default.parse(m);return a==="."||a==="./"?m="./index"+e:d.name===f.name?m=a+e:m=a+"/index"+e,`${c[1]}'${m}'`}),loader:"tsx"}}})}}}var ko=h(ee(),1),Le=h(require("@techor/log"),1),No=h(require("fast-glob"),1);var Rt=h(ee(),1),Io=h(wo(),1),Oo=h(require("fast-glob"),1);function vo(e){let t=typeof Buffer<"u"?Buffer:null;return!!(t&&e instanceof t||e instanceof Date||e instanceof RegExp)}function Eo(e){if(typeof Buffer<"u"&&Buffer&&e instanceof Buffer){let t=Buffer.alloc(e.length);return e.copy(t),t}else{if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}}function To(e){let t=[];return e.forEach(function(n,r){typeof n=="object"&&n!==null?Array.isArray(n)?t[r]=To(n):vo(n)?t[r]=Eo(n):t[r]=A({},n):t[r]=n}),t}function So(e,t){return t==="__proto__"?void 0:e[t]}function A(...e){let t={},n,r;return e.forEach(function(o){typeof o!="object"||o===null||Array.isArray(o)||Object.keys(o).forEach(function(i){if(r=So(t,i),n=So(o,i),n!==t)if(typeof n!="object"||n===null){t[i]=n;return}else if(Array.isArray(n)){t[i]=To(n);return}else if(vo(n)){t[i]=Eo(n);return}else if(typeof r!="object"||r===null||Array.isArray(r)){t[i]=A({},n);return}else{t[i]=A(r,n);return}})}),t}var Co=require("esbuild");var Po=h(require("fs-extra"),1),_o=h(ee(),1);function jo(e="./package.json",{cwd:t=process.cwd()}={}){return Po.default.readJSONSync(t?_o.default.resolve(t,e):e,{throws:!1})}function Ao(e,t,n){t=A({cwd:process.cwd()},t);let r=jo(void 0,{cwd:t.cwd}),{dependencies:o,peerDependencies:i,devDependencies:s}=r||{},u=[];if(o&&u.push(...Object.keys(o)),i&&u.push(...Object.keys(i)),s&&u.push(...Object.keys(s)),!e)return;let c=Oo.default.sync(e,t)[0];if(!c)return;let a=Rt.default.resolve(t.cwd,c),f=(0,Co.buildSync)(A({entryPoints:[a],logLevel:process.env.NODE_ENV==="test"?"debug":"silent",bundle:!0,format:"cjs",write:!1,target:"esnext",platform:"node",external:u},n)),{text:p}=f.outputFiles[0];return(0,Io.default)(p,Rt.default.changeExt(a,".js"))}var Va={cwd:process.cwd()},Ja=Va,Ro=class{options;constructor(...e){this.options=A(Ja,...e)}logConfigFound=e=>Le.default.ok`**${e}** config file found`;logConfigNotFound=e=>Le.default.i`No **${e}** config file found`;readConfig(e="config"){let{config:t,cwd:n}=this.options;if(typeof t=="object")return t;let r;try{let o=this.configPath;if(o){let i=Ao(o,{cwd:n});r=(e?i[e]:void 0)||i.default||i,this.logConfigFound(o)}else this.logConfigNotFound(t)}catch(o){Le.default.error(o)}return r}get configPath(){let{cwd:e,config:t}=this.options;if(!(!t||typeof t!="string"))return No.default.sync(t,{cwd:e})[0]}get resolvedConfigPath(){let e=this.configPath;return e?ko.default.resolve(this.options.cwd,e):""}};var Ya=new Ro({config:"aron.{js,ts,cjs,mjs}"}),Za={js:"cjs",cjs:"cjs",mjs:"esm",css:"css"},E=z(),{dependencies:Fo,peerDependencies:$o}=E,$t=[];Fo&&$t.push(...Object.keys(Fo));$o&&$t.push(...Object.keys($o));Bo.program.command("pack [entryPaths...]").option("-f, --format [formats...]","The output format for the generated JavaScript files `iife`, `cjs`, `esm`",["cjs","esm"]).option("-t, --shakable-format [formats...]","Tree-shakable module's formats",["cjs","esm"]).option("--shakable","Enable outputting tree-shakable modules",!1).option("-w, --watch","Rebuild whenever a file changes",!1).option("-s, --sourcemap","Emit a source map",process.env.NODE_ENV==="production").option("-p, --platform <node,browser,neutral>","Platform target","browser").option("-t, --type","Emit typescript declarations",E.types).option("-o, --outdir <dir>","The output directory for the build operation","dist").option("-o, --serve","Serve mode starts a web server that serves your code to your browser on your device",!1).option("-e, --external <packages...>","External packages to exclude from the build",$t).option("-ee, --extra-external <packages...>","Extra external packages to exclude from the build",[]).option("-re, --resolve-extensions [extensions...]","The resolution algorithm used by node supports implicit file extensions",[".tsx",".ts",".jsx",".js",".css",".json"]).option("-kn, --keep-names","Keep JavaScript function/class names",!1).option("--cjs-ext <ext>","Specify CommonJS default file extension",".js").option("--iife-ext <ext>","Specify CommonJS default file extension",".js").option("--esm-ext <ext>","Specify CommonJS default file extension",".mjs").option("--srcdir <dir>","The source directory","src").option("--target","This sets the target environment for the generated JavaScript and/or CSS code.","esnext").option("--mangle-props","Pass a regular expression to esbuild to tell esbuild to automatically rename all properties that match this regular expression","^_").option("--no-bundle","OFF: Inline any imported dependencies into the file itself",!0).option("--no-minify","OFF: Minify the generated code").option("--no-clean","OFF: Clean up the previous output directory before the build starts").action(async function(e,t,n){t.clean&&Ft.default.existsSync(t.outdir)&&(Ft.default.rmSync(t.outdir,{force:!0,recursive:!0}),console.log(""),O.default.d`Cleaned up the **${t.outdir}** output directory`);let r=Ya.readConfig(null),o=[],i=(c,a)=>{let f=$.default.relative(t.outdir,c),p=$.default.join(t.srcdir,f);return $.default.changeExt(p,a)},s=async(c,a)=>{let f=a.format==="css",p=a.ext||a.outFile&&$.default.extname(a.outFile)||void 0,l=[...t.external,...t.extraExternal],m=a.outdir||t.outdir;t.bundle&&a.softBundle&&l.push(".*");let d=A(t,{outExtension:f?{".css":".css"}:{".js":p||{cjs:t.cjsExt,esm:t.esmExt,iife:t.iifeExt}[a.format]},logLevel:"info",outdir:m,outbase:t.srcdir,platform:a.platform||t.platform,metafile:!0,format:f?void 0:a.format,keepNames:t.keepNames,resolveExtensions:t.resolveExtensions,mangleProps:t.mangleProps?new RegExp(t.mangleProps):void 0,target:t.target,sourcemap:t.sourcemap,external:l,plugins:[]},r?.pack);t.bundle||delete d.external,a.softBundle&&a.format==="esm"&&d.plugins.push(xo(t.esmExt)),delete d.watch,delete d.serve;for(let g in d)go.includes(g)||delete d[g];d.entryPoints=Go.default.sync([...new Set(c)].map(g=>(0,Lo.default)(g))).filter(g=>!o.find(x=>x.options.entryPoints.includes(g)&&x.options.format===d.format&&(0,Do.default)(x.options.outExtension,d.outExtension)&&x.options.outdir===d.outdir));let y={options:d,run:async()=>{let g=await(0,Mo.context)(d),{metafile:x}=await g.rebuild();if(x){console.log(""),y.metafile=x;for(let b in x.outputs){let j=x.outputs[b],P=Ie(j.bytes).replace(/ /g,""),I=x.outputs[b].format=a.format;O.default`${O.chalk.dim("\u2502")} $t [${I}] **${b}** ${P} (${Object.keys(j.inputs).length} inputs)`}O.default.tree({entries:d.entryPoints,external:d.external,outdir:d.outdir,format:d.format,platform:d.platform,[Object.keys(d).filter(b=>d[b]===!0).map(b=>O.chalk.green("\u2713 ")+b).join(", ")]:null})}t.watch?await g.watch():await g.dispose(),t.serve&&await g.serve()}};d.entryPoints.length&&o.push(y)};if(t.shakable&&t.shakableFormat.length&&t.shakableFormat.forEach(c=>s([$.default.join(t.srcdir,"**/*.{js,ts,jsx,tsx,mjs,mts}")],{format:c,platform:"node",outdir:$.default.join(t.outdir,c),softBundle:!0})),e.length){let c=e.filter(f=>f.includes(".css")),a=e.filter(f=>!f.includes(".css"));c.length&&s(c,{format:"css"}),a.length&&t.format.forEach(f=>s(a,{format:f}))}else if(E.exports&&function c(a,f,p){if(typeof a=="string"){let l=$.default.extname(a);s([i(a,".{js,ts,jsx,tsx,mjs,mts}")],{format:p.format||Za[l],outFile:p.outFile||a,platform:p.platform})}else for(let l in a){let m=a[l],d,y;switch(f){case"node":y="node";break;case"browser":y="browser";break;case"require":d="cjs";break;case"import":d="esm";break}if(l.startsWith("."))c(m,l);else switch(l){case"node":c(m,l,{platform:"node",format:d});break;case"browser":c(m,l,{platform:"browser",format:d});break;case"default":c(m,l,{platform:y,format:d});break;case"require":c(m,l,{platform:y,format:"cjs"});break;case"import":c(m,l,{platform:y,format:"esm"});break}}}(E.exports,""),E.style&&s([i(E.main,".css")],{format:"css"}),E.main&&!E.main.endsWith(".css")&&s([i(E.main,".{js,ts,jsx,tsx,mjs,mts}")],{format:"cjs",outFile:E.main}),E.module&&s([i(E.module,".{js,ts,jsx,tsx,mjs,mts}")],{format:"esm",outFile:E.module}),E.browser&&s([i(E.browser,".{js,ts,jsx,tsx,mjs,mts}")],{format:"iife",platform:"browser",outFile:E.browser}),E.bin)if(typeof E.bin=="string")s([i(E.bin,".{js,ts,jsx,tsx,mjs,mts}")],{format:"cjs",platform:"node",outFile:E.bin});else for(let c in E.bin){let a=E.bin[c];s([i(a,".{js,ts,jsx,tsx,mjs,mts}")],{format:"cjs",platform:"node",outFile:a})}o.length||t.format.map(c=>s([$.default.join(t.srcdir,"index.ts")],{format:c}));let u;t.type&&(u={outFile:"declarations",options:{platform:"type",format:"dts"},run:()=>new Promise(c=>{let a=()=>Sr(he.default`
|
|
11
|
+
`+lt(n,4),super(n),this.#e=t}get errors(){return this.#e.slice()}};var gt=class extends Error{constructor(t){super(),this.name="AbortError",this.message=t}},Er=e=>globalThis.DOMException===void 0?new gt(e):new DOMException(e),Tr=e=>{let t=e.reason===void 0?Er("This operation was aborted."):e.reason;return t instanceof Error?t:Er(t)};async function ht(e,t,{concurrency:n=Number.POSITIVE_INFINITY,stopOnError:r=!0,signal:o}={}){return new Promise((i,s)=>{if(e[Symbol.iterator]===void 0&&e[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof e})`);if(typeof t!="function")throw new TypeError("Mapper function is required");if(!((Number.isSafeInteger(n)||n===Number.POSITIVE_INFINITY)&&n>=1))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`);let u=[],c=[],a=new Map,f=!1,p=!1,l=!1,m=0,d=0,y=e[Symbol.iterator]===void 0?e[Symbol.asyncIterator]():e[Symbol.iterator](),g=b=>{f=!0,p=!0,s(b)};o&&(o.aborted&&g(Tr(o)),o.addEventListener("abort",()=>{g(Tr(o))}));let x=async()=>{if(p)return;let b=await y.next(),j=d;if(d++,b.done){if(l=!0,m===0&&!p){if(!r&&c.length>0){g(new ce(c));return}if(p=!0,a.size===0){i(u);return}let P=[];for(let[I,ye]of u.entries())a.get(I)!==Pr&&P.push(ye);i(P)}return}m++,(async()=>{try{let P=await b.value;if(p)return;let I=await t(P,j);I===Pr&&a.set(j,I),u[j]=I,m--,await x()}catch(P){if(r)g(P);else{c.push(P),m--;try{await x()}catch(I){g(I)}}}})()};(async()=>{for(let b=0;b<n;b++){try{await x()}catch(j){g(j);break}if(l||f)break}})()})}var Pr=Symbol("skip");async function yt(e,t){return ht(e,n=>n(),t)}var O=h(require("@techor/log")),$=h(ee());var he=h(require("to-line"));var hs=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],ys=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],xs=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],bs=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Cr=(e,t,n)=>{let r=e;return typeof t=="string"||Array.isArray(t)?r=e.toLocaleString(t,n):(t===!0||n!==void 0)&&(r=e.toLocaleString(void 0,n)),r};function Ie(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);t={bits:!1,binary:!1,...t};let n=t.bits?t.binary?bs:xs:t.binary?ys:hs;if(t.signed&&e===0)return` 0 ${n[0]}`;let r=e<0,o=r?"-":t.signed?"+":"";r&&(e=-e);let i;if(t.minimumFractionDigits!==void 0&&(i={minimumFractionDigits:t.minimumFractionDigits}),t.maximumFractionDigits!==void 0&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){let a=Cr(e,t.locale,i);return o+a+" "+n[0]}let s=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**s,i||(e=e.toPrecision(3));let u=Cr(Number(e),t.locale,i),c=n[s];return o+u+" "+c}var Uo=h(kr()),Rt=h(require("fs")),qo=h(mo());var go=["sourcemap","legalComments","sourceRoot","sourcesContent","format","globalName","target","supported","platform","mangleProps","reserveProps","mangleQuoted","mangleCache","drop","minify","minifyWhitespace","minifyIdentifiers","minifySyntax","charset","treeShaking","ignoreAnnotations","jsx","jsxFactory","jsxFragment","jsxImportSource","jsxDev","jsxSideEffects","define","pure","keepNames","color","logLevel","logLimit","logOverride","bundle","splitting","preserveSymlinks","outfile","metafile","outdir","outbase","external","packages","alias","loader","resolveExtensions","mainFields","conditions","write","allowOverwrite","tsconfig","outExtension","publicPath","entryNames","chunkNames","assetNames","inject","banner","footer","incremental","entryPoints","stdin","plugins","absWorkingDir","nodePaths","watch"];var ho=h(require("fs")),yo=h(require("fast-glob")),R=h(ee());function xo(e=".js",t="src"){let n=R.default.resolve(t);return{name:"fill-module-ext",setup(r){let o={};o.promise=new Promise(i=>{o.resolve=i}),r.onStart(()=>{o.resolve(!0)}),r.onLoad({filter:/\.(?:ts|tsx|js|jsx|mjs|mts)$/},async i=>{if(await o.promise===!0){let s=await ho.default.promises.readFile(i.path,{encoding:"utf8"}),u=R.default.dirname(i.path);return{contents:s.replace(/((?:(?:import|export)(?:.*from | ))|(?:(?:import))\()'((\.(?:\.)?\/.*)|\.)'/gmi,(...c)=>{let a=c[2],f=R.default.parse(a);if(f.ext)return c[1];let p=R.default.resolve(u,a),l=yo.default.sync([p+".{ts,js,mjs,jsx,tsx,mjs,mts}",R.default.join(p,"index.{ts,js,mjs,jsx,tsx,mjs,mts}")])[0];if(!l)return c[0];let m=R.default.relative(n,R.default.changeExt(l,e)),d=R.default.parse(m);return a==="."||a==="./"?m="./index"+e:d.name===f.name?m=a+e:m=a+"/index"+e,`${c[1]}'${m}'`}),loader:"tsx"}}})}}}var bo=h(require("fs")),wo={name:"remove-import-svelte-module-extension",setup(e){let t={};t.promise=new Promise(n=>{t.resolve=n}),e.onStart(()=>{t.resolve(!0)}),e.onLoad({filter:/\.(?:ts|tsx|js|jsx|mjs|mts)$/},async n=>{if(await t.promise===!0)return{contents:(await bo.default.promises.readFile(n.path,{encoding:"utf8"})).replace(/((?:(?:import|export)(?:.*from | ))|(?:(?:import))\()(')(\.(?:\.)?\/.*)(\.svelte)(')/gmi,(...o)=>o[1]+o[2]+o[3]+o[5]),loader:"ts"}})}};var Fo=h(ee(),1),Le=h(require("@techor/log"),1),Ro=h(require("fast-glob"),1);var Ft=h(ee(),1),Co=h(vo(),1),Ao=h(require("fast-glob"),1);function To(e){let t=typeof Buffer<"u"?Buffer:null;return!!(t&&e instanceof t||e instanceof Date||e instanceof RegExp)}function Po(e){if(typeof Buffer<"u"&&Buffer&&e instanceof Buffer){let t=Buffer.alloc(e.length);return e.copy(t),t}else{if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}}function _o(e){let t=[];return e.forEach(function(n,r){typeof n=="object"&&n!==null?Array.isArray(n)?t[r]=_o(n):To(n)?t[r]=Po(n):t[r]=A({},n):t[r]=n}),t}function Eo(e,t){return t==="__proto__"?void 0:e[t]}function A(...e){let t={},n,r;return e.forEach(function(o){typeof o!="object"||o===null||Array.isArray(o)||Object.keys(o).forEach(function(i){if(r=Eo(t,i),n=Eo(o,i),n!==t)if(typeof n!="object"||n===null){t[i]=n;return}else if(Array.isArray(n)){t[i]=_o(n);return}else if(To(n)){t[i]=Po(n);return}else if(typeof r!="object"||r===null||Array.isArray(r)){t[i]=A({},n);return}else{t[i]=A(r,n);return}})}),t}var ko=require("esbuild");var jo=h(require("fs-extra"),1),Io=h(ee(),1);function Oo(e="./package.json",{cwd:t=process.cwd()}={}){return jo.default.readJSONSync(t?Io.default.resolve(t,e):e,{throws:!1})}function No(e,t,n){t=A({cwd:process.cwd()},t);let r=Oo(void 0,{cwd:t.cwd}),{dependencies:o,peerDependencies:i,devDependencies:s}=r||{},u=[];if(o&&u.push(...Object.keys(o)),i&&u.push(...Object.keys(i)),s&&u.push(...Object.keys(s)),!e)return;let c=Ao.default.sync(e,t)[0];if(!c)return;let a=Ft.default.resolve(t.cwd,c),f=(0,ko.buildSync)(A({entryPoints:[a],logLevel:process.env.NODE_ENV==="test"?"debug":"silent",bundle:!0,format:"cjs",write:!1,target:"esnext",platform:"node",external:u},n)),{text:p}=f.outputFiles[0];return(0,Co.default)(p,Ft.default.changeExt(a,".js"))}var Ya={cwd:process.cwd()},Za=Ya,$o=class{options;constructor(...e){this.options=A(Za,...e)}logConfigFound=e=>Le.default.ok`**${e}** config file found`;logConfigNotFound=e=>Le.default.i`No **${e}** config file found`;readConfig(e="config"){let{config:t,cwd:n}=this.options;if(typeof t=="object")return t;let r;try{let o=this.configPath;if(o){let i=No(o,{cwd:n});r=(e?i[e]:void 0)||i.default||i,this.logConfigFound(o)}else this.logConfigNotFound(t)}catch(o){Le.default.error(o)}return r}get configPath(){let{cwd:e,config:t}=this.options;if(!(!t||typeof t!="string"))return Ro.default.sync(t,{cwd:e})[0]}get resolvedConfigPath(){let e=this.configPath;return e?Fo.default.resolve(this.options.cwd,e):""}};var Qa=new $o({config:"aron.{js,ts,cjs,mjs}"}),ec={js:"cjs",cjs:"cjs",mjs:"esm",css:"css"},E=z(),{dependencies:Bo,peerDependencies:Go}=E,$t=[];Bo&&$t.push(...Object.keys(Bo));Go&&$t.push(...Object.keys(Go));Mo.program.command("pack [entryPaths...]").option("-f, --format [formats...]","The output format for the generated JavaScript files `iife`, `cjs`, `esm`",["cjs","esm"]).option("-t, --shakable-format [formats...]","Tree-shakable module's formats",["cjs","esm"]).option("--shakable","Enable outputting tree-shakable modules",!1).option("-w, --watch","Rebuild whenever a file changes",!1).option("-s, --sourcemap","Emit a source map",process.env.NODE_ENV==="production").option("-p, --platform <node,browser,neutral>","Platform target","browser").option("-t, --type","Emit typescript declarations",E.types).option("-o, --outdir <dir>","The output directory for the build operation","dist").option("-o, --serve","Serve mode starts a web server that serves your code to your browser on your device",!1).option("-e, --external <packages...>","External packages to exclude from the build",$t).option("-ee, --extra-external <packages...>","Extra external packages to exclude from the build",[]).option("-re, --resolve-extensions [extensions...]","The resolution algorithm used by node supports implicit file extensions",[".tsx",".ts",".jsx",".js",".css",".json"]).option("-kn, --keep-names","Keep JavaScript function/class names",!1).option("--cjs-ext <ext>","Specify CommonJS default file extension",".js").option("--iife-ext <ext>","Specify CommonJS default file extension",".js").option("--esm-ext <ext>","Specify CommonJS default file extension",".mjs").option("--framework <name>","Specify a framework like `svelte` to resolve related issues automatically").option("--srcdir <dir>","The source directory","src").option("--target","This sets the target environment for the generated JavaScript and/or CSS code.","esnext").option("--mangle-props","Pass a regular expression to esbuild to tell esbuild to automatically rename all properties that match this regular expression","^_").option("--no-bundle","OFF: Inline any imported dependencies into the file itself",!0).option("--no-minify","OFF: Minify the generated code").option("--no-clean","OFF: Clean up the previous output directory before the build starts").action(async function(e,t,n){t.clean&&Rt.default.existsSync(t.outdir)&&(Rt.default.rmSync(t.outdir,{force:!0,recursive:!0}),console.log(""),O.default.d`Cleaned up the **${t.outdir}** output directory`);let r=Qa.readConfig(null),o=[],i=(c,a)=>{let f=$.default.relative(t.outdir,c),p=$.default.join(t.srcdir,f);return $.default.changeExt(p,a)},s=async(c,a)=>{let f=a.format==="css",p=a.ext||a.outFile&&$.default.extname(a.outFile)||void 0,l=[...t.external,...t.extraExternal],m=a.outdir||t.outdir;t.bundle&&a.softBundle&&l.push(".*");let d=A(t,{outExtension:f?{".css":".css"}:{".js":p||{cjs:t.cjsExt,esm:t.esmExt,iife:t.iifeExt}[a.format]},logLevel:"info",outdir:m,outbase:t.srcdir,platform:a.platform||t.platform,metafile:!0,format:f?void 0:a.format,keepNames:t.keepNames,resolveExtensions:t.resolveExtensions,mangleProps:t.mangleProps?new RegExp(t.mangleProps):void 0,target:t.target,sourcemap:t.sourcemap,external:l,plugins:[]},r?.pack);switch(t.bundle||delete d.external,t.framework){case"svelte":d.plugins.push(wo);break}a.softBundle&&a.format==="esm"&&d.plugins.push(xo(t.esmExt)),delete d.watch,delete d.serve,delete d.framework;for(let g in d)go.includes(g)||delete d[g];d.entryPoints=Lo.default.sync([...new Set(c)].map(g=>(0,Uo.default)(g))).filter(g=>!o.find(x=>x.options.entryPoints.includes(g)&&x.options.format===d.format&&(0,qo.default)(x.options.outExtension,d.outExtension)&&x.options.outdir===d.outdir));let y={options:d,run:async()=>{let g=await(0,Do.context)(d),{metafile:x}=await g.rebuild();if(x){console.log(""),y.metafile=x;for(let b in x.outputs){let j=x.outputs[b],P=Ie(j.bytes).replace(/ /g,""),I=x.outputs[b].format=a.format;O.default`${O.chalk.dim("\u2502")} $t [${I}] **${b}** ${P} (${Object.keys(j.inputs).length} inputs)`}O.default.tree({entries:d.entryPoints,external:d.external,outdir:d.outdir,format:d.format,platform:d.platform,[Object.keys(d).filter(b=>d[b]===!0).map(b=>O.chalk.green("\u2713 ")+b).join(", ")]:null})}t.watch?await g.watch():await g.dispose(),t.serve&&await g.serve()}};d.entryPoints.length&&o.push(y)};if(t.shakable&&t.shakableFormat.length&&t.shakableFormat.forEach(c=>s([$.default.join(t.srcdir,"**/*.{js,ts,jsx,tsx,mjs,mts}")],{format:c,platform:"node",outdir:$.default.join(t.outdir,c),softBundle:!0})),e.length){let c=e.filter(f=>f.includes(".css")),a=e.filter(f=>!f.includes(".css"));c.length&&s(c,{format:"css"}),a.length&&t.format.forEach(f=>s(a,{format:f}))}else if(E.exports&&function c(a,f,p){if(typeof a=="string"){let l=$.default.extname(a);s([i(a,".{js,ts,jsx,tsx,mjs,mts}")],{format:p.format||ec[l],outFile:p.outFile||a,platform:p.platform})}else for(let l in a){let m=a[l],d,y;switch(f){case"node":y="node";break;case"browser":y="browser";break;case"require":d="cjs";break;case"import":d="esm";break}if(l.startsWith("."))c(m,l);else switch(l){case"node":c(m,l,{platform:"node",format:d});break;case"browser":c(m,l,{platform:"browser",format:d});break;case"default":c(m,l,{platform:y,format:d});break;case"require":c(m,l,{platform:y,format:"cjs"});break;case"import":c(m,l,{platform:y,format:"esm"});break}}}(E.exports,""),E.style&&s([i(E.main,".css")],{format:"css"}),E.main&&!E.main.endsWith(".css")&&s([i(E.main,".{js,ts,jsx,tsx,mjs,mts}")],{format:"cjs",outFile:E.main}),E.module&&s([i(E.module,".{js,ts,jsx,tsx,mjs,mts}")],{format:"esm",outFile:E.module}),E.browser&&s([i(E.browser,".{js,ts,jsx,tsx,mjs,mts}")],{format:"iife",platform:"browser",outFile:E.browser}),E.bin)if(typeof E.bin=="string")s([i(E.bin,".{js,ts,jsx,tsx,mjs,mts}")],{format:"cjs",platform:"node",outFile:E.bin});else for(let c in E.bin){let a=E.bin[c];s([i(a,".{js,ts,jsx,tsx,mjs,mts}")],{format:"cjs",platform:"node",outFile:a})}o.length||t.format.map(c=>s([$.default.join(t.srcdir,"index.ts")],{format:c}));let u;t.type&&(u={outFile:"declarations",options:{platform:"type",format:"dts"},run:()=>new Promise(c=>{let a=()=>Sr(he.default`
|
|
12
12
|
npx tsc --emitDeclarationOnly --preserveWatchOutput --declaration
|
|
13
13
|
--outDir ${t.outdir}
|
|
14
14
|
${t.watch&&"--watch"}
|
|
15
|
-
`,{stdio:"inherit",stripFinalNewline:!1}).catch(f=>{process.exit()}).finally(c);t.watch?setTimeout(a,100):a()})},t.watch||o.push(u)),await yt(o.map(({run:c})=>c)),console.log(""),t.watch&&u&&o.push(u);for(let c of o)c.metafile?Object.keys(c.metafile.outputs).forEach(a=>{let f=c.metafile.outputs[a],p=Ie(f.bytes).replace(/ /g,""),l=f.format;O.default.ok(he.l`[${c.options.platform}] **${a}** ${p} (${l})`)}):O.default.ok(he.l`[${c.options.format}] **${c.outFile}** (${c.options.format})`);console.log(""),t.watch?O.default`Start watching ${o.length} build tasks`:O.default.success`${o.length} build tasks`,console.log(""),t.watch&&u&&await u.run()});var{version:
|
|
15
|
+
`,{stdio:"inherit",stripFinalNewline:!1}).catch(f=>{process.exit()}).finally(c);t.watch?setTimeout(a,100):a()})},t.watch||o.push(u)),await yt(o.map(({run:c})=>c)),console.log(""),t.watch&&u&&o.push(u);for(let c of o)c.metafile?Object.keys(c.metafile.outputs).forEach(a=>{let f=c.metafile.outputs[a],p=Ie(f.bytes).replace(/ /g,""),l=f.format;O.default.ok(he.l`[${c.options.platform}] **${a}** ${p} (${l})`)}):O.default.ok(he.l`[${c.options.format}] **${c.outFile}** (${c.options.format})`);console.log(""),t.watch?O.default`Start watching ${o.length} build tasks`:O.default.success`${o.length} build tasks`,console.log(""),t.watch&&u&&await u.run()});var{version:tc,name:nc,description:rc}=z(Wo.default.join(__dirname,"../../package.json"));Bt.program.name(nc).description(rc).version(tc);Bt.program.parse();
|
|
16
16
|
/*! Bundled license information:
|
|
17
17
|
|
|
18
18
|
normalize-path/index.js:
|