var g=[{name:["--verbose","-v"],description:"Increases the logging verbosity",priority:1},{name:["--init","-i"],description:"Writes the default configuration file to cliff.toml"},{name:["--latest","-l"],description:"Processes the commits starting from the latest tag",exclusiveOn:["--current","-u"]},{name:"--current",description:"Processes the commits that belong to the current tag",exclusiveOn:["-l","-u"]},{name:["--unreleased","-u"],description:"Processes the commits that do not belong to a tag",exclusiveOn:["-l","--current"]},{name:"--date-order",description:"Sorts the tags chronologically"},{name:"--context",description:"Prints changelog context as JSON"},{name:["--help","-h"],description:"Prints help information",priority:1},{name:["--version","-V"],description:"Prints version information",priority:1}],r={name:"path",template:"folders",suggestCurrentToken:!0},o={name:"pattern",isVariadic:!0,optionsCanBreakVariadicArg:!0},a={name:"path",template:"filepaths",suggestCurrentToken:!0},p=[{name:["--config","-c"],description:"Sets the configuration file",args:{name:"path",template:"filepaths",suggestCurrentToken:!0,default:"cliff.toml"}},{name:["--workdir","-w"],description:"Sets the working directory",args:r},{name:["--repository","-r"],description:"Sets the git repository",args:r},{name:"--include-path",description:"Sets the path to include related commits",args:o},{name:"--exclude-path",description:"Sets the path to exclude related commits",args:o},{name:"--with-commit",description:"Sets custom commit messages to include in the changelog",args:{name:"msg",isVariadic:!0,optionsCanBreakVariadicArg:!0}},{name:["--prepend","-p"],description:"Prepends entries to the given changelog file",args:a},{name:["--output","-o"],description:"Writes output to the given file",args:a},{name:["--tag","-t"],description:"Sets the tag for the latest version",args:{name:"tag"}},{name:["--body","-b"],description:"Sets the template for the changelog body",args:{name:"template"}},{name:["--strip","-s"],description:"Strips the given parts from the changelog",args:{name:"part",suggestions:[{name:"header"},{name:"footer"},{name:"all"}]}},{name:"--sort",description:"Sets sorting of the commits inside sections",args:{name:"sort",default:"oldest",suggestions:[{name:"oldest"},{name:"newest"}]}}],m={name:"git-cliff",description:"A highly customizable changelog generator \u26F0\uFE0F",options:[...g,...p],args:{name:"range",description:"Sets the commit range to process",generators:{trigger:"..",getQueryTerm:".",script:["git","rev-list","--all","--oneline","--abbrev-commit"],postProcess:(e,c)=>{if(e.startsWith("fatal:"))return[];(e.startsWith("warning:")||e.startsWith("error:"))&&(e=e.slice(e.indexOf(`
`)+1));let t=c.pop();return[...e.split(`
`).map(i=>{let n=i.indexOf(" "),s=i.slice(0,n);return{name:s,insertValue:s+(t!=null&&t.includes("..")?"":".."),icon:"fig://icon?type=node",description:i.slice(n+1),priority:1}}),{name:"HEAD",insertValue:"HEAD"+(t!=null&&t.includes("..")?"":".."),icon:"fig://icon?type=node",description:"The current commit",priority:5}]}}}},l=m;export{l as default};
