@baic/yolk-cli 2.1.0-alpha.131 → 2.1.0-alpha.132

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.
Files changed (39) hide show
  1. package/compiled/commander/package.json +1 -1
  2. package/compiled/mustache/package.json +1 -1
  3. package/compiled/prettier/index.js +3 -3
  4. package/compiled/prettier/package.json +1 -1
  5. package/compiled/staged-git-files/package.json +1 -1
  6. package/es/.lintstagedrc.js +27 -0
  7. package/es/util.d.ts +18 -0
  8. package/es/util.js +1 -0
  9. package/es/yolk.d.ts +1 -5
  10. package/es/yolk.js +1 -1
  11. package/lib/.lintstagedrc.js +27 -0
  12. package/lib/util.d.ts +18 -0
  13. package/lib/util.js +1 -0
  14. package/lib/yolk.d.ts +1 -5
  15. package/lib/yolk.js +1 -1
  16. package/package.json +10 -12
  17. package/templates/miniprogram/project.config.json.tpl +1 -1
  18. package/templates/umi-mobile/src/pages/demo/index.tsx +3 -3
  19. package/templates/umi-mobile-h5+app/src/pages/demo/index.tsx +3 -3
  20. package/templates/umi-mobile-native/android/app/build.gradle +19 -4
  21. package/templates/umi-mobile-native/android/app/libs/Bluetooth-release.aar +0 -0
  22. package/templates/umi-mobile-native/android/gradle.properties +1 -1
  23. package/templates/umi-mobile-native/src/common/bluetooth.ts +6 -6
  24. package/templates/umi-mobile-native/src/common/bridge.ts +6 -6
  25. package/templates/umi-mobile-native/src/pages/demo/index.tsx +3 -3
  26. package/templates/umi-web/src/pages/demo/index.tsx +3 -3
  27. package/templates/umi-web-screen/src/components/resize-container/index.tsx +5 -5
  28. package/compiled/glob/index.d.ts +0 -102
  29. package/compiled/glob/index.js +0 -2222
  30. package/compiled/glob/package.json +0 -1
  31. package/compiled/minimatch/index.d.ts +0 -312
  32. package/compiled/minimatch/index.js +0 -1292
  33. package/compiled/minimatch/package.json +0 -1
  34. package/compiled/mkdirp/index.d.ts +0 -114
  35. package/compiled/mkdirp/index.js +0 -348
  36. package/compiled/mkdirp/package.json +0 -1
  37. package/compiled/rimraf/index.d.ts +0 -48
  38. package/compiled/rimraf/index.js +0 -449
  39. package/compiled/rimraf/package.json +0 -1
@@ -1 +1 @@
1
- {"name":"commander","version":"6.2.1","author":"TJ Holowaychuk <tj@vision-media.ca>","license":"MIT","_lastModified":"2023-04-19T01:06:39.681Z"}
1
+ {"name":"commander","version":"6.2.1","author":"TJ Holowaychuk <tj@vision-media.ca>","license":"MIT","_lastModified":"2023-05-24T01:05:43.454Z"}
@@ -1 +1 @@
1
- {"name":"mustache","version":"4.2.0","author":"mustache.js Authors <http://github.com/janl/mustache.js>","license":"MIT","_lastModified":"2023-04-19T01:06:40.023Z"}
1
+ {"name":"mustache","version":"4.2.0","author":"mustache.js Authors <http://github.com/janl/mustache.js>","license":"MIT","_lastModified":"2023-05-24T01:05:43.536Z"}
@@ -39833,7 +39833,7 @@ Expecting `+pe.join(", ")+", got '"+(this.terminals_[J]||J)+"'":Ce="Parse error
39833
39833
  (function(e){if(true)module.exports=e();else { var i; }})(function(){"use strict";var S=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var ee=S((cc,Kr)=>{var Ne=function(e){return e&&e.Math==Math&&e};Kr.exports=Ne(typeof globalThis=="object"&&globalThis)||Ne(typeof window=="object"&&window)||Ne(typeof self=="object"&&self)||Ne(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var se=S((hc,Jr)=>{Jr.exports=function(e){try{return!!e()}catch{return!0}}});var ae=S((pc,Zr)=>{var qs=se();Zr.exports=!qs(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var Oe=S((fc,eu)=>{var Is=se();eu.exports=!Is(function(){var e=function(){}.bind();return typeof e!="function"||e.hasOwnProperty("prototype")})});var De=S((dc,ru)=>{var Rs=Oe(),qe=Function.prototype.call;ru.exports=Rs?qe.bind(qe):function(){return qe.apply(qe,arguments)}});var su=S(nu=>{"use strict";var uu={}.propertyIsEnumerable,tu=Object.getOwnPropertyDescriptor,xs=tu&&!uu.call({1:2},1);nu.f=xs?function(r){var u=tu(this,r);return!!u&&u.enumerable}:uu});var Ie=S((Cc,iu)=>{iu.exports=function(e,r){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:r}}});var re=S((mc,Du)=>{var au=Oe(),ou=Function.prototype,er=ou.call,Ps=au&&ou.bind.bind(er,er);Du.exports=au?Ps:function(e){return function(){return er.apply(e,arguments)}}});var me=S((gc,cu)=>{var lu=re(),ks=lu({}.toString),Ls=lu("".slice);cu.exports=function(e){return Ls(ks(e),8,-1)}});var pu=S((Fc,hu)=>{var $s=re(),Ms=se(),js=me(),rr=Object,Us=$s("".split);hu.exports=Ms(function(){return!rr("z").propertyIsEnumerable(0)})?function(e){return js(e)=="String"?Us(e,""):rr(e)}:rr});var Re=S((Ac,fu)=>{fu.exports=function(e){return e==null}});var ur=S((vc,du)=>{var Gs=Re(),Vs=TypeError;du.exports=function(e){if(Gs(e))throw Vs("Can't call method on "+e);return e}});var xe=S((_c,Eu)=>{var Xs=pu(),Hs=ur();Eu.exports=function(e){return Xs(Hs(e))}});var nr=S((Sc,Cu)=>{var tr=typeof document=="object"&&document.all,zs=typeof tr>"u"&&tr!==void 0;Cu.exports={all:tr,IS_HTMLDDA:zs}});var Y=S((yc,gu)=>{var mu=nr(),Ws=mu.all;gu.exports=mu.IS_HTMLDDA?function(e){return typeof e=="function"||e===Ws}:function(e){return typeof e=="function"}});var le=S((Tc,vu)=>{var Fu=Y(),Au=nr(),Ys=Au.all;vu.exports=Au.IS_HTMLDDA?function(e){return typeof e=="object"?e!==null:Fu(e)||e===Ys}:function(e){return typeof e=="object"?e!==null:Fu(e)}});var ge=S((Bc,_u)=>{var sr=ee(),Qs=Y(),Ks=function(e){return Qs(e)?e:void 0};_u.exports=function(e,r){return arguments.length<2?Ks(sr[e]):sr[e]&&sr[e][r]}});var ir=S((bc,Su)=>{var Js=re();Su.exports=Js({}.isPrototypeOf)});var Tu=S((wc,yu)=>{var Zs=ge();yu.exports=Zs("navigator","userAgent")||""});var Iu=S((Nc,qu)=>{var Ou=ee(),ar=Tu(),Bu=Ou.process,bu=Ou.Deno,wu=Bu&&Bu.versions||bu&&bu.version,Nu=wu&&wu.v8,ue,Pe;Nu&&(ue=Nu.split("."),Pe=ue[0]>0&&ue[0]<4?1:+(ue[0]+ue[1]));!Pe&&ar&&(ue=ar.match(/Edge\/(\d+)/),(!ue||ue[1]>=74)&&(ue=ar.match(/Chrome\/(\d+)/),ue&&(Pe=+ue[1])));qu.exports=Pe});var or=S((Oc,xu)=>{var Ru=Iu(),ei=se();xu.exports=!!Object.getOwnPropertySymbols&&!ei(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Ru&&Ru<41})});var Dr=S((qc,Pu)=>{var ri=or();Pu.exports=ri&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var lr=S((Ic,ku)=>{var ui=ge(),ti=Y(),ni=ir(),si=Dr(),ii=Object;ku.exports=si?function(e){return typeof e=="symbol"}:function(e){var r=ui("Symbol");return ti(r)&&ni(r.prototype,ii(e))}});var ke=S((Rc,Lu)=>{var ai=String;Lu.exports=function(e){try{return ai(e)}catch{return"Object"}}});var Fe=S((xc,$u)=>{var oi=Y(),Di=ke(),li=TypeError;$u.exports=function(e){if(oi(e))return e;throw li(Di(e)+" is not a function")}});var Le=S((Pc,Mu)=>{var ci=Fe(),hi=Re();Mu.exports=function(e,r){var u=e[r];return hi(u)?void 0:ci(u)}});var Uu=S((kc,ju)=>{var cr=De(),hr=Y(),pr=le(),pi=TypeError;ju.exports=function(e,r){var u,n;if(r==="string"&&hr(u=e.toString)&&!pr(n=cr(u,e))||hr(u=e.valueOf)&&!pr(n=cr(u,e))||r!=="string"&&hr(u=e.toString)&&!pr(n=cr(u,e)))return n;throw pi("Can't convert object to primitive value")}});var Vu=S((Lc,Gu)=>{Gu.exports=!1});var $e=S(($c,Hu)=>{var Xu=ee(),fi=Object.defineProperty;Hu.exports=function(e,r){try{fi(Xu,e,{value:r,configurable:!0,writable:!0})}catch{Xu[e]=r}return r}});var Me=S((Mc,Wu)=>{var di=ee(),Ei=$e(),zu="__core-js_shared__",Ci=di[zu]||Ei(zu,{});Wu.exports=Ci});var fr=S((jc,Qu)=>{var mi=Vu(),Yu=Me();(Qu.exports=function(e,r){return Yu[e]||(Yu[e]=r!==void 0?r:{})})("versions",[]).push({version:"3.26.1",mode:mi?"pure":"global",copyright:"\xA9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"})});var dr=S((Uc,Ku)=>{var gi=ur(),Fi=Object;Ku.exports=function(e){return Fi(gi(e))}});var oe=S((Gc,Ju)=>{var Ai=re(),vi=dr(),_i=Ai({}.hasOwnProperty);Ju.exports=Object.hasOwn||function(r,u){return _i(vi(r),u)}});var Er=S((Vc,Zu)=>{var Si=re(),yi=0,Ti=Math.random(),Bi=Si(1 .toString);Zu.exports=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Bi(++yi+Ti,36)}});var he=S((Xc,nt)=>{var bi=ee(),wi=fr(),et=oe(),Ni=Er(),rt=or(),tt=Dr(),fe=wi("wks"),ce=bi.Symbol,ut=ce&&ce.for,Oi=tt?ce:ce&&ce.withoutSetter||Ni;nt.exports=function(e){if(!et(fe,e)||!(rt||typeof fe[e]=="string")){var r="Symbol."+e;rt&&et(ce,e)?fe[e]=ce[e]:tt&&ut?fe[e]=ut(r):fe[e]=Oi(r)}return fe[e]}});var ot=S((Hc,at)=>{var qi=De(),st=le(),it=lr(),Ii=Le(),Ri=Uu(),xi=he(),Pi=TypeError,ki=xi("toPrimitive");at.exports=function(e,r){if(!st(e)||it(e))return e;var u=Ii(e,ki),n;if(u){if(r===void 0&&(r="default"),n=qi(u,e,r),!st(n)||it(n))return n;throw Pi("Can't convert object to primitive value")}return r===void 0&&(r="number"),Ri(e,r)}});var je=S((zc,Dt)=>{var Li=ot(),$i=lr();Dt.exports=function(e){var r=Li(e,"string");return $i(r)?r:r+""}});var ht=S((Wc,ct)=>{var Mi=ee(),lt=le(),Cr=Mi.document,ji=lt(Cr)&&lt(Cr.createElement);ct.exports=function(e){return ji?Cr.createElement(e):{}}});var mr=S((Yc,pt)=>{var Ui=ae(),Gi=se(),Vi=ht();pt.exports=!Ui&&!Gi(function(){return Object.defineProperty(Vi("div"),"a",{get:function(){return 7}}).a!=7})});var gr=S(dt=>{var Xi=ae(),Hi=De(),zi=su(),Wi=Ie(),Yi=xe(),Qi=je(),Ki=oe(),Ji=mr(),ft=Object.getOwnPropertyDescriptor;dt.f=Xi?ft:function(r,u){if(r=Yi(r),u=Qi(u),Ji)try{return ft(r,u)}catch{}if(Ki(r,u))return Wi(!Hi(zi.f,r,u),r[u])}});var Ct=S((Kc,Et)=>{var Zi=ae(),ea=se();Et.exports=Zi&&ea(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42})});var de=S((Jc,mt)=>{var ra=le(),ua=String,ta=TypeError;mt.exports=function(e){if(ra(e))return e;throw ta(ua(e)+" is not an object")}});var Ae=S(Ft=>{var na=ae(),sa=mr(),ia=Ct(),Ue=de(),gt=je(),aa=TypeError,Fr=Object.defineProperty,oa=Object.getOwnPropertyDescriptor,Ar="enumerable",vr="configurable",_r="writable";Ft.f=na?ia?function(r,u,n){if(Ue(r),u=gt(u),Ue(n),typeof r=="function"&&u==="prototype"&&"value"in n&&_r in n&&!n[_r]){var D=oa(r,u);D&&D[_r]&&(r[u]=n.value,n={configurable:vr in n?n[vr]:D[vr],enumerable:Ar in n?n[Ar]:D[Ar],writable:!1})}return Fr(r,u,n)}:Fr:function(r,u,n){if(Ue(r),u=gt(u),Ue(n),sa)try{return Fr(r,u,n)}catch{}if("get"in n||"set"in n)throw aa("Accessors not supported");return"value"in n&&(r[u]=n.value),r}});var Sr=S((e2,At)=>{var Da=ae(),la=Ae(),ca=Ie();At.exports=Da?function(e,r,u){return la.f(e,r,ca(1,u))}:function(e,r,u){return e[r]=u,e}});var St=S((r2,_t)=>{var yr=ae(),ha=oe(),vt=Function.prototype,pa=yr&&Object.getOwnPropertyDescriptor,Tr=ha(vt,"name"),fa=Tr&&function(){}.name==="something",da=Tr&&(!yr||yr&&pa(vt,"name").configurable);_t.exports={EXISTS:Tr,PROPER:fa,CONFIGURABLE:da}});var br=S((u2,yt)=>{var Ea=re(),Ca=Y(),Br=Me(),ma=Ea(Function.toString);Ca(Br.inspectSource)||(Br.inspectSource=function(e){return ma(e)});yt.exports=Br.inspectSource});var bt=S((t2,Bt)=>{var ga=ee(),Fa=Y(),Tt=ga.WeakMap;Bt.exports=Fa(Tt)&&/native code/.test(String(Tt))});var Ot=S((n2,Nt)=>{var Aa=fr(),va=Er(),wt=Aa("keys");Nt.exports=function(e){return wt[e]||(wt[e]=va(e))}});var wr=S((s2,qt)=>{qt.exports={}});var Pt=S((i2,xt)=>{var _a=bt(),Rt=ee(),Sa=le(),ya=Sr(),Nr=oe(),Or=Me(),Ta=Ot(),Ba=wr(),It="Object already initialized",qr=Rt.TypeError,ba=Rt.WeakMap,Ge,ve,Ve,wa=function(e){return Ve(e)?ve(e):Ge(e,{})},Na=function(e){return function(r){var u;if(!Sa(r)||(u=ve(r)).type!==e)throw qr("Incompatible receiver, "+e+" required");return u}};_a||Or.state?(te=Or.state||(Or.state=new ba),te.get=te.get,te.has=te.has,te.set=te.set,Ge=function(e,r){if(te.has(e))throw qr(It);return r.facade=e,te.set(e,r),r},ve=function(e){return te.get(e)||{}},Ve=function(e){return te.has(e)}):(pe=Ta("state"),Ba[pe]=!0,Ge=function(e,r){if(Nr(e,pe))throw qr(It);return r.facade=e,ya(e,pe,r),r},ve=function(e){return Nr(e,pe)?e[pe]:{}},Ve=function(e){return Nr(e,pe)});var te,pe;xt.exports={set:Ge,get:ve,has:Ve,enforce:wa,getterFor:Na}});var $t=S((a2,Lt)=>{var Oa=se(),qa=Y(),Xe=oe(),Ir=ae(),Ia=St().CONFIGURABLE,Ra=br(),kt=Pt(),xa=kt.enforce,Pa=kt.get,He=Object.defineProperty,ka=Ir&&!Oa(function(){return He(function(){},"length",{value:8}).length!==8}),La=String(String).split("String"),$a=Lt.exports=function(e,r,u){String(r).slice(0,7)==="Symbol("&&(r="["+String(r).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),u&&u.getter&&(r="get "+r),u&&u.setter&&(r="set "+r),(!Xe(e,"name")||Ia&&e.name!==r)&&(Ir?He(e,"name",{value:r,configurable:!0}):e.name=r),ka&&u&&Xe(u,"arity")&&e.length!==u.arity&&He(e,"length",{value:u.arity});try{u&&Xe(u,"constructor")&&u.constructor?Ir&&He(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch{}var n=xa(e);return Xe(n,"source")||(n.source=La.join(typeof r=="string"?r:"")),e};Function.prototype.toString=$a(function(){return qa(this)&&Pa(this).source||Ra(this)},"toString")});var jt=S((o2,Mt)=>{var Ma=Y(),ja=Ae(),Ua=$t(),Ga=$e();Mt.exports=function(e,r,u,n){n||(n={});var D=n.enumerable,s=n.name!==void 0?n.name:r;if(Ma(u)&&Ua(u,s,n),n.global)D?e[r]=u:Ga(r,u);else{try{n.unsafe?e[r]&&(D=!0):delete e[r]}catch{}D?e[r]=u:ja.f(e,r,{value:u,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}});var Gt=S((D2,Ut)=>{var Va=Math.ceil,Xa=Math.floor;Ut.exports=Math.trunc||function(r){var u=+r;return(u>0?Xa:Va)(u)}});var Rr=S((l2,Vt)=>{var Ha=Gt();Vt.exports=function(e){var r=+e;return r!==r||r===0?0:Ha(r)}});var Ht=S((c2,Xt)=>{var za=Rr(),Wa=Math.max,Ya=Math.min;Xt.exports=function(e,r){var u=za(e);return u<0?Wa(u+r,0):Ya(u,r)}});var Wt=S((h2,zt)=>{var Qa=Rr(),Ka=Math.min;zt.exports=function(e){return e>0?Ka(Qa(e),9007199254740991):0}});var _e=S((p2,Yt)=>{var Ja=Wt();Yt.exports=function(e){return Ja(e.length)}});var Jt=S((f2,Kt)=>{var Za=xe(),eo=Ht(),ro=_e(),Qt=function(e){return function(r,u,n){var D=Za(r),s=ro(D),i=eo(n,s),f;if(e&&u!=u){for(;s>i;)if(f=D[i++],f!=f)return!0}else for(;s>i;i++)if((e||i in D)&&D[i]===u)return e||i||0;return!e&&-1}};Kt.exports={includes:Qt(!0),indexOf:Qt(!1)}});var rn=S((d2,en)=>{var uo=re(),xr=oe(),to=xe(),no=Jt().indexOf,so=wr(),Zt=uo([].push);en.exports=function(e,r){var u=to(e),n=0,D=[],s;for(s in u)!xr(so,s)&&xr(u,s)&&Zt(D,s);for(;r.length>n;)xr(u,s=r[n++])&&(~no(D,s)||Zt(D,s));return D}});var tn=S((E2,un)=>{un.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var sn=S(nn=>{var io=rn(),ao=tn(),oo=ao.concat("length","prototype");nn.f=Object.getOwnPropertyNames||function(r){return io(r,oo)}});var on=S(an=>{an.f=Object.getOwnPropertySymbols});var ln=S((g2,Dn)=>{var Do=ge(),lo=re(),co=sn(),ho=on(),po=de(),fo=lo([].concat);Dn.exports=Do("Reflect","ownKeys")||function(r){var u=co.f(po(r)),n=ho.f;return n?fo(u,n(r)):u}});var pn=S((F2,hn)=>{var cn=oe(),Eo=ln(),Co=gr(),mo=Ae();hn.exports=function(e,r,u){for(var n=Eo(r),D=mo.f,s=Co.f,i=0;i<n.length;i++){var f=n[i];!cn(e,f)&&!(u&&cn(u,f))&&D(e,f,s(r,f))}}});var dn=S((A2,fn)=>{var go=se(),Fo=Y(),Ao=/#|\.prototype\./,Se=function(e,r){var u=_o[vo(e)];return u==yo?!0:u==So?!1:Fo(r)?go(r):!!r},vo=Se.normalize=function(e){return String(e).replace(Ao,".").toLowerCase()},_o=Se.data={},So=Se.NATIVE="N",yo=Se.POLYFILL="P";fn.exports=Se});var ze=S((v2,En)=>{var Pr=ee(),To=gr().f,Bo=Sr(),bo=jt(),wo=$e(),No=pn(),Oo=dn();En.exports=function(e,r){var u=e.target,n=e.global,D=e.stat,s,i,f,c,F,a;if(n?i=Pr:D?i=Pr[u]||wo(u,{}):i=(Pr[u]||{}).prototype,i)for(f in r){if(F=r[f],e.dontCallGetSet?(a=To(i,f),c=a&&a.value):c=i[f],s=Oo(n?f:u+(D?".":"#")+f,e.forced),!s&&c!==void 0){if(typeof F==typeof c)continue;No(F,c)}(e.sham||c&&c.sham)&&Bo(F,"sham",!0),bo(i,f,F,e)}}});var Cn=S(()=>{var qo=ze(),kr=ee();qo({global:!0,forced:kr.globalThis!==kr},{globalThis:kr})});var mn=S(()=>{Cn()});var Lr=S((B2,gn)=>{var Io=me();gn.exports=Array.isArray||function(r){return Io(r)=="Array"}});var An=S((b2,Fn)=>{var Ro=TypeError,xo=9007199254740991;Fn.exports=function(e){if(e>xo)throw Ro("Maximum allowed index exceeded");return e}});var _n=S((w2,vn)=>{var Po=me(),ko=re();vn.exports=function(e){if(Po(e)==="Function")return ko(e)}});var $r=S((N2,yn)=>{var Sn=_n(),Lo=Fe(),$o=Oe(),Mo=Sn(Sn.bind);yn.exports=function(e,r){return Lo(e),r===void 0?e:$o?Mo(e,r):function(){return e.apply(r,arguments)}}});var bn=S((O2,Bn)=>{"use strict";var jo=Lr(),Uo=_e(),Go=An(),Vo=$r(),Tn=function(e,r,u,n,D,s,i,f){for(var c=D,F=0,a=i?Vo(i,f):!1,l,h;F<n;)F in u&&(l=a?a(u[F],F,r):u[F],s>0&&jo(l)?(h=Uo(l),c=Tn(e,r,l,h,c,s-1)-1):(Go(c+1),e[c]=l),c++),F++;return c};Bn.exports=Tn});var On=S((q2,Nn)=>{var Xo=he(),Ho=Xo("toStringTag"),wn={};wn[Ho]="z";Nn.exports=String(wn)==="[object z]"});var Mr=S((I2,qn)=>{var zo=On(),Wo=Y(),We=me(),Yo=he(),Qo=Yo("toStringTag"),Ko=Object,Jo=We(function(){return arguments}())=="Arguments",Zo=function(e,r){try{return e[r]}catch{}};qn.exports=zo?We:function(e){var r,u,n;return e===void 0?"Undefined":e===null?"Null":typeof(u=Zo(r=Ko(e),Qo))=="string"?u:Jo?We(r):(n=We(r))=="Object"&&Wo(r.callee)?"Arguments":n}});var Ln=S((R2,kn)=>{var eD=re(),rD=se(),In=Y(),uD=Mr(),tD=ge(),nD=br(),Rn=function(){},sD=[],xn=tD("Reflect","construct"),jr=/^\s*(?:class|function)\b/,iD=eD(jr.exec),aD=!jr.exec(Rn),ye=function(r){if(!In(r))return!1;try{return xn(Rn,sD,r),!0}catch{return!1}},Pn=function(r){if(!In(r))return!1;switch(uD(r)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return aD||!!iD(jr,nD(r))}catch{return!0}};Pn.sham=!0;kn.exports=!xn||rD(function(){var e;return ye(ye.call)||!ye(Object)||!ye(function(){e=!0})||e})?Pn:ye});var Un=S((x2,jn)=>{var $n=Lr(),oD=Ln(),DD=le(),lD=he(),cD=lD("species"),Mn=Array;jn.exports=function(e){var r;return $n(e)&&(r=e.constructor,oD(r)&&(r===Mn||$n(r.prototype))?r=void 0:DD(r)&&(r=r[cD],r===null&&(r=void 0))),r===void 0?Mn:r}});var Vn=S((P2,Gn)=>{var hD=Un();Gn.exports=function(e,r){return new(hD(e))(r===0?0:r)}});var Xn=S(()=>{"use strict";var pD=ze(),fD=bn(),dD=Fe(),ED=dr(),CD=_e(),mD=Vn();pD({target:"Array",proto:!0},{flatMap:function(r){var u=ED(this),n=CD(u),D;return dD(r),D=mD(u,0),D.length=fD(D,u,u,n,0,1,r,arguments.length>1?arguments[1]:void 0),D}})});var Ur=S(($2,Hn)=>{Hn.exports={}});var Wn=S((M2,zn)=>{var gD=he(),FD=Ur(),AD=gD("iterator"),vD=Array.prototype;zn.exports=function(e){return e!==void 0&&(FD.Array===e||vD[AD]===e)}});var Gr=S((j2,Qn)=>{var _D=Mr(),Yn=Le(),SD=Re(),yD=Ur(),TD=he(),BD=TD("iterator");Qn.exports=function(e){if(!SD(e))return Yn(e,BD)||Yn(e,"@@iterator")||yD[_D(e)]}});var Jn=S((U2,Kn)=>{var bD=De(),wD=Fe(),ND=de(),OD=ke(),qD=Gr(),ID=TypeError;Kn.exports=function(e,r){var u=arguments.length<2?qD(e):r;if(wD(u))return ND(bD(u,e));throw ID(OD(e)+" is not iterable")}});var rs=S((G2,es)=>{var RD=De(),Zn=de(),xD=Le();es.exports=function(e,r,u){var n,D;Zn(e);try{if(n=xD(e,"return"),!n){if(r==="throw")throw u;return u}n=RD(n,e)}catch(s){D=!0,n=s}if(r==="throw")throw u;if(D)throw n;return Zn(n),u}});var is=S((V2,ss)=>{var PD=$r(),kD=De(),LD=de(),$D=ke(),MD=Wn(),jD=_e(),us=ir(),UD=Jn(),GD=Gr(),ts=rs(),VD=TypeError,Ye=function(e,r){this.stopped=e,this.result=r},ns=Ye.prototype;ss.exports=function(e,r,u){var n=u&&u.that,D=!!(u&&u.AS_ENTRIES),s=!!(u&&u.IS_RECORD),i=!!(u&&u.IS_ITERATOR),f=!!(u&&u.INTERRUPTED),c=PD(r,n),F,a,l,h,C,d,m,T=function(g){return F&&ts(F,"normal",g),new Ye(!0,g)},w=function(g){return D?(LD(g),f?c(g[0],g[1],T):c(g[0],g[1])):f?c(g,T):c(g)};if(s)F=e.iterator;else if(i)F=e;else{if(a=GD(e),!a)throw VD($D(e)+" is not iterable");if(MD(a)){for(l=0,h=jD(e);h>l;l++)if(C=w(e[l]),C&&us(ns,C))return C;return new Ye(!1)}F=UD(e,a)}for(d=s?e.next:F.next;!(m=kD(d,F)).done;){try{C=w(m.value)}catch(g){ts(F,"throw",g)}if(typeof C=="object"&&C&&us(ns,C))return C}return new Ye(!1)}});var os=S((X2,as)=>{"use strict";var XD=je(),HD=Ae(),zD=Ie();as.exports=function(e,r,u){var n=XD(r);n in e?HD.f(e,n,zD(0,u)):e[n]=u}});var Ds=S(()=>{var WD=ze(),YD=is(),QD=os();WD({target:"Object",stat:!0},{fromEntries:function(r){var u={};return YD(r,function(n,D){QD(u,n,D)},{AS_ENTRIES:!0}),u}})});var Dc=S((W2,Os)=>{var KD=["cliName","cliCategory","cliDescription"];function JD(e,r){if(e==null)return{};var u=ZD(e,r),n,D;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(D=0;D<s.length;D++)n=s[D],!(r.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(u[n]=e[n])}return u}function ZD(e,r){if(e==null)return{};var u={},n=Object.keys(e),D,s;for(s=0;s<n.length;s++)D=n[s],!(r.indexOf(D)>=0)&&(u[D]=e[D]);return u}mn();Xn();Ds();var el=Object.create,Je=Object.defineProperty,rl=Object.getOwnPropertyDescriptor,Xr=Object.getOwnPropertyNames,ul=Object.getPrototypeOf,tl=Object.prototype.hasOwnProperty,Ee=(e,r)=>function(){return e&&(r=(0,e[Xr(e)[0]])(e=0)),r},I=(e,r)=>function(){return r||(0,e[Xr(e)[0]])((r={exports:{}}).exports,r),r.exports},ps=(e,r)=>{for(var u in r)Je(e,u,{get:r[u],enumerable:!0})},fs=(e,r,u,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let D of Xr(r))!tl.call(e,D)&&D!==u&&Je(e,D,{get:()=>r[D],enumerable:!(n=rl(r,D))||n.enumerable});return e},nl=(e,r,u)=>(u=e!=null?el(ul(e)):{},fs(r||!e||!e.__esModule?Je(u,"default",{value:e,enumerable:!0}):u,e)),ds=e=>fs(Je({},"__esModule",{value:!0}),e),Te,q=Ee({"<define:process>"(){Te={env:{},argv:[]}}}),Es=I({"node_modules/angular-html-parser/lib/compiler/src/chars.js"(e){"use strict";q(),Object.defineProperty(e,"__esModule",{value:!0}),e.$EOF=0,e.$BSPACE=8,e.$TAB=9,e.$LF=10,e.$VTAB=11,e.$FF=12,e.$CR=13,e.$SPACE=32,e.$BANG=33,e.$DQ=34,e.$HASH=35,e.$$=36,e.$PERCENT=37,e.$AMPERSAND=38,e.$SQ=39,e.$LPAREN=40,e.$RPAREN=41,e.$STAR=42,e.$PLUS=43,e.$COMMA=44,e.$MINUS=45,e.$PERIOD=46,e.$SLASH=47,e.$COLON=58,e.$SEMICOLON=59,e.$LT=60,e.$EQ=61,e.$GT=62,e.$QUESTION=63,e.$0=48,e.$7=55,e.$9=57,e.$A=65,e.$E=69,e.$F=70,e.$X=88,e.$Z=90,e.$LBRACKET=91,e.$BACKSLASH=92,e.$RBRACKET=93,e.$CARET=94,e.$_=95,e.$a=97,e.$b=98,e.$e=101,e.$f=102,e.$n=110,e.$r=114,e.$t=116,e.$u=117,e.$v=118,e.$x=120,e.$z=122,e.$LBRACE=123,e.$BAR=124,e.$RBRACE=125,e.$NBSP=160,e.$PIPE=124,e.$TILDA=126,e.$AT=64,e.$BT=96;function r(f){return f>=e.$TAB&&f<=e.$SPACE||f==e.$NBSP}e.isWhitespace=r;function u(f){return e.$0<=f&&f<=e.$9}e.isDigit=u;function n(f){return f>=e.$a&&f<=e.$z||f>=e.$A&&f<=e.$Z}e.isAsciiLetter=n;function D(f){return f>=e.$a&&f<=e.$f||f>=e.$A&&f<=e.$F||u(f)}e.isAsciiHexDigit=D;function s(f){return f===e.$LF||f===e.$CR}e.isNewLine=s;function i(f){return e.$0<=f&&f<=e.$7}e.isOctalDigit=i}}),sl=I({"node_modules/angular-html-parser/lib/compiler/src/aot/static_symbol.js"(e){"use strict";q(),Object.defineProperty(e,"__esModule",{value:!0});var r=class{constructor(n,D,s){this.filePath=n,this.name=D,this.members=s}assertNoMembers(){if(this.members.length)throw new Error(`Illegal state: symbol without members expected, but got ${JSON.stringify(this)}.`)}};e.StaticSymbol=r;var u=class{constructor(){this.cache=new Map}get(n,D,s){s=s||[];let i=s.length?`.${s.join(".")}`:"",f=`"${n}".${D}${i}`,c=this.cache.get(f);return c||(c=new r(n,D,s),this.cache.set(f,c)),c}};e.StaticSymbolCache=u}}),il=I({"node_modules/angular-html-parser/lib/compiler/src/util.js"(e){"use strict";q(),Object.defineProperty(e,"__esModule",{value:!0});var r=/-+([a-z0-9])/g;function u(o){return o.replace(r,function(){for(var E=arguments.length,p=new Array(E),A=0;A<E;A++)p[A]=arguments[A];return p[1].toUpperCase()})}e.dashCaseToCamelCase=u;function n(o,E){return s(o,":",E)}e.splitAtColon=n;function D(o,E){return s(o,".",E)}e.splitAtPeriod=D;function s(o,E,p){let A=o.indexOf(E);return A==-1?p:[o.slice(0,A).trim(),o.slice(A+1).trim()]}function i(o,E,p){return Array.isArray(o)?E.visitArray(o,p):g(o)?E.visitStringMap(o,p):o==null||typeof o=="string"||typeof o=="number"||typeof o=="boolean"?E.visitPrimitive(o,p):E.visitOther(o,p)}e.visitValue=i;function f(o){return o!=null}e.isDefined=f;function c(o){return o===void 0?null:o}e.noUndefined=c;var F=class{visitArray(o,E){return o.map(p=>i(p,this,E))}visitStringMap(o,E){let p={};return Object.keys(o).forEach(A=>{p[A]=i(o[A],this,E)}),p}visitPrimitive(o,E){return o}visitOther(o,E){return o}};e.ValueTransformer=F,e.SyncAsync={assertSync:o=>{if(_(o))throw new Error("Illegal state: value cannot be a promise");return o},then:(o,E)=>_(o)?o.then(E):E(o),all:o=>o.some(_)?Promise.all(o):o};function a(o){throw new Error(`Internal Error: ${o}`)}e.error=a;function l(o,E){let p=Error(o);return p[h]=!0,E&&(p[C]=E),p}e.syntaxError=l;var h="ngSyntaxError",C="ngParseErrors";function d(o){return o[h]}e.isSyntaxError=d;function m(o){return o[C]||[]}e.getParseErrors=m;function T(o){return o.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}e.escapeRegExp=T;var w=Object.getPrototypeOf({});function g(o){return typeof o=="object"&&o!==null&&Object.getPrototypeOf(o)===w}function N(o){let E="";for(let p=0;p<o.length;p++){let A=o.charCodeAt(p);if(A>=55296&&A<=56319&&o.length>p+1){let P=o.charCodeAt(p+1);P>=56320&&P<=57343&&(p++,A=(A-55296<<10)+P-56320+65536)}A<=127?E+=String.fromCharCode(A):A<=2047?E+=String.fromCharCode(A>>6&31|192,A&63|128):A<=65535?E+=String.fromCharCode(A>>12|224,A>>6&63|128,A&63|128):A<=2097151&&(E+=String.fromCharCode(A>>18&7|240,A>>12&63|128,A>>6&63|128,A&63|128))}return E}e.utf8Encode=N;function R(o){if(typeof o=="string")return o;if(o instanceof Array)return"["+o.map(R).join(", ")+"]";if(o==null)return""+o;if(o.overriddenName)return`${o.overriddenName}`;if(o.name)return`${o.name}`;if(!o.toString)return"object";let E=o.toString();if(E==null)return""+E;let p=E.indexOf(`
