index.js 24.1 KB
module.exports=(()=>{var e={205:(e,t,r)=>{var n=r(223);var o=function(){};var i=function(e){return e.setHeader&&typeof e.abort==="function"};var s=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3};var a=function(e,t,r){if(typeof t==="function")return a(e,null,t);if(!t)t={};r=n(r||o);var c=e._writableState;var u=e._readableState;var d=t.readable||t.readable!==false&&e.readable;var l=t.writable||t.writable!==false&&e.writable;var f=false;var p=function(){if(!e.writable)m()};var m=function(){l=false;if(!d)r.call(e)};var x=function(){d=false;if(!l)r.call(e)};var b=function(t){r.call(e,t?new Error("exited with error code: "+t):null)};var g=function(t){r.call(e,t)};var v=function(){process.nextTick(y)};var y=function(){if(f)return;if(d&&!(u&&(u.ended&&!u.destroyed)))return r.call(e,new Error("premature close"));if(l&&!(c&&(c.ended&&!c.destroyed)))return r.call(e,new Error("premature close"))};var h=function(){e.req.on("finish",m)};if(i(e)){e.on("complete",m);e.on("abort",v);if(e.req)h();else e.on("request",h)}else if(l&&!c){e.on("end",p);e.on("close",p)}if(s(e))e.on("exit",b);e.on("end",x);e.on("finish",m);if(t.error!==false)e.on("error",g);e.on("close",v);return function(){f=true;e.removeListener("complete",m);e.removeListener("abort",v);e.removeListener("request",h);if(e.req)e.req.removeListener("finish",m);e.removeListener("end",p);e.removeListener("close",p);e.removeListener("finish",m);e.removeListener("exit",b);e.removeListener("end",x);e.removeListener("error",g);e.removeListener("close",v)}};e.exports=a},447:(e,t,r)=>{"use strict";const n=r(622);const o=r(129);const i=r(213);const s=r(174);const a=r(502);const c=r(82);const u=r(187);const d=r(166);const{spawnedKill:l,spawnedCancel:f,setupTimeout:p,setExitHandler:m}=r(819);const{handleInput:x,getSpawnedResult:b,makeAllStream:g,validateInputSync:v}=r(592);const{mergePromise:y,getSpawnedPromise:h}=r(814);const{joinCommand:S,parseCommand:w}=r(286);const I=1e3*1e3*100;const G=({env:e,extendEnv:t,preferLocal:r,localDir:n,execPath:o})=>{const i=t?{...process.env,...e}:e;if(r){return a.env({env:i,cwd:n,execPath:o})}return i};const T=(e,t,r={})=>{const o=i._parse(e,t,r);e=o.command;t=o.args;r=o.options;r={maxBuffer:I,buffer:true,stripFinalNewline:true,extendEnv:true,preferLocal:false,localDir:r.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:true,cleanup:true,all:false,windowsHide:true,...r};r.env=G(r);r.stdio=d(r);if(process.platform==="win32"&&n.basename(e,".exe")==="cmd"){t.unshift("/q")}return{file:e,args:t,options:r,parsed:o}};const E=(e,t,r)=>{if(typeof t!=="string"&&!Buffer.isBuffer(t)){return r===undefined?undefined:""}if(e.stripFinalNewline){return s(t)}return t};const C=(e,t,r)=>{const n=T(e,t,r);const s=S(e,t);let a;try{a=o.spawn(n.file,n.args,n.options)}catch(e){const t=new o.ChildProcess;const r=Promise.reject(u({error:e,stdout:"",stderr:"",all:"",command:s,parsed:n,timedOut:false,isCanceled:false,killed:false}));return y(t,r)}const d=h(a);const v=p(a,n.options,d);const w=m(a,n.options,v);const I={isCanceled:false};a.kill=l.bind(null,a.kill.bind(a));a.cancel=f.bind(null,a,I);const G=async()=>{const[{error:e,exitCode:t,signal:r,timedOut:o},i,c,d]=await b(a,n.options,w);const l=E(n.options,i);const f=E(n.options,c);const p=E(n.options,d);if(e||t!==0||r!==null){const i=u({error:e,exitCode:t,signal:r,stdout:l,stderr:f,all:p,command:s,parsed:n,timedOut:o,isCanceled:I.isCanceled,killed:a.killed});if(!n.options.reject){return i}throw i}return{command:s,exitCode:0,stdout:l,stderr:f,all:p,failed:false,timedOut:false,isCanceled:false,killed:false}};const C=c(G);i._enoent.hookChildProcess(a,n.parsed);x(a,n.options.input);a.all=g(a,n.options);return y(a,C)};e.exports=C;e.exports.sync=((e,t,r)=>{const n=T(e,t,r);const i=S(e,t);v(n.options);let s;try{s=o.spawnSync(n.file,n.args,n.options)}catch(e){throw u({error:e,stdout:"",stderr:"",all:"",command:i,parsed:n,timedOut:false,isCanceled:false,killed:false})}const a=E(n.options,s.stdout,s.error);const c=E(n.options,s.stderr,s.error);if(s.error||s.status!==0||s.signal!==null){const e=u({stdout:a,stderr:c,error:s.error,signal:s.signal,exitCode:s.status,command:i,parsed:n,timedOut:s.error&&s.error.code==="ETIMEDOUT",isCanceled:false,killed:s.signal!==null});if(!n.options.reject){return e}throw e}return{command:i,exitCode:0,stdout:a,stderr:c,failed:false,timedOut:false,isCanceled:false,killed:false}});e.exports.command=((e,t)=>{const[r,...n]=w(e);return C(r,n,t)});e.exports.commandSync=((e,t)=>{const[r,...n]=w(e);return C.sync(r,n,t)});e.exports.node=((e,t,r={})=>{if(t&&!Array.isArray(t)&&typeof t==="object"){r=t;t=[]}const n=d.node(r);const{nodePath:o=process.execPath,nodeOptions:i=process.execArgv}=r;return C(o,[...i,e,...Array.isArray(t)?t:[]],{...r,stdin:undefined,stdout:undefined,stderr:undefined,stdio:n,shell:false})})},286:e=>{"use strict";const t=/ +/g;const r=(e,t=[])=>{if(!Array.isArray(t)){return e}return[e,...t].join(" ")};const n=(e,t,r)=>{if(r===0){return[t]}const n=e[e.length-1];if(n.endsWith("\\")){return[...e.slice(0,-1),`${n.slice(0,-1)} ${t}`]}return[...e,t]};const o=e=>{return e.trim().split(t).reduce(n,[])};e.exports={joinCommand:r,parseCommand:o}},187:(e,t,r)=>{"use strict";const{signalsByName:n}=r(779);const o=({timedOut:e,timeout:t,errorCode:r,signal:n,signalDescription:o,exitCode:i,isCanceled:s})=>{if(e){return`timed out after ${t} milliseconds`}if(s){return"was canceled"}if(r!==undefined){return`failed with ${r}`}if(n!==undefined){return`was killed with ${n} (${o})`}if(i!==undefined){return`failed with exit code ${i}`}return"failed"};const i=({stdout:e,stderr:t,all:r,error:i,signal:s,exitCode:a,command:c,timedOut:u,isCanceled:d,killed:l,parsed:{options:{timeout:f}}})=>{a=a===null?undefined:a;s=s===null?undefined:s;const p=s===undefined?undefined:n[s].description;const m=i&&i.code;const x=o({timedOut:u,timeout:f,errorCode:m,signal:s,signalDescription:p,exitCode:a,isCanceled:d});const b=`Command ${x}: ${c}`;const g=Object.prototype.toString.call(i)==="[object Error]";const v=g?`${b}\n${i.message}`:b;const y=[v,t,e].filter(Boolean).join("\n");if(g){i.originalMessage=i.message;i.message=y}else{i=new Error(y)}i.shortMessage=v;i.command=c;i.exitCode=a;i.signal=s;i.signalDescription=p;i.stdout=e;i.stderr=t;if(r!==undefined){i.all=r}if("bufferedData"in i){delete i.bufferedData}i.failed=true;i.timedOut=Boolean(u);i.isCanceled=d;i.killed=l&&!u;return i};e.exports=i},819:(e,t,r)=>{"use strict";const n=r(87);const o=r(931);const i=1e3*5;const s=(e,t="SIGTERM",r={})=>{const n=e(t);a(e,t,r,n);return n};const a=(e,t,r,n)=>{if(!c(t,r,n)){return}const o=d(r);const i=setTimeout(()=>{e("SIGKILL")},o);if(i.unref){i.unref()}};const c=(e,{forceKillAfterTimeout:t},r)=>{return u(e)&&t!==false&&r};const u=e=>{return e===n.constants.signals.SIGTERM||typeof e==="string"&&e.toUpperCase()==="SIGTERM"};const d=({forceKillAfterTimeout:e=true})=>{if(e===true){return i}if(!Number.isFinite(e)||e<0){throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)}return e};const l=(e,t)=>{const r=e.kill();if(r){t.isCanceled=true}};const f=(e,t,r)=>{e.kill(t);r(Object.assign(new Error("Timed out"),{timedOut:true,signal:t}))};const p=(e,{timeout:t,killSignal:r="SIGTERM"},n)=>{if(t===0||t===undefined){return n}if(!Number.isFinite(t)||t<0){throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${t}\` (${typeof t})`)}let o;const i=new Promise((n,i)=>{o=setTimeout(()=>{f(e,r,i)},t)});const s=n.finally(()=>{clearTimeout(o)});return Promise.race([i,s])};const m=async(e,{cleanup:t,detached:r},n)=>{if(!t||r){return n}const i=o(()=>{e.kill()});return n.finally(()=>{i()})};e.exports={spawnedKill:s,spawnedCancel:l,setupTimeout:p,setExitHandler:m}},814:e=>{"use strict";const t=(async()=>{})().constructor.prototype;const r=["then","catch","finally"].map(e=>[e,Reflect.getOwnPropertyDescriptor(t,e)]);const n=(e,t)=>{for(const[n,o]of r){const r=typeof t==="function"?(...e)=>Reflect.apply(o.value,t(),e):o.value.bind(t);Reflect.defineProperty(e,n,{...o,value:r})}return e};const o=e=>{return new Promise((t,r)=>{e.on("exit",(e,r)=>{t({exitCode:e,signal:r})});e.on("error",e=>{r(e)});if(e.stdin){e.stdin.on("error",e=>{r(e)})}})};e.exports={mergePromise:n,getSpawnedPromise:o}},166:e=>{"use strict";const t=["stdin","stdout","stderr"];const r=e=>t.some(t=>e[t]!==undefined);const n=e=>{if(!e){return}const{stdio:n}=e;if(n===undefined){return t.map(t=>e[t])}if(r(e)){throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${t.map(e=>`\`${e}\``).join(", ")}`)}if(typeof n==="string"){return n}if(!Array.isArray(n)){throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof n}\``)}const o=Math.max(n.length,t.length);return Array.from({length:o},(e,t)=>n[t])};e.exports=n;e.exports.node=(e=>{const t=n(e);if(t==="ipc"){return"ipc"}if(t===undefined||typeof t==="string"){return[t,t,t,"ipc"]}if(t.includes("ipc")){return t}return[...t,"ipc"]})},592:(e,t,r)=>{"use strict";const n=r(554);const o=r(766);const i=r(583);const s=(e,t)=>{if(t===undefined||e.stdin===undefined){return}if(n(t)){t.pipe(e.stdin)}else{e.stdin.end(t)}};const a=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr){return}const r=i();if(e.stdout){r.add(e.stdout)}if(e.stderr){r.add(e.stderr)}return r};const c=async(e,t)=>{if(!e){return}e.destroy();try{return await t}catch(e){return e.bufferedData}};const u=(e,{encoding:t,buffer:r,maxBuffer:n})=>{if(!e||!r){return}if(t){return o(e,{encoding:t,maxBuffer:n})}return o.buffer(e,{maxBuffer:n})};const d=async({stdout:e,stderr:t,all:r},{encoding:n,buffer:o,maxBuffer:i},s)=>{const a=u(e,{encoding:n,buffer:o,maxBuffer:i});const d=u(t,{encoding:n,buffer:o,maxBuffer:i});const l=u(r,{encoding:n,buffer:o,maxBuffer:i*2});try{return await Promise.all([s,a,d,l])}catch(n){return Promise.all([{error:n,signal:n.signal,timedOut:n.timedOut},c(e,a),c(t,d),c(r,l)])}};const l=({input:e})=>{if(n(e)){throw new TypeError("The `input` option cannot be a stream in sync mode")}};e.exports={handleInput:s,makeAllStream:a,getSpawnedResult:d,validateInputSync:l}},585:(e,t,r)=>{"use strict";const{PassThrough:n}=r(413);e.exports=(e=>{e={...e};const{array:t}=e;let{encoding:r}=e;const o=r==="buffer";let i=false;if(t){i=!(r||o)}else{r=r||"utf8"}if(o){r=null}const s=new n({objectMode:i});if(r){s.setEncoding(r)}let a=0;const c=[];s.on("data",e=>{c.push(e);if(i){a=c.length}else{a+=e.length}});s.getBufferedValue=(()=>{if(t){return c}return o?Buffer.concat(c,a):c.join("")});s.getBufferedLength=(()=>a);return s})},766:(e,t,r)=>{"use strict";const{constants:n}=r(293);const o=r(341);const i=r(585);class MaxBufferError extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}}async function getStream(e,t){if(!e){return Promise.reject(new Error("Expected a stream"))}t={maxBuffer:Infinity,...t};const{maxBuffer:r}=t;let s;await new Promise((a,c)=>{const u=e=>{if(e&&s.getBufferedLength()<=n.MAX_LENGTH){e.bufferedData=s.getBufferedValue()}c(e)};s=o(e,i(t),e=>{if(e){u(e);return}a()});s.on("data",()=>{if(s.getBufferedLength()>r){u(new MaxBufferError)}})});return s.getBufferedValue()}e.exports=getStream;e.exports.default=getStream;e.exports.buffer=((e,t)=>getStream(e,{...t,encoding:"buffer"}));e.exports.array=((e,t)=>getStream(e,{...t,array:true}));e.exports.MaxBufferError=MaxBufferError},887:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SIGNALS=void 0;const r=[{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:true},{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:true},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:true},{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"}];t.SIGNALS=r},779:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.signalsByNumber=t.signalsByName=void 0;var n=r(87);var o=r(435);var i=r(295);const s=function(){const e=(0,o.getSignals)();return e.reduce(a,{})};const a=function(e,{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}){return{...e,[t]:{name:t,number:r,description:n,supported:o,action:i,forced:s,standard:a}}};const c=s();t.signalsByName=c;const u=function(){const e=(0,o.getSignals)();const t=i.SIGRTMAX+1;const r=Array.from({length:t},(t,r)=>d(r,e));return Object.assign({},...r)};const d=function(e,t){const r=l(e,t);if(r===undefined){return{}}const{name:n,description:o,supported:i,action:s,forced:a,standard:c}=r;return{[e]:{name:n,number:e,description:o,supported:i,action:s,forced:a,standard:c}}};const l=function(e,t){const r=t.find(({name:t})=>n.constants.signals[t]===e);if(r!==undefined){return r}return t.find(t=>t.number===e)};const f=u();t.signalsByNumber=f},295:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SIGRTMAX=t.getRealtimeSignals=void 0;const r=function(){const e=i-o+1;return Array.from({length:e},n)};t.getRealtimeSignals=r;const n=function(e,t){return{name:`SIGRT${t+1}`,number:o+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}};const o=34;const i=64;t.SIGRTMAX=i},435:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getSignals=void 0;var n=r(87);var o=r(887);var i=r(295);const s=function(){const e=(0,i.getRealtimeSignals)();const t=[...o.SIGNALS,...e].map(a);return t};t.getSignals=s;const a=function({name:e,number:t,description:r,action:o,forced:i=false,standard:s}){const{signals:{[e]:a}}=n.constants;const c=a!==undefined;const u=c?a:t;return{name:e,number:u,description:r,supported:c,action:o,forced:i,standard:s}}},554:e=>{"use strict";const t=e=>e!==null&&typeof e==="object"&&typeof e.pipe==="function";t.writable=(e=>t(e)&&e.writable!==false&&typeof e._write==="function"&&typeof e._writableState==="object");t.readable=(e=>t(e)&&e.readable!==false&&typeof e._read==="function"&&typeof e._readableState==="object");t.duplex=(e=>t.writable(e)&&t.readable(e));t.transform=(e=>t.duplex(e)&&typeof e._transform==="function"&&typeof e._transformState==="object");e.exports=t},47:e=>{"use strict";const t=(e,t)=>{for(const r of Reflect.ownKeys(t)){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}return e};e.exports=t;e.exports.default=t},502:(e,t,r)=>{"use strict";const n=r(622);const o=r(278);const i=e=>{e={cwd:process.cwd(),path:process.env[o()],execPath:process.execPath,...e};let t;let r=n.resolve(e.cwd);const i=[];while(t!==r){i.push(n.join(r,"node_modules/.bin"));t=r;r=n.resolve(r,"..")}const s=n.resolve(e.cwd,e.execPath,"..");i.push(s);return i.concat(e.path).join(n.delimiter)};e.exports=i;e.exports.default=i;e.exports.env=(t=>{t={env:process.env,...t};const r={...t.env};const n=o({env:r});t.path=r[n];r[n]=e.exports(t);return r})},278:e=>{"use strict";const t=(e={})=>{const t=e.env||process.env;const r=e.platform||process.platform;if(r!=="win32"){return"PATH"}return Object.keys(t).reverse().find(e=>e.toUpperCase()==="PATH")||"Path"};e.exports=t;e.exports.default=t},223:(e,t,r)=>{var n=r(940);e.exports=n(once);e.exports.strict=n(onceStrict);once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})});function once(e){var t=function(){if(t.called)return t.value;t.called=true;return t.value=e.apply(this,arguments)};t.called=false;return t}function onceStrict(e){var t=function(){if(t.called)throw new Error(t.onceError);t.called=true;return t.value=e.apply(this,arguments)};var r=e.name||"Function wrapped with `once`";t.onceError=r+" shouldn't be called more than once";t.called=false;return t}},82:(e,t,r)=>{"use strict";const n=r(47);const o=new WeakMap;const i=(e,t={})=>{if(typeof e!=="function"){throw new TypeError("Expected a function")}let r;let i=0;const s=e.displayName||e.name||"<anonymous>";const a=function(...n){o.set(a,++i);if(i===1){r=e.apply(this,n);e=null}else if(t.throw===true){throw new Error(`Function \`${s}\` can only be called once`)}return r};n(a,e);o.set(a,i);return a};e.exports=i;e.exports.default=i;e.exports.callCount=(e=>{if(!o.has(e)){throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`)}return o.get(e)})},341:(e,t,r)=>{var n=r(223);var o=r(205);var i=r(747);var s=function(){};var a=/^v?\.0/.test(process.version);var c=function(e){return typeof e==="function"};var u=function(e){if(!a)return false;if(!i)return false;return(e instanceof(i.ReadStream||s)||e instanceof(i.WriteStream||s))&&c(e.close)};var d=function(e){return e.setHeader&&c(e.abort)};var l=function(e,t,r,i){i=n(i);var a=false;e.on("close",function(){a=true});o(e,{readable:t,writable:r},function(e){if(e)return i(e);a=true;i()});var l=false;return function(t){if(a)return;if(l)return;l=true;if(u(e))return e.close(s);if(d(e))return e.abort();if(c(e.destroy))return e.destroy();i(t||new Error("stream was destroyed"))}};var f=function(e){e()};var p=function(e,t){return e.pipe(t)};var m=function(){var e=Array.prototype.slice.call(arguments);var t=c(e[e.length-1]||s)&&e.pop()||s;if(Array.isArray(e[0]))e=e[0];if(e.length<2)throw new Error("pump requires two streams per minimum");var r;var n=e.map(function(o,i){var s=i<e.length-1;var a=i>0;return l(o,s,a,function(e){if(!r)r=e;if(e)n.forEach(f);if(s)return;n.forEach(f);t(r)})});return e.reduce(p)};e.exports=m},931:(e,t,r)=>{var n=r(357);var o=r(710);var i=/^win/i.test(process.platform);var s=r(614);if(typeof s!=="function"){s=s.EventEmitter}var a;if(process.__signal_exit_emitter__){a=process.__signal_exit_emitter__}else{a=process.__signal_exit_emitter__=new s;a.count=0;a.emitted={}}if(!a.infinite){a.setMaxListeners(Infinity);a.infinite=true}e.exports=function(e,t){n.equal(typeof e,"function","a callback must be provided for exit handler");if(u===false){load()}var r="exit";if(t&&t.alwaysLast){r="afterexit"}var o=function(){a.removeListener(r,e);if(a.listeners("exit").length===0&&a.listeners("afterexit").length===0){unload()}};a.on(r,e);return o};e.exports.unload=unload;function unload(){if(!u){return}u=false;o.forEach(function(e){try{process.removeListener(e,c[e])}catch(e){}});process.emit=l;process.reallyExit=d;a.count-=1}function emit(e,t,r){if(a.emitted[e]){return}a.emitted[e]=true;a.emit(e,t,r)}var c={};o.forEach(function(e){c[e]=function listener(){var t=process.listeners(e);if(t.length===a.count){unload();emit("exit",null,e);emit("afterexit",null,e);if(i&&e==="SIGHUP"){e="SIGINT"}process.kill(process.pid,e)}}});e.exports.signals=function(){return o};e.exports.load=load;var u=false;function load(){if(u){return}u=true;a.count+=1;o=o.filter(function(e){try{process.on(e,c[e]);return true}catch(e){return false}});process.emit=processEmit;process.reallyExit=processReallyExit}var d=process.reallyExit;function processReallyExit(e){process.exitCode=e||0;emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);d.call(process,process.exitCode)}var l=process.emit;function processEmit(e,t){if(e==="exit"){if(t!==undefined){process.exitCode=t}var r=l.apply(this,arguments);emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);return r}else{return l.apply(this,arguments)}}},710:e=>{e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32"){e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}},174:e=>{"use strict";e.exports=(e=>{const t=typeof e==="string"?"\n":"\n".charCodeAt();const r=typeof e==="string"?"\r":"\r".charCodeAt();if(e[e.length-1]===t){e=e.slice(0,e.length-1)}if(e[e.length-1]===r){e=e.slice(0,e.length-1)}return e})},940:e=>{e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach(function(t){wrapper[t]=e[t]});return wrapper;function wrapper(){var t=new Array(arguments.length);for(var r=0;r<t.length;r++){t[r]=arguments[r]}var n=e.apply(this,t);var o=t[t.length-1];if(typeof n==="function"&&n!==o){Object.keys(o).forEach(function(e){n[e]=o[e]})}return n}}},213:e=>{"use strict";e.exports=require("@umijs/deps/compiled/cross-spawn")},583:e=>{"use strict";e.exports=require("@umijs/deps/compiled/merge-stream")},357:e=>{"use strict";e.exports=require("assert")},293:e=>{"use strict";e.exports=require("buffer")},129:e=>{"use strict";e.exports=require("child_process")},614:e=>{"use strict";e.exports=require("events")},747:e=>{"use strict";e.exports=require("fs")},87:e=>{"use strict";e.exports=require("os")},622:e=>{"use strict";e.exports=require("path")},413:e=>{"use strict";e.exports=require("stream")}};var t={};function __nccwpck_require__(r){if(t[r]){return t[r].exports}var n=t[r]={exports:{}};var o=true;try{e[r](n,n.exports,__nccwpck_require__);o=false}finally{if(o)delete t[r]}return n.exports}__nccwpck_require__.ab=__dirname+"/";return __nccwpck_require__(447)})();