@negoziator/ai-commit 2.9.0 → 2.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.mjs +1 -1
  2. package/package.json +1 -1
package/dist/cli.mjs CHANGED
@@ -19,7 +19,7 @@ var Ht=Object.defineProperty;var o=(u,e)=>Ht(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 nn(e.map(n=>n.map(s=>this.render(s))),r?an(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,An=/[|\\{}()[\]^$+*?.]/;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 l=i.slice(-3)==="...";l&&(r=n,i=i.slice(0,-3));const C=i.match(An);if(C)throw new Error(`Invalid parameter: ${M(n)}. Invalid character found ${M(C[0])}`);e.push({name:i,required:a,spread:l})}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=cn(s);if(i in u)throw new Error(`Invalid parameter: ${M(s)} is used more than once.`);const l=a?t.slice(n):t[n];if(a&&(n=e.length),D&&(!l||a&&l.length===0))return console.error(`Error: Missing required parameter ${M(s)}
22
- `),r(),process.exit(1);u[i]=l}}o(Uu,"b$1");function wn(u){return u===void 0||u!==!1}o(wn,"W$2");function pD(u,e,t,r){const n={...e.flags},s=e.version;s&&(n.version={type:Boolean,description:"Show version"});const{help:D}=e,a=wn(D);a&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const i=vr(n,r,{ignore:e.ignoreArgv}),l=o(()=>{console.log(e.version)},"f");if(s&&i.flags.version===!0)return l(),process.exit(0);const C=new bn,F=a&&D?.render?D.render:d=>C.render(d),c=o(d=>{const m=Bn({...e,...d?{help:d}:{},flags:n});console.log(F(m,C))},"u");if(a&&i.flags.help===!0)return c(),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,c),Uu(h,Wu(p),g,c)}else Uu(h,Wu(d),m,c);Object.assign(i._,h)}const E={...i,showVersion:l,showHelp:c};return typeof t=="function"&&t(E),{command:u,...E}}o(pD,"x$1");function vn(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(vn,"z$1");function $n(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=vn(r,u.commands);if(n)return pD(n.options.name,{...n.options,parent:u},n.callback,t.slice(1))}return pD(void 0,u,e,t)}o($n,"Z");function hD(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(hD,"G$2");var xn="2.9.0",Sn="Writes your git commit messages for you with AI",zu={version:xn,description:Sn},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 z={exports:{}},Hu,mD;function On(){if(mD)return Hu;mD=1,Hu=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 l=a[i].toLowerCase();if(l&&s.substr(-l.length).toLowerCase()===l)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,l){a(i,i?!1:t(l,s,D))})}o(r,"isexe");function n(s,D){return t(u.statSync(s),s,D)}return o(n,"sync"),Hu}o(On,"requireWindows");var Yu,gD;function Tn(){if(gD)return Yu;gD=1,Yu=e,e.sync=t;var u=_u;function e(s,D,a){u.stat(s,function(i,l){a(i,i?!1:r(l,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,l=s.gid,C=D.uid!==void 0?D.uid:process.getuid&&process.getuid(),F=D.gid!==void 0?D.gid:process.getgid&&process.getgid(),c=parseInt("100",8),E=parseInt("010",8),d=parseInt("001",8),m=c|E,f=a&d||a&E&&l===F||a&c&&i===C||a&m&&C===0;return f}return o(n,"checkMode"),Yu}o(Tn,"requireMode");var Ku,BD;function In(){if(BD)return Ku;BD=1;var u;process.platform==="win32"||G.TESTING_WINDOWS?u=On():u=Tn(),Ku=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,l){i?a(i):D(l)})})}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"),Ku}o(In,"requireIsexe");var Vu,yD;function Pn(){if(yD)return Vu;yD=1;const u=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",e=W,t=u?";":":",r=In(),n=o(i=>Object.assign(new Error(`not found: ${i}`),{code:"ENOENT"}),"getNotFoundError"),s=o((i,l)=>{const C=l.colon||t,F=i.match(/\//)||u&&i.match(/\\/)?[""]:[...u?[process.cwd()]:[],...(l.path||process.env.PATH||"").split(C)],c=u?l.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",E=u?c.split(C):[""];return u&&i.indexOf(".")!==-1&&E[0]!==""&&E.unshift(""),{pathEnv:F,pathExt:E,pathExtExe:c}},"getPathInfo"),D=o((i,l,C)=>{typeof l=="function"&&(C=l,l={}),l||(l={});const{pathEnv:F,pathExt:c,pathExtExe:E}=s(i,l),d=[],m=o(p=>new Promise((h,g)=>{if(p===F.length)return l.all&&d.length?h(d):g(n(i));const B=F[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===c.length)return B(m(h+1));const y=c[g];r(p+y,{pathExt:E},(v,k)=>{if(!v&&k)if(l.all)d.push(p+y);else return B(p+y);return B(f(p,h,g+1))})}),"subStep");return C?m(0).then(p=>C(null,p),C):m(0)},"which"),a=o((i,l)=>{l=l||{};const{pathEnv:C,pathExt:F,pathExtExe:c}=s(i,l),E=[];for(let d=0;d<C.length;d++){const m=C[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<F.length;g++){const B=h+F[g];try{if(r.sync(B,{pathExt:c}))if(l.all)E.push(B);else return B}catch{}}}if(l.all&&E.length)return E;if(l.nothrow)return null;throw n(i)},"whichSync");return Vu=D,D.sync=a,Vu}o(Pn,"requireWhich");var Eu={exports:{}},bD;function Rn(){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(Rn,"requirePathKey");var Ju,AD;function _n(){if(AD)return Ju;AD=1;const u=W,e=Pn(),t=Rn();function r(s,D){const a=s.options.env||process.env,i=process.cwd(),l=s.options.cwd!=null,C=l&&process.chdir!==void 0&&!process.chdir.disabled;if(C)try{process.chdir(s.options.cwd)}catch{}let F;try{F=e.sync(s.command,{path:a[t({env:a})],pathExt:D?u.delimiter:void 0})}catch{}finally{C&&process.chdir(i)}return F&&(F=u.resolve(l?s.options.cwd:"",F)),F}o(r,"resolveCommandAttempt");function n(s){return r(s)||r(s,!0)}return o(n,"resolveCommand"),Ju=n,Ju}o(_n,"requireResolveCommand");var pu={},wD;function kn(){if(wD)return pu;wD=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(kn,"require_escape");var Zu,vD;function Mn(){return vD||(vD=1,Zu=/^#!(.*)/),Zu}o(Mn,"requireShebangRegex");var Xu,$D;function jn(){if($D)return Xu;$D=1;const u=Mn();return Xu=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"),Xu}o(jn,"requireShebangCommand");var Qu,xD;function Nn(){if(xD)return Qu;xD=1;const u=_u,e=jn();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"),Qu=t,Qu}o(Nn,"requireReadShebang");var ue,SD;function Ln(){if(SD)return ue;SD=1;const u=W,e=_n(),t=kn(),r=Nn(),n=process.platform==="win32",s=/\.(?:com|exe)$/i,D=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function a(C){C.file=e(C);const F=C.file&&r(C.file);return F?(C.args.unshift(C.file),C.command=F,e(C)):C.file}o(a,"detectShebang");function i(C){if(!n)return C;const F=a(C),c=!s.test(F);if(C.options.forceShell||c){const E=D.test(F);C.command=u.normalize(C.command),C.command=t.command(C.command),C.args=C.args.map(m=>t.argument(m,E));const d=[C.command].concat(C.args).join(" ");C.args=["/d","/s","/c",`"${d}"`],C.command=process.env.comspec||"cmd.exe",C.options.windowsVerbatimArguments=!0}return C}o(i,"parseNonShell");function l(C,F,c){F&&!Array.isArray(F)&&(c=F,F=null),F=F?F.slice(0):[],c=Object.assign({},c);const E={command:C,args:F,options:c,file:void 0,original:{command:C,args:F}};return c.shell?E:i(E)}return o(l,"parse"),ue=l,ue}o(Ln,"requireParse");var ee,OD;function Gn(){if(OD)return ee;OD=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,l){if(i==="exit"){const C=r(l,D);if(C)return a.call(s,"error",C)}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"),ee={hookChildProcess:t,verifyENOENT:r,verifyENOENTSync:n,notFoundError:e},ee}o(Gn,"requireEnoent");var TD;function qn(){if(TD)return z.exports;TD=1;const u=Vt,e=Ln(),t=Gn();function r(s,D,a){const i=e(s,D,a),l=u.spawn(i.command,i.args,i.options);return t.hookChildProcess(l,i),l}o(r,"spawn");function n(s,D,a){const i=e(s,D,a),l=u.spawnSync(i.command,i.args,i.options);return l.error=l.error||t.verifyENOENTSync(l.status,i),l}return o(n,"spawnSync"),z.exports=r,z.exports.spawn=r,z.exports.sync=n,z.exports._parse=e,z.exports._enoent=t,z.exports}o(qn,"requireCrossSpawn");var Wn=qn(),Un=J(Wn);function zn(u){const e=typeof u=="string"?`
22
+ `),r(),process.exit(1);u[i]=l}}o(Uu,"b$1");function wn(u){return u===void 0||u!==!1}o(wn,"W$2");function pD(u,e,t,r){const n={...e.flags},s=e.version;s&&(n.version={type:Boolean,description:"Show version"});const{help:D}=e,a=wn(D);a&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const i=vr(n,r,{ignore:e.ignoreArgv}),l=o(()=>{console.log(e.version)},"f");if(s&&i.flags.version===!0)return l(),process.exit(0);const C=new bn,F=a&&D?.render?D.render:d=>C.render(d),c=o(d=>{const m=Bn({...e,...d?{help:d}:{},flags:n});console.log(F(m,C))},"u");if(a&&i.flags.help===!0)return c(),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,c),Uu(h,Wu(p),g,c)}else Uu(h,Wu(d),m,c);Object.assign(i._,h)}const E={...i,showVersion:l,showHelp:c};return typeof t=="function"&&t(E),{command:u,...E}}o(pD,"x$1");function vn(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(vn,"z$1");function $n(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=vn(r,u.commands);if(n)return pD(n.options.name,{...n.options,parent:u},n.callback,t.slice(1))}return pD(void 0,u,e,t)}o($n,"Z");function hD(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(hD,"G$2");var xn="2.9.1",Sn="Writes your git commit messages for you with AI",zu={version:xn,description:Sn},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 z={exports:{}},Hu,mD;function On(){if(mD)return Hu;mD=1,Hu=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 l=a[i].toLowerCase();if(l&&s.substr(-l.length).toLowerCase()===l)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,l){a(i,i?!1:t(l,s,D))})}o(r,"isexe");function n(s,D){return t(u.statSync(s),s,D)}return o(n,"sync"),Hu}o(On,"requireWindows");var Yu,gD;function Tn(){if(gD)return Yu;gD=1,Yu=e,e.sync=t;var u=_u;function e(s,D,a){u.stat(s,function(i,l){a(i,i?!1:r(l,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,l=s.gid,C=D.uid!==void 0?D.uid:process.getuid&&process.getuid(),F=D.gid!==void 0?D.gid:process.getgid&&process.getgid(),c=parseInt("100",8),E=parseInt("010",8),d=parseInt("001",8),m=c|E,f=a&d||a&E&&l===F||a&c&&i===C||a&m&&C===0;return f}return o(n,"checkMode"),Yu}o(Tn,"requireMode");var Ku,BD;function In(){if(BD)return Ku;BD=1;var u;process.platform==="win32"||G.TESTING_WINDOWS?u=On():u=Tn(),Ku=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,l){i?a(i):D(l)})})}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"),Ku}o(In,"requireIsexe");var Vu,yD;function Pn(){if(yD)return Vu;yD=1;const u=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",e=W,t=u?";":":",r=In(),n=o(i=>Object.assign(new Error(`not found: ${i}`),{code:"ENOENT"}),"getNotFoundError"),s=o((i,l)=>{const C=l.colon||t,F=i.match(/\//)||u&&i.match(/\\/)?[""]:[...u?[process.cwd()]:[],...(l.path||process.env.PATH||"").split(C)],c=u?l.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",E=u?c.split(C):[""];return u&&i.indexOf(".")!==-1&&E[0]!==""&&E.unshift(""),{pathEnv:F,pathExt:E,pathExtExe:c}},"getPathInfo"),D=o((i,l,C)=>{typeof l=="function"&&(C=l,l={}),l||(l={});const{pathEnv:F,pathExt:c,pathExtExe:E}=s(i,l),d=[],m=o(p=>new Promise((h,g)=>{if(p===F.length)return l.all&&d.length?h(d):g(n(i));const B=F[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===c.length)return B(m(h+1));const y=c[g];r(p+y,{pathExt:E},(v,k)=>{if(!v&&k)if(l.all)d.push(p+y);else return B(p+y);return B(f(p,h,g+1))})}),"subStep");return C?m(0).then(p=>C(null,p),C):m(0)},"which"),a=o((i,l)=>{l=l||{};const{pathEnv:C,pathExt:F,pathExtExe:c}=s(i,l),E=[];for(let d=0;d<C.length;d++){const m=C[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<F.length;g++){const B=h+F[g];try{if(r.sync(B,{pathExt:c}))if(l.all)E.push(B);else return B}catch{}}}if(l.all&&E.length)return E;if(l.nothrow)return null;throw n(i)},"whichSync");return Vu=D,D.sync=a,Vu}o(Pn,"requireWhich");var Eu={exports:{}},bD;function Rn(){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(Rn,"requirePathKey");var Ju,AD;function _n(){if(AD)return Ju;AD=1;const u=W,e=Pn(),t=Rn();function r(s,D){const a=s.options.env||process.env,i=process.cwd(),l=s.options.cwd!=null,C=l&&process.chdir!==void 0&&!process.chdir.disabled;if(C)try{process.chdir(s.options.cwd)}catch{}let F;try{F=e.sync(s.command,{path:a[t({env:a})],pathExt:D?u.delimiter:void 0})}catch{}finally{C&&process.chdir(i)}return F&&(F=u.resolve(l?s.options.cwd:"",F)),F}o(r,"resolveCommandAttempt");function n(s){return r(s)||r(s,!0)}return o(n,"resolveCommand"),Ju=n,Ju}o(_n,"requireResolveCommand");var pu={},wD;function kn(){if(wD)return pu;wD=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(kn,"require_escape");var Zu,vD;function Mn(){return vD||(vD=1,Zu=/^#!(.*)/),Zu}o(Mn,"requireShebangRegex");var Xu,$D;function jn(){if($D)return Xu;$D=1;const u=Mn();return Xu=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"),Xu}o(jn,"requireShebangCommand");var Qu,xD;function Nn(){if(xD)return Qu;xD=1;const u=_u,e=jn();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"),Qu=t,Qu}o(Nn,"requireReadShebang");var ue,SD;function Ln(){if(SD)return ue;SD=1;const u=W,e=_n(),t=kn(),r=Nn(),n=process.platform==="win32",s=/\.(?:com|exe)$/i,D=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function a(C){C.file=e(C);const F=C.file&&r(C.file);return F?(C.args.unshift(C.file),C.command=F,e(C)):C.file}o(a,"detectShebang");function i(C){if(!n)return C;const F=a(C),c=!s.test(F);if(C.options.forceShell||c){const E=D.test(F);C.command=u.normalize(C.command),C.command=t.command(C.command),C.args=C.args.map(m=>t.argument(m,E));const d=[C.command].concat(C.args).join(" ");C.args=["/d","/s","/c",`"${d}"`],C.command=process.env.comspec||"cmd.exe",C.options.windowsVerbatimArguments=!0}return C}o(i,"parseNonShell");function l(C,F,c){F&&!Array.isArray(F)&&(c=F,F=null),F=F?F.slice(0):[],c=Object.assign({},c);const E={command:C,args:F,options:c,file:void 0,original:{command:C,args:F}};return c.shell?E:i(E)}return o(l,"parse"),ue=l,ue}o(Ln,"requireParse");var ee,OD;function Gn(){if(OD)return ee;OD=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,l){if(i==="exit"){const C=r(l,D);if(C)return a.call(s,"error",C)}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"),ee={hookChildProcess:t,verifyENOENT:r,verifyENOENTSync:n,notFoundError:e},ee}o(Gn,"requireEnoent");var TD;function qn(){if(TD)return z.exports;TD=1;const u=Vt,e=Ln(),t=Gn();function r(s,D,a){const i=e(s,D,a),l=u.spawn(i.command,i.args,i.options);return t.hookChildProcess(l,i),l}o(r,"spawn");function n(s,D,a){const i=e(s,D,a),l=u.spawnSync(i.command,i.args,i.options);return l.error=l.error||t.verifyENOENTSync(l.status,i),l}return o(n,"spawnSync"),z.exports=r,z.exports.spawn=r,z.exports.sync=n,z.exports._parse=e,z.exports._enoent=t,z.exports}o(qn,"requireCrossSpawn");var Wn=qn(),Un=J(Wn);function zn(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(zn,"stripFinalNewline");function ID(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(ID,"pathKey");const Hn=o(({cwd:u=$.cwd(),path:e=$.env[ID()],preferLocal:t=!0,execPath:r=$.execPath,addExecPath:n=!0}={})=>{const s=u instanceof URL?ze(u):u,D=V.resolve(s),a=[];return t&&Yn(a,D),n&&Kn(a,r,D),[...a,e].join(V.delimiter)},"npmRunPath"),Yn=o((u,e)=>{let t;for(;t!==e;)u.push(V.join(e,"node_modules/.bin")),t=e,e=V.resolve(e,"..")},"applyPreferLocal"),Kn=o((u,e,t)=>{const r=e instanceof URL?ze(e):e;u.push(V.resolve(t,r,".."))},"applyExecPath"),Vn=o(({env:u=$.env,...e}={})=>{u={...u};const t=ID({env:u});return e.path=u[t],u[t]=Hn(e),u},"npmRunPathEnv"),Jn=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);!Zn(n,s)&&r||Object.defineProperty(u,t,s)},"copyProperty"),Zn=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"),Xn=o((u,e)=>{const t=Object.getPrototypeOf(e);t!==Object.getPrototypeOf(u)&&Object.setPrototypeOf(u,t)},"changePrototype"),Qn=o((u,e)=>`/* Wrapped ${u}*/
24
24
  ${e}`,"wrappedToString"),uo=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),eo=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Do=o((u,e,t)=>{const r=t===""?"":`with ${t.trim()}() `,n=Qn.bind(null,r,e.toString());Object.defineProperty(n,"name",eo),Object.defineProperty(u,"toString",{...uo,value:n})},"changeToString");function to(u,e,{ignoreNonConfigurable:t=!1}={}){const{name:r}=u;for(const n of Reflect.ownKeys(e))Jn(u,e,n,t);return Xn(u,e),Do(u,e,r),u}o(to,"mimicFunction");const hu=new WeakMap,PD=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 to(s,u),hu.set(s,r),s},"onetime");PD.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 ro=o(()=>{const u=_D-RD+1;return Array.from({length:u},no)},"getRealtimeSignals"),no=o((u,e)=>({name:`SIGRT${e+1}`,number:RD+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),"getRealtimeSignal"),RD=34,_D=64,oo=[{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"}],kD=o(()=>{const u=ro();return[...oo,...u].map(so)},"getSignals"),so=o(({name:u,number:e,description:t,action:r,forced:n=!1,standard:s})=>{const{signals:{[u]:D}}=He,a=D!==void 0;return{name:u,number:a?D:e,description:t,supported:a,action:r,forced:n,standard:s}},"normalizeSignal"),io=o(()=>{const u=kD();return Object.fromEntries(u.map(ao))},"getSignalsByName"),ao=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"),co=io(),lo=o(()=>{const u=kD(),e=_D+1,t=Array.from({length:e},(r,n)=>Fo(n,u));return Object.assign({},...t)},"getSignalsByNumber"),Fo=o((u,e)=>{const t=Co(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"),Co=o((u,e)=>{const t=e.find(({name:r})=>He.signals[r]===u);return t!==void 0?t:e.find(r=>r.number===u)},"findSignalByNumber");lo();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"),MD=o(({stdout:u,stderr:e,all:t,error:r,signal:n,exitCode:s,command:D,escapedCommand:a,timedOut:i,isCanceled:l,killed:C,parsed:{options:{timeout:F,cwd:c=$.cwd()}}})=>{s=s===null?void 0:s,n=n===null?void 0:n;const E=n===void 0?void 0:co[n].description,d=r&&r.code,f=`Command ${fo({timedOut:i,timeout:F,errorCode:d,signal:n,signalDescription:E,exitCode:s,isCanceled:l})}: ${D}`,p=Object.prototype.toString.call(r)==="[object Error]",h=p?`${f}
25
25
  ${r.message}`:f,g=[h,e,u].filter(Boolean).join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@negoziator/ai-commit",
3
- "version": "2.9.0",
3
+ "version": "2.9.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },