@qlover/fe-release 2.3.4 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +6202 -1
- package/dist/cli.js +6206 -1
- package/dist/index.cjs +4265 -1
- package/dist/index.d.ts +43 -97
- package/dist/index.js +4245 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1 +1,4245 @@
|
|
|
1
|
-
import{FeScriptContext as t}from"@qlover/scripts-context";import{Env as e}from"@qlover/env-loader";import{AsyncExecutor as r}from"@qlover/fe-corekit";import{Octokit as n}from"@octokit/rest";import o from"gitlog";import{sep as i,normalize as a,resolve as s,join as u,relative as c,parse as h}from"node:path";import{findWorkspaces as f}from"find-workspaces";import{readFileSync as l,existsSync as g,writeFileSync as p}from"fs";import{join as m}from"path";import{createRequire as d}from"node:module";import{pathToFileURL as v}from"node:url";import b from"p-limit";var y,w,k,_,R,P,x,C,j,$,N,O,E,B,T,S,L,A,W,U,M,D,G,H,I,F,z,q,V,J,Y,K,Q,X,Z,tt,et,rt,nt,ot,it,at,st,ut,ct,ht,ft,lt,gt,pt,mt,dt,vt,bt,yt,wt,kt,_t,Rt,Pt,xt,Ct,jt,$t,Nt,Ot,Et,Bt,Tt,St,Lt,At,Wt,Ut,Mt,Dt,Gt,Ht,It,Ft,zt,qt,Vt,Jt,Yt,Kt,Qt,Xt,Zt,te,ee,re,ne,oe,ie,ae,se,ue,ce="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function he(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function fe(){if(w)return y;return w=1,y=function(){this.__data__=[],this.size=0}}function le(){if(_)return k;return _=1,k=function(t,e){return t===e||t!=t&&e!=e}}function ge(){if(P)return R;P=1;var t=le();return R=function(e,r){for(var n=e.length;n--;)if(t(e[n][0],r))return n;return-1}}function pe(){if(C)return x;C=1;var t=ge(),e=Array.prototype.splice;return x=function(r){var n=this.__data__,o=t(n,r);return!(o<0)&&(o==n.length-1?n.pop():e.call(n,o,1),--this.size,!0)}}function me(){if($)return j;$=1;var t=ge();return j=function(e){var r=this.__data__,n=t(r,e);return n<0?void 0:r[n][1]}}function de(){if(O)return N;O=1;var t=ge();return N=function(e){return t(this.__data__,e)>-1}}function ve(){if(B)return E;B=1;var t=ge();return E=function(e,r){var n=this.__data__,o=t(n,e);return o<0?(++this.size,n.push([e,r])):n[o][1]=r,this}}function be(){if(S)return T;S=1;var t=fe(),e=pe(),r=me(),n=de(),o=ve();function i(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,T=i}function ye(){if(A)return L;A=1;var t=be();return L=function(){this.__data__=new t,this.size=0}}function we(){if(U)return W;return U=1,W=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}}function ke(){if(D)return M;return D=1,M=function(t){return this.__data__.get(t)}}function _e(){if(H)return G;return H=1,G=function(t){return this.__data__.has(t)}}function Re(){if(F)return I;F=1;var t="object"==typeof ce&&ce&&ce.Object===Object&&ce;return I=t}function Pe(){if(q)return z;q=1;var t=Re(),e="object"==typeof self&&self&&self.Object===Object&&self,r=t||e||Function("return this")();return z=r}function xe(){if(J)return V;J=1;var t=Pe().Symbol;return V=t}function Ce(){if(K)return Y;K=1;var t=xe(),e=Object.prototype,r=e.hasOwnProperty,n=e.toString,o=t?t.toStringTag:void 0;return Y=function(t){var e=r.call(t,o),i=t[o];try{t[o]=void 0;var a=!0}catch(t){}var s=n.call(t);return a&&(e?t[o]=i:delete t[o]),s}}function je(){if(X)return Q;X=1;var t=Object.prototype.toString;return Q=function(e){return t.call(e)}}function $e(){if(tt)return Z;tt=1;var t=xe(),e=Ce(),r=je(),n=t?t.toStringTag:void 0;return Z=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":n&&n in Object(t)?e(t):r(t)}}function Ne(){if(rt)return et;return rt=1,et=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}function Oe(){if(ot)return nt;ot=1;var t=$e(),e=Ne();return nt=function(r){if(!e(r))return!1;var n=t(r);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n}}function Ee(){if(at)return it;at=1;var t=Pe()["__core-js_shared__"];return it=t}function Be(){if(ut)return st;ut=1;var t,e=Ee(),r=(t=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return st=function(t){return!!r&&r in t}}function Te(){if(ht)return ct;ht=1;var t=Function.prototype.toString;return ct=function(e){if(null!=e){try{return t.call(e)}catch(t){}try{return e+""}catch(t){}}return""}}function Se(){if(lt)return ft;lt=1;var t=Oe(),e=Be(),r=Ne(),n=Te(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,a=Object.prototype,s=i.toString,u=a.hasOwnProperty,c=RegExp("^"+s.call(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return ft=function(i){return!(!r(i)||e(i))&&(t(i)?c:o).test(n(i))}}function Le(){if(pt)return gt;return pt=1,gt=function(t,e){return null==t?void 0:t[e]}}function Ae(){if(dt)return mt;dt=1;var t=Se(),e=Le();return mt=function(r,n){var o=e(r,n);return t(o)?o:void 0}}function We(){if(bt)return vt;bt=1;var t=Ae()(Pe(),"Map");return vt=t}function Ue(){if(wt)return yt;wt=1;var t=Ae()(Object,"create");return yt=t}function Me(){if(_t)return kt;_t=1;var t=Ue();return kt=function(){this.__data__=t?t(null):{},this.size=0}}function De(){if(Pt)return Rt;return Pt=1,Rt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}}function Ge(){if(Ct)return xt;Ct=1;var t=Ue(),e=Object.prototype.hasOwnProperty;return xt=function(r){var n=this.__data__;if(t){var o=n[r];return"__lodash_hash_undefined__"===o?void 0:o}return e.call(n,r)?n[r]:void 0}}function He(){if($t)return jt;$t=1;var t=Ue(),e=Object.prototype.hasOwnProperty;return jt=function(r){var n=this.__data__;return t?void 0!==n[r]:e.call(n,r)}}function Ie(){if(Ot)return Nt;Ot=1;var t=Ue();return Nt=function(e,r){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=t&&void 0===r?"__lodash_hash_undefined__":r,this}}function Fe(){if(Bt)return Et;Bt=1;var t=Me(),e=De(),r=Ge(),n=He(),o=Ie();function i(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,Et=i}function ze(){if(St)return Tt;St=1;var t=Fe(),e=be(),r=We();return Tt=function(){this.size=0,this.__data__={hash:new t,map:new(r||e),string:new t}}}function qe(){if(At)return Lt;return At=1,Lt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}}function Ve(){if(Ut)return Wt;Ut=1;var t=qe();return Wt=function(e,r){var n=e.__data__;return t(r)?n["string"==typeof r?"string":"hash"]:n.map}}function Je(){if(Dt)return Mt;Dt=1;var t=Ve();return Mt=function(e){var r=t(this,e).delete(e);return this.size-=r?1:0,r}}function Ye(){if(Ht)return Gt;Ht=1;var t=Ve();return Gt=function(e){return t(this,e).get(e)}}function Ke(){if(Ft)return It;Ft=1;var t=Ve();return It=function(e){return t(this,e).has(e)}}function Qe(){if(qt)return zt;qt=1;var t=Ve();return zt=function(e,r){var n=t(this,e),o=n.size;return n.set(e,r),this.size+=n.size==o?0:1,this}}function Xe(){if(Jt)return Vt;Jt=1;var t=ze(),e=Je(),r=Ye(),n=Ke(),o=Qe();function i(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}return i.prototype.clear=t,i.prototype.delete=e,i.prototype.get=r,i.prototype.has=n,i.prototype.set=o,Vt=i}function Ze(){if(Kt)return Yt;Kt=1;var t=be(),e=We(),r=Xe();return Yt=function(n,o){var i=this.__data__;if(i instanceof t){var a=i.__data__;if(!e||a.length<199)return a.push([n,o]),this.size=++i.size,this;i=this.__data__=new r(a)}return i.set(n,o),this.size=i.size,this}}function tr(){if(Xt)return Qt;Xt=1;var t=be(),e=ye(),r=we(),n=ke(),o=_e(),i=Ze();function a(e){var r=this.__data__=new t(e);this.size=r.size}return a.prototype.clear=e,a.prototype.delete=r,a.prototype.get=n,a.prototype.has=o,a.prototype.set=i,Qt=a}function er(){if(te)return Zt;te=1;var t=Ae(),e=function(){try{var e=t(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();return Zt=e}function rr(){if(re)return ee;re=1;var t=er();return ee=function(e,r,n){"__proto__"==r&&t?t(e,r,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[r]=n}}function nr(){if(oe)return ne;oe=1;var t=rr(),e=le();return ne=function(r,n,o){(void 0!==o&&!e(r[n],o)||void 0===o&&!(n in r))&&t(r,n,o)}}function or(){if(ae)return ie;return ae=1,ie=function(t){return function(e,r,n){for(var o=-1,i=Object(e),a=n(e),s=a.length;s--;){var u=a[t?s:++o];if(!1===r(i[u],u,i))break}return e}}}function ir(){if(ue)return se;ue=1;var t=or()();return se=t}var ar,sr,ur,cr,hr,fr,lr,gr,pr,mr,dr,vr,br,yr,wr,kr,_r,Rr,Pr,xr,Cr,jr,$r,Nr,Or,Er,Br,Tr,Sr,Lr,Ar,Wr,Ur,Mr={exports:{}};function Dr(){return ar||(ar=1,t=Mr,e=Mr.exports,r=Pe(),n=e&&!e.nodeType&&e,o=n&&t&&!t.nodeType&&t,i=o&&o.exports===n?r.Buffer:void 0,a=i?i.allocUnsafe:void 0,t.exports=function(t,e){if(e)return t.slice();var r=t.length,n=a?a(r):new t.constructor(r);return t.copy(n),n}),Mr.exports;var t,e,r,n,o,i,a}function Gr(){if(ur)return sr;ur=1;var t=Pe().Uint8Array;return sr=t}function Hr(){if(hr)return cr;hr=1;var t=Gr();return cr=function(e){var r=new e.constructor(e.byteLength);return new t(r).set(new t(e)),r}}function Ir(){if(lr)return fr;lr=1;var t=Hr();return fr=function(e,r){var n=r?t(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}}function Fr(){if(pr)return gr;return pr=1,gr=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}}function zr(){if(dr)return mr;dr=1;var t=Ne(),e=Object.create,r=function(){function r(){}return function(n){if(!t(n))return{};if(e)return e(n);r.prototype=n;var o=new r;return r.prototype=void 0,o}}();return mr=r}function qr(){if(br)return vr;return br=1,vr=function(t,e){return function(r){return t(e(r))}}}function Vr(){if(wr)return yr;wr=1;var t=qr()(Object.getPrototypeOf,Object);return yr=t}function Jr(){if(_r)return kr;_r=1;var t=Object.prototype;return kr=function(e){var r=e&&e.constructor;return e===("function"==typeof r&&r.prototype||t)}}function Yr(){if(Pr)return Rr;Pr=1;var t=zr(),e=Vr(),r=Jr();return Rr=function(n){return"function"!=typeof n.constructor||r(n)?{}:t(e(n))}}function Kr(){if(Cr)return xr;return Cr=1,xr=function(t){return null!=t&&"object"==typeof t}}function Qr(){if($r)return jr;$r=1;var t=$e(),e=Kr();return jr=function(r){return e(r)&&"[object Arguments]"==t(r)}}function Xr(){if(Or)return Nr;Or=1;var t=Qr(),e=Kr(),r=Object.prototype,n=r.hasOwnProperty,o=r.propertyIsEnumerable,i=t(function(){return arguments}())?t:function(t){return e(t)&&n.call(t,"callee")&&!o.call(t,"callee")};return Nr=i}function Zr(){if(Br)return Er;Br=1;var t=Array.isArray;return Er=t}function tn(){if(Sr)return Tr;Sr=1;return Tr=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}function en(){if(Ar)return Lr;Ar=1;var t=Oe(),e=tn();return Lr=function(r){return null!=r&&e(r.length)&&!t(r)}}function rn(){if(Ur)return Wr;Ur=1;var t=en(),e=Kr();return Wr=function(r){return e(r)&&t(r)}}var nn,on,an,sn,un,cn,hn,fn,ln,gn={exports:{}};function pn(){if(on)return nn;return on=1,nn=function(){return!1}}function mn(){return an||(an=1,function(t,e){var r=Pe(),n=pn(),o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o?r.Buffer:void 0,s=(a?a.isBuffer:void 0)||n;t.exports=s}(gn,gn.exports)),gn.exports}function dn(){if(un)return sn;un=1;var t=$e(),e=Vr(),r=Kr(),n=Function.prototype,o=Object.prototype,i=n.toString,a=o.hasOwnProperty,s=i.call(Object);return sn=function(n){if(!r(n)||"[object Object]"!=t(n))return!1;var o=e(n);if(null===o)return!0;var u=a.call(o,"constructor")&&o.constructor;return"function"==typeof u&&u instanceof u&&i.call(u)==s}}function vn(){if(hn)return cn;hn=1;var t=$e(),e=tn(),r=Kr(),n={};return n["[object Float32Array]"]=n["[object Float64Array]"]=n["[object Int8Array]"]=n["[object Int16Array]"]=n["[object Int32Array]"]=n["[object Uint8Array]"]=n["[object Uint8ClampedArray]"]=n["[object Uint16Array]"]=n["[object Uint32Array]"]=!0,n["[object Arguments]"]=n["[object Array]"]=n["[object ArrayBuffer]"]=n["[object Boolean]"]=n["[object DataView]"]=n["[object Date]"]=n["[object Error]"]=n["[object Function]"]=n["[object Map]"]=n["[object Number]"]=n["[object Object]"]=n["[object RegExp]"]=n["[object Set]"]=n["[object String]"]=n["[object WeakMap]"]=!1,cn=function(o){return r(o)&&e(o.length)&&!!n[t(o)]}}function bn(){if(ln)return fn;return ln=1,fn=function(t){return function(e){return t(e)}}}var yn,wn,kn,_n,Rn,Pn,xn,Cn,jn,$n,Nn,On,En,Bn,Tn,Sn,Ln,An,Wn,Un,Mn,Dn,Gn,Hn,In,Fn,zn,qn,Vn,Jn,Yn,Kn,Qn,Xn,Zn,to,eo,ro,no,oo,io,ao,so,uo,co,ho,fo,lo,go,po={exports:{}};function mo(){return yn||(yn=1,t=po,e=po.exports,r=Re(),n=e&&!e.nodeType&&e,o=n&&t&&!t.nodeType&&t,i=o&&o.exports===n&&r.process,a=function(){try{var t=o&&o.require&&o.require("util").types;return t||i&&i.binding&&i.binding("util")}catch(t){}}(),t.exports=a),po.exports;var t,e,r,n,o,i,a}function vo(){if(kn)return wn;kn=1;var t=vn(),e=bn(),r=mo(),n=r&&r.isTypedArray,o=n?e(n):t;return wn=o}function bo(){if(Rn)return _n;return Rn=1,_n=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}}function yo(){if(xn)return Pn;xn=1;var t=rr(),e=le(),r=Object.prototype.hasOwnProperty;return Pn=function(n,o,i){var a=n[o];r.call(n,o)&&e(a,i)&&(void 0!==i||o in n)||t(n,o,i)}}function wo(){if(jn)return Cn;jn=1;var t=yo(),e=rr();return Cn=function(r,n,o,i){var a=!o;o||(o={});for(var s=-1,u=n.length;++s<u;){var c=n[s],h=i?i(o[c],r[c],c,o,r):void 0;void 0===h&&(h=r[c]),a?e(o,c,h):t(o,c,h)}return o}}function ko(){if(Nn)return $n;return Nn=1,$n=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}}function _o(){if(En)return On;En=1;var t=/^(?:0|[1-9]\d*)$/;return On=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}}function Ro(){if(Tn)return Bn;Tn=1;var t=ko(),e=Xr(),r=Zr(),n=mn(),o=_o(),i=vo(),a=Object.prototype.hasOwnProperty;return Bn=function(s,u){var c=r(s),h=!c&&e(s),f=!c&&!h&&n(s),l=!c&&!h&&!f&&i(s),g=c||h||f||l,p=g?t(s.length,String):[],m=p.length;for(var d in s)!u&&!a.call(s,d)||g&&("length"==d||f&&("offset"==d||"parent"==d)||l&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||o(d,m))||p.push(d);return p}}function Po(){if(Ln)return Sn;return Ln=1,Sn=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}}function xo(){if(Wn)return An;Wn=1;var t=Ne(),e=Jr(),r=Po(),n=Object.prototype.hasOwnProperty;return An=function(o){if(!t(o))return r(o);var i=e(o),a=[];for(var s in o)("constructor"!=s||!i&&n.call(o,s))&&a.push(s);return a}}function Co(){if(Mn)return Un;Mn=1;var t=Ro(),e=xo(),r=en();return Un=function(n){return r(n)?t(n,!0):e(n)}}function jo(){if(Gn)return Dn;Gn=1;var t=wo(),e=Co();return Dn=function(r){return t(r,e(r))}}function $o(){if(In)return Hn;In=1;var t=nr(),e=Dr(),r=Ir(),n=Fr(),o=Yr(),i=Xr(),a=Zr(),s=rn(),u=mn(),c=Oe(),h=Ne(),f=dn(),l=vo(),g=bo(),p=jo();return Hn=function(m,d,v,b,y,w,k){var _=g(m,v),R=g(d,v),P=k.get(R);if(P)t(m,v,P);else{var x=w?w(_,R,v+"",m,d,k):void 0,C=void 0===x;if(C){var j=a(R),$=!j&&u(R),N=!j&&!$&&l(R);x=R,j||$||N?a(_)?x=_:s(_)?x=n(_):$?(C=!1,x=e(R,!0)):N?(C=!1,x=r(R,!0)):x=[]:f(R)||i(R)?(x=_,i(_)?x=p(_):h(_)&&!c(_)||(x=o(R))):C=!1}C&&(k.set(R,x),y(x,R,b,w,k),k.delete(R)),t(m,v,x)}}}function No(){if(zn)return Fn;zn=1;var t=tr(),e=nr(),r=ir(),n=$o(),o=Ne(),i=Co(),a=bo();return Fn=function s(u,c,h,f,l){u!==c&&r(c,(function(r,i){if(l||(l=new t),o(r))n(u,c,i,h,s,f,l);else{var g=f?f(a(u,i),r,i+"",u,c,l):void 0;void 0===g&&(g=r),e(u,i,g)}}),i)},Fn}function Oo(){if(Vn)return qn;return Vn=1,qn=function(t){return t}}function Eo(){if(Yn)return Jn;return Yn=1,Jn=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}}function Bo(){if(Qn)return Kn;Qn=1;var t=Eo(),e=Math.max;return Kn=function(r,n,o){return n=e(void 0===n?r.length-1:n,0),function(){for(var i=arguments,a=-1,s=e(i.length-n,0),u=Array(s);++a<s;)u[a]=i[n+a];a=-1;for(var c=Array(n+1);++a<n;)c[a]=i[a];return c[n]=o(u),t(r,this,c)}},Kn}function To(){if(Zn)return Xn;return Zn=1,Xn=function(t){return function(){return t}}}function So(){if(eo)return to;eo=1;var t=To(),e=er();return to=e?function(r,n){return e(r,"toString",{configurable:!0,enumerable:!1,value:t(n),writable:!0})}:Oo()}function Lo(){if(no)return ro;no=1;var t=Date.now;return ro=function(e){var r=0,n=0;return function(){var o=t(),i=16-(o-n);if(n=o,i>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}},ro}function Ao(){if(io)return oo;io=1;var t=So(),e=Lo()(t);return oo=e}function Wo(){if(so)return ao;so=1;var t=Oo(),e=Bo(),r=Ao();return ao=function(n,o){return r(e(n,o,t),n+"")}}function Uo(){if(co)return uo;co=1;var t=le(),e=en(),r=_o(),n=Ne();return uo=function(o,i,a){if(!n(a))return!1;var s=typeof i;return!!("number"==s?e(a)&&r(i,a.length):"string"==s&&i in a)&&t(a[i],o)}}function Mo(){if(fo)return ho;fo=1;var t=Wo(),e=Uo();return ho=function(r){return t((function(t,n){var o=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=r.length>3&&"function"==typeof a?(i--,a):void 0,s&&e(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++o<i;){var u=n[o];u&&r(t,u,o,a)}return t}))}}function Do(){if(go)return lo;go=1;var t=No(),e=Mo()((function(e,r,n){t(e,r,n)}));return lo=e}var Go,Ho,Io,Fo,zo,qo,Vo,Jo,Yo,Ko,Qo,Xo,Zo,ti,ei,ri,ni,oi,ii,ai,si,ui,ci,hi,fi=he(Do());function li(){if(Ho)return Go;Ho=1;var t=$e(),e=Kr();return Go=function(r){return"symbol"==typeof r||e(r)&&"[object Symbol]"==t(r)}}function gi(){if(Fo)return Io;Fo=1;var t=Zr(),e=li(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;return Io=function(o,i){if(t(o))return!1;var a=typeof o;return!("number"!=a&&"symbol"!=a&&"boolean"!=a&&null!=o&&!e(o))||(n.test(o)||!r.test(o)||null!=i&&o in Object(i))}}function pi(){if(qo)return zo;qo=1;var t=Xe();function e(r,n){if("function"!=typeof r||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var o=function(){var t=arguments,e=n?n.apply(this,t):t[0],i=o.cache;if(i.has(e))return i.get(e);var a=r.apply(this,t);return o.cache=i.set(e,a)||i,a};return o.cache=new(e.Cache||t),o}return e.Cache=t,zo=e}function mi(){if(Jo)return Vo;Jo=1;var t=pi();return Vo=function(e){var r=t(e,(function(t){return 500===n.size&&n.clear(),t})),n=r.cache;return r}}function di(){if(Ko)return Yo;Ko=1;var t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,e=/\\(\\)?/g,r=mi()((function(r){var n=[];return 46===r.charCodeAt(0)&&n.push(""),r.replace(t,(function(t,r,o,i){n.push(o?i.replace(e,"$1"):r||t)})),n}));return Yo=r}function vi(){if(Xo)return Qo;return Xo=1,Qo=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}}function bi(){if(ti)return Zo;ti=1;var t=xe(),e=vi(),r=Zr(),n=li(),o=t?t.prototype:void 0,i=o?o.toString:void 0;return Zo=function t(o){if("string"==typeof o)return o;if(r(o))return e(o,t)+"";if(n(o))return i?i.call(o):"";var a=o+"";return"0"==a&&1/o==-1/0?"-0":a},Zo}function yi(){if(ri)return ei;ri=1;var t=bi();return ei=function(e){return null==e?"":t(e)}}function wi(){if(oi)return ni;oi=1;var t=Zr(),e=gi(),r=di(),n=yi();return ni=function(o,i){return t(o)?o:e(o,i)?[o]:r(n(o))}}function ki(){if(ai)return ii;ai=1;var t=li();return ii=function(e){if("string"==typeof e||t(e))return e;var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}}function _i(){if(ui)return si;ui=1;var t=wi(),e=ki();return si=function(r,n){for(var o=0,i=(n=t(n,r)).length;null!=r&&o<i;)r=r[e(n[o++])];return o&&o==i?r:void 0}}function Ri(){if(hi)return ci;hi=1;var t=_i();return ci=function(e,r,n){var o=null==e?void 0:t(e,r);return void 0===o?n:o}}var Pi=he(Ri());const xi="package.json",Ci=[".env.local",".env"];class ji extends t{_env;shared;constructor(t){super(t),this._env=e.searchEnv({logger:this.logger,preloadList:this.feConfig.envOrder||Ci}),this.shared=Object.assign({},this.feConfig.release,this.getDefaultShreadOptions(t.shared))}getDefaultShreadOptions(t){return{rootPath:process.cwd(),sourceBranch:this._env.get("FE_RELEASE_BRANCH")||this._env.get("FE_RELEASE_SOURCE_BRANCH")||"master",releaseEnv:this._env.get("FE_RELEASE_ENV")||this._env.get("NODE_ENV")||"development",...t}}get rootPath(){return this.shared.rootPath}get sourceBranch(){return this.shared.sourceBranch}get releaseEnv(){return this.shared.releaseEnv}get env(){return this._env}get workspaces(){return this.getConfig("workspaces.workspaces")}get workspace(){return this.getConfig("workspaces.workspace")}setWorkspaces(t){this.options.workspaces={...this.options.workspaces,workspaces:t}}setConfig(t){this.options=fi(this.options,t)}getConfig(t,e){return Pi(this.options,t,e)}setShared(t){this.shared=fi(this.shared,t)}getPkg(t,e){const r=this.workspace?.packageJson;if(!r)throw new Error("package.json is not found");return t?Pi(r,t,e):r}getTemplateContext(){return{...this.shared,...this.workspace,publishPath:this.workspace?.path||"",env:this.releaseEnv,branch:this.sourceBranch}}async runChangesetsCli(t,e){let r="pnpm";try{await this.shell.exec("pnpm -v",{dryRun:!1})}catch{r="npx"}return await this.shell.exec([r,"changeset",t,...e??[]])}}function $i(t,...e){return[t,...e]}const Ni={maxWorkspace:3,multiWorkspaceSeparator:"_",workspaceVersionSeparator:"@",batchBranchName:"batch-${releaseName}-${length}-packages-${timestamp}",batchTagName:"batch-${length}-packages-${timestamp}"};class Oi{shell;logger;config;constructor(t,e,r={}){this.shell=t,this.logger=e,this.config={...Ni,...r}}getReleaseBranchName(t,e,r){const n=r.branchName||"release-${tagName}";if("string"!=typeof n)throw new Error("Branch name template is not a string");return this.logger.debug("Release Branch template is:",n),this.shell.format(n,{pkgName:t,releaseName:t,tagName:e,...r})}getBatchReleaseBranchName(t,e,r,n){const o=this.config.batchBranchName;if("string"!=typeof o)throw new Error("Branch name template is not a string");return this.logger.debug("Release Batch Branch template is:",o),this.shell.format(o,{pkgName:t,releaseName:t,tagName:e,...r,length:n,timestamp:Date.now()})}getReleaseName(t){if(1===t.length)return t[0].name;const{maxWorkspace:e,multiWorkspaceSeparator:r,workspaceVersionSeparator:n}=this.config;return t.slice(0,e).map((({name:t,version:e})=>`${t}${n}${e}`)).join(r)}getReleaseTagName(t){if(1===t.length)return t[0].version;const{batchTagName:e}=this.config;return this.shell.format(e,{length:t.length,timestamp:Date.now()})}getReleaseBranchParams(t,e){const r=this.getReleaseTagName(t),n=this.getReleaseName(t);return{tagName:r,releaseBranch:t.length>1?this.getBatchReleaseBranchName(n,r,e,t.length):this.getReleaseBranchName(n,r,e)}}getPRTitle(t,e){const r=this.config.PRTitle||"Release ${env} ${pkgName} ${tagName}";return this.shell.format(r,{...e,tagName:t.tagName,pkgName:t.releaseBranch})}getPRBody(t,e,r){const n=this.config.PRBody,o=t.length>1?t.map((t=>this.shell.format("\n## ${name} ${version}\n${changelog}\n",t))).join("\n"):t[0].changelog,{workspaceVersionSeparator:i}=this.config,a=1===t.length?e.tagName:t.map((t=>`${t.name}${i}${t.version}`)).join(" ");return this.shell.format(n,{...r,tagName:a,changelog:o})}}class Ei{context;_octokit=null;constructor(t){this.context=t}getGitHubUserInfo(){const{authorName:t,repoName:e}=this.context.shared;if(!t||!e)throw new Error("Author name or repo name is not set");return{owner:t,repo:e}}getToken(){const{tokenRef:t="GITHUB_TOKEN"}=this.context.getConfig("githubPR"),e=this.context.env.get(t);if(!e)throw new Error(`Token is not set. Please set ${t} environment variable.`);return e}get octokit(){if(this._octokit)return this._octokit;const{timeout:t}=this.context.getConfig("githubPR"),e={auth:this.getToken(),request:{timeout:t}};return this._octokit=new n(e),this._octokit}get logger(){return this.context.logger}get shell(){return this.context.shell}get autoMergeType(){return this.context.shared.autoMergeType||"squash"}get dryRunPRNumber(){return this.context.getConfig("githubPR.dryRunPRNumber","999999")}get autoMergeReleasePR(){return this.context.shared.autoMergeReleasePR||false}async mergePR(t,e){if(!t)return void this.logger.error("Failed to create Pull Request.",t);const r=this.autoMergeType;if(this.context.dryRun){const{repoName:n,authorName:o}=this.context.shared;this.logger.info(`[DRY RUN] Would merge PR #${t} with method '${r}' in repo ${o}/${n}, branch ${e}`)}else await this.octokit.rest.pulls.merge({...this.getGitHubUserInfo(),pull_number:Number(t),merge_method:r})}async getPullRequestCommits(t){return(await this.octokit.rest.pulls.listCommits({...this.getGitHubUserInfo(),pull_number:t})).data}async getCommitInfo(t){return(await this.octokit.rest.repos.getCommit({...this.getGitHubUserInfo(),ref:t})).data}async getPullRequest(t){return(await this.octokit.rest.pulls.get({...this.getGitHubUserInfo(),pull_number:t})).data}async checkedPR(t,e){try{await this.getPullRequest(Number(t)),await this.octokit.rest.git.deleteRef({...this.getGitHubUserInfo(),ref:`heads/${e}`}),this.logger.info(`Branch ${e} has been deleted`)}catch(r){if(404===r.status)return void this.logger.warn(`PR #${t} or branch ${e} not found`);throw this.logger.error("Failed to check PR or delete branch",r),r}}async createReleasePRLabel(){const t=this.context.shared.label;if(!(t&&t.name&&t.description&&t.color))throw new Error("Label is not valid, skipping creation");if(this.context.dryRun)return this.logger.info("[DRY RUN] Would create PR label with:",t),t;try{const e=await this.octokit.rest.issues.createLabel({...this.getGitHubUserInfo(),name:t.name,description:t.description,color:t.color.replace("#","")});return this.logger.debug("Create PR label Success",e),t}catch(e){if(422===e.status)return this.logger.warn(`Label ${t.name} already exists, skipping!`),t;throw this.logger.error("Create PR label Failed",e),e}}async createReleasePR(t){if(this.context.getConfig("githubPR.dryRunCreatePR")||this.context.dryRun)return this.logger.info("[DRY RUN] Would create PR with:",{...t,labels:t.labels}),this.dryRunPRNumber;try{const e=await this.octokit.rest.pulls.create({...this.getGitHubUserInfo(),...t}),r=e.data.number;if(!r)throw new Error("CreateReleasePR Failed, prNumber is empty");if(this.logger.debug("Create PR Success",[e?.url]),t.labels&&t.labels.length){const e=await this.octokit.rest.issues.addLabels({...this.getGitHubUserInfo(),issue_number:r,labels:t.labels});this.logger.debug("Add PR label Success",[e.url])}return r.toString()}catch(t){if(422===t.status&&t.message.includes("already exists")){this.logger.warn("PR already exists");const e=t.message.match(/pull request #(\d+)/);return e?e[1]:""}throw this.logger.error("Failed to create PR",t),t}}truncateBody(t){return t&&t.length>=124e3?t.substring(0,124e3)+"...":t}getOctokitReleaseOptions(t){const{releaseName:e,draft:r=!1,preRelease:n=!1,autoGenerate:o=!1,makeLatest:i=!0,releaseNotes:a,discussionCategoryName:s}=this.context.getConfig("githubPR"),u=e,c=o?"":this.truncateBody(String(a));return{name:u,make_latest:i.toString(),body:c,draft:r,prerelease:n,generate_release_notes:o,discussion_category_name:s,tag_name:"",...t,...this.getGitHubUserInfo()}}async createRelease(t){const e=this.getOctokitReleaseOptions({tag_name:t.tagName,body:t.changelog});if(e.name=this.shell.format(e.name,t),this.logger.log(`[DRY RUN] octokit repos.createRelease "${e.name}" (${e.tag_name})`,{isDryRun:this.context.dryRun}),!e.tag_name)throw new Error("TagName is undefined");if(!this.context.dryRun)try{const t=await this.octokit.repos.createRelease(e);this.logger.debug(`[DONE] octokit repos.createRelease "${e.name}" (${e.tag_name}) (${t.headers.location})`)}catch(t){this.logger.error(`[FAILED] octokit repos.createRelease "${e.name}" (${e.tag_name})`,t)}}}var Bi,Ti;function Si(){if(Ti)return Bi;Ti=1;var t=$e(),e=Zr(),r=Kr();return Bi=function(n){return"string"==typeof n||!e(n)&&r(n)&&"[object String]"==t(n)}}var Li=he(Si());class Ai{context;pluginName;props;onlyOne=!0;constructor(t,e,r={}){this.context=t,this.pluginName=e,this.props=r,this.setConfig(this.getInitialProps(r))}getInitialProps(t){const e=this.context.options[this.pluginName],r=Pi(this.context.shared,this.pluginName);return e||t?fi({},r,t,e):{}}get logger(){return this.context.logger}get shell(){return this.context.shell}get options(){return this.context.getConfig(this.pluginName,{})}getEnv(t,e){return this.context.env.get(t)??e}enabled(t,e){return!0}getConfig(t,e){return t?this.context.getConfig([this.pluginName,...Array.isArray(t)?t:[t]],e):this.context.getConfig(this.pluginName,e)}setConfig(t){this.context.setConfig({[this.pluginName]:t})}onBefore(t){}onExec(t){}onSuccess(t){}onError(t){}async step({label:t,task:e}){this.logger.log(),this.logger.info(t),this.logger.log();try{const r=await e();return this.logger.info(`${t} - success`),r}catch(t){throw this.logger.error(t),t}}}class Wi extends Ai{async onBefore(){const t=await this.getUserInfo();if(!t)throw new Error("Failed to get repoInfo");let e=this.context.shared.currentBranch;e||(e=await this.getCurrentBranch()),e&&await this.context.shell.exec(`git checkout ${e}`,{dryRun:!1}),this.context.setShared({repoName:t.repoName,authorName:t.authorName,currentBranch:e})}async getCurrentBranch(){return await new Promise((t=>setTimeout(t,100))),this.context.shell.exec("git rev-parse --abbrev-ref HEAD",{dryRun:!1})}async getRemoteUrl(){return(await this.context.shell.exec("git config --get remote.origin.url",{dryRun:!1})).trim()}async getUserInfo(){let t;try{t=await this.getRemoteUrl()}catch{throw new Error("Failed to get git remote url. Please ensure this is a git repository with a valid remote.")}if(!t)throw new Error("Git remote URL is empty. Please set a valid GitHub remote URL.");this.context.logger.debug("repoUrl: ",t);const e=t.match(/github\.com[:/]([^/]+)\/([^/.]+)(?:\.git)?$/);if(!e)throw new Error("Invalid GitHub repository URL format. Please ensure the remote URL is from GitHub.");const[,r,n]=e;if(!this.isValidString(r)||!this.isValidString(n))throw new Error("Failed to extract owner or repository name from GitHub URL");return{repoName:n,authorName:r}}isValidString(t){return!!t&&Li(t)}commit(t,e=[]){return this.context.shell.exec(["git","commit","--message",JSON.stringify(t),...e])}}const Ui=["hash","abbrevHash","treeHash","abbrevTreeHash","parentHashes","abbrevParentHashes","authorName","authorEmail","authorDate","authorDateRel","committerName","committerEmail","committerDate","committerDateRel","subject","body","rawBody","tag"];class Mi{options;constructor(t){this.options=t}async getGitLog(t={}){const{directory:e,noMerges:r=!0,fileds:n}=t,i=await this.resolveTag(t.from,"root"),a=await this.resolveTag(t.to,"HEAD"),s={repo:".",number:1e3,fields:n,branch:i===a?a:`${i}..${a}`,file:e,nameStatus:!1,includeMergeCommitFiles:!r},u=await o(s);return this.options.logger?.debug("GitChangelog",s),this.options.logger?.debug("GitChangelog commits",u),u}async getCommits(t){return(await this.getGitLog(t)).map((t=>{const{subject:e,rawBody:r}=t;return{base:t,commitlint:this.parseCommitlint(e||"",r),commits:[]}}))}createBaseCommit(t,e){return{subject:t,rawBody:t,body:t,...e}}tabify(t,e=2){return t.split("\n").map((t=>" ".repeat(e)+t.trim())).join("\n")}parseCommitlint(t,e=""){const[r]=t.trim().split("\n"),n=e.startsWith(r)?e.replace(r,""):e,o=r.replace(/\s*\(#\d+\)\s*$/,"").match(/^(?:([a-z]+)(?:\((.*?)\))?: )?(.+)$/i);return o?{type:o[1]?.toLowerCase(),scope:o[2]?.trim(),message:o[3].trim(),body:n?this.tabify(n):void 0}:{message:r,body:n?this.tabify(n):void 0}}toCommitValue(t,e){const[r]=e.trim().split("\n"),n=r.match(/\(#(\d+)\)/),o=this.parseCommitlint(r,e);return{base:this.createBaseCommit(r,{hash:t,abbrevHash:t.substring(0,7),rawBody:e}),commitlint:o,commits:[],prNumber:n?.[1]}}async resolveTag(t,e){if(t)try{if(await this.options.shell.exec(`git tag --list "${t}"`,{dryRun:!1}).then((t=>!!t.trim())))return t}catch{}return"root"===e?this.options.shell.exec("git rev-list --max-parents=0 HEAD",{dryRun:!1}).then((t=>t.trim())):"HEAD"}}var Di,Gi,Hi,Ii,Fi,zi,qi,Vi,Ji,Yi,Ki,Qi,Xi,Zi,ta,ea,ra,na,oa,ia,aa,sa,ua,ca,ha,fa,la,ga,pa,ma,da,va,ba,ya,wa,ka,_a,Ra,Pa,xa,Ca,ja,$a,Na,Oa,Ea,Ba,Ta,Sa,La,Aa,Wa,Ua,Ma,Da,Ga,Ha,Ia,Fa,za,qa,Va,Ja,Ya,Ka,Qa,Xa,Za,ts,es,rs,ns,os,is,as,ss,us,cs,hs,fs,ls,gs,ps,ms,ds,vs,bs,ys,ws,ks,_s,Rs;function Ps(){if(Gi)return Di;return Gi=1,Di=function(t,e,r,n){for(var o=-1,i=null==t?0:t.length;++o<i;){var a=t[o];e(n,a,r(a),t)}return n}}function xs(){if(Ii)return Hi;Ii=1;var t=qr()(Object.keys,Object);return Hi=t}function Cs(){if(zi)return Fi;zi=1;var t=Jr(),e=xs(),r=Object.prototype.hasOwnProperty;return Fi=function(n){if(!t(n))return e(n);var o=[];for(var i in Object(n))r.call(n,i)&&"constructor"!=i&&o.push(i);return o}}function js(){if(Vi)return qi;Vi=1;var t=Ro(),e=Cs(),r=en();return qi=function(n){return r(n)?t(n):e(n)}}function $s(){if(Yi)return Ji;Yi=1;var t=ir(),e=js();return Ji=function(r,n){return r&&t(r,n,e)}}function Ns(){if(Qi)return Ki;Qi=1;var t=en();return Ki=function(e,r){return function(n,o){if(null==n)return n;if(!t(n))return e(n,o);for(var i=n.length,a=r?i:-1,s=Object(n);(r?a--:++a<i)&&!1!==o(s[a],a,s););return n}}}function Os(){if(Zi)return Xi;Zi=1;var t=$s(),e=Ns()(t);return Xi=e}function Es(){if(ea)return ta;ea=1;var t=Os();return ta=function(e,r,n,o){return t(e,(function(t,e,i){r(o,t,n(t),i)})),o}}function Bs(){if(na)return ra;na=1;return ra=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}}function Ts(){if(ia)return oa;return ia=1,oa=function(t){return this.__data__.has(t)}}function Ss(){if(sa)return aa;sa=1;var t=Xe(),e=Bs(),r=Ts();function n(e){var r=-1,n=null==e?0:e.length;for(this.__data__=new t;++r<n;)this.add(e[r])}return n.prototype.add=n.prototype.push=e,n.prototype.has=r,aa=n}function Ls(){if(ca)return ua;return ca=1,ua=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}}function As(){if(fa)return ha;return fa=1,ha=function(t,e){return t.has(e)}}function Ws(){if(ga)return la;ga=1;var t=Ss(),e=Ls(),r=As();return la=function(n,o,i,a,s,u){var c=1&i,h=n.length,f=o.length;if(h!=f&&!(c&&f>h))return!1;var l=u.get(n),g=u.get(o);if(l&&g)return l==o&&g==n;var p=-1,m=!0,d=2&i?new t:void 0;for(u.set(n,o),u.set(o,n);++p<h;){var v=n[p],b=o[p];if(a)var y=c?a(b,v,p,o,n,u):a(v,b,p,n,o,u);if(void 0!==y){if(y)continue;m=!1;break}if(d){if(!e(o,(function(t,e){if(!r(d,e)&&(v===t||s(v,t,i,a,u)))return d.push(e)}))){m=!1;break}}else if(v!==b&&!s(v,b,i,a,u)){m=!1;break}}return u.delete(n),u.delete(o),m}}function Us(){if(ma)return pa;return ma=1,pa=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}}function Ms(){if(va)return da;return va=1,da=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},da}function Ds(){if(ya)return ba;ya=1;var t=xe(),e=Gr(),r=le(),n=Ws(),o=Us(),i=Ms(),a=t?t.prototype:void 0,s=a?a.valueOf:void 0;return ba=function(t,a,u,c,h,f,l){switch(u){case"[object DataView]":if(t.byteLength!=a.byteLength||t.byteOffset!=a.byteOffset)return!1;t=t.buffer,a=a.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=a.byteLength||!f(new e(t),new e(a)));case"[object Boolean]":case"[object Date]":case"[object Number]":return r(+t,+a);case"[object Error]":return t.name==a.name&&t.message==a.message;case"[object RegExp]":case"[object String]":return t==a+"";case"[object Map]":var g=o;case"[object Set]":var p=1&c;if(g||(g=i),t.size!=a.size&&!p)return!1;var m=l.get(t);if(m)return m==a;c|=2,l.set(t,a);var d=n(g(t),g(a),c,h,f,l);return l.delete(t),d;case"[object Symbol]":if(s)return s.call(t)==s.call(a)}return!1}}function Gs(){if(ka)return wa;return ka=1,wa=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}}function Hs(){if(Ra)return _a;Ra=1;var t=Gs(),e=Zr();return _a=function(r,n,o){var i=n(r);return e(r)?i:t(i,o(r))}}function Is(){if(xa)return Pa;return xa=1,Pa=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i}}function Fs(){if(ja)return Ca;return ja=1,Ca=function(){return[]}}function zs(){if(Na)return $a;Na=1;var t=Is(),e=Fs(),r=Object.prototype.propertyIsEnumerable,n=Object.getOwnPropertySymbols;return $a=n?function(e){return null==e?[]:(e=Object(e),t(n(e),(function(t){return r.call(e,t)})))}:e}function qs(){if(Ea)return Oa;Ea=1;var t=Hs(),e=zs(),r=js();return Oa=function(n){return t(n,r,e)}}function Vs(){if(Ta)return Ba;Ta=1;var t=qs(),e=Object.prototype.hasOwnProperty;return Ba=function(r,n,o,i,a,s){var u=1&o,c=t(r),h=c.length;if(h!=t(n).length&&!u)return!1;for(var f=h;f--;){var l=c[f];if(!(u?l in n:e.call(n,l)))return!1}var g=s.get(r),p=s.get(n);if(g&&p)return g==n&&p==r;var m=!0;s.set(r,n),s.set(n,r);for(var d=u;++f<h;){var v=r[l=c[f]],b=n[l];if(i)var y=u?i(b,v,l,n,r,s):i(v,b,l,r,n,s);if(!(void 0===y?v===b||a(v,b,o,i,s):y)){m=!1;break}d||(d="constructor"==l)}if(m&&!d){var w=r.constructor,k=n.constructor;w==k||!("constructor"in r)||!("constructor"in n)||"function"==typeof w&&w instanceof w&&"function"==typeof k&&k instanceof k||(m=!1)}return s.delete(r),s.delete(n),m}}function Js(){if(La)return Sa;La=1;var t=Ae()(Pe(),"DataView");return Sa=t}function Ys(){if(Wa)return Aa;Wa=1;var t=Ae()(Pe(),"Promise");return Aa=t}function Ks(){if(Ma)return Ua;Ma=1;var t=Ae()(Pe(),"Set");return Ua=t}function Qs(){if(Ga)return Da;Ga=1;var t=Ae()(Pe(),"WeakMap");return Da=t}function Xs(){if(Ia)return Ha;Ia=1;var t=Js(),e=We(),r=Ys(),n=Ks(),o=Qs(),i=$e(),a=Te(),s="[object Map]",u="[object Promise]",c="[object Set]",h="[object WeakMap]",f="[object DataView]",l=a(t),g=a(e),p=a(r),m=a(n),d=a(o),v=i;return(t&&v(new t(new ArrayBuffer(1)))!=f||e&&v(new e)!=s||r&&v(r.resolve())!=u||n&&v(new n)!=c||o&&v(new o)!=h)&&(v=function(t){var e=i(t),r="[object Object]"==e?t.constructor:void 0,n=r?a(r):"";if(n)switch(n){case l:return f;case g:return s;case p:return u;case m:return c;case d:return h}return e}),Ha=v}function Zs(){if(za)return Fa;za=1;var t=tr(),e=Ws(),r=Ds(),n=Vs(),o=Xs(),i=Zr(),a=mn(),s=vo(),u="[object Arguments]",c="[object Array]",h="[object Object]",f=Object.prototype.hasOwnProperty;return Fa=function(l,g,p,m,d,v){var b=i(l),y=i(g),w=b?c:o(l),k=y?c:o(g),_=(w=w==u?h:w)==h,R=(k=k==u?h:k)==h,P=w==k;if(P&&a(l)){if(!a(g))return!1;b=!0,_=!1}if(P&&!_)return v||(v=new t),b||s(l)?e(l,g,p,m,d,v):r(l,g,w,p,m,d,v);if(!(1&p)){var x=_&&f.call(l,"__wrapped__"),C=R&&f.call(g,"__wrapped__");if(x||C){var j=x?l.value():l,$=C?g.value():g;return v||(v=new t),d(j,$,p,m,v)}}return!!P&&(v||(v=new t),n(l,g,p,m,d,v))}}function tu(){if(Va)return qa;Va=1;var t=Zs(),e=Kr();return qa=function r(n,o,i,a,s){return n===o||(null==n||null==o||!e(n)&&!e(o)?n!=n&&o!=o:t(n,o,i,a,r,s))},qa}function eu(){if(Ya)return Ja;Ya=1;var t=tr(),e=tu();return Ja=function(r,n,o,i){var a=o.length,s=a,u=!i;if(null==r)return!s;for(r=Object(r);a--;){var c=o[a];if(u&&c[2]?c[1]!==r[c[0]]:!(c[0]in r))return!1}for(;++a<s;){var h=(c=o[a])[0],f=r[h],l=c[1];if(u&&c[2]){if(void 0===f&&!(h in r))return!1}else{var g=new t;if(i)var p=i(f,l,h,r,n,g);if(!(void 0===p?e(l,f,3,i,g):p))return!1}}return!0}}function ru(){if(Qa)return Ka;Qa=1;var t=Ne();return Ka=function(e){return e==e&&!t(e)}}function nu(){if(Za)return Xa;Za=1;var t=ru(),e=js();return Xa=function(r){for(var n=e(r),o=n.length;o--;){var i=n[o],a=r[i];n[o]=[i,a,t(a)]}return n}}function ou(){if(es)return ts;return es=1,ts=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}}function iu(){if(ns)return rs;ns=1;var t=eu(),e=nu(),r=ou();return rs=function(n){var o=e(n);return 1==o.length&&o[0][2]?r(o[0][0],o[0][1]):function(e){return e===n||t(e,n,o)}}}function au(){if(is)return os;return is=1,os=function(t,e){return null!=t&&e in Object(t)}}function su(){if(ss)return as;ss=1;var t=wi(),e=Xr(),r=Zr(),n=_o(),o=tn(),i=ki();return as=function(a,s,u){for(var c=-1,h=(s=t(s,a)).length,f=!1;++c<h;){var l=i(s[c]);if(!(f=null!=a&&u(a,l)))break;a=a[l]}return f||++c!=h?f:!!(h=null==a?0:a.length)&&o(h)&&n(l,h)&&(r(a)||e(a))}}function uu(){if(cs)return us;cs=1;var t=au(),e=su();return us=function(r,n){return null!=r&&e(r,n,t)}}function cu(){if(fs)return hs;fs=1;var t=tu(),e=Ri(),r=uu(),n=gi(),o=ru(),i=ou(),a=ki();return hs=function(s,u){return n(s)&&o(u)?i(a(s),u):function(n){var o=e(n,s);return void 0===o&&o===u?r(n,s):t(u,o,3)}}}function hu(){if(gs)return ls;return gs=1,ls=function(t){return function(e){return null==e?void 0:e[t]}}}function fu(){if(ms)return ps;ms=1;var t=_i();return ps=function(e){return function(r){return t(r,e)}}}function lu(){if(vs)return ds;vs=1;var t=hu(),e=fu(),r=gi(),n=ki();return ds=function(o){return r(o)?t(n(o)):e(o)}}function gu(){if(ys)return bs;ys=1;var t=iu(),e=cu(),r=Oo(),n=Zr(),o=lu();return bs=function(i){return"function"==typeof i?i:null==i?r:"object"==typeof i?n(i)?e(i[0],i[1]):t(i):o(i)}}function pu(){if(ks)return ws;ks=1;var t=Ps(),e=Es(),r=gu(),n=Zr();return ws=function(o,i){return function(a,s){var u=n(a)?t:e,c=i?i():{};return u(a,o,r(s,2),c)}}}function mu(){if(Rs)return _s;Rs=1;var t=rr(),e=pu(),r=Object.prototype.hasOwnProperty,n=e((function(e,n,o){r.call(e,o)?e[o].push(n):t(e,o,[n])}));return _s=n}var du=he(mu());const vu="\n- ${scopeHeader} ${commitlint.message} ${commitLink} ${prLink}";class bu{options;constructor(t){this.options=t}format(t,e){const{types:r=[],commitBody:n=!1}={...this.options,...e},o=[],i=du(t,(t=>t.commitlint.type?t.commitlint.type:t.commitlint.message));return r.forEach((t=>{const{type:r,section:a,hidden:s}=t;if(s)return;const u=i[r]||[];u.length>0&&(o.push(a||""),u.forEach((t=>{if(o.push(this.formatCommit(t,e)),n&&t.commitlint.body){const e=t.commitlint.body.split("\n").map((t=>` ${t}`));o.push(...e)}})))})),o}formatCommit(t,e){const{commitlint:r,base:{hash:n},prNumber:o}=t,{repoUrl:i,formatTemplate:a=vu}={...this.options,...e},s=r.scope?this.formatScope(r.scope):"",u=o?this.foramtLink("#"+o,i?`${i}/pull/${o}`:""):"",c=n?this.foramtLink(n.slice(0,7),i?`${i}/commit/${n}`:""):"";return this.options.shell.format(a,{...t,scopeHeader:s,commitLink:c,prLink:u})}foramtLink(t,e){return e?`([${t}](${e}))`:`(${t})`}formatCommitLink(t,e){return e?`([${t}](${e}))`:`(${t})`}formatScope(t){return`**${t}:**`}}class yu{toLocalPath(t){const e=t.replace(/[\\/]+/g,i);return a(e).replace(/[\\/]+/g,i)}isSubPath(t,e){let r=this.toLocalPath(t),n=this.toLocalPath(e);for(;r.endsWith(i);)r=r.slice(0,-1);for(;n.endsWith(i);)n=n.slice(0,-1);if(r===n)return!0;const o=n.length;return!!r.startsWith(n)&&r[o]===i}startsWith(t,e){let r=this.toLocalPath(t),n=this.toLocalPath(e);for(;r.endsWith(i);)r=r.slice(0,-1);for(;n.endsWith(i);)n=n.slice(0,-1);return r.startsWith(n)}containsPath(t,e){let r=this.toLocalPath(t),n=this.toLocalPath(e);for(;r.endsWith(i);)r=r.slice(0,-1);for(;n.endsWith(i);)n=n.slice(0,-1);if(r===n)return!0;const o=r.indexOf(n);if(-1===o)return!1;const a=0===o?"":r[o-1],s=o+n.length,u=s>=r.length?"":r[s];return(""===a||a===i)&&(""===u||u===i)}}const wu="https://github.com";class ku extends Mi{options;githubManager;pather=new yu;constructor(t,e){super(t),this.options=t,this.githubManager=e}async filterCommitsByDirectory(t,e){const r=[];for(const n of t){const t=await this.githubManager.getCommitInfo(n.base.hash),o=t.files?.map((t=>t.filename))??[];for(const t of o)if(this.pather.isSubPath(t,e)){r.push(n);break}}return r}async getFullCommit(t){const e={...this.options,...t},r=await this.getCommits(e);return(await Promise.all(r.map((async t=>{let{prNumber:r}=t;if(!r&&t.base.subject){const e=t.base.subject.match(/\(#(\d+)\)/);e&&(r=e[1],t.prNumber=r)}if(!r)return t;const n=(await this.githubManager.getPullRequestCommits(+r)).map((({sha:t,commit:{message:e}})=>Object.assign(this.toCommitValue(t,e),{prNumber:r})));return this.filterCommitsByDirectory(n,e.directory)})))).flat()}async transformWorkspace(t,e){const r=[wu,e.shared.authorName,e.shared.repoName].join("/"),n={...e.getConfig("changelog"),githubRootPath:r,mergePRcommit:!0,shell:e.shell,logger:e.logger},o=new ku(n,this.githubManager),i=new bu(n);return await Promise.all(t.map((async t=>{const e=await o.getFullCommit({from:t.lastTag??"",directory:t.path,fileds:Ui});if("string"==typeof e)return{...t,changelog:e};const a=i.format(e,{...n,repoUrl:r});return{...t,changelog:a.join("\n")}})))}}class _u{options;constructor(t){this.options=t}compare(t,e){return"function"==typeof this.options.compare?this.options.compare(t,e):t.startsWith(e)}toChangeLabel(t,e=this.options.changePackagesLabel){return e.replace("${name}",t)}toChangeLabels(t,e=this.options.changePackagesLabel){return t.map((t=>this.toChangeLabel(t,e)))}pick(t,e=this.options.packagesDirectories){const r=[];for(const n of e)for(const e of t)if(this.compare(e,n)){r.push(n);break}return r}}class Ru{static readJson(t){const e=l(t,"utf-8");return JSON.parse(e)}static toWorkspace(t,e){let{root:r,packageJson:n}=t;const o=t.path;if(!o)throw new Error("path is not required!");return r=r||m(e,o),n=n||Ru.readJson(m(r,xi)),{name:n.name,version:n.version,path:o,root:r,packageJson:n}}}class Pu extends Ai{releaseTask=null;workspacesList=[];_skip=!1;releaseLabel;constructor(t){super(t,"workspaces"),this.releaseLabel=new _u({changePackagesLabel:this.context.shared.changePackagesLabel||"change:${name}",packagesDirectories:this.context.shared.packagesDirectories||[],compare:(t,e)=>s(t).startsWith(s(e))})}enabled(){return!this._skip&&!this.getConfig("skip")}async onBefore(){const t=this.getConfig("workspace");if(t)return this.logger.debug("Use the specified workspace",t),void this.setCurrentWorkspace(t,[]);const e=await this.getWorkspaces();if(this.getConfig("skipCheckPackage")||0===e.length)throw new Error("No changes to publish packages");const{publishPath:r}=this.context.shared;if(r){const t=e.find((t=>s(t.root)===s(r)));if(this.nextSkip(),!t)throw new Error(`No workspace found for: ${r}`);return this.logger.debug(`Workspace of ${r} find!`,u(t.root,xi)),void this.setCurrentWorkspace(t,[t])}const[n,...o]=e;this.workspacesList=o,this.setCurrentWorkspace(n,e)}nextSkip(){this._skip=!0,this.logger.debug("skip next workspace")}setReleaseTask(t){this.releaseTask=t}setCurrentWorkspace(t,e){this.context.setShared({publishPath:t.path}),this.setConfig({workspace:t,workspaces:e})}async getGitWorkspaces(){const t=this.context.sourceBranch,e=await this.shell.exec(`git diff --name-only origin/${t}...HEAD`,{dryRun:!1});return"string"==typeof e?e.split("\n"):[]}async getChangedPackages(t,e){if(this.logger.debug("changeLabels",e),Array.isArray(e)&&e.length>0){const r=t.filter((t=>{const r=this.releaseLabel.toChangeLabel(t);return e.includes(r)}));return this.logger.debug("changed by labels",r),r}const r=await this.getGitWorkspaces();return this.logger.debug("changed by git",r),this.releaseLabel.pick(r,t)}getProjectWorkspaces(){const t=this.context.rootPath,e=this.context.shared.packagesDirectories;if(Array.isArray(e)&&e.length>0)return e.map((e=>Ru.toWorkspace({path:e},t)));return(f(t)||[]).map((e=>({name:e.package.name,version:e.package.version,path:c(t,e.location),root:s(t,e.location),packageJson:e.package})))}async getWorkspaces(){const t=this.getProjectWorkspaces(),e=t.map((({path:t})=>t));this.logger.debug("packages",e);const r=this.getConfig("changeLabels"),n=await this.getChangedPackages(e,r);return this.setConfig({packages:e,changedPaths:n,projectWorkspaces:t}),this.logger.debug("changedPaths",n),t.filter((t=>n.includes(t.path)))}}function xu(t,...e){return"function"==typeof t&&t.prototype&&t.prototype.constructor===t?new t(...e):t(...e)}function Cu(t){return t.startsWith(".")?h(t).name:t}async function ju(t){let e=null;try{e=(await import(t)).default}catch{try{e=(await import(u(process.cwd(),t))).default}catch{const r=d(process.cwd());e=(await import(v(r.resolve(t,{paths:[process.cwd()]})).href)).default}}return[Cu(t),e]}async function $u(t,e,r=5){const n=b(r),o=e.map((([e,...r])=>n((()=>(async(e,...r)=>{if("string"==typeof e){const[,n]=await ju(e);return xu(n,t,...r)}return xu(e,t,...r)})(e,...r)))));return Promise.all(o)}const Nu=[$i(Pu),$i(class extends Ai{constructor(t,e){super(t,"changelog",{increment:"patch",changesetRoot:".changeset",tagTemplate:"${name}@${version}",tagPrefix:"${name}",tagMatch:"${name}@*",...e})}get changesetRoot(){return m(this.context.rootPath,this.getConfig("changesetRoot"))}get changesetConfigPath(){return m(this.changesetRoot,"config.json")}enabled(){return!this.getConfig("skip")}async onBefore(){if(!g(this.changesetRoot))throw new Error(`Changeset directory ${this.changesetRoot} does not exist`);this.logger.debug(`${this.changesetRoot} exists`)}mergeWorkspaces(t){return t.map((t=>{const e=Ru.toWorkspace({path:t.path},this.context.rootPath),r={...t,version:e.version};return r.tagName=this.generateTagName(r),r}))}async onExec(t){const e=await this.step({label:"Generate Changelogs",task:()=>Promise.all(this.context.workspaces.map((t=>this.generateChangelog(t))))});this.context.setWorkspaces(e)}async onSuccess(){const t=this.context.workspaces;this.getConfig("skipChangeset")?this.logger.debug("Skip generate changeset files"):(await this.step({label:"Changeset Version",task:()=>Promise.all(t.map((t=>this.generateChangesetFile(t))))}),await this.context.runChangesetsCli("version",["--no-changelog","--update-dependencies"]),this.getConfig("ignoreNonUpdatedPackages")&&await this.restoreIgnorePackages());const e=this.mergeWorkspaces(t);this.logger.debug("new workspaces",e),this.context.setWorkspaces(e)}async restoreIgnorePackages(){const{changedPaths:t=[],packages:e=[]}=this.context.getConfig("workspaces"),r=e.filter((e=>!t.includes(e))).map((t=>Ru.toWorkspace({path:t},this.context.rootPath).path));this.logger.debug("noChangedPackages",r),r.length>0&&await this.shell.exec(["git","restore",...r])}getTagPrefix(t){return this.shell.format(this.getConfig("tagPrefix"),t)}async generateChangelog(t){let e=await this.getTagName(t);t.lastTag&&(this.logger.warn(`${t.name} has lastTag: ${t.lastTag}`),e=t.lastTag),this.logger.debug("tagName is:",e);const r={...this.getConfig(),from:e,directory:t.path,shell:this.shell,fileds:Ui,logger:this.logger},n=new Mi(r),o=await n.getCommits(r),i=new bu(r).format(o);return{...t,lastTag:e,changelog:i.join("\n")}}generateTagName(t){try{const e=this.getConfig("tagTemplate");return this.shell.format(e,t)}catch(e){return console.error(`Error generating tag name for ${t.name}:`,e),`${t.name}-v0.0.0`}}async getTagName(t){try{const e=this.generateTagName(t),r=this.shell.format(this.getConfig("tagMatch"),t),n=await this.shell.exec(`git for-each-ref --sort=-creatordate --format "%(refname:short)|%(creatordate:iso8601)" "refs/tags/${r}"`,{dryRun:!1});if(!n)return e;const o=n.split("\n").filter(Boolean);if(0===o.length)return e;return o[0].split("|")[0]}catch(e){console.error(`Error getting tag for ${t.name}:`,e);return this.generateTagName(t)}}getIncrement(){const t=this.context.getConfig("workspaces.changeLabels");if(Array.isArray(t)&&t.length>0){if(t.includes("increment:major"))return"major";if(t.includes("increment:minor"))return"minor"}return this.getConfig("increment","patch")}async generateChangesetFile(t){const{name:e,version:r}=t,n=`${e}-${r}`.replace(/[\/\\]/g,"_"),o=m(this.changesetRoot,`${n}.md`),i=this.getIncrement();this.logger.debug("increment is:",[i]);const a=this.shell.format("---\n'${name}': '${increment}'\n---\n\n${changelog}",{...t,increment:i});if(this.context.dryRun)return this.logger.info(`Changeset [${o}] will be created, content is:`),void this.logger.log(a);g(o)?this.logger.info(`Changeset ${n} already exists`):p(o,a,"utf-8")}},{}),$i(class extends Wi{context;releaseParams;githubManager;constructor(t,e){super(t,"githubPR",{releaseName:"Release ${name} v${version}",...e}),this.context=t,this.githubManager=new Ei(this.context),this.releaseParams=new Oi(t.shell,t.logger,{PRTitle:this.getConfig("PRTitle",this.context.shared.PRTitle),PRBody:this.getConfig("PRBody",this.context.shared.PRBody),...this.props})}enabled(t){return!this.getConfig("skip")}get isPublish(){return!this.getConfig("releasePR")}async isGithubRepository(){try{return(await this.getRemoteUrl()).includes("github.com")}catch{return!1}}async onBefore(){this.logger.debug("GithubPR onBefore");if(!await this.isGithubRepository())throw new Error("Current repository is not a GitHub repository. GitHub PR workflow is only available for GitHub repositories.");if(await super.onBefore(),this.isPublish){const t=this.getEnv("NPM_TOKEN");if(!t)throw new Error("NPM_TOKEN is not set");await this.shell.exec(`npm config set //registry.npmjs.org/:_authToken=${t}`)}}async onExec(){const t=this.context.workspaces,e=new ku(this.context.getConfig("changelog"),this.githubManager),r=await this.step({label:"GithubPR Changelogs",task:()=>e.transformWorkspace(t,this.context)});this.context.setWorkspaces(r)}async onSuccess(){this.isPublish?await this.publishPR(this.context.workspaces):await this.releasePR(this.context.workspaces)}async releasePR(t){await this.step({label:"Release Commit",task:()=>this.relesaeCommit(t)});const e=await this.step({label:"Create Release Branch",task:()=>this.createReleaseBranch(t)});await this.releasePullRequest(t,e)}async publishPR(t){this.getConfig("dryRunCreatePR")||(await this.context.runChangesetsCli("publish"),await this.shell.exec("git push origin --tags")),await this.step({label:"Release Github",task:()=>Promise.all(t.map((t=>(this.logger.debug(t),this.githubManager.createRelease(t)))))})}async relesaeCommit(t){const e=this.getConfig("commitArgs",[]);if(1===t.length)return await this.shell.exec("git add ."),void await this.commitWorkspace(t[0],e);await this.shell.exec("git add .");const r=`chore(tag): ${t.map((t=>`${t.name} v${t.version}`)).join(",")}`;await this.commit(r,e)}async releasePullRequest(t,e){const r=await this.step({label:"Create Release PR",task:()=>this.createReleasePR(t,e)});if(this.githubManager.autoMergeReleasePR){const{releaseBranch:t}=e;return await this.step({label:`Merge Release PR(${r})`,task:()=>this.githubManager.mergePR(r,t)}),void await this.step({label:`Checked Release PR(${r})`,task:()=>this.githubManager.checkedPR(r,t)})}this.logger.info(`Please manually merge PR(#${r}) and complete the publishing process afterwards`)}async commitWorkspace(t,e=[]){const r=this.shell.format(this.getConfig("commitMessage","chore(tag): ${name} v${version}"),t);return await this.commit(r,e)}async createReleaseBranch(t){const e=this.releaseParams.getReleaseBranchParams(t,this.context.getTemplateContext()),{tagName:r,releaseBranch:n}=e;if("string"!=typeof r)throw new Error("Tag name is not a string");const{sourceBranch:o,currentBranch:i}=this.context.shared;this.context.logger.debug("PR TagName is:",r),this.context.logger.debug("PR CurrentBranch is:",i),this.context.logger.debug("PR SourceBranch is:",o),this.context.logger.debug("PR ReleaseBranch is:",n);try{await this.context.shell.exec(`git fetch origin ${o} ${i}`),await this.context.shell.exec(`git checkout -b ${n} ${i}`),await this.context.shell.exec(`git push origin ${n}`)}catch(t){throw t.message.includes("remote: Permission to ")&&this.context.logger.warn('Token maybe not allow Workflow permissions, can you try to open "Workflow permissions" -> "Read and write permissions" for this token?'),t}return{tagName:r,releaseBranch:n}}async createReleasePR(t,e){let r=[(await this.githubManager.createReleasePRLabel()).name];if(this.getConfig("pushChangeLabels")){const t=this.context.getConfig("workspaces.changeLabels");Array.isArray(t)&&t.length>0&&r.push(...t)}r=Array.from(new Set(r)),this.logger.debug("Release PR labels:",r);const n=this.context.getTemplateContext(),o=this.releaseParams.getPRTitle(e,n),i=this.releaseParams.getPRBody(t,e,n);return this.githubManager.createReleasePR({title:o,body:i,base:this.context.sourceBranch,head:e.releaseBranch,labels:r})}},{})];class Ou{executor;defaultTuples;context;constructor(t={},e=new r,n=Nu){this.executor=e,this.defaultTuples=n,this.context=new ji(t)}getContext(){return this.context}async usePlugins(t){t=t||this.context.shared.plugins||[];const e=await $u(this.context,[...this.defaultTuples,...t]);return e.forEach((t=>{t instanceof Pu&&t.setReleaseTask(this),this.executor.use(t)})),e}async run(){return this.executor.exec(this.context,(t=>Promise.resolve(t)))}async exec(t){if("false"===this.context.env.get("FE_RELEASE"))throw new Error("Skip Release");return await this.usePlugins(t),this.run()}}var Eu,Bu,Tu,Su;function Lu(){if(Bu)return Eu;Bu=1;var t=yo(),e=wi(),r=_o(),n=Ne(),o=ki();return Eu=function(i,a,s,u){if(!n(i))return i;for(var c=-1,h=(a=e(a,i)).length,f=h-1,l=i;null!=l&&++c<h;){var g=o(a[c]),p=s;if("__proto__"===g||"constructor"===g||"prototype"===g)return i;if(c!=f){var m=l[g];void 0===(p=u?u(m,g,l):void 0)&&(p=n(m)?m:r(a[c+1])?[]:{})}t(l,g,p),l=l[g]}return i}}function Au(){if(Su)return Tu;Su=1;var t=Lu();return Tu=function(e,r,n){return null==e?e:t(e,r,n)}}var Wu=he(Au());function Uu(t,e){return Object.entries(t).reduce(((t,[r,n])=>(r.includes(".")?Wu(t,r,n):Wu(t,e?`${e}.${r}`:r,n),t)),{})}export{Ui as CHANGELOG_ALL_FIELDS,Mi as GitChangelog,bu as GitChangelogFormatter,Ai as Plugin,ji as ReleaseContext,_u as ReleaseLabel,Ou as ReleaseTask,xu as factory,ju as load,$u as loaderPluginsFromPluginTuples,Uu as reduceOptions,$i as tuple};
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js
|
|
28
|
+
var require_isArray = __commonJS({
|
|
29
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArray.js"(exports, module) {
|
|
30
|
+
"use strict";
|
|
31
|
+
var isArray = Array.isArray;
|
|
32
|
+
module.exports = isArray;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js
|
|
37
|
+
var require_freeGlobal = __commonJS({
|
|
38
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_freeGlobal.js"(exports, module) {
|
|
39
|
+
"use strict";
|
|
40
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
41
|
+
module.exports = freeGlobal;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js
|
|
46
|
+
var require_root = __commonJS({
|
|
47
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_root.js"(exports, module) {
|
|
48
|
+
"use strict";
|
|
49
|
+
var freeGlobal = require_freeGlobal();
|
|
50
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
51
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
52
|
+
module.exports = root;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js
|
|
57
|
+
var require_Symbol = __commonJS({
|
|
58
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Symbol.js"(exports, module) {
|
|
59
|
+
"use strict";
|
|
60
|
+
var root = require_root();
|
|
61
|
+
var Symbol2 = root.Symbol;
|
|
62
|
+
module.exports = Symbol2;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js
|
|
67
|
+
var require_getRawTag = __commonJS({
|
|
68
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getRawTag.js"(exports, module) {
|
|
69
|
+
"use strict";
|
|
70
|
+
var Symbol2 = require_Symbol();
|
|
71
|
+
var objectProto = Object.prototype;
|
|
72
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
73
|
+
var nativeObjectToString = objectProto.toString;
|
|
74
|
+
var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
|
|
75
|
+
function getRawTag(value) {
|
|
76
|
+
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
|
77
|
+
try {
|
|
78
|
+
value[symToStringTag] = void 0;
|
|
79
|
+
var unmasked = true;
|
|
80
|
+
} catch (e) {
|
|
81
|
+
}
|
|
82
|
+
var result = nativeObjectToString.call(value);
|
|
83
|
+
if (unmasked) {
|
|
84
|
+
if (isOwn) {
|
|
85
|
+
value[symToStringTag] = tag;
|
|
86
|
+
} else {
|
|
87
|
+
delete value[symToStringTag];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return result;
|
|
91
|
+
}
|
|
92
|
+
module.exports = getRawTag;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js
|
|
97
|
+
var require_objectToString = __commonJS({
|
|
98
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_objectToString.js"(exports, module) {
|
|
99
|
+
"use strict";
|
|
100
|
+
var objectProto = Object.prototype;
|
|
101
|
+
var nativeObjectToString = objectProto.toString;
|
|
102
|
+
function objectToString(value) {
|
|
103
|
+
return nativeObjectToString.call(value);
|
|
104
|
+
}
|
|
105
|
+
module.exports = objectToString;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js
|
|
110
|
+
var require_baseGetTag = __commonJS({
|
|
111
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetTag.js"(exports, module) {
|
|
112
|
+
"use strict";
|
|
113
|
+
var Symbol2 = require_Symbol();
|
|
114
|
+
var getRawTag = require_getRawTag();
|
|
115
|
+
var objectToString = require_objectToString();
|
|
116
|
+
var nullTag = "[object Null]";
|
|
117
|
+
var undefinedTag = "[object Undefined]";
|
|
118
|
+
var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0;
|
|
119
|
+
function baseGetTag(value) {
|
|
120
|
+
if (value == null) {
|
|
121
|
+
return value === void 0 ? undefinedTag : nullTag;
|
|
122
|
+
}
|
|
123
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
124
|
+
}
|
|
125
|
+
module.exports = baseGetTag;
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js
|
|
130
|
+
var require_isObjectLike = __commonJS({
|
|
131
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObjectLike.js"(exports, module) {
|
|
132
|
+
"use strict";
|
|
133
|
+
function isObjectLike(value) {
|
|
134
|
+
return value != null && typeof value == "object";
|
|
135
|
+
}
|
|
136
|
+
module.exports = isObjectLike;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js
|
|
141
|
+
var require_isSymbol = __commonJS({
|
|
142
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isSymbol.js"(exports, module) {
|
|
143
|
+
"use strict";
|
|
144
|
+
var baseGetTag = require_baseGetTag();
|
|
145
|
+
var isObjectLike = require_isObjectLike();
|
|
146
|
+
var symbolTag = "[object Symbol]";
|
|
147
|
+
function isSymbol(value) {
|
|
148
|
+
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
|
149
|
+
}
|
|
150
|
+
module.exports = isSymbol;
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKey.js
|
|
155
|
+
var require_isKey = __commonJS({
|
|
156
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKey.js"(exports, module) {
|
|
157
|
+
"use strict";
|
|
158
|
+
var isArray = require_isArray();
|
|
159
|
+
var isSymbol = require_isSymbol();
|
|
160
|
+
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
|
|
161
|
+
var reIsPlainProp = /^\w*$/;
|
|
162
|
+
function isKey(value, object) {
|
|
163
|
+
if (isArray(value)) {
|
|
164
|
+
return false;
|
|
165
|
+
}
|
|
166
|
+
var type = typeof value;
|
|
167
|
+
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
|
|
168
|
+
return true;
|
|
169
|
+
}
|
|
170
|
+
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
171
|
+
}
|
|
172
|
+
module.exports = isKey;
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js
|
|
177
|
+
var require_isObject = __commonJS({
|
|
178
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js"(exports, module) {
|
|
179
|
+
"use strict";
|
|
180
|
+
function isObject(value) {
|
|
181
|
+
var type = typeof value;
|
|
182
|
+
return value != null && (type == "object" || type == "function");
|
|
183
|
+
}
|
|
184
|
+
module.exports = isObject;
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js
|
|
189
|
+
var require_isFunction = __commonJS({
|
|
190
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isFunction.js"(exports, module) {
|
|
191
|
+
"use strict";
|
|
192
|
+
var baseGetTag = require_baseGetTag();
|
|
193
|
+
var isObject = require_isObject();
|
|
194
|
+
var asyncTag = "[object AsyncFunction]";
|
|
195
|
+
var funcTag = "[object Function]";
|
|
196
|
+
var genTag = "[object GeneratorFunction]";
|
|
197
|
+
var proxyTag = "[object Proxy]";
|
|
198
|
+
function isFunction(value) {
|
|
199
|
+
if (!isObject(value)) {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
var tag = baseGetTag(value);
|
|
203
|
+
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
204
|
+
}
|
|
205
|
+
module.exports = isFunction;
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js
|
|
210
|
+
var require_coreJsData = __commonJS({
|
|
211
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_coreJsData.js"(exports, module) {
|
|
212
|
+
"use strict";
|
|
213
|
+
var root = require_root();
|
|
214
|
+
var coreJsData = root["__core-js_shared__"];
|
|
215
|
+
module.exports = coreJsData;
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isMasked.js
|
|
220
|
+
var require_isMasked = __commonJS({
|
|
221
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isMasked.js"(exports, module) {
|
|
222
|
+
"use strict";
|
|
223
|
+
var coreJsData = require_coreJsData();
|
|
224
|
+
var maskSrcKey = function() {
|
|
225
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
226
|
+
return uid ? "Symbol(src)_1." + uid : "";
|
|
227
|
+
}();
|
|
228
|
+
function isMasked(func) {
|
|
229
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
230
|
+
}
|
|
231
|
+
module.exports = isMasked;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toSource.js
|
|
236
|
+
var require_toSource = __commonJS({
|
|
237
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toSource.js"(exports, module) {
|
|
238
|
+
"use strict";
|
|
239
|
+
var funcProto = Function.prototype;
|
|
240
|
+
var funcToString = funcProto.toString;
|
|
241
|
+
function toSource(func) {
|
|
242
|
+
if (func != null) {
|
|
243
|
+
try {
|
|
244
|
+
return funcToString.call(func);
|
|
245
|
+
} catch (e) {
|
|
246
|
+
}
|
|
247
|
+
try {
|
|
248
|
+
return func + "";
|
|
249
|
+
} catch (e) {
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
return "";
|
|
253
|
+
}
|
|
254
|
+
module.exports = toSource;
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js
|
|
259
|
+
var require_baseIsNative = __commonJS({
|
|
260
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsNative.js"(exports, module) {
|
|
261
|
+
"use strict";
|
|
262
|
+
var isFunction = require_isFunction();
|
|
263
|
+
var isMasked = require_isMasked();
|
|
264
|
+
var isObject = require_isObject();
|
|
265
|
+
var toSource = require_toSource();
|
|
266
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
267
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
268
|
+
var funcProto = Function.prototype;
|
|
269
|
+
var objectProto = Object.prototype;
|
|
270
|
+
var funcToString = funcProto.toString;
|
|
271
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
272
|
+
var reIsNative = RegExp(
|
|
273
|
+
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
274
|
+
);
|
|
275
|
+
function baseIsNative(value) {
|
|
276
|
+
if (!isObject(value) || isMasked(value)) {
|
|
277
|
+
return false;
|
|
278
|
+
}
|
|
279
|
+
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
280
|
+
return pattern.test(toSource(value));
|
|
281
|
+
}
|
|
282
|
+
module.exports = baseIsNative;
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getValue.js
|
|
287
|
+
var require_getValue = __commonJS({
|
|
288
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getValue.js"(exports, module) {
|
|
289
|
+
"use strict";
|
|
290
|
+
function getValue(object, key) {
|
|
291
|
+
return object == null ? void 0 : object[key];
|
|
292
|
+
}
|
|
293
|
+
module.exports = getValue;
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getNative.js
|
|
298
|
+
var require_getNative = __commonJS({
|
|
299
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getNative.js"(exports, module) {
|
|
300
|
+
"use strict";
|
|
301
|
+
var baseIsNative = require_baseIsNative();
|
|
302
|
+
var getValue = require_getValue();
|
|
303
|
+
function getNative(object, key) {
|
|
304
|
+
var value = getValue(object, key);
|
|
305
|
+
return baseIsNative(value) ? value : void 0;
|
|
306
|
+
}
|
|
307
|
+
module.exports = getNative;
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js
|
|
312
|
+
var require_nativeCreate = __commonJS({
|
|
313
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeCreate.js"(exports, module) {
|
|
314
|
+
"use strict";
|
|
315
|
+
var getNative = require_getNative();
|
|
316
|
+
var nativeCreate = getNative(Object, "create");
|
|
317
|
+
module.exports = nativeCreate;
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js
|
|
322
|
+
var require_hashClear = __commonJS({
|
|
323
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashClear.js"(exports, module) {
|
|
324
|
+
"use strict";
|
|
325
|
+
var nativeCreate = require_nativeCreate();
|
|
326
|
+
function hashClear() {
|
|
327
|
+
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
328
|
+
this.size = 0;
|
|
329
|
+
}
|
|
330
|
+
module.exports = hashClear;
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
|
|
334
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js
|
|
335
|
+
var require_hashDelete = __commonJS({
|
|
336
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashDelete.js"(exports, module) {
|
|
337
|
+
"use strict";
|
|
338
|
+
function hashDelete(key) {
|
|
339
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
340
|
+
this.size -= result ? 1 : 0;
|
|
341
|
+
return result;
|
|
342
|
+
}
|
|
343
|
+
module.exports = hashDelete;
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js
|
|
348
|
+
var require_hashGet = __commonJS({
|
|
349
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashGet.js"(exports, module) {
|
|
350
|
+
"use strict";
|
|
351
|
+
var nativeCreate = require_nativeCreate();
|
|
352
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
353
|
+
var objectProto = Object.prototype;
|
|
354
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
355
|
+
function hashGet(key) {
|
|
356
|
+
var data = this.__data__;
|
|
357
|
+
if (nativeCreate) {
|
|
358
|
+
var result = data[key];
|
|
359
|
+
return result === HASH_UNDEFINED ? void 0 : result;
|
|
360
|
+
}
|
|
361
|
+
return hasOwnProperty.call(data, key) ? data[key] : void 0;
|
|
362
|
+
}
|
|
363
|
+
module.exports = hashGet;
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js
|
|
368
|
+
var require_hashHas = __commonJS({
|
|
369
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashHas.js"(exports, module) {
|
|
370
|
+
"use strict";
|
|
371
|
+
var nativeCreate = require_nativeCreate();
|
|
372
|
+
var objectProto = Object.prototype;
|
|
373
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
374
|
+
function hashHas(key) {
|
|
375
|
+
var data = this.__data__;
|
|
376
|
+
return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key);
|
|
377
|
+
}
|
|
378
|
+
module.exports = hashHas;
|
|
379
|
+
}
|
|
380
|
+
});
|
|
381
|
+
|
|
382
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js
|
|
383
|
+
var require_hashSet = __commonJS({
|
|
384
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hashSet.js"(exports, module) {
|
|
385
|
+
"use strict";
|
|
386
|
+
var nativeCreate = require_nativeCreate();
|
|
387
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
388
|
+
function hashSet(key, value) {
|
|
389
|
+
var data = this.__data__;
|
|
390
|
+
this.size += this.has(key) ? 0 : 1;
|
|
391
|
+
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value;
|
|
392
|
+
return this;
|
|
393
|
+
}
|
|
394
|
+
module.exports = hashSet;
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
|
|
398
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js
|
|
399
|
+
var require_Hash = __commonJS({
|
|
400
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Hash.js"(exports, module) {
|
|
401
|
+
"use strict";
|
|
402
|
+
var hashClear = require_hashClear();
|
|
403
|
+
var hashDelete = require_hashDelete();
|
|
404
|
+
var hashGet = require_hashGet();
|
|
405
|
+
var hashHas = require_hashHas();
|
|
406
|
+
var hashSet = require_hashSet();
|
|
407
|
+
function Hash(entries) {
|
|
408
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
409
|
+
this.clear();
|
|
410
|
+
while (++index < length) {
|
|
411
|
+
var entry = entries[index];
|
|
412
|
+
this.set(entry[0], entry[1]);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
Hash.prototype.clear = hashClear;
|
|
416
|
+
Hash.prototype["delete"] = hashDelete;
|
|
417
|
+
Hash.prototype.get = hashGet;
|
|
418
|
+
Hash.prototype.has = hashHas;
|
|
419
|
+
Hash.prototype.set = hashSet;
|
|
420
|
+
module.exports = Hash;
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js
|
|
425
|
+
var require_listCacheClear = __commonJS({
|
|
426
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheClear.js"(exports, module) {
|
|
427
|
+
"use strict";
|
|
428
|
+
function listCacheClear() {
|
|
429
|
+
this.__data__ = [];
|
|
430
|
+
this.size = 0;
|
|
431
|
+
}
|
|
432
|
+
module.exports = listCacheClear;
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js
|
|
437
|
+
var require_eq = __commonJS({
|
|
438
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/eq.js"(exports, module) {
|
|
439
|
+
"use strict";
|
|
440
|
+
function eq(value, other) {
|
|
441
|
+
return value === other || value !== value && other !== other;
|
|
442
|
+
}
|
|
443
|
+
module.exports = eq;
|
|
444
|
+
}
|
|
445
|
+
});
|
|
446
|
+
|
|
447
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js
|
|
448
|
+
var require_assocIndexOf = __commonJS({
|
|
449
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assocIndexOf.js"(exports, module) {
|
|
450
|
+
"use strict";
|
|
451
|
+
var eq = require_eq();
|
|
452
|
+
function assocIndexOf(array, key) {
|
|
453
|
+
var length = array.length;
|
|
454
|
+
while (length--) {
|
|
455
|
+
if (eq(array[length][0], key)) {
|
|
456
|
+
return length;
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
return -1;
|
|
460
|
+
}
|
|
461
|
+
module.exports = assocIndexOf;
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js
|
|
466
|
+
var require_listCacheDelete = __commonJS({
|
|
467
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheDelete.js"(exports, module) {
|
|
468
|
+
"use strict";
|
|
469
|
+
var assocIndexOf = require_assocIndexOf();
|
|
470
|
+
var arrayProto = Array.prototype;
|
|
471
|
+
var splice = arrayProto.splice;
|
|
472
|
+
function listCacheDelete(key) {
|
|
473
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
474
|
+
if (index < 0) {
|
|
475
|
+
return false;
|
|
476
|
+
}
|
|
477
|
+
var lastIndex = data.length - 1;
|
|
478
|
+
if (index == lastIndex) {
|
|
479
|
+
data.pop();
|
|
480
|
+
} else {
|
|
481
|
+
splice.call(data, index, 1);
|
|
482
|
+
}
|
|
483
|
+
--this.size;
|
|
484
|
+
return true;
|
|
485
|
+
}
|
|
486
|
+
module.exports = listCacheDelete;
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
|
|
490
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js
|
|
491
|
+
var require_listCacheGet = __commonJS({
|
|
492
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheGet.js"(exports, module) {
|
|
493
|
+
"use strict";
|
|
494
|
+
var assocIndexOf = require_assocIndexOf();
|
|
495
|
+
function listCacheGet(key) {
|
|
496
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
497
|
+
return index < 0 ? void 0 : data[index][1];
|
|
498
|
+
}
|
|
499
|
+
module.exports = listCacheGet;
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
|
|
503
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js
|
|
504
|
+
var require_listCacheHas = __commonJS({
|
|
505
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheHas.js"(exports, module) {
|
|
506
|
+
"use strict";
|
|
507
|
+
var assocIndexOf = require_assocIndexOf();
|
|
508
|
+
function listCacheHas(key) {
|
|
509
|
+
return assocIndexOf(this.__data__, key) > -1;
|
|
510
|
+
}
|
|
511
|
+
module.exports = listCacheHas;
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
|
|
515
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js
|
|
516
|
+
var require_listCacheSet = __commonJS({
|
|
517
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_listCacheSet.js"(exports, module) {
|
|
518
|
+
"use strict";
|
|
519
|
+
var assocIndexOf = require_assocIndexOf();
|
|
520
|
+
function listCacheSet(key, value) {
|
|
521
|
+
var data = this.__data__, index = assocIndexOf(data, key);
|
|
522
|
+
if (index < 0) {
|
|
523
|
+
++this.size;
|
|
524
|
+
data.push([key, value]);
|
|
525
|
+
} else {
|
|
526
|
+
data[index][1] = value;
|
|
527
|
+
}
|
|
528
|
+
return this;
|
|
529
|
+
}
|
|
530
|
+
module.exports = listCacheSet;
|
|
531
|
+
}
|
|
532
|
+
});
|
|
533
|
+
|
|
534
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js
|
|
535
|
+
var require_ListCache = __commonJS({
|
|
536
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_ListCache.js"(exports, module) {
|
|
537
|
+
"use strict";
|
|
538
|
+
var listCacheClear = require_listCacheClear();
|
|
539
|
+
var listCacheDelete = require_listCacheDelete();
|
|
540
|
+
var listCacheGet = require_listCacheGet();
|
|
541
|
+
var listCacheHas = require_listCacheHas();
|
|
542
|
+
var listCacheSet = require_listCacheSet();
|
|
543
|
+
function ListCache(entries) {
|
|
544
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
545
|
+
this.clear();
|
|
546
|
+
while (++index < length) {
|
|
547
|
+
var entry = entries[index];
|
|
548
|
+
this.set(entry[0], entry[1]);
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
ListCache.prototype.clear = listCacheClear;
|
|
552
|
+
ListCache.prototype["delete"] = listCacheDelete;
|
|
553
|
+
ListCache.prototype.get = listCacheGet;
|
|
554
|
+
ListCache.prototype.has = listCacheHas;
|
|
555
|
+
ListCache.prototype.set = listCacheSet;
|
|
556
|
+
module.exports = ListCache;
|
|
557
|
+
}
|
|
558
|
+
});
|
|
559
|
+
|
|
560
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Map.js
|
|
561
|
+
var require_Map = __commonJS({
|
|
562
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Map.js"(exports, module) {
|
|
563
|
+
"use strict";
|
|
564
|
+
var getNative = require_getNative();
|
|
565
|
+
var root = require_root();
|
|
566
|
+
var Map = getNative(root, "Map");
|
|
567
|
+
module.exports = Map;
|
|
568
|
+
}
|
|
569
|
+
});
|
|
570
|
+
|
|
571
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js
|
|
572
|
+
var require_mapCacheClear = __commonJS({
|
|
573
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheClear.js"(exports, module) {
|
|
574
|
+
"use strict";
|
|
575
|
+
var Hash = require_Hash();
|
|
576
|
+
var ListCache = require_ListCache();
|
|
577
|
+
var Map = require_Map();
|
|
578
|
+
function mapCacheClear() {
|
|
579
|
+
this.size = 0;
|
|
580
|
+
this.__data__ = {
|
|
581
|
+
"hash": new Hash(),
|
|
582
|
+
"map": new (Map || ListCache)(),
|
|
583
|
+
"string": new Hash()
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
module.exports = mapCacheClear;
|
|
587
|
+
}
|
|
588
|
+
});
|
|
589
|
+
|
|
590
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js
|
|
591
|
+
var require_isKeyable = __commonJS({
|
|
592
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isKeyable.js"(exports, module) {
|
|
593
|
+
"use strict";
|
|
594
|
+
function isKeyable(value) {
|
|
595
|
+
var type = typeof value;
|
|
596
|
+
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
597
|
+
}
|
|
598
|
+
module.exports = isKeyable;
|
|
599
|
+
}
|
|
600
|
+
});
|
|
601
|
+
|
|
602
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js
|
|
603
|
+
var require_getMapData = __commonJS({
|
|
604
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMapData.js"(exports, module) {
|
|
605
|
+
"use strict";
|
|
606
|
+
var isKeyable = require_isKeyable();
|
|
607
|
+
function getMapData(map, key) {
|
|
608
|
+
var data = map.__data__;
|
|
609
|
+
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
610
|
+
}
|
|
611
|
+
module.exports = getMapData;
|
|
612
|
+
}
|
|
613
|
+
});
|
|
614
|
+
|
|
615
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js
|
|
616
|
+
var require_mapCacheDelete = __commonJS({
|
|
617
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheDelete.js"(exports, module) {
|
|
618
|
+
"use strict";
|
|
619
|
+
var getMapData = require_getMapData();
|
|
620
|
+
function mapCacheDelete(key) {
|
|
621
|
+
var result = getMapData(this, key)["delete"](key);
|
|
622
|
+
this.size -= result ? 1 : 0;
|
|
623
|
+
return result;
|
|
624
|
+
}
|
|
625
|
+
module.exports = mapCacheDelete;
|
|
626
|
+
}
|
|
627
|
+
});
|
|
628
|
+
|
|
629
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js
|
|
630
|
+
var require_mapCacheGet = __commonJS({
|
|
631
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheGet.js"(exports, module) {
|
|
632
|
+
"use strict";
|
|
633
|
+
var getMapData = require_getMapData();
|
|
634
|
+
function mapCacheGet(key) {
|
|
635
|
+
return getMapData(this, key).get(key);
|
|
636
|
+
}
|
|
637
|
+
module.exports = mapCacheGet;
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
|
|
641
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js
|
|
642
|
+
var require_mapCacheHas = __commonJS({
|
|
643
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheHas.js"(exports, module) {
|
|
644
|
+
"use strict";
|
|
645
|
+
var getMapData = require_getMapData();
|
|
646
|
+
function mapCacheHas(key) {
|
|
647
|
+
return getMapData(this, key).has(key);
|
|
648
|
+
}
|
|
649
|
+
module.exports = mapCacheHas;
|
|
650
|
+
}
|
|
651
|
+
});
|
|
652
|
+
|
|
653
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js
|
|
654
|
+
var require_mapCacheSet = __commonJS({
|
|
655
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapCacheSet.js"(exports, module) {
|
|
656
|
+
"use strict";
|
|
657
|
+
var getMapData = require_getMapData();
|
|
658
|
+
function mapCacheSet(key, value) {
|
|
659
|
+
var data = getMapData(this, key), size = data.size;
|
|
660
|
+
data.set(key, value);
|
|
661
|
+
this.size += data.size == size ? 0 : 1;
|
|
662
|
+
return this;
|
|
663
|
+
}
|
|
664
|
+
module.exports = mapCacheSet;
|
|
665
|
+
}
|
|
666
|
+
});
|
|
667
|
+
|
|
668
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js
|
|
669
|
+
var require_MapCache = __commonJS({
|
|
670
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_MapCache.js"(exports, module) {
|
|
671
|
+
"use strict";
|
|
672
|
+
var mapCacheClear = require_mapCacheClear();
|
|
673
|
+
var mapCacheDelete = require_mapCacheDelete();
|
|
674
|
+
var mapCacheGet = require_mapCacheGet();
|
|
675
|
+
var mapCacheHas = require_mapCacheHas();
|
|
676
|
+
var mapCacheSet = require_mapCacheSet();
|
|
677
|
+
function MapCache(entries) {
|
|
678
|
+
var index = -1, length = entries == null ? 0 : entries.length;
|
|
679
|
+
this.clear();
|
|
680
|
+
while (++index < length) {
|
|
681
|
+
var entry = entries[index];
|
|
682
|
+
this.set(entry[0], entry[1]);
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
MapCache.prototype.clear = mapCacheClear;
|
|
686
|
+
MapCache.prototype["delete"] = mapCacheDelete;
|
|
687
|
+
MapCache.prototype.get = mapCacheGet;
|
|
688
|
+
MapCache.prototype.has = mapCacheHas;
|
|
689
|
+
MapCache.prototype.set = mapCacheSet;
|
|
690
|
+
module.exports = MapCache;
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
|
|
694
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/memoize.js
|
|
695
|
+
var require_memoize = __commonJS({
|
|
696
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/memoize.js"(exports, module) {
|
|
697
|
+
"use strict";
|
|
698
|
+
var MapCache = require_MapCache();
|
|
699
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
700
|
+
function memoize(func, resolver) {
|
|
701
|
+
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
|
|
702
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
703
|
+
}
|
|
704
|
+
var memoized = function() {
|
|
705
|
+
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
706
|
+
if (cache.has(key)) {
|
|
707
|
+
return cache.get(key);
|
|
708
|
+
}
|
|
709
|
+
var result = func.apply(this, args);
|
|
710
|
+
memoized.cache = cache.set(key, result) || cache;
|
|
711
|
+
return result;
|
|
712
|
+
};
|
|
713
|
+
memoized.cache = new (memoize.Cache || MapCache)();
|
|
714
|
+
return memoized;
|
|
715
|
+
}
|
|
716
|
+
memoize.Cache = MapCache;
|
|
717
|
+
module.exports = memoize;
|
|
718
|
+
}
|
|
719
|
+
});
|
|
720
|
+
|
|
721
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_memoizeCapped.js
|
|
722
|
+
var require_memoizeCapped = __commonJS({
|
|
723
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_memoizeCapped.js"(exports, module) {
|
|
724
|
+
"use strict";
|
|
725
|
+
var memoize = require_memoize();
|
|
726
|
+
var MAX_MEMOIZE_SIZE = 500;
|
|
727
|
+
function memoizeCapped(func) {
|
|
728
|
+
var result = memoize(func, function(key) {
|
|
729
|
+
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
730
|
+
cache.clear();
|
|
731
|
+
}
|
|
732
|
+
return key;
|
|
733
|
+
});
|
|
734
|
+
var cache = result.cache;
|
|
735
|
+
return result;
|
|
736
|
+
}
|
|
737
|
+
module.exports = memoizeCapped;
|
|
738
|
+
}
|
|
739
|
+
});
|
|
740
|
+
|
|
741
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringToPath.js
|
|
742
|
+
var require_stringToPath = __commonJS({
|
|
743
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stringToPath.js"(exports, module) {
|
|
744
|
+
"use strict";
|
|
745
|
+
var memoizeCapped = require_memoizeCapped();
|
|
746
|
+
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
747
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
748
|
+
var stringToPath = memoizeCapped(function(string) {
|
|
749
|
+
var result = [];
|
|
750
|
+
if (string.charCodeAt(0) === 46) {
|
|
751
|
+
result.push("");
|
|
752
|
+
}
|
|
753
|
+
string.replace(rePropName, function(match, number, quote, subString) {
|
|
754
|
+
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
|
|
755
|
+
});
|
|
756
|
+
return result;
|
|
757
|
+
});
|
|
758
|
+
module.exports = stringToPath;
|
|
759
|
+
}
|
|
760
|
+
});
|
|
761
|
+
|
|
762
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js
|
|
763
|
+
var require_arrayMap = __commonJS({
|
|
764
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayMap.js"(exports, module) {
|
|
765
|
+
"use strict";
|
|
766
|
+
function arrayMap(array, iteratee) {
|
|
767
|
+
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
768
|
+
while (++index < length) {
|
|
769
|
+
result[index] = iteratee(array[index], index, array);
|
|
770
|
+
}
|
|
771
|
+
return result;
|
|
772
|
+
}
|
|
773
|
+
module.exports = arrayMap;
|
|
774
|
+
}
|
|
775
|
+
});
|
|
776
|
+
|
|
777
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToString.js
|
|
778
|
+
var require_baseToString = __commonJS({
|
|
779
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseToString.js"(exports, module) {
|
|
780
|
+
"use strict";
|
|
781
|
+
var Symbol2 = require_Symbol();
|
|
782
|
+
var arrayMap = require_arrayMap();
|
|
783
|
+
var isArray = require_isArray();
|
|
784
|
+
var isSymbol = require_isSymbol();
|
|
785
|
+
var INFINITY = 1 / 0;
|
|
786
|
+
var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
|
|
787
|
+
var symbolToString = symbolProto ? symbolProto.toString : void 0;
|
|
788
|
+
function baseToString(value) {
|
|
789
|
+
if (typeof value == "string") {
|
|
790
|
+
return value;
|
|
791
|
+
}
|
|
792
|
+
if (isArray(value)) {
|
|
793
|
+
return arrayMap(value, baseToString) + "";
|
|
794
|
+
}
|
|
795
|
+
if (isSymbol(value)) {
|
|
796
|
+
return symbolToString ? symbolToString.call(value) : "";
|
|
797
|
+
}
|
|
798
|
+
var result = value + "";
|
|
799
|
+
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
800
|
+
}
|
|
801
|
+
module.exports = baseToString;
|
|
802
|
+
}
|
|
803
|
+
});
|
|
804
|
+
|
|
805
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toString.js
|
|
806
|
+
var require_toString = __commonJS({
|
|
807
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/toString.js"(exports, module) {
|
|
808
|
+
"use strict";
|
|
809
|
+
var baseToString = require_baseToString();
|
|
810
|
+
function toString(value) {
|
|
811
|
+
return value == null ? "" : baseToString(value);
|
|
812
|
+
}
|
|
813
|
+
module.exports = toString;
|
|
814
|
+
}
|
|
815
|
+
});
|
|
816
|
+
|
|
817
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castPath.js
|
|
818
|
+
var require_castPath = __commonJS({
|
|
819
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_castPath.js"(exports, module) {
|
|
820
|
+
"use strict";
|
|
821
|
+
var isArray = require_isArray();
|
|
822
|
+
var isKey = require_isKey();
|
|
823
|
+
var stringToPath = require_stringToPath();
|
|
824
|
+
var toString = require_toString();
|
|
825
|
+
function castPath(value, object) {
|
|
826
|
+
if (isArray(value)) {
|
|
827
|
+
return value;
|
|
828
|
+
}
|
|
829
|
+
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
830
|
+
}
|
|
831
|
+
module.exports = castPath;
|
|
832
|
+
}
|
|
833
|
+
});
|
|
834
|
+
|
|
835
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toKey.js
|
|
836
|
+
var require_toKey = __commonJS({
|
|
837
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_toKey.js"(exports, module) {
|
|
838
|
+
"use strict";
|
|
839
|
+
var isSymbol = require_isSymbol();
|
|
840
|
+
var INFINITY = 1 / 0;
|
|
841
|
+
function toKey(value) {
|
|
842
|
+
if (typeof value == "string" || isSymbol(value)) {
|
|
843
|
+
return value;
|
|
844
|
+
}
|
|
845
|
+
var result = value + "";
|
|
846
|
+
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
847
|
+
}
|
|
848
|
+
module.exports = toKey;
|
|
849
|
+
}
|
|
850
|
+
});
|
|
851
|
+
|
|
852
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js
|
|
853
|
+
var require_baseGet = __commonJS({
|
|
854
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGet.js"(exports, module) {
|
|
855
|
+
"use strict";
|
|
856
|
+
var castPath = require_castPath();
|
|
857
|
+
var toKey = require_toKey();
|
|
858
|
+
function baseGet(object, path) {
|
|
859
|
+
path = castPath(path, object);
|
|
860
|
+
var index = 0, length = path.length;
|
|
861
|
+
while (object != null && index < length) {
|
|
862
|
+
object = object[toKey(path[index++])];
|
|
863
|
+
}
|
|
864
|
+
return index && index == length ? object : void 0;
|
|
865
|
+
}
|
|
866
|
+
module.exports = baseGet;
|
|
867
|
+
}
|
|
868
|
+
});
|
|
869
|
+
|
|
870
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/get.js
|
|
871
|
+
var require_get = __commonJS({
|
|
872
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/get.js"(exports, module) {
|
|
873
|
+
"use strict";
|
|
874
|
+
var baseGet = require_baseGet();
|
|
875
|
+
function get2(object, path, defaultValue) {
|
|
876
|
+
var result = object == null ? void 0 : baseGet(object, path);
|
|
877
|
+
return result === void 0 ? defaultValue : result;
|
|
878
|
+
}
|
|
879
|
+
module.exports = get2;
|
|
880
|
+
}
|
|
881
|
+
});
|
|
882
|
+
|
|
883
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isString.js
|
|
884
|
+
var require_isString = __commonJS({
|
|
885
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isString.js"(exports, module) {
|
|
886
|
+
"use strict";
|
|
887
|
+
var baseGetTag = require_baseGetTag();
|
|
888
|
+
var isArray = require_isArray();
|
|
889
|
+
var isObjectLike = require_isObjectLike();
|
|
890
|
+
var stringTag = "[object String]";
|
|
891
|
+
function isString2(value) {
|
|
892
|
+
return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
|
|
893
|
+
}
|
|
894
|
+
module.exports = isString2;
|
|
895
|
+
}
|
|
896
|
+
});
|
|
897
|
+
|
|
898
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_defineProperty.js
|
|
899
|
+
var require_defineProperty = __commonJS({
|
|
900
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_defineProperty.js"(exports, module) {
|
|
901
|
+
"use strict";
|
|
902
|
+
var getNative = require_getNative();
|
|
903
|
+
var defineProperty = function() {
|
|
904
|
+
try {
|
|
905
|
+
var func = getNative(Object, "defineProperty");
|
|
906
|
+
func({}, "", {});
|
|
907
|
+
return func;
|
|
908
|
+
} catch (e) {
|
|
909
|
+
}
|
|
910
|
+
}();
|
|
911
|
+
module.exports = defineProperty;
|
|
912
|
+
}
|
|
913
|
+
});
|
|
914
|
+
|
|
915
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js
|
|
916
|
+
var require_baseAssignValue = __commonJS({
|
|
917
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAssignValue.js"(exports, module) {
|
|
918
|
+
"use strict";
|
|
919
|
+
var defineProperty = require_defineProperty();
|
|
920
|
+
function baseAssignValue(object, key, value) {
|
|
921
|
+
if (key == "__proto__" && defineProperty) {
|
|
922
|
+
defineProperty(object, key, {
|
|
923
|
+
"configurable": true,
|
|
924
|
+
"enumerable": true,
|
|
925
|
+
"value": value,
|
|
926
|
+
"writable": true
|
|
927
|
+
});
|
|
928
|
+
} else {
|
|
929
|
+
object[key] = value;
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
module.exports = baseAssignValue;
|
|
933
|
+
}
|
|
934
|
+
});
|
|
935
|
+
|
|
936
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayAggregator.js
|
|
937
|
+
var require_arrayAggregator = __commonJS({
|
|
938
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayAggregator.js"(exports, module) {
|
|
939
|
+
"use strict";
|
|
940
|
+
function arrayAggregator(array, setter, iteratee, accumulator) {
|
|
941
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
942
|
+
while (++index < length) {
|
|
943
|
+
var value = array[index];
|
|
944
|
+
setter(accumulator, value, iteratee(value), array);
|
|
945
|
+
}
|
|
946
|
+
return accumulator;
|
|
947
|
+
}
|
|
948
|
+
module.exports = arrayAggregator;
|
|
949
|
+
}
|
|
950
|
+
});
|
|
951
|
+
|
|
952
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseFor.js
|
|
953
|
+
var require_createBaseFor = __commonJS({
|
|
954
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseFor.js"(exports, module) {
|
|
955
|
+
"use strict";
|
|
956
|
+
function createBaseFor(fromRight) {
|
|
957
|
+
return function(object, iteratee, keysFunc) {
|
|
958
|
+
var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
|
|
959
|
+
while (length--) {
|
|
960
|
+
var key = props[fromRight ? length : ++index];
|
|
961
|
+
if (iteratee(iterable[key], key, iterable) === false) {
|
|
962
|
+
break;
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
return object;
|
|
966
|
+
};
|
|
967
|
+
}
|
|
968
|
+
module.exports = createBaseFor;
|
|
969
|
+
}
|
|
970
|
+
});
|
|
971
|
+
|
|
972
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFor.js
|
|
973
|
+
var require_baseFor = __commonJS({
|
|
974
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseFor.js"(exports, module) {
|
|
975
|
+
"use strict";
|
|
976
|
+
var createBaseFor = require_createBaseFor();
|
|
977
|
+
var baseFor = createBaseFor();
|
|
978
|
+
module.exports = baseFor;
|
|
979
|
+
}
|
|
980
|
+
});
|
|
981
|
+
|
|
982
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTimes.js
|
|
983
|
+
var require_baseTimes = __commonJS({
|
|
984
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseTimes.js"(exports, module) {
|
|
985
|
+
"use strict";
|
|
986
|
+
function baseTimes(n, iteratee) {
|
|
987
|
+
var index = -1, result = Array(n);
|
|
988
|
+
while (++index < n) {
|
|
989
|
+
result[index] = iteratee(index);
|
|
990
|
+
}
|
|
991
|
+
return result;
|
|
992
|
+
}
|
|
993
|
+
module.exports = baseTimes;
|
|
994
|
+
}
|
|
995
|
+
});
|
|
996
|
+
|
|
997
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsArguments.js
|
|
998
|
+
var require_baseIsArguments = __commonJS({
|
|
999
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsArguments.js"(exports, module) {
|
|
1000
|
+
"use strict";
|
|
1001
|
+
var baseGetTag = require_baseGetTag();
|
|
1002
|
+
var isObjectLike = require_isObjectLike();
|
|
1003
|
+
var argsTag = "[object Arguments]";
|
|
1004
|
+
function baseIsArguments(value) {
|
|
1005
|
+
return isObjectLike(value) && baseGetTag(value) == argsTag;
|
|
1006
|
+
}
|
|
1007
|
+
module.exports = baseIsArguments;
|
|
1008
|
+
}
|
|
1009
|
+
});
|
|
1010
|
+
|
|
1011
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js
|
|
1012
|
+
var require_isArguments = __commonJS({
|
|
1013
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArguments.js"(exports, module) {
|
|
1014
|
+
"use strict";
|
|
1015
|
+
var baseIsArguments = require_baseIsArguments();
|
|
1016
|
+
var isObjectLike = require_isObjectLike();
|
|
1017
|
+
var objectProto = Object.prototype;
|
|
1018
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1019
|
+
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
1020
|
+
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
1021
|
+
return arguments;
|
|
1022
|
+
}()) ? baseIsArguments : function(value) {
|
|
1023
|
+
return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
|
1024
|
+
};
|
|
1025
|
+
module.exports = isArguments;
|
|
1026
|
+
}
|
|
1027
|
+
});
|
|
1028
|
+
|
|
1029
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubFalse.js
|
|
1030
|
+
var require_stubFalse = __commonJS({
|
|
1031
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubFalse.js"(exports, module) {
|
|
1032
|
+
"use strict";
|
|
1033
|
+
function stubFalse() {
|
|
1034
|
+
return false;
|
|
1035
|
+
}
|
|
1036
|
+
module.exports = stubFalse;
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
1039
|
+
|
|
1040
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js
|
|
1041
|
+
var require_isBuffer = __commonJS({
|
|
1042
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isBuffer.js"(exports, module) {
|
|
1043
|
+
"use strict";
|
|
1044
|
+
var root = require_root();
|
|
1045
|
+
var stubFalse = require_stubFalse();
|
|
1046
|
+
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
1047
|
+
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
1048
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1049
|
+
var Buffer2 = moduleExports ? root.Buffer : void 0;
|
|
1050
|
+
var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0;
|
|
1051
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
1052
|
+
module.exports = isBuffer;
|
|
1053
|
+
}
|
|
1054
|
+
});
|
|
1055
|
+
|
|
1056
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIndex.js
|
|
1057
|
+
var require_isIndex = __commonJS({
|
|
1058
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isIndex.js"(exports, module) {
|
|
1059
|
+
"use strict";
|
|
1060
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
1061
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
1062
|
+
function isIndex(value, length) {
|
|
1063
|
+
var type = typeof value;
|
|
1064
|
+
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
1065
|
+
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
1066
|
+
}
|
|
1067
|
+
module.exports = isIndex;
|
|
1068
|
+
}
|
|
1069
|
+
});
|
|
1070
|
+
|
|
1071
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js
|
|
1072
|
+
var require_isLength = __commonJS({
|
|
1073
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isLength.js"(exports, module) {
|
|
1074
|
+
"use strict";
|
|
1075
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
1076
|
+
function isLength(value) {
|
|
1077
|
+
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
1078
|
+
}
|
|
1079
|
+
module.exports = isLength;
|
|
1080
|
+
}
|
|
1081
|
+
});
|
|
1082
|
+
|
|
1083
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsTypedArray.js
|
|
1084
|
+
var require_baseIsTypedArray = __commonJS({
|
|
1085
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsTypedArray.js"(exports, module) {
|
|
1086
|
+
"use strict";
|
|
1087
|
+
var baseGetTag = require_baseGetTag();
|
|
1088
|
+
var isLength = require_isLength();
|
|
1089
|
+
var isObjectLike = require_isObjectLike();
|
|
1090
|
+
var argsTag = "[object Arguments]";
|
|
1091
|
+
var arrayTag = "[object Array]";
|
|
1092
|
+
var boolTag = "[object Boolean]";
|
|
1093
|
+
var dateTag = "[object Date]";
|
|
1094
|
+
var errorTag = "[object Error]";
|
|
1095
|
+
var funcTag = "[object Function]";
|
|
1096
|
+
var mapTag = "[object Map]";
|
|
1097
|
+
var numberTag = "[object Number]";
|
|
1098
|
+
var objectTag = "[object Object]";
|
|
1099
|
+
var regexpTag = "[object RegExp]";
|
|
1100
|
+
var setTag = "[object Set]";
|
|
1101
|
+
var stringTag = "[object String]";
|
|
1102
|
+
var weakMapTag = "[object WeakMap]";
|
|
1103
|
+
var arrayBufferTag = "[object ArrayBuffer]";
|
|
1104
|
+
var dataViewTag = "[object DataView]";
|
|
1105
|
+
var float32Tag = "[object Float32Array]";
|
|
1106
|
+
var float64Tag = "[object Float64Array]";
|
|
1107
|
+
var int8Tag = "[object Int8Array]";
|
|
1108
|
+
var int16Tag = "[object Int16Array]";
|
|
1109
|
+
var int32Tag = "[object Int32Array]";
|
|
1110
|
+
var uint8Tag = "[object Uint8Array]";
|
|
1111
|
+
var uint8ClampedTag = "[object Uint8ClampedArray]";
|
|
1112
|
+
var uint16Tag = "[object Uint16Array]";
|
|
1113
|
+
var uint32Tag = "[object Uint32Array]";
|
|
1114
|
+
var typedArrayTags = {};
|
|
1115
|
+
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
|
|
1116
|
+
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
|
|
1117
|
+
function baseIsTypedArray(value) {
|
|
1118
|
+
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
1119
|
+
}
|
|
1120
|
+
module.exports = baseIsTypedArray;
|
|
1121
|
+
}
|
|
1122
|
+
});
|
|
1123
|
+
|
|
1124
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js
|
|
1125
|
+
var require_baseUnary = __commonJS({
|
|
1126
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseUnary.js"(exports, module) {
|
|
1127
|
+
"use strict";
|
|
1128
|
+
function baseUnary(func) {
|
|
1129
|
+
return function(value) {
|
|
1130
|
+
return func(value);
|
|
1131
|
+
};
|
|
1132
|
+
}
|
|
1133
|
+
module.exports = baseUnary;
|
|
1134
|
+
}
|
|
1135
|
+
});
|
|
1136
|
+
|
|
1137
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nodeUtil.js
|
|
1138
|
+
var require_nodeUtil = __commonJS({
|
|
1139
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nodeUtil.js"(exports, module) {
|
|
1140
|
+
"use strict";
|
|
1141
|
+
var freeGlobal = require_freeGlobal();
|
|
1142
|
+
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
1143
|
+
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
1144
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1145
|
+
var freeProcess = moduleExports && freeGlobal.process;
|
|
1146
|
+
var nodeUtil = function() {
|
|
1147
|
+
try {
|
|
1148
|
+
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
|
1149
|
+
if (types) {
|
|
1150
|
+
return types;
|
|
1151
|
+
}
|
|
1152
|
+
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
1153
|
+
} catch (e) {
|
|
1154
|
+
}
|
|
1155
|
+
}();
|
|
1156
|
+
module.exports = nodeUtil;
|
|
1157
|
+
}
|
|
1158
|
+
});
|
|
1159
|
+
|
|
1160
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isTypedArray.js
|
|
1161
|
+
var require_isTypedArray = __commonJS({
|
|
1162
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isTypedArray.js"(exports, module) {
|
|
1163
|
+
"use strict";
|
|
1164
|
+
var baseIsTypedArray = require_baseIsTypedArray();
|
|
1165
|
+
var baseUnary = require_baseUnary();
|
|
1166
|
+
var nodeUtil = require_nodeUtil();
|
|
1167
|
+
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
1168
|
+
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
1169
|
+
module.exports = isTypedArray;
|
|
1170
|
+
}
|
|
1171
|
+
});
|
|
1172
|
+
|
|
1173
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayLikeKeys.js
|
|
1174
|
+
var require_arrayLikeKeys = __commonJS({
|
|
1175
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayLikeKeys.js"(exports, module) {
|
|
1176
|
+
"use strict";
|
|
1177
|
+
var baseTimes = require_baseTimes();
|
|
1178
|
+
var isArguments = require_isArguments();
|
|
1179
|
+
var isArray = require_isArray();
|
|
1180
|
+
var isBuffer = require_isBuffer();
|
|
1181
|
+
var isIndex = require_isIndex();
|
|
1182
|
+
var isTypedArray = require_isTypedArray();
|
|
1183
|
+
var objectProto = Object.prototype;
|
|
1184
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1185
|
+
function arrayLikeKeys(value, inherited) {
|
|
1186
|
+
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
1187
|
+
for (var key in value) {
|
|
1188
|
+
if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
1189
|
+
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
1190
|
+
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
1191
|
+
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
1192
|
+
isIndex(key, length)))) {
|
|
1193
|
+
result.push(key);
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
return result;
|
|
1197
|
+
}
|
|
1198
|
+
module.exports = arrayLikeKeys;
|
|
1199
|
+
}
|
|
1200
|
+
});
|
|
1201
|
+
|
|
1202
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isPrototype.js
|
|
1203
|
+
var require_isPrototype = __commonJS({
|
|
1204
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isPrototype.js"(exports, module) {
|
|
1205
|
+
"use strict";
|
|
1206
|
+
var objectProto = Object.prototype;
|
|
1207
|
+
function isPrototype(value) {
|
|
1208
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
|
|
1209
|
+
return value === proto;
|
|
1210
|
+
}
|
|
1211
|
+
module.exports = isPrototype;
|
|
1212
|
+
}
|
|
1213
|
+
});
|
|
1214
|
+
|
|
1215
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js
|
|
1216
|
+
var require_overArg = __commonJS({
|
|
1217
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_overArg.js"(exports, module) {
|
|
1218
|
+
"use strict";
|
|
1219
|
+
function overArg(func, transform) {
|
|
1220
|
+
return function(arg) {
|
|
1221
|
+
return func(transform(arg));
|
|
1222
|
+
};
|
|
1223
|
+
}
|
|
1224
|
+
module.exports = overArg;
|
|
1225
|
+
}
|
|
1226
|
+
});
|
|
1227
|
+
|
|
1228
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeys.js
|
|
1229
|
+
var require_nativeKeys = __commonJS({
|
|
1230
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_nativeKeys.js"(exports, module) {
|
|
1231
|
+
"use strict";
|
|
1232
|
+
var overArg = require_overArg();
|
|
1233
|
+
var nativeKeys = overArg(Object.keys, Object);
|
|
1234
|
+
module.exports = nativeKeys;
|
|
1235
|
+
}
|
|
1236
|
+
});
|
|
1237
|
+
|
|
1238
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeys.js
|
|
1239
|
+
var require_baseKeys = __commonJS({
|
|
1240
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseKeys.js"(exports, module) {
|
|
1241
|
+
"use strict";
|
|
1242
|
+
var isPrototype = require_isPrototype();
|
|
1243
|
+
var nativeKeys = require_nativeKeys();
|
|
1244
|
+
var objectProto = Object.prototype;
|
|
1245
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1246
|
+
function baseKeys(object) {
|
|
1247
|
+
if (!isPrototype(object)) {
|
|
1248
|
+
return nativeKeys(object);
|
|
1249
|
+
}
|
|
1250
|
+
var result = [];
|
|
1251
|
+
for (var key in Object(object)) {
|
|
1252
|
+
if (hasOwnProperty.call(object, key) && key != "constructor") {
|
|
1253
|
+
result.push(key);
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
return result;
|
|
1257
|
+
}
|
|
1258
|
+
module.exports = baseKeys;
|
|
1259
|
+
}
|
|
1260
|
+
});
|
|
1261
|
+
|
|
1262
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js
|
|
1263
|
+
var require_isArrayLike = __commonJS({
|
|
1264
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isArrayLike.js"(exports, module) {
|
|
1265
|
+
"use strict";
|
|
1266
|
+
var isFunction = require_isFunction();
|
|
1267
|
+
var isLength = require_isLength();
|
|
1268
|
+
function isArrayLike(value) {
|
|
1269
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
1270
|
+
}
|
|
1271
|
+
module.exports = isArrayLike;
|
|
1272
|
+
}
|
|
1273
|
+
});
|
|
1274
|
+
|
|
1275
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keys.js
|
|
1276
|
+
var require_keys = __commonJS({
|
|
1277
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/keys.js"(exports, module) {
|
|
1278
|
+
"use strict";
|
|
1279
|
+
var arrayLikeKeys = require_arrayLikeKeys();
|
|
1280
|
+
var baseKeys = require_baseKeys();
|
|
1281
|
+
var isArrayLike = require_isArrayLike();
|
|
1282
|
+
function keys(object) {
|
|
1283
|
+
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
1284
|
+
}
|
|
1285
|
+
module.exports = keys;
|
|
1286
|
+
}
|
|
1287
|
+
});
|
|
1288
|
+
|
|
1289
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseForOwn.js
|
|
1290
|
+
var require_baseForOwn = __commonJS({
|
|
1291
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseForOwn.js"(exports, module) {
|
|
1292
|
+
"use strict";
|
|
1293
|
+
var baseFor = require_baseFor();
|
|
1294
|
+
var keys = require_keys();
|
|
1295
|
+
function baseForOwn(object, iteratee) {
|
|
1296
|
+
return object && baseFor(object, iteratee, keys);
|
|
1297
|
+
}
|
|
1298
|
+
module.exports = baseForOwn;
|
|
1299
|
+
}
|
|
1300
|
+
});
|
|
1301
|
+
|
|
1302
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseEach.js
|
|
1303
|
+
var require_createBaseEach = __commonJS({
|
|
1304
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createBaseEach.js"(exports, module) {
|
|
1305
|
+
"use strict";
|
|
1306
|
+
var isArrayLike = require_isArrayLike();
|
|
1307
|
+
function createBaseEach(eachFunc, fromRight) {
|
|
1308
|
+
return function(collection, iteratee) {
|
|
1309
|
+
if (collection == null) {
|
|
1310
|
+
return collection;
|
|
1311
|
+
}
|
|
1312
|
+
if (!isArrayLike(collection)) {
|
|
1313
|
+
return eachFunc(collection, iteratee);
|
|
1314
|
+
}
|
|
1315
|
+
var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection);
|
|
1316
|
+
while (fromRight ? index-- : ++index < length) {
|
|
1317
|
+
if (iteratee(iterable[index], index, iterable) === false) {
|
|
1318
|
+
break;
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
return collection;
|
|
1322
|
+
};
|
|
1323
|
+
}
|
|
1324
|
+
module.exports = createBaseEach;
|
|
1325
|
+
}
|
|
1326
|
+
});
|
|
1327
|
+
|
|
1328
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseEach.js
|
|
1329
|
+
var require_baseEach = __commonJS({
|
|
1330
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseEach.js"(exports, module) {
|
|
1331
|
+
"use strict";
|
|
1332
|
+
var baseForOwn = require_baseForOwn();
|
|
1333
|
+
var createBaseEach = require_createBaseEach();
|
|
1334
|
+
var baseEach = createBaseEach(baseForOwn);
|
|
1335
|
+
module.exports = baseEach;
|
|
1336
|
+
}
|
|
1337
|
+
});
|
|
1338
|
+
|
|
1339
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAggregator.js
|
|
1340
|
+
var require_baseAggregator = __commonJS({
|
|
1341
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseAggregator.js"(exports, module) {
|
|
1342
|
+
"use strict";
|
|
1343
|
+
var baseEach = require_baseEach();
|
|
1344
|
+
function baseAggregator(collection, setter, iteratee, accumulator) {
|
|
1345
|
+
baseEach(collection, function(value, key, collection2) {
|
|
1346
|
+
setter(accumulator, value, iteratee(value), collection2);
|
|
1347
|
+
});
|
|
1348
|
+
return accumulator;
|
|
1349
|
+
}
|
|
1350
|
+
module.exports = baseAggregator;
|
|
1351
|
+
}
|
|
1352
|
+
});
|
|
1353
|
+
|
|
1354
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackClear.js
|
|
1355
|
+
var require_stackClear = __commonJS({
|
|
1356
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackClear.js"(exports, module) {
|
|
1357
|
+
"use strict";
|
|
1358
|
+
var ListCache = require_ListCache();
|
|
1359
|
+
function stackClear() {
|
|
1360
|
+
this.__data__ = new ListCache();
|
|
1361
|
+
this.size = 0;
|
|
1362
|
+
}
|
|
1363
|
+
module.exports = stackClear;
|
|
1364
|
+
}
|
|
1365
|
+
});
|
|
1366
|
+
|
|
1367
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackDelete.js
|
|
1368
|
+
var require_stackDelete = __commonJS({
|
|
1369
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackDelete.js"(exports, module) {
|
|
1370
|
+
"use strict";
|
|
1371
|
+
function stackDelete(key) {
|
|
1372
|
+
var data = this.__data__, result = data["delete"](key);
|
|
1373
|
+
this.size = data.size;
|
|
1374
|
+
return result;
|
|
1375
|
+
}
|
|
1376
|
+
module.exports = stackDelete;
|
|
1377
|
+
}
|
|
1378
|
+
});
|
|
1379
|
+
|
|
1380
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackGet.js
|
|
1381
|
+
var require_stackGet = __commonJS({
|
|
1382
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackGet.js"(exports, module) {
|
|
1383
|
+
"use strict";
|
|
1384
|
+
function stackGet(key) {
|
|
1385
|
+
return this.__data__.get(key);
|
|
1386
|
+
}
|
|
1387
|
+
module.exports = stackGet;
|
|
1388
|
+
}
|
|
1389
|
+
});
|
|
1390
|
+
|
|
1391
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackHas.js
|
|
1392
|
+
var require_stackHas = __commonJS({
|
|
1393
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackHas.js"(exports, module) {
|
|
1394
|
+
"use strict";
|
|
1395
|
+
function stackHas(key) {
|
|
1396
|
+
return this.__data__.has(key);
|
|
1397
|
+
}
|
|
1398
|
+
module.exports = stackHas;
|
|
1399
|
+
}
|
|
1400
|
+
});
|
|
1401
|
+
|
|
1402
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackSet.js
|
|
1403
|
+
var require_stackSet = __commonJS({
|
|
1404
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_stackSet.js"(exports, module) {
|
|
1405
|
+
"use strict";
|
|
1406
|
+
var ListCache = require_ListCache();
|
|
1407
|
+
var Map = require_Map();
|
|
1408
|
+
var MapCache = require_MapCache();
|
|
1409
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
1410
|
+
function stackSet(key, value) {
|
|
1411
|
+
var data = this.__data__;
|
|
1412
|
+
if (data instanceof ListCache) {
|
|
1413
|
+
var pairs = data.__data__;
|
|
1414
|
+
if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
1415
|
+
pairs.push([key, value]);
|
|
1416
|
+
this.size = ++data.size;
|
|
1417
|
+
return this;
|
|
1418
|
+
}
|
|
1419
|
+
data = this.__data__ = new MapCache(pairs);
|
|
1420
|
+
}
|
|
1421
|
+
data.set(key, value);
|
|
1422
|
+
this.size = data.size;
|
|
1423
|
+
return this;
|
|
1424
|
+
}
|
|
1425
|
+
module.exports = stackSet;
|
|
1426
|
+
}
|
|
1427
|
+
});
|
|
1428
|
+
|
|
1429
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Stack.js
|
|
1430
|
+
var require_Stack = __commonJS({
|
|
1431
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Stack.js"(exports, module) {
|
|
1432
|
+
"use strict";
|
|
1433
|
+
var ListCache = require_ListCache();
|
|
1434
|
+
var stackClear = require_stackClear();
|
|
1435
|
+
var stackDelete = require_stackDelete();
|
|
1436
|
+
var stackGet = require_stackGet();
|
|
1437
|
+
var stackHas = require_stackHas();
|
|
1438
|
+
var stackSet = require_stackSet();
|
|
1439
|
+
function Stack(entries) {
|
|
1440
|
+
var data = this.__data__ = new ListCache(entries);
|
|
1441
|
+
this.size = data.size;
|
|
1442
|
+
}
|
|
1443
|
+
Stack.prototype.clear = stackClear;
|
|
1444
|
+
Stack.prototype["delete"] = stackDelete;
|
|
1445
|
+
Stack.prototype.get = stackGet;
|
|
1446
|
+
Stack.prototype.has = stackHas;
|
|
1447
|
+
Stack.prototype.set = stackSet;
|
|
1448
|
+
module.exports = Stack;
|
|
1449
|
+
}
|
|
1450
|
+
});
|
|
1451
|
+
|
|
1452
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheAdd.js
|
|
1453
|
+
var require_setCacheAdd = __commonJS({
|
|
1454
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheAdd.js"(exports, module) {
|
|
1455
|
+
"use strict";
|
|
1456
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
1457
|
+
function setCacheAdd(value) {
|
|
1458
|
+
this.__data__.set(value, HASH_UNDEFINED);
|
|
1459
|
+
return this;
|
|
1460
|
+
}
|
|
1461
|
+
module.exports = setCacheAdd;
|
|
1462
|
+
}
|
|
1463
|
+
});
|
|
1464
|
+
|
|
1465
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheHas.js
|
|
1466
|
+
var require_setCacheHas = __commonJS({
|
|
1467
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setCacheHas.js"(exports, module) {
|
|
1468
|
+
"use strict";
|
|
1469
|
+
function setCacheHas(value) {
|
|
1470
|
+
return this.__data__.has(value);
|
|
1471
|
+
}
|
|
1472
|
+
module.exports = setCacheHas;
|
|
1473
|
+
}
|
|
1474
|
+
});
|
|
1475
|
+
|
|
1476
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js
|
|
1477
|
+
var require_SetCache = __commonJS({
|
|
1478
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_SetCache.js"(exports, module) {
|
|
1479
|
+
"use strict";
|
|
1480
|
+
var MapCache = require_MapCache();
|
|
1481
|
+
var setCacheAdd = require_setCacheAdd();
|
|
1482
|
+
var setCacheHas = require_setCacheHas();
|
|
1483
|
+
function SetCache(values) {
|
|
1484
|
+
var index = -1, length = values == null ? 0 : values.length;
|
|
1485
|
+
this.__data__ = new MapCache();
|
|
1486
|
+
while (++index < length) {
|
|
1487
|
+
this.add(values[index]);
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
1491
|
+
SetCache.prototype.has = setCacheHas;
|
|
1492
|
+
module.exports = SetCache;
|
|
1493
|
+
}
|
|
1494
|
+
});
|
|
1495
|
+
|
|
1496
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arraySome.js
|
|
1497
|
+
var require_arraySome = __commonJS({
|
|
1498
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arraySome.js"(exports, module) {
|
|
1499
|
+
"use strict";
|
|
1500
|
+
function arraySome(array, predicate) {
|
|
1501
|
+
var index = -1, length = array == null ? 0 : array.length;
|
|
1502
|
+
while (++index < length) {
|
|
1503
|
+
if (predicate(array[index], index, array)) {
|
|
1504
|
+
return true;
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
return false;
|
|
1508
|
+
}
|
|
1509
|
+
module.exports = arraySome;
|
|
1510
|
+
}
|
|
1511
|
+
});
|
|
1512
|
+
|
|
1513
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cacheHas.js
|
|
1514
|
+
var require_cacheHas = __commonJS({
|
|
1515
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_cacheHas.js"(exports, module) {
|
|
1516
|
+
"use strict";
|
|
1517
|
+
function cacheHas(cache, key) {
|
|
1518
|
+
return cache.has(key);
|
|
1519
|
+
}
|
|
1520
|
+
module.exports = cacheHas;
|
|
1521
|
+
}
|
|
1522
|
+
});
|
|
1523
|
+
|
|
1524
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalArrays.js
|
|
1525
|
+
var require_equalArrays = __commonJS({
|
|
1526
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalArrays.js"(exports, module) {
|
|
1527
|
+
"use strict";
|
|
1528
|
+
var SetCache = require_SetCache();
|
|
1529
|
+
var arraySome = require_arraySome();
|
|
1530
|
+
var cacheHas = require_cacheHas();
|
|
1531
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
1532
|
+
var COMPARE_UNORDERED_FLAG = 2;
|
|
1533
|
+
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
1534
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
|
|
1535
|
+
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
1536
|
+
return false;
|
|
1537
|
+
}
|
|
1538
|
+
var arrStacked = stack.get(array);
|
|
1539
|
+
var othStacked = stack.get(other);
|
|
1540
|
+
if (arrStacked && othStacked) {
|
|
1541
|
+
return arrStacked == other && othStacked == array;
|
|
1542
|
+
}
|
|
1543
|
+
var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0;
|
|
1544
|
+
stack.set(array, other);
|
|
1545
|
+
stack.set(other, array);
|
|
1546
|
+
while (++index < arrLength) {
|
|
1547
|
+
var arrValue = array[index], othValue = other[index];
|
|
1548
|
+
if (customizer) {
|
|
1549
|
+
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
|
|
1550
|
+
}
|
|
1551
|
+
if (compared !== void 0) {
|
|
1552
|
+
if (compared) {
|
|
1553
|
+
continue;
|
|
1554
|
+
}
|
|
1555
|
+
result = false;
|
|
1556
|
+
break;
|
|
1557
|
+
}
|
|
1558
|
+
if (seen) {
|
|
1559
|
+
if (!arraySome(other, function(othValue2, othIndex) {
|
|
1560
|
+
if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
|
|
1561
|
+
return seen.push(othIndex);
|
|
1562
|
+
}
|
|
1563
|
+
})) {
|
|
1564
|
+
result = false;
|
|
1565
|
+
break;
|
|
1566
|
+
}
|
|
1567
|
+
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
1568
|
+
result = false;
|
|
1569
|
+
break;
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
stack["delete"](array);
|
|
1573
|
+
stack["delete"](other);
|
|
1574
|
+
return result;
|
|
1575
|
+
}
|
|
1576
|
+
module.exports = equalArrays;
|
|
1577
|
+
}
|
|
1578
|
+
});
|
|
1579
|
+
|
|
1580
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Uint8Array.js
|
|
1581
|
+
var require_Uint8Array = __commonJS({
|
|
1582
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Uint8Array.js"(exports, module) {
|
|
1583
|
+
"use strict";
|
|
1584
|
+
var root = require_root();
|
|
1585
|
+
var Uint8Array2 = root.Uint8Array;
|
|
1586
|
+
module.exports = Uint8Array2;
|
|
1587
|
+
}
|
|
1588
|
+
});
|
|
1589
|
+
|
|
1590
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapToArray.js
|
|
1591
|
+
var require_mapToArray = __commonJS({
|
|
1592
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_mapToArray.js"(exports, module) {
|
|
1593
|
+
"use strict";
|
|
1594
|
+
function mapToArray(map) {
|
|
1595
|
+
var index = -1, result = Array(map.size);
|
|
1596
|
+
map.forEach(function(value, key) {
|
|
1597
|
+
result[++index] = [key, value];
|
|
1598
|
+
});
|
|
1599
|
+
return result;
|
|
1600
|
+
}
|
|
1601
|
+
module.exports = mapToArray;
|
|
1602
|
+
}
|
|
1603
|
+
});
|
|
1604
|
+
|
|
1605
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToArray.js
|
|
1606
|
+
var require_setToArray = __commonJS({
|
|
1607
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_setToArray.js"(exports, module) {
|
|
1608
|
+
"use strict";
|
|
1609
|
+
function setToArray(set2) {
|
|
1610
|
+
var index = -1, result = Array(set2.size);
|
|
1611
|
+
set2.forEach(function(value) {
|
|
1612
|
+
result[++index] = value;
|
|
1613
|
+
});
|
|
1614
|
+
return result;
|
|
1615
|
+
}
|
|
1616
|
+
module.exports = setToArray;
|
|
1617
|
+
}
|
|
1618
|
+
});
|
|
1619
|
+
|
|
1620
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalByTag.js
|
|
1621
|
+
var require_equalByTag = __commonJS({
|
|
1622
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalByTag.js"(exports, module) {
|
|
1623
|
+
"use strict";
|
|
1624
|
+
var Symbol2 = require_Symbol();
|
|
1625
|
+
var Uint8Array2 = require_Uint8Array();
|
|
1626
|
+
var eq = require_eq();
|
|
1627
|
+
var equalArrays = require_equalArrays();
|
|
1628
|
+
var mapToArray = require_mapToArray();
|
|
1629
|
+
var setToArray = require_setToArray();
|
|
1630
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
1631
|
+
var COMPARE_UNORDERED_FLAG = 2;
|
|
1632
|
+
var boolTag = "[object Boolean]";
|
|
1633
|
+
var dateTag = "[object Date]";
|
|
1634
|
+
var errorTag = "[object Error]";
|
|
1635
|
+
var mapTag = "[object Map]";
|
|
1636
|
+
var numberTag = "[object Number]";
|
|
1637
|
+
var regexpTag = "[object RegExp]";
|
|
1638
|
+
var setTag = "[object Set]";
|
|
1639
|
+
var stringTag = "[object String]";
|
|
1640
|
+
var symbolTag = "[object Symbol]";
|
|
1641
|
+
var arrayBufferTag = "[object ArrayBuffer]";
|
|
1642
|
+
var dataViewTag = "[object DataView]";
|
|
1643
|
+
var symbolProto = Symbol2 ? Symbol2.prototype : void 0;
|
|
1644
|
+
var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
|
|
1645
|
+
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
1646
|
+
switch (tag) {
|
|
1647
|
+
case dataViewTag:
|
|
1648
|
+
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
|
1649
|
+
return false;
|
|
1650
|
+
}
|
|
1651
|
+
object = object.buffer;
|
|
1652
|
+
other = other.buffer;
|
|
1653
|
+
case arrayBufferTag:
|
|
1654
|
+
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
|
|
1655
|
+
return false;
|
|
1656
|
+
}
|
|
1657
|
+
return true;
|
|
1658
|
+
case boolTag:
|
|
1659
|
+
case dateTag:
|
|
1660
|
+
case numberTag:
|
|
1661
|
+
return eq(+object, +other);
|
|
1662
|
+
case errorTag:
|
|
1663
|
+
return object.name == other.name && object.message == other.message;
|
|
1664
|
+
case regexpTag:
|
|
1665
|
+
case stringTag:
|
|
1666
|
+
return object == other + "";
|
|
1667
|
+
case mapTag:
|
|
1668
|
+
var convert = mapToArray;
|
|
1669
|
+
case setTag:
|
|
1670
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
|
|
1671
|
+
convert || (convert = setToArray);
|
|
1672
|
+
if (object.size != other.size && !isPartial) {
|
|
1673
|
+
return false;
|
|
1674
|
+
}
|
|
1675
|
+
var stacked = stack.get(object);
|
|
1676
|
+
if (stacked) {
|
|
1677
|
+
return stacked == other;
|
|
1678
|
+
}
|
|
1679
|
+
bitmask |= COMPARE_UNORDERED_FLAG;
|
|
1680
|
+
stack.set(object, other);
|
|
1681
|
+
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
1682
|
+
stack["delete"](object);
|
|
1683
|
+
return result;
|
|
1684
|
+
case symbolTag:
|
|
1685
|
+
if (symbolValueOf) {
|
|
1686
|
+
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
return false;
|
|
1690
|
+
}
|
|
1691
|
+
module.exports = equalByTag;
|
|
1692
|
+
}
|
|
1693
|
+
});
|
|
1694
|
+
|
|
1695
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js
|
|
1696
|
+
var require_arrayPush = __commonJS({
|
|
1697
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayPush.js"(exports, module) {
|
|
1698
|
+
"use strict";
|
|
1699
|
+
function arrayPush(array, values) {
|
|
1700
|
+
var index = -1, length = values.length, offset = array.length;
|
|
1701
|
+
while (++index < length) {
|
|
1702
|
+
array[offset + index] = values[index];
|
|
1703
|
+
}
|
|
1704
|
+
return array;
|
|
1705
|
+
}
|
|
1706
|
+
module.exports = arrayPush;
|
|
1707
|
+
}
|
|
1708
|
+
});
|
|
1709
|
+
|
|
1710
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetAllKeys.js
|
|
1711
|
+
var require_baseGetAllKeys = __commonJS({
|
|
1712
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseGetAllKeys.js"(exports, module) {
|
|
1713
|
+
"use strict";
|
|
1714
|
+
var arrayPush = require_arrayPush();
|
|
1715
|
+
var isArray = require_isArray();
|
|
1716
|
+
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
1717
|
+
var result = keysFunc(object);
|
|
1718
|
+
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
1719
|
+
}
|
|
1720
|
+
module.exports = baseGetAllKeys;
|
|
1721
|
+
}
|
|
1722
|
+
});
|
|
1723
|
+
|
|
1724
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayFilter.js
|
|
1725
|
+
var require_arrayFilter = __commonJS({
|
|
1726
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_arrayFilter.js"(exports, module) {
|
|
1727
|
+
"use strict";
|
|
1728
|
+
function arrayFilter(array, predicate) {
|
|
1729
|
+
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
1730
|
+
while (++index < length) {
|
|
1731
|
+
var value = array[index];
|
|
1732
|
+
if (predicate(value, index, array)) {
|
|
1733
|
+
result[resIndex++] = value;
|
|
1734
|
+
}
|
|
1735
|
+
}
|
|
1736
|
+
return result;
|
|
1737
|
+
}
|
|
1738
|
+
module.exports = arrayFilter;
|
|
1739
|
+
}
|
|
1740
|
+
});
|
|
1741
|
+
|
|
1742
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubArray.js
|
|
1743
|
+
var require_stubArray = __commonJS({
|
|
1744
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/stubArray.js"(exports, module) {
|
|
1745
|
+
"use strict";
|
|
1746
|
+
function stubArray() {
|
|
1747
|
+
return [];
|
|
1748
|
+
}
|
|
1749
|
+
module.exports = stubArray;
|
|
1750
|
+
}
|
|
1751
|
+
});
|
|
1752
|
+
|
|
1753
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getSymbols.js
|
|
1754
|
+
var require_getSymbols = __commonJS({
|
|
1755
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getSymbols.js"(exports, module) {
|
|
1756
|
+
"use strict";
|
|
1757
|
+
var arrayFilter = require_arrayFilter();
|
|
1758
|
+
var stubArray = require_stubArray();
|
|
1759
|
+
var objectProto = Object.prototype;
|
|
1760
|
+
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
1761
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
1762
|
+
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
|
1763
|
+
if (object == null) {
|
|
1764
|
+
return [];
|
|
1765
|
+
}
|
|
1766
|
+
object = Object(object);
|
|
1767
|
+
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
1768
|
+
return propertyIsEnumerable.call(object, symbol);
|
|
1769
|
+
});
|
|
1770
|
+
};
|
|
1771
|
+
module.exports = getSymbols;
|
|
1772
|
+
}
|
|
1773
|
+
});
|
|
1774
|
+
|
|
1775
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getAllKeys.js
|
|
1776
|
+
var require_getAllKeys = __commonJS({
|
|
1777
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getAllKeys.js"(exports, module) {
|
|
1778
|
+
"use strict";
|
|
1779
|
+
var baseGetAllKeys = require_baseGetAllKeys();
|
|
1780
|
+
var getSymbols = require_getSymbols();
|
|
1781
|
+
var keys = require_keys();
|
|
1782
|
+
function getAllKeys(object) {
|
|
1783
|
+
return baseGetAllKeys(object, keys, getSymbols);
|
|
1784
|
+
}
|
|
1785
|
+
module.exports = getAllKeys;
|
|
1786
|
+
}
|
|
1787
|
+
});
|
|
1788
|
+
|
|
1789
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalObjects.js
|
|
1790
|
+
var require_equalObjects = __commonJS({
|
|
1791
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_equalObjects.js"(exports, module) {
|
|
1792
|
+
"use strict";
|
|
1793
|
+
var getAllKeys = require_getAllKeys();
|
|
1794
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
1795
|
+
var objectProto = Object.prototype;
|
|
1796
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1797
|
+
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1798
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
|
|
1799
|
+
if (objLength != othLength && !isPartial) {
|
|
1800
|
+
return false;
|
|
1801
|
+
}
|
|
1802
|
+
var index = objLength;
|
|
1803
|
+
while (index--) {
|
|
1804
|
+
var key = objProps[index];
|
|
1805
|
+
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
|
1806
|
+
return false;
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
var objStacked = stack.get(object);
|
|
1810
|
+
var othStacked = stack.get(other);
|
|
1811
|
+
if (objStacked && othStacked) {
|
|
1812
|
+
return objStacked == other && othStacked == object;
|
|
1813
|
+
}
|
|
1814
|
+
var result = true;
|
|
1815
|
+
stack.set(object, other);
|
|
1816
|
+
stack.set(other, object);
|
|
1817
|
+
var skipCtor = isPartial;
|
|
1818
|
+
while (++index < objLength) {
|
|
1819
|
+
key = objProps[index];
|
|
1820
|
+
var objValue = object[key], othValue = other[key];
|
|
1821
|
+
if (customizer) {
|
|
1822
|
+
var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
|
|
1823
|
+
}
|
|
1824
|
+
if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
|
1825
|
+
result = false;
|
|
1826
|
+
break;
|
|
1827
|
+
}
|
|
1828
|
+
skipCtor || (skipCtor = key == "constructor");
|
|
1829
|
+
}
|
|
1830
|
+
if (result && !skipCtor) {
|
|
1831
|
+
var objCtor = object.constructor, othCtor = other.constructor;
|
|
1832
|
+
if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
|
|
1833
|
+
result = false;
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
stack["delete"](object);
|
|
1837
|
+
stack["delete"](other);
|
|
1838
|
+
return result;
|
|
1839
|
+
}
|
|
1840
|
+
module.exports = equalObjects;
|
|
1841
|
+
}
|
|
1842
|
+
});
|
|
1843
|
+
|
|
1844
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_DataView.js
|
|
1845
|
+
var require_DataView = __commonJS({
|
|
1846
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_DataView.js"(exports, module) {
|
|
1847
|
+
"use strict";
|
|
1848
|
+
var getNative = require_getNative();
|
|
1849
|
+
var root = require_root();
|
|
1850
|
+
var DataView = getNative(root, "DataView");
|
|
1851
|
+
module.exports = DataView;
|
|
1852
|
+
}
|
|
1853
|
+
});
|
|
1854
|
+
|
|
1855
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Promise.js
|
|
1856
|
+
var require_Promise = __commonJS({
|
|
1857
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Promise.js"(exports, module) {
|
|
1858
|
+
"use strict";
|
|
1859
|
+
var getNative = require_getNative();
|
|
1860
|
+
var root = require_root();
|
|
1861
|
+
var Promise2 = getNative(root, "Promise");
|
|
1862
|
+
module.exports = Promise2;
|
|
1863
|
+
}
|
|
1864
|
+
});
|
|
1865
|
+
|
|
1866
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Set.js
|
|
1867
|
+
var require_Set = __commonJS({
|
|
1868
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_Set.js"(exports, module) {
|
|
1869
|
+
"use strict";
|
|
1870
|
+
var getNative = require_getNative();
|
|
1871
|
+
var root = require_root();
|
|
1872
|
+
var Set2 = getNative(root, "Set");
|
|
1873
|
+
module.exports = Set2;
|
|
1874
|
+
}
|
|
1875
|
+
});
|
|
1876
|
+
|
|
1877
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_WeakMap.js
|
|
1878
|
+
var require_WeakMap = __commonJS({
|
|
1879
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_WeakMap.js"(exports, module) {
|
|
1880
|
+
"use strict";
|
|
1881
|
+
var getNative = require_getNative();
|
|
1882
|
+
var root = require_root();
|
|
1883
|
+
var WeakMap = getNative(root, "WeakMap");
|
|
1884
|
+
module.exports = WeakMap;
|
|
1885
|
+
}
|
|
1886
|
+
});
|
|
1887
|
+
|
|
1888
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getTag.js
|
|
1889
|
+
var require_getTag = __commonJS({
|
|
1890
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getTag.js"(exports, module) {
|
|
1891
|
+
"use strict";
|
|
1892
|
+
var DataView = require_DataView();
|
|
1893
|
+
var Map = require_Map();
|
|
1894
|
+
var Promise2 = require_Promise();
|
|
1895
|
+
var Set2 = require_Set();
|
|
1896
|
+
var WeakMap = require_WeakMap();
|
|
1897
|
+
var baseGetTag = require_baseGetTag();
|
|
1898
|
+
var toSource = require_toSource();
|
|
1899
|
+
var mapTag = "[object Map]";
|
|
1900
|
+
var objectTag = "[object Object]";
|
|
1901
|
+
var promiseTag = "[object Promise]";
|
|
1902
|
+
var setTag = "[object Set]";
|
|
1903
|
+
var weakMapTag = "[object WeakMap]";
|
|
1904
|
+
var dataViewTag = "[object DataView]";
|
|
1905
|
+
var dataViewCtorString = toSource(DataView);
|
|
1906
|
+
var mapCtorString = toSource(Map);
|
|
1907
|
+
var promiseCtorString = toSource(Promise2);
|
|
1908
|
+
var setCtorString = toSource(Set2);
|
|
1909
|
+
var weakMapCtorString = toSource(WeakMap);
|
|
1910
|
+
var getTag = baseGetTag;
|
|
1911
|
+
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
|
|
1912
|
+
getTag = function(value) {
|
|
1913
|
+
var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
1914
|
+
if (ctorString) {
|
|
1915
|
+
switch (ctorString) {
|
|
1916
|
+
case dataViewCtorString:
|
|
1917
|
+
return dataViewTag;
|
|
1918
|
+
case mapCtorString:
|
|
1919
|
+
return mapTag;
|
|
1920
|
+
case promiseCtorString:
|
|
1921
|
+
return promiseTag;
|
|
1922
|
+
case setCtorString:
|
|
1923
|
+
return setTag;
|
|
1924
|
+
case weakMapCtorString:
|
|
1925
|
+
return weakMapTag;
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
return result;
|
|
1929
|
+
};
|
|
1930
|
+
}
|
|
1931
|
+
module.exports = getTag;
|
|
1932
|
+
}
|
|
1933
|
+
});
|
|
1934
|
+
|
|
1935
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqualDeep.js
|
|
1936
|
+
var require_baseIsEqualDeep = __commonJS({
|
|
1937
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqualDeep.js"(exports, module) {
|
|
1938
|
+
"use strict";
|
|
1939
|
+
var Stack = require_Stack();
|
|
1940
|
+
var equalArrays = require_equalArrays();
|
|
1941
|
+
var equalByTag = require_equalByTag();
|
|
1942
|
+
var equalObjects = require_equalObjects();
|
|
1943
|
+
var getTag = require_getTag();
|
|
1944
|
+
var isArray = require_isArray();
|
|
1945
|
+
var isBuffer = require_isBuffer();
|
|
1946
|
+
var isTypedArray = require_isTypedArray();
|
|
1947
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
1948
|
+
var argsTag = "[object Arguments]";
|
|
1949
|
+
var arrayTag = "[object Array]";
|
|
1950
|
+
var objectTag = "[object Object]";
|
|
1951
|
+
var objectProto = Object.prototype;
|
|
1952
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1953
|
+
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1954
|
+
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
|
|
1955
|
+
objTag = objTag == argsTag ? objectTag : objTag;
|
|
1956
|
+
othTag = othTag == argsTag ? objectTag : othTag;
|
|
1957
|
+
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
|
1958
|
+
if (isSameTag && isBuffer(object)) {
|
|
1959
|
+
if (!isBuffer(other)) {
|
|
1960
|
+
return false;
|
|
1961
|
+
}
|
|
1962
|
+
objIsArr = true;
|
|
1963
|
+
objIsObj = false;
|
|
1964
|
+
}
|
|
1965
|
+
if (isSameTag && !objIsObj) {
|
|
1966
|
+
stack || (stack = new Stack());
|
|
1967
|
+
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
1968
|
+
}
|
|
1969
|
+
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
|
1970
|
+
var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
|
|
1971
|
+
if (objIsWrapped || othIsWrapped) {
|
|
1972
|
+
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
1973
|
+
stack || (stack = new Stack());
|
|
1974
|
+
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
if (!isSameTag) {
|
|
1978
|
+
return false;
|
|
1979
|
+
}
|
|
1980
|
+
stack || (stack = new Stack());
|
|
1981
|
+
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
1982
|
+
}
|
|
1983
|
+
module.exports = baseIsEqualDeep;
|
|
1984
|
+
}
|
|
1985
|
+
});
|
|
1986
|
+
|
|
1987
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqual.js
|
|
1988
|
+
var require_baseIsEqual = __commonJS({
|
|
1989
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsEqual.js"(exports, module) {
|
|
1990
|
+
"use strict";
|
|
1991
|
+
var baseIsEqualDeep = require_baseIsEqualDeep();
|
|
1992
|
+
var isObjectLike = require_isObjectLike();
|
|
1993
|
+
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
1994
|
+
if (value === other) {
|
|
1995
|
+
return true;
|
|
1996
|
+
}
|
|
1997
|
+
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
|
|
1998
|
+
return value !== value && other !== other;
|
|
1999
|
+
}
|
|
2000
|
+
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
2001
|
+
}
|
|
2002
|
+
module.exports = baseIsEqual;
|
|
2003
|
+
}
|
|
2004
|
+
});
|
|
2005
|
+
|
|
2006
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsMatch.js
|
|
2007
|
+
var require_baseIsMatch = __commonJS({
|
|
2008
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIsMatch.js"(exports, module) {
|
|
2009
|
+
"use strict";
|
|
2010
|
+
var Stack = require_Stack();
|
|
2011
|
+
var baseIsEqual = require_baseIsEqual();
|
|
2012
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
2013
|
+
var COMPARE_UNORDERED_FLAG = 2;
|
|
2014
|
+
function baseIsMatch(object, source, matchData, customizer) {
|
|
2015
|
+
var index = matchData.length, length = index, noCustomizer = !customizer;
|
|
2016
|
+
if (object == null) {
|
|
2017
|
+
return !length;
|
|
2018
|
+
}
|
|
2019
|
+
object = Object(object);
|
|
2020
|
+
while (index--) {
|
|
2021
|
+
var data = matchData[index];
|
|
2022
|
+
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
|
|
2023
|
+
return false;
|
|
2024
|
+
}
|
|
2025
|
+
}
|
|
2026
|
+
while (++index < length) {
|
|
2027
|
+
data = matchData[index];
|
|
2028
|
+
var key = data[0], objValue = object[key], srcValue = data[1];
|
|
2029
|
+
if (noCustomizer && data[2]) {
|
|
2030
|
+
if (objValue === void 0 && !(key in object)) {
|
|
2031
|
+
return false;
|
|
2032
|
+
}
|
|
2033
|
+
} else {
|
|
2034
|
+
var stack = new Stack();
|
|
2035
|
+
if (customizer) {
|
|
2036
|
+
var result = customizer(objValue, srcValue, key, object, source, stack);
|
|
2037
|
+
}
|
|
2038
|
+
if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result)) {
|
|
2039
|
+
return false;
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
return true;
|
|
2044
|
+
}
|
|
2045
|
+
module.exports = baseIsMatch;
|
|
2046
|
+
}
|
|
2047
|
+
});
|
|
2048
|
+
|
|
2049
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isStrictComparable.js
|
|
2050
|
+
var require_isStrictComparable = __commonJS({
|
|
2051
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_isStrictComparable.js"(exports, module) {
|
|
2052
|
+
"use strict";
|
|
2053
|
+
var isObject = require_isObject();
|
|
2054
|
+
function isStrictComparable(value) {
|
|
2055
|
+
return value === value && !isObject(value);
|
|
2056
|
+
}
|
|
2057
|
+
module.exports = isStrictComparable;
|
|
2058
|
+
}
|
|
2059
|
+
});
|
|
2060
|
+
|
|
2061
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMatchData.js
|
|
2062
|
+
var require_getMatchData = __commonJS({
|
|
2063
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_getMatchData.js"(exports, module) {
|
|
2064
|
+
"use strict";
|
|
2065
|
+
var isStrictComparable = require_isStrictComparable();
|
|
2066
|
+
var keys = require_keys();
|
|
2067
|
+
function getMatchData(object) {
|
|
2068
|
+
var result = keys(object), length = result.length;
|
|
2069
|
+
while (length--) {
|
|
2070
|
+
var key = result[length], value = object[key];
|
|
2071
|
+
result[length] = [key, value, isStrictComparable(value)];
|
|
2072
|
+
}
|
|
2073
|
+
return result;
|
|
2074
|
+
}
|
|
2075
|
+
module.exports = getMatchData;
|
|
2076
|
+
}
|
|
2077
|
+
});
|
|
2078
|
+
|
|
2079
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_matchesStrictComparable.js
|
|
2080
|
+
var require_matchesStrictComparable = __commonJS({
|
|
2081
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_matchesStrictComparable.js"(exports, module) {
|
|
2082
|
+
"use strict";
|
|
2083
|
+
function matchesStrictComparable(key, srcValue) {
|
|
2084
|
+
return function(object) {
|
|
2085
|
+
if (object == null) {
|
|
2086
|
+
return false;
|
|
2087
|
+
}
|
|
2088
|
+
return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
|
|
2089
|
+
};
|
|
2090
|
+
}
|
|
2091
|
+
module.exports = matchesStrictComparable;
|
|
2092
|
+
}
|
|
2093
|
+
});
|
|
2094
|
+
|
|
2095
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMatches.js
|
|
2096
|
+
var require_baseMatches = __commonJS({
|
|
2097
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMatches.js"(exports, module) {
|
|
2098
|
+
"use strict";
|
|
2099
|
+
var baseIsMatch = require_baseIsMatch();
|
|
2100
|
+
var getMatchData = require_getMatchData();
|
|
2101
|
+
var matchesStrictComparable = require_matchesStrictComparable();
|
|
2102
|
+
function baseMatches(source) {
|
|
2103
|
+
var matchData = getMatchData(source);
|
|
2104
|
+
if (matchData.length == 1 && matchData[0][2]) {
|
|
2105
|
+
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
|
2106
|
+
}
|
|
2107
|
+
return function(object) {
|
|
2108
|
+
return object === source || baseIsMatch(object, source, matchData);
|
|
2109
|
+
};
|
|
2110
|
+
}
|
|
2111
|
+
module.exports = baseMatches;
|
|
2112
|
+
}
|
|
2113
|
+
});
|
|
2114
|
+
|
|
2115
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHasIn.js
|
|
2116
|
+
var require_baseHasIn = __commonJS({
|
|
2117
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseHasIn.js"(exports, module) {
|
|
2118
|
+
"use strict";
|
|
2119
|
+
function baseHasIn(object, key) {
|
|
2120
|
+
return object != null && key in Object(object);
|
|
2121
|
+
}
|
|
2122
|
+
module.exports = baseHasIn;
|
|
2123
|
+
}
|
|
2124
|
+
});
|
|
2125
|
+
|
|
2126
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hasPath.js
|
|
2127
|
+
var require_hasPath = __commonJS({
|
|
2128
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_hasPath.js"(exports, module) {
|
|
2129
|
+
"use strict";
|
|
2130
|
+
var castPath = require_castPath();
|
|
2131
|
+
var isArguments = require_isArguments();
|
|
2132
|
+
var isArray = require_isArray();
|
|
2133
|
+
var isIndex = require_isIndex();
|
|
2134
|
+
var isLength = require_isLength();
|
|
2135
|
+
var toKey = require_toKey();
|
|
2136
|
+
function hasPath(object, path, hasFunc) {
|
|
2137
|
+
path = castPath(path, object);
|
|
2138
|
+
var index = -1, length = path.length, result = false;
|
|
2139
|
+
while (++index < length) {
|
|
2140
|
+
var key = toKey(path[index]);
|
|
2141
|
+
if (!(result = object != null && hasFunc(object, key))) {
|
|
2142
|
+
break;
|
|
2143
|
+
}
|
|
2144
|
+
object = object[key];
|
|
2145
|
+
}
|
|
2146
|
+
if (result || ++index != length) {
|
|
2147
|
+
return result;
|
|
2148
|
+
}
|
|
2149
|
+
length = object == null ? 0 : object.length;
|
|
2150
|
+
return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
|
|
2151
|
+
}
|
|
2152
|
+
module.exports = hasPath;
|
|
2153
|
+
}
|
|
2154
|
+
});
|
|
2155
|
+
|
|
2156
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/hasIn.js
|
|
2157
|
+
var require_hasIn = __commonJS({
|
|
2158
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/hasIn.js"(exports, module) {
|
|
2159
|
+
"use strict";
|
|
2160
|
+
var baseHasIn = require_baseHasIn();
|
|
2161
|
+
var hasPath = require_hasPath();
|
|
2162
|
+
function hasIn(object, path) {
|
|
2163
|
+
return object != null && hasPath(object, path, baseHasIn);
|
|
2164
|
+
}
|
|
2165
|
+
module.exports = hasIn;
|
|
2166
|
+
}
|
|
2167
|
+
});
|
|
2168
|
+
|
|
2169
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMatchesProperty.js
|
|
2170
|
+
var require_baseMatchesProperty = __commonJS({
|
|
2171
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseMatchesProperty.js"(exports, module) {
|
|
2172
|
+
"use strict";
|
|
2173
|
+
var baseIsEqual = require_baseIsEqual();
|
|
2174
|
+
var get2 = require_get();
|
|
2175
|
+
var hasIn = require_hasIn();
|
|
2176
|
+
var isKey = require_isKey();
|
|
2177
|
+
var isStrictComparable = require_isStrictComparable();
|
|
2178
|
+
var matchesStrictComparable = require_matchesStrictComparable();
|
|
2179
|
+
var toKey = require_toKey();
|
|
2180
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
2181
|
+
var COMPARE_UNORDERED_FLAG = 2;
|
|
2182
|
+
function baseMatchesProperty(path, srcValue) {
|
|
2183
|
+
if (isKey(path) && isStrictComparable(srcValue)) {
|
|
2184
|
+
return matchesStrictComparable(toKey(path), srcValue);
|
|
2185
|
+
}
|
|
2186
|
+
return function(object) {
|
|
2187
|
+
var objValue = get2(object, path);
|
|
2188
|
+
return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
2189
|
+
};
|
|
2190
|
+
}
|
|
2191
|
+
module.exports = baseMatchesProperty;
|
|
2192
|
+
}
|
|
2193
|
+
});
|
|
2194
|
+
|
|
2195
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/identity.js
|
|
2196
|
+
var require_identity = __commonJS({
|
|
2197
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/identity.js"(exports, module) {
|
|
2198
|
+
"use strict";
|
|
2199
|
+
function identity(value) {
|
|
2200
|
+
return value;
|
|
2201
|
+
}
|
|
2202
|
+
module.exports = identity;
|
|
2203
|
+
}
|
|
2204
|
+
});
|
|
2205
|
+
|
|
2206
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseProperty.js
|
|
2207
|
+
var require_baseProperty = __commonJS({
|
|
2208
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseProperty.js"(exports, module) {
|
|
2209
|
+
"use strict";
|
|
2210
|
+
function baseProperty(key) {
|
|
2211
|
+
return function(object) {
|
|
2212
|
+
return object == null ? void 0 : object[key];
|
|
2213
|
+
};
|
|
2214
|
+
}
|
|
2215
|
+
module.exports = baseProperty;
|
|
2216
|
+
}
|
|
2217
|
+
});
|
|
2218
|
+
|
|
2219
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePropertyDeep.js
|
|
2220
|
+
var require_basePropertyDeep = __commonJS({
|
|
2221
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_basePropertyDeep.js"(exports, module) {
|
|
2222
|
+
"use strict";
|
|
2223
|
+
var baseGet = require_baseGet();
|
|
2224
|
+
function basePropertyDeep(path) {
|
|
2225
|
+
return function(object) {
|
|
2226
|
+
return baseGet(object, path);
|
|
2227
|
+
};
|
|
2228
|
+
}
|
|
2229
|
+
module.exports = basePropertyDeep;
|
|
2230
|
+
}
|
|
2231
|
+
});
|
|
2232
|
+
|
|
2233
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/property.js
|
|
2234
|
+
var require_property = __commonJS({
|
|
2235
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/property.js"(exports, module) {
|
|
2236
|
+
"use strict";
|
|
2237
|
+
var baseProperty = require_baseProperty();
|
|
2238
|
+
var basePropertyDeep = require_basePropertyDeep();
|
|
2239
|
+
var isKey = require_isKey();
|
|
2240
|
+
var toKey = require_toKey();
|
|
2241
|
+
function property(path) {
|
|
2242
|
+
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
|
2243
|
+
}
|
|
2244
|
+
module.exports = property;
|
|
2245
|
+
}
|
|
2246
|
+
});
|
|
2247
|
+
|
|
2248
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIteratee.js
|
|
2249
|
+
var require_baseIteratee = __commonJS({
|
|
2250
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseIteratee.js"(exports, module) {
|
|
2251
|
+
"use strict";
|
|
2252
|
+
var baseMatches = require_baseMatches();
|
|
2253
|
+
var baseMatchesProperty = require_baseMatchesProperty();
|
|
2254
|
+
var identity = require_identity();
|
|
2255
|
+
var isArray = require_isArray();
|
|
2256
|
+
var property = require_property();
|
|
2257
|
+
function baseIteratee(value) {
|
|
2258
|
+
if (typeof value == "function") {
|
|
2259
|
+
return value;
|
|
2260
|
+
}
|
|
2261
|
+
if (value == null) {
|
|
2262
|
+
return identity;
|
|
2263
|
+
}
|
|
2264
|
+
if (typeof value == "object") {
|
|
2265
|
+
return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
|
|
2266
|
+
}
|
|
2267
|
+
return property(value);
|
|
2268
|
+
}
|
|
2269
|
+
module.exports = baseIteratee;
|
|
2270
|
+
}
|
|
2271
|
+
});
|
|
2272
|
+
|
|
2273
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createAggregator.js
|
|
2274
|
+
var require_createAggregator = __commonJS({
|
|
2275
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_createAggregator.js"(exports, module) {
|
|
2276
|
+
"use strict";
|
|
2277
|
+
var arrayAggregator = require_arrayAggregator();
|
|
2278
|
+
var baseAggregator = require_baseAggregator();
|
|
2279
|
+
var baseIteratee = require_baseIteratee();
|
|
2280
|
+
var isArray = require_isArray();
|
|
2281
|
+
function createAggregator(setter, initializer) {
|
|
2282
|
+
return function(collection, iteratee) {
|
|
2283
|
+
var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {};
|
|
2284
|
+
return func(collection, setter, baseIteratee(iteratee, 2), accumulator);
|
|
2285
|
+
};
|
|
2286
|
+
}
|
|
2287
|
+
module.exports = createAggregator;
|
|
2288
|
+
}
|
|
2289
|
+
});
|
|
2290
|
+
|
|
2291
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/groupBy.js
|
|
2292
|
+
var require_groupBy = __commonJS({
|
|
2293
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/groupBy.js"(exports, module) {
|
|
2294
|
+
"use strict";
|
|
2295
|
+
var baseAssignValue = require_baseAssignValue();
|
|
2296
|
+
var createAggregator = require_createAggregator();
|
|
2297
|
+
var objectProto = Object.prototype;
|
|
2298
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
2299
|
+
var groupBy2 = createAggregator(function(result, value, key) {
|
|
2300
|
+
if (hasOwnProperty.call(result, key)) {
|
|
2301
|
+
result[key].push(value);
|
|
2302
|
+
} else {
|
|
2303
|
+
baseAssignValue(result, key, [value]);
|
|
2304
|
+
}
|
|
2305
|
+
});
|
|
2306
|
+
module.exports = groupBy2;
|
|
2307
|
+
}
|
|
2308
|
+
});
|
|
2309
|
+
|
|
2310
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js
|
|
2311
|
+
var require_assignValue = __commonJS({
|
|
2312
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_assignValue.js"(exports, module) {
|
|
2313
|
+
"use strict";
|
|
2314
|
+
var baseAssignValue = require_baseAssignValue();
|
|
2315
|
+
var eq = require_eq();
|
|
2316
|
+
var objectProto = Object.prototype;
|
|
2317
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
2318
|
+
function assignValue(object, key, value) {
|
|
2319
|
+
var objValue = object[key];
|
|
2320
|
+
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
|
|
2321
|
+
baseAssignValue(object, key, value);
|
|
2322
|
+
}
|
|
2323
|
+
}
|
|
2324
|
+
module.exports = assignValue;
|
|
2325
|
+
}
|
|
2326
|
+
});
|
|
2327
|
+
|
|
2328
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSet.js
|
|
2329
|
+
var require_baseSet = __commonJS({
|
|
2330
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/_baseSet.js"(exports, module) {
|
|
2331
|
+
"use strict";
|
|
2332
|
+
var assignValue = require_assignValue();
|
|
2333
|
+
var castPath = require_castPath();
|
|
2334
|
+
var isIndex = require_isIndex();
|
|
2335
|
+
var isObject = require_isObject();
|
|
2336
|
+
var toKey = require_toKey();
|
|
2337
|
+
function baseSet(object, path, value, customizer) {
|
|
2338
|
+
if (!isObject(object)) {
|
|
2339
|
+
return object;
|
|
2340
|
+
}
|
|
2341
|
+
path = castPath(path, object);
|
|
2342
|
+
var index = -1, length = path.length, lastIndex = length - 1, nested = object;
|
|
2343
|
+
while (nested != null && ++index < length) {
|
|
2344
|
+
var key = toKey(path[index]), newValue = value;
|
|
2345
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
2346
|
+
return object;
|
|
2347
|
+
}
|
|
2348
|
+
if (index != lastIndex) {
|
|
2349
|
+
var objValue = nested[key];
|
|
2350
|
+
newValue = customizer ? customizer(objValue, key, nested) : void 0;
|
|
2351
|
+
if (newValue === void 0) {
|
|
2352
|
+
newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
assignValue(nested, key, newValue);
|
|
2356
|
+
nested = nested[key];
|
|
2357
|
+
}
|
|
2358
|
+
return object;
|
|
2359
|
+
}
|
|
2360
|
+
module.exports = baseSet;
|
|
2361
|
+
}
|
|
2362
|
+
});
|
|
2363
|
+
|
|
2364
|
+
// ../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/set.js
|
|
2365
|
+
var require_set = __commonJS({
|
|
2366
|
+
"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/set.js"(exports, module) {
|
|
2367
|
+
"use strict";
|
|
2368
|
+
var baseSet = require_baseSet();
|
|
2369
|
+
function set2(object, path, value) {
|
|
2370
|
+
return object == null ? object : baseSet(object, path, value);
|
|
2371
|
+
}
|
|
2372
|
+
module.exports = set2;
|
|
2373
|
+
}
|
|
2374
|
+
});
|
|
2375
|
+
|
|
2376
|
+
// src/implments/ReleaseContext.ts
|
|
2377
|
+
var import_get = __toESM(require_get(), 1);
|
|
2378
|
+
|
|
2379
|
+
// src/defaults.ts
|
|
2380
|
+
var DEFAULT_SOURCE_BRANCH = "master";
|
|
2381
|
+
var DEFAULT_AUTO_MERGE_RELEASE_PR = false;
|
|
2382
|
+
var DEFAULT_AUTO_MERGE_TYPE = "squash";
|
|
2383
|
+
var MANIFEST_PATH = "package.json";
|
|
2384
|
+
var DEFAULT_PR_TITLE = "Release ${env} ${pkgName} ${tagName}";
|
|
2385
|
+
var MAX_WORKSPACE = 3;
|
|
2386
|
+
var MULTI_WORKSPACE_SEPARATOR = "_";
|
|
2387
|
+
var WORKSPACE_VERSION_SEPARATOR = "@";
|
|
2388
|
+
var BATCH_PR_BODY = "\n## ${name} ${version}\n${changelog}\n";
|
|
2389
|
+
|
|
2390
|
+
// src/implments/ReleaseContext.ts
|
|
2391
|
+
import {
|
|
2392
|
+
ScriptContext
|
|
2393
|
+
} from "@qlover/scripts-context";
|
|
2394
|
+
var ReleaseContext = class extends ScriptContext {
|
|
2395
|
+
constructor(name, options) {
|
|
2396
|
+
super(name, options);
|
|
2397
|
+
if (!this.options.rootPath) {
|
|
2398
|
+
this.setOptions({ rootPath: process.cwd() });
|
|
2399
|
+
}
|
|
2400
|
+
if (!this.options.sourceBranch) {
|
|
2401
|
+
this.setOptions({
|
|
2402
|
+
sourceBranch: this.env.get("FE_RELEASE_BRANCH") || this.env.get("FE_RELEASE_SOURCE_BRANCH") || DEFAULT_SOURCE_BRANCH
|
|
2403
|
+
});
|
|
2404
|
+
}
|
|
2405
|
+
if (!this.options.releaseEnv) {
|
|
2406
|
+
this.setOptions({
|
|
2407
|
+
releaseEnv: this.env.get("FE_RELEASE_ENV") || this.env.get("NODE_ENV") || "development"
|
|
2408
|
+
});
|
|
2409
|
+
}
|
|
2410
|
+
}
|
|
2411
|
+
get rootPath() {
|
|
2412
|
+
return this.getOptions("rootPath");
|
|
2413
|
+
}
|
|
2414
|
+
get sourceBranch() {
|
|
2415
|
+
return this.getOptions("sourceBranch");
|
|
2416
|
+
}
|
|
2417
|
+
get releaseEnv() {
|
|
2418
|
+
return this.getOptions("releaseEnv");
|
|
2419
|
+
}
|
|
2420
|
+
get workspaces() {
|
|
2421
|
+
return this.getOptions("workspaces.workspaces");
|
|
2422
|
+
}
|
|
2423
|
+
get workspace() {
|
|
2424
|
+
return this.getOptions("workspaces.workspace");
|
|
2425
|
+
}
|
|
2426
|
+
setWorkspaces(workspaces) {
|
|
2427
|
+
this.options.workspaces = {
|
|
2428
|
+
...this.options.workspaces,
|
|
2429
|
+
workspaces
|
|
2430
|
+
};
|
|
2431
|
+
}
|
|
2432
|
+
getPkg(key, defaultValue) {
|
|
2433
|
+
const packageJson = this.workspace?.packageJson;
|
|
2434
|
+
if (!packageJson) {
|
|
2435
|
+
throw new Error("package.json is not found");
|
|
2436
|
+
}
|
|
2437
|
+
if (!key) {
|
|
2438
|
+
return packageJson;
|
|
2439
|
+
}
|
|
2440
|
+
return (0, import_get.default)(packageJson, key, defaultValue);
|
|
2441
|
+
}
|
|
2442
|
+
getTemplateContext() {
|
|
2443
|
+
return {
|
|
2444
|
+
...this.getOptions(),
|
|
2445
|
+
...this.workspace,
|
|
2446
|
+
publishPath: this.workspace?.path || "",
|
|
2447
|
+
// deprecated
|
|
2448
|
+
env: this.releaseEnv,
|
|
2449
|
+
branch: this.sourceBranch
|
|
2450
|
+
};
|
|
2451
|
+
}
|
|
2452
|
+
async runChangesetsCli(name, args) {
|
|
2453
|
+
let packageManager = "pnpm";
|
|
2454
|
+
try {
|
|
2455
|
+
await this.shell.exec("pnpm -v", { dryRun: false });
|
|
2456
|
+
} catch {
|
|
2457
|
+
packageManager = "npx";
|
|
2458
|
+
}
|
|
2459
|
+
return await this.shell.exec([
|
|
2460
|
+
packageManager,
|
|
2461
|
+
"changeset",
|
|
2462
|
+
name,
|
|
2463
|
+
...args ?? []
|
|
2464
|
+
]);
|
|
2465
|
+
}
|
|
2466
|
+
};
|
|
2467
|
+
|
|
2468
|
+
// src/utils/tuple.ts
|
|
2469
|
+
function tuple(plugin, ...args) {
|
|
2470
|
+
return [plugin, ...args];
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2473
|
+
// src/implments/ReleaseTask.ts
|
|
2474
|
+
import { AsyncExecutor } from "@qlover/fe-corekit";
|
|
2475
|
+
|
|
2476
|
+
// src/implments/ReleaseParams.ts
|
|
2477
|
+
import { Shell } from "@qlover/scripts-context";
|
|
2478
|
+
var DEFAULT_RELEASE_CONFIG = {
|
|
2479
|
+
maxWorkspace: MAX_WORKSPACE,
|
|
2480
|
+
multiWorkspaceSeparator: MULTI_WORKSPACE_SEPARATOR,
|
|
2481
|
+
workspaceVersionSeparator: WORKSPACE_VERSION_SEPARATOR,
|
|
2482
|
+
batchBranchName: "batch-${releaseName}-${length}-packages-${timestamp}",
|
|
2483
|
+
batchTagName: "batch-${length}-packages-${timestamp}"
|
|
2484
|
+
};
|
|
2485
|
+
var ReleaseParams = class {
|
|
2486
|
+
constructor(logger, config = {}) {
|
|
2487
|
+
this.logger = logger;
|
|
2488
|
+
this.config = {
|
|
2489
|
+
...DEFAULT_RELEASE_CONFIG,
|
|
2490
|
+
...config
|
|
2491
|
+
};
|
|
2492
|
+
}
|
|
2493
|
+
config;
|
|
2494
|
+
getReleaseBranchName(releaseName, tagName, shared) {
|
|
2495
|
+
const branchNameTpl = shared.branchName || "release-${tagName}";
|
|
2496
|
+
if (typeof branchNameTpl !== "string") {
|
|
2497
|
+
throw new Error("Branch name template is not a string");
|
|
2498
|
+
}
|
|
2499
|
+
this.logger.debug("Release Branch template is:", branchNameTpl);
|
|
2500
|
+
return Shell.format(branchNameTpl, {
|
|
2501
|
+
pkgName: releaseName,
|
|
2502
|
+
releaseName,
|
|
2503
|
+
tagName,
|
|
2504
|
+
// deprecated
|
|
2505
|
+
...shared
|
|
2506
|
+
});
|
|
2507
|
+
}
|
|
2508
|
+
getBatchReleaseBranchName(releaseName, tagName, shared, length) {
|
|
2509
|
+
const branchNameTpl = this.config.batchBranchName;
|
|
2510
|
+
if (typeof branchNameTpl !== "string") {
|
|
2511
|
+
throw new Error("Branch name template is not a string");
|
|
2512
|
+
}
|
|
2513
|
+
this.logger.debug("Release Batch Branch template is:", branchNameTpl);
|
|
2514
|
+
return Shell.format(branchNameTpl, {
|
|
2515
|
+
pkgName: releaseName,
|
|
2516
|
+
releaseName,
|
|
2517
|
+
tagName,
|
|
2518
|
+
// deprecated
|
|
2519
|
+
...shared,
|
|
2520
|
+
length,
|
|
2521
|
+
timestamp: Date.now()
|
|
2522
|
+
});
|
|
2523
|
+
}
|
|
2524
|
+
getReleaseName(composeWorkspaces) {
|
|
2525
|
+
if (composeWorkspaces.length === 1) {
|
|
2526
|
+
return composeWorkspaces[0].name;
|
|
2527
|
+
}
|
|
2528
|
+
const { maxWorkspace, multiWorkspaceSeparator, workspaceVersionSeparator } = this.config;
|
|
2529
|
+
return composeWorkspaces.slice(0, maxWorkspace).map(
|
|
2530
|
+
({ name, version }) => `${name}${workspaceVersionSeparator}${version}`
|
|
2531
|
+
).join(multiWorkspaceSeparator);
|
|
2532
|
+
}
|
|
2533
|
+
getReleaseTagName(composeWorkspaces) {
|
|
2534
|
+
if (composeWorkspaces.length === 1) {
|
|
2535
|
+
return composeWorkspaces[0].version;
|
|
2536
|
+
}
|
|
2537
|
+
const { batchTagName } = this.config;
|
|
2538
|
+
return Shell.format(batchTagName, {
|
|
2539
|
+
length: composeWorkspaces.length,
|
|
2540
|
+
timestamp: Date.now()
|
|
2541
|
+
});
|
|
2542
|
+
}
|
|
2543
|
+
getReleaseBranchParams(composeWorkspaces, shared) {
|
|
2544
|
+
const releaseTagName = this.getReleaseTagName(composeWorkspaces);
|
|
2545
|
+
const releaseName = this.getReleaseName(composeWorkspaces);
|
|
2546
|
+
const releaseBranchName = composeWorkspaces.length > 1 ? this.getBatchReleaseBranchName(
|
|
2547
|
+
releaseName,
|
|
2548
|
+
releaseTagName,
|
|
2549
|
+
shared,
|
|
2550
|
+
composeWorkspaces.length
|
|
2551
|
+
) : this.getReleaseBranchName(releaseName, releaseTagName, shared);
|
|
2552
|
+
return {
|
|
2553
|
+
tagName: releaseTagName,
|
|
2554
|
+
releaseBranch: releaseBranchName
|
|
2555
|
+
};
|
|
2556
|
+
}
|
|
2557
|
+
getPRTitle(releaseBranchParams, context) {
|
|
2558
|
+
const prTitleTpl = this.config.PRTitle || DEFAULT_PR_TITLE;
|
|
2559
|
+
return Shell.format(prTitleTpl, {
|
|
2560
|
+
...context,
|
|
2561
|
+
tagName: releaseBranchParams.tagName,
|
|
2562
|
+
pkgName: releaseBranchParams.releaseBranch
|
|
2563
|
+
});
|
|
2564
|
+
}
|
|
2565
|
+
/**
|
|
2566
|
+
* Gets the body for the release pull request.
|
|
2567
|
+
*
|
|
2568
|
+
* @param options - The options containing tag name and changelog.
|
|
2569
|
+
* @returns The formatted release pull request body.
|
|
2570
|
+
*/
|
|
2571
|
+
getPRBody(composeWorkspaces, releaseBranchParams, context) {
|
|
2572
|
+
const PRBodyTpl = this.config.PRBody;
|
|
2573
|
+
const changelog = composeWorkspaces.length > 1 ? composeWorkspaces.map((workspace) => {
|
|
2574
|
+
return Shell.format(
|
|
2575
|
+
BATCH_PR_BODY,
|
|
2576
|
+
workspace
|
|
2577
|
+
);
|
|
2578
|
+
}).join("\n") : composeWorkspaces[0].changelog;
|
|
2579
|
+
const { workspaceVersionSeparator } = this.config;
|
|
2580
|
+
const tagName = composeWorkspaces.length === 1 ? releaseBranchParams.tagName : composeWorkspaces.map(
|
|
2581
|
+
(workspace) => `${workspace.name}${workspaceVersionSeparator}${workspace.version}`
|
|
2582
|
+
).join(" ");
|
|
2583
|
+
return Shell.format(PRBodyTpl, {
|
|
2584
|
+
...context,
|
|
2585
|
+
tagName,
|
|
2586
|
+
changelog
|
|
2587
|
+
});
|
|
2588
|
+
}
|
|
2589
|
+
};
|
|
2590
|
+
|
|
2591
|
+
// src/plugins/githubPR/GithubManager.ts
|
|
2592
|
+
import { Shell as Shell2 } from "@qlover/scripts-context";
|
|
2593
|
+
import { Octokit } from "@octokit/rest";
|
|
2594
|
+
var GithubManager = class {
|
|
2595
|
+
constructor(context) {
|
|
2596
|
+
this.context = context;
|
|
2597
|
+
}
|
|
2598
|
+
_octokit = null;
|
|
2599
|
+
getGitHubUserInfo() {
|
|
2600
|
+
const { authorName, repoName } = this.context.getOptions();
|
|
2601
|
+
if (!authorName || !repoName) {
|
|
2602
|
+
throw new Error("Author name or repo name is not set");
|
|
2603
|
+
}
|
|
2604
|
+
return {
|
|
2605
|
+
owner: authorName,
|
|
2606
|
+
repo: repoName
|
|
2607
|
+
};
|
|
2608
|
+
}
|
|
2609
|
+
getToken() {
|
|
2610
|
+
const { tokenRef = "GITHUB_TOKEN" } = this.context.getOptions("githubPR");
|
|
2611
|
+
const token = this.context.env.get(tokenRef);
|
|
2612
|
+
if (!token) {
|
|
2613
|
+
throw new Error(
|
|
2614
|
+
`Token is not set. Please set ${tokenRef} environment variable.`
|
|
2615
|
+
);
|
|
2616
|
+
}
|
|
2617
|
+
return token;
|
|
2618
|
+
}
|
|
2619
|
+
get octokit() {
|
|
2620
|
+
if (this._octokit) {
|
|
2621
|
+
return this._octokit;
|
|
2622
|
+
}
|
|
2623
|
+
const { timeout } = this.context.getOptions("githubPR");
|
|
2624
|
+
const options = {
|
|
2625
|
+
auth: this.getToken(),
|
|
2626
|
+
request: {
|
|
2627
|
+
timeout
|
|
2628
|
+
}
|
|
2629
|
+
};
|
|
2630
|
+
this._octokit = new Octokit(options);
|
|
2631
|
+
return this._octokit;
|
|
2632
|
+
}
|
|
2633
|
+
get logger() {
|
|
2634
|
+
return this.context.logger;
|
|
2635
|
+
}
|
|
2636
|
+
get shell() {
|
|
2637
|
+
return this.context.shell;
|
|
2638
|
+
}
|
|
2639
|
+
/**
|
|
2640
|
+
* Auto merge type
|
|
2641
|
+
*
|
|
2642
|
+
* @default `squash`
|
|
2643
|
+
*/
|
|
2644
|
+
get autoMergeType() {
|
|
2645
|
+
return this.context.getOptions().autoMergeType || DEFAULT_AUTO_MERGE_TYPE;
|
|
2646
|
+
}
|
|
2647
|
+
/**
|
|
2648
|
+
* Dry run PR number
|
|
2649
|
+
*
|
|
2650
|
+
* @default `999999`
|
|
2651
|
+
*/
|
|
2652
|
+
get dryRunPRNumber() {
|
|
2653
|
+
return this.context.getOptions("githubPR.dryRunPRNumber", "999999");
|
|
2654
|
+
}
|
|
2655
|
+
/**
|
|
2656
|
+
* Auto merge release PR
|
|
2657
|
+
*
|
|
2658
|
+
* @default `false`
|
|
2659
|
+
*/
|
|
2660
|
+
get autoMergeReleasePR() {
|
|
2661
|
+
return this.context.getOptions("autoMergeReleasePR") || DEFAULT_AUTO_MERGE_RELEASE_PR;
|
|
2662
|
+
}
|
|
2663
|
+
/**
|
|
2664
|
+
* Automatically merges a pull request.
|
|
2665
|
+
*
|
|
2666
|
+
* @param prNumber - The pull request number to merge.
|
|
2667
|
+
* @param releaseBranch - The branch to merge into.
|
|
2668
|
+
*/
|
|
2669
|
+
async mergePR(prNumber, releaseBranch) {
|
|
2670
|
+
if (!prNumber) {
|
|
2671
|
+
this.logger.error("Failed to create Pull Request.", prNumber);
|
|
2672
|
+
return;
|
|
2673
|
+
}
|
|
2674
|
+
const mergeMethod = this.autoMergeType;
|
|
2675
|
+
if (this.context.dryRun) {
|
|
2676
|
+
const { repoName, authorName } = this.context.getOptions();
|
|
2677
|
+
this.logger.info(
|
|
2678
|
+
`[DRY RUN] Would merge PR #${prNumber} with method '${mergeMethod}' in repo ${authorName}/${repoName}, branch ${releaseBranch}`
|
|
2679
|
+
);
|
|
2680
|
+
return;
|
|
2681
|
+
}
|
|
2682
|
+
await this.octokit.rest.pulls.merge({
|
|
2683
|
+
...this.getGitHubUserInfo(),
|
|
2684
|
+
pull_number: Number(prNumber),
|
|
2685
|
+
merge_method: mergeMethod
|
|
2686
|
+
});
|
|
2687
|
+
}
|
|
2688
|
+
async getPullRequestCommits(prNumber) {
|
|
2689
|
+
const pr = await this.octokit.rest.pulls.listCommits({
|
|
2690
|
+
...this.getGitHubUserInfo(),
|
|
2691
|
+
pull_number: prNumber
|
|
2692
|
+
});
|
|
2693
|
+
return pr.data;
|
|
2694
|
+
}
|
|
2695
|
+
async getCommitInfo(commitSha) {
|
|
2696
|
+
const pr = await this.octokit.rest.repos.getCommit({
|
|
2697
|
+
...this.getGitHubUserInfo(),
|
|
2698
|
+
ref: commitSha
|
|
2699
|
+
});
|
|
2700
|
+
return pr.data;
|
|
2701
|
+
}
|
|
2702
|
+
async getPullRequest(prNumber) {
|
|
2703
|
+
const pr = await this.octokit.rest.pulls.get({
|
|
2704
|
+
...this.getGitHubUserInfo(),
|
|
2705
|
+
pull_number: prNumber
|
|
2706
|
+
});
|
|
2707
|
+
return pr.data;
|
|
2708
|
+
}
|
|
2709
|
+
/**
|
|
2710
|
+
* Checks the status of a pull request.
|
|
2711
|
+
*
|
|
2712
|
+
* @param prNumber - The pull request number to check.
|
|
2713
|
+
* @param releaseBranch - The branch to check against.
|
|
2714
|
+
*/
|
|
2715
|
+
async checkedPR(prNumber, releaseBranch) {
|
|
2716
|
+
try {
|
|
2717
|
+
await this.getPullRequest(Number(prNumber));
|
|
2718
|
+
await this.octokit.rest.git.deleteRef({
|
|
2719
|
+
...this.getGitHubUserInfo(),
|
|
2720
|
+
ref: `heads/${releaseBranch}`
|
|
2721
|
+
});
|
|
2722
|
+
this.logger.info(`Branch ${releaseBranch} has been deleted`);
|
|
2723
|
+
} catch (error) {
|
|
2724
|
+
if (error.status === 404) {
|
|
2725
|
+
this.logger.warn(
|
|
2726
|
+
`PR #${prNumber} or branch ${releaseBranch} not found`
|
|
2727
|
+
);
|
|
2728
|
+
return;
|
|
2729
|
+
}
|
|
2730
|
+
this.logger.error("Failed to check PR or delete branch", error);
|
|
2731
|
+
throw error;
|
|
2732
|
+
}
|
|
2733
|
+
}
|
|
2734
|
+
/**
|
|
2735
|
+
* Creates a release pull request label.
|
|
2736
|
+
*
|
|
2737
|
+
* @returns The created label.
|
|
2738
|
+
* @throws If the label is not valid or if the creation fails.
|
|
2739
|
+
*/
|
|
2740
|
+
async createReleasePRLabel() {
|
|
2741
|
+
const label = this.context.getOptions().label;
|
|
2742
|
+
if (!label || !label.name || !label.description || !label.color) {
|
|
2743
|
+
throw new Error("Label is not valid, skipping creation");
|
|
2744
|
+
}
|
|
2745
|
+
if (this.context.dryRun) {
|
|
2746
|
+
this.logger.info(`[DRY RUN] Would create PR label with:`, label);
|
|
2747
|
+
return label;
|
|
2748
|
+
}
|
|
2749
|
+
try {
|
|
2750
|
+
const result = await this.octokit.rest.issues.createLabel({
|
|
2751
|
+
...this.getGitHubUserInfo(),
|
|
2752
|
+
name: label.name,
|
|
2753
|
+
description: label.description,
|
|
2754
|
+
color: label.color.replace("#", "")
|
|
2755
|
+
// remove # prefix
|
|
2756
|
+
});
|
|
2757
|
+
this.logger.debug("Create PR label Success", result);
|
|
2758
|
+
return label;
|
|
2759
|
+
} catch (error) {
|
|
2760
|
+
if (error.status === 422) {
|
|
2761
|
+
this.logger.warn(`Label ${label.name} already exists, skipping!`);
|
|
2762
|
+
return label;
|
|
2763
|
+
}
|
|
2764
|
+
this.logger.error("Create PR label Failed", error);
|
|
2765
|
+
throw error;
|
|
2766
|
+
}
|
|
2767
|
+
}
|
|
2768
|
+
/**
|
|
2769
|
+
* Creates a release pull request.
|
|
2770
|
+
*
|
|
2771
|
+
* @param options - The options for creating the pull request.
|
|
2772
|
+
* @returns The created pull request number.
|
|
2773
|
+
* @throws If the creation fails or if the pull request already exists.
|
|
2774
|
+
*/
|
|
2775
|
+
async createReleasePR(options) {
|
|
2776
|
+
const dryRunCreatePR = this.context.getOptions("githubPR.dryRunCreatePR");
|
|
2777
|
+
if (dryRunCreatePR || this.context.dryRun) {
|
|
2778
|
+
this.logger.info(`[DRY RUN] Would create PR with:`, {
|
|
2779
|
+
...options,
|
|
2780
|
+
labels: options.labels
|
|
2781
|
+
});
|
|
2782
|
+
return this.dryRunPRNumber;
|
|
2783
|
+
}
|
|
2784
|
+
try {
|
|
2785
|
+
const response = await this.octokit.rest.pulls.create({
|
|
2786
|
+
...this.getGitHubUserInfo(),
|
|
2787
|
+
...options
|
|
2788
|
+
});
|
|
2789
|
+
const issue_number = response.data.number;
|
|
2790
|
+
if (!issue_number) {
|
|
2791
|
+
throw new Error("CreateReleasePR Failed, prNumber is empty");
|
|
2792
|
+
}
|
|
2793
|
+
this.logger.debug("Create PR Success", [response?.url]);
|
|
2794
|
+
if (options.labels && options.labels.length) {
|
|
2795
|
+
const response2 = await this.octokit.rest.issues.addLabels({
|
|
2796
|
+
...this.getGitHubUserInfo(),
|
|
2797
|
+
issue_number,
|
|
2798
|
+
labels: options.labels
|
|
2799
|
+
});
|
|
2800
|
+
this.logger.debug("Add PR label Success", [response2.url]);
|
|
2801
|
+
}
|
|
2802
|
+
return issue_number.toString();
|
|
2803
|
+
} catch (error) {
|
|
2804
|
+
if (error.status === 422 && error.message.includes("already exists")) {
|
|
2805
|
+
this.logger.warn("PR already exists");
|
|
2806
|
+
const match = error.message.match(
|
|
2807
|
+
/pull request #(\d+)/
|
|
2808
|
+
);
|
|
2809
|
+
return match ? match[1] : "";
|
|
2810
|
+
}
|
|
2811
|
+
this.logger.error("Failed to create PR", error);
|
|
2812
|
+
throw error;
|
|
2813
|
+
}
|
|
2814
|
+
}
|
|
2815
|
+
truncateBody(body) {
|
|
2816
|
+
if (body && body.length >= 124e3) return body.substring(0, 124e3) + "...";
|
|
2817
|
+
return body;
|
|
2818
|
+
}
|
|
2819
|
+
getOctokitReleaseOptions(options) {
|
|
2820
|
+
const {
|
|
2821
|
+
releaseName,
|
|
2822
|
+
draft = false,
|
|
2823
|
+
preRelease = false,
|
|
2824
|
+
autoGenerate = false,
|
|
2825
|
+
makeLatest = true,
|
|
2826
|
+
releaseNotes,
|
|
2827
|
+
discussionCategoryName = void 0
|
|
2828
|
+
} = this.context.getOptions("githubPR");
|
|
2829
|
+
const name = releaseName;
|
|
2830
|
+
const body = autoGenerate ? "" : this.truncateBody(String(releaseNotes));
|
|
2831
|
+
return {
|
|
2832
|
+
name,
|
|
2833
|
+
make_latest: makeLatest.toString(),
|
|
2834
|
+
body,
|
|
2835
|
+
draft,
|
|
2836
|
+
prerelease: preRelease,
|
|
2837
|
+
generate_release_notes: autoGenerate,
|
|
2838
|
+
discussion_category_name: discussionCategoryName,
|
|
2839
|
+
tag_name: "",
|
|
2840
|
+
...options,
|
|
2841
|
+
...this.getGitHubUserInfo()
|
|
2842
|
+
};
|
|
2843
|
+
}
|
|
2844
|
+
async createRelease(workspace) {
|
|
2845
|
+
const meragedOptions = this.getOctokitReleaseOptions({
|
|
2846
|
+
tag_name: workspace.tagName,
|
|
2847
|
+
body: workspace.changelog
|
|
2848
|
+
});
|
|
2849
|
+
meragedOptions.name = Shell2.format(
|
|
2850
|
+
meragedOptions.name,
|
|
2851
|
+
workspace
|
|
2852
|
+
);
|
|
2853
|
+
this.logger.log(
|
|
2854
|
+
`[DRY RUN] octokit repos.createRelease "${meragedOptions.name}" (${meragedOptions.tag_name})`,
|
|
2855
|
+
{
|
|
2856
|
+
isDryRun: this.context.dryRun
|
|
2857
|
+
}
|
|
2858
|
+
);
|
|
2859
|
+
if (!meragedOptions.tag_name) {
|
|
2860
|
+
throw new Error("TagName is undefined");
|
|
2861
|
+
}
|
|
2862
|
+
if (this.context.dryRun) {
|
|
2863
|
+
return;
|
|
2864
|
+
}
|
|
2865
|
+
try {
|
|
2866
|
+
const response = await this.octokit.repos.createRelease(meragedOptions);
|
|
2867
|
+
this.logger.debug(
|
|
2868
|
+
`[DONE] octokit repos.createRelease "${meragedOptions.name}" (${meragedOptions.tag_name}) (${response.headers.location})`
|
|
2869
|
+
);
|
|
2870
|
+
} catch (error) {
|
|
2871
|
+
this.logger.error(
|
|
2872
|
+
`[FAILED] octokit repos.createRelease "${meragedOptions.name}" (${meragedOptions.tag_name})`,
|
|
2873
|
+
error
|
|
2874
|
+
);
|
|
2875
|
+
}
|
|
2876
|
+
}
|
|
2877
|
+
};
|
|
2878
|
+
|
|
2879
|
+
// src/plugins/GitBase.ts
|
|
2880
|
+
var import_isString = __toESM(require_isString(), 1);
|
|
2881
|
+
import { ScriptPlugin } from "@qlover/scripts-context";
|
|
2882
|
+
var GitBase = class extends ScriptPlugin {
|
|
2883
|
+
async onBefore() {
|
|
2884
|
+
const repoInfo = await this.getUserInfo();
|
|
2885
|
+
if (!repoInfo) {
|
|
2886
|
+
throw new Error("Failed to get repoInfo");
|
|
2887
|
+
}
|
|
2888
|
+
let currentBranch = this.context.options.currentBranch;
|
|
2889
|
+
if (!currentBranch) {
|
|
2890
|
+
currentBranch = await this.getCurrentBranch();
|
|
2891
|
+
}
|
|
2892
|
+
if (currentBranch) {
|
|
2893
|
+
await this.context.shell.exec(`git checkout ${currentBranch}`, {
|
|
2894
|
+
dryRun: false
|
|
2895
|
+
});
|
|
2896
|
+
}
|
|
2897
|
+
this.context.setOptions({
|
|
2898
|
+
repoName: repoInfo.repoName,
|
|
2899
|
+
authorName: repoInfo.authorName,
|
|
2900
|
+
currentBranch
|
|
2901
|
+
});
|
|
2902
|
+
}
|
|
2903
|
+
async getCurrentBranch() {
|
|
2904
|
+
await new Promise((resolve2) => setTimeout(resolve2, 100));
|
|
2905
|
+
return this.context.shell.exec("git rev-parse --abbrev-ref HEAD", {
|
|
2906
|
+
dryRun: false
|
|
2907
|
+
});
|
|
2908
|
+
}
|
|
2909
|
+
async getRemoteUrl() {
|
|
2910
|
+
return (await this.context.shell.exec("git config --get remote.origin.url", {
|
|
2911
|
+
dryRun: false
|
|
2912
|
+
})).trim();
|
|
2913
|
+
}
|
|
2914
|
+
/**
|
|
2915
|
+
* Retrieves repository owner and name from Git remote URL.
|
|
2916
|
+
*
|
|
2917
|
+
* This method gets repository information directly from git remote origin URL.
|
|
2918
|
+
* Requires the project to be a git repository with a valid GitHub remote URL.
|
|
2919
|
+
*
|
|
2920
|
+
* @param shell - The shell instance for executing commands
|
|
2921
|
+
* @returns An object containing repository name and owner name
|
|
2922
|
+
* @throws Will throw an error if repository information cannot be determined
|
|
2923
|
+
*/
|
|
2924
|
+
async getUserInfo() {
|
|
2925
|
+
let repoUrl;
|
|
2926
|
+
try {
|
|
2927
|
+
repoUrl = await this.getRemoteUrl();
|
|
2928
|
+
} catch {
|
|
2929
|
+
throw new Error(
|
|
2930
|
+
"Failed to get git remote url. Please ensure this is a git repository with a valid remote."
|
|
2931
|
+
);
|
|
2932
|
+
}
|
|
2933
|
+
if (!repoUrl) {
|
|
2934
|
+
throw new Error(
|
|
2935
|
+
"Git remote URL is empty. Please set a valid GitHub remote URL."
|
|
2936
|
+
);
|
|
2937
|
+
}
|
|
2938
|
+
this.context.logger.debug("repoUrl: ", repoUrl);
|
|
2939
|
+
const githubUrlPattern = /github\.com[:/]([^/]+)\/([^/.]+)(?:\.git)?$/;
|
|
2940
|
+
const match = repoUrl.match(githubUrlPattern);
|
|
2941
|
+
if (!match) {
|
|
2942
|
+
throw new Error(
|
|
2943
|
+
"Invalid GitHub repository URL format. Please ensure the remote URL is from GitHub."
|
|
2944
|
+
);
|
|
2945
|
+
}
|
|
2946
|
+
const [, authorName, repoName] = match;
|
|
2947
|
+
if (!this.isValidString(authorName) || !this.isValidString(repoName)) {
|
|
2948
|
+
throw new Error(
|
|
2949
|
+
"Failed to extract owner or repository name from GitHub URL"
|
|
2950
|
+
);
|
|
2951
|
+
}
|
|
2952
|
+
return { repoName, authorName };
|
|
2953
|
+
}
|
|
2954
|
+
/**
|
|
2955
|
+
* Checks if the provided value is a valid string.
|
|
2956
|
+
*
|
|
2957
|
+
* A valid string is defined as a non-empty string.
|
|
2958
|
+
*
|
|
2959
|
+
* @param value - The value to check.
|
|
2960
|
+
* @returns True if the value is a valid string, otherwise false.
|
|
2961
|
+
*/
|
|
2962
|
+
isValidString(value) {
|
|
2963
|
+
return !!value && (0, import_isString.default)(value);
|
|
2964
|
+
}
|
|
2965
|
+
commit(message, args = []) {
|
|
2966
|
+
return this.context.shell.exec([
|
|
2967
|
+
"git",
|
|
2968
|
+
"commit",
|
|
2969
|
+
"--message",
|
|
2970
|
+
JSON.stringify(message),
|
|
2971
|
+
...args
|
|
2972
|
+
]);
|
|
2973
|
+
}
|
|
2974
|
+
};
|
|
2975
|
+
|
|
2976
|
+
// src/implments/changelog/GitChangeLog.ts
|
|
2977
|
+
import gitlog from "gitlog";
|
|
2978
|
+
var CHANGELOG_ALL_FIELDS = [
|
|
2979
|
+
"hash",
|
|
2980
|
+
"abbrevHash",
|
|
2981
|
+
"treeHash",
|
|
2982
|
+
"abbrevTreeHash",
|
|
2983
|
+
"parentHashes",
|
|
2984
|
+
"abbrevParentHashes",
|
|
2985
|
+
"authorName",
|
|
2986
|
+
"authorEmail",
|
|
2987
|
+
"authorDate",
|
|
2988
|
+
"authorDateRel",
|
|
2989
|
+
"committerName",
|
|
2990
|
+
"committerEmail",
|
|
2991
|
+
"committerDate",
|
|
2992
|
+
"committerDateRel",
|
|
2993
|
+
"subject",
|
|
2994
|
+
"body",
|
|
2995
|
+
"rawBody",
|
|
2996
|
+
"tag"
|
|
2997
|
+
];
|
|
2998
|
+
var GitChangelog = class {
|
|
2999
|
+
constructor(options) {
|
|
3000
|
+
this.options = options;
|
|
3001
|
+
}
|
|
3002
|
+
/**
|
|
3003
|
+
* Get the git log
|
|
3004
|
+
*
|
|
3005
|
+
* @param options
|
|
3006
|
+
* @returns
|
|
3007
|
+
*/
|
|
3008
|
+
async getGitLog(options = {}) {
|
|
3009
|
+
const { directory, noMerges = true, fields } = options;
|
|
3010
|
+
const from = await this.resolveTag(options.from, "root");
|
|
3011
|
+
const to = await this.resolveTag(options.to, "HEAD");
|
|
3012
|
+
const range = from === to ? to : `${from}..${to}`;
|
|
3013
|
+
const gitLogOptions = {
|
|
3014
|
+
repo: ".",
|
|
3015
|
+
number: 1e3,
|
|
3016
|
+
fields,
|
|
3017
|
+
branch: range,
|
|
3018
|
+
file: directory,
|
|
3019
|
+
nameStatus: false,
|
|
3020
|
+
includeMergeCommitFiles: !noMerges
|
|
3021
|
+
};
|
|
3022
|
+
const commits = await gitlog(gitLogOptions);
|
|
3023
|
+
this.options.logger?.debug("GitChangelog", gitLogOptions);
|
|
3024
|
+
this.options.logger?.debug("GitChangelog commits", commits);
|
|
3025
|
+
return commits;
|
|
3026
|
+
}
|
|
3027
|
+
async getCommits(options) {
|
|
3028
|
+
const gitCommits = await this.getGitLog(options);
|
|
3029
|
+
return gitCommits.map((commit) => {
|
|
3030
|
+
const { subject, rawBody } = commit;
|
|
3031
|
+
return {
|
|
3032
|
+
base: commit,
|
|
3033
|
+
commitlint: this.parseCommitlint(subject || "", rawBody),
|
|
3034
|
+
// commits: body ? this.parseCommitBody(body) : [],
|
|
3035
|
+
commits: []
|
|
3036
|
+
};
|
|
3037
|
+
});
|
|
3038
|
+
}
|
|
3039
|
+
createBaseCommit(message, target) {
|
|
3040
|
+
return {
|
|
3041
|
+
subject: message,
|
|
3042
|
+
rawBody: message,
|
|
3043
|
+
body: message,
|
|
3044
|
+
...target
|
|
3045
|
+
};
|
|
3046
|
+
}
|
|
3047
|
+
/**
|
|
3048
|
+
* Tabify the body
|
|
3049
|
+
*
|
|
3050
|
+
* @since 2.3.2
|
|
3051
|
+
* @param body
|
|
3052
|
+
* @param size
|
|
3053
|
+
* @returns
|
|
3054
|
+
*/
|
|
3055
|
+
tabify(body, size = 2) {
|
|
3056
|
+
return body.split("\n").map((line) => " ".repeat(size) + line.trim()).join("\n");
|
|
3057
|
+
}
|
|
3058
|
+
parseCommitlint(subject, rawBody = "") {
|
|
3059
|
+
const [title] = subject.trim().split("\n");
|
|
3060
|
+
const bodyLines = rawBody.startsWith(title) ? rawBody.replace(title, "") : rawBody;
|
|
3061
|
+
const titleMatch = title.replace(/\s*\(#\d+\)\s*$/, "").match(/^(?:([a-z]+)(?:\((.*?)\))?: )?(.+)$/i);
|
|
3062
|
+
if (titleMatch) {
|
|
3063
|
+
return {
|
|
3064
|
+
type: titleMatch[1]?.toLowerCase(),
|
|
3065
|
+
scope: titleMatch[2]?.trim(),
|
|
3066
|
+
message: titleMatch[3].trim(),
|
|
3067
|
+
body: bodyLines ? this.tabify(bodyLines) : void 0
|
|
3068
|
+
};
|
|
3069
|
+
}
|
|
3070
|
+
return {
|
|
3071
|
+
// message: title.replace(/\s*\(#\d+\)\s*$/, '').trim()
|
|
3072
|
+
message: title,
|
|
3073
|
+
body: bodyLines ? this.tabify(bodyLines) : void 0
|
|
3074
|
+
};
|
|
3075
|
+
}
|
|
3076
|
+
toCommitValue(hash, message) {
|
|
3077
|
+
const [title] = message.trim().split("\n");
|
|
3078
|
+
const prMatch = title.match(/\(#(\d+)\)/);
|
|
3079
|
+
const commitlint = this.parseCommitlint(title, message);
|
|
3080
|
+
const baseCommit = this.createBaseCommit(title, {
|
|
3081
|
+
hash,
|
|
3082
|
+
abbrevHash: hash.substring(0, 7),
|
|
3083
|
+
rawBody: message
|
|
3084
|
+
});
|
|
3085
|
+
return {
|
|
3086
|
+
base: baseCommit,
|
|
3087
|
+
commitlint,
|
|
3088
|
+
commits: [],
|
|
3089
|
+
// commits: body ? this.parseCommitBody(body) : [],
|
|
3090
|
+
prNumber: prMatch?.[1]
|
|
3091
|
+
};
|
|
3092
|
+
}
|
|
3093
|
+
async resolveTag(tag, fallback) {
|
|
3094
|
+
if (tag) {
|
|
3095
|
+
try {
|
|
3096
|
+
const exists = await this.options.shell.exec(`git tag --list "${tag}"`, { dryRun: false }).then((out) => !!out.trim());
|
|
3097
|
+
if (exists) return tag;
|
|
3098
|
+
} catch {
|
|
3099
|
+
}
|
|
3100
|
+
}
|
|
3101
|
+
if (fallback === "root") {
|
|
3102
|
+
return this.options.shell.exec(`git rev-list --max-parents=0 HEAD`, { dryRun: false }).then((out) => out.trim());
|
|
3103
|
+
}
|
|
3104
|
+
return "HEAD";
|
|
3105
|
+
}
|
|
3106
|
+
};
|
|
3107
|
+
|
|
3108
|
+
// src/implments/changelog/GitChangelogFormatter.ts
|
|
3109
|
+
var import_groupBy = __toESM(require_groupBy(), 1);
|
|
3110
|
+
import { Shell as Shell3 } from "@qlover/scripts-context";
|
|
3111
|
+
var DEFAULT_TEMPLATE = "\n- ${scopeHeader} ${commitlint.message} ${commitLink} ${prLink}";
|
|
3112
|
+
var GitChangelogFormatter = class {
|
|
3113
|
+
constructor(options) {
|
|
3114
|
+
this.options = options;
|
|
3115
|
+
}
|
|
3116
|
+
format(commits, options) {
|
|
3117
|
+
const { types = [], commitBody = false } = { ...this.options, ...options };
|
|
3118
|
+
const changelog = [];
|
|
3119
|
+
const groupedCommits = (0, import_groupBy.default)(commits, (commit) => {
|
|
3120
|
+
if (commit.commitlint.type) {
|
|
3121
|
+
return commit.commitlint.type;
|
|
3122
|
+
}
|
|
3123
|
+
return commit.commitlint.message;
|
|
3124
|
+
});
|
|
3125
|
+
types.forEach((typeConfig) => {
|
|
3126
|
+
const { type, section, hidden } = typeConfig;
|
|
3127
|
+
if (hidden) return;
|
|
3128
|
+
const typeCommits = groupedCommits[type] || [];
|
|
3129
|
+
if (typeCommits.length > 0) {
|
|
3130
|
+
changelog.push(section || "");
|
|
3131
|
+
typeCommits.forEach((commit) => {
|
|
3132
|
+
changelog.push(this.formatCommit(commit, options));
|
|
3133
|
+
if (commitBody && commit.commitlint.body) {
|
|
3134
|
+
const bodyLines = commit.commitlint.body.split("\n").map((line) => ` ${line}`);
|
|
3135
|
+
changelog.push(...bodyLines);
|
|
3136
|
+
}
|
|
3137
|
+
});
|
|
3138
|
+
}
|
|
3139
|
+
});
|
|
3140
|
+
return changelog;
|
|
3141
|
+
}
|
|
3142
|
+
formatCommit(commit, options) {
|
|
3143
|
+
const {
|
|
3144
|
+
commitlint,
|
|
3145
|
+
base: { hash },
|
|
3146
|
+
prNumber
|
|
3147
|
+
} = commit;
|
|
3148
|
+
const { repoUrl, formatTemplate = DEFAULT_TEMPLATE } = {
|
|
3149
|
+
...this.options,
|
|
3150
|
+
...options
|
|
3151
|
+
};
|
|
3152
|
+
const scopeHeader = commitlint.scope ? this.formatScope(commitlint.scope) : "";
|
|
3153
|
+
const prLink = prNumber ? this.foramtLink(
|
|
3154
|
+
"#" + prNumber,
|
|
3155
|
+
repoUrl ? `${repoUrl}/pull/${prNumber}` : ""
|
|
3156
|
+
) : "";
|
|
3157
|
+
const hashLink = hash ? this.foramtLink(
|
|
3158
|
+
hash.slice(0, 7),
|
|
3159
|
+
repoUrl ? `${repoUrl}/commit/${hash}` : ""
|
|
3160
|
+
) : "";
|
|
3161
|
+
return Shell3.format(formatTemplate, {
|
|
3162
|
+
...commit,
|
|
3163
|
+
scopeHeader,
|
|
3164
|
+
commitLink: hashLink,
|
|
3165
|
+
prLink
|
|
3166
|
+
});
|
|
3167
|
+
}
|
|
3168
|
+
foramtLink(target, url) {
|
|
3169
|
+
return url ? `([${target}](${url}))` : `(${target})`;
|
|
3170
|
+
}
|
|
3171
|
+
formatCommitLink(target, url) {
|
|
3172
|
+
return url ? `([${target}](${url}))` : `(${target})`;
|
|
3173
|
+
}
|
|
3174
|
+
formatScope(scope) {
|
|
3175
|
+
return `**${scope}:**`;
|
|
3176
|
+
}
|
|
3177
|
+
};
|
|
3178
|
+
|
|
3179
|
+
// src/utils/pather.ts
|
|
3180
|
+
import { sep, normalize } from "path";
|
|
3181
|
+
var Pather = class {
|
|
3182
|
+
/**
|
|
3183
|
+
* Convert any style path (Windows / POSIX / mixed) to the current platform format.
|
|
3184
|
+
*
|
|
3185
|
+
* - Replaces every `/`, `\\`, `//`, etc. with the local `path.sep`.
|
|
3186
|
+
* - Collapses duplicate separators.
|
|
3187
|
+
* - Resolves `.` and `..` via `path.normalize`.
|
|
3188
|
+
*
|
|
3189
|
+
* @param sourcePath - string - Path to normalize.
|
|
3190
|
+
* @returns string The normalized local path.
|
|
3191
|
+
*
|
|
3192
|
+
* @example
|
|
3193
|
+
* ```ts
|
|
3194
|
+
* const pather = new Pather();
|
|
3195
|
+
* pather.toLocalPath('src\\a//b');
|
|
3196
|
+
* // => 'src/a/b' on POSIX, 'src\\a\\b' on Windows
|
|
3197
|
+
* ```
|
|
3198
|
+
*/
|
|
3199
|
+
toLocalPath(sourcePath) {
|
|
3200
|
+
const collapsed = sourcePath.replace(/[\\/]+/g, sep);
|
|
3201
|
+
const normalized = normalize(collapsed);
|
|
3202
|
+
return normalized.replace(/[\\/]+/g, sep);
|
|
3203
|
+
}
|
|
3204
|
+
/**
|
|
3205
|
+
* Check if `sourcePath` is inside (or equal to) `targetPath`.
|
|
3206
|
+
* The comparison is segment-aware so `src/ab` is **not** considered inside `src/a`.
|
|
3207
|
+
*
|
|
3208
|
+
* @param sourcePath - string - Candidate child path.
|
|
3209
|
+
* @param targetPath - string - Candidate parent path.
|
|
3210
|
+
* @returns boolean Whether `sourcePath` is within `targetPath`.
|
|
3211
|
+
*/
|
|
3212
|
+
isSubPath(sourcePath, targetPath) {
|
|
3213
|
+
let child = this.toLocalPath(sourcePath);
|
|
3214
|
+
let parent = this.toLocalPath(targetPath);
|
|
3215
|
+
while (child.endsWith(sep)) {
|
|
3216
|
+
child = child.slice(0, -1);
|
|
3217
|
+
}
|
|
3218
|
+
while (parent.endsWith(sep)) {
|
|
3219
|
+
parent = parent.slice(0, -1);
|
|
3220
|
+
}
|
|
3221
|
+
if (child === parent) return true;
|
|
3222
|
+
const boundaryIndex = parent.length;
|
|
3223
|
+
if (!child.startsWith(parent)) return false;
|
|
3224
|
+
return child[boundaryIndex] === sep;
|
|
3225
|
+
}
|
|
3226
|
+
/**
|
|
3227
|
+
* Normalised `startsWith` helper.
|
|
3228
|
+
*/
|
|
3229
|
+
startsWith(sourcePath, targetPath) {
|
|
3230
|
+
let src = this.toLocalPath(sourcePath);
|
|
3231
|
+
let tgt = this.toLocalPath(targetPath);
|
|
3232
|
+
while (src.endsWith(sep)) {
|
|
3233
|
+
src = src.slice(0, -1);
|
|
3234
|
+
}
|
|
3235
|
+
while (tgt.endsWith(sep)) {
|
|
3236
|
+
tgt = tgt.slice(0, -1);
|
|
3237
|
+
}
|
|
3238
|
+
return src.startsWith(tgt);
|
|
3239
|
+
}
|
|
3240
|
+
/**
|
|
3241
|
+
* Segment-aware containment check (not mere substring).
|
|
3242
|
+
*/
|
|
3243
|
+
containsPath(sourcePath, targetPath) {
|
|
3244
|
+
let src = this.toLocalPath(sourcePath);
|
|
3245
|
+
let tgt = this.toLocalPath(targetPath);
|
|
3246
|
+
while (src.endsWith(sep)) {
|
|
3247
|
+
src = src.slice(0, -1);
|
|
3248
|
+
}
|
|
3249
|
+
while (tgt.endsWith(sep)) {
|
|
3250
|
+
tgt = tgt.slice(0, -1);
|
|
3251
|
+
}
|
|
3252
|
+
if (src === tgt) return true;
|
|
3253
|
+
const idx = src.indexOf(tgt);
|
|
3254
|
+
if (idx === -1) return false;
|
|
3255
|
+
const before = idx === 0 ? "" : src[idx - 1];
|
|
3256
|
+
const afterIdx = idx + tgt.length;
|
|
3257
|
+
const after = afterIdx >= src.length ? "" : src[afterIdx];
|
|
3258
|
+
const beforeOk = before === "" || before === sep;
|
|
3259
|
+
const afterOk = after === "" || after === sep;
|
|
3260
|
+
return beforeOk && afterOk;
|
|
3261
|
+
}
|
|
3262
|
+
};
|
|
3263
|
+
|
|
3264
|
+
// src/plugins/githubPR/GithubChangelog.ts
|
|
3265
|
+
var DOMAIN = "https://github.com";
|
|
3266
|
+
var GithubChangelog = class _GithubChangelog extends GitChangelog {
|
|
3267
|
+
constructor(options, githubManager) {
|
|
3268
|
+
super(options);
|
|
3269
|
+
this.options = options;
|
|
3270
|
+
this.githubManager = githubManager;
|
|
3271
|
+
}
|
|
3272
|
+
pather = new Pather();
|
|
3273
|
+
/**
|
|
3274
|
+
* Filter commits by directory
|
|
3275
|
+
* @param commits - commits
|
|
3276
|
+
* @param directory - directory
|
|
3277
|
+
* @returns filtered commits
|
|
3278
|
+
* @since 2.4.0
|
|
3279
|
+
*/
|
|
3280
|
+
async filterCommitsByDirectory(commits, directory) {
|
|
3281
|
+
const result = [];
|
|
3282
|
+
for (const commit of commits) {
|
|
3283
|
+
const commitInfo = await this.githubManager.getCommitInfo(
|
|
3284
|
+
commit.base.hash
|
|
3285
|
+
);
|
|
3286
|
+
const files = commitInfo.files?.map((file) => file.filename) ?? [];
|
|
3287
|
+
for (const file of files) {
|
|
3288
|
+
if (this.pather.isSubPath(file, directory)) {
|
|
3289
|
+
result.push(commit);
|
|
3290
|
+
break;
|
|
3291
|
+
}
|
|
3292
|
+
}
|
|
3293
|
+
}
|
|
3294
|
+
return result;
|
|
3295
|
+
}
|
|
3296
|
+
async getFullCommit(options) {
|
|
3297
|
+
const _options = { ...this.options, ...options };
|
|
3298
|
+
const allCommits = await this.getCommits(_options);
|
|
3299
|
+
const newallCommits = await Promise.all(
|
|
3300
|
+
allCommits.map(async (commit) => {
|
|
3301
|
+
let { prNumber } = commit;
|
|
3302
|
+
if (!prNumber && commit.base.subject) {
|
|
3303
|
+
const prMatch = commit.base.subject.match(/\(#(\d+)\)/);
|
|
3304
|
+
if (prMatch) {
|
|
3305
|
+
prNumber = prMatch[1];
|
|
3306
|
+
commit.prNumber = prNumber;
|
|
3307
|
+
}
|
|
3308
|
+
}
|
|
3309
|
+
if (!prNumber) {
|
|
3310
|
+
return commit;
|
|
3311
|
+
}
|
|
3312
|
+
const prCommits = await this.githubManager.getPullRequestCommits(+prNumber);
|
|
3313
|
+
const commitValues = prCommits.map(
|
|
3314
|
+
({ sha, commit: { message } }) => Object.assign(this.toCommitValue(sha, message), {
|
|
3315
|
+
prNumber
|
|
3316
|
+
})
|
|
3317
|
+
);
|
|
3318
|
+
return this.filterCommitsByDirectory(commitValues, _options.directory);
|
|
3319
|
+
})
|
|
3320
|
+
);
|
|
3321
|
+
return newallCommits.flat();
|
|
3322
|
+
}
|
|
3323
|
+
async transformWorkspace(workspaces, context) {
|
|
3324
|
+
const githubRootPath = [
|
|
3325
|
+
DOMAIN,
|
|
3326
|
+
context.getOptions("authorName"),
|
|
3327
|
+
context.getOptions("repoName")
|
|
3328
|
+
].join("/");
|
|
3329
|
+
const changelogProps = {
|
|
3330
|
+
...context.getOptions("changelog"),
|
|
3331
|
+
githubRootPath,
|
|
3332
|
+
mergePRcommit: true,
|
|
3333
|
+
shell: context.shell,
|
|
3334
|
+
logger: context.logger
|
|
3335
|
+
};
|
|
3336
|
+
const githubChangelog = new _GithubChangelog(
|
|
3337
|
+
changelogProps,
|
|
3338
|
+
this.githubManager
|
|
3339
|
+
);
|
|
3340
|
+
const formatter = new GitChangelogFormatter(changelogProps);
|
|
3341
|
+
return await Promise.all(
|
|
3342
|
+
workspaces.map(async (workspace) => {
|
|
3343
|
+
const changelog = await githubChangelog.getFullCommit({
|
|
3344
|
+
from: workspace.lastTag ?? "",
|
|
3345
|
+
directory: workspace.path,
|
|
3346
|
+
fields: CHANGELOG_ALL_FIELDS
|
|
3347
|
+
});
|
|
3348
|
+
if (typeof changelog === "string") {
|
|
3349
|
+
return {
|
|
3350
|
+
...workspace,
|
|
3351
|
+
changelog
|
|
3352
|
+
};
|
|
3353
|
+
}
|
|
3354
|
+
const changelogLines = formatter.format(changelog, {
|
|
3355
|
+
...changelogProps,
|
|
3356
|
+
repoUrl: githubRootPath
|
|
3357
|
+
});
|
|
3358
|
+
return {
|
|
3359
|
+
...workspace,
|
|
3360
|
+
changelog: changelogLines.join("\n")
|
|
3361
|
+
};
|
|
3362
|
+
})
|
|
3363
|
+
);
|
|
3364
|
+
}
|
|
3365
|
+
};
|
|
3366
|
+
|
|
3367
|
+
// src/plugins/githubPR/GithubPR.ts
|
|
3368
|
+
import { Shell as Shell4 } from "@qlover/scripts-context";
|
|
3369
|
+
var DEFAULT_RELEASE_NAME = "Release ${name} v${version}";
|
|
3370
|
+
var DEFAULT_COMMIT_MESSAGE = "chore(tag): ${name} v${version}";
|
|
3371
|
+
var GithubPR = class extends GitBase {
|
|
3372
|
+
constructor(context, props) {
|
|
3373
|
+
super(context, "githubPR", {
|
|
3374
|
+
releaseName: DEFAULT_RELEASE_NAME,
|
|
3375
|
+
...props
|
|
3376
|
+
});
|
|
3377
|
+
this.context = context;
|
|
3378
|
+
this.githubManager = new GithubManager(this.context);
|
|
3379
|
+
this.releaseParams = new ReleaseParams(context.logger, {
|
|
3380
|
+
PRTitle: this.getConfig("PRTitle", this.context.options.PRTitle),
|
|
3381
|
+
PRBody: this.getConfig("PRBody", this.context.options.PRBody),
|
|
3382
|
+
...this.props
|
|
3383
|
+
});
|
|
3384
|
+
}
|
|
3385
|
+
releaseParams;
|
|
3386
|
+
githubManager;
|
|
3387
|
+
enabled(_name) {
|
|
3388
|
+
if (this.getConfig("skip")) {
|
|
3389
|
+
return false;
|
|
3390
|
+
}
|
|
3391
|
+
return true;
|
|
3392
|
+
}
|
|
3393
|
+
get isPublish() {
|
|
3394
|
+
return !this.getConfig("releasePR");
|
|
3395
|
+
}
|
|
3396
|
+
async isGithubRepository() {
|
|
3397
|
+
try {
|
|
3398
|
+
const remoteUrl = await this.getRemoteUrl();
|
|
3399
|
+
return remoteUrl.includes("github.com");
|
|
3400
|
+
} catch {
|
|
3401
|
+
return false;
|
|
3402
|
+
}
|
|
3403
|
+
}
|
|
3404
|
+
async onBefore() {
|
|
3405
|
+
this.logger.debug("GithubPR onBefore");
|
|
3406
|
+
const isGithub = await this.isGithubRepository();
|
|
3407
|
+
if (!isGithub) {
|
|
3408
|
+
throw new Error(
|
|
3409
|
+
"Current repository is not a GitHub repository. GitHub PR workflow is only available for GitHub repositories."
|
|
3410
|
+
);
|
|
3411
|
+
}
|
|
3412
|
+
await super.onBefore();
|
|
3413
|
+
if (this.isPublish) {
|
|
3414
|
+
const npmToken = this.context.getEnv("NPM_TOKEN");
|
|
3415
|
+
if (!npmToken) {
|
|
3416
|
+
throw new Error("NPM_TOKEN is not set");
|
|
3417
|
+
}
|
|
3418
|
+
await this.shell.exec(
|
|
3419
|
+
`npm config set //registry.npmjs.org/:_authToken=${npmToken}`
|
|
3420
|
+
);
|
|
3421
|
+
}
|
|
3422
|
+
}
|
|
3423
|
+
async onExec() {
|
|
3424
|
+
const workspaces = this.context.workspaces;
|
|
3425
|
+
const githubChangelog = new GithubChangelog(
|
|
3426
|
+
this.context.getOptions("changelog"),
|
|
3427
|
+
this.githubManager
|
|
3428
|
+
);
|
|
3429
|
+
const newWorkspaces = await this.step({
|
|
3430
|
+
label: "GithubPR Changelogs",
|
|
3431
|
+
task: () => githubChangelog.transformWorkspace(workspaces, this.context)
|
|
3432
|
+
});
|
|
3433
|
+
this.context.setWorkspaces(newWorkspaces);
|
|
3434
|
+
}
|
|
3435
|
+
async onSuccess() {
|
|
3436
|
+
if (this.isPublish) {
|
|
3437
|
+
await this.publishPR(this.context.workspaces);
|
|
3438
|
+
return;
|
|
3439
|
+
}
|
|
3440
|
+
await this.releasePR(this.context.workspaces);
|
|
3441
|
+
}
|
|
3442
|
+
async releasePR(workspaces) {
|
|
3443
|
+
await this.step({
|
|
3444
|
+
label: "Release Commit",
|
|
3445
|
+
task: () => this.relesaeCommit(workspaces)
|
|
3446
|
+
});
|
|
3447
|
+
const releaseBranchParams = await this.step({
|
|
3448
|
+
label: "Create Release Branch",
|
|
3449
|
+
task: () => this.createReleaseBranch(workspaces)
|
|
3450
|
+
});
|
|
3451
|
+
await this.releasePullRequest(workspaces, releaseBranchParams);
|
|
3452
|
+
}
|
|
3453
|
+
async publishPR(workspaces) {
|
|
3454
|
+
if (!this.getConfig("dryRunCreatePR")) {
|
|
3455
|
+
await this.context.runChangesetsCli("publish");
|
|
3456
|
+
await this.shell.exec("git push origin --tags");
|
|
3457
|
+
}
|
|
3458
|
+
await this.step({
|
|
3459
|
+
label: "Release Github",
|
|
3460
|
+
task: () => Promise.all(
|
|
3461
|
+
workspaces.map((workspace) => {
|
|
3462
|
+
this.logger.debug(workspace);
|
|
3463
|
+
return this.githubManager.createRelease(workspace);
|
|
3464
|
+
})
|
|
3465
|
+
)
|
|
3466
|
+
});
|
|
3467
|
+
}
|
|
3468
|
+
async relesaeCommit(workspaces) {
|
|
3469
|
+
const commitArgs = this.getConfig("commitArgs", []);
|
|
3470
|
+
if (workspaces.length === 1) {
|
|
3471
|
+
await this.shell.exec("git add .");
|
|
3472
|
+
await this.commitWorkspace(workspaces[0], commitArgs);
|
|
3473
|
+
return;
|
|
3474
|
+
}
|
|
3475
|
+
await this.shell.exec("git add .");
|
|
3476
|
+
const commitMessage = `chore(tag): ${workspaces.map((w) => `${w.name} v${w.version}`).join(",")}`;
|
|
3477
|
+
await this.commit(commitMessage, commitArgs);
|
|
3478
|
+
}
|
|
3479
|
+
async releasePullRequest(workspaces, releaseBranchParams) {
|
|
3480
|
+
const prNumber = await this.step({
|
|
3481
|
+
label: "Create Release PR",
|
|
3482
|
+
task: () => this.createReleasePR(workspaces, releaseBranchParams)
|
|
3483
|
+
});
|
|
3484
|
+
if (this.githubManager.autoMergeReleasePR) {
|
|
3485
|
+
const { releaseBranch } = releaseBranchParams;
|
|
3486
|
+
await this.step({
|
|
3487
|
+
label: `Merge Release PR(${prNumber})`,
|
|
3488
|
+
task: () => this.githubManager.mergePR(prNumber, releaseBranch)
|
|
3489
|
+
});
|
|
3490
|
+
await this.step({
|
|
3491
|
+
label: `Checked Release PR(${prNumber})`,
|
|
3492
|
+
task: () => this.githubManager.checkedPR(prNumber, releaseBranch)
|
|
3493
|
+
});
|
|
3494
|
+
return;
|
|
3495
|
+
}
|
|
3496
|
+
this.logger.info(
|
|
3497
|
+
`Please manually merge PR(#${prNumber}) and complete the publishing process afterwards`
|
|
3498
|
+
);
|
|
3499
|
+
}
|
|
3500
|
+
async commitWorkspace(workspace, commitArgs = []) {
|
|
3501
|
+
const commitMessage = Shell4.format(
|
|
3502
|
+
this.getConfig("commitMessage", DEFAULT_COMMIT_MESSAGE),
|
|
3503
|
+
workspace
|
|
3504
|
+
);
|
|
3505
|
+
return await this.commit(commitMessage, commitArgs);
|
|
3506
|
+
}
|
|
3507
|
+
/**
|
|
3508
|
+
* Create a branch that merges to a tag with new changlog and version.
|
|
3509
|
+
*
|
|
3510
|
+
* Can be used to merge to the main branch or create a PR to the main branch.
|
|
3511
|
+
*
|
|
3512
|
+
* eg. release-production-1.0.0
|
|
3513
|
+
*
|
|
3514
|
+
*
|
|
3515
|
+
* @returns The release branch.
|
|
3516
|
+
*/
|
|
3517
|
+
async createReleaseBranch(workspaces) {
|
|
3518
|
+
const params = this.releaseParams.getReleaseBranchParams(
|
|
3519
|
+
workspaces,
|
|
3520
|
+
// @ts-expect-error TODO: fix this
|
|
3521
|
+
this.context.getTemplateContext()
|
|
3522
|
+
);
|
|
3523
|
+
const { tagName, releaseBranch } = params;
|
|
3524
|
+
if (typeof tagName !== "string") {
|
|
3525
|
+
throw new Error("Tag name is not a string");
|
|
3526
|
+
}
|
|
3527
|
+
const { sourceBranch, currentBranch } = this.context.getOptions();
|
|
3528
|
+
this.context.logger.debug("PR TagName is:", tagName);
|
|
3529
|
+
this.context.logger.debug("PR CurrentBranch is:", currentBranch);
|
|
3530
|
+
this.context.logger.debug("PR SourceBranch is:", sourceBranch);
|
|
3531
|
+
this.context.logger.debug("PR ReleaseBranch is:", releaseBranch);
|
|
3532
|
+
try {
|
|
3533
|
+
await this.context.shell.exec(
|
|
3534
|
+
`git fetch origin ${sourceBranch} ${currentBranch}`
|
|
3535
|
+
);
|
|
3536
|
+
await this.context.shell.exec(
|
|
3537
|
+
`git checkout -b ${releaseBranch} ${currentBranch}`
|
|
3538
|
+
);
|
|
3539
|
+
await this.context.shell.exec(`git push origin ${releaseBranch}`);
|
|
3540
|
+
} catch (error) {
|
|
3541
|
+
if (error.message.includes(
|
|
3542
|
+
"remote: Permission to "
|
|
3543
|
+
)) {
|
|
3544
|
+
this.context.logger.warn(
|
|
3545
|
+
`Token maybe not allow Workflow permissions, can you try to open "Workflow permissions" -> "Read and write permissions" for this token?`
|
|
3546
|
+
);
|
|
3547
|
+
}
|
|
3548
|
+
throw error;
|
|
3549
|
+
}
|
|
3550
|
+
return { tagName, releaseBranch };
|
|
3551
|
+
}
|
|
3552
|
+
/**
|
|
3553
|
+
* Creates a release pull request.
|
|
3554
|
+
*
|
|
3555
|
+
* @param workspaces - The compose workspaces.
|
|
3556
|
+
* @param releaseBranchParams - The release branch params.
|
|
3557
|
+
* @returns The created pull request number.
|
|
3558
|
+
*/
|
|
3559
|
+
async createReleasePR(workspaces, releaseBranchParams) {
|
|
3560
|
+
const label = await this.githubManager.createReleasePRLabel();
|
|
3561
|
+
let labels = [label.name];
|
|
3562
|
+
if (this.getConfig("pushChangeLabels")) {
|
|
3563
|
+
const changeLabels = this.context.getOptions("workspaces.changeLabels");
|
|
3564
|
+
if (Array.isArray(changeLabels) && changeLabels.length > 0) {
|
|
3565
|
+
labels.push(...changeLabels);
|
|
3566
|
+
}
|
|
3567
|
+
}
|
|
3568
|
+
labels = Array.from(new Set(labels));
|
|
3569
|
+
this.logger.debug("Release PR labels:", labels);
|
|
3570
|
+
const context = this.context.getTemplateContext();
|
|
3571
|
+
const prTitle = this.releaseParams.getPRTitle(releaseBranchParams, context);
|
|
3572
|
+
const prBody = this.releaseParams.getPRBody(
|
|
3573
|
+
workspaces,
|
|
3574
|
+
releaseBranchParams,
|
|
3575
|
+
context
|
|
3576
|
+
);
|
|
3577
|
+
return this.githubManager.createReleasePR({
|
|
3578
|
+
title: prTitle,
|
|
3579
|
+
body: prBody,
|
|
3580
|
+
base: this.context.sourceBranch,
|
|
3581
|
+
head: releaseBranchParams.releaseBranch,
|
|
3582
|
+
labels
|
|
3583
|
+
});
|
|
3584
|
+
}
|
|
3585
|
+
};
|
|
3586
|
+
|
|
3587
|
+
// src/plugins/workspaces/Workspaces.ts
|
|
3588
|
+
import { join as join2, resolve, relative } from "path";
|
|
3589
|
+
|
|
3590
|
+
// src/implments/ReleaseLabel.ts
|
|
3591
|
+
var ReleaseLabel = class {
|
|
3592
|
+
constructor(options) {
|
|
3593
|
+
this.options = options;
|
|
3594
|
+
}
|
|
3595
|
+
compare(changedFilePath, packagePath) {
|
|
3596
|
+
if (typeof this.options.compare === "function") {
|
|
3597
|
+
return this.options.compare(changedFilePath, packagePath);
|
|
3598
|
+
}
|
|
3599
|
+
return changedFilePath.startsWith(packagePath);
|
|
3600
|
+
}
|
|
3601
|
+
toChangeLabel(packagePath, label = this.options.changePackagesLabel) {
|
|
3602
|
+
return label.replace("${name}", packagePath);
|
|
3603
|
+
}
|
|
3604
|
+
toChangeLabels(packages, label = this.options.changePackagesLabel) {
|
|
3605
|
+
return packages.map((pkg) => this.toChangeLabel(pkg, label));
|
|
3606
|
+
}
|
|
3607
|
+
pick(changedFiles, packages = this.options.packagesDirectories) {
|
|
3608
|
+
const result = [];
|
|
3609
|
+
for (const pkgPath of packages) {
|
|
3610
|
+
for (const filepath of changedFiles) {
|
|
3611
|
+
if (this.compare(filepath, pkgPath)) {
|
|
3612
|
+
result.push(pkgPath);
|
|
3613
|
+
break;
|
|
3614
|
+
}
|
|
3615
|
+
}
|
|
3616
|
+
}
|
|
3617
|
+
return result;
|
|
3618
|
+
}
|
|
3619
|
+
};
|
|
3620
|
+
|
|
3621
|
+
// src/plugins/workspaces/Workspaces.ts
|
|
3622
|
+
import { findWorkspaces } from "find-workspaces";
|
|
3623
|
+
|
|
3624
|
+
// src/plugins/workspaces/WorkspaceCreator.ts
|
|
3625
|
+
import { readFileSync } from "fs";
|
|
3626
|
+
import { join } from "path";
|
|
3627
|
+
var WorkspaceCreator = class _WorkspaceCreator {
|
|
3628
|
+
static readJson(path) {
|
|
3629
|
+
const packageJsonContent = readFileSync(path, "utf-8");
|
|
3630
|
+
return JSON.parse(packageJsonContent);
|
|
3631
|
+
}
|
|
3632
|
+
static toWorkspace(workspace, rootPath) {
|
|
3633
|
+
let { root, packageJson } = workspace;
|
|
3634
|
+
const path = workspace.path;
|
|
3635
|
+
if (!path) {
|
|
3636
|
+
throw new Error("path is not required!");
|
|
3637
|
+
}
|
|
3638
|
+
root = root || join(rootPath, path);
|
|
3639
|
+
packageJson = packageJson || _WorkspaceCreator.readJson(join(root, MANIFEST_PATH));
|
|
3640
|
+
return {
|
|
3641
|
+
name: packageJson.name,
|
|
3642
|
+
version: packageJson.version,
|
|
3643
|
+
path,
|
|
3644
|
+
root,
|
|
3645
|
+
packageJson
|
|
3646
|
+
};
|
|
3647
|
+
}
|
|
3648
|
+
};
|
|
3649
|
+
|
|
3650
|
+
// src/plugins/workspaces/Workspaces.ts
|
|
3651
|
+
import { ScriptPlugin as ScriptPlugin2 } from "@qlover/scripts-context";
|
|
3652
|
+
var Workspaces = class extends ScriptPlugin2 {
|
|
3653
|
+
releaseTask = null;
|
|
3654
|
+
workspacesList = [];
|
|
3655
|
+
_skip = false;
|
|
3656
|
+
releaseLabel;
|
|
3657
|
+
constructor(context) {
|
|
3658
|
+
super(context, "workspaces");
|
|
3659
|
+
this.releaseLabel = new ReleaseLabel({
|
|
3660
|
+
changePackagesLabel: this.context.options.changePackagesLabel || "change:${name}",
|
|
3661
|
+
packagesDirectories: this.context.options.packagesDirectories || [],
|
|
3662
|
+
compare: (changedFilePath, packagePath) => resolve(changedFilePath).startsWith(resolve(packagePath))
|
|
3663
|
+
});
|
|
3664
|
+
}
|
|
3665
|
+
enabled() {
|
|
3666
|
+
return !this._skip && !this.getConfig("skip");
|
|
3667
|
+
}
|
|
3668
|
+
async onBefore() {
|
|
3669
|
+
const workspace = this.getConfig("workspace");
|
|
3670
|
+
if (workspace) {
|
|
3671
|
+
this.logger.debug("Use the specified workspace", workspace);
|
|
3672
|
+
this.setCurrentWorkspace(workspace, []);
|
|
3673
|
+
return;
|
|
3674
|
+
}
|
|
3675
|
+
const workspaces = await this.getWorkspaces();
|
|
3676
|
+
if (this.getConfig("skipCheckPackage") || workspaces.length === 0) {
|
|
3677
|
+
throw new Error("No changes to publish packages");
|
|
3678
|
+
}
|
|
3679
|
+
const publishPath = this.context.getOptions("publishPath");
|
|
3680
|
+
if (publishPath) {
|
|
3681
|
+
const targetWorkspace = workspaces.find(
|
|
3682
|
+
(workspace2) => resolve(workspace2.root) === resolve(publishPath)
|
|
3683
|
+
);
|
|
3684
|
+
this.nextSkip();
|
|
3685
|
+
if (!targetWorkspace) {
|
|
3686
|
+
throw new Error(`No workspace found for: ${publishPath}`);
|
|
3687
|
+
}
|
|
3688
|
+
this.logger.debug(
|
|
3689
|
+
`Workspace of ${publishPath} find!`,
|
|
3690
|
+
join2(targetWorkspace.root, MANIFEST_PATH)
|
|
3691
|
+
);
|
|
3692
|
+
this.setCurrentWorkspace(targetWorkspace, [targetWorkspace]);
|
|
3693
|
+
return;
|
|
3694
|
+
}
|
|
3695
|
+
const [firstWorkspace, ...restWorkspaces] = workspaces;
|
|
3696
|
+
this.workspacesList = restWorkspaces;
|
|
3697
|
+
this.setCurrentWorkspace(firstWorkspace, workspaces);
|
|
3698
|
+
}
|
|
3699
|
+
/**
|
|
3700
|
+
* Skip the next workspace
|
|
3701
|
+
*
|
|
3702
|
+
* - has publishPath
|
|
3703
|
+
* - has workspace
|
|
3704
|
+
*/
|
|
3705
|
+
nextSkip() {
|
|
3706
|
+
this._skip = true;
|
|
3707
|
+
this.logger.debug("skip next workspace");
|
|
3708
|
+
}
|
|
3709
|
+
setReleaseTask(releaseTask) {
|
|
3710
|
+
this.releaseTask = releaseTask;
|
|
3711
|
+
}
|
|
3712
|
+
setCurrentWorkspace(workspace, workspaces) {
|
|
3713
|
+
this.context.setOptions({
|
|
3714
|
+
publishPath: workspace.path
|
|
3715
|
+
});
|
|
3716
|
+
this.setConfig({
|
|
3717
|
+
workspace,
|
|
3718
|
+
workspaces
|
|
3719
|
+
});
|
|
3720
|
+
}
|
|
3721
|
+
async getGitWorkspaces() {
|
|
3722
|
+
const sourceBranch = this.context.sourceBranch;
|
|
3723
|
+
const result = await this.shell.exec(
|
|
3724
|
+
`git diff --name-only origin/${sourceBranch}...HEAD`,
|
|
3725
|
+
{ dryRun: false }
|
|
3726
|
+
);
|
|
3727
|
+
return typeof result === "string" ? result.split("\n") : [];
|
|
3728
|
+
}
|
|
3729
|
+
async getChangedPackages(packagesPaths, changeLabels) {
|
|
3730
|
+
this.logger.debug("changeLabels", changeLabels);
|
|
3731
|
+
if (Array.isArray(changeLabels) && changeLabels.length > 0) {
|
|
3732
|
+
const changed2 = packagesPaths.filter((path) => {
|
|
3733
|
+
const lable = this.releaseLabel.toChangeLabel(path);
|
|
3734
|
+
return changeLabels.includes(lable);
|
|
3735
|
+
});
|
|
3736
|
+
this.logger.debug("changed by labels", changed2);
|
|
3737
|
+
return changed2;
|
|
3738
|
+
}
|
|
3739
|
+
const changed = await this.getGitWorkspaces();
|
|
3740
|
+
this.logger.debug("changed by git", changed);
|
|
3741
|
+
return this.releaseLabel.pick(changed, packagesPaths);
|
|
3742
|
+
}
|
|
3743
|
+
getProjectWorkspaces() {
|
|
3744
|
+
const rootPath = this.context.rootPath;
|
|
3745
|
+
const packagesDirectories = this.context.options.packagesDirectories;
|
|
3746
|
+
if (Array.isArray(packagesDirectories) && packagesDirectories.length > 0) {
|
|
3747
|
+
return packagesDirectories.map(
|
|
3748
|
+
(path) => WorkspaceCreator.toWorkspace({ path }, rootPath)
|
|
3749
|
+
);
|
|
3750
|
+
}
|
|
3751
|
+
const projectPackages = findWorkspaces(rootPath) || [];
|
|
3752
|
+
return projectPackages.map((value) => ({
|
|
3753
|
+
name: value.package.name,
|
|
3754
|
+
version: value.package.version,
|
|
3755
|
+
path: relative(rootPath, value.location),
|
|
3756
|
+
root: resolve(rootPath, value.location),
|
|
3757
|
+
packageJson: value.package
|
|
3758
|
+
}));
|
|
3759
|
+
}
|
|
3760
|
+
async getWorkspaces() {
|
|
3761
|
+
const projectWorkspaces = this.getProjectWorkspaces();
|
|
3762
|
+
const packages = projectWorkspaces.map(({ path }) => path);
|
|
3763
|
+
this.logger.debug("packages", packages);
|
|
3764
|
+
const changeLabels = this.getConfig("changeLabels");
|
|
3765
|
+
const changedPaths = await this.getChangedPackages(packages, changeLabels);
|
|
3766
|
+
this.setConfig({
|
|
3767
|
+
packages,
|
|
3768
|
+
changedPaths,
|
|
3769
|
+
projectWorkspaces
|
|
3770
|
+
});
|
|
3771
|
+
this.logger.debug("changedPaths", changedPaths);
|
|
3772
|
+
return projectWorkspaces.filter(
|
|
3773
|
+
(workspace) => changedPaths.includes(workspace.path)
|
|
3774
|
+
);
|
|
3775
|
+
}
|
|
3776
|
+
};
|
|
3777
|
+
|
|
3778
|
+
// src/utils/loader.ts
|
|
3779
|
+
import { join as join3, parse } from "path";
|
|
3780
|
+
import { createRequire } from "module";
|
|
3781
|
+
import { pathToFileURL } from "url";
|
|
3782
|
+
|
|
3783
|
+
// src/utils/factory.ts
|
|
3784
|
+
function factory(Constructor, ...args) {
|
|
3785
|
+
if (typeof Constructor === "function" && Constructor.prototype && Constructor.prototype.constructor === Constructor) {
|
|
3786
|
+
return new Constructor(...args);
|
|
3787
|
+
}
|
|
3788
|
+
return Constructor(...args);
|
|
3789
|
+
}
|
|
3790
|
+
|
|
3791
|
+
// ../../node_modules/.pnpm/yocto-queue@1.2.1/node_modules/yocto-queue/index.js
|
|
3792
|
+
var Node = class {
|
|
3793
|
+
value;
|
|
3794
|
+
next;
|
|
3795
|
+
constructor(value) {
|
|
3796
|
+
this.value = value;
|
|
3797
|
+
}
|
|
3798
|
+
};
|
|
3799
|
+
var Queue = class {
|
|
3800
|
+
#head;
|
|
3801
|
+
#tail;
|
|
3802
|
+
#size;
|
|
3803
|
+
constructor() {
|
|
3804
|
+
this.clear();
|
|
3805
|
+
}
|
|
3806
|
+
enqueue(value) {
|
|
3807
|
+
const node = new Node(value);
|
|
3808
|
+
if (this.#head) {
|
|
3809
|
+
this.#tail.next = node;
|
|
3810
|
+
this.#tail = node;
|
|
3811
|
+
} else {
|
|
3812
|
+
this.#head = node;
|
|
3813
|
+
this.#tail = node;
|
|
3814
|
+
}
|
|
3815
|
+
this.#size++;
|
|
3816
|
+
}
|
|
3817
|
+
dequeue() {
|
|
3818
|
+
const current = this.#head;
|
|
3819
|
+
if (!current) {
|
|
3820
|
+
return;
|
|
3821
|
+
}
|
|
3822
|
+
this.#head = this.#head.next;
|
|
3823
|
+
this.#size--;
|
|
3824
|
+
return current.value;
|
|
3825
|
+
}
|
|
3826
|
+
peek() {
|
|
3827
|
+
if (!this.#head) {
|
|
3828
|
+
return;
|
|
3829
|
+
}
|
|
3830
|
+
return this.#head.value;
|
|
3831
|
+
}
|
|
3832
|
+
clear() {
|
|
3833
|
+
this.#head = void 0;
|
|
3834
|
+
this.#tail = void 0;
|
|
3835
|
+
this.#size = 0;
|
|
3836
|
+
}
|
|
3837
|
+
get size() {
|
|
3838
|
+
return this.#size;
|
|
3839
|
+
}
|
|
3840
|
+
*[Symbol.iterator]() {
|
|
3841
|
+
let current = this.#head;
|
|
3842
|
+
while (current) {
|
|
3843
|
+
yield current.value;
|
|
3844
|
+
current = current.next;
|
|
3845
|
+
}
|
|
3846
|
+
}
|
|
3847
|
+
*drain() {
|
|
3848
|
+
while (this.#head) {
|
|
3849
|
+
yield this.dequeue();
|
|
3850
|
+
}
|
|
3851
|
+
}
|
|
3852
|
+
};
|
|
3853
|
+
|
|
3854
|
+
// ../../node_modules/.pnpm/p-limit@6.2.0/node_modules/p-limit/index.js
|
|
3855
|
+
function pLimit(concurrency) {
|
|
3856
|
+
validateConcurrency(concurrency);
|
|
3857
|
+
const queue = new Queue();
|
|
3858
|
+
let activeCount = 0;
|
|
3859
|
+
const resumeNext = () => {
|
|
3860
|
+
if (activeCount < concurrency && queue.size > 0) {
|
|
3861
|
+
queue.dequeue()();
|
|
3862
|
+
activeCount++;
|
|
3863
|
+
}
|
|
3864
|
+
};
|
|
3865
|
+
const next = () => {
|
|
3866
|
+
activeCount--;
|
|
3867
|
+
resumeNext();
|
|
3868
|
+
};
|
|
3869
|
+
const run = async (function_, resolve2, arguments_) => {
|
|
3870
|
+
const result = (async () => function_(...arguments_))();
|
|
3871
|
+
resolve2(result);
|
|
3872
|
+
try {
|
|
3873
|
+
await result;
|
|
3874
|
+
} catch {
|
|
3875
|
+
}
|
|
3876
|
+
next();
|
|
3877
|
+
};
|
|
3878
|
+
const enqueue = (function_, resolve2, arguments_) => {
|
|
3879
|
+
new Promise((internalResolve) => {
|
|
3880
|
+
queue.enqueue(internalResolve);
|
|
3881
|
+
}).then(
|
|
3882
|
+
run.bind(void 0, function_, resolve2, arguments_)
|
|
3883
|
+
);
|
|
3884
|
+
(async () => {
|
|
3885
|
+
await Promise.resolve();
|
|
3886
|
+
if (activeCount < concurrency) {
|
|
3887
|
+
resumeNext();
|
|
3888
|
+
}
|
|
3889
|
+
})();
|
|
3890
|
+
};
|
|
3891
|
+
const generator = (function_, ...arguments_) => new Promise((resolve2) => {
|
|
3892
|
+
enqueue(function_, resolve2, arguments_);
|
|
3893
|
+
});
|
|
3894
|
+
Object.defineProperties(generator, {
|
|
3895
|
+
activeCount: {
|
|
3896
|
+
get: () => activeCount
|
|
3897
|
+
},
|
|
3898
|
+
pendingCount: {
|
|
3899
|
+
get: () => queue.size
|
|
3900
|
+
},
|
|
3901
|
+
clearQueue: {
|
|
3902
|
+
value() {
|
|
3903
|
+
queue.clear();
|
|
3904
|
+
}
|
|
3905
|
+
},
|
|
3906
|
+
concurrency: {
|
|
3907
|
+
get: () => concurrency,
|
|
3908
|
+
set(newConcurrency) {
|
|
3909
|
+
validateConcurrency(newConcurrency);
|
|
3910
|
+
concurrency = newConcurrency;
|
|
3911
|
+
queueMicrotask(() => {
|
|
3912
|
+
while (activeCount < concurrency && queue.size > 0) {
|
|
3913
|
+
resumeNext();
|
|
3914
|
+
}
|
|
3915
|
+
});
|
|
3916
|
+
}
|
|
3917
|
+
}
|
|
3918
|
+
});
|
|
3919
|
+
return generator;
|
|
3920
|
+
}
|
|
3921
|
+
function validateConcurrency(concurrency) {
|
|
3922
|
+
if (!((Number.isInteger(concurrency) || concurrency === Number.POSITIVE_INFINITY) && concurrency > 0)) {
|
|
3923
|
+
throw new TypeError("Expected `concurrency` to be a number from 1 and up");
|
|
3924
|
+
}
|
|
3925
|
+
}
|
|
3926
|
+
|
|
3927
|
+
// src/utils/loader.ts
|
|
3928
|
+
function getPluginName(pluginName) {
|
|
3929
|
+
if (pluginName.startsWith(".")) {
|
|
3930
|
+
return parse(pluginName).name;
|
|
3931
|
+
}
|
|
3932
|
+
return pluginName;
|
|
3933
|
+
}
|
|
3934
|
+
async function load(pluginName) {
|
|
3935
|
+
let plugin = null;
|
|
3936
|
+
try {
|
|
3937
|
+
const module = await import(pluginName);
|
|
3938
|
+
plugin = module.default;
|
|
3939
|
+
} catch {
|
|
3940
|
+
try {
|
|
3941
|
+
const module = await import(join3(process.cwd(), pluginName));
|
|
3942
|
+
plugin = module.default;
|
|
3943
|
+
} catch {
|
|
3944
|
+
const require2 = createRequire(process.cwd());
|
|
3945
|
+
const module = await import(pathToFileURL(require2.resolve(pluginName, { paths: [process.cwd()] })).href);
|
|
3946
|
+
plugin = module.default;
|
|
3947
|
+
}
|
|
3948
|
+
}
|
|
3949
|
+
return [getPluginName(pluginName), plugin];
|
|
3950
|
+
}
|
|
3951
|
+
async function loaderPluginsFromPluginTuples(context, pluginsTuples, maxLimit = 5) {
|
|
3952
|
+
const loadAndCreatePlugin = async (pluginClassOrString, ...args) => {
|
|
3953
|
+
if (typeof pluginClassOrString === "string") {
|
|
3954
|
+
const [, pluginClass] = await load(pluginClassOrString);
|
|
3955
|
+
return factory(pluginClass, context, ...args);
|
|
3956
|
+
}
|
|
3957
|
+
return factory(pluginClassOrString, context, ...args);
|
|
3958
|
+
};
|
|
3959
|
+
const limit = pLimit(maxLimit);
|
|
3960
|
+
const pluginPromises = pluginsTuples.map(
|
|
3961
|
+
([pluginClassOrString, ...args]) => limit(() => loadAndCreatePlugin(pluginClassOrString, ...args))
|
|
3962
|
+
);
|
|
3963
|
+
return Promise.all(pluginPromises);
|
|
3964
|
+
}
|
|
3965
|
+
|
|
3966
|
+
// src/plugins/Changelog.ts
|
|
3967
|
+
import { join as join4 } from "path";
|
|
3968
|
+
import { existsSync, writeFileSync } from "fs";
|
|
3969
|
+
import {
|
|
3970
|
+
ScriptPlugin as ScriptPlugin3,
|
|
3971
|
+
Shell as Shell5
|
|
3972
|
+
} from "@qlover/scripts-context";
|
|
3973
|
+
var contentTmplate = "---\n'${name}': '${increment}'\n---\n\n${changelog}";
|
|
3974
|
+
var Changelog = class extends ScriptPlugin3 {
|
|
3975
|
+
constructor(context, props) {
|
|
3976
|
+
super(context, "changelog", {
|
|
3977
|
+
increment: "patch",
|
|
3978
|
+
changesetRoot: ".changeset",
|
|
3979
|
+
tagTemplate: "${name}@${version}",
|
|
3980
|
+
tagPrefix: "${name}",
|
|
3981
|
+
tagMatch: "${name}@*",
|
|
3982
|
+
...props
|
|
3983
|
+
});
|
|
3984
|
+
}
|
|
3985
|
+
get changesetRoot() {
|
|
3986
|
+
return join4(this.context.rootPath, this.getConfig("changesetRoot"));
|
|
3987
|
+
}
|
|
3988
|
+
get changesetConfigPath() {
|
|
3989
|
+
return join4(this.changesetRoot, "config.json");
|
|
3990
|
+
}
|
|
3991
|
+
enabled() {
|
|
3992
|
+
return !this.getConfig("skip");
|
|
3993
|
+
}
|
|
3994
|
+
async onBefore() {
|
|
3995
|
+
if (!existsSync(this.changesetRoot)) {
|
|
3996
|
+
throw new Error(
|
|
3997
|
+
`Changeset directory ${this.changesetRoot} does not exist`
|
|
3998
|
+
);
|
|
3999
|
+
}
|
|
4000
|
+
this.logger.debug(`${this.changesetRoot} exists`);
|
|
4001
|
+
}
|
|
4002
|
+
mergeWorkspaces(workspaces) {
|
|
4003
|
+
return workspaces.map((workspace) => {
|
|
4004
|
+
const newPackgeJson = WorkspaceCreator.toWorkspace(
|
|
4005
|
+
{
|
|
4006
|
+
path: workspace.path
|
|
4007
|
+
},
|
|
4008
|
+
this.context.rootPath
|
|
4009
|
+
);
|
|
4010
|
+
const newWorkspace = {
|
|
4011
|
+
...workspace,
|
|
4012
|
+
version: newPackgeJson.version
|
|
4013
|
+
};
|
|
4014
|
+
newWorkspace.tagName = this.generateTagName(newWorkspace);
|
|
4015
|
+
return newWorkspace;
|
|
4016
|
+
});
|
|
4017
|
+
}
|
|
4018
|
+
async onExec(_context) {
|
|
4019
|
+
const workspaces = await this.step({
|
|
4020
|
+
label: "Generate Changelogs",
|
|
4021
|
+
task: () => Promise.all(
|
|
4022
|
+
this.context.workspaces.map(
|
|
4023
|
+
(workspace) => this.generateChangelog(workspace)
|
|
4024
|
+
)
|
|
4025
|
+
)
|
|
4026
|
+
});
|
|
4027
|
+
this.context.setWorkspaces(workspaces);
|
|
4028
|
+
}
|
|
4029
|
+
async onSuccess() {
|
|
4030
|
+
const workspaces = this.context.workspaces;
|
|
4031
|
+
if (!this.getConfig("skipChangeset")) {
|
|
4032
|
+
await this.step({
|
|
4033
|
+
label: "Changeset Version",
|
|
4034
|
+
task: () => Promise.all(
|
|
4035
|
+
workspaces.map((changelog) => this.generateChangesetFile(changelog))
|
|
4036
|
+
)
|
|
4037
|
+
});
|
|
4038
|
+
await this.context.runChangesetsCli("version", [
|
|
4039
|
+
"--no-changelog",
|
|
4040
|
+
"--update-dependencies"
|
|
4041
|
+
]);
|
|
4042
|
+
if (this.getConfig("ignoreNonUpdatedPackages")) {
|
|
4043
|
+
await this.restoreIgnorePackages();
|
|
4044
|
+
}
|
|
4045
|
+
} else {
|
|
4046
|
+
this.logger.debug("Skip generate changeset files");
|
|
4047
|
+
}
|
|
4048
|
+
const newWorkspaces = this.mergeWorkspaces(workspaces);
|
|
4049
|
+
this.logger.debug("new workspaces", newWorkspaces);
|
|
4050
|
+
this.context.setWorkspaces(newWorkspaces);
|
|
4051
|
+
}
|
|
4052
|
+
async restoreIgnorePackages() {
|
|
4053
|
+
const { changedPaths = [], packages = [] } = this.context.getOptions(
|
|
4054
|
+
"workspaces"
|
|
4055
|
+
);
|
|
4056
|
+
const noChangedPackages = packages.filter((pkgPath) => !changedPaths.includes(pkgPath)).map(
|
|
4057
|
+
(pkgPath) => WorkspaceCreator.toWorkspace({ path: pkgPath }, this.context.rootPath).path
|
|
4058
|
+
);
|
|
4059
|
+
this.logger.debug("noChangedPackages", noChangedPackages);
|
|
4060
|
+
if (noChangedPackages.length > 0) {
|
|
4061
|
+
await this.shell.exec(["git", "restore", ...noChangedPackages]);
|
|
4062
|
+
}
|
|
4063
|
+
}
|
|
4064
|
+
getTagPrefix(workspace) {
|
|
4065
|
+
return Shell5.format(
|
|
4066
|
+
this.getConfig("tagPrefix"),
|
|
4067
|
+
workspace
|
|
4068
|
+
);
|
|
4069
|
+
}
|
|
4070
|
+
async generateChangelog(workspace) {
|
|
4071
|
+
let tagName = await this.getTagName(workspace);
|
|
4072
|
+
if (workspace.lastTag) {
|
|
4073
|
+
this.logger.warn(`${workspace.name} has lastTag: ${workspace.lastTag}`);
|
|
4074
|
+
tagName = workspace.lastTag;
|
|
4075
|
+
}
|
|
4076
|
+
this.logger.debug("tagName is:", tagName);
|
|
4077
|
+
const baseConfig = this.getConfig();
|
|
4078
|
+
const props = {
|
|
4079
|
+
...baseConfig,
|
|
4080
|
+
from: tagName,
|
|
4081
|
+
directory: workspace.path,
|
|
4082
|
+
shell: this.context.shell,
|
|
4083
|
+
fields: CHANGELOG_ALL_FIELDS,
|
|
4084
|
+
logger: this.logger
|
|
4085
|
+
};
|
|
4086
|
+
const gitChangelog = new GitChangelog(props);
|
|
4087
|
+
const commits = await gitChangelog.getCommits(props);
|
|
4088
|
+
const changelog = new GitChangelogFormatter(props).format(commits);
|
|
4089
|
+
return {
|
|
4090
|
+
...workspace,
|
|
4091
|
+
lastTag: tagName,
|
|
4092
|
+
changelog: changelog.join("\n")
|
|
4093
|
+
};
|
|
4094
|
+
}
|
|
4095
|
+
generateTagName(workspace) {
|
|
4096
|
+
try {
|
|
4097
|
+
const tagTemplate = this.getConfig("tagTemplate");
|
|
4098
|
+
return Shell5.format(
|
|
4099
|
+
tagTemplate,
|
|
4100
|
+
workspace
|
|
4101
|
+
);
|
|
4102
|
+
} catch (error) {
|
|
4103
|
+
console.error(`Error generating tag name for ${workspace.name}:`, error);
|
|
4104
|
+
return `${workspace.name}-v0.0.0`;
|
|
4105
|
+
}
|
|
4106
|
+
}
|
|
4107
|
+
async getTagName(workspace) {
|
|
4108
|
+
try {
|
|
4109
|
+
const currentTagPattern = this.generateTagName(workspace);
|
|
4110
|
+
const tagMatch = Shell5.format(
|
|
4111
|
+
this.getConfig("tagMatch"),
|
|
4112
|
+
workspace
|
|
4113
|
+
);
|
|
4114
|
+
const tagsOutput = await this.shell.exec(
|
|
4115
|
+
`git for-each-ref --sort=-creatordate --format "%(refname:short)|%(creatordate:iso8601)" "refs/tags/${tagMatch}"`,
|
|
4116
|
+
{ dryRun: false }
|
|
4117
|
+
);
|
|
4118
|
+
if (!tagsOutput) {
|
|
4119
|
+
return currentTagPattern;
|
|
4120
|
+
}
|
|
4121
|
+
const tags = tagsOutput.split("\n").filter(Boolean);
|
|
4122
|
+
if (tags.length === 0) {
|
|
4123
|
+
return currentTagPattern;
|
|
4124
|
+
}
|
|
4125
|
+
const latestTag = tags[0].split("|")[0];
|
|
4126
|
+
return latestTag;
|
|
4127
|
+
} catch (error) {
|
|
4128
|
+
console.error(`Error getting tag for ${workspace.name}:`, error);
|
|
4129
|
+
const fallbackTag = this.generateTagName(workspace);
|
|
4130
|
+
return fallbackTag;
|
|
4131
|
+
}
|
|
4132
|
+
}
|
|
4133
|
+
getIncrement() {
|
|
4134
|
+
const lables = this.context.getOptions("workspaces.changeLabels");
|
|
4135
|
+
if (Array.isArray(lables) && lables.length > 0) {
|
|
4136
|
+
if (lables.includes("increment:major")) {
|
|
4137
|
+
return "major";
|
|
4138
|
+
}
|
|
4139
|
+
if (lables.includes("increment:minor")) {
|
|
4140
|
+
return "minor";
|
|
4141
|
+
}
|
|
4142
|
+
}
|
|
4143
|
+
const increment = this.getConfig("increment", "patch");
|
|
4144
|
+
return increment;
|
|
4145
|
+
}
|
|
4146
|
+
async generateChangesetFile(workspace) {
|
|
4147
|
+
const { name, version } = workspace;
|
|
4148
|
+
const changesetName = `${name}-${version}`.replace(/[\/\\]/g, "_");
|
|
4149
|
+
const changesetPath = join4(this.changesetRoot, `${changesetName}.md`);
|
|
4150
|
+
const increment = this.getIncrement();
|
|
4151
|
+
this.logger.debug("increment is:", [increment]);
|
|
4152
|
+
const fileContent = Shell5.format(contentTmplate, {
|
|
4153
|
+
...workspace,
|
|
4154
|
+
increment
|
|
4155
|
+
});
|
|
4156
|
+
if (this.context.dryRun) {
|
|
4157
|
+
this.logger.info(
|
|
4158
|
+
`Changeset [${changesetPath}] will be created, content is:`
|
|
4159
|
+
);
|
|
4160
|
+
this.logger.log(fileContent);
|
|
4161
|
+
return;
|
|
4162
|
+
}
|
|
4163
|
+
if (existsSync(changesetPath)) {
|
|
4164
|
+
this.logger.info(`Changeset ${changesetName} already exists`);
|
|
4165
|
+
return;
|
|
4166
|
+
}
|
|
4167
|
+
writeFileSync(changesetPath, fileContent, "utf-8");
|
|
4168
|
+
}
|
|
4169
|
+
};
|
|
4170
|
+
|
|
4171
|
+
// src/implments/ReleaseTask.ts
|
|
4172
|
+
var innerTuples = [
|
|
4173
|
+
tuple(Workspaces),
|
|
4174
|
+
tuple(Changelog, {}),
|
|
4175
|
+
tuple(GithubPR, {})
|
|
4176
|
+
];
|
|
4177
|
+
var defaultName = "release";
|
|
4178
|
+
var ReleaseTask = class {
|
|
4179
|
+
constructor(options = {}, executor = new AsyncExecutor(), defaultTuples = innerTuples) {
|
|
4180
|
+
this.executor = executor;
|
|
4181
|
+
this.defaultTuples = defaultTuples;
|
|
4182
|
+
this.context = new ReleaseContext(defaultName, options);
|
|
4183
|
+
}
|
|
4184
|
+
context;
|
|
4185
|
+
getContext() {
|
|
4186
|
+
return this.context;
|
|
4187
|
+
}
|
|
4188
|
+
async usePlugins(externalTuples) {
|
|
4189
|
+
externalTuples = externalTuples || this.context.options.plugins || [];
|
|
4190
|
+
const plugins = await loaderPluginsFromPluginTuples(this.context, [
|
|
4191
|
+
...this.defaultTuples,
|
|
4192
|
+
...externalTuples
|
|
4193
|
+
]);
|
|
4194
|
+
plugins.forEach((plugin) => {
|
|
4195
|
+
if (plugin instanceof Workspaces) {
|
|
4196
|
+
plugin.setReleaseTask(this);
|
|
4197
|
+
}
|
|
4198
|
+
this.executor.use(plugin);
|
|
4199
|
+
});
|
|
4200
|
+
return plugins;
|
|
4201
|
+
}
|
|
4202
|
+
async run() {
|
|
4203
|
+
return this.executor.exec(
|
|
4204
|
+
this.context,
|
|
4205
|
+
(context) => Promise.resolve(context)
|
|
4206
|
+
);
|
|
4207
|
+
}
|
|
4208
|
+
async exec(externalTuples) {
|
|
4209
|
+
if (this.context.env.get("FE_RELEASE") === "false") {
|
|
4210
|
+
throw new Error("Skip Release");
|
|
4211
|
+
}
|
|
4212
|
+
await this.usePlugins(externalTuples);
|
|
4213
|
+
return this.run();
|
|
4214
|
+
}
|
|
4215
|
+
};
|
|
4216
|
+
|
|
4217
|
+
// src/index.ts
|
|
4218
|
+
import { ScriptPlugin as ScriptPlugin4 } from "@qlover/scripts-context";
|
|
4219
|
+
|
|
4220
|
+
// src/utils/args.ts
|
|
4221
|
+
var import_set = __toESM(require_set(), 1);
|
|
4222
|
+
function reduceOptions(opts, commonKey) {
|
|
4223
|
+
return Object.entries(opts).reduce((acc, [key, value]) => {
|
|
4224
|
+
if (key.includes(".")) {
|
|
4225
|
+
(0, import_set.default)(acc, key, value);
|
|
4226
|
+
} else {
|
|
4227
|
+
(0, import_set.default)(acc, commonKey ? `${commonKey}.${key}` : key, value);
|
|
4228
|
+
}
|
|
4229
|
+
return acc;
|
|
4230
|
+
}, {});
|
|
4231
|
+
}
|
|
4232
|
+
export {
|
|
4233
|
+
CHANGELOG_ALL_FIELDS,
|
|
4234
|
+
GitChangelog,
|
|
4235
|
+
GitChangelogFormatter,
|
|
4236
|
+
ReleaseContext,
|
|
4237
|
+
ReleaseLabel,
|
|
4238
|
+
ReleaseTask,
|
|
4239
|
+
ScriptPlugin4 as ScriptPlugin,
|
|
4240
|
+
factory,
|
|
4241
|
+
load,
|
|
4242
|
+
loaderPluginsFromPluginTuples,
|
|
4243
|
+
reduceOptions,
|
|
4244
|
+
tuple
|
|
4245
|
+
};
|