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