@negoziator/ai-commit 1.2.224 → 1.2.225
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 @@ var zt=Object.defineProperty;var o=(u,e)=>zt(u,"name",{value:e,configurable:!0})
|
|
|
19
19
|
`:"")+(t?this.indentText({text:this.render(t),spaces:r}):"")}
|
|
20
20
|
`}table({tableData:e,tableOptions:t,tableBreakpoints:r}){return rn(e.map(n=>n.map(s=>this.render(s))),r?sn(r):t)}flagParameter(e){return e===Boolean?"":e===String?"<string>":e===Number?"<number>":Array.isArray(e)?this.flagParameter(e[0]):"<value>"}flagOperator(e){return" "}flagName(e){const{flag:t,flagFormatted:r,aliasesEnabled:n,aliasFormatted:s}=e;let D="";if(s?D+=`${s}, `:n&&(D+=" "),D+=r,"placeholder"in t&&typeof t.placeholder=="string")D+=`${this.flagOperator(e)}${t.placeholder}`;else{const a=this.flagParameter("type"in t?t.type:t);a&&(D+=`${this.flagOperator(e)}${a}`)}return D}flagDefault(e){return JSON.stringify(e)}flagDescription({flag:e}){let t="description"in e?e.description??"":"";if("default"in e){let{default:r}=e;typeof r=="function"&&(r=r()),r&&(t+=` (default: ${this.flagDefault(r)})`)}return t}render(e){if(typeof e=="string")return e;if(Array.isArray(e))return e.map(t=>this.render(t)).join(`
|
|
21
21
|
`);if("type"in e&&this[e.type]){const t=this[e.type];if(typeof t=="function")return t.call(this,e.data)}throw new Error(`Invalid node type: ${JSON.stringify(e)}`)}},o(eu,"J"),eu);const qu=o(u=>u.length>0&&!u.includes(" "),"y$1"),{stringify:M}=JSON,bn=/[|\\{}()[\]^$+*?.]/;function Wu(u){const e=[];let t,r;for(const n of u){if(r)throw new Error(`Invalid parameter: Spread parameter ${M(r)} must be last`);const s=n[0],D=n[n.length-1];let a;if(s==="<"&&D===">"&&(a=!0,t))throw new Error(`Invalid parameter: Required parameter ${M(n)} cannot come after optional parameter ${M(t)}`);if(s==="["&&D==="]"&&(a=!1,t=n),a===void 0)throw new Error(`Invalid parameter: ${M(n)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let i=n.slice(1,-1);const c=i.slice(-3)==="...";c&&(r=n,i=i.slice(0,-3));const l=i.match(bn);if(l)throw new Error(`Invalid parameter: ${M(n)}. Invalid character found ${M(l[0])}`);e.push({name:i,required:a,spread:c})}return e}o(Wu,"w$1");function Uu(u,e,t,r){for(let n=0;n<e.length;n+=1){const{name:s,required:D,spread:a}=e[n],i=an(s);if(i in u)throw new Error(`Invalid parameter: ${M(s)} is used more than once.`);const c=a?t.slice(n):t[n];if(a&&(n=e.length),D&&(!c||a&&c.length===0))return console.error(`Error: Missing required parameter ${M(s)}
|
|
22
|
-
`),r(),process.exit(1);u[i]=c}}o(Uu,"b$1");function An(u){return u===void 0||u!==!1}o(An,"W$2");function fD(u,e,t,r){const n={...e.flags},s=e.version;s&&(n.version={type:Boolean,description:"Show version"});const{help:D}=e,a=An(D);a&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const i=wr(n,r,{ignore:e.ignoreArgv}),c=o(()=>{console.log(e.version)},"f");if(s&&i.flags.version===!0)return c(),process.exit(0);const l=new yn,C=a&&D?.render?D.render:d=>l.render(d),F=o(d=>{const m=gn({...e,...d?{help:d}:{},flags:n});console.log(C(m,l))},"u");if(a&&i.flags.help===!0)return F(),process.exit(0);if(e.parameters){let{parameters:d}=e,m=i._;const f=d.indexOf("--"),p=d.slice(f+1),h=Object.create(null);if(f>-1&&p.length>0){d=d.slice(0,f);const g=i._["--"];m=m.slice(0,-g.length||void 0),Uu(h,Wu(d),m,F),Uu(h,Wu(p),g,F)}else Uu(h,Wu(d),m,F);Object.assign(i._,h)}const E={...i,showVersion:c,showHelp:F};return typeof t=="function"&&t(E),{command:u,...E}}o(fD,"x$1");function wn(u,e){const t=new Map;for(const r of e){const n=[r.options.name],{alias:s}=r.options;s&&(Array.isArray(s)?n.push(...s):n.push(s));for(const D of n){if(t.has(D))throw new Error(`Duplicate command name found: ${M(D)}`);t.set(D,r)}}return t.get(u)}o(wn,"z$1");function vn(u,e,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!qu(u.name)))throw new Error(`Invalid script name: ${M(u.name)}`);const r=t[0];if(u.commands&&r&&qu(r)){const n=wn(r,u.commands);if(n)return fD(n.options.name,{...n.options,parent:u},n.callback,t.slice(1))}return fD(void 0,u,e,t)}o(vn,"Z");function dD(u,e){if(!u)throw new Error("Command options are required");const{name:t}=u;if(t===void 0)throw new Error("Command name is required");if(!qu(t))throw new Error(`Invalid command name ${JSON.stringify(t)}. Command names must be one word.`);return{options:u,callback:e}}o(dD,"G$2");var ED="1.2.
|
|
22
|
+
`),r(),process.exit(1);u[i]=c}}o(Uu,"b$1");function An(u){return u===void 0||u!==!1}o(An,"W$2");function fD(u,e,t,r){const n={...e.flags},s=e.version;s&&(n.version={type:Boolean,description:"Show version"});const{help:D}=e,a=An(D);a&&!("help"in n)&&(n.help={type:Boolean,alias:"h",description:"Show help"});const i=wr(n,r,{ignore:e.ignoreArgv}),c=o(()=>{console.log(e.version)},"f");if(s&&i.flags.version===!0)return c(),process.exit(0);const l=new yn,C=a&&D?.render?D.render:d=>l.render(d),F=o(d=>{const m=gn({...e,...d?{help:d}:{},flags:n});console.log(C(m,l))},"u");if(a&&i.flags.help===!0)return F(),process.exit(0);if(e.parameters){let{parameters:d}=e,m=i._;const f=d.indexOf("--"),p=d.slice(f+1),h=Object.create(null);if(f>-1&&p.length>0){d=d.slice(0,f);const g=i._["--"];m=m.slice(0,-g.length||void 0),Uu(h,Wu(d),m,F),Uu(h,Wu(p),g,F)}else Uu(h,Wu(d),m,F);Object.assign(i._,h)}const E={...i,showVersion:c,showHelp:F};return typeof t=="function"&&t(E),{command:u,...E}}o(fD,"x$1");function wn(u,e){const t=new Map;for(const r of e){const n=[r.options.name],{alias:s}=r.options;s&&(Array.isArray(s)?n.push(...s):n.push(s));for(const D of n){if(t.has(D))throw new Error(`Duplicate command name found: ${M(D)}`);t.set(D,r)}}return t.get(u)}o(wn,"z$1");function vn(u,e,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!qu(u.name)))throw new Error(`Invalid script name: ${M(u.name)}`);const r=t[0];if(u.commands&&r&&qu(r)){const n=wn(r,u.commands);if(n)return fD(n.options.name,{...n.options,parent:u},n.callback,t.slice(1))}return fD(void 0,u,e,t)}o(vn,"Z");function dD(u,e){if(!u)throw new Error("Command options are required");const{name:t}=u;if(t===void 0)throw new Error("Command name is required");if(!qu(t))throw new Error(`Invalid command name ${JSON.stringify(t)}. Command names must be one word.`);return{options:u,callback:e}}o(dD,"G$2");var ED="1.2.225",$n="Writes your git commit messages for you with AI",G=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function J(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}o(J,"getDefaultExportFromCjs");var U={exports:{}},zu,pD;function xn(){if(pD)return zu;pD=1,zu=r,r.sync=n;var u=_u;function e(s,D){var a=D.pathExt!==void 0?D.pathExt:process.env.PATHEXT;if(!a||(a=a.split(";"),a.indexOf("")!==-1))return!0;for(var i=0;i<a.length;i++){var c=a[i].toLowerCase();if(c&&s.substr(-c.length).toLowerCase()===c)return!0}return!1}o(e,"checkPathExt");function t(s,D,a){return!s.isSymbolicLink()&&!s.isFile()?!1:e(D,a)}o(t,"checkStat");function r(s,D,a){u.stat(s,function(i,c){a(i,i?!1:t(c,s,D))})}o(r,"isexe");function n(s,D){return t(u.statSync(s),s,D)}return o(n,"sync"),zu}o(xn,"requireWindows");var Hu,hD;function Sn(){if(hD)return Hu;hD=1,Hu=e,e.sync=t;var u=_u;function e(s,D,a){u.stat(s,function(i,c){a(i,i?!1:r(c,D))})}o(e,"isexe");function t(s,D){return r(u.statSync(s),D)}o(t,"sync");function r(s,D){return s.isFile()&&n(s,D)}o(r,"checkStat");function n(s,D){var a=s.mode,i=s.uid,c=s.gid,l=D.uid!==void 0?D.uid:process.getuid&&process.getuid(),C=D.gid!==void 0?D.gid:process.getgid&&process.getgid(),F=parseInt("100",8),E=parseInt("010",8),d=parseInt("001",8),m=F|E,f=a&d||a&E&&c===C||a&F&&i===l||a&m&&l===0;return f}return o(n,"checkMode"),Hu}o(Sn,"requireMode");var Yu,mD;function On(){if(mD)return Yu;mD=1;var u;process.platform==="win32"||G.TESTING_WINDOWS?u=xn():u=Sn(),Yu=e,e.sync=t;function e(r,n,s){if(typeof n=="function"&&(s=n,n={}),!s){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(D,a){e(r,n||{},function(i,c){i?a(i):D(c)})})}u(r,n||{},function(D,a){D&&(D.code==="EACCES"||n&&n.ignoreErrors)&&(D=null,a=!1),s(D,a)})}o(e,"isexe");function t(r,n){try{return u.sync(r,n||{})}catch(s){if(n&&n.ignoreErrors||s.code==="EACCES")return!1;throw s}}return o(t,"sync"),Yu}o(On,"requireIsexe");var Ku,gD;function Tn(){if(gD)return Ku;gD=1;const u=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",e=V,t=u?";":":",r=On(),n=o(i=>Object.assign(new Error(`not found: ${i}`),{code:"ENOENT"}),"getNotFoundError"),s=o((i,c)=>{const l=c.colon||t,C=i.match(/\//)||u&&i.match(/\\/)?[""]:[...u?[process.cwd()]:[],...(c.path||process.env.PATH||"").split(l)],F=u?c.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",E=u?F.split(l):[""];return u&&i.indexOf(".")!==-1&&E[0]!==""&&E.unshift(""),{pathEnv:C,pathExt:E,pathExtExe:F}},"getPathInfo"),D=o((i,c,l)=>{typeof c=="function"&&(l=c,c={}),c||(c={});const{pathEnv:C,pathExt:F,pathExtExe:E}=s(i,c),d=[],m=o(p=>new Promise((h,g)=>{if(p===C.length)return c.all&&d.length?h(d):g(n(i));const B=C[p],b=/^".*"$/.test(B)?B.slice(1,-1):B,y=e.join(b,i),v=!b&&/^\.[\\\/]/.test(i)?i.slice(0,2)+y:y;h(f(v,p,0))}),"step"),f=o((p,h,g)=>new Promise((B,b)=>{if(g===F.length)return B(m(h+1));const y=F[g];r(p+y,{pathExt:E},(v,k)=>{if(!v&&k)if(c.all)d.push(p+y);else return B(p+y);return B(f(p,h,g+1))})}),"subStep");return l?m(0).then(p=>l(null,p),l):m(0)},"which"),a=o((i,c)=>{c=c||{};const{pathEnv:l,pathExt:C,pathExtExe:F}=s(i,c),E=[];for(let d=0;d<l.length;d++){const m=l[d],f=/^".*"$/.test(m)?m.slice(1,-1):m,p=e.join(f,i),h=!f&&/^\.[\\\/]/.test(i)?i.slice(0,2)+p:p;for(let g=0;g<C.length;g++){const B=h+C[g];try{if(r.sync(B,{pathExt:F}))if(c.all)E.push(B);else return B}catch{}}}if(c.all&&E.length)return E;if(c.nothrow)return null;throw n(i)},"whichSync");return Ku=D,D.sync=a,Ku}o(Tn,"requireWhich");var Eu={exports:{}},BD;function In(){if(BD)return Eu.exports;BD=1;const u=o((e={})=>{const t=e.env||process.env;return(e.platform||process.platform)!=="win32"?"PATH":Object.keys(t).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"},"pathKey");return Eu.exports=u,Eu.exports.default=u,Eu.exports}o(In,"requirePathKey");var Vu,yD;function Pn(){if(yD)return Vu;yD=1;const u=V,e=Tn(),t=In();function r(s,D){const a=s.options.env||process.env,i=process.cwd(),c=s.options.cwd!=null,l=c&&process.chdir!==void 0&&!process.chdir.disabled;if(l)try{process.chdir(s.options.cwd)}catch{}let C;try{C=e.sync(s.command,{path:a[t({env:a})],pathExt:D?u.delimiter:void 0})}catch{}finally{l&&process.chdir(i)}return C&&(C=u.resolve(c?s.options.cwd:"",C)),C}o(r,"resolveCommandAttempt");function n(s){return r(s)||r(s,!0)}return o(n,"resolveCommand"),Vu=n,Vu}o(Pn,"requireResolveCommand");var pu={},bD;function Rn(){if(bD)return pu;bD=1;const u=/([()\][%!^"`<>&|;, *?])/g;function e(r){return r=r.replace(u,"^$1"),r}o(e,"escapeCommand");function t(r,n){return r=`${r}`,r=r.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),r=r.replace(/(?=(\\+?)?)\1$/,"$1$1"),r=`"${r}"`,r=r.replace(u,"^$1"),n&&(r=r.replace(u,"^$1")),r}return o(t,"escapeArgument"),pu.command=e,pu.argument=t,pu}o(Rn,"require_escape");var Ju,AD;function _n(){return AD||(AD=1,Ju=/^#!(.*)/),Ju}o(_n,"requireShebangRegex");var Zu,wD;function kn(){if(wD)return Zu;wD=1;const u=_n();return Zu=o((e="")=>{const t=e.match(u);if(!t)return null;const[r,n]=t[0].replace(/#! ?/,"").split(" "),s=r.split("/").pop();return s==="env"?n:n?`${s} ${n}`:s},"shebangCommand"),Zu}o(kn,"requireShebangCommand");var Xu,vD;function Mn(){if(vD)return Xu;vD=1;const u=_u,e=kn();function t(r){const s=Buffer.alloc(150);let D;try{D=u.openSync(r,"r"),u.readSync(D,s,0,150,0),u.closeSync(D)}catch{}return e(s.toString())}return o(t,"readShebang"),Xu=t,Xu}o(Mn,"requireReadShebang");var Qu,$D;function jn(){if($D)return Qu;$D=1;const u=V,e=Pn(),t=Rn(),r=Mn(),n=process.platform==="win32",s=/\.(?:com|exe)$/i,D=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function a(l){l.file=e(l);const C=l.file&&r(l.file);return C?(l.args.unshift(l.file),l.command=C,e(l)):l.file}o(a,"detectShebang");function i(l){if(!n)return l;const C=a(l),F=!s.test(C);if(l.options.forceShell||F){const E=D.test(C);l.command=u.normalize(l.command),l.command=t.command(l.command),l.args=l.args.map(m=>t.argument(m,E));const d=[l.command].concat(l.args).join(" ");l.args=["/d","/s","/c",`"${d}"`],l.command=process.env.comspec||"cmd.exe",l.options.windowsVerbatimArguments=!0}return l}o(i,"parseNonShell");function c(l,C,F){C&&!Array.isArray(C)&&(F=C,C=null),C=C?C.slice(0):[],F=Object.assign({},F);const E={command:l,args:C,options:F,file:void 0,original:{command:l,args:C}};return F.shell?E:i(E)}return o(c,"parse"),Qu=c,Qu}o(jn,"requireParse");var ue,xD;function Nn(){if(xD)return ue;xD=1;const u=process.platform==="win32";function e(s,D){return Object.assign(new Error(`${D} ${s.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${D} ${s.command}`,path:s.command,spawnargs:s.args})}o(e,"notFoundError");function t(s,D){if(!u)return;const a=s.emit;s.emit=function(i,c){if(i==="exit"){const l=r(c,D);if(l)return a.call(s,"error",l)}return a.apply(s,arguments)}}o(t,"hookChildProcess");function r(s,D){return u&&s===1&&!D.file?e(D.original,"spawn"):null}o(r,"verifyENOENT");function n(s,D){return u&&s===1&&!D.file?e(D.original,"spawnSync"):null}return o(n,"verifyENOENTSync"),ue={hookChildProcess:t,verifyENOENT:r,verifyENOENTSync:n,notFoundError:e},ue}o(Nn,"requireEnoent");var SD;function Ln(){if(SD)return U.exports;SD=1;const u=Kt,e=jn(),t=Nn();function r(s,D,a){const i=e(s,D,a),c=u.spawn(i.command,i.args,i.options);return t.hookChildProcess(c,i),c}o(r,"spawn");function n(s,D,a){const i=e(s,D,a),c=u.spawnSync(i.command,i.args,i.options);return c.error=c.error||t.verifyENOENTSync(c.status,i),c}return o(n,"spawnSync"),U.exports=r,U.exports.spawn=r,U.exports.sync=n,U.exports._parse=e,U.exports._enoent=t,U.exports}o(Ln,"requireCrossSpawn");var Gn=Ln(),qn=J(Gn);function Wn(u){const e=typeof u=="string"?`
|
|
23
23
|
`:10,t=typeof u=="string"?"\r":13;return u[u.length-1]===e&&(u=u.slice(0,-1)),u[u.length-1]===t&&(u=u.slice(0,-1)),u}o(Wn,"stripFinalNewline");function OD(u={}){const{env:e=process.env,platform:t=process.platform}=u;return t!=="win32"?"PATH":Object.keys(e).reverse().find(r=>r.toUpperCase()==="PATH")||"Path"}o(OD,"pathKey");const Un=o(({cwd:u=$.cwd(),path:e=$.env[OD()],preferLocal:t=!0,execPath:r=$.execPath,addExecPath:n=!0}={})=>{const s=u instanceof URL?qe(u):u,D=K.resolve(s),a=[];return t&&zn(a,D),n&&Hn(a,r,D),[...a,e].join(K.delimiter)},"npmRunPath"),zn=o((u,e)=>{let t;for(;t!==e;)u.push(K.join(e,"node_modules/.bin")),t=e,e=K.resolve(e,"..")},"applyPreferLocal"),Hn=o((u,e,t)=>{const r=e instanceof URL?qe(e):e;u.push(K.resolve(t,r,".."))},"applyExecPath"),Yn=o(({env:u=$.env,...e}={})=>{u={...u};const t=OD({env:u});return e.path=u[t],u[t]=Un(e),u},"npmRunPathEnv"),Kn=o((u,e,t,r)=>{if(t==="length"||t==="prototype"||t==="arguments"||t==="caller")return;const n=Object.getOwnPropertyDescriptor(u,t),s=Object.getOwnPropertyDescriptor(e,t);!Vn(n,s)&&r||Object.defineProperty(u,t,s)},"copyProperty"),Vn=o(function(u,e){return u===void 0||u.configurable||u.writable===e.writable&&u.enumerable===e.enumerable&&u.configurable===e.configurable&&(u.writable||u.value===e.value)},"canCopyProperty"),Jn=o((u,e)=>{const t=Object.getPrototypeOf(e);t!==Object.getPrototypeOf(u)&&Object.setPrototypeOf(u,t)},"changePrototype"),Zn=o((u,e)=>`/* Wrapped ${u}*/
|
|
24
24
|
${e}`,"wrappedToString"),Xn=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Qn=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),uo=o((u,e,t)=>{const r=t===""?"":`with ${t.trim()}() `,n=Zn.bind(null,r,e.toString());Object.defineProperty(n,"name",Qn),Object.defineProperty(u,"toString",{...Xn,value:n})},"changeToString");function eo(u,e,{ignoreNonConfigurable:t=!1}={}){const{name:r}=u;for(const n of Reflect.ownKeys(e))Kn(u,e,n,t);return Jn(u,e),uo(u,e,r),u}o(eo,"mimicFunction");const hu=new WeakMap,TD=o((u,e={})=>{if(typeof u!="function")throw new TypeError("Expected a function");let t,r=0;const n=u.displayName||u.name||"<anonymous>",s=o(function(...D){if(hu.set(s,++r),r===1)t=u.apply(this,D),u=null;else if(e.throw===!0)throw new Error(`Function \`${n}\` can only be called once`);return t},"onetime2");return eo(s,u),hu.set(s,r),s},"onetime");TD.callCount=u=>{if(!hu.has(u))throw new Error(`The given function \`${u.name}\` is not wrapped by the \`onetime\` package`);return hu.get(u)};const Do=o(()=>{const u=PD-ID+1;return Array.from({length:u},to)},"getRealtimeSignals"),to=o((u,e)=>({name:`SIGRT${e+1}`,number:ID+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),"getRealtimeSignal"),ID=34,PD=64,ro=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}],RD=o(()=>{const u=Do();return[...ro,...u].map(no)},"getSignals"),no=o(({name:u,number:e,description:t,action:r,forced:n=!1,standard:s})=>{const{signals:{[u]:D}}=We,a=D!==void 0;return{name:u,number:a?D:e,description:t,supported:a,action:r,forced:n,standard:s}},"normalizeSignal"),oo=o(()=>{const u=RD();return Object.fromEntries(u.map(so))},"getSignalsByName"),so=o(({name:u,number:e,description:t,supported:r,action:n,forced:s,standard:D})=>[u,{name:u,number:e,description:t,supported:r,action:n,forced:s,standard:D}],"getSignalByName"),io=oo(),ao=o(()=>{const u=RD(),e=PD+1,t=Array.from({length:e},(r,n)=>co(n,u));return Object.assign({},...t)},"getSignalsByNumber"),co=o((u,e)=>{const t=lo(u,e);if(t===void 0)return{};const{name:r,description:n,supported:s,action:D,forced:a,standard:i}=t;return{[u]:{name:r,number:u,description:n,supported:s,action:D,forced:a,standard:i}}},"getSignalByNumber"),lo=o((u,e)=>{const t=e.find(({name:r})=>We.signals[r]===u);return t!==void 0?t:e.find(r=>r.number===u)},"findSignalByNumber");ao();const Fo=o(({timedOut:u,timeout:e,errorCode:t,signal:r,signalDescription:n,exitCode:s,isCanceled:D})=>u?`timed out after ${e} milliseconds`:D?"was canceled":t!==void 0?`failed with ${t}`:r!==void 0?`was killed with ${r} (${n})`:s!==void 0?`failed with exit code ${s}`:"failed","getErrorPrefix"),_D=o(({stdout:u,stderr:e,all:t,error:r,signal:n,exitCode:s,command:D,escapedCommand:a,timedOut:i,isCanceled:c,killed:l,parsed:{options:{timeout:C,cwd:F=$.cwd()}}})=>{s=s===null?void 0:s,n=n===null?void 0:n;const E=n===void 0?void 0:io[n].description,d=r&&r.code,f=`Command ${Fo({timedOut:i,timeout:C,errorCode:d,signal:n,signalDescription:E,exitCode:s,isCanceled:c})}: ${D}`,p=Object.prototype.toString.call(r)==="[object Error]",h=p?`${f}
|
|
25
25
|
${r.message}`:f,g=[h,e,u].filter(Boolean).join(`
|