@negoziator/ai-commit 1.2.146 → 1.2.147
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 Ht=Object.defineProperty;var o=(u,e)=>Ht(u,"name",{value:e,configurable:!0})
|
|
|
19
19
|
`:"")+(t?this.indentText({text:this.render(t),spaces:n}):"")}
|
|
20
20
|
`}table({tableData:e,tableOptions:t,tableBreakpoints:n}){return or(e.map(r=>r.map(s=>this.render(s))),n?ar(n):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:n,aliasesEnabled:r,aliasFormatted:s}=e;let D="";if(s?D+=`${s}, `:r&&(D+=" "),D+=n,"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:n}=e;typeof n=="function"&&(n=n()),n&&(t+=` (default: ${this.flagDefault(n)})`)}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(Re,"M");let Gu=Re;const qu=/^[\w.-]+$/,{stringify:k}=JSON,yr=/[|\\{}()[\]^$+*?.]/;function Wu(u){const e=[];let t,n;for(const r of u){if(n)throw new Error(`Invalid parameter: Spread parameter ${k(n)} must be last`);const s=r[0],D=r[r.length-1];let a;if(s==="<"&&D===">"&&(a=!0,t))throw new Error(`Invalid parameter: Required parameter ${k(r)} cannot come after optional parameter ${k(t)}`);if(s==="["&&D==="]"&&(a=!1,t=r),a===void 0)throw new Error(`Invalid parameter: ${k(r)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let i=r.slice(1,-1);const c=i.slice(-3)==="...";c&&(n=r,i=i.slice(0,-3));const l=i.match(yr);if(l)throw new Error(`Invalid parameter: ${k(r)}. Invalid character found ${k(l[0])}`);e.push({name:i,required:a,spread:c})}return e}o(Wu,"w$1");function Uu(u,e,t,n){for(let r=0;r<e.length;r+=1){const{name:s,required:D,spread:a}=e[r],i=cr(s);if(i in u)throw new Error(`Invalid parameter: ${k(s)} is used more than once.`);const c=a?t.slice(r):t[r];if(a&&(r=e.length),D&&(!c||a&&c.length===0))return console.error(`Error: Missing required parameter ${k(s)}
|
|
22
|
-
`),n(),process.exit(1);u[i]=c}}o(Uu,"b");function Ar(u){return u===void 0||u!==!1}o(Ar,"W$1");function dD(u,e,t,n){const r={...e.flags},s=e.version;s&&(r.version={type:Boolean,description:"Show version"});const{help:D}=e,a=Ar(D);a&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const i=$n(r,n,{ignore:e.ignoreArgv}),c=o(()=>{console.log(e.version)},"f");if(s&&i.flags.version===!0)return c(),process.exit(0);const l=new Gu,C=a&&D?.render?D.render:f=>l.render(f),F=o(f=>{const g=Br({...e,...f?{help:f}:{},flags:r});console.log(C(g,l))},"u");if(a&&i.flags.help===!0)return F(),process.exit(0);if(e.parameters){let{parameters:f}=e,g=i._;const d=f.indexOf("--"),p=f.slice(d+1),h=Object.create(null);if(d>-1&&p.length>0){f=f.slice(0,d);const m=i._["--"];g=g.slice(0,-m.length||void 0),Uu(h,Wu(f),g,F),Uu(h,Wu(p),m,F)}else Uu(h,Wu(f),g,F);Object.assign(i._,h)}const E={...i,showVersion:c,showHelp:F};return typeof t=="function"&&t(E),{command:u,...E}}o(dD,"x$1");function wr(u,e){const t=new Map;for(const n of e){const r=[n.options.name],{alias:s}=n.options;s&&(Array.isArray(s)?r.push(...s):r.push(s));for(const D of r){if(t.has(D))throw new Error(`Duplicate command name found: ${k(D)}`);t.set(D,n)}}return t.get(u)}o(wr,"z$1");function vr(u,e,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!qu.test(u.name)))throw new Error(`Invalid script name: ${k(u.name)}`);const n=t[0];if(u.commands&&qu.test(n)){const r=wr(n,u.commands);if(r)return dD(r.options.name,{...r.options,parent:u},r.callback,t.slice(1))}return dD(void 0,u,e,t)}o(vr,"Z");function ED(u,e){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(!qu.test(t))throw new Error(`Invalid command name ${JSON.stringify(t)}. Command names must be one word.`);return{options:u,callback:e}}o(ED,"G$1");var pD="1.2.
|
|
22
|
+
`),n(),process.exit(1);u[i]=c}}o(Uu,"b");function Ar(u){return u===void 0||u!==!1}o(Ar,"W$1");function dD(u,e,t,n){const r={...e.flags},s=e.version;s&&(r.version={type:Boolean,description:"Show version"});const{help:D}=e,a=Ar(D);a&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const i=$n(r,n,{ignore:e.ignoreArgv}),c=o(()=>{console.log(e.version)},"f");if(s&&i.flags.version===!0)return c(),process.exit(0);const l=new Gu,C=a&&D?.render?D.render:f=>l.render(f),F=o(f=>{const g=Br({...e,...f?{help:f}:{},flags:r});console.log(C(g,l))},"u");if(a&&i.flags.help===!0)return F(),process.exit(0);if(e.parameters){let{parameters:f}=e,g=i._;const d=f.indexOf("--"),p=f.slice(d+1),h=Object.create(null);if(d>-1&&p.length>0){f=f.slice(0,d);const m=i._["--"];g=g.slice(0,-m.length||void 0),Uu(h,Wu(f),g,F),Uu(h,Wu(p),m,F)}else Uu(h,Wu(f),g,F);Object.assign(i._,h)}const E={...i,showVersion:c,showHelp:F};return typeof t=="function"&&t(E),{command:u,...E}}o(dD,"x$1");function wr(u,e){const t=new Map;for(const n of e){const r=[n.options.name],{alias:s}=n.options;s&&(Array.isArray(s)?r.push(...s):r.push(s));for(const D of r){if(t.has(D))throw new Error(`Duplicate command name found: ${k(D)}`);t.set(D,n)}}return t.get(u)}o(wr,"z$1");function vr(u,e,t=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!qu.test(u.name)))throw new Error(`Invalid script name: ${k(u.name)}`);const n=t[0];if(u.commands&&qu.test(n)){const r=wr(n,u.commands);if(r)return dD(r.options.name,{...r.options,parent:u},r.callback,t.slice(1))}return dD(void 0,u,e,t)}o(vr,"Z");function ED(u,e){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(!qu.test(t))throw new Error(`Invalid command name ${JSON.stringify(t)}. Command names must be one word.`);return{options:u,callback:e}}o(ED,"G$1");var pD="1.2.147",$r="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 K(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}o(K,"getDefaultExportFromCjs");var W={exports:{}},zu,hD;function xr(){if(hD)return zu;hD=1,zu=n,n.sync=r;var u=Ru;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 n(s,D,a){u.stat(s,function(i,c){a(i,i?!1:t(c,s,D))})}o(n,"isexe");function r(s,D){return t(u.statSync(s),s,D)}return o(r,"sync"),zu}o(xr,"requireWindows");var Hu,mD;function Sr(){if(mD)return Hu;mD=1,Hu=e,e.sync=t;var u=Ru;function e(s,D,a){u.stat(s,function(i,c){a(i,i?!1:n(c,D))})}o(e,"isexe");function t(s,D){return n(u.statSync(s),D)}o(t,"sync");function n(s,D){return s.isFile()&&r(s,D)}o(n,"checkStat");function r(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),f=parseInt("001",8),g=F|E,d=a&f||a&E&&c===C||a&F&&i===l||a&g&&l===0;return d}return o(r,"checkMode"),Hu}o(Sr,"requireMode");var Yu,gD;function Or(){if(gD)return Yu;gD=1;var u;process.platform==="win32"||G.TESTING_WINDOWS?u=xr():u=Sr(),Yu=e,e.sync=t;function e(n,r,s){if(typeof r=="function"&&(s=r,r={}),!s){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(D,a){e(n,r||{},function(i,c){i?a(i):D(c)})})}u(n,r||{},function(D,a){D&&(D.code==="EACCES"||r&&r.ignoreErrors)&&(D=null,a=!1),s(D,a)})}o(e,"isexe");function t(n,r){try{return u.sync(n,r||{})}catch(s){if(r&&r.ignoreErrors||s.code==="EACCES")return!1;throw s}}return o(t,"sync"),Yu}o(Or,"requireIsexe");var Vu,BD;function Tr(){if(BD)return Vu;BD=1;const u=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",e=V,t=u?";":":",n=Or(),r=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),f=[],g=o(p=>new Promise((h,m)=>{if(p===C.length)return c.all&&f.length?h(f):m(r(i));const b=C[p],A=/^".*"$/.test(b)?b.slice(1,-1):b,y=e.join(A,i),O=!A&&/^\.[\\\/]/.test(i)?i.slice(0,2)+y:y;h(d(O,p,0))}),"step"),d=o((p,h,m)=>new Promise((b,A)=>{if(m===F.length)return b(g(h+1));const y=F[m];n(p+y,{pathExt:E},(O,N)=>{if(!O&&N)if(c.all)f.push(p+y);else return b(p+y);return b(d(p,h,m+1))})}),"subStep");return l?g(0).then(p=>l(null,p),l):g(0)},"which"),a=o((i,c)=>{c=c||{};const{pathEnv:l,pathExt:C,pathExtExe:F}=s(i,c),E=[];for(let f=0;f<l.length;f++){const g=l[f],d=/^".*"$/.test(g)?g.slice(1,-1):g,p=e.join(d,i),h=!d&&/^\.[\\\/]/.test(i)?i.slice(0,2)+p:p;for(let m=0;m<C.length;m++){const b=h+C[m];try{if(n.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 r(i)},"whichSync");return Vu=D,D.sync=a,Vu}o(Tr,"requireWhich");var du={exports:{}},bD;function Ir(){if(bD)return du.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(r=>r.toUpperCase()==="PATH")||"Path"},"pathKey");return du.exports=u,du.exports.default=u,du.exports}o(Ir,"requirePathKey");var Ku,yD;function Pr(){if(yD)return Ku;yD=1;const u=V,e=Tr(),t=Ir();function n(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(n,"resolveCommandAttempt");function r(s){return n(s)||n(s,!0)}return o(r,"resolveCommand"),Ku=r,Ku}o(Pr,"requireResolveCommand");var Eu={},AD;function Rr(){if(AD)return Eu;AD=1;const u=/([()\][%!^"`<>&|;, *?])/g;function e(n){return n=n.replace(u,"^$1"),n}o(e,"escapeCommand");function t(n,r){return n=`${n}`,n=n.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),n=n.replace(/(?=(\\+?)?)\1$/,"$1$1"),n=`"${n}"`,n=n.replace(u,"^$1"),r&&(n=n.replace(u,"^$1")),n}return o(t,"escapeArgument"),Eu.command=e,Eu.argument=t,Eu}o(Rr,"require_escape");var Ju,wD;function _r(){return wD||(wD=1,Ju=/^#!(.*)/),Ju}o(_r,"requireShebangRegex");var Xu,vD;function kr(){if(vD)return Xu;vD=1;const u=_r();return Xu=o((e="")=>{const t=e.match(u);if(!t)return null;const[n,r]=t[0].replace(/#! ?/,"").split(" "),s=n.split("/").pop();return s==="env"?r:r?`${s} ${r}`:s},"shebangCommand"),Xu}o(kr,"requireShebangCommand");var Zu,$D;function Mr(){if($D)return Zu;$D=1;const u=Ru,e=kr();function t(n){const s=Buffer.alloc(150);let D;try{D=u.openSync(n,"r"),u.readSync(D,s,0,150,0),u.closeSync(D)}catch{}return e(s.toString())}return o(t,"readShebang"),Zu=t,Zu}o(Mr,"requireReadShebang");var Qu,xD;function jr(){if(xD)return Qu;xD=1;const u=V,e=Pr(),t=Rr(),n=Mr(),r=process.platform==="win32",s=/\.(?:com|exe)$/i,D=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function a(l){l.file=e(l);const C=l.file&&n(l.file);return C?(l.args.unshift(l.file),l.command=C,e(l)):l.file}o(a,"detectShebang");function i(l){if(!r)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(g=>t.argument(g,E));const f=[l.command].concat(l.args).join(" ");l.args=["/d","/s","/c",`"${f}"`],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(jr,"requireParse");var ue,SD;function Nr(){if(SD)return ue;SD=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=n(c,D);if(l)return a.call(s,"error",l)}return a.apply(s,arguments)}}o(t,"hookChildProcess");function n(s,D){return u&&s===1&&!D.file?e(D.original,"spawn"):null}o(n,"verifyENOENT");function r(s,D){return u&&s===1&&!D.file?e(D.original,"spawnSync"):null}return o(r,"verifyENOENTSync"),ue={hookChildProcess:t,verifyENOENT:n,verifyENOENTSync:r,notFoundError:e},ue}o(Nr,"requireEnoent");var OD;function Lr(){if(OD)return W.exports;OD=1;const u=Kt,e=jr(),t=Nr();function n(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(n,"spawn");function r(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(r,"spawnSync"),W.exports=n,W.exports.spawn=n,W.exports.sync=r,W.exports._parse=e,W.exports._enoent=t,W.exports}o(Lr,"requireCrossSpawn");var Gr=Lr(),qr=K(Gr);function Wr(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(Wr,"stripFinalNewline");function TD(u={}){const{env:e=process.env,platform:t=process.platform}=u;return t!=="win32"?"PATH":Object.keys(e).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"}o(TD,"pathKey");const Ur=o(({cwd:u=v.cwd(),path:e=v.env[TD()],preferLocal:t=!0,execPath:n=v.execPath,addExecPath:r=!0}={})=>{const s=u instanceof URL?We(u):u,D=Y.resolve(s),a=[];return t&&zr(a,D),r&&Hr(a,n,D),[...a,e].join(Y.delimiter)},"npmRunPath"),zr=o((u,e)=>{let t;for(;t!==e;)u.push(Y.join(e,"node_modules/.bin")),t=e,e=Y.resolve(e,"..")},"applyPreferLocal"),Hr=o((u,e,t)=>{const n=e instanceof URL?We(e):e;u.push(Y.resolve(t,n,".."))},"applyExecPath"),Yr=o(({env:u=v.env,...e}={})=>{u={...u};const t=TD({env:u});return e.path=u[t],u[t]=Ur(e),u},"npmRunPathEnv"),Vr=o((u,e,t,n)=>{if(t==="length"||t==="prototype"||t==="arguments"||t==="caller")return;const r=Object.getOwnPropertyDescriptor(u,t),s=Object.getOwnPropertyDescriptor(e,t);!Kr(r,s)&&n||Object.defineProperty(u,t,s)},"copyProperty"),Kr=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"),Jr=o((u,e)=>{const t=Object.getPrototypeOf(e);t!==Object.getPrototypeOf(u)&&Object.setPrototypeOf(u,t)},"changePrototype"),Xr=o((u,e)=>`/* Wrapped ${u}*/
|
|
24
24
|
${e}`,"wrappedToString"),Zr=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Qr=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),uo=o((u,e,t)=>{const n=t===""?"":`with ${t.trim()}() `,r=Xr.bind(null,n,e.toString());Object.defineProperty(r,"name",Qr),Object.defineProperty(u,"toString",{...Zr,value:r})},"changeToString");function eo(u,e,{ignoreNonConfigurable:t=!1}={}){const{name:n}=u;for(const r of Reflect.ownKeys(e))Vr(u,e,r,t);return Jr(u,e),uo(u,e,n),u}o(eo,"mimicFunction");const pu=new WeakMap,ID=o((u,e={})=>{if(typeof u!="function")throw new TypeError("Expected a function");let t,n=0;const r=u.displayName||u.name||"<anonymous>",s=o(function(...D){if(pu.set(s,++n),n===1)t=u.apply(this,D),u=null;else if(e.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return t},"onetime");return eo(s,u),pu.set(s,n),s},"onetime");ID.callCount=u=>{if(!pu.has(u))throw new Error(`The given function \`${u.name}\` is not wrapped by the \`onetime\` package`);return pu.get(u)};const Do=o(()=>{const u=RD-PD+1;return Array.from({length:u},to)},"getRealtimeSignals"),to=o((u,e)=>({name:`SIGRT${e+1}`,number:PD+e,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),"getRealtimeSignal"),PD=34,RD=64,no=[{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"}],_D=o(()=>{const u=Do();return[...no,...u].map(ro)},"getSignals"),ro=o(({name:u,number:e,description:t,action:n,forced:r=!1,standard:s})=>{const{signals:{[u]:D}}=Ue,a=D!==void 0;return{name:u,number:a?D:e,description:t,supported:a,action:n,forced:r,standard:s}},"normalizeSignal"),oo=o(()=>{const u=_D();return Object.fromEntries(u.map(so))},"getSignalsByName"),so=o(({name:u,number:e,description:t,supported:n,action:r,forced:s,standard:D})=>[u,{name:u,number:e,description:t,supported:n,action:r,forced:s,standard:D}],"getSignalByName"),io=oo(),ao=o(()=>{const u=_D(),e=RD+1,t=Array.from({length:e},(n,r)=>co(r,u));return Object.assign({},...t)},"getSignalsByNumber"),co=o((u,e)=>{const t=lo(u,e);if(t===void 0)return{};const{name:n,description:r,supported:s,action:D,forced:a,standard:i}=t;return{[u]:{name:n,number:u,description:r,supported:s,action:D,forced:a,standard:i}}},"getSignalByNumber"),lo=o((u,e)=>{const t=e.find(({name:n})=>Ue.signals[n]===u);return t!==void 0?t:e.find(n=>n.number===u)},"findSignalByNumber");ao();const Fo=o(({timedOut:u,timeout:e,errorCode:t,signal:n,signalDescription:r,exitCode:s,isCanceled:D})=>u?`timed out after ${e} milliseconds`:D?"was canceled":t!==void 0?`failed with ${t}`:n!==void 0?`was killed with ${n} (${r})`:s!==void 0?`failed with exit code ${s}`:"failed","getErrorPrefix"),kD=o(({stdout:u,stderr:e,all:t,error:n,signal:r,exitCode:s,command:D,escapedCommand:a,timedOut:i,isCanceled:c,killed:l,parsed:{options:{timeout:C,cwd:F=v.cwd()}}})=>{s=s===null?void 0:s,r=r===null?void 0:r;const E=r===void 0?void 0:io[r].description,f=n&&n.code,d=`Command ${Fo({timedOut:i,timeout:C,errorCode:f,signal:r,signalDescription:E,exitCode:s,isCanceled:c})}: ${D}`,p=Object.prototype.toString.call(n)==="[object Error]",h=p?`${d}
|
|
25
25
|
${n.message}`:d,m=[h,e,u].filter(Boolean).join(`
|