39834
39834
  `);return p===-1?E:E.substring(0,p)}e.stringify=R;function j(o){return typeof o=="function"&&o.hasOwnProperty("__forward_ref__")?o():o}e.resolveForwardRef=j;function _(o){return!!o&&typeof o.then=="function"}e.isPromise=_;var O=class{constructor(o){this.full=o;let E=o.split(".");this.major=E[0],this.minor=E[1],this.patch=E.slice(2).join(".")}};e.Version=O;var x=typeof window<"u"&&window,k=typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self,$=typeof globalThis<"u"&&globalThis,t=$||x||k;e.global=t}}),al=I({"node_modules/angular-html-parser/lib/compiler/src/compile_metadata.js"(e){"use strict";q(),Object.defineProperty(e,"__esModule",{value:!0});var r=sl(),u=il(),n=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function D(p){return p.replace(/\W/g,"_")}e.sanitizeIdentifier=D;var s=0;function i(p){if(!p||!p.reference)return null;let A=p.reference;if(A instanceof r.StaticSymbol)return A.name;if(A.__anonymousType)return A.__anonymousType;let P=u.stringify(A);return P.indexOf("(")>=0?(P=`anonymous_${s++}`,A.__anonymousType=P):P=D(P),P}e.identifierName=i;function f(p){let A=p.reference;return A instanceof r.StaticSymbol?A.filePath:`./${u.stringify(A)}`}e.identifierModuleUrl=f;function c(p,A){return`View_${i({reference:p})}_${A}`}e.viewClassName=c;function F(p){return`RenderType_${i({reference:p})}`}e.rendererTypeName=F;function a(p){return`HostView_${i({reference:p})}`}e.hostViewClassName=a;function l(p){return`${i({reference:p})}NgFactory`}e.componentFactoryName=l;var h;(function(p){p[p.Pipe=0]="Pipe",p[p.Directive=1]="Directive",p[p.NgModule=2]="NgModule",p[p.Injectable=3]="Injectable"})(h=e.CompileSummaryKind||(e.CompileSummaryKind={}));function C(p){return p.value!=null?D(p.value):i(p.identifier)}e.tokenName=C;function d(p){return p.identifier!=null?p.identifier.reference:p.value}e.tokenReference=d;var m=class{constructor(){let{moduleUrl:p,styles:A,styleUrls:P}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.moduleUrl=p||null,this.styles=_(A),this.styleUrls=_(P)}};e.CompileStylesheetMetadata=m;var T=class{constructor(p){let{encapsulation:A,template:P,templateUrl:M,htmlAst:z,styles:V,styleUrls:X,externalStylesheets:H,animations:Q,ngContentSelectors:K,interpolation:J,isInline:v,preserveWhitespaces:y}=p;if(this.encapsulation=A,this.template=P,this.templateUrl=M,this.htmlAst=z,this.styles=_(V),this.styleUrls=_(X),this.externalStylesheets=_(H),this.animations=Q?x(Q):[],this.ngContentSelectors=K||[],J&&J.length!=2)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=J,this.isInline=v,this.preserveWhitespaces=y}toSummary(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}}};e.CompileTemplateMetadata=T;var w=class{static create(p){let{isHost:A,type:P,isComponent:M,selector:z,exportAs:V,changeDetection:X,inputs:H,outputs:Q,host:K,providers:J,viewProviders:v,queries:y,guards:B,viewQueries:b,entryComponents:L,template:U,componentViewType:G,rendererType:W,componentFactory:ne}=p,be={},we={},Wr={};K!=null&&Object.keys(K).forEach(Z=>{let ie=K[Z],Ce=Z.match(n);Ce===null?Wr[Z]=ie:Ce[1]!=null?we[Ce[1]]=ie:Ce[2]!=null&&(be[Ce[2]]=ie)});let Yr={};H!=null&&H.forEach(Z=>{let ie=u.splitAtColon(Z,[Z,Z]);Yr[ie[0]]=ie[1]});let Qr={};return Q!=null&&Q.forEach(Z=>{let ie=u.splitAtColon(Z,[Z,Z]);Qr[ie[0]]=ie[1]}),new w({isHost:A,type:P,isComponent:!!M,selector:z,exportAs:V,changeDetection:X,inputs:Yr,outputs:Qr,hostListeners:be,hostProperties:we,hostAttributes:Wr,providers:J,viewProviders:v,queries:y,guards:B,viewQueries:b,entryComponents:L,template:U,componentViewType:G,rendererType:W,componentFactory:ne})}constructor(p){let{isHost:A,type:P,isComponent:M,selector:z,exportAs:V,changeDetection:X,inputs:H,outputs:Q,hostListeners:K,hostProperties:J,hostAttributes:v,providers:y,viewProviders:B,queries:b,guards:L,viewQueries:U,entryComponents:G,template:W,componentViewType:ne,rendererType:be,componentFactory:we}=p;this.isHost=!!A,this.type=P,this.isComponent=M,this.selector=z,this.exportAs=V,this.changeDetection=X,this.inputs=H,this.outputs=Q,this.hostListeners=K,this.hostProperties=J,this.hostAttributes=v,this.providers=_(y),this.viewProviders=_(B),this.queries=_(b),this.guards=L,this.viewQueries=_(U),this.entryComponents=_(G),this.template=W,this.componentViewType=ne,this.rendererType=be,this.componentFactory=we}toSummary(){return{summaryKind:h.Directive,type:this.type,isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,providers:this.providers,viewProviders:this.viewProviders,queries:this.queries,guards:this.guards,viewQueries:this.viewQueries,entryComponents:this.entryComponents,changeDetection:this.changeDetection,template:this.template&&this.template.toSummary(),componentViewType:this.componentViewType,rendererType:this.rendererType,componentFactory:this.componentFactory}}};e.CompileDirectiveMetadata=w;var g=class{constructor(p){let{type:A,name:P,pure:M}=p;this.type=A,this.name=P,this.pure=!!M}toSummary(){return{summaryKind:h.Pipe,type:this.type,name:this.name,pure:this.pure}}};e.CompilePipeMetadata=g;var N=class{};e.CompileShallowModuleMetadata=N;var R=class{constructor(p){let{type:A,providers:P,declaredDirectives:M,exportedDirectives:z,declaredPipes:V,exportedPipes:X,entryComponents:H,bootstrapComponents:Q,importedModules:K,exportedModules:J,schemas:v,transitiveModule:y,id:B}=p;this.type=A||null,this.declaredDirectives=_(M),this.exportedDirectives=_(z),this.declaredPipes=_(V),this.exportedPipes=_(X),this.providers=_(P),this.entryComponents=_(H),this.bootstrapComponents=_(Q),this.importedModules=_(K),this.exportedModules=_(J),this.schemas=_(v),this.id=B||null,this.transitiveModule=y||null}toSummary(){let p=this.transitiveModule;return{summaryKind:h.NgModule,type:this.type,entryComponents:p.entryComponents,providers:p.providers,modules:p.modules,exportedDirectives:p.exportedDirectives,exportedPipes:p.exportedPipes}}};e.CompileNgModuleMetadata=R;var j=class{constructor(){this.directivesSet=new Set,this.directives=[],this.exportedDirectivesSet=new Set,this.exportedDirectives=[],this.pipesSet=new Set,this.pipes=[],this.exportedPipesSet=new Set,this.exportedPipes=[],this.modulesSet=new Set,this.modules=[],this.entryComponentsSet=new Set,this.entryComponents=[],this.providers=[]}addProvider(p,A){this.providers.push({provider:p,module:A})}addDirective(p){this.directivesSet.has(p.reference)||(this.directivesSet.add(p.reference),this.directives.push(p))}addExportedDirective(p){this.exportedDirectivesSet.has(p.reference)||(this.exportedDirectivesSet.add(p.reference),this.exportedDirectives.push(p))}addPipe(p){this.pipesSet.has(p.reference)||(this.pipesSet.add(p.reference),this.pipes.push(p))}addExportedPipe(p){this.exportedPipesSet.has(p.reference)||(this.exportedPipesSet.add(p.reference),this.exportedPipes.push(p))}addModule(p){this.modulesSet.has(p.reference)||(this.modulesSet.add(p.reference),this.modules.push(p))}addEntryComponent(p){this.entryComponentsSet.has(p.componentType)||(this.entryComponentsSet.add(p.componentType),this.entryComponents.push(p))}};e.TransitiveCompileNgModuleMetadata=j;function _(p){return p||[]}var O=class{constructor(p,A){let{useClass:P,useValue:M,useExisting:z,useFactory:V,deps:X,multi:H}=A;this.token=p,this.useClass=P||null,this.useValue=M,this.useExisting=z,this.useFactory=V||null,this.dependencies=X||null,this.multi=!!H}};e.ProviderMeta=O;function x(p){return p.reduce((A,P)=>{let M=Array.isArray(P)?x(P):P;return A.concat(M)},[])}e.flatten=x;function k(p){return p.replace(/(\w+:\/\/[\w:-]+)?(\/+)?/,"ng:///")}function $(p,A,P){let M;return P.isInline?A.type.reference instanceof r.StaticSymbol?M=`${A.type.reference.filePath}.${A.type.reference.name}.html`:M=`${i(p)}/${i(A.type)}.html`:M=P.templateUrl,A.type.reference instanceof r.StaticSymbol?M:k(M)}e.templateSourceUrl=$;function t(p,A){let P=p.moduleUrl.split(/\/\\/g),M=P[P.length-1];return k(`css/${A}${M}.ngstyle.js`)}e.sharedStylesheetJitUrl=t;function o(p){return k(`${i(p.type)}/module.ngfactory.js`)}e.ngModuleJitUrl=o;function E(p,A){return k(`${i(p)}/${i(A.type)}.ngfactory.js`)}e.templateJitUrl=E}}),Be=I({"node_modules/angular-html-parser/lib/compiler/src/parse_util.js"(e){"use strict";q(),Object.defineProperty(e,"__esModule",{value:!0});var r=Es(),u=al(),n=class{constructor(a,l,h,C){this.file=a,this.offset=l,this.line=h,this.col=C}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(a){let l=this.file.content,h=l.length,C=this.offset,d=this.line,m=this.col;for(;C>0&&a<0;)if(C--,a++,l.charCodeAt(C)==r.$LF){d--;let w=l.substr(0,C-1).lastIndexOf(String.fromCharCode(r.$LF));m=w>0?C-w:C}else m--;for(;C<h&&a>0;){let T=l.charCodeAt(C);C++,a--,T==r.$LF?(d++,m=0):m++}return new n(this.file,C,d,m)}getContext(a,l){let h=this.file.content,C=this.offset;if(C!=null){C>h.length-1&&(C=h.length-1);let d=C,m=0,T=0;for(;m<a&&C>0&&(C--,m++,!(h[C]==`
39835
39835
  `&&++T==l)););for(m=0,T=0;m<a&&d<h.length-1&&(d++,m++,!(h[d]==`
