@negoziator/ai-commit 1.2.30 → 1.2.31
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/dist/cli.mjs +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import Fu from"tty";import{Buffer as Xt}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 lr(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 Uu=/^[\w.-]+$/,{stringify:_}=JSON,Sr=/[|\\{}()[\]^$+*?.]/;function Wu(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 c=i.slice(-3)==="...";c&&(e=r,i=i.slice(0,-3));const F=i.match(Sr);if(F)throw new Error(`Invalid parameter: ${_(r)}. Invalid character found ${_(F[0])}`);D.push({name:i,required:s,spread:c})}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=dr(o);if(i in u)throw new Error(`Invalid parameter: ${_(o)} is used more than once.`);const c=s?t.slice(r):t[r];if(s&&(r=D.length),n&&(!c||s&&c.length===0))return console.error(`Error: Missing required parameter ${_(o)}
|
|
22
|
-
`),e(),process.exit(1);u[i]=c}}function Or(u){return u===void 0||u!==!1}function he(u,D,t,e){const r={...D.flags},o=D.version;o&&(r.version={type:Boolean,description:"Show version"});const{help:n}=D,s=Or(n);s&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const i=Pn(r,e,{ignore:D.ignoreArgv}),c=()=>{console.log(D.version)};if(o&&i.flags.version===!0)return c(),process.exit(0);const F=new xr,a=s&&n?.render?n.render:f=>F.render(f),l=f=>{const d=$r({...D,...f?{help:f}:{},flags:r});console.log(a(d,F))};if(s&&i.flags.help===!0)return l(),process.exit(0);if(D.parameters){let{parameters:f}=D,d=i._;const p=f.indexOf("--"),h=f.slice(p+1),A=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(A,Wu(f),d,l),qu(A,Wu(h),P,l)}else qu(A,Wu(f),d,l);Object.assign(i._,A)}const C={...i,showVersion:c,showHelp:l};return typeof t=="function"&&t(C),{command:u,...C}}function Tr(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 Pr(u,D,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!Uu.test(u.name)))throw new Error(`Invalid script name: ${_(u.name)}`);const e=t[0];if(u.commands&&Uu.test(e)){const r=Tr(e,u.commands);if(r)return he(r.options.name,{...r.options,parent:u},r.callback,t.slice(1))}return he(void 0,u,D,t)}function me(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(!Uu.test(t))throw new Error(`Invalid command name ${JSON.stringify(t)}. Command names must be one word.`);return{options:u,callback:D}}var ge="1.2.
|
|
22
|
+
`),e(),process.exit(1);u[i]=c}}function Or(u){return u===void 0||u!==!1}function he(u,D,t,e){const r={...D.flags},o=D.version;o&&(r.version={type:Boolean,description:"Show version"});const{help:n}=D,s=Or(n);s&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const i=Pn(r,e,{ignore:D.ignoreArgv}),c=()=>{console.log(D.version)};if(o&&i.flags.version===!0)return c(),process.exit(0);const F=new xr,a=s&&n?.render?n.render:f=>F.render(f),l=f=>{const d=$r({...D,...f?{help:f}:{},flags:r});console.log(a(d,F))};if(s&&i.flags.help===!0)return l(),process.exit(0);if(D.parameters){let{parameters:f}=D,d=i._;const p=f.indexOf("--"),h=f.slice(p+1),A=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(A,Wu(f),d,l),qu(A,Wu(h),P,l)}else qu(A,Wu(f),d,l);Object.assign(i._,A)}const C={...i,showVersion:c,showHelp:l};return typeof t=="function"&&t(C),{command:u,...C}}function Tr(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 Pr(u,D,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!Uu.test(u.name)))throw new Error(`Invalid script name: ${_(u.name)}`);const e=t[0];if(u.commands&&Uu.test(e)){const r=Tr(e,u.commands);if(r)return he(r.options.name,{...r.options,parent:u},r.callback,t.slice(1))}return he(void 0,u,D,t)}function me(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(!Uu.test(t))throw new Error(`Invalid command name ${JSON.stringify(t)}. Command names must be one word.`);return{options:u,callback:D}}var ge="1.2.31",Ir="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 H(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var z={exports:{}},Hu,Be;function _r(){if(Be)return Hu;Be=1,Hu=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 c=s[i].toLowerCase();if(c&&o.substr(-c.length).toLowerCase()===c)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,c){s(i,i?!1:t(c,o,n))})}function r(o,n){return t(u.statSync(o),o,n)}return Hu}var zu,be;function kr(){if(be)return zu;be=1,zu=D,D.sync=t;var u=ku;function D(o,n,s){u.stat(o,function(i,c){s(i,i?!1:e(c,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,c=o.gid,F=n.uid!==void 0?n.uid:process.getuid&&process.getuid(),a=n.gid!==void 0?n.gid:process.getgid&&process.getgid(),l=parseInt("100",8),C=parseInt("010",8),f=parseInt("001",8),d=l|C,p=s&f||s&C&&c===a||s&l&&i===F||s&d&&F===0;return p}return zu}var hu;process.platform==="win32"||y.TESTING_WINDOWS?hu=_r():hu=kr();var Rr=Ku;Ku.sync=Mr;function Ku(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){Ku(u,D||{},function(o,n){o?r(o):e(n)})})}hu(u,D||{},function(e,r){e&&(e.code==="EACCES"||D&&D.ignoreErrors)&&(e=null,r=!1),t(e,r)})}function Mr(u,D){try{return hu.sync(u,D||{})}catch(t){if(D&&D.ignoreErrors||t.code==="EACCES")return!1;throw t}}const K=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",ye=q,jr=K?";":":",Ae=Rr,we=u=>Object.assign(new Error(`not found: ${u}`),{code:"ENOENT"}),$e=(u,D)=>{const t=D.colon||jr,e=u.match(/\//)||K&&u.match(/\\/)?[""]:[...K?[process.cwd()]:[],...(D.path||process.env.PATH||"").split(t)],r=K?D.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",o=K?r.split(t):[""];return K&&u.indexOf(".")!==-1&&o[0]!==""&&o.unshift(""),{pathEnv:e,pathExt:o,pathExtExe:r}},ve=(u,D,t)=>{typeof D=="function"&&(t=D,D={}),D||(D={});const{pathEnv:e,pathExt:r,pathExtExe:o}=$e(u,D),n=[],s=c=>new Promise((F,a)=>{if(c===e.length)return D.all&&n.length?F(n):a(we(u));const l=e[c],C=/^".*"$/.test(l)?l.slice(1,-1):l,f=ye.join(C,u),d=!C&&/^\.[\\\/]/.test(u)?u.slice(0,2)+f:f;F(i(d,c,0))}),i=(c,F,a)=>new Promise((l,C)=>{if(a===r.length)return l(s(F+1));const f=r[a];Ae(c+f,{pathExt:o},(d,p)=>{if(!d&&p)if(D.all)n.push(c+f);else return l(c+f);return l(i(c,F,a+1))})});return t?s(0).then(c=>t(null,c),t):s(0)},Nr=(u,D)=>{D=D||{};const{pathEnv:t,pathExt:e,pathExtExe:r}=$e(u,D),o=[];for(let n=0;n<t.length;n++){const s=t[n],i=/^".*"$/.test(s)?s.slice(1,-1):s,c=ye.join(i,u),F=!i&&/^\.[\\\/]/.test(u)?u.slice(0,2)+c:c;for(let a=0;a<e.length;a++){const l=F+e[a];try{if(Ae.sync(l,{pathExt:r}))if(D.all)o.push(l);else return l}catch{}}}if(D.all&&o.length)return o;if(D.nothrow)return null;throw we(u)};var Lr=ve;ve.sync=Nr;var Vu={exports:{}};const xe=(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=xe,Vu.exports.default=xe;var Gr=Vu.exports;const Se=q,Ur=Lr,Wr=Gr;function Oe(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=Ur.sync(u.command,{path:t[Wr({env:t})],pathExt:D?Se.delimiter:void 0})}catch{}finally{o&&process.chdir(e)}return n&&(n=Se.resolve(r?u.options.cwd:"",n)),n}function qr(u){return Oe(u)||Oe(u,!0)}var Hr=qr,Yu={};const Ju=/([()\][%!^"`<>&|;, *?])/g;function zr(u){return u=u.replace(Ju,"^$1"),u}function Kr(u,D){return u=`${u}`,u=u.replace(/(\\*)"/g,'$1$1\\"'),u=u.replace(/(\\*)$/,"$1$1"),u=`"${u}"`,u=u.replace(Ju,"^$1"),D&&(u=u.replace(Ju,"^$1")),u}Yu.command=zr,Yu.argument=Kr;var Vr=/^#!(.*)/;const Yr=Vr;var Jr=(u="")=>{const D=u.match(Yr);if(!D)return null;const[t,e]=D[0].replace(/#! ?/,"").split(" "),r=t.split("/").pop();return r==="env"?e:e?`${r} ${e}`:r};const Zu=ku,Zr=Jr;function Xr(u){const t=Buffer.alloc(150);let e;try{e=Zu.openSync(u,"r"),Zu.readSync(e,t,0,150,0),Zu.closeSync(e)}catch{}return Zr(t.toString())}var Qr=Xr;const uo=q,Te=Hr,Pe=Yu,Do=Qr,eo=process.platform==="win32",to=/\.(?:com|exe)$/i,no=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function ro(u){u.file=Te(u);const D=u.file&&Do(u.file);return D?(u.args.unshift(u.file),u.command=D,Te(u)):u.file}function oo(u){if(!eo)return u;const D=ro(u),t=!to.test(D);if(u.options.forceShell||t){const e=no.test(D);u.command=uo.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 so(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:oo(e)}var io=so;const Xu=process.platform==="win32";function Qu(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 ao(u,D){if(!Xu)return;const t=u.emit;u.emit=function(e,r){if(e==="exit"){const o=Ie(r,D);if(o)return t.call(u,"error",o)}return t.apply(u,arguments)}}function Ie(u,D){return Xu&&u===1&&!D.file?Qu(D.original,"spawn"):null}function co(u,D){return Xu&&u===1&&!D.file?Qu(D.original,"spawnSync"):null}var lo={hookChildProcess:ao,verifyENOENT:Ie,verifyENOENTSync:co,notFoundError:Qu};const _e=un,uD=io,DD=lo;function ke(u,D,t){const e=uD(u,D,t),r=_e.spawn(e.command,e.args,e.options);return DD.hookChildProcess(r,e),r}function Fo(u,D,t){const e=uD(u,D,t),r=_e.spawnSync(e.command,e.args,e.options);return r.error=r.error||DD.verifyENOENTSync(r.status,e),r}z.exports=ke,z.exports.spawn=ke,z.exports.sync=Fo,z.exports._parse=uD,z.exports._enoent=DD;var Co=z.exports,fo=H(Co);function Eo(u){const D=typeof u=="string"?`
|
|
23
23
|
`:10,t=typeof u=="string"?"\r":13;return u[u.length-1]===D&&(u=u.slice(0,-1)),u[u.length-1]===t&&(u=u.slice(0,-1)),u}function Re(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"}const po=({cwd:u=b.cwd(),path:D=b.env[Re()],preferLocal:t=!0,execPath:e=b.execPath,addExecPath:r=!0}={})=>{const o=u instanceof URL?zD(u):u,n=W.resolve(o),s=[];return t&&ho(s,n),r&&mo(s,e,n),[...s,D].join(W.delimiter)},ho=(u,D)=>{let t;for(;t!==D;)u.push(W.join(D,"node_modules/.bin")),t=D,D=W.resolve(D,"..")},mo=(u,D,t)=>{const e=D instanceof URL?zD(D):D;u.push(W.resolve(t,e,".."))},go=({env:u=b.env,...D}={})=>{u={...u};const t=Re({env:u});return D.path=u[t],u[t]=po(D),u},Bo=(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);!bo(r,o)&&e||Object.defineProperty(u,t,o)},bo=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)},yo=(u,D)=>{const t=Object.getPrototypeOf(D);t!==Object.getPrototypeOf(u)&&Object.setPrototypeOf(u,t)},Ao=(u,D)=>`/* Wrapped ${u}*/
|
|
24
24
|
${D}`,wo=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),$o=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),vo=(u,D,t)=>{const e=t===""?"":`with ${t.trim()}() `,r=Ao.bind(null,e,D.toString());Object.defineProperty(r,"name",$o),Object.defineProperty(u,"toString",{...wo,value:r})};function xo(u,D,{ignoreNonConfigurable:t=!1}={}){const{name:e}=u;for(const r of Reflect.ownKeys(D))Bo(u,D,r,t);return yo(u,D),vo(u,D,e),u}const mu=new WeakMap,Me=(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(mu.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 xo(o,u),mu.set(o,e),o};Me.callCount=u=>{if(!mu.has(u))throw new Error(`The given function \`${u.name}\` is not wrapped by the \`onetime\` package`);return mu.get(u)};const So=()=>{const u=Ne-je+1;return Array.from({length:u},Oo)},Oo=(u,D)=>({name:`SIGRT${D+1}`,number:je+D,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),je=34,Ne=64,To=[{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"}],Le=()=>{const u=So();return[...To,...u].map(Po)},Po=({name:u,number:D,description:t,action:e,forced:r=!1,standard:o})=>{const{signals:{[u]:n}}=KD,s=n!==void 0;return{name:u,number:s?n:D,description:t,supported:s,action:e,forced:r,standard:o}},Io=()=>{const u=Le();return Object.fromEntries(u.map(_o))},_o=({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}],ko=Io(),Ro=()=>{const u=Le(),D=Ne+1,t=Array.from({length:D},(e,r)=>Mo(r,u));return Object.assign({},...t)},Mo=(u,D)=>{const t=jo(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}}},jo=(u,D)=>{const t=D.find(({name:e})=>KD.signals[e]===u);return t!==void 0?t:D.find(e=>e.number===u)};Ro();const No=({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",Ge=({stdout:u,stderr:D,all:t,error:e,signal:r,exitCode:o,command:n,escapedCommand:s,timedOut:i,isCanceled:c,killed:F,parsed:{options:{timeout:a,cwd:l=b.cwd()}}})=>{o=o===null?void 0:o,r=r===null?void 0:r;const C=r===void 0?void 0:ko[r].description,f=e&&e.code,p=`Command ${No({timedOut:i,timeout:a,errorCode:f,signal:r,signalDescription:C,exitCode:o,isCanceled:c})}: ${n}`,h=Object.prototype.toString.call(e)==="[object Error]",A=h?`${p}
|
|
25
25
|
${e.message}`:p,P=[A,D,u].filter(Boolean).join(`
|