eazy-git 0.2.12 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -57,9 +57,9 @@ This opens an interactive menu with the following options:
57
57
  | `eazy-git`, `eg` | Launch the interactive CLI to create and manage Git branches |
58
58
  | `pull` | Pull latest changes from remote repository (`git pull origin HEAD`) |
59
59
  | `push` | Push local changes to remote repository (`git push origin HEAD`) |
60
- | `removelast` | Undo last commit while preserving changes in working directory (asks for confirmation) |
60
+ | `removelast` | Undo last commit while preserving changes in working directory (shows commit details) |
61
61
  | `mergewith` | Merge current branch with another remote branch (defaults to `origin/develop`) |
62
- | `commit` | Stage all changes and commit with a provided message |
62
+ | `commit` | Stage and commit: interactive flow (no args) or quick commit with a message |
63
63
  | `back` | Switch back to the previously checked out branch |
64
64
  | `checkout` | Switch to a specified branch or return to the previous branch |
65
65
  | `log` | Display formatted commit history with details |
package/dist/git.js CHANGED
@@ -1,27 +1,92 @@
1
1
  #!/usr/bin/env node
2
- var ze=Object.create;var ae=Object.defineProperty;var Ke=Object.getOwnPropertyDescriptor;var Je=Object.getOwnPropertyNames;var Ye=Object.getPrototypeOf,Qe=Object.prototype.hasOwnProperty;var Xe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Ze=(e,t,s,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Je(t))!Qe.call(e,o)&&o!==s&&ae(e,o,{get:()=>t[o],enumerable:!(i=Ke(t,o))||i.enumerable});return e};var ue=(e,t,s)=>(s=e!=null?ze(Ye(e)):{},Ze(t||!e||!e.__esModule?ae(s,"default",{value:e,enumerable:!0}):s,e));var Y=Xe((es,Ce)=>{"use strict";var K="\x1B",g=`${K}[`,mt="\x07",J={to(e,t){return t?`${g}${t+1};${e+1}H`:`${g}${e+1}G`},move(e,t){let s="";return e<0?s+=`${g}${-e}D`:e>0&&(s+=`${g}${e}C`),t<0?s+=`${g}${-t}A`:t>0&&(s+=`${g}${t}B`),s},up:(e=1)=>`${g}${e}A`,down:(e=1)=>`${g}${e}B`,forward:(e=1)=>`${g}${e}C`,backward:(e=1)=>`${g}${e}D`,nextLine:(e=1)=>`${g}E`.repeat(e),prevLine:(e=1)=>`${g}F`.repeat(e),left:`${g}G`,hide:`${g}?25l`,show:`${g}?25h`,save:`${K}7`,restore:`${K}8`},pt={up:(e=1)=>`${g}S`.repeat(e),down:(e=1)=>`${g}T`.repeat(e)},gt={screen:`${g}2J`,up:(e=1)=>`${g}1J`.repeat(e),down:(e=1)=>`${g}J`.repeat(e),line:`${g}2K`,lineEnd:`${g}K`,lineStart:`${g}1K`,lines(e){let t="";for(let s=0;s<e;s++)t+=this.line+(s<e-1?J.up():"");return e&&(t+=J.left),t}};Ce.exports={cursor:J,scroll:pt,erase:gt,beep:mt}});import{stdout as Se,stdin as ft}from"node:process";import $t from"node:readline";var ce=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let s=0;for(e.lastIndex=0;e.test(t);)s+=1;return t.length-s}})(),le=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,he=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141;var et=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,tt=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,de=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,st=/\t{1,1000}/y,me=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,it=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,rt=/\p{M}+/gu,nt={limit:1/0,ellipsis:""},pe=(e,t={},s={})=>{let i=t.limit??1/0,o=t.ellipsis??"",c=t?.ellipsisWidth??(o?pe(o,nt,s).width:0),u=0,r=s.controlWidth??0,h=s.tabWidth??8,f=s.emojiWidth??2,v=2,m=s.regularWidth??1,p=s.wideWidth??v,b=[[it,m],[et,u],[tt,r],[st,h],[me,f],[de,p]],y=0,$=0,F=e.length,M=0,T=!1,L=F,D=Math.max(0,i-c),k=0,V=0,R=0,C=0;e:for(;;){if(V>k||$>=F&&$>y){let A=e.slice(k,V)||e.slice(y,$);M=0;for(let O of A.replaceAll(rt,"")){let S=O.codePointAt(0)||0;if(le(S)?C=v:he(S)?C=p:C=m,R+C>D&&(L=Math.min(L,Math.max(k,y)+M)),R+C>i){T=!0;break e}M+=O.length,R+=C}k=V=0}if($>=F)break e;for(let A=0,O=b.length;A<O;A++){let[S,oe]=b[A];if(S.lastIndex=$,S.test(e)){if(M=S===de?ce(e.slice($,S.lastIndex)):S===me?1:S.lastIndex-$,C=M*oe,R+C>D&&(L=Math.min(L,$+Math.floor((D-R)/oe))),R+C>i){T=!0;break e}R+=C,k=y,V=$,$=y=S.lastIndex;continue e}}$+=1}return{width:T?D:R,index:T?L:F,truncated:T,ellipsed:T&&i>=c}},ge=pe;var ot={limit:1/0,ellipsis:"",ellipsisWidth:0},at=(e,t={})=>ge(e,ot,t).width,E=at;var N="\x1B",be="\x9B",ut=39,H="\x07",we="[",ct="]",Ie="m",z=`${ct}8;;`,fe=new RegExp(`(?:\\${we}(?<code>\\d+)m|\\${z}(?<uri>.*)${H})`,"y"),$e=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},ye=e=>`${N}${we}${e}${Ie}`,ve=e=>`${N}${z}${e}${H}`,q=(e,t,s)=>{let i=t[Symbol.iterator](),o=!1,c=!1,u=e.at(-1),r=u===void 0?0:E(u),h=i.next(),f=i.next(),v=0;for(;!h.done;){let m=h.value,p=E(m);r+p<=s?e[e.length-1]+=m:(e.push(m),r=0),(m===N||m===be)&&(o=!0,c=t.startsWith(z,v+1)),o?c?m===H&&(o=!1,c=!1):m===Ie&&(o=!1):(r+=p,r===s&&!f.done&&(e.push(""),r=0)),h=f,f=i.next(),v+=m.length}u=e.at(-1),!r&&u!==void 0&&u.length&&e.length>1&&(e[e.length-2]+=e.pop())},lt=e=>{let t=e.split(" "),s=t.length;for(;s&&!E(t[s-1]);)s--;return s===t.length?e:t.slice(0,s).join(" ")+t.slice(s).join("")},ht=(e,t,s={})=>{if(s.trim!==!1&&e.trim()==="")return"";let i="",o,c,u=e.split(" "),r=[""],h=0;for(let m=0;m<u.length;m++){let p=u[m];if(s.trim!==!1){let y=r.at(-1)??"",$=y.trimStart();y.length!==$.length&&(r[r.length-1]=$,h=E($))}m!==0&&(h>=t&&(s.wordWrap===!1||s.trim===!1)&&(r.push(""),h=0),(h||s.trim===!1)&&(r[r.length-1]+=" ",h++));let b=E(p);if(s.hard&&b>t){let y=t-h,$=1+Math.floor((b-y-1)/t);Math.floor((b-1)/t)<$&&r.push(""),q(r,p,t),h=E(r.at(-1)??"");continue}if(h+b>t&&h&&b){if(s.wordWrap===!1&&h<t){q(r,p,t),h=E(r.at(-1)??"");continue}r.push(""),h=0}if(h+b>t&&s.wordWrap===!1){q(r,p,t),h=E(r.at(-1)??"");continue}r[r.length-1]+=p,h+=b}s.trim!==!1&&(r=r.map(m=>lt(m)));let f=r.join(`
3
- `),v=!1;for(let m=0;m<f.length;m++){let p=f[m];if(i+=p,v)v=!1;else if(v=p>="\uD800"&&p<="\uDBFF",v)continue;if(p===N||p===be){fe.lastIndex=m+1;let y=fe.exec(f)?.groups;if(y?.code!==void 0){let $=Number.parseFloat(y.code);o=$===ut?void 0:$}else y?.uri!==void 0&&(c=y.uri.length===0?void 0:y.uri)}if(f[m+1]===`
4
- `){c&&(i+=ve(""));let b=o?$e(o):void 0;o&&b&&(i+=ye(b))}else p===`
5
- `&&(o&&$e(o)&&(i+=ye(o)),c&&(i+=ve(c)))}return i},dt=/\r?\n/;function P(e,t,s){return String(e).normalize().split(dt).map(i=>ht(i,t,s)).join(`
6
- `)}var w=ue(Y(),1);var yt=["up","down","left","right","space","enter","cancel"],vt=["January","February","March","April","May","June","July","August","September","October","November","December"],x={actions:new Set(yt),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0,date:{monthNames:[...vt],messages:{required:"Please enter a valid date",invalidMonth:"There are only 12 months in a year",invalidDay:(e,t)=>`There are only ${e} days in ${t}`,afterMin:e=>`Date must be on or after ${e.toISOString().slice(0,10)}`,beforeMax:e=>`Date must be on or before ${e.toISOString().slice(0,10)}`}}};function Ee(e,t){if(typeof e=="string")return x.aliases.get(e)===t;for(let s of e)if(s!==void 0&&Ee(s,t))return!0;return!1}function bt(e,t){if(e===t)return;let s=e.split(`
7
- `),i=t.split(`
8
- `),o=Math.max(s.length,i.length),c=[];for(let u=0;u<o;u++)s[u]!==i[u]&&c.push(u);return{lines:c,numLinesBefore:s.length,numLinesAfter:i.length,numLines:o}}var rs=globalThis.process.platform.startsWith("win"),Q=Symbol("clack:cancel");function G(e){return e===Q}function U(e,t){let s=e;s.isTTY&&s.setRawMode(t)}var _e=e=>"columns"in e&&typeof e.columns=="number"?e.columns:80,xe=e=>"rows"in e&&typeof e.rows=="number"?e.rows:20;function Re(e,t,s,i=s,o=s,c){let u=_e(e??Se);return P(t,u-s.length,{hard:!0,trim:!1}).split(`
9
- `).map((r,h,f)=>{let v=c?c(r,h):r;return h===0?`${i}${v}`:h===f.length-1?`${o}${v}`:`${s}${v}`}).join(`
10
- `)}var wt=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor(e,t=!0){let{input:s=ft,output:i=Se,render:o,signal:c,...u}=e;this.opts=u,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=o.bind(this),this._track=t,this._abortSignal=c,this.input=s,this.output=i}unsubscribe(){this._subscribers.clear()}setSubscriber(e,t){let s=this._subscribers.get(e)??[];s.push(t),this._subscribers.set(e,s)}on(e,t){this.setSubscriber(e,{cb:t})}once(e,t){this.setSubscriber(e,{cb:t,once:!0})}emit(e,...t){let s=this._subscribers.get(e)??[],i=[];for(let o of s)o.cb(...t),o.once&&i.push(()=>s.splice(s.indexOf(o),1));for(let o of i)o()}prompt(){return new Promise(e=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),e(Q);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=$t.createInterface({input:this.input,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on("keypress",this.onKeypress),U(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(w.cursor.show),this.output.off("resize",this.render),U(this.input,!1),e(this.value)}),this.once("cancel",()=>{this.output.write(w.cursor.show),this.output.off("resize",this.render),U(this.input,!1),e(Q)})})}_isActionKey(e,t){return e===" "}_shouldSubmit(e,t){return!0}_setValue(e){this.value=e,this.emit("value",this.value)}_setUserInput(e,t){this.userInput=e??"",this.emit("userInput",this.userInput),t&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:"u"}),this._setUserInput("")}onKeypress(e,t){if(this._track&&t.name!=="return"&&(t.name&&this._isActionKey(e,t)&&this.rl?.write(null,{ctrl:!0,name:"h"}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state==="error"&&(this.state="active"),t?.name&&(!this._track&&x.aliases.has(t.name)&&this.emit("cursor",x.aliases.get(t.name)),x.actions.has(t.name)&&this.emit("cursor",t.name)),e&&(e.toLowerCase()==="y"||e.toLowerCase()==="n")&&this.emit("confirm",e.toLowerCase()==="y"),this.emit("key",e?.toLowerCase(),t),t?.name==="return"&&this._shouldSubmit(e,t)){if(this.opts.validate){let s=this.opts.validate(this.value);s&&(this.error=s instanceof Error?s.message:s,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}Ee([e,t?.name,t?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
11
- `),U(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=P(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
12
- `).length-1;this.output.write(w.cursor.move(-999,e*-1))}render(){let e=P(this._render(this)??"",process.stdout.columns,{hard:!0,trim:!1});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(w.cursor.hide);else{let t=bt(this._prevFrame,e),s=xe(this.output);if(this.restoreCursor(),t){let i=Math.max(0,t.numLinesAfter-s),o=Math.max(0,t.numLinesBefore-s),c=t.lines.find(u=>u>=i);if(c===void 0){this._prevFrame=e;return}if(t.lines.length===1){this.output.write(w.cursor.move(0,c-o)),this.output.write(w.erase.lines(1));let u=e.split(`
13
- `);this.output.write(u[c]),this._prevFrame=e,this.output.write(w.cursor.move(0,u.length-c-1));return}else if(t.lines.length>1){if(i<o)c=i;else{let r=c-o;r>0&&this.output.write(w.cursor.move(0,r))}this.output.write(w.erase.down());let u=e.split(`
14
- `).slice(c);this.output.write(u.join(`
15
- `)),this._prevFrame=e;return}}this.output.write(w.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}};var B=class extends wt{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("userInput",()=>{this.value=this._value}),this.on("confirm",s=>{this.output.write(w.cursor.move(0,-1)),this.value=s,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};import{styleText as l,stripVTControlCharacters as bs}from"node:util";import I from"node:process";var Me=ue(Y(),1);function It(){return I.platform!=="win32"?I.env.TERM!=="linux":!!I.env.CI||!!I.env.WT_SESSION||!!I.env.TERMINUS_SUBLIME||I.env.ConEmuTask==="{cmd::Cmder}"||I.env.TERM_PROGRAM==="Terminus-Sublime"||I.env.TERM_PROGRAM==="vscode"||I.env.TERM==="xterm-256color"||I.env.TERM==="alacritty"||I.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Ct=It();var d=(e,t)=>Ct?e:t,St=d("\u25C6","*"),Et=d("\u25A0","x"),_t=d("\u25B2","x"),Le=d("\u25C7","o"),Ss=d("\u250C","T"),_=d("\u2502","|"),ke=d("\u2514","\u2014"),Es=d("\u2510","T"),_s=d("\u2518","\u2014"),Te=d("\u25CF",">"),Fe=d("\u25CB"," "),xs=d("\u25FB","[\u2022]"),Rs=d("\u25FC","[+]"),Ts=d("\u25FB","[ ]"),Fs=d("\u25AA","\u2022"),Ms=d("\u2500","-"),Ls=d("\u256E","+"),ks=d("\u251C","+"),As=d("\u256F","+"),Ps=d("\u2570","+"),Ds=d("\u256D","+"),xt=d("\u25CF","\u2022"),Rt=d("\u25C6","*"),Tt=d("\u25B2","!"),Ft=d("\u25A0","x"),Mt=e=>{switch(e){case"initial":case"active":return l("cyan",St);case"cancel":return l("red",Et);case"error":return l("yellow",_t);case"submit":return l("green",Le)}};var Ae=e=>{let t=e.active??"Yes",s=e.inactive??"No";return new B({active:t,inactive:s,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue??!0,render(){let i=e.withGuide??x.withGuide,o=`${Mt(this.state)} `,c=i?`${l("gray",_)} `:"",u=Re(e.output,e.message,c,o),r=`${i?`${l("gray",_)}
16
- `:""}${u}
17
- `,h=this.value?t:s;switch(this.state){case"submit":{let f=i?`${l("gray",_)} `:"";return`${r}${f}${l("dim",h)}`}case"cancel":{let f=i?`${l("gray",_)} `:"";return`${r}${f}${l(["strikethrough","dim"],h)}${i?`
18
- ${l("gray",_)}`:""}`}default:{let f=i?`${l("cyan",_)} `:"",v=i?l("cyan",ke):"";return`${r}${f}${this.value?`${l("green",Te)} ${t}`:`${l("dim",Fe)} ${l("dim",t)}`}${e.vertical?i?`
19
- ${l("cyan",_)} `:`
20
- `:` ${l("dim","/")} `}${this.value?`${l("dim",Fe)} ${l("dim",s)}`:`${l("green",Te)} ${s}`}
21
- ${v}
22
- `}}}}).prompt()};var n={message:(e=[],{symbol:t=l("gray",_),secondarySymbol:s=l("gray",_),output:i=process.stdout,spacing:o=1,withGuide:c}={})=>{let u=[],r=c??x.withGuide,h=r?s:"",f=r?`${t} `:"",v=r?`${s} `:"";for(let p=0;p<o;p++)u.push(h);let m=Array.isArray(e)?e:e.split(`
23
- `);if(m.length>0){let[p,...b]=m;p.length>0?u.push(`${f}${p}`):u.push(r?t:"");for(let y of b)y.length>0?u.push(`${v}${y}`):u.push(r?s:"")}i.write(`${u.join(`
2
+ var ns=Object.create;var it=Object.defineProperty;var as=Object.getOwnPropertyDescriptor;var us=Object.getOwnPropertyNames;var ls=Object.getPrototypeOf,cs=Object.prototype.hasOwnProperty;var hs=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ds=(e,t,s,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of us(t))!cs.call(e,i)&&i!==s&&it(e,i,{get:()=>t[i],enumerable:!(r=as(t,i))||r.enumerable});return e};var ot=(e,t,s)=>(s=e!=null?ns(ls(e)):{},ds(t||!e||!e.__esModule?it(s,"default",{value:e,enumerable:!0}):s,e));var Be=hs((Nr,bt)=>{"use strict";var Ne="\x1B",T=`${Ne}[`,xs="\x07",De={to(e,t){return t?`${T}${t+1};${e+1}H`:`${T}${e+1}G`},move(e,t){let s="";return e<0?s+=`${T}${-e}D`:e>0&&(s+=`${T}${e}C`),t<0?s+=`${T}${-t}A`:t>0&&(s+=`${T}${t}B`),s},up:(e=1)=>`${T}${e}A`,down:(e=1)=>`${T}${e}B`,forward:(e=1)=>`${T}${e}C`,backward:(e=1)=>`${T}${e}D`,nextLine:(e=1)=>`${T}E`.repeat(e),prevLine:(e=1)=>`${T}F`.repeat(e),left:`${T}G`,hide:`${T}?25l`,show:`${T}?25h`,save:`${Ne}7`,restore:`${Ne}8`},Rs={up:(e=1)=>`${T}S`.repeat(e),down:(e=1)=>`${T}T`.repeat(e)},Ts={screen:`${T}2J`,up:(e=1)=>`${T}1J`.repeat(e),down:(e=1)=>`${T}J`.repeat(e),line:`${T}2K`,lineEnd:`${T}K`,lineStart:`${T}1K`,lines(e){let t="";for(let s=0;s<e;s++)t+=this.line+(s<e-1?De.up():"");return e&&(t+=De.left),t}};bt.exports={cursor:De,scroll:Rs,erase:Ts,beep:xs}});import{styleText as _s}from"node:util";import{stdout as Ue,stdin as Ct}from"node:process";import*as J from"node:readline";import Ms from"node:readline";var nt=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let s=0;for(e.lastIndex=0;e.test(t);)s+=1;return t.length-s}})(),at=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,ut=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141;var ms=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,ps=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,lt=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,gs=/\t{1,1000}/y,ct=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,fs=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,$s=/\p{M}+/gu,ys={limit:1/0,ellipsis:""},ht=(e,t={},s={})=>{let r=t.limit??1/0,i=t.ellipsis??"",o=t?.ellipsisWidth??(i?ht(i,ys,s).width:0),n=0,u=s.controlWidth??0,l=s.tabWidth??8,h=s.emojiWidth??2,m=2,p=s.regularWidth??1,g=s.wideWidth??m,y=[[fs,p],[ms,n],[ps,u],[gs,l],[ct,h],[lt,g]],f=0,C=0,A=e.length,L=0,D=!1,V=A,O=Math.max(0,r-o),w=0,M=0,$=0,b=0;e:for(;;){if(M>w||C>=A&&C>f){let x=e.slice(w,M)||e.slice(f,C);L=0;for(let F of x.replaceAll($s,"")){let E=F.codePointAt(0)||0;if(at(E)?b=m:ut(E)?b=g:b=p,$+b>O&&(V=Math.min(V,Math.max(w,f)+L)),$+b>r){D=!0;break e}L+=F.length,$+=b}w=M=0}if(C>=A)break e;for(let x=0,F=y.length;x<F;x++){let[E,se]=y[x];if(E.lastIndex=C,E.test(e)){if(L=E===lt?nt(e.slice(C,E.lastIndex)):E===ct?1:E.lastIndex-C,b=L*se,$+b>O&&(V=Math.min(V,C+Math.floor((O-$)/se))),$+b>r){D=!0;break e}$+=b,w=f,M=C,C=f=E.lastIndex;continue e}}C+=1}return{width:D?O:$,index:D?V:A,truncated:D,ellipsed:D&&r>=o}},dt=ht;var vs={limit:1/0,ellipsis:"",ellipsisWidth:0},bs=(e,t={})=>dt(e,vs,t).width,B=bs;var ge="\x1B",$t="\x9B",ws=39,Le="\x07",yt="[",Cs="]",vt="m",Pe=`${Cs}8;;`,mt=new RegExp(`(?:\\${yt}(?<code>\\d+)m|\\${Pe}(?<uri>.*)${Le})`,"y"),pt=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},gt=e=>`${ge}${yt}${e}${vt}`,ft=e=>`${ge}${Pe}${e}${Le}`,ke=(e,t,s)=>{let r=t[Symbol.iterator](),i=!1,o=!1,n=e.at(-1),u=n===void 0?0:B(n),l=r.next(),h=r.next(),m=0;for(;!l.done;){let p=l.value,g=B(p);u+g<=s?e[e.length-1]+=p:(e.push(p),u=0),(p===ge||p===$t)&&(i=!0,o=t.startsWith(Pe,m+1)),i?o?p===Le&&(i=!1,o=!1):p===vt&&(i=!1):(u+=g,u===s&&!h.done&&(e.push(""),u=0)),l=h,h=r.next(),m+=p.length}n=e.at(-1),!u&&n!==void 0&&n.length&&e.length>1&&(e[e.length-2]+=e.pop())},Ss=e=>{let t=e.split(" "),s=t.length;for(;s&&!B(t[s-1]);)s--;return s===t.length?e:t.slice(0,s).join(" ")+t.slice(s).join("")},Is=(e,t,s={})=>{if(s.trim!==!1&&e.trim()==="")return"";let r="",i,o,n=e.split(" "),u=[""],l=0;for(let p=0;p<n.length;p++){let g=n[p];if(s.trim!==!1){let f=u.at(-1)??"",C=f.trimStart();f.length!==C.length&&(u[u.length-1]=C,l=B(C))}p!==0&&(l>=t&&(s.wordWrap===!1||s.trim===!1)&&(u.push(""),l=0),(l||s.trim===!1)&&(u[u.length-1]+=" ",l++));let y=B(g);if(s.hard&&y>t){let f=t-l,C=1+Math.floor((y-f-1)/t);Math.floor((y-1)/t)<C&&u.push(""),ke(u,g,t),l=B(u.at(-1)??"");continue}if(l+y>t&&l&&y){if(s.wordWrap===!1&&l<t){ke(u,g,t),l=B(u.at(-1)??"");continue}u.push(""),l=0}if(l+y>t&&s.wordWrap===!1){ke(u,g,t),l=B(u.at(-1)??"");continue}u[u.length-1]+=g,l+=y}s.trim!==!1&&(u=u.map(p=>Ss(p)));let h=u.join(`
3
+ `),m=!1;for(let p=0;p<h.length;p++){let g=h[p];if(r+=g,m)m=!1;else if(m=g>="\uD800"&&g<="\uDBFF",m)continue;if(g===ge||g===$t){mt.lastIndex=p+1;let f=mt.exec(h)?.groups;if(f?.code!==void 0){let C=Number.parseFloat(f.code);i=C===ws?void 0:C}else f?.uri!==void 0&&(o=f.uri.length===0?void 0:f.uri)}if(h[p+1]===`
4
+ `){o&&(r+=ft(""));let y=i?pt(i):void 0;i&&y&&(r+=gt(y))}else g===`
5
+ `&&(i&&pt(i)&&(r+=gt(i)),o&&(r+=ft(o)))}return r},Es=/\r?\n/;function z(e,t,s){return String(e).normalize().split(Es).map(r=>Is(r,t,s)).join(`
6
+ `)}var P=ot(Be(),1);import{ReadStream as wt}from"node:tty";function X(e,t,s){if(!s.some(n=>!n.disabled))return e;let r=e+t,i=Math.max(s.length-1,0),o=r<0?i:r>i?0:r;return s[o].disabled?X(o,t<0?-1:1,s):o}var Fs=["up","down","left","right","space","enter","cancel"],As=["January","February","March","April","May","June","July","August","September","October","November","December"],N={actions:new Set(Fs),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0,date:{monthNames:[...As],messages:{required:"Please enter a valid date",invalidMonth:"There are only 12 months in a year",invalidDay:(e,t)=>`There are only ${e} days in ${t}`,afterMin:e=>`Date must be on or after ${e.toISOString().slice(0,10)}`,beforeMax:e=>`Date must be on or before ${e.toISOString().slice(0,10)}`}}};function Ge(e,t){if(typeof e=="string")return N.aliases.get(e)===t;for(let s of e)if(s!==void 0&&Ge(s,t))return!0;return!1}function Os(e,t){if(e===t)return;let s=e.split(`
7
+ `),r=t.split(`
8
+ `),i=Math.max(s.length,r.length),o=[];for(let n=0;n<i;n++)s[n]!==r[n]&&o.push(n);return{lines:o,numLinesBefore:s.length,numLinesAfter:r.length,numLines:i}}var ks=globalThis.process.platform.startsWith("win"),Ve=Symbol("clack:cancel");function be(e){return e===Ve}function fe(e,t){let s=e;s.isTTY&&s.setRawMode(t)}function St({input:e=Ct,output:t=Ue,overwrite:s=!0,hideCursor:r=!0}={}){let i=J.createInterface({input:e,output:t,prompt:"",tabSize:1});J.emitKeypressEvents(e,i),e instanceof wt&&e.isTTY&&e.setRawMode(!0);let o=(n,{name:u,sequence:l})=>{let h=String(n);if(Ge([h,u,l],"cancel")){r&&t.write(P.cursor.show),process.exit(0);return}if(!s)return;J.moveCursor(t,u==="return"?0:-1,u==="return"?-1:0,()=>{J.clearLine(t,1,()=>{e.once("keypress",o)})})};return r&&t.write(P.cursor.hide),e.once("keypress",o),()=>{e.off("keypress",o),r&&t.write(P.cursor.show),e instanceof wt&&e.isTTY&&!ks&&e.setRawMode(!1),i.terminal=!1,i.close()}}var ne=e=>"columns"in e&&typeof e.columns=="number"?e.columns:80,je=e=>"rows"in e&&typeof e.rows=="number"?e.rows:20;function Q(e,t,s,r=s,i=s,o){let n=ne(e??Ue);return z(t,n-s.length,{hard:!0,trim:!1}).split(`
9
+ `).map((u,l,h)=>{let m=o?o(u,l):u;return l===0?`${r}${m}`:l===h.length-1?`${i}${m}`:`${s}${m}`}).join(`
10
+ `)}var we=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame="";_subscribers=new Map;_cursor=0;state="initial";error="";value;userInput="";constructor(e,t=!0){let{input:s=Ct,output:r=Ue,render:i,signal:o,...n}=e;this.opts=n,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=i.bind(this),this._track=t,this._abortSignal=o,this.input=s,this.output=r}unsubscribe(){this._subscribers.clear()}setSubscriber(e,t){let s=this._subscribers.get(e)??[];s.push(t),this._subscribers.set(e,s)}on(e,t){this.setSubscriber(e,{cb:t})}once(e,t){this.setSubscriber(e,{cb:t,once:!0})}emit(e,...t){let s=this._subscribers.get(e)??[],r=[];for(let i of s)i.cb(...t),i.once&&r.push(()=>s.splice(s.indexOf(i),1));for(let i of r)i()}prompt(){return new Promise(e=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state="cancel",this.close(),e(Ve);this._abortSignal.addEventListener("abort",()=>{this.state="cancel",this.close()},{once:!0})}this.rl=Ms.createInterface({input:this.input,tabSize:2,prompt:"",escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on("keypress",this.onKeypress),fe(this.input,!0),this.output.on("resize",this.render),this.render(),this.once("submit",()=>{this.output.write(P.cursor.show),this.output.off("resize",this.render),fe(this.input,!1),e(this.value)}),this.once("cancel",()=>{this.output.write(P.cursor.show),this.output.off("resize",this.render),fe(this.input,!1),e(Ve)})})}_isActionKey(e,t){return e===" "}_shouldSubmit(e,t){return!0}_setValue(e){this.value=e,this.emit("value",this.value)}_setUserInput(e,t){this.userInput=e??"",this.emit("userInput",this.userInput),t&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:"u"}),this._setUserInput("")}onKeypress(e,t){if(this._track&&t.name!=="return"&&(t.name&&this._isActionKey(e,t)&&this.rl?.write(null,{ctrl:!0,name:"h"}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state==="error"&&(this.state="active"),t?.name&&(!this._track&&N.aliases.has(t.name)&&this.emit("cursor",N.aliases.get(t.name)),N.actions.has(t.name)&&this.emit("cursor",t.name)),e&&(e.toLowerCase()==="y"||e.toLowerCase()==="n")&&this.emit("confirm",e.toLowerCase()==="y"),this.emit("key",e?.toLowerCase(),t),t?.name==="return"&&this._shouldSubmit(e,t)){if(this.opts.validate){let s=this.opts.validate(this.value);s&&(this.error=s instanceof Error?s.message:s,this.state="error",this.rl?.write(this.userInput))}this.state!=="error"&&(this.state="submit")}Ge([e,t?.name,t?.sequence],"cancel")&&(this.state="cancel"),(this.state==="submit"||this.state==="cancel")&&this.emit("finalize"),this.render(),(this.state==="submit"||this.state==="cancel")&&this.close()}close(){this.input.unpipe(),this.input.removeListener("keypress",this.onKeypress),this.output.write(`
11
+ `),fe(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=z(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
12
+ `).length-1;this.output.write(P.cursor.move(-999,e*-1))}render(){let e=z(this._render(this)??"",process.stdout.columns,{hard:!0,trim:!1});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(P.cursor.hide);else{let t=Os(this._prevFrame,e),s=je(this.output);if(this.restoreCursor(),t){let r=Math.max(0,t.numLinesAfter-s),i=Math.max(0,t.numLinesBefore-s),o=t.lines.find(n=>n>=r);if(o===void 0){this._prevFrame=e;return}if(t.lines.length===1){this.output.write(P.cursor.move(0,o-i)),this.output.write(P.erase.lines(1));let n=e.split(`
13
+ `);this.output.write(n[o]),this._prevFrame=e,this.output.write(P.cursor.move(0,n.length-o-1));return}else if(t.lines.length>1){if(r<i)o=r;else{let u=o-i;u>0&&this.output.write(P.cursor.move(0,u))}this.output.write(P.erase.down());let n=e.split(`
14
+ `).slice(o);this.output.write(n.join(`
15
+ `)),this._prevFrame=e;return}}this.output.write(P.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}};var $e=class extends we{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("userInput",()=>{this.value=this._value}),this.on("confirm",s=>{this.output.write(P.cursor.move(0,-1)),this.value=s,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};var It=class extends we{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter(e=>e.disabled!==!0)}toggleAll(){let e=this._enabledOptions,t=this.value!==void 0&&this.value.length===e.length;this.value=t?[]:e.map(s=>s.value)}toggleInvert(){let e=this.value;if(!e)return;let t=this._enabledOptions.filter(s=>!e.includes(s.value));this.value=t.map(s=>s.value)}toggleValue(){this.value===void 0&&(this.value=[]);let e=this.value.includes(this._value);this.value=e?this.value.filter(t=>t!==this._value):[...this.value,this._value]}constructor(e){super(e,!1),this.options=e.options,this.value=[...e.initialValues??[]];let t=Math.max(this.options.findIndex(({value:s})=>s===e.cursorAt),0);this.cursor=this.options[t].disabled?X(t,1,this.options):t,this.on("key",s=>{s==="a"&&this.toggleAll(),s==="i"&&this.toggleInvert()}),this.on("cursor",s=>{switch(s){case"left":case"up":this.cursor=X(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=X(this.cursor,1,this.options);break;case"space":this.toggleValue();break}})}};var ye=class extends we{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor(t){super(t,!1),this.options=t.options;let s=this.options.findIndex(({value:i})=>i===t.initialValue),r=s===-1?0:s;this.cursor=this.options[r].disabled?X(r,1,this.options):r,this.changeValue(),this.on("cursor",i=>{switch(i){case"left":case"up":this.cursor=X(this.cursor,-1,this.options);break;case"down":case"right":this.cursor=X(this.cursor,1,this.options);break}this.changeValue()})}};var ve=class extends we{get userInputWithCursor(){if(this.state==="submit")return this.userInput;let t=this.userInput;if(this.cursor>=t.length)return`${this.userInput}\u2588`;let s=t.slice(0,this.cursor),[r,...i]=t.slice(this.cursor);return`${s}${_s("inverse",r)}${i.join("")}`}get cursor(){return this._cursor}constructor(t){super({...t,initialUserInput:t.initialUserInput??t.initialValue}),this.on("userInput",s=>{this._setValue(s)}),this.on("finalize",()=>{this.value||(this.value=t.defaultValue),this.value===void 0&&(this.value="")})}};import{styleText as a,stripVTControlCharacters as ti}from"node:util";import G from"node:process";var ue=ot(Be(),1);function Ls(){return G.platform!=="win32"?G.env.TERM!=="linux":!!G.env.CI||!!G.env.WT_SESSION||!!G.env.TERMINUS_SUBLIME||G.env.ConEmuTask==="{cmd::Cmder}"||G.env.TERM_PROGRAM==="Terminus-Sublime"||G.env.TERM_PROGRAM==="vscode"||G.env.TERM==="xterm-256color"||G.env.TERM==="alacritty"||G.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var We=Ls(),Ps=()=>process.env.CI==="true";var I=(e,t)=>We?e:t,Ns=I("\u25C6","*"),_t=I("\u25A0","x"),Mt=I("\u25B2","x"),Ie=I("\u25C7","o"),oi=I("\u250C","T"),v=I("\u2502","|"),ee=I("\u2514","\u2014"),ni=I("\u2510","T"),ai=I("\u2518","\u2014"),qe=I("\u25CF",">"),Se=I("\u25CB"," "),Ds=I("\u25FB","[\u2022]"),Et=I("\u25FC","[+]"),xt=I("\u25FB","[ ]"),ui=I("\u25AA","\u2022"),Rt=I("\u2500","-"),Bs=I("\u256E","+"),Vs=I("\u251C","+"),Us=I("\u256F","+"),Gs=I("\u2570","+"),li=I("\u256D","+"),js=I("\u25CF","\u2022"),Ws=I("\u25C6","*"),qs=I("\u25B2","!"),Hs=I("\u25A0","x"),Ee=e=>{switch(e){case"initial":case"active":return a("cyan",Ns);case"cancel":return a("red",_t);case"error":return a("yellow",Mt);case"submit":return a("green",Ie)}},Ft=e=>{switch(e){case"initial":case"active":return a("cyan",v);case"cancel":return a("red",v);case"error":return a("yellow",v);case"submit":return a("green",v)}},Tt=(e,t,s,r,i,o=!1)=>{let n=t,u=0;if(o)for(let l=r-1;l>=s&&(n-=e[l].length,u++,!(n<=i));l--);else for(let l=s;l<r&&(n-=e[l].length,u++,!(n<=i));l++);return{lineCount:n,removals:u}},He=({cursor:e,options:t,style:s,output:r=process.stdout,maxItems:i=Number.POSITIVE_INFINITY,columnPadding:o=0,rowPadding:n=4})=>{let u=ne(r)-o,l=je(r),h=a("dim","..."),m=Math.max(l-n,0),p=Math.max(Math.min(i,m),5),g=0;e>=p-3&&(g=Math.max(Math.min(e-p+3,t.length-p),0));let y=p<t.length&&g>0,f=p<t.length&&g+p<t.length,C=Math.min(g+p,t.length),A=[],L=0;y&&L++,f&&L++;let D=g+(y?1:0),V=C-(f?1:0);for(let w=D;w<V;w++){let M=z(s(t[w],w===e),u,{hard:!0,trim:!1}).split(`
16
+ `);A.push(M),L+=M.length}if(L>m){let w=0,M=0,$=L,b=e-D,x=m,F=()=>Tt(A,$,0,b,x),E=()=>Tt(A,$,b+1,A.length,x,!0);y?({lineCount:$,removals:w}=F(),$>x&&(f||(x-=1),{lineCount:$,removals:M}=E())):(f||(x-=1),{lineCount:$,removals:M}=E(),$>x&&(x-=1,{lineCount:$,removals:w}=F())),w>0&&(y=!0,A.splice(0,w)),M>0&&(f=!0,A.splice(A.length-M,M))}let O=[];y&&O.push(h);for(let w of A)for(let M of w)O.push(M);return f&&O.push(h),O};var At=e=>{let t=e.active??"Yes",s=e.inactive??"No";return new $e({active:t,inactive:s,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue??!0,render(){let r=e.withGuide??N.withGuide,i=`${Ee(this.state)} `,o=r?`${a("gray",v)} `:"",n=Q(e.output,e.message,o,i),u=`${r?`${a("gray",v)}
17
+ `:""}${n}
18
+ `,l=this.value?t:s;switch(this.state){case"submit":{let h=r?`${a("gray",v)} `:"";return`${u}${h}${a("dim",l)}`}case"cancel":{let h=r?`${a("gray",v)} `:"";return`${u}${h}${a(["strikethrough","dim"],l)}${r?`
19
+ ${a("gray",v)}`:""}`}default:{let h=r?`${a("cyan",v)} `:"",m=r?a("cyan",ee):"";return`${u}${h}${this.value?`${a("green",qe)} ${t}`:`${a("dim",Se)} ${a("dim",t)}`}${e.vertical?r?`
20
+ ${a("cyan",v)} `:`
21
+ `:` ${a("dim","/")} `}${this.value?`${a("dim",Se)} ${a("dim",s)}`:`${a("green",qe)} ${s}`}
22
+ ${m}
23
+ `}}}}).prompt()};var d={message:(e=[],{symbol:t=a("gray",v),secondarySymbol:s=a("gray",v),output:r=process.stdout,spacing:i=1,withGuide:o}={})=>{let n=[],u=o??N.withGuide,l=u?s:"",h=u?`${t} `:"",m=u?`${s} `:"";for(let g=0;g<i;g++)n.push(l);let p=Array.isArray(e)?e:e.split(`
24
+ `);if(p.length>0){let[g,...y]=p;g.length>0?n.push(`${h}${g}`):n.push(u?t:"");for(let f of y)f.length>0?n.push(`${m}${f}`):n.push(u?s:"")}r.write(`${n.join(`
24
25
  `)}
25
- `)},info:(e,t)=>{n.message(e,{...t,symbol:l("blue",xt)})},success:(e,t)=>{n.message(e,{...t,symbol:l("green",Rt)})},step:(e,t)=>{n.message(e,{...t,symbol:l("green",Le)})},warn:(e,t)=>{n.message(e,{...t,symbol:l("yellow",Tt)})},warning:(e,t)=>{n.warn(e,t)},error:(e,t)=>{n.message(e,{...t,symbol:l("red",Ft)})}},Pe=(e="",t)=>{let s=t?.output??process.stdout,i=t?.withGuide??x.withGuide?`${l("gray",ke)} `:"";s.write(`${i}${l("red",e)}
26
+ `)},info:(e,t)=>{d.message(e,{...t,symbol:a("blue",js)})},success:(e,t)=>{d.message(e,{...t,symbol:a("green",Ws)})},step:(e,t)=>{d.message(e,{...t,symbol:a("green",Ie)})},warn:(e,t)=>{d.message(e,{...t,symbol:a("yellow",qs)})},warning:(e,t)=>{d.warn(e,t)},error:(e,t)=>{d.message(e,{...t,symbol:a("red",Hs)})}},Ot=(e="",t)=>{let s=t?.output??process.stdout,r=t?.withGuide??N.withGuide?`${a("gray",ee)} `:"";s.write(`${r}${a("red",e)}
26
27
 
27
- `)};var Vs={light:d("\u2500","-"),heavy:d("\u2501","="),block:d("\u2588","#")};var Os=`${l("gray",_)} `;import{spawnSync as We}from"child_process";import{existsSync as Lt,readFileSync as kt,writeFileSync as Gs,mkdirSync as Ws}from"fs";import At from"os";import Oe from"path";var Pt=Oe.join(At.homedir(),".eazy-git"),De=Oe.join(Pt,"config.json"),Ve={language:"es",defaultBaseBranch:"release",aiProvider:"claude"};function Ne(){try{if(Lt(De)){let e=kt(De,"utf-8");return{...Ve,...JSON.parse(e)}}}catch{}return{...Ve}}var Ue={welcome:"Bienvenido a",subtitle:"tu CLI de confianza para gestionar ramas en GIT",operationCompleted:"Operacion completada!",operationCancelled:"Operacion cancelada. Saliendo...",unknownCommand:"Comando desconocido",errorExecuting:"Error al ejecutar el comando",version:"eazy-git version",whatToDo:"Que deseas hacer?",addChanges:"Agregar cambios a una rama",createOriginal:"Crear rama original",createTemporal:"Crear rama temporal",notGitRepo:"Este directorio no es un repositorio git",gitNotInstalled:"git no esta instalado en el sistema",currentBranch:"Branch actual",filesChanged:"Archivos con cambios",noChangesPending:"No hay cambios pendientes. Deseas continuar de todas formas?",updatingRefs:"Actualizando referencias remotas...",refsUpdated:"Referencias actualizadas",fetchFailed:"No se pudo hacer fetch (continuando...)",baseBranch:"Desde que branch base quieres crear la rama?",baseBranchRequired:"El branch base es requerido",ticketId:"Cual es el identificador del ticket? (ej: DPW-0000)",ticketRequired:"El ticket es requerido",changeType:"Que tipo de cambio es?",branchExistsLocal:e=>`La rama "${e}" ya existe localmente. Que deseas hacer?`,switchToIt:"Cambiarme a ella y continuar",cancel:"Cancelar",cancelledOp:"Operacion cancelada.",creatingBranch:(e,t)=>`Creando rama ${e} desde origin/${t}...`,branchCreated:e=>`Rama ${e} creada`,errorCreatingBranch:e=>`Error al crear la rama: ${e}`,noFilesToStage:"No hay archivos para stagear.",selectFiles:"Cuales archivos quieres incluir en el commit?",selectAllFiles:"Seleccionar todos los archivos",stagedFiles:"Archivos en stage",stagedCorrect:"Los archivos en stage son correctos?",aiProvider:"Con que IA quieres generar la sugerencia de commit?",generatingCommit:e=>`Generando sugerencia de commit con ${e}...`,aiSuggestionFailed:e=>`No se pudo obtener sugerencia de ${e}. Escribe el mensaje manualmente.`,writeCommitMsg:"Escribe el mensaje de commit:",commitMsgRequired:"El mensaje es requerido",suggestionOf:e=>`Sugerencia de ${e}`,useThisCommit:"Este mensaje de commit te parece bien?",yesUseIt:"Si, usar este",modify:"Modificar",commitSuccess:"Commit realizado correctamente",hookBlocked:"El pre-commit hook bloqueo el commit. Que deseas hacer?",retryHook:"Ya lo corregi, agrega los cambios y vuelve a intentarlo",skipHook:"Saltar el hook (--no-verify)",commitNoHooks:"Commit realizado (sin hooks)",pushToRemote:"Deseas subir la rama al repositorio remoto?",pushSuccess:"Push realizado",pushForceQuestion:"La rama ya existe en el remoto con historial diferente. Deseas forzar el push? (git push -f)",pushForceSuccess:"Push forzado realizado",pushForceError:e=>`Error en el push forzado: ${e}`,pushError:e=>`Error en el push: ${e}`,summaryTitle:"Resumen",summaryBranch:"Rama",summaryFrom:"Desde",summaryCommit:"Commit",summaryFiles:e=>`${e} archivos commiteados`,summaryPush:"Push",summaryPR:"Crear PR",statusModified:"modificado",statusAdded:"agregado",statusDeleted:"eliminado",statusRenamed:"renombrado",statusUntracked:"sin rastrear",commitTypes:{fix:"fix \u2014 correccion de bug",feat:"feat \u2014 nueva funcionalidad",refactor:"refactor \u2014 mejora sin cambio funcional",chore:"chore \u2014 mantenimiento, dependencias",docs:"docs \u2014 documentacion",test:"test \u2014 pruebas",ci:"ci \u2014 integracion continua",perf:"perf \u2014 rendimiento",style:"style \u2014 formato, sin cambio de logica"},selectBranchType:"Selecciona el tipo de rama:",branchFix:"Fix",branchImprovement:"Mejora",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creando rama original...",branchCreatedAndPushed:e=>`Rama "${e}" creada y pusheada correctamente!`,branchCreatedSuccess:e=>`Rama "${e}" creada correctamente!`,mergeBranchQuestion:"A que rama deseas hacer merge?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Rama temporal creada correctamente",temporalBranchMerged:"Rama temporal mergeada correctamente",conflictsDetected:"Conflictos detectados. Resolvelos manualmente!",branchPushedToRemote:"Rama pusheada al repositorio remoto",removeTemporalBranch:"Deseas eliminar la rama temporal?",temporalBranchDeleted:"Rama temporal eliminada correctamente",errorCreatingTemporal:"Error creando la rama temporal",enterJiraCode:"Ingresa el codigo del ticket JIRA:",jiraRequired:"El codigo JIRA es requerido!",jiraInvalidFormat:"El codigo JIRA debe tener el formato DPW-0000",fetchingRemote:"Obteniendo cambios remotos...",pullingChanges:"Aplicando cambios en tu rama...",pullError:e=>`Error: ${e}`,pushingChanges:"Subiendo cambios al remoto...",pushedSuccess:"Cambios subidos correctamente!",pushedForceSuccess:"Cambios subidos (forzado) correctamente!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Proporciona un mensaje de commit",stagingChanges:"Stageando cambios...",creatingCommit:"Creando commit...",commitCreated:"Commit creado correctamente!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Cambiando a la rama anterior...",switchedTo:e=>`Cambiado a rama ${e} correctamente!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Obteniendo ultimos cambios...",mergingWith:e=>`Mergeando con ${e}...`,pushingMerged:"Subiendo cambios mergeados...",mergeCompleted:"Merge completado correctamente!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Eliminando ultimo commit...",removeLastConfirm:"Esto eliminara el ultimo commit (los cambios se mantienen en staging). Continuar?",lastCommitRemoved:"Ultimo commit eliminado correctamente!",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Configurando tu entorno",configSaved:"Configuracion guardada",missingConfigValues:"Faltan valores de configuracion requeridos.",errorWritingConfig:"Error escribiendo archivo de configuracion:",currentConfig:"Configuracion actual",useThisConfig:"Deseas usar esta configuracion?",installingDeps:"Instalando dependencias...",depsInstalled:"Todas las dependencias fueron instaladas",authFailed:"Autenticacion fallida",unexpectedError:"Ocurrio un error inesperado",enterEndpoint:"Ingresa la URL del endpoint:",urlRequired:"La URL es requerida!",urlMustBeHttp:"La URL debe usar protocolo HTTP/HTTPS",urlMustHaveHost:"La URL debe incluir un hostname",urlInvalid:"Ingresa una URL valida",enterApiKey:"Ingresa tu apikey:",apiKeyRequired:"El API key es requerido!",enterRegistryName:"Ingresa el nombre del registro NPM (sin caracteres especiales):",registryNameRequired:"El nombre del registro es requerido!",registryNameLettersOnly:"El nombre del registro debe contener solo letras",enterRegistryURL:"Ingresa la URL del registro NPM (sin http/https):",registryURLRequired:"La URL del registro es requerida!",registryURLStartWithName:"La URL debe empezar con un nombre, evita caracteres especiales",registryURLNoProtocol:"La URL no debe incluir protocolo 'http/https' y debe empezar con una letra",registryURLNoSlash:"La URL no debe empezar con '/' y debe empezar con una letra o numero",registryURLNoWWW:"La URL no debe empezar con 'www' y debe empezar con una letra o numero",currentVersionLabel:"Version actual",checkingUpdates:"Buscando actualizaciones...",upgradeCheckFailed:"No se pudo verificar la ultima version",alreadyLatest:e=>`Ya tienes la ultima version (${e})`,upgrading:e=>`Actualizando a v${e}...`,upgradeError:"Error al actualizar eazy-git",upgradeSuccess:e=>`eazy-git actualizado a v${e}!`,languageSelect:"Selecciona el idioma de la interfaz:",languageChanged:e=>`Idioma cambiado a: ${e}`,configMenu:"Que deseas configurar?",configLanguage:"Cambiar idioma",configDefaultBranch:"Rama base por defecto",configAIProvider:"Proveedor de IA por defecto",configView:"Ver configuracion actual",defaultBranchSet:e=>`Rama base por defecto: ${e}`,aiProviderSet:e=>`Proveedor de IA por defecto: ${e}`,goBack:"Volver"};var Be={welcome:"Welcome to",subtitle:"your trusted CLI for GIT branch management",operationCompleted:"Operation completed!",operationCancelled:"Operation cancelled. Exiting...",unknownCommand:"Unknown command",errorExecuting:"Error executing command",version:"eazy-git version",whatToDo:"What would you like to do?",addChanges:"Add Changes to Branch",createOriginal:"Create Original Branch",createTemporal:"Create Temporal Branch",notGitRepo:"This directory is not a git repository",gitNotInstalled:"git is not installed on the system",currentBranch:"Current branch",filesChanged:"Files with changes",noChangesPending:"No pending changes. Do you want to continue anyway?",updatingRefs:"Updating remote references...",refsUpdated:"References updated",fetchFailed:"Could not fetch (continuing...)",baseBranch:"From which base branch do you want to create the branch?",baseBranchRequired:"Base branch is required",ticketId:"What is the ticket identifier? (e.g.: DPW-0000)",ticketRequired:"Ticket is required",changeType:"What type of change is this?",branchExistsLocal:e=>`Branch "${e}" already exists locally. What would you like to do?`,switchToIt:"Switch to it and continue",cancel:"Cancel",cancelledOp:"Operation cancelled.",creatingBranch:(e,t)=>`Creating branch ${e} from origin/${t}...`,branchCreated:e=>`Branch ${e} created`,errorCreatingBranch:e=>`Error creating branch: ${e}`,noFilesToStage:"No files to stage.",selectFiles:"Which files do you want to include in the commit?",selectAllFiles:"Select all files",stagedFiles:"Staged files",stagedCorrect:"Are the staged files correct?",aiProvider:"Which AI do you want to use for the commit suggestion?",generatingCommit:e=>`Generating commit suggestion with ${e}...`,aiSuggestionFailed:e=>`Could not get suggestion from ${e}. Write the message manually.`,writeCommitMsg:"Write the commit message:",commitMsgRequired:"Message is required",suggestionOf:e=>`${e} suggestion`,useThisCommit:"Does this commit message look good?",yesUseIt:"Yes, use it",modify:"Modify",commitSuccess:"Commit created successfully",hookBlocked:"The pre-commit hook blocked the commit. What would you like to do?",retryHook:"I fixed it, re-stage and retry",skipHook:"Skip the hook (--no-verify)",commitNoHooks:"Commit created (without hooks)",pushToRemote:"Do you want to push the branch to the remote repository?",pushSuccess:"Push completed",pushForceQuestion:"The branch already exists on remote with different history. Force push? (git push -f)",pushForceSuccess:"Force push completed",pushForceError:e=>`Error in force push: ${e}`,pushError:e=>`Error in push: ${e}`,summaryTitle:"Summary",summaryBranch:"Branch",summaryFrom:"From",summaryCommit:"Commit",summaryFiles:e=>`${e} files committed`,summaryPush:"Push",summaryPR:"Create PR",statusModified:"modified",statusAdded:"added",statusDeleted:"deleted",statusRenamed:"renamed",statusUntracked:"untracked",commitTypes:{fix:"fix - bug fix",feat:"feat - new feature",refactor:"refactor - improvement without functional change",chore:"chore - maintenance, dependencies",docs:"docs - documentation",test:"test - testing",ci:"ci - continuous integration",perf:"perf - performance",style:"style - formatting, no logic change"},selectBranchType:"Select the branch type:",branchFix:"Fix",branchImprovement:"Improvement",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creating original branch...",branchCreatedAndPushed:e=>`Branch "${e}" created and pushed successfully!`,branchCreatedSuccess:e=>`Branch "${e}" created successfully!`,mergeBranchQuestion:"Which branch do you want to merge into?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Temporal branch created successfully",temporalBranchMerged:"Temporal branch merged successfully",conflictsDetected:"Conflicts detected. Please resolve them manually!",branchPushedToRemote:"Branch pushed to remote repository",removeTemporalBranch:"Do you want to remove the temporal branch?",temporalBranchDeleted:"Temporal branch deleted successfully",errorCreatingTemporal:"Error creating the temporal branch",enterJiraCode:"Enter the JIRA ticket code:",jiraRequired:"JIRA code is required!",jiraInvalidFormat:"JIRA code must have the format DPW-0000",fetchingRemote:"Fetching remote changes...",pullingChanges:"Pulling changes into your branch...",pullError:e=>`Error: ${e}`,pushingChanges:"Pushing changes to remote...",pushedSuccess:"Changes pushed successfully!",pushedForceSuccess:"Changes pushed (force) successfully!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Please provide a commit message",stagingChanges:"Staging changes...",creatingCommit:"Creating commit...",commitCreated:"Commit created successfully!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Switching to previous branch...",switchedTo:e=>`Successfully switched to ${e} branch!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Fetching latest changes...",mergingWith:e=>`Merging with ${e}...`,pushingMerged:"Pushing merged changes...",mergeCompleted:"Merge completed successfully!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Removing last commit...",removeLastConfirm:"This will remove the last commit (changes will remain in staging). Continue?",lastCommitRemoved:"Last commit removed successfully!",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Setting up your configuration",configSaved:"Configuration saved",missingConfigValues:"Missing required configuration values.",errorWritingConfig:"Error writing configuration file:",currentConfig:"Current configuration",useThisConfig:"Would you like to use this configuration?",installingDeps:"Installing dependencies...",depsInstalled:"All dependencies were installed",authFailed:"Authentication failed",unexpectedError:"An unexpected error occurred",enterEndpoint:"Enter your endpoint URL:",urlRequired:"URL is required!",urlMustBeHttp:"URL must use HTTP/HTTPS protocol",urlMustHaveHost:"URL must include a hostname",urlInvalid:"Please enter a valid URL",enterApiKey:"Enter your apikey:",apiKeyRequired:"API key is required!",enterRegistryName:"Enter your NPM registry name (without special characters):",registryNameRequired:"Registry name is required!",registryNameLettersOnly:"Registry name must contain only letters",enterRegistryURL:"Enter your NPM registry URL (without http/https):",registryURLRequired:"Registry URL is required!",registryURLStartWithName:"URL must start with a name only, avoid special characters",registryURLNoProtocol:"URL must not include 'http/https' protocol and must start with a letter",registryURLNoSlash:"URL must not start with '/' and must begin with a letter or number",registryURLNoWWW:"URL must not start with 'www' and must begin with a letter or number",currentVersionLabel:"Current version",checkingUpdates:"Checking for updates...",upgradeCheckFailed:"Could not check the latest version",alreadyLatest:e=>`Already on the latest version (${e})`,upgrading:e=>`Upgrading to v${e}...`,upgradeError:"Error upgrading eazy-git",upgradeSuccess:e=>`eazy-git upgraded to v${e}!`,languageSelect:"Select the interface language:",languageChanged:e=>`Language changed to: ${e}`,configMenu:"What would you like to configure?",configLanguage:"Change language",configDefaultBranch:"Default base branch",configAIProvider:"Default AI provider",configView:"View current configuration",defaultBranchSet:e=>`Default base branch: ${e}`,aiProviderSet:e=>`Default AI provider: ${e}`,goBack:"Go back"};var Ge={es:Ue,en:Be};function a(e,...t){let i=Ne().language||"es",c=(Ge[i]||Ge.es)[e];return typeof c=="function"?c(...t):c||e}function X(){if(n.step(a("fetchingRemote")),We("git",["fetch"],{stdio:"inherit"}).status!==0){n.error(a("pullError","fetch failed"));return}n.step(a("pullingChanges")),We("git",["pull","origin","HEAD"],{stdio:"inherit"}).status!==0&&n.error(a("pullError","pull failed"))}import{spawnSync as Dt}from"child_process";function Z(e){let t=e.includes("-f")||e.includes("--force")||e.includes("-force");n.step(a("pushingChanges")),Dt("git",t?["push","-f","origin","HEAD"]:["push","origin","HEAD"],{stdio:"inherit"}).status===0?n.success(t?a("pushedForceSuccess"):a("pushedSuccess")):n.error(a("pushQuickError","push failed"))}import{spawnSync as Vt}from"child_process";function ee(e){if(G(e))return Pe(a("operationCancelled")),process.exit(0)}async function te(){let e=await Ae({message:a("removeLastConfirm")});if(ee(e),!e)return;n.step(a("removingLastCommit")),Vt("git",["reset","--soft","HEAD~1"],{stdio:"inherit"}).status===0?n.success(a("lastCommitRemoved")):n.error(a("removeLastError","reset failed"))}import{spawnSync as se}from"child_process";function ie(e){let t=e[0]??"develop";if(n.step(a("fetchingLatest")),se("git",["fetch"],{stdio:"inherit"}),n.step(a("mergingWith",t)),se("git",["merge",`origin/${t}`],{stdio:"inherit"}).status!==0){n.error(a("mergeError","merge failed"));return}n.step(a("pushingMerged")),se("git",["push","origin","HEAD"],{stdio:"inherit"}).status===0?n.success(a("mergeCompleted")):n.error(a("mergeError","push failed"))}import{spawnSync as je}from"child_process";function re(e){let t=e[0];t||(n.error(a("provideCommitMsg")),process.exit(1)),n.step(a("stagingChanges")),je("git",["add","."],{stdio:"inherit"}),n.step(a("creatingCommit")),je("git",["commit","-m",t],{stdio:"inherit"}).status===0?n.success(a("commitCreated")):n.error(a("commitError","commit failed"))}import{spawnSync as Ot}from"child_process";function ne(){Ot("git",["log"],{stdio:"inherit"}).status!==0&&(n.error(a("logError","git log failed")),process.exit(1))}import{spawnSync as Nt}from"child_process";function W(e){let t=e[0]||"-",s=t==="-";s&&n.step(a("switchingPrevBranch")),Nt("git",["checkout",t],{stdio:"inherit"}).status===0?n.success(a("switchedTo",s?"previous":t)):(n.error(a("checkoutError","checkout failed")),process.exit(1))}import{existsSync as Ut}from"fs";import{join as Bt}from"path";import{execSync as Gt}from"child_process";var Wt=()=>{try{Gt("git --version",{stdio:"ignore"})}catch{n.error(a("gitNotInstalled")),process.exit(1)}let e=Bt(process.cwd(),".git");Ut(e)||(n.error(a("notGitRepo")),process.exit(1))},qe=Wt;qe();var He=process.argv[1].split("/").pop(),j=process.argv.slice(2),jt={pull:X,push:()=>Z(j),removelast:te,mergewith:()=>ie(j),commit:()=>re(j),checkout:()=>W(j),back:()=>W("-"),log:ne};async function qt(){try{let e=jt[He];e||(n.error(`${a("unknownCommand")}: ${He}`),process.exit(1)),await e(),process.exit(0)}catch(e){n.error(`${a("errorExecuting")}: ${e.message}`),process.exit(1)}}qt();
28
+ `)};var ae=(e,t)=>e.split(`
29
+ `).map(s=>t(s)).join(`
30
+ `),kt=e=>{let t=(r,i)=>{let o=r.label??String(r.value);return i==="disabled"?`${a("gray",xt)} ${ae(o,n=>a(["strikethrough","gray"],n))}${r.hint?` ${a("dim",`(${r.hint??"disabled"})`)}`:""}`:i==="active"?`${a("cyan",Ds)} ${o}${r.hint?` ${a("dim",`(${r.hint})`)}`:""}`:i==="selected"?`${a("green",Et)} ${ae(o,n=>a("dim",n))}${r.hint?` ${a("dim",`(${r.hint})`)}`:""}`:i==="cancelled"?`${ae(o,n=>a(["strikethrough","dim"],n))}`:i==="active-selected"?`${a("green",Et)} ${o}${r.hint?` ${a("dim",`(${r.hint})`)}`:""}`:i==="submitted"?`${ae(o,n=>a("dim",n))}`:`${a("dim",xt)} ${ae(o,n=>a("dim",n))}`},s=e.required??!0;return new It({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValues:e.initialValues,required:s,cursorAt:e.cursorAt,validate(r){if(s&&(r===void 0||r.length===0))return`Please select at least one option.
31
+ ${a("reset",a("dim",`Press ${a(["gray","bgWhite","inverse"]," space ")} to select, ${a("gray",a("bgWhite",a("inverse"," enter ")))} to submit`))}`},render(){let r=e.withGuide??N.withGuide,i=Q(e.output,e.message,r?`${Ft(this.state)} `:"",`${Ee(this.state)} `),o=`${r?`${a("gray",v)}
32
+ `:""}${i}
33
+ `,n=this.value??[],u=(l,h)=>{if(l.disabled)return t(l,"disabled");let m=n.includes(l.value);return h&&m?t(l,"active-selected"):m?t(l,"selected"):t(l,h?"active":"inactive")};switch(this.state){case"submit":{let l=this.options.filter(({value:m})=>n.includes(m)).map(m=>t(m,"submitted")).join(a("dim",", "))||a("dim","none"),h=Q(e.output,l,r?`${a("gray",v)} `:"");return`${o}${h}`}case"cancel":{let l=this.options.filter(({value:m})=>n.includes(m)).map(m=>t(m,"cancelled")).join(a("dim",", "));if(l.trim()==="")return`${o}${a("gray",v)}`;let h=Q(e.output,l,r?`${a("gray",v)} `:"");return`${o}${h}${r?`
34
+ ${a("gray",v)}`:""}`}case"error":{let l=r?`${a("yellow",v)} `:"",h=this.error.split(`
35
+ `).map((g,y)=>y===0?`${r?`${a("yellow",ee)} `:""}${a("yellow",g)}`:` ${g}`).join(`
36
+ `),m=o.split(`
37
+ `).length,p=h.split(`
38
+ `).length+1;return`${o}${l}${He({output:e.output,options:this.options,cursor:this.cursor,maxItems:e.maxItems,columnPadding:l.length,rowPadding:m+p,style:u}).join(`
39
+ ${l}`)}
40
+ ${h}
41
+ `}default:{let l=r?`${a("cyan",v)} `:"",h=o.split(`
42
+ `).length,m=r?2:1;return`${o}${l}${He({output:e.output,options:this.options,cursor:this.cursor,maxItems:e.maxItems,columnPadding:l.length,rowPadding:h+m,style:u}).join(`
43
+ ${l}`)}
44
+ ${r?a("cyan",ee):""}
45
+ `}}}}).prompt()},zs=e=>a("dim",e),Ks=(e,t,s)=>{let r={hard:!0,trim:!1},i=z(e,t,r).split(`
46
+ `),o=i.reduce((l,h)=>Math.max(B(h),l),0),n=i.map(s).reduce((l,h)=>Math.max(B(h),l),0),u=t-(n-o);return z(e,u,r)},le=(e="",t="",s)=>{let r=s?.output??G.stdout,i=s?.withGuide??N.withGuide,o=s?.format??zs,n=["",...Ks(e,ne(r)-6,o).split(`
47
+ `).map(o),""],u=B(t),l=Math.max(n.reduce((g,y)=>{let f=B(y);return f>g?f:g},0),u)+2,h=n.map(g=>`${a("gray",v)} ${g}${" ".repeat(l-B(g))}${a("gray",v)}`).join(`
48
+ `),m=i?`${a("gray",v)}
49
+ `:"",p=i?Vs:Gs;r.write(`${m}${a("green",Ie)} ${a("reset",t)} ${a("gray",Rt.repeat(Math.max(l-u-1,1))+Bs)}
50
+ ${h}
51
+ ${a("gray",p+Rt.repeat(l+2)+Us)}
52
+ `)};var Ys=e=>a("magenta",e),Lt=({indicator:e="dots",onCancel:t,output:s=process.stdout,cancelMessage:r,errorMessage:i,frames:o=We?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],delay:n=We?80:120,signal:u,...l}={})=>{let h=Ps(),m,p,g=!1,y=!1,f="",C,A=performance.now(),L=ne(s),D=l?.styleFrame??Ys,V=S=>{let k=S>1?i??N.messages.error:r??N.messages.cancel;y=S===1,g&&(Y(k,S),y&&typeof t=="function"&&t())},O=()=>V(2),w=()=>V(1),M=()=>{process.on("uncaughtExceptionMonitor",O),process.on("unhandledRejection",O),process.on("SIGINT",w),process.on("SIGTERM",w),process.on("exit",V),u&&u.addEventListener("abort",w)},$=()=>{process.removeListener("uncaughtExceptionMonitor",O),process.removeListener("unhandledRejection",O),process.removeListener("SIGINT",w),process.removeListener("SIGTERM",w),process.removeListener("exit",V),u&&u.removeEventListener("abort",w)},b=()=>{if(C===void 0)return;h&&s.write(`
53
+ `);let S=z(C,L,{hard:!0,trim:!1}).split(`
54
+ `);S.length>1&&s.write(ue.cursor.up(S.length-1)),s.write(ue.cursor.to(0)),s.write(ue.erase.down())},x=S=>S.replace(/\.+$/,""),F=S=>{let k=(performance.now()-S)/1e3,U=Math.floor(k/60),W=Math.floor(k%60);return U>0?`[${U}m ${W}s]`:`[${W}s]`},E=l.withGuide??N.withGuide,se=(S="")=>{g=!0,m=St({output:s}),f=x(S),A=performance.now(),E&&s.write(`${a("gray",v)}
55
+ `);let k=0,U=0;M(),p=setInterval(()=>{if(h&&f===C)return;b(),C=f;let W=D(o[k]),pe;if(h)pe=`${W} ${f}...`;else if(e==="timer")pe=`${W} ${f} ${F(A)}`;else{let os=".".repeat(Math.floor(U)).slice(0,3);pe=`${W} ${f}${os}`}let is=z(pe,L,{hard:!0,trim:!1});s.write(is),k=k+1<o.length?k+1:0,U=U<4?U+.125:0},n)},Y=(S="",k=0,U=!1)=>{if(!g)return;g=!1,clearInterval(p),b();let W=k===0?a("green",Ie):k===1?a("red",_t):a("red",Mt);f=S??f,U||(e==="timer"?s.write(`${W} ${f} ${F(A)}
56
+ `):s.write(`${W} ${f}
57
+ `)),$(),m()};return{start:se,stop:(S="")=>Y(S,0),message:(S="")=>{f=x(S??f)},cancel:(S="")=>Y(S,1),error:(S="")=>Y(S,2),clear:()=>Y("",0,!0),get isCancelled(){return y}}},ci={light:I("\u2500","-"),heavy:I("\u2501","="),block:I("\u2588","#")};var Ce=(e,t)=>e.includes(`
58
+ `)?e.split(`
59
+ `).map(s=>t(s)).join(`
60
+ `):t(e),ce=e=>{let t=(s,r)=>{let i=s.label??String(s.value);switch(r){case"disabled":return`${a("gray",Se)} ${Ce(i,o=>a("gray",o))}${s.hint?` ${a("dim",`(${s.hint??"disabled"})`)}`:""}`;case"selected":return`${Ce(i,o=>a("dim",o))}`;case"active":return`${a("green",qe)} ${i}${s.hint?` ${a("dim",`(${s.hint})`)}`:""}`;case"cancelled":return`${Ce(i,o=>a(["strikethrough","dim"],o))}`;default:return`${a("dim",Se)} ${Ce(i,o=>a("dim",o))}`}};return new ye({options:e.options,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue,render(){let s=e.withGuide??N.withGuide,r=`${Ee(this.state)} `,i=`${Ft(this.state)} `,o=Q(e.output,e.message,i,r),n=`${s?`${a("gray",v)}
61
+ `:""}${o}
62
+ `;switch(this.state){case"submit":{let u=s?`${a("gray",v)} `:"",l=Q(e.output,t(this.options[this.cursor],"selected"),u);return`${n}${l}`}case"cancel":{let u=s?`${a("gray",v)} `:"",l=Q(e.output,t(this.options[this.cursor],"cancelled"),u);return`${n}${l}${s?`
63
+ ${a("gray",v)}`:""}`}default:{let u=s?`${a("cyan",v)} `:"",l=s?a("cyan",ee):"",h=n.split(`
64
+ `).length,m=s?2:1;return`${n}${u}${He({output:e.output,cursor:this.cursor,options:this.options,maxItems:e.maxItems,columnPadding:u.length,rowPadding:h+m,style:(p,g)=>t(p,p.disabled?"disabled":g?"active":"inactive")}).join(`
65
+ ${u}`)}
66
+ ${l}
67
+ `}}}}).prompt()};var hi=`${a("gray",v)} `;var xe=e=>new ve({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,output:e.output,signal:e.signal,input:e.input,render(){let t=e?.withGuide??N.withGuide,s=`${`${t?`${a("gray",v)}
68
+ `:""}${Ee(this.state)} `}${e.message}
69
+ `,r=e.placeholder?a("inverse",e.placeholder[0])+a("dim",e.placeholder.slice(1)):a(["inverse","hidden"],"_"),i=this.userInput?this.userInputWithCursor:r,o=this.value??"";switch(this.state){case"error":{let n=this.error?` ${a("yellow",this.error)}`:"",u=t?`${a("yellow",v)} `:"",l=t?a("yellow",ee):"";return`${s.trim()}
70
+ ${u}${i}
71
+ ${l}${n}
72
+ `}case"submit":{let n=o?` ${a("dim",o)}`:"",u=t?a("gray",v):"";return`${s}${u}${n}`}case"cancel":{let n=o?` ${a(["strikethrough","dim"],o)}`:"",u=t?a("gray",v):"";return`${s}${u}${n}${o.trim()?`
73
+ ${u}`:""}`}default:{let n=t?`${a("cyan",v)} `:"",u=t?a("cyan",ee):"";return`${s}${n}${i}
74
+ ${u}
75
+ `}}}}).prompt();import{spawnSync as Gt}from"child_process";import{existsSync as Js,readFileSync as Qs,writeFileSync as gi,mkdirSync as fi}from"fs";import Zs from"os";import Dt from"path";var Xs=Dt.join(Zs.homedir(),".eazy-git"),Pt=Dt.join(Xs,"config.json"),Nt={language:"es",defaultBaseBranch:"release",aiProvider:"claude"};function he(){try{if(Js(Pt)){let e=Qs(Pt,"utf-8");return{...Nt,...JSON.parse(e)}}}catch{}return{...Nt}}var Bt={welcome:"Bienvenido a",subtitle:"tu CLI de confianza para gestionar ramas en GIT",operationCompleted:"Operacion completada!",operationCancelled:"Operacion cancelada. Saliendo...",unknownCommand:"Comando desconocido",errorExecuting:"Error al ejecutar el comando",version:"eazy-git version",whatToDo:"Que deseas hacer?",addChanges:"Agregar cambios a una rama",createOriginal:"Crear rama original",createTemporal:"Crear rama temporal",notGitRepo:"Este directorio no es un repositorio git",gitNotInstalled:"git no esta instalado en el sistema",currentBranch:"Branch actual",filesChanged:"Archivos con cambios",noChangesPending:"No hay cambios pendientes. Deseas continuar de todas formas?",updatingRefs:"Actualizando referencias remotas...",refsUpdated:"Referencias actualizadas",fetchFailed:"No se pudo hacer fetch (continuando...)",baseBranch:"Desde que branch base quieres crear la rama?",baseBranchRequired:"El branch base es requerido",ticketId:"Cual es el identificador del ticket? (ej: DPW-0000)",ticketRequired:"El ticket es requerido",changeType:"Que tipo de cambio es?",branchExistsLocal:e=>`La rama "${e}" ya existe localmente. Que deseas hacer?`,switchToIt:"Cambiarme a ella y continuar",cancel:"Cancelar",cancelledOp:"Operacion cancelada.",creatingBranch:(e,t)=>`Creando rama ${e} desde origin/${t}...`,branchCreated:e=>`Rama ${e} creada`,errorCreatingBranch:e=>`Error al crear la rama: ${e}`,noFilesToStage:"No hay archivos para stagear.",selectFiles:"Cuales archivos quieres incluir en el commit?",selectAllFiles:"Seleccionar todos los archivos",stagedFiles:"Archivos en stage",stagedCorrect:"Los archivos en stage son correctos?",aiProvider:"Con que IA quieres generar la sugerencia de commit?",generatingCommit:e=>`Generando sugerencia de commit con ${e}...`,aiSuggestionFailed:e=>`No se pudo obtener sugerencia de ${e}. Escribe el mensaje manualmente.`,writeCommitMsg:"Escribe el mensaje de commit:",commitMsgRequired:"El mensaje es requerido",suggestionOf:e=>`Sugerencia de ${e}`,useThisCommit:"Este mensaje de commit te parece bien?",yesUseIt:"Si, usar este",modify:"Modificar",commitSuccess:"Commit realizado correctamente",hookBlocked:"El pre-commit hook bloqueo el commit. Que deseas hacer?",retryHook:"Ya lo corregi, agrega los cambios y vuelve a intentarlo",skipHook:"Saltar el hook (--no-verify)",commitNoHooks:"Commit realizado (sin hooks)",pushToRemote:"Deseas subir la rama al repositorio remoto?",pushSuccess:"Push realizado",pushForceQuestion:"La rama ya existe en el remoto con historial diferente. Deseas forzar el push? (git push -f)",pushForceSuccess:"Push forzado realizado",pushForceError:e=>`Error en el push forzado: ${e}`,pushError:e=>`Error en el push: ${e}`,summaryTitle:"Resumen",summaryBranch:"Rama",summaryFrom:"Desde",summaryCommit:"Commit",summaryFiles:e=>`${e} archivos commiteados`,summaryPush:"Push",summaryPR:"Crear PR",statusModified:"modificado",statusAdded:"agregado",statusDeleted:"eliminado",statusRenamed:"renombrado",statusUntracked:"sin rastrear",commitTypes:{fix:"fix \u2014 correccion de bug",feat:"feat \u2014 nueva funcionalidad",refactor:"refactor \u2014 mejora sin cambio funcional",chore:"chore \u2014 mantenimiento, dependencias",docs:"docs \u2014 documentacion",test:"test \u2014 pruebas",ci:"ci \u2014 integracion continua",perf:"perf \u2014 rendimiento",style:"style \u2014 formato, sin cambio de logica"},selectBranchType:"Selecciona el tipo de rama:",branchFix:"Fix",branchImprovement:"Mejora",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creando rama original...",branchCreatedAndPushed:e=>`Rama "${e}" creada y pusheada correctamente!`,branchCreatedSuccess:e=>`Rama "${e}" creada correctamente!`,mergeBranchQuestion:"A que rama deseas hacer merge?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Rama temporal creada correctamente",temporalBranchMerged:"Rama temporal mergeada correctamente",conflictsDetected:"Conflictos detectados. Resolvelos manualmente!",branchPushedToRemote:"Rama pusheada al repositorio remoto",removeTemporalBranch:"Deseas eliminar la rama temporal?",temporalBranchDeleted:"Rama temporal eliminada correctamente",errorCreatingTemporal:"Error creando la rama temporal",enterJiraCode:"Ingresa el codigo del ticket JIRA:",jiraRequired:"El codigo JIRA es requerido!",jiraInvalidFormat:"El codigo JIRA debe tener el formato DPW-0000",fetchingRemote:"Obteniendo cambios remotos...",pullingChanges:"Aplicando cambios en tu rama...",pullError:e=>`Error: ${e}`,pushingChanges:"Subiendo cambios al remoto...",pushedSuccess:"Cambios subidos correctamente!",pushedForceSuccess:"Cambios subidos (forzado) correctamente!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Proporciona un mensaje de commit",stagingChanges:"Stageando cambios...",creatingCommit:"Creando commit...",commitCreated:"Commit creado correctamente!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Cambiando a la rama anterior...",switchedTo:e=>`Cambiado a rama ${e} correctamente!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Obteniendo ultimos cambios...",mergingWith:e=>`Mergeando con ${e}...`,pushingMerged:"Subiendo cambios mergeados...",mergeCompleted:"Merge completado correctamente!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Eliminando ultimo commit...",removeLastConfirm:"Esto eliminara el ultimo commit (los cambios se mantienen en staging). Continuar?",lastCommitRemoved:e=>`commit ${e} eliminado correctamente`,removedCommitDetail:"Detalle del commit",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Configurando tu entorno",configSaved:"Configuracion guardada",missingConfigValues:"Faltan valores de configuracion requeridos.",errorWritingConfig:"Error escribiendo archivo de configuracion:",currentConfig:"Configuracion actual",useThisConfig:"Deseas usar esta configuracion?",installingDeps:"Instalando dependencias...",depsInstalled:"Todas las dependencias fueron instaladas",authFailed:"Autenticacion fallida",unexpectedError:"Ocurrio un error inesperado",enterEndpoint:"Ingresa la URL del endpoint:",urlRequired:"La URL es requerida!",urlMustBeHttp:"La URL debe usar protocolo HTTP/HTTPS",urlMustHaveHost:"La URL debe incluir un hostname",urlInvalid:"Ingresa una URL valida",enterApiKey:"Ingresa tu apikey:",apiKeyRequired:"El API key es requerido!",enterRegistryName:"Ingresa el nombre del registro NPM (sin caracteres especiales):",registryNameRequired:"El nombre del registro es requerido!",registryNameLettersOnly:"El nombre del registro debe contener solo letras",enterRegistryURL:"Ingresa la URL del registro NPM (sin http/https):",registryURLRequired:"La URL del registro es requerida!",registryURLStartWithName:"La URL debe empezar con un nombre, evita caracteres especiales",registryURLNoProtocol:"La URL no debe incluir protocolo 'http/https' y debe empezar con una letra",registryURLNoSlash:"La URL no debe empezar con '/' y debe empezar con una letra o numero",registryURLNoWWW:"La URL no debe empezar con 'www' y debe empezar con una letra o numero",currentVersionLabel:"Version actual",checkingUpdates:"Buscando actualizaciones...",upgradeCheckFailed:"No se pudo verificar la ultima version",alreadyLatest:e=>`Ya tienes la ultima version (${e})`,upgrading:e=>`Actualizando a v${e}...`,upgradeError:"Error al actualizar eazy-git",upgradeSuccess:e=>`eazy-git actualizado a v${e}!`,languageSelect:"Selecciona el idioma de la interfaz:",languageChanged:e=>`Idioma cambiado a: ${e}`,configMenu:"Que deseas configurar?",configLanguage:"Cambiar idioma",configDefaultBranch:"Rama base por defecto",configAIProvider:"Proveedor de IA por defecto",configView:"Ver configuracion actual",defaultBranchSet:e=>`Rama base por defecto: ${e}`,aiProviderSet:e=>`Proveedor de IA por defecto: ${e}`,goBack:"Volver"};var Vt={welcome:"Welcome to",subtitle:"your trusted CLI for GIT branch management",operationCompleted:"Operation completed!",operationCancelled:"Operation cancelled. Exiting...",unknownCommand:"Unknown command",errorExecuting:"Error executing command",version:"eazy-git version",whatToDo:"What would you like to do?",addChanges:"Add Changes to Branch",createOriginal:"Create Original Branch",createTemporal:"Create Temporal Branch",notGitRepo:"This directory is not a git repository",gitNotInstalled:"git is not installed on the system",currentBranch:"Current branch",filesChanged:"Files with changes",noChangesPending:"No pending changes. Do you want to continue anyway?",updatingRefs:"Updating remote references...",refsUpdated:"References updated",fetchFailed:"Could not fetch (continuing...)",baseBranch:"From which base branch do you want to create the branch?",baseBranchRequired:"Base branch is required",ticketId:"What is the ticket identifier? (e.g.: DPW-0000)",ticketRequired:"Ticket is required",changeType:"What type of change is this?",branchExistsLocal:e=>`Branch "${e}" already exists locally. What would you like to do?`,switchToIt:"Switch to it and continue",cancel:"Cancel",cancelledOp:"Operation cancelled.",creatingBranch:(e,t)=>`Creating branch ${e} from origin/${t}...`,branchCreated:e=>`Branch ${e} created`,errorCreatingBranch:e=>`Error creating branch: ${e}`,noFilesToStage:"No files to stage.",selectFiles:"Which files do you want to include in the commit?",selectAllFiles:"Select all files",stagedFiles:"Staged files",stagedCorrect:"Are the staged files correct?",aiProvider:"Which AI do you want to use for the commit suggestion?",generatingCommit:e=>`Generating commit suggestion with ${e}...`,aiSuggestionFailed:e=>`Could not get suggestion from ${e}. Write the message manually.`,writeCommitMsg:"Write the commit message:",commitMsgRequired:"Message is required",suggestionOf:e=>`${e} suggestion`,useThisCommit:"Does this commit message look good?",yesUseIt:"Yes, use it",modify:"Modify",commitSuccess:"Commit created successfully",hookBlocked:"The pre-commit hook blocked the commit. What would you like to do?",retryHook:"I fixed it, re-stage and retry",skipHook:"Skip the hook (--no-verify)",commitNoHooks:"Commit created (without hooks)",pushToRemote:"Do you want to push the branch to the remote repository?",pushSuccess:"Push completed",pushForceQuestion:"The branch already exists on remote with different history. Force push? (git push -f)",pushForceSuccess:"Force push completed",pushForceError:e=>`Error in force push: ${e}`,pushError:e=>`Error in push: ${e}`,summaryTitle:"Summary",summaryBranch:"Branch",summaryFrom:"From",summaryCommit:"Commit",summaryFiles:e=>`${e} files committed`,summaryPush:"Push",summaryPR:"Create PR",statusModified:"modified",statusAdded:"added",statusDeleted:"deleted",statusRenamed:"renamed",statusUntracked:"untracked",commitTypes:{fix:"fix - bug fix",feat:"feat - new feature",refactor:"refactor - improvement without functional change",chore:"chore - maintenance, dependencies",docs:"docs - documentation",test:"test - testing",ci:"ci - continuous integration",perf:"perf - performance",style:"style - formatting, no logic change"},selectBranchType:"Select the branch type:",branchFix:"Fix",branchImprovement:"Improvement",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creating original branch...",branchCreatedAndPushed:e=>`Branch "${e}" created and pushed successfully!`,branchCreatedSuccess:e=>`Branch "${e}" created successfully!`,mergeBranchQuestion:"Which branch do you want to merge into?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Temporal branch created successfully",temporalBranchMerged:"Temporal branch merged successfully",conflictsDetected:"Conflicts detected. Please resolve them manually!",branchPushedToRemote:"Branch pushed to remote repository",removeTemporalBranch:"Do you want to remove the temporal branch?",temporalBranchDeleted:"Temporal branch deleted successfully",errorCreatingTemporal:"Error creating the temporal branch",enterJiraCode:"Enter the JIRA ticket code:",jiraRequired:"JIRA code is required!",jiraInvalidFormat:"JIRA code must have the format DPW-0000",fetchingRemote:"Fetching remote changes...",pullingChanges:"Pulling changes into your branch...",pullError:e=>`Error: ${e}`,pushingChanges:"Pushing changes to remote...",pushedSuccess:"Changes pushed successfully!",pushedForceSuccess:"Changes pushed (force) successfully!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Please provide a commit message",stagingChanges:"Staging changes...",creatingCommit:"Creating commit...",commitCreated:"Commit created successfully!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Switching to previous branch...",switchedTo:e=>`Successfully switched to ${e} branch!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Fetching latest changes...",mergingWith:e=>`Merging with ${e}...`,pushingMerged:"Pushing merged changes...",mergeCompleted:"Merge completed successfully!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Removing last commit...",removeLastConfirm:"This will remove the last commit (changes will remain in staging). Continue?",lastCommitRemoved:e=>`commit ${e} removed successfully`,removedCommitDetail:"Commit detail",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Setting up your configuration",configSaved:"Configuration saved",missingConfigValues:"Missing required configuration values.",errorWritingConfig:"Error writing configuration file:",currentConfig:"Current configuration",useThisConfig:"Would you like to use this configuration?",installingDeps:"Installing dependencies...",depsInstalled:"All dependencies were installed",authFailed:"Authentication failed",unexpectedError:"An unexpected error occurred",enterEndpoint:"Enter your endpoint URL:",urlRequired:"URL is required!",urlMustBeHttp:"URL must use HTTP/HTTPS protocol",urlMustHaveHost:"URL must include a hostname",urlInvalid:"Please enter a valid URL",enterApiKey:"Enter your apikey:",apiKeyRequired:"API key is required!",enterRegistryName:"Enter your NPM registry name (without special characters):",registryNameRequired:"Registry name is required!",registryNameLettersOnly:"Registry name must contain only letters",enterRegistryURL:"Enter your NPM registry URL (without http/https):",registryURLRequired:"Registry URL is required!",registryURLStartWithName:"URL must start with a name only, avoid special characters",registryURLNoProtocol:"URL must not include 'http/https' protocol and must start with a letter",registryURLNoSlash:"URL must not start with '/' and must begin with a letter or number",registryURLNoWWW:"URL must not start with 'www' and must begin with a letter or number",currentVersionLabel:"Current version",checkingUpdates:"Checking for updates...",upgradeCheckFailed:"Could not check the latest version",alreadyLatest:e=>`Already on the latest version (${e})`,upgrading:e=>`Upgrading to v${e}...`,upgradeError:"Error upgrading eazy-git",upgradeSuccess:e=>`eazy-git upgraded to v${e}!`,languageSelect:"Select the interface language:",languageChanged:e=>`Language changed to: ${e}`,configMenu:"What would you like to configure?",configLanguage:"Change language",configDefaultBranch:"Default base branch",configAIProvider:"Default AI provider",configView:"View current configuration",defaultBranchSet:e=>`Default base branch: ${e}`,aiProviderSet:e=>`Default AI provider: ${e}`,goBack:"Go back"};var Re={es:Bt,en:Vt};function c(e,...t){let r=he().language||"es",o=(Re[r]||Re.es)[e];return typeof o=="function"?o(...t):o||e}function Ut(){let t=he().language||"es";return(Re[t]||Re.es).commitTypes}function ze(){if(d.step(c("fetchingRemote")),Gt("git",["fetch"],{stdio:"inherit"}).status!==0){d.error(c("pullError","fetch failed"));return}d.step(c("pullingChanges")),Gt("git",["pull","origin","HEAD"],{stdio:"inherit"}).status!==0&&d.error(c("pullError","pull failed"))}import{spawnSync as er}from"child_process";function Ke(e){let t=e.includes("-f")||e.includes("--force")||e.includes("-force");d.step(c("pushingChanges")),er("git",t?["push","-f","origin","HEAD"]:["push","origin","HEAD"],{stdio:"inherit"}).status===0?d.success(t?c("pushedForceSuccess"):c("pushedSuccess")):d.error(c("pushQuickError","push failed"))}import{execSync as Te,spawnSync as tr}from"child_process";function sr(e){let t=new Date(e),s=t.getFullYear(),r=t.toLocaleString("en",{month:"long"}),i=t.getDate(),o=t.toLocaleString("en",{weekday:"long"}),n=t.getHours(),u=String(t.getMinutes()).padStart(2,"0"),l=String(t.getSeconds()).padStart(2,"0"),h=n>=12?"PM":"AM",p=`${n%12||12}:${u}:${l} ${h}`,g=Intl.DateTimeFormat(void 0,{timeZoneName:"long"}).formatToParts(t).find(y=>y.type==="timeZoneName")?.value??"";return`${s} de ${r} ${i} (${o}) | ${p} | ${g}`}function Ye(){let e=Te("git rev-parse HEAD",{encoding:"utf-8"}).trim(),t=Te('git log -1 --format="%an <%ae>"',{encoding:"utf-8"}).trim(),s=Te('git log -1 --format="%ai"',{encoding:"utf-8"}).trim(),r=Te('git log -1 --format="%s"',{encoding:"utf-8"}).trim();if(d.step(c("removingLastCommit")),tr("git",["reset","--soft","HEAD~1"],{stdio:"inherit"}).status===0){d.success(c("lastCommitRemoved",e));let o=[`Author: ${t}`,`Date: ${sr(s)}`,"",` ${r}`].join(`
76
+ `);le(o,c("removedCommitDetail"))}else d.error(c("removeLastError","reset failed"))}import{spawnSync as Je}from"child_process";function Qe(e){let t=e[0]??"develop";if(d.step(c("fetchingLatest")),Je("git",["fetch"],{stdio:"inherit"}),d.step(c("mergingWith",t)),Je("git",["merge",`origin/${t}`],{stdio:"inherit"}).status!==0){d.error(c("mergeError","merge failed"));return}d.step(c("pushingMerged")),Je("git",["push","origin","HEAD"],{stdio:"inherit"}).status===0?d.success(c("mergeCompleted")):d.error(c("mergeError","push failed"))}import{execSync as Fe,spawnSync as Z,spawn as yr}from"child_process";function q(e){if(be(e))return Ot(c("operationCancelled")),process.exit(0)}var jt=(e=0)=>t=>`\x1B[${t+e}m`,Wt=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,qt=(e=0)=>(t,s,r)=>`\x1B[${38+e};2;${t};${s};${r}m`,R={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},qi=Object.keys(R.modifier),rr=Object.keys(R.color),ir=Object.keys(R.bgColor),Hi=[...rr,...ir];function or(){let e=new Map;for(let[t,s]of Object.entries(R)){for(let[r,i]of Object.entries(s))R[r]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},s[r]=R[r],e.set(i[0],i[1]);Object.defineProperty(R,t,{value:s,enumerable:!1})}return Object.defineProperty(R,"codes",{value:e,enumerable:!1}),R.color.close="\x1B[39m",R.bgColor.close="\x1B[49m",R.color.ansi=jt(),R.color.ansi256=Wt(),R.color.ansi16m=qt(),R.bgColor.ansi=jt(10),R.bgColor.ansi256=Wt(10),R.bgColor.ansi16m=qt(10),Object.defineProperties(R,{rgbToAnsi256:{value(t,s,r){return t===s&&s===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(s/255*5)+Math.round(r/255*5)},enumerable:!1},hexToRgb:{value(t){let s=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!s)return[0,0,0];let[r]=s;r.length===3&&(r=[...r].map(o=>o+o).join(""));let i=Number.parseInt(r,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>R.rgbToAnsi256(...R.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let s,r,i;if(t>=232)s=((t-232)*10+8)/255,r=s,i=s;else{t-=16;let u=t%36;s=Math.floor(t/36)/5,r=Math.floor(u/6)/5,i=u%6/5}let o=Math.max(s,r,i)*2;if(o===0)return 30;let n=30+(Math.round(i)<<2|Math.round(r)<<1|Math.round(s));return o===2&&(n+=60),n},enumerable:!1},rgbToAnsi:{value:(t,s,r)=>R.ansi256ToAnsi(R.rgbToAnsi256(t,s,r)),enumerable:!1},hexToAnsi:{value:t=>R.ansi256ToAnsi(R.hexToAnsi256(t)),enumerable:!1}}),R}var nr=or(),H=nr;import Ze from"node:process";import ar from"node:os";import Ht from"node:tty";function j(e,t=globalThis.Deno?globalThis.Deno.args:Ze.argv){let s=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(s+e),i=t.indexOf("--");return r!==-1&&(i===-1||r<i)}var{env:_}=Ze,_e;j("no-color")||j("no-colors")||j("color=false")||j("color=never")?_e=0:(j("color")||j("colors")||j("color=true")||j("color=always"))&&(_e=1);function ur(){if("FORCE_COLOR"in _)return _.FORCE_COLOR==="true"?1:_.FORCE_COLOR==="false"?0:_.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(_.FORCE_COLOR,10),3)}function lr(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function cr(e,{streamIsTTY:t,sniffFlags:s=!0}={}){let r=ur();r!==void 0&&(_e=r);let i=s?_e:r;if(i===0)return 0;if(s){if(j("color=16m")||j("color=full")||j("color=truecolor"))return 3;if(j("color=256"))return 2}if("TF_BUILD"in _&&"AGENT_NAME"in _)return 1;if(e&&!t&&i===void 0)return 0;let o=i||0;if(_.TERM==="dumb")return o;if(Ze.platform==="win32"){let n=ar.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in _)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(n=>n in _)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(n=>n in _)||_.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in _)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(_.TEAMCITY_VERSION)?1:0;if(_.COLORTERM==="truecolor"||_.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in _){let n=Number.parseInt((_.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(_.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(_.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(_.TERM)||"COLORTERM"in _?1:o}function zt(e,t={}){let s=cr(e,{streamIsTTY:e&&e.isTTY,...t});return lr(s)}var hr={stdout:zt({isTTY:Ht.isatty(1)}),stderr:zt({isTTY:Ht.isatty(2)})},Kt=hr;function Yt(e,t,s){let r=e.indexOf(t);if(r===-1)return e;let i=t.length,o=0,n="";do n+=e.slice(o,r)+t+s,o=r+i,r=e.indexOf(t,o);while(r!==-1);return n+=e.slice(o),n}function Jt(e,t,s,r){let i=0,o="";do{let n=e[r-1]==="\r";o+=e.slice(i,n?r-1:r)+t+(n?`\r
77
+ `:`
78
+ `)+s,i=r+1,r=e.indexOf(`
79
+ `,i)}while(r!==-1);return o+=e.slice(i),o}var{stdout:Qt,stderr:Zt}=Kt,Xe=Symbol("GENERATOR"),re=Symbol("STYLER"),de=Symbol("IS_EMPTY"),Xt=["ansi","ansi","ansi256","ansi16m"],ie=Object.create(null),dr=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let s=Qt?Qt.level:0;e.level=t.level===void 0?s:t.level};var mr=e=>{let t=(...s)=>s.join(" ");return dr(t,e),Object.setPrototypeOf(t,me.prototype),t};function me(e){return mr(e)}Object.setPrototypeOf(me.prototype,Function.prototype);for(let[e,t]of Object.entries(H))ie[e]={get(){let s=Me(this,tt(t.open,t.close,this[re]),this[de]);return Object.defineProperty(this,e,{value:s}),s}};ie.visible={get(){let e=Me(this,this[re],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var et=(e,t,s,...r)=>e==="rgb"?t==="ansi16m"?H[s].ansi16m(...r):t==="ansi256"?H[s].ansi256(H.rgbToAnsi256(...r)):H[s].ansi(H.rgbToAnsi(...r)):e==="hex"?et("rgb",t,s,...H.hexToRgb(...r)):H[s][e](...r),pr=["rgb","hex","ansi256"];for(let e of pr){ie[e]={get(){let{level:s}=this;return function(...r){let i=tt(et(e,Xt[s],"color",...r),H.color.close,this[re]);return Me(this,i,this[de])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);ie[t]={get(){let{level:s}=this;return function(...r){let i=tt(et(e,Xt[s],"bgColor",...r),H.bgColor.close,this[re]);return Me(this,i,this[de])}}}}var gr=Object.defineProperties(()=>{},{...ie,level:{enumerable:!0,get(){return this[Xe].level},set(e){this[Xe].level=e}}}),tt=(e,t,s)=>{let r,i;return s===void 0?(r=e,i=t):(r=s.openAll+e,i=t+s.closeAll),{open:e,close:t,openAll:r,closeAll:i,parent:s}},Me=(e,t,s)=>{let r=(...i)=>fr(r,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(r,gr),r[Xe]=e,r[re]=t,r[de]=s,r},fr=(e,t)=>{if(e.level<=0||!t)return e[de]?"":t;let s=e[re];if(s===void 0)return t;let{openAll:r,closeAll:i}=s;if(t.includes("\x1B"))for(;s!==void 0;)t=Yt(t,s.close,s.open),s=s.parent;let o=t.indexOf(`
80
+ `);return o!==-1&&(t=Jt(t,i,r,o)),r+t+i};Object.defineProperties(me.prototype,ie);var $r=me(),so=me({level:Zt?Zt.level:0});var te=$r;var oe={primary:"#57d7c4",secondary:"#199288",muted:"#9ca3af",success:"#06D6A0",error:"#EF4444",warning:"#F59E0B"},K={primary:e=>te.hex(oe.primary)(e),secondary:e=>te.hex(oe.secondary)(e),muted:e=>te.hex(oe.muted)(e),success:e=>te.hex(oe.success)(e),error:e=>te.hex(oe.error)(e),warning:e=>te.hex(oe.warning)(e)};function es(e){let t=e.match(/^[MADRCU? ]{2}\s+(.+)$/),s=t?t[1]:e.replace(/^[MADRCU? ]+\s+/,"");return s.includes(" -> ")?s.split(" -> ")[1].trim():s.trim()}function ts(){let e=Fe("git status --short",{encoding:"utf-8"}).trim();return e?e.split(`
81
+ `):[]}function vr(e){let t=e[0];t||(d.error(c("provideCommitMsg")),process.exit(1)),d.step(c("stagingChanges")),Z("git",["add","."],{stdio:"inherit"}),d.step(c("creatingCommit")),Z("git",["commit","-m",t],{stdio:"inherit"}).status===0?d.success(c("commitCreated")):d.error(c("commitError","commit failed"))}async function br(){let e=he(),t=Ut(),s=Object.entries(t).map(([$,b])=>({value:$,label:b})),r={M:c("statusModified"),A:c("statusAdded"),D:c("statusDeleted"),R:c("statusRenamed"),"??":c("statusUntracked")},i=Fe("git rev-parse --abbrev-ref HEAD",{encoding:"utf-8"}).trim(),o=ts();if(d.info(`${c("currentBranch")}: ${i}`),d.info(`${c("filesChanged")}: ${o.length}`),o.length===0){d.warn(c("noFilesToStage"));return}let n=await xe({message:K.secondary(c("ticketId")),placeholder:"DPW-0000"});q(n);let u=n?.trim(),l=await ce({message:K.secondary(c("changeType")),options:s});q(l);let h=Lt(),m=!1;for(;!m;){let $=ts();if($.length===0){d.warn(c("noFilesToStage"));return}let b="__select_all__",x=$.map(S=>{let k=S.slice(0,2).trim(),U=es(S),W=r[k]??k;return{value:S,label:U,hint:W}}),F=await kt({message:K.secondary(c("selectFiles")),options:[{value:b,label:K.primary(c("selectAllFiles"))},...x],required:!0});q(F);let E=F.includes(b)?$:F;Z("git",["restore","--staged","."],{encoding:"utf-8"});for(let S of E){let k=es(S),U=Z("git",["add","--",k],{encoding:"utf-8"});U.status!==0&&d.error(`git add failed for ${k}: ${U.stderr}`)}let se=Fe("git status --short",{encoding:"utf-8"}).trim();le(se,c("stagedFiles"));let Y=await At({message:c("stagedCorrect")});q(Y),m=Y,m||Z("git",["restore","--staged","."],{encoding:"utf-8"})}let p=Fe("git diff --cached",{encoding:"utf-8"}),y=`Analiza el siguiente git diff y sugiere UN SOLO mensaje de commit en formato convencional.
82
+
83
+ Formato requerido: ${u?`${l}(${n.trim()}): description in english`:`${l}: description in english`}
84
+ Reglas:
85
+ - Maximo 72 caracteres en total
86
+ - Verbo en presente ("add", "fix", "update", NO "added", "fixed")
87
+ - Sin punto final
88
+ - En ingles
89
+ - Responde UNICAMENTE con el mensaje de commit, sin explicaciones, sin comillas, sin markdown
90
+
91
+ Git diff:
92
+ ${p}`,f=await ce({message:K.secondary(c("aiProvider")),options:[{value:"claude",label:"Claude"},{value:"opencode",label:"Opencode"}],initialValue:e.aiProvider});q(f);let C={claude:{binary:"claude",args:["-p",y],label:"Claude"},opencode:{binary:"opencode",args:["run",y],label:"Opencode"}},{binary:A,args:L,label:D}=C[f],V=u?`${l}(${n.trim()}): `:`${l}: `;h.start(c("generatingCommit",D));let O=await new Promise($=>{let b="",x="",F=yr(A,L,{stdio:["ignore","pipe","pipe"]});F.stdout.on("data",E=>{b+=E}),F.stderr.on("data",E=>{x+=E}),F.on("close",E=>$({status:E,stdout:b,stderr:x,error:null})),F.on("error",E=>$({status:1,stdout:"",stderr:"",error:E}))});h.stop("");let w;if(O.error||O.status!==0){d.warn(c("aiSuggestionFailed",D));let $=await xe({message:K.secondary(c("writeCommitMsg")),initialValue:V,validate:b=>b?.trim()?void 0:c("commitMsgRequired")});q($),w=$}else{let $=O.stdout.trim();le($,c("suggestionOf",D));let b=await ce({message:K.secondary(c("useThisCommit")),options:[{value:"yes",label:c("yesUseIt")},{value:"modify",label:c("modify")}]});if(q(b),b==="yes")w=$;else{let x=await xe({message:K.secondary(c("writeCommitMsg")),initialValue:$,validate:F=>F?.trim()?void 0:c("commitMsgRequired")});q(x),w=x}}let M=!1;for(;!M;)if(Z("git",["commit","-m",w],{stdio:"inherit"}).status===0)d.success(c("commitSuccess")),M=!0;else{let b=await ce({message:K.secondary(c("hookBlocked")),options:[{value:"retry",label:c("retryHook")},{value:"noverify",label:c("skipHook")},{value:"cancel",label:c("cancel")}]});if(q(b),b==="cancel")return;b==="noverify"&&(Z("git",["commit","--no-verify","-m",w],{stdio:"inherit"}),d.success(c("commitNoHooks")),M=!0),b==="retry"&&Z("git",["add","-u"],{stdio:"inherit"})}}async function st(e){e.length>0?vr(e):await br()}import{spawnSync as wr}from"child_process";function rt(){wr("git",["log"],{stdio:"inherit"}).status!==0&&(d.error(c("logError","git log failed")),process.exit(1))}import{spawnSync as Cr}from"child_process";function Ae(e){let t=e[0]||"-",s=t==="-";s&&d.step(c("switchingPrevBranch")),Cr("git",["checkout",t],{stdio:"inherit"}).status===0?d.success(c("switchedTo",s?"previous":t)):(d.error(c("checkoutError","checkout failed")),process.exit(1))}import{existsSync as Sr}from"fs";import{join as Ir}from"path";import{execSync as Er}from"child_process";var xr=()=>{try{Er("git --version",{stdio:"ignore"})}catch{d.error(c("gitNotInstalled")),process.exit(1)}let e=Ir(process.cwd(),".git");Sr(e)||(d.error(c("notGitRepo")),process.exit(1))},ss=xr;ss();var rs=process.argv[1].split("/").pop(),Oe=process.argv.slice(2),Rr={pull:ze,push:()=>Ke(Oe),removelast:Ye,mergewith:()=>Qe(Oe),commit:()=>st(Oe),checkout:()=>Ae(Oe),back:()=>Ae("-"),log:rt};async function Tr(){try{let e=Rr[rs];e||(d.error(`${c("unknownCommand")}: ${rs}`),process.exit(1)),await e(),process.exit(0)}catch(e){d.error(`${c("errorExecuting")}: ${e.message}`),process.exit(1)}}Tr();
package/dist/index.js CHANGED
@@ -161,7 +161,7 @@ ${c}${a}
161
161
  `}case"submit":{let a=o?` ${n("dim",o)}`:"",u=t?n("gray",f):"";return`${r}${u}${a}`}case"cancel":{let a=o?` ${n(["strikethrough","dim"],o)}`:"",u=t?n("gray",f):"";return`${r}${u}${a}${o.trim()?`
162
162
  ${u}`:""}`}default:{let a=t?`${n("cyan",f)} `:"",u=t?n("cyan",V):"";return`${r}${a}${i}
163
163
  ${u}
164
- `}}}}).prompt()});Y();Y();import{spawnSync as ss}from"child_process";Y();Y();import{existsSync as Lr,readFileSync as Ci,writeFileSync as Ii,mkdirSync as Si}from"fs";import Ei from"os";import Pr from"path";var Dt=Pr.join(Ei.homedir(),".eazy-git"),Vt=Pr.join(Dt,"config.json"),Br={language:"es",defaultBaseBranch:"release",aiProvider:"claude"};function Q(){try{if(Lr(Vt)){let e=Ci(Vt,"utf-8");return{...Br,...JSON.parse(e)}}}catch{}return{...Br}}function et(e){let r={...Q(),...e};return Lr(Dt)||Si(Dt,{recursive:!0}),Ii(Vt,JSON.stringify(r,null,2)),r}var Nr={welcome:"Bienvenido a",subtitle:"tu CLI de confianza para gestionar ramas en GIT",operationCompleted:"Operacion completada!",operationCancelled:"Operacion cancelada. Saliendo...",unknownCommand:"Comando desconocido",errorExecuting:"Error al ejecutar el comando",version:"eazy-git version",whatToDo:"Que deseas hacer?",addChanges:"Agregar cambios a una rama",createOriginal:"Crear rama original",createTemporal:"Crear rama temporal",notGitRepo:"Este directorio no es un repositorio git",gitNotInstalled:"git no esta instalado en el sistema",currentBranch:"Branch actual",filesChanged:"Archivos con cambios",noChangesPending:"No hay cambios pendientes. Deseas continuar de todas formas?",updatingRefs:"Actualizando referencias remotas...",refsUpdated:"Referencias actualizadas",fetchFailed:"No se pudo hacer fetch (continuando...)",baseBranch:"Desde que branch base quieres crear la rama?",baseBranchRequired:"El branch base es requerido",ticketId:"Cual es el identificador del ticket? (ej: DPW-0000)",ticketRequired:"El ticket es requerido",changeType:"Que tipo de cambio es?",branchExistsLocal:e=>`La rama "${e}" ya existe localmente. Que deseas hacer?`,switchToIt:"Cambiarme a ella y continuar",cancel:"Cancelar",cancelledOp:"Operacion cancelada.",creatingBranch:(e,t)=>`Creando rama ${e} desde origin/${t}...`,branchCreated:e=>`Rama ${e} creada`,errorCreatingBranch:e=>`Error al crear la rama: ${e}`,noFilesToStage:"No hay archivos para stagear.",selectFiles:"Cuales archivos quieres incluir en el commit?",selectAllFiles:"Seleccionar todos los archivos",stagedFiles:"Archivos en stage",stagedCorrect:"Los archivos en stage son correctos?",aiProvider:"Con que IA quieres generar la sugerencia de commit?",generatingCommit:e=>`Generando sugerencia de commit con ${e}...`,aiSuggestionFailed:e=>`No se pudo obtener sugerencia de ${e}. Escribe el mensaje manualmente.`,writeCommitMsg:"Escribe el mensaje de commit:",commitMsgRequired:"El mensaje es requerido",suggestionOf:e=>`Sugerencia de ${e}`,useThisCommit:"Este mensaje de commit te parece bien?",yesUseIt:"Si, usar este",modify:"Modificar",commitSuccess:"Commit realizado correctamente",hookBlocked:"El pre-commit hook bloqueo el commit. Que deseas hacer?",retryHook:"Ya lo corregi, agrega los cambios y vuelve a intentarlo",skipHook:"Saltar el hook (--no-verify)",commitNoHooks:"Commit realizado (sin hooks)",pushToRemote:"Deseas subir la rama al repositorio remoto?",pushSuccess:"Push realizado",pushForceQuestion:"La rama ya existe en el remoto con historial diferente. Deseas forzar el push? (git push -f)",pushForceSuccess:"Push forzado realizado",pushForceError:e=>`Error en el push forzado: ${e}`,pushError:e=>`Error en el push: ${e}`,summaryTitle:"Resumen",summaryBranch:"Rama",summaryFrom:"Desde",summaryCommit:"Commit",summaryFiles:e=>`${e} archivos commiteados`,summaryPush:"Push",summaryPR:"Crear PR",statusModified:"modificado",statusAdded:"agregado",statusDeleted:"eliminado",statusRenamed:"renombrado",statusUntracked:"sin rastrear",commitTypes:{fix:"fix \u2014 correccion de bug",feat:"feat \u2014 nueva funcionalidad",refactor:"refactor \u2014 mejora sin cambio funcional",chore:"chore \u2014 mantenimiento, dependencias",docs:"docs \u2014 documentacion",test:"test \u2014 pruebas",ci:"ci \u2014 integracion continua",perf:"perf \u2014 rendimiento",style:"style \u2014 formato, sin cambio de logica"},selectBranchType:"Selecciona el tipo de rama:",branchFix:"Fix",branchImprovement:"Mejora",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creando rama original...",branchCreatedAndPushed:e=>`Rama "${e}" creada y pusheada correctamente!`,branchCreatedSuccess:e=>`Rama "${e}" creada correctamente!`,mergeBranchQuestion:"A que rama deseas hacer merge?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Rama temporal creada correctamente",temporalBranchMerged:"Rama temporal mergeada correctamente",conflictsDetected:"Conflictos detectados. Resolvelos manualmente!",branchPushedToRemote:"Rama pusheada al repositorio remoto",removeTemporalBranch:"Deseas eliminar la rama temporal?",temporalBranchDeleted:"Rama temporal eliminada correctamente",errorCreatingTemporal:"Error creando la rama temporal",enterJiraCode:"Ingresa el codigo del ticket JIRA:",jiraRequired:"El codigo JIRA es requerido!",jiraInvalidFormat:"El codigo JIRA debe tener el formato DPW-0000",fetchingRemote:"Obteniendo cambios remotos...",pullingChanges:"Aplicando cambios en tu rama...",pullError:e=>`Error: ${e}`,pushingChanges:"Subiendo cambios al remoto...",pushedSuccess:"Cambios subidos correctamente!",pushedForceSuccess:"Cambios subidos (forzado) correctamente!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Proporciona un mensaje de commit",stagingChanges:"Stageando cambios...",creatingCommit:"Creando commit...",commitCreated:"Commit creado correctamente!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Cambiando a la rama anterior...",switchedTo:e=>`Cambiado a rama ${e} correctamente!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Obteniendo ultimos cambios...",mergingWith:e=>`Mergeando con ${e}...`,pushingMerged:"Subiendo cambios mergeados...",mergeCompleted:"Merge completado correctamente!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Eliminando ultimo commit...",removeLastConfirm:"Esto eliminara el ultimo commit (los cambios se mantienen en staging). Continuar?",lastCommitRemoved:"Ultimo commit eliminado correctamente!",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Configurando tu entorno",configSaved:"Configuracion guardada",missingConfigValues:"Faltan valores de configuracion requeridos.",errorWritingConfig:"Error escribiendo archivo de configuracion:",currentConfig:"Configuracion actual",useThisConfig:"Deseas usar esta configuracion?",installingDeps:"Instalando dependencias...",depsInstalled:"Todas las dependencias fueron instaladas",authFailed:"Autenticacion fallida",unexpectedError:"Ocurrio un error inesperado",enterEndpoint:"Ingresa la URL del endpoint:",urlRequired:"La URL es requerida!",urlMustBeHttp:"La URL debe usar protocolo HTTP/HTTPS",urlMustHaveHost:"La URL debe incluir un hostname",urlInvalid:"Ingresa una URL valida",enterApiKey:"Ingresa tu apikey:",apiKeyRequired:"El API key es requerido!",enterRegistryName:"Ingresa el nombre del registro NPM (sin caracteres especiales):",registryNameRequired:"El nombre del registro es requerido!",registryNameLettersOnly:"El nombre del registro debe contener solo letras",enterRegistryURL:"Ingresa la URL del registro NPM (sin http/https):",registryURLRequired:"La URL del registro es requerida!",registryURLStartWithName:"La URL debe empezar con un nombre, evita caracteres especiales",registryURLNoProtocol:"La URL no debe incluir protocolo 'http/https' y debe empezar con una letra",registryURLNoSlash:"La URL no debe empezar con '/' y debe empezar con una letra o numero",registryURLNoWWW:"La URL no debe empezar con 'www' y debe empezar con una letra o numero",currentVersionLabel:"Version actual",checkingUpdates:"Buscando actualizaciones...",upgradeCheckFailed:"No se pudo verificar la ultima version",alreadyLatest:e=>`Ya tienes la ultima version (${e})`,upgrading:e=>`Actualizando a v${e}...`,upgradeError:"Error al actualizar eazy-git",upgradeSuccess:e=>`eazy-git actualizado a v${e}!`,languageSelect:"Selecciona el idioma de la interfaz:",languageChanged:e=>`Idioma cambiado a: ${e}`,configMenu:"Que deseas configurar?",configLanguage:"Cambiar idioma",configDefaultBranch:"Rama base por defecto",configAIProvider:"Proveedor de IA por defecto",configView:"Ver configuracion actual",defaultBranchSet:e=>`Rama base por defecto: ${e}`,aiProviderSet:e=>`Proveedor de IA por defecto: ${e}`,goBack:"Volver"};var Dr={welcome:"Welcome to",subtitle:"your trusted CLI for GIT branch management",operationCompleted:"Operation completed!",operationCancelled:"Operation cancelled. Exiting...",unknownCommand:"Unknown command",errorExecuting:"Error executing command",version:"eazy-git version",whatToDo:"What would you like to do?",addChanges:"Add Changes to Branch",createOriginal:"Create Original Branch",createTemporal:"Create Temporal Branch",notGitRepo:"This directory is not a git repository",gitNotInstalled:"git is not installed on the system",currentBranch:"Current branch",filesChanged:"Files with changes",noChangesPending:"No pending changes. Do you want to continue anyway?",updatingRefs:"Updating remote references...",refsUpdated:"References updated",fetchFailed:"Could not fetch (continuing...)",baseBranch:"From which base branch do you want to create the branch?",baseBranchRequired:"Base branch is required",ticketId:"What is the ticket identifier? (e.g.: DPW-0000)",ticketRequired:"Ticket is required",changeType:"What type of change is this?",branchExistsLocal:e=>`Branch "${e}" already exists locally. What would you like to do?`,switchToIt:"Switch to it and continue",cancel:"Cancel",cancelledOp:"Operation cancelled.",creatingBranch:(e,t)=>`Creating branch ${e} from origin/${t}...`,branchCreated:e=>`Branch ${e} created`,errorCreatingBranch:e=>`Error creating branch: ${e}`,noFilesToStage:"No files to stage.",selectFiles:"Which files do you want to include in the commit?",selectAllFiles:"Select all files",stagedFiles:"Staged files",stagedCorrect:"Are the staged files correct?",aiProvider:"Which AI do you want to use for the commit suggestion?",generatingCommit:e=>`Generating commit suggestion with ${e}...`,aiSuggestionFailed:e=>`Could not get suggestion from ${e}. Write the message manually.`,writeCommitMsg:"Write the commit message:",commitMsgRequired:"Message is required",suggestionOf:e=>`${e} suggestion`,useThisCommit:"Does this commit message look good?",yesUseIt:"Yes, use it",modify:"Modify",commitSuccess:"Commit created successfully",hookBlocked:"The pre-commit hook blocked the commit. What would you like to do?",retryHook:"I fixed it, re-stage and retry",skipHook:"Skip the hook (--no-verify)",commitNoHooks:"Commit created (without hooks)",pushToRemote:"Do you want to push the branch to the remote repository?",pushSuccess:"Push completed",pushForceQuestion:"The branch already exists on remote with different history. Force push? (git push -f)",pushForceSuccess:"Force push completed",pushForceError:e=>`Error in force push: ${e}`,pushError:e=>`Error in push: ${e}`,summaryTitle:"Summary",summaryBranch:"Branch",summaryFrom:"From",summaryCommit:"Commit",summaryFiles:e=>`${e} files committed`,summaryPush:"Push",summaryPR:"Create PR",statusModified:"modified",statusAdded:"added",statusDeleted:"deleted",statusRenamed:"renamed",statusUntracked:"untracked",commitTypes:{fix:"fix - bug fix",feat:"feat - new feature",refactor:"refactor - improvement without functional change",chore:"chore - maintenance, dependencies",docs:"docs - documentation",test:"test - testing",ci:"ci - continuous integration",perf:"perf - performance",style:"style - formatting, no logic change"},selectBranchType:"Select the branch type:",branchFix:"Fix",branchImprovement:"Improvement",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creating original branch...",branchCreatedAndPushed:e=>`Branch "${e}" created and pushed successfully!`,branchCreatedSuccess:e=>`Branch "${e}" created successfully!`,mergeBranchQuestion:"Which branch do you want to merge into?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Temporal branch created successfully",temporalBranchMerged:"Temporal branch merged successfully",conflictsDetected:"Conflicts detected. Please resolve them manually!",branchPushedToRemote:"Branch pushed to remote repository",removeTemporalBranch:"Do you want to remove the temporal branch?",temporalBranchDeleted:"Temporal branch deleted successfully",errorCreatingTemporal:"Error creating the temporal branch",enterJiraCode:"Enter the JIRA ticket code:",jiraRequired:"JIRA code is required!",jiraInvalidFormat:"JIRA code must have the format DPW-0000",fetchingRemote:"Fetching remote changes...",pullingChanges:"Pulling changes into your branch...",pullError:e=>`Error: ${e}`,pushingChanges:"Pushing changes to remote...",pushedSuccess:"Changes pushed successfully!",pushedForceSuccess:"Changes pushed (force) successfully!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Please provide a commit message",stagingChanges:"Staging changes...",creatingCommit:"Creating commit...",commitCreated:"Commit created successfully!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Switching to previous branch...",switchedTo:e=>`Successfully switched to ${e} branch!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Fetching latest changes...",mergingWith:e=>`Merging with ${e}...`,pushingMerged:"Pushing merged changes...",mergeCompleted:"Merge completed successfully!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Removing last commit...",removeLastConfirm:"This will remove the last commit (changes will remain in staging). Continue?",lastCommitRemoved:"Last commit removed successfully!",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Setting up your configuration",configSaved:"Configuration saved",missingConfigValues:"Missing required configuration values.",errorWritingConfig:"Error writing configuration file:",currentConfig:"Current configuration",useThisConfig:"Would you like to use this configuration?",installingDeps:"Installing dependencies...",depsInstalled:"All dependencies were installed",authFailed:"Authentication failed",unexpectedError:"An unexpected error occurred",enterEndpoint:"Enter your endpoint URL:",urlRequired:"URL is required!",urlMustBeHttp:"URL must use HTTP/HTTPS protocol",urlMustHaveHost:"URL must include a hostname",urlInvalid:"Please enter a valid URL",enterApiKey:"Enter your apikey:",apiKeyRequired:"API key is required!",enterRegistryName:"Enter your NPM registry name (without special characters):",registryNameRequired:"Registry name is required!",registryNameLettersOnly:"Registry name must contain only letters",enterRegistryURL:"Enter your NPM registry URL (without http/https):",registryURLRequired:"Registry URL is required!",registryURLStartWithName:"URL must start with a name only, avoid special characters",registryURLNoProtocol:"URL must not include 'http/https' protocol and must start with a letter",registryURLNoSlash:"URL must not start with '/' and must begin with a letter or number",registryURLNoWWW:"URL must not start with 'www' and must begin with a letter or number",currentVersionLabel:"Current version",checkingUpdates:"Checking for updates...",upgradeCheckFailed:"Could not check the latest version",alreadyLatest:e=>`Already on the latest version (${e})`,upgrading:e=>`Upgrading to v${e}...`,upgradeError:"Error upgrading eazy-git",upgradeSuccess:e=>`eazy-git upgraded to v${e}!`,languageSelect:"Select the interface language:",languageChanged:e=>`Language changed to: ${e}`,configMenu:"What would you like to configure?",configLanguage:"Change language",configDefaultBranch:"Default base branch",configAIProvider:"Default AI provider",configView:"View current configuration",defaultBranchSet:e=>`Default base branch: ${e}`,aiProviderSet:e=>`Default AI provider: ${e}`,goBack:"Go back"};var tt={es:Nr,en:Dr};function h(e,...t){let s=Q().language||"es",o=(tt[s]||tt.es)[e];return typeof o=="function"?o(...t):o||e}function Vr(){let t=Q().language||"es";return(tt[t]||tt.es).commitTypes}function Ur(){return[{value:"es",label:"Espanol"},{value:"en",label:"English"}]}function A(e){if(Ee(e))return ke(h("operationCancelled")),process.exit(0)}var Gr=(e=0)=>t=>`\x1B[${t+e}m`,jr=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Wr=(e=0)=>(t,r,s)=>`\x1B[${38+e};2;${t};${r};${s}m`,P={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},zn=Object.keys(P.modifier),xi=Object.keys(P.color),Ri=Object.keys(P.bgColor),Kn=[...xi,...Ri];function Ti(){let e=new Map;for(let[t,r]of Object.entries(P)){for(let[s,i]of Object.entries(r))P[s]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[s]=P[s],e.set(i[0],i[1]);Object.defineProperty(P,t,{value:r,enumerable:!1})}return Object.defineProperty(P,"codes",{value:e,enumerable:!1}),P.color.close="\x1B[39m",P.bgColor.close="\x1B[49m",P.color.ansi=Gr(),P.color.ansi256=jr(),P.color.ansi16m=Wr(),P.bgColor.ansi=Gr(10),P.bgColor.ansi256=jr(10),P.bgColor.ansi16m=Wr(10),Object.defineProperties(P,{rgbToAnsi256:{value(t,r,s){return t===r&&r===s?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(s/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[s]=r;s.length===3&&(s=[...s].map(o=>o+o).join(""));let i=Number.parseInt(s,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>P.rgbToAnsi256(...P.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,s,i;if(t>=232)r=((t-232)*10+8)/255,s=r,i=r;else{t-=16;let u=t%36;r=Math.floor(t/36)/5,s=Math.floor(u/6)/5,i=u%6/5}let o=Math.max(r,s,i)*2;if(o===0)return 30;let a=30+(Math.round(i)<<2|Math.round(s)<<1|Math.round(r));return o===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,r,s)=>P.ansi256ToAnsi(P.rgbToAnsi256(t,r,s)),enumerable:!1},hexToAnsi:{value:t=>P.ansi256ToAnsi(P.hexToAnsi256(t)),enumerable:!1}}),P}var _i=Ti(),se=_i;import Ut from"node:process";import Ai from"node:os";import qr from"node:tty";function ee(e,t=globalThis.Deno?globalThis.Deno.args:Ut.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",s=t.indexOf(r+e),i=t.indexOf("--");return s!==-1&&(i===-1||s<i)}var{env:U}=Ut,rt;ee("no-color")||ee("no-colors")||ee("color=false")||ee("color=never")?rt=0:(ee("color")||ee("colors")||ee("color=true")||ee("color=always"))&&(rt=1);function Fi(){if("FORCE_COLOR"in U)return U.FORCE_COLOR==="true"?1:U.FORCE_COLOR==="false"?0:U.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(U.FORCE_COLOR,10),3)}function Mi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Oi(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let s=Fi();s!==void 0&&(rt=s);let i=r?rt:s;if(i===0)return 0;if(r){if(ee("color=16m")||ee("color=full")||ee("color=truecolor"))return 3;if(ee("color=256"))return 2}if("TF_BUILD"in U&&"AGENT_NAME"in U)return 1;if(e&&!t&&i===void 0)return 0;let o=i||0;if(U.TERM==="dumb")return o;if(Ut.platform==="win32"){let a=Ai.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in U)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in U)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in U)||U.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in U)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(U.TEAMCITY_VERSION)?1:0;if(U.COLORTERM==="truecolor"||U.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in U){let a=Number.parseInt((U.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(U.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(U.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(U.TERM)||"COLORTERM"in U?1:o}function Hr(e,t={}){let r=Oi(e,{streamIsTTY:e&&e.isTTY,...t});return Mi(r)}var ki={stdout:Hr({isTTY:qr.isatty(1)}),stderr:Hr({isTTY:qr.isatty(2)})},zr=ki;function Kr(e,t,r){let s=e.indexOf(t);if(s===-1)return e;let i=t.length,o=0,a="";do a+=e.slice(o,s)+t+r,o=s+i,s=e.indexOf(t,o);while(s!==-1);return a+=e.slice(o),a}function Jr(e,t,r,s){let i=0,o="";do{let a=e[s-1]==="\r";o+=e.slice(i,a?s-1:s)+t+(a?`\r
164
+ `}}}}).prompt()});Y();Y();import{spawnSync as ss}from"child_process";Y();Y();import{existsSync as Lr,readFileSync as Ci,writeFileSync as Ii,mkdirSync as Si}from"fs";import Ei from"os";import Pr from"path";var Dt=Pr.join(Ei.homedir(),".eazy-git"),Vt=Pr.join(Dt,"config.json"),Br={language:"es",defaultBaseBranch:"release",aiProvider:"claude"};function Q(){try{if(Lr(Vt)){let e=Ci(Vt,"utf-8");return{...Br,...JSON.parse(e)}}}catch{}return{...Br}}function et(e){let r={...Q(),...e};return Lr(Dt)||Si(Dt,{recursive:!0}),Ii(Vt,JSON.stringify(r,null,2)),r}var Nr={welcome:"Bienvenido a",subtitle:"tu CLI de confianza para gestionar ramas en GIT",operationCompleted:"Operacion completada!",operationCancelled:"Operacion cancelada. Saliendo...",unknownCommand:"Comando desconocido",errorExecuting:"Error al ejecutar el comando",version:"eazy-git version",whatToDo:"Que deseas hacer?",addChanges:"Agregar cambios a una rama",createOriginal:"Crear rama original",createTemporal:"Crear rama temporal",notGitRepo:"Este directorio no es un repositorio git",gitNotInstalled:"git no esta instalado en el sistema",currentBranch:"Branch actual",filesChanged:"Archivos con cambios",noChangesPending:"No hay cambios pendientes. Deseas continuar de todas formas?",updatingRefs:"Actualizando referencias remotas...",refsUpdated:"Referencias actualizadas",fetchFailed:"No se pudo hacer fetch (continuando...)",baseBranch:"Desde que branch base quieres crear la rama?",baseBranchRequired:"El branch base es requerido",ticketId:"Cual es el identificador del ticket? (ej: DPW-0000)",ticketRequired:"El ticket es requerido",changeType:"Que tipo de cambio es?",branchExistsLocal:e=>`La rama "${e}" ya existe localmente. Que deseas hacer?`,switchToIt:"Cambiarme a ella y continuar",cancel:"Cancelar",cancelledOp:"Operacion cancelada.",creatingBranch:(e,t)=>`Creando rama ${e} desde origin/${t}...`,branchCreated:e=>`Rama ${e} creada`,errorCreatingBranch:e=>`Error al crear la rama: ${e}`,noFilesToStage:"No hay archivos para stagear.",selectFiles:"Cuales archivos quieres incluir en el commit?",selectAllFiles:"Seleccionar todos los archivos",stagedFiles:"Archivos en stage",stagedCorrect:"Los archivos en stage son correctos?",aiProvider:"Con que IA quieres generar la sugerencia de commit?",generatingCommit:e=>`Generando sugerencia de commit con ${e}...`,aiSuggestionFailed:e=>`No se pudo obtener sugerencia de ${e}. Escribe el mensaje manualmente.`,writeCommitMsg:"Escribe el mensaje de commit:",commitMsgRequired:"El mensaje es requerido",suggestionOf:e=>`Sugerencia de ${e}`,useThisCommit:"Este mensaje de commit te parece bien?",yesUseIt:"Si, usar este",modify:"Modificar",commitSuccess:"Commit realizado correctamente",hookBlocked:"El pre-commit hook bloqueo el commit. Que deseas hacer?",retryHook:"Ya lo corregi, agrega los cambios y vuelve a intentarlo",skipHook:"Saltar el hook (--no-verify)",commitNoHooks:"Commit realizado (sin hooks)",pushToRemote:"Deseas subir la rama al repositorio remoto?",pushSuccess:"Push realizado",pushForceQuestion:"La rama ya existe en el remoto con historial diferente. Deseas forzar el push? (git push -f)",pushForceSuccess:"Push forzado realizado",pushForceError:e=>`Error en el push forzado: ${e}`,pushError:e=>`Error en el push: ${e}`,summaryTitle:"Resumen",summaryBranch:"Rama",summaryFrom:"Desde",summaryCommit:"Commit",summaryFiles:e=>`${e} archivos commiteados`,summaryPush:"Push",summaryPR:"Crear PR",statusModified:"modificado",statusAdded:"agregado",statusDeleted:"eliminado",statusRenamed:"renombrado",statusUntracked:"sin rastrear",commitTypes:{fix:"fix \u2014 correccion de bug",feat:"feat \u2014 nueva funcionalidad",refactor:"refactor \u2014 mejora sin cambio funcional",chore:"chore \u2014 mantenimiento, dependencias",docs:"docs \u2014 documentacion",test:"test \u2014 pruebas",ci:"ci \u2014 integracion continua",perf:"perf \u2014 rendimiento",style:"style \u2014 formato, sin cambio de logica"},selectBranchType:"Selecciona el tipo de rama:",branchFix:"Fix",branchImprovement:"Mejora",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creando rama original...",branchCreatedAndPushed:e=>`Rama "${e}" creada y pusheada correctamente!`,branchCreatedSuccess:e=>`Rama "${e}" creada correctamente!`,mergeBranchQuestion:"A que rama deseas hacer merge?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Rama temporal creada correctamente",temporalBranchMerged:"Rama temporal mergeada correctamente",conflictsDetected:"Conflictos detectados. Resolvelos manualmente!",branchPushedToRemote:"Rama pusheada al repositorio remoto",removeTemporalBranch:"Deseas eliminar la rama temporal?",temporalBranchDeleted:"Rama temporal eliminada correctamente",errorCreatingTemporal:"Error creando la rama temporal",enterJiraCode:"Ingresa el codigo del ticket JIRA:",jiraRequired:"El codigo JIRA es requerido!",jiraInvalidFormat:"El codigo JIRA debe tener el formato DPW-0000",fetchingRemote:"Obteniendo cambios remotos...",pullingChanges:"Aplicando cambios en tu rama...",pullError:e=>`Error: ${e}`,pushingChanges:"Subiendo cambios al remoto...",pushedSuccess:"Cambios subidos correctamente!",pushedForceSuccess:"Cambios subidos (forzado) correctamente!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Proporciona un mensaje de commit",stagingChanges:"Stageando cambios...",creatingCommit:"Creando commit...",commitCreated:"Commit creado correctamente!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Cambiando a la rama anterior...",switchedTo:e=>`Cambiado a rama ${e} correctamente!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Obteniendo ultimos cambios...",mergingWith:e=>`Mergeando con ${e}...`,pushingMerged:"Subiendo cambios mergeados...",mergeCompleted:"Merge completado correctamente!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Eliminando ultimo commit...",removeLastConfirm:"Esto eliminara el ultimo commit (los cambios se mantienen en staging). Continuar?",lastCommitRemoved:e=>`commit ${e} eliminado correctamente`,removedCommitDetail:"Detalle del commit",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Configurando tu entorno",configSaved:"Configuracion guardada",missingConfigValues:"Faltan valores de configuracion requeridos.",errorWritingConfig:"Error escribiendo archivo de configuracion:",currentConfig:"Configuracion actual",useThisConfig:"Deseas usar esta configuracion?",installingDeps:"Instalando dependencias...",depsInstalled:"Todas las dependencias fueron instaladas",authFailed:"Autenticacion fallida",unexpectedError:"Ocurrio un error inesperado",enterEndpoint:"Ingresa la URL del endpoint:",urlRequired:"La URL es requerida!",urlMustBeHttp:"La URL debe usar protocolo HTTP/HTTPS",urlMustHaveHost:"La URL debe incluir un hostname",urlInvalid:"Ingresa una URL valida",enterApiKey:"Ingresa tu apikey:",apiKeyRequired:"El API key es requerido!",enterRegistryName:"Ingresa el nombre del registro NPM (sin caracteres especiales):",registryNameRequired:"El nombre del registro es requerido!",registryNameLettersOnly:"El nombre del registro debe contener solo letras",enterRegistryURL:"Ingresa la URL del registro NPM (sin http/https):",registryURLRequired:"La URL del registro es requerida!",registryURLStartWithName:"La URL debe empezar con un nombre, evita caracteres especiales",registryURLNoProtocol:"La URL no debe incluir protocolo 'http/https' y debe empezar con una letra",registryURLNoSlash:"La URL no debe empezar con '/' y debe empezar con una letra o numero",registryURLNoWWW:"La URL no debe empezar con 'www' y debe empezar con una letra o numero",currentVersionLabel:"Version actual",checkingUpdates:"Buscando actualizaciones...",upgradeCheckFailed:"No se pudo verificar la ultima version",alreadyLatest:e=>`Ya tienes la ultima version (${e})`,upgrading:e=>`Actualizando a v${e}...`,upgradeError:"Error al actualizar eazy-git",upgradeSuccess:e=>`eazy-git actualizado a v${e}!`,languageSelect:"Selecciona el idioma de la interfaz:",languageChanged:e=>`Idioma cambiado a: ${e}`,configMenu:"Que deseas configurar?",configLanguage:"Cambiar idioma",configDefaultBranch:"Rama base por defecto",configAIProvider:"Proveedor de IA por defecto",configView:"Ver configuracion actual",defaultBranchSet:e=>`Rama base por defecto: ${e}`,aiProviderSet:e=>`Proveedor de IA por defecto: ${e}`,goBack:"Volver"};var Dr={welcome:"Welcome to",subtitle:"your trusted CLI for GIT branch management",operationCompleted:"Operation completed!",operationCancelled:"Operation cancelled. Exiting...",unknownCommand:"Unknown command",errorExecuting:"Error executing command",version:"eazy-git version",whatToDo:"What would you like to do?",addChanges:"Add Changes to Branch",createOriginal:"Create Original Branch",createTemporal:"Create Temporal Branch",notGitRepo:"This directory is not a git repository",gitNotInstalled:"git is not installed on the system",currentBranch:"Current branch",filesChanged:"Files with changes",noChangesPending:"No pending changes. Do you want to continue anyway?",updatingRefs:"Updating remote references...",refsUpdated:"References updated",fetchFailed:"Could not fetch (continuing...)",baseBranch:"From which base branch do you want to create the branch?",baseBranchRequired:"Base branch is required",ticketId:"What is the ticket identifier? (e.g.: DPW-0000)",ticketRequired:"Ticket is required",changeType:"What type of change is this?",branchExistsLocal:e=>`Branch "${e}" already exists locally. What would you like to do?`,switchToIt:"Switch to it and continue",cancel:"Cancel",cancelledOp:"Operation cancelled.",creatingBranch:(e,t)=>`Creating branch ${e} from origin/${t}...`,branchCreated:e=>`Branch ${e} created`,errorCreatingBranch:e=>`Error creating branch: ${e}`,noFilesToStage:"No files to stage.",selectFiles:"Which files do you want to include in the commit?",selectAllFiles:"Select all files",stagedFiles:"Staged files",stagedCorrect:"Are the staged files correct?",aiProvider:"Which AI do you want to use for the commit suggestion?",generatingCommit:e=>`Generating commit suggestion with ${e}...`,aiSuggestionFailed:e=>`Could not get suggestion from ${e}. Write the message manually.`,writeCommitMsg:"Write the commit message:",commitMsgRequired:"Message is required",suggestionOf:e=>`${e} suggestion`,useThisCommit:"Does this commit message look good?",yesUseIt:"Yes, use it",modify:"Modify",commitSuccess:"Commit created successfully",hookBlocked:"The pre-commit hook blocked the commit. What would you like to do?",retryHook:"I fixed it, re-stage and retry",skipHook:"Skip the hook (--no-verify)",commitNoHooks:"Commit created (without hooks)",pushToRemote:"Do you want to push the branch to the remote repository?",pushSuccess:"Push completed",pushForceQuestion:"The branch already exists on remote with different history. Force push? (git push -f)",pushForceSuccess:"Force push completed",pushForceError:e=>`Error in force push: ${e}`,pushError:e=>`Error in push: ${e}`,summaryTitle:"Summary",summaryBranch:"Branch",summaryFrom:"From",summaryCommit:"Commit",summaryFiles:e=>`${e} files committed`,summaryPush:"Push",summaryPR:"Create PR",statusModified:"modified",statusAdded:"added",statusDeleted:"deleted",statusRenamed:"renamed",statusUntracked:"untracked",commitTypes:{fix:"fix - bug fix",feat:"feat - new feature",refactor:"refactor - improvement without functional change",chore:"chore - maintenance, dependencies",docs:"docs - documentation",test:"test - testing",ci:"ci - continuous integration",perf:"perf - performance",style:"style - formatting, no logic change"},selectBranchType:"Select the branch type:",branchFix:"Fix",branchImprovement:"Improvement",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creating original branch...",branchCreatedAndPushed:e=>`Branch "${e}" created and pushed successfully!`,branchCreatedSuccess:e=>`Branch "${e}" created successfully!`,mergeBranchQuestion:"Which branch do you want to merge into?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Temporal branch created successfully",temporalBranchMerged:"Temporal branch merged successfully",conflictsDetected:"Conflicts detected. Please resolve them manually!",branchPushedToRemote:"Branch pushed to remote repository",removeTemporalBranch:"Do you want to remove the temporal branch?",temporalBranchDeleted:"Temporal branch deleted successfully",errorCreatingTemporal:"Error creating the temporal branch",enterJiraCode:"Enter the JIRA ticket code:",jiraRequired:"JIRA code is required!",jiraInvalidFormat:"JIRA code must have the format DPW-0000",fetchingRemote:"Fetching remote changes...",pullingChanges:"Pulling changes into your branch...",pullError:e=>`Error: ${e}`,pushingChanges:"Pushing changes to remote...",pushedSuccess:"Changes pushed successfully!",pushedForceSuccess:"Changes pushed (force) successfully!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Please provide a commit message",stagingChanges:"Staging changes...",creatingCommit:"Creating commit...",commitCreated:"Commit created successfully!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Switching to previous branch...",switchedTo:e=>`Successfully switched to ${e} branch!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Fetching latest changes...",mergingWith:e=>`Merging with ${e}...`,pushingMerged:"Pushing merged changes...",mergeCompleted:"Merge completed successfully!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Removing last commit...",removeLastConfirm:"This will remove the last commit (changes will remain in staging). Continue?",lastCommitRemoved:e=>`commit ${e} removed successfully`,removedCommitDetail:"Commit detail",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Setting up your configuration",configSaved:"Configuration saved",missingConfigValues:"Missing required configuration values.",errorWritingConfig:"Error writing configuration file:",currentConfig:"Current configuration",useThisConfig:"Would you like to use this configuration?",installingDeps:"Installing dependencies...",depsInstalled:"All dependencies were installed",authFailed:"Authentication failed",unexpectedError:"An unexpected error occurred",enterEndpoint:"Enter your endpoint URL:",urlRequired:"URL is required!",urlMustBeHttp:"URL must use HTTP/HTTPS protocol",urlMustHaveHost:"URL must include a hostname",urlInvalid:"Please enter a valid URL",enterApiKey:"Enter your apikey:",apiKeyRequired:"API key is required!",enterRegistryName:"Enter your NPM registry name (without special characters):",registryNameRequired:"Registry name is required!",registryNameLettersOnly:"Registry name must contain only letters",enterRegistryURL:"Enter your NPM registry URL (without http/https):",registryURLRequired:"Registry URL is required!",registryURLStartWithName:"URL must start with a name only, avoid special characters",registryURLNoProtocol:"URL must not include 'http/https' protocol and must start with a letter",registryURLNoSlash:"URL must not start with '/' and must begin with a letter or number",registryURLNoWWW:"URL must not start with 'www' and must begin with a letter or number",currentVersionLabel:"Current version",checkingUpdates:"Checking for updates...",upgradeCheckFailed:"Could not check the latest version",alreadyLatest:e=>`Already on the latest version (${e})`,upgrading:e=>`Upgrading to v${e}...`,upgradeError:"Error upgrading eazy-git",upgradeSuccess:e=>`eazy-git upgraded to v${e}!`,languageSelect:"Select the interface language:",languageChanged:e=>`Language changed to: ${e}`,configMenu:"What would you like to configure?",configLanguage:"Change language",configDefaultBranch:"Default base branch",configAIProvider:"Default AI provider",configView:"View current configuration",defaultBranchSet:e=>`Default base branch: ${e}`,aiProviderSet:e=>`Default AI provider: ${e}`,goBack:"Go back"};var tt={es:Nr,en:Dr};function h(e,...t){let s=Q().language||"es",o=(tt[s]||tt.es)[e];return typeof o=="function"?o(...t):o||e}function Vr(){let t=Q().language||"es";return(tt[t]||tt.es).commitTypes}function Ur(){return[{value:"es",label:"Espanol"},{value:"en",label:"English"}]}function A(e){if(Ee(e))return ke(h("operationCancelled")),process.exit(0)}var Gr=(e=0)=>t=>`\x1B[${t+e}m`,jr=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,Wr=(e=0)=>(t,r,s)=>`\x1B[${38+e};2;${t};${r};${s}m`,P={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},zn=Object.keys(P.modifier),xi=Object.keys(P.color),Ri=Object.keys(P.bgColor),Kn=[...xi,...Ri];function Ti(){let e=new Map;for(let[t,r]of Object.entries(P)){for(let[s,i]of Object.entries(r))P[s]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[s]=P[s],e.set(i[0],i[1]);Object.defineProperty(P,t,{value:r,enumerable:!1})}return Object.defineProperty(P,"codes",{value:e,enumerable:!1}),P.color.close="\x1B[39m",P.bgColor.close="\x1B[49m",P.color.ansi=Gr(),P.color.ansi256=jr(),P.color.ansi16m=Wr(),P.bgColor.ansi=Gr(10),P.bgColor.ansi256=jr(10),P.bgColor.ansi16m=Wr(10),Object.defineProperties(P,{rgbToAnsi256:{value(t,r,s){return t===r&&r===s?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(s/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[s]=r;s.length===3&&(s=[...s].map(o=>o+o).join(""));let i=Number.parseInt(s,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>P.rgbToAnsi256(...P.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,s,i;if(t>=232)r=((t-232)*10+8)/255,s=r,i=r;else{t-=16;let u=t%36;r=Math.floor(t/36)/5,s=Math.floor(u/6)/5,i=u%6/5}let o=Math.max(r,s,i)*2;if(o===0)return 30;let a=30+(Math.round(i)<<2|Math.round(s)<<1|Math.round(r));return o===2&&(a+=60),a},enumerable:!1},rgbToAnsi:{value:(t,r,s)=>P.ansi256ToAnsi(P.rgbToAnsi256(t,r,s)),enumerable:!1},hexToAnsi:{value:t=>P.ansi256ToAnsi(P.hexToAnsi256(t)),enumerable:!1}}),P}var _i=Ti(),se=_i;import Ut from"node:process";import Ai from"node:os";import qr from"node:tty";function ee(e,t=globalThis.Deno?globalThis.Deno.args:Ut.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",s=t.indexOf(r+e),i=t.indexOf("--");return s!==-1&&(i===-1||s<i)}var{env:U}=Ut,rt;ee("no-color")||ee("no-colors")||ee("color=false")||ee("color=never")?rt=0:(ee("color")||ee("colors")||ee("color=true")||ee("color=always"))&&(rt=1);function Fi(){if("FORCE_COLOR"in U)return U.FORCE_COLOR==="true"?1:U.FORCE_COLOR==="false"?0:U.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(U.FORCE_COLOR,10),3)}function Mi(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Oi(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let s=Fi();s!==void 0&&(rt=s);let i=r?rt:s;if(i===0)return 0;if(r){if(ee("color=16m")||ee("color=full")||ee("color=truecolor"))return 3;if(ee("color=256"))return 2}if("TF_BUILD"in U&&"AGENT_NAME"in U)return 1;if(e&&!t&&i===void 0)return 0;let o=i||0;if(U.TERM==="dumb")return o;if(Ut.platform==="win32"){let a=Ai.release().split(".");return Number(a[0])>=10&&Number(a[2])>=10586?Number(a[2])>=14931?3:2:1}if("CI"in U)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(a=>a in U)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(a=>a in U)||U.CI_NAME==="codeship"?1:o;if("TEAMCITY_VERSION"in U)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(U.TEAMCITY_VERSION)?1:0;if(U.COLORTERM==="truecolor"||U.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in U){let a=Number.parseInt((U.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(U.TERM_PROGRAM){case"iTerm.app":return a>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(U.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(U.TERM)||"COLORTERM"in U?1:o}function Hr(e,t={}){let r=Oi(e,{streamIsTTY:e&&e.isTTY,...t});return Mi(r)}var ki={stdout:Hr({isTTY:qr.isatty(1)}),stderr:Hr({isTTY:qr.isatty(2)})},zr=ki;function Kr(e,t,r){let s=e.indexOf(t);if(s===-1)return e;let i=t.length,o=0,a="";do a+=e.slice(o,s)+t+r,o=s+i,s=e.indexOf(t,o);while(s!==-1);return a+=e.slice(o),a}function Jr(e,t,r,s){let i=0,o="";do{let a=e[s-1]==="\r";o+=e.slice(i,a?s-1:s)+t+(a?`\r
165
165
  `:`
166
166
  `)+r,i=s+1,s=e.indexOf(`
167
167
  `,i)}while(s!==-1);return o+=e.slice(i),o}var{stdout:Yr,stderr:Qr}=zr,Gt=Symbol("GENERATOR"),Te=Symbol("STYLER"),Be=Symbol("IS_EMPTY"),Xr=["ansi","ansi","ansi256","ansi16m"],_e=Object.create(null),Bi=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Yr?Yr.level:0;e.level=t.level===void 0?r:t.level};var Li=e=>{let t=(...r)=>r.join(" ");return Bi(t,e),Object.setPrototypeOf(t,Le.prototype),t};function Le(e){return Li(e)}Object.setPrototypeOf(Le.prototype,Function.prototype);for(let[e,t]of Object.entries(se))_e[e]={get(){let r=st(this,Wt(t.open,t.close,this[Te]),this[Be]);return Object.defineProperty(this,e,{value:r}),r}};_e.visible={get(){let e=st(this,this[Te],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var jt=(e,t,r,...s)=>e==="rgb"?t==="ansi16m"?se[r].ansi16m(...s):t==="ansi256"?se[r].ansi256(se.rgbToAnsi256(...s)):se[r].ansi(se.rgbToAnsi(...s)):e==="hex"?jt("rgb",t,r,...se.hexToRgb(...s)):se[r][e](...s),Pi=["rgb","hex","ansi256"];for(let e of Pi){_e[e]={get(){let{level:r}=this;return function(...s){let i=Wt(jt(e,Xr[r],"color",...s),se.color.close,this[Te]);return st(this,i,this[Be])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);_e[t]={get(){let{level:r}=this;return function(...s){let i=Wt(jt(e,Xr[r],"bgColor",...s),se.bgColor.close,this[Te]);return st(this,i,this[Be])}}}}var Ni=Object.defineProperties(()=>{},{..._e,level:{enumerable:!0,get(){return this[Gt].level},set(e){this[Gt].level=e}}}),Wt=(e,t,r)=>{let s,i;return r===void 0?(s=e,i=t):(s=r.openAll+e,i=t+r.closeAll),{open:e,close:t,openAll:s,closeAll:i,parent:r}},st=(e,t,r)=>{let s=(...i)=>Di(s,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(s,Ni),s[Gt]=e,s[Te]=t,s[Be]=r,s},Di=(e,t)=>{if(e.level<=0||!t)return e[Be]?"":t;let r=e[Te];if(r===void 0)return t;let{openAll:s,closeAll:i}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=Kr(t,r.close,r.open),r=r.parent;let o=t.indexOf(`
package/dist/install.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- var Dt=Object.create;var ke=Object.defineProperty;var jt=Object.getOwnPropertyDescriptor;var Gt=Object.getOwnPropertyNames;var Wt=Object.getPrototypeOf,qt=Object.prototype.hasOwnProperty;var Ht=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var zt=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Gt(t))!qt.call(e,i)&&i!==r&&ke(e,i,{get:()=>t[i],enumerable:!(s=jt(t,i))||s.enumerable});return e};var Pe=(e,t,r)=>(r=e!=null?Dt(Wt(e)):{},zt(t||!e||!e.__esModule?ke(r,"default",{value:e,enumerable:!0}):r,e));var Ie=Ht((vs,Ze)=>{"use strict";var we="\x1B",y=`${we}[`,ar="\x07",Ce={to(e,t){return t?`${y}${t+1};${e+1}H`:`${y}${e+1}G`},move(e,t){let r="";return e<0?r+=`${y}${-e}D`:e>0&&(r+=`${y}${e}C`),t<0?r+=`${y}${-t}A`:t>0&&(r+=`${y}${t}B`),r},up:(e=1)=>`${y}${e}A`,down:(e=1)=>`${y}${e}B`,forward:(e=1)=>`${y}${e}C`,backward:(e=1)=>`${y}${e}D`,nextLine:(e=1)=>`${y}E`.repeat(e),prevLine:(e=1)=>`${y}F`.repeat(e),left:`${y}G`,hide:`${y}?25l`,show:`${y}?25h`,save:`${we}7`,restore:`${we}8`},ur={up:(e=1)=>`${y}S`.repeat(e),down:(e=1)=>`${y}T`.repeat(e)},lr={screen:`${y}2J`,up:(e=1)=>`${y}1J`.repeat(e),down:(e=1)=>`${y}J`.repeat(e),line:`${y}2K`,lineEnd:`${y}K`,lineStart:`${y}1K`,lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?Ce.up():"");return e&&(t+=Ce.left),t}};Ze.exports={cursor:Ce,scroll:ur,erase:lr,beep:ar}});import{existsSync as us}from"fs";import{styleText as cr}from"node:util";import{stdout as Ee,stdin as et}from"node:process";import*as H from"node:readline";import hr from"node:readline";var Be=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let r=0;for(e.lastIndex=0;e.test(t);)r+=1;return t.length-r}})(),Ue=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,Ve=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141;var Kt=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,Yt=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,De=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,Jt=/\t{1,1000}/y,je=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,Qt=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,Zt=/\p{M}+/gu,Xt={limit:1/0,ellipsis:""},Ge=(e,t={},r={})=>{let s=t.limit??1/0,i=t.ellipsis??"",n=t?.ellipsisWidth??(i?Ge(i,Xt,r).width:0),o=0,a=r.controlWidth??0,c=r.tabWidth??8,g=r.emojiWidth??2,v=2,d=r.regularWidth??1,m=r.wideWidth??v,I=[[Qt,d],[Kt,o],[Yt,a],[Jt,c],[je,g],[De,m]],h=0,f=0,U=e.length,G=0,W=!1,k=U,V=Math.max(0,s-n),_=0,Q=0,P=0,T=0;e:for(;;){if(Q>_||f>=U&&f>h){let q=e.slice(_,Q)||e.slice(h,f);G=0;for(let K of q.replaceAll(Zt,"")){let F=K.codePointAt(0)||0;if(Ue(F)?T=v:Ve(F)?T=m:T=d,P+T>V&&(k=Math.min(k,Math.max(_,h)+G)),P+T>s){W=!0;break e}G+=K.length,P+=T}_=Q=0}if(f>=U)break e;for(let q=0,K=I.length;q<K;q++){let[F,ue]=I[q];if(F.lastIndex=f,F.test(e)){if(G=F===De?Be(e.slice(f,F.lastIndex)):F===je?1:F.lastIndex-f,T=G*ue,P+T>V&&(k=Math.min(k,f+Math.floor((V-P)/ue))),P+T>s){W=!0;break e}P+=T,_=h,Q=f,f=h=F.lastIndex;continue e}}f+=1}return{width:W?V:P,index:W?k:U,truncated:W,ellipsed:W&&s>=n}},We=Ge;var er={limit:1/0,ellipsis:"",ellipsisWidth:0},tr=(e,t={})=>We(e,er,t).width,B=tr;var ce="\x1B",Ye="\x9B",rr=39,ve="\x07",Je="[",sr="]",Qe="m",be=`${sr}8;;`,qe=new RegExp(`(?:\\${Je}(?<code>\\d+)m|\\${be}(?<uri>.*)${ve})`,"y"),He=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},ze=e=>`${ce}${Je}${e}${Qe}`,Ke=e=>`${ce}${be}${e}${ve}`,ye=(e,t,r)=>{let s=t[Symbol.iterator](),i=!1,n=!1,o=e.at(-1),a=o===void 0?0:B(o),c=s.next(),g=s.next(),v=0;for(;!c.done;){let d=c.value,m=B(d);a+m<=r?e[e.length-1]+=d:(e.push(d),a=0),(d===ce||d===Ye)&&(i=!0,n=t.startsWith(be,v+1)),i?n?d===ve&&(i=!1,n=!1):d===Qe&&(i=!1):(a+=m,a===r&&!g.done&&(e.push(""),a=0)),c=g,g=s.next(),v+=d.length}o=e.at(-1),!a&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},ir=e=>{let t=e.split(" "),r=t.length;for(;r&&!B(t[r-1]);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},nr=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let s="",i,n,o=e.split(" "),a=[""],c=0;for(let d=0;d<o.length;d++){let m=o[d];if(r.trim!==!1){let h=a.at(-1)??"",f=h.trimStart();h.length!==f.length&&(a[a.length-1]=f,c=B(f))}d!==0&&(c>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),c=0),(c||r.trim===!1)&&(a[a.length-1]+=" ",c++));let I=B(m);if(r.hard&&I>t){let h=t-c,f=1+Math.floor((I-h-1)/t);Math.floor((I-1)/t)<f&&a.push(""),ye(a,m,t),c=B(a.at(-1)??"");continue}if(c+I>t&&c&&I){if(r.wordWrap===!1&&c<t){ye(a,m,t),c=B(a.at(-1)??"");continue}a.push(""),c=0}if(c+I>t&&r.wordWrap===!1){ye(a,m,t),c=B(a.at(-1)??"");continue}a[a.length-1]+=m,c+=I}r.trim!==!1&&(a=a.map(d=>ir(d)));let g=a.join(`
3
- `),v=!1;for(let d=0;d<g.length;d++){let m=g[d];if(s+=m,v)v=!1;else if(v=m>="\uD800"&&m<="\uDBFF",v)continue;if(m===ce||m===Ye){qe.lastIndex=d+1;let h=qe.exec(g)?.groups;if(h?.code!==void 0){let f=Number.parseFloat(h.code);i=f===rr?void 0:f}else h?.uri!==void 0&&(n=h.uri.length===0?void 0:h.uri)}if(g[d+1]===`
4
- `){n&&(s+=Ke(""));let I=i?He(i):void 0;i&&I&&(s+=ze(I))}else m===`
2
+ var Vt=Object.create;var ke=Object.defineProperty;var jt=Object.getOwnPropertyDescriptor;var Gt=Object.getOwnPropertyNames;var Wt=Object.getPrototypeOf,qt=Object.prototype.hasOwnProperty;var Ht=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var zt=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Gt(t))!qt.call(e,i)&&i!==r&&ke(e,i,{get:()=>t[i],enumerable:!(s=jt(t,i))||s.enumerable});return e};var Pe=(e,t,r)=>(r=e!=null?Vt(Wt(e)):{},zt(t||!e||!e.__esModule?ke(r,"default",{value:e,enumerable:!0}):r,e));var Ie=Ht((vs,Ze)=>{"use strict";var we="\x1B",y=`${we}[`,ar="\x07",Ce={to(e,t){return t?`${y}${t+1};${e+1}H`:`${y}${e+1}G`},move(e,t){let r="";return e<0?r+=`${y}${-e}D`:e>0&&(r+=`${y}${e}C`),t<0?r+=`${y}${-t}A`:t>0&&(r+=`${y}${t}B`),r},up:(e=1)=>`${y}${e}A`,down:(e=1)=>`${y}${e}B`,forward:(e=1)=>`${y}${e}C`,backward:(e=1)=>`${y}${e}D`,nextLine:(e=1)=>`${y}E`.repeat(e),prevLine:(e=1)=>`${y}F`.repeat(e),left:`${y}G`,hide:`${y}?25l`,show:`${y}?25h`,save:`${we}7`,restore:`${we}8`},ur={up:(e=1)=>`${y}S`.repeat(e),down:(e=1)=>`${y}T`.repeat(e)},lr={screen:`${y}2J`,up:(e=1)=>`${y}1J`.repeat(e),down:(e=1)=>`${y}J`.repeat(e),line:`${y}2K`,lineEnd:`${y}K`,lineStart:`${y}1K`,lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?Ce.up():"");return e&&(t+=Ce.left),t}};Ze.exports={cursor:Ce,scroll:ur,erase:lr,beep:ar}});import{existsSync as us}from"fs";import{styleText as cr}from"node:util";import{stdout as Ee,stdin as et}from"node:process";import*as H from"node:readline";import hr from"node:readline";var Be=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let r=0;for(e.lastIndex=0;e.test(t);)r+=1;return t.length-r}})(),Ue=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,De=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141;var Kt=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,Yt=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,Ve=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/yu,Jt=/\t{1,1000}/y,je=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/yu,Qt=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,Zt=/\p{M}+/gu,Xt={limit:1/0,ellipsis:""},Ge=(e,t={},r={})=>{let s=t.limit??1/0,i=t.ellipsis??"",n=t?.ellipsisWidth??(i?Ge(i,Xt,r).width:0),o=0,a=r.controlWidth??0,c=r.tabWidth??8,g=r.emojiWidth??2,v=2,m=r.regularWidth??1,d=r.wideWidth??v,I=[[Qt,m],[Kt,o],[Yt,a],[Jt,c],[je,g],[Ve,d]],h=0,f=0,U=e.length,G=0,W=!1,k=U,D=Math.max(0,s-n),_=0,Q=0,P=0,T=0;e:for(;;){if(Q>_||f>=U&&f>h){let q=e.slice(_,Q)||e.slice(h,f);G=0;for(let K of q.replaceAll(Zt,"")){let F=K.codePointAt(0)||0;if(Ue(F)?T=v:De(F)?T=d:T=m,P+T>D&&(k=Math.min(k,Math.max(_,h)+G)),P+T>s){W=!0;break e}G+=K.length,P+=T}_=Q=0}if(f>=U)break e;for(let q=0,K=I.length;q<K;q++){let[F,ue]=I[q];if(F.lastIndex=f,F.test(e)){if(G=F===Ve?Be(e.slice(f,F.lastIndex)):F===je?1:F.lastIndex-f,T=G*ue,P+T>D&&(k=Math.min(k,f+Math.floor((D-P)/ue))),P+T>s){W=!0;break e}P+=T,_=h,Q=f,f=h=F.lastIndex;continue e}}f+=1}return{width:W?D:P,index:W?k:U,truncated:W,ellipsed:W&&s>=n}},We=Ge;var er={limit:1/0,ellipsis:"",ellipsisWidth:0},tr=(e,t={})=>We(e,er,t).width,B=tr;var ce="\x1B",Ye="\x9B",rr=39,ve="\x07",Je="[",sr="]",Qe="m",be=`${sr}8;;`,qe=new RegExp(`(?:\\${Je}(?<code>\\d+)m|\\${be}(?<uri>.*)${ve})`,"y"),He=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},ze=e=>`${ce}${Je}${e}${Qe}`,Ke=e=>`${ce}${be}${e}${ve}`,ye=(e,t,r)=>{let s=t[Symbol.iterator](),i=!1,n=!1,o=e.at(-1),a=o===void 0?0:B(o),c=s.next(),g=s.next(),v=0;for(;!c.done;){let m=c.value,d=B(m);a+d<=r?e[e.length-1]+=m:(e.push(m),a=0),(m===ce||m===Ye)&&(i=!0,n=t.startsWith(be,v+1)),i?n?m===ve&&(i=!1,n=!1):m===Qe&&(i=!1):(a+=d,a===r&&!g.done&&(e.push(""),a=0)),c=g,g=s.next(),v+=m.length}o=e.at(-1),!a&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},ir=e=>{let t=e.split(" "),r=t.length;for(;r&&!B(t[r-1]);)r--;return r===t.length?e:t.slice(0,r).join(" ")+t.slice(r).join("")},nr=(e,t,r={})=>{if(r.trim!==!1&&e.trim()==="")return"";let s="",i,n,o=e.split(" "),a=[""],c=0;for(let m=0;m<o.length;m++){let d=o[m];if(r.trim!==!1){let h=a.at(-1)??"",f=h.trimStart();h.length!==f.length&&(a[a.length-1]=f,c=B(f))}m!==0&&(c>=t&&(r.wordWrap===!1||r.trim===!1)&&(a.push(""),c=0),(c||r.trim===!1)&&(a[a.length-1]+=" ",c++));let I=B(d);if(r.hard&&I>t){let h=t-c,f=1+Math.floor((I-h-1)/t);Math.floor((I-1)/t)<f&&a.push(""),ye(a,d,t),c=B(a.at(-1)??"");continue}if(c+I>t&&c&&I){if(r.wordWrap===!1&&c<t){ye(a,d,t),c=B(a.at(-1)??"");continue}a.push(""),c=0}if(c+I>t&&r.wordWrap===!1){ye(a,d,t),c=B(a.at(-1)??"");continue}a[a.length-1]+=d,c+=I}r.trim!==!1&&(a=a.map(m=>ir(m)));let g=a.join(`
3
+ `),v=!1;for(let m=0;m<g.length;m++){let d=g[m];if(s+=d,v)v=!1;else if(v=d>="\uD800"&&d<="\uDBFF",v)continue;if(d===ce||d===Ye){qe.lastIndex=m+1;let h=qe.exec(g)?.groups;if(h?.code!==void 0){let f=Number.parseFloat(h.code);i=f===rr?void 0:f}else h?.uri!==void 0&&(n=h.uri.length===0?void 0:h.uri)}if(g[m+1]===`
4
+ `){n&&(s+=Ke(""));let I=i?He(i):void 0;i&&I&&(s+=ze(I))}else d===`
5
5
  `&&(i&&He(i)&&(s+=ze(i)),n&&(s+=Ke(n)))}return s},or=/\r?\n/;function Y(e,t,r){return String(e).normalize().split(or).map(s=>nr(s,t,r)).join(`
6
- `)}var x=Pe(Ie(),1);import{ReadStream as Xe}from"node:tty";var dr=["up","down","left","right","space","enter","cancel"],mr=["January","February","March","April","May","June","July","August","September","October","November","December"],R={actions:new Set(dr),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0,date:{monthNames:[...mr],messages:{required:"Please enter a valid date",invalidMonth:"There are only 12 months in a year",invalidDay:(e,t)=>`There are only ${e} days in ${t}`,afterMin:e=>`Date must be on or after ${e.toISOString().slice(0,10)}`,beforeMax:e=>`Date must be on or before ${e.toISOString().slice(0,10)}`}}};function xe(e,t){if(typeof e=="string")return R.aliases.get(e)===t;for(let r of e)if(r!==void 0&&xe(r,t))return!0;return!1}function pr(e,t){if(e===t)return;let r=e.split(`
6
+ `)}var x=Pe(Ie(),1);import{ReadStream as Xe}from"node:tty";var mr=["up","down","left","right","space","enter","cancel"],dr=["January","February","March","April","May","June","July","August","September","October","November","December"],R={actions:new Set(mr),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0,date:{monthNames:[...dr],messages:{required:"Please enter a valid date",invalidMonth:"There are only 12 months in a year",invalidDay:(e,t)=>`There are only ${e} days in ${t}`,afterMin:e=>`Date must be on or after ${e.toISOString().slice(0,10)}`,beforeMax:e=>`Date must be on or before ${e.toISOString().slice(0,10)}`}}};function xe(e,t){if(typeof e=="string")return R.aliases.get(e)===t;for(let r of e)if(r!==void 0&&xe(r,t))return!0;return!1}function pr(e,t){if(e===t)return;let r=e.split(`
7
7
  `),s=t.split(`
8
8
  `),i=Math.max(r.length,s.length),n=[];for(let o=0;o<i;o++)r[o]!==s[o]&&n.push(o);return{lines:n,numLinesBefore:r.length,numLinesAfter:s.length,numLines:i}}var gr=globalThis.process.platform.startsWith("win"),Se=Symbol("clack:cancel");function pe(e){return e===Se}function he(e,t){let r=e;r.isTTY&&r.setRawMode(t)}function tt({input:e=et,output:t=Ee,overwrite:r=!0,hideCursor:s=!0}={}){let i=H.createInterface({input:e,output:t,prompt:"",tabSize:1});H.emitKeypressEvents(e,i),e instanceof Xe&&e.isTTY&&e.setRawMode(!0);let n=(o,{name:a,sequence:c})=>{let g=String(o);if(xe([g,a,c],"cancel")){s&&t.write(x.cursor.show),process.exit(0);return}if(!r)return;H.moveCursor(t,a==="return"?0:-1,a==="return"?-1:0,()=>{H.clearLine(t,1,()=>{e.once("keypress",n)})})};return s&&t.write(x.cursor.hide),e.once("keypress",n),()=>{e.off("keypress",n),s&&t.write(x.cursor.show),e instanceof Xe&&e.isTTY&&!gr&&e.setRawMode(!1),i.terminal=!1,i.close()}}var Re=e=>"columns"in e&&typeof e.columns=="number"?e.columns:80,rt=e=>"rows"in e&&typeof e.rows=="number"?e.rows:20;function st(e,t,r,s=r,i=r,n){let o=Re(e??Ee);return Y(t,o-r.length,{hard:!0,trim:!1}).split(`
9
9
  `).map((a,c,g)=>{let v=n?n(a,c):a;return c===0?`${s}${v}`:c===g.length-1?`${i}${v}`:`${r}${v}`}).join(`
@@ -12,28 +12,28 @@ var Dt=Object.create;var ke=Object.defineProperty;var jt=Object.getOwnPropertyDe
12
12
  `).length-1;this.output.write(x.cursor.move(-999,e*-1))}render(){let e=Y(this._render(this)??"",process.stdout.columns,{hard:!0,trim:!1});if(e!==this._prevFrame){if(this.state==="initial")this.output.write(x.cursor.hide);else{let t=pr(this._prevFrame,e),r=rt(this.output);if(this.restoreCursor(),t){let s=Math.max(0,t.numLinesAfter-r),i=Math.max(0,t.numLinesBefore-r),n=t.lines.find(o=>o>=s);if(n===void 0){this._prevFrame=e;return}if(t.lines.length===1){this.output.write(x.cursor.move(0,n-i)),this.output.write(x.erase.lines(1));let o=e.split(`
13
13
  `);this.output.write(o[n]),this._prevFrame=e,this.output.write(x.cursor.move(0,o.length-n-1));return}else if(t.lines.length>1){if(s<i)n=s;else{let a=n-i;a>0&&this.output.write(x.cursor.move(0,a))}this.output.write(x.erase.down());let o=e.split(`
14
14
  `).slice(n);this.output.write(o.join(`
15
- `)),this._prevFrame=e;return}}this.output.write(x.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}};var de=class extends it{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("userInput",()=>{this.value=this._value}),this.on("confirm",r=>{this.output.write(x.cursor.move(0,-1)),this.value=r,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};var me=class extends it{get userInputWithCursor(){if(this.state==="submit")return this.userInput;let t=this.userInput;if(this.cursor>=t.length)return`${this.userInput}\u2588`;let r=t.slice(0,this.cursor),[s,...i]=t.slice(this.cursor);return`${r}${cr("inverse",s)}${i.join("")}`}get cursor(){return this._cursor}constructor(t){super({...t,initialUserInput:t.initialUserInput??t.initialValue}),this.on("userInput",r=>{this._setValue(r)}),this.on("finalize",()=>{this.value||(this.value=t.defaultValue),this.value===void 0&&(this.value="")})}};import{styleText as u,stripVTControlCharacters as Bs}from"node:util";import L from"node:process";var se=Pe(Ie(),1);function fr(){return L.platform!=="win32"?L.env.TERM!=="linux":!!L.env.CI||!!L.env.WT_SESSION||!!L.env.TERMINUS_SUBLIME||L.env.ConEmuTask==="{cmd::Cmder}"||L.env.TERM_PROGRAM==="Terminus-Sublime"||L.env.TERM_PROGRAM==="vscode"||L.env.TERM==="xterm-256color"||L.env.TERM==="alacritty"||L.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Te=fr(),$r=()=>process.env.CI==="true";var p=(e,t)=>Te?e:t,yr=p("\u25C6","*"),at=p("\u25A0","x"),ut=p("\u25B2","x"),_e=p("\u25C7","o"),vr=p("\u250C","T"),E=p("\u2502","|"),ie=p("\u2514","\u2014"),js=p("\u2510","T"),Gs=p("\u2518","\u2014"),nt=p("\u25CF",">"),ot=p("\u25CB"," "),Ws=p("\u25FB","[\u2022]"),qs=p("\u25FC","[+]"),Hs=p("\u25FB","[ ]"),zs=p("\u25AA","\u2022"),Ks=p("\u2500","-"),Ys=p("\u256E","+"),Js=p("\u251C","+"),Qs=p("\u256F","+"),Zs=p("\u2570","+"),Xs=p("\u256D","+"),br=p("\u25CF","\u2022"),wr=p("\u25C6","*"),Cr=p("\u25B2","!"),Ir=p("\u25A0","x"),lt=e=>{switch(e){case"initial":case"active":return u("cyan",yr);case"cancel":return u("red",at);case"error":return u("yellow",ut);case"submit":return u("green",_e)}};var ct=e=>{let t=e.active??"Yes",r=e.inactive??"No";return new de({active:t,inactive:r,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue??!0,render(){let s=e.withGuide??R.withGuide,i=`${lt(this.state)} `,n=s?`${u("gray",E)} `:"",o=st(e.output,e.message,n,i),a=`${s?`${u("gray",E)}
15
+ `)),this._prevFrame=e;return}}this.output.write(x.erase.down())}this.output.write(e),this.state==="initial"&&(this.state="active"),this._prevFrame=e}}};var me=class extends it{get cursor(){return this.value?0:1}get _value(){return this.cursor===0}constructor(t){super(t,!1),this.value=!!t.initialValue,this.on("userInput",()=>{this.value=this._value}),this.on("confirm",r=>{this.output.write(x.cursor.move(0,-1)),this.value=r,this.state="submit",this.close()}),this.on("cursor",()=>{this.value=!this.value})}};var de=class extends it{get userInputWithCursor(){if(this.state==="submit")return this.userInput;let t=this.userInput;if(this.cursor>=t.length)return`${this.userInput}\u2588`;let r=t.slice(0,this.cursor),[s,...i]=t.slice(this.cursor);return`${r}${cr("inverse",s)}${i.join("")}`}get cursor(){return this._cursor}constructor(t){super({...t,initialUserInput:t.initialUserInput??t.initialValue}),this.on("userInput",r=>{this._setValue(r)}),this.on("finalize",()=>{this.value||(this.value=t.defaultValue),this.value===void 0&&(this.value="")})}};import{styleText as u,stripVTControlCharacters as Bs}from"node:util";import L from"node:process";var se=Pe(Ie(),1);function fr(){return L.platform!=="win32"?L.env.TERM!=="linux":!!L.env.CI||!!L.env.WT_SESSION||!!L.env.TERMINUS_SUBLIME||L.env.ConEmuTask==="{cmd::Cmder}"||L.env.TERM_PROGRAM==="Terminus-Sublime"||L.env.TERM_PROGRAM==="vscode"||L.env.TERM==="xterm-256color"||L.env.TERM==="alacritty"||L.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var Te=fr(),$r=()=>process.env.CI==="true";var p=(e,t)=>Te?e:t,yr=p("\u25C6","*"),at=p("\u25A0","x"),ut=p("\u25B2","x"),_e=p("\u25C7","o"),vr=p("\u250C","T"),E=p("\u2502","|"),ie=p("\u2514","\u2014"),js=p("\u2510","T"),Gs=p("\u2518","\u2014"),nt=p("\u25CF",">"),ot=p("\u25CB"," "),Ws=p("\u25FB","[\u2022]"),qs=p("\u25FC","[+]"),Hs=p("\u25FB","[ ]"),zs=p("\u25AA","\u2022"),Ks=p("\u2500","-"),Ys=p("\u256E","+"),Js=p("\u251C","+"),Qs=p("\u256F","+"),Zs=p("\u2570","+"),Xs=p("\u256D","+"),br=p("\u25CF","\u2022"),wr=p("\u25C6","*"),Cr=p("\u25B2","!"),Ir=p("\u25A0","x"),lt=e=>{switch(e){case"initial":case"active":return u("cyan",yr);case"cancel":return u("red",at);case"error":return u("yellow",ut);case"submit":return u("green",_e)}};var ct=e=>{let t=e.active??"Yes",r=e.inactive??"No";return new me({active:t,inactive:r,signal:e.signal,input:e.input,output:e.output,initialValue:e.initialValue??!0,render(){let s=e.withGuide??R.withGuide,i=`${lt(this.state)} `,n=s?`${u("gray",E)} `:"",o=st(e.output,e.message,n,i),a=`${s?`${u("gray",E)}
16
16
  `:""}${o}
17
17
  `,c=this.value?t:r;switch(this.state){case"submit":{let g=s?`${u("gray",E)} `:"";return`${a}${g}${u("dim",c)}`}case"cancel":{let g=s?`${u("gray",E)} `:"";return`${a}${g}${u(["strikethrough","dim"],c)}${s?`
18
18
  ${u("gray",E)}`:""}`}default:{let g=s?`${u("cyan",E)} `:"",v=s?u("cyan",ie):"";return`${a}${g}${this.value?`${u("green",nt)} ${t}`:`${u("dim",ot)} ${u("dim",t)}`}${e.vertical?s?`
19
19
  ${u("cyan",E)} `:`
20
20
  `:` ${u("dim","/")} `}${this.value?`${u("dim",ot)} ${u("dim",r)}`:`${u("green",nt)} ${r}`}
21
21
  ${v}
22
- `}}}}).prompt()};var S={message:(e=[],{symbol:t=u("gray",E),secondarySymbol:r=u("gray",E),output:s=process.stdout,spacing:i=1,withGuide:n}={})=>{let o=[],a=n??R.withGuide,c=a?r:"",g=a?`${t} `:"",v=a?`${r} `:"";for(let m=0;m<i;m++)o.push(c);let d=Array.isArray(e)?e:e.split(`
23
- `);if(d.length>0){let[m,...I]=d;m.length>0?o.push(`${g}${m}`):o.push(a?t:"");for(let h of I)h.length>0?o.push(`${v}${h}`):o.push(a?r:"")}s.write(`${o.join(`
22
+ `}}}}).prompt()};var S={message:(e=[],{symbol:t=u("gray",E),secondarySymbol:r=u("gray",E),output:s=process.stdout,spacing:i=1,withGuide:n}={})=>{let o=[],a=n??R.withGuide,c=a?r:"",g=a?`${t} `:"",v=a?`${r} `:"";for(let d=0;d<i;d++)o.push(c);let m=Array.isArray(e)?e:e.split(`
23
+ `);if(m.length>0){let[d,...I]=m;d.length>0?o.push(`${g}${d}`):o.push(a?t:"");for(let h of I)h.length>0?o.push(`${v}${h}`):o.push(a?r:"")}s.write(`${o.join(`
24
24
  `)}
25
25
  `)},info:(e,t)=>{S.message(e,{...t,symbol:u("blue",br)})},success:(e,t)=>{S.message(e,{...t,symbol:u("green",wr)})},step:(e,t)=>{S.message(e,{...t,symbol:u("green",_e)})},warn:(e,t)=>{S.message(e,{...t,symbol:u("yellow",Cr)})},warning:(e,t)=>{S.warn(e,t)},error:(e,t)=>{S.message(e,{...t,symbol:u("red",Ir)})}},ht=(e="",t)=>{let r=t?.output??process.stdout,s=t?.withGuide??R.withGuide?`${u("gray",ie)} `:"";r.write(`${s}${u("red",e)}
26
26
 
27
- `)},dt=(e="",t)=>{let r=t?.output??process.stdout,s=t?.withGuide??R.withGuide?`${u("gray",vr)} `:"";r.write(`${s}${e}
28
- `)},mt=(e="",t)=>{let r=t?.output??process.stdout,s=t?.withGuide??R.withGuide?`${u("gray",E)}
27
+ `)},mt=(e="",t)=>{let r=t?.output??process.stdout,s=t?.withGuide??R.withGuide?`${u("gray",vr)} `:"";r.write(`${s}${e}
28
+ `)},dt=(e="",t)=>{let r=t?.output??process.stdout,s=t?.withGuide??R.withGuide?`${u("gray",E)}
29
29
  ${u("gray",ie)} `:"";r.write(`${s}${e}
30
30
 
31
- `)};var Sr=e=>u("magenta",e),pt=({indicator:e="dots",onCancel:t,output:r=process.stdout,cancelMessage:s,errorMessage:i,frames:n=Te?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],delay:o=Te?80:120,signal:a,...c}={})=>{let g=$r(),v,d,m=!1,I=!1,h="",f,U=performance.now(),G=Re(r),W=c?.styleFrame??Sr,k=b=>{let M=b>1?i??R.messages.error:s??R.messages.cancel;I=b===1,m&&(re(M,b),I&&typeof t=="function"&&t())},V=()=>k(2),_=()=>k(1),Q=()=>{process.on("uncaughtExceptionMonitor",V),process.on("unhandledRejection",V),process.on("SIGINT",_),process.on("SIGTERM",_),process.on("exit",k),a&&a.addEventListener("abort",_)},P=()=>{process.removeListener("uncaughtExceptionMonitor",V),process.removeListener("unhandledRejection",V),process.removeListener("SIGINT",_),process.removeListener("SIGTERM",_),process.removeListener("exit",k),a&&a.removeEventListener("abort",_)},T=()=>{if(f===void 0)return;g&&r.write(`
31
+ `)};var Sr=e=>u("magenta",e),pt=({indicator:e="dots",onCancel:t,output:r=process.stdout,cancelMessage:s,errorMessage:i,frames:n=Te?["\u25D2","\u25D0","\u25D3","\u25D1"]:["\u2022","o","O","0"],delay:o=Te?80:120,signal:a,...c}={})=>{let g=$r(),v,m,d=!1,I=!1,h="",f,U=performance.now(),G=Re(r),W=c?.styleFrame??Sr,k=b=>{let M=b>1?i??R.messages.error:s??R.messages.cancel;I=b===1,d&&(re(M,b),I&&typeof t=="function"&&t())},D=()=>k(2),_=()=>k(1),Q=()=>{process.on("uncaughtExceptionMonitor",D),process.on("unhandledRejection",D),process.on("SIGINT",_),process.on("SIGTERM",_),process.on("exit",k),a&&a.addEventListener("abort",_)},P=()=>{process.removeListener("uncaughtExceptionMonitor",D),process.removeListener("unhandledRejection",D),process.removeListener("SIGINT",_),process.removeListener("SIGTERM",_),process.removeListener("exit",k),a&&a.removeEventListener("abort",_)},T=()=>{if(f===void 0)return;g&&r.write(`
32
32
  `);let b=Y(f,G,{hard:!0,trim:!1}).split(`
33
- `);b.length>1&&r.write(se.cursor.up(b.length-1)),r.write(se.cursor.to(0)),r.write(se.erase.down())},q=b=>b.replace(/\.+$/,""),K=b=>{let M=(performance.now()-b)/1e3,D=Math.floor(M/60),j=Math.floor(M%60);return D>0?`[${D}m ${j}s]`:`[${j}s]`},F=c.withGuide??R.withGuide,ue=(b="")=>{m=!0,v=tt({output:r}),h=q(b),U=performance.now(),F&&r.write(`${u("gray",E)}
34
- `);let M=0,D=0;Q(),d=setInterval(()=>{if(g&&h===f)return;T(),f=h;let j=W(n[M]),le;if(g)le=`${j} ${h}...`;else if(e==="timer")le=`${j} ${h} ${K(U)}`;else{let Vt=".".repeat(Math.floor(D)).slice(0,3);le=`${j} ${h}${Vt}`}let Ut=Y(le,G,{hard:!0,trim:!1});r.write(Ut),M=M+1<n.length?M+1:0,D=D<4?D+.125:0},o)},re=(b="",M=0,D=!1)=>{if(!m)return;m=!1,clearInterval(d),T();let j=M===0?u("green",_e):M===1?u("red",at):u("red",ut);h=b??h,D||(e==="timer"?r.write(`${j} ${h} ${K(U)}
33
+ `);b.length>1&&r.write(se.cursor.up(b.length-1)),r.write(se.cursor.to(0)),r.write(se.erase.down())},q=b=>b.replace(/\.+$/,""),K=b=>{let M=(performance.now()-b)/1e3,V=Math.floor(M/60),j=Math.floor(M%60);return V>0?`[${V}m ${j}s]`:`[${j}s]`},F=c.withGuide??R.withGuide,ue=(b="")=>{d=!0,v=tt({output:r}),h=q(b),U=performance.now(),F&&r.write(`${u("gray",E)}
34
+ `);let M=0,V=0;Q(),m=setInterval(()=>{if(g&&h===f)return;T(),f=h;let j=W(n[M]),le;if(g)le=`${j} ${h}...`;else if(e==="timer")le=`${j} ${h} ${K(U)}`;else{let Dt=".".repeat(Math.floor(V)).slice(0,3);le=`${j} ${h}${Dt}`}let Ut=Y(le,G,{hard:!0,trim:!1});r.write(Ut),M=M+1<n.length?M+1:0,V=V<4?V+.125:0},o)},re=(b="",M=0,V=!1)=>{if(!d)return;d=!1,clearInterval(m),T();let j=M===0?u("green",_e):M===1?u("red",at):u("red",ut);h=b??h,V||(e==="timer"?r.write(`${j} ${h} ${K(U)}
35
35
  `):r.write(`${j} ${h}
36
- `)),P(),v()};return{start:ue,stop:(b="")=>re(b,0),message:(b="")=>{h=q(b??h)},cancel:(b="")=>re(b,1),error:(b="")=>re(b,2),clear:()=>re("",0,!0),get isCancelled(){return I}}},ei={light:p("\u2500","-"),heavy:p("\u2501","="),block:p("\u2588","#")};var ti=`${u("gray",E)} `;var z=e=>new me({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,output:e.output,signal:e.signal,input:e.input,render(){let t=e?.withGuide??R.withGuide,r=`${`${t?`${u("gray",E)}
36
+ `)),P(),v()};return{start:ue,stop:(b="")=>re(b,0),message:(b="")=>{h=q(b??h)},cancel:(b="")=>re(b,1),error:(b="")=>re(b,2),clear:()=>re("",0,!0),get isCancelled(){return I}}},ei={light:p("\u2500","-"),heavy:p("\u2501","="),block:p("\u2588","#")};var ti=`${u("gray",E)} `;var z=e=>new de({validate:e.validate,placeholder:e.placeholder,defaultValue:e.defaultValue,initialValue:e.initialValue,output:e.output,signal:e.signal,input:e.input,render(){let t=e?.withGuide??R.withGuide,r=`${`${t?`${u("gray",E)}
37
37
  `:""}${lt(this.state)} `}${e.message}
38
38
  `,s=e.placeholder?u("inverse",e.placeholder[0])+u("dim",e.placeholder.slice(1)):u(["inverse","hidden"],"_"),i=this.userInput?this.userInputWithCursor:s,n=this.value??"";switch(this.state){case"error":{let o=this.error?` ${u("yellow",this.error)}`:"",a=t?`${u("yellow",E)} `:"",c=t?u("yellow",ie):"";return`${r.trim()}
39
39
  ${a}${i}
@@ -41,15 +41,15 @@ ${c}${o}
41
41
  `}case"submit":{let o=n?` ${u("dim",n)}`:"",a=t?u("gray",E):"";return`${r}${a}${o}`}case"cancel":{let o=n?` ${u(["strikethrough","dim"],n)}`:"",a=t?u("gray",E):"";return`${r}${a}${o}${n.trim()?`
42
42
  ${a}`:""}`}default:{let o=t?`${u("cyan",E)} `:"",a=t?u("cyan",ie):"";return`${r}${o}${i}
43
43
  ${a}
44
- `}}}}).prompt();import ls from"os";import cs from"path";import{existsSync as Er,readFileSync as xr,writeFileSync as ni,mkdirSync as oi}from"fs";import Rr from"os";import $t from"path";var Tr=$t.join(Rr.homedir(),".eazy-git"),gt=$t.join(Tr,"config.json"),ft={language:"es",defaultBaseBranch:"release",aiProvider:"claude"};function yt(){try{if(Er(gt)){let e=xr(gt,"utf-8");return{...ft,...JSON.parse(e)}}}catch{}return{...ft}}var vt={welcome:"Bienvenido a",subtitle:"tu CLI de confianza para gestionar ramas en GIT",operationCompleted:"Operacion completada!",operationCancelled:"Operacion cancelada. Saliendo...",unknownCommand:"Comando desconocido",errorExecuting:"Error al ejecutar el comando",version:"eazy-git version",whatToDo:"Que deseas hacer?",addChanges:"Agregar cambios a una rama",createOriginal:"Crear rama original",createTemporal:"Crear rama temporal",notGitRepo:"Este directorio no es un repositorio git",gitNotInstalled:"git no esta instalado en el sistema",currentBranch:"Branch actual",filesChanged:"Archivos con cambios",noChangesPending:"No hay cambios pendientes. Deseas continuar de todas formas?",updatingRefs:"Actualizando referencias remotas...",refsUpdated:"Referencias actualizadas",fetchFailed:"No se pudo hacer fetch (continuando...)",baseBranch:"Desde que branch base quieres crear la rama?",baseBranchRequired:"El branch base es requerido",ticketId:"Cual es el identificador del ticket? (ej: DPW-0000)",ticketRequired:"El ticket es requerido",changeType:"Que tipo de cambio es?",branchExistsLocal:e=>`La rama "${e}" ya existe localmente. Que deseas hacer?`,switchToIt:"Cambiarme a ella y continuar",cancel:"Cancelar",cancelledOp:"Operacion cancelada.",creatingBranch:(e,t)=>`Creando rama ${e} desde origin/${t}...`,branchCreated:e=>`Rama ${e} creada`,errorCreatingBranch:e=>`Error al crear la rama: ${e}`,noFilesToStage:"No hay archivos para stagear.",selectFiles:"Cuales archivos quieres incluir en el commit?",selectAllFiles:"Seleccionar todos los archivos",stagedFiles:"Archivos en stage",stagedCorrect:"Los archivos en stage son correctos?",aiProvider:"Con que IA quieres generar la sugerencia de commit?",generatingCommit:e=>`Generando sugerencia de commit con ${e}...`,aiSuggestionFailed:e=>`No se pudo obtener sugerencia de ${e}. Escribe el mensaje manualmente.`,writeCommitMsg:"Escribe el mensaje de commit:",commitMsgRequired:"El mensaje es requerido",suggestionOf:e=>`Sugerencia de ${e}`,useThisCommit:"Este mensaje de commit te parece bien?",yesUseIt:"Si, usar este",modify:"Modificar",commitSuccess:"Commit realizado correctamente",hookBlocked:"El pre-commit hook bloqueo el commit. Que deseas hacer?",retryHook:"Ya lo corregi, agrega los cambios y vuelve a intentarlo",skipHook:"Saltar el hook (--no-verify)",commitNoHooks:"Commit realizado (sin hooks)",pushToRemote:"Deseas subir la rama al repositorio remoto?",pushSuccess:"Push realizado",pushForceQuestion:"La rama ya existe en el remoto con historial diferente. Deseas forzar el push? (git push -f)",pushForceSuccess:"Push forzado realizado",pushForceError:e=>`Error en el push forzado: ${e}`,pushError:e=>`Error en el push: ${e}`,summaryTitle:"Resumen",summaryBranch:"Rama",summaryFrom:"Desde",summaryCommit:"Commit",summaryFiles:e=>`${e} archivos commiteados`,summaryPush:"Push",summaryPR:"Crear PR",statusModified:"modificado",statusAdded:"agregado",statusDeleted:"eliminado",statusRenamed:"renombrado",statusUntracked:"sin rastrear",commitTypes:{fix:"fix \u2014 correccion de bug",feat:"feat \u2014 nueva funcionalidad",refactor:"refactor \u2014 mejora sin cambio funcional",chore:"chore \u2014 mantenimiento, dependencias",docs:"docs \u2014 documentacion",test:"test \u2014 pruebas",ci:"ci \u2014 integracion continua",perf:"perf \u2014 rendimiento",style:"style \u2014 formato, sin cambio de logica"},selectBranchType:"Selecciona el tipo de rama:",branchFix:"Fix",branchImprovement:"Mejora",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creando rama original...",branchCreatedAndPushed:e=>`Rama "${e}" creada y pusheada correctamente!`,branchCreatedSuccess:e=>`Rama "${e}" creada correctamente!`,mergeBranchQuestion:"A que rama deseas hacer merge?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Rama temporal creada correctamente",temporalBranchMerged:"Rama temporal mergeada correctamente",conflictsDetected:"Conflictos detectados. Resolvelos manualmente!",branchPushedToRemote:"Rama pusheada al repositorio remoto",removeTemporalBranch:"Deseas eliminar la rama temporal?",temporalBranchDeleted:"Rama temporal eliminada correctamente",errorCreatingTemporal:"Error creando la rama temporal",enterJiraCode:"Ingresa el codigo del ticket JIRA:",jiraRequired:"El codigo JIRA es requerido!",jiraInvalidFormat:"El codigo JIRA debe tener el formato DPW-0000",fetchingRemote:"Obteniendo cambios remotos...",pullingChanges:"Aplicando cambios en tu rama...",pullError:e=>`Error: ${e}`,pushingChanges:"Subiendo cambios al remoto...",pushedSuccess:"Cambios subidos correctamente!",pushedForceSuccess:"Cambios subidos (forzado) correctamente!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Proporciona un mensaje de commit",stagingChanges:"Stageando cambios...",creatingCommit:"Creando commit...",commitCreated:"Commit creado correctamente!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Cambiando a la rama anterior...",switchedTo:e=>`Cambiado a rama ${e} correctamente!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Obteniendo ultimos cambios...",mergingWith:e=>`Mergeando con ${e}...`,pushingMerged:"Subiendo cambios mergeados...",mergeCompleted:"Merge completado correctamente!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Eliminando ultimo commit...",removeLastConfirm:"Esto eliminara el ultimo commit (los cambios se mantienen en staging). Continuar?",lastCommitRemoved:"Ultimo commit eliminado correctamente!",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Configurando tu entorno",configSaved:"Configuracion guardada",missingConfigValues:"Faltan valores de configuracion requeridos.",errorWritingConfig:"Error escribiendo archivo de configuracion:",currentConfig:"Configuracion actual",useThisConfig:"Deseas usar esta configuracion?",installingDeps:"Instalando dependencias...",depsInstalled:"Todas las dependencias fueron instaladas",authFailed:"Autenticacion fallida",unexpectedError:"Ocurrio un error inesperado",enterEndpoint:"Ingresa la URL del endpoint:",urlRequired:"La URL es requerida!",urlMustBeHttp:"La URL debe usar protocolo HTTP/HTTPS",urlMustHaveHost:"La URL debe incluir un hostname",urlInvalid:"Ingresa una URL valida",enterApiKey:"Ingresa tu apikey:",apiKeyRequired:"El API key es requerido!",enterRegistryName:"Ingresa el nombre del registro NPM (sin caracteres especiales):",registryNameRequired:"El nombre del registro es requerido!",registryNameLettersOnly:"El nombre del registro debe contener solo letras",enterRegistryURL:"Ingresa la URL del registro NPM (sin http/https):",registryURLRequired:"La URL del registro es requerida!",registryURLStartWithName:"La URL debe empezar con un nombre, evita caracteres especiales",registryURLNoProtocol:"La URL no debe incluir protocolo 'http/https' y debe empezar con una letra",registryURLNoSlash:"La URL no debe empezar con '/' y debe empezar con una letra o numero",registryURLNoWWW:"La URL no debe empezar con 'www' y debe empezar con una letra o numero",currentVersionLabel:"Version actual",checkingUpdates:"Buscando actualizaciones...",upgradeCheckFailed:"No se pudo verificar la ultima version",alreadyLatest:e=>`Ya tienes la ultima version (${e})`,upgrading:e=>`Actualizando a v${e}...`,upgradeError:"Error al actualizar eazy-git",upgradeSuccess:e=>`eazy-git actualizado a v${e}!`,languageSelect:"Selecciona el idioma de la interfaz:",languageChanged:e=>`Idioma cambiado a: ${e}`,configMenu:"Que deseas configurar?",configLanguage:"Cambiar idioma",configDefaultBranch:"Rama base por defecto",configAIProvider:"Proveedor de IA por defecto",configView:"Ver configuracion actual",defaultBranchSet:e=>`Rama base por defecto: ${e}`,aiProviderSet:e=>`Proveedor de IA por defecto: ${e}`,goBack:"Volver"};var bt={welcome:"Welcome to",subtitle:"your trusted CLI for GIT branch management",operationCompleted:"Operation completed!",operationCancelled:"Operation cancelled. Exiting...",unknownCommand:"Unknown command",errorExecuting:"Error executing command",version:"eazy-git version",whatToDo:"What would you like to do?",addChanges:"Add Changes to Branch",createOriginal:"Create Original Branch",createTemporal:"Create Temporal Branch",notGitRepo:"This directory is not a git repository",gitNotInstalled:"git is not installed on the system",currentBranch:"Current branch",filesChanged:"Files with changes",noChangesPending:"No pending changes. Do you want to continue anyway?",updatingRefs:"Updating remote references...",refsUpdated:"References updated",fetchFailed:"Could not fetch (continuing...)",baseBranch:"From which base branch do you want to create the branch?",baseBranchRequired:"Base branch is required",ticketId:"What is the ticket identifier? (e.g.: DPW-0000)",ticketRequired:"Ticket is required",changeType:"What type of change is this?",branchExistsLocal:e=>`Branch "${e}" already exists locally. What would you like to do?`,switchToIt:"Switch to it and continue",cancel:"Cancel",cancelledOp:"Operation cancelled.",creatingBranch:(e,t)=>`Creating branch ${e} from origin/${t}...`,branchCreated:e=>`Branch ${e} created`,errorCreatingBranch:e=>`Error creating branch: ${e}`,noFilesToStage:"No files to stage.",selectFiles:"Which files do you want to include in the commit?",selectAllFiles:"Select all files",stagedFiles:"Staged files",stagedCorrect:"Are the staged files correct?",aiProvider:"Which AI do you want to use for the commit suggestion?",generatingCommit:e=>`Generating commit suggestion with ${e}...`,aiSuggestionFailed:e=>`Could not get suggestion from ${e}. Write the message manually.`,writeCommitMsg:"Write the commit message:",commitMsgRequired:"Message is required",suggestionOf:e=>`${e} suggestion`,useThisCommit:"Does this commit message look good?",yesUseIt:"Yes, use it",modify:"Modify",commitSuccess:"Commit created successfully",hookBlocked:"The pre-commit hook blocked the commit. What would you like to do?",retryHook:"I fixed it, re-stage and retry",skipHook:"Skip the hook (--no-verify)",commitNoHooks:"Commit created (without hooks)",pushToRemote:"Do you want to push the branch to the remote repository?",pushSuccess:"Push completed",pushForceQuestion:"The branch already exists on remote with different history. Force push? (git push -f)",pushForceSuccess:"Force push completed",pushForceError:e=>`Error in force push: ${e}`,pushError:e=>`Error in push: ${e}`,summaryTitle:"Summary",summaryBranch:"Branch",summaryFrom:"From",summaryCommit:"Commit",summaryFiles:e=>`${e} files committed`,summaryPush:"Push",summaryPR:"Create PR",statusModified:"modified",statusAdded:"added",statusDeleted:"deleted",statusRenamed:"renamed",statusUntracked:"untracked",commitTypes:{fix:"fix - bug fix",feat:"feat - new feature",refactor:"refactor - improvement without functional change",chore:"chore - maintenance, dependencies",docs:"docs - documentation",test:"test - testing",ci:"ci - continuous integration",perf:"perf - performance",style:"style - formatting, no logic change"},selectBranchType:"Select the branch type:",branchFix:"Fix",branchImprovement:"Improvement",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creating original branch...",branchCreatedAndPushed:e=>`Branch "${e}" created and pushed successfully!`,branchCreatedSuccess:e=>`Branch "${e}" created successfully!`,mergeBranchQuestion:"Which branch do you want to merge into?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Temporal branch created successfully",temporalBranchMerged:"Temporal branch merged successfully",conflictsDetected:"Conflicts detected. Please resolve them manually!",branchPushedToRemote:"Branch pushed to remote repository",removeTemporalBranch:"Do you want to remove the temporal branch?",temporalBranchDeleted:"Temporal branch deleted successfully",errorCreatingTemporal:"Error creating the temporal branch",enterJiraCode:"Enter the JIRA ticket code:",jiraRequired:"JIRA code is required!",jiraInvalidFormat:"JIRA code must have the format DPW-0000",fetchingRemote:"Fetching remote changes...",pullingChanges:"Pulling changes into your branch...",pullError:e=>`Error: ${e}`,pushingChanges:"Pushing changes to remote...",pushedSuccess:"Changes pushed successfully!",pushedForceSuccess:"Changes pushed (force) successfully!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Please provide a commit message",stagingChanges:"Staging changes...",creatingCommit:"Creating commit...",commitCreated:"Commit created successfully!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Switching to previous branch...",switchedTo:e=>`Successfully switched to ${e} branch!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Fetching latest changes...",mergingWith:e=>`Merging with ${e}...`,pushingMerged:"Pushing merged changes...",mergeCompleted:"Merge completed successfully!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Removing last commit...",removeLastConfirm:"This will remove the last commit (changes will remain in staging). Continue?",lastCommitRemoved:"Last commit removed successfully!",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Setting up your configuration",configSaved:"Configuration saved",missingConfigValues:"Missing required configuration values.",errorWritingConfig:"Error writing configuration file:",currentConfig:"Current configuration",useThisConfig:"Would you like to use this configuration?",installingDeps:"Installing dependencies...",depsInstalled:"All dependencies were installed",authFailed:"Authentication failed",unexpectedError:"An unexpected error occurred",enterEndpoint:"Enter your endpoint URL:",urlRequired:"URL is required!",urlMustBeHttp:"URL must use HTTP/HTTPS protocol",urlMustHaveHost:"URL must include a hostname",urlInvalid:"Please enter a valid URL",enterApiKey:"Enter your apikey:",apiKeyRequired:"API key is required!",enterRegistryName:"Enter your NPM registry name (without special characters):",registryNameRequired:"Registry name is required!",registryNameLettersOnly:"Registry name must contain only letters",enterRegistryURL:"Enter your NPM registry URL (without http/https):",registryURLRequired:"Registry URL is required!",registryURLStartWithName:"URL must start with a name only, avoid special characters",registryURLNoProtocol:"URL must not include 'http/https' protocol and must start with a letter",registryURLNoSlash:"URL must not start with '/' and must begin with a letter or number",registryURLNoWWW:"URL must not start with 'www' and must begin with a letter or number",currentVersionLabel:"Current version",checkingUpdates:"Checking for updates...",upgradeCheckFailed:"Could not check the latest version",alreadyLatest:e=>`Already on the latest version (${e})`,upgrading:e=>`Upgrading to v${e}...`,upgradeError:"Error upgrading eazy-git",upgradeSuccess:e=>`eazy-git upgraded to v${e}!`,languageSelect:"Select the interface language:",languageChanged:e=>`Language changed to: ${e}`,configMenu:"What would you like to configure?",configLanguage:"Change language",configDefaultBranch:"Default base branch",configAIProvider:"Default AI provider",configView:"View current configuration",defaultBranchSet:e=>`Default base branch: ${e}`,aiProviderSet:e=>`Default AI provider: ${e}`,goBack:"Go back"};var wt={es:vt,en:bt};function l(e,...t){let s=yt().language||"es",n=(wt[s]||wt.es)[e];return typeof n=="function"?n(...t):n||e}function O(e){if(pe(e))return ht(l("operationCancelled")),process.exit(0)}var Ct=(e=0)=>t=>`\x1B[${t+e}m`,It=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,St=(e=0)=>(t,r,s)=>`\x1B[${38+e};2;${t};${r};${s}m`,$={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},vi=Object.keys($.modifier),_r=Object.keys($.color),Fr=Object.keys($.bgColor),bi=[..._r,...Fr];function Mr(){let e=new Map;for(let[t,r]of Object.entries($)){for(let[s,i]of Object.entries(r))$[s]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[s]=$[s],e.set(i[0],i[1]);Object.defineProperty($,t,{value:r,enumerable:!1})}return Object.defineProperty($,"codes",{value:e,enumerable:!1}),$.color.close="\x1B[39m",$.bgColor.close="\x1B[49m",$.color.ansi=Ct(),$.color.ansi256=It(),$.color.ansi16m=St(),$.bgColor.ansi=Ct(10),$.bgColor.ansi256=It(10),$.bgColor.ansi16m=St(10),Object.defineProperties($,{rgbToAnsi256:{value(t,r,s){return t===r&&r===s?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(s/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[s]=r;s.length===3&&(s=[...s].map(n=>n+n).join(""));let i=Number.parseInt(s,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>$.rgbToAnsi256(...$.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,s,i;if(t>=232)r=((t-232)*10+8)/255,s=r,i=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,s=Math.floor(a/6)/5,i=a%6/5}let n=Math.max(r,s,i)*2;if(n===0)return 30;let o=30+(Math.round(i)<<2|Math.round(s)<<1|Math.round(r));return n===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,r,s)=>$.ansi256ToAnsi($.rgbToAnsi256(t,r,s)),enumerable:!1},hexToAnsi:{value:t=>$.ansi256ToAnsi($.hexToAnsi256(t)),enumerable:!1}}),$}var Ar=Mr(),N=Ar;import Fe from"node:process";import Lr from"node:os";import Et from"node:tty";function A(e,t=globalThis.Deno?globalThis.Deno.args:Fe.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",s=t.indexOf(r+e),i=t.indexOf("--");return s!==-1&&(i===-1||s<i)}var{env:w}=Fe,ge;A("no-color")||A("no-colors")||A("color=false")||A("color=never")?ge=0:(A("color")||A("colors")||A("color=true")||A("color=always"))&&(ge=1);function Or(){if("FORCE_COLOR"in w)return w.FORCE_COLOR==="true"?1:w.FORCE_COLOR==="false"?0:w.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(w.FORCE_COLOR,10),3)}function Nr(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function kr(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let s=Or();s!==void 0&&(ge=s);let i=r?ge:s;if(i===0)return 0;if(r){if(A("color=16m")||A("color=full")||A("color=truecolor"))return 3;if(A("color=256"))return 2}if("TF_BUILD"in w&&"AGENT_NAME"in w)return 1;if(e&&!t&&i===void 0)return 0;let n=i||0;if(w.TERM==="dumb")return n;if(Fe.platform==="win32"){let o=Lr.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in w)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in w)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in w)||w.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in w)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(w.TEAMCITY_VERSION)?1:0;if(w.COLORTERM==="truecolor"||w.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in w){let o=Number.parseInt((w.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(w.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(w.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(w.TERM)||"COLORTERM"in w?1:n}function xt(e,t={}){let r=kr(e,{streamIsTTY:e&&e.isTTY,...t});return Nr(r)}var Pr={stdout:xt({isTTY:Et.isatty(1)}),stderr:xt({isTTY:Et.isatty(2)})},Rt=Pr;function Tt(e,t,r){let s=e.indexOf(t);if(s===-1)return e;let i=t.length,n=0,o="";do o+=e.slice(n,s)+t+r,n=s+i,s=e.indexOf(t,n);while(s!==-1);return o+=e.slice(n),o}function _t(e,t,r,s){let i=0,n="";do{let o=e[s-1]==="\r";n+=e.slice(i,o?s-1:s)+t+(o?`\r
44
+ `}}}}).prompt();import ls from"os";import cs from"path";import{existsSync as Er,readFileSync as xr,writeFileSync as ni,mkdirSync as oi}from"fs";import Rr from"os";import $t from"path";var Tr=$t.join(Rr.homedir(),".eazy-git"),gt=$t.join(Tr,"config.json"),ft={language:"es",defaultBaseBranch:"release",aiProvider:"claude"};function yt(){try{if(Er(gt)){let e=xr(gt,"utf-8");return{...ft,...JSON.parse(e)}}}catch{}return{...ft}}var vt={welcome:"Bienvenido a",subtitle:"tu CLI de confianza para gestionar ramas en GIT",operationCompleted:"Operacion completada!",operationCancelled:"Operacion cancelada. Saliendo...",unknownCommand:"Comando desconocido",errorExecuting:"Error al ejecutar el comando",version:"eazy-git version",whatToDo:"Que deseas hacer?",addChanges:"Agregar cambios a una rama",createOriginal:"Crear rama original",createTemporal:"Crear rama temporal",notGitRepo:"Este directorio no es un repositorio git",gitNotInstalled:"git no esta instalado en el sistema",currentBranch:"Branch actual",filesChanged:"Archivos con cambios",noChangesPending:"No hay cambios pendientes. Deseas continuar de todas formas?",updatingRefs:"Actualizando referencias remotas...",refsUpdated:"Referencias actualizadas",fetchFailed:"No se pudo hacer fetch (continuando...)",baseBranch:"Desde que branch base quieres crear la rama?",baseBranchRequired:"El branch base es requerido",ticketId:"Cual es el identificador del ticket? (ej: DPW-0000)",ticketRequired:"El ticket es requerido",changeType:"Que tipo de cambio es?",branchExistsLocal:e=>`La rama "${e}" ya existe localmente. Que deseas hacer?`,switchToIt:"Cambiarme a ella y continuar",cancel:"Cancelar",cancelledOp:"Operacion cancelada.",creatingBranch:(e,t)=>`Creando rama ${e} desde origin/${t}...`,branchCreated:e=>`Rama ${e} creada`,errorCreatingBranch:e=>`Error al crear la rama: ${e}`,noFilesToStage:"No hay archivos para stagear.",selectFiles:"Cuales archivos quieres incluir en el commit?",selectAllFiles:"Seleccionar todos los archivos",stagedFiles:"Archivos en stage",stagedCorrect:"Los archivos en stage son correctos?",aiProvider:"Con que IA quieres generar la sugerencia de commit?",generatingCommit:e=>`Generando sugerencia de commit con ${e}...`,aiSuggestionFailed:e=>`No se pudo obtener sugerencia de ${e}. Escribe el mensaje manualmente.`,writeCommitMsg:"Escribe el mensaje de commit:",commitMsgRequired:"El mensaje es requerido",suggestionOf:e=>`Sugerencia de ${e}`,useThisCommit:"Este mensaje de commit te parece bien?",yesUseIt:"Si, usar este",modify:"Modificar",commitSuccess:"Commit realizado correctamente",hookBlocked:"El pre-commit hook bloqueo el commit. Que deseas hacer?",retryHook:"Ya lo corregi, agrega los cambios y vuelve a intentarlo",skipHook:"Saltar el hook (--no-verify)",commitNoHooks:"Commit realizado (sin hooks)",pushToRemote:"Deseas subir la rama al repositorio remoto?",pushSuccess:"Push realizado",pushForceQuestion:"La rama ya existe en el remoto con historial diferente. Deseas forzar el push? (git push -f)",pushForceSuccess:"Push forzado realizado",pushForceError:e=>`Error en el push forzado: ${e}`,pushError:e=>`Error en el push: ${e}`,summaryTitle:"Resumen",summaryBranch:"Rama",summaryFrom:"Desde",summaryCommit:"Commit",summaryFiles:e=>`${e} archivos commiteados`,summaryPush:"Push",summaryPR:"Crear PR",statusModified:"modificado",statusAdded:"agregado",statusDeleted:"eliminado",statusRenamed:"renombrado",statusUntracked:"sin rastrear",commitTypes:{fix:"fix \u2014 correccion de bug",feat:"feat \u2014 nueva funcionalidad",refactor:"refactor \u2014 mejora sin cambio funcional",chore:"chore \u2014 mantenimiento, dependencias",docs:"docs \u2014 documentacion",test:"test \u2014 pruebas",ci:"ci \u2014 integracion continua",perf:"perf \u2014 rendimiento",style:"style \u2014 formato, sin cambio de logica"},selectBranchType:"Selecciona el tipo de rama:",branchFix:"Fix",branchImprovement:"Mejora",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creando rama original...",branchCreatedAndPushed:e=>`Rama "${e}" creada y pusheada correctamente!`,branchCreatedSuccess:e=>`Rama "${e}" creada correctamente!`,mergeBranchQuestion:"A que rama deseas hacer merge?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Rama temporal creada correctamente",temporalBranchMerged:"Rama temporal mergeada correctamente",conflictsDetected:"Conflictos detectados. Resolvelos manualmente!",branchPushedToRemote:"Rama pusheada al repositorio remoto",removeTemporalBranch:"Deseas eliminar la rama temporal?",temporalBranchDeleted:"Rama temporal eliminada correctamente",errorCreatingTemporal:"Error creando la rama temporal",enterJiraCode:"Ingresa el codigo del ticket JIRA:",jiraRequired:"El codigo JIRA es requerido!",jiraInvalidFormat:"El codigo JIRA debe tener el formato DPW-0000",fetchingRemote:"Obteniendo cambios remotos...",pullingChanges:"Aplicando cambios en tu rama...",pullError:e=>`Error: ${e}`,pushingChanges:"Subiendo cambios al remoto...",pushedSuccess:"Cambios subidos correctamente!",pushedForceSuccess:"Cambios subidos (forzado) correctamente!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Proporciona un mensaje de commit",stagingChanges:"Stageando cambios...",creatingCommit:"Creando commit...",commitCreated:"Commit creado correctamente!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Cambiando a la rama anterior...",switchedTo:e=>`Cambiado a rama ${e} correctamente!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Obteniendo ultimos cambios...",mergingWith:e=>`Mergeando con ${e}...`,pushingMerged:"Subiendo cambios mergeados...",mergeCompleted:"Merge completado correctamente!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Eliminando ultimo commit...",removeLastConfirm:"Esto eliminara el ultimo commit (los cambios se mantienen en staging). Continuar?",lastCommitRemoved:e=>`commit ${e} eliminado correctamente`,removedCommitDetail:"Detalle del commit",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Configurando tu entorno",configSaved:"Configuracion guardada",missingConfigValues:"Faltan valores de configuracion requeridos.",errorWritingConfig:"Error escribiendo archivo de configuracion:",currentConfig:"Configuracion actual",useThisConfig:"Deseas usar esta configuracion?",installingDeps:"Instalando dependencias...",depsInstalled:"Todas las dependencias fueron instaladas",authFailed:"Autenticacion fallida",unexpectedError:"Ocurrio un error inesperado",enterEndpoint:"Ingresa la URL del endpoint:",urlRequired:"La URL es requerida!",urlMustBeHttp:"La URL debe usar protocolo HTTP/HTTPS",urlMustHaveHost:"La URL debe incluir un hostname",urlInvalid:"Ingresa una URL valida",enterApiKey:"Ingresa tu apikey:",apiKeyRequired:"El API key es requerido!",enterRegistryName:"Ingresa el nombre del registro NPM (sin caracteres especiales):",registryNameRequired:"El nombre del registro es requerido!",registryNameLettersOnly:"El nombre del registro debe contener solo letras",enterRegistryURL:"Ingresa la URL del registro NPM (sin http/https):",registryURLRequired:"La URL del registro es requerida!",registryURLStartWithName:"La URL debe empezar con un nombre, evita caracteres especiales",registryURLNoProtocol:"La URL no debe incluir protocolo 'http/https' y debe empezar con una letra",registryURLNoSlash:"La URL no debe empezar con '/' y debe empezar con una letra o numero",registryURLNoWWW:"La URL no debe empezar con 'www' y debe empezar con una letra o numero",currentVersionLabel:"Version actual",checkingUpdates:"Buscando actualizaciones...",upgradeCheckFailed:"No se pudo verificar la ultima version",alreadyLatest:e=>`Ya tienes la ultima version (${e})`,upgrading:e=>`Actualizando a v${e}...`,upgradeError:"Error al actualizar eazy-git",upgradeSuccess:e=>`eazy-git actualizado a v${e}!`,languageSelect:"Selecciona el idioma de la interfaz:",languageChanged:e=>`Idioma cambiado a: ${e}`,configMenu:"Que deseas configurar?",configLanguage:"Cambiar idioma",configDefaultBranch:"Rama base por defecto",configAIProvider:"Proveedor de IA por defecto",configView:"Ver configuracion actual",defaultBranchSet:e=>`Rama base por defecto: ${e}`,aiProviderSet:e=>`Proveedor de IA por defecto: ${e}`,goBack:"Volver"};var bt={welcome:"Welcome to",subtitle:"your trusted CLI for GIT branch management",operationCompleted:"Operation completed!",operationCancelled:"Operation cancelled. Exiting...",unknownCommand:"Unknown command",errorExecuting:"Error executing command",version:"eazy-git version",whatToDo:"What would you like to do?",addChanges:"Add Changes to Branch",createOriginal:"Create Original Branch",createTemporal:"Create Temporal Branch",notGitRepo:"This directory is not a git repository",gitNotInstalled:"git is not installed on the system",currentBranch:"Current branch",filesChanged:"Files with changes",noChangesPending:"No pending changes. Do you want to continue anyway?",updatingRefs:"Updating remote references...",refsUpdated:"References updated",fetchFailed:"Could not fetch (continuing...)",baseBranch:"From which base branch do you want to create the branch?",baseBranchRequired:"Base branch is required",ticketId:"What is the ticket identifier? (e.g.: DPW-0000)",ticketRequired:"Ticket is required",changeType:"What type of change is this?",branchExistsLocal:e=>`Branch "${e}" already exists locally. What would you like to do?`,switchToIt:"Switch to it and continue",cancel:"Cancel",cancelledOp:"Operation cancelled.",creatingBranch:(e,t)=>`Creating branch ${e} from origin/${t}...`,branchCreated:e=>`Branch ${e} created`,errorCreatingBranch:e=>`Error creating branch: ${e}`,noFilesToStage:"No files to stage.",selectFiles:"Which files do you want to include in the commit?",selectAllFiles:"Select all files",stagedFiles:"Staged files",stagedCorrect:"Are the staged files correct?",aiProvider:"Which AI do you want to use for the commit suggestion?",generatingCommit:e=>`Generating commit suggestion with ${e}...`,aiSuggestionFailed:e=>`Could not get suggestion from ${e}. Write the message manually.`,writeCommitMsg:"Write the commit message:",commitMsgRequired:"Message is required",suggestionOf:e=>`${e} suggestion`,useThisCommit:"Does this commit message look good?",yesUseIt:"Yes, use it",modify:"Modify",commitSuccess:"Commit created successfully",hookBlocked:"The pre-commit hook blocked the commit. What would you like to do?",retryHook:"I fixed it, re-stage and retry",skipHook:"Skip the hook (--no-verify)",commitNoHooks:"Commit created (without hooks)",pushToRemote:"Do you want to push the branch to the remote repository?",pushSuccess:"Push completed",pushForceQuestion:"The branch already exists on remote with different history. Force push? (git push -f)",pushForceSuccess:"Force push completed",pushForceError:e=>`Error in force push: ${e}`,pushError:e=>`Error in push: ${e}`,summaryTitle:"Summary",summaryBranch:"Branch",summaryFrom:"From",summaryCommit:"Commit",summaryFiles:e=>`${e} files committed`,summaryPush:"Push",summaryPR:"Create PR",statusModified:"modified",statusAdded:"added",statusDeleted:"deleted",statusRenamed:"renamed",statusUntracked:"untracked",commitTypes:{fix:"fix - bug fix",feat:"feat - new feature",refactor:"refactor - improvement without functional change",chore:"chore - maintenance, dependencies",docs:"docs - documentation",test:"test - testing",ci:"ci - continuous integration",perf:"perf - performance",style:"style - formatting, no logic change"},selectBranchType:"Select the branch type:",branchFix:"Fix",branchImprovement:"Improvement",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creating original branch...",branchCreatedAndPushed:e=>`Branch "${e}" created and pushed successfully!`,branchCreatedSuccess:e=>`Branch "${e}" created successfully!`,mergeBranchQuestion:"Which branch do you want to merge into?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Temporal branch created successfully",temporalBranchMerged:"Temporal branch merged successfully",conflictsDetected:"Conflicts detected. Please resolve them manually!",branchPushedToRemote:"Branch pushed to remote repository",removeTemporalBranch:"Do you want to remove the temporal branch?",temporalBranchDeleted:"Temporal branch deleted successfully",errorCreatingTemporal:"Error creating the temporal branch",enterJiraCode:"Enter the JIRA ticket code:",jiraRequired:"JIRA code is required!",jiraInvalidFormat:"JIRA code must have the format DPW-0000",fetchingRemote:"Fetching remote changes...",pullingChanges:"Pulling changes into your branch...",pullError:e=>`Error: ${e}`,pushingChanges:"Pushing changes to remote...",pushedSuccess:"Changes pushed successfully!",pushedForceSuccess:"Changes pushed (force) successfully!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Please provide a commit message",stagingChanges:"Staging changes...",creatingCommit:"Creating commit...",commitCreated:"Commit created successfully!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Switching to previous branch...",switchedTo:e=>`Successfully switched to ${e} branch!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Fetching latest changes...",mergingWith:e=>`Merging with ${e}...`,pushingMerged:"Pushing merged changes...",mergeCompleted:"Merge completed successfully!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Removing last commit...",removeLastConfirm:"This will remove the last commit (changes will remain in staging). Continue?",lastCommitRemoved:e=>`commit ${e} removed successfully`,removedCommitDetail:"Commit detail",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Setting up your configuration",configSaved:"Configuration saved",missingConfigValues:"Missing required configuration values.",errorWritingConfig:"Error writing configuration file:",currentConfig:"Current configuration",useThisConfig:"Would you like to use this configuration?",installingDeps:"Installing dependencies...",depsInstalled:"All dependencies were installed",authFailed:"Authentication failed",unexpectedError:"An unexpected error occurred",enterEndpoint:"Enter your endpoint URL:",urlRequired:"URL is required!",urlMustBeHttp:"URL must use HTTP/HTTPS protocol",urlMustHaveHost:"URL must include a hostname",urlInvalid:"Please enter a valid URL",enterApiKey:"Enter your apikey:",apiKeyRequired:"API key is required!",enterRegistryName:"Enter your NPM registry name (without special characters):",registryNameRequired:"Registry name is required!",registryNameLettersOnly:"Registry name must contain only letters",enterRegistryURL:"Enter your NPM registry URL (without http/https):",registryURLRequired:"Registry URL is required!",registryURLStartWithName:"URL must start with a name only, avoid special characters",registryURLNoProtocol:"URL must not include 'http/https' protocol and must start with a letter",registryURLNoSlash:"URL must not start with '/' and must begin with a letter or number",registryURLNoWWW:"URL must not start with 'www' and must begin with a letter or number",currentVersionLabel:"Current version",checkingUpdates:"Checking for updates...",upgradeCheckFailed:"Could not check the latest version",alreadyLatest:e=>`Already on the latest version (${e})`,upgrading:e=>`Upgrading to v${e}...`,upgradeError:"Error upgrading eazy-git",upgradeSuccess:e=>`eazy-git upgraded to v${e}!`,languageSelect:"Select the interface language:",languageChanged:e=>`Language changed to: ${e}`,configMenu:"What would you like to configure?",configLanguage:"Change language",configDefaultBranch:"Default base branch",configAIProvider:"Default AI provider",configView:"View current configuration",defaultBranchSet:e=>`Default base branch: ${e}`,aiProviderSet:e=>`Default AI provider: ${e}`,goBack:"Go back"};var wt={es:vt,en:bt};function l(e,...t){let s=yt().language||"es",n=(wt[s]||wt.es)[e];return typeof n=="function"?n(...t):n||e}function O(e){if(pe(e))return ht(l("operationCancelled")),process.exit(0)}var Ct=(e=0)=>t=>`\x1B[${t+e}m`,It=(e=0)=>t=>`\x1B[${38+e};5;${t}m`,St=(e=0)=>(t,r,s)=>`\x1B[${38+e};2;${t};${r};${s}m`,$={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},vi=Object.keys($.modifier),_r=Object.keys($.color),Fr=Object.keys($.bgColor),bi=[..._r,...Fr];function Mr(){let e=new Map;for(let[t,r]of Object.entries($)){for(let[s,i]of Object.entries(r))$[s]={open:`\x1B[${i[0]}m`,close:`\x1B[${i[1]}m`},r[s]=$[s],e.set(i[0],i[1]);Object.defineProperty($,t,{value:r,enumerable:!1})}return Object.defineProperty($,"codes",{value:e,enumerable:!1}),$.color.close="\x1B[39m",$.bgColor.close="\x1B[49m",$.color.ansi=Ct(),$.color.ansi256=It(),$.color.ansi16m=St(),$.bgColor.ansi=Ct(10),$.bgColor.ansi256=It(10),$.bgColor.ansi16m=St(10),Object.defineProperties($,{rgbToAnsi256:{value(t,r,s){return t===r&&r===s?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(s/255*5)},enumerable:!1},hexToRgb:{value(t){let r=/[a-f\d]{6}|[a-f\d]{3}/i.exec(t.toString(16));if(!r)return[0,0,0];let[s]=r;s.length===3&&(s=[...s].map(n=>n+n).join(""));let i=Number.parseInt(s,16);return[i>>16&255,i>>8&255,i&255]},enumerable:!1},hexToAnsi256:{value:t=>$.rgbToAnsi256(...$.hexToRgb(t)),enumerable:!1},ansi256ToAnsi:{value(t){if(t<8)return 30+t;if(t<16)return 90+(t-8);let r,s,i;if(t>=232)r=((t-232)*10+8)/255,s=r,i=r;else{t-=16;let a=t%36;r=Math.floor(t/36)/5,s=Math.floor(a/6)/5,i=a%6/5}let n=Math.max(r,s,i)*2;if(n===0)return 30;let o=30+(Math.round(i)<<2|Math.round(s)<<1|Math.round(r));return n===2&&(o+=60),o},enumerable:!1},rgbToAnsi:{value:(t,r,s)=>$.ansi256ToAnsi($.rgbToAnsi256(t,r,s)),enumerable:!1},hexToAnsi:{value:t=>$.ansi256ToAnsi($.hexToAnsi256(t)),enumerable:!1}}),$}var Ar=Mr(),N=Ar;import Fe from"node:process";import Lr from"node:os";import Et from"node:tty";function A(e,t=globalThis.Deno?globalThis.Deno.args:Fe.argv){let r=e.startsWith("-")?"":e.length===1?"-":"--",s=t.indexOf(r+e),i=t.indexOf("--");return s!==-1&&(i===-1||s<i)}var{env:w}=Fe,ge;A("no-color")||A("no-colors")||A("color=false")||A("color=never")?ge=0:(A("color")||A("colors")||A("color=true")||A("color=always"))&&(ge=1);function Or(){if("FORCE_COLOR"in w)return w.FORCE_COLOR==="true"?1:w.FORCE_COLOR==="false"?0:w.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(w.FORCE_COLOR,10),3)}function Nr(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function kr(e,{streamIsTTY:t,sniffFlags:r=!0}={}){let s=Or();s!==void 0&&(ge=s);let i=r?ge:s;if(i===0)return 0;if(r){if(A("color=16m")||A("color=full")||A("color=truecolor"))return 3;if(A("color=256"))return 2}if("TF_BUILD"in w&&"AGENT_NAME"in w)return 1;if(e&&!t&&i===void 0)return 0;let n=i||0;if(w.TERM==="dumb")return n;if(Fe.platform==="win32"){let o=Lr.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in w)return["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some(o=>o in w)?3:["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some(o=>o in w)||w.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in w)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(w.TEAMCITY_VERSION)?1:0;if(w.COLORTERM==="truecolor"||w.TERM==="xterm-kitty")return 3;if("TERM_PROGRAM"in w){let o=Number.parseInt((w.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(w.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(w.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(w.TERM)||"COLORTERM"in w?1:n}function xt(e,t={}){let r=kr(e,{streamIsTTY:e&&e.isTTY,...t});return Nr(r)}var Pr={stdout:xt({isTTY:Et.isatty(1)}),stderr:xt({isTTY:Et.isatty(2)})},Rt=Pr;function Tt(e,t,r){let s=e.indexOf(t);if(s===-1)return e;let i=t.length,n=0,o="";do o+=e.slice(n,s)+t+r,n=s+i,s=e.indexOf(t,n);while(s!==-1);return o+=e.slice(n),o}function _t(e,t,r,s){let i=0,n="";do{let o=e[s-1]==="\r";n+=e.slice(i,o?s-1:s)+t+(o?`\r
45
45
  `:`
46
46
  `)+r,i=s+1,s=e.indexOf(`
47
- `,i)}while(s!==-1);return n+=e.slice(i),n}var{stdout:Ft,stderr:Mt}=Rt,Me=Symbol("GENERATOR"),Z=Symbol("STYLER"),ne=Symbol("IS_EMPTY"),At=["ansi","ansi","ansi256","ansi16m"],X=Object.create(null),Br=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Ft?Ft.level:0;e.level=t.level===void 0?r:t.level};var Ur=e=>{let t=(...r)=>r.join(" ");return Br(t,e),Object.setPrototypeOf(t,oe.prototype),t};function oe(e){return Ur(e)}Object.setPrototypeOf(oe.prototype,Function.prototype);for(let[e,t]of Object.entries(N))X[e]={get(){let r=fe(this,Le(t.open,t.close,this[Z]),this[ne]);return Object.defineProperty(this,e,{value:r}),r}};X.visible={get(){let e=fe(this,this[Z],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Ae=(e,t,r,...s)=>e==="rgb"?t==="ansi16m"?N[r].ansi16m(...s):t==="ansi256"?N[r].ansi256(N.rgbToAnsi256(...s)):N[r].ansi(N.rgbToAnsi(...s)):e==="hex"?Ae("rgb",t,r,...N.hexToRgb(...s)):N[r][e](...s),Vr=["rgb","hex","ansi256"];for(let e of Vr){X[e]={get(){let{level:r}=this;return function(...s){let i=Le(Ae(e,At[r],"color",...s),N.color.close,this[Z]);return fe(this,i,this[ne])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);X[t]={get(){let{level:r}=this;return function(...s){let i=Le(Ae(e,At[r],"bgColor",...s),N.bgColor.close,this[Z]);return fe(this,i,this[ne])}}}}var Dr=Object.defineProperties(()=>{},{...X,level:{enumerable:!0,get(){return this[Me].level},set(e){this[Me].level=e}}}),Le=(e,t,r)=>{let s,i;return r===void 0?(s=e,i=t):(s=r.openAll+e,i=t+r.closeAll),{open:e,close:t,openAll:s,closeAll:i,parent:r}},fe=(e,t,r)=>{let s=(...i)=>jr(s,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(s,Dr),s[Me]=e,s[Z]=t,s[ne]=r,s},jr=(e,t)=>{if(e.level<=0||!t)return e[ne]?"":t;let r=e[Z];if(r===void 0)return t;let{openAll:s,closeAll:i}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=Tt(t,r.close,r.open),r=r.parent;let n=t.indexOf(`
48
- `);return n!==-1&&(t=_t(t,i,s,n)),s+t+i};Object.defineProperties(oe.prototype,X);var Gr=oe(),Fi=oe({level:Mt?Mt.level:0});var J=Gr;var ee={primary:"#57d7c4",secondary:"#199288",muted:"#9ca3af",success:"#06D6A0",error:"#EF4444",warning:"#F59E0B"},C={primary:e=>J.hex(ee.primary)(e),secondary:e=>J.hex(ee.secondary)(e),muted:e=>J.hex(ee.muted)(e),success:e=>J.hex(ee.success)(e),error:e=>J.hex(ee.error)(e),warning:e=>J.hex(ee.warning)(e)};var Wr=async()=>{let e=await ct({message:C.secondary(l("useThisConfig"))});return O(e),e},Lt=Wr;import{writeFileSync as Jr}from"fs";import Qr from"os";import Zr from"path";var qr=async()=>{let e=await z({message:C.secondary(l("enterEndpoint")),placeholder:"",initialValue:"",required:!0,validate(t){if(!t?.trim())return l("urlRequired");try{let r=new URL(t);return r.protocol.startsWith("http")?r.hostname?void 0:l("urlMustHaveHost"):l("urlMustBeHttp")}catch{return l("urlInvalid")}}});return O(e),e},Ot=qr;var Hr=async()=>{let e=await z({message:C.secondary(l("enterApiKey")),placeholder:"",initialValue:"",required:!0,validate(t){if(!t?.trim())return l("apiKeyRequired")}});return O(e),e},Nt=Hr;var zr=async()=>{let e=await z({message:C.secondary(l("enterRegistryName")),placeholder:"",initialValue:"",required:!0,validate(t){if(!t?.trim())return l("registryNameRequired");if(!/^[a-zA-Z]+$/.test(t))return l("registryNameLettersOnly")}});return O(e),e},kt=zr;var Kr=async()=>{let e=await z({message:C.secondary(l("enterRegistryURL")),placeholder:"",initialValue:"",required:!0,validate(t){if(!t?.trim())return l("registryURLRequired");if(!/^[a-zA-Z0-9]/.test(t[0].trim()))return l("registryURLStartWithName");if(t.startsWith("http"))return l("registryURLNoProtocol");if(t.startsWith("/"))return l("registryURLNoSlash");if(t.startsWith("www"))return l("registryURLNoWWW")}});return O(e),e},Pt=Kr;var Yr=e=>!e||typeof e!="string"||e?.trim()?.length===0,ae=Yr;var Xr=async()=>{dt(C.primary(l("settingUpConfig")));let e=await Ot(),t=await Nt(),r=await kt(),s=await Pt();if(ae(e)||ae(t)||ae(r)||ae(s)){S.error(l("missingConfigValues")),process.exit(1);return}let i={endpoint:e,apikey:t,registryName:r,registryURL:s},n=`export default ${JSON.stringify(i,null,2)}`;try{let o=Zr.join(Qr.homedir(),"config.js");Jr(o,n),S.success(C.primary(l("configSaved")))}catch(o){S.error(`${l("errorWritingConfig")} ${o.message}`),process.exit(1)}return i},$e=Xr;import{writeFileSync as es}from"fs";import{execSync as ts}from"child_process";async function te({endpoint:e,apikey:t,registryName:r,registryURL:s}){let i=pt();try{i.start(l("installingDeps"));let o=await(await fetch(e,{method:"POST",headers:{apikey:t}})).text(),a=`registry=https://registry.npmjs.org/
47
+ `,i)}while(s!==-1);return n+=e.slice(i),n}var{stdout:Ft,stderr:Mt}=Rt,Me=Symbol("GENERATOR"),Z=Symbol("STYLER"),ne=Symbol("IS_EMPTY"),At=["ansi","ansi","ansi256","ansi16m"],X=Object.create(null),Br=(e,t={})=>{if(t.level&&!(Number.isInteger(t.level)&&t.level>=0&&t.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=Ft?Ft.level:0;e.level=t.level===void 0?r:t.level};var Ur=e=>{let t=(...r)=>r.join(" ");return Br(t,e),Object.setPrototypeOf(t,oe.prototype),t};function oe(e){return Ur(e)}Object.setPrototypeOf(oe.prototype,Function.prototype);for(let[e,t]of Object.entries(N))X[e]={get(){let r=fe(this,Le(t.open,t.close,this[Z]),this[ne]);return Object.defineProperty(this,e,{value:r}),r}};X.visible={get(){let e=fe(this,this[Z],!0);return Object.defineProperty(this,"visible",{value:e}),e}};var Ae=(e,t,r,...s)=>e==="rgb"?t==="ansi16m"?N[r].ansi16m(...s):t==="ansi256"?N[r].ansi256(N.rgbToAnsi256(...s)):N[r].ansi(N.rgbToAnsi(...s)):e==="hex"?Ae("rgb",t,r,...N.hexToRgb(...s)):N[r][e](...s),Dr=["rgb","hex","ansi256"];for(let e of Dr){X[e]={get(){let{level:r}=this;return function(...s){let i=Le(Ae(e,At[r],"color",...s),N.color.close,this[Z]);return fe(this,i,this[ne])}}};let t="bg"+e[0].toUpperCase()+e.slice(1);X[t]={get(){let{level:r}=this;return function(...s){let i=Le(Ae(e,At[r],"bgColor",...s),N.bgColor.close,this[Z]);return fe(this,i,this[ne])}}}}var Vr=Object.defineProperties(()=>{},{...X,level:{enumerable:!0,get(){return this[Me].level},set(e){this[Me].level=e}}}),Le=(e,t,r)=>{let s,i;return r===void 0?(s=e,i=t):(s=r.openAll+e,i=t+r.closeAll),{open:e,close:t,openAll:s,closeAll:i,parent:r}},fe=(e,t,r)=>{let s=(...i)=>jr(s,i.length===1?""+i[0]:i.join(" "));return Object.setPrototypeOf(s,Vr),s[Me]=e,s[Z]=t,s[ne]=r,s},jr=(e,t)=>{if(e.level<=0||!t)return e[ne]?"":t;let r=e[Z];if(r===void 0)return t;let{openAll:s,closeAll:i}=r;if(t.includes("\x1B"))for(;r!==void 0;)t=Tt(t,r.close,r.open),r=r.parent;let n=t.indexOf(`
48
+ `);return n!==-1&&(t=_t(t,i,s,n)),s+t+i};Object.defineProperties(oe.prototype,X);var Gr=oe(),Fi=oe({level:Mt?Mt.level:0});var J=Gr;var ee={primary:"#57d7c4",secondary:"#199288",muted:"#9ca3af",success:"#06D6A0",error:"#EF4444",warning:"#F59E0B"},C={primary:e=>J.hex(ee.primary)(e),secondary:e=>J.hex(ee.secondary)(e),muted:e=>J.hex(ee.muted)(e),success:e=>J.hex(ee.success)(e),error:e=>J.hex(ee.error)(e),warning:e=>J.hex(ee.warning)(e)};var Wr=async()=>{let e=await ct({message:C.secondary(l("useThisConfig"))});return O(e),e},Lt=Wr;import{writeFileSync as Jr}from"fs";import Qr from"os";import Zr from"path";var qr=async()=>{let e=await z({message:C.secondary(l("enterEndpoint")),placeholder:"",initialValue:"",required:!0,validate(t){if(!t?.trim())return l("urlRequired");try{let r=new URL(t);return r.protocol.startsWith("http")?r.hostname?void 0:l("urlMustHaveHost"):l("urlMustBeHttp")}catch{return l("urlInvalid")}}});return O(e),e},Ot=qr;var Hr=async()=>{let e=await z({message:C.secondary(l("enterApiKey")),placeholder:"",initialValue:"",required:!0,validate(t){if(!t?.trim())return l("apiKeyRequired")}});return O(e),e},Nt=Hr;var zr=async()=>{let e=await z({message:C.secondary(l("enterRegistryName")),placeholder:"",initialValue:"",required:!0,validate(t){if(!t?.trim())return l("registryNameRequired");if(!/^[a-zA-Z]+$/.test(t))return l("registryNameLettersOnly")}});return O(e),e},kt=zr;var Kr=async()=>{let e=await z({message:C.secondary(l("enterRegistryURL")),placeholder:"",initialValue:"",required:!0,validate(t){if(!t?.trim())return l("registryURLRequired");if(!/^[a-zA-Z0-9]/.test(t[0].trim()))return l("registryURLStartWithName");if(t.startsWith("http"))return l("registryURLNoProtocol");if(t.startsWith("/"))return l("registryURLNoSlash");if(t.startsWith("www"))return l("registryURLNoWWW")}});return O(e),e},Pt=Kr;var Yr=e=>!e||typeof e!="string"||e?.trim()?.length===0,ae=Yr;var Xr=async()=>{mt(C.primary(l("settingUpConfig")));let e=await Ot(),t=await Nt(),r=await kt(),s=await Pt();if(ae(e)||ae(t)||ae(r)||ae(s)){S.error(l("missingConfigValues")),process.exit(1);return}let i={endpoint:e,apikey:t,registryName:r,registryURL:s},n=`export default ${JSON.stringify(i,null,2)}`;try{let o=Zr.join(Qr.homedir(),"config.js");Jr(o,n),S.success(C.primary(l("configSaved")))}catch(o){S.error(`${l("errorWritingConfig")} ${o.message}`),process.exit(1)}return i},$e=Xr;import{writeFileSync as es}from"fs";import{execSync as ts}from"child_process";async function te({endpoint:e,apikey:t,registryName:r,registryURL:s}){let i=pt();try{i.start(l("installingDeps"));let o=await(await fetch(e,{method:"POST",headers:{apikey:t}})).text(),a=`registry=https://registry.npmjs.org/
49
49
  @${r}:registry=https://${s}/
50
50
  //${s}/:always-auth=true
51
51
  //${s}/:_authToken=${o}
52
- `;es("./.npmrc",a),ts("npm i",{stdio:"inherit"}),i.stop(C.primary(l("depsInstalled"))),mt(C.success(l("operationCompleted")))}catch(n){i.stop(""),S.error(`${l("authFailed")}: ${n.message}`),process.exit(1)}}import{unlinkSync as rs}from"fs";import ss from"os";import is from"path";function Oe(){try{let e=is.join(ss.homedir(),"config.js");rs(e)}catch{}}import ns from"os";import os from"path";var as=async()=>{let t=await import(os.join(ns.homedir(),"config.js")).catch(r=>{S.error(`${l("unexpectedError")}: ${r.message}`),process.exit(1)});return{endpoint:t?.default?.endpoint,apikey:t?.default?.apikey,registryName:t?.default?.registryName,registryURL:t?.default?.registryURL}},Bt=as;function Ne({endpoint:e,apikey:t,registryURL:r,registryName:s}){let i=t.length>8?`${t.slice(0,4)}${"*".repeat(t.length-8)}${t.slice(-4)}`:"****";S.info(`${C.secondary(l("currentConfig"))}
52
+ `;es("./.npmrc",a),ts("npm i",{stdio:"inherit"}),i.stop(C.primary(l("depsInstalled"))),dt(C.success(l("operationCompleted")))}catch(n){i.stop(""),S.error(`${l("authFailed")}: ${n.message}`),process.exit(1)}}import{unlinkSync as rs}from"fs";import ss from"os";import is from"path";function Oe(){try{let e=is.join(ss.homedir(),"config.js");rs(e)}catch{}}import ns from"os";import os from"path";var as=async()=>{let t=await import(os.join(ns.homedir(),"config.js")).catch(r=>{S.error(`${l("unexpectedError")}: ${r.message}`),process.exit(1)});return{endpoint:t?.default?.endpoint,apikey:t?.default?.apikey,registryName:t?.default?.registryName,registryURL:t?.default?.registryURL}},Bt=as;function Ne({endpoint:e,apikey:t,registryURL:r,registryName:s}){let i=t.length>8?`${t.slice(0,4)}${"*".repeat(t.length-8)}${t.slice(-4)}`:"****";S.info(`${C.secondary(l("currentConfig"))}
53
53
  ${C.muted(` endpoint: ${e}`)}
54
54
  ${C.muted(` apikey: ${i}`)}
55
55
  ${C.muted(` registryURL: ${r}`)}
package/dist/run.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- var G=Object.create;var I=Object.defineProperty;var W=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var H=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var K=(e,t,r,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of j(t))!z.call(e,o)&&o!==r&&I(e,o,{get:()=>t[o],enumerable:!(c=W(t,o))||c.enumerable});return e};var S=(e,t,r)=>(r=e!=null?G(q(e)):{},K(t||!e||!e.__esModule?I(r,"default",{value:e,enumerable:!0}):r,e));var f=H((ke,C)=>{"use strict";var p="\x1B",i=`${p}[`,ee="\x07",g={to(e,t){return t?`${i}${t+1};${e+1}H`:`${i}${e+1}G`},move(e,t){let r="";return e<0?r+=`${i}${-e}D`:e>0&&(r+=`${i}${e}C`),t<0?r+=`${i}${-t}A`:t>0&&(r+=`${i}${t}B`),r},up:(e=1)=>`${i}${e}A`,down:(e=1)=>`${i}${e}B`,forward:(e=1)=>`${i}${e}C`,backward:(e=1)=>`${i}${e}D`,nextLine:(e=1)=>`${i}E`.repeat(e),prevLine:(e=1)=>`${i}F`.repeat(e),left:`${i}G`,hide:`${i}?25l`,show:`${i}?25h`,save:`${p}7`,restore:`${p}8`},te={up:(e=1)=>`${i}S`.repeat(e),down:(e=1)=>`${i}T`.repeat(e)},se={screen:`${i}2J`,up:(e=1)=>`${i}1J`.repeat(e),down:(e=1)=>`${i}J`.repeat(e),line:`${i}2K`,lineEnd:`${i}K`,lineStart:`${i}1K`,lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?g.up():"");return e&&(t+=g.left),t}};C.exports={cursor:g,scroll:te,erase:se,beep:ee}});var Y="\x07",Q="[",X="]";var Z=`${X}8;;`,Me=new RegExp(`(?:\\${Q}(?<code>\\d+)m|\\${Z}(?<uri>.*)${Y})`,"y");var E=S(f(),1);var re=["up","down","left","right","space","enter","cancel"],ne=["January","February","March","April","May","June","July","August","September","October","November","December"],$={actions:new Set(re),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0,date:{monthNames:[...ne],messages:{required:"Please enter a valid date",invalidMonth:"There are only 12 months in a year",invalidDay:(e,t)=>`There are only ${e} days in ${t}`,afterMin:e=>`Date must be on or after ${e.toISOString().slice(0,10)}`,beforeMax:e=>`Date must be on or before ${e.toISOString().slice(0,10)}`}}};var Pe=globalThis.process.platform.startsWith("win"),De=Symbol("clack:cancel");import{styleText as u,stripVTControlCharacters as tt}from"node:util";import a from"node:process";var _=S(f(),1);function oe(){return a.platform!=="win32"?a.env.TERM!=="linux":!!a.env.CI||!!a.env.WT_SESSION||!!a.env.TERMINUS_SUBLIME||a.env.ConEmuTask==="{cmd::Cmder}"||a.env.TERM_PROGRAM==="Terminus-Sublime"||a.env.TERM_PROGRAM==="vscode"||a.env.TERM==="xterm-256color"||a.env.TERM==="alacritty"||a.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var ue=oe();var s=(e,t)=>ue?e:t,nt=s("\u25C6","*"),at=s("\u25A0","x"),ot=s("\u25B2","x"),ce=s("\u25C7","o"),ut=s("\u250C","T"),y=s("\u2502","|"),ct=s("\u2514","\u2014"),lt=s("\u2510","T"),ht=s("\u2518","\u2014"),dt=s("\u25CF",">"),mt=s("\u25CB"," "),pt=s("\u25FB","[\u2022]"),gt=s("\u25FC","[+]"),ft=s("\u25FB","[ ]"),$t=s("\u25AA","\u2022"),yt=s("\u2500","-"),vt=s("\u256E","+"),bt=s("\u251C","+"),wt=s("\u256F","+"),It=s("\u2570","+"),St=s("\u256D","+"),le=s("\u25CF","\u2022"),he=s("\u25C6","*"),de=s("\u25B2","!"),me=s("\u25A0","x");var n={message:(e=[],{symbol:t=u("gray",y),secondarySymbol:r=u("gray",y),output:c=process.stdout,spacing:o=1,withGuide:h}={})=>{let l=[],d=h??$.withGuide,O=d?r:"",N=d?`${t} `:"",U=d?`${r} `:"";for(let m=0;m<o;m++)l.push(O);let b=Array.isArray(e)?e:e.split(`
2
+ var G=Object.create;var I=Object.defineProperty;var W=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var H=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var K=(e,t,r,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of j(t))!z.call(e,o)&&o!==r&&I(e,o,{get:()=>t[o],enumerable:!(c=W(t,o))||c.enumerable});return e};var C=(e,t,r)=>(r=e!=null?G(q(e)):{},K(t||!e||!e.__esModule?I(r,"default",{value:e,enumerable:!0}):r,e));var f=H((ke,S)=>{"use strict";var p="\x1B",i=`${p}[`,ee="\x07",g={to(e,t){return t?`${i}${t+1};${e+1}H`:`${i}${e+1}G`},move(e,t){let r="";return e<0?r+=`${i}${-e}D`:e>0&&(r+=`${i}${e}C`),t<0?r+=`${i}${-t}A`:t>0&&(r+=`${i}${t}B`),r},up:(e=1)=>`${i}${e}A`,down:(e=1)=>`${i}${e}B`,forward:(e=1)=>`${i}${e}C`,backward:(e=1)=>`${i}${e}D`,nextLine:(e=1)=>`${i}E`.repeat(e),prevLine:(e=1)=>`${i}F`.repeat(e),left:`${i}G`,hide:`${i}?25l`,show:`${i}?25h`,save:`${p}7`,restore:`${p}8`},te={up:(e=1)=>`${i}S`.repeat(e),down:(e=1)=>`${i}T`.repeat(e)},se={screen:`${i}2J`,up:(e=1)=>`${i}1J`.repeat(e),down:(e=1)=>`${i}J`.repeat(e),line:`${i}2K`,lineEnd:`${i}K`,lineStart:`${i}1K`,lines(e){let t="";for(let r=0;r<e;r++)t+=this.line+(r<e-1?g.up():"");return e&&(t+=g.left),t}};S.exports={cursor:g,scroll:te,erase:se,beep:ee}});var Y="\x07",Q="[",X="]";var Z=`${X}8;;`,Me=new RegExp(`(?:\\${Q}(?<code>\\d+)m|\\${Z}(?<uri>.*)${Y})`,"y");var E=C(f(),1);var re=["up","down","left","right","space","enter","cancel"],ne=["January","February","March","April","May","June","July","August","September","October","November","December"],$={actions:new Set(re),aliases:new Map([["k","up"],["j","down"],["h","left"],["l","right"],["","cancel"],["escape","cancel"]]),messages:{cancel:"Canceled",error:"Something went wrong"},withGuide:!0,date:{monthNames:[...ne],messages:{required:"Please enter a valid date",invalidMonth:"There are only 12 months in a year",invalidDay:(e,t)=>`There are only ${e} days in ${t}`,afterMin:e=>`Date must be on or after ${e.toISOString().slice(0,10)}`,beforeMax:e=>`Date must be on or before ${e.toISOString().slice(0,10)}`}}};var Pe=globalThis.process.platform.startsWith("win"),De=Symbol("clack:cancel");import{styleText as u,stripVTControlCharacters as tt}from"node:util";import a from"node:process";var _=C(f(),1);function oe(){return a.platform!=="win32"?a.env.TERM!=="linux":!!a.env.CI||!!a.env.WT_SESSION||!!a.env.TERMINUS_SUBLIME||a.env.ConEmuTask==="{cmd::Cmder}"||a.env.TERM_PROGRAM==="Terminus-Sublime"||a.env.TERM_PROGRAM==="vscode"||a.env.TERM==="xterm-256color"||a.env.TERM==="alacritty"||a.env.TERMINAL_EMULATOR==="JetBrains-JediTerm"}var ue=oe();var s=(e,t)=>ue?e:t,nt=s("\u25C6","*"),at=s("\u25A0","x"),ot=s("\u25B2","x"),ce=s("\u25C7","o"),ut=s("\u250C","T"),y=s("\u2502","|"),ct=s("\u2514","\u2014"),lt=s("\u2510","T"),ht=s("\u2518","\u2014"),dt=s("\u25CF",">"),mt=s("\u25CB"," "),pt=s("\u25FB","[\u2022]"),gt=s("\u25FC","[+]"),ft=s("\u25FB","[ ]"),$t=s("\u25AA","\u2022"),yt=s("\u2500","-"),vt=s("\u256E","+"),bt=s("\u251C","+"),wt=s("\u256F","+"),It=s("\u2570","+"),Ct=s("\u256D","+"),le=s("\u25CF","\u2022"),he=s("\u25C6","*"),de=s("\u25B2","!"),me=s("\u25A0","x");var n={message:(e=[],{symbol:t=u("gray",y),secondarySymbol:r=u("gray",y),output:c=process.stdout,spacing:o=1,withGuide:h}={})=>{let l=[],d=h??$.withGuide,O=d?r:"",N=d?`${t} `:"",U=d?`${r} `:"";for(let m=0;m<o;m++)l.push(O);let b=Array.isArray(e)?e:e.split(`
3
3
  `);if(b.length>0){let[m,...B]=b;m.length>0?l.push(`${N}${m}`):l.push(d?t:"");for(let w of B)w.length>0?l.push(`${U}${w}`):l.push(d?r:"")}c.write(`${l.join(`
4
4
  `)}
5
- `)},info:(e,t)=>{n.message(e,{...t,symbol:u("blue",le)})},success:(e,t)=>{n.message(e,{...t,symbol:u("green",he)})},step:(e,t)=>{n.message(e,{...t,symbol:u("green",ce)})},warn:(e,t)=>{n.message(e,{...t,symbol:u("yellow",de)})},warning:(e,t)=>{n.warn(e,t)},error:(e,t)=>{n.message(e,{...t,symbol:u("red",me)})}};var Ct={light:s("\u2500","-"),heavy:s("\u2501","="),block:s("\u2588","#")};var Et=`${u("gray",y)} `;import{execSync as x}from"child_process";async function R(){try{x("npm run dev",{stdio:"inherit"})}catch(e){n.error(`Error: ${e.message}`),process.exit(1)}}async function T(){try{x("rm -rf .next && npm run dev",{stdio:"inherit"})}catch(e){n.error(`Error: ${e.message}`),process.exit(1)}}import{existsSync as pe,readFileSync as ge,writeFileSync as Lt,mkdirSync as kt}from"fs";import fe from"os";import L from"path";var $e=L.join(fe.homedir(),".eazy-git"),F=L.join($e,"config.json"),M={language:"es",defaultBaseBranch:"release",aiProvider:"claude"};function k(){try{if(pe(F)){let e=ge(F,"utf-8");return{...M,...JSON.parse(e)}}}catch{}return{...M}}var A={welcome:"Bienvenido a",subtitle:"tu CLI de confianza para gestionar ramas en GIT",operationCompleted:"Operacion completada!",operationCancelled:"Operacion cancelada. Saliendo...",unknownCommand:"Comando desconocido",errorExecuting:"Error al ejecutar el comando",version:"eazy-git version",whatToDo:"Que deseas hacer?",addChanges:"Agregar cambios a una rama",createOriginal:"Crear rama original",createTemporal:"Crear rama temporal",notGitRepo:"Este directorio no es un repositorio git",gitNotInstalled:"git no esta instalado en el sistema",currentBranch:"Branch actual",filesChanged:"Archivos con cambios",noChangesPending:"No hay cambios pendientes. Deseas continuar de todas formas?",updatingRefs:"Actualizando referencias remotas...",refsUpdated:"Referencias actualizadas",fetchFailed:"No se pudo hacer fetch (continuando...)",baseBranch:"Desde que branch base quieres crear la rama?",baseBranchRequired:"El branch base es requerido",ticketId:"Cual es el identificador del ticket? (ej: DPW-0000)",ticketRequired:"El ticket es requerido",changeType:"Que tipo de cambio es?",branchExistsLocal:e=>`La rama "${e}" ya existe localmente. Que deseas hacer?`,switchToIt:"Cambiarme a ella y continuar",cancel:"Cancelar",cancelledOp:"Operacion cancelada.",creatingBranch:(e,t)=>`Creando rama ${e} desde origin/${t}...`,branchCreated:e=>`Rama ${e} creada`,errorCreatingBranch:e=>`Error al crear la rama: ${e}`,noFilesToStage:"No hay archivos para stagear.",selectFiles:"Cuales archivos quieres incluir en el commit?",selectAllFiles:"Seleccionar todos los archivos",stagedFiles:"Archivos en stage",stagedCorrect:"Los archivos en stage son correctos?",aiProvider:"Con que IA quieres generar la sugerencia de commit?",generatingCommit:e=>`Generando sugerencia de commit con ${e}...`,aiSuggestionFailed:e=>`No se pudo obtener sugerencia de ${e}. Escribe el mensaje manualmente.`,writeCommitMsg:"Escribe el mensaje de commit:",commitMsgRequired:"El mensaje es requerido",suggestionOf:e=>`Sugerencia de ${e}`,useThisCommit:"Este mensaje de commit te parece bien?",yesUseIt:"Si, usar este",modify:"Modificar",commitSuccess:"Commit realizado correctamente",hookBlocked:"El pre-commit hook bloqueo el commit. Que deseas hacer?",retryHook:"Ya lo corregi, agrega los cambios y vuelve a intentarlo",skipHook:"Saltar el hook (--no-verify)",commitNoHooks:"Commit realizado (sin hooks)",pushToRemote:"Deseas subir la rama al repositorio remoto?",pushSuccess:"Push realizado",pushForceQuestion:"La rama ya existe en el remoto con historial diferente. Deseas forzar el push? (git push -f)",pushForceSuccess:"Push forzado realizado",pushForceError:e=>`Error en el push forzado: ${e}`,pushError:e=>`Error en el push: ${e}`,summaryTitle:"Resumen",summaryBranch:"Rama",summaryFrom:"Desde",summaryCommit:"Commit",summaryFiles:e=>`${e} archivos commiteados`,summaryPush:"Push",summaryPR:"Crear PR",statusModified:"modificado",statusAdded:"agregado",statusDeleted:"eliminado",statusRenamed:"renombrado",statusUntracked:"sin rastrear",commitTypes:{fix:"fix \u2014 correccion de bug",feat:"feat \u2014 nueva funcionalidad",refactor:"refactor \u2014 mejora sin cambio funcional",chore:"chore \u2014 mantenimiento, dependencias",docs:"docs \u2014 documentacion",test:"test \u2014 pruebas",ci:"ci \u2014 integracion continua",perf:"perf \u2014 rendimiento",style:"style \u2014 formato, sin cambio de logica"},selectBranchType:"Selecciona el tipo de rama:",branchFix:"Fix",branchImprovement:"Mejora",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creando rama original...",branchCreatedAndPushed:e=>`Rama "${e}" creada y pusheada correctamente!`,branchCreatedSuccess:e=>`Rama "${e}" creada correctamente!`,mergeBranchQuestion:"A que rama deseas hacer merge?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Rama temporal creada correctamente",temporalBranchMerged:"Rama temporal mergeada correctamente",conflictsDetected:"Conflictos detectados. Resolvelos manualmente!",branchPushedToRemote:"Rama pusheada al repositorio remoto",removeTemporalBranch:"Deseas eliminar la rama temporal?",temporalBranchDeleted:"Rama temporal eliminada correctamente",errorCreatingTemporal:"Error creando la rama temporal",enterJiraCode:"Ingresa el codigo del ticket JIRA:",jiraRequired:"El codigo JIRA es requerido!",jiraInvalidFormat:"El codigo JIRA debe tener el formato DPW-0000",fetchingRemote:"Obteniendo cambios remotos...",pullingChanges:"Aplicando cambios en tu rama...",pullError:e=>`Error: ${e}`,pushingChanges:"Subiendo cambios al remoto...",pushedSuccess:"Cambios subidos correctamente!",pushedForceSuccess:"Cambios subidos (forzado) correctamente!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Proporciona un mensaje de commit",stagingChanges:"Stageando cambios...",creatingCommit:"Creando commit...",commitCreated:"Commit creado correctamente!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Cambiando a la rama anterior...",switchedTo:e=>`Cambiado a rama ${e} correctamente!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Obteniendo ultimos cambios...",mergingWith:e=>`Mergeando con ${e}...`,pushingMerged:"Subiendo cambios mergeados...",mergeCompleted:"Merge completado correctamente!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Eliminando ultimo commit...",removeLastConfirm:"Esto eliminara el ultimo commit (los cambios se mantienen en staging). Continuar?",lastCommitRemoved:"Ultimo commit eliminado correctamente!",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Configurando tu entorno",configSaved:"Configuracion guardada",missingConfigValues:"Faltan valores de configuracion requeridos.",errorWritingConfig:"Error escribiendo archivo de configuracion:",currentConfig:"Configuracion actual",useThisConfig:"Deseas usar esta configuracion?",installingDeps:"Instalando dependencias...",depsInstalled:"Todas las dependencias fueron instaladas",authFailed:"Autenticacion fallida",unexpectedError:"Ocurrio un error inesperado",enterEndpoint:"Ingresa la URL del endpoint:",urlRequired:"La URL es requerida!",urlMustBeHttp:"La URL debe usar protocolo HTTP/HTTPS",urlMustHaveHost:"La URL debe incluir un hostname",urlInvalid:"Ingresa una URL valida",enterApiKey:"Ingresa tu apikey:",apiKeyRequired:"El API key es requerido!",enterRegistryName:"Ingresa el nombre del registro NPM (sin caracteres especiales):",registryNameRequired:"El nombre del registro es requerido!",registryNameLettersOnly:"El nombre del registro debe contener solo letras",enterRegistryURL:"Ingresa la URL del registro NPM (sin http/https):",registryURLRequired:"La URL del registro es requerida!",registryURLStartWithName:"La URL debe empezar con un nombre, evita caracteres especiales",registryURLNoProtocol:"La URL no debe incluir protocolo 'http/https' y debe empezar con una letra",registryURLNoSlash:"La URL no debe empezar con '/' y debe empezar con una letra o numero",registryURLNoWWW:"La URL no debe empezar con 'www' y debe empezar con una letra o numero",currentVersionLabel:"Version actual",checkingUpdates:"Buscando actualizaciones...",upgradeCheckFailed:"No se pudo verificar la ultima version",alreadyLatest:e=>`Ya tienes la ultima version (${e})`,upgrading:e=>`Actualizando a v${e}...`,upgradeError:"Error al actualizar eazy-git",upgradeSuccess:e=>`eazy-git actualizado a v${e}!`,languageSelect:"Selecciona el idioma de la interfaz:",languageChanged:e=>`Idioma cambiado a: ${e}`,configMenu:"Que deseas configurar?",configLanguage:"Cambiar idioma",configDefaultBranch:"Rama base por defecto",configAIProvider:"Proveedor de IA por defecto",configView:"Ver configuracion actual",defaultBranchSet:e=>`Rama base por defecto: ${e}`,aiProviderSet:e=>`Proveedor de IA por defecto: ${e}`,goBack:"Volver"};var P={welcome:"Welcome to",subtitle:"your trusted CLI for GIT branch management",operationCompleted:"Operation completed!",operationCancelled:"Operation cancelled. Exiting...",unknownCommand:"Unknown command",errorExecuting:"Error executing command",version:"eazy-git version",whatToDo:"What would you like to do?",addChanges:"Add Changes to Branch",createOriginal:"Create Original Branch",createTemporal:"Create Temporal Branch",notGitRepo:"This directory is not a git repository",gitNotInstalled:"git is not installed on the system",currentBranch:"Current branch",filesChanged:"Files with changes",noChangesPending:"No pending changes. Do you want to continue anyway?",updatingRefs:"Updating remote references...",refsUpdated:"References updated",fetchFailed:"Could not fetch (continuing...)",baseBranch:"From which base branch do you want to create the branch?",baseBranchRequired:"Base branch is required",ticketId:"What is the ticket identifier? (e.g.: DPW-0000)",ticketRequired:"Ticket is required",changeType:"What type of change is this?",branchExistsLocal:e=>`Branch "${e}" already exists locally. What would you like to do?`,switchToIt:"Switch to it and continue",cancel:"Cancel",cancelledOp:"Operation cancelled.",creatingBranch:(e,t)=>`Creating branch ${e} from origin/${t}...`,branchCreated:e=>`Branch ${e} created`,errorCreatingBranch:e=>`Error creating branch: ${e}`,noFilesToStage:"No files to stage.",selectFiles:"Which files do you want to include in the commit?",selectAllFiles:"Select all files",stagedFiles:"Staged files",stagedCorrect:"Are the staged files correct?",aiProvider:"Which AI do you want to use for the commit suggestion?",generatingCommit:e=>`Generating commit suggestion with ${e}...`,aiSuggestionFailed:e=>`Could not get suggestion from ${e}. Write the message manually.`,writeCommitMsg:"Write the commit message:",commitMsgRequired:"Message is required",suggestionOf:e=>`${e} suggestion`,useThisCommit:"Does this commit message look good?",yesUseIt:"Yes, use it",modify:"Modify",commitSuccess:"Commit created successfully",hookBlocked:"The pre-commit hook blocked the commit. What would you like to do?",retryHook:"I fixed it, re-stage and retry",skipHook:"Skip the hook (--no-verify)",commitNoHooks:"Commit created (without hooks)",pushToRemote:"Do you want to push the branch to the remote repository?",pushSuccess:"Push completed",pushForceQuestion:"The branch already exists on remote with different history. Force push? (git push -f)",pushForceSuccess:"Force push completed",pushForceError:e=>`Error in force push: ${e}`,pushError:e=>`Error in push: ${e}`,summaryTitle:"Summary",summaryBranch:"Branch",summaryFrom:"From",summaryCommit:"Commit",summaryFiles:e=>`${e} files committed`,summaryPush:"Push",summaryPR:"Create PR",statusModified:"modified",statusAdded:"added",statusDeleted:"deleted",statusRenamed:"renamed",statusUntracked:"untracked",commitTypes:{fix:"fix - bug fix",feat:"feat - new feature",refactor:"refactor - improvement without functional change",chore:"chore - maintenance, dependencies",docs:"docs - documentation",test:"test - testing",ci:"ci - continuous integration",perf:"perf - performance",style:"style - formatting, no logic change"},selectBranchType:"Select the branch type:",branchFix:"Fix",branchImprovement:"Improvement",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creating original branch...",branchCreatedAndPushed:e=>`Branch "${e}" created and pushed successfully!`,branchCreatedSuccess:e=>`Branch "${e}" created successfully!`,mergeBranchQuestion:"Which branch do you want to merge into?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Temporal branch created successfully",temporalBranchMerged:"Temporal branch merged successfully",conflictsDetected:"Conflicts detected. Please resolve them manually!",branchPushedToRemote:"Branch pushed to remote repository",removeTemporalBranch:"Do you want to remove the temporal branch?",temporalBranchDeleted:"Temporal branch deleted successfully",errorCreatingTemporal:"Error creating the temporal branch",enterJiraCode:"Enter the JIRA ticket code:",jiraRequired:"JIRA code is required!",jiraInvalidFormat:"JIRA code must have the format DPW-0000",fetchingRemote:"Fetching remote changes...",pullingChanges:"Pulling changes into your branch...",pullError:e=>`Error: ${e}`,pushingChanges:"Pushing changes to remote...",pushedSuccess:"Changes pushed successfully!",pushedForceSuccess:"Changes pushed (force) successfully!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Please provide a commit message",stagingChanges:"Staging changes...",creatingCommit:"Creating commit...",commitCreated:"Commit created successfully!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Switching to previous branch...",switchedTo:e=>`Successfully switched to ${e} branch!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Fetching latest changes...",mergingWith:e=>`Merging with ${e}...`,pushingMerged:"Pushing merged changes...",mergeCompleted:"Merge completed successfully!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Removing last commit...",removeLastConfirm:"This will remove the last commit (changes will remain in staging). Continue?",lastCommitRemoved:"Last commit removed successfully!",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Setting up your configuration",configSaved:"Configuration saved",missingConfigValues:"Missing required configuration values.",errorWritingConfig:"Error writing configuration file:",currentConfig:"Current configuration",useThisConfig:"Would you like to use this configuration?",installingDeps:"Installing dependencies...",depsInstalled:"All dependencies were installed",authFailed:"Authentication failed",unexpectedError:"An unexpected error occurred",enterEndpoint:"Enter your endpoint URL:",urlRequired:"URL is required!",urlMustBeHttp:"URL must use HTTP/HTTPS protocol",urlMustHaveHost:"URL must include a hostname",urlInvalid:"Please enter a valid URL",enterApiKey:"Enter your apikey:",apiKeyRequired:"API key is required!",enterRegistryName:"Enter your NPM registry name (without special characters):",registryNameRequired:"Registry name is required!",registryNameLettersOnly:"Registry name must contain only letters",enterRegistryURL:"Enter your NPM registry URL (without http/https):",registryURLRequired:"Registry URL is required!",registryURLStartWithName:"URL must start with a name only, avoid special characters",registryURLNoProtocol:"URL must not include 'http/https' protocol and must start with a letter",registryURLNoSlash:"URL must not start with '/' and must begin with a letter or number",registryURLNoWWW:"URL must not start with 'www' and must begin with a letter or number",currentVersionLabel:"Current version",checkingUpdates:"Checking for updates...",upgradeCheckFailed:"Could not check the latest version",alreadyLatest:e=>`Already on the latest version (${e})`,upgrading:e=>`Upgrading to v${e}...`,upgradeError:"Error upgrading eazy-git",upgradeSuccess:e=>`eazy-git upgraded to v${e}!`,languageSelect:"Select the interface language:",languageChanged:e=>`Language changed to: ${e}`,configMenu:"What would you like to configure?",configLanguage:"Change language",configDefaultBranch:"Default base branch",configAIProvider:"Default AI provider",configView:"View current configuration",defaultBranchSet:e=>`Default base branch: ${e}`,aiProviderSet:e=>`Default AI provider: ${e}`,goBack:"Go back"};var D={es:A,en:P};function v(e,...t){let c=k().language||"es",h=(D[c]||D.es)[e];return typeof h=="function"?h(...t):h||e}var V=process.argv[1].split("/").pop(),ye={run:R,runrun:T};async function ve(){try{let e=ye[V];e||(n.error(`${v("unknownCommand")}: ${V}`),process.exit(1)),await e(),process.exit(0)}catch(e){n.error(`${v("errorExecuting")}: ${e.message}`),process.exit(1)}}ve();
5
+ `)},info:(e,t)=>{n.message(e,{...t,symbol:u("blue",le)})},success:(e,t)=>{n.message(e,{...t,symbol:u("green",he)})},step:(e,t)=>{n.message(e,{...t,symbol:u("green",ce)})},warn:(e,t)=>{n.message(e,{...t,symbol:u("yellow",de)})},warning:(e,t)=>{n.warn(e,t)},error:(e,t)=>{n.message(e,{...t,symbol:u("red",me)})}};var St={light:s("\u2500","-"),heavy:s("\u2501","="),block:s("\u2588","#")};var Et=`${u("gray",y)} `;import{execSync as x}from"child_process";async function R(){try{x("npm run dev",{stdio:"inherit"})}catch(e){n.error(`Error: ${e.message}`),process.exit(1)}}async function T(){try{x("rm -rf .next && npm run dev",{stdio:"inherit"})}catch(e){n.error(`Error: ${e.message}`),process.exit(1)}}import{existsSync as pe,readFileSync as ge,writeFileSync as Lt,mkdirSync as kt}from"fs";import fe from"os";import L from"path";var $e=L.join(fe.homedir(),".eazy-git"),F=L.join($e,"config.json"),M={language:"es",defaultBaseBranch:"release",aiProvider:"claude"};function k(){try{if(pe(F)){let e=ge(F,"utf-8");return{...M,...JSON.parse(e)}}}catch{}return{...M}}var A={welcome:"Bienvenido a",subtitle:"tu CLI de confianza para gestionar ramas en GIT",operationCompleted:"Operacion completada!",operationCancelled:"Operacion cancelada. Saliendo...",unknownCommand:"Comando desconocido",errorExecuting:"Error al ejecutar el comando",version:"eazy-git version",whatToDo:"Que deseas hacer?",addChanges:"Agregar cambios a una rama",createOriginal:"Crear rama original",createTemporal:"Crear rama temporal",notGitRepo:"Este directorio no es un repositorio git",gitNotInstalled:"git no esta instalado en el sistema",currentBranch:"Branch actual",filesChanged:"Archivos con cambios",noChangesPending:"No hay cambios pendientes. Deseas continuar de todas formas?",updatingRefs:"Actualizando referencias remotas...",refsUpdated:"Referencias actualizadas",fetchFailed:"No se pudo hacer fetch (continuando...)",baseBranch:"Desde que branch base quieres crear la rama?",baseBranchRequired:"El branch base es requerido",ticketId:"Cual es el identificador del ticket? (ej: DPW-0000)",ticketRequired:"El ticket es requerido",changeType:"Que tipo de cambio es?",branchExistsLocal:e=>`La rama "${e}" ya existe localmente. Que deseas hacer?`,switchToIt:"Cambiarme a ella y continuar",cancel:"Cancelar",cancelledOp:"Operacion cancelada.",creatingBranch:(e,t)=>`Creando rama ${e} desde origin/${t}...`,branchCreated:e=>`Rama ${e} creada`,errorCreatingBranch:e=>`Error al crear la rama: ${e}`,noFilesToStage:"No hay archivos para stagear.",selectFiles:"Cuales archivos quieres incluir en el commit?",selectAllFiles:"Seleccionar todos los archivos",stagedFiles:"Archivos en stage",stagedCorrect:"Los archivos en stage son correctos?",aiProvider:"Con que IA quieres generar la sugerencia de commit?",generatingCommit:e=>`Generando sugerencia de commit con ${e}...`,aiSuggestionFailed:e=>`No se pudo obtener sugerencia de ${e}. Escribe el mensaje manualmente.`,writeCommitMsg:"Escribe el mensaje de commit:",commitMsgRequired:"El mensaje es requerido",suggestionOf:e=>`Sugerencia de ${e}`,useThisCommit:"Este mensaje de commit te parece bien?",yesUseIt:"Si, usar este",modify:"Modificar",commitSuccess:"Commit realizado correctamente",hookBlocked:"El pre-commit hook bloqueo el commit. Que deseas hacer?",retryHook:"Ya lo corregi, agrega los cambios y vuelve a intentarlo",skipHook:"Saltar el hook (--no-verify)",commitNoHooks:"Commit realizado (sin hooks)",pushToRemote:"Deseas subir la rama al repositorio remoto?",pushSuccess:"Push realizado",pushForceQuestion:"La rama ya existe en el remoto con historial diferente. Deseas forzar el push? (git push -f)",pushForceSuccess:"Push forzado realizado",pushForceError:e=>`Error en el push forzado: ${e}`,pushError:e=>`Error en el push: ${e}`,summaryTitle:"Resumen",summaryBranch:"Rama",summaryFrom:"Desde",summaryCommit:"Commit",summaryFiles:e=>`${e} archivos commiteados`,summaryPush:"Push",summaryPR:"Crear PR",statusModified:"modificado",statusAdded:"agregado",statusDeleted:"eliminado",statusRenamed:"renombrado",statusUntracked:"sin rastrear",commitTypes:{fix:"fix \u2014 correccion de bug",feat:"feat \u2014 nueva funcionalidad",refactor:"refactor \u2014 mejora sin cambio funcional",chore:"chore \u2014 mantenimiento, dependencias",docs:"docs \u2014 documentacion",test:"test \u2014 pruebas",ci:"ci \u2014 integracion continua",perf:"perf \u2014 rendimiento",style:"style \u2014 formato, sin cambio de logica"},selectBranchType:"Selecciona el tipo de rama:",branchFix:"Fix",branchImprovement:"Mejora",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creando rama original...",branchCreatedAndPushed:e=>`Rama "${e}" creada y pusheada correctamente!`,branchCreatedSuccess:e=>`Rama "${e}" creada correctamente!`,mergeBranchQuestion:"A que rama deseas hacer merge?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Rama temporal creada correctamente",temporalBranchMerged:"Rama temporal mergeada correctamente",conflictsDetected:"Conflictos detectados. Resolvelos manualmente!",branchPushedToRemote:"Rama pusheada al repositorio remoto",removeTemporalBranch:"Deseas eliminar la rama temporal?",temporalBranchDeleted:"Rama temporal eliminada correctamente",errorCreatingTemporal:"Error creando la rama temporal",enterJiraCode:"Ingresa el codigo del ticket JIRA:",jiraRequired:"El codigo JIRA es requerido!",jiraInvalidFormat:"El codigo JIRA debe tener el formato DPW-0000",fetchingRemote:"Obteniendo cambios remotos...",pullingChanges:"Aplicando cambios en tu rama...",pullError:e=>`Error: ${e}`,pushingChanges:"Subiendo cambios al remoto...",pushedSuccess:"Cambios subidos correctamente!",pushedForceSuccess:"Cambios subidos (forzado) correctamente!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Proporciona un mensaje de commit",stagingChanges:"Stageando cambios...",creatingCommit:"Creando commit...",commitCreated:"Commit creado correctamente!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Cambiando a la rama anterior...",switchedTo:e=>`Cambiado a rama ${e} correctamente!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Obteniendo ultimos cambios...",mergingWith:e=>`Mergeando con ${e}...`,pushingMerged:"Subiendo cambios mergeados...",mergeCompleted:"Merge completado correctamente!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Eliminando ultimo commit...",removeLastConfirm:"Esto eliminara el ultimo commit (los cambios se mantienen en staging). Continuar?",lastCommitRemoved:e=>`commit ${e} eliminado correctamente`,removedCommitDetail:"Detalle del commit",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Configurando tu entorno",configSaved:"Configuracion guardada",missingConfigValues:"Faltan valores de configuracion requeridos.",errorWritingConfig:"Error escribiendo archivo de configuracion:",currentConfig:"Configuracion actual",useThisConfig:"Deseas usar esta configuracion?",installingDeps:"Instalando dependencias...",depsInstalled:"Todas las dependencias fueron instaladas",authFailed:"Autenticacion fallida",unexpectedError:"Ocurrio un error inesperado",enterEndpoint:"Ingresa la URL del endpoint:",urlRequired:"La URL es requerida!",urlMustBeHttp:"La URL debe usar protocolo HTTP/HTTPS",urlMustHaveHost:"La URL debe incluir un hostname",urlInvalid:"Ingresa una URL valida",enterApiKey:"Ingresa tu apikey:",apiKeyRequired:"El API key es requerido!",enterRegistryName:"Ingresa el nombre del registro NPM (sin caracteres especiales):",registryNameRequired:"El nombre del registro es requerido!",registryNameLettersOnly:"El nombre del registro debe contener solo letras",enterRegistryURL:"Ingresa la URL del registro NPM (sin http/https):",registryURLRequired:"La URL del registro es requerida!",registryURLStartWithName:"La URL debe empezar con un nombre, evita caracteres especiales",registryURLNoProtocol:"La URL no debe incluir protocolo 'http/https' y debe empezar con una letra",registryURLNoSlash:"La URL no debe empezar con '/' y debe empezar con una letra o numero",registryURLNoWWW:"La URL no debe empezar con 'www' y debe empezar con una letra o numero",currentVersionLabel:"Version actual",checkingUpdates:"Buscando actualizaciones...",upgradeCheckFailed:"No se pudo verificar la ultima version",alreadyLatest:e=>`Ya tienes la ultima version (${e})`,upgrading:e=>`Actualizando a v${e}...`,upgradeError:"Error al actualizar eazy-git",upgradeSuccess:e=>`eazy-git actualizado a v${e}!`,languageSelect:"Selecciona el idioma de la interfaz:",languageChanged:e=>`Idioma cambiado a: ${e}`,configMenu:"Que deseas configurar?",configLanguage:"Cambiar idioma",configDefaultBranch:"Rama base por defecto",configAIProvider:"Proveedor de IA por defecto",configView:"Ver configuracion actual",defaultBranchSet:e=>`Rama base por defecto: ${e}`,aiProviderSet:e=>`Proveedor de IA por defecto: ${e}`,goBack:"Volver"};var P={welcome:"Welcome to",subtitle:"your trusted CLI for GIT branch management",operationCompleted:"Operation completed!",operationCancelled:"Operation cancelled. Exiting...",unknownCommand:"Unknown command",errorExecuting:"Error executing command",version:"eazy-git version",whatToDo:"What would you like to do?",addChanges:"Add Changes to Branch",createOriginal:"Create Original Branch",createTemporal:"Create Temporal Branch",notGitRepo:"This directory is not a git repository",gitNotInstalled:"git is not installed on the system",currentBranch:"Current branch",filesChanged:"Files with changes",noChangesPending:"No pending changes. Do you want to continue anyway?",updatingRefs:"Updating remote references...",refsUpdated:"References updated",fetchFailed:"Could not fetch (continuing...)",baseBranch:"From which base branch do you want to create the branch?",baseBranchRequired:"Base branch is required",ticketId:"What is the ticket identifier? (e.g.: DPW-0000)",ticketRequired:"Ticket is required",changeType:"What type of change is this?",branchExistsLocal:e=>`Branch "${e}" already exists locally. What would you like to do?`,switchToIt:"Switch to it and continue",cancel:"Cancel",cancelledOp:"Operation cancelled.",creatingBranch:(e,t)=>`Creating branch ${e} from origin/${t}...`,branchCreated:e=>`Branch ${e} created`,errorCreatingBranch:e=>`Error creating branch: ${e}`,noFilesToStage:"No files to stage.",selectFiles:"Which files do you want to include in the commit?",selectAllFiles:"Select all files",stagedFiles:"Staged files",stagedCorrect:"Are the staged files correct?",aiProvider:"Which AI do you want to use for the commit suggestion?",generatingCommit:e=>`Generating commit suggestion with ${e}...`,aiSuggestionFailed:e=>`Could not get suggestion from ${e}. Write the message manually.`,writeCommitMsg:"Write the commit message:",commitMsgRequired:"Message is required",suggestionOf:e=>`${e} suggestion`,useThisCommit:"Does this commit message look good?",yesUseIt:"Yes, use it",modify:"Modify",commitSuccess:"Commit created successfully",hookBlocked:"The pre-commit hook blocked the commit. What would you like to do?",retryHook:"I fixed it, re-stage and retry",skipHook:"Skip the hook (--no-verify)",commitNoHooks:"Commit created (without hooks)",pushToRemote:"Do you want to push the branch to the remote repository?",pushSuccess:"Push completed",pushForceQuestion:"The branch already exists on remote with different history. Force push? (git push -f)",pushForceSuccess:"Force push completed",pushForceError:e=>`Error in force push: ${e}`,pushError:e=>`Error in push: ${e}`,summaryTitle:"Summary",summaryBranch:"Branch",summaryFrom:"From",summaryCommit:"Commit",summaryFiles:e=>`${e} files committed`,summaryPush:"Push",summaryPR:"Create PR",statusModified:"modified",statusAdded:"added",statusDeleted:"deleted",statusRenamed:"renamed",statusUntracked:"untracked",commitTypes:{fix:"fix - bug fix",feat:"feat - new feature",refactor:"refactor - improvement without functional change",chore:"chore - maintenance, dependencies",docs:"docs - documentation",test:"test - testing",ci:"ci - continuous integration",perf:"perf - performance",style:"style - formatting, no logic change"},selectBranchType:"Select the branch type:",branchFix:"Fix",branchImprovement:"Improvement",branchFeature:"Feature",branchRefactor:"Refactor",creatingOriginalBranch:"Creating original branch...",branchCreatedAndPushed:e=>`Branch "${e}" created and pushed successfully!`,branchCreatedSuccess:e=>`Branch "${e}" created successfully!`,mergeBranchQuestion:"Which branch do you want to merge into?",developDEV:"develop (DEV)",releaseUAT:"release (UAT)",temporalBranchCreated:"Temporal branch created successfully",temporalBranchMerged:"Temporal branch merged successfully",conflictsDetected:"Conflicts detected. Please resolve them manually!",branchPushedToRemote:"Branch pushed to remote repository",removeTemporalBranch:"Do you want to remove the temporal branch?",temporalBranchDeleted:"Temporal branch deleted successfully",errorCreatingTemporal:"Error creating the temporal branch",enterJiraCode:"Enter the JIRA ticket code:",jiraRequired:"JIRA code is required!",jiraInvalidFormat:"JIRA code must have the format DPW-0000",fetchingRemote:"Fetching remote changes...",pullingChanges:"Pulling changes into your branch...",pullError:e=>`Error: ${e}`,pushingChanges:"Pushing changes to remote...",pushedSuccess:"Changes pushed successfully!",pushedForceSuccess:"Changes pushed (force) successfully!",pushQuickError:e=>`Error: ${e}`,provideCommitMsg:"Please provide a commit message",stagingChanges:"Staging changes...",creatingCommit:"Creating commit...",commitCreated:"Commit created successfully!",commitError:e=>`Error: ${e}`,switchingPrevBranch:"Switching to previous branch...",switchedTo:e=>`Successfully switched to ${e} branch!`,checkoutError:e=>`Error: ${e}`,fetchingLatest:"Fetching latest changes...",mergingWith:e=>`Merging with ${e}...`,pushingMerged:"Pushing merged changes...",mergeCompleted:"Merge completed successfully!",mergeError:e=>`Error: ${e}`,removingLastCommit:"Removing last commit...",removeLastConfirm:"This will remove the last commit (changes will remain in staging). Continue?",lastCommitRemoved:e=>`commit ${e} removed successfully`,removedCommitDetail:"Commit detail",removeLastError:e=>`Error: ${e}`,logError:e=>`Error: ${e}`,settingUpConfig:"Setting up your configuration",configSaved:"Configuration saved",missingConfigValues:"Missing required configuration values.",errorWritingConfig:"Error writing configuration file:",currentConfig:"Current configuration",useThisConfig:"Would you like to use this configuration?",installingDeps:"Installing dependencies...",depsInstalled:"All dependencies were installed",authFailed:"Authentication failed",unexpectedError:"An unexpected error occurred",enterEndpoint:"Enter your endpoint URL:",urlRequired:"URL is required!",urlMustBeHttp:"URL must use HTTP/HTTPS protocol",urlMustHaveHost:"URL must include a hostname",urlInvalid:"Please enter a valid URL",enterApiKey:"Enter your apikey:",apiKeyRequired:"API key is required!",enterRegistryName:"Enter your NPM registry name (without special characters):",registryNameRequired:"Registry name is required!",registryNameLettersOnly:"Registry name must contain only letters",enterRegistryURL:"Enter your NPM registry URL (without http/https):",registryURLRequired:"Registry URL is required!",registryURLStartWithName:"URL must start with a name only, avoid special characters",registryURLNoProtocol:"URL must not include 'http/https' protocol and must start with a letter",registryURLNoSlash:"URL must not start with '/' and must begin with a letter or number",registryURLNoWWW:"URL must not start with 'www' and must begin with a letter or number",currentVersionLabel:"Current version",checkingUpdates:"Checking for updates...",upgradeCheckFailed:"Could not check the latest version",alreadyLatest:e=>`Already on the latest version (${e})`,upgrading:e=>`Upgrading to v${e}...`,upgradeError:"Error upgrading eazy-git",upgradeSuccess:e=>`eazy-git upgraded to v${e}!`,languageSelect:"Select the interface language:",languageChanged:e=>`Language changed to: ${e}`,configMenu:"What would you like to configure?",configLanguage:"Change language",configDefaultBranch:"Default base branch",configAIProvider:"Default AI provider",configView:"View current configuration",defaultBranchSet:e=>`Default base branch: ${e}`,aiProviderSet:e=>`Default AI provider: ${e}`,goBack:"Go back"};var D={es:A,en:P};function v(e,...t){let c=k().language||"es",h=(D[c]||D.es)[e];return typeof h=="function"?h(...t):h||e}var V=process.argv[1].split("/").pop(),ye={run:R,runrun:T};async function ve(){try{let e=ye[V];e||(n.error(`${v("unknownCommand")}: ${V}`),process.exit(1)),await e(),process.exit(0)}catch(e){n.error(`${v("errorExecuting")}: ${e.message}`),process.exit(1)}}ve();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eazy-git",
3
- "version": "0.2.12",
3
+ "version": "0.3.0",
4
4
  "main": "dist/index.js",
5
5
  "type": "module",
6
6
  "imports": {
@@ -19,7 +19,13 @@
19
19
  "url": "git+https://github.com/jaime00/eazy-git.git"
20
20
  },
21
21
  "scripts": {
22
- "build": "node build.js"
22
+ "build": "node build.js",
23
+ "release:patch": "npm version patch && npm run build && npm publish",
24
+ "release:minor": "npm version minor && npm run build && npm publish",
25
+ "release:major": "npm version major && npm run build && npm publish",
26
+ "release:prepatch": "npm version prepatch && npm run build && npm publish --tag next",
27
+ "release:preminor": "npm version preminor && npm run build && npm publish --tag next",
28
+ "release:premajor": "npm version premajor && npm run build && npm publish --tag next"
23
29
  },
24
30
  "bin": {
25
31
  "eazy-git": "dist/index.js",