39836
- `&&++T==l)););return{before:h.substring(C,this.offset),after:h.substring(this.offset,d+1)}}return null}};e.ParseLocation=n;var D=class{constructor(a,l){this.content=a,this.url=l}};e.ParseSourceFile=D;var s=class{constructor(a,l){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this.start=a,this.end=l,this.details=h}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}};e.ParseSourceSpan=s,e.EMPTY_PARSE_LOCATION=new n(new D("",""),0,0,0),e.EMPTY_SOURCE_SPAN=new s(e.EMPTY_PARSE_LOCATION,e.EMPTY_PARSE_LOCATION);var i;(function(a){a[a.WARNING=0]="WARNING",a[a.ERROR=1]="ERROR"})(i=e.ParseErrorLevel||(e.ParseErrorLevel={}));var f=class{constructor(a,l){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:i.ERROR;this.span=a,this.msg=l,this.level=h}contextualMessage(){let a=this.span.start.getContext(100,3);return a?`${this.msg} ("${a.before}[${i[this.level]} ->]${a.after}")`:this.msg}toString(){let a=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${a}`}};e.ParseError=f;function c(a,l){let h=u.identifierModuleUrl(l),C=h!=null?`in ${a} ${u.identifierName(l)} in ${h}`:`in ${a} ${u.identifierName(l)}`,d=new D("",C);return new s(new n(d,-1,-1,-1),new n(d,-1,-1,-1))}e.typeSourceSpan=c;function F(a,l,h){let C=`in ${a} ${l} in ${h}`,d=new D("",C);return new s(new n(d,-1,-1,-1),new n(d,-1,-1,-1))}e.r3JitTypeSourceSpan=F}}),ol=I({"src/utils/front-matter/parse.js"(e,r){"use strict";q();var u=new RegExp("^(?<startDelimiter>-{3}|\\+{3})(?<language>[^\\n]*)\\n(?:|(?<value>.*?)\\n)(?<endDelimiter>\\k<startDelimiter>|\\.{3})[^\\S\\n]*(?:\\n|$)","s");function n(D){let s=D.match(u);if(!s)return{content:D};let{startDelimiter:i,language:f,value:c="",endDelimiter:F}=s.groups,a=f.trim()||"yaml";if(i==="+++"&&(a="toml"),a!=="yaml"&&i!==F)return{content:D};let[l]=s;return{frontMatter:{type:"front-matter",lang:a,value:c,startDelimiter:i,endDelimiter:F,raw:l.replace(/\n$/,"")},content:l.replace(/[^\n]/g," ")+D.slice(l.length)}}r.exports=n}}),Cs=I({"src/utils/get-last.js"(e,r){"use strict";q();var u=n=>n[n.length-1];r.exports=u}}),Dl=I({"src/common/parser-create-error.js"(e,r){"use strict";q();function u(n,D){let s=new SyntaxError(n+" ("+D.start.line+":"+D.start.column+")");return s.loc=D,s}r.exports=u}}),ms={};ps(ms,{default:()=>ll});function ll(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var cl=Ee({"node_modules/escape-string-regexp/index.js"(){q()}}),gs=I({"node_modules/semver/internal/debug.js"(e,r){q();var u=typeof Te=="object"&&Te.env&&Te.env.NODE_DEBUG&&/\bsemver\b/i.test(Te.env.NODE_DEBUG)?function(){for(var n=arguments.length,D=new Array(n),s=0;s<n;s++)D[s]=arguments[s];return console.error("SEMVER",...D)}:()=>{};r.exports=u}}),Fs=I({"node_modules/semver/internal/constants.js"(e,r){q();var u="2.0.0",n=256,D=Number.MAX_SAFE_INTEGER||9007199254740991,s=16;r.exports={SEMVER_SPEC_VERSION:u,MAX_LENGTH:n,MAX_SAFE_INTEGER:D,MAX_SAFE_COMPONENT_LENGTH:s}}}),hl=I({"node_modules/semver/internal/re.js"(e,r){q();var{MAX_SAFE_COMPONENT_LENGTH:u}=Fs(),n=gs();e=r.exports={};var D=e.re=[],s=e.src=[],i=e.t={},f=0,c=(F,a,l)=>{let h=f++;n(F,h,a),i[F]=h,s[h]=a,D[h]=new RegExp(a,l?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${s[i.NUMERICIDENTIFIER]})\\.(${s[i.NUMERICIDENTIFIER]})\\.(${s[i.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${s[i.NUMERICIDENTIFIERLOOSE]})\\.(${s[i.NUMERICIDENTIFIERLOOSE]})\\.(${s[i.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${s[i.NUMERICIDENTIFIER]}|${s[i.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${s[i.NUMERICIDENTIFIERLOOSE]}|${s[i.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${s[i.PRERELEASEIDENTIFIER]}(?:\\.${s[i.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${s[i.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[i.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${s[i.BUILDIDENTIFIER]}(?:\\.${s[i.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${s[i.MAINVERSION]}${s[i.PRERELEASE]}?${s[i.BUILD]}?`),c("FULL",`^${s[i.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${s[i.MAINVERSIONLOOSE]}${s[i.PRERELEASELOOSE]}?${s[i.BUILD]}?`),c("LOOSE",`^${s[i.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${s[i.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${s[i.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${s[i.XRANGEIDENTIFIER]})(?:\\.(${s[i.XRANGEIDENTIFIER]})(?:\\.(${s[i.XRANGEIDENTIFIER]})(?:${s[i.PRERELEASE]})?${s[i.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${s[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[i.XRANGEIDENTIFIERLOOSE]})(?:${s[i.PRERELEASELOOSE]})?${s[i.BUILD]}?)?)?`),c("XRANGE",`^${s[i.GTLT]}\\s*${s[i.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${s[i.GTLT]}\\s*${s[i.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${u}})(?:\\.(\\d{1,${u}}))?(?:\\.(\\d{1,${u}}))?(?:$|[^\\d])`),c("COERCERTL",s[i.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${s[i.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",c("TILDE",`^${s[i.LONETILDE]}${s[i.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${s[i.LONETILDE]}${s[i.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${s[i.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",c("CARET",`^${s[i.LONECARET]}${s[i.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${s[i.LONECARET]}${s[i.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${s[i.GTLT]}\\s*(${s[i.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${s[i.GTLT]}\\s*(${s[i.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${s[i.GTLT]}\\s*(${s[i.LOOSEPLAIN]}|${s[i.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${s[i.XRANGEPLAIN]})\\s+-\\s+(${s[i.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${s[i.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[i.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}}),pl=I({"node_modules/semver/internal/parse-options.js"(e,r){q();var u=["includePrerelease","loose","rtl"],n=D=>D?typeof D!="object"?{loose:!0}:u.filter(s=>D[s]).reduce((s,i)=>(s[i]=!0,s),{}):{};r.exports=n}}),fl=I({"node_modules/semver/internal/identifiers.js"(e,r){q();var u=/^[0-9]+$/,n=(s,i)=>{let f=u.test(s),c=u.test(i);return f&&c&&(s=+s,i=+i),s===i?0:f&&!c?-1:c&&!f?1:s<i?-1:1},D=(s,i)=>n(i,s);r.exports={compareIdentifiers:n,rcompareIdentifiers:D}}}),dl=I({"node_modules/semver/classes/semver.js"(e,r){q();var u=gs(),{MAX_LENGTH:n,MAX_SAFE_INTEGER:D}=Fs(),{re:s,t:i}=hl(),f=pl(),{compareIdentifiers:c}=fl(),F=class{constructor(a,l){if(l=f(l),a instanceof F){if(a.loose===!!l.loose&&a.includePrerelease===!!l.includePrerelease)return a;a=a.version}else if(typeof a!="string")throw new TypeError(`Invalid Version: ${a}`);if(a.length>n)throw new TypeError(`version is longer than ${n} characters`);u("SemVer",a,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;let h=a.trim().match(l.loose?s[i.LOOSE]:s[i.FULL]);if(!h)throw new TypeError(`Invalid Version: ${a}`);if(this.raw=a,this.major=+h[1],this.minor=+h[2],this.patch=+h[3],this.major>D||this.major<0)throw new TypeError("Invalid major version");if(this.minor>D||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>D||this.patch<0)throw new TypeError("Invalid patch version");h[4]?this.prerelease=h[4].split(".").map(C=>{if(/^[0-9]+$/.test(C)){let d=+C;if(d>=0&&d<D)return d}return C}):this.prerelease=[],this.build=h[5]?h[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(a){if(u("SemVer.compare",this.version,this.options,a),!(a instanceof F)){if(typeof a=="string"&&a===this.version)return 0;a=new F(a,this.options)}return a.version===this.version?0:this.compareMain(a)||this.comparePre(a)}compareMain(a){return a instanceof F||(a=new F(a,this.options)),c(this.major,a.major)||c(this.minor,a.minor)||c(this.patch,a.patch)}comparePre(a){if(a instanceof F||(a=new F(a,this.options)),this.prerelease.length&&!a.prerelease.length)return-1;if(!this.prerelease.length&&a.prerelease.length)return 1;if(!this.prerelease.length&&!a.prerelease.length)return 0;let l=0;do{let h=this.prerelease[l],C=a.prerelease[l];if(u("prerelease compare",l,h,C),h===void 0&&C===void 0)return 0;if(C===void 0)return 1;if(h===void 0)return-1;if(h===C)continue;return c(h,C)}while(++l)}compareBuild(a){a instanceof F||(a=new F(a,this.options));let l=0;do{let h=this.build[l],C=a.build[l];if(u("prerelease compare",l,h,C),h===void 0&&C===void 0)return 0;if(C===void 0)return 1;if(h===void 0)return-1;if(h===C)continue;return c(h,C)}while(++l)}inc(a,l){switch(a){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",l);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",l);break;case"prepatch":this.prerelease.length=0,this.inc("patch",l),this.inc("pre",l);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",l),this.inc("pre",l);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let h=this.prerelease.length;for(;--h>=0;)typeof this.prerelease[h]=="number"&&(this.prerelease[h]++,h=-2);h===-1&&this.prerelease.push(0)}l&&(c(this.prerelease[0],l)===0?isNaN(this.prerelease[1])&&(this.prerelease=[l,0]):this.prerelease=[l,0]);break;default:throw new Error(`invalid increment argument: ${a}`)}return this.format(),this.raw=this.version,this}};r.exports=F}}),Hr=I({"node_modules/semver/functions/compare.js"(e,r){q();var u=dl(),n=(D,s,i)=>new u(D,i).compare(new u(s,i));r.exports=n}}),El=I({"node_modules/semver/functions/lt.js"(e,r){q();var u=Hr(),n=(D,s,i)=>u(D,s,i)<0;r.exports=n}}),Cl=I({"node_modules/semver/functions/gte.js"(e,r){q();var u=Hr(),n=(D,s,i)=>u(D,s,i)>=0;r.exports=n}}),ml=I({"src/utils/arrayify.js"(e,r){"use strict";q(),r.exports=(u,n)=>Object.entries(u).map(D=>{let[s,i]=D;return Object.assign({[n]:s},i)})}}),gl=I({"package.json"(e,r){r.exports={version:"2.8.7"}}}),Fl=I({"node_modules/outdent/lib/index.js"(e,r){"use strict";q(),Object.defineProperty(e,"__esModule",{value:!0}),e.outdent=void 0;function u(){for(var g=[],N=0;N<arguments.length;N++)g[N]=arguments[N]}function n(){return typeof WeakMap<"u"?new WeakMap:D()}function D(){return{add:u,delete:u,get:u,set:u,has:function(g){return!1}}}var s=Object.prototype.hasOwnProperty,i=function(g,N){return s.call(g,N)};function f(g,N){for(var R in N)i(N,R)&&(g[R]=N[R]);return g}var c=/^[ \t]*(?:\r\n|\r|\n)/,F=/(?:\r\n|\r|\n)[ \t]*$/,a=/^(?:[\r\n]|$)/,l=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,h=/^[ \t]*[\r\n][ \t\r\n]*$/;function C(g,N,R){var j=0,_=g[0].match(l);_&&(j=_[1].length);var O="(\\r\\n|\\r|\\n).{0,"+j+"}",x=new RegExp(O,"g");N&&(g=g.slice(1));var k=R.newline,$=R.trimLeadingNewline,t=R.trimTrailingNewline,o=typeof k=="string",E=g.length,p=g.map(function(A,P){return A=A.replace(x,"$1"),P===0&&$&&(A=A.replace(c,"")),P===E-1&&t&&(A=A.replace(F,"")),o&&(A=A.replace(/\r\n|\n|\r/g,function(M){return k})),A});return p}function d(g,N){for(var R="",j=0,_=g.length;j<_;j++)R+=g[j],j<_-1&&(R+=N[j]);return R}function m(g){return i(g,"raw")&&i(g,"length")}function T(g){var N=n(),R=n();function j(O){for(var x=[],k=1;k<arguments.length;k++)x[k-1]=arguments[k];if(m(O)){var $=O,t=(x[0]===j||x[0]===w)&&h.test($[0])&&a.test($[1]),o=t?R:N,E=o.get($);if(E||(E=C($,t,g),o.set($,E)),x.length===0)return E[0];var p=d(E,t?x.slice(1):x);return p}else return T(f(f({},g),O||{}))}var _=f(j,{string:function(O){return C([O],!1,g)[0]}});return _}var w=T({trimLeadingNewline:!0,trimTrailingNewline:!0});if(e.outdent=w,e.default=w,typeof r<"u")try{r.exports=w,Object.defineProperty(w,"__esModule",{value:!0}),w.default=w,w.outdent=w}catch{}}}),Al=I({"src/main/core-options.js"(e,r){"use strict";q();var{outdent:u}=Fl(),n="Config",D="Editor",s="Format",i="Other",f="Output",c="Global",F="Special",a={cursorOffset:{since:"1.4.0",category:F,type:"int",default:-1,range:{start:-1,end:Number.POSITIVE_INFINITY,step:1},description:u`
39836
+ `&&++T==l)););return{before:h.substring(C,this.offset),after:h.substring(this.offset,d+1)}}return null}};e.ParseLocation=n;var D=class{constructor(a,l){this.content=a,this.url=l}};e.ParseSourceFile=D;var s=class{constructor(a,l){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;this.start=a,this.end=l,this.details=h}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}};e.ParseSourceSpan=s,e.EMPTY_PARSE_LOCATION=new n(new D("",""),0,0,0),e.EMPTY_SOURCE_SPAN=new s(e.EMPTY_PARSE_LOCATION,e.EMPTY_PARSE_LOCATION);var i;(function(a){a[a.WARNING=0]="WARNING",a[a.ERROR=1]="ERROR"})(i=e.ParseErrorLevel||(e.ParseErrorLevel={}));var f=class{constructor(a,l){let h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:i.ERROR;this.span=a,this.msg=l,this.level=h}contextualMessage(){let a=this.span.start.getContext(100,3);return a?`${this.msg} ("${a.before}[${i[this.level]} ->]${a.after}")`:this.msg}toString(){let a=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${a}`}};e.ParseError=f;function c(a,l){let h=u.identifierModuleUrl(l),C=h!=null?`in ${a} ${u.identifierName(l)} in ${h}`:`in ${a} ${u.identifierName(l)}`,d=new D("",C);return new s(new n(d,-1,-1,-1),new n(d,-1,-1,-1))}e.typeSourceSpan=c;function F(a,l,h){let C=`in ${a} ${l} in ${h}`,d=new D("",C);return new s(new n(d,-1,-1,-1),new n(d,-1,-1,-1))}e.r3JitTypeSourceSpan=F}}),ol=I({"src/utils/front-matter/parse.js"(e,r){"use strict";q();var u=new RegExp("^(?<startDelimiter>-{3}|\\+{3})(?<language>[^\\n]*)\\n(?:|(?<value>.*?)\\n)(?<endDelimiter>\\k<startDelimiter>|\\.{3})[^\\S\\n]*(?:\\n|$)","s");function n(D){let s=D.match(u);if(!s)return{content:D};let{startDelimiter:i,language:f,value:c="",endDelimiter:F}=s.groups,a=f.trim()||"yaml";if(i==="+++"&&(a="toml"),a!=="yaml"&&i!==F)return{content:D};let[l]=s;return{frontMatter:{type:"front-matter",lang:a,value:c,startDelimiter:i,endDelimiter:F,raw:l.replace(/\n$/,"")},content:l.replace(/[^\n]/g," ")+D.slice(l.length)}}r.exports=n}}),Cs=I({"src/utils/get-last.js"(e,r){"use strict";q();var u=n=>n[n.length-1];r.exports=u}}),Dl=I({"src/common/parser-create-error.js"(e,r){"use strict";q();function u(n,D){let s=new SyntaxError(n+" ("+D.start.line+":"+D.start.column+")");return s.loc=D,s}r.exports=u}}),ms={};ps(ms,{default:()=>ll});function ll(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var cl=Ee({"node_modules/escape-string-regexp/index.js"(){q()}}),gs=I({"node_modules/semver/internal/debug.js"(e,r){q();var u=typeof Te=="object"&&Te.env&&Te.env.NODE_DEBUG&&/\bsemver\b/i.test(Te.env.NODE_DEBUG)?function(){for(var n=arguments.length,D=new Array(n),s=0;s<n;s++)D[s]=arguments[s];return console.error("SEMVER",...D)}:()=>{};r.exports=u}}),Fs=I({"node_modules/semver/internal/constants.js"(e,r){q();var u="2.0.0",n=256,D=Number.MAX_SAFE_INTEGER||9007199254740991,s=16;r.exports={SEMVER_SPEC_VERSION:u,MAX_LENGTH:n,MAX_SAFE_INTEGER:D,MAX_SAFE_COMPONENT_LENGTH:s}}}),hl=I({"node_modules/semver/internal/re.js"(e,r){q();var{MAX_SAFE_COMPONENT_LENGTH:u}=Fs(),n=gs();e=r.exports={};var D=e.re=[],s=e.src=[],i=e.t={},f=0,c=(F,a,l)=>{let h=f++;n(F,h,a),i[F]=h,s[h]=a,D[h]=new RegExp(a,l?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${s[i.NUMERICIDENTIFIER]})\\.(${s[i.NUMERICIDENTIFIER]})\\.(${s[i.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${s[i.NUMERICIDENTIFIERLOOSE]})\\.(${s[i.NUMERICIDENTIFIERLOOSE]})\\.(${s[i.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${s[i.NUMERICIDENTIFIER]}|${s[i.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${s[i.NUMERICIDENTIFIERLOOSE]}|${s[i.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${s[i.PRERELEASEIDENTIFIER]}(?:\\.${s[i.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${s[i.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[i.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${s[i.BUILDIDENTIFIER]}(?:\\.${s[i.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${s[i.MAINVERSION]}${s[i.PRERELEASE]}?${s[i.BUILD]}?`),c("FULL",`^${s[i.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${s[i.MAINVERSIONLOOSE]}${s[i.PRERELEASELOOSE]}?${s[i.BUILD]}?`),c("LOOSE",`^${s[i.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${s[i.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${s[i.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${s[i.XRANGEIDENTIFIER]})(?:\\.(${s[i.XRANGEIDENTIFIER]})(?:\\.(${s[i.XRANGEIDENTIFIER]})(?:${s[i.PRERELEASE]})?${s[i.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${s[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[i.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[i.XRANGEIDENTIFIERLOOSE]})(?:${s[i.PRERELEASELOOSE]})?${s[i.BUILD]}?)?)?`),c("XRANGE",`^${s[i.GTLT]}\\s*${s[i.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${s[i.GTLT]}\\s*${s[i.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${u}})(?:\\.(\\d{1,${u}}))?(?:\\.(\\d{1,${u}}))?(?:$|[^\\d])`),c("COERCERTL",s[i.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${s[i.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",c("TILDE",`^${s[i.LONETILDE]}${s[i.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${s[i.LONETILDE]}${s[i.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${s[i.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",c("CARET",`^${s[i.LONECARET]}${s[i.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${s[i.LONECARET]}${s[i.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${s[i.GTLT]}\\s*(${s[i.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${s[i.GTLT]}\\s*(${s[i.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${s[i.GTLT]}\\s*(${s[i.LOOSEPLAIN]}|${s[i.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${s[i.XRANGEPLAIN]})\\s+-\\s+(${s[i.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${s[i.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[i.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}}),pl=I({"node_modules/semver/internal/parse-options.js"(e,r){q();var u=["includePrerelease","loose","rtl"],n=D=>D?typeof D!="object"?{loose:!0}:u.filter(s=>D[s]).reduce((s,i)=>(s[i]=!0,s),{}):{};r.exports=n}}),fl=I({"node_modules/semver/internal/identifiers.js"(e,r){q();var u=/^[0-9]+$/,n=(s,i)=>{let f=u.test(s),c=u.test(i);return f&&c&&(s=+s,i=+i),s===i?0:f&&!c?-1:c&&!f?1:s<i?-1:1},D=(s,i)=>n(i,s);r.exports={compareIdentifiers:n,rcompareIdentifiers:D}}}),dl=I({"node_modules/semver/classes/semver.js"(e,r){q();var u=gs(),{MAX_LENGTH:n,MAX_SAFE_INTEGER:D}=Fs(),{re:s,t:i}=hl(),f=pl(),{compareIdentifiers:c}=fl(),F=class{constructor(a,l){if(l=f(l),a instanceof F){if(a.loose===!!l.loose&&a.includePrerelease===!!l.includePrerelease)return a;a=a.version}else if(typeof a!="string")throw new TypeError(`Invalid Version: ${a}`);if(a.length>n)throw new TypeError(`version is longer than ${n} characters`);u("SemVer",a,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;let h=a.trim().match(l.loose?s[i.LOOSE]:s[i.FULL]);if(!h)throw new TypeError(`Invalid Version: ${a}`);if(this.raw=a,this.major=+h[1],this.minor=+h[2],this.patch=+h[3],this.major>D||this.major<0)throw new TypeError("Invalid major version");if(this.minor>D||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>D||this.patch<0)throw new TypeError("Invalid patch version");h[4]?this.prerelease=h[4].split(".").map(C=>{if(/^[0-9]+$/.test(C)){let d=+C;if(d>=0&&d<D)return d}return C}):this.prerelease=[],this.build=h[5]?h[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(a){if(u("SemVer.compare",this.version,this.options,a),!(a instanceof F)){if(typeof a=="string"&&a===this.version)return 0;a=new F(a,this.options)}return a.version===this.version?0:this.compareMain(a)||this.comparePre(a)}compareMain(a){return a instanceof F||(a=new F(a,this.options)),c(this.major,a.major)||c(this.minor,a.minor)||c(this.patch,a.patch)}comparePre(a){if(a instanceof F||(a=new F(a,this.options)),this.prerelease.length&&!a.prerelease.length)return-1;if(!this.prerelease.length&&a.prerelease.length)return 1;if(!this.prerelease.length&&!a.prerelease.length)return 0;let l=0;do{let h=this.prerelease[l],C=a.prerelease[l];if(u("prerelease compare",l,h,C),h===void 0&&C===void 0)return 0;if(C===void 0)return 1;if(h===void 0)return-1;if(h===C)continue;return c(h,C)}while(++l)}compareBuild(a){a instanceof F||(a=new F(a,this.options));let l=0;do{let h=this.build[l],C=a.build[l];if(u("prerelease compare",l,h,C),h===void 0&&C===void 0)return 0;if(C===void 0)return 1;if(h===void 0)return-1;if(h===C)continue;return c(h,C)}while(++l)}inc(a,l){switch(a){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",l);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",l);break;case"prepatch":this.prerelease.length=0,this.inc("patch",l),this.inc("pre",l);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",l),this.inc("pre",l);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let h=this.prerelease.length;for(;--h>=0;)typeof this.prerelease[h]=="number"&&(this.prerelease[h]++,h=-2);h===-1&&this.prerelease.push(0)}l&&(c(this.prerelease[0],l)===0?isNaN(this.prerelease[1])&&(this.prerelease=[l,0]):this.prerelease=[l,0]);break;default:throw new Error(`invalid increment argument: ${a}`)}return this.format(),this.raw=this.version,this}};r.exports=F}}),Hr=I({"node_modules/semver/functions/compare.js"(e,r){q();var u=dl(),n=(D,s,i)=>new u(D,i).compare(new u(s,i));r.exports=n}}),El=I({"node_modules/semver/functions/lt.js"(e,r){q();var u=Hr(),n=(D,s,i)=>u(D,s,i)<0;r.exports=n}}),Cl=I({"node_modules/semver/functions/gte.js"(e,r){q();var u=Hr(),n=(D,s,i)=>u(D,s,i)>=0;r.exports=n}}),ml=I({"src/utils/arrayify.js"(e,r){"use strict";q(),r.exports=(u,n)=>Object.entries(u).map(D=>{let[s,i]=D;return Object.assign({[n]:s},i)})}}),gl=I({"package.json"(e,r){r.exports={version:"2.8.8"}}}),Fl=I({"node_modules/outdent/lib/index.js"(e,r){"use strict";q(),Object.defineProperty(e,"__esModule",{value:!0}),e.outdent=void 0;function u(){for(var g=[],N=0;N<arguments.length;N++)g[N]=arguments[N]}function n(){return typeof WeakMap<"u"?new WeakMap:D()}function D(){return{add:u,delete:u,get:u,set:u,has:function(g){return!1}}}var s=Object.prototype.hasOwnProperty,i=function(g,N){return s.call(g,N)};function f(g,N){for(var R in N)i(N,R)&&(g[R]=N[R]);return g}var c=/^[ \t]*(?:\r\n|\r|\n)/,F=/(?:\r\n|\r|\n)[ \t]*$/,a=/^(?:[\r\n]|$)/,l=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,h=/^[ \t]*[\r\n][ \t\r\n]*$/;function C(g,N,R){var j=0,_=g[0].match(l);_&&(j=_[1].length);var O="(\\r\\n|\\r|\\n).{0,"+j+"}",x=new RegExp(O,"g");N&&(g=g.slice(1));var k=R.newline,$=R.trimLeadingNewline,t=R.trimTrailingNewline,o=typeof k=="string",E=g.length,p=g.map(function(A,P){return A=A.replace(x,"$1"),P===0&&$&&(A=A.replace(c,"")),P===E-1&&t&&(A=A.replace(F,"")),o&&(A=A.replace(/\r\n|\n|\r/g,function(M){return k})),A});return p}function d(g,N){for(var R="",j=0,_=g.length;j<_;j++)R+=g[j],j<_-1&&(R+=N[j]);return R}function m(g){return i(g,"raw")&&i(g,"length")}function T(g){var N=n(),R=n();function j(O){for(var x=[],k=1;k<arguments.length;k++)x[k-1]=arguments[k];if(m(O)){var $=O,t=(x[0]===j||x[0]===w)&&h.test($[0])&&a.test($[1]),o=t?R:N,E=o.get($);if(E||(E=C($,t,g),o.set($,E)),x.length===0)return E[0];var p=d(E,t?x.slice(1):x);return p}else return T(f(f({},g),O||{}))}var _=f(j,{string:function(O){return C([O],!1,g)[0]}});return _}var w=T({trimLeadingNewline:!0,trimTrailingNewline:!0});if(e.outdent=w,e.default=w,typeof r<"u")try{r.exports=w,Object.defineProperty(w,"__esModule",{value:!0}),w.default=w,w.outdent=w}catch{}}}),Al=I({"src/main/core-options.js"(e,r){"use strict";q();var{outdent:u}=Fl(),n="Config",D="Editor",s="Format",i="Other",f="Output",c="Global",F="Special",a={cursorOffset:{since:"1.4.0",category:F,type:"int",default:-1,range:{start:-1,end:Number.POSITIVE_INFINITY,step:1},description:u`
39837
39837
  Print (to stderr) where a cursor at the given position would move to after formatting.
39838
39838
  This option cannot be used with --range-start and --range-end.
39839
39839
  `,cliCategory:D},endOfLine:{since:"1.15.0",category:c,type:"choice",default:[{since:"1.15.0",value:"auto"},{since:"2.0.0",value:"lf"}],description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:u`
@@ -39915,7 +39915,7 @@ ${s.content}`:`${c}
39915
39915
 
39916
39916
  ${s.content}`}}}}),Zi=S({"src/language-markdown/loc.js"(e,r){"use strict";I();function u(a){return a.position.start.offset}function t(a){return a.position.end.offset}r.exports={locStart:u,locEnd:t}}}),Qi=S({"src/language-markdown/mdx.js"(e,r){"use strict";I();var u=/^import\s/,t=/^export\s/,a="[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)*|",n=/<!---->|<!---?[^>-](?:-?[^-])*-->/,s=/^{\s*\/\*(.*)\*\/\s*}/,c=`
39917
39917
 
39918
- `,i=p=>u.test(p),D=p=>t.test(p),o=(p,g)=>{let F=g.indexOf(c),E=g.slice(0,F);if(D(E)||i(E))return p(E)({type:D(E)?"export":"import",value:E})},l=(p,g)=>{let F=s.exec(g);if(F)return p(F[0])({type:"esComment",value:F[1].trim()})};o.locator=p=>D(p)||i(p)?-1:1,l.locator=(p,g)=>p.indexOf("{",g);function d(){let{Parser:p}=this,{blockTokenizers:g,blockMethods:F,inlineTokenizers:E,inlineMethods:b}=p.prototype;g.esSyntax=o,E.esComment=l,F.splice(F.indexOf("paragraph"),0,"esSyntax"),b.splice(b.indexOf("text"),0,"esComment")}r.exports={esSyntax:d,BLOCKS_REGEX:a,COMMENT_REGEX:n}}}),ea={};Pi(ea,{default:()=>c2});function c2(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var l2=je({"node_modules/escape-string-regexp/index.js"(){I()}}),D2=S({"src/utils/get-last.js"(e,r){"use strict";I();var u=t=>t[t.length-1];r.exports=u}}),ra=S({"node_modules/semver/internal/debug.js"(e,r){I();var u=typeof Qe=="object"&&Qe.env&&Qe.env.NODE_DEBUG&&/\bsemver\b/i.test(Qe.env.NODE_DEBUG)?function(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return console.error("SEMVER",...a)}:()=>{};r.exports=u}}),ua=S({"node_modules/semver/internal/constants.js"(e,r){I();var u="2.0.0",t=256,a=Number.MAX_SAFE_INTEGER||9007199254740991,n=16;r.exports={SEMVER_SPEC_VERSION:u,MAX_LENGTH:t,MAX_SAFE_INTEGER:a,MAX_SAFE_COMPONENT_LENGTH:n}}}),f2=S({"node_modules/semver/internal/re.js"(e,r){I();var{MAX_SAFE_COMPONENT_LENGTH:u}=ua(),t=ra();e=r.exports={};var a=e.re=[],n=e.src=[],s=e.t={},c=0,i=(D,o,l)=>{let d=c++;t(D,d,o),s[D]=d,n[d]=o,a[d]=new RegExp(o,l?"g":void 0)};i("NUMERICIDENTIFIER","0|[1-9]\\d*"),i("NUMERICIDENTIFIERLOOSE","[0-9]+"),i("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),i("MAINVERSION",`(${n[s.NUMERICIDENTIFIER]})\\.(${n[s.NUMERICIDENTIFIER]})\\.(${n[s.NUMERICIDENTIFIER]})`),i("MAINVERSIONLOOSE",`(${n[s.NUMERICIDENTIFIERLOOSE]})\\.(${n[s.NUMERICIDENTIFIERLOOSE]})\\.(${n[s.NUMERICIDENTIFIERLOOSE]})`),i("PRERELEASEIDENTIFIER",`(?:${n[s.NUMERICIDENTIFIER]}|${n[s.NONNUMERICIDENTIFIER]})`),i("PRERELEASEIDENTIFIERLOOSE",`(?:${n[s.NUMERICIDENTIFIERLOOSE]}|${n[s.NONNUMERICIDENTIFIER]})`),i("PRERELEASE",`(?:-(${n[s.PRERELEASEIDENTIFIER]}(?:\\.${n[s.PRERELEASEIDENTIFIER]})*))`),i("PRERELEASELOOSE",`(?:-?(${n[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${n[s.PRERELEASEIDENTIFIERLOOSE]})*))`),i("BUILDIDENTIFIER","[0-9A-Za-z-]+"),i("BUILD",`(?:\\+(${n[s.BUILDIDENTIFIER]}(?:\\.${n[s.BUILDIDENTIFIER]})*))`),i("FULLPLAIN",`v?${n[s.MAINVERSION]}${n[s.PRERELEASE]}?${n[s.BUILD]}?`),i("FULL",`^${n[s.FULLPLAIN]}$`),i("LOOSEPLAIN",`[v=\\s]*${n[s.MAINVERSIONLOOSE]}${n[s.PRERELEASELOOSE]}?${n[s.BUILD]}?`),i("LOOSE",`^${n[s.LOOSEPLAIN]}$`),i("GTLT","((?:<|>)?=?)"),i("XRANGEIDENTIFIERLOOSE",`${n[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),i("XRANGEIDENTIFIER",`${n[s.NUMERICIDENTIFIER]}|x|X|\\*`),i("XRANGEPLAIN",`[v=\\s]*(${n[s.XRANGEIDENTIFIER]})(?:\\.(${n[s.XRANGEIDENTIFIER]})(?:\\.(${n[s.XRANGEIDENTIFIER]})(?:${n[s.PRERELEASE]})?${n[s.BUILD]}?)?)?`),i("XRANGEPLAINLOOSE",`[v=\\s]*(${n[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[s.XRANGEIDENTIFIERLOOSE]})(?:${n[s.PRERELEASELOOSE]})?${n[s.BUILD]}?)?)?`),i("XRANGE",`^${n[s.GTLT]}\\s*${n[s.XRANGEPLAIN]}$`),i("XRANGELOOSE",`^${n[s.GTLT]}\\s*${n[s.XRANGEPLAINLOOSE]}$`),i("COERCE",`(^|[^\\d])(\\d{1,${u}})(?:\\.(\\d{1,${u}}))?(?:\\.(\\d{1,${u}}))?(?:$|[^\\d])`),i("COERCERTL",n[s.COERCE],!0),i("LONETILDE","(?:~>?)"),i("TILDETRIM",`(\\s*)${n[s.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",i("TILDE",`^${n[s.LONETILDE]}${n[s.XRANGEPLAIN]}$`),i("TILDELOOSE",`^${n[s.LONETILDE]}${n[s.XRANGEPLAINLOOSE]}$`),i("LONECARET","(?:\\^)"),i("CARETTRIM",`(\\s*)${n[s.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",i("CARET",`^${n[s.LONECARET]}${n[s.XRANGEPLAIN]}$`),i("CARETLOOSE",`^${n[s.LONECARET]}${n[s.XRANGEPLAINLOOSE]}$`),i("COMPARATORLOOSE",`^${n[s.GTLT]}\\s*(${n[s.LOOSEPLAIN]})$|^$`),i("COMPARATOR",`^${n[s.GTLT]}\\s*(${n[s.FULLPLAIN]})$|^$`),i("COMPARATORTRIM",`(\\s*)${n[s.GTLT]}\\s*(${n[s.LOOSEPLAIN]}|${n[s.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",i("HYPHENRANGE",`^\\s*(${n[s.XRANGEPLAIN]})\\s+-\\s+(${n[s.XRANGEPLAIN]})\\s*$`),i("HYPHENRANGELOOSE",`^\\s*(${n[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${n[s.XRANGEPLAINLOOSE]})\\s*$`),i("STAR","(<|>)?=?\\s*\\*"),i("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),i("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}}),p2=S({"node_modules/semver/internal/parse-options.js"(e,r){I();var u=["includePrerelease","loose","rtl"],t=a=>a?typeof a!="object"?{loose:!0}:u.filter(n=>a[n]).reduce((n,s)=>(n[s]=!0,n),{}):{};r.exports=t}}),d2=S({"node_modules/semver/internal/identifiers.js"(e,r){I();var u=/^[0-9]+$/,t=(n,s)=>{let c=u.test(n),i=u.test(s);return c&&i&&(n=+n,s=+s),n===s?0:c&&!i?-1:i&&!c?1:n<s?-1:1},a=(n,s)=>t(s,n);r.exports={compareIdentifiers:t,rcompareIdentifiers:a}}}),h2=S({"node_modules/semver/classes/semver.js"(e,r){I();var u=ra(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:a}=ua(),{re:n,t:s}=f2(),c=p2(),{compareIdentifiers:i}=d2(),D=class{constructor(o,l){if(l=c(l),o instanceof D){if(o.loose===!!l.loose&&o.includePrerelease===!!l.includePrerelease)return o;o=o.version}else if(typeof o!="string")throw new TypeError(`Invalid Version: ${o}`);if(o.length>t)throw new TypeError(`version is longer than ${t} characters`);u("SemVer",o,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;let d=o.trim().match(l.loose?n[s.LOOSE]:n[s.FULL]);if(!d)throw new TypeError(`Invalid Version: ${o}`);if(this.raw=o,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");d[4]?this.prerelease=d[4].split(".").map(p=>{if(/^[0-9]+$/.test(p)){let g=+p;if(g>=0&&g<a)return g}return p}):this.prerelease=[],this.build=d[5]?d[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(o){if(u("SemVer.compare",this.version,this.options,o),!(o instanceof D)){if(typeof o=="string"&&o===this.version)return 0;o=new D(o,this.options)}return o.version===this.version?0:this.compareMain(o)||this.comparePre(o)}compareMain(o){return o instanceof D||(o=new D(o,this.options)),i(this.major,o.major)||i(this.minor,o.minor)||i(this.patch,o.patch)}comparePre(o){if(o instanceof D||(o=new D(o,this.options)),this.prerelease.length&&!o.prerelease.length)return-1;if(!this.prerelease.length&&o.prerelease.length)return 1;if(!this.prerelease.length&&!o.prerelease.length)return 0;let l=0;do{let d=this.prerelease[l],p=o.prerelease[l];if(u("prerelease compare",l,d,p),d===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(d===void 0)return-1;if(d===p)continue;return i(d,p)}while(++l)}compareBuild(o){o instanceof D||(o=new D(o,this.options));let l=0;do{let d=this.build[l],p=o.build[l];if(u("prerelease compare",l,d,p),d===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(d===void 0)return-1;if(d===p)continue;return i(d,p)}while(++l)}inc(o,l){switch(o){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",l);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",l);break;case"prepatch":this.prerelease.length=0,this.inc("patch",l),this.inc("pre",l);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",l),this.inc("pre",l);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let d=this.prerelease.length;for(;--d>=0;)typeof this.prerelease[d]=="number"&&(this.prerelease[d]++,d=-2);d===-1&&this.prerelease.push(0)}l&&(i(this.prerelease[0],l)===0?isNaN(this.prerelease[1])&&(this.prerelease=[l,0]):this.prerelease=[l,0]);break;default:throw new Error(`invalid increment argument: ${o}`)}return this.format(),this.raw=this.version,this}};r.exports=D}}),Cu=S({"node_modules/semver/functions/compare.js"(e,r){I();var u=h2(),t=(a,n,s)=>new u(a,s).compare(new u(n,s));r.exports=t}}),v2=S({"node_modules/semver/functions/lt.js"(e,r){I();var u=Cu(),t=(a,n,s)=>u(a,n,s)<0;r.exports=t}}),m2=S({"node_modules/semver/functions/gte.js"(e,r){I();var u=Cu(),t=(a,n,s)=>u(a,n,s)>=0;r.exports=t}}),E2=S({"src/utils/arrayify.js"(e,r){"use strict";I(),r.exports=(u,t)=>Object.entries(u).map(a=>{let[n,s]=a;return Object.assign({[t]:n},s)})}}),C2=S({"package.json"(e,r){r.exports={version:"2.8.7"}}}),g2=S({"node_modules/outdent/lib/index.js"(e,r){"use strict";I(),Object.defineProperty(e,"__esModule",{value:!0}),e.outdent=void 0;function u(){for(var f=[],x=0;x<arguments.length;x++)f[x]=arguments[x]}function t(){return typeof WeakMap<"u"?new WeakMap:a()}function a(){return{add:u,delete:u,get:u,set:u,has:function(f){return!1}}}var n=Object.prototype.hasOwnProperty,s=function(f,x){return n.call(f,x)};function c(f,x){for(var v in x)s(x,v)&&(f[v]=x[v]);return f}var i=/^[ \t]*(?:\r\n|\r|\n)/,D=/(?:\r\n|\r|\n)[ \t]*$/,o=/^(?:[\r\n]|$)/,l=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,d=/^[ \t]*[\r\n][ \t\r\n]*$/;function p(f,x,v){var h=0,m=f[0].match(l);m&&(h=m[1].length);var C="(\\r\\n|\\r|\\n).{0,"+h+"}",w=new RegExp(C,"g");x&&(f=f.slice(1));var q=v.newline,L=v.trimLeadingNewline,B=v.trimTrailingNewline,O=typeof q=="string",T=f.length,P=f.map(function(A,j){return A=A.replace(w,"$1"),j===0&&L&&(A=A.replace(i,"")),j===T-1&&B&&(A=A.replace(D,"")),O&&(A=A.replace(/\r\n|\n|\r/g,function(H){return q})),A});return P}function g(f,x){for(var v="",h=0,m=f.length;h<m;h++)v+=f[h],h<m-1&&(v+=x[h]);return v}function F(f){return s(f,"raw")&&s(f,"length")}function E(f){var x=t(),v=t();function h(C){for(var w=[],q=1;q<arguments.length;q++)w[q-1]=arguments[q];if(F(C)){var L=C,B=(w[0]===h||w[0]===b)&&d.test(L[0])&&o.test(L[1]),O=B?v:x,T=O.get(L);if(T||(T=p(L,B,f),O.set(L,T)),w.length===0)return T[0];var P=g(T,B?w.slice(1):w);return P}else return E(c(c({},f),C||{}))}var m=c(h,{string:function(C){return p([C],!1,f)[0]}});return m}var b=E({trimLeadingNewline:!0,trimTrailingNewline:!0});if(e.outdent=b,e.default=b,typeof r<"u")try{r.exports=b,Object.defineProperty(b,"__esModule",{value:!0}),b.default=b,b.outdent=b}catch{}}}),F2=S({"src/main/core-options.js"(e,r){"use strict";I();var{outdent:u}=g2(),t="Config",a="Editor",n="Format",s="Other",c="Output",i="Global",D="Special",o={cursorOffset:{since:"1.4.0",category:D,type:"int",default:-1,range:{start:-1,end:Number.POSITIVE_INFINITY,step:1},description:u`
39918
+ `,i=p=>u.test(p),D=p=>t.test(p),o=(p,g)=>{let F=g.indexOf(c),E=g.slice(0,F);if(D(E)||i(E))return p(E)({type:D(E)?"export":"import",value:E})},l=(p,g)=>{let F=s.exec(g);if(F)return p(F[0])({type:"esComment",value:F[1].trim()})};o.locator=p=>D(p)||i(p)?-1:1,l.locator=(p,g)=>p.indexOf("{",g);function d(){let{Parser:p}=this,{blockTokenizers:g,blockMethods:F,inlineTokenizers:E,inlineMethods:b}=p.prototype;g.esSyntax=o,E.esComment=l,F.splice(F.indexOf("paragraph"),0,"esSyntax"),b.splice(b.indexOf("text"),0,"esComment")}r.exports={esSyntax:d,BLOCKS_REGEX:a,COMMENT_REGEX:n}}}),ea={};Pi(ea,{default:()=>c2});function c2(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var l2=je({"node_modules/escape-string-regexp/index.js"(){I()}}),D2=S({"src/utils/get-last.js"(e,r){"use strict";I();var u=t=>t[t.length-1];r.exports=u}}),ra=S({"node_modules/semver/internal/debug.js"(e,r){I();var u=typeof Qe=="object"&&Qe.env&&Qe.env.NODE_DEBUG&&/\bsemver\b/i.test(Qe.env.NODE_DEBUG)?function(){for(var t=arguments.length,a=new Array(t),n=0;n<t;n++)a[n]=arguments[n];return console.error("SEMVER",...a)}:()=>{};r.exports=u}}),ua=S({"node_modules/semver/internal/constants.js"(e,r){I();var u="2.0.0",t=256,a=Number.MAX_SAFE_INTEGER||9007199254740991,n=16;r.exports={SEMVER_SPEC_VERSION:u,MAX_LENGTH:t,MAX_SAFE_INTEGER:a,MAX_SAFE_COMPONENT_LENGTH:n}}}),f2=S({"node_modules/semver/internal/re.js"(e,r){I();var{MAX_SAFE_COMPONENT_LENGTH:u}=ua(),t=ra();e=r.exports={};var a=e.re=[],n=e.src=[],s=e.t={},c=0,i=(D,o,l)=>{let d=c++;t(D,d,o),s[D]=d,n[d]=o,a[d]=new RegExp(o,l?"g":void 0)};i("NUMERICIDENTIFIER","0|[1-9]\\d*"),i("NUMERICIDENTIFIERLOOSE","[0-9]+"),i("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),i("MAINVERSION",`(${n[s.NUMERICIDENTIFIER]})\\.(${n[s.NUMERICIDENTIFIER]})\\.(${n[s.NUMERICIDENTIFIER]})`),i("MAINVERSIONLOOSE",`(${n[s.NUMERICIDENTIFIERLOOSE]})\\.(${n[s.NUMERICIDENTIFIERLOOSE]})\\.(${n[s.NUMERICIDENTIFIERLOOSE]})`),i("PRERELEASEIDENTIFIER",`(?:${n[s.NUMERICIDENTIFIER]}|${n[s.NONNUMERICIDENTIFIER]})`),i("PRERELEASEIDENTIFIERLOOSE",`(?:${n[s.NUMERICIDENTIFIERLOOSE]}|${n[s.NONNUMERICIDENTIFIER]})`),i("PRERELEASE",`(?:-(${n[s.PRERELEASEIDENTIFIER]}(?:\\.${n[s.PRERELEASEIDENTIFIER]})*))`),i("PRERELEASELOOSE",`(?:-?(${n[s.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${n[s.PRERELEASEIDENTIFIERLOOSE]})*))`),i("BUILDIDENTIFIER","[0-9A-Za-z-]+"),i("BUILD",`(?:\\+(${n[s.BUILDIDENTIFIER]}(?:\\.${n[s.BUILDIDENTIFIER]})*))`),i("FULLPLAIN",`v?${n[s.MAINVERSION]}${n[s.PRERELEASE]}?${n[s.BUILD]}?`),i("FULL",`^${n[s.FULLPLAIN]}$`),i("LOOSEPLAIN",`[v=\\s]*${n[s.MAINVERSIONLOOSE]}${n[s.PRERELEASELOOSE]}?${n[s.BUILD]}?`),i("LOOSE",`^${n[s.LOOSEPLAIN]}$`),i("GTLT","((?:<|>)?=?)"),i("XRANGEIDENTIFIERLOOSE",`${n[s.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),i("XRANGEIDENTIFIER",`${n[s.NUMERICIDENTIFIER]}|x|X|\\*`),i("XRANGEPLAIN",`[v=\\s]*(${n[s.XRANGEIDENTIFIER]})(?:\\.(${n[s.XRANGEIDENTIFIER]})(?:\\.(${n[s.XRANGEIDENTIFIER]})(?:${n[s.PRERELEASE]})?${n[s.BUILD]}?)?)?`),i("XRANGEPLAINLOOSE",`[v=\\s]*(${n[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[s.XRANGEIDENTIFIERLOOSE]})(?:\\.(${n[s.XRANGEIDENTIFIERLOOSE]})(?:${n[s.PRERELEASELOOSE]})?${n[s.BUILD]}?)?)?`),i("XRANGE",`^${n[s.GTLT]}\\s*${n[s.XRANGEPLAIN]}$`),i("XRANGELOOSE",`^${n[s.GTLT]}\\s*${n[s.XRANGEPLAINLOOSE]}$`),i("COERCE",`(^|[^\\d])(\\d{1,${u}})(?:\\.(\\d{1,${u}}))?(?:\\.(\\d{1,${u}}))?(?:$|[^\\d])`),i("COERCERTL",n[s.COERCE],!0),i("LONETILDE","(?:~>?)"),i("TILDETRIM",`(\\s*)${n[s.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",i("TILDE",`^${n[s.LONETILDE]}${n[s.XRANGEPLAIN]}$`),i("TILDELOOSE",`^${n[s.LONETILDE]}${n[s.XRANGEPLAINLOOSE]}$`),i("LONECARET","(?:\\^)"),i("CARETTRIM",`(\\s*)${n[s.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",i("CARET",`^${n[s.LONECARET]}${n[s.XRANGEPLAIN]}$`),i("CARETLOOSE",`^${n[s.LONECARET]}${n[s.XRANGEPLAINLOOSE]}$`),i("COMPARATORLOOSE",`^${n[s.GTLT]}\\s*(${n[s.LOOSEPLAIN]})$|^$`),i("COMPARATOR",`^${n[s.GTLT]}\\s*(${n[s.FULLPLAIN]})$|^$`),i("COMPARATORTRIM",`(\\s*)${n[s.GTLT]}\\s*(${n[s.LOOSEPLAIN]}|${n[s.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",i("HYPHENRANGE",`^\\s*(${n[s.XRANGEPLAIN]})\\s+-\\s+(${n[s.XRANGEPLAIN]})\\s*$`),i("HYPHENRANGELOOSE",`^\\s*(${n[s.XRANGEPLAINLOOSE]})\\s+-\\s+(${n[s.XRANGEPLAINLOOSE]})\\s*$`),i("STAR","(<|>)?=?\\s*\\*"),i("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),i("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}}),p2=S({"node_modules/semver/internal/parse-options.js"(e,r){I();var u=["includePrerelease","loose","rtl"],t=a=>a?typeof a!="object"?{loose:!0}:u.filter(n=>a[n]).reduce((n,s)=>(n[s]=!0,n),{}):{};r.exports=t}}),d2=S({"node_modules/semver/internal/identifiers.js"(e,r){I();var u=/^[0-9]+$/,t=(n,s)=>{let c=u.test(n),i=u.test(s);return c&&i&&(n=+n,s=+s),n===s?0:c&&!i?-1:i&&!c?1:n<s?-1:1},a=(n,s)=>t(s,n);r.exports={compareIdentifiers:t,rcompareIdentifiers:a}}}),h2=S({"node_modules/semver/classes/semver.js"(e,r){I();var u=ra(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:a}=ua(),{re:n,t:s}=f2(),c=p2(),{compareIdentifiers:i}=d2(),D=class{constructor(o,l){if(l=c(l),o instanceof D){if(o.loose===!!l.loose&&o.includePrerelease===!!l.includePrerelease)return o;o=o.version}else if(typeof o!="string")throw new TypeError(`Invalid Version: ${o}`);if(o.length>t)throw new TypeError(`version is longer than ${t} characters`);u("SemVer",o,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;let d=o.trim().match(l.loose?n[s.LOOSE]:n[s.FULL]);if(!d)throw new TypeError(`Invalid Version: ${o}`);if(this.raw=o,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");d[4]?this.prerelease=d[4].split(".").map(p=>{if(/^[0-9]+$/.test(p)){let g=+p;if(g>=0&&g<a)return g}return p}):this.prerelease=[],this.build=d[5]?d[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(o){if(u("SemVer.compare",this.version,this.options,o),!(o instanceof D)){if(typeof o=="string"&&o===this.version)return 0;o=new D(o,this.options)}return o.version===this.version?0:this.compareMain(o)||this.comparePre(o)}compareMain(o){return o instanceof D||(o=new D(o,this.options)),i(this.major,o.major)||i(this.minor,o.minor)||i(this.patch,o.patch)}comparePre(o){if(o instanceof D||(o=new D(o,this.options)),this.prerelease.length&&!o.prerelease.length)return-1;if(!this.prerelease.length&&o.prerelease.length)return 1;if(!this.prerelease.length&&!o.prerelease.length)return 0;let l=0;do{let d=this.prerelease[l],p=o.prerelease[l];if(u("prerelease compare",l,d,p),d===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(d===void 0)return-1;if(d===p)continue;return i(d,p)}while(++l)}compareBuild(o){o instanceof D||(o=new D(o,this.options));let l=0;do{let d=this.build[l],p=o.build[l];if(u("prerelease compare",l,d,p),d===void 0&&p===void 0)return 0;if(p===void 0)return 1;if(d===void 0)return-1;if(d===p)continue;return i(d,p)}while(++l)}inc(o,l){switch(o){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",l);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",l);break;case"prepatch":this.prerelease.length=0,this.inc("patch",l),this.inc("pre",l);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",l),this.inc("pre",l);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":if(this.prerelease.length===0)this.prerelease=[0];else{let d=this.prerelease.length;for(;--d>=0;)typeof this.prerelease[d]=="number"&&(this.prerelease[d]++,d=-2);d===-1&&this.prerelease.push(0)}l&&(i(this.prerelease[0],l)===0?isNaN(this.prerelease[1])&&(this.prerelease=[l,0]):this.prerelease=[l,0]);break;default:throw new Error(`invalid increment argument: ${o}`)}return this.format(),this.raw=this.version,this}};r.exports=D}}),Cu=S({"node_modules/semver/functions/compare.js"(e,r){I();var u=h2(),t=(a,n,s)=>new u(a,s).compare(new u(n,s));r.exports=t}}),v2=S({"node_modules/semver/functions/lt.js"(e,r){I();var u=Cu(),t=(a,n,s)=>u(a,n,s)<0;r.exports=t}}),m2=S({"node_modules/semver/functions/gte.js"(e,r){I();var u=Cu(),t=(a,n,s)=>u(a,n,s)>=0;r.exports=t}}),E2=S({"src/utils/arrayify.js"(e,r){"use strict";I(),r.exports=(u,t)=>Object.entries(u).map(a=>{let[n,s]=a;return Object.assign({[t]:n},s)})}}),C2=S({"package.json"(e,r){r.exports={version:"2.8.8"}}}),g2=S({"node_modules/outdent/lib/index.js"(e,r){"use strict";I(),Object.defineProperty(e,"__esModule",{value:!0}),e.outdent=void 0;function u(){for(var f=[],x=0;x<arguments.length;x++)f[x]=arguments[x]}function t(){return typeof WeakMap<"u"?new WeakMap:a()}function a(){return{add:u,delete:u,get:u,set:u,has:function(f){return!1}}}var n=Object.prototype.hasOwnProperty,s=function(f,x){return n.call(f,x)};function c(f,x){for(var v in x)s(x,v)&&(f[v]=x[v]);return f}var i=/^[ \t]*(?:\r\n|\r|\n)/,D=/(?:\r\n|\r|\n)[ \t]*$/,o=/^(?:[\r\n]|$)/,l=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,d=/^[ \t]*[\r\n][ \t\r\n]*$/;function p(f,x,v){var h=0,m=f[0].match(l);m&&(h=m[1].length);var C="(\\r\\n|\\r|\\n).{0,"+h+"}",w=new RegExp(C,"g");x&&(f=f.slice(1));var q=v.newline,L=v.trimLeadingNewline,B=v.trimTrailingNewline,O=typeof q=="string",T=f.length,P=f.map(function(A,j){return A=A.replace(w,"$1"),j===0&&L&&(A=A.replace(i,"")),j===T-1&&B&&(A=A.replace(D,"")),O&&(A=A.replace(/\r\n|\n|\r/g,function(H){return q})),A});return P}function g(f,x){for(var v="",h=0,m=f.length;h<m;h++)v+=f[h],h<m-1&&(v+=x[h]);return v}function F(f){return s(f,"raw")&&s(f,"length")}function E(f){var x=t(),v=t();function h(C){for(var w=[],q=1;q<arguments.length;q++)w[q-1]=arguments[q];if(F(C)){var L=C,B=(w[0]===h||w[0]===b)&&d.test(L[0])&&o.test(L[1]),O=B?v:x,T=O.get(L);if(T||(T=p(L,B,f),O.set(L,T)),w.length===0)return T[0];var P=g(T,B?w.slice(1):w);return P}else return E(c(c({},f),C||{}))}var m=c(h,{string:function(C){return p([C],!1,f)[0]}});return m}var b=E({trimLeadingNewline:!0,trimTrailingNewline:!0});if(e.outdent=b,e.default=b,typeof r<"u")try{r.exports=b,Object.defineProperty(b,"__esModule",{value:!0}),b.default=b,b.outdent=b}catch{}}}),F2=S({"src/main/core-options.js"(e,r){"use strict";I();var{outdent:u}=g2(),t="Config",a="Editor",n="Format",s="Other",c="Output",i="Global",D="Special",o={cursorOffset:{since:"1.4.0",category:D,type:"int",default:-1,range:{start:-1,end:Number.POSITIVE_INFINITY,step:1},description:u`
39919
39919
  Print (to stderr) where a cursor at the given position would move to after formatting.
39920
39920
  This option cannot be used with --range-start and --range-end.
39921
39921
  `,cliCategory:a},endOfLine:{since:"1.15.0",category:i,type:"choice",default:[{since:"1.15.0",value:"auto"},{since:"2.0.0",value:"lf"}],description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:u`
@@ -49323,7 +49323,7 @@ module.exports = require("util");
49323
49323
  /***/ (function(module) {
49324
49324
 
49325
49325
  "use strict";
49326
- module.exports = JSON.parse('{"name":"prettier","version":"2.8.7","description":"Prettier is an opinionated code formatter","bin":"./bin-prettier.js","repository":"prettier/prettier","funding":"https://github.com/prettier/prettier?sponsor=1","homepage":"https://prettier.io","author":"James Long","license":"MIT","main":"./index.js","browser":"./standalone.js","unpkg":"./standalone.js","engines":{"node":">=10.13.0"},"files":["*.js","esm/*.mjs"]}');
49326
+ module.exports = JSON.parse('{"name":"prettier","version":"2.8.8","description":"Prettier is an opinionated code formatter","bin":"./bin-prettier.js","repository":"prettier/prettier","funding":"https://github.com/prettier/prettier?sponsor=1","homepage":"https://prettier.io","author":"James Long","license":"MIT","main":"./index.js","browser":"./standalone.js","unpkg":"./standalone.js","engines":{"node":">=10.13.0"},"files":["*.js","esm/*.mjs"]}');
49327
49327
 
49328
49328
  /***/ })
49329
49329
 
@@ -1 +1 @@
1
- {"name":"prettier","version":"2.8.7","author":"James Long","license":"MIT","_lastModified":"2023-04-19T01:06:46.222Z"}
1
+ {"name":"prettier","version":"2.8.8","author":"James Long","license":"MIT","_lastModified":"2023-05-24T01:05:49.667Z"}
@@ -1 +1 @@
1
- {"name":"staged-git-files","version":"1.3.0","author":"Matthew Chase Whittemore <mcwhittemore@gmail.com>","license":"BSD-2-Clause","_lastModified":"2023-04-19T01:06:46.318Z"}
1
+ {"name":"staged-git-files","version":"1.3.0","author":"Matthew Chase Whittemore <mcwhittemore@gmail.com>","license":"BSD-2-Clause","_lastModified":"2023-05-24T01:05:49.719Z"}
@@ -0,0 +1,27 @@
1
+ const {
2
+ getYolkConfig,
3
+ getEsLintConfigPath,
4
+ getStyleLintConfigPath,
5
+ } = require('./util');
6
+
7
+ const yolkConfig = getYolkConfig();
8
+ const isStrict = yolkConfig.strict !== false;
9
+
10
+ const prettierCLI = 'prettier --write';
11
+ const eslintCLI = `eslint --fix ${
12
+ isStrict ? '--no-inline-config --no-ignore' : ''
13
+ } --no-error-on-unmatched-pattern --config ${getEsLintConfigPath()}`;
14
+ const stylelintCLI = `stylelint --fix ${
15
+ isStrict ? '--ignore-disables' : ''
16
+ } '--allow-empty-input' --config ${getStyleLintConfigPath()}`;
17
+
18
+ module.exports = {
19
+ '*.{md,json}': [prettierCLI],
20
+ '*.less': [prettierCLI, `${stylelintCLI} --custom-syntax postcss-less`],
21
+ '*.{sass,scss}': [
22
+ prettierCLI,
23
+ `${stylelintCLI} --custom-syntax postcss-scss`,
24
+ ],
25
+ '*.{js,jsx}': [prettierCLI, eslintCLI],
26
+ '*.{ts,tsx}': [`${prettierCLI} --parser=typescript`, eslintCLI],
27
+ };
package/es/util.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ import ora from 'ora';
2
+ export declare type YolkConfig = {
3
+ strict?: boolean;
4
+ eslintIgnore?: string | string[] | RegExp | RegExp[];
5
+ stylelintIgnore?: string | string[] | RegExp | RegExp[];
6
+ lintStaged?: boolean;
7
+ };
8
+ export declare const ENCODING = "utf-8";
9
+ export declare const warn: (text?: string) => "" | ora.Ora | undefined;
10
+ export declare const fail: (text?: string) => "" | ora.Ora | undefined;
11
+ export declare const succeed: (text?: string) => "" | ora.Ora | undefined;
12
+ export declare const info: (text?: string) => "" | ora.Ora | undefined;
13
+ export declare const getYolkConfig: () => YolkConfig;
14
+ export declare const getPrettierConfig: () => any;
15
+ export declare const getProjectConfigJSON: () => any;
16
+ export declare const getPackageJSON: () => any;
17
+ export declare const getEsLintConfigPath: () => string;
18
+ export declare const getStyleLintConfigPath: () => string;
package/es/util.js ADDED
@@ -0,0 +1 @@
1
+ import r from"fs";import t from"path";import{globSync as e}from"glob";import n from"ora";var o=process.cwd();export var ENCODING="utf-8";var i=n();export var warn=function(r){return r&&i.warn(Buffer.from(r,ENCODING).toString())};export var fail=function(r){return r&&i.fail(Buffer.from(r,ENCODING).toString())};export var succeed=function(r){return r&&i.succeed(Buffer.from(r,ENCODING).toString())};export var info=function(r){return r&&i.info(Buffer.from(r,ENCODING).toString())};export var getYolkConfig=function(){var n=e("*.yolkrc*",{cwd:o,dot:!0});if(!n.length)return{};var i=t.join(o,n[0]);if(!r.existsSync(i))return{};try{return JSON.parse(r.readFileSync(i,ENCODING))||{}}catch(c){return fail(c.message||".yolkrc\u8f6c\u6362\u9519\u8bef"),{}}};export var getPrettierConfig=function(){var e=t.join(o,".prettierrc");if(r.existsSync(e))try{return JSON.parse(r.readFileSync(e,ENCODING))||{}}catch(n){return fail(n.message||".prettierrc\u8f6c\u6362\u9519\u8bef"),{}}return require("./.prettierrc")};export var getProjectConfigJSON=function(){var e=t.join(o,"project.config.json");if(!r.existsSync(e))return{};try{return JSON.parse(r.readFileSync(e,ENCODING))||{}}catch(n){return fail(n.message||"project.config.json\u8f6c\u6362\u9519\u8bef"),{}}};export var getPackageJSON=function(){var e=t.join(o,"package.json");if(!r.existsSync(e))return{};try{return JSON.parse(r.readFileSync(e,ENCODING))||{}}catch(n){return fail(n.message||"package.json\u8f6c\u6362\u9519\u8bef"),{}}};export var getEsLintConfigPath=function(){var t=getYolkConfig(),n="";try{n=require.resolve("@baic/eslint-config-yolk")}catch(a){}var i=e("*.eslintrc*",{cwd:o,dot:!0}),c=i[0];return!1===t.strict&&c&&r.existsSync(c)?c:r.existsSync(n)?n:c};export var getStyleLintConfigPath=function(){var t=getYolkConfig(),n="";try{n=require.resolve("@baic/stylelint-config-yolk")}catch(a){}var i=e("*.stylelintrc*",{cwd:o,dot:!0}),c=i[0];return!1===t.strict&&c&&r.existsSync(c)?c:r.existsSync(n)?n:c};
package/es/yolk.d.ts CHANGED
@@ -1,6 +1,2 @@
1
1
  #! /usr/bin/env node
2
- export declare type YolkConfig = {
3
- strict?: boolean;
4
- eslintIgnore?: string | string[] | RegExp | RegExp[];
5
- stylelintIgnore?: string | string[] | RegExp | RegExp[];
6
- };
2
+ export {};
package/es/yolk.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #! /usr/bin/env node
2
- import e from"@babel/runtime/helpers/esm/toArray";import t from"@babel/runtime/helpers/esm/toConsumableArray";import n from"@babel/runtime/helpers/esm/defineProperty";import o from"lodash/isString";import r from"lodash/pick";import c from"lodash/floor";import i from"lodash/chunk";function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?s(Object(o),!0).forEach((function(t){n(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}import{execSync as m,spawn as l}from"child_process";import p from"fs";import u from"os";import f from"path";import d from"inquirer";import*as y from"miniprogram-ci";import g from"ora";import h from"../compiled/commander";import v from"../compiled/glob";import b from"../compiled/minimatch";import j from"../compiled/mkdirp";import S from"../compiled/mustache";import{format as x}from"../compiled/prettier";import k from"../compiled/rimraf";import w from"../package.json";var O=require("../compiled/staged-git-files"),P=process.cwd(),D="##### CREATED BY YOLK #####",_={ts:"typescript",tsx:"typescript",less:"less",sass:"scss",scss:"scss",css:"css"},F="utf-8",I=20,E=["**/node_modules/**","**/.umi/**","**/.umi-production/**","**/build/**","**/dist/**","**/lib/**","**/es/**","**/public/**","**/assets/**","**/h5+app/**","**/android/**","**/ios/**","**/mock/**","**/yolk*/**"],N=g(),B=function(e){return e&&N.warn(Buffer.from(e,F).toString())},q=function(e){return e&&N.fail(Buffer.from(e,F).toString())},K=function(e){return e&&N.succeed(Buffer.from(e,F).toString())},$=function(e){return e&&N.info(Buffer.from(e,F).toString())},U=function(e){return"win32"===process.platform?"".concat(e,".cmd"):e},A=function(){K("yolk complete!"),process.exit(0)},Q=function(){B("yolk break!"),process.exit(0)},R=function(e){var t=e.command,n=e.args,o=e.complete,r=e.close,c=e.exit,i=void 0===c||c,s=l(U(t),n||[],{stdio:"inherit"}).on("close",(function(e){e?(r&&r(),q("yolk close!"),process.exit(e)):(o&&o(),i&&A())}));process.on("SIGINT",(function(){h.runningCommand&&h.runningCommand.kill("SIGKILL"),s.kill(),Q()}))},T=function(e,t,n){d.prompt([{type:"list",name:"type",message:"\u9009\u62e9\u6a21\u7248",default:"web",choices:[{name:"web template(umi framework)",value:"umi-web"},{name:"web big screen template(umi framework)",value:"umi-web-screen"},{name:"mobile template(umi framework)",value:"umi-mobile"},{name:"mobile HBuilderX h5+app template(umi framework)",value:"umi-mobile-h5+app"},{name:"mobile native template(umi framework)",value:"umi-mobile-native"},{name:"miniprogram template",value:"miniprogram"}]},{type:"input",name:"projectName",message:"\u9879\u76ee\u540d\u79f0",default:f.basename(f.basename(process.cwd()))},{type:"list",name:"dependenciesInstallType",message:"\u9009\u62e9\u4f9d\u8d56\u5b89\u88c5\u65b9\u5f0f",default:"default",choices:[{name:"\u9ed8\u8ba4\u5b89\u88c5",value:"default"},{name:"\u8df3\u8fc7\u5b89\u88c5",value:!1},{name:"pnpm install",value:"pnpm"},{name:"yarn install",value:"yarn"},{name:"npm install",value:"npm"}]}]).then((function(o){var r={projectName:o.projectName,dependenciesInstallType:o.dependenciesInstallType,yolkVersion:w.version},c=t||f.join(__dirname,"../templates/".concat(o.type));K("\u590d\u5236\u6a21\u7248 ".concat(f.basename(c)));var i=v.sync("**/*",{cwd:c,dot:!0,ignore:["**/node_modules/**","**/.git/**","**/.DS_Store","**/.idea/**"]});if(i.forEach((function(t){if(c){var n=f.join(c,t);if(!p.statSync(n).isDirectory())if(t.endsWith(".tpl")){var o=p.readFileSync(n,F),i=f.join(e,t.replace(/\.tpl$/,"")),s=S.render(o,r);j.sync(f.dirname(i)),K("\u521b\u5efa ".concat(f.relative(e,i))),p.writeFileSync(i,s,F)}else{K("\u521b\u5efa ".concat(t));var a=f.join(e,t);j.sync(f.dirname(a)),p.copyFileSync(n,a)}}})),K("\u590d\u5236\u6a21\u7248 success!"),n&&p.existsSync(c)&&k(c,(function(){K("\u7f13\u5b58\u5220\u9664 success! ".concat(f.basename(c||"")))})),o.dependenciesInstallType)switch(K("\u521d\u59cb\u5316\u4f9d\u8d56\u5305"),o.dependenciesInstallType){case"default":case"pnpm":R({command:"pnpm",args:["install"]});break;case"yarn":R({command:"yarn",args:["install"]});break;case"npm":R({command:"npm",args:["install"]});break;default:}K("\u53ef\u67e5\u9605<<https://303394539.github.io/yolk-docs/>>\u4e86\u89e3\u76f8\u5173\u6587\u6863")}))},Y=function(e,t){return T(e,t,!0)},W=function(){var e=v.sync("*.yolkrc*",{cwd:P,dot:!0});if(!e.length)return{};var t=f.join(P,e[0]);if(!p.existsSync(t))return{};try{return JSON.parse(p.readFileSync(t,F))||{}}catch(n){return q(n.message||".yolkrc\u8f6c\u6362\u9519\u8bef"),{}}},L=function(){var e=f.join(P,".prettierrc");if(p.existsSync(e))try{return JSON.parse(p.readFileSync(e,F))||{}}catch(t){return q(t.message||".prettierrc\u8f6c\u6362\u9519\u8bef"),{}}return require("./.prettierrc")},C=function(){var e=f.join(P,"project.config.json");if(!p.existsSync(e))return{};try{return JSON.parse(p.readFileSync(e,F))||{}}catch(t){return q(t.message||"project.config.json\u8f6c\u6362\u9519\u8bef"),{}}},J=function(){var e=f.join(P,"package.json");if(!p.existsSync(e))return{};try{return JSON.parse(p.readFileSync(e,F))||{}}catch(t){return q(t.message||"package.json\u8f6c\u6362\u9519\u8bef"),{}}},V=function(){return p.existsSync(f.join(P,"project.config.json"))},G=function(){var e=p.existsSync(f.join(P,"node_modules/.bin/max"));if(!e)try{e=p.existsSync(require.resolve("@umijs/max"))}catch(o){}if(!e)try{e=/umi@4\.(\d+)\.(\d+)/.test(m("umi -v").toString())}catch(o){}if(!e){var t=f.join(P,"node_modules","umi","package.json");if(p.existsSync(t))try{var n=JSON.parse(p.readFileSync(t,F))||{};e=n.version&&+n.version.split(".")[0]>3}catch(o){}}return e},H=function(){var e=f.join(P,"project.config.json");if(p.existsSync(e)){var t=require(e);return t.appid}return""},M=function(){return p.existsSync(f.join(P,"project.tt.json"))&&0===H().indexOf("tt")},X=function(){return 0===H().indexOf("20")},z=function(){var e=W(),t="";try{t=require.resolve("@baic/eslint-config-yolk")}catch(r){}var n=v.sync("*.eslintrc*",{cwd:P,dot:!0}),o=n[0];return!1===e.strict&&o&&p.existsSync(o)?o:p.existsSync(t)?t:o},Z=function(){var e=W(),t="";try{t=require.resolve("@baic/stylelint-config-yolk")}catch(r){}var n=v.sync("*.stylelintrc*",{cwd:P,dot:!0}),o=n[0];return!1===e.strict&&o&&p.existsSync(o)?o:p.existsSync(t)?t:o},ee=function(){var e=f.join(P,".git/"),t=f.join(P,".git/hooks"),n=f.join(t,"pre-commit"),o=p.existsSync(e),r=p.existsSync(n),c=r&&p.readFileSync(n,F).includes(D);if(o&&(!r||!c)){j.sync(t),p.writeFileSync(n,["#!/usr/bin/env bash","npx yolk pre-commit","RESULT=$?","[ $RESULT -ne 0 ] && exit 1","exit 0",D].join(u.EOL),F);try{p.chmodSync(n,"777")}catch(i){q("chmod ".concat(n," failed: ").concat(i.message))}K("Create pre-commit hook")}},te=function(){var e=W(),n=!1!==e.strict,o=e.eslintIgnore,r=e.stylelintIgnore;O().then((function(e){var c=function(o){return new Promise((function(c,s){var m=Z();if(m){var l=e.map((function(e){return e.filename})).filter((function(e){return/^(src|tests)/i.test(e)})).filter((function(e){return{css:/\.cs{2}$/i,less:/\.les{2}$/i,sass:/\.sas{2}$/i,scss:/\.scs{2}$/i}[o].test(e)})).filter((function(e){var t=f.join(P,e);return p.existsSync(t)})).filter((function(e){return E.every((function(t){return!b(e,t,{matchBase:!0})}))})).filter((function(e){return"string"===typeof r?!b(e,r,{matchBase:!0}):r instanceof RegExp?!r.test(e):!Array.isArray(r)||r.every((function(t){return"string"===typeof t?!b(e,t,{matchBase:!0}):!(t instanceof RegExp)||!t.test(e)}))}));if(l.length)if(l.forEach((function(e){if(e&&p.existsSync(e)){var t=f.extname(e).replace(/^\./,""),n=p.readFileSync(e,F),o=x(n,a({parser:_[t]},L()));p.writeFileSync(e,o,F)}})),K("".concat(o," - ").concat(l.length," files prettier success!")),l.length>=I){var u=[];i(l,I).forEach((function(e){u.push(new Promise((function(r,c){R({command:"stylelint",args:[n?"--ignore-disables":"","--allow-empty-input","--custom-syntax","postcss-".concat(o),"--config",m].concat(t(e)),complete:r,close:c,exit:!1})})))}));var d=0,y=function e(){d<u.length?u[d].then((function(){d++,e()})).catch(s):(K("".concat(o," - ").concat(l.length," files stylelint success!")),c())};y()}else l.length&&R({command:"stylelint",args:[n?"--ignore-disables":"","--allow-empty-input","--custom-syntax","postcss-".concat(o),"--config",m].concat(t(l)),complete:function(){K("".concat(o," - ").concat(l.length," files stylelint success!")),c()},close:s,exit:!1});else c()}else q("\u6ca1\u6709 stylelintrc \u6587\u4ef6\uff0c".concat(o," files prettier fail!")),c()}))},s=function(r){return new Promise((function(c,s){var m=z();if(m){var l=e.map((function(e){return e.filename})).filter((function(e){return/^(src|tests)/i.test(e)})).filter((function(e){return{js:/\.js$/i,jsx:/\.jsx$/i,ts:/\.ts$/i,tsx:/\.tsx$/i}[r].test(e)})).filter((function(e){var t=f.join(P,e);return p.existsSync(t)})).filter((function(e){return E.every((function(t){return!b(e,t,{matchBase:!0})}))})).filter((function(e){return"string"===typeof o?!b(e,o,{matchBase:!0}):o instanceof RegExp?!o.test(e):!Array.isArray(o)||o.every((function(t){return"string"===typeof t?!b(e,t,{matchBase:!0}):!(t instanceof RegExp)||!t.test(e)}))}));if(l.length)if(l.forEach((function(e){if(e&&p.existsSync(e)){var t=f.extname(e).replace(/^\./,""),n=p.readFileSync(e,F),o=x(n,a({parser:_[t]},L()));p.writeFileSync(e,o,F)}})),K("".concat(r," - ").concat(l.length," files prettier success!")),l.length>=I){var u=[];i(l,I).forEach((function(e){u.push(new Promise((function(o,r){R({command:"eslint",args:[n?"--no-inline-config --no-ignore":"","--no-error-on-unmatched-pattern","--config",m].concat(t(e)),complete:o,close:r,exit:!1})})))}));var d=0,y=function e(){d<u.length?u[d].then((function(){d++,e()})).catch(s):(K("".concat(r," - ").concat(l.length," files eslint success!")),c())};y()}else l.length&&R({command:"eslint",args:[n?"--no-inline-config --no-ignore":"","--no-error-on-unmatched-pattern","--config",m].concat(t(l)),complete:function(){K("".concat(r," - ").concat(l.length," files eslint success!")),c()},close:s,exit:!1});else c()}else q("\u6ca1\u6709 eslintrc \u6587\u4ef6\uff0c".concat(r," files eslint fail!")),c()}))};B("\u7edf\u4e00\u4ee3\u7801\u89c4\u8303\uff0c\u8fdb\u884c\u4e25\u683c\u7684\u8bed\u6cd5\u68c0\u67e5\u3002"),n&&(B("git commit \u7981\u6b62 lint \u7684 ignore \u884c\u4e3a"),r&&B("\u901a\u8fc7 .yolkrc \u914d\u7f6e stylelintIgnore: ".concat(r,"\u3002")),o&&B("\u901a\u8fc7 .yolkrc \u914d\u7f6e eslintIgnore: ".concat(o,"\u3002"))),c("css").then((function(){return c("less")})).then((function(){return c("sass")})).then((function(){return c("scss")})).then((function(){return s("js")})).then((function(){return s("jsx")})).then((function(){return s("ts")})).then((function(){return s("tsx")})).then(A).catch(A)}))},ne=function(e){var t=e.mAppid,n=e.mProject,o=e.mPrivateKeyPath,r=e.mVersion,c=e.mDesc,i=e.mRobot,s=e.mQrcodeFormat,a=e.mQrcodeOutputDest,l=e.mPagePath,u=e.mSearchQuery,d=p.existsSync(f.join(P,".git"))?m("git log -1 --pretty=format:%H").toString():"",g=C(),h=t||g.appid,v=n||f.join(P,"dist"),b=o||f.join(P,"private.".concat(h,".key"));if(p.existsSync(v)){if(p.existsSync(b)){var j=J(),S=r||j.version||g.version||"1.0.0",x=c||j.description||g.description,k="".concat(d?" commit: ".concat(d,";"):"").concat(x?" description: ".concat(x,";"):"");d&&$("commit: ".concat(d)),$("dist: ".concat(v)),$("key: ".concat(b)),$("appid: ".concat(h)),$("version: ".concat(S)),$("desc: ".concat(k));var w=new y.Project({appid:h,type:"miniProgram",projectPath:v,privateKeyPath:b,ignores:["node_modules/**/*","**/*.txt","**/*.key","**/*.less","**/*.sass","**/*.scss","**/*.css","**/*.jsx","**/*.ts","**/*.tsx","**/*.md"]});return{appid:h,options:{project:w,version:S,desc:k,setting:g.setting,robot:i,qrcodeFormat:s,qrcodeOutputDest:a,pagePath:l,searchQuery:u}}}throw Error("\u6ca1\u6709\u627e\u5230\u4e0a\u4f20\u5bc6\u94a5(".concat(b,")"))}throw Error("\u6ca1\u6709\u627e\u5230dist\u76ee\u5f55(".concat(v,")"))},oe=function(){ee(),process.argv.length>2?h.version(w.version,"-v,--version","\u8f93\u51fa\u7248\u672c\u53f7").usage("[command] [options]").option("--clone","\u901a\u8fc7git clone\u62c9\u53d6\u6a21\u7248").option("--template <template>","\u6a21\u7248\u540d\u79f0\u6216\u8005clone\u6a21\u5f0f\u7684git\u5730\u5740").option("--docs","\u542f\u52a8\u6587\u6863\u6a21\u5f0f").option("--mAppid <appid>","\u5c0f\u7a0b\u5e8fappid").option("--mProject <project>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u5de5\u7a0b\u76ee\u5f55").option("--mPrivateKeyPath <privateKeyPath>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20key\u6587\u4ef6").option("--mVersion <version>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u7248\u672c\u53f7").option("--mDesc <desc>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u63cf\u8ff0").option("--mRobot <robot>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20ci\u673a\u5668\u4eba1~30").option("--mQrcodeFormat <qrcodeFormat>",'\u5c0f\u7a0b\u5e8f\u9884\u89c8\u8fd4\u56de\u4e8c\u7ef4\u7801\u6587\u4ef6\u7684\u683c\u5f0f "image" \u6216 "base64"\uff0c \u9ed8\u8ba4\u503c "terminal" \u4f9b\u8c03\u8bd5\u7528').option("--mQrcodeOutputDest <qrcodeOutputDest>","\u5c0f\u7a0b\u5e8f\u9884\u89c8\u4e8c\u7ef4\u7801\u6587\u4ef6\u4fdd\u5b58\u8def\u5f84").option("--mPagePath <pagePath>","\u5c0f\u7a0b\u5e8f\u9884\u89c8\u9884\u89c8\u9875\u9762\u8def\u5f84").option("--mSearchQuery <searchQuery>","\u5c0f\u7a0b\u5e8f\u9884\u89c8\u9884\u89c8\u9875\u9762\u8def\u5f84\u542f\u52a8\u53c2\u6570").action((function(t,n){var i=e(n),s=i[0],m=i.slice(1),l=t.clone,d=t.template,g=t.docs;if(s)switch($("yolk version: ".concat(w.version)),$("node version: ".concat(process.version)),$("platform: ".concat(u.platform())),$("memory: ".concat(c(u.freemem()/1024/1024)," MB(").concat(c(u.totalmem()/1024/1024)," MB)")),s){case"init":if(K("yolk ".concat(s," \u5f00\u59cb")),l)if(d){var h=".yolk",v=f.join(P,h);p.existsSync(v)&&k(v,(function(){K("\u7f13\u5b58\u5220\u9664 success! ".concat(v))})),R({command:"git",args:["clone","-b","master","--depth","1",d,h].concat(m)}),Y(P,v)}else q("--clone \u6a21\u5f0f\u5fc5\u987b\u6709--template");else T(P);break;case"start":V()?M()?R({command:"taro",args:["build","--type","tt","--watch"].concat(m)}):X()?R({command:"taro",args:["build","--type","alipay","--watch"].concat(m)}):R({command:"taro",args:["build","--type","weapp","--watch"].concat(m)}):g?(process.env.DID_YOU_KNOW="none",R({command:"dumi",args:["dev"].concat(m)})):G()?(process.env.DID_YOU_KNOW="none",R({command:"max",args:["dev"].concat(m)})):(process.env.DID_YOU_KNOW="none",R({command:"umi",args:["dev"].concat(m)}));break;case"build":V()?M()?R({command:"taro",args:["build","--type","tt"].concat(m)}):X()?R({command:"taro",args:["build","--type","alipay"].concat(m)}):R({command:"taro",args:["build","--type","weapp"].concat(m)}):g?(process.env.DID_YOU_KNOW="none",R({command:"dumi",args:["build"].concat(m)})):G()?(process.env.DID_YOU_KNOW="none",R({command:"max",args:["setup"].concat(m),complete:function(){return R({command:"max",args:["build"].concat(m)})},exit:!1})):(process.env.DID_YOU_KNOW="none",R({command:"umi",args:["build"].concat(m)}));break;case"pre-commit":te();break;case"miniprogram-upload":if(V())if(M());else if(X());else{var b=ne(t),j=b.appid,S=b.options;$("".concat(j,"\u4e0a\u4f20\u5f00\u59cb")),y.upload(a(a({},r(S,["project","version","desc","setting","robot"])),{},{onProgressUpdate:function(e){if(o(e))$("task: ".concat(e));else{var t=e.status,n=e.message;$("task(".concat(t,"): ").concat(n))}}})).then((function(){K("".concat(j,"\u4e0a\u4f20\u5b8c\u6210"))}))}break;case"miniprogram-preview":if(V())if(M());else if(X());else{var x=ne(t),O=x.appid,D=x.options;$("".concat(O,"\u4e0a\u4f20\u9884\u89c8\u5f00\u59cb")),y.preview(a(a({},r(D,["project","version","desc","setting","robot","qrcodeFormat","qrcodeOutputDest","pagePath","searchQuery"])),{},{onProgressUpdate:function(e){if(o(e))$("task: ".concat(e));else{var t=e.status,n=e.message;$("task(".concat(t,"): ").concat(n))}}})).then((function(){K("".concat(O,"\u4e0a\u4f20\u9884\u89c8\u5b8c\u6210"))}))}break;default:Q()}})).parse(process.argv):Q()};oe();
2
+ import e from"@babel/runtime/helpers/esm/defineProperty";import t from"@babel/runtime/helpers/esm/toArray";import o from"@babel/runtime/helpers/esm/asyncToGenerator";import n from"lodash/pick";import r from"lodash/isString";import a from"lodash/floor";function i(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function c(t){for(var o=1;o<arguments.length;o++){var n=null!=arguments[o]?arguments[o]:{};o%2?i(Object(n),!0).forEach((function(o){e(t,o,n[o])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}import s from"@babel/runtime/regenerator";import{execSync as m,spawn as p}from"child_process";import l from"fs";import d from"os";import u from"path";import{globSync as f}from"glob";import y from"inquirer";import*as g from"miniprogram-ci";import{mkdirpSync as v}from"mkdirp";import{rimrafSync as b}from"rimraf";import h from"../compiled/commander";import j from"../compiled/mustache";import k from"../package.json";import{ENCODING as O,fail as w,getPackageJSON as S,getProjectConfigJSON as x,getYolkConfig as P,info as D,succeed as _,warn as I}from"./util";var K=require("../compiled/staged-git-files"),q=process.cwd(),F="##### CREATED BY YOLK #####",N={ts:"typescript",tsx:"typescript",less:"less",sass:"scss",scss:"scss",css:"css"},E=20,T=["**/node_modules/**","**/.umi/**","**/.umi-production/**","**/build/**","**/dist/**","**/lib/**","**/es/**","**/public/**","**/assets/**","**/h5+app/**","**/android/**","**/ios/**","**/mock/**","**/yolk*/**"],U=function(e){return"win32"===process.platform?"".concat(e,".cmd"):e},Q=function(){_("yolk complete!"),process.exit(0)},Y=function(){I("yolk break!"),process.exit(0)},W=function(e){var t=e.command,o=e.args,n=e.complete,r=e.close,a=e.exit,i=void 0===a||a,c=p(U(t),o||[],{stdio:"inherit"}).on("close",(function(e){e?(r&&r(),w("yolk close!"),process.exit(e)):(n&&n(),i&&Q())}));process.on("SIGINT",(function(){h.runningCommand&&h.runningCommand.kill("SIGKILL"),c.kill(),Y()}))},L=function(e,t,o){y.prompt([{type:"list",name:"type",message:"\u9009\u62e9\u6a21\u7248",default:"web",choices:[{name:"web template(umi framework)",value:"umi-web"},{name:"web big screen template(umi framework)",value:"umi-web-screen"},{name:"mobile template(umi framework)",value:"umi-mobile"},{name:"mobile HBuilderX h5+app template(umi framework)",value:"umi-mobile-h5+app"},{name:"mobile native template(umi framework)",value:"umi-mobile-native"},{name:"miniprogram template",value:"miniprogram"}]},{type:"input",name:"projectName",message:"\u9879\u76ee\u540d\u79f0",default:u.basename(u.basename(process.cwd()))},{type:"list",name:"dependenciesInstallType",message:"\u9009\u62e9\u4f9d\u8d56\u5b89\u88c5\u65b9\u5f0f",default:"default",choices:[{name:"\u9ed8\u8ba4\u5b89\u88c5",value:"default"},{name:"\u8df3\u8fc7\u5b89\u88c5",value:!1},{name:"pnpm install",value:"pnpm"},{name:"yarn install",value:"yarn"},{name:"npm install",value:"npm"}]}]).then((function(n){var r={projectName:n.projectName,dependenciesInstallType:n.dependenciesInstallType,yolkVersion:k.version},a=t||u.join(__dirname,"../templates/".concat(n.type));_("\u590d\u5236\u6a21\u7248 ".concat(u.basename(a)));var i=f("**/*",{cwd:a,dot:!0,ignore:["**/node_modules/**","**/.git/**","**/.DS_Store","**/.idea/**"]});if(i.forEach((function(t){if(a){var o=u.join(a,t);if(!l.statSync(o).isDirectory())if(t.endsWith(".tpl")){var n=l.readFileSync(o,O),i=u.join(e,t.replace(/\.tpl$/,"")),c=j.render(n,r);v(u.dirname(i)),_("\u521b\u5efa ".concat(u.relative(e,i))),l.writeFileSync(i,c,O)}else{_("\u521b\u5efa ".concat(t));var s=u.join(e,t);v(u.dirname(s)),l.copyFileSync(o,s)}}})),_("\u590d\u5236\u6a21\u7248 success!"),o&&l.existsSync(a)&&b(a)&&_("\u7f13\u5b58\u5220\u9664 success! ".concat(u.basename(a||""))),n.dependenciesInstallType)switch(_("\u521d\u59cb\u5316\u4f9d\u8d56\u5305"),n.dependenciesInstallType){case"default":case"pnpm":W({command:"pnpm",args:["install"]});break;case"yarn":W({command:"yarn",args:["install"]});break;case"npm":W({command:"npm",args:["install"]});break;default:}_("\u53ef\u67e5\u9605<<https://303394539.github.io/yolk-docs/>>\u4e86\u89e3\u76f8\u5173\u6587\u6863")}))},R=function(e,t){return L(e,t,!0)},A=function(){return l.existsSync(u.join(q,"project.config.json"))},B=function(){var e=l.existsSync(u.join(q,"node_modules/.bin/max"));if(!e)try{e=l.existsSync(require.resolve("@umijs/max"))}catch(n){}if(!e)try{e=/umi@4\.(\d+)\.(\d+)/.test(m("umi -v").toString())}catch(n){}if(!e){var t=u.join(q,"node_modules","umi","package.json");if(l.existsSync(t))try{var o=JSON.parse(l.readFileSync(t,O))||{};e=o.version&&+o.version.split(".")[0]>3}catch(n){}}return e},C=function(){var e=u.join(q,"project.config.json");if(l.existsSync(e)){var t=require(e);return t.appid}return""},G=function(){return l.existsSync(u.join(q,"project.tt.json"))&&0===C().indexOf("tt")},V=function(){return 0===C().indexOf("20")},$=function(){var e=u.join(q,".git/"),t=u.join(q,".git/hooks"),o=u.join(t,"pre-commit"),n=l.existsSync(e),r=l.existsSync(o),a=r&&l.readFileSync(o,O).includes(F);if(n&&(!r||!a)){v(t),l.writeFileSync(o,["#!/usr/bin/env bash","npx yolk pre-commit","RESULT=$?","[ $RESULT -ne 0 ] && exit 1","exit 0",F].join(d.EOL),O);try{l.chmodSync(o,"777")}catch(i){w("chmod ".concat(o," failed: ").concat(i.message))}_("Create pre-commit hook")}},H=function(){var e=o(s.mark((function e(){var t,o,n,r;return s.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t=P(),o=!1!==t.strict,n=t.eslintIgnore,r=t.stylelintIgnore,I("\u7edf\u4e00\u4ee3\u7801\u89c4\u8303\uff0c\u8fdb\u884c\u4e25\u683c\u7684\u8bed\u6cd5\u68c0\u67e5\u3002"),o&&(I("git commit \u7981\u6b62 lint \u7684 ignore \u884c\u4e3a"),r&&I("\u901a\u8fc7 .yolkrc \u914d\u7f6e stylelintIgnore: ".concat(r,"\u3002")),n&&I("\u901a\u8fc7 .yolkrc \u914d\u7f6e eslintIgnore: ".concat(n,"\u3002"))),W({command:"lint-staged",args:["-c",require.resolve("./.lintstagedrc")]});case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),M=function(e){var t=e.mAppid,o=e.mProject,n=e.mPrivateKeyPath,r=e.mVersion,a=e.mDesc,i=e.mRobot,c=e.mQrcodeFormat,s=e.mQrcodeOutputDest,p=e.mPagePath,d=e.mSearchQuery,f=l.existsSync(u.join(q,".git"))?m("git log -1 --pretty=format:%H").toString():"",y=x(),v=t||y.appid,b=o||u.join(q,"dist"),h=n||u.join(q,"private.".concat(v,".key"));if(l.existsSync(b)){if(l.existsSync(h)){var j=S(),k=r||j.version||y.version||"1.0.0",O=a||j.description||y.description,w="".concat(f?" commit: ".concat(f,";"):"").concat(O?" description: ".concat(O,";"):"");f&&D("commit: ".concat(f)),D("dist: ".concat(b)),D("key: ".concat(h)),D("appid: ".concat(v)),D("version: ".concat(k)),D("desc: ".concat(w));var P=new g.Project({appid:v,type:"miniProgram",projectPath:b,privateKeyPath:h,ignores:["node_modules/**/*","**/*.txt","**/*.key","**/*.less","**/*.sass","**/*.scss","**/*.css","**/*.jsx","**/*.ts","**/*.tsx","**/*.md"]});return{appid:v,options:{project:P,version:k,desc:w,setting:y.setting,robot:i,qrcodeFormat:c,qrcodeOutputDest:s,pagePath:p,searchQuery:d}}}throw Error("\u6ca1\u6709\u627e\u5230\u4e0a\u4f20\u5bc6\u94a5(".concat(h,")"))}throw Error("\u6ca1\u6709\u627e\u5230dist\u76ee\u5f55(".concat(b,")"))},J=function(){$(),process.argv.length>2?h.version(k.version,"-v,--version","\u8f93\u51fa\u7248\u672c\u53f7").usage("[command] [options]").option("--clone","\u901a\u8fc7git clone\u62c9\u53d6\u6a21\u7248").option("--template <template>","\u6a21\u7248\u540d\u79f0\u6216\u8005clone\u6a21\u5f0f\u7684git\u5730\u5740").option("--docs","\u542f\u52a8\u6587\u6863\u6a21\u5f0f").option("--mAppid <appid>","\u5c0f\u7a0b\u5e8fappid").option("--mProject <project>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u5de5\u7a0b\u76ee\u5f55").option("--mPrivateKeyPath <privateKeyPath>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20key\u6587\u4ef6").option("--mVersion <version>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u7248\u672c\u53f7").option("--mDesc <desc>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u63cf\u8ff0").option("--mRobot <robot>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20ci\u673a\u5668\u4eba1~30").option("--mQrcodeFormat <qrcodeFormat>",'\u5c0f\u7a0b\u5e8f\u9884\u89c8\u8fd4\u56de\u4e8c\u7ef4\u7801\u6587\u4ef6\u7684\u683c\u5f0f "image" \u6216 "base64"\uff0c \u9ed8\u8ba4\u503c "terminal" \u4f9b\u8c03\u8bd5\u7528').option("--mQrcodeOutputDest <qrcodeOutputDest>","\u5c0f\u7a0b\u5e8f\u9884\u89c8\u4e8c\u7ef4\u7801\u6587\u4ef6\u4fdd\u5b58\u8def\u5f84").option("--mPagePath <pagePath>","\u5c0f\u7a0b\u5e8f\u9884\u89c8\u9884\u89c8\u9875\u9762\u8def\u5f84").option("--mSearchQuery <searchQuery>","\u5c0f\u7a0b\u5e8f\u9884\u89c8\u9884\u89c8\u9875\u9762\u8def\u5f84\u542f\u52a8\u53c2\u6570").action((function(e,o){var i=t(o),s=i[0],m=i.slice(1),p=e.clone,f=e.template,y=e.docs;if(s)switch(D("yolk version: ".concat(k.version)),D("node version: ".concat(process.version)),D("platform: ".concat(d.platform())),D("memory: ".concat(a(d.freemem()/1024/1024)," MB(").concat(a(d.totalmem()/1024/1024)," MB)")),s){case"init":if(_("yolk ".concat(s," \u5f00\u59cb")),p)if(f){var v=".yolk",h=u.join(q,v);l.existsSync(h)&&b(h)&&_("\u7f13\u5b58\u5220\u9664 success! ".concat(h)),W({command:"git",args:["clone","-b","master","--depth","1",f,v].concat(m)}),R(q,h)}else w("--clone \u6a21\u5f0f\u5fc5\u987b\u6709--template");else L(q);break;case"start":A()?G()?W({command:"taro",args:["build","--type","tt","--watch"].concat(m)}):V()?W({command:"taro",args:["build","--type","alipay","--watch"].concat(m)}):W({command:"taro",args:["build","--type","weapp","--watch"].concat(m)}):y?(process.env.DID_YOU_KNOW="none",W({command:"dumi",args:["dev"].concat(m)})):B()?(process.env.DID_YOU_KNOW="none",W({command:"max",args:["dev"].concat(m)})):(process.env.DID_YOU_KNOW="none",W({command:"umi",args:["dev"].concat(m)}));break;case"build":A()?G()?W({command:"taro",args:["build","--type","tt"].concat(m)}):V()?W({command:"taro",args:["build","--type","alipay"].concat(m)}):W({command:"taro",args:["build","--type","weapp"].concat(m)}):y?(process.env.DID_YOU_KNOW="none",W({command:"dumi",args:["build"].concat(m)})):B()?(process.env.DID_YOU_KNOW="none",W({command:"max",args:["setup"].concat(m),complete:function(){return W({command:"max",args:["build"].concat(m)})},exit:!1})):(process.env.DID_YOU_KNOW="none",W({command:"umi",args:["build"].concat(m)}));break;case"pre-commit":H();break;case"miniprogram-upload":if(A())if(G());else if(V());else{var j=M(e),O=j.appid,S=j.options;D("".concat(O,"\u4e0a\u4f20\u5f00\u59cb")),g.upload(c(c({},n(S,["project","version","desc","setting","robot"])),{},{onProgressUpdate:function(e){if(r(e))D("task: ".concat(e));else{var t=e.status,o=e.message;D("task(".concat(t,"): ").concat(o))}}})).then((function(){_("".concat(O,"\u4e0a\u4f20\u5b8c\u6210"))}))}break;case"miniprogram-preview":if(A())if(G());else if(V());else{var x=M(e),P=x.appid,I=x.options;D("".concat(P,"\u4e0a\u4f20\u9884\u89c8\u5f00\u59cb")),g.preview(c(c({},n(I,["project","version","desc","setting","robot","qrcodeFormat","qrcodeOutputDest","pagePath","searchQuery"])),{},{onProgressUpdate:function(e){if(r(e))D("task: ".concat(e));else{var t=e.status,o=e.message;D("task(".concat(t,"): ").concat(o))}}})).then((function(){_("".concat(P,"\u4e0a\u4f20\u9884\u89c8\u5b8c\u6210"))}))}break;default:Y()}})).parse(process.argv):Y()};J();
@@ -0,0 +1,27 @@
1
+ const {
2
+ getYolkConfig,
3
+ getEsLintConfigPath,
4
+ getStyleLintConfigPath,
5
+ } = require('./util');
6
+
7
+ const yolkConfig = getYolkConfig();
8
+ const isStrict = yolkConfig.strict !== false;
9
+
10
+ const prettierCLI = 'prettier --write';
11
+ const eslintCLI = `eslint --fix ${
12
+ isStrict ? '--no-inline-config --no-ignore' : ''
13
+ } --no-error-on-unmatched-pattern --config ${getEsLintConfigPath()}`;
14
+ const stylelintCLI = `stylelint --fix ${
15
+ isStrict ? '--ignore-disables' : ''
16
+ } '--allow-empty-input' --config ${getStyleLintConfigPath()}`;
17
+
18
+ module.exports = {
19
+ '*.{md,json}': [prettierCLI],
20
+ '*.less': [prettierCLI, `${stylelintCLI} --custom-syntax postcss-less`],
21
+ '*.{sass,scss}': [
22
+ prettierCLI,
23
+ `${stylelintCLI} --custom-syntax postcss-scss`,
24
+ ],
25
+ '*.{js,jsx}': [prettierCLI, eslintCLI],
26
+ '*.{ts,tsx}': [`${prettierCLI} --parser=typescript`, eslintCLI],
27
+ };
package/lib/util.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ import ora from 'ora';
2
+ export declare type YolkConfig = {
3
+ strict?: boolean;
4
+ eslintIgnore?: string | string[] | RegExp | RegExp[];
5
+ stylelintIgnore?: string | string[] | RegExp | RegExp[];
6
+ lintStaged?: boolean;
7
+ };
8
+ export declare const ENCODING = "utf-8";
9
+ export declare const warn: (text?: string) => "" | ora.Ora | undefined;
10
+ export declare const fail: (text?: string) => "" | ora.Ora | undefined;
11
+ export declare const succeed: (text?: string) => "" | ora.Ora | undefined;
12
+ export declare const info: (text?: string) => "" | ora.Ora | undefined;
13
+ export declare const getYolkConfig: () => YolkConfig;
14
+ export declare const getPrettierConfig: () => any;
15
+ export declare const getProjectConfigJSON: () => any;
16
+ export declare const getPackageJSON: () => any;
17
+ export declare const getEsLintConfigPath: () => string;
18
+ export declare const getStyleLintConfigPath: () => string;
package/lib/util.js ADDED
@@ -0,0 +1 @@
1
+ var e=Object.create,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,c=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,a=(e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})},i=(e,c,a,i)=>{if(c&&"object"===typeof c||"function"===typeof c)for(let s of n(c))o.call(e,s)||s===a||t(e,s,{get:()=>c[s],enumerable:!(i=r(c,s))||i.enumerable});return e},s=(r,n,o)=>(o=null!=r?e(c(r)):{},i(!n&&r&&r.__esModule?o:t(o,"default",{value:r,enumerable:!0}),r)),f=e=>i(t({},"__esModule",{value:!0}),e),l={};a(l,{ENCODING:()=>p,fail:()=>O,getEsLintConfigPath:()=>k,getPackageJSON:()=>N,getPrettierConfig:()=>w,getProjectConfigJSON:()=>x,getStyleLintConfigPath:()=>q,getYolkConfig:()=>P,info:()=>h,succeed:()=>m,warn:()=>b}),module.exports=f(l);var u=s(require("fs")),g=s(require("path")),y=require("glob"),d=s(require("ora")),S=process.cwd(),p="utf-8",j=(0,d.default)(),b=e=>e&&j.warn(Buffer.from(e,p).toString()),O=e=>e&&j.fail(Buffer.from(e,p).toString()),m=e=>e&&j.succeed(Buffer.from(e,p).toString()),h=e=>e&&j.info(Buffer.from(e,p).toString()),P=()=>{const e=(0,y.globSync)("*.yolkrc*",{cwd:S,dot:!0});if(!e.length)return{};const t=g.default.join(S,e[0]);if(!u.default.existsSync(t))return{};try{return JSON.parse(u.default.readFileSync(t,p))||{}}catch(r){return O(r.message||".yolkrc\u8f6c\u6362\u9519\u8bef"),{}}},w=()=>{const e=g.default.join(S,".prettierrc");if(u.default.existsSync(e))try{return JSON.parse(u.default.readFileSync(e,p))||{}}catch(t){return O(t.message||".prettierrc\u8f6c\u6362\u9519\u8bef"),{}}return require("./.prettierrc")},x=()=>{const e=g.default.join(S,"project.config.json");if(!u.default.existsSync(e))return{};try{return JSON.parse(u.default.readFileSync(e,p))||{}}catch(t){return O(t.message||"project.config.json\u8f6c\u6362\u9519\u8bef"),{}}},N=()=>{const e=g.default.join(S,"package.json");if(!u.default.existsSync(e))return{};try{return JSON.parse(u.default.readFileSync(e,p))||{}}catch(t){return O(t.message||"package.json\u8f6c\u6362\u9519\u8bef"),{}}},k=()=>{const e=P();let t="";try{t=require.resolve("@baic/eslint-config-yolk")}catch(c){}const r=(0,y.globSync)("*.eslintrc*",{cwd:S,dot:!0}),n=r[0];return!1===e.strict&&n&&u.default.existsSync(n)?n:u.default.existsSync(t)?t:n},q=()=>{const e=P();let t="";try{t=require.resolve("@baic/stylelint-config-yolk")}catch(c){}const r=(0,y.globSync)("*.stylelintrc*",{cwd:S,dot:!0}),n=r[0];return!1===e.strict&&n&&u.default.existsSync(n)?n:u.default.existsSync(t)?t:n};
package/lib/yolk.d.ts CHANGED
@@ -1,6 +1,2 @@
1
1
  #! /usr/bin/env node
2
- export declare type YolkConfig = {
3
- strict?: boolean;
4
- eslintIgnore?: string | string[] | RegExp | RegExp[];
5
- stylelintIgnore?: string | string[] | RegExp | RegExp[];
6
- };
2
+ export {};
package/lib/yolk.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #! /usr/bin/env node
2
- var e=Object.create,t=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,n=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,o=(e,n,o,r)=>{if(n&&"object"===typeof n||"function"===typeof n)for(let c of a(n))i.call(e,c)||c===o||t(e,c,{get:()=>n[c],enumerable:!(r=s(n,c))||r.enumerable});return e},r=(s,a,i)=>(i=null!=s?e(n(s)):{},o(!a&&s&&s.__esModule?i:t(i,"default",{value:s,enumerable:!0}),s)),c=e=>o(t({},"__esModule",{value:!0}),e),l={};module.exports=c(l);var d=require("child_process"),u=r(require("fs")),m=r(require("os")),p=r(require("path")),f=r(require("lodash")),y=r(require("inquirer")),g=r(require("miniprogram-ci")),h=r(require("ora")),$=r(require("../compiled/commander")),b=r(require("../compiled/glob")),x=r(require("../compiled/minimatch")),S=r(require("../compiled/mkdirp")),j=r(require("../compiled/mustache")),v=require("../compiled/prettier"),k=r(require("../compiled/rimraf")),w=r(require("../package.json")),O=require("../compiled/staged-git-files"),q=process.cwd(),P="##### CREATED BY YOLK #####",_={ts:"typescript",tsx:"typescript",less:"less",sass:"scss",scss:"scss",css:"css"},D="utf-8",F=20,I=["**/node_modules/**","**/.umi/**","**/.umi-production/**","**/build/**","**/dist/**","**/lib/**","**/es/**","**/public/**","**/assets/**","**/h5+app/**","**/android/**","**/ios/**","**/mock/**","**/yolk*/**"],E=(0,h.default)(),N=e=>e&&E.warn(Buffer.from(e,D).toString()),B=e=>e&&E.fail(Buffer.from(e,D).toString()),K=e=>e&&E.succeed(Buffer.from(e,D).toString()),U=e=>e&&E.info(Buffer.from(e,D).toString()),Q=e=>"win32"===process.platform?`${e}.cmd`:e,R=()=>{K("yolk complete!"),process.exit(0)},T=()=>{N("yolk break!"),process.exit(0)},Y=({command:e,args:t,complete:s,close:a,exit:n=!0})=>{const i=(0,d.spawn)(Q(e),t||[],{stdio:"inherit"}).on("close",(e=>{e?(a&&a(),B("yolk close!"),process.exit(e)):(s&&s(),n&&R())}));process.on("SIGINT",(()=>{$.default.runningCommand&&$.default.runningCommand.kill("SIGKILL"),i.kill(),T()}))},A=(e,t,s)=>{y.default.prompt([{type:"list",name:"type",message:"\u9009\u62e9\u6a21\u7248",default:"web",choices:[{name:"web template(umi framework)",value:"umi-web"},{name:"web big screen template(umi framework)",value:"umi-web-screen"},{name:"mobile template(umi framework)",value:"umi-mobile"},{name:"mobile HBuilderX h5+app template(umi framework)",value:"umi-mobile-h5+app"},{name:"mobile native template(umi framework)",value:"umi-mobile-native"},{name:"miniprogram template",value:"miniprogram"}]},{type:"input",name:"projectName",message:"\u9879\u76ee\u540d\u79f0",default:p.default.basename(p.default.basename(process.cwd()))},{type:"list",name:"dependenciesInstallType",message:"\u9009\u62e9\u4f9d\u8d56\u5b89\u88c5\u65b9\u5f0f",default:"default",choices:[{name:"\u9ed8\u8ba4\u5b89\u88c5",value:"default"},{name:"\u8df3\u8fc7\u5b89\u88c5",value:!1},{name:"pnpm install",value:"pnpm"},{name:"yarn install",value:"yarn"},{name:"npm install",value:"npm"}]}]).then((a=>{const n={projectName:a.projectName,dependenciesInstallType:a.dependenciesInstallType,yolkVersion:w.default.version},i=t||p.default.join(__dirname,`../templates/${a.type}`);K(`\u590d\u5236\u6a21\u7248 ${p.default.basename(i)}`);const o=b.default.sync("**/*",{cwd:i,dot:!0,ignore:["**/node_modules/**","**/.git/**","**/.DS_Store","**/.idea/**"]});if(o.forEach((t=>{if(!i)return;const s=p.default.join(i,t);if(!u.default.statSync(s).isDirectory())if(t.endsWith(".tpl")){const a=u.default.readFileSync(s,D),i=p.default.join(e,t.replace(/\.tpl$/,"")),o=j.default.render(a,n);S.default.sync(p.default.dirname(i)),K(`\u521b\u5efa ${p.default.relative(e,i)}`),u.default.writeFileSync(i,o,D)}else{K(`\u521b\u5efa ${t}`);const a=p.default.join(e,t);S.default.sync(p.default.dirname(a)),u.default.copyFileSync(s,a)}})),K("\u590d\u5236\u6a21\u7248 success!"),s&&u.default.existsSync(i)&&(0,k.default)(i,(()=>{K(`\u7f13\u5b58\u5220\u9664 success! ${p.default.basename(i||"")}`)})),a.dependenciesInstallType)switch(K("\u521d\u59cb\u5316\u4f9d\u8d56\u5305"),a.dependenciesInstallType){case"default":case"pnpm":Y({command:"pnpm",args:["install"]});break;case"yarn":Y({command:"yarn",args:["install"]});break;case"npm":Y({command:"npm",args:["install"]});break;default:}K("\u53ef\u67e5\u9605<<https://303394539.github.io/yolk-docs/>>\u4e86\u89e3\u76f8\u5173\u6587\u6863")}))},W=(e,t)=>A(e,t,!0),L=()=>{const e=b.default.sync("*.yolkrc*",{cwd:q,dot:!0});if(!e.length)return{};const t=p.default.join(q,e[0]);if(!u.default.existsSync(t))return{};try{return JSON.parse(u.default.readFileSync(t,D))||{}}catch(s){return B(s.message||".yolkrc\u8f6c\u6362\u9519\u8bef"),{}}},J=()=>{const e=p.default.join(q,".prettierrc");if(u.default.existsSync(e))try{return JSON.parse(u.default.readFileSync(e,D))||{}}catch(t){return B(t.message||".prettierrc\u8f6c\u6362\u9519\u8bef"),{}}return require("./.prettierrc")},C=()=>{const e=p.default.join(q,"project.config.json");if(!u.default.existsSync(e))return{};try{return JSON.parse(u.default.readFileSync(e,D))||{}}catch(t){return B(t.message||"project.config.json\u8f6c\u6362\u9519\u8bef"),{}}},M=()=>{const e=p.default.join(q,"package.json");if(!u.default.existsSync(e))return{};try{return JSON.parse(u.default.readFileSync(e,D))||{}}catch(t){return B(t.message||"package.json\u8f6c\u6362\u9519\u8bef"),{}}},V=()=>u.default.existsSync(p.default.join(q,"project.config.json")),G=()=>{let e=u.default.existsSync(p.default.join(q,"node_modules/.bin/max"));if(!e)try{e=u.default.existsSync(require.resolve("@umijs/max"))}catch(t){}if(!e)try{e=/umi@4\.(\d+)\.(\d+)/.test((0,d.execSync)("umi -v").toString())}catch(t){}if(!e){const s=p.default.join(q,"node_modules","umi","package.json");if(u.default.existsSync(s))try{const t=JSON.parse(u.default.readFileSync(s,D))||{};e=t.version&&+t.version.split(".")[0]>3}catch(t){}}return e},H=()=>{const e=p.default.join(q,"project.config.json");if(u.default.existsSync(e)){const t=require(e);return t.appid}return""},X=()=>u.default.existsSync(p.default.join(q,"project.tt.json"))&&0===H().indexOf("tt"),z=()=>0===H().indexOf("20"),Z=()=>{const e=L();let t="";try{t=require.resolve("@baic/eslint-config-yolk")}catch(n){}const s=b.default.sync("*.eslintrc*",{cwd:q,dot:!0}),a=s[0];return!1===e.strict&&a&&u.default.existsSync(a)?a:u.default.existsSync(t)?t:a},ee=()=>{const e=L();let t="";try{t=require.resolve("@baic/stylelint-config-yolk")}catch(n){}const s=b.default.sync("*.stylelintrc*",{cwd:q,dot:!0}),a=s[0];return!1===e.strict&&a&&u.default.existsSync(a)?a:u.default.existsSync(t)?t:a},te=()=>{const e=p.default.join(q,".git/"),t=p.default.join(q,".git/hooks"),s=p.default.join(t,"pre-commit"),a=u.default.existsSync(e),n=u.default.existsSync(s),i=n&&u.default.readFileSync(s,D).includes(P);if(a&&(!n||!i)){S.default.sync(t),u.default.writeFileSync(s,["#!/usr/bin/env bash","npx yolk pre-commit","RESULT=$?","[ $RESULT -ne 0 ] && exit 1","exit 0",P].join(m.default.EOL),D);try{u.default.chmodSync(s,"777")}catch(o){B(`chmod ${s} failed: ${o.message}`)}K("Create pre-commit hook")}},se=()=>{const e=L(),t=!1!==e.strict,s=e.eslintIgnore,a=e.stylelintIgnore;O().then((e=>{const n=s=>new Promise(((n,i)=>{const o=ee();if(o){const r=e.map((e=>e.filename)).filter((e=>/^(src|tests)/i.test(e))).filter((e=>({css:/\.cs{2}$/i,less:/\.les{2}$/i,sass:/\.sas{2}$/i,scss:/\.scs{2}$/i}[s].test(e)))).filter((e=>{const t=p.default.join(q,e);return u.default.existsSync(t)})).filter((e=>I.every((t=>!(0,x.default)(e,t,{matchBase:!0}))))).filter((e=>"string"===typeof a?!(0,x.default)(e,a,{matchBase:!0}):a instanceof RegExp?!a.test(e):!Array.isArray(a)||a.every((t=>"string"===typeof t?!(0,x.default)(e,t,{matchBase:!0}):!(t instanceof RegExp)||!t.test(e)))));if(r.length)if(r.forEach((e=>{if(e&&u.default.existsSync(e)){const t=p.default.extname(e).replace(/^\./,""),s=u.default.readFileSync(e,D),a=(0,v.format)(s,{parser:_[t],...J()});u.default.writeFileSync(e,a,D)}})),K(`${s} - ${r.length} files prettier success!`),r.length>=F){const e=[];f.default.chunk(r,F).forEach((a=>{e.push(new Promise(((e,n)=>{Y({command:"stylelint",args:[t?"--ignore-disables":"","--allow-empty-input","--custom-syntax",`postcss-${s}`,"--config",o,...a],complete:e,close:n,exit:!1})})))}));let a=0;const c=()=>{a<e.length?e[a].then((()=>{a++,c()})).catch(i):(K(`${s} - ${r.length} files stylelint success!`),n())};c()}else r.length&&Y({command:"stylelint",args:[t?"--ignore-disables":"","--allow-empty-input","--custom-syntax",`postcss-${s}`,"--config",o,...r],complete:()=>{K(`${s} - ${r.length} files stylelint success!`),n()},close:i,exit:!1});else n()}else B(`\u6ca1\u6709 stylelintrc \u6587\u4ef6\uff0c${s} files prettier fail!`),n()})),i=a=>new Promise(((n,i)=>{const o=Z();if(o){const r=e.map((e=>e.filename)).filter((e=>/^(src|tests)/i.test(e))).filter((e=>({js:/\.js$/i,jsx:/\.jsx$/i,ts:/\.ts$/i,tsx:/\.tsx$/i}[a].test(e)))).filter((e=>{const t=p.default.join(q,e);return u.default.existsSync(t)})).filter((e=>I.every((t=>!(0,x.default)(e,t,{matchBase:!0}))))).filter((e=>"string"===typeof s?!(0,x.default)(e,s,{matchBase:!0}):s instanceof RegExp?!s.test(e):!Array.isArray(s)||s.every((t=>"string"===typeof t?!(0,x.default)(e,t,{matchBase:!0}):!(t instanceof RegExp)||!t.test(e)))));if(r.length)if(r.forEach((e=>{if(e&&u.default.existsSync(e)){const t=p.default.extname(e).replace(/^\./,""),s=u.default.readFileSync(e,D),a=(0,v.format)(s,{parser:_[t],...J()});u.default.writeFileSync(e,a,D)}})),K(`${a} - ${r.length} files prettier success!`),r.length>=F){const e=[];f.default.chunk(r,F).forEach((s=>{e.push(new Promise(((e,a)=>{Y({command:"eslint",args:[t?"--no-inline-config --no-ignore":"","--no-error-on-unmatched-pattern","--config",o,...s],complete:e,close:a,exit:!1})})))}));let s=0;const c=()=>{s<e.length?e[s].then((()=>{s++,c()})).catch(i):(K(`${a} - ${r.length} files eslint success!`),n())};c()}else r.length&&Y({command:"eslint",args:[t?"--no-inline-config --no-ignore":"","--no-error-on-unmatched-pattern","--config",o,...r],complete:()=>{K(`${a} - ${r.length} files eslint success!`),n()},close:i,exit:!1});else n()}else B(`\u6ca1\u6709 eslintrc \u6587\u4ef6\uff0c${a} files eslint fail!`),n()}));N("\u7edf\u4e00\u4ee3\u7801\u89c4\u8303\uff0c\u8fdb\u884c\u4e25\u683c\u7684\u8bed\u6cd5\u68c0\u67e5\u3002"),t&&(N("git commit \u7981\u6b62 lint \u7684 ignore \u884c\u4e3a"),a&&N(`\u901a\u8fc7 .yolkrc \u914d\u7f6e stylelintIgnore: ${a}\u3002`),s&&N(`\u901a\u8fc7 .yolkrc \u914d\u7f6e eslintIgnore: ${s}\u3002`)),n("css").then((()=>n("less"))).then((()=>n("sass"))).then((()=>n("scss"))).then((()=>i("js"))).then((()=>i("jsx"))).then((()=>i("ts"))).then((()=>i("tsx"))).then(R).catch(R)}))},ae=({mAppid:e,mProject:t,mPrivateKeyPath:s,mVersion:a,mDesc:n,mRobot:i,mQrcodeFormat:o,mQrcodeOutputDest:r,mPagePath:c,mSearchQuery:l})=>{const m=u.default.existsSync(p.default.join(q,".git"))?(0,d.execSync)("git log -1 --pretty=format:%H").toString():"",f=C(),y=e||f.appid,h=t||p.default.join(q,"dist"),$=s||p.default.join(q,`private.${y}.key`);if(u.default.existsSync(h)){if(u.default.existsSync($)){const e=M(),t=a||e.version||f.version||"1.0.0",s=n||e.description||f.description,d=`${m?` commit: ${m};`:""}${s?` description: ${s};`:""}`;m&&U(`commit: ${m}`),U(`dist: ${h}`),U(`key: ${$}`),U(`appid: ${y}`),U(`version: ${t}`),U(`desc: ${d}`);const u=new g.Project({appid:y,type:"miniProgram",projectPath:h,privateKeyPath:$,ignores:["node_modules/**/*","**/*.txt","**/*.key","**/*.less","**/*.sass","**/*.scss","**/*.css","**/*.jsx","**/*.ts","**/*.tsx","**/*.md"]});return{appid:y,options:{project:u,version:t,desc:d,setting:f.setting,robot:i,qrcodeFormat:o,qrcodeOutputDest:r,pagePath:c,searchQuery:l}}}throw Error(`\u6ca1\u6709\u627e\u5230\u4e0a\u4f20\u5bc6\u94a5(${$})`)}throw Error(`\u6ca1\u6709\u627e\u5230dist\u76ee\u5f55(${h})`)},ne=()=>{te(),process.argv.length>2?$.default.version(w.default.version,"-v,--version","\u8f93\u51fa\u7248\u672c\u53f7").usage("[command] [options]").option("--clone","\u901a\u8fc7git clone\u62c9\u53d6\u6a21\u7248").option("--template <template>","\u6a21\u7248\u540d\u79f0\u6216\u8005clone\u6a21\u5f0f\u7684git\u5730\u5740").option("--docs","\u542f\u52a8\u6587\u6863\u6a21\u5f0f").option("--mAppid <appid>","\u5c0f\u7a0b\u5e8fappid").option("--mProject <project>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u5de5\u7a0b\u76ee\u5f55").option("--mPrivateKeyPath <privateKeyPath>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20key\u6587\u4ef6").option("--mVersion <version>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u7248\u672c\u53f7").option("--mDesc <desc>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u63cf\u8ff0").option("--mRobot <robot>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20ci\u673a\u5668\u4eba1~30").option("--mQrcodeFormat <qrcodeFormat>",'\u5c0f\u7a0b\u5e8f\u9884\u89c8\u8fd4\u56de\u4e8c\u7ef4\u7801\u6587\u4ef6\u7684\u683c\u5f0f "image" \u6216 "base64"\uff0c \u9ed8\u8ba4\u503c "terminal" \u4f9b\u8c03\u8bd5\u7528').option("--mQrcodeOutputDest <qrcodeOutputDest>","\u5c0f\u7a0b\u5e8f\u9884\u89c8\u4e8c\u7ef4\u7801\u6587\u4ef6\u4fdd\u5b58\u8def\u5f84").option("--mPagePath <pagePath>","\u5c0f\u7a0b\u5e8f\u9884\u89c8\u9884\u89c8\u9875\u9762\u8def\u5f84").option("--mSearchQuery <searchQuery>","\u5c0f\u7a0b\u5e8f\u9884\u89c8\u9884\u89c8\u9875\u9762\u8def\u5f84\u542f\u52a8\u53c2\u6570").action(((e,t)=>{const[s,...a]=t,{clone:n,template:i,docs:o}=e;if(s)switch(U(`yolk version: ${w.default.version}`),U(`node version: ${process.version}`),U(`platform: ${m.default.platform()}`),U(`memory: ${f.default.floor(m.default.freemem()/1024/1024)} MB(${f.default.floor(m.default.totalmem()/1024/1024)} MB)`),s){case"init":if(K(`yolk ${s} \u5f00\u59cb`),n)if(i){const e=".yolk",t=p.default.join(q,e);u.default.existsSync(t)&&(0,k.default)(t,(()=>{K(`\u7f13\u5b58\u5220\u9664 success! ${t}`)})),Y({command:"git",args:["clone","-b","master","--depth","1",i,e].concat(a)}),W(q,t)}else B("--clone \u6a21\u5f0f\u5fc5\u987b\u6709--template");else A(q);break;case"start":V()?X()?Y({command:"taro",args:["build","--type","tt","--watch"].concat(a)}):z()?Y({command:"taro",args:["build","--type","alipay","--watch"].concat(a)}):Y({command:"taro",args:["build","--type","weapp","--watch"].concat(a)}):o?(process.env.DID_YOU_KNOW="none",Y({command:"dumi",args:["dev"].concat(a)})):G()?(process.env.DID_YOU_KNOW="none",Y({command:"max",args:["dev"].concat(a)})):(process.env.DID_YOU_KNOW="none",Y({command:"umi",args:["dev"].concat(a)}));break;case"build":V()?X()?Y({command:"taro",args:["build","--type","tt"].concat(a)}):z()?Y({command:"taro",args:["build","--type","alipay"].concat(a)}):Y({command:"taro",args:["build","--type","weapp"].concat(a)}):o?(process.env.DID_YOU_KNOW="none",Y({command:"dumi",args:["build"].concat(a)})):G()?(process.env.DID_YOU_KNOW="none",Y({command:"max",args:["setup"].concat(a),complete:()=>Y({command:"max",args:["build"].concat(a)}),exit:!1})):(process.env.DID_YOU_KNOW="none",Y({command:"umi",args:["build"].concat(a)}));break;case"pre-commit":se();break;case"miniprogram-upload":if(V())if(X());else if(z());else{const{appid:t,options:s}=ae(e);U(`${t}\u4e0a\u4f20\u5f00\u59cb`),g.upload({...f.default.pick(s,["project","version","desc","setting","robot"]),onProgressUpdate:e=>{if(f.default.isString(e))U(`task: ${e}`);else{const{status:t,message:s}=e;U(`task(${t}): ${s}`)}}}).then((()=>{K(`${t}\u4e0a\u4f20\u5b8c\u6210`)}))}break;case"miniprogram-preview":if(V())if(X());else if(z());else{const{appid:t,options:s}=ae(e);U(`${t}\u4e0a\u4f20\u9884\u89c8\u5f00\u59cb`),g.preview({...f.default.pick(s,["project","version","desc","setting","robot","qrcodeFormat","qrcodeOutputDest","pagePath","searchQuery"]),onProgressUpdate:e=>{if(f.default.isString(e))U(`task: ${e}`);else{const{status:t,message:s}=e;U(`task(${t}): ${s}`)}}}).then((()=>{K(`${t}\u4e0a\u4f20\u9884\u89c8\u5b8c\u6210`)}))}break;default:T()}})).parse(process.argv):T()};ne();
2
+ var e=Object.create,t=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,n=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,r=(e,n,r,s)=>{if(n&&"object"===typeof n||"function"===typeof n)for(let c of o(n))i.call(e,c)||c===r||t(e,c,{get:()=>n[c],enumerable:!(s=a(n,c))||s.enumerable});return e},s=(a,o,i)=>(i=null!=a?e(n(a)):{},r(!o&&a&&a.__esModule?i:t(i,"default",{value:a,enumerable:!0}),a)),c=require("child_process"),l=s(require("fs")),m=s(require("os")),d=s(require("path")),p=require("lodash"),u=require("glob"),f=s(require("inquirer")),y=s(require("miniprogram-ci")),g=require("mkdirp"),b=require("rimraf"),v=s(require("../compiled/commander")),h=s(require("../compiled/mustache")),k=s(require("../package.json")),j=require("./util"),S=require("../compiled/staged-git-files"),$=process.cwd(),O="##### CREATED BY YOLK #####",w=e=>"win32"===process.platform?`${e}.cmd`:e,x=()=>{(0,j.succeed)("yolk complete!"),process.exit(0)},D=()=>{(0,j.warn)("yolk break!"),process.exit(0)},P=({command:e,args:t,complete:a,close:o,exit:n=!0})=>{const i=(0,c.spawn)(w(e),t||[],{stdio:"inherit"}).on("close",(e=>{e?(o&&o(),(0,j.fail)("yolk close!"),process.exit(e)):(a&&a(),n&&x())}));process.on("SIGINT",(()=>{v.default.runningCommand&&v.default.runningCommand.kill("SIGKILL"),i.kill(),D()}))},q=(e,t,a)=>{f.default.prompt([{type:"list",name:"type",message:"\u9009\u62e9\u6a21\u7248",default:"web",choices:[{name:"web template(umi framework)",value:"umi-web"},{name:"web big screen template(umi framework)",value:"umi-web-screen"},{name:"mobile template(umi framework)",value:"umi-mobile"},{name:"mobile HBuilderX h5+app template(umi framework)",value:"umi-mobile-h5+app"},{name:"mobile native template(umi framework)",value:"umi-mobile-native"},{name:"miniprogram template",value:"miniprogram"}]},{type:"input",name:"projectName",message:"\u9879\u76ee\u540d\u79f0",default:d.default.basename(d.default.basename(process.cwd()))},{type:"list",name:"dependenciesInstallType",message:"\u9009\u62e9\u4f9d\u8d56\u5b89\u88c5\u65b9\u5f0f",default:"default",choices:[{name:"\u9ed8\u8ba4\u5b89\u88c5",value:"default"},{name:"\u8df3\u8fc7\u5b89\u88c5",value:!1},{name:"pnpm install",value:"pnpm"},{name:"yarn install",value:"yarn"},{name:"npm install",value:"npm"}]}]).then((o=>{const n={projectName:o.projectName,dependenciesInstallType:o.dependenciesInstallType,yolkVersion:k.default.version},i=t||d.default.join(__dirname,`../templates/${o.type}`);(0,j.succeed)(`\u590d\u5236\u6a21\u7248 ${d.default.basename(i)}`);const r=(0,u.globSync)("**/*",{cwd:i,dot:!0,ignore:["**/node_modules/**","**/.git/**","**/.DS_Store","**/.idea/**"]});if(r.forEach((t=>{if(!i)return;const a=d.default.join(i,t);if(!l.default.statSync(a).isDirectory())if(t.endsWith(".tpl")){const o=l.default.readFileSync(a,j.ENCODING),i=d.default.join(e,t.replace(/\.tpl$/,"")),r=h.default.render(o,n);(0,g.mkdirpSync)(d.default.dirname(i)),(0,j.succeed)(`\u521b\u5efa ${d.default.relative(e,i)}`),l.default.writeFileSync(i,r,j.ENCODING)}else{(0,j.succeed)(`\u521b\u5efa ${t}`);const o=d.default.join(e,t);(0,g.mkdirpSync)(d.default.dirname(o)),l.default.copyFileSync(a,o)}})),(0,j.succeed)("\u590d\u5236\u6a21\u7248 success!"),a&&l.default.existsSync(i)&&(0,b.rimrafSync)(i)&&(0,j.succeed)(`\u7f13\u5b58\u5220\u9664 success! ${d.default.basename(i||"")}`),o.dependenciesInstallType)switch((0,j.succeed)("\u521d\u59cb\u5316\u4f9d\u8d56\u5305"),o.dependenciesInstallType){case"default":case"pnpm":P({command:"pnpm",args:["install"]});break;case"yarn":P({command:"yarn",args:["install"]});break;case"npm":P({command:"npm",args:["install"]});break;default:}(0,j.succeed)("\u53ef\u67e5\u9605<<https://303394539.github.io/yolk-docs/>>\u4e86\u89e3\u76f8\u5173\u6587\u6863")}))},I=(e,t)=>q(e,t,!0),N=()=>l.default.existsSync(d.default.join($,"project.config.json")),_=()=>{let e=l.default.existsSync(d.default.join($,"node_modules/.bin/max"));if(!e)try{e=l.default.existsSync(require.resolve("@umijs/max"))}catch(t){}if(!e)try{e=/umi@4\.(\d+)\.(\d+)/.test((0,c.execSync)("umi -v").toString())}catch(t){}if(!e){const a=d.default.join($,"node_modules","umi","package.json");if(l.default.existsSync(a))try{const t=JSON.parse(l.default.readFileSync(a,j.ENCODING))||{};e=t.version&&+t.version.split(".")[0]>3}catch(t){}}return e},E=()=>{const e=d.default.join($,"project.config.json");if(l.default.existsSync(e)){const t=require(e);return t.appid}return""},K=()=>l.default.existsSync(d.default.join($,"project.tt.json"))&&0===E().indexOf("tt"),C=()=>0===E().indexOf("20"),F=()=>{const e=d.default.join($,".git/"),t=d.default.join($,".git/hooks"),a=d.default.join(t,"pre-commit"),o=l.default.existsSync(e),n=l.default.existsSync(a),i=n&&l.default.readFileSync(a,j.ENCODING).includes(O);if(o&&(!n||!i)){(0,g.mkdirpSync)(t),l.default.writeFileSync(a,["#!/usr/bin/env bash","npx yolk pre-commit","RESULT=$?","[ $RESULT -ne 0 ] && exit 1","exit 0",O].join(m.default.EOL),j.ENCODING);try{l.default.chmodSync(a,"777")}catch(r){(0,j.fail)(`chmod ${a} failed: ${r.message}`)}(0,j.succeed)("Create pre-commit hook")}},U=async()=>{const e=(0,j.getYolkConfig)(),t=!1!==e.strict,a=e.eslintIgnore,o=e.stylelintIgnore;(0,j.warn)("\u7edf\u4e00\u4ee3\u7801\u89c4\u8303\uff0c\u8fdb\u884c\u4e25\u683c\u7684\u8bed\u6cd5\u68c0\u67e5\u3002"),t&&((0,j.warn)("git commit \u7981\u6b62 lint \u7684 ignore \u884c\u4e3a"),o&&(0,j.warn)(`\u901a\u8fc7 .yolkrc \u914d\u7f6e stylelintIgnore: ${o}\u3002`),a&&(0,j.warn)(`\u901a\u8fc7 .yolkrc \u914d\u7f6e eslintIgnore: ${a}\u3002`)),P({command:"lint-staged",args:["-c",require.resolve("./.lintstagedrc")]})},Q=({mAppid:e,mProject:t,mPrivateKeyPath:a,mVersion:o,mDesc:n,mRobot:i,mQrcodeFormat:r,mQrcodeOutputDest:s,mPagePath:m,mSearchQuery:p})=>{const u=l.default.existsSync(d.default.join($,".git"))?(0,c.execSync)("git log -1 --pretty=format:%H").toString():"",f=(0,j.getProjectConfigJSON)(),g=e||f.appid,b=t||d.default.join($,"dist"),v=a||d.default.join($,`private.${g}.key`);if(l.default.existsSync(b)){if(l.default.existsSync(v)){const e=(0,j.getPackageJSON)(),t=o||e.version||f.version||"1.0.0",a=n||e.description||f.description,c=`${u?` commit: ${u};`:""}${a?` description: ${a};`:""}`;u&&(0,j.info)(`commit: ${u}`),(0,j.info)(`dist: ${b}`),(0,j.info)(`key: ${v}`),(0,j.info)(`appid: ${g}`),(0,j.info)(`version: ${t}`),(0,j.info)(`desc: ${c}`);const l=new y.Project({appid:g,type:"miniProgram",projectPath:b,privateKeyPath:v,ignores:["node_modules/**/*","**/*.txt","**/*.key","**/*.less","**/*.sass","**/*.scss","**/*.css","**/*.jsx","**/*.ts","**/*.tsx","**/*.md"]});return{appid:g,options:{project:l,version:t,desc:c,setting:f.setting,robot:i,qrcodeFormat:r,qrcodeOutputDest:s,pagePath:m,searchQuery:p}}}throw Error(`\u6ca1\u6709\u627e\u5230\u4e0a\u4f20\u5bc6\u94a5(${v})`)}throw Error(`\u6ca1\u6709\u627e\u5230dist\u76ee\u5f55(${b})`)},T=()=>{F(),process.argv.length>2?v.default.version(k.default.version,"-v,--version","\u8f93\u51fa\u7248\u672c\u53f7").usage("[command] [options]").option("--clone","\u901a\u8fc7git clone\u62c9\u53d6\u6a21\u7248").option("--template <template>","\u6a21\u7248\u540d\u79f0\u6216\u8005clone\u6a21\u5f0f\u7684git\u5730\u5740").option("--docs","\u542f\u52a8\u6587\u6863\u6a21\u5f0f").option("--mAppid <appid>","\u5c0f\u7a0b\u5e8fappid").option("--mProject <project>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u5de5\u7a0b\u76ee\u5f55").option("--mPrivateKeyPath <privateKeyPath>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20key\u6587\u4ef6").option("--mVersion <version>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u7248\u672c\u53f7").option("--mDesc <desc>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20\u63cf\u8ff0").option("--mRobot <robot>","\u5c0f\u7a0b\u5e8f\u4e0a\u4f20ci\u673a\u5668\u4eba1~30").option("--mQrcodeFormat <qrcodeFormat>",'\u5c0f\u7a0b\u5e8f\u9884\u89c8\u8fd4\u56de\u4e8c\u7ef4\u7801\u6587\u4ef6\u7684\u683c\u5f0f "image" \u6216 "base64"\uff0c \u9ed8\u8ba4\u503c "terminal" \u4f9b\u8c03\u8bd5\u7528').option("--mQrcodeOutputDest <qrcodeOutputDest>","\u5c0f\u7a0b\u5e8f\u9884\u89c8\u4e8c\u7ef4\u7801\u6587\u4ef6\u4fdd\u5b58\u8def\u5f84").option("--mPagePath <pagePath>","\u5c0f\u7a0b\u5e8f\u9884\u89c8\u9884\u89c8\u9875\u9762\u8def\u5f84").option("--mSearchQuery <searchQuery>","\u5c0f\u7a0b\u5e8f\u9884\u89c8\u9884\u89c8\u9875\u9762\u8def\u5f84\u542f\u52a8\u53c2\u6570").action(((e,t)=>{const[a,...o]=t,{clone:n,template:i,docs:r}=e;if(a)switch((0,j.info)(`yolk version: ${k.default.version}`),(0,j.info)(`node version: ${process.version}`),(0,j.info)(`platform: ${m.default.platform()}`),(0,j.info)(`memory: ${(0,p.floor)(m.default.freemem()/1024/1024)} MB(${(0,p.floor)(m.default.totalmem()/1024/1024)} MB)`),a){case"init":if((0,j.succeed)(`yolk ${a} \u5f00\u59cb`),n)if(i){const e=".yolk",t=d.default.join($,e);l.default.existsSync(t)&&(0,b.rimrafSync)(t)&&(0,j.succeed)(`\u7f13\u5b58\u5220\u9664 success! ${t}`),P({command:"git",args:["clone","-b","master","--depth","1",i,e].concat(o)}),I($,t)}else(0,j.fail)("--clone \u6a21\u5f0f\u5fc5\u987b\u6709--template");else q($);break;case"start":N()?K()?P({command:"taro",args:["build","--type","tt","--watch"].concat(o)}):C()?P({command:"taro",args:["build","--type","alipay","--watch"].concat(o)}):P({command:"taro",args:["build","--type","weapp","--watch"].concat(o)}):r?(process.env.DID_YOU_KNOW="none",P({command:"dumi",args:["dev"].concat(o)})):_()?(process.env.DID_YOU_KNOW="none",P({command:"max",args:["dev"].concat(o)})):(process.env.DID_YOU_KNOW="none",P({command:"umi",args:["dev"].concat(o)}));break;case"build":N()?K()?P({command:"taro",args:["build","--type","tt"].concat(o)}):C()?P({command:"taro",args:["build","--type","alipay"].concat(o)}):P({command:"taro",args:["build","--type","weapp"].concat(o)}):r?(process.env.DID_YOU_KNOW="none",P({command:"dumi",args:["build"].concat(o)})):_()?(process.env.DID_YOU_KNOW="none",P({command:"max",args:["setup"].concat(o),complete:()=>P({command:"max",args:["build"].concat(o)}),exit:!1})):(process.env.DID_YOU_KNOW="none",P({command:"umi",args:["build"].concat(o)}));break;case"pre-commit":U();break;case"miniprogram-upload":if(N())if(K());else if(C());else{const{appid:t,options:a}=Q(e);(0,j.info)(`${t}\u4e0a\u4f20\u5f00\u59cb`),y.upload({...(0,p.pick)(a,["project","version","desc","setting","robot"]),onProgressUpdate:e=>{if((0,p.isString)(e))(0,j.info)(`task: ${e}`);else{const{status:t,message:a}=e;(0,j.info)(`task(${t}): ${a}`)}}}).then((()=>{(0,j.succeed)(`${t}\u4e0a\u4f20\u5b8c\u6210`)}))}break;case"miniprogram-preview":if(N())if(K());else if(C());else{const{appid:t,options:a}=Q(e);(0,j.info)(`${t}\u4e0a\u4f20\u9884\u89c8\u5f00\u59cb`),y.preview({...(0,p.pick)(a,["project","version","desc","setting","robot","qrcodeFormat","qrcodeOutputDest","pagePath","searchQuery"]),onProgressUpdate:e=>{if((0,p.isString)(e))(0,j.info)(`task: ${e}`);else{const{status:t,message:a}=e;(0,j.info)(`task(${t}): ${a}`)}}}).then((()=>{(0,j.succeed)(`${t}\u4e0a\u4f20\u9884\u89c8\u5b8c\u6210`)}))}break;default:D()}})).parse(process.argv):D()};T();