@negoziator/ai-commit 1.2.219 → 1.2.221

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.mjs +2 -2
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -19,7 +19,7 @@ var zt=Object.defineProperty;var o=(u,e)=>zt(u,"name",{value:e,configurable:!0})
19
19
  `:"")+(t?this.indentText({text:this.render(t),spaces:r}):"")}
20
20
  `}table({tableData:e,tableOptions:t,tableBreakpoints:r}){return rn(e.map(n=>n.map(s=>this.render(s))),r?sn(r):t)}flagParameter(e){return e===Boolean?"":e===String?"<string>":e===Number?"<number>":Array.isArray(e)?this.flagParameter(e[0]):"<value>"}flagOperator(e){return" "}flagName(e){const{flag:t,flagFormatted:r,aliasesEnabled:n,aliasFormatted:s}=e;let D="";if(s?D+=`${s}, `:n&&(D+=" "),D+=r,"placeholder"in t&&typeof t.placeholder=="string")D+=`${this.flagOperator(e)}${t.placeholder}`;else{const a=this.flagParameter("type"in t?t.type:t);a&&(D+=`${this.flagOperator(e)}${a}`)}return D}flagDefault(e){return JSON.stringify(e)}flagDescription({flag:e}){let t="description"in e?e.description??"":"";if("default"in e){let{default:r}=e;typeof r=="function"&&(r=r()),r&&(t+=` (default: ${this.flagDefault(r)})`)}return t}render(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>this.render(t)).join(`
21
21
  `);if("type"in e&&this[e.type]){const t=this[e.type];if(typeof t=="function")return t.call(this,e.data)}throw new Error(`Invalid node type: ${JSON.stringify(e)}`)}},o(eu,"J"),eu);const qu=o(u=>u.length>0&&!u.includes(" "),"y$1"),{stringify:M}=JSON,bn=/[|\\{}()[\]^$+*?.]/;function Wu(u){const e=[];let t,r;for(const n of u){if(r)throw new Error(`Invalid parameter: Spread parameter ${M(r)} must be last`);const s=n[0],D=n[n.length-1];let a;if(s==="<"&&D===">"&&(a=!0,t))throw new Error(`Invalid parameter: Required parameter ${M(n)} cannot come after optional parameter ${M(t)}`);if(s==="["&&D==="]"&&(a=!1,t=n),a===void 0)throw new Error(`Invalid parameter: ${M(n)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let i=n.slice(1,-1);const c=i.slice(-3)==="...";c&&(r=n,i=i.slice(0,-3));const l=i.match(bn);if(l)throw new Error(`Invalid parameter: ${M(n)}. Invalid character found ${M(l[0])}`);e.push({name:i,required:a,spread:c})}return e}o(Wu,"w$1");function Uu(u,e,t,r){for(let n=0;n<e.length;n+=1){const{name:s,required:D,spread:a}=e[n],i=an(s);if(i in u)throw new Error(`Invalid parameter: ${M(s)} is used more than once.`);const c=a?t.slice(n):t[n];if(a&&(n=e.length),D&&(!c||a&&c.length===0))return console.error(`Error: Missing required parameter ${M(s)}
22
- `),r(),process.exit(1);u[i]=c}}o(Uu,"b$1");function An(u){return u===void 0||u!==!1}o(An,"W$2");function fD(u,e,t,r){const n={...e.flags},s=e.version;s&&(n.version={type:Boolean,description:"Show version"});const{help:D}=e,a=An(D);a&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const i=wr(n,r,{ignore:e.ignoreArgv}),c=o(()=>{console.log(e.version)},"f");if(s&&i.flags.version===!0)return c(),process.exit(0);const l=new yn,C=a&&D?.render?D.render:d=>l.render(d),F=o(d=>{const m=gn({...e,...d?{help:d}:{},flags:n});console.log(C(m,l))},"u");if(a&&i.flags.help===!0)return F(),process.exit(0);if(e.parameters){let{parameters:d}=e,m=i._;const f=d.indexOf("--"),p=d.slice(f+1),h=Object.create(null);if(f>-1&&p.length>0){d=d.slice(0,f);const g=i._["--"];m=m.slice(0,-g.length||void 0),Uu(h,Wu(d),m,F),Uu(h,Wu(p),g,F)}else Uu(h,Wu(d),m,F);Object.assign(i._,h)}const E={...i,showVersion:c,showHelp:F};return typeof t=="function"&&t(E),{command:u,...E}}o(fD,"x$1");function wn(u,e){const t=new Map;for(const r of e){const n=[r.options.name],{alias:s}=r.options;s&&(Array.isArray(s)?n.push(...s):n.push(s));for(const D of n){if(t.has(D))throw new Error(`Duplicate command name found: ${M(D)}`);t.set(D,r)}}return t.get(u)}o(wn,"z$1");function vn(u,e,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!qu(u.name)))throw new Error(`Invalid script name: ${M(u.name)}`);const r=t[0];if(u.commands&&r&&qu(r)){const n=wn(r,u.commands);if(n)return fD(n.options.name,{...n.options,parent:u},n.callback,t.slice(1))}return fD(void 0,u,e,t)}o(vn,"Z");function dD(u,e){if(!u)throw new Error("Command options are required");const{name:t}=u;if(t===void 0)throw new Error("Command name is required");if(!qu(t))throw new Error(`Invalid command name ${JSON.stringify(t)}. Command names must be one word.`);return{options:u,callback:e}}o(dD,"G$2");var ED="1.2.219",$n="Writes your git commit messages for you with AI",G=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function J(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}o(J,"getDefaultExportFromCjs");var U={exports:{}},zu,pD;function xn(){if(pD)return zu;pD=1,zu=r,r.sync=n;var u=_u;function e(s,D){var a=D.pathExt!==void 0?D.pathExt:process.env.PATHEXT;if(!a||(a=a.split(";"),a.indexOf("")!==-1))return!0;for(var i=0;i<a.length;i++){var c=a[i].toLowerCase();if(c&&s.substr(-c.length).toLowerCase()===c)return!0}return!1}o(e,"checkPathExt");function t(s,D,a){return!s.isSymbolicLink()&&!s.isFile()?!1:e(D,a)}o(t,"checkStat");function r(s,D,a){u.stat(s,function(i,c){a(i,i?!1:t(c,s,D))})}o(r,"isexe");function n(s,D){return t(u.statSync(s),s,D)}return o(n,"sync"),zu}o(xn,"requireWindows");var Hu,hD;function Sn(){if(hD)return Hu;hD=1,Hu=e,e.sync=t;var u=_u;function e(s,D,a){u.stat(s,function(i,c){a(i,i?!1:r(c,D))})}o(e,"isexe");function t(s,D){return r(u.statSync(s),D)}o(t,"sync");function r(s,D){return s.isFile()&&n(s,D)}o(r,"checkStat");function n(s,D){var a=s.mode,i=s.uid,c=s.gid,l=D.uid!==void 0?D.uid:process.getuid&&process.getuid(),C=D.gid!==void 0?D.gid:process.getgid&&process.getgid(),F=parseInt("100",8),E=parseInt("010",8),d=parseInt("001",8),m=F|E,f=a&d||a&E&&c===C||a&F&&i===l||a&m&&l===0;return f}return o(n,"checkMode"),Hu}o(Sn,"requireMode");var Yu,mD;function On(){if(mD)return Yu;mD=1;var u;process.platform==="win32"||G.TESTING_WINDOWS?u=xn():u=Sn(),Yu=e,e.sync=t;function e(r,n,s){if(typeof n=="function"&&(s=n,n={}),!s){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(D,a){e(r,n||{},function(i,c){i?a(i):D(c)})})}u(r,n||{},function(D,a){D&&(D.code==="EACCES"||n&&n.ignoreErrors)&&(D=null,a=!1),s(D,a)})}o(e,"isexe");function t(r,n){try{return u.sync(r,n||{})}catch(s){if(n&&n.ignoreErrors||s.code==="EACCES")return!1;throw s}}return o(t,"sync"),Yu}o(On,"requireIsexe");var Ku,gD;function Tn(){if(gD)return Ku;gD=1;const u=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",e=V,t=u?";":":",r=On(),n=o(i=>Object.assign(new Error(`not found: ${i}`),{code:"ENOENT"}),"getNotFoundError"),s=o((i,c)=>{const l=c.colon||t,C=i.match(/\//)||u&&i.match(/\\/)?[""]:[...u?[process.cwd()]:[],...(c.path||process.env.PATH||"").split(l)],F=u?c.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",E=u?F.split(l):[""];return u&&i.indexOf(".")!==-1&&E[0]!==""&&E.unshift(""),{pathEnv:C,pathExt:E,pathExtExe:F}},"getPathInfo"),D=o((i,c,l)=>{typeof c=="function"&&(l=c,c={}),c||(c={});const{pathEnv:C,pathExt:F,pathExtExe:E}=s(i,c),d=[],m=o(p=>new Promise((h,g)=>{if(p===C.length)return c.all&&d.length?h(d):g(n(i));const B=C[p],b=/^".*"$/.test(B)?B.slice(1,-1):B,y=e.join(b,i),v=!b&&/^\.[\\\/]/.test(i)?i.slice(0,2)+y:y;h(f(v,p,0))}),"step"),f=o((p,h,g)=>new Promise((B,b)=>{if(g===F.length)return B(m(h+1));const y=F[g];r(p+y,{pathExt:E},(v,k)=>{if(!v&&k)if(c.all)d.push(p+y);else return B(p+y);return B(f(p,h,g+1))})}),"subStep");return l?m(0).then(p=>l(null,p),l):m(0)},"which"),a=o((i,c)=>{c=c||{};const{pathEnv:l,pathExt:C,pathExtExe:F}=s(i,c),E=[];for(let d=0;d<l.length;d++){const m=l[d],f=/^".*"$/.test(m)?m.slice(1,-1):m,p=e.join(f,i),h=!f&&/^\.[\\\/]/.test(i)?i.slice(0,2)+p:p;for(let g=0;g<C.length;g++){const B=h+C[g];try{if(r.sync(B,{pathExt:F}))if(c.all)E.push(B);else return B}catch{}}}if(c.all&&E.length)return E;if(c.nothrow)return null;throw n(i)},"whichSync");return Ku=D,D.sync=a,Ku}o(Tn,"requireWhich");var Eu={exports:{}},BD;function In(){if(BD)return Eu.exports;BD=1;const u=o((e={})=>{const t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"},"pathKey");return Eu.exports=u,Eu.exports.default=u,Eu.exports}o(In,"requirePathKey");var Vu,yD;function Pn(){if(yD)return Vu;yD=1;const u=V,e=Tn(),t=In();function r(s,D){const a=s.options.env||process.env,i=process.cwd(),c=s.options.cwd!=null,l=c&&process.chdir!==void 0&&!process.chdir.disabled;if(l)try{process.chdir(s.options.cwd)}catch{}let C;try{C=e.sync(s.command,{path:a[t({env:a})],pathExt:D?u.delimiter:void 0})}catch{}finally{l&&process.chdir(i)}return C&&(C=u.resolve(c?s.options.cwd:"",C)),C}o(r,"resolveCommandAttempt");function n(s){return r(s)||r(s,!0)}return o(n,"resolveCommand"),Vu=n,Vu}o(Pn,"requireResolveCommand");var pu={},bD;function Rn(){if(bD)return pu;bD=1;const u=/([()\][%!^"`<>&|;, *?])/g;function e(r){return r=r.replace(u,"^$1"),r}o(e,"escapeCommand");function t(r,n){return r=`${r}`,r=r.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),r=r.replace(/(?=(\\+?)?)\1$/,"$1$1"),r=`"${r}"`,r=r.replace(u,"^$1"),n&&(r=r.replace(u,"^$1")),r}return o(t,"escapeArgument"),pu.command=e,pu.argument=t,pu}o(Rn,"require_escape");var Ju,AD;function _n(){return AD||(AD=1,Ju=/^#!(.*)/),Ju}o(_n,"requireShebangRegex");var Zu,wD;function kn(){if(wD)return Zu;wD=1;const u=_n();return Zu=o((e="")=>{const t=e.match(u);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),s=r.split("/").pop();return s==="env"?n:n?`${s} ${n}`:s},"shebangCommand"),Zu}o(kn,"requireShebangCommand");var Xu,vD;function Mn(){if(vD)return Xu;vD=1;const u=_u,e=kn();function t(r){const s=Buffer.alloc(150);let D;try{D=u.openSync(r,"r"),u.readSync(D,s,0,150,0),u.closeSync(D)}catch{}return e(s.toString())}return o(t,"readShebang"),Xu=t,Xu}o(Mn,"requireReadShebang");var Qu,$D;function jn(){if($D)return Qu;$D=1;const u=V,e=Pn(),t=Rn(),r=Mn(),n=process.platform==="win32",s=/\.(?:com|exe)$/i,D=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function a(l){l.file=e(l);const C=l.file&&r(l.file);return C?(l.args.unshift(l.file),l.command=C,e(l)):l.file}o(a,"detectShebang");function i(l){if(!n)return l;const C=a(l),F=!s.test(C);if(l.options.forceShell||F){const E=D.test(C);l.command=u.normalize(l.command),l.command=t.command(l.command),l.args=l.args.map(m=>t.argument(m,E));const d=[l.command].concat(l.args).join(" ");l.args=["/d","/s","/c",`"${d}"`],l.command=process.env.comspec||"cmd.exe",l.options.windowsVerbatimArguments=!0}return l}o(i,"parseNonShell");function c(l,C,F){C&&!Array.isArray(C)&&(F=C,C=null),C=C?C.slice(0):[],F=Object.assign({},F);const E={command:l,args:C,options:F,file:void 0,original:{command:l,args:C}};return F.shell?E:i(E)}return o(c,"parse"),Qu=c,Qu}o(jn,"requireParse");var ue,xD;function Nn(){if(xD)return ue;xD=1;const u=process.platform==="win32";function e(s,D){return Object.assign(new Error(`${D} ${s.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${D} ${s.command}`,path:s.command,spawnargs:s.args})}o(e,"notFoundError");function t(s,D){if(!u)return;const a=s.emit;s.emit=function(i,c){if(i==="exit"){const l=r(c,D);if(l)return a.call(s,"error",l)}return a.apply(s,arguments)}}o(t,"hookChildProcess");function r(s,D){return u&&s===1&&!D.file?e(D.original,"spawn"):null}o(r,"verifyENOENT");function n(s,D){return u&&s===1&&!D.file?e(D.original,"spawnSync"):null}return o(n,"verifyENOENTSync"),ue={hookChildProcess:t,verifyENOENT:r,verifyENOENTSync:n,notFoundError:e},ue}o(Nn,"requireEnoent");var SD;function Ln(){if(SD)return U.exports;SD=1;const u=Kt,e=jn(),t=Nn();function r(s,D,a){const i=e(s,D,a),c=u.spawn(i.command,i.args,i.options);return t.hookChildProcess(c,i),c}o(r,"spawn");function n(s,D,a){const i=e(s,D,a),c=u.spawnSync(i.command,i.args,i.options);return c.error=c.error||t.verifyENOENTSync(c.status,i),c}return o(n,"spawnSync"),U.exports=r,U.exports.spawn=r,U.exports.sync=n,U.exports._parse=e,U.exports._enoent=t,U.exports}o(Ln,"requireCrossSpawn");var Gn=Ln(),qn=J(Gn);function Wn(u){const e=typeof u=="string"?`
22
+ `),r(),process.exit(1);u[i]=c}}o(Uu,"b$1");function An(u){return u===void 0||u!==!1}o(An,"W$2");function fD(u,e,t,r){const n={...e.flags},s=e.version;s&&(n.version={type:Boolean,description:"Show version"});const{help:D}=e,a=An(D);a&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const i=wr(n,r,{ignore:e.ignoreArgv}),c=o(()=>{console.log(e.version)},"f");if(s&&i.flags.version===!0)return c(),process.exit(0);const l=new yn,C=a&&D?.render?D.render:d=>l.render(d),F=o(d=>{const m=gn({...e,...d?{help:d}:{},flags:n});console.log(C(m,l))},"u");if(a&&i.flags.help===!0)return F(),process.exit(0);if(e.parameters){let{parameters:d}=e,m=i._;const f=d.indexOf("--"),p=d.slice(f+1),h=Object.create(null);if(f>-1&&p.length>0){d=d.slice(0,f);const g=i._["--"];m=m.slice(0,-g.length||void 0),Uu(h,Wu(d),m,F),Uu(h,Wu(p),g,F)}else Uu(h,Wu(d),m,F);Object.assign(i._,h)}const E={...i,showVersion:c,showHelp:F};return typeof t=="function"&&t(E),{command:u,...E}}o(fD,"x$1");function wn(u,e){const t=new Map;for(const r of e){const n=[r.options.name],{alias:s}=r.options;s&&(Array.isArray(s)?n.push(...s):n.push(s));for(const D of n){if(t.has(D))throw new Error(`Duplicate command name found: ${M(D)}`);t.set(D,r)}}return t.get(u)}o(wn,"z$1");function vn(u,e,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!qu(u.name)))throw new Error(`Invalid script name: ${M(u.name)}`);const r=t[0];if(u.commands&&r&&qu(r)){const n=wn(r,u.commands);if(n)return fD(n.options.name,{...n.options,parent:u},n.callback,t.slice(1))}return fD(void 0,u,e,t)}o(vn,"Z");function dD(u,e){if(!u)throw new Error("Command options are required");const{name:t}=u;if(t===void 0)throw new Error("Command name is required");if(!qu(t))throw new Error(`Invalid command name ${JSON.stringify(t)}. Command names must be one word.`);return{options:u,callback:e}}o(dD,"G$2");var ED="1.2.221",$n="Writes your git commit messages for you with AI",G=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function J(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}o(J,"getDefaultExportFromCjs");var U={exports:{}},zu,pD;function xn(){if(pD)return zu;pD=1,zu=r,r.sync=n;var u=_u;function e(s,D){var a=D.pathExt!==void 0?D.pathExt:process.env.PATHEXT;if(!a||(a=a.split(";"),a.indexOf("")!==-1))return!0;for(var i=0;i<a.length;i++){var c=a[i].toLowerCase();if(c&&s.substr(-c.length).toLowerCase()===c)return!0}return!1}o(e,"checkPathExt");function t(s,D,a){return!s.isSymbolicLink()&&!s.isFile()?!1:e(D,a)}o(t,"checkStat");function r(s,D,a){u.stat(s,function(i,c){a(i,i?!1:t(c,s,D))})}o(r,"isexe");function n(s,D){return t(u.statSync(s),s,D)}return o(n,"sync"),zu}o(xn,"requireWindows");var Hu,hD;function Sn(){if(hD)return Hu;hD=1,Hu=e,e.sync=t;var u=_u;function e(s,D,a){u.stat(s,function(i,c){a(i,i?!1:r(c,D))})}o(e,"isexe");function t(s,D){return r(u.statSync(s),D)}o(t,"sync");function r(s,D){return s.isFile()&&n(s,D)}o(r,"checkStat");function n(s,D){var a=s.mode,i=s.uid,c=s.gid,l=D.uid!==void 0?D.uid:process.getuid&&process.getuid(),C=D.gid!==void 0?D.gid:process.getgid&&process.getgid(),F=parseInt("100",8),E=parseInt("010",8),d=parseInt("001",8),m=F|E,f=a&d||a&E&&c===C||a&F&&i===l||a&m&&l===0;return f}return o(n,"checkMode"),Hu}o(Sn,"requireMode");var Yu,mD;function On(){if(mD)return Yu;mD=1;var u;process.platform==="win32"||G.TESTING_WINDOWS?u=xn():u=Sn(),Yu=e,e.sync=t;function e(r,n,s){if(typeof n=="function"&&(s=n,n={}),!s){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(D,a){e(r,n||{},function(i,c){i?a(i):D(c)})})}u(r,n||{},function(D,a){D&&(D.code==="EACCES"||n&&n.ignoreErrors)&&(D=null,a=!1),s(D,a)})}o(e,"isexe");function t(r,n){try{return u.sync(r,n||{})}catch(s){if(n&&n.ignoreErrors||s.code==="EACCES")return!1;throw s}}return o(t,"sync"),Yu}o(On,"requireIsexe");var Ku,gD;function Tn(){if(gD)return Ku;gD=1;const u=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",e=V,t=u?";":":",r=On(),n=o(i=>Object.assign(new Error(`not found: ${i}`),{code:"ENOENT"}),"getNotFoundError"),s=o((i,c)=>{const l=c.colon||t,C=i.match(/\//)||u&&i.match(/\\/)?[""]:[...u?[process.cwd()]:[],...(c.path||process.env.PATH||"").split(l)],F=u?c.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",E=u?F.split(l):[""];return u&&i.indexOf(".")!==-1&&E[0]!==""&&E.unshift(""),{pathEnv:C,pathExt:E,pathExtExe:F}},"getPathInfo"),D=o((i,c,l)=>{typeof c=="function"&&(l=c,c={}),c||(c={});const{pathEnv:C,pathExt:F,pathExtExe:E}=s(i,c),d=[],m=o(p=>new Promise((h,g)=>{if(p===C.length)return c.all&&d.length?h(d):g(n(i));const B=C[p],b=/^".*"$/.test(B)?B.slice(1,-1):B,y=e.join(b,i),v=!b&&/^\.[\\\/]/.test(i)?i.slice(0,2)+y:y;h(f(v,p,0))}),"step"),f=o((p,h,g)=>new Promise((B,b)=>{if(g===F.length)return B(m(h+1));const y=F[g];r(p+y,{pathExt:E},(v,k)=>{if(!v&&k)if(c.all)d.push(p+y);else return B(p+y);return B(f(p,h,g+1))})}),"subStep");return l?m(0).then(p=>l(null,p),l):m(0)},"which"),a=o((i,c)=>{c=c||{};const{pathEnv:l,pathExt:C,pathExtExe:F}=s(i,c),E=[];for(let d=0;d<l.length;d++){const m=l[d],f=/^".*"$/.test(m)?m.slice(1,-1):m,p=e.join(f,i),h=!f&&/^\.[\\\/]/.test(i)?i.slice(0,2)+p:p;for(let g=0;g<C.length;g++){const B=h+C[g];try{if(r.sync(B,{pathExt:F}))if(c.all)E.push(B);else return B}catch{}}}if(c.all&&E.length)return E;if(c.nothrow)return null;throw n(i)},"whichSync");return Ku=D,D.sync=a,Ku}o(Tn,"requireWhich");var Eu={exports:{}},BD;function In(){if(BD)return Eu.exports;BD=1;const u=o((e={})=>{const t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"},"pathKey");return Eu.exports=u,Eu.exports.default=u,Eu.exports}o(In,"requirePathKey");var Vu,yD;function Pn(){if(yD)return Vu;yD=1;const u=V,e=Tn(),t=In();function r(s,D){const a=s.options.env||process.env,i=process.cwd(),c=s.options.cwd!=null,l=c&&process.chdir!==void 0&&!process.chdir.disabled;if(l)try{process.chdir(s.options.cwd)}catch{}let C;try{C=e.sync(s.command,{path:a[t({env:a})],pathExt:D?u.delimiter:void 0})}catch{}finally{l&&process.chdir(i)}return C&&(C=u.resolve(c?s.options.cwd:"",C)),C}o(r,"resolveCommandAttempt");function n(s){return r(s)||r(s,!0)}return o(n,"resolveCommand"),Vu=n,Vu}o(Pn,"requireResolveCommand");var pu={},bD;function Rn(){if(bD)return pu;bD=1;const u=/([()\][%!^"`<>&|;, *?])/g;function e(r){return r=r.replace(u,"^$1"),r}o(e,"escapeCommand");function t(r,n){return r=`${r}`,r=r.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),r=r.replace(/(?=(\\+?)?)\1$/,"$1$1"),r=`"${r}"`,r=r.replace(u,"^$1"),n&&(r=r.replace(u,"^$1")),r}return o(t,"escapeArgument"),pu.command=e,pu.argument=t,pu}o(Rn,"require_escape");var Ju,AD;function _n(){return AD||(AD=1,Ju=/^#!(.*)/),Ju}o(_n,"requireShebangRegex");var Zu,wD;function kn(){if(wD)return Zu;wD=1;const u=_n();return Zu=o((e="")=>{const t=e.match(u);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),s=r.split("/").pop();return s==="env"?n:n?`${s} ${n}`:s},"shebangCommand"),Zu}o(kn,"requireShebangCommand");var Xu,vD;function Mn(){if(vD)return Xu;vD=1;const u=_u,e=kn();function t(r){const s=Buffer.alloc(150);let D;try{D=u.openSync(r,"r"),u.readSync(D,s,0,150,0),u.closeSync(D)}catch{}return e(s.toString())}return o(t,"readShebang"),Xu=t,Xu}o(Mn,"requireReadShebang");var Qu,$D;function jn(){if($D)return Qu;$D=1;const u=V,e=Pn(),t=Rn(),r=Mn(),n=process.platform==="win32",s=/\.(?:com|exe)$/i,D=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function a(l){l.file=e(l);const C=l.file&&r(l.file);return C?(l.args.unshift(l.file),l.command=C,e(l)):l.file}o(a,"detectShebang");function i(l){if(!n)return l;const C=a(l),F=!s.test(C);if(l.options.forceShell||F){const E=D.test(C);l.command=u.normalize(l.command),l.command=t.command(l.command),l.args=l.args.map(m=>t.argument(m,E));const d=[l.command].concat(l.args).join(" ");l.args=["/d","/s","/c",`"${d}"`],l.command=process.env.comspec||"cmd.exe",l.options.windowsVerbatimArguments=!0}return l}o(i,"parseNonShell");function c(l,C,F){C&&!Array.isArray(C)&&(F=C,C=null),C=C?C.slice(0):[],F=Object.assign({},F);const E={command:l,args:C,options:F,file:void 0,original:{command:l,args:C}};return F.shell?E:i(E)}return o(c,"parse"),Qu=c,Qu}o(jn,"requireParse");var ue,xD;function Nn(){if(xD)return ue;xD=1;const u=process.platform==="win32";function e(s,D){return Object.assign(new Error(`${D} ${s.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${D} ${s.command}`,path:s.command,spawnargs:s.args})}o(e,"notFoundError");function t(s,D){if(!u)return;const a=s.emit;s.emit=function(i,c){if(i==="exit"){const l=r(c,D);if(l)return a.call(s,"error",l)}return a.apply(s,arguments)}}o(t,"hookChildProcess");function r(s,D){return u&&s===1&&!D.file?e(D.original,"spawn"):null}o(r,"verifyENOENT");function n(s,D){return u&&s===1&&!D.file?e(D.original,"spawnSync"):null}return o(n,"verifyENOENTSync"),ue={hookChildProcess:t,verifyENOENT:r,verifyENOENTSync:n,notFoundError:e},ue}o(Nn,"requireEnoent");var SD;function Ln(){if(SD)return U.exports;SD=1;const u=Kt,e=jn(),t=Nn();function r(s,D,a){const i=e(s,D,a),c=u.spawn(i.command,i.args,i.options);return t.hookChildProcess(c,i),c}o(r,"spawn");function n(s,D,a){const i=e(s,D,a),c=u.spawnSync(i.command,i.args,i.options);return c.error=c.error||t.verifyENOENTSync(c.status,i),c}return o(n,"spawnSync"),U.exports=r,U.exports.spawn=r,U.exports.sync=n,U.exports._parse=e,U.exports._enoent=t,U.exports}o(Ln,"requireCrossSpawn");var Gn=Ln(),qn=J(Gn);function Wn(u){const e=typeof u=="string"?`
23
23
  `:10,t=typeof u=="string"?"\r":13;return u[u.length-1]===e&&(u=u.slice(0,-1)),u[u.length-1]===t&&(u=u.slice(0,-1)),u}o(Wn,"stripFinalNewline");function OD(u={}){const{env:e=process.env,platform:t=process.platform}=u;return t!=="win32"?"PATH":Object.keys(e).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"}o(OD,"pathKey");const Un=o(({cwd:u=$.cwd(),path:e=$.env[OD()],preferLocal:t=!0,execPath:r=$.execPath,addExecPath:n=!0}={})=>{const s=u instanceof URL?qe(u):u,D=K.resolve(s),a=[];return t&&zn(a,D),n&&Hn(a,r,D),[...a,e].join(K.delimiter)},"npmRunPath"),zn=o((u,e)=>{let t;for(;t!==e;)u.push(K.join(e,"node_modules/.bin")),t=e,e=K.resolve(e,"..")},"applyPreferLocal"),Hn=o((u,e,t)=>{const r=e instanceof URL?qe(e):e;u.push(K.resolve(t,r,".."))},"applyExecPath"),Yn=o(({env:u=$.env,...e}={})=>{u={...u};const t=OD({env:u});return e.path=u[t],u[t]=Un(e),u},"npmRunPathEnv"),Kn=o((u,e,t,r)=>{if(t==="length"||t==="prototype"||t==="arguments"||t==="caller")return;const n=Object.getOwnPropertyDescriptor(u,t),s=Object.getOwnPropertyDescriptor(e,t);!Vn(n,s)&&r||Object.defineProperty(u,t,s)},"copyProperty"),Vn=o(function(u,e){return u===void 0||u.configurable||u.writable===e.writable&&u.enumerable===e.enumerable&&u.configurable===e.configurable&&(u.writable||u.value===e.value)},"canCopyProperty"),Jn=o((u,e)=>{const t=Object.getPrototypeOf(e);t!==Object.getPrototypeOf(u)&&Object.setPrototypeOf(u,t)},"changePrototype"),Zn=o((u,e)=>`/* Wrapped ${u}*/
24
24
  ${e}`,"wrappedToString"),Xn=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Qn=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),uo=o((u,e,t)=>{const r=t===""?"":`with ${t.trim()}() `,n=Zn.bind(null,r,e.toString());Object.defineProperty(n,"name",Qn),Object.defineProperty(u,"toString",{...Xn,value:n})},"changeToString");function eo(u,e,{ignoreNonConfigurable:t=!1}={}){const{name:r}=u;for(const n of Reflect.ownKeys(e))Kn(u,e,n,t);return Jn(u,e),uo(u,e,r),u}o(eo,"mimicFunction");const hu=new WeakMap,TD=o((u,e={})=>{if(typeof u!="function")throw new TypeError("Expected a function");let t,r=0;const n=u.displayName||u.name||"<anonymous>",s=o(function(...D){if(hu.set(s,++r),r===1)t=u.apply(this,D),u=null;else if(e.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return t},"onetime2");return eo(s,u),hu.set(s,r),s},"onetime");TD.callCount=u=>{if(!hu.has(u))throw new Error(`The given function \`${u.name}\` is not wrapped by the \`onetime\` package`);return hu.get(u)};const Do=o(()=>{const u=PD-ID+1;return Array.from({length:u},to)},"getRealtimeSignals"),to=o((u,e)=>({name:`SIGRT${e+1}`,number:ID+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),"getRealtimeSignal"),ID=34,PD=64,ro=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],RD=o(()=>{const u=Do();return[...ro,...u].map(no)},"getSignals"),no=o(({name:u,number:e,description:t,action:r,forced:n=!1,standard:s})=>{const{signals:{[u]:D}}=We,a=D!==void 0;return{name:u,number:a?D:e,description:t,supported:a,action:r,forced:n,standard:s}},"normalizeSignal"),oo=o(()=>{const u=RD();return Object.fromEntries(u.map(so))},"getSignalsByName"),so=o(({name:u,number:e,description:t,supported:r,action:n,forced:s,standard:D})=>[u,{name:u,number:e,description:t,supported:r,action:n,forced:s,standard:D}],"getSignalByName"),io=oo(),ao=o(()=>{const u=RD(),e=PD+1,t=Array.from({length:e},(r,n)=>co(n,u));return Object.assign({},...t)},"getSignalsByNumber"),co=o((u,e)=>{const t=lo(u,e);if(t===void 0)return{};const{name:r,description:n,supported:s,action:D,forced:a,standard:i}=t;return{[u]:{name:r,number:u,description:n,supported:s,action:D,forced:a,standard:i}}},"getSignalByNumber"),lo=o((u,e)=>{const t=e.find(({name:r})=>We.signals[r]===u);return t!==void 0?t:e.find(r=>r.number===u)},"findSignalByNumber");ao();const Fo=o(({timedOut:u,timeout:e,errorCode:t,signal:r,signalDescription:n,exitCode:s,isCanceled:D})=>u?`timed out after ${e} milliseconds`:D?"was canceled":t!==void 0?`failed with ${t}`:r!==void 0?`was killed with ${r} (${n})`:s!==void 0?`failed with exit code ${s}`:"failed","getErrorPrefix"),_D=o(({stdout:u,stderr:e,all:t,error:r,signal:n,exitCode:s,command:D,escapedCommand:a,timedOut:i,isCanceled:c,killed:l,parsed:{options:{timeout:C,cwd:F=$.cwd()}}})=>{s=s===null?void 0:s,n=n===null?void 0:n;const E=n===void 0?void 0:io[n].description,d=r&&r.code,f=`Command ${Fo({timedOut:i,timeout:C,errorCode:d,signal:n,signalDescription:E,exitCode:s,isCanceled:c})}: ${D}`,p=Object.prototype.toString.call(r)==="[object Error]",h=p?`${f}
25
25
  ${r.message}`:f,g=[h,e,u].filter(Boolean).join(`
@@ -64,7 +64,7 @@ ${be}${ie(`aicommit v${ED}`)}`),console.error(`
64
64
  ${be}Please open a Bug report with the information above:`),console.error(`${be}https://github.com/NegoZiatoR/ai-commit/issues/new/choose`))},"handleCliError"),dt=o(async()=>{const{stdout:u,failed:e}=await X("git",["rev-parse","--show-toplevel"],{reject:!1});if(e)throw new O("The current directory must be a Git repository!");return u},"assertGitRepo"),Ae=o(u=>`:(exclude)${u}`,"excludeFromDiff"),Et=["package-lock.json","*.lock"].map(Ae),pt=o(async u=>{const e=["diff","--cached","--diff-algorithm=minimal"],{stdout:t}=await X("git",[...e,"--name-only",...Et,...u?u.map(Ae):[]]);if(!t)return;const{stdout:r}=await X("git",[...e,...Et,...u?u.map(Ae):[]]);return{files:t.split(`
65
65
  `),diff:r}},"getStagedDiff"),ks=o(u=>`Detected ${u.length.toLocaleString()} staged file${u.length>1?"s":""}`,"getDetectedMessage");var we,ht;function Ms(){if(ht)return we;ht=1;const{hasOwnProperty:u}=Object.prototype,e=o((a,i={})=>{typeof i=="string"&&(i={section:i}),i.align=i.align===!0,i.newline=i.newline===!0,i.sort=i.sort===!0,i.whitespace=i.whitespace===!0||i.align===!0,i.platform=i.platform||typeof process<"u"&&process.platform,i.bracketedArray=i.bracketedArray!==!1;const c=i.platform==="win32"?`\r
66
66
  `:`
67
- `,l=i.whitespace?" = ":"=",C=[],F=i.sort?Object.keys(a).sort():Object.keys(a);let E=0;i.align&&(E=s(F.filter(f=>a[f]===null||Array.isArray(a[f])||typeof a[f]!="object").map(f=>Array.isArray(a[f])?`${f}[]`:f).concat([""]).reduce((f,p)=>s(f).length>=s(p).length?f:p)).length);let d="";const m=i.bracketedArray?"[]":"";for(const f of F){const p=a[f];if(p&&Array.isArray(p))for(const h of p)d+=s(`${f}${m}`).padEnd(E," ")+l+s(h)+c;else p&&typeof p=="object"?C.push(f):d+=s(f).padEnd(E," ")+l+s(p)+c}i.section&&d.length&&(d="["+s(i.section)+"]"+(i.newline?c+c:c)+d);for(const f of C){const p=t(f,".").join("\\."),h=(i.section?i.section+".":"")+p,g=e(a[f],{...i,section:h});d.length&&g.length&&(d+=c),d+=g}return d},"encode");function t(a,i){var c=0,l=0,C=0,F=[];do if(C=a.indexOf(i,c),C!==-1){if(c=C+i.length,C>0&&a[C-1]==="\\")continue;F.push(a.slice(l,C)),l=C+i.length}while(C!==-1);return F.push(a.slice(l)),F}o(t,"splitSections");const r=o((a,i={})=>{i.bracketedArray=i.bracketedArray!==!1;const c=Object.create(null);let l=c,C=null;const F=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,E=a.split(/[\r\n]+/g),d={};for(const f of E){if(!f||f.match(/^\s*[;#]/)||f.match(/^\s*$/))continue;const p=f.match(F);if(!p)continue;if(p[1]!==void 0){if(C=D(p[1]),C==="__proto__"){l=Object.create(null);continue}l=c[C]=c[C]||Object.create(null);continue}const h=D(p[2]);let g;i.bracketedArray?g=h.length>2&&h.slice(-2)==="[]":(d[h]=(d?.[h]||0)+1,g=d[h]>1);const B=g&&h.endsWith("[]")?h.slice(0,-2):h;if(B==="__proto__")continue;const b=p[3]?D(p[4]):!0,y=b==="true"||b==="false"||b==="null"?JSON.parse(b):b;g&&(u.call(l,B)?Array.isArray(l[B])||(l[B]=[l[B]]):l[B]=[]),Array.isArray(l[B])?l[B].push(y):l[B]=y}const m=[];for(const f of Object.keys(c)){if(!u.call(c,f)||typeof c[f]!="object"||Array.isArray(c[f]))continue;const p=t(f,".");l=c;const h=p.pop(),g=h.replace(/\\\./g,".");for(const B of p)B!=="__proto__"&&((!u.call(l,B)||typeof l[B]!="object")&&(l[B]=Object.create(null)),l=l[B]);l===c&&g===h||(l[g]=c[f],m.push(f))}for(const f of m)delete c[f];return c},"decode"),n=o(a=>a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"),"isQuoted"),s=o(a=>typeof a!="string"||a.match(/[=\r\n]/)||a.match(/^\[/)||a.length>1&&n(a)||a!==a.trim()?JSON.stringify(a):a.split(";").join("\\;").split("#").join("\\#"),"safe"),D=o(a=>{if(a=(a||"").trim(),n(a)){a.charAt(0)==="'"&&(a=a.slice(1,-1));try{a=JSON.parse(a)}catch{}}else{let i=!1,c="";for(let l=0,C=a.length;l<C;l++){const F=a.charAt(l);if(i)"\\;#".indexOf(F)!==-1?c+=F:c+="\\"+F,i=!1;else{if(";#".indexOf(F)!==-1)break;F==="\\"?i=!0:c+=F}}return i&&(c+="\\"),c.trim()}return a},"unsafe");return we={parse:r,decode:r,stringify:e,encode:e,safe:s,unsafe:D},we}o(Ms,"requireIni");var js=Ms(),mt=J(js);const gt=o(u=>P.lstat(u).then(()=>!0,()=>!1),"fileExists"),Ns=["","conventional"],{hasOwnProperty:Ls}=Object.prototype,Bt=o((u,e)=>Ls.call(u,e),"hasOwn"),x=o((u,e,t)=>{if(!e)throw new O(`Invalid config property ${u}: ${t}`)},"parseAssert"),xu={OPENAI_KEY(u){if(!u)throw new O("Please set your OpenAI API key via `aicommit config set OPENAI_KEY=<your token>`");return x("OPENAI_KEY",u.startsWith("sk-"),'Must start with "sk-"'),u},locale(u){return u?(x("locale",u,"Cannot be empty"),x("locale",/^[a-z-]+$/i.test(u),"Must be a valid locale (letters and dashes/underscores). You can consult the list of codes in: https://wikipedia.org/wiki/List_of_ISO_639-1_codes"),u):"en"},generate(u){if(!u)return 1;x("generate",/^\d+$/.test(u),"Must be an integer");const e=Number(u);return x("generate",e>0,"Must be greater than 0"),x("generate",e<=5,"Must be less or equal to 5"),e},type(u){return u?(x("type",Ns.includes(u),"Invalid commit type"),u):""},proxy(u){if(!(!u||u.length===0))return x("proxy",/^https?:\/\//.test(u),"Must be a valid URL"),u},model(u){return!u||u.length===0?"gpt-4o-mini":u},timeout(u){if(!u)return 1e4;x("timeout",/^\d+$/.test(u),"Must be an integer");const e=Number(u);return x("timeout",e>=500,"Must be greater than 500ms"),e},temperature(u){if(!u)return .2;x("temperature",/^(2|\d)(\.\d{1,2})?$/.test(u),"Must be decimal between 0 and 2");const e=Number(u);return x("temperature",e>0,"Must be greater than 0"),x("temperature",e<=2,"Must be less than or equal to 2"),e},"max-length"(u){if(!u)return 50;x("max-length",/^\d+$/.test(u),"Must be an integer");const e=Number(u);return x("max-length",e>=20,"Must be greater than 20 characters"),e},"auto-confirm"(u){return u?typeof u=="boolean"?u:(x("auto-confirm",/^(?:true|false)$/.test(u),"Must be a boolean"),u==="true"):!1},"prepend-reference"(u){return u?typeof u=="boolean"?u:(x("prepend-reference",/^(?:true|false)$/.test(u),"Must be a boolean"),u==="true"):!1}},ve=V.join(Ke.homedir(),".aicommit"),yt=o(async()=>{if(!await gt(ve))return Object.create(null);const e=await P.readFile(ve,"utf8");return mt.parse(e)},"readConfigFile"),$e=o(async(u,e)=>{const t=await yt(),r={};for(const n of Object.keys(xu)){const s=xu[n],D=u?.[n]??t[n];if(e)try{r[n]=s(D)}catch{}else r[n]=s(D)}return r},"getConfig"),Gs=o(async u=>{const e=await yt();for(const[t,r]of u){if(!Bt(xu,t))throw new O(`Invalid config property: ${t}`);const n=xu[t](r);e[t]=n}await P.writeFile(ve,mt.stringify(e),"utf8")},"setConfigs");var q={},Su={exports:{}},Ou={exports:{}},xe,bt;function qs(){if(bt)return xe;bt=1;var u=1e3,e=u*60,t=e*60,r=t*24,n=r*7,s=r*365.25;xe=o(function(l,C){C=C||{};var F=typeof l;if(F==="string"&&l.length>0)return D(l);if(F==="number"&&isFinite(l))return C.long?i(l):a(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))},"ms");function D(l){if(l=String(l),!(l.length>100)){var C=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(C){var F=parseFloat(C[1]),E=(C[2]||"ms").toLowerCase();switch(E){case"years":case"year":case"yrs":case"yr":case"y":return F*s;case"weeks":case"week":case"w":return F*n;case"days":case"day":case"d":return F*r;case"hours":case"hour":case"hrs":case"hr":case"h":return F*t;case"minutes":case"minute":case"mins":case"min":case"m":return F*e;case"seconds":case"second":case"secs":case"sec":case"s":return F*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return F;default:return}}}}o(D,"parse");function a(l){var C=Math.abs(l);return C>=r?Math.round(l/r)+"d":C>=t?Math.round(l/t)+"h":C>=e?Math.round(l/e)+"m":C>=u?Math.round(l/u)+"s":l+"ms"}o(a,"fmtShort");function i(l){var C=Math.abs(l);return C>=r?c(l,C,r,"day"):C>=t?c(l,C,t,"hour"):C>=e?c(l,C,e,"minute"):C>=u?c(l,C,u,"second"):l+" ms"}o(i,"fmtLong");function c(l,C,F,E){var d=C>=F*1.5;return Math.round(l/F)+" "+E+(d?"s":"")}return o(c,"plural"),xe}o(qs,"requireMs");var Se,At;function wt(){if(At)return Se;At=1;function u(e){r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=s,r.enabled=i,r.humanize=qs(),r.destroy=l,Object.keys(e).forEach(C=>{r[C]=e[C]}),r.names=[],r.skips=[],r.formatters={};function t(C){let F=0;for(let E=0;E<C.length;E++)F=(F<<5)-F+C.charCodeAt(E),F|=0;return r.colors[Math.abs(F)%r.colors.length]}o(t,"selectColor"),r.selectColor=t;function r(C){let F,E=null,d,m;function f(...p){if(!f.enabled)return;const h=f,g=Number(new Date),B=g-(F||g);h.diff=B,h.prev=F,h.curr=g,F=g,p[0]=r.coerce(p[0]),typeof p[0]!="string"&&p.unshift("%O");let b=0;p[0]=p[0].replace(/%([a-zA-Z%])/g,(v,k)=>{if(v==="%%")return"%";b++;const j=r.formatters[k];if(typeof j=="function"){const _=p[b];v=j.call(h,_),p.splice(b,1),b--}return v}),r.formatArgs.call(h,p),(h.log||r.log).apply(h,p)}return o(f,"debug"),f.namespace=C,f.useColors=r.useColors(),f.color=r.selectColor(C),f.extend=n,f.destroy=r.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:o(()=>E!==null?E:(d!==r.namespaces&&(d=r.namespaces,m=r.enabled(C)),m),"get"),set:o(p=>{E=p},"set")}),typeof r.init=="function"&&r.init(f),f}o(r,"createDebug");function n(C,F){const E=r(this.namespace+(typeof F>"u"?":":F)+C);return E.log=this.log,E}o(n,"extend");function s(C){r.save(C),r.namespaces=C,r.names=[],r.skips=[];const F=(typeof C=="string"?C:"").trim().replace(" ",",").split(",").filter(Boolean);for(const E of F)E[0]==="-"?r.skips.push(E.slice(1)):r.names.push(E)}o(s,"enable");function D(C,F){let E=0,d=0,m=-1,f=0;for(;E<C.length;)if(d<F.length&&(F[d]===C[E]||F[d]==="*"))F[d]==="*"?(m=d,f=E,d++):(E++,d++);else if(m!==-1)d=m+1,f++,E=f;else return!1;for(;d<F.length&&F[d]==="*";)d++;return d===F.length}o(D,"matchesTemplate");function a(){const C=[...r.names,...r.skips.map(F=>"-"+F)].join(",");return r.enable(""),C}o(a,"disable");function i(C){for(const F of r.skips)if(D(C,F))return!1;for(const F of r.names)if(D(C,F))return!0;return!1}o(i,"enabled");function c(C){return C instanceof Error?C.stack||C.message:C}o(c,"coerce");function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o(l,"destroy"),r.enable(r.load()),r}return o(u,"setup"),Se=u,Se}o(wt,"requireCommon");var vt;function Ws(){return vt||(vt=1,function(u,e){e.formatArgs=r,e.save=n,e.load=s,e.useColors=t,e.storage=D(),e.destroy=(()=>{let i=!1;return()=>{i||(i=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function t(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let i;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(i=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(i[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}o(t,"useColors");function r(i){if(i[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+i[0]+(this.useColors?"%c ":" ")+"+"+u.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;i.splice(1,0,c,"color: inherit");let l=0,C=0;i[0].replace(/%[a-zA-Z%]/g,F=>{F!=="%%"&&(l++,F==="%c"&&(C=l))}),i.splice(C,0,c)}o(r,"formatArgs"),e.log=console.debug||console.log||(()=>{});function n(i){try{i?e.storage.setItem("debug",i):e.storage.removeItem("debug")}catch{}}o(n,"save");function s(){let i;try{i=e.storage.getItem("debug")}catch{}return!i&&typeof process<"u"&&"env"in process&&(i=process.env.DEBUG),i}o(s,"load");function D(){try{return localStorage}catch{}}o(D,"localstorage"),u.exports=wt()(e);const{formatters:a}=u.exports;a.j=function(i){try{return JSON.stringify(i)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}}(Ou,Ou.exports)),Ou.exports}o(Ws,"requireBrowser");var Tu={exports:{}},Oe,$t;function Us(){return $t||($t=1,Oe=o((u,e=process.argv)=>{const t=u.startsWith("-")?"":u.length===1?"-":"--",r=e.indexOf(t+u),n=e.indexOf("--");return r!==-1&&(n===-1||r<n)},"hasFlag")),Oe}o(Us,"requireHasFlag");var Te,xt;function zs(){if(xt)return Te;xt=1;const u=Ke,e=Ru,t=Us(),{env:r}=process;let n;t("no-color")||t("no-colors")||t("color=false")||t("color=never")?n=0:(t("color")||t("colors")||t("color=true")||t("color=always"))&&(n=1),"FORCE_COLOR"in r&&(r.FORCE_COLOR==="true"?n=1:r.FORCE_COLOR==="false"?n=0:n=r.FORCE_COLOR.length===0?1:Math.min(parseInt(r.FORCE_COLOR,10),3));function s(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}o(s,"translateLevel");function D(i,c){if(n===0)return 0;if(t("color=16m")||t("color=full")||t("color=truecolor"))return 3;if(t("color=256"))return 2;if(i&&!c&&n===void 0)return 0;const l=n||0;if(r.TERM==="dumb")return l;if(process.platform==="win32"){const C=u.release().split(".");return Number(C[0])>=10&&Number(C[2])>=10586?Number(C[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(C=>C in r)||r.CI_NAME==="codeship"?1:l;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if(r.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in r){const C=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return C>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:l}o(D,"supportsColor");function a(i){const c=D(i,i&&i.isTTY);return s(c)}return o(a,"getSupportLevel"),Te={supportsColor:a,stdout:s(D(!0,e.isatty(1))),stderr:s(D(!0,e.isatty(2)))},Te}o(zs,"requireSupportsColor");var St;function Hs(){return St||(St=1,function(u,e){const t=Ru,r=He;e.init=l,e.log=a,e.formatArgs=s,e.save=i,e.load=c,e.useColors=n,e.destroy=r.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{const F=zs();F&&(F.stderr||F).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}e.inspectOpts=Object.keys(process.env).filter(F=>/^debug_/i.test(F)).reduce((F,E)=>{const d=E.substring(6).toLowerCase().replace(/_([a-z])/g,(f,p)=>p.toUpperCase());let m=process.env[E];return/^(yes|on|true|enabled)$/i.test(m)?m=!0:/^(no|off|false|disabled)$/i.test(m)?m=!1:m==="null"?m=null:m=Number(m),F[d]=m,F},{});function n(){return"colors"in e.inspectOpts?!!e.inspectOpts.colors:t.isatty(process.stderr.fd)}o(n,"useColors");function s(F){const{namespace:E,useColors:d}=this;if(d){const m=this.color,f="\x1B[3"+(m<8?m:"8;5;"+m),p=` ${f};1m${E} \x1B[0m`;F[0]=p+F[0].split(`
67
+ `,l=i.whitespace?" = ":"=",C=[],F=i.sort?Object.keys(a).sort():Object.keys(a);let E=0;i.align&&(E=s(F.filter(f=>a[f]===null||Array.isArray(a[f])||typeof a[f]!="object").map(f=>Array.isArray(a[f])?`${f}[]`:f).concat([""]).reduce((f,p)=>s(f).length>=s(p).length?f:p)).length);let d="";const m=i.bracketedArray?"[]":"";for(const f of F){const p=a[f];if(p&&Array.isArray(p))for(const h of p)d+=s(`${f}${m}`).padEnd(E," ")+l+s(h)+c;else p&&typeof p=="object"?C.push(f):d+=s(f).padEnd(E," ")+l+s(p)+c}i.section&&d.length&&(d="["+s(i.section)+"]"+(i.newline?c+c:c)+d);for(const f of C){const p=t(f,".").join("\\."),h=(i.section?i.section+".":"")+p,g=e(a[f],{...i,section:h});d.length&&g.length&&(d+=c),d+=g}return d},"encode");function t(a,i){var c=0,l=0,C=0,F=[];do if(C=a.indexOf(i,c),C!==-1){if(c=C+i.length,C>0&&a[C-1]==="\\")continue;F.push(a.slice(l,C)),l=C+i.length}while(C!==-1);return F.push(a.slice(l)),F}o(t,"splitSections");const r=o((a,i={})=>{i.bracketedArray=i.bracketedArray!==!1;const c=Object.create(null);let l=c,C=null;const F=/^\[([^\]]*)\]\s*$|^([^=]+)(=(.*))?$/i,E=a.split(/[\r\n]+/g),d={};for(const f of E){if(!f||f.match(/^\s*[;#]/)||f.match(/^\s*$/))continue;const p=f.match(F);if(!p)continue;if(p[1]!==void 0){if(C=D(p[1]),C==="__proto__"){l=Object.create(null);continue}l=c[C]=c[C]||Object.create(null);continue}const h=D(p[2]);let g;i.bracketedArray?g=h.length>2&&h.slice(-2)==="[]":(d[h]=(d?.[h]||0)+1,g=d[h]>1);const B=g&&h.endsWith("[]")?h.slice(0,-2):h;if(B==="__proto__")continue;const b=p[3]?D(p[4]):!0,y=b==="true"||b==="false"||b==="null"?JSON.parse(b):b;g&&(u.call(l,B)?Array.isArray(l[B])||(l[B]=[l[B]]):l[B]=[]),Array.isArray(l[B])?l[B].push(y):l[B]=y}const m=[];for(const f of Object.keys(c)){if(!u.call(c,f)||typeof c[f]!="object"||Array.isArray(c[f]))continue;const p=t(f,".");l=c;const h=p.pop(),g=h.replace(/\\\./g,".");for(const B of p)B!=="__proto__"&&((!u.call(l,B)||typeof l[B]!="object")&&(l[B]=Object.create(null)),l=l[B]);l===c&&g===h||(l[g]=c[f],m.push(f))}for(const f of m)delete c[f];return c},"decode"),n=o(a=>a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"),"isQuoted"),s=o(a=>typeof a!="string"||a.match(/[=\r\n]/)||a.match(/^\[/)||a.length>1&&n(a)||a!==a.trim()?JSON.stringify(a):a.split(";").join("\\;").split("#").join("\\#"),"safe"),D=o(a=>{if(a=(a||"").trim(),n(a)){a.charAt(0)==="'"&&(a=a.slice(1,-1));try{a=JSON.parse(a)}catch{}}else{let i=!1,c="";for(let l=0,C=a.length;l<C;l++){const F=a.charAt(l);if(i)"\\;#".indexOf(F)!==-1?c+=F:c+="\\"+F,i=!1;else{if(";#".indexOf(F)!==-1)break;F==="\\"?i=!0:c+=F}}return i&&(c+="\\"),c.trim()}return a},"unsafe");return we={parse:r,decode:r,stringify:e,encode:e,safe:s,unsafe:D},we}o(Ms,"requireIni");var js=Ms(),mt=J(js);const gt=o(u=>P.lstat(u).then(()=>!0,()=>!1),"fileExists"),Ns=["","conventional"],{hasOwnProperty:Ls}=Object.prototype,Bt=o((u,e)=>Ls.call(u,e),"hasOwn"),x=o((u,e,t)=>{if(!e)throw new O(`Invalid config property ${u}: ${t}`)},"parseAssert"),xu={OPENAI_KEY(u){if(!u)throw new O("Please set your OpenAI API key via `aicommit config set OPENAI_KEY=<your token>`");return x("OPENAI_KEY",u.startsWith("sk-"),'Must start with "sk-"'),u},locale(u){return u?(x("locale",u,"Cannot be empty"),x("locale",/^[a-z-]+$/i.test(u),"Must be a valid locale (letters and dashes/underscores). You can consult the list of codes in: https://wikipedia.org/wiki/List_of_ISO_639-1_codes"),u):"en"},generate(u){if(!u)return 1;x("generate",/^\d+$/.test(u),"Must be an integer");const e=Number(u);return x("generate",e>0,"Must be greater than 0"),x("generate",e<=5,"Must be less or equal to 5"),e},type(u){return u?(x("type",Ns.includes(u),"Invalid commit type"),u):""},proxy(u){if(!(!u||u.length===0))return x("proxy",/^https?:\/\//.test(u),"Must be a valid URL"),u},model(u){return!u||u.length===0?"gpt-4o-mini":u},timeout(u){if(!u)return 1e4;x("timeout",/^\d+$/.test(u),"Must be an integer");const e=Number(u);return x("timeout",e>=500,"Must be greater than 500ms"),e},temperature(u){if(!u)return .2;x("temperature",/^(2|\d)(\.\d{1,2})?$/.test(u),"Must be decimal between 0 and 2");const e=Number(u);return x("temperature",e>0,"Must be greater than 0"),x("temperature",e<=2,"Must be less than or equal to 2"),e},"max-length"(u){if(!u)return 50;x("max-length",/^\d+$/.test(u),"Must be an integer");const e=Number(u);return x("max-length",e>=20,"Must be greater than 20 characters"),e},"auto-confirm"(u){return u?typeof u=="boolean"?u:(x("auto-confirm",/^(?:true|false)$/.test(u),"Must be a boolean"),u==="true"):!1},"prepend-reference"(u){return u?typeof u=="boolean"?u:(x("prepend-reference",/^(?:true|false)$/.test(u),"Must be a boolean"),u==="true"):!1}},ve=V.join(Ke.homedir(),".aicommit"),yt=o(async()=>{if(!await gt(ve))return Object.create(null);const e=await P.readFile(ve,"utf8");return mt.parse(e)},"readConfigFile"),$e=o(async(u,e)=>{const t=await yt(),r={};for(const n of Object.keys(xu)){const s=xu[n],D=u?.[n]??t[n];if(e)try{r[n]=s(D)}catch{}else r[n]=s(D)}return r},"getConfig"),Gs=o(async u=>{const e=await yt();for(const[t,r]of u){if(!Bt(xu,t))throw new O(`Invalid config property: ${t}`);const n=xu[t](r);e[t]=n}await P.writeFile(ve,mt.stringify(e),"utf8")},"setConfigs");var q={},Su={exports:{}},Ou={exports:{}},xe,bt;function qs(){if(bt)return xe;bt=1;var u=1e3,e=u*60,t=e*60,r=t*24,n=r*7,s=r*365.25;xe=o(function(l,C){C=C||{};var F=typeof l;if(F==="string"&&l.length>0)return D(l);if(F==="number"&&isFinite(l))return C.long?i(l):a(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))},"ms");function D(l){if(l=String(l),!(l.length>100)){var C=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(l);if(C){var F=parseFloat(C[1]),E=(C[2]||"ms").toLowerCase();switch(E){case"years":case"year":case"yrs":case"yr":case"y":return F*s;case"weeks":case"week":case"w":return F*n;case"days":case"day":case"d":return F*r;case"hours":case"hour":case"hrs":case"hr":case"h":return F*t;case"minutes":case"minute":case"mins":case"min":case"m":return F*e;case"seconds":case"second":case"secs":case"sec":case"s":return F*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return F;default:return}}}}o(D,"parse");function a(l){var C=Math.abs(l);return C>=r?Math.round(l/r)+"d":C>=t?Math.round(l/t)+"h":C>=e?Math.round(l/e)+"m":C>=u?Math.round(l/u)+"s":l+"ms"}o(a,"fmtShort");function i(l){var C=Math.abs(l);return C>=r?c(l,C,r,"day"):C>=t?c(l,C,t,"hour"):C>=e?c(l,C,e,"minute"):C>=u?c(l,C,u,"second"):l+" ms"}o(i,"fmtLong");function c(l,C,F,E){var d=C>=F*1.5;return Math.round(l/F)+" "+E+(d?"s":"")}return o(c,"plural"),xe}o(qs,"requireMs");var Se,At;function wt(){if(At)return Se;At=1;function u(e){r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=s,r.enabled=i,r.humanize=qs(),r.destroy=l,Object.keys(e).forEach(C=>{r[C]=e[C]}),r.names=[],r.skips=[],r.formatters={};function t(C){let F=0;for(let E=0;E<C.length;E++)F=(F<<5)-F+C.charCodeAt(E),F|=0;return r.colors[Math.abs(F)%r.colors.length]}o(t,"selectColor"),r.selectColor=t;function r(C){let F,E=null,d,m;function f(...p){if(!f.enabled)return;const h=f,g=Number(new Date),B=g-(F||g);h.diff=B,h.prev=F,h.curr=g,F=g,p[0]=r.coerce(p[0]),typeof p[0]!="string"&&p.unshift("%O");let b=0;p[0]=p[0].replace(/%([a-zA-Z%])/g,(v,k)=>{if(v==="%%")return"%";b++;const j=r.formatters[k];if(typeof j=="function"){const _=p[b];v=j.call(h,_),p.splice(b,1),b--}return v}),r.formatArgs.call(h,p),(h.log||r.log).apply(h,p)}return o(f,"debug"),f.namespace=C,f.useColors=r.useColors(),f.color=r.selectColor(C),f.extend=n,f.destroy=r.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:o(()=>E!==null?E:(d!==r.namespaces&&(d=r.namespaces,m=r.enabled(C)),m),"get"),set:o(p=>{E=p},"set")}),typeof r.init=="function"&&r.init(f),f}o(r,"createDebug");function n(C,F){const E=r(this.namespace+(typeof F>"u"?":":F)+C);return E.log=this.log,E}o(n,"extend");function s(C){r.save(C),r.namespaces=C,r.names=[],r.skips=[];const F=(typeof C=="string"?C:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const E of F)E[0]==="-"?r.skips.push(E.slice(1)):r.names.push(E)}o(s,"enable");function D(C,F){let E=0,d=0,m=-1,f=0;for(;E<C.length;)if(d<F.length&&(F[d]===C[E]||F[d]==="*"))F[d]==="*"?(m=d,f=E,d++):(E++,d++);else if(m!==-1)d=m+1,f++,E=f;else return!1;for(;d<F.length&&F[d]==="*";)d++;return d===F.length}o(D,"matchesTemplate");function a(){const C=[...r.names,...r.skips.map(F=>"-"+F)].join(",");return r.enable(""),C}o(a,"disable");function i(C){for(const F of r.skips)if(D(C,F))return!1;for(const F of r.names)if(D(C,F))return!0;return!1}o(i,"enabled");function c(C){return C instanceof Error?C.stack||C.message:C}o(c,"coerce");function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return o(l,"destroy"),r.enable(r.load()),r}return o(u,"setup"),Se=u,Se}o(wt,"requireCommon");var vt;function Ws(){return vt||(vt=1,function(u,e){e.formatArgs=r,e.save=n,e.load=s,e.useColors=t,e.storage=D(),e.destroy=(()=>{let i=!1;return()=>{i||(i=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function t(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let i;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(i=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(i[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}o(t,"useColors");function r(i){if(i[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+i[0]+(this.useColors?"%c ":" ")+"+"+u.exports.humanize(this.diff),!this.useColors)return;const c="color: "+this.color;i.splice(1,0,c,"color: inherit");let l=0,C=0;i[0].replace(/%[a-zA-Z%]/g,F=>{F!=="%%"&&(l++,F==="%c"&&(C=l))}),i.splice(C,0,c)}o(r,"formatArgs"),e.log=console.debug||console.log||(()=>{});function n(i){try{i?e.storage.setItem("debug",i):e.storage.removeItem("debug")}catch{}}o(n,"save");function s(){let i;try{i=e.storage.getItem("debug")||e.storage.getItem("DEBUG")}catch{}return!i&&typeof process<"u"&&"env"in process&&(i=process.env.DEBUG),i}o(s,"load");function D(){try{return localStorage}catch{}}o(D,"localstorage"),u.exports=wt()(e);const{formatters:a}=u.exports;a.j=function(i){try{return JSON.stringify(i)}catch(c){return"[UnexpectedJSONParseError]: "+c.message}}}(Ou,Ou.exports)),Ou.exports}o(Ws,"requireBrowser");var Tu={exports:{}},Oe,$t;function Us(){return $t||($t=1,Oe=o((u,e=process.argv)=>{const t=u.startsWith("-")?"":u.length===1?"-":"--",r=e.indexOf(t+u),n=e.indexOf("--");return r!==-1&&(n===-1||r<n)},"hasFlag")),Oe}o(Us,"requireHasFlag");var Te,xt;function zs(){if(xt)return Te;xt=1;const u=Ke,e=Ru,t=Us(),{env:r}=process;let n;t("no-color")||t("no-colors")||t("color=false")||t("color=never")?n=0:(t("color")||t("colors")||t("color=true")||t("color=always"))&&(n=1),"FORCE_COLOR"in r&&(r.FORCE_COLOR==="true"?n=1:r.FORCE_COLOR==="false"?n=0:n=r.FORCE_COLOR.length===0?1:Math.min(parseInt(r.FORCE_COLOR,10),3));function s(i){return i===0?!1:{level:i,hasBasic:!0,has256:i>=2,has16m:i>=3}}o(s,"translateLevel");function D(i,c){if(n===0)return 0;if(t("color=16m")||t("color=full")||t("color=truecolor"))return 3;if(t("color=256"))return 2;if(i&&!c&&n===void 0)return 0;const l=n||0;if(r.TERM==="dumb")return l;if(process.platform==="win32"){const C=u.release().split(".");return Number(C[0])>=10&&Number(C[2])>=10586?Number(C[2])>=14931?3:2:1}if("CI"in r)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(C=>C in r)||r.CI_NAME==="codeship"?1:l;if("TEAMCITY_VERSION"in r)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(r.TEAMCITY_VERSION)?1:0;if(r.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in r){const C=parseInt((r.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(r.TERM_PROGRAM){case"iTerm.app":return C>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(r.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(r.TERM)||"COLORTERM"in r?1:l}o(D,"supportsColor");function a(i){const c=D(i,i&&i.isTTY);return s(c)}return o(a,"getSupportLevel"),Te={supportsColor:a,stdout:s(D(!0,e.isatty(1))),stderr:s(D(!0,e.isatty(2)))},Te}o(zs,"requireSupportsColor");var St;function Hs(){return St||(St=1,function(u,e){const t=Ru,r=He;e.init=l,e.log=a,e.formatArgs=s,e.save=i,e.load=c,e.useColors=n,e.destroy=r.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),e.colors=[6,2,3,4,5,1];try{const F=zs();F&&(F.stderr||F).level>=2&&(e.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}e.inspectOpts=Object.keys(process.env).filter(F=>/^debug_/i.test(F)).reduce((F,E)=>{const d=E.substring(6).toLowerCase().replace(/_([a-z])/g,(f,p)=>p.toUpperCase());let m=process.env[E];return/^(yes|on|true|enabled)$/i.test(m)?m=!0:/^(no|off|false|disabled)$/i.test(m)?m=!1:m==="null"?m=null:m=Number(m),F[d]=m,F},{});function n(){return"colors"in e.inspectOpts?!!e.inspectOpts.colors:t.isatty(process.stderr.fd)}o(n,"useColors");function s(F){const{namespace:E,useColors:d}=this;if(d){const m=this.color,f="\x1B[3"+(m<8?m:"8;5;"+m),p=` ${f};1m${E} \x1B[0m`;F[0]=p+F[0].split(`
68
68
  `).join(`
69
69
  `+p),F.push(f+"m+"+u.exports.humanize(this.diff)+"\x1B[0m")}else F[0]=D()+E+" "+F[0]}o(s,"formatArgs");function D(){return e.inspectOpts.hideDate?"":new Date().toISOString()+" "}o(D,"getDate");function a(...F){return process.stderr.write(r.formatWithOptions(e.inspectOpts,...F)+`
70
70
  `)}o(a,"log");function i(F){F?process.env.DEBUG=F:delete process.env.DEBUG}o(i,"save");function c(){return process.env.DEBUG}o(c,"load");function l(F){F.inspectOpts={};const E=Object.keys(e.inspectOpts);for(let d=0;d<E.length;d++)F.inspectOpts[E[d]]=e.inspectOpts[E[d]]}o(l,"init"),u.exports=wt()(e);const{formatters:C}=u.exports;C.o=function(F){return this.inspectOpts.colors=this.useColors,r.inspect(F,this.inspectOpts).split(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@negoziator/ai-commit",
3
- "version": "1.2.219",
3
+ "version": "1.2.221",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },