aronrepo 1.5.1 → 1.5.2
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 +9 -9
- 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 Lo=Object.create;var Mt=Object.defineProperty;var Do=Object.getOwnPropertyDescriptor;var Uo=Object.getOwnPropertyNames;var qo=Object.getPrototypeOf,Wo=Object.prototype.hasOwnProperty;var v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var zo=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Uo(t))!Wo.call(e,o)&&o!==n&&Mt(e,o,{get:()=>t[o],enumerable:!(r=Do(t,o))||r.enumerable});return e};var y=(e,t,n)=>(n=e!=null?Lo(qo(e)):{},zo(t||!e||!e.__esModule?Mt(n,"default",{value:e,enumerable:!0}):n,e));var Xt=v((nc,Kt)=>{Kt.exports=Ht;Ht.sync=Vo;var Wt=require("fs");function Xo(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:Xo(t,n)}function Ht(e,t,n){Wt.stat(e,function(r,o){n(r,r?!1:zt(o,e,t))})}function Vo(e,t){return zt(Wt.statSync(e),e,t)}});var Qt=v((rc,Zt)=>{Zt.exports=Yt;Yt.sync=Yo;var Vt=require("fs");function Yt(e,t,n){Vt.stat(e,function(r,o){n(r,r?!1:Jt(o,t))})}function Yo(e,t){return Jt(Vt.statSync(e),t)}function Jt(e,t){return e.isFile()&&Jo(e,t)}function Jo(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((ic,en)=>{var oc=require("fs"),xe;process.platform==="win32"||global.TESTING_WINDOWS?xe=Xt():xe=Qt();en.exports=Ue;Ue.sync=Zo;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 Zo(e,t){try{return xe.sync(e,t||{})}catch(n){if(t&&t.ignoreErrors||n.code==="EACCES")return!1;throw n}}});var un=v((sc,cn)=>{var H=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",nn=require("path"),Qo=H?";":":",rn=tn(),on=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),sn=(e,t)=>{let n=t.colon||Qo,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),h=!m&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d:d;f(c(h,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},(h,g)=>{if(!h&&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)},ei=(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=ei});var ln=v((ac,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((cc,mn)=>{"use strict";var dn=require("path"),ti=un(),ni=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=ti.sync(e.command,{path:n[ni({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 ri(e){return pn(e)||pn(e,!0)}mn.exports=ri});var hn=v((uc,ze)=>{"use strict";var We=/([()\][%!^"`<>&|;, *?])/g;function oi(e){return e=e.replace(We,"^$1"),e}function ii(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=oi;ze.exports.argument=ii});var xn=v((fc,yn)=>{"use strict";yn.exports=/^#!(.*)/});var wn=v((lc,bn)=>{"use strict";var si=xn();bn.exports=(e="")=>{let t=e.match(si);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((dc,Sn)=>{"use strict";var He=require("fs"),ai=wn();function ci(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 ai(n.toString())}Sn.exports=ci});var _n=v((pc,Pn)=>{"use strict";var ui=require("path"),En=gn(),Tn=hn(),fi=vn(),li=process.platform==="win32",di=/\.(?:com|exe)$/i,pi=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function mi(e){e.file=En(e);let t=e.file&&fi(e.file);return t?(e.args.unshift(e.file),e.command=t,En(e)):e.file}function gi(e){if(!li)return e;let t=mi(e),n=!di.test(t);if(e.options.forceShell||n){let r=pi.test(t);e.command=ui.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 hi(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:gi(r)}Pn.exports=hi});var On=v((mc,jn)=>{"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 yi(e,t){if(!Ke)return;let n=e.emit;e.emit=function(r,o){if(r==="exit"){let i=In(o,t,"spawn");if(i)return n.call(e,"error",i)}return n.apply(e,arguments)}}function In(e,t){return Ke&&e===1&&!t.file?Xe(t.original,"spawn"):null}function xi(e,t){return Ke&&e===1&&!t.file?Xe(t.original,"spawnSync"):null}jn.exports={hookChildProcess:yi,verifyENOENT:In,verifyENOENTSync:xi,notFoundError:Xe}});var Nn=v((gc,K)=>{"use strict";var Cn=require("child_process"),Ve=_n(),Ye=On();function An(e,t,n){let r=Ve(e,t,n),o=Cn.spawn(r.command,r.args,r.options);return Ye.hookChildProcess(o,r),o}function bi(e,t,n){let r=Ve(e,t,n),o=Cn.spawnSync(r.command,r.args,r.options);return o.error=o.error||Ye.verifyENOENTSync(o.status,r),o}K.exports=An;K.exports.spawn=An;K.exports.sync=bi;K.exports._parse=Ve;K.exports._enoent=Ye});var Wn=v((Fc,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(($c,J)=>{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),oe=require("events"),typeof oe!="function"&&(oe=oe.EventEmitter),S.__signal_exit_emitter__?T=S.__signal_exit_emitter__:(T=S.__signal_exit_emitter__=new oe,T.count=0,T.emitted={}),T.infinite||(T.setMaxListeners(1/0),T.infinite=!0),J.exports=function(e,t){if(!M(global.process))return function(){};zn.equal(typeof e,"function","a callback must be provided for exit handler"),Y===!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(){!Y||!M(global.process)||(Y=!1,V.forEach(function(t){try{S.removeListener(t,Te[t])}catch{}}),S.emit=Pe,S.reallyExit=rt,T.count-=1)},J.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))}}}),J.exports.signals=function(){return V},Y=!1,nt=function(){Y||!M(global.process)||(Y=!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)},J.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)}):J.exports=function(){return function(){}};var zn,V,Hn,oe,T,Ee,L,Te,Y,nt,rt,Kn,Pe,Xn});var ir=v((Mc,or)=>{"use strict";var{PassThrough:qi}=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 qi({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((Lc,ie)=>{"use strict";var{constants:Wi}=require("buffer"),zi=require("stream"),{promisify:Hi}=require("util"),Ki=ir(),Xi=Hi(zi.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=Ki(t);return await new Promise((o,i)=>{let s=u=>{u&&r.getBufferedLength()<=Wi.MAX_LENGTH&&(u.bufferedData=r.getBufferedValue()),i(u)};(async()=>{try{await Xi(e,r),o()}catch(u){s(u)}})(),r.on("data",()=>{r.getBufferedLength()>n&&s(new _e)})}),r.getBufferedValue()}ie.exports=ot;ie.exports.buffer=(e,t)=>ot(e,{...t,encoding:"buffer"});ie.exports.array=(e,t)=>ot(e,{...t,array:!0});ie.exports.MaxBufferError=_e});var cr=v((Dc,ar)=>{"use strict";var{PassThrough:Vi}=require("stream");ar.exports=function(){var e=[],t=new Vi({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 fe=v(Or=>{var xt="2.0.1",_r,Ie,Ir,wt,St,Z,ue,ce,bt,Q,_,jr=[].slice,us=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},fs={}.hasOwnProperty;ue=require("path");Ir=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(ce in ue)bt=ue[ce],Ir(bt)?_[ce]=function(e){return function(){var t,n;return t=1<=arguments.length?jr.call(arguments,0):[],t=t.map(function(r){return wt(r)?Q(r):r}),n=ue[e].apply(ue,t),wt(n)?Q(n):n}}(ce):_[ce]=bt;_.sep="/";Ie={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?jr.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&&us.call(t.map(function(r){return(r&&r[0]!=="."?".":"")+r}),e)<0};for(Z in Ie)if(fs.call(Ie,Z)){if(_r=Ie[Z],_[Z]!==void 0)throw new Error("path."+Z+" already exists.");_[Z]=_r}});var Nr=v((yu,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,te)=>{var gs=200,Nt="__lodash_hash_undefined__",$e=1,Wr=2,zr=9007199254740991,Oe="[object Arguments]",Pt="[object Array]",hs="[object AsyncFunction]",Hr="[object Boolean]",Kr="[object Date]",Xr="[object Error]",Vr="[object Function]",ys="[object GeneratorFunction]",Ce="[object Map]",Yr="[object Number]",xs="[object Null]",ee="[object Object]",kr="[object Promise]",bs="[object Proxy]",Jr="[object RegExp]",Ae="[object Set]",Zr="[object String]",ws="[object Symbol]",Ss="[object Undefined]",_t="[object WeakMap]",Qr="[object ArrayBuffer]",Ne="[object DataView]",vs="[object Float32Array]",Es="[object Float64Array]",Ts="[object Int8Array]",Ps="[object Int16Array]",_s="[object Int32Array]",Is="[object Uint8Array]",js="[object Uint8ClampedArray]",Os="[object Uint16Array]",Cs="[object Uint32Array]",As=/[\\^$.*+?()[\]{}|]/g,Ns=/^\[object .+?Constructor\]$/,ks=/^(?:0|[1-9]\d*)$/,w={};w[vs]=w[Es]=w[Ts]=w[Ps]=w[_s]=w[Is]=w[js]=w[Os]=w[Cs]=!0;w[Oe]=w[Pt]=w[Qr]=w[Hr]=w[Ne]=w[Kr]=w[Xr]=w[Vr]=w[Ce]=w[Yr]=w[ee]=w[Jr]=w[Ae]=w[Zr]=w[_t]=!1;var eo=typeof global=="object"&&global&&global.Object===Object&&global,Rs=typeof self=="object"&&self&&self.Object===Object&&self,N=eo||Rs||Function("return this")(),to=typeof le=="object"&&le&&!le.nodeType&&le,Rr=to&&typeof te=="object"&&te&&!te.nodeType&&te,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 Fs(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 $s(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Bs(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 Gs(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ms(e){return function(t){return e(t)}}function Ls(e,t){return e.has(t)}function Ds(e,t){return e?.[t]}function Us(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function qs(e,t){return function(n){return e(t(n))}}function Ws(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var zs=Array.prototype,Hs=Function.prototype,Be=Object.prototype,Et=N["__core-js_shared__"],ro=Hs.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,Ks=RegExp("^"+ro.call(C).replace(As,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Gr=no?N.Buffer:void 0,ke=N.Symbol,Mr=N.Uint8Array,io=Be.propertyIsEnumerable,Xs=zs.splice,D=ke?ke.toStringTag:void 0,Lr=Object.getOwnPropertySymbols,Vs=Gr?Gr.isBuffer:void 0,Ys=qs(Object.keys,Object),It=ne(N,"DataView"),de=ne(N,"Map"),jt=ne(N,"Promise"),Ot=ne(N,"Set"),Ct=ne(N,"WeakMap"),pe=ne(Object,"create"),Js=W(It),Zs=W(de),Qs=W(jt),ea=W(Ot),ta=W(Ct),Dr=ke?ke.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 na(){this.__data__=pe?pe(null):{},this.size=0}function ra(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function oa(e){var t=this.__data__;if(pe){var n=t[e];return n===Nt?void 0:n}return C.call(t,e)?t[e]:void 0}function ia(e){var t=this.__data__;return pe?t[e]!==void 0:C.call(t,e)}function sa(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=pe&&t===void 0?Nt:t,this}U.prototype.clear=na;U.prototype.delete=ra;U.prototype.get=oa;U.prototype.has=ia;U.prototype.set=sa;function k(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__=[],this.size=0}function ca(e){var t=this.__data__,n=Ge(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Xs.call(t,n,1),--this.size,!0}function ua(e){var t=this.__data__,n=Ge(t,e);return n<0?void 0:t[n][1]}function fa(e){return Ge(this.__data__,e)>-1}function la(e,t){var n=this.__data__,r=Ge(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}k.prototype.clear=aa;k.prototype.delete=ca;k.prototype.get=ua;k.prototype.has=fa;k.prototype.set=la;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 da(){this.size=0,this.__data__={hash:new U,map:new(de||k),string:new U}}function pa(e){var t=Me(this,e).delete(e);return this.size-=t?1:0,t}function ma(e){return Me(this,e).get(e)}function ga(e){return Me(this,e).has(e)}function ha(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=da;q.prototype.delete=pa;q.prototype.get=ma;q.prototype.has=ga;q.prototype.set=ha;function Re(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new q;++t<n;)this.add(e[t])}function ya(e){return this.__data__.set(e,Nt),this}function xa(e){return this.__data__.has(e)}Re.prototype.add=Re.prototype.push=ya;Re.prototype.has=xa;function G(e){var t=this.__data__=new k(e);this.size=t.size}function ba(){this.__data__=new k,this.size=0}function wa(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Sa(e){return this.__data__.get(e)}function va(e){return this.__data__.has(e)}function Ea(e,t){var n=this.__data__;if(n instanceof k){var r=n.__data__;if(!de||r.length<gs-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=ba;G.prototype.delete=wa;G.prototype.get=Sa;G.prototype.has=va;G.prototype.set=Ea;function Ta(e,t){var n=Fe(e),r=!n&&Ma(e),o=!n&&!r&&At(e),i=!n&&!r&&!o&&po(e),s=n||r||o||i,u=s?Gs(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")||Ra(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 Pa(e,t,n){var r=t(e);return Fe(e)?r:$s(r,n(e))}function ge(e){return e==null?e===void 0?Ss:xs:D&&D in Object(e)?Na(e):Ga(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:_a(e,t,n,r,so,o)}function _a(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?ee:c,a=a==Oe?ee:a;var f=c==ee,p=a==ee,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):Ca(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 h=m?e.value():e,g=d?t.value():t;return i||(i=new G),o(h,g,n,r,i)}}return l?(i||(i=new G),Aa(e,t,n,r,o,i)):!1}function Ia(e){if(!lo(e)||$a(e))return!1;var t=uo(e)?Ks:Ns;return t.test(W(e))}function ja(e){return me(e)&&fo(e.length)&&!!w[ge(e)]}function Oa(e){if(!Ba(e))return Ys(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 h=s?r(d,m,f,t,e,i):r(m,d,f,e,t,i);if(h!==void 0){if(h)continue;p=!1;break}if(l){if(!Bs(t,function(g,x){if(!Ls(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 Ca(e,t,n,r,o,i,s){switch(n){case Ne: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 Yr:return co(+e,+t);case Xr:return e.name==t.name&&e.message==t.message;case Jr:case Zr:return e==t+"";case Ce:var u=Us;case Ae:var c=r&$e;if(u||(u=Ws),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 ws:if(Tt)return Tt.call(e)==Tt.call(t)}return!1}function Aa(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 h=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}h||(h=l=="constructor")}if(d&&!h){var I=e.constructor,P=t.constructor;I!=P&&"constructor"in e&&"constructor"in t&&!(typeof I=="function"&&I instanceof I&&typeof P=="function"&&P instanceof P)&&(d=!1)}return i.delete(e),i.delete(t),d}function qr(e){return Pa(e,Ua,ka)}function Me(e,t){var n=e.__data__;return Fa(t)?n[typeof t=="string"?"string":"hash"]:n.map}function ne(e,t){var n=Ds(e,t);return Ia(n)?n:void 0}function Na(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 ka=Lr?function(e){return e==null?[]:(e=Object(e),Fs(Lr(e),function(t){return io.call(e,t)}))}:qa,B=ge;(It&&B(new It(new ArrayBuffer(1)))!=Ne||de&&B(new de)!=Ce||jt&&B(jt.resolve())!=kr||Ot&&B(new Ot)!=Ae||Ct&&B(new Ct)!=_t)&&(B=function(e){var t=ge(e),n=t==ee?e.constructor:void 0,r=n?W(n):"";if(r)switch(r){case Js:return Ne;case Zs:return Ce;case Qs:return kr;case ea:return Ae;case ta:return _t}return t});function Ra(e,t){return t=t??zr,!!t&&(typeof e=="number"||ks.test(e))&&e>-1&&e%1==0&&e<t}function Fa(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function $a(e){return!!Br&&Br in e}function Ba(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Be;return e===n}function Ga(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 Ma=Ur(function(){return arguments}())?Ur:function(e){return me(e)&&C.call(e,"callee")&&!io.call(e,"callee")},Fe=Array.isArray;function La(e){return e!=null&&fo(e.length)&&!uo(e)}var At=Vs||Wa;function Da(e,t){return so(e,t)}function uo(e){if(!lo(e))return!1;var t=ge(e);return t==Vr||t==ys||t==hs||t==bs}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?Ms($r):ja;function Ua(e){return La(e)?Ta(e):Oa(e)}function qa(){return[]}function Wa(){return!1}te.exports=Da});var wo=v((wu,kt)=>{"use strict";var bo=require("module"),za=require("path");kt.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(za.dirname(n)),i=kt.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"),Mo=y(require("path"));var Dt=require("commander"),Ut=y(require("fast-glob")),De=y(require("fs-extra")),qt=y(require("path")),A=y(require("@techor/log"));var Lt=y(require("fs-extra"));function z(e="./package.json"){return Lt.default.readJSONSync(e,{throws:!1})||{}}var Ho=z(),Ko={workspaces:Ho.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",Ko.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,A.paint)("**"+f+"**")]={},d=(h,g)=>{if(h){m[g]={};for(let x in h)if(x in s){let b=h[x];m[g][(0,A.paint)("**"+x+"**")]=b===o?null:o}}};d(p,"dependencies"),d(l,"peerDependencies"),Object.keys(a[(0,A.paint)("**"+f+"**")]).length||(a[(0,A.paint)("**"+f+"**")]=null)}A.default`📦`,A.default.tree(a),A.default.success`bump version to +${o}+ for ${Object.keys(s).length} packages in all workspace`});var Ro=require("commander"),Fo=y(require("fast-glob"));var xr=require("node:buffer"),br=y(require("node:path"),1),ft=y(require("node:child_process"),1),se=y(require("node:process"),1),wr=y(Nn(),1);function Je(e){let t=typeof e=="string"?`
|
|
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"?`
|
|
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
|
|
5
|
-
${t}`,
|
|
6
|
-
${r.message}`:
|
|
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
|
|
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 Ei(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 Rn({env:e=oe.default.env,...t}={}){e={...e};let n=be({env:e});return t.path=e[n],e[n]=Ei(t),e}var Ti=(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);!Pi(o,i)&&r||Object.defineProperty(e,n,i)},Pi=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)},_i=(e,t)=>{let n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},ji=(e,t)=>`/* Wrapped ${e}*/
|
|
5
|
+
${t}`,Ii=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Oi=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Ci=(e,t,n)=>{let r=n===""?"":`with ${n.trim()}() `,o=ji.bind(null,r,t.toString());Object.defineProperty(o,"name",Oi),Object.defineProperty(e,"toString",{...Ii,value:o})};function Ze(e,t,{ignoreNonConfigurable:n=!1}={}){let{name:r}=e;for(let o of Reflect.ownKeys(t))Ti(e,t,o,n);return _i(e,t),Ci(e,t,r),e}var we=new WeakMap,Fn=(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};Fn.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=Fn;var Dn=require("os");var Bn=function(){let e=Qe-Gn+1;return Array.from({length:e},Ai)},Ai=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(ki)},ki=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 Ni=function(){return et().reduce(Ri,{})},Ri=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=Ni(),Fi=function(){let e=et(),t=64+1,n=Array.from({length:t},(r,o)=>$i(o,e));return Object.assign({},...n)},$i=function(e,t){let n=Bi(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}}},Bi=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)},Nc=Fi();var Gi=({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 ${Gi({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
|
+
${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"],Mi=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(Mi(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),Li=1e3*5,Zn=(e,t="SIGTERM",n={})=>{let r=e(t);return Di(e,t,n,r),r},Di=(e,t,n,r)=>{if(!Ui(t,n,r))return;let o=Wi(n),i=setTimeout(()=>{e("SIGKILL")},o);i.unref&&i.unref()},Ui=(e,{forceKillAfterTimeout:t},n)=>qi(e)&&t!==!1&&n,qi=e=>e===Jn.default.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",Wi=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return Li;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)},zi=(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(()=>{zi(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 Qi=(async()=>{})().constructor.prototype,es=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(Qi,e)]),ct=(e,t)=>{for(let[n,r]of es){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],ts=/^[\w.-]+$/,ns=/"/g,rs=e=>typeof e!="string"||ts.test(e)?e:`"${e.replace(ns,'\\"')}"`,gr=(e,t)=>mr(e,t).join(" "),hr=(e,t)=>mr(e,t).map(n=>rs(n)).join(" "),os=/ +/g,yr=e=>{let t=[];for(let n of e.trim().split(os)){let r=t[t.length-1];r&&r.endsWith("\\")?t[t.length-1]=`${r.slice(0,-1)} ${n}`:t.push(n)}return t};var is=1e3*1e3*100,ss=({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:o})=>{let i=t?{...ae.default.env,...e}:e;return n?Rn({env:i,cwd:r,execPath:o}):i},as=(e,t,n={})=>{let r=wr.default._parse(e,t,n);return e=r.command,t=r.args,n=r.options,n={maxBuffer:is,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=ss(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 cs(e,t,n){let r=as(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 cs(n,r,t)}var Mo=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](.*)\)?/,us=/^(?:(?:(?:node|node:[\w/]+|(?:(?:node:)?internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)(?:\.js)?:\d+:\d+)|native)/,fs=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:!us.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(fs,"~")))),o)).join(`
|
|
9
|
+
`)}var ls=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?ls(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,h=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 h.next(),I=d;if(d++,b.done){if(l=!0,m===0&&!p){if(!r&&c.length>0){g(new ae(c));return}if(p=!0,a.size===0){i(u);return}let P=[];for(let[j,ye]of u.entries())a.get(j)!==Pr&&P.push(ye);i(P)}return}m++,(async()=>{try{let P=await b.value;if(p)return;let j=await t(P,I);j===Pr&&a.set(I,j),u[I]=j,m--,await x()}catch(P){if(r)g(P);else{c.push(P),m--;try{await x()}catch(j){g(j)}}}})()};(async()=>{for(let b=0;b<n;b++){try{await x()}catch(I){g(I);break}if(l||f)break}})()})}var Pr=Symbol("skip");async function yt(e,t){return ht(e,n=>n(),t)}var O=y(require("@techor/log")),$=y(fe());var he=y(require("to-line"));var ls=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],ds=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],ps=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],ms=["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 je(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?ms:ps:t.binary?ds:ls;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 Bo=y(Nr()),Ft=y(require("fs")),Go=y(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=y(require("fs")),yo=y(require("fast-glob")),R=y(fe());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 Oo=y(fe(),1),Le=y(require("@techor/log"),1),Co=y(require("fast-glob"),1);var Rt=y(fe(),1),Po=y(wo(),1),_o=y(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]=F({},n):t[r]=n}),t}function So(e,t){return t==="__proto__"?void 0:e[t]}function F(...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]=F({},n);return}else{t[i]=F(r,n);return}})}),t}var Io=require("esbuild");function jo(e,t){if(t=F({cwd:process.cwd()},t),!e)return;let n=_o.default.sync(e,t)[0];if(!n)return;let r=Rt.default.resolve(t.cwd,n),o=(0,Io.buildSync)({entryPoints:[r],logLevel:"silent",bundle:!0,format:"cjs",write:!1,target:"esnext",platform:"node"}),{text:i}=o.outputFiles[0];return(0,Po.default)(i,Rt.default.changeExt(r,".js"))}var Ha={cwd:process.cwd()},Ka=Ha,Ao=class{options;constructor(...e){this.options=F(Ka,...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=jo(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 Co.default.sync(t,{cwd:e})[0]}get resolvedConfigPath(){let e=this.configPath;return e?Oo.default.resolve(this.options.cwd,e):""}};var Xa=new Ao({config:"aron.{js,ts,cjs,mjs}"}),Va={js:"cjs",cjs:"cjs",mjs:"esm",css:"css"},E=z(),{dependencies:No,peerDependencies:ko}=E,$t=[];No&&$t.push(...Object.keys(No));ko&&$t.push(...Object.keys(ko));Ro.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","Specify CommonJS default file extension",".js").option("--iife-ext","Specify CommonJS default file extension",".js").option("--esm-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=Xa.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=F(t,{outExtension:f?{".css":".css"}:{".js":p||{cjs:t.cjsExt,esm:t.esmExt,iife:t.iifeExt}[a.format]},external:l,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,plugins:[]},r?.pack);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=Fo.default.sync([...new Set(c)].map(g=>(0,Bo.default)(g))).filter(g=>!o.find(x=>x.options.entryPoints.includes(g)&&x.options.format===d.format&&(0,Go.default)(x.options.outExtension,d.outExtension)&&x.options.outdir===d.outdir));let h={options:d,run:async()=>{let g=await(0,$o.context)(d),{metafile:x}=await g.rebuild();if(x){console.log(""),h.metafile=x;for(let b in x.outputs){let I=x.outputs[b],P=je(I.bytes).replace(/ /g,""),j=x.outputs[b].format=a.format;O.default`${O.chalk.dim("\u2502")} $t [${j}] **${b}** ${P} (${Object.keys(I.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(h)};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.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||Va[l],outFile:p.outFile||a,platform:p.platform})}else for(let l in a){let m=a[l],d,h;switch(f){case"node":h="node";break;case"browser":h="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:h,format:d});break;case"require":c(m,l,{platform:h,format:"cjs"});break;case"import":c(m,l,{platform:h,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})}e.length&&(e.find(a=>a.includes(".css"))?s(e,{format:"css"}):t.format.map(a=>s(e,{format: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 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`
|
|
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=
|
|
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:Qa,name:ec,description:tc}=z(Uo.default.join(__dirname,"../../package.json"));Bt.program.name(ec).description(tc).version(Qa);Bt.program.parse();
|
|
16
16
|
/*! Bundled license information:
|
|
17
17
|
|
|
18
18
|
normalize-path/index.js:
|