@gadgetinc/ggt 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/{add-FGXJSCE2.js → add-ERWYPHIS.js} +2 -2
- package/dist/{chunk-5NCJDCIZ.js → chunk-24OT7GHO.js} +15 -15
- package/dist/{chunk-5NCJDCIZ.js.map → chunk-24OT7GHO.js.map} +3 -3
- package/dist/{chunk-F4S4AEEO.js → chunk-DYAWQS24.js} +2 -2
- package/dist/{chunk-PA2LOSVH.js → chunk-FILWLZUN.js} +2 -2
- package/dist/chunk-GCO2TOVZ.js +50 -0
- package/dist/{chunk-LPBWX353.js.map → chunk-GCO2TOVZ.js.map} +3 -3
- package/dist/{chunk-JHWQLV6Y.js → chunk-ILB6CSBN.js} +2 -2
- package/dist/{chunk-IYQBG4II.js → chunk-JBY5A44K.js} +2 -2
- package/dist/{chunk-YT2LSGNB.js → chunk-JSGXXXFU.js} +2 -2
- package/dist/chunk-KMNQ3LJT.js +12 -0
- package/dist/{chunk-VJVFVZNR.js.map → chunk-KMNQ3LJT.js.map} +1 -1
- package/dist/chunk-KS2O3TJA.js +116 -0
- package/dist/{chunk-I6BQ7MRE.js.map → chunk-KS2O3TJA.js.map} +3 -3
- package/dist/{chunk-2CKK6A2Y.js → chunk-OGQ5LIYM.js} +2 -2
- package/dist/{chunk-2CKK6A2Y.js.map → chunk-OGQ5LIYM.js.map} +1 -1
- package/dist/chunk-QXWICGG6.js +2 -0
- package/dist/{chunk-72YIA2TT.js.map → chunk-QXWICGG6.js.map} +1 -1
- package/dist/{chunk-L2MG47NS.js → chunk-UCJDY73U.js} +2 -2
- package/dist/{chunk-4WFO3NAS.js → chunk-WNAYBYSG.js} +2 -2
- package/dist/{chunk-SIAMHUOB.js → chunk-WZ3Q7TTB.js} +2 -2
- package/dist/{chunk-XK6JJEHJ.js → chunk-XGQQOMPO.js} +2 -2
- package/dist/{configure-L4U26WFP.js → configure-LD5XC2MR.js} +2 -2
- package/dist/{deploy-6JWXSMQJ.js → deploy-7Q7RRIXS.js} +2 -2
- package/dist/{dev-M2PFPQXX.js → dev-MQ76B6CR.js} +2 -2
- package/dist/{list-LNXNHS2W.js → list-YXCTVLRH.js} +2 -2
- package/dist/{list-LNXNHS2W.js.map → list-YXCTVLRH.js.map} +1 -1
- package/dist/login-XIEASAMY.js +2 -0
- package/dist/{logout-JA5JBU3G.js → logout-ACRXIJEF.js} +2 -2
- package/dist/main.js +3 -2
- package/dist/main.js.map +2 -2
- package/dist/{open-TWQBAPIT.js → open-5CYXKN42.js} +2 -2
- package/dist/{pull-VWGETR4M.js → pull-STASHXEL.js} +2 -2
- package/dist/push-6WUPKY5W.js +2 -0
- package/dist/{status-OYEFON4A.js → status-SB22V3DI.js} +2 -2
- package/dist/{version-4QPNJ5VH.js → version-NZHW3VLV.js} +2 -2
- package/dist/{whoami-TIGWXVEY.js → whoami-AA3ISE77.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-72YIA2TT.js +0 -2
- package/dist/chunk-I6BQ7MRE.js +0 -116
- package/dist/chunk-LPBWX353.js +0 -50
- package/dist/chunk-VJVFVZNR.js +0 -12
- package/dist/login-4F3H443A.js +0 -2
- package/dist/push-KWUMHQCJ.js +0 -2
- /package/dist/{add-FGXJSCE2.js.map → add-ERWYPHIS.js.map} +0 -0
- /package/dist/{chunk-F4S4AEEO.js.map → chunk-DYAWQS24.js.map} +0 -0
- /package/dist/{chunk-PA2LOSVH.js.map → chunk-FILWLZUN.js.map} +0 -0
- /package/dist/{chunk-JHWQLV6Y.js.map → chunk-ILB6CSBN.js.map} +0 -0
- /package/dist/{chunk-IYQBG4II.js.map → chunk-JBY5A44K.js.map} +0 -0
- /package/dist/{chunk-YT2LSGNB.js.map → chunk-JSGXXXFU.js.map} +0 -0
- /package/dist/{chunk-L2MG47NS.js.map → chunk-UCJDY73U.js.map} +0 -0
- /package/dist/{chunk-4WFO3NAS.js.map → chunk-WNAYBYSG.js.map} +0 -0
- /package/dist/{chunk-SIAMHUOB.js.map → chunk-WZ3Q7TTB.js.map} +0 -0
- /package/dist/{chunk-XK6JJEHJ.js.map → chunk-XGQQOMPO.js.map} +0 -0
- /package/dist/{configure-L4U26WFP.js.map → configure-LD5XC2MR.js.map} +0 -0
- /package/dist/{deploy-6JWXSMQJ.js.map → deploy-7Q7RRIXS.js.map} +0 -0
- /package/dist/{dev-M2PFPQXX.js.map → dev-MQ76B6CR.js.map} +0 -0
- /package/dist/{login-4F3H443A.js.map → login-XIEASAMY.js.map} +0 -0
- /package/dist/{logout-JA5JBU3G.js.map → logout-ACRXIJEF.js.map} +0 -0
- /package/dist/{open-TWQBAPIT.js.map → open-5CYXKN42.js.map} +0 -0
- /package/dist/{pull-VWGETR4M.js.map → pull-STASHXEL.js.map} +0 -0
- /package/dist/{push-KWUMHQCJ.js.map → push-6WUPKY5W.js.map} +0 -0
- /package/dist/{status-OYEFON4A.js.map → status-SB22V3DI.js.map} +0 -0
- /package/dist/{version-4QPNJ5VH.js.map → version-NZHW3VLV.js.map} +0 -0
- /package/dist/{whoami-TIGWXVEY.js.map → whoami-AA3ISE77.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{K as n,ha as o,ja as r}from"./chunk-24OT7GHO.js";import{a as t,h as e}from"./chunk-7DYQUG5M.js";e();var m=t(()=>o`
|
|
2
2
|
Print this version of ggt.
|
|
3
3
|
|
|
4
4
|
{gray Usage}
|
|
@@ -8,4 +8,4 @@ import{J as n,ga as o,ia as r}from"./chunk-5NCJDCIZ.js";import{a as t,h as e}fro
|
|
|
8
8
|
When there is a new release of ggt, running ggt will show you a message letting you
|
|
9
9
|
know that an update is available.
|
|
10
10
|
`,"usage"),p=t(a=>{r(n.version)},"run");export{p as run,m as usage};
|
|
11
|
-
//# sourceMappingURL=version-
|
|
11
|
+
//# sourceMappingURL=version-NZHW3VLV.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{f as s}from"./chunk-
|
|
1
|
+
import{f as s}from"./chunk-FILWLZUN.js";import"./chunk-GCO2TOVZ.js";import"./chunk-DYAWQS24.js";import"./chunk-XGQQOMPO.js";import"./chunk-KMNQ3LJT.js";import{ha as n,ja as o}from"./chunk-24OT7GHO.js";import"./chunk-GFQYFEEH.js";import{a as r,h as a}from"./chunk-7DYQUG5M.js";a();var u=r(()=>n`
|
|
2
2
|
Show the name and email address of the currently logged in user.
|
|
3
3
|
|
|
4
4
|
{gray Usage}
|
|
5
5
|
ggt whoami
|
|
6
6
|
`,"usage"),l=r(async t=>{let e=await s(t);if(!e){o("You are not logged in");return}e.name?o(`You are logged in as ${e.name} (${e.email})`):o(`You are logged in as ${e.email}`)},"run");export{l as run,u as usage};
|
|
7
|
-
//# sourceMappingURL=whoami-
|
|
7
|
+
//# sourceMappingURL=whoami-AA3ISE77.js.map
|
package/package.json
CHANGED
package/dist/chunk-72YIA2TT.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{A as b,B as M,C,D as ee,E as Cr,F as g,G as A,H as Ar,I as Lr}from"./chunk-5NCJDCIZ.js";import{a as o,d as q,h as c}from"./chunk-7DYQUG5M.js";var se=q((sn,te)=>{c();var re=g(),Vr=o((t,e,r,s,i)=>{typeof r=="string"&&(i=s,s=r,r=void 0);try{return new re(t instanceof re?t.version:t,r).inc(e,s,i).version}catch{return null}},"inc");te.exports=Vr});var oe=q((ln,ie)=>{c();var ne=A(),jr=o((t,e)=>{let r=ne(t,null,!0),s=ne(e,null,!0),i=r.compare(s);if(i===0)return null;let n=i>0,l=n?r:s,a=n?s:r,u=!!l.prerelease.length;if(!!a.prerelease.length&&!u){if(!a.patch&&!a.minor)return"major";if(a.compareMain(l)===0)return a.minor&&!a.patch?"minor":"patch"}let m=u?"pre":"";return r.major!==s.major?m+"major":r.minor!==s.minor?m+"minor":r.patch!==s.patch?m+"patch":"prerelease"},"diff");ie.exports=jr});var ce=q((un,le)=>{c();var Ir=g(),Nr=o((t,e)=>new Ir(t,e).major,"major");le.exports=Nr});var ue=q((pn,ae)=>{c();var Gr=g(),Wr=o((t,e)=>new Gr(t,e).minor,"minor");ae.exports=Wr});var he=q(($n,fe)=>{c();var Yr=g(),Dr=o((t,e)=>new Yr(t,e).patch,"patch");fe.exports=Dr});var me=q((vn,pe)=>{c();var Hr=A(),Xr=o((t,e)=>{let r=Hr(t,e);return r&&r.prerelease.length?r.prerelease:null},"prerelease");pe.exports=Xr});var E=q((En,$e)=>{c();var qe=g(),kr=o((t,e,r)=>new qe(t,r).compare(new qe(e,r)),"compare");$e.exports=kr});var we=q((Tn,de)=>{c();var Br=E(),_r=o((t,e,r)=>Br(e,t,r),"rcompare");de.exports=_r});var ge=q((On,ve)=>{c();var zr=E(),Fr=o((t,e)=>zr(t,e,!0),"compareLoose");ve.exports=Fr});var L=q((Ln,Ee)=>{c();var Re=g(),Ur=o((t,e,r)=>{let s=new Re(t,r),i=new Re(e,r);return s.compare(i)||s.compareBuild(i)},"compareBuild");Ee.exports=Ur});var xe=q((In,Se)=>{c();var Kr=L(),Jr=o((t,e)=>t.sort((r,s)=>Kr(r,s,e)),"sort");Se.exports=Jr});var ye=q((Wn,Te)=>{c();var Qr=L(),Zr=o((t,e)=>t.sort((r,s)=>Qr(s,r,e)),"rsort");Te.exports=Zr});var x=q((Hn,Pe)=>{c();var br=E(),Mr=o((t,e,r)=>br(t,e,r)>0,"gt");Pe.exports=Mr});var V=q((Bn,Oe)=>{c();var et=E(),rt=o((t,e,r)=>et(t,e,r)<0,"lt");Oe.exports=rt});var Y=q((Fn,Ce)=>{c();var tt=E(),st=o((t,e,r)=>tt(t,e,r)===0,"eq");Ce.exports=st});var D=q((Jn,Ae)=>{c();var nt=E(),it=o((t,e,r)=>nt(t,e,r)!==0,"neq");Ae.exports=it});var j=q((bn,Le)=>{c();var ot=E(),lt=o((t,e,r)=>ot(t,e,r)>=0,"gte");Le.exports=lt});var I=q((ri,Ve)=>{c();var ct=E(),at=o((t,e,r)=>ct(t,e,r)<=0,"lte");Ve.exports=at});var H=q((ni,je)=>{c();var ut=Y(),ft=D(),ht=x(),pt=j(),mt=V(),qt=I(),$t=o((t,e,r,s)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return ut(t,r,s);case"!=":return ft(t,r,s);case">":return ht(t,r,s);case">=":return pt(t,r,s);case"<":return mt(t,r,s);case"<=":return qt(t,r,s);default:throw new TypeError(`Invalid operator: ${e}`)}},"cmp");je.exports=$t});var Ne=q((li,Ie)=>{c();var dt=g(),wt=A(),{safeRe:N,t:G}=C(),vt=o((t,e)=>{if(t instanceof dt)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?N[G.COERCEFULL]:N[G.COERCE]);else{let u=e.includePrerelease?N[G.COERCERTLFULL]:N[G.COERCERTL],p;for(;(p=u.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||p.index+p[0].length!==r.index+r[0].length)&&(r=p),u.lastIndex=p.index+p[1].length+p[2].length;u.lastIndex=-1}if(r===null)return null;let s=r[2],i=r[3]||"0",n=r[4]||"0",l=e.includePrerelease&&r[5]?`-${r[5]}`:"",a=e.includePrerelease&&r[6]?`+${r[6]}`:"";return wt(`${s}.${i}.${n}${l}${a}`,e)},"coerce");Ie.exports=vt});var We=q((ui,Ge)=>{c();var X=class{static{o(this,"LRUCache")}constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let i=this.map.keys().next().value;this.delete(i)}this.map.set(e,r)}return this}};Ge.exports=X});var S=q((pi,Xe)=>{c();var gt=/\s+/g,k=class t{static{o(this,"Range")}constructor(e,r){if(r=Et(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof B)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(gt," "),this.set=this.raw.split("||").map(s=>this.parseRange(s.trim())).filter(s=>s.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let s=this.set[0];if(this.set=this.set.filter(i=>!De(i[0])),this.set.length===0)this.set=[s];else if(this.set.length>1){for(let i of this.set)if(i.length===1&&Ct(i[0])){this.set=[i];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let s=0;s<r.length;s++)s>0&&(this.formatted+=" "),this.formatted+=r[s].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let s=((this.options.includePrerelease&&Pt)|(this.options.loose&&Ot))+":"+e,i=Ye.get(s);if(i)return i;let n=this.options.loose,l=n?R[w.HYPHENRANGELOOSE]:R[w.HYPHENRANGE];e=e.replace(l,Dt(this.options.includePrerelease)),$("hyphen replace",e),e=e.replace(R[w.COMPARATORTRIM],xt),$("comparator trim",e),e=e.replace(R[w.TILDETRIM],Tt),$("tilde trim",e),e=e.replace(R[w.CARETTRIM],yt),$("caret trim",e);let a=e.split(" ").map(f=>At(f,this.options)).join(" ").split(/\s+/).map(f=>Yt(f,this.options));n&&(a=a.filter(f=>($("loose invalid filter",f,this.options),!!f.match(R[w.COMPARATORLOOSE])))),$("range list",a);let u=new Map,p=a.map(f=>new B(f,this.options));for(let f of p){if(De(f))return[f];u.set(f.value,f)}u.size>1&&u.has("")&&u.delete("");let m=[...u.values()];return Ye.set(s,m),m}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(s=>He(s,r)&&e.set.some(i=>He(i,r)&&s.every(n=>i.every(l=>n.intersects(l,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new St(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(Ht(this.set[r],e,this.options))return!0;return!1}};Xe.exports=k;var Rt=We(),Ye=new Rt,Et=ee(),B=T(),$=b(),St=g(),{safeRe:R,t:w,comparatorTrimReplace:xt,tildeTrimReplace:Tt,caretTrimReplace:yt}=C(),{FLAG_INCLUDE_PRERELEASE:Pt,FLAG_LOOSE:Ot}=M(),De=o(t=>t.value==="<0.0.0-0","isNullSet"),Ct=o(t=>t.value==="","isAny"),He=o((t,e)=>{let r=!0,s=t.slice(),i=s.pop();for(;r&&s.length;)r=s.every(n=>i.intersects(n,e)),i=s.pop();return r},"isSatisfiable"),At=o((t,e)=>($("comp",t,e),t=jt(t,e),$("caret",t),t=Lt(t,e),$("tildes",t),t=Nt(t,e),$("xrange",t),t=Wt(t,e),$("stars",t),t),"parseComparator"),v=o(t=>!t||t.toLowerCase()==="x"||t==="*","isX"),Lt=o((t,e)=>t.trim().split(/\s+/).map(r=>Vt(r,e)).join(" "),"replaceTildes"),Vt=o((t,e)=>{let r=e.loose?R[w.TILDELOOSE]:R[w.TILDE];return t.replace(r,(s,i,n,l,a)=>{$("tilde",t,s,i,n,l,a);let u;return v(i)?u="":v(n)?u=`>=${i}.0.0 <${+i+1}.0.0-0`:v(l)?u=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:a?($("replaceTilde pr",a),u=`>=${i}.${n}.${l}-${a} <${i}.${+n+1}.0-0`):u=`>=${i}.${n}.${l} <${i}.${+n+1}.0-0`,$("tilde return",u),u})},"replaceTilde"),jt=o((t,e)=>t.trim().split(/\s+/).map(r=>It(r,e)).join(" "),"replaceCarets"),It=o((t,e)=>{$("caret",t,e);let r=e.loose?R[w.CARETLOOSE]:R[w.CARET],s=e.includePrerelease?"-0":"";return t.replace(r,(i,n,l,a,u)=>{$("caret",t,i,n,l,a,u);let p;return v(n)?p="":v(l)?p=`>=${n}.0.0${s} <${+n+1}.0.0-0`:v(a)?n==="0"?p=`>=${n}.${l}.0${s} <${n}.${+l+1}.0-0`:p=`>=${n}.${l}.0${s} <${+n+1}.0.0-0`:u?($("replaceCaret pr",u),n==="0"?l==="0"?p=`>=${n}.${l}.${a}-${u} <${n}.${l}.${+a+1}-0`:p=`>=${n}.${l}.${a}-${u} <${n}.${+l+1}.0-0`:p=`>=${n}.${l}.${a}-${u} <${+n+1}.0.0-0`):($("no pr"),n==="0"?l==="0"?p=`>=${n}.${l}.${a}${s} <${n}.${l}.${+a+1}-0`:p=`>=${n}.${l}.${a}${s} <${n}.${+l+1}.0-0`:p=`>=${n}.${l}.${a} <${+n+1}.0.0-0`),$("caret return",p),p})},"replaceCaret"),Nt=o((t,e)=>($("replaceXRanges",t,e),t.split(/\s+/).map(r=>Gt(r,e)).join(" ")),"replaceXRanges"),Gt=o((t,e)=>{t=t.trim();let r=e.loose?R[w.XRANGELOOSE]:R[w.XRANGE];return t.replace(r,(s,i,n,l,a,u)=>{$("xRange",t,s,i,n,l,a,u);let p=v(n),m=p||v(l),f=m||v(a),d=f;return i==="="&&d&&(i=""),u=e.includePrerelease?"-0":"",p?i===">"||i==="<"?s="<0.0.0-0":s="*":i&&d?(m&&(l=0),a=0,i===">"?(i=">=",m?(n=+n+1,l=0,a=0):(l=+l+1,a=0)):i==="<="&&(i="<",m?n=+n+1:l=+l+1),i==="<"&&(u="-0"),s=`${i+n}.${l}.${a}${u}`):m?s=`>=${n}.0.0${u} <${+n+1}.0.0-0`:f&&(s=`>=${n}.${l}.0${u} <${n}.${+l+1}.0-0`),$("xRange return",s),s})},"replaceXRange"),Wt=o((t,e)=>($("replaceStars",t,e),t.trim().replace(R[w.STAR],"")),"replaceStars"),Yt=o((t,e)=>($("replaceGTE0",t,e),t.trim().replace(R[e.includePrerelease?w.GTE0PRE:w.GTE0],"")),"replaceGTE0"),Dt=o(t=>(e,r,s,i,n,l,a,u,p,m,f,d)=>(v(s)?r="":v(i)?r=`>=${s}.0.0${t?"-0":""}`:v(n)?r=`>=${s}.${i}.0${t?"-0":""}`:l?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,v(p)?u="":v(m)?u=`<${+p+1}.0.0-0`:v(f)?u=`<${p}.${+m+1}.0-0`:d?u=`<=${p}.${m}.${f}-${d}`:t?u=`<${p}.${m}.${+f+1}-0`:u=`<=${u}`,`${r} ${u}`.trim()),"hyphenReplace"),Ht=o((t,e,r)=>{for(let s=0;s<t.length;s++)if(!t[s].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let s=0;s<t.length;s++)if($(t[s].semver),t[s].semver!==B.ANY&&t[s].semver.prerelease.length>0){let i=t[s].semver;if(i.major===e.major&&i.minor===e.minor&&i.patch===e.patch)return!0}return!1}return!0},"testSet")});var T=q(($i,Ue)=>{c();var y=Symbol("SemVer ANY"),F=class t{static{o(this,"Comparator")}static get ANY(){return y}constructor(e,r){if(r=ke(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),z("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===y?this.value="":this.value=this.operator+this.semver.version,z("comp",this)}parse(e){let r=this.options.loose?Be[_e.COMPARATORLOOSE]:Be[_e.COMPARATOR],s=e.match(r);if(!s)throw new TypeError(`Invalid comparator: ${e}`);this.operator=s[1]!==void 0?s[1]:"",this.operator==="="&&(this.operator=""),s[2]?this.semver=new ze(s[2],this.options.loose):this.semver=y}toString(){return this.value}test(e){if(z("Comparator.test",e,this.options.loose),this.semver===y||e===y)return!0;if(typeof e=="string")try{e=new ze(e,this.options)}catch{return!1}return _(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Fe(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Fe(this.value,r).test(e.semver):(r=ke(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||_(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||_(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};Ue.exports=F;var ke=ee(),{safeRe:Be,t:_e}=C(),_=H(),z=b(),ze=g(),Fe=S()});var P=q((vi,Ke)=>{c();var Xt=S(),kt=o((t,e,r)=>{try{e=new Xt(e,r)}catch{return!1}return e.test(t)},"satisfies");Ke.exports=kt});var Qe=q((Ei,Je)=>{c();var Bt=S(),_t=o((t,e)=>new Bt(t,e).set.map(r=>r.map(s=>s.value).join(" ").trim().split(" ")),"toComparators");Je.exports=_t});var be=q((Ti,Ze)=>{c();var zt=g(),Ft=S(),Ut=o((t,e,r)=>{let s=null,i=null,n=null;try{n=new Ft(e,r)}catch{return null}return t.forEach(l=>{n.test(l)&&(!s||i.compare(l)===-1)&&(s=l,i=new zt(s,r))}),s},"maxSatisfying");Ze.exports=Ut});var er=q((Oi,Me)=>{c();var Kt=g(),Jt=S(),Qt=o((t,e,r)=>{let s=null,i=null,n=null;try{n=new Jt(e,r)}catch{return null}return t.forEach(l=>{n.test(l)&&(!s||i.compare(l)===1)&&(s=l,i=new Kt(s,r))}),s},"minSatisfying");Me.exports=Qt});var sr=q((Li,tr)=>{c();var U=g(),Zt=S(),rr=x(),bt=o((t,e)=>{t=new Zt(t,e);let r=new U("0.0.0");if(t.test(r)||(r=new U("0.0.0-0"),t.test(r)))return r;r=null;for(let s=0;s<t.set.length;++s){let i=t.set[s],n=null;i.forEach(l=>{let a=new U(l.semver.version);switch(l.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!n||rr(a,n))&&(n=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${l.operator}`)}}),n&&(!r||rr(r,n))&&(r=n)}return r&&t.test(r)?r:null},"minVersion");tr.exports=bt});var ir=q((Ii,nr)=>{c();var Mt=S(),es=o((t,e)=>{try{return new Mt(t,e).range||"*"}catch{return null}},"validRange");nr.exports=es});var W=q((Wi,ar)=>{c();var rs=g(),cr=T(),{ANY:ts}=cr,ss=S(),ns=P(),or=x(),lr=V(),is=I(),os=j(),ls=o((t,e,r,s)=>{t=new rs(t,s),e=new ss(e,s);let i,n,l,a,u;switch(r){case">":i=or,n=is,l=lr,a=">",u=">=";break;case"<":i=lr,n=os,l=or,a="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ns(t,e,s))return!1;for(let p=0;p<e.set.length;++p){let m=e.set[p],f=null,d=null;if(m.forEach(h=>{h.semver===ts&&(h=new cr(">=0.0.0")),f=f||h,d=d||h,i(h.semver,f.semver,s)?f=h:l(h.semver,d.semver,s)&&(d=h)}),f.operator===a||f.operator===u||(!d.operator||d.operator===a)&&n(t,d.semver))return!1;if(d.operator===u&&l(t,d.semver))return!1}return!0},"outside");ar.exports=ls});var fr=q((Hi,ur)=>{c();var cs=W(),as=o((t,e,r)=>cs(t,e,">",r),"gtr");ur.exports=as});var pr=q((Bi,hr)=>{c();var us=W(),fs=o((t,e,r)=>us(t,e,"<",r),"ltr");hr.exports=fs});var $r=q((Fi,qr)=>{c();var mr=S(),hs=o((t,e,r)=>(t=new mr(t,r),e=new mr(e,r),t.intersects(e,r)),"intersects");qr.exports=hs});var wr=q((Ji,dr)=>{c();var ps=P(),ms=E();dr.exports=(t,e,r)=>{let s=[],i=null,n=null,l=t.sort((m,f)=>ms(m,f,r));for(let m of l)ps(m,e,r)?(n=m,i||(i=m)):(n&&s.push([i,n]),n=null,i=null);i&&s.push([i,null]);let a=[];for(let[m,f]of s)m===f?a.push(m):!f&&m===l[0]?a.push("*"):f?m===l[0]?a.push(`<=${f}`):a.push(`${m} - ${f}`):a.push(`>=${m}`);let u=a.join(" || "),p=typeof e.raw=="string"?e.raw:String(e);return u.length<p.length?u:e}});var xr=q((Zi,Sr)=>{c();var vr=S(),J=T(),{ANY:K}=J,O=P(),Q=E(),qs=o((t,e,r={})=>{if(t===e)return!0;t=new vr(t,r),e=new vr(e,r);let s=!1;e:for(let i of t.set){for(let n of e.set){let l=ds(i,n,r);if(s=s||l!==null,l)continue e}if(s)return!1}return!0},"subset"),$s=[new J(">=0.0.0-0")],gr=[new J(">=0.0.0")],ds=o((t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===K){if(e.length===1&&e[0].semver===K)return!0;r.includePrerelease?t=$s:t=gr}if(e.length===1&&e[0].semver===K){if(r.includePrerelease)return!0;e=gr}let s=new Set,i,n;for(let h of t)h.operator===">"||h.operator===">="?i=Rr(i,h,r):h.operator==="<"||h.operator==="<="?n=Er(n,h,r):s.add(h.semver);if(s.size>1)return null;let l;if(i&&n){if(l=Q(i.semver,n.semver,r),l>0)return null;if(l===0&&(i.operator!==">="||n.operator!=="<="))return null}for(let h of s){if(i&&!O(h,String(i),r)||n&&!O(h,String(n),r))return null;for(let Or of e)if(!O(h,String(Or),r))return!1;return!0}let a,u,p,m,f=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,d=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1;f&&f.prerelease.length===1&&n.operator==="<"&&f.prerelease[0]===0&&(f=!1);for(let h of e){if(m=m||h.operator===">"||h.operator===">=",p=p||h.operator==="<"||h.operator==="<=",i){if(d&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===d.major&&h.semver.minor===d.minor&&h.semver.patch===d.patch&&(d=!1),h.operator===">"||h.operator===">="){if(a=Rr(i,h,r),a===h&&a!==i)return!1}else if(i.operator===">="&&!O(i.semver,String(h),r))return!1}if(n){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator==="<"||h.operator==="<="){if(u=Er(n,h,r),u===h&&u!==n)return!1}else if(n.operator==="<="&&!O(n.semver,String(h),r))return!1}if(!h.operator&&(n||i)&&l!==0)return!1}return!(i&&p&&!n&&l!==0||n&&m&&!i&&l!==0||d||f)},"simpleSubset"),Rr=o((t,e,r)=>{if(!t)return e;let s=Q(t.semver,e.semver,r);return s>0?t:s<0||e.operator===">"&&t.operator===">="?e:t},"higherGT"),Er=o((t,e,r)=>{if(!t)return e;let s=Q(t.semver,e.semver,r);return s<0?t:s>0||e.operator==="<"&&t.operator==="<="?e:t},"lowerLT");Sr.exports=qs});var tn=q((eo,Pr)=>{c();var Z=C(),Tr=M(),ws=g(),yr=Cr(),vs=A(),gs=Ar(),Rs=Lr(),Es=se(),Ss=oe(),xs=ce(),Ts=ue(),ys=he(),Ps=me(),Os=E(),Cs=we(),As=ge(),Ls=L(),Vs=xe(),js=ye(),Is=x(),Ns=V(),Gs=Y(),Ws=D(),Ys=j(),Ds=I(),Hs=H(),Xs=Ne(),ks=T(),Bs=S(),_s=P(),zs=Qe(),Fs=be(),Us=er(),Ks=sr(),Js=ir(),Qs=W(),Zs=fr(),bs=pr(),Ms=$r(),en=wr(),rn=xr();Pr.exports={parse:vs,valid:gs,clean:Rs,inc:Es,diff:Ss,major:xs,minor:Ts,patch:ys,prerelease:Ps,compare:Os,rcompare:Cs,compareLoose:As,compareBuild:Ls,sort:Vs,rsort:js,gt:Is,lt:Ns,eq:Gs,neq:Ws,gte:Ys,lte:Ds,cmp:Hs,coerce:Xs,Comparator:ks,Range:Bs,satisfies:_s,toComparators:zs,maxSatisfying:Fs,minSatisfying:Us,minVersion:Ks,validRange:Js,outside:Qs,gtr:Zs,ltr:bs,intersects:Ms,simplifyRange:en,subset:rn,SemVer:ws,re:Z.re,src:Z.src,tokens:Z.t,SEMVER_SPEC_VERSION:Tr.SEMVER_SPEC_VERSION,RELEASE_TYPES:Tr.RELEASE_TYPES,compareIdentifiers:yr.compareIdentifiers,rcompareIdentifiers:yr.rcompareIdentifiers}});export{tn as a};
|
|
2
|
-
//# sourceMappingURL=chunk-72YIA2TT.js.map
|
package/dist/chunk-I6BQ7MRE.js
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import{c as K}from"./chunk-SIAMHUOB.js";import{a as be}from"./chunk-IYQBG4II.js";import{a as to,b as eo}from"./chunk-HN3YKQ3C.js";import{g as jr}from"./chunk-PA2LOSVH.js";import{a as ft,c as Pr,f as _t,g as wt,k as ro,l as Rr,n as ge,o as X,s as Fr,t as ye,u as ve,v as $r,y as kt}from"./chunk-LPBWX353.js";import{a as Ar}from"./chunk-VJVFVZNR.js";import{M as Er,T as vt,Y as he,_ as Or,b as st,e as J,g as br,ga as C,h as _r,ha as $,ia as bt,l as wr,m as kr,t as Tr,u as Sr,v as Cr,y as xr,z as Zi}from"./chunk-5NCJDCIZ.js";import{a as Xi}from"./chunk-GFQYFEEH.js";import{a as n,b as de,d as nt,f as pt,h as T}from"./chunk-7DYQUG5M.js";var Ir=nt(N=>{"use strict";T();var io=N&&N.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(N,"__esModule",{value:!0});var oo=de("fs"),ao=io(eo()),mt=ao.default("@kwsites/file-exists");function uo(t,e,r){mt("checking %s",t);try{let s=oo.statSync(t);return s.isFile()&&e?(mt("[OK] path represents a file"),!0):s.isDirectory()&&r?(mt("[OK] path represents a directory"),!0):(mt("[FAIL] path represents something other than a file or directory"),!1)}catch(s){if(s.code==="ENOENT")return mt("[FAIL] path is not accessible: %o",s),!1;throw mt("[FATAL] %o",s),s}}n(uo,"check");function co(t,e=N.READABLE){return uo(t,(e&N.FILE)>0,(e&N.FOLDER)>0)}n(co,"exists");N.exists=co;N.FILE=1;N.FOLDER=2;N.READABLE=N.FILE+N.FOLDER});var Nr=nt(Bt=>{"use strict";T();function lo(t){for(var e in t)Bt.hasOwnProperty(e)||(Bt[e]=t[e])}n(lo,"__export");Object.defineProperty(Bt,"__esModule",{value:!0});lo(Ir())});var we=nt((bl,Gr)=>{T();function po(t){r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=i,r.enabled=a,r.humanize=Xi(),r.destroy=d,Object.keys(t).forEach(p=>{r[p]=t[p]}),r.names=[],r.skips=[],r.formatters={};function e(p){let m=0;for(let h=0;h<p.length;h++)m=(m<<5)-m+p.charCodeAt(h),m|=0;return r.colors[Math.abs(m)%r.colors.length]}n(e,"selectColor"),r.selectColor=e;function r(p){let m,h=null,g,I;function q(...D){if(!q.enabled)return;let Y=q,ct=Number(new Date),le=ct-(m||ct);Y.diff=le,Y.prev=m,Y.curr=ct,m=ct,D[0]=r.coerce(D[0]),typeof D[0]!="string"&&D.unshift("%O");let lt=0;D[0]=D[0].replace(/%([a-zA-Z%])/g,(yt,pe)=>{if(yt==="%%")return"%";lt++;let Lt=r.formatters[pe];if(typeof Lt=="function"){let fe=D[lt];yt=Lt.call(Y,fe),D.splice(lt,1),lt--}return yt}),r.formatArgs.call(Y,D),(Y.log||r.log).apply(Y,D)}return n(q,"debug"),q.namespace=p,q.useColors=r.useColors(),q.color=r.selectColor(p),q.extend=s,q.destroy=r.destroy,Object.defineProperty(q,"enabled",{enumerable:!0,configurable:!1,get:n(()=>h!==null?h:(g!==r.namespaces&&(g=r.namespaces,I=r.enabled(p)),I),"get"),set:n(D=>{h=D},"set")}),typeof r.init=="function"&&r.init(q),q}n(r,"createDebug");function s(p,m){let h=r(this.namespace+(typeof m>"u"?":":m)+p);return h.log=this.log,h}n(s,"extend");function i(p){r.save(p),r.namespaces=p,r.names=[],r.skips=[];let m,h=(typeof p=="string"?p:"").split(/[\s,]+/),g=h.length;for(m=0;m<g;m++)h[m]&&(p=h[m].replace(/\*/g,".*?"),p[0]==="-"?r.skips.push(new RegExp("^"+p.slice(1)+"$")):r.names.push(new RegExp("^"+p+"$")))}n(i,"enable");function o(){let p=[...r.names.map(u),...r.skips.map(u).map(m=>"-"+m)].join(",");return r.enable(""),p}n(o,"disable");function a(p){if(p[p.length-1]==="*")return!0;let m,h;for(m=0,h=r.skips.length;m<h;m++)if(r.skips[m].test(p))return!1;for(m=0,h=r.names.length;m<h;m++)if(r.names[m].test(p))return!0;return!1}n(a,"enabled");function u(p){return p.toString().substring(2,p.toString().length-2).replace(/\.\*\?$/,"*")}n(u,"toNamespace");function c(p){return p instanceof Error?p.stack||p.message:p}n(c,"coerce");function d(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n(d,"destroy"),r.enable(r.load()),r}n(po,"setup");Gr.exports=po});var Ur=nt((G,It)=>{T();G.formatArgs=mo;G.save=ho;G.load=go;G.useColors=fo;G.storage=yo();G.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();G.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function fo(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}n(fo,"useColors");function mo(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+It.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,s=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(s=r))}),t.splice(s,0,e)}n(mo,"formatArgs");G.log=console.debug||console.log||(()=>{});function ho(t){try{t?G.storage.setItem("debug",t):G.storage.removeItem("debug")}catch{}}n(ho,"save");function go(){let t;try{t=G.storage.getItem("debug")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}n(go,"load");function yo(){try{return localStorage}catch{}}n(yo,"localstorage");It.exports=we()(G);var{formatters:vo}=It.exports;vo.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Jr=nt((R,Gt)=>{T();var bo=de("tty"),Nt=de("util");R.init=xo;R.log=To;R.formatArgs=wo;R.save=So;R.load=Co;R.useColors=_o;R.destroy=Nt.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");R.colors=[6,2,3,4,5,1];try{let t=to();t&&(t.stderr||t).level>=2&&(R.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}R.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,o)=>o.toUpperCase()),s=process.env[e];return/^(yes|on|true|enabled)$/i.test(s)?s=!0:/^(no|off|false|disabled)$/i.test(s)?s=!1:s==="null"?s=null:s=Number(s),t[r]=s,t},{});function _o(){return"colors"in R.inspectOpts?!!R.inspectOpts.colors:bo.isatty(process.stderr.fd)}n(_o,"useColors");function wo(t){let{namespace:e,useColors:r}=this;if(r){let s=this.color,i="\x1B[3"+(s<8?s:"8;5;"+s),o=` ${i};1m${e} \x1B[0m`;t[0]=o+t[0].split(`
|
|
2
|
-
`).join(`
|
|
3
|
-
`+o),t.push(i+"m+"+Gt.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=ko()+e+" "+t[0]}n(wo,"formatArgs");function ko(){return R.inspectOpts.hideDate?"":new Date().toISOString()+" "}n(ko,"getDate");function To(...t){return process.stderr.write(Nt.formatWithOptions(R.inspectOpts,...t)+`
|
|
4
|
-
`)}n(To,"log");function So(t){t?process.env.DEBUG=t:delete process.env.DEBUG}n(So,"save");function Co(){return process.env.DEBUG}n(Co,"load");function xo(t){t.inspectOpts={};let e=Object.keys(R.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=R.inspectOpts[e[r]]}n(xo,"init");Gt.exports=we()(R);var{formatters:qr}=Gt.exports;qr.o=function(t){return this.inspectOpts.colors=this.useColors,Nt.inspect(t,this.inspectOpts).split(`
|
|
5
|
-
`).map(e=>e.trim()).join(" ")};qr.O=function(t){return this.inspectOpts.colors=this.useColors,Nt.inspect(t,this.inspectOpts)}});var zr=nt((xl,ke)=>{T();typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?ke.exports=Ur():ke.exports=Jr()});var Se=nt(it=>{"use strict";T();Object.defineProperty(it,"__esModule",{value:!0});it.createDeferred=it.deferred=void 0;function Te(){let t,e,r="pending";return{promise:new Promise((i,o)=>{t=i,e=o}),done(i){r==="pending"&&(r="resolved",t(i))},fail(i){r==="pending"&&(r="rejected",e(i))},get fulfilled(){return r!=="pending"},get status(){return r}}}n(Te,"deferred");it.deferred=Te;it.createDeferred=Te;it.default=Te});T();var Dr=pt(ro(),1);var Hc=Object.freeze({Fatal:"Fatal",Error:"Error",Warning:"Warning",Info:"Info"}),_e=n(({problems:t,showFileTypes:e,...r})=>{let s="";for(let[i,o]of Object.entries(t)){s+=$(""),s+=$`• {cyan ${i}} {redBright ${(0,Dr.default)("problem",o.length,!0)}}`;for(let a of o){let[u,...c]=a.message.split(`
|
|
6
|
-
`);s+=C` {red ✖} `,(e??a.type==="SourceFile")&&(s+=C`${no(i)} `),s+=C(u);for(let d of c)s+=$(""),s+=C` ${d}`;for(let d of a.labels)s+=C` {dim ${d}}`;s+=$("")}}return $({...r,content:s})},"sprintProblems"),Yc=n(t=>{bt(_e(t))},"printProblems"),no=n(t=>{switch(!0){case Tr(t):return st.yellowBright("JavaScript");case Sr(t):return st.blue("TypeScript");case Cr(t):return st.magenta("Gelly");default:return st.gray("File")}},"filetype"),Kc=n(t=>{let e={};for(let r of t){let s=r.node?.apiIdentifier??r.node?.name??"Other";e[s]??=[],e[s].push({type:r.node?.type??"Unknown",severity:r.severity,message:r.message,labels:Rr(r.nodeLabels?.map(i=>i?.identifier)??[])})}return e},"publishIssuesToProblems"),Xc=n(t=>{let e={};for(let r of t)e[r.path]??=[],e[r.path].push({type:r.type,severity:r.level,message:r.message,labels:[]});return e},"filesyncProblemsToProblems");T();var Lr=class extends wt{static{n(this,"YarnNotFoundError")}isBug=_t.NO;constructor(){super("Yarn not found")}render(){return C`
|
|
7
|
-
Yarn must be installed to sync your application. You can install it by running:
|
|
8
|
-
|
|
9
|
-
$ npm install --global yarn
|
|
10
|
-
|
|
11
|
-
For more information, see: https://classic.yarnpkg.com/en/docs/install
|
|
12
|
-
`}},Mt=class extends wt{constructor(r){super('The ".gadget/sync.json" file was invalid or not found');this.details=r}static{n(this,"UnknownDirectoryError")}isBug=_t.NO;render(){let r=this.details.directory.path;switch(this.details.command){case"add":case"open":case"status":return C`
|
|
13
|
-
A ".gadget/sync.json" file is missing in this directory:
|
|
14
|
-
|
|
15
|
-
${r}
|
|
16
|
-
|
|
17
|
-
In order to use "ggt ${this.details.command}", you must run it within a directory
|
|
18
|
-
that has already been initialized with "ggt dev".
|
|
19
|
-
`;case"dev":return C`
|
|
20
|
-
A ".gadget/sync.json" file is missing in this directory:
|
|
21
|
-
|
|
22
|
-
${r}
|
|
23
|
-
|
|
24
|
-
If you're running "ggt dev" for the first time, we recommend
|
|
25
|
-
using a gadget specific directory like this:
|
|
26
|
-
|
|
27
|
-
ggt dev ~/gadget/${this.details.args["--app"]??"<name>"}
|
|
28
|
-
|
|
29
|
-
To use a non-empty directory without a ".gadget/sync.json" file,
|
|
30
|
-
run "ggt dev" again with the "--allow-unknown-directory" flag:
|
|
31
|
-
|
|
32
|
-
ggt dev ${r} --allow-unknown-directory
|
|
33
|
-
`;default:return C`
|
|
34
|
-
A ".gadget/sync.json" file is missing in this directory:
|
|
35
|
-
|
|
36
|
-
${r}
|
|
37
|
-
|
|
38
|
-
If you're certain you want to use this directory, you can run
|
|
39
|
-
"ggt ${this.details.command}" again with the "--allow-unknown-directory" flag:
|
|
40
|
-
|
|
41
|
-
ggt ${this.details.command} --allow-unknown-directory
|
|
42
|
-
`}}},Mr=class extends wt{constructor(r){super(`Failed to synchronize files after ${r} attempts.`);this.attempts=r}static{n(this,"TooManyMergeAttemptsError")}isBug=_t.MAYBE;render(){return C`
|
|
43
|
-
We merged your local files with your environment's files ${this.attempts} times,
|
|
44
|
-
but your local and environment's files still don't match.
|
|
45
|
-
|
|
46
|
-
Make sure no one else is editing files on your environment, and try again.
|
|
47
|
-
`}},Br=class extends wt{constructor(r){super("This application is not allowed to be deployed due to fatal errors.");this.fatalErrors=r}static{n(this,"DeployDisallowedError")}isBug=_t.MAYBE;render(){let r=$`{red Gadget has detected the following fatal errors with your files:}`;return r+=_e({ensureEmptyLineAbove:!0,problems:this.fatalErrors,showFileTypes:!1}),r+=$({ensureEmptyLineAbove:!0,content:st.red("Please fix these errors and try again.")}),r}},so=n(t=>(t instanceof X&&(t=t.cause),wr(t)&&(t=t.errors),kr(t)&&(t=t[0]),_r(t)&&"message"in t&&br(t.message)&&t.message.includes("Files version mismatch")),"isFilesVersionMismatchError"),cl=n((t,e)=>{if(so(e)){t.log.debug("swallowing files version mismatch",{error:e});return}throw e},"swallowFilesVersionMismatch");T();var ce=pt(Zi(),1);import hr from"node:assert";import Oi from"node:path";T();var te=pt(Nr(),1),Yt=pt(zr(),1),ti=pt(Se(),1),dt=pt(Se(),1);import{spawn as da}from"child_process";import{EventEmitter as Rc}from"node:events";var Xt=Object.defineProperty,Eo=Object.defineProperties,Oo=Object.getOwnPropertyDescriptor,Po=Object.getOwnPropertyDescriptors,Je=Object.getOwnPropertyNames,Vr=Object.getOwnPropertySymbols,xn=Object.prototype.hasOwnProperty,Ro=Object.prototype.propertyIsEnumerable,Qr=n((t,e,r)=>e in t?Xt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,"__defNormalProp"),z=n((t,e)=>{for(var r in e||(e={}))xn.call(e,r)&&Qr(t,r,e[r]);if(Vr)for(var r of Vr(e))Ro.call(e,r)&&Qr(t,r,e[r]);return t},"__spreadValues"),Ct=n((t,e)=>Eo(t,Po(e)),"__spreadProps"),f=n((t,e)=>n(function(){return t&&(e=(0,t[Je(t)[0]])(t=0)),e},"__init"),"__esm"),Ao=n((t,e)=>n(function(){return e||(0,t[Je(t)[0]])((e={exports:{}}).exports,e),e.exports},"__require"),"__commonJS"),P=n((t,e)=>{for(var r in e)Xt(t,r,{get:e[r],enumerable:!0})},"__export"),Fo=n((t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Je(e))!xn.call(t,i)&&i!==r&&Xt(t,i,{get:n(()=>e[i],"get"),enumerable:!(s=Oo(e,i))||s.enumerable});return t},"__copyProps"),x=n(t=>Fo(Xt({},"__esModule",{value:!0}),t),"__toCommonJS"),St=n((t,e,r)=>new Promise((s,i)=>{var o=n(c=>{try{u(r.next(c))}catch(d){i(d)}},"fulfilled"),a=n(c=>{try{u(r.throw(c))}catch(d){i(d)}},"rejected"),u=n(c=>c.done?s(c.value):Promise.resolve(c.value).then(o,a),"step");u((r=r.apply(t,e)).next())}),"__async");function $o(...t){let e=new String(t);return Zt.set(e,t),e}n($o,"pathspec");function Wt(t){return t instanceof String&&Zt.has(t)}n(Wt,"isPathSpec");function Wr(t){return Zt.get(t)||[]}n(Wr,"toPaths");var Zt,Pt=f({"src/lib/args/pathspec.ts"(){"use strict";Zt=new WeakMap}}),tt,rt=f({"src/lib/errors/git-error.ts"(){"use strict";tt=class extends Error{static{n(this,"GitError")}constructor(t,e){super(e),this.task=t,Object.setPrototypeOf(this,new.target.prototype)}}}}),Rt,gt=f({"src/lib/errors/git-response-error.ts"(){"use strict";rt(),Rt=class extends tt{static{n(this,"GitResponseError")}constructor(t,e){super(void 0,e||String(t)),this.git=t}}}}),En,On=f({"src/lib/errors/task-configuration-error.ts"(){"use strict";rt(),En=class extends tt{static{n(this,"TaskConfigurationError")}constructor(t){super(void 0,t)}}}});function Pn(t){return typeof t=="function"?t:ut}n(Pn,"asFunction");function Rn(t){return typeof t=="function"&&t!==ut}n(Rn,"isUserFunction");function An(t,e){let r=t.indexOf(e);return r<=0?[t,""]:[t.substr(0,r),t.substr(r+1)]}n(An,"splitOn");function Fn(t,e=0){return $n(t)&&t.length>e?t[e]:void 0}n(Fn,"first");function at(t,e=0){if($n(t)&&t.length>e)return t[t.length-1-e]}n(at,"last");function $n(t){return!!(t&&typeof t.length=="number")}n($n,"isArrayLike");function At(t="",e=!0,r=`
|
|
48
|
-
`){return t.split(r).reduce((s,i)=>{let o=e?i.trim():i;return o&&s.push(o),s},[])}n(At,"toLinesWithContent");function ze(t,e){return At(t,!0).map(r=>e(r))}n(ze,"forEachLineWithContent");function Ve(t){return(0,te.exists)(t,te.FOLDER)}n(Ve,"folderExists");function w(t,e){return Array.isArray(t)?t.includes(e)||t.push(e):t.add(e),e}n(w,"append");function jn(t,e){return Array.isArray(t)&&!t.includes(e)&&t.push(e),t}n(jn,"including");function ee(t,e){if(Array.isArray(t)){let r=t.indexOf(e);r>=0&&t.splice(r,1)}else t.delete(e);return e}n(ee,"remove");function W(t){return Array.isArray(t)?t:[t]}n(W,"asArray");function Dn(t){return t.replace(/[\s-]+(.)/g,(e,r)=>r.toUpperCase())}n(Dn,"asCamelCase");function Ln(t){return W(t).map(String)}n(Ln,"asStringArray");function S(t,e=0){if(t==null)return e;let r=parseInt(t,10);return isNaN(r)?e:r}n(S,"asNumber");function xt(t,e){let r=[];for(let s=0,i=t.length;s<i;s++)r.push(e,t[s]);return r}n(xt,"prefixedArray");function Et(t){return(Array.isArray(t)?Buffer.concat(t):t).toString("utf-8")}n(Et,"bufferToString");function Mn(t,e){return Object.assign({},...e.map(r=>r in t?{[r]:t[r]}:{}))}n(Mn,"pick");function Ae(t=0){return new Promise(e=>setTimeout(e,t))}n(Ae,"delay");function Fe(t){if(t!==!1)return t}n(Fe,"orVoid");var ht,ut,Ft,re=f({"src/lib/utils/util.ts"(){"use strict";ht="\0",ut=n(()=>{},"NOOP"),Ft=Object.prototype.toString.call.bind(Object.prototype.toString)}});function H(t,e,r){return e(t)?t:arguments.length>2?r:void 0}n(H,"filterType");function Qe(t,e){let r=Wt(t)?"string":typeof t;return/number|string|boolean/.test(r)&&(!e||!e.includes(r))}n(Qe,"filterPrimitives");function We(t){return!!t&&Ft(t)==="[object Object]"}n(We,"filterPlainObject");function Bn(t){return typeof t=="function"}n(Bn,"filterFunction");var $t,A,In,Ht,He,Nn=f({"src/lib/utils/argument-filters.ts"(){"use strict";re(),Pt(),$t=n(t=>Array.isArray(t),"filterArray"),A=n(t=>typeof t=="string","filterString"),In=n(t=>Array.isArray(t)&&t.every(A),"filterStringArray"),Ht=n(t=>A(t)||Array.isArray(t)&&t.every(A),"filterStringOrStringArray"),He=n(t=>t==null||"number|boolean|function".includes(typeof t)?!1:Array.isArray(t)||typeof t=="string"||typeof t.length=="number","filterHasLength")}}),$e,jo=f({"src/lib/utils/exit-codes.ts"(){"use strict";$e=(t=>(t[t.SUCCESS=0]="SUCCESS",t[t.ERROR=1]="ERROR",t[t.NOT_FOUND=-2]="NOT_FOUND",t[t.UNCLEAN=128]="UNCLEAN",t))($e||{})}}),Ot,Do=f({"src/lib/utils/git-output-streams.ts"(){"use strict";Ot=class{static{n(this,"GitOutputStreams")}constructor(t,e){this.stdOut=t,this.stdErr=e}asStrings(){return new Ot(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}}),_,et,Lo=f({"src/lib/utils/line-parser.ts"(){"use strict";_=class{static{n(this,"LineParser")}constructor(t,e){this.matches=[],this.parse=(r,s)=>(this.resetMatches(),this._regExp.every((i,o)=>this.addMatch(i,o,r(o)))?this.useMatches(s,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(t)?t:[t],e&&(this.useMatches=e)}useMatches(t,e){throw new Error("LineParser:useMatches not implemented")}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(t,e,r){let s=r&&t.exec(r);return s&&this.pushMatch(e,s),!!s}pushMatch(t,e){this.matches.push(...e.slice(1))}},et=class extends _{static{n(this,"RemoteLineParser")}addMatch(t,e,r){return/^remote:\s/.test(String(r))&&super.addMatch(t,e,r)}pushMatch(t,e){(t>0||e.length>1)&&super.pushMatch(t,e)}}}});function Gn(...t){let e=process.cwd(),r=Object.assign(z({baseDir:e},Un),...t.filter(s=>typeof s=="object"&&s));return r.baseDir=r.baseDir||e,r.trimmed=r.trimmed===!0,r}n(Gn,"createInstanceConfig");var Un,Mo=f({"src/lib/utils/simple-git-options.ts"(){"use strict";Un={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function Ye(t,e=[]){return We(t)?Object.keys(t).reduce((r,s)=>{let i=t[s];return Wt(i)?r.push(i):Qe(i,["boolean"])?r.push(s+"="+i):r.push(s),r},e):e}n(Ye,"appendTaskOptions");function L(t,e=0,r=!1){let s=[];for(let i=0,o=e<0?t.length:e;i<o;i++)"string|number".includes(typeof t[i])&&s.push(String(t[i]));return Ye(Ke(t),s),r||s.push(...Bo(t)),s}n(L,"getTrailingOptions");function Bo(t){let e=typeof at(t)=="function";return H(at(t,e?1:0),$t,[])}n(Bo,"trailingArrayArgument");function Ke(t){let e=Bn(at(t));return H(at(t,e?1:0),We)}n(Ke,"trailingOptionsArgument");function E(t,e=!0){let r=Pn(at(t));return e||Rn(r)?r:void 0}n(E,"trailingFunctionArgument");var Io=f({"src/lib/utils/task-options.ts"(){"use strict";Nn(),re(),Pt()}});function je(t,e){return t(e.stdOut,e.stdErr)}n(je,"callTaskParser");function B(t,e,r,s=!0){return W(r).forEach(i=>{for(let o=At(i,s),a=0,u=o.length;a<u;a++){let c=n((d=0)=>{if(!(a+d>=u))return o[a+d]},"line");e.some(({parse:d})=>d(c,t))}}),t}n(B,"parseStringResponse");var No=f({"src/lib/utils/task-parser.ts"(){"use strict";re()}}),qn={};P(qn,{ExitCodes:n(()=>$e,"ExitCodes"),GitOutputStreams:n(()=>Ot,"GitOutputStreams"),LineParser:n(()=>_,"LineParser"),NOOP:n(()=>ut,"NOOP"),NULL:n(()=>ht,"NULL"),RemoteLineParser:n(()=>et,"RemoteLineParser"),append:n(()=>w,"append"),appendTaskOptions:n(()=>Ye,"appendTaskOptions"),asArray:n(()=>W,"asArray"),asCamelCase:n(()=>Dn,"asCamelCase"),asFunction:n(()=>Pn,"asFunction"),asNumber:n(()=>S,"asNumber"),asStringArray:n(()=>Ln,"asStringArray"),bufferToString:n(()=>Et,"bufferToString"),callTaskParser:n(()=>je,"callTaskParser"),createInstanceConfig:n(()=>Gn,"createInstanceConfig"),delay:n(()=>Ae,"delay"),filterArray:n(()=>$t,"filterArray"),filterFunction:n(()=>Bn,"filterFunction"),filterHasLength:n(()=>He,"filterHasLength"),filterPlainObject:n(()=>We,"filterPlainObject"),filterPrimitives:n(()=>Qe,"filterPrimitives"),filterString:n(()=>A,"filterString"),filterStringArray:n(()=>In,"filterStringArray"),filterStringOrStringArray:n(()=>Ht,"filterStringOrStringArray"),filterType:n(()=>H,"filterType"),first:n(()=>Fn,"first"),folderExists:n(()=>Ve,"folderExists"),forEachLineWithContent:n(()=>ze,"forEachLineWithContent"),getTrailingOptions:n(()=>L,"getTrailingOptions"),including:n(()=>jn,"including"),isUserFunction:n(()=>Rn,"isUserFunction"),last:n(()=>at,"last"),objectToString:n(()=>Ft,"objectToString"),orVoid:n(()=>Fe,"orVoid"),parseStringResponse:n(()=>B,"parseStringResponse"),pick:n(()=>Mn,"pick"),prefixedArray:n(()=>xt,"prefixedArray"),remove:n(()=>ee,"remove"),splitOn:n(()=>An,"splitOn"),toLinesWithContent:n(()=>At,"toLinesWithContent"),trailingFunctionArgument:n(()=>E,"trailingFunctionArgument"),trailingOptionsArgument:n(()=>Ke,"trailingOptionsArgument")});var b=f({"src/lib/utils/index.ts"(){"use strict";Nn(),jo(),Do(),Lo(),Mo(),Io(),No(),re()}}),Jn={};P(Jn,{CheckRepoActions:n(()=>De,"CheckRepoActions"),checkIsBareRepoTask:n(()=>Vn,"checkIsBareRepoTask"),checkIsRepoRootTask:n(()=>zn,"checkIsRepoRootTask"),checkIsRepoTask:n(()=>Go,"checkIsRepoTask")});function Go(t){switch(t){case"bare":return Vn();case"root":return zn()}return{commands:["rev-parse","--is-inside-work-tree"],format:"utf-8",onError:ne,parser:Xe}}n(Go,"checkIsRepoTask");function zn(){return{commands:["rev-parse","--git-dir"],format:"utf-8",onError:ne,parser(e){return/^\.(git)?$/.test(e.trim())}}}n(zn,"checkIsRepoRootTask");function Vn(){return{commands:["rev-parse","--is-bare-repository"],format:"utf-8",onError:ne,parser:Xe}}n(Vn,"checkIsBareRepoTask");function Uo(t){return/(Not a git repository|Kein Git-Repository)/i.test(String(t))}n(Uo,"isNotRepoMessage");var De,ne,Xe,Qn=f({"src/lib/tasks/check-is-repo.ts"(){"use strict";b(),De=(t=>(t.BARE="bare",t.IN_TREE="tree",t.IS_REPO_ROOT="root",t))(De||{}),ne=n(({exitCode:t},e,r,s)=>{if(t===128&&Uo(e))return r(Buffer.from("false"));s(e)},"onError"),Xe=n(t=>t.trim()==="true","parser")}});function qo(t,e){let r=new Wn(t),s=t?Yn:Hn;return At(e).forEach(i=>{let o=i.replace(s,"");r.paths.push(o),(Kn.test(o)?r.folders:r.files).push(o)}),r}n(qo,"cleanSummaryParser");var Wn,Hn,Yn,Kn,Jo=f({"src/lib/responses/CleanSummary.ts"(){"use strict";b(),Wn=class{static{n(this,"CleanResponse")}constructor(t){this.dryRun=t,this.paths=[],this.files=[],this.folders=[]}},Hn=/^[a-z]+\s*/i,Yn=/^[a-z]+\s+[a-z]+\s*/i,Kn=/\/$/}}),Le={};P(Le,{EMPTY_COMMANDS:n(()=>se,"EMPTY_COMMANDS"),adhocExecTask:n(()=>Xn,"adhocExecTask"),configurationErrorTask:n(()=>M,"configurationErrorTask"),isBufferTask:n(()=>ts,"isBufferTask"),isEmptyTask:n(()=>es,"isEmptyTask"),straightThroughBufferTask:n(()=>Zn,"straightThroughBufferTask"),straightThroughStringTask:n(()=>j,"straightThroughStringTask")});function Xn(t){return{commands:se,format:"empty",parser:t}}n(Xn,"adhocExecTask");function M(t){return{commands:se,format:"empty",parser(){throw typeof t=="string"?new En(t):t}}}n(M,"configurationErrorTask");function j(t,e=!1){return{commands:t,format:"utf-8",parser(r){return e?String(r).trim():r}}}n(j,"straightThroughStringTask");function Zn(t){return{commands:t,format:"buffer",parser(e){return e}}}n(Zn,"straightThroughBufferTask");function ts(t){return t.format==="buffer"}n(ts,"isBufferTask");function es(t){return t.format==="empty"||!t.commands.length}n(es,"isEmptyTask");var se,O=f({"src/lib/tasks/task.ts"(){"use strict";On(),se=[]}}),rs={};P(rs,{CONFIG_ERROR_INTERACTIVE_MODE:n(()=>Ze,"CONFIG_ERROR_INTERACTIVE_MODE"),CONFIG_ERROR_MODE_REQUIRED:n(()=>tr,"CONFIG_ERROR_MODE_REQUIRED"),CONFIG_ERROR_UNKNOWN_OPTION:n(()=>er,"CONFIG_ERROR_UNKNOWN_OPTION"),CleanOptions:n(()=>Jt,"CleanOptions"),cleanTask:n(()=>ns,"cleanTask"),cleanWithOptionsTask:n(()=>zo,"cleanWithOptionsTask"),isCleanOptionsArray:n(()=>Vo,"isCleanOptionsArray")});function zo(t,e){let{cleanMode:r,options:s,valid:i}=Qo(t);return r?i.options?(s.push(...e),s.some(Yo)?M(Ze):ns(r,s)):M(er+JSON.stringify(t)):M(tr)}n(zo,"cleanWithOptionsTask");function ns(t,e){return{commands:["clean",`-${t}`,...e],format:"utf-8",parser(s){return qo(t==="n",s)}}}n(ns,"cleanTask");function Vo(t){return Array.isArray(t)&&t.every(e=>rr.has(e))}n(Vo,"isCleanOptionsArray");function Qo(t){let e,r=[],s={cleanMode:!1,options:!0};return t.replace(/[^a-z]i/g,"").split("").forEach(i=>{Wo(i)?(e=i,s.cleanMode=!0):s.options=s.options&&Ho(r[r.length]=`-${i}`)}),{cleanMode:e,options:r,valid:s}}n(Qo,"getCleanOptions");function Wo(t){return t==="f"||t==="n"}n(Wo,"isCleanMode");function Ho(t){return/^-[a-z]$/i.test(t)&&rr.has(t.charAt(1))}n(Ho,"isKnownOption");function Yo(t){return/^-[^\-]/.test(t)?t.indexOf("i")>0:t==="--interactive"}n(Yo,"isInteractiveMode");var Ze,tr,er,Jt,rr,ss=f({"src/lib/tasks/clean.ts"(){"use strict";Jo(),b(),O(),Ze="Git clean interactive mode is not supported",tr='Git clean mode parameter ("n" or "f") is required',er="Git clean unknown option found in: ",Jt=(t=>(t.DRY_RUN="n",t.FORCE="f",t.IGNORED_INCLUDED="x",t.IGNORED_ONLY="X",t.EXCLUDING="e",t.QUIET="q",t.RECURSIVE="d",t))(Jt||{}),rr=new Set(["i",...Ln(Object.values(Jt))])}});function Ko(t){let e=new os;for(let r of is(t))e.addValue(r.file,String(r.key),r.value);return e}n(Ko,"configListParser");function Xo(t,e){let r=null,s=[],i=new Map;for(let o of is(t,e))o.key===e&&(s.push(r=o.value),i.has(o.file)||i.set(o.file,[]),i.get(o.file).push(r));return{key:e,paths:Array.from(i.keys()),scopes:i,value:r,values:s}}n(Xo,"configGetParser");function Zo(t){return t.replace(/^(file):/,"")}n(Zo,"configFilePath");function*is(t,e=null){let r=t.split("\0");for(let s=0,i=r.length-1;s<i;){let o=Zo(r[s++]),a=r[s++],u=e;if(a.includes(`
|
|
49
|
-
`)){let c=An(a,`
|
|
50
|
-
`);u=c[0],a=c[1]}yield{file:o,key:u,value:a}}}n(is,"configParser");var os,ta=f({"src/lib/responses/ConfigList.ts"(){"use strict";b(),os=class{static{n(this,"ConfigList")}constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((t,e)=>Object.assign(t,this.values[e]),{})),this._all}addFile(t){if(!(t in this.values)){let e=at(this.files);this.values[t]=e?Object.create(this.values[e]):{},this.files.push(t)}return this.values[t]}addValue(t,e,r){let s=this.addFile(t);s.hasOwnProperty(e)?Array.isArray(s[e])?s[e].push(r):s[e]=[s[e],r]:s[e]=r,this._all=void 0}}}});function Ce(t,e){return typeof t=="string"&&Me.hasOwnProperty(t)?t:e}n(Ce,"asConfigScope");function ea(t,e,r,s){let i=["config",`--${s}`];return r&&i.push("--add"),i.push(t,e),{commands:i,format:"utf-8",parser(o){return o}}}n(ea,"addConfigTask");function ra(t,e){let r=["config","--null","--show-origin","--get-all",t];return e&&r.splice(1,0,`--${e}`),{commands:r,format:"utf-8",parser(s){return Xo(s,t)}}}n(ra,"getConfigTask");function na(t){let e=["config","--list","--show-origin","--null"];return t&&e.push(`--${t}`),{commands:e,format:"utf-8",parser(r){return Ko(r)}}}n(na,"listConfigTask");function sa(){return{addConfig(t,e,...r){return this._runTask(ea(t,e,r[0]===!0,Ce(r[1],"local")),E(arguments))},getConfig(t,e){return this._runTask(ra(t,Ce(e,void 0)),E(arguments))},listConfig(...t){return this._runTask(na(Ce(t[0],void 0)),E(arguments))}}}n(sa,"config_default");var Me,as=f({"src/lib/tasks/config.ts"(){"use strict";ta(),b(),Me=(t=>(t.system="system",t.global="global",t.local="local",t.worktree="worktree",t))(Me||{})}});function ia(t){return us.has(t)}n(ia,"isDiffNameStatus");var xe,us,cs=f({"src/lib/tasks/diff-name-status.ts"(){"use strict";xe=(t=>(t.ADDED="A",t.COPIED="C",t.DELETED="D",t.MODIFIED="M",t.RENAMED="R",t.CHANGED="T",t.UNMERGED="U",t.UNKNOWN="X",t.BROKEN="B",t))(xe||{}),us=new Set(Object.values(xe))}});function oa(...t){return new ps().param(...t)}n(oa,"grepQueryBuilder");function aa(t){let e=new Set,r={};return ze(t,s=>{let[i,o,a]=s.split(ht);e.add(i),(r[i]=r[i]||[]).push({line:S(o),path:i,preview:a})}),{paths:e,results:r}}n(aa,"parseGrep");function ua(){return{grep(t){let e=E(arguments),r=L(arguments);for(let i of ls)if(r.includes(i))return this._runTask(M(`git.grep: use of "${i}" is not supported.`),e);typeof t=="string"&&(t=oa().param(t));let s=["grep","--null","-n","--full-name",...r,...t];return this._runTask({commands:s,format:"utf-8",parser(i){return aa(i)}},e)}}}n(ua,"grep_default");var ls,Tt,Hr,ps,fs=f({"src/lib/tasks/grep.ts"(){"use strict";b(),O(),ls=["-h"],Tt=Symbol("grepQuery"),ps=class{static{n(this,"GrepQuery")}constructor(){this[Hr]=[]}*[(Hr=Tt,Symbol.iterator)](){for(let t of this[Tt])yield t}and(...t){return t.length&&this[Tt].push("--and","(",...xt(t,"-e"),")"),this}param(...t){return this[Tt].push(...xt(t,"-e")),this}}}}),ms={};P(ms,{ResetMode:n(()=>zt,"ResetMode"),getResetMode:n(()=>la,"getResetMode"),resetTask:n(()=>ca,"resetTask")});function ca(t,e){let r=["reset"];return ds(t)&&r.push(`--${t}`),r.push(...e),j(r)}n(ca,"resetTask");function la(t){if(ds(t))return t;switch(typeof t){case"string":case"undefined":return"soft"}}n(la,"getResetMode");function ds(t){return hs.includes(t)}n(ds,"isValidResetMode");var zt,hs,gs=f({"src/lib/tasks/reset.ts"(){"use strict";O(),zt=(t=>(t.MIXED="mixed",t.SOFT="soft",t.HARD="hard",t.MERGE="merge",t.KEEP="keep",t))(zt||{}),hs=Array.from(Object.values(zt))}});function pa(){return(0,Yt.default)("simple-git")}n(pa,"createLog");function Yr(t,e,r){return!e||!String(e).replace(/\s*/,"")?r?(s,...i)=>{t(s,...i),r(s,...i)}:t:(s,...i)=>{t(`%s ${s}`,e,...i),r&&r(s,...i)}}n(Yr,"prefixedLogger");function fa(t,e,{namespace:r}){if(typeof t=="string")return t;let s=e&&e.namespace||"";return s.startsWith(r)?s.substr(r.length+1):s||r}n(fa,"childLoggerName");function nr(t,e,r,s=pa()){let i=t&&`[${t}]`||"",o=[],a=typeof e=="string"?s.extend(e):e,u=fa(H(e,A),a,s);return d(r);function c(p,m){return w(o,nr(t,u.replace(/^[^:]+/,p),m,s))}function d(p){let m=p&&`[${p}]`||"",h=a&&Yr(a,m)||ut,g=Yr(s,`${i} ${m}`,h);return Object.assign(a?h:g,{label:t,sibling:c,info:g,step:d})}}n(nr,"createLogger");var ys=f({"src/lib/git-logger.ts"(){"use strict";b(),Yt.default.formatters.L=t=>String(He(t)?t.length:"-"),Yt.default.formatters.B=t=>Buffer.isBuffer(t)?t.toString("utf8"):Ft(t)}}),Ut,Be,ma=f({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";rt(),ys(),Ut=class{static{n(this,"_TasksPendingQueue")}constructor(t="GitExecutor"){this.logLabel=t,this._queue=new Map}withProgress(t){return this._queue.get(t)}createProgress(t){let e=Ut.getName(t.commands[0]),r=nr(this.logLabel,e);return{task:t,logger:r,name:e}}push(t){let e=this.createProgress(t);return e.logger("Adding task to the queue, commands = %o",t.commands),this._queue.set(t,e),e}fatal(t){for(let[e,{logger:r}]of Array.from(this._queue.entries()))e===t.task?(r.info("Failed %o",t),r("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):r.info("A fatal exception occurred in a previous task, the queue has been purged: %o",t.message),this.complete(e);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(t){this.withProgress(t)&&this._queue.delete(t)}attempt(t){let e=this.withProgress(t);if(!e)throw new tt(void 0,"TasksPendingQueue: attempt called for an unknown task");return e.logger("Starting task"),e}static getName(t="empty"){return`task:${t}:${++Ut.counter}`}},Be=Ut,Be.counter=0}});function ot(t,e){return{method:Fn(t.commands)||"",commands:e}}n(ot,"pluginContext");function ha(t,e){return r=>{e("[ERROR] child process exception %o",r),t.push(Buffer.from(String(r.stack),"ascii"))}}n(ha,"onErrorReceived");function Kr(t,e,r,s){return i=>{r("%s received %L bytes",e,i),s("%B",i),t.push(i)}}n(Kr,"onDataReceived");var Ie,ga=f({"src/lib/runners/git-executor-chain.ts"(){"use strict";rt(),O(),b(),ma(),Ie=class{static{n(this,"GitExecutorChain")}constructor(t,e,r){this._executor=t,this._scheduler=e,this._plugins=r,this._chain=Promise.resolve(),this._queue=new Be}get cwd(){return this._cwd||this._executor.cwd}set cwd(t){this._cwd=t}get env(){return this._executor.env}get outputHandler(){return this._executor.outputHandler}chain(){return this}push(t){return this._queue.push(t),this._chain=this._chain.then(()=>this.attemptTask(t))}attemptTask(t){return St(this,null,function*(){let e=yield this._scheduler.next(),r=n(()=>this._queue.complete(t),"onQueueComplete");try{let{logger:s}=this._queue.attempt(t);return yield es(t)?this.attemptEmptyTask(t,s):this.attemptRemoteTask(t,s)}catch(s){throw this.onFatalException(t,s)}finally{r(),e()}})}onFatalException(t,e){let r=e instanceof tt?Object.assign(e,{task:t}):new tt(t,e&&String(e));return this._chain=Promise.resolve(),this._queue.fatal(r),r}attemptRemoteTask(t,e){return St(this,null,function*(){let r=this._plugins.exec("spawn.binary","",ot(t,t.commands)),s=this._plugins.exec("spawn.args",[...t.commands],ot(t,t.commands)),i=yield this.gitResponse(t,r,s,this.outputHandler,e.step("SPAWN")),o=yield this.handleTaskData(t,s,i,e.step("HANDLE"));return e("passing response to task's parser as a %s",t.format),ts(t)?je(t.parser,o):je(t.parser,o.asStrings())})}attemptEmptyTask(t,e){return St(this,null,function*(){return e("empty task bypassing child process to call to task's parser"),t.parser(this)})}handleTaskData(t,e,r,s){let{exitCode:i,rejection:o,stdOut:a,stdErr:u}=r;return new Promise((c,d)=>{s("Preparing to handle process response exitCode=%d stdOut=",i);let{error:p}=this._plugins.exec("task.error",{error:o},z(z({},ot(t,e)),r));if(p&&t.onError)return s.info("exitCode=%s handling with custom error handler"),t.onError(r,p,m=>{s.info("custom error handler treated as success"),s("custom error returned a %s",Ft(m)),c(new Ot(Array.isArray(m)?Buffer.concat(m):m,Buffer.concat(u)))},d);if(p)return s.info("handling as error: exitCode=%s stdErr=%s rejection=%o",i,u.length,o),d(p);s.info("retrieving task output complete"),c(new Ot(Buffer.concat(a),Buffer.concat(u)))})}gitResponse(t,e,r,s,i){return St(this,null,function*(){let o=i.sibling("output"),a=this._plugins.exec("spawn.options",{cwd:this.cwd,env:this.env,windowsHide:!0},ot(t,t.commands));return new Promise(u=>{let c=[],d=[];i.info("%s %o",e,r),i("%O",a);let p=this._beforeSpawn(t,r);if(p)return u({stdOut:c,stdErr:d,exitCode:9901,rejection:p});this._plugins.exec("spawn.before",void 0,Ct(z({},ot(t,r)),{kill(h){p=h||p}}));let m=da(e,r,a);m.stdout.on("data",Kr(c,"stdOut",i,o.step("stdOut"))),m.stderr.on("data",Kr(d,"stdErr",i,o.step("stdErr"))),m.on("error",ha(d,i)),s&&(i("Passing child process stdOut/stdErr to custom outputHandler"),s(e,m.stdout,m.stderr,[...r])),this._plugins.exec("spawn.after",void 0,Ct(z({},ot(t,r)),{spawned:m,close(h,g){u({stdOut:c,stdErr:d,exitCode:h,rejection:p||g})},kill(h){m.killed||(p=h,m.kill("SIGINT"))}}))})})}_beforeSpawn(t,e){let r;return this._plugins.exec("spawn.before",void 0,Ct(z({},ot(t,e)),{kill(s){r=s||r}})),r}}}}),vs={};P(vs,{GitExecutor:n(()=>bs,"GitExecutor")});var bs,ya=f({"src/lib/runners/git-executor.ts"(){"use strict";ga(),bs=class{static{n(this,"GitExecutor")}constructor(t,e,r){this.cwd=t,this._scheduler=e,this._plugins=r,this._chain=new Ie(this,this._scheduler,this._plugins)}chain(){return new Ie(this,this._scheduler,this._plugins)}push(t){return this._chain.push(t)}}}});function va(t,e,r=ut){let s=n(o=>{r(null,o)},"onSuccess"),i=n(o=>{o?.task===t&&r(o instanceof Rt?ba(o):o,void 0)},"onError2");e.then(s,i)}n(va,"taskCallback");function ba(t){let e=n(s=>{console.warn(`simple-git deprecation notice: accessing GitResponseError.${s} should be GitResponseError.git.${s}, this will no longer be available in version 3`),e=ut},"log");return Object.create(t,Object.getOwnPropertyNames(t.git).reduce(r,{}));function r(s,i){return i in t||(s[i]={enumerable:!1,configurable:!1,get(){return e(i),t.git[i]}}),s}}n(ba,"addDeprecationNoticeToError");var _a=f({"src/lib/task-callback.ts"(){"use strict";gt(),b()}});function Xr(t,e){return Xn(r=>{if(!Ve(t))throw new Error(`Git.cwd: cannot change to non-directory "${t}"`);return(e||r).cwd=t})}n(Xr,"changeWorkingDirectoryTask");var wa=f({"src/lib/tasks/change-working-directory.ts"(){"use strict";b(),O()}});function Ee(t){let e=["checkout",...t];return e[1]==="-b"&&e.includes("-B")&&(e[1]=ee(e,"-B")),j(e)}n(Ee,"checkoutTask");function ka(){return{checkout(){return this._runTask(Ee(L(arguments,1)),E(arguments))},checkoutBranch(t,e){return this._runTask(Ee(["-b",t,e,...L(arguments)]),E(arguments))},checkoutLocalBranch(t){return this._runTask(Ee(["-b",t,...L(arguments)]),E(arguments))}}}n(ka,"checkout_default");var Ta=f({"src/lib/tasks/checkout.ts"(){"use strict";b(),O()}});function Sa(){return{count:0,garbage:0,inPack:0,packs:0,prunePackable:0,size:0,sizeGarbage:0,sizePack:0}}n(Sa,"countObjectsResponse");function Ca(){return{countObjects(){return this._runTask({commands:["count-objects","--verbose"],format:"utf-8",parser(t){return B(Sa(),[_s],t)}})}}}n(Ca,"count_objects_default");var _s,xa=f({"src/lib/tasks/count-objects.ts"(){"use strict";b(),_s=new _(/([a-z-]+): (\d+)$/,(t,[e,r])=>{let s=Dn(e);t.hasOwnProperty(s)&&(t[s]=S(r))})}});function Ea(t){return B({author:null,branch:"",commit:"",root:!1,summary:{changes:0,insertions:0,deletions:0}},ws,t)}n(Ea,"parseCommitResult");var ws,Oa=f({"src/lib/parsers/parse-commit.ts"(){"use strict";b(),ws=[new _(/^\[([^\s]+)( \([^)]+\))? ([^\]]+)/,(t,[e,r,s])=>{t.branch=e,t.commit=s,t.root=!!r}),new _(/\s*Author:\s(.+)/i,(t,[e])=>{let r=e.split("<"),s=r.pop();!s||!s.includes("@")||(t.author={email:s.substr(0,s.length-1),name:r.join("<").trim()})}),new _(/(\d+)[^,]*(?:,\s*(\d+)[^,]*)(?:,\s*(\d+))/g,(t,[e,r,s])=>{t.summary.changes=parseInt(e,10)||0,t.summary.insertions=parseInt(r,10)||0,t.summary.deletions=parseInt(s,10)||0}),new _(/^(\d+)[^,]*(?:,\s*(\d+)[^(]+\(([+-]))?/,(t,[e,r,s])=>{t.summary.changes=parseInt(e,10)||0;let i=parseInt(r,10)||0;s==="-"?t.summary.deletions=i:s==="+"&&(t.summary.insertions=i)})]}});function Pa(t,e,r){return{commands:["-c","core.abbrev=40","commit",...xt(t,"-m"),...e,...r],format:"utf-8",parser:Ea}}n(Pa,"commitTask");function Ra(){return{commit(e,...r){let s=E(arguments),i=t(e)||Pa(W(e),W(H(r[0],Ht,[])),[...H(r[1],$t,[]),...L(arguments,0,!0)]);return this._runTask(i,s)}};function t(e){return!Ht(e)&&M("git.commit: requires the commit message to be supplied as a string/string[]")}}n(Ra,"commit_default");var Aa=f({"src/lib/tasks/commit.ts"(){"use strict";Oa(),b(),O()}});function Fa(){return{firstCommit(){return this._runTask(j(["rev-list","--max-parents=0","HEAD"],!0),E(arguments))}}}n(Fa,"first_commit_default");var $a=f({"src/lib/tasks/first-commit.ts"(){"use strict";b(),O()}});function ja(t,e){let r=["hash-object",t];return e&&r.push("-w"),j(r,!0)}n(ja,"hashObjectTask");var Da=f({"src/lib/tasks/hash-object.ts"(){"use strict";O()}});function La(t,e,r){let s=String(r).trim(),i;if(i=ks.exec(s))return new Vt(t,e,!1,i[1]);if(i=Ts.exec(s))return new Vt(t,e,!0,i[1]);let o="",a=s.split(" ");for(;a.length;)if(a.shift()==="in"){o=a.join(" ");break}return new Vt(t,e,/^re/i.test(s),o)}n(La,"parseInit");var Vt,ks,Ts,Ma=f({"src/lib/responses/InitSummary.ts"(){"use strict";Vt=class{static{n(this,"InitSummary")}constructor(t,e,r,s){this.bare=t,this.path=e,this.existing=r,this.gitDir=s}},ks=/^Init.+ repository in (.+)$/,Ts=/^Rein.+ in (.+)$/}});function Ba(t){return t.includes(sr)}n(Ba,"hasBareCommand");function Ia(t=!1,e,r){let s=["init",...r];return t&&!Ba(s)&&s.splice(1,0,sr),{commands:s,format:"utf-8",parser(i){return La(s.includes("--bare"),e,i)}}}n(Ia,"initTask");var sr,Na=f({"src/lib/tasks/init.ts"(){"use strict";Ma(),sr="--bare"}});function ir(t){for(let e=0;e<t.length;e++){let r=or.exec(t[e]);if(r)return`--${r[1]}`}return""}n(ir,"logFormatFromCommand");function Ga(t){return or.test(t)}n(Ga,"isLogFormat");var or,jt=f({"src/lib/args/log-format.ts"(){"use strict";or=/^--(stat|numstat|name-only|name-status)(=|$)/}}),Ss,Ua=f({"src/lib/responses/DiffSummary.ts"(){"use strict";Ss=class{static{n(this,"DiffSummary")}constructor(){this.changed=0,this.deletions=0,this.insertions=0,this.files=[]}}}});function Cs(t=""){let e=xs[t];return r=>B(new Ss,e,r,!1)}n(Cs,"getDiffParser");var Oe,Zr,tn,en,xs,Es=f({"src/lib/parsers/parse-diff-summary.ts"(){"use strict";jt(),Ua(),cs(),b(),Oe=[new _(/^(.+)\s+\|\s+(\d+)(\s+[+\-]+)?$/,(t,[e,r,s=""])=>{t.files.push({file:e.trim(),changes:S(r),insertions:s.replace(/[^+]/g,"").length,deletions:s.replace(/[^-]/g,"").length,binary:!1})}),new _(/^(.+) \|\s+Bin ([0-9.]+) -> ([0-9.]+) ([a-z]+)/,(t,[e,r,s])=>{t.files.push({file:e.trim(),before:S(r),after:S(s),binary:!0})}),new _(/(\d+) files? changed\s*((?:, \d+ [^,]+){0,2})/,(t,[e,r])=>{let s=/(\d+) i/.exec(r),i=/(\d+) d/.exec(r);t.changed=S(e),t.insertions=S(s?.[1]),t.deletions=S(i?.[1])})],Zr=[new _(/(\d+)\t(\d+)\t(.+)$/,(t,[e,r,s])=>{let i=S(e),o=S(r);t.changed++,t.insertions+=i,t.deletions+=o,t.files.push({file:s,changes:i+o,insertions:i,deletions:o,binary:!1})}),new _(/-\t-\t(.+)$/,(t,[e])=>{t.changed++,t.files.push({file:e,after:0,before:0,binary:!0})})],tn=[new _(/(.+)$/,(t,[e])=>{t.changed++,t.files.push({file:e,changes:0,insertions:0,deletions:0,binary:!1})})],en=[new _(/([ACDMRTUXB])([0-9]{0,3})\t(.[^\t]*)(\t(.[^\t]*))?$/,(t,[e,r,s,i,o])=>{t.changed++,t.files.push({file:o??s,changes:0,insertions:0,deletions:0,binary:!1,status:Fe(ia(e)&&e),from:Fe(!!o&&s!==o&&s),similarity:S(r)})})],xs={"":Oe,"--stat":Oe,"--numstat":Zr,"--name-status":en,"--name-only":tn}}});function qa(t,e){return e.reduce((r,s,i)=>(r[s]=t[i]||"",r),Object.create({diff:null}))}n(qa,"lineBuilder");function Os(t=cr,e=Ps,r=""){let s=Cs(r);return function(i){let o=At(i.trim(),!1,ar).map(function(a){let u=a.split(ur),c=qa(u[0].split(t),e);return u.length>1&&u[1].trim()&&(c.diff=s(u[1])),c});return{all:o,latest:o.length&&o[0]||null,total:o.length}}}n(Os,"createListLogSummaryParser");var ar,ur,cr,Ps,Rs=f({"src/lib/parsers/parse-list-log-summary.ts"(){"use strict";b(),Es(),jt(),ar="\xF2\xF2\xF2\xF2\xF2\xF2 ",ur=" \xF2\xF2",cr=" \xF2 ",Ps=["hash","date","message","refs","author_name","author_email"]}}),As={};P(As,{diffSummaryTask:n(()=>Ja,"diffSummaryTask"),validateLogFormatConfig:n(()=>ie,"validateLogFormatConfig")});function Ja(t){let e=ir(t),r=["diff"];return e===""&&(e="--stat",r.push("--stat=4096")),r.push(...t),ie(r)||{commands:r,format:"utf-8",parser:Cs(e)}}n(Ja,"diffSummaryTask");function ie(t){let e=t.filter(Ga);if(e.length>1)return M(`Summary flags are mutually exclusive - pick one of ${e.join(",")}`);if(e.length&&t.includes("-z"))return M(`Summary flag ${e} parsing is not compatible with null termination option '-z'`)}n(ie,"validateLogFormatConfig");var lr=f({"src/lib/tasks/diff.ts"(){"use strict";jt(),Es(),O()}});function za(t,e){let r=[],s=[];return Object.keys(t).forEach(i=>{r.push(i),s.push(String(t[i]))}),[r,s.join(e)]}n(za,"prettyFormat");function Va(t){return Object.keys(t).reduce((e,r)=>(r in Ne||(e[r]=t[r]),e),{})}n(Va,"userOptions");function Fs(t={},e=[]){let r=H(t.splitter,A,cr),s=!Qe(t.format)&&t.format?t.format:{hash:"%H",date:t.strictDate===!1?"%ai":"%aI",message:"%s",refs:"%D",body:t.multiLine?"%B":"%b",author_name:t.mailMap!==!1?"%aN":"%an",author_email:t.mailMap!==!1?"%aE":"%ae"},[i,o]=za(s,r),a=[],u=[`--pretty=format:${ar}${o}${ur}`,...e],c=t.n||t["max-count"]||t.maxCount;if(c&&u.push(`--max-count=${c}`),t.from||t.to){let d=t.symmetric!==!1?"...":"..";a.push(`${t.from||""}${d}${t.to||""}`)}return A(t.file)&&u.push("--follow",$o(t.file)),Ye(Va(t),u),{fields:i,splitter:r,commands:[...u,...a]}}n(Fs,"parseLogOptions");function Qa(t,e,r){let s=Os(t,e,ir(r));return{commands:["log",...r],format:"utf-8",parser:s}}n(Qa,"logTask");function Wa(){return{log(...r){let s=E(arguments),i=Fs(Ke(arguments),H(arguments[0],$t)),o=e(...r)||ie(i.commands)||t(i);return this._runTask(o,s)}};function t(r){return Qa(r.splitter,r.fields,r.commands)}function e(r,s){return A(r)&&A(s)&&M("git.log(string, string) should be replaced with git.log({ from: string, to: string })")}}n(Wa,"log_default");var Ne,$s=f({"src/lib/tasks/log.ts"(){"use strict";jt(),Pt(),Rs(),b(),O(),lr(),Ne=(t=>(t[t["--pretty"]=0]="--pretty",t[t["max-count"]=1]="max-count",t[t.maxCount=2]="maxCount",t[t.n=3]="n",t[t.file=4]="file",t[t.format=5]="format",t[t.from=6]="from",t[t.to=7]="to",t[t.splitter=8]="splitter",t[t.symmetric=9]="symmetric",t[t.mailMap=10]="mailMap",t[t.multiLine=11]="multiLine",t[t.strictDate=12]="strictDate",t))(Ne||{})}}),Qt,js,Ha=f({"src/lib/responses/MergeSummary.ts"(){"use strict";Qt=class{static{n(this,"MergeSummaryConflict")}constructor(t,e=null,r){this.reason=t,this.file=e,this.meta=r}toString(){return`${this.file}:${this.reason}`}},js=class{static{n(this,"MergeSummaryDetail")}constructor(){this.conflicts=[],this.merges=[],this.result="success"}get failed(){return this.conflicts.length>0}get reason(){return this.result}toString(){return this.conflicts.length?`CONFLICTS: ${this.conflicts.join(", ")}`:"OK"}}}}),Ge,Ds,Ya=f({"src/lib/responses/PullSummary.ts"(){"use strict";Ge=class{static{n(this,"PullSummary")}constructor(){this.remoteMessages={all:[]},this.created=[],this.deleted=[],this.files=[],this.deletions={},this.insertions={},this.summary={changes:0,deletions:0,insertions:0}}},Ds=class{static{n(this,"PullFailedSummary")}constructor(){this.remote="",this.hash={local:"",remote:""},this.branch={local:"",remote:""},this.message=""}toString(){return this.message}}}});function Pe(t){return t.objects=t.objects||{compressing:0,counting:0,enumerating:0,packReused:0,reused:{count:0,delta:0},total:{count:0,delta:0}}}n(Pe,"objectEnumerationResult");function rn(t){let e=/^\s*(\d+)/.exec(t),r=/delta (\d+)/i.exec(t);return{count:S(e&&e[1]||"0"),delta:S(r&&r[1]||"0")}}n(rn,"asObjectCount");var Ls,Ka=f({"src/lib/parsers/parse-remote-objects.ts"(){"use strict";b(),Ls=[new et(/^remote:\s*(enumerating|counting|compressing) objects: (\d+),/i,(t,[e,r])=>{let s=e.toLowerCase(),i=Pe(t.remoteMessages);Object.assign(i,{[s]:S(r)})}),new et(/^remote:\s*(enumerating|counting|compressing) objects: \d+% \(\d+\/(\d+)\),/i,(t,[e,r])=>{let s=e.toLowerCase(),i=Pe(t.remoteMessages);Object.assign(i,{[s]:S(r)})}),new et(/total ([^,]+), reused ([^,]+), pack-reused (\d+)/i,(t,[e,r,s])=>{let i=Pe(t.remoteMessages);i.total=rn(e),i.reused=rn(r),i.packReused=S(s)})]}});function Ms(t,e){return B({remoteMessages:new Is},Bs,e)}n(Ms,"parseRemoteMessages");var Bs,Is,Ns=f({"src/lib/parsers/parse-remote-messages.ts"(){"use strict";b(),Ka(),Bs=[new et(/^remote:\s*(.+)$/,(t,[e])=>(t.remoteMessages.all.push(e.trim()),!1)),...Ls,new et([/create a (?:pull|merge) request/i,/\s(https?:\/\/\S+)$/],(t,[e])=>{t.remoteMessages.pullRequestUrl=e}),new et([/found (\d+) vulnerabilities.+\(([^)]+)\)/i,/\s(https?:\/\/\S+)$/],(t,[e,r,s])=>{t.remoteMessages.vulnerabilities={count:S(e),summary:r,url:s}})],Is=class{static{n(this,"RemoteMessageSummary")}constructor(){this.all=[]}}}});function Xa(t,e){let r=B(new Ds,Gs,[t,e]);return r.message&&r}n(Xa,"parsePullErrorResult");var nn,sn,on,an,Gs,un,pr,Us=f({"src/lib/parsers/parse-pull.ts"(){"use strict";Ya(),b(),Ns(),nn=/^\s*(.+?)\s+\|\s+\d+\s*(\+*)(-*)/,sn=/(\d+)\D+((\d+)\D+\(\+\))?(\D+(\d+)\D+\(-\))?/,on=/^(create|delete) mode \d+ (.+)/,an=[new _(nn,(t,[e,r,s])=>{t.files.push(e),r&&(t.insertions[e]=r.length),s&&(t.deletions[e]=s.length)}),new _(sn,(t,[e,,r,,s])=>r!==void 0||s!==void 0?(t.summary.changes=+e||0,t.summary.insertions=+r||0,t.summary.deletions=+s||0,!0):!1),new _(on,(t,[e,r])=>{w(t.files,r),w(e==="create"?t.created:t.deleted,r)})],Gs=[new _(/^from\s(.+)$/i,(t,[e])=>void(t.remote=e)),new _(/^fatal:\s(.+)$/,(t,[e])=>void(t.message=e)),new _(/([a-z0-9]+)\.\.([a-z0-9]+)\s+(\S+)\s+->\s+(\S+)$/,(t,[e,r,s,i])=>{t.branch.local=s,t.hash.local=e,t.branch.remote=i,t.hash.remote=r})],un=n((t,e)=>B(new Ge,an,[t,e]),"parsePullDetail"),pr=n((t,e)=>Object.assign(new Ge,un(t,e),Ms(t,e)),"parsePullResult")}}),cn,qs,ln,Za=f({"src/lib/parsers/parse-merge.ts"(){"use strict";Ha(),b(),Us(),cn=[new _(/^Auto-merging\s+(.+)$/,(t,[e])=>{t.merges.push(e)}),new _(/^CONFLICT\s+\((.+)\): Merge conflict in (.+)$/,(t,[e,r])=>{t.conflicts.push(new Qt(e,r))}),new _(/^CONFLICT\s+\((.+\/delete)\): (.+) deleted in (.+) and/,(t,[e,r,s])=>{t.conflicts.push(new Qt(e,r,{deleteRef:s}))}),new _(/^CONFLICT\s+\((.+)\):/,(t,[e])=>{t.conflicts.push(new Qt(e,null))}),new _(/^Automatic merge failed;\s+(.+)$/,(t,[e])=>{t.result=e})],qs=n((t,e)=>Object.assign(ln(t,e),pr(t,e)),"parseMergeResult"),ln=n(t=>B(new js,cn,t),"parseMergeDetail")}});function pn(t){return t.length?{commands:["merge",...t],format:"utf-8",parser(e,r){let s=qs(e,r);if(s.failed)throw new Rt(s);return s}}:M("Git.merge requires at least one option")}n(pn,"mergeTask");var tu=f({"src/lib/tasks/merge.ts"(){"use strict";gt(),Za(),O()}});function eu(t,e,r){let s=r.includes("deleted"),i=r.includes("tag")||/^refs\/tags/.test(t),o=!r.includes("new");return{deleted:s,tag:i,branch:!i,new:!o,alreadyUpdated:o,local:t,remote:e}}n(eu,"pushResultPushedItem");var fn,Js,mn,ru=f({"src/lib/parsers/parse-push.ts"(){"use strict";b(),Ns(),fn=[new _(/^Pushing to (.+)$/,(t,[e])=>{t.repo=e}),new _(/^updating local tracking ref '(.+)'/,(t,[e])=>{t.ref=Ct(z({},t.ref||{}),{local:e})}),new _(/^[=*-]\s+([^:]+):(\S+)\s+\[(.+)]$/,(t,[e,r,s])=>{t.pushed.push(eu(e,r,s))}),new _(/^Branch '([^']+)' set up to track remote branch '([^']+)' from '([^']+)'/,(t,[e,r,s])=>{t.branch=Ct(z({},t.branch||{}),{local:e,remote:r,remoteName:s})}),new _(/^([^:]+):(\S+)\s+([a-z0-9]+)\.\.([a-z0-9]+)$/,(t,[e,r,s,i])=>{t.update={head:{local:e,remote:r},hash:{from:s,to:i}}})],Js=n((t,e)=>{let r=mn(t,e),s=Ms(t,e);return z(z({},r),s)},"parsePushResult"),mn=n((t,e)=>B({pushed:[]},fn,[t,e]),"parsePushDetail")}}),zs={};P(zs,{pushTagsTask:n(()=>nu,"pushTagsTask"),pushTask:n(()=>fr,"pushTask")});function nu(t={},e){return w(e,"--tags"),fr(t,e)}n(nu,"pushTagsTask");function fr(t={},e){let r=["push",...e];return t.branch&&r.splice(1,0,t.branch),t.remote&&r.splice(1,0,t.remote),ee(r,"-v"),w(r,"--verbose"),w(r,"--porcelain"),{commands:r,format:"utf-8",parser:Js}}n(fr,"pushTask");var Vs=f({"src/lib/tasks/push.ts"(){"use strict";ru(),b()}});function su(){return{showBuffer(){let t=["show",...L(arguments,1)];return t.includes("--binary")||t.splice(1,0,"--binary"),this._runTask(Zn(t),E(arguments))},show(){let t=["show",...L(arguments,1)];return this._runTask(j(t),E(arguments))}}}n(su,"show_default");var iu=f({"src/lib/tasks/show.ts"(){"use strict";b(),O()}}),dn,Qs,ou=f({"src/lib/responses/FileStatusSummary.ts"(){"use strict";dn=/^(.+)\0(.+)$/,Qs=class{static{n(this,"FileStatusSummary")}constructor(t,e,r){if(this.path=t,this.index=e,this.working_dir=r,e==="R"||r==="R"){let s=dn.exec(t)||[null,t,t];this.from=s[2]||"",this.path=s[1]||""}}}}});function hn(t){let[e,r]=t.split(ht);return{from:r||e,to:e}}n(hn,"renamedFile");function U(t,e,r){return[`${t}${e}`,r]}n(U,"parser3");function Re(t,...e){return e.map(r=>U(t,r,(s,i)=>w(s.conflicted,i)))}n(Re,"conflicts");function au(t,e){let r=e.trim();switch(" "){case r.charAt(2):return s(r.charAt(0),r.charAt(1),r.substr(3));case r.charAt(1):return s(" ",r.charAt(0),r.substr(2));default:return}function s(i,o,a){let u=`${i}${o}`,c=Ws.get(u);c&&c(t,a),u!=="##"&&u!=="!!"&&t.files.push(new Qs(a,i,o))}n(s,"data")}n(au,"splitLine");var gn,Ws,Hs,uu=f({"src/lib/responses/StatusSummary.ts"(){"use strict";b(),ou(),gn=class{static{n(this,"StatusSummary")}constructor(){this.not_added=[],this.conflicted=[],this.created=[],this.deleted=[],this.ignored=void 0,this.modified=[],this.renamed=[],this.files=[],this.staged=[],this.ahead=0,this.behind=0,this.current=null,this.tracking=null,this.detached=!1,this.isClean=()=>!this.files.length}},Ws=new Map([U(" ","A",(t,e)=>w(t.created,e)),U(" ","D",(t,e)=>w(t.deleted,e)),U(" ","M",(t,e)=>w(t.modified,e)),U("A"," ",(t,e)=>w(t.created,e)&&w(t.staged,e)),U("A","M",(t,e)=>w(t.created,e)&&w(t.staged,e)&&w(t.modified,e)),U("D"," ",(t,e)=>w(t.deleted,e)&&w(t.staged,e)),U("M"," ",(t,e)=>w(t.modified,e)&&w(t.staged,e)),U("M","M",(t,e)=>w(t.modified,e)&&w(t.staged,e)),U("R"," ",(t,e)=>{w(t.renamed,hn(e))}),U("R","M",(t,e)=>{let r=hn(e);w(t.renamed,r),w(t.modified,r.to)}),U("!","!",(t,e)=>{w(t.ignored=t.ignored||[],e)}),U("?","?",(t,e)=>w(t.not_added,e)),...Re("A","A","U"),...Re("D","D","U"),...Re("U","A","D","U"),["##",(t,e)=>{let r=/ahead (\d+)/,s=/behind (\d+)/,i=/^(.+?(?=(?:\.{3}|\s|$)))/,o=/\.{3}(\S*)/,a=/\son\s([\S]+)$/,u;u=r.exec(e),t.ahead=u&&+u[1]||0,u=s.exec(e),t.behind=u&&+u[1]||0,u=i.exec(e),t.current=u&&u[1],u=o.exec(e),t.tracking=u&&u[1],u=a.exec(e),t.current=u&&u[1]||t.current,t.detached=/\(no branch\)/.test(e)}]]),Hs=n(function(t){let e=t.split(ht),r=new gn;for(let s=0,i=e.length;s<i;){let o=e[s++].trim();o&&(o.charAt(0)==="R"&&(o+=ht+(e[s++]||"")),au(r,o))}return r},"parseStatusSummary")}});function cu(t){return{format:"utf-8",commands:["status","--porcelain","-b","-u","--null",...t.filter(r=>!Ys.includes(r))],parser(r){return Hs(r)}}}n(cu,"statusTask");var Ys,lu=f({"src/lib/tasks/status.ts"(){"use strict";uu(),Ys=["--null","-z"]}});function Kt(t=0,e=0,r=0,s="",i=!0){return Object.defineProperty({major:t,minor:e,patch:r,agent:s,installed:i},"toString",{value(){return`${this.major}.${this.minor}.${this.patch}`},configurable:!1,enumerable:!1})}n(Kt,"versionResponse");function pu(){return Kt(0,0,0,"",!1)}n(pu,"notInstalledResponse");function fu(){return{version(){return this._runTask({commands:["--version"],format:"utf-8",parser:mu,onError(t,e,r,s){if(t.exitCode===-2)return r(Buffer.from(mr));s(e)}})}}}n(fu,"version_default");function mu(t){return t===mr?pu():B(Kt(0,0,0,t),Ks,t)}n(mu,"versionParser");var mr,Ks,du=f({"src/lib/tasks/version.ts"(){"use strict";b(),mr="installed=false",Ks=[new _(/version (\d+)\.(\d+)\.(\d+)(?:\s*\((.+)\))?/,(t,[e,r,s,i=""])=>{Object.assign(t,Kt(S(e),S(r),S(s),i))}),new _(/version (\d+)\.(\d+)\.(\D+)(.+)?$/,(t,[e,r,s,i=""])=>{Object.assign(t,Kt(S(e),S(r),s,i))})]}}),Xs={};P(Xs,{SimpleGitApi:n(()=>Ue,"SimpleGitApi")});var Ue,hu=f({"src/lib/simple-git-api.ts"(){"use strict";_a(),wa(),Ta(),xa(),Aa(),as(),$a(),fs(),Da(),Na(),$s(),tu(),Vs(),iu(),lu(),O(),du(),b(),Ue=class{static{n(this,"SimpleGitApi")}constructor(t){this._executor=t}_runTask(t,e){let r=this._executor.chain(),s=r.push(t);return e&&va(t,s,e),Object.create(this,{then:{value:s.then.bind(s)},catch:{value:s.catch.bind(s)},_executor:{value:r}})}add(t){return this._runTask(j(["add",...W(t)]),E(arguments))}cwd(t){let e=E(arguments);return typeof t=="string"?this._runTask(Xr(t,this._executor),e):typeof t?.path=="string"?this._runTask(Xr(t.path,t.root&&this._executor||void 0),e):this._runTask(M("Git.cwd: workingDirectory must be supplied as a string"),e)}hashObject(t,e){return this._runTask(ja(t,e===!0),E(arguments))}init(t){return this._runTask(Ia(t===!0,this._executor.cwd,L(arguments)),E(arguments))}merge(){return this._runTask(pn(L(arguments)),E(arguments))}mergeFromTo(t,e){return A(t)&&A(e)?this._runTask(pn([t,e,...L(arguments)]),E(arguments,!1)):this._runTask(M("Git.mergeFromTo requires that the 'remote' and 'branch' arguments are supplied as strings"))}outputHandler(t){return this._executor.outputHandler=t,this}push(){let t=fr({remote:H(arguments[0],A),branch:H(arguments[1],A)},L(arguments));return this._runTask(t,E(arguments))}stash(){return this._runTask(j(["stash",...L(arguments)]),E(arguments))}status(){return this._runTask(cu(L(arguments)),E(arguments))}},Object.assign(Ue.prototype,ka(),Ra(),sa(),Ca(),Fa(),ua(),Wa(),su(),fu())}}),Zs={};P(Zs,{Scheduler:n(()=>ei,"Scheduler")});var yn,ei,gu=f({"src/lib/runners/scheduler.ts"(){"use strict";b(),ys(),yn=(()=>{let t=0;return()=>{t++;let{promise:e,done:r}=(0,ti.createDeferred)();return{promise:e,done:r,id:t}}})(),ei=class{static{n(this,"Scheduler")}constructor(t=2){this.concurrency=t,this.logger=nr("","scheduler"),this.pending=[],this.running=[],this.logger("Constructed, concurrency=%s",t)}schedule(){if(!this.pending.length||this.running.length>=this.concurrency){this.logger("Schedule attempt ignored, pending=%s running=%s concurrency=%s",this.pending.length,this.running.length,this.concurrency);return}let t=w(this.running,this.pending.shift());this.logger("Attempting id=%s",t.id),t.done(()=>{this.logger("Completing id=",t.id),ee(this.running,t),this.schedule()})}next(){let{promise:t,id:e}=w(this.pending,yn());return this.logger("Scheduling id=%s",e),this.schedule(),t}}}}),ri={};P(ri,{applyPatchTask:n(()=>yu,"applyPatchTask")});function yu(t,e){return j(["apply",...e,...t])}n(yu,"applyPatchTask");var vu=f({"src/lib/tasks/apply-patch.ts"(){"use strict";O()}});function bu(t,e){return{branch:t,hash:e,success:!0}}n(bu,"branchDeletionSuccess");function _u(t){return{branch:t,hash:null,success:!1}}n(_u,"branchDeletionFailure");var ni,wu=f({"src/lib/responses/BranchDeleteSummary.ts"(){"use strict";ni=class{static{n(this,"BranchDeletionBatch")}constructor(){this.all=[],this.branches={},this.errors=[]}get success(){return!this.errors.length}}}});function si(t,e){return e===1&&qe.test(t)}n(si,"hasBranchDeletionError");var vn,qe,bn,oe,ku=f({"src/lib/parsers/parse-branch-delete.ts"(){"use strict";wu(),b(),vn=/(\S+)\s+\(\S+\s([^)]+)\)/,qe=/^error[^']+'([^']+)'/m,bn=[new _(vn,(t,[e,r])=>{let s=bu(e,r);t.all.push(s),t.branches[e]=s}),new _(qe,(t,[e])=>{let r=_u(e);t.errors.push(r),t.all.push(r),t.branches[e]=r})],oe=n((t,e)=>B(new ni,bn,[t,e]),"parseBranchDeletions")}}),ii,Tu=f({"src/lib/responses/BranchSummary.ts"(){"use strict";ii=class{static{n(this,"BranchSummaryResult")}constructor(){this.all=[],this.branches={},this.current="",this.detached=!1}push(t,e,r,s,i){t==="*"&&(this.detached=e,this.current=r),this.all.push(r),this.branches[r]={current:t==="*",linkedWorkTree:t==="+",name:r,commit:s,label:i}}}}});function _n(t){return t?t.charAt(0):""}n(_n,"branchStatus");function oi(t){return B(new ii,ai,t)}n(oi,"parseBranchSummary");var ai,Su=f({"src/lib/parsers/parse-branch.ts"(){"use strict";Tu(),b(),ai=[new _(/^([*+]\s)?\((?:HEAD )?detached (?:from|at) (\S+)\)\s+([a-z0-9]+)\s(.*)$/,(t,[e,r,s,i])=>{t.push(_n(e),!0,r,s,i)}),new _(new RegExp("^([*+]\\s)?(\\S+)\\s+([a-z0-9]+)\\s?(.*)$","s"),(t,[e,r,s,i])=>{t.push(_n(e),!1,r,s,i)})]}}),ui={};P(ui,{branchLocalTask:n(()=>xu,"branchLocalTask"),branchTask:n(()=>Cu,"branchTask"),containsDeleteBranchCommand:n(()=>ci,"containsDeleteBranchCommand"),deleteBranchTask:n(()=>Ou,"deleteBranchTask"),deleteBranchesTask:n(()=>Eu,"deleteBranchesTask")});function ci(t){let e=["-d","-D","--delete"];return t.some(r=>e.includes(r))}n(ci,"containsDeleteBranchCommand");function Cu(t){let e=ci(t),r=["branch",...t];return r.length===1&&r.push("-a"),r.includes("-v")||r.splice(1,0,"-v"),{format:"utf-8",commands:r,parser(s,i){return e?oe(s,i).all[0]:oi(s)}}}n(Cu,"branchTask");function xu(){return{format:"utf-8",commands:["branch","-v"],parser:oi}}n(xu,"branchLocalTask");function Eu(t,e=!1){return{format:"utf-8",commands:["branch","-v",e?"-D":"-d",...t],parser(r,s){return oe(r,s)},onError({exitCode:r,stdOut:s},i,o,a){if(!si(String(i),r))return a(i);o(s)}}}n(Eu,"deleteBranchesTask");function Ou(t,e=!1){let r={format:"utf-8",commands:["branch","-v",e?"-D":"-d",t],parser(s,i){return oe(s,i).branches[t]},onError({exitCode:s,stdErr:i,stdOut:o},a,u,c){if(!si(String(a),s))return c(a);throw new Rt(r.parser(Et(o),Et(i)),String(a))}};return r}n(Ou,"deleteBranchTask");var Pu=f({"src/lib/tasks/branch.ts"(){"use strict";gt(),ku(),Su(),b()}}),li,Ru=f({"src/lib/responses/CheckIgnore.ts"(){"use strict";li=n(t=>t.split(/\n/g).map(e=>e.trim()).filter(e=>!!e),"parseCheckIgnore")}}),pi={};P(pi,{checkIgnoreTask:n(()=>Au,"checkIgnoreTask")});function Au(t){return{commands:["check-ignore",...t],format:"utf-8",parser:li}}n(Au,"checkIgnoreTask");var Fu=f({"src/lib/tasks/check-ignore.ts"(){"use strict";Ru()}}),fi={};P(fi,{cloneMirrorTask:n(()=>ju,"cloneMirrorTask"),cloneTask:n(()=>mi,"cloneTask")});function $u(t){return/^--upload-pack(=|$)/.test(t)}n($u,"disallowedCommand");function mi(t,e,r){let s=["clone",...r];return A(t)&&s.push(t),A(e)&&s.push(e),s.find($u)?M("git.fetch: potential exploit argument blocked."):j(s)}n(mi,"cloneTask");function ju(t,e,r){return w(r,"--mirror"),mi(t,e,r)}n(ju,"cloneMirrorTask");var Du=f({"src/lib/tasks/clone.ts"(){"use strict";O(),b()}});function Lu(t,e){return B({raw:t,remote:null,branches:[],tags:[],updated:[],deleted:[]},di,[t,e])}n(Lu,"parseFetchResult");var di,Mu=f({"src/lib/parsers/parse-fetch.ts"(){"use strict";b(),di=[new _(/From (.+)$/,(t,[e])=>{t.remote=e}),new _(/\* \[new branch]\s+(\S+)\s*-> (.+)$/,(t,[e,r])=>{t.branches.push({name:e,tracking:r})}),new _(/\* \[new tag]\s+(\S+)\s*-> (.+)$/,(t,[e,r])=>{t.tags.push({name:e,tracking:r})}),new _(/- \[deleted]\s+\S+\s*-> (.+)$/,(t,[e])=>{t.deleted.push({tracking:e})}),new _(/\s*([^.]+)\.\.(\S+)\s+(\S+)\s*-> (.+)$/,(t,[e,r,s,i])=>{t.updated.push({name:s,tracking:i,to:r,from:e})})]}}),hi={};P(hi,{fetchTask:n(()=>Iu,"fetchTask")});function Bu(t){return/^--upload-pack(=|$)/.test(t)}n(Bu,"disallowedCommand2");function Iu(t,e,r){let s=["fetch",...r];return t&&e&&s.push(t,e),s.find(Bu)?M("git.fetch: potential exploit argument blocked."):{commands:s,format:"utf-8",parser:Lu}}n(Iu,"fetchTask");var Nu=f({"src/lib/tasks/fetch.ts"(){"use strict";Mu(),O()}});function Gu(t){return B({moves:[]},gi,t)}n(Gu,"parseMoveResult");var gi,Uu=f({"src/lib/parsers/parse-move.ts"(){"use strict";b(),gi=[new _(/^Renaming (.+) to (.+)$/,(t,[e,r])=>{t.moves.push({from:e,to:r})})]}}),yi={};P(yi,{moveTask:n(()=>qu,"moveTask")});function qu(t,e){return{commands:["mv","-v",...W(t),e],format:"utf-8",parser:Gu}}n(qu,"moveTask");var Ju=f({"src/lib/tasks/move.ts"(){"use strict";Uu(),b()}}),vi={};P(vi,{pullTask:n(()=>zu,"pullTask")});function zu(t,e,r){let s=["pull",...r];return t&&e&&s.splice(1,0,t,e),{commands:s,format:"utf-8",parser(i,o){return pr(i,o)},onError(i,o,a,u){let c=Xa(Et(i.stdOut),Et(i.stdErr));if(c)return u(new Rt(c));u(o)}}}n(zu,"pullTask");var Vu=f({"src/lib/tasks/pull.ts"(){"use strict";gt(),Us(),b()}});function Qu(t){let e={};return bi(t,([r])=>e[r]={name:r}),Object.values(e)}n(Qu,"parseGetRemotes");function Wu(t){let e={};return bi(t,([r,s,i])=>{e.hasOwnProperty(r)||(e[r]={name:r,refs:{fetch:"",push:""}}),i&&s&&(e[r].refs[i.replace(/[^a-z]/g,"")]=s)}),Object.values(e)}n(Wu,"parseGetRemotesVerbose");function bi(t,e){ze(t,r=>e(r.split(/\s+/)))}n(bi,"forEach");var Hu=f({"src/lib/responses/GetRemoteSummary.ts"(){"use strict";b()}}),_i={};P(_i,{addRemoteTask:n(()=>Yu,"addRemoteTask"),getRemotesTask:n(()=>Ku,"getRemotesTask"),listRemotesTask:n(()=>Xu,"listRemotesTask"),remoteTask:n(()=>Zu,"remoteTask"),removeRemoteTask:n(()=>tc,"removeRemoteTask")});function Yu(t,e,r){return j(["remote","add",...r,t,e])}n(Yu,"addRemoteTask");function Ku(t){let e=["remote"];return t&&e.push("-v"),{commands:e,format:"utf-8",parser:t?Wu:Qu}}n(Ku,"getRemotesTask");function Xu(t){let e=[...t];return e[0]!=="ls-remote"&&e.unshift("ls-remote"),j(e)}n(Xu,"listRemotesTask");function Zu(t){let e=[...t];return e[0]!=="remote"&&e.unshift("remote"),j(e)}n(Zu,"remoteTask");function tc(t){return j(["remote","remove",t])}n(tc,"removeRemoteTask");var ec=f({"src/lib/tasks/remote.ts"(){"use strict";Hu(),O()}}),wi={};P(wi,{stashListTask:n(()=>rc,"stashListTask")});function rc(t={},e){let r=Fs(t),s=["stash","list",...r.commands,...e],i=Os(r.splitter,r.fields,ir(s));return ie(s)||{commands:s,format:"utf-8",parser:i}}n(rc,"stashListTask");var nc=f({"src/lib/tasks/stash-list.ts"(){"use strict";jt(),Rs(),lr(),$s()}}),ki={};P(ki,{addSubModuleTask:n(()=>sc,"addSubModuleTask"),initSubModuleTask:n(()=>ic,"initSubModuleTask"),subModuleTask:n(()=>ae,"subModuleTask"),updateSubModuleTask:n(()=>oc,"updateSubModuleTask")});function sc(t,e){return ae(["add",t,e])}n(sc,"addSubModuleTask");function ic(t){return ae(["init",...t])}n(ic,"initSubModuleTask");function ae(t){let e=[...t];return e[0]!=="submodule"&&e.unshift("submodule"),j(e)}n(ae,"subModuleTask");function oc(t){return ae(["update",...t])}n(oc,"updateSubModuleTask");var ac=f({"src/lib/tasks/sub-module.ts"(){"use strict";O()}});function uc(t,e){let r=isNaN(t),s=isNaN(e);return r!==s?r?1:-1:r?Ti(t,e):0}n(uc,"singleSorted");function Ti(t,e){return t===e?0:t>e?1:-1}n(Ti,"sorted");function cc(t){return t.trim()}n(cc,"trimmed");function qt(t){return typeof t=="string"&&parseInt(t.replace(/^\D+/g,""),10)||0}n(qt,"toNumber");var wn,Si,lc=f({"src/lib/responses/TagList.ts"(){"use strict";wn=class{static{n(this,"TagList")}constructor(t,e){this.all=t,this.latest=e}},Si=n(function(t,e=!1){let r=t.split(`
|
|
51
|
-
`).map(cc).filter(Boolean);e||r.sort(function(i,o){let a=i.split("."),u=o.split(".");if(a.length===1||u.length===1)return uc(qt(a[0]),qt(u[0]));for(let c=0,d=Math.max(a.length,u.length);c<d;c++){let p=Ti(qt(a[c]),qt(u[c]));if(p)return p}return 0});let s=e?r[0]:[...r].reverse().find(i=>i.indexOf(".")>=0);return new wn(r,s)},"parseTagList")}}),Ci={};P(Ci,{addAnnotatedTagTask:n(()=>mc,"addAnnotatedTagTask"),addTagTask:n(()=>fc,"addTagTask"),tagListTask:n(()=>pc,"tagListTask")});function pc(t=[]){let e=t.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...t],parser(r){return Si(r,e)}}}n(pc,"tagListTask");function fc(t){return{format:"utf-8",commands:["tag",t],parser(){return{name:t}}}}n(fc,"addTagTask");function mc(t,e){return{format:"utf-8",commands:["tag","-a","-m",e,t],parser(){return{name:t}}}}n(mc,"addAnnotatedTagTask");var dc=f({"src/lib/tasks/tag.ts"(){"use strict";lc()}}),hc=Ao({"src/git.js"(t,e){"use strict";var{GitExecutor:r}=(ya(),x(vs)),{SimpleGitApi:s}=(hu(),x(Xs)),{Scheduler:i}=(gu(),x(Zs)),{configurationErrorTask:o}=(O(),x(Le)),{asArray:a,filterArray:u,filterPrimitives:c,filterString:d,filterStringOrStringArray:p,filterType:m,getTrailingOptions:h,trailingFunctionArgument:g,trailingOptionsArgument:I}=(b(),x(qn)),{applyPatchTask:q}=(vu(),x(ri)),{branchTask:D,branchLocalTask:Y,deleteBranchesTask:ct,deleteBranchTask:le}=(Pu(),x(ui)),{checkIgnoreTask:lt}=(Fu(),x(pi)),{checkIsRepoTask:yr}=(Qn(),x(Jn)),{cloneTask:yt,cloneMirrorTask:pe}=(Du(),x(fi)),{cleanWithOptionsTask:Lt,isCleanOptionsArray:fe}=(ss(),x(rs)),{diffSummaryTask:Ai}=(lr(),x(As)),{fetchTask:Fi}=(Nu(),x(hi)),{moveTask:$i}=(Ju(),x(yi)),{pullTask:ji}=(Vu(),x(vi)),{pushTagsTask:Di}=(Vs(),x(zs)),{addRemoteTask:Li,getRemotesTask:Mi,listRemotesTask:Bi,remoteTask:Ii,removeRemoteTask:Ni}=(ec(),x(_i)),{getResetMode:Gi,resetTask:Ui}=(gs(),x(ms)),{stashListTask:qi}=(nc(),x(wi)),{addSubModuleTask:Ji,initSubModuleTask:zi,subModuleTask:Vi,updateSubModuleTask:Qi}=(ac(),x(ki)),{addAnnotatedTagTask:Wi,addTagTask:Hi,tagListTask:Yi}=(dc(),x(Ci)),{straightThroughBufferTask:Ki,straightThroughStringTask:Q}=(O(),x(Le));function v(l,y){this._plugins=y,this._executor=new r(l.baseDir,new i(l.maxConcurrentProcesses),y),this._trimmed=l.trimmed}n(v,"Git2"),(v.prototype=Object.create(s.prototype)).constructor=v,v.prototype.customBinary=function(l){return this._plugins.reconfigure("binary",l),this},v.prototype.env=function(l,y){return arguments.length===1&&typeof l=="object"?this._executor.env=l:(this._executor.env=this._executor.env||{})[l]=y,this},v.prototype.stashList=function(l){return this._runTask(qi(I(arguments)||{},u(l)&&l||[]),g(arguments))};function vr(l,y,k,F){return typeof k!="string"?o(`git.${l}() requires a string 'repoPath'`):y(k,m(F,d),h(arguments))}n(vr,"createCloneTask"),v.prototype.clone=function(){return this._runTask(vr("clone",yt,...arguments),g(arguments))},v.prototype.mirror=function(){return this._runTask(vr("mirror",pe,...arguments),g(arguments))},v.prototype.mv=function(l,y){return this._runTask($i(l,y),g(arguments))},v.prototype.checkoutLatestTag=function(l){var y=this;return this.pull(function(){y.tags(function(k,F){y.checkout(F.latest,l)})})},v.prototype.pull=function(l,y,k,F){return this._runTask(ji(m(l,d),m(y,d),h(arguments)),g(arguments))},v.prototype.fetch=function(l,y){return this._runTask(Fi(m(l,d),m(y,d),h(arguments)),g(arguments))},v.prototype.silent=function(l){return console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"),this},v.prototype.tags=function(l,y){return this._runTask(Yi(h(arguments)),g(arguments))},v.prototype.rebase=function(){return this._runTask(Q(["rebase",...h(arguments)]),g(arguments))},v.prototype.reset=function(l){return this._runTask(Ui(Gi(l),h(arguments)),g(arguments))},v.prototype.revert=function(l){let y=g(arguments);return typeof l!="string"?this._runTask(o("Commit must be a string"),y):this._runTask(Q(["revert",...h(arguments,0,!0),l]),y)},v.prototype.addTag=function(l){let y=typeof l=="string"?Hi(l):o("Git.addTag requires a tag name");return this._runTask(y,g(arguments))},v.prototype.addAnnotatedTag=function(l,y){return this._runTask(Wi(l,y),g(arguments))},v.prototype.deleteLocalBranch=function(l,y,k){return this._runTask(le(l,typeof y=="boolean"?y:!1),g(arguments))},v.prototype.deleteLocalBranches=function(l,y,k){return this._runTask(ct(l,typeof y=="boolean"?y:!1),g(arguments))},v.prototype.branch=function(l,y){return this._runTask(D(h(arguments)),g(arguments))},v.prototype.branchLocal=function(l){return this._runTask(Y(),g(arguments))},v.prototype.raw=function(l){let y=!Array.isArray(l),k=[].slice.call(y?arguments:l,0);for(let V=0;V<k.length&&y;V++)if(!c(k[V])){k.splice(V,k.length-V);break}k.push(...h(arguments,0,!0));var F=g(arguments);return k.length?this._runTask(Q(k,this._trimmed),F):this._runTask(o("Raw: must supply one or more command to execute"),F)},v.prototype.submoduleAdd=function(l,y,k){return this._runTask(Ji(l,y),g(arguments))},v.prototype.submoduleUpdate=function(l,y){return this._runTask(Qi(h(arguments,!0)),g(arguments))},v.prototype.submoduleInit=function(l,y){return this._runTask(zi(h(arguments,!0)),g(arguments))},v.prototype.subModule=function(l,y){return this._runTask(Vi(h(arguments)),g(arguments))},v.prototype.listRemote=function(){return this._runTask(Bi(h(arguments)),g(arguments))},v.prototype.addRemote=function(l,y,k){return this._runTask(Li(l,y,h(arguments)),g(arguments))},v.prototype.removeRemote=function(l,y){return this._runTask(Ni(l),g(arguments))},v.prototype.getRemotes=function(l,y){return this._runTask(Mi(l===!0),g(arguments))},v.prototype.remote=function(l,y){return this._runTask(Ii(h(arguments)),g(arguments))},v.prototype.tag=function(l,y){let k=h(arguments);return k[0]!=="tag"&&k.unshift("tag"),this._runTask(Q(k),g(arguments))},v.prototype.updateServerInfo=function(l){return this._runTask(Q(["update-server-info"]),g(arguments))},v.prototype.pushTags=function(l,y){let k=Di({remote:m(l,d)},h(arguments));return this._runTask(k,g(arguments))},v.prototype.rm=function(l){return this._runTask(Q(["rm","-f",...a(l)]),g(arguments))},v.prototype.rmKeepLocal=function(l){return this._runTask(Q(["rm","--cached",...a(l)]),g(arguments))},v.prototype.catFile=function(l,y){return this._catFile("utf-8",arguments)},v.prototype.binaryCatFile=function(){return this._catFile("buffer",arguments)},v.prototype._catFile=function(l,y){var k=g(y),F=["cat-file"],V=y[0];if(typeof V=="string")return this._runTask(o("Git.catFile: options must be supplied as an array of strings"),k);Array.isArray(V)&&F.push.apply(F,V);let me=l==="buffer"?Ki(F):Q(F);return this._runTask(me,k)},v.prototype.diff=function(l,y){let k=d(l)?o("git.diff: supplying options as a single string is no longer supported, switch to an array of strings"):Q(["diff",...h(arguments)]);return this._runTask(k,g(arguments))},v.prototype.diffSummary=function(){return this._runTask(Ai(h(arguments,1)),g(arguments))},v.prototype.applyPatch=function(l){let y=p(l)?q(a(l),h([].slice.call(arguments,1))):o("git.applyPatch requires one or more string patches as the first argument");return this._runTask(y,g(arguments))},v.prototype.revparse=function(){let l=["rev-parse",...h(arguments,!0)];return this._runTask(Q(l,!0),g(arguments))},v.prototype.clean=function(l,y,k){let F=fe(l),V=F&&l.join("")||m(l,d)||"",me=h([].slice.call(arguments,F?1:0));return this._runTask(Lt(V,me),g(arguments))},v.prototype.exec=function(l){let y={commands:[],format:"utf-8",parser(){typeof l=="function"&&l()}};return this._runTask(y)},v.prototype.clearQueue=function(){return this},v.prototype.checkIgnore=function(l,y){return this._runTask(lt(a(m(l,p,[]))),g(arguments))},v.prototype.checkIsRepo=function(l,y){return this._runTask(yr(m(l,d)),g(arguments))},e.exports=v}});Pt();rt();var gc=class extends tt{static{n(this,"GitConstructError")}constructor(t,e){super(void 0,e),this.config=t}};rt();rt();var Z=class extends tt{static{n(this,"GitPluginError")}constructor(t,e,r){super(t,r),this.task=t,this.plugin=e,Object.setPrototypeOf(this,new.target.prototype)}};gt();On();Qn();ss();as();cs();fs();gs();function yc(t){return t?[{type:"spawn.before",action(s,i){t.aborted&&i.kill(new Z(void 0,"abort","Abort already signaled"))}},{type:"spawn.after",action(s,i){function o(){i.kill(new Z(void 0,"abort","Abort signal received"))}n(o,"kill"),t.addEventListener("abort",o),i.spawned.on("close",()=>t.removeEventListener("abort",o))}}]:void 0}n(yc,"abortPlugin");function vc(t){return typeof t=="string"&&t.trim().toLowerCase()==="-c"}n(vc,"isConfigSwitch");function bc(t,e){if(vc(t)&&/^\s*protocol(.[a-z]+)?.allow/.test(e))throw new Z(void 0,"unsafe","Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol")}n(bc,"preventProtocolOverride");function _c(t,e){if(/^\s*--(upload|receive)-pack/.test(t))throw new Z(void 0,"unsafe","Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack");if(e==="clone"&&/^\s*-u\b/.test(t))throw new Z(void 0,"unsafe","Use of clone with option -u is not permitted without enabling allowUnsafePack");if(e==="push"&&/^\s*--exec\b/.test(t))throw new Z(void 0,"unsafe","Use of push with option --exec is not permitted without enabling allowUnsafePack")}n(_c,"preventUploadPack");function wc({allowUnsafeProtocolOverride:t=!1,allowUnsafePack:e=!1}={}){return{type:"spawn.args",action(r,s){return r.forEach((i,o)=>{let a=o<r.length?r[o+1]:"";t||bc(i,a),e||_c(i,s.method)}),r}}}n(wc,"blockUnsafeOperationsPlugin");b();function kc(t){let e=xt(t,"-c");return{type:"spawn.args",action(r){return[...e,...r]}}}n(kc,"commandConfigPrefixingPlugin");b();var kn=(0,dt.deferred)().promise;function Tc({onClose:t=!0,onExit:e=50}={}){function r(){let i=-1,o={close:(0,dt.deferred)(),closeTimeout:(0,dt.deferred)(),exit:(0,dt.deferred)(),exitTimeout:(0,dt.deferred)()},a=Promise.race([t===!1?kn:o.closeTimeout.promise,e===!1?kn:o.exitTimeout.promise]);return s(t,o.close,o.closeTimeout),s(e,o.exit,o.exitTimeout),{close(u){i=u,o.close.done()},exit(u){i=u,o.exit.done()},get exitCode(){return i},result:a}}n(r,"createEvents");function s(i,o,a){i!==!1&&(i===!0?o.promise:o.promise.then(()=>Ae(i))).then(a.done)}return n(s,"configureTimeout"),{type:"spawn.after",action(i,o){return St(this,arguments,function*(a,{spawned:u,close:c}){var d,p;let m=r(),h=!0,g=n(()=>void(h=!1),"quickClose");(d=u.stdout)==null||d.on("data",g),(p=u.stderr)==null||p.on("data",g),u.on("error",g),u.on("close",I=>m.close(I)),u.on("exit",I=>m.exit(I));try{yield m.result,h&&(yield Ae(50)),c(m.exitCode)}catch(I){c(m.exitCode,I)}})}}}n(Tc,"completionDetectionPlugin");b();var Sc="Invalid value supplied for custom binary, requires a single string or an array containing either one or two strings",Tn="Invalid value supplied for custom binary, restricted characters must be removed or supply the unsafe.allowUnsafeCustomBinary option";function Cc(t){return!t||!/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(t)}n(Cc,"isBadArgument");function Sn(t,e){if(t.length<1||t.length>2)throw new Z(void 0,"binary",Sc);if(t.some(Cc))if(e)console.warn(Tn);else throw new Z(void 0,"binary",Tn);let[s,i]=t;return{binary:s,prefix:i}}n(Sn,"toBinaryConfig");function xc(t,e=["git"],r=!1){let s=Sn(W(e),r);t.on("binary",i=>{s=Sn(W(i),r)}),t.append("spawn.binary",()=>s.binary),t.append("spawn.args",i=>s.prefix?[s.prefix,...i]:i)}n(xc,"customBinaryPlugin");rt();function Ec(t){return!!(t.exitCode&&t.stdErr.length)}n(Ec,"isTaskError");function Oc(t){return Buffer.concat([...t.stdOut,...t.stdErr])}n(Oc,"getErrorMessage");function Pc(t=!1,e=Ec,r=Oc){return(s,i)=>!t&&s||!e(i)?s:r(i)}n(Pc,"errorDetectionHandler");function Cn(t){return{type:"task.error",action(e,r){let s=t(e.error,{stdErr:r.stdErr,stdOut:r.stdOut,exitCode:r.exitCode});return Buffer.isBuffer(s)?{error:new tt(void 0,s.toString("utf-8"))}:{error:s}}}}n(Cn,"errorDetectionPlugin");b();var Ac=class{static{n(this,"PluginStore")}constructor(){this.plugins=new Set,this.events=new Rc}on(t,e){this.events.on(t,e)}reconfigure(t,e){this.events.emit(t,e)}append(t,e){let r=w(this.plugins,{type:t,action:e});return()=>this.plugins.delete(r)}add(t){let e=[];return W(t).forEach(r=>r&&this.plugins.add(w(e,r))),()=>{e.forEach(r=>this.plugins.delete(r))}}exec(t,e,r){let s=e,i=Object.freeze(Object.create(r));for(let o of this.plugins)o.type===t&&(s=o.action(s,i));return s}};b();function Fc(t){let e="--progress",r=["checkout","clone","fetch","pull","push"];return[{type:"spawn.args",action(o,a){return r.includes(a.method)?jn(o,e):o}},{type:"spawn.after",action(o,a){var u;a.commands.includes(e)&&((u=a.spawned.stderr)==null||u.on("data",c=>{let d=/^([\s\S]+?):\s*(\d+)% \((\d+)\/(\d+)\)/.exec(c.toString("utf8"));d&&t({method:a.method,stage:$c(d[1]),progress:S(d[2]),processed:S(d[3]),total:S(d[4])})}))}}]}n(Fc,"progressMonitorPlugin");function $c(t){return String(t.toLowerCase().split(" ",1))||"unknown"}n($c,"progressEventStage");b();function jc(t){let e=Mn(t,["uid","gid"]);return{type:"spawn.options",action(r){return z(z({},e),r)}}}n(jc,"spawnOptionsPlugin");function Dc({block:t,stdErr:e=!0,stdOut:r=!0}){if(t>0)return{type:"spawn.after",action(s,i){var o,a;let u;function c(){u&&clearTimeout(u),u=setTimeout(p,t)}n(c,"wait");function d(){var m,h;(m=i.spawned.stdout)==null||m.off("data",c),(h=i.spawned.stderr)==null||h.off("data",c),i.spawned.off("exit",d),i.spawned.off("close",d),u&&clearTimeout(u)}n(d,"stop");function p(){d(),i.kill(new Z(void 0,"timeout","block timeout reached"))}n(p,"kill"),r&&((o=i.spawned.stdout)==null||o.on("data",c)),e&&((a=i.spawned.stderr)==null||a.on("data",c)),i.spawned.on("exit",d),i.spawned.on("close",d),c()}}}n(Dc,"timeoutPlugin");Pt();function Lc(){return{type:"spawn.args",action(t){let e=[],r;function s(i){(r=r||[]).push(...i)}n(s,"append2");for(let i=0;i<t.length;i++){let o=t[i];if(Wt(o)){s(Wr(o));continue}if(o==="--"){s(t.slice(i+1).flatMap(a=>Wt(a)&&Wr(a)||a));break}e.push(o)}return r?[...e,"--",...r.map(String)]:e}}}n(Lc,"suffixPathsPlugin");b();var Mc=hc();function Bc(t,e){var r;let s=new Ac,i=Gn(t&&(typeof t=="string"?{baseDir:t}:t)||{},e);if(!Ve(i.baseDir))throw new gc(i,"Cannot use simple-git on a directory that does not exist");return Array.isArray(i.config)&&s.add(kc(i.config)),s.add(wc(i.unsafe)),s.add(Lc()),s.add(Tc(i.completion)),i.abort&&s.add(yc(i.abort)),i.progress&&s.add(Fc(i.progress)),i.timeout&&s.add(Dc(i.timeout)),i.spawnOptions&&s.add(jc(i.spawnOptions)),s.add(Cn(Pc(!0))),i.errors&&s.add(Cn(i.errors)),xc(s,i.binary,(r=i.unsafe)==null?void 0:r.allowUnsafeCustomBinary),new Mc(i,s)}n(Bc,"gitInstanceFactory");gt();var xi=Bc;T();var Ei=n((t,e)=>{let r=/^(https:\/\/)?(?<slug>[\w-]+?)(--development)?(\..*)?$/.exec(t)?.groups?.slug;if(r)return r;throw new K(C`
|
|
52
|
-
${e} must be the application's {bold slug} or {bold URL}
|
|
53
|
-
|
|
54
|
-
{bold EXAMPLES:}
|
|
55
|
-
${e} my-app
|
|
56
|
-
${e} my-app.gadget.app
|
|
57
|
-
${e} https://my-app.gadget.app
|
|
58
|
-
${e} https://my-app.gadget.app/edit
|
|
59
|
-
${e} https://my-app--development.gadget.app/edit
|
|
60
|
-
`)},"AppArg");T();import dr from"node:assert";var ue=class{static{n(this,"Edit")}ctx;#t;constructor(e,r){this.ctx=e.child({name:"edit"}),this.#t=new Fr(this.ctx,r,"/edit/api/graphql")}async query({query:e,variables:r,...s}){let i=/query (\w+)/.exec(e)?.[1];dr(i,"query name not found");let o=this.ctx.child({name:"edit",fields:{edit:{query:i}},devFields:{edit:{query:i,variables:vt(r)}}});o.log.info("executing graphql query");let a=await this.#t.execute(o,{operation:e,variables:r,...s,http:{retry:{methods:["POST"]},...s.http}});if(a.errors)throw new X(e,a.errors);if(!a.data)throw new X(e,"Query response did not contain data");return a.data}async mutate({mutation:e,variables:r,...s}){let i=/mutation (\w+)/.exec(e)?.[1];dr(i,"mutation name not found");let o=this.ctx.child({name:"edit",fields:{edit:{mutation:i}},devFields:{edit:{mutation:i,variables:vt(r)}}});o.log.info("executing graphql mutation");let a=await this.#t.execute(o,{operation:e,variables:r,...s});if(a.errors)throw new X(e,a.errors);if(!a.data)throw new X(e,"Mutation response did not contain data");return a.data}subscribe({onData:e,...r}){let s=/subscription (\w+)/.exec(r.subscription)?.[1];dr(s,"subscription name not found");let i=this.ctx.child({name:"edit",fields:{edit:{subscription:s}},devFields:{edit:{subscription:s,variables:vt(r.variables)}}}),o=n(async u=>{if(u.errors){a(),await r.onError(new X(r.subscription,u.errors));return}if(!u.data){a(),await r.onError(new X(r.subscription,"Subscription response did not contain data"));return}await e(u.data)},"onResponse");i.log.info("subscribing to graphql subscription");let a=this.#t.subscribe(i,{...r,onResponse:o});return{unsubscribe:n(()=>{a()},"unsubscribe"),resubscribe:n(u=>{a(),u!==void 0&&(r.variables=u),i=this.ctx.child({name:"edit",fields:{edit:{subscription:s}},devFields:{edit:{subscription:s,variables:vt(r.variables)}}}),i.log.info("re-subscribing to graphql subscription"),a=this.#t.subscribe(i,{...r,onResponse:o})},"resubscribe")}}async dispose(){await this.#t.dispose()}};var zp={"--app":{type:Ei,alias:["-a","--application"]},"--env":{type:String,alias:["-e","--environment"]},"--allow-unknown-directory":Boolean,"--allow-different-app":Boolean},gr=class t{constructor(e,r,s,i,o,a){this.ctx=e;this.args=r;this.directory=s;this.environment=i;this.previousEnvironment=o;this.state=a;this.ctx=e.child({name:"sync-json",fields:n(()=>({syncJson:{directory:this.directory.path,branch:this.gitBranch,...this.state}}),"fields")}),this.edit=new ue(this.ctx,this.environment)}static{n(this,"SyncJson")}gitBranch;edit;get filesVersion(){let e=this.state.environments[this.state.environment];return hr(e,"environment must exist in environments"),BigInt(e.filesVersion)}static async load(e,{command:r,args:s,directory:i}){e=e.child({name:"sync-json"});let o=await jr(e,r),a=await ve(e);if(a.length===0)throw new K(C`
|
|
61
|
-
You (${o.email}) don't have have any Gadget applications.
|
|
62
|
-
|
|
63
|
-
Visit https://gadget.new to create one!
|
|
64
|
-
`);let u=await ce.default.readFile(i.absolute(".gadget/sync.json"),"utf8").catch(g=>e.log.warn("failed to read .gadget/sync.json",{error:g}));if(!u)return;let c;try{c=qc.parse(JSON.parse(u))}catch(g){e.log.warn("failed to parse .gadget/sync.json",{error:g,syncJsonFile:u});return}let d=await Pi({args:s,availableApps:a,state:c}),p=await Ri({command:r,args:s,application:d,state:c});if(Pr({application_id:d.id,environment_id:p.id}),c.application!==d.slug){if(s["--allow-different-app"]){let g={application:d.slug,environment:p.name,environments:{[p.name]:{filesVersion:"0"}}},I=p.type==="production"?new Dt(e,s,i,p,void 0,g):new t(e,s,i,p,void 0,g);return await I.loadGitBranch(),I}throw new K(C`
|
|
65
|
-
You were about to sync the following app to the following directory:
|
|
66
|
-
|
|
67
|
-
${d.slug} (${p.name}) → ${i.path}
|
|
68
|
-
|
|
69
|
-
However, that directory has already been synced with this app:
|
|
70
|
-
|
|
71
|
-
${c.application} (${c.environment})
|
|
72
|
-
|
|
73
|
-
If you're sure that you want to sync:
|
|
74
|
-
|
|
75
|
-
${d.slug} (${p.name}) → ${i.path}
|
|
76
|
-
|
|
77
|
-
Run "ggt dev" with the {bold --allow-different-app} flag.
|
|
78
|
-
`)}let m;c.environment!==p.name&&(p.type!=="production"&&bt({ensureEmptyLineAbove:!0,content:C`
|
|
79
|
-
Changing environment.
|
|
80
|
-
|
|
81
|
-
${c.environment} → ${p.name}
|
|
82
|
-
`}),m=c.environment,c.environment=p.name,c.environments[p.name]||(c.environments[p.name]={filesVersion:"0"}));let h=p.type==="production"?new Dt(e,s,i,p,m,c):new t(e,s,i,p,m,c);return await h.save(h.filesVersion),await h.loadGitBranch(),h}static async loadOrInit(e,{command:r,args:s,directory:i}){e=e.child({name:"sync-json"});let o=await t.load(e,{command:r,args:s,directory:i});if(o)return o;if(await i.hasFiles()&&!s["--allow-unknown-directory"])throw new Mt({command:r,args:s,directory:i});let a=await Pi({args:s,availableApps:await ve(e)}),u=await Ri({command:r,args:s,application:a});await ce.default.ensureDir(i.path);let c={application:a.slug,environment:u.name,environments:{[u.name]:{filesVersion:"0"}}};return o=u.type==="production"?new Dt(e,s,i,u,void 0,c):new t(e,s,i,u,void 0,c),await o.save(o.filesVersion),await o.loadGitBranch(),o}async save(e){let r=this.state.environments[this.state.environment];hr(r,"environment must exist in environments"),r.filesVersion=String(e),this.ctx.log.debug("saving .gadget/sync.json"),await ce.default.outputJSON(this.directory.absolute(".gadget/sync.json"),this.state,{spaces:2})}async loadGitBranch(){this.gitBranch=await Ic(this.ctx,{directory:this.directory})}sprint(e={}){let r=$`
|
|
83
|
-
Application ${this.environment.application.slug}
|
|
84
|
-
Environment ${this.environment.name}
|
|
85
|
-
`;this.gitBranch&&(r+=$({indent:5,content:`Branch ${this.gitBranch}`}));let s=he.domains.app;return ft.isSupported?r+=$({ensureEmptyLineAbove:!0,content:`${ft(kt.link("Preview"),`https://${this.environment.application.slug}--${this.environment.name}.${s}`)} ${ft(kt.link("Editor"),`https://${this.environment.application.primaryDomain}/edit/${this.environment.name}`)} ${ft(kt.link("Playground"),`https://${this.environment.application.primaryDomain}/api/playground/javascript?environment=${this.environment.name}`)} ${ft(kt.link("Docs"),`https://docs.gadget.dev/api/${this.environment.application.slug}`)}`}):r+=$`
|
|
86
|
-
------------------------
|
|
87
|
-
Preview https://${this.environment.application.slug}--${this.environment.name}.${s}
|
|
88
|
-
Editor https://${this.environment.application.primaryDomain}/edit/${this.environment.name}
|
|
89
|
-
Playground https://${this.environment.application.primaryDomain}/api/playground/javascript?environment=${this.environment.name}
|
|
90
|
-
Docs https://docs.gadget.dev/api/${this.environment.application.slug}
|
|
91
|
-
`,$({...e,content:r})}print(e){e=Er(e,{ensureEmptyLineAbove:!0}),bt(this.sprint(e))}},Dt=class extends gr{static{n(this,"EphemeralSyncJson")}async save(e){let r=this.state.environments[this.state.environment];return hr(r,"environment must exist in environments"),r.filesVersion=String(e),Promise.resolve()}},Vp=n(async t=>{he.windows&&t.startsWith("~/")&&(t=Or(t.slice(2)));let e=await xr(".gadget/sync.json",{cwd:t});return e&&(t=Oi.join(e,"../..")),t=Oi.resolve(t),await Ar.init(t)},"loadSyncJsonDirectory"),Pi=n(async({args:t,availableApps:e,state:r})=>{let s=t["--app"]||r?.application;if(!s){let a=Array.from($r(e)).map(([u,c])=>[u,c.map(d=>d.slug)]);s=await be({groupedChoices:a,content:"Which application do you want to develop?"})}let i=e.find(a=>a.slug===s);if(i)return i;let o=ge(s,e.map(a=>a.slug)).slice(0,5);throw new K(C`
|
|
92
|
-
Unknown application:
|
|
93
|
-
|
|
94
|
-
${s}
|
|
95
|
-
|
|
96
|
-
Did you mean one of these?
|
|
97
|
-
|
|
98
|
-
• ${o.join(`
|
|
99
|
-
\u2022 `)}
|
|
100
|
-
`)},"loadApplication"),Ri=n(async({command:t,args:e,application:r,state:s})=>{if(e["--env"]&&!r.multiEnvironmentEnabled)throw new K(C`
|
|
101
|
-
You specified an environment but your app doesn't have multiple environments.
|
|
102
|
-
|
|
103
|
-
Remove the "--env" flag to sync to the {bold ${r.primaryDomain}} environment.
|
|
104
|
-
`);let i=r.environments.filter(c=>c.type===ye.Development);t==="pull"&&i.push(...r.environments.filter(c=>c.type===ye.Production));let o=e["--env"]||s?.environment;if(o||(o=await be({choices:i.map(c=>c.name),content:"Which environment do you want to develop on?"})),o.toLowerCase()==="production"&&t!=="pull")throw new K(C`
|
|
105
|
-
You cannot "ggt ${t}" your {bold production} environment.
|
|
106
|
-
`);let a=i.find(c=>c.name===o.toLowerCase());if(a)return{...a,application:r};let u=ge(o,i.map(c=>c.name)).slice(0,5);throw new K(C`
|
|
107
|
-
Unknown environment:
|
|
108
|
-
|
|
109
|
-
${o}
|
|
110
|
-
|
|
111
|
-
Did you mean one of these?
|
|
112
|
-
|
|
113
|
-
• ${u.join(`
|
|
114
|
-
\u2022 `)}
|
|
115
|
-
`)},"loadEnvironment"),Ic=n(async(t,{directory:e})=>{try{return await xi(e.path).revparse(["--abbrev-ref","HEAD"])}catch(r){t.log.warn("failed to read git branch",{error:r});return}},"loadBranch"),Nc=J.object({application:J.string(),environment:J.string(),environments:J.record(J.object({filesVersion:J.string()}))}),Gc=J.object({app:J.string(),filesVersion:J.string(),mtime:J.number()}),Uc=J.union([Nc,Gc]),qc=Uc.transform(t=>"environment"in t?t:{application:t.app,environment:"development",environments:{development:{filesVersion:t.filesVersion}}});export{Hc as a,_e as b,Yc as c,Kc as d,Xc as e,Lr as f,Mt as g,Mr as h,Br as i,so as j,cl as k,zp as l,gr as m,Vp as n};
|
|
116
|
-
//# sourceMappingURL=chunk-I6BQ7MRE.js.map
|