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