@negoziator/ai-commit 1.2.129 → 1.2.130
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 cn=Object.defineProperty;var s=(u,D)=>cn(u,"name",{value:D,configurable:!0})
|
|
|
19
19
|
`:"")+(e?this.indentText({text:this.render(e),spaces:n}):"")}
|
|
20
20
|
`}table({tableData:D,tableOptions:e,tableBreakpoints:n}){return yr(D.map(r=>r.map(o=>this.render(o))),n?$r(n):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:n,aliasesEnabled:r,aliasFormatted:o}=D;let t="";if(o?t+=`${o}, `:r&&(t+=" "),t+=n,"placeholder"in e&&typeof e.placeholder=="string")t+=`${this.flagOperator(D)}${e.placeholder}`;else{const i=this.flagParameter("type"in e?e.type:e);i&&(t+=`${this.flagOperator(D)}${i}`)}return t}flagDefault(D){return JSON.stringify(D)}flagDescription({flag:D}){let e="description"in D?D.description??"":"";if("default"in D){let{default:n}=D;typeof n=="function"&&(n=n()),n&&(e+=` (default: ${this.flagDefault(n)})`)}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)}`)}},s(uu,"M"),uu);const Ku=/^[\w.-]+$/,{stringify:_}=JSON,Gr=/[|\\{}()[\]^$+*?.]/;function Vu(u){const D=[];let e,n;for(const r of u){if(n)throw new Error(`Invalid parameter: Spread parameter ${_(n)} must be last`);const o=r[0],t=r[r.length-1];let i;if(o==="<"&&t===">"&&(i=!0,e))throw new Error(`Invalid parameter: Required parameter ${_(r)} cannot come after optional parameter ${_(e)}`);if(o==="["&&t==="]"&&(i=!1,e=r),i===void 0)throw new Error(`Invalid parameter: ${_(r)}. Must be wrapped in <> (required parameter) or [] (optional parameter)`);let a=r.slice(1,-1);const l=a.slice(-3)==="...";l&&(n=r,a=a.slice(0,-3));const C=a.match(Gr);if(C)throw new Error(`Invalid parameter: ${_(r)}. Invalid character found ${_(C[0])}`);D.push({name:a,required:i,spread:l})}return D}s(Vu,"w$1");function Ju(u,D,e,n){for(let r=0;r<D.length;r+=1){const{name:o,required:t,spread:i}=D[r],a=vr(o);if(a in u)throw new Error(`Invalid parameter: ${_(o)} is used more than once.`);const l=i?e.slice(r):e[r];if(i&&(r=D.length),t&&(!l||i&&l.length===0))return console.error(`Error: Missing required parameter ${_(o)}
|
|
22
|
-
`),n(),process.exit(1);u[a]=l}}s(Ju,"b$2");function Wr(u){return u===void 0||u!==!1}s(Wr,"W$1");function Oe(u,D,e,n){const r={...D.flags},o=D.version;o&&(r.version={type:Boolean,description:"Show version"});const{help:t}=D,i=Wr(t);i&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const a=zn(r,n,{ignore:D.ignoreArgv}),l=s(()=>{console.log(D.version)},"f");if(o&&a.flags.version===!0)return l(),process.exit(0);const C=new Lr,c=i&&t?.render?t.render:d=>C.render(d),F=s(d=>{const E=jr({...D,...d?{help:d}:{},flags:r});console.log(c(E,C))},"u");if(i&&a.flags.help===!0)return F(),process.exit(0);if(D.parameters){let{parameters:d}=D,E=a._;const h=d.indexOf("--"),m=d.slice(h+1),w=Object.create(null);if(h>-1&&m.length>0){d=d.slice(0,h);const P=a._["--"];E=E.slice(0,-P.length||void 0),Ju(w,Vu(d),E,F),Ju(w,Vu(m),P,F)}else Ju(w,Vu(d),E,F);Object.assign(a._,w)}const f={...a,showVersion:l,showHelp:F};return typeof e=="function"&&e(f),{command:u,...f}}s(Oe,"x$2");function Ur(u,D){const e=new Map;for(const n of D){const r=[n.options.name],{alias:o}=n.options;o&&(Array.isArray(o)?r.push(...o):r.push(o));for(const t of r){if(e.has(t))throw new Error(`Duplicate command name found: ${_(t)}`);e.set(t,n)}}return e.get(u)}s(Ur,"z$1");function zr(u,D,e=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!Ku.test(u.name)))throw new Error(`Invalid script name: ${_(u.name)}`);const n=e[0];if(u.commands&&Ku.test(n)){const r=Ur(n,u.commands);if(r)return Oe(r.options.name,{...r.options,parent:u},r.callback,e.slice(1))}return Oe(void 0,u,D,e)}s(zr,"Z$1");function Te(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(!Ku.test(e))throw new Error(`Invalid command name ${JSON.stringify(e)}. Command names must be one word.`);return{options:u,callback:D}}s(Te,"G");var Ie="1.2.
|
|
22
|
+
`),n(),process.exit(1);u[a]=l}}s(Ju,"b$2");function Wr(u){return u===void 0||u!==!1}s(Wr,"W$1");function Oe(u,D,e,n){const r={...D.flags},o=D.version;o&&(r.version={type:Boolean,description:"Show version"});const{help:t}=D,i=Wr(t);i&&!("help"in r)&&(r.help={type:Boolean,alias:"h",description:"Show help"});const a=zn(r,n,{ignore:D.ignoreArgv}),l=s(()=>{console.log(D.version)},"f");if(o&&a.flags.version===!0)return l(),process.exit(0);const C=new Lr,c=i&&t?.render?t.render:d=>C.render(d),F=s(d=>{const E=jr({...D,...d?{help:d}:{},flags:r});console.log(c(E,C))},"u");if(i&&a.flags.help===!0)return F(),process.exit(0);if(D.parameters){let{parameters:d}=D,E=a._;const h=d.indexOf("--"),m=d.slice(h+1),w=Object.create(null);if(h>-1&&m.length>0){d=d.slice(0,h);const P=a._["--"];E=E.slice(0,-P.length||void 0),Ju(w,Vu(d),E,F),Ju(w,Vu(m),P,F)}else Ju(w,Vu(d),E,F);Object.assign(a._,w)}const f={...a,showVersion:l,showHelp:F};return typeof e=="function"&&e(f),{command:u,...f}}s(Oe,"x$2");function Ur(u,D){const e=new Map;for(const n of D){const r=[n.options.name],{alias:o}=n.options;o&&(Array.isArray(o)?r.push(...o):r.push(o));for(const t of r){if(e.has(t))throw new Error(`Duplicate command name found: ${_(t)}`);e.set(t,n)}}return e.get(u)}s(Ur,"z$1");function zr(u,D,e=process.argv.slice(2)){if(!u)throw new Error("Options is required");if("name"in u&&(!u.name||!Ku.test(u.name)))throw new Error(`Invalid script name: ${_(u.name)}`);const n=e[0];if(u.commands&&Ku.test(n)){const r=Ur(n,u.commands);if(r)return Oe(r.options.name,{...r.options,parent:u},r.callback,e.slice(1))}return Oe(void 0,u,D,e)}s(zr,"Z$1");function Te(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(!Ku.test(e))throw new Error(`Invalid command name ${JSON.stringify(e)}. Command names must be one word.`);return{options:u,callback:D}}s(Te,"G");var Ie="1.2.130",qr="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 H(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}s(H,"getDefaultExportFromCjs");var Y={exports:{}},Zu,Pe;function Hr(){if(Pe)return Zu;Pe=1,Zu=n,n.sync=r;var u=Gu;function D(o,t){var i=t.pathExt!==void 0?t.pathExt:process.env.PATHEXT;if(!i||(i=i.split(";"),i.indexOf("")!==-1))return!0;for(var a=0;a<i.length;a++){var l=i[a].toLowerCase();if(l&&o.substr(-l.length).toLowerCase()===l)return!0}return!1}s(D,"checkPathExt");function e(o,t,i){return!o.isSymbolicLink()&&!o.isFile()?!1:D(t,i)}s(e,"checkStat");function n(o,t,i){u.stat(o,function(a,l){i(a,a?!1:e(l,o,t))})}s(n,"isexe");function r(o,t){return e(u.statSync(o),o,t)}return s(r,"sync"),Zu}s(Hr,"requireWindows");var Xu,ke;function Yr(){if(ke)return Xu;ke=1,Xu=D,D.sync=e;var u=Gu;function D(o,t,i){u.stat(o,function(a,l){i(a,a?!1:n(l,t))})}s(D,"isexe");function e(o,t){return n(u.statSync(o),t)}s(e,"sync");function n(o,t){return o.isFile()&&r(o,t)}s(n,"checkStat");function r(o,t){var i=o.mode,a=o.uid,l=o.gid,C=t.uid!==void 0?t.uid:process.getuid&&process.getuid(),c=t.gid!==void 0?t.gid:process.getgid&&process.getgid(),F=parseInt("100",8),f=parseInt("010",8),d=parseInt("001",8),E=F|f,h=i&d||i&f&&l===c||i&F&&a===C||i&E&&C===0;return h}return s(r,"checkMode"),Xu}s(Yr,"requireMode");var Bu;process.platform==="win32"||A.TESTING_WINDOWS?Bu=Hr():Bu=Yr();var Kr=Qu;Qu.sync=Vr;function Qu(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(n,r){Qu(u,D||{},function(o,t){o?r(o):n(t)})})}Bu(u,D||{},function(n,r){n&&(n.code==="EACCES"||D&&D.ignoreErrors)&&(n=null,r=!1),e(n,r)})}s(Qu,"isexe$1");function Vr(u,D){try{return Bu.sync(u,D||{})}catch(e){if(D&&D.ignoreErrors||e.code==="EACCES")return!1;throw e}}s(Vr,"sync");const K=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",_e=q,Jr=K?";":":",Re=Kr,Me=s(u=>Object.assign(new Error(`not found: ${u}`),{code:"ENOENT"}),"getNotFoundError"),je=s((u,D)=>{const e=D.colon||Jr,n=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:n,pathExt:o,pathExtExe:r}},"getPathInfo"),Ne=s((u,D,e)=>{typeof D=="function"&&(e=D,D={}),D||(D={});const{pathEnv:n,pathExt:r,pathExtExe:o}=je(u,D),t=[],i=s(l=>new Promise((C,c)=>{if(l===n.length)return D.all&&t.length?C(t):c(Me(u));const F=n[l],f=/^".*"$/.test(F)?F.slice(1,-1):F,d=_e.join(f,u),E=!f&&/^\.[\\\/]/.test(u)?u.slice(0,2)+d:d;C(a(E,l,0))}),"step"),a=s((l,C,c)=>new Promise((F,f)=>{if(c===r.length)return F(i(C+1));const d=r[c];Re(l+d,{pathExt:o},(E,h)=>{if(!E&&h)if(D.all)t.push(l+d);else return F(l+d);return F(a(l,C,c+1))})}),"subStep");return e?i(0).then(l=>e(null,l),e):i(0)},"which$1"),Zr=s((u,D)=>{D=D||{};const{pathEnv:e,pathExt:n,pathExtExe:r}=je(u,D),o=[];for(let t=0;t<e.length;t++){const i=e[t],a=/^".*"$/.test(i)?i.slice(1,-1):i,l=_e.join(a,u),C=!a&&/^\.[\\\/]/.test(u)?u.slice(0,2)+l:l;for(let c=0;c<n.length;c++){const F=C+n[c];try{if(Re.sync(F,{pathExt:r}))if(D.all)o.push(F);else return F}catch{}}}if(D.all&&o.length)return o;if(D.nothrow)return null;throw Me(u)},"whichSync");var Xr=Ne;Ne.sync=Zr;var uD={exports:{}};const Le=s((u={})=>{const D=u.env||process.env;return(u.platform||process.platform)!=="win32"?"PATH":Object.keys(D).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"},"pathKey$1");uD.exports=Le,uD.exports.default=Le;var Qr=uD.exports;const Ge=q,uo=Xr,Do=Qr;function We(u,D){const e=u.options.env||process.env,n=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 t;try{t=uo.sync(u.command,{path:e[Do({env:e})],pathExt:D?Ge.delimiter:void 0})}catch{}finally{o&&process.chdir(n)}return t&&(t=Ge.resolve(r?u.options.cwd:"",t)),t}s(We,"resolveCommandAttempt");function eo(u){return We(u)||We(u,!0)}s(eo,"resolveCommand$1");var to=eo,DD={};const eD=/([()\][%!^"`<>&|;, *?])/g;function no(u){return u=u.replace(eD,"^$1"),u}s(no,"escapeCommand");function ro(u,D){return u=`${u}`,u=u.replace(/(\\*)"/g,'$1$1\\"'),u=u.replace(/(\\*)$/,"$1$1"),u=`"${u}"`,u=u.replace(eD,"^$1"),D&&(u=u.replace(eD,"^$1")),u}s(ro,"escapeArgument"),DD.command=no,DD.argument=ro;var oo=/^#!(.*)/;const so=oo;var io=s((u="")=>{const D=u.match(so);if(!D)return null;const[e,n]=D[0].replace(/#! ?/,"").split(" "),r=e.split("/").pop();return r==="env"?n:n?`${r} ${n}`:r},"shebangCommand$1");const tD=Gu,ao=io;function co(u){const e=Buffer.alloc(150);let n;try{n=tD.openSync(u,"r"),tD.readSync(n,e,0,150,0),tD.closeSync(n)}catch{}return ao(e.toString())}s(co,"readShebang$1");var lo=co;const Fo=q,Ue=to,ze=DD,Co=lo,fo=process.platform==="win32",Eo=/\.(?:com|exe)$/i,po=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function ho(u){u.file=Ue(u);const D=u.file&&Co(u.file);return D?(u.args.unshift(u.file),u.command=D,Ue(u)):u.file}s(ho,"detectShebang");function mo(u){if(!fo)return u;const D=ho(u),e=!Eo.test(D);if(u.options.forceShell||e){const n=po.test(D);u.command=Fo.normalize(u.command),u.command=ze.command(u.command),u.args=u.args.map(o=>ze.argument(o,n));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}s(mo,"parseNonShell");function go(u,D,e){D&&!Array.isArray(D)&&(e=D,D=null),D=D?D.slice(0):[],e=Object.assign({},e);const n={command:u,args:D,options:e,file:void 0,original:{command:u,args:D}};return e.shell?n:mo(n)}s(go,"parse$1");var Bo=go;const nD=process.platform==="win32";function rD(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})}s(rD,"notFoundError");function bo(u,D){if(!nD)return;const e=u.emit;u.emit=function(n,r){if(n==="exit"){const o=qe(r,D);if(o)return e.call(u,"error",o)}return e.apply(u,arguments)}}s(bo,"hookChildProcess");function qe(u,D){return nD&&u===1&&!D.file?rD(D.original,"spawn"):null}s(qe,"verifyENOENT");function yo(u,D){return nD&&u===1&&!D.file?rD(D.original,"spawnSync"):null}s(yo,"verifyENOENTSync");var Ao={hookChildProcess:bo,verifyENOENT:qe,verifyENOENTSync:yo,notFoundError:rD};const He=Cn,oD=Bo,sD=Ao;function Ye(u,D,e){const n=oD(u,D,e),r=He.spawn(n.command,n.args,n.options);return sD.hookChildProcess(r,n),r}s(Ye,"spawn");function wo(u,D,e){const n=oD(u,D,e),r=He.spawnSync(n.command,n.args,n.options);return r.error=r.error||sD.verifyENOENTSync(r.status,n),r}s(wo,"spawnSync"),Y.exports=Ye,Y.exports.spawn=Ye,Y.exports.sync=wo,Y.exports._parse=oD,Y.exports._enoent=sD;var $o=Y.exports,vo=H($o);function xo(u){const D=typeof u=="string"?`
|
|
23
23
|
`:10,e=typeof u=="string"?"\r":13;return u[u.length-1]===D&&(u=u.slice(0,-1)),u[u.length-1]===e&&(u=u.slice(0,-1)),u}s(xo,"stripFinalNewline");function Ke(u={}){const{env:D=process.env,platform:e=process.platform}=u;return e!=="win32"?"PATH":Object.keys(D).reverse().find(n=>n.toUpperCase()==="PATH")||"Path"}s(Ke,"pathKey");const So=s(({cwd:u=y.cwd(),path:D=y.env[Ke()],preferLocal:e=!0,execPath:n=y.execPath,addExecPath:r=!0}={})=>{const o=u instanceof URL?ne(u):u,t=z.resolve(o),i=[];return e&&Oo(i,t),r&&To(i,n,t),[...i,D].join(z.delimiter)},"npmRunPath"),Oo=s((u,D)=>{let e;for(;e!==D;)u.push(z.join(D,"node_modules/.bin")),e=D,D=z.resolve(D,"..")},"applyPreferLocal"),To=s((u,D,e)=>{const n=D instanceof URL?ne(D):D;u.push(z.resolve(e,n,".."))},"applyExecPath"),Io=s(({env:u=y.env,...D}={})=>{u={...u};const e=Ke({env:u});return D.path=u[e],u[e]=So(D),u},"npmRunPathEnv"),Po=s((u,D,e,n)=>{if(e==="length"||e==="prototype"||e==="arguments"||e==="caller")return;const r=Object.getOwnPropertyDescriptor(u,e),o=Object.getOwnPropertyDescriptor(D,e);!ko(r,o)&&n||Object.defineProperty(u,e,o)},"copyProperty"),ko=s(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)},"canCopyProperty"),_o=s((u,D)=>{const e=Object.getPrototypeOf(D);e!==Object.getPrototypeOf(u)&&Object.setPrototypeOf(u,e)},"changePrototype"),Ro=s((u,D)=>`/* Wrapped ${u}*/
|
|
24
24
|
${D}`,"wrappedToString"),Mo=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),jo=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),No=s((u,D,e)=>{const n=e===""?"":`with ${e.trim()}() `,r=Ro.bind(null,n,D.toString());Object.defineProperty(r,"name",jo),Object.defineProperty(u,"toString",{...Mo,value:r})},"changeToString");function Lo(u,D,{ignoreNonConfigurable:e=!1}={}){const{name:n}=u;for(const r of Reflect.ownKeys(D))Po(u,D,r,e);return _o(u,D),No(u,D,n),u}s(Lo,"mimicFunction");const bu=new WeakMap,Ve=s((u,D={})=>{if(typeof u!="function")throw new TypeError("Expected a function");let e,n=0;const r=u.displayName||u.name||"<anonymous>",o=s(function(...t){if(bu.set(o,++n),n===1)e=u.apply(this,t),u=null;else if(D.throw===!0)throw new Error(`Function \`${r}\` can only be called once`);return e},"onetime");return Lo(o,u),bu.set(o,n),o},"onetime");Ve.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 Go=s(()=>{const u=Ze-Je+1;return Array.from({length:u},Wo)},"getRealtimeSignals"),Wo=s((u,D)=>({name:`SIGRT${D+1}`,number:Je+D,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),"getRealtimeSignal"),Je=34,Ze=64,Uo=[{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"}],Xe=s(()=>{const u=Go();return[...Uo,...u].map(zo)},"getSignals"),zo=s(({name:u,number:D,description:e,action:n,forced:r=!1,standard:o})=>{const{signals:{[u]:t}}=re,i=t!==void 0;return{name:u,number:i?t:D,description:e,supported:i,action:n,forced:r,standard:o}},"normalizeSignal"),qo=s(()=>{const u=Xe();return Object.fromEntries(u.map(Ho))},"getSignalsByName"),Ho=s(({name:u,number:D,description:e,supported:n,action:r,forced:o,standard:t})=>[u,{name:u,number:D,description:e,supported:n,action:r,forced:o,standard:t}],"getSignalByName"),Yo=qo(),Ko=s(()=>{const u=Xe(),D=Ze+1,e=Array.from({length:D},(n,r)=>Vo(r,u));return Object.assign({},...e)},"getSignalsByNumber"),Vo=s((u,D)=>{const e=Jo(u,D);if(e===void 0)return{};const{name:n,description:r,supported:o,action:t,forced:i,standard:a}=e;return{[u]:{name:n,number:u,description:r,supported:o,action:t,forced:i,standard:a}}},"getSignalByNumber"),Jo=s((u,D)=>{const e=D.find(({name:n})=>re.signals[n]===u);return e!==void 0?e:D.find(n=>n.number===u)},"findSignalByNumber");Ko();const Zo=s(({timedOut:u,timeout:D,errorCode:e,signal:n,signalDescription:r,exitCode:o,isCanceled:t})=>u?`timed out after ${D} milliseconds`:t?"was canceled":e!==void 0?`failed with ${e}`:n!==void 0?`was killed with ${n} (${r})`:o!==void 0?`failed with exit code ${o}`:"failed","getErrorPrefix"),Qe=s(({stdout:u,stderr:D,all:e,error:n,signal:r,exitCode:o,command:t,escapedCommand:i,timedOut:a,isCanceled:l,killed:C,parsed:{options:{timeout:c,cwd:F=y.cwd()}}})=>{o=o===null?void 0:o,r=r===null?void 0:r;const f=r===void 0?void 0:Yo[r].description,d=n&&n.code,h=`Command ${Zo({timedOut:a,timeout:c,errorCode:d,signal:r,signalDescription:f,exitCode:o,isCanceled:l})}: ${t}`,m=Object.prototype.toString.call(n)==="[object Error]",w=m?`${h}
|
|
25
25
|
${n.message}`:h,P=[w,D,u].filter(Boolean).join(`
|