@negoziator/ai-commit 1.2.10 → 1.2.11

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 @@ import fu from"tty";import{Buffer as Vt}from"node:buffer";import W from"node:pat
19
19
  `:"")+(t?this.indentText({text:this.render(t),spaces:e}):"")}
20
20
  `}table({tableData:D,tableOptions:t,tableBreakpoints:e}){return ar(D.map(r=>r.map(o=>this.render(o))),e?Fr(e):t)}flagParameter(D){return D===Boolean?"":D===String?"<string>":D===Number?"<number>":Array.isArray(D)?this.flagParameter(D[0]):"<value>"}flagOperator(D){return" "}flagName(D){const{flag:t,flagFormatted:e,aliasesEnabled:r,aliasFormatted:o}=D;let n="";if(o?n+=`${o}, `:r&&(n+=" "),n+=e,"placeholder"in t&&typeof t.placeholder=="string")n+=`${this.flagOperator(D)}${t.placeholder}`;else{const s=this.flagParameter("type"in t?t.type:t);s&&(n+=`${this.flagOperator(D)}${s}`)}return n}flagDefault(D){return JSON.stringify(D)}flagDescription({flag:D}){let t="description"in D?D.description??"":"";if("default"in D){let{default:e}=D;typeof e=="function"&&(e=e()),e&&(t+=` (default: ${this.flagDefault(e)})`)}return t}render(D){if(typeof D=="string")return D;if(Array.isArray(D))return D.map(t=>this.render(t)).join(`
21
21
  `);if("type"in D&&this[D.type]){const t=this[D.type];if(typeof t=="function")return t.call(this,D.data)}throw new Error(`Invalid node type: ${JSON.stringify(D)}`)}}const Wu=/^[\w.-]+$/,{stringify:_}=JSON,vr=/[|\\{}()[\]^$+*?.]/;function Hu(u){const D=[];let t,e;for(const r of u){if(e)throw new Error(`Invalid parameter: Spread parameter ${_(e)} must be last`);const o=r[0],n=r[r.length-1];let s;if(o==="<"&&n===">"&&(s=!0,t))throw new Error(`Invalid parameter: Required parameter ${_(r)} cannot come after optional parameter ${_(t)}`);if(o==="["&&n==="]"&&(s=!1,t=r),s===void 0)throw new Error(`Invalid parameter: ${_(r)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let i=r.slice(1,-1);const l=i.slice(-3)==="...";l&&(e=r,i=i.slice(0,-3));const F=i.match(vr);if(F)throw new Error(`Invalid parameter: ${_(r)}. Invalid character found ${_(F[0])}`);D.push({name:i,required:s,spread:l})}return D}function qu(u,D,t,e){for(let r=0;r<D.length;r+=1){const{name:o,required:n,spread:s}=D[r],i=Cr(o);if(i in u)throw new Error(`Invalid parameter: ${_(o)} is used more than once.`);const l=s?t.slice(r):t[r];if(s&&(r=D.length),n&&(!l||s&&l.length===0))return console.error(`Error: Missing required parameter ${_(o)}
22
- `),e(),process.exit(1);u[i]=l}}function xr(u){return u===void 0||u!==!1}function me(u,D,t,e){const r={...D.flags},o=D.version;o&&(r.version={type:Boolean,description:"Show version"});const{help:n}=D,s=xr(n);s&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const i=On(r,e,{ignore:D.ignoreArgv}),l=()=>{console.log(D.version)};if(o&&i.flags.version===!0)return l(),process.exit(0);const F=new $r,a=s&&n?.render?n.render:f=>F.render(f),c=f=>{const d=yr({...D,...f?{help:f}:{},flags:r});console.log(a(d,F))};if(s&&i.flags.help===!0)return c(),process.exit(0);if(D.parameters){let{parameters:f}=D,d=i._;const p=f.indexOf("--"),h=f.slice(p+1),w=Object.create(null);if(p>-1&&h.length>0){f=f.slice(0,p);const P=i._["--"];d=d.slice(0,-P.length||void 0),qu(w,Hu(f),d,c),qu(w,Hu(h),P,c)}else qu(w,Hu(f),d,c);Object.assign(i._,w)}const C={...i,showVersion:l,showHelp:c};return typeof t=="function"&&t(C),{command:u,...C}}function Sr(u,D){const t=new Map;for(const e of D){const r=[e.options.name],{alias:o}=e.options;o&&(Array.isArray(o)?r.push(...o):r.push(o));for(const n of r){if(t.has(n))throw new Error(`Duplicate command name found: ${_(n)}`);t.set(n,e)}}return t.get(u)}function Or(u,D,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!Wu.test(u.name)))throw new Error(`Invalid script name: ${_(u.name)}`);const e=t[0];if(u.commands&&Wu.test(e)){const r=Sr(e,u.commands);if(r)return me(r.options.name,{...r.options,parent:u},r.callback,t.slice(1))}return me(void 0,u,D,t)}function ge(u,D){if(!u)throw new Error("Command options are required");const{name:t}=u;if(u.name===void 0)throw new Error("Command name is required");if(!Wu.test(t))throw new Error(`Invalid command name ${JSON.stringify(t)}. Command names must be one word.`);return{options:u,callback:D}}var Be="1.2.10",Tr="Writes your git commit messages for you with AI",y=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}var q={exports:{}},zu,be;function Ir(){if(be)return zu;be=1,zu=e,e.sync=r;var u=ku;function D(o,n){var s=n.pathExt!==void 0?n.pathExt:process.env.PATHEXT;if(!s||(s=s.split(";"),s.indexOf("")!==-1))return!0;for(var i=0;i<s.length;i++){var l=s[i].toLowerCase();if(l&&o.substr(-l.length).toLowerCase()===l)return!0}return!1}function t(o,n,s){return!o.isSymbolicLink()&&!o.isFile()?!1:D(n,s)}function e(o,n,s){u.stat(o,function(i,l){s(i,i?!1:t(l,o,n))})}function r(o,n){return t(u.statSync(o),o,n)}return zu}var Ku,Ae;function Pr(){if(Ae)return Ku;Ae=1,Ku=D,D.sync=t;var u=ku;function D(o,n,s){u.stat(o,function(i,l){s(i,i?!1:e(l,n))})}function t(o,n){return e(u.statSync(o),n)}function e(o,n){return o.isFile()&&r(o,n)}function r(o,n){var s=o.mode,i=o.uid,l=o.gid,F=n.uid!==void 0?n.uid:process.getuid&&process.getuid(),a=n.gid!==void 0?n.gid:process.getgid&&process.getgid(),c=parseInt("100",8),C=parseInt("010",8),f=parseInt("001",8),d=c|C,p=s&f||s&C&&l===a||s&c&&i===F||s&d&&F===0;return p}return Ku}var gu;process.platform==="win32"||y.TESTING_WINDOWS?gu=Ir():gu=Pr();var _r=Yu;Yu.sync=Rr;function Yu(u,D,t){if(typeof D=="function"&&(t=D,D={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(e,r){Yu(u,D||{},function(o,n){o?r(o):e(n)})})}gu(u,D||{},function(e,r){e&&(e.code==="EACCES"||D&&D.ignoreErrors)&&(e=null,r=!1),t(e,r)})}function Rr(u,D){try{return gu.sync(u,D||{})}catch(t){if(D&&D.ignoreErrors||t.code==="EACCES")return!1;throw t}}const z=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",ye=H,kr=z?";":":",we=_r,$e=u=>Object.assign(new Error(`not found: ${u}`),{code:"ENOENT"}),ve=(u,D)=>{const t=D.colon||kr,e=u.match(/\//)||z&&u.match(/\\/)?[""]:[...z?[process.cwd()]:[],...(D.path||process.env.PATH||"").split(t)],r=z?D.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=z?r.split(t):[""];return z&&u.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:e,pathExt:o,pathExtExe:r}},xe=(u,D,t)=>{typeof D=="function"&&(t=D,D={}),D||(D={});const{pathEnv:e,pathExt:r,pathExtExe:o}=ve(u,D),n=[],s=l=>new Promise((F,a)=>{if(l===e.length)return D.all&&n.length?F(n):a($e(u));const c=e[l],C=/^".*"$/.test(c)?c.slice(1,-1):c,f=ye.join(C,u),d=!C&&/^\.[\\\/]/.test(u)?u.slice(0,2)+f:f;F(i(d,l,0))}),i=(l,F,a)=>new Promise((c,C)=>{if(a===r.length)return c(s(F+1));const f=r[a];we(l+f,{pathExt:o},(d,p)=>{if(!d&&p)if(D.all)n.push(l+f);else return c(l+f);return c(i(l,F,a+1))})});return t?s(0).then(l=>t(null,l),t):s(0)},Mr=(u,D)=>{D=D||{};const{pathEnv:t,pathExt:e,pathExtExe:r}=ve(u,D),o=[];for(let n=0;n<t.length;n++){const s=t[n],i=/^".*"$/.test(s)?s.slice(1,-1):s,l=ye.join(i,u),F=!i&&/^\.[\\\/]/.test(u)?u.slice(0,2)+l:l;for(let a=0;a<e.length;a++){const c=F+e[a];try{if(we.sync(c,{pathExt:r}))if(D.all)o.push(c);else return c}catch{}}}if(D.all&&o.length)return o;if(D.nothrow)return null;throw $e(u)};var jr=xe;xe.sync=Mr;var Vu={exports:{}};const Se=(u={})=>{const D=u.env||process.env;return(u.platform||process.platform)!=="win32"?"PATH":Object.keys(D).reverse().find(e=>e.toUpperCase()==="PATH")||"Path"};Vu.exports=Se,Vu.exports.default=Se;var Nr=Vu.exports;const Oe=H,Lr=jr,Gr=Nr;function Te(u,D){const t=u.options.env||process.env,e=process.cwd(),r=u.options.cwd!=null,o=r&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(u.options.cwd)}catch{}let n;try{n=Lr.sync(u.command,{path:t[Gr({env:t})],pathExt:D?Oe.delimiter:void 0})}catch{}finally{o&&process.chdir(e)}return n&&(n=Oe.resolve(r?u.options.cwd:"",n)),n}function Ur(u){return Te(u)||Te(u,!0)}var Wr=Ur,Ju={};const Zu=/([()\][%!^"`<>&|;, *?])/g;function Hr(u){return u=u.replace(Zu,"^$1"),u}function qr(u,D){return u=`${u}`,u=u.replace(/(\\*)"/g,'$1$1\\"'),u=u.replace(/(\\*)$/,"$1$1"),u=`"${u}"`,u=u.replace(Zu,"^$1"),D&&(u=u.replace(Zu,"^$1")),u}Ju.command=Hr,Ju.argument=qr;var zr=/^#!(.*)/;const Kr=zr;var Yr=(u="")=>{const D=u.match(Kr);if(!D)return null;const[t,e]=D[0].replace(/#! ?/,"").split(" "),r=t.split("/").pop();return r==="env"?e:e?`${r} ${e}`:r};const Xu=ku,Vr=Yr;function Jr(u){const t=Buffer.alloc(150);let e;try{e=Xu.openSync(u,"r"),Xu.readSync(e,t,0,150,0),Xu.closeSync(e)}catch{}return Vr(t.toString())}var Zr=Jr;const Xr=H,Ie=Wr,Pe=Ju,Qr=Zr,uo=process.platform==="win32",Do=/\.(?:com|exe)$/i,eo=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function to(u){u.file=Ie(u);const D=u.file&&Qr(u.file);return D?(u.args.unshift(u.file),u.command=D,Ie(u)):u.file}function no(u){if(!uo)return u;const D=to(u),t=!Do.test(D);if(u.options.forceShell||t){const e=eo.test(D);u.command=Xr.normalize(u.command),u.command=Pe.command(u.command),u.args=u.args.map(o=>Pe.argument(o,e));const r=[u.command].concat(u.args).join(" ");u.args=["/d","/s","/c",`"${r}"`],u.command=process.env.comspec||"cmd.exe",u.options.windowsVerbatimArguments=!0}return u}function ro(u,D,t){D&&!Array.isArray(D)&&(t=D,D=null),D=D?D.slice(0):[],t=Object.assign({},t);const e={command:u,args:D,options:t,file:void 0,original:{command:u,args:D}};return t.shell?e:no(e)}var oo=ro;const Qu=process.platform==="win32";function uD(u,D){return Object.assign(new Error(`${D} ${u.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${D} ${u.command}`,path:u.command,spawnargs:u.args})}function so(u,D){if(!Qu)return;const t=u.emit;u.emit=function(e,r){if(e==="exit"){const o=_e(r,D);if(o)return t.call(u,"error",o)}return t.apply(u,arguments)}}function _e(u,D){return Qu&&u===1&&!D.file?uD(D.original,"spawn"):null}function io(u,D){return Qu&&u===1&&!D.file?uD(D.original,"spawnSync"):null}var ao={hookChildProcess:so,verifyENOENT:_e,verifyENOENTSync:io,notFoundError:uD};const Re=Zt,DD=oo,eD=ao;function ke(u,D,t){const e=DD(u,D,t),r=Re.spawn(e.command,e.args,e.options);return eD.hookChildProcess(r,e),r}function co(u,D,t){const e=DD(u,D,t),r=Re.spawnSync(e.command,e.args,e.options);return r.error=r.error||eD.verifyENOENTSync(r.status,e),r}q.exports=ke,q.exports.spawn=ke,q.exports.sync=co,q.exports._parse=DD,q.exports._enoent=eD;var lo=q.exports,Fo=j(lo);function Co(u){const D=typeof u=="string"?`
22
+ `),e(),process.exit(1);u[i]=l}}function xr(u){return u===void 0||u!==!1}function me(u,D,t,e){const r={...D.flags},o=D.version;o&&(r.version={type:Boolean,description:"Show version"});const{help:n}=D,s=xr(n);s&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const i=On(r,e,{ignore:D.ignoreArgv}),l=()=>{console.log(D.version)};if(o&&i.flags.version===!0)return l(),process.exit(0);const F=new $r,a=s&&n?.render?n.render:f=>F.render(f),c=f=>{const d=yr({...D,...f?{help:f}:{},flags:r});console.log(a(d,F))};if(s&&i.flags.help===!0)return c(),process.exit(0);if(D.parameters){let{parameters:f}=D,d=i._;const p=f.indexOf("--"),h=f.slice(p+1),w=Object.create(null);if(p>-1&&h.length>0){f=f.slice(0,p);const P=i._["--"];d=d.slice(0,-P.length||void 0),qu(w,Hu(f),d,c),qu(w,Hu(h),P,c)}else qu(w,Hu(f),d,c);Object.assign(i._,w)}const C={...i,showVersion:l,showHelp:c};return typeof t=="function"&&t(C),{command:u,...C}}function Sr(u,D){const t=new Map;for(const e of D){const r=[e.options.name],{alias:o}=e.options;o&&(Array.isArray(o)?r.push(...o):r.push(o));for(const n of r){if(t.has(n))throw new Error(`Duplicate command name found: ${_(n)}`);t.set(n,e)}}return t.get(u)}function Or(u,D,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!Wu.test(u.name)))throw new Error(`Invalid script name: ${_(u.name)}`);const e=t[0];if(u.commands&&Wu.test(e)){const r=Sr(e,u.commands);if(r)return me(r.options.name,{...r.options,parent:u},r.callback,t.slice(1))}return me(void 0,u,D,t)}function ge(u,D){if(!u)throw new Error("Command options are required");const{name:t}=u;if(u.name===void 0)throw new Error("Command name is required");if(!Wu.test(t))throw new Error(`Invalid command name ${JSON.stringify(t)}. Command names must be one word.`);return{options:u,callback:D}}var Be="1.2.11",Tr="Writes your git commit messages for you with AI",y=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}var q={exports:{}},zu,be;function Ir(){if(be)return zu;be=1,zu=e,e.sync=r;var u=ku;function D(o,n){var s=n.pathExt!==void 0?n.pathExt:process.env.PATHEXT;if(!s||(s=s.split(";"),s.indexOf("")!==-1))return!0;for(var i=0;i<s.length;i++){var l=s[i].toLowerCase();if(l&&o.substr(-l.length).toLowerCase()===l)return!0}return!1}function t(o,n,s){return!o.isSymbolicLink()&&!o.isFile()?!1:D(n,s)}function e(o,n,s){u.stat(o,function(i,l){s(i,i?!1:t(l,o,n))})}function r(o,n){return t(u.statSync(o),o,n)}return zu}var Ku,Ae;function Pr(){if(Ae)return Ku;Ae=1,Ku=D,D.sync=t;var u=ku;function D(o,n,s){u.stat(o,function(i,l){s(i,i?!1:e(l,n))})}function t(o,n){return e(u.statSync(o),n)}function e(o,n){return o.isFile()&&r(o,n)}function r(o,n){var s=o.mode,i=o.uid,l=o.gid,F=n.uid!==void 0?n.uid:process.getuid&&process.getuid(),a=n.gid!==void 0?n.gid:process.getgid&&process.getgid(),c=parseInt("100",8),C=parseInt("010",8),f=parseInt("001",8),d=c|C,p=s&f||s&C&&l===a||s&c&&i===F||s&d&&F===0;return p}return Ku}var gu;process.platform==="win32"||y.TESTING_WINDOWS?gu=Ir():gu=Pr();var _r=Yu;Yu.sync=Rr;function Yu(u,D,t){if(typeof D=="function"&&(t=D,D={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(e,r){Yu(u,D||{},function(o,n){o?r(o):e(n)})})}gu(u,D||{},function(e,r){e&&(e.code==="EACCES"||D&&D.ignoreErrors)&&(e=null,r=!1),t(e,r)})}function Rr(u,D){try{return gu.sync(u,D||{})}catch(t){if(D&&D.ignoreErrors||t.code==="EACCES")return!1;throw t}}const z=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",ye=H,kr=z?";":":",we=_r,$e=u=>Object.assign(new Error(`not found: ${u}`),{code:"ENOENT"}),ve=(u,D)=>{const t=D.colon||kr,e=u.match(/\//)||z&&u.match(/\\/)?[""]:[...z?[process.cwd()]:[],...(D.path||process.env.PATH||"").split(t)],r=z?D.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=z?r.split(t):[""];return z&&u.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:e,pathExt:o,pathExtExe:r}},xe=(u,D,t)=>{typeof D=="function"&&(t=D,D={}),D||(D={});const{pathEnv:e,pathExt:r,pathExtExe:o}=ve(u,D),n=[],s=l=>new Promise((F,a)=>{if(l===e.length)return D.all&&n.length?F(n):a($e(u));const c=e[l],C=/^".*"$/.test(c)?c.slice(1,-1):c,f=ye.join(C,u),d=!C&&/^\.[\\\/]/.test(u)?u.slice(0,2)+f:f;F(i(d,l,0))}),i=(l,F,a)=>new Promise((c,C)=>{if(a===r.length)return c(s(F+1));const f=r[a];we(l+f,{pathExt:o},(d,p)=>{if(!d&&p)if(D.all)n.push(l+f);else return c(l+f);return c(i(l,F,a+1))})});return t?s(0).then(l=>t(null,l),t):s(0)},Mr=(u,D)=>{D=D||{};const{pathEnv:t,pathExt:e,pathExtExe:r}=ve(u,D),o=[];for(let n=0;n<t.length;n++){const s=t[n],i=/^".*"$/.test(s)?s.slice(1,-1):s,l=ye.join(i,u),F=!i&&/^\.[\\\/]/.test(u)?u.slice(0,2)+l:l;for(let a=0;a<e.length;a++){const c=F+e[a];try{if(we.sync(c,{pathExt:r}))if(D.all)o.push(c);else return c}catch{}}}if(D.all&&o.length)return o;if(D.nothrow)return null;throw $e(u)};var jr=xe;xe.sync=Mr;var Vu={exports:{}};const Se=(u={})=>{const D=u.env||process.env;return(u.platform||process.platform)!=="win32"?"PATH":Object.keys(D).reverse().find(e=>e.toUpperCase()==="PATH")||"Path"};Vu.exports=Se,Vu.exports.default=Se;var Nr=Vu.exports;const Oe=H,Lr=jr,Gr=Nr;function Te(u,D){const t=u.options.env||process.env,e=process.cwd(),r=u.options.cwd!=null,o=r&&process.chdir!==void 0&&!process.chdir.disabled;if(o)try{process.chdir(u.options.cwd)}catch{}let n;try{n=Lr.sync(u.command,{path:t[Gr({env:t})],pathExt:D?Oe.delimiter:void 0})}catch{}finally{o&&process.chdir(e)}return n&&(n=Oe.resolve(r?u.options.cwd:"",n)),n}function Ur(u){return Te(u)||Te(u,!0)}var Wr=Ur,Ju={};const Zu=/([()\][%!^"`<>&|;, *?])/g;function Hr(u){return u=u.replace(Zu,"^$1"),u}function qr(u,D){return u=`${u}`,u=u.replace(/(\\*)"/g,'$1$1\\"'),u=u.replace(/(\\*)$/,"$1$1"),u=`"${u}"`,u=u.replace(Zu,"^$1"),D&&(u=u.replace(Zu,"^$1")),u}Ju.command=Hr,Ju.argument=qr;var zr=/^#!(.*)/;const Kr=zr;var Yr=(u="")=>{const D=u.match(Kr);if(!D)return null;const[t,e]=D[0].replace(/#! ?/,"").split(" "),r=t.split("/").pop();return r==="env"?e:e?`${r} ${e}`:r};const Xu=ku,Vr=Yr;function Jr(u){const t=Buffer.alloc(150);let e;try{e=Xu.openSync(u,"r"),Xu.readSync(e,t,0,150,0),Xu.closeSync(e)}catch{}return Vr(t.toString())}var Zr=Jr;const Xr=H,Ie=Wr,Pe=Ju,Qr=Zr,uo=process.platform==="win32",Do=/\.(?:com|exe)$/i,eo=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function to(u){u.file=Ie(u);const D=u.file&&Qr(u.file);return D?(u.args.unshift(u.file),u.command=D,Ie(u)):u.file}function no(u){if(!uo)return u;const D=to(u),t=!Do.test(D);if(u.options.forceShell||t){const e=eo.test(D);u.command=Xr.normalize(u.command),u.command=Pe.command(u.command),u.args=u.args.map(o=>Pe.argument(o,e));const r=[u.command].concat(u.args).join(" ");u.args=["/d","/s","/c",`"${r}"`],u.command=process.env.comspec||"cmd.exe",u.options.windowsVerbatimArguments=!0}return u}function ro(u,D,t){D&&!Array.isArray(D)&&(t=D,D=null),D=D?D.slice(0):[],t=Object.assign({},t);const e={command:u,args:D,options:t,file:void 0,original:{command:u,args:D}};return t.shell?e:no(e)}var oo=ro;const Qu=process.platform==="win32";function uD(u,D){return Object.assign(new Error(`${D} ${u.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${D} ${u.command}`,path:u.command,spawnargs:u.args})}function so(u,D){if(!Qu)return;const t=u.emit;u.emit=function(e,r){if(e==="exit"){const o=_e(r,D);if(o)return t.call(u,"error",o)}return t.apply(u,arguments)}}function _e(u,D){return Qu&&u===1&&!D.file?uD(D.original,"spawn"):null}function io(u,D){return Qu&&u===1&&!D.file?uD(D.original,"spawnSync"):null}var ao={hookChildProcess:so,verifyENOENT:_e,verifyENOENTSync:io,notFoundError:uD};const Re=Zt,DD=oo,eD=ao;function ke(u,D,t){const e=DD(u,D,t),r=Re.spawn(e.command,e.args,e.options);return eD.hookChildProcess(r,e),r}function co(u,D,t){const e=DD(u,D,t),r=Re.spawnSync(e.command,e.args,e.options);return r.error=r.error||eD.verifyENOENTSync(r.status,e),r}q.exports=ke,q.exports.spawn=ke,q.exports.sync=co,q.exports._parse=DD,q.exports._enoent=eD;var lo=q.exports,Fo=j(lo);function Co(u){const D=typeof u=="string"?`
23
23
  `:`
24
24
  `.charCodeAt(),t=typeof u=="string"?"\r":"\r".charCodeAt();return u[u.length-1]===D&&(u=u.slice(0,-1)),u[u.length-1]===t&&(u=u.slice(0,-1)),u}function Me(u={}){const{env:D=process.env,platform:t=process.platform}=u;return t!=="win32"?"PATH":Object.keys(D).reverse().find(e=>e.toUpperCase()==="PATH")||"Path"}function fo(u={}){const{cwd:D=A.cwd(),path:t=A.env[Me()],execPath:e=A.execPath}=u;let r;const o=D instanceof URL?Xt.fileURLToPath(D):D;let n=W.resolve(o);const s=[];for(;r!==n;)s.push(W.join(n,"node_modules/.bin")),r=n,n=W.resolve(n,"..");return s.push(W.resolve(o,e,"..")),[...s,t].join(W.delimiter)}function Eo({env:u=A.env,...D}={}){u={...u};const t=Me({env:u});return D.path=u[t],u[t]=fo(D),u}const po=(u,D,t,e)=>{if(t==="length"||t==="prototype"||t==="arguments"||t==="caller")return;const r=Object.getOwnPropertyDescriptor(u,t),o=Object.getOwnPropertyDescriptor(D,t);!ho(r,o)&&e||Object.defineProperty(u,t,o)},ho=function(u,D){return u===void 0||u.configurable||u.writable===D.writable&&u.enumerable===D.enumerable&&u.configurable===D.configurable&&(u.writable||u.value===D.value)},mo=(u,D)=>{const t=Object.getPrototypeOf(D);t!==Object.getPrototypeOf(u)&&Object.setPrototypeOf(u,t)},go=(u,D)=>`/* Wrapped ${u}*/
25
25
  ${D}`,Bo=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),bo=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Ao=(u,D,t)=>{const e=t===""?"":`with ${t.trim()}() `,r=go.bind(null,e,D.toString());Object.defineProperty(r,"name",bo),Object.defineProperty(u,"toString",{...Bo,value:r})};function yo(u,D,{ignoreNonConfigurable:t=!1}={}){const{name:e}=u;for(const r of Reflect.ownKeys(D))po(u,D,r,t);return mo(u,D),Ao(u,D,e),u}const Bu=new WeakMap,je=(u,D={})=>{if(typeof u!="function")throw new TypeError("Expected a function");let t,e=0;const r=u.displayName||u.name||"<anonymous>",o=function(...n){if(Bu.set(o,++e),e===1)t=u.apply(this,n),u=null;else if(D.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return t};return yo(o,u),Bu.set(o,e),o};je.callCount=u=>{if(!Bu.has(u))throw new Error(`The given function \`${u.name}\` is not wrapped by the \`onetime\` package`);return Bu.get(u)};const wo=()=>{const u=Le-Ne+1;return Array.from({length:u},$o)},$o=(u,D)=>({name:`SIGRT${D+1}`,number:Ne+D,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),Ne=34,Le=64,vo=[{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"}],Ge=()=>{const u=wo();return[...vo,...u].map(xo)},xo=({name:u,number:D,description:t,action:e,forced:r=!1,standard:o})=>{const{signals:{[u]:n}}=YD,s=n!==void 0;return{name:u,number:s?n:D,description:t,supported:s,action:e,forced:r,standard:o}},So=()=>{const u=Ge();return Object.fromEntries(u.map(Oo))},Oo=({name:u,number:D,description:t,supported:e,action:r,forced:o,standard:n})=>[u,{name:u,number:D,description:t,supported:e,action:r,forced:o,standard:n}],To=So(),Io=()=>{const u=Ge(),D=Le+1,t=Array.from({length:D},(e,r)=>Po(r,u));return Object.assign({},...t)},Po=(u,D)=>{const t=_o(u,D);if(t===void 0)return{};const{name:e,description:r,supported:o,action:n,forced:s,standard:i}=t;return{[u]:{name:e,number:u,description:r,supported:o,action:n,forced:s,standard:i}}},_o=(u,D)=>{const t=D.find(({name:e})=>YD.signals[e]===u);return t!==void 0?t:D.find(e=>e.number===u)};Io();const Ro=({timedOut:u,timeout:D,errorCode:t,signal:e,signalDescription:r,exitCode:o,isCanceled:n})=>u?`timed out after ${D} milliseconds`:n?"was canceled":t!==void 0?`failed with ${t}`:e!==void 0?`was killed with ${e} (${r})`:o!==void 0?`failed with exit code ${o}`:"failed",Ue=({stdout:u,stderr:D,all:t,error:e,signal:r,exitCode:o,command:n,escapedCommand:s,timedOut:i,isCanceled:l,killed:F,parsed:{options:{timeout:a,cwd:c=A.cwd()}}})=>{o=o===null?void 0:o,r=r===null?void 0:r;const C=r===void 0?void 0:To[r].description,f=e&&e.code,p=`Command ${Ro({timedOut:i,timeout:a,errorCode:f,signal:r,signalDescription:C,exitCode:o,isCanceled:l})}: ${n}`,h=Object.prototype.toString.call(e)==="[object Error]",w=h?`${p}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@negoziator/ai-commit",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },