@negoziator/ai-commit 1.2.22 → 1.2.23

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