var c=(a,t,e)=>new Promise((n,i)=>{var m=r=>{try{o(e.next(r))}catch(s){i(s)}},p=r=>{try{o(e.throw(r))}catch(s){i(s)}},o=r=>r.done?n(r.value):Promise.resolve(r.value).then(m,p);o((e=e.apply(a,t)).next())});var f=(a,t)=>a.split(`
`).map(e=>{let n=e.trim();(n.startsWith("*")||n.startsWith("+"))&&(n=n.slice(2));let i=t[0];return n.startsWith(i)?{name:n.replace(i,""),description:`${i.replace("/","")} branch`,icon:"fig://icon?type=git"}:{}}).filter(e=>e.name);function d(a,t){return c(this,null,function*(){let{stdout:e}=yield t({command:"git",args:["config","--get",`gitflow.prefix.${a}`]});return e})}var h={typeBranches:{custom:(a,t)=>c(void 0,null,function*(){let e=yield d(a[1],t),{stdout:n}=yield t({command:"git",args:["--no-optional-locks","branch","-a","--no-color","--sort=-committerdate"]});return f(n,[e])})}},l={name:"git-flow",description:"A collection of Git extensions to provide high-level repository operations for Vincent Driessen's branching model",subcommands:[{name:"init",description:"Initialize a new git repo with support for the branching model",options:[{name:"-d",description:"Use default branch naming conventions"},{name:"-f",description:"Force setting of gitflow branches, even if already configured"}]},{name:"feature",description:"List all feature branches",subcommands:[{name:"start",description:"Create a new feature branch",args:{name:"name",description:"The name of the new feature branch"}},{name:"finish",description:"Merge a feature branch into develop",args:{name:"name",description:"The name of the feature branch to finish",generators:h.typeBranches}},{name:"publish",description:"Push a feature branch to the remote repository",args:{name:"name",description:"The name of the feature branch to publish"}},{name:"pull",description:"Pull a feature branch from the remote repository",args:[{name:"origin",description:"The name of the remote feature branch"},{name:"name",description:"The name of the local feature branch"}]}]},{name:"release",description:"List all release branches",subcommands:[{name:"start",description:"Create a new release branch",args:{name:"name",description:"The name of the new release branch"}},{name:"finish",description:"Merge a release branch into develop",args:{name:"name",description:"The name of the release branch to finish",generators:h.typeBranches}}]},{name:"hotfix",description:"List all hotfix branches",subcommands:[{name:"start",description:"Create a new hotfix branch",args:{name:"name",description:"The name of the new hotfix branch"}},{name:"finish",description:"Merge a hotfix branch into develop",args:{name:"name",description:"The name of the hotfix branch to finish",generators:h.typeBranches}}]},{name:"support",description:"List all support branches",subcommands:[{name:"start",description:"Create a new support branch",args:{name:"name",description:"The name of the new support branch"}}]}]},u=l;export{u as default,h as gitFlowGenerators